{"version":3,"file":"tokens.mjs","sources":["../../src/debug/tokens.ts"],"sourcesContent":["/**\n * The overlay's shared visual language.\n *\n * A leaf, like `layout.ts` and `geometry.ts`. These values used to be inline string\n * literals in `panel.ts` and a private copy in `predict.ts` annotated \"match the room\n * debug-panels\" — a comment the compiler could not enforce. Now it can.\n */\n\n/** Muted text: labels, secondary readouts, chevrons. */\nexport const SECONDARY = \"#888\";\n\n/** Hairline rule inside a card or panel (the menu's grooves are deliberately louder). */\nexport const RULE = \"rgba(255, 255, 255, 0.15)\";\n\n/**\n * Segmented buttons: the network presets, the panel-position grid, and the Predict\n * mode pills. All three are \"pick exactly one of N\", so all three look the same.\n */\nexport const SEGMENT = {\n    background: \"rgba(255, 255, 255, 0.05)\",\n    border: \"rgba(255, 255, 255, 0.2)\",\n    hover: \"rgba(255, 255, 255, 0.12)\",\n    foreground: \"#bbb\",\n    activeBackground: \"rgba(255, 255, 255, 0.18)\",\n    activeBorder: \"rgba(255, 255, 255, 0.4)\",\n    activeForeground: \"#fff\",\n};\n\n/**\n * Paint a segmented button for its selected state. Callers must give the element a\n * `border:1px solid` in their own CSS — only the colour is set here, so the border\n * width never flickers between states.\n *\n * `dataset.active` is the single source of truth the hover handler reads.\n */\nexport function applySegmentedState(button: HTMLElement, active: boolean): void {\n    button.dataset.active = active ? \"true\" : \"false\";\n    button.style.background = active ? SEGMENT.activeBackground : SEGMENT.background;\n    button.style.borderColor = active ? SEGMENT.activeBorder : SEGMENT.border;\n    button.style.color = active ? SEGMENT.activeForeground : SEGMENT.foreground;\n}\n\n/** The hover wash every segmented button shares. Extra handlers run after it. */\nexport function bindSegmentedHover(button: HTMLElement, onEnter?: () => void, onLeave?: () => void): void {\n    button.addEventListener(\"mouseenter\", function() {\n        if (button.dataset.active !== \"true\") { button.style.background = SEGMENT.hover; }\n        onEnter?.();\n    });\n    button.addEventListener(\"mouseleave\", function() {\n        if (button.dataset.active !== \"true\") { button.style.background = SEGMENT.background; }\n        onLeave?.();\n    });\n}\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