diff --git a/old-ui/package.json b/old-ui/package.json index a30372bd..d271ef1c 100644 --- a/old-ui/package.json +++ b/old-ui/package.json @@ -1,6 +1,6 @@ { "name": "@gaia-project/old-ui", - "version": "1.2.13", + "version": "1.2.14", "scripts": { "serve": "vite --port 5193", "build": "vite build", diff --git a/viewer/package.json b/viewer/package.json index b5886ff9..0c3e30ca 100644 --- a/viewer/package.json +++ b/viewer/package.json @@ -1,6 +1,6 @@ { "name": "@gaia-project/viewer", - "version": "5.22.13", + "version": "5.22.14", "description": "Functions to visualize the map and boards for gaia project inside html canvas", "contributors": [ "coyotte508", diff --git a/viewer/src/components/Resource.spec.ts b/viewer/src/components/Resource.spec.ts index 7519b661..7e6f99c2 100644 --- a/viewer/src/components/Resource.spec.ts +++ b/viewer/src/components/Resource.spec.ts @@ -3,11 +3,8 @@ import { expect } from "chai"; import { makeStore } from "../store"; import Resource from "./Resource.vue"; -// Analysis mode (ANALYSIS_MODE_PLAN.md §12) is the only way a resource count goes below zero: the -// sandbox seat keeps its real numbers and may overspend them. Every surface that shows a count goes -// through this component - the player board and the mobile sticky resource bar both - so this one -// class is what makes an unaffordable line obvious from the board itself, which is why the panel no -// longer needs to print the same figures. +// Costs in logs and deficits in simulation use the same signed resource counts as player boards +// and the mobile resource bar. The minus sign must remain visible independently of color. describe("Resource", () => { // Knowledge and QIC read the store for their icon variant, so every case gets one. const count = (kind: string, value: number) => { diff --git a/viewer/src/components/Resource.vue b/viewer/src/components/Resource.vue index e7ddab40..cb862ff4 100644 --- a/viewer/src/components/Resource.vue +++ b/viewer/src/components/Resource.vue @@ -173,6 +173,7 @@ g.resource { - // Analysis mode (ANALYSIS_MODE_PLAN.md §12) is the only way a resource count goes below zero: the - // sandbox seat keeps its real numbers and is allowed to overspend them, and this is the signal that - // it has. One rule covers every surface that renders a count - the player board and the mobile - // sticky resource bar both go through this component. + // Negative amounts include log costs as well as simulation deficits. Keep their normal + // high-contrast ink: the minus sign conveys the loss without relying on red over colored icons. text.overdrawn { - fill: var(--oxide, #d92626); font-weight: bold; } + text.resource-count { + // Paint behind the white glyphs so the outline does not thin their strokes at small sizes. + paint-order: stroke fill; + stroke: #111; + stroke-width: 1px; + stroke-linejoin: round; + } + &.no-tooltip { pointer-events: none; } @@ -325,6 +331,7 @@ g.resource { .building.r { & + text { fill: black; + stroke: none; } }