@titan-design/react-ui 0.13.0 → 0.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -0
- package/dist/bodymap.js +129 -76
- package/dist/bodymap.js.map +1 -1
- package/dist/bodymap.mjs +129 -76
- package/dist/bodymap.mjs.map +1 -1
- package/dist/index.d.mts +117 -26
- package/dist/index.d.ts +117 -26
- package/dist/index.js +677 -450
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +673 -451
- package/dist/index.mjs.map +1 -1
- package/dist/{pages-_3Ajpiqu.d.ts → pages-CsjsUn0G.d.ts} +30 -13
- package/dist/{pages-CpW3OB3g.d.mts → pages-ZbT_pD_U.d.mts} +30 -13
- package/dist/pages.d.mts +1 -1
- package/dist/pages.d.ts +1 -1
- package/dist/pages.js +676 -701
- package/dist/pages.js.map +1 -1
- package/dist/pages.mjs +676 -701
- package/dist/pages.mjs.map +1 -1
- package/dist/theme/index.d.mts +31 -7
- package/dist/theme/index.d.ts +31 -7
- package/dist/theme/index.js +84 -20
- package/dist/theme/index.js.map +1 -1
- package/dist/theme/index.mjs +83 -21
- package/dist/theme/index.mjs.map +1 -1
- package/dist/theme/tokens-css.js +84 -20
- package/dist/theme/tokens-css.js.map +1 -1
- package/dist/theme/tokens-css.mjs +84 -20
- package/dist/theme/tokens-css.mjs.map +1 -1
- package/dist/theme/tokens.d.mts +56 -7
- package/dist/theme/tokens.d.ts +56 -7
- package/dist/theme/tokens.js +72 -20
- package/dist/theme/tokens.js.map +1 -1
- package/dist/theme/tokens.mjs +71 -21
- package/dist/theme/tokens.mjs.map +1 -1
- package/docs/render-testing-pattern.md +130 -0
- package/package.json +1 -1
- package/src/arch/Architecture.stories.tsx +3 -1
- package/src/arch/arch-graph.json +74 -72
- package/src/components/custom/ActiveWork/InitiativeBrief.tsx +2 -1
- package/src/components/custom/CircularTimer/CircularTimer.stories.tsx +8 -3
- package/src/components/custom/EmptyState/EmptyState.stories.tsx +1 -1
- package/src/components/custom/Gauge/Gauge.stories.tsx +4 -1
- package/src/components/custom/Gauge/Gauge.tsx +3 -1
- package/src/components/custom/Scatter/Scatter.stories.tsx +10 -7
- package/src/components/custom/Scatter/Scatter.tsx +6 -4
- package/src/components/custom/Sidebar/Sidebar.stories.tsx +1 -1
- package/src/components/custom/Table/Table.stories.tsx +1 -1
- package/src/components/custom/Table/Table.tsx +2 -2
- package/src/components/custom/Treemap/Treemap.stories.tsx +13 -10
- package/src/components/custom/Treemap/Treemap.tsx +4 -1
- package/src/components/custom/Workout/ActiveWorkoutPage.stories.tsx +2 -1
- package/src/components/custom/Workout/BaseBadge.stories.tsx +11 -7
- package/src/components/custom/Workout/BaseBadge.tsx +3 -2
- package/src/components/custom/Workout/BodyMap.tsx +5 -3
- package/src/components/custom/Workout/BodyMapDetailPanel.stories.tsx +13 -3
- package/src/components/custom/Workout/BodyMapDetailPanel.tsx +5 -3
- package/src/components/custom/Workout/CapacityBandChart.stories.tsx +2 -1
- package/src/components/custom/Workout/CapacityBandChart.tsx +5 -3
- package/src/components/custom/Workout/DeviationBar.test.tsx +5 -2
- package/src/components/custom/Workout/DeviationBar.tsx +5 -2
- package/src/components/custom/Workout/DualVelocityStrip.stories.tsx +7 -6
- package/src/components/custom/Workout/DualVelocityStrip.test.tsx +29 -16
- package/src/components/custom/Workout/ExerciseCard.stories.tsx +8 -8
- package/src/components/custom/Workout/ExerciseCard.test.tsx +39 -19
- package/src/components/custom/Workout/ExerciseCard.tsx +92 -167
- package/src/components/custom/Workout/ExerciseCardHeading.stories.tsx +89 -6
- package/src/components/custom/Workout/ExerciseCardHeading.test.tsx +189 -1
- package/src/components/custom/Workout/ExerciseCardHeading.tsx +167 -18
- package/src/components/custom/Workout/ExerciseDetailPage.tsx +3 -2
- package/src/components/custom/Workout/ExerciseHeading.tsx +192 -47
- package/src/components/custom/Workout/ExerciseIndicator.stories.tsx +6 -5
- package/src/components/custom/Workout/InputBar.tsx +4 -2
- package/src/components/custom/Workout/IntensityBar.tsx +4 -1
- package/src/components/custom/Workout/MesoCard.tsx +2 -1
- package/src/components/custom/Workout/MesoStatusCard.tsx +11 -10
- package/src/components/custom/Workout/PlaceholderStrip.stories.tsx +8 -3
- package/src/components/custom/Workout/PrHistoryModal.stories.tsx +12 -2
- package/src/components/custom/Workout/README.md +58 -12
- package/src/components/custom/Workout/ReadinessCheck.tsx +4 -2
- package/src/components/custom/Workout/RestTimer.stories.tsx +13 -2
- package/src/components/custom/Workout/RestTimer.tsx +4 -2
- package/src/components/custom/Workout/SegmentedBar.stories.tsx +16 -12
- package/src/components/custom/Workout/SegmentedBar.tsx +4 -3
- package/src/components/custom/Workout/SetStrip.stories.tsx +3 -2
- package/src/components/custom/Workout/SetsRepsLoad.tsx +23 -9
- package/src/components/custom/Workout/Sparkline.stories.tsx +13 -10
- package/src/components/custom/Workout/StrengthTrendChart.stories.tsx +2 -1
- package/src/components/custom/Workout/StrengthTrendChart.tsx +8 -6
- package/src/components/custom/Workout/TempoDisplay.stories.tsx +4 -3
- package/src/components/custom/Workout/TempoDisplay.tsx +2 -0
- package/src/components/custom/Workout/VelocityStrip.dual.stories.tsx +3 -2
- package/src/components/custom/Workout/VelocityStrip.expanded.stories.tsx +1 -1
- package/src/components/custom/Workout/VelocityStrip.hero.stories.tsx +40 -0
- package/src/components/custom/Workout/VelocityStrip.test.tsx +48 -6
- package/src/components/custom/Workout/VelocityStrip.tsx +23 -14
- package/src/components/custom/Workout/ZoneTrack.stories.tsx +3 -1
- package/src/components/custom/Workout/exerciseRowState.ts +29 -0
- package/src/components/custom/Workout/index.ts +12 -2
- package/src/components/custom/Workout/metricText.stories.tsx +9 -8
- package/src/components/custom/Workout/metricText.tsx +4 -2
- package/src/components/custom/Workout/setHeadingKit.tsx +12 -10
- package/src/components/custom/Workout/velocity-story-kit.tsx +2 -2
- package/src/components/custom/charts/README.md +5 -0
- package/src/components/custom/charts/SetBarChart.test.tsx +16 -0
- package/src/components/custom/charts/SetBarChart.tsx +14 -5
- package/src/components/custom/charts/flatBarGeometry.test.ts +41 -0
- package/src/components/custom/charts/flatBarGeometry.ts +32 -0
- package/src/components/custom/stepper/Stepper.tsx +8 -6
- package/src/components/ui/alert/Alert.stories.tsx +14 -4
- package/src/components/ui/alert/Alert.tsx +24 -3
- package/src/components/ui/button/Button.tsx +12 -12
- package/src/components/ui/checkbox/Checkbox.tsx +2 -2
- package/src/components/ui/data-row/DataRow.stories.tsx +6 -2
- package/src/components/ui/drawer/Drawer.tsx +4 -1
- package/src/components/ui/icon-box/IconBox.tsx +8 -6
- package/src/components/ui/indicator/Indicator.stories.tsx +4 -3
- package/src/components/ui/list-item/ListItem.stories.tsx +7 -4
- package/src/components/ui/modal/Modal.tsx +2 -0
- package/src/components/ui/pill/Pill.stories.tsx +53 -0
- package/src/components/ui/pill/Pill.tsx +10 -6
- package/src/components/ui/popover/Popover.stories.tsx +1 -1
- package/src/components/ui/progress/Progress.tsx +9 -6
- package/src/components/ui/radio/Radio.tsx +1 -1
- package/src/components/ui/section/Section.stories.tsx +10 -10
- package/src/components/ui/select/Select.tsx +2 -1
- package/src/components/ui/spinner/Spinner.tsx +3 -1
- package/src/components/ui/stack/Stack.stories.tsx +7 -7
- package/src/components/ui/surface/Surface.stories.tsx +75 -28
- package/src/components/ui/switch/Switch.tsx +1 -1
- package/src/components/ui/tabs/Tabs.tsx +4 -2
- package/src/components/ui/toast/Toast.tsx +6 -4
- package/src/components/ui/toolbar-button/ToolbarButton.tsx +13 -6
- package/src/stories/PresetShowcase.stories.tsx +1 -1
- package/src/test/no-raw-color.test.ts +39 -0
- package/src/theme/Alpha.stories.tsx +103 -0
- package/src/theme/ProposedTokensVW82.stories.tsx +414 -0
- package/src/theme/config.ts +12 -0
- package/src/theme/global.css +15 -3
- package/src/theme/subtle-tone-weight.test.ts +163 -0
- package/src/theme/tailwind-var-opacity.test.ts +163 -0
- package/src/theme/tokens/primitives.ts +33 -0
- package/src/theme/tokens/semantic-hex-guard.test.ts +322 -0
- package/src/theme/tokens/semantic.ts +56 -20
- package/src/utils/colors.alpha-adoption.test.ts +408 -0
- package/tailwind.config.js +50 -9
package/dist/theme/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/theme/tokens/primitives.ts","../../src/theme/tokens/semantic.ts","../../src/theme/config.ts","../../src/theme/materials.ts","../../src/theme/color-utils.ts","../../src/theme/lift.ts","../../src/theme/surface-planes.ts","../../src/theme/elevation.ts","../../src/theme/manifest/css-property-manifest.validate.ts","../../src/theme/resolve-color.ts","../../src/theme/gradients.ts","../../src/theme/presets/apply.ts","../../src/theme/presets/default.ts","../../src/theme/presets/audiobook.ts","../../src/components/ui/surface/SurfaceContext.ts","../../src/web-jsx/jsx-runtime.ts","../../src/theme/ThemeProvider.tsx"],"names":["c","Platform","createContext","reactJsx","vars","useColorScheme","View"],"mappings":";;;;;;;;AAeO,IAAM,eAAA,GAAkB;AAAA,EAC7B,KAAA,EAAO,SAAA;AAAA,EACP,KAAA,EAAO,SAAA;AAAA,EACP,WAAA,EAAa;AACf;AAYO,IAAM,aAAA,GAAgB;AAiCtB,IAAM,QAAA,GAAW;AAAA,EACtB,EAAA,EAAI,SAAA;AAAA;AAAA,EACJ,GAAA,EAAK,SAAA;AAAA;AAAA,EACL,GAAA,EAAK,SAAA;AAAA;AAAA,EACL,GAAA,EAAK,SAAA;AAAA;AAAA,EACL,GAAA,EAAK,SAAA;AAAA;AAAA,EACL,GAAA,EAAK,SAAA;AAAA;AAAA,EACL,GAAA,EAAK,SAAA;AAAA;AAAA,EACL,GAAA,EAAK,SAAA;AAAA;AAAA,EACL,GAAA,EAAK,SAAA;AAAA;AAAA,EACL,GAAA,EAAK,SAAA;AAAA;AAAA,EACL,GAAA,EAAK,SAAA;AAAA;AAAA,EACL,GAAA,EAAK,SAAA;AAAA;AAAA,EACL,GAAA,EAAK,SAAA;AAAA;AAAA,EACL,GAAA,EAAK,SAAA;AAAA;AAAA,EACL,GAAA,EA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KAAS,QAAA,GAAY,WAAA,IAAe,MAAA,GAAU,IAAA;AAE/D,EAAA,uBACE,GAAA,CAAC,cAAA,CAAe,QAAA,EAAf,EAAwB,KAAA,EAAO,EAAE,IAAA,EAAM,QAAA,EAAU,KAAA,EAAO,MAAA,EAAO,EAC9D,QAAA,kBAAA,GAAA,CAACC,gBAAA,EAAA,EAAK,KAAA,EAAO,CAAC,SAAA,CAAU,QAAQ,CAAA,EAAG,EAAE,IAAA,EAAM,CAAA,EAAE,EAAG,KAAK,CAAA,EAAI,GAAG,KAAA,EACzD,QAAA,EACH,CAAA,EACF,CAAA;AAEJ","file":"index.js","sourcesContent":["/**\n * Primitive Design Tokens\n *\n * Raw values with no semantic meaning. These are the foundation of the design system\n * and should rarely be used directly in components. Use semantic tokens instead.\n */\n\n/**\n * Absolute colour keywords.\n *\n * This used to hold five scales — `blue`, `red`, `redVivid`, `neutral` and\n * `charcoal`. All five are gone (TD-07.14): the greys folded into `greyRamp`\n * below and the chromatics into the OKLCH `primitiveRamps`. What is left has no\n * scale because these three are not colours you tune, they are keywords.\n */\nexport const primitiveColors = {\n white: '#FFFFFF',\n black: '#000000',\n transparent: 'transparent',\n} as const\n\n/**\n * The vivid alert red: the one chromatic anchor outside the OKLCH ramps.\n *\n * It survived the TD-07.14 fold of the old `redVivid` scale only as the\n * `-rgb`, `-subtle` and glow encodings of `status-error-vivid`, while the token\n * itself was pinned to `red[600]` and collapsed onto `status-error`. Owning it\n * here means the semantic layer references a primitive instead of carrying a\n * literal. The red ramp has no step this saturated, and adding one means\n * regenerating the ramp, so it stays a pin.\n */\nexport const alertRedVivid = '#FF4757' as const\n\n/**\n * Unified warm-neutral grey ramp (TD-07.14)\n *\n * The ONE achromatic scale. Regenerate with `scripts/generate-grey-ramp.mjs` —\n * preserve the generator, not just the hexes.\n *\n * The surface planes ARE steps here rather than a parallel object: `850` is\n * overlay, `975` is the bezel. That is the whole point of the ramp. `grey`,\n * `neutral`, `surfaceRampDark` and `backgroundFrameDark` all resolve into it,\n * which is why every plane step below is byte-identical to the value that\n * shipped in v0.10.0 — the surfaces do not move, only their names.\n *\n * TWO THINGS ABOUT THE NUMBERING, both deliberate and both previously re-derived\n * from scratch more than once because they were never written down:\n *\n * 1. `975` sits BELOW the standard grid. `canonL` — the median L* of the seven\n * chromatic `primitiveRamps` at each step — ends at L*10.3, which is step\n * `950`. The bezel is L*3.8, darker than the grid's last rung, so there is\n * simply no step number left for it and `975` extends past the end.\n * 2. `850`/`875` are quarter-steps because overlay/raised/elevated are only\n * ~2.7 L* apart and all three collide on `900` at normal resolution. `800`\n * is a generated bridge between `700` (L*37.9) and overlay (L*22.7) so the\n * spacing stays even across the join.\n *\n * There is no `inset`. It was retired, not renamed: at ΔE 1.10 from `975` it was\n * an imperceptible duplicate of the frame, which is exactly why `<Surface pressed>`\n * (surface − 1) kept collapsing into it. `975` is the floor.\n *\n * Spec, generator and the rejected v1/v2 cuts:\n * sources/design/foundations/warm-grey-ramp/\n */\nexport const greyRamp = {\n 50: '#F9F6F3', // L*97.0 W6\n 100: '#EDEAE7', // L*92.8 W6\n 200: '#D4D1CE', // L*84.0 W6 — warm silver\n 300: '#BDBAB7', // L*75.7 W6\n 400: '#A29F9D', // L*65.7 W5\n 500: '#888684', // L*56.0 W4\n 600: '#72716F', // L*47.7 W3\n 700: '#5A5958', // L*37.9 W2\n 800: '#424140', // L*27.6 W2 — generated bridge\n 850: '#373635', // L*22.7 W2 — surface overlay\n 875: '#31302F', // L*19.9 W2 — surface raised\n 900: '#2C2A28', // L*17.2 W4 — surface elevated\n 925: '#252321', // L*13.9 W4 — surface base\n 950: '#1C1916', // L*9.0 W6 — background base / shell\n 975: '#100D0A', // L*3.8 W6 — background frame / bezel\n} as const\n\n/**\n * The surface planes, as ramp steps — the mapping `<Surface level>` resolves through.\n *\n * Ordered darkest -> lightest, which is the order `pressedLevel()` walks.\n */\nexport const SURFACE_PLANE_STEPS = {\n frame: 975,\n background: 950,\n base: 925,\n elevated: 900,\n raised: 875,\n overlay: 850,\n} as const\n\n/**\n * Derived tonal ramps (TD-05.09 color foundations)\n *\n * Seven OKLCH-generated hue ramps, 11 perceptual lightness steps each (50 -> 950).\n * Built with hue-torsion + a chroma arc, anchored through existing brand/semantic\n * hexes. `pin` marks the step each ramp flows through its anchor.\n * This is the single source of truth for chromatic hexes — the categorical palette\n * below references these steps rather than duplicating values.\n * See sources/design/foundations.\n */\nexport const primitiveRamps = {\n red: {\n 50: '#FFF4F4',\n 100: '#FFE3E5',\n 200: '#FFC2C5',\n 300: '#FF9A9D',\n 400: '#F77175',\n 500: '#E05254',\n 600: '#D14343', // pin\n 700: '#A4221C',\n 800: '#7E1002',\n 900: '#5A0900',\n 950: '#3D0400',\n },\n orange: {\n 50: '#FFF5ED',\n 100: '#FFE6D4',\n 200: '#FFC7A2',\n 300: '#FFA063',\n 400: '#FF7900', // pin\n 500: '#DA5F00',\n 600: '#B94A00',\n 700: '#983804',\n 800: '#6F290F',\n 900: '#4E1C0C',\n 950: '#331107',\n },\n amber: {\n 50: '#FFF7DD',\n 100: '#FFEAA9',\n 200: '#FFD352',\n 300: '#F9B415', // pin\n 400: '#E08C00',\n 500: '#C27400',\n 600: '#A45E00',\n 700: '#814D14',\n 800: '#5B3A1A',\n 900: '#442503',\n 950: '#301500',\n },\n green: {\n 50: '#E3FFEE',\n 100: '#B5FFD2',\n 200: '#58F69E',\n 300: '#2ED573', // pin\n 400: '#21C05D',\n 500: '#22A444',\n 600: '#298732',\n 700: '#2B6B25',\n 800: '#264D1C',\n 900: '#1B3515',\n 950: '#11220D',\n },\n cyan: {\n 50: '#E6FBFF',\n 100: '#C2F6FF',\n 200: '#62EAFF',\n 300: '#22D3EE', // pin\n 400: '#01B5D1',\n 500: '#2697B7',\n 600: '#307B9B',\n 700: '#2A617F',\n 800: '#22465F',\n 900: '#0B3149',\n 950: '#001F36',\n },\n blue: {\n 50: '#EFF8FF',\n 100: '#D9EFFF',\n 200: '#ACDBFF',\n 300: '#78C2FF',\n 400: '#3CA8FF',\n 500: '#2196F3', // pin\n 600: '#1072CB',\n 700: '#135AA8',\n 800: '#14407E',\n 900: '#112C5A',\n 950: '#091B3C',\n },\n magenta: {\n 50: '#FFF3F9',\n 100: '#FFE2F1',\n 200: '#FFBDE2',\n 300: '#FF8FD5',\n 400: '#ED69C3',\n 500: '#D548AF',\n 600: '#BA2996',\n 700: '#9C0D7A', // pin\n 800: '#77005A',\n 900: '#56003F',\n 950: '#3B0029',\n },\n} as const\n\n/**\n * Categorical (qualitative) palette — an ordered, CVD-safe series expressed as\n * references into {@link primitiveRamps} (one source of truth; the palette moves\n * with the ramps).\n *\n * Design: a single canonical hue order (blue, magenta, red, orange, green, cyan,\n * amber), with steps chosen vivid-midtone-first and fanned lighter/darker as the\n * series grows to preserve separation. The sequence is nested-stable — a chart\n * with N series uses the first N colors, and the series index is stable as N\n * changes. Colorblind-safe worst-case deuteranopia/protanopia floor 8 holds\n * through {@link CATEGORICAL_CVD_SAFE_MAX} colors; the 7th is an extended color\n * that should be paired with a legend or other secondary encoding.\n *\n * Two variants: `default` (vivid, sits on neutral/light surfaces, legible under\n * black text) and `dark` (deeper shades legible under white text on a fill). A\n * separate \"light\" variant was dropped — the vivid `default` picks already clear\n * black-text contrast, so it doubles as the light-context palette.\n */\nexport const categoricalPalette = {\n default: [\n primitiveRamps.blue[500],\n primitiveRamps.magenta[500],\n primitiveRamps.red[500],\n primitiveRamps.orange[400],\n primitiveRamps.green[300],\n primitiveRamps.cyan[300],\n primitiveRamps.amber[600], // extended (7th) — pair with a legend\n ],\n dark: [\n primitiveRamps.blue[600],\n primitiveRamps.magenta[600],\n primitiveRamps.red[500],\n primitiveRamps.orange[600],\n primitiveRamps.green[800],\n primitiveRamps.cyan[800],\n primitiveRamps.amber[500], // extended (7th) — pair with a legend\n ],\n} as const\n\n/** Largest series count that holds the CVD floor without a legend. */\nexport const CATEGORICAL_CVD_SAFE_MAX = 6\n\n/**\n * Categorical palette variant.\n * - `default` : vivid; neutral/light surfaces, legible under black text\n * - `dark` : deeper shades, legible under white text on a filled swatch\n */\nexport type CategoricalVariant = keyof typeof categoricalPalette\n\n/**\n * Get a color from the ordered categorical palette by series index.\n * The palette is nested-stable, so the color for a given index does not change\n * with the total series count; `index` simply wraps past the end.\n *\n * @param index - 0-based series index (wraps past the end)\n * @param variant - `default` (black-text / light surfaces) or `dark` (white text)\n * @returns The hex color string\n */\nexport function getCategoricalColor(\n index: number,\n variant: CategoricalVariant = 'default'\n): string {\n const palette = categoricalPalette[variant]\n index = Math.max(0, Math.floor(index))\n return palette[index % palette.length]\n}\n\n/**\n * Diverging status scale (BodyMap training-status: under → optimal → over) as\n * references into {@link primitiveRamps}. A true diverging shape — `optimal` is\n * the lightest center, the extremes go darker — so the signal reads in lightness\n * (colorblind-robust; worst-case deut/protanopia min ΔE ~10.9) and the direction\n * reads in the blue↔red axis (the CVD-safe hue pair).\n *\n * Tuned so every stop is dark enough for the fill yet light enough that BLACK\n * text clears 4.5:1 on all five — no per-cell white/black flipping. The value\n * valley is symmetric: the two mid-arms (maintenance / approaching) sit at equal\n * lightness (both ~0.53 relative luminance), the ends darker.\n */\nexport const divergingScale = [\n primitiveRamps.blue[500], // under\n primitiveRamps.cyan[300], // maintenance\n primitiveRamps.green[200], // optimal (light center)\n primitiveRamps.amber[300], // approaching\n primitiveRamps.red[600], // over\n] as const\n\n/**\n * Sequential \"effort\" scale (low → high intensity: green → yellow → orange → red)\n * as references into {@link primitiveRamps}. A 6-stop ordinal palette; the\n * velocity/RPE strip sub-samples it. Every adjacent pair clears the CVD floor\n * (min deut/protan ΔE ≥ 4.5), and within that the hue walk is kept smooth —\n * the amber-200 → amber-300 → orange-400 run steps the yellow→orange transition\n * gradually rather than lurching. Order encodes magnitude, so it tolerates the\n * green↔red CVD pair. Stops 0–3 take black text; the dark reds take white.\n */\nexport const sequentialEffort = [\n primitiveRamps.green[300],\n primitiveRamps.amber[200],\n primitiveRamps.amber[300],\n primitiveRamps.orange[400],\n primitiveRamps.red[600],\n primitiveRamps.red[700],\n] as const\n\n/**\n * Best-contrast text color (black or white) for a solid fill — for labels sitting\n * on categorical/diverging/effort swatches. Uses the WCAG relative-luminance ratio.\n */\nexport function bestTextColor(hex: string): '#000000' | '#FFFFFF' {\n const [r, g, b] = [0, 2, 4].map((i) => {\n const c = parseInt(hex.replace('#', '').slice(i, i + 2), 16) / 255\n return c >= 0.04045 ? ((c + 0.055) / 1.055) ** 2.4 : c / 12.92\n })\n const l = 0.2126 * r + 0.7152 * g + 0.0722 * b\n return (l + 0.05) / 0.05 >= 1.05 / (l + 0.05) ? '#000000' : '#FFFFFF'\n}\n\n/**\n * Discrete rainbow palette for data visualization\n * Based on Paul Tol's color schemes: https://personal.sron.nl/~pault/#fig:scheme_rainbow_discrete\n */\nexport const discreteRainbow = [\n '#E8ECFB',\n '#D9CCE3',\n '#D1BBD7',\n '#CAACCB',\n '#BA8DB4',\n '#AE76A3',\n '#AA6F9E',\n '#994F88',\n '#882E72',\n '#1965B0',\n '#437DBF',\n '#5289C7',\n '#6195CF',\n '#7BAFDE',\n '#4EB265',\n '#90C987',\n '#CAE0AB',\n '#F7F056',\n '#F7CB45',\n '#F6C141',\n '#F4A736',\n '#F1932D',\n '#EE8026',\n '#E8601C',\n '#E65518',\n '#DC050C',\n '#A5170E',\n '#72190E',\n '#42150A',\n] as const\n\n/**\n * Palette indices for discrete rainbow colors at different palette sizes.\n * For a given palette size (index + 1), returns the indices of colors to use.\n */\nconst discreteRainbowPalettes: number[][] = [\n [10],\n [10, 26],\n [10, 18, 26],\n [10, 15, 18, 26],\n [10, 14, 15, 18, 26],\n [10, 14, 15, 17, 18, 26],\n [9, 10, 14, 15, 17, 18, 26],\n [9, 10, 14, 15, 17, 18, 23, 26],\n [9, 10, 14, 15, 17, 18, 23, 26, 28],\n [9, 10, 14, 15, 17, 18, 21, 24, 26, 28],\n [9, 10, 12, 14, 15, 17, 18, 21, 24, 26, 28],\n [3, 6, 9, 10, 12, 14, 15, 17, 18, 21, 24, 26],\n [3, 6, 9, 10, 12, 14, 15, 16, 17, 18, 21, 24, 26],\n [3, 6, 9, 10, 12, 14, 15, 16, 17, 18, 20, 22, 24, 26],\n [3, 6, 9, 10, 12, 14, 15, 16, 17, 18, 20, 22, 24, 26, 28],\n [3, 5, 7, 9, 10, 12, 14, 15, 16, 17, 18, 20, 22, 24, 26, 28],\n [3, 5, 7, 8, 9, 10, 12, 14, 15, 16, 17, 18, 20, 22, 24, 26, 28],\n [3, 5, 7, 8, 9, 10, 12, 14, 15, 16, 17, 18, 20, 22, 24, 26, 27, 28],\n [2, 4, 5, 7, 8, 9, 10, 12, 14, 15, 16, 17, 18, 20, 22, 24, 26, 27, 28],\n [2, 4, 5, 7, 8, 9, 10, 11, 13, 14, 15, 16, 17, 18, 20, 22, 24, 26, 27, 28],\n [2, 4, 5, 7, 8, 9, 10, 11, 13, 14, 15, 16, 17, 18, 19, 21, 23, 25, 26, 27, 28],\n [2, 4, 5, 7, 8, 9, 10, 11, 13, 14, 15, 16, 17, 18, 19, 21, 23, 25, 26, 27, 28, 29],\n [1, 2, 4, 5, 7, 8, 9, 10, 11, 13, 14, 15, 16, 17, 18, 19, 21, 23, 25, 26, 27, 28, 29],\n]\n\n/**\n * Get a color from the discrete rainbow palette for a given index and palette size.\n * Colors are optimized for visual distinction at each palette size.\n *\n * @param index - The index of the color in the series (0-based)\n * @param size - The total number of colors needed (1-23)\n * @returns The hex color string\n */\nexport function getDiscreteRainbowColor(index: number, size: number): string {\n index = Math.max(0, index)\n size = Math.min(Math.max(1, size), discreteRainbowPalettes.length)\n\n const palette = discreteRainbowPalettes[size - 1]\n if (index >= palette.length) index = index % palette.length\n\n return discreteRainbow[palette[index] - 1]\n}\n\nexport const primitiveTypography = {\n fontFamilies: {\n sans: [\n 'Inter',\n '-apple-system',\n 'BlinkMacSystemFont',\n 'Segoe UI',\n 'Helvetica',\n 'Arial',\n 'sans-serif',\n ],\n body: ['Nunito Sans', 'sans-serif'],\n heading: ['Space Grotesk', 'sans-serif'],\n mono: [\n 'SF Mono',\n 'Monaco',\n 'Inconsolata',\n 'Fira Mono',\n 'Droid Sans Mono',\n 'Source Code Pro',\n 'monospace',\n ],\n },\n fontSizes: {\n '2xs': '0.625rem', // 10px\n xs: '0.75rem', // 12px\n sm: '0.875rem', // 14px\n base: '1rem', // 16px\n lg: '1.125rem', // 18px\n xl: '1.5rem', // 24px\n '2xl': '2rem', // 32px\n '3xl': '2.25rem', // 36px\n '4xl': '3rem', // 48px\n '5xl': '3.5rem', // 56px\n },\n fontWeights: {\n normal: 400,\n medium: 500,\n semibold: 600,\n bold: 700,\n },\n lineHeights: {\n none: 1,\n tight: 1.375,\n snug: 1.5,\n normal: 1.57,\n relaxed: 1.66,\n loose: 1.75,\n },\n letterSpacing: {\n tighter: '-0.05em',\n tight: '-0.025em',\n normal: '0em',\n wide: '0.025em',\n wider: '0.05em',\n widest: '0.5px',\n },\n} as const\n\nexport const primitiveSpacing = {\n 0: '0',\n px: '1px',\n 0.5: '0.125rem', // 2px\n 1: '0.25rem', // 4px\n 1.5: '0.375rem', // 6px\n 2: '0.5rem', // 8px\n 2.5: '0.625rem', // 10px\n 3: '0.75rem', // 12px\n 3.5: '0.875rem', // 14px\n 4: '1rem', // 16px\n 5: '1.25rem', // 20px\n 6: '1.5rem', // 24px\n 7: '1.75rem', // 28px\n 8: '2rem', // 32px\n 9: '2.25rem', // 36px\n 10: '2.5rem', // 40px\n 11: '2.75rem', // 44px\n 12: '3rem', // 48px\n 14: '3.5rem', // 56px\n 16: '4rem', // 64px\n 20: '5rem', // 80px\n 24: '6rem', // 96px\n 28: '7rem', // 112px\n 32: '8rem', // 128px\n} as const\n\nexport const primitiveBorderRadius = {\n none: '0',\n sm: '4px',\n DEFAULT: '8px',\n md: '8px',\n lg: '12px',\n xl: '16px',\n '2xl': '24px',\n full: '9999px',\n} as const\n\nexport const primitiveBreakpoints = {\n xs: 0,\n sm: 600,\n md: 1000,\n lg: 1200,\n xl: 1920,\n} as const\n\nexport const primitiveZIndex = {\n hide: -1,\n auto: 'auto',\n base: 0,\n docked: 10,\n dropdown: 1000,\n sticky: 1100,\n drawer: 1100,\n banner: 1200,\n appBar: 1200,\n overlay: 1300,\n modal: 1400,\n popover: 1500,\n skipLink: 1600,\n toast: 1700,\n tooltip: 1800,\n} as const\n","/**\n * Semantic Design Tokens\n *\n * Meaningful tokens following DTCG (Design Tokens Community Group) naming conventions.\n * Pattern: {category}-{intent}-{variant?}-{state?}\n *\n * Categories:\n * - brand-* : Brand colors (primary, secondary, accent)\n * - status-* : Feedback colors (success, error, warning, info)\n * - result-* : Outcome indicators (improve, degrade, inconclusive, neutral)\n * - data-* : Data visualization colors (chart series)\n * - on-* : Text on colored backgrounds\n * - surface-* : Elevated containers (NOT \"paper\")\n * - background-* : Page backgrounds\n * - text-* : Text colors\n * - border-* : Border colors\n * - interactive-* : Hover/focus/active/disabled states\n */\n\nimport {\n primitiveColors as p,\n primitiveRamps as ramp,\n greyRamp,\n discreteRainbow,\n alertRedVivid,\n} from './primitives'\n\n/**\n * GREY MAPPING (TD-07.14) — how the old cool scales resolved onto `greyRamp`.\n *\n * Every grey below came off `grey` (pure R=G=B) or `neutral` (cool, R−B\n * down to −26). They were snapped by NEAREST L*, not by matching step numbers,\n * because the two old scales were numbered incompatibly: `grey` ran\n * INVERTED and compressed (0 = #6E6E6E lightest, 900 = #101010 darkest), so\n * `grey[400]` and `greyRamp[400]` have nothing to do with each other.\n *\n * grey 200→800 300→900 400→925 500→950\n * neutral 50→50 100→100 300→200 400→400 500→600 600→700 900→950\n *\n * Surfaces move ΔE 1.9–4.8 — at or near imperceptible. The TEXT roles move\n * further (8.6–12.8), and that is the intended part of the change: they are\n * picking up the warmth the surfaces already had.\n *\n * Light gets its own column because strict L*-nearest collapsed `neutral[50]`\n * and `[100]` onto one step, flattening surface-elevated into surface-raised.\n * Light is still deferred as a design question — there is no `surfaceRampLight`.\n *\n * `border-default`, `-subtle` and `-strong` are GONE, replaced by `hairline-*`.\n * Once the planes became ramp steps, every value dark enough to read as a\n * border was also a plane's fill. Alpha composites instead of colliding.\n *\n * `text-tertiary` on dark is the one role that ignores L*-nearest; see it.\n */\n\n// Light mode semantic colors (default)\nexport const semanticColorsLight = {\n // Brand colors (brand-*)\n 'brand-primary': ramp.orange[400],\n 'brand-primary-light': ramp.orange[300],\n 'brand-primary-dark': ramp.orange[500],\n 'brand-primary-subtle': 'rgba(255, 121, 0, 0.08)',\n 'brand-primary-muted': 'rgba(255, 121, 0, 0.30)',\n 'brand-primary-strong': 'rgba(255, 121, 0, 0.50)',\n 'brand-primary-hover': ramp.orange[500],\n 'brand-primary-active': ramp.orange[600],\n\n 'brand-secondary': ramp.cyan[600],\n 'brand-secondary-light': ramp.cyan[500],\n 'brand-secondary-dark': ramp.cyan[700],\n 'brand-secondary-subtle': 'rgba(48, 123, 155, 0.08)',\n 'brand-secondary-muted': 'rgba(48, 123, 155, 0.30)',\n 'brand-secondary-strong': 'rgba(48, 123, 155, 0.50)',\n 'brand-secondary-hover': ramp.cyan[700],\n 'brand-secondary-active': ramp.cyan[800],\n\n // Text on brand backgrounds (on-*)\n 'on-brand-primary': p.white,\n 'on-brand-secondary': p.white,\n\n // Status colors (status-*)\n 'status-success': ramp.green[300],\n 'status-success-light': ramp.green[200],\n 'status-success-dark': ramp.green[600],\n 'status-success-subtle': ramp.green[50],\n 'status-success-muted': 'rgba(46, 213, 115, 0.30)',\n 'status-success-strong': 'rgba(46, 213, 115, 0.50)',\n\n // Live-session accent — its OWN role, decoupled from success so the two can diverge\n 'status-live': ramp.green[300],\n 'status-live-muted': ramp.green[500],\n\n 'status-error': ramp.red[600],\n 'status-error-light': ramp.red[500],\n 'status-error-dark': ramp.red[700],\n 'status-error-subtle': ramp.red[50],\n 'status-error-muted': 'rgba(209, 67, 67, 0.30)',\n 'status-error-strong': 'rgba(209, 67, 67, 0.50)',\n\n 'status-error-vivid': alertRedVivid, // NOT red[600], that is status-error\n 'status-error-vivid-light': ramp.red[500],\n 'status-error-vivid-dark': ramp.red[700],\n 'status-error-vivid-subtle': 'rgba(255, 71, 87, 0.12)',\n 'status-error-vivid-muted': 'rgba(255, 71, 87, 0.30)',\n 'status-error-vivid-strong': 'rgba(255, 71, 87, 0.50)',\n\n 'status-warning': ramp.amber[300],\n 'status-warning-light': ramp.amber[200],\n 'status-warning-dark': ramp.amber[500],\n 'status-warning-subtle': ramp.amber[50],\n 'status-warning-muted': 'rgba(249, 180, 21, 0.30)',\n 'status-warning-strong': 'rgba(249, 180, 21, 0.50)',\n\n 'status-info': ramp.blue[500],\n 'status-info-light': ramp.blue[300],\n 'status-info-dark': ramp.blue[600],\n 'status-info-subtle': ramp.blue[50],\n 'status-info-muted': 'rgba(33, 150, 243, 0.30)',\n 'status-info-strong': 'rgba(33, 150, 243, 0.50)',\n\n // Text on status backgrounds (on-status-*)\n 'on-status-success': p.white,\n 'on-status-error': p.white,\n 'on-status-warning': p.white,\n 'on-status-info': p.white,\n\n // Result/outcome indicators (result-*)\n 'result-improve': '#4caf50', // Green - positive outcome\n 'result-improve-light': 'rgba(76, 175, 80, 0.12)',\n 'result-improve-dark': '#248a24',\n 'result-degrade': '#ef5350', // Red - negative outcome\n 'result-degrade-light': 'rgba(239, 83, 80, 0.12)',\n 'result-degrade-dark': '#b30000',\n 'result-inconclusive': '#9E9A97', // Gray - no clear result\n 'result-inconclusive-light': 'rgba(158, 154, 151, 0.12)',\n 'result-neutral': greyRamp[600], // Neutral baseline\n\n // Text on result backgrounds (on-result-*)\n 'on-result-improve': p.white,\n 'on-result-degrade': p.white,\n 'on-result-inconclusive': p.white,\n\n // Data visualization colors (data-*)\n // First 10 colors from discrete rainbow optimized for charts\n 'data-1': discreteRainbow[9], // Blue\n 'data-2': discreteRainbow[14], // Green\n 'data-3': discreteRainbow[17], // Yellow\n 'data-4': discreteRainbow[25], // Red\n 'data-5': discreteRainbow[8], // Purple\n 'data-6': discreteRainbow[20], // Orange\n 'data-7': discreteRainbow[13], // Light Blue\n 'data-8': discreteRainbow[15], // Light Green\n 'data-9': discreteRainbow[3], // Lavender\n 'data-10': discreteRainbow[22], // Dark Orange\n\n // Text colors (text-*)\n 'text-primary': '#121828',\n 'text-secondary': '#65748B',\n 'text-tertiary': greyRamp[400],\n 'text-disabled': 'rgba(55, 65, 81, 0.48)',\n 'text-inverse': p.white,\n 'text-link': ramp.blue[600],\n 'text-link-hover': ramp.blue[700],\n\n // Surface colors (surface-*) - for elevated containers\n 'surface-base': p.white,\n 'surface-elevated': greyRamp[50], // slightly off-white for elevated cards\n 'surface-raised': greyRamp[100], // light gray for raised cards\n 'surface-overlay': p.white,\n 'surface-input': greyRamp[50], // Input field background (filled variant)\n\n // Background colors (background-*)\n 'background-base': '#EBEBEB',\n 'background-default': p.white,\n 'background-subtle': greyRamp[50],\n // Frame/bezel chrome — top bar + side nav shell, one step below\n // `background-base`. Placeholder pairing for light mode, which is deferred.\n 'background-frame': greyRamp[400],\n\n // Border colors (border-*)\n 'border-prominent': greyRamp[400], // high-visibility divider\n 'border-focus': ramp.blue[600],\n 'border-input': greyRamp[200], // Input field border\n 'border-input-hover': greyRamp[400], // Input field border on hover\n 'border-input-focus': ramp.blue[600], // Input field border on focus\n 'border-input-error': ramp.red[600], // Input field border on error\n\n // Alpha hairline separators (surface-independent — composite toward black on\n // light surfaces, mirroring the dark-mode white-alpha family). See §4/S-2.\n 'hairline-subtle': 'rgba(0, 0, 0, 0.06)',\n 'hairline-default': 'rgba(0, 0, 0, 0.09)',\n 'hairline-strong': 'rgba(0, 0, 0, 0.14)',\n\n // Interactive states (interactive-*)\n 'interactive-hover': 'rgba(55, 65, 81, 0.04)',\n 'interactive-focus': 'rgba(55, 65, 81, 0.12)',\n 'interactive-active': 'rgba(55, 65, 81, 0.16)',\n 'interactive-selected': 'rgba(55, 65, 81, 0.08)',\n 'interactive-disabled': 'rgba(55, 65, 81, 0.12)',\n 'interactive-disabled-text': 'rgba(55, 65, 81, 0.26)',\n\n // Divider\n divider: '#E8E9EB',\n\n // Avatar default\n 'avatar-background': greyRamp[600],\n 'avatar-text': p.white,\n} as const\n\n// Dark mode semantic colors\nexport const semanticColorsDark = {\n // Brand colors stay the same in dark mode\n 'brand-primary': ramp.orange[400],\n 'brand-primary-light': ramp.orange[300],\n 'brand-primary-dark': ramp.orange[500],\n 'brand-primary-subtle': 'rgba(255, 121, 0, 0.12)',\n 'brand-primary-muted': 'rgba(255, 121, 0, 0.30)',\n 'brand-primary-strong': 'rgba(255, 121, 0, 0.50)',\n 'brand-primary-hover': ramp.orange[300],\n 'brand-primary-active': ramp.orange[200],\n\n 'brand-secondary': ramp.cyan[600],\n 'brand-secondary-light': ramp.cyan[500],\n 'brand-secondary-dark': ramp.cyan[700],\n 'brand-secondary-subtle': 'rgba(48, 123, 155, 0.12)',\n 'brand-secondary-muted': 'rgba(48, 123, 155, 0.30)',\n 'brand-secondary-strong': 'rgba(48, 123, 155, 0.50)',\n 'brand-secondary-hover': ramp.cyan[500],\n 'brand-secondary-active': ramp.cyan[400],\n\n // Text on brand backgrounds\n 'on-brand-primary': p.white,\n 'on-brand-secondary': p.white,\n\n // Status colors\n 'status-success': ramp.green[300],\n 'status-success-light': ramp.green[200],\n 'status-success-dark': ramp.green[600],\n 'status-success-subtle': 'rgba(46, 213, 115, 0.12)',\n 'status-success-muted': 'rgba(46, 213, 115, 0.30)',\n 'status-success-strong': 'rgba(46, 213, 115, 0.50)',\n\n // Live-session accent — its OWN role, decoupled from success so the two can diverge\n 'status-live': ramp.green[300],\n 'status-live-muted': ramp.green[500],\n\n 'status-error': ramp.red[600],\n 'status-error-light': ramp.red[500],\n 'status-error-dark': ramp.red[700],\n 'status-error-subtle': 'rgba(209, 67, 67, 0.12)',\n 'status-error-muted': 'rgba(209, 67, 67, 0.30)',\n 'status-error-strong': 'rgba(209, 67, 67, 0.50)',\n\n 'status-error-vivid': alertRedVivid,\n 'status-error-vivid-light': ramp.red[500],\n 'status-error-vivid-dark': ramp.red[700],\n 'status-error-vivid-subtle': 'rgba(255, 71, 87, 0.12)',\n 'status-error-vivid-muted': 'rgba(255, 71, 87, 0.30)',\n 'status-error-vivid-strong': 'rgba(255, 71, 87, 0.50)',\n\n 'status-warning': ramp.amber[300],\n 'status-warning-light': ramp.amber[200],\n 'status-warning-dark': ramp.amber[500],\n 'status-warning-subtle': 'rgba(249, 180, 21, 0.12)',\n 'status-warning-muted': 'rgba(249, 180, 21, 0.30)',\n 'status-warning-strong': 'rgba(249, 180, 21, 0.50)',\n\n 'status-info': ramp.blue[500],\n 'status-info-light': ramp.blue[300],\n 'status-info-dark': ramp.blue[600],\n 'status-info-subtle': 'rgba(33, 150, 243, 0.12)',\n 'status-info-muted': 'rgba(33, 150, 243, 0.30)',\n 'status-info-strong': 'rgba(33, 150, 243, 0.50)',\n\n // Text on status backgrounds\n 'on-status-success': p.white,\n 'on-status-error': p.white,\n 'on-status-warning': p.white,\n 'on-status-info': p.white,\n\n // Result/outcome indicators (result-*)\n 'result-improve': '#4caf50',\n 'result-improve-light': 'rgba(76, 175, 80, 0.16)',\n 'result-improve-dark': '#248a24',\n 'result-degrade': '#ef5350',\n 'result-degrade-light': 'rgba(239, 83, 80, 0.16)',\n 'result-degrade-dark': '#b30000',\n 'result-inconclusive': '#9E9A97',\n 'result-inconclusive-light': 'rgba(158, 154, 151, 0.16)',\n 'result-neutral': greyRamp[400],\n\n // Text on result backgrounds\n 'on-result-improve': p.white,\n 'on-result-degrade': p.white,\n 'on-result-inconclusive': p.white,\n\n // Data visualization colors (same in dark mode for consistency)\n 'data-1': discreteRainbow[9],\n 'data-2': discreteRainbow[14],\n 'data-3': discreteRainbow[17],\n 'data-4': discreteRainbow[25],\n 'data-5': discreteRainbow[8],\n 'data-6': discreteRainbow[20],\n 'data-7': discreteRainbow[13],\n 'data-8': discreteRainbow[15],\n 'data-9': discreteRainbow[3],\n 'data-10': discreteRainbow[22],\n\n // Text colors - inverted for dark mode\n 'text-primary': greyRamp[50],\n 'text-secondary': greyRamp[400],\n // Deliberately ONE step lighter than the L*-nearest match (`greyRamp[600]`).\n // The colour this replaced failed WCAG large-text outright on the three\n // lightest planes — 2.96 / 2.72 / 2.49 against elevated / raised / overlay —\n // and `600` carried that failure forward almost exactly (2.93 / 2.70 / 2.47).\n // `500` clears 3:1 everywhere (3.32–5.34). Contrast beats colour fidelity for\n // text roles; borders and surfaces still use strict L*-nearest. See\n // semantic-contrast.test.ts, which fails if this is moved back down.\n 'text-tertiary': greyRamp[500],\n 'text-disabled': 'rgba(255, 255, 255, 0.38)',\n 'text-inverse': greyRamp[950],\n 'text-link': '#828DF8',\n 'text-link-hover': ramp.blue[400],\n\n // Surface colors - dark backgrounds — warm-tapered DERIVED ramp (TD-surface-tokens,\n // S-1, re-spaced S-3). Shipped verbatim from `deriveSurfaceRamp()` — see\n // `surfaceRampDark` in primitives.ts for the full derivation note. `surface-overlay`\n // and `surface-elevated` are distinct (were both #191919 pre-S-1); `surface-input`\n // tracks one plane above `surface-base`, same relative position as before the remap.\n // `background-base` backs `Surface level=\"background\"` (SurfaceContext.SURFACE_LEVEL_TOKEN),\n // so it takes the ramp's shell role. The deepest plane is `background-frame`,\n // which is also the `SurfaceLevel` floor a pressed surface clamps at.\n 'surface-base': greyRamp[925], // main surface (#252321, L*13.9)\n 'surface-elevated': greyRamp[900], // elevated surface (#2C2A28, L*17.2 — nav/rail)\n 'surface-raised': greyRamp[875], // raised surface (#31302F, L*19.9 — cards)\n 'surface-overlay': greyRamp[850], // overlay surface (#373635, L*22.7 — hero/popover)\n 'surface-input': greyRamp[900], // input surface (#2C2A28 — one plane above base)\n\n // Background colors — same ramp, the frame/shell end of it.\n 'background-base': greyRamp[950], // shell (#1C1916, L*9 — Surface level=\"background\")\n 'background-default': greyRamp[925], // main background (#252321, L*13.9 — matches surface-base)\n 'background-subtle': greyRamp[900], // subtle background (#2C2A28, L*17.2 — matches surface-elevated)\n // Frame/bezel chrome — the top bar + side nav shell, one step BELOW\n // `background-base`. It used to be described as sitting OUTSIDE the ramp; it\n // is simply the ramp's last step now, and the floor `<Surface pressed>` clamps at.\n 'background-frame': greyRamp[975], // frame / bezel (#100D0A, L*3.8)\n\n // Border colors — solid dark borders are RETIRED (TD-07.14). Not a preference — a structural\n // consequence of one ramp. Every step from 850 to 975 is now a surface plane,\n // so a solid border dark enough to read as a border necessarily equals some\n // plane's fill, which is exactly the collision `surface.contract.test.ts` R2\n // forbids. The only non-plane steps left in that band are 800 and 700, and\n // borders there jump from L*~10-25 to L*~28-38 — a restyle, not a migration.\n //\n // So separation moves to the alpha hairlines, which dark mode already called\n // \"the primary separation cue\". Being alpha, they composite against whatever\n // plane they land on and cannot collide with any of them — the problem stops\n // existing rather than being re-solved per plane. The three solid tokens were\n // deleted outright; consumers point at the `hairline-*` family below.\n //\n // `border-prominent` stays SOLID: it is the one border meant to be seen\n // outright (4 call sites, high-visibility dividers), and grey-800 is not a\n // plane, so it keeps its job without collision.\n 'border-prominent': greyRamp[800], // high-visibility divider\n 'border-focus': '#828DF8',\n 'border-input': greyRamp[700],\n 'border-input-hover': greyRamp[600],\n 'border-input-focus': '#828DF8',\n 'border-input-error': ramp.red[500],\n\n // Alpha hairline separators — the primary separation cue (§4/S-2). Self-\n // normalizing: composites toward white by ~the same amount on ANY plane, so\n // one family works at every elevation instead of per-surface border tokens.\n // Shadows are demoted to floating-overlay use only (not shipped as a fill\n // separator here — see elevation.ts, follow-up S-4).\n //\n // RETUNED on the wall (VW-99, S-6). The original .06/.09/.14 were set at a\n // desk. On the panel at ~3 m `subtle` rendered but was indiscernible, and\n // `default` — the load-bearing one, with no solid-border fallback since\n // TD-07.14 — went weak on the lightest plane. `strong` read cleanly with room\n // to spare, which is what made raising the whole family viable.\n //\n // Each tier steps up onto the next MEASURED-GOOD rung rather than an\n // interpolated one: the new `subtle` is the old `default`, and the new\n // `default` is the old `strong` — a value just confirmed legible on all four\n // planes. Spacing goes 1 : 1.56 : 2.33, against the original 1 : 1.5 : 2.33.\n //\n // RUN 2 (VW-99): all three tiers were seen on all four planes — the retune\n // worked — but `subtle` was still \"a bit hard to read\", so the whole family\n // took a further +.01. That is a comfort margin on a passing row, not a fix\n // for a failing one, which is why it is a flat offset: the 1 : 1.56 : 2.33\n // spacing that the run validated is preserved rather than re-derived.\n //\n // Keep these to TWO decimals. react-native-web quantises alpha to 8 bits, so\n // a 3-decimal value silently rounds on the way to the DOM (.135 renders as\n // .13) — the token would say one thing and paint another.\n //\n // DARK ONLY. The light family above composites toward BLACK on light planes,\n // which this run says nothing about — do not mirror these numbers into it\n // without its own verification.\n 'hairline-subtle': 'rgba(255, 255, 255, 0.10)',\n 'hairline-default': 'rgba(255, 255, 255, 0.15)',\n 'hairline-strong': 'rgba(255, 255, 255, 0.22)',\n\n // Interactive states\n 'interactive-hover': 'rgba(255, 255, 255, 0.04)',\n 'interactive-focus': 'rgba(255, 255, 255, 0.12)',\n 'interactive-active': 'rgba(255, 255, 255, 0.16)',\n 'interactive-selected': 'rgba(255, 255, 255, 0.08)',\n 'interactive-disabled': 'rgba(255, 255, 255, 0.12)',\n 'interactive-disabled-text': 'rgba(255, 255, 255, 0.26)',\n\n // Divider\n divider: 'rgba(255, 255, 255, 0.09)',\n\n // Avatar default\n 'avatar-background': greyRamp[700],\n 'avatar-text': p.white,\n} as const\n\n// Typography tokens matching existing app\nexport const semanticTypography = {\n // Headings (Space Grotesk)\n h1: {\n fontFamily: 'heading',\n fontSize: '3.5rem',\n fontWeight: 700,\n lineHeight: 1.375,\n },\n h2: {\n fontFamily: 'heading',\n fontSize: '3rem',\n fontWeight: 700,\n lineHeight: 1.375,\n },\n h3: {\n fontFamily: 'heading',\n fontSize: '2.25rem',\n fontWeight: 700,\n lineHeight: 1.375,\n },\n h4: {\n fontFamily: 'heading',\n fontSize: '2rem',\n fontWeight: 700,\n lineHeight: 1.375,\n },\n h5: {\n fontFamily: 'heading',\n fontSize: '1.5rem',\n fontWeight: 600,\n lineHeight: 1.375,\n },\n h6: {\n fontFamily: 'heading',\n fontSize: '1.125rem',\n fontWeight: 600,\n lineHeight: 1.375,\n },\n\n // Body text (Nunito Sans)\n body1: {\n fontFamily: 'body',\n fontSize: '1rem',\n fontWeight: 400,\n lineHeight: 1.5,\n },\n body2: {\n fontFamily: 'body',\n fontSize: '0.875rem',\n fontWeight: 400,\n lineHeight: 1.57,\n },\n subtitle1: {\n fontFamily: 'body',\n fontSize: '1rem',\n fontWeight: 500,\n lineHeight: 1.75,\n },\n subtitle2: {\n fontFamily: 'body',\n fontSize: '0.875rem',\n fontWeight: 500,\n lineHeight: 1.57,\n },\n caption: {\n fontFamily: 'body',\n fontSize: '0.75rem',\n fontWeight: 400,\n lineHeight: 1.66,\n },\n overline: {\n fontFamily: 'body',\n fontSize: '0.75rem',\n fontWeight: 600,\n lineHeight: 2.5,\n letterSpacing: '0.5px',\n textTransform: 'uppercase' as const,\n },\n button: {\n fontFamily: 'sans',\n fontSize: '0.875rem',\n fontWeight: 600,\n lineHeight: 1.75,\n },\n} as const\n\n// Button size tokens\nexport const buttonSizes = {\n sm: {\n paddingX: '16px',\n paddingY: '6px',\n fontSize: '0.875rem',\n },\n md: {\n paddingX: '20px',\n paddingY: '8px',\n fontSize: '0.875rem',\n },\n lg: {\n paddingX: '24px',\n paddingY: '11px',\n fontSize: '1rem',\n },\n} as const\n\n// Export type for theme mode\nexport type ThemeMode = 'light' | 'dark'\n\n// Helper to get semantic colors based on mode\nexport function getSemanticColors(mode: ThemeMode) {\n return mode === 'dark' ? semanticColorsDark : semanticColorsLight\n}\n","/**\n * Theme Configuration\n *\n * Maps semantic tokens to CSS custom properties for runtime theming.\n * Dark mode is the default theme.\n */\n\nimport { semanticColorsLight, semanticColorsDark, type ThemeMode } from './tokens/semantic'\n\n// Theme-independent custom properties: identical in light and dark in\n// global.css (RGB glow decompositions, font families, animation tokens). Kept\n// as literals since they are not part of the semantic COLOR maps, and spread\n// into both theme maps so codegen mirrors global.css exactly.\nconst themeIndependentCSSVars = {\n // RGB decomposed values for glow shadows\n '--color-brand-primary-rgb': '255, 121, 0',\n '--color-brand-secondary-rgb': '48, 123, 155',\n '--color-status-success-rgb': '46, 213, 115',\n '--color-status-error-rgb': '209, 67, 67',\n '--color-status-error-vivid-rgb': '255, 71, 87',\n '--color-status-warning-rgb': '249, 180, 21',\n '--color-status-info-rgb': '33, 150, 243',\n '--color-background-base-rgb': '16, 16, 16',\n\n // Font families\n '--font-family-sans': \"'Inter'\",\n '--font-family-body': \"'Nunito Sans'\",\n '--font-family-heading': \"'Space Grotesk'\",\n '--font-family-mono': \"'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace\",\n\n // Animation tokens\n '--ease-out': 'cubic-bezier(0.22, 1, 0.36, 1)',\n '--ease-in-out': 'cubic-bezier(0.65, 0, 0.35, 1)',\n '--ease-spring': 'cubic-bezier(0.34, 1.56, 0.64, 1)',\n '--duration-fast': '150ms',\n '--duration-normal': '250ms',\n '--duration-slow': '400ms',\n} as const\n\n// CSS custom properties for light mode\nexport const lightThemeCSSVars = {\n '--color-brand-primary': semanticColorsLight['brand-primary'],\n '--color-brand-primary-light': semanticColorsLight['brand-primary-light'],\n '--color-brand-primary-dark': semanticColorsLight['brand-primary-dark'],\n '--color-brand-primary-subtle': semanticColorsLight['brand-primary-subtle'],\n '--color-brand-primary-muted': semanticColorsLight['brand-primary-muted'],\n '--color-brand-primary-strong': semanticColorsLight['brand-primary-strong'],\n '--color-brand-secondary': semanticColorsLight['brand-secondary'],\n '--color-brand-secondary-light': semanticColorsLight['brand-secondary-light'],\n '--color-brand-secondary-dark': semanticColorsLight['brand-secondary-dark'],\n '--color-brand-secondary-subtle': semanticColorsLight['brand-secondary-subtle'],\n '--color-brand-secondary-muted': semanticColorsLight['brand-secondary-muted'],\n '--color-brand-secondary-strong': semanticColorsLight['brand-secondary-strong'],\n\n '--color-on-brand-primary': semanticColorsLight['on-brand-primary'],\n '--color-on-brand-secondary': semanticColorsLight['on-brand-secondary'],\n\n '--color-status-success': semanticColorsLight['status-success'],\n '--color-status-success-subtle': semanticColorsLight['status-success-subtle'],\n '--color-status-success-muted': semanticColorsLight['status-success-muted'],\n '--color-status-success-strong': semanticColorsLight['status-success-strong'],\n '--color-status-live': semanticColorsLight['status-live'],\n '--color-status-live-muted': semanticColorsLight['status-live-muted'],\n '--color-status-error': semanticColorsLight['status-error'],\n '--color-status-error-subtle': semanticColorsLight['status-error-subtle'],\n '--color-status-error-muted': semanticColorsLight['status-error-muted'],\n '--color-status-error-strong': semanticColorsLight['status-error-strong'],\n '--color-status-warning': semanticColorsLight['status-warning'],\n '--color-status-warning-subtle': semanticColorsLight['status-warning-subtle'],\n '--color-status-warning-muted': semanticColorsLight['status-warning-muted'],\n '--color-status-warning-strong': semanticColorsLight['status-warning-strong'],\n '--color-status-info': semanticColorsLight['status-info'],\n '--color-status-info-subtle': semanticColorsLight['status-info-subtle'],\n '--color-status-info-muted': semanticColorsLight['status-info-muted'],\n '--color-status-info-strong': semanticColorsLight['status-info-strong'],\n\n '--color-status-error-vivid': semanticColorsLight['status-error-vivid'],\n '--color-status-error-vivid-light': semanticColorsLight['status-error-vivid-light'],\n '--color-status-error-vivid-dark': semanticColorsLight['status-error-vivid-dark'],\n '--color-status-error-vivid-subtle': semanticColorsLight['status-error-vivid-subtle'],\n '--color-status-error-vivid-muted': semanticColorsLight['status-error-vivid-muted'],\n '--color-status-error-vivid-strong': semanticColorsLight['status-error-vivid-strong'],\n\n '--color-text-primary': semanticColorsLight['text-primary'],\n '--color-text-secondary': semanticColorsLight['text-secondary'],\n '--color-text-tertiary': semanticColorsLight['text-tertiary'],\n '--color-text-disabled': semanticColorsLight['text-disabled'],\n '--color-text-inverse': semanticColorsLight['text-inverse'],\n '--color-text-link': semanticColorsLight['text-link'],\n\n '--color-surface-base': semanticColorsLight['surface-base'],\n '--color-surface-elevated': semanticColorsLight['surface-elevated'],\n '--color-surface-raised': semanticColorsLight['surface-raised'],\n\n '--color-background-base': semanticColorsLight['background-base'],\n '--color-background-default': semanticColorsLight['background-default'],\n '--color-background-subtle': semanticColorsLight['background-subtle'],\n '--color-background-frame': semanticColorsLight['background-frame'],\n\n '--color-border-prominent': semanticColorsLight['border-prominent'],\n '--color-border-focus': semanticColorsLight['border-focus'],\n\n '--color-interactive-hover': semanticColorsLight['interactive-hover'],\n '--color-interactive-focus': semanticColorsLight['interactive-focus'],\n '--color-interactive-active': semanticColorsLight['interactive-active'],\n '--color-interactive-selected': semanticColorsLight['interactive-selected'],\n '--color-interactive-disabled': semanticColorsLight['interactive-disabled'],\n\n '--color-divider': semanticColorsLight['divider'],\n\n '--color-brand-primary-hover': semanticColorsLight['brand-primary-hover'],\n '--color-brand-primary-active': semanticColorsLight['brand-primary-active'],\n '--color-brand-secondary-hover': semanticColorsLight['brand-secondary-hover'],\n '--color-brand-secondary-active': semanticColorsLight['brand-secondary-active'],\n\n '--color-status-success-light': semanticColorsLight['status-success-light'],\n '--color-status-success-dark': semanticColorsLight['status-success-dark'],\n '--color-status-error-light': semanticColorsLight['status-error-light'],\n '--color-status-error-dark': semanticColorsLight['status-error-dark'],\n '--color-status-warning-light': semanticColorsLight['status-warning-light'],\n '--color-status-warning-dark': semanticColorsLight['status-warning-dark'],\n '--color-status-info-light': semanticColorsLight['status-info-light'],\n '--color-status-info-dark': semanticColorsLight['status-info-dark'],\n\n '--color-on-status-success': semanticColorsLight['on-status-success'],\n '--color-on-status-error': semanticColorsLight['on-status-error'],\n '--color-on-status-warning': semanticColorsLight['on-status-warning'],\n '--color-on-status-info': semanticColorsLight['on-status-info'],\n\n '--color-result-improve': semanticColorsLight['result-improve'],\n '--color-result-improve-light': semanticColorsLight['result-improve-light'],\n '--color-result-improve-dark': semanticColorsLight['result-improve-dark'],\n '--color-result-degrade': semanticColorsLight['result-degrade'],\n '--color-result-degrade-light': semanticColorsLight['result-degrade-light'],\n '--color-result-degrade-dark': semanticColorsLight['result-degrade-dark'],\n '--color-result-inconclusive': semanticColorsLight['result-inconclusive'],\n '--color-result-inconclusive-light': semanticColorsLight['result-inconclusive-light'],\n '--color-result-neutral': semanticColorsLight['result-neutral'],\n\n '--color-on-result-improve': semanticColorsLight['on-result-improve'],\n '--color-on-result-degrade': semanticColorsLight['on-result-degrade'],\n '--color-on-result-inconclusive': semanticColorsLight['on-result-inconclusive'],\n\n '--color-data-1': semanticColorsLight['data-1'],\n '--color-data-2': semanticColorsLight['data-2'],\n '--color-data-3': semanticColorsLight['data-3'],\n '--color-data-4': semanticColorsLight['data-4'],\n '--color-data-5': semanticColorsLight['data-5'],\n '--color-data-6': semanticColorsLight['data-6'],\n '--color-data-7': semanticColorsLight['data-7'],\n '--color-data-8': semanticColorsLight['data-8'],\n '--color-data-9': semanticColorsLight['data-9'],\n '--color-data-10': semanticColorsLight['data-10'],\n\n '--color-text-link-hover': semanticColorsLight['text-link-hover'],\n\n '--color-surface-overlay': semanticColorsLight['surface-overlay'],\n '--color-surface-input': semanticColorsLight['surface-input'],\n\n '--color-border-input': semanticColorsLight['border-input'],\n '--color-border-input-hover': semanticColorsLight['border-input-hover'],\n '--color-border-input-focus': semanticColorsLight['border-input-focus'],\n '--color-border-input-error': semanticColorsLight['border-input-error'],\n\n '--color-hairline-subtle': semanticColorsLight['hairline-subtle'],\n '--color-hairline-default': semanticColorsLight['hairline-default'],\n '--color-hairline-strong': semanticColorsLight['hairline-strong'],\n\n '--color-interactive-disabled-text': semanticColorsLight['interactive-disabled-text'],\n\n '--color-avatar-background': semanticColorsLight['avatar-background'],\n '--color-avatar-text': semanticColorsLight['avatar-text'],\n\n ...themeIndependentCSSVars,\n} as const\n\n// CSS custom properties for dark mode (default)\nexport const darkThemeCSSVars = {\n '--color-brand-primary': semanticColorsDark['brand-primary'],\n '--color-brand-primary-light': semanticColorsDark['brand-primary-light'],\n '--color-brand-primary-dark': semanticColorsDark['brand-primary-dark'],\n '--color-brand-primary-subtle': semanticColorsDark['brand-primary-subtle'],\n '--color-brand-primary-muted': semanticColorsDark['brand-primary-muted'],\n '--color-brand-primary-strong': semanticColorsDark['brand-primary-strong'],\n '--color-brand-secondary': semanticColorsDark['brand-secondary'],\n '--color-brand-secondary-light': semanticColorsDark['brand-secondary-light'],\n '--color-brand-secondary-dark': semanticColorsDark['brand-secondary-dark'],\n '--color-brand-secondary-subtle': semanticColorsDark['brand-secondary-subtle'],\n '--color-brand-secondary-muted': semanticColorsDark['brand-secondary-muted'],\n '--color-brand-secondary-strong': semanticColorsDark['brand-secondary-strong'],\n\n '--color-on-brand-primary': semanticColorsDark['on-brand-primary'],\n '--color-on-brand-secondary': semanticColorsDark['on-brand-secondary'],\n\n '--color-status-success': semanticColorsDark['status-success'],\n '--color-status-success-subtle': semanticColorsDark['status-success-subtle'],\n '--color-status-success-muted': semanticColorsDark['status-success-muted'],\n '--color-status-success-strong': semanticColorsDark['status-success-strong'],\n '--color-status-live': semanticColorsDark['status-live'],\n '--color-status-live-muted': semanticColorsDark['status-live-muted'],\n '--color-status-error': semanticColorsDark['status-error'],\n '--color-status-error-subtle': semanticColorsDark['status-error-subtle'],\n '--color-status-error-muted': semanticColorsDark['status-error-muted'],\n '--color-status-error-strong': semanticColorsDark['status-error-strong'],\n '--color-status-warning': semanticColorsDark['status-warning'],\n '--color-status-warning-subtle': semanticColorsDark['status-warning-subtle'],\n '--color-status-warning-muted': semanticColorsDark['status-warning-muted'],\n '--color-status-warning-strong': semanticColorsDark['status-warning-strong'],\n '--color-status-info': semanticColorsDark['status-info'],\n '--color-status-info-subtle': semanticColorsDark['status-info-subtle'],\n '--color-status-info-muted': semanticColorsDark['status-info-muted'],\n '--color-status-info-strong': semanticColorsDark['status-info-strong'],\n\n '--color-status-error-vivid': semanticColorsDark['status-error-vivid'],\n '--color-status-error-vivid-light': semanticColorsDark['status-error-vivid-light'],\n '--color-status-error-vivid-dark': semanticColorsDark['status-error-vivid-dark'],\n '--color-status-error-vivid-subtle': semanticColorsDark['status-error-vivid-subtle'],\n '--color-status-error-vivid-muted': semanticColorsDark['status-error-vivid-muted'],\n '--color-status-error-vivid-strong': semanticColorsDark['status-error-vivid-strong'],\n\n '--color-text-primary': semanticColorsDark['text-primary'],\n '--color-text-secondary': semanticColorsDark['text-secondary'],\n '--color-text-tertiary': semanticColorsDark['text-tertiary'],\n '--color-text-disabled': semanticColorsDark['text-disabled'],\n '--color-text-inverse': semanticColorsDark['text-inverse'],\n '--color-text-link': semanticColorsDark['text-link'],\n\n '--color-surface-base': semanticColorsDark['surface-base'],\n '--color-surface-elevated': semanticColorsDark['surface-elevated'],\n '--color-surface-raised': semanticColorsDark['surface-raised'],\n\n '--color-background-base': semanticColorsDark['background-base'],\n '--color-background-default': semanticColorsDark['background-default'],\n '--color-background-subtle': semanticColorsDark['background-subtle'],\n '--color-background-frame': semanticColorsDark['background-frame'],\n\n '--color-border-prominent': semanticColorsDark['border-prominent'],\n '--color-border-focus': semanticColorsDark['border-focus'],\n\n '--color-interactive-hover': semanticColorsDark['interactive-hover'],\n '--color-interactive-focus': semanticColorsDark['interactive-focus'],\n '--color-interactive-active': semanticColorsDark['interactive-active'],\n '--color-interactive-selected': semanticColorsDark['interactive-selected'],\n '--color-interactive-disabled': semanticColorsDark['interactive-disabled'],\n\n '--color-divider': semanticColorsDark['divider'],\n\n '--color-brand-primary-hover': semanticColorsDark['brand-primary-hover'],\n '--color-brand-primary-active': semanticColorsDark['brand-primary-active'],\n '--color-brand-secondary-hover': semanticColorsDark['brand-secondary-hover'],\n '--color-brand-secondary-active': semanticColorsDark['brand-secondary-active'],\n\n '--color-status-success-light': semanticColorsDark['status-success-light'],\n '--color-status-success-dark': semanticColorsDark['status-success-dark'],\n '--color-status-error-light': semanticColorsDark['status-error-light'],\n '--color-status-error-dark': semanticColorsDark['status-error-dark'],\n '--color-status-warning-light': semanticColorsDark['status-warning-light'],\n '--color-status-warning-dark': semanticColorsDark['status-warning-dark'],\n '--color-status-info-light': semanticColorsDark['status-info-light'],\n '--color-status-info-dark': semanticColorsDark['status-info-dark'],\n\n '--color-on-status-success': semanticColorsDark['on-status-success'],\n '--color-on-status-error': semanticColorsDark['on-status-error'],\n '--color-on-status-warning': semanticColorsDark['on-status-warning'],\n '--color-on-status-info': semanticColorsDark['on-status-info'],\n\n '--color-result-improve': semanticColorsDark['result-improve'],\n '--color-result-improve-light': semanticColorsDark['result-improve-light'],\n '--color-result-improve-dark': semanticColorsDark['result-improve-dark'],\n '--color-result-degrade': semanticColorsDark['result-degrade'],\n '--color-result-degrade-light': semanticColorsDark['result-degrade-light'],\n '--color-result-degrade-dark': semanticColorsDark['result-degrade-dark'],\n '--color-result-inconclusive': semanticColorsDark['result-inconclusive'],\n '--color-result-inconclusive-light': semanticColorsDark['result-inconclusive-light'],\n '--color-result-neutral': semanticColorsDark['result-neutral'],\n\n '--color-on-result-improve': semanticColorsDark['on-result-improve'],\n '--color-on-result-degrade': semanticColorsDark['on-result-degrade'],\n '--color-on-result-inconclusive': semanticColorsDark['on-result-inconclusive'],\n\n '--color-data-1': semanticColorsDark['data-1'],\n '--color-data-2': semanticColorsDark['data-2'],\n '--color-data-3': semanticColorsDark['data-3'],\n '--color-data-4': semanticColorsDark['data-4'],\n '--color-data-5': semanticColorsDark['data-5'],\n '--color-data-6': semanticColorsDark['data-6'],\n '--color-data-7': semanticColorsDark['data-7'],\n '--color-data-8': semanticColorsDark['data-8'],\n '--color-data-9': semanticColorsDark['data-9'],\n '--color-data-10': semanticColorsDark['data-10'],\n\n '--color-text-link-hover': semanticColorsDark['text-link-hover'],\n\n '--color-surface-overlay': semanticColorsDark['surface-overlay'],\n '--color-surface-input': semanticColorsDark['surface-input'],\n\n '--color-border-input': semanticColorsDark['border-input'],\n '--color-border-input-hover': semanticColorsDark['border-input-hover'],\n '--color-border-input-focus': semanticColorsDark['border-input-focus'],\n '--color-border-input-error': semanticColorsDark['border-input-error'],\n\n '--color-hairline-subtle': semanticColorsDark['hairline-subtle'],\n '--color-hairline-default': semanticColorsDark['hairline-default'],\n '--color-hairline-strong': semanticColorsDark['hairline-strong'],\n\n '--color-interactive-disabled-text': semanticColorsDark['interactive-disabled-text'],\n\n '--color-avatar-background': semanticColorsDark['avatar-background'],\n '--color-avatar-text': semanticColorsDark['avatar-text'],\n\n ...themeIndependentCSSVars,\n} as const\n\n// Helper to get CSS vars for a theme mode\nexport function getThemeCSSVars(mode: ThemeMode) {\n return mode === 'dark' ? darkThemeCSSVars : lightThemeCSSVars\n}\n\n// Gluestack UI theme configuration\nexport const gluestackConfig = {\n tokens: {\n colors: {\n // Map to our semantic colors via CSS vars\n primary500: 'var(--color-brand-primary)',\n primary600: 'var(--color-brand-primary-dark)',\n primary400: 'var(--color-brand-primary-light)',\n\n secondary500: 'var(--color-brand-secondary)',\n secondary600: 'var(--color-brand-secondary-dark)',\n secondary400: 'var(--color-brand-secondary-light)',\n\n success500: 'var(--color-status-success)',\n error500: 'var(--color-status-error)',\n warning500: 'var(--color-status-warning)',\n info500: 'var(--color-status-info)',\n\n textLight: 'var(--color-text-primary)',\n textDark: 'var(--color-text-inverse)',\n\n backgroundLight: 'var(--color-background-default)',\n backgroundDark: 'var(--color-surface-base)',\n },\n space: {\n '0': 0,\n '1': 4,\n '2': 8,\n '3': 12,\n '4': 16,\n '5': 20,\n '6': 24,\n '8': 32,\n '10': 40,\n '12': 48,\n '16': 64,\n '20': 80,\n '24': 96,\n },\n radii: {\n none: 0,\n sm: 4,\n md: 8,\n lg: 12,\n xl: 16,\n '2xl': 24,\n full: 9999,\n },\n fontSizes: {\n xs: 12,\n sm: 14,\n md: 16,\n lg: 18,\n xl: 20,\n '2xl': 24,\n '3xl': 30,\n '4xl': 36,\n '5xl': 48,\n },\n },\n aliases: {\n bg: 'backgroundColor',\n p: 'padding',\n px: 'paddingHorizontal',\n py: 'paddingVertical',\n m: 'margin',\n mx: 'marginHorizontal',\n my: 'marginVertical',\n h: 'height',\n w: 'width',\n rounded: 'borderRadius',\n },\n} as const\n\nexport type ThemeConfig = typeof gluestackConfig\n","/**\n * Surface MATERIALS — the treatments layered on top of the flat grey ramp.\n *\n * The ramp says how deep a plane sits. This says what it is made of. Two\n * materials, deliberately: a matte PAPER sheet for hero surfaces, and a recessed\n * INSET WELL for grouped or awaiting-data regions.\n *\n * SCOPE, and it is a hard rule rather than a preference: paper goes on hero\n * surfaces only — the live card, the LOAD/verdict chip, the rest hero. The\n * \"everything is a paper card\" look is explicitly NOT the model; it was an\n * over-application built to find the ceiling. There are no LEVELS of paper. One\n * treatment, used sparingly, or the texture stops meaning anything.\n *\n * Second hard rule: paper fills take DEEP/MUTED tones only (a ramp step, or a\n * categorical `dark` variant). Vivid and neon colours are ink ON paper — never\n * the paper itself.\n *\n * PLATFORM: `backgroundImage` and multi-layer `boxShadow` are web/RNW only. On\n * native these are ignored and the surface falls back to its flat fill, which is\n * why every material here keeps `backgroundColor` load-bearing on its own. A\n * material must never be the only thing carrying meaning.\n *\n * ── THE TONAL FILL IS GONE (VW-99, S-6 wall calibration) ───────────────────\n *\n * `paperSheet` used to carry a vertical ΔL* 3 gradient, sized \"just under seen\n * as a gradient\". On the wall panel at ~3 m it could not be told from a flat\n * sheet of the same tone, and the full material still read as — the operator's\n * words — \"a flat digital rectangle\". It failed its own stated purpose, which\n * was precisely to stop that.\n *\n * Raising it was not available. The design ceiling is ~ΔL* 4 (past that it reads\n * decorative, which the exploration rejected), and the same run showed why the\n * headroom would not have helped: the 0.025 ELEVATION step — a comparable ΔL*\n * — was called instantly, because it sits at a hard edge between two flat\n * fields. The fill spread the same amount smoothly over ~300 px, where vision is\n * genuinely poor. It is a spatial-frequency problem, not an amplitude one, so\n * the band between \"invisible\" and \"decorative\" may simply not exist here.\n *\n * ── AND THE DITHER WENT WITH IT (VW-99 run 2) ──────────────────────────────\n *\n * `ditherTile` was held back one run on the grounds that \"probably dead weight\"\n * is not a measurement. Run 1 could not measure it: with the fill invisible\n * there was no gradient to band, so the panel returned a guaranteed clean sheet.\n *\n * Run 2 settled it by adding a hand-quantised REFERENCE beside the smooth\n * control — the same tone span drawn as five hard-edged 1-level steps, which is\n * what the artefact looks like when it happens. The reference banded plainly and\n * the smooth gradient did not. So the panel can resolve banding; this render\n * path simply does not produce it. A mitigation for an artefact that does not\n * occur is cost with no benefit, and it is gone.\n *\n * That is a claim about THIS display, which is the one the product ships on and\n * the reason `paperSheet` is hero-surface-only. A phone is a separate question.\n *\n * Kept: grain, rim-light, contact shadow.\n *\n * See `sources/design/surface-system-north-star.md` §4 and\n * `sources/runbooks/VW-99-depth-wall-calibration.md`. Those paths are relative to\n * the `voltras-workspace` active-work initiative (`active-work open voltras-workspace`), not this repo —\n * titan-design has no `sources/` directory, so they do not resolve from here.\n */\nimport type { TextStyle, ViewStyle } from 'react-native'\nimport { getSemanticColors } from './tokens/semantic'\n\nconst c = getSemanticColors('dark')\n\n// ── colour math ─────────────────────────────────────────────────────────────\n\nfunction parseHex(hex: string): [number, number, number] | null {\n const h = hex.replace('#', '')\n const full =\n h.length === 3\n ? h\n .split('')\n .map((ch) => ch + ch)\n .join('')\n : h\n const rgb: [number, number, number] = [\n parseInt(full.slice(0, 2), 16),\n parseInt(full.slice(2, 4), 16),\n parseInt(full.slice(4, 6), 16),\n ]\n return rgb.some(Number.isNaN) ? null : rgb\n}\n\n/** sRGB perceived luminance (0 dark … 1 bright), Rec.601 weights. */\nfunction perceivedLuminance(hex: string): number {\n const rgb = parseHex(hex)\n if (!rgb) return 0.5\n const [r, g, b] = rgb\n return (0.299 * r + 0.587 * g + 0.114 * b) / 255\n}\n\n// The CIELAB conversion chain (srgb2lin/lin2srgb/fLab/fInv, hexToLab/labToHex,\n// shiftL) lived here so the tonal fill could be specified in ΔL*. It had no\n// other caller, so it went with the fill — see the module header.\n\n// ── grain ───────────────────────────────────────────────────────────────────\n\n/**\n * Grain opacity for a tone, scaled by perceived brightness.\n *\n * A fixed opacity reads hot on a dark plane and vanishes on a bright one, so\n * darker tones get a whisper and brighter tones keep full texture. Anchored so a\n * dark chip (lum ≈ 0.13) lands ≈ 0.06 and a bright bar (lum ≈ 0.58) lands ≈ 0.20.\n * Above roughly 0.05α on a mid tone it starts reading as \"dirty\" rather than\n * matte, which is what the clamp is protecting.\n *\n * This is the ONE curve all grain goes through — a card and a bar carry\n * proportional, not identical, texture. That is what makes them read as the same\n * material.\n */\nexport function grainOpacityForTone(baseColor: string): number {\n return Math.min(0.24, Math.max(0.04, 0.02 + 0.31 * perceivedLuminance(baseColor)))\n}\n\n/**\n * The matte grain tile as a `backgroundImage` url — one shared `feTurbulence`\n * fractal-noise tile, painted once, NEVER animated. Pair with\n * `backgroundColor: baseColor`.\n */\nexport function grainForTone(baseColor: string): string {\n const op = grainOpacityForTone(baseColor).toFixed(3)\n return (\n `url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E` +\n `%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E` +\n `%3Crect width='120' height='120' filter='url(%23n)' opacity='${op}'/%3E%3C/svg%3E\")`\n )\n}\n\n// `tonalFill` and `ditherTile` both lived here until VW-99 measured them on the\n// wall. Deleted rather than left exported-but-unused; the reasoning is in the\n// module header, which is the part worth keeping.\n\n// ── the materials ───────────────────────────────────────────────────────────\n\n/**\n * A matte PAPER hero sheet: brightness-scaled grain + a crisp top rim-light +\n * one soft contact shadow.\n *\n * The contact shadow is the ONE place a drop-shadow is still correct on a dark\n * surface: it is large, soft, and describes a sheet lying on a plane rather than\n * trying to encode hierarchy. Inline depth is the hairline's job.\n *\n * Defaults to `surface-raised` so a same-toned card laid inside reads as one\n * continuous sheet rather than a seam.\n *\n * THE RIM-LIGHT IS A HAIRLINE. Run 2 of VW-99 called it \"weak at distance\" on\n * both the card and the hero sheet, and the reason is visible in the number: it\n * was `rgba(255,255,255,0.10)`, a 1px white line on a dark plane — physically\n * the same cue as `hairline-*`, but set BELOW `hairline-default`, which the same\n * run had just had to raise twice. It is not a subtler species of edge, it was\n * simply mistuned. Raised to `0.20`, between `hairline-default` and\n * `hairline-strong`: this edge defines a hero surface, so it earns more than the\n * default separator, and unlike a separator there is no fallback behind it.\n *\n * Deliberately NOT wired to the token, though the values now agree in spirit: a\n * box-shadow rim and a border hairline are retuned by different evidence, and\n * coupling them means a hairline run silently restyles every hero sheet.\n *\n * HERO SURFACES ONLY, MUTED TONES ONLY — see the module header.\n */\nexport function paperSheet(tone: string = c['surface-raised']): ViewStyle {\n return {\n backgroundColor: tone,\n // Grain alone. The dither went with the gradient it protected — see header.\n backgroundImage: grainForTone(tone),\n boxShadow: 'inset 0 1px 0 rgba(255,255,255,0.20), 0 8px 22px rgba(0,0,0,0.50)',\n } as unknown as ViewStyle\n}\n\n/**\n * A recessed INSET WELL: a tone pressed BELOW the surrounding plane, cut in by an\n * inner top shadow with a faint light line on the floor.\n *\n * The bottom rim is the load-bearing half. A dark inset alone just reads as a\n * darker rectangle; it is the light catching the floor that says \"this is below\n * the surface\" — which is why the treatment survives at 16px where a full paper\n * treatment does not.\n *\n * The floor light was `0.04` and is now `0.12`, chosen on the wall in VW-99 run\n * 2 against a `.04`-vs-`.12`-vs-none forced choice. Worth recording that `.04`\n * was NOT invisible — the no-line decoy was correctly rejected and both real\n * values were seen, so this is a preference between two working values, not a\n * rescue. The rim-light next door was a genuine miss; this one was only thin.\n *\n * Note this is a MATERIAL, and independent of the surface LEVEL named `inset`\n * that was retired in TD-07.14. A well is something you apply; a level is\n * somewhere you sit.\n */\nexport function insetWell(tone: string = c['surface-input']): ViewStyle {\n return {\n backgroundColor: tone,\n boxShadow: 'inset 0 2px 6px rgba(0,0,0,0.55), inset 0 -1px 0 rgba(255,255,255,0.12)',\n } as unknown as ViewStyle\n}\n\n/**\n * Paper for a COLORED BAR — the same material as {@link paperSheet}, tuned for a\n * small saturated element: grain + top rim-light + a contact shadow cast past the\n * bar's leading edge, so a filled bar reads as a physical block that has travelled.\n *\n * No tonal fill or dither here: a bar is too narrow for a ΔL* 3 gradient to read,\n * and too narrow to band.\n *\n * `flip` = a vertically mirrored (`scaleY(-1)`) plot, i.e. the `down` wing of a\n * diverging chart. The contact shadow's y-offset is pre-inverted so the mirror\n * lands it pointing AWAY from the shared axis rather than up across it, and the\n * top rim-light is DROPPED — mirrored it would sit on the axis edge and read\n * wrong, so grain and shadow carry the material alone.\n */\nexport function barPaper(color: string, flip = false): ViewStyle {\n return {\n backgroundImage: grainForTone(color),\n boxShadow: flip\n ? '0 -6px 16px rgba(0,0,0,0.45)'\n : 'inset 0 1.5px 0 rgba(255,255,255,0.22), 0 6px 16px rgba(0,0,0,0.45)',\n } as unknown as ViewStyle\n}\n\n/**\n * A POST-IT card: a matte tinted sheet with a crisp rim, a defined contact\n * shadow, and a deliberate CANT (`deg`) so it reads as a stuck note — where a\n * small unit of data wants to feel pinned to the surface (alerts, next-set). A\n * degree or two, not a fraction, so the tilt is intentional rather than a bug.\n */\nexport function postIt(tone: string = c['surface-raised'], deg = -1.5): ViewStyle {\n return {\n backgroundColor: tone,\n backgroundImage: grainForTone(tone),\n boxShadow: 'inset 0 1px 0 rgba(255,255,255,0.12), 0 6px 14px rgba(0,0,0,0.45)',\n transform: [{ rotate: `${deg}deg` }],\n } as unknown as ViewStyle\n}\n\n/**\n * DEBOSSED (engraved) text: a 1px light highlight dropped just below the glyphs\n * so a label reads as pressed INTO the surface. Deliberate, for section eyebrows\n * on a matte plane — not body copy. Pair with a tertiary/dim text colour.\n */\nexport const debossLabel: TextStyle = {\n textShadowColor: 'rgba(255,255,255,0.11)',\n textShadowOffset: { width: 0, height: 1 },\n textShadowRadius: 0,\n}\n","/**\n * Colour math shared by the depth system.\n *\n * This file used to be `shadows.ts` and shipped a neumorphic shadow builder —\n * dual opposing shadows, dark bottom-right and light top-left. That was removed\n * in TD-07.16. Neumorphism needs a mid-tone background (roughly 75-90%\n * lightness) so BOTH shadows have somewhere to fall; our surfaces sit near 10%,\n * which leaves the dark half nothing to fall onto. It collapsed to a one-sided\n * rim light and read as noise on the wall.\n *\n * Inline depth is a hairline now (`hairline-*`, self-normalising alpha), texture\n * is `materials.ts`, and drop-shadow survives only for genuinely FLOATING\n * things — see `elevation.ts`.\n *\n * What is left here is the HSV/hex maths that `elevation.ts` still uses to\n * derive rim and shadow tints from whatever surface colour it is handed.\n */\n\n// ============================================================================\n// Color Math Utilities\n// ============================================================================\n\n/**\n * Parse a hex color to RGB values (0-255).\n * Supports both #RGB and #RRGGBB formats.\n */\nexport function hexToRgb(hex: string): { r: number; g: number; b: number } | null {\n const cleaned = hex.replace('#', '')\n\n let r: number, g: number, b: number\n\n if (cleaned.length === 3) {\n r = parseInt(cleaned[0] + cleaned[0], 16)\n g = parseInt(cleaned[1] + cleaned[1], 16)\n b = parseInt(cleaned[2] + cleaned[2], 16)\n } else if (cleaned.length === 6) {\n r = parseInt(cleaned.slice(0, 2), 16)\n g = parseInt(cleaned.slice(2, 4), 16)\n b = parseInt(cleaned.slice(4, 6), 16)\n } else {\n return null\n }\n\n return { r, g, b }\n}\n\n/**\n * Convert RGB (0-255) to HSV (h: 0-360, s: 0-1, v: 0-1).\n */\nexport function rgbToHsv(r: number, g: number, b: number): { h: number; s: number; v: number } {\n const rNorm = r / 255\n const gNorm = g / 255\n const bNorm = b / 255\n\n const max = Math.max(rNorm, gNorm, bNorm)\n const min = Math.min(rNorm, gNorm, bNorm)\n const delta = max - min\n\n // Value\n const v = max\n\n // Saturation\n const s = max === 0 ? 0 : delta / max\n\n // Hue\n let h = 0\n if (delta !== 0) {\n if (max === rNorm) {\n h = 60 * (((gNorm - bNorm) / delta) % 6)\n } else if (max === gNorm) {\n h = 60 * ((bNorm - rNorm) / delta + 2)\n } else {\n h = 60 * ((rNorm - gNorm) / delta + 4)\n }\n }\n if (h < 0) h += 360\n\n return { h, s, v }\n}\n\n/**\n * Convert HSV (h: 0-360, s: 0-1, v: 0-1) to RGB (0-255).\n */\nexport function hsvToRgb(h: number, s: number, v: number): { r: number; g: number; b: number } {\n const c = v * s\n const x = c * (1 - Math.abs(((h / 60) % 2) - 1))\n const m = v - c\n\n let rPrime: number, gPrime: number, bPrime: number\n\n if (h >= 0 && h < 60) {\n rPrime = c\n gPrime = x\n bPrime = 0\n } else if (h >= 60 && h < 120) {\n rPrime = x\n gPrime = c\n bPrime = 0\n } else if (h >= 120 && h < 180) {\n rPrime = 0\n gPrime = c\n bPrime = x\n } else if (h >= 180 && h < 240) {\n rPrime = 0\n gPrime = x\n bPrime = c\n } else if (h >= 240 && h < 300) {\n rPrime = x\n gPrime = 0\n bPrime = c\n } else {\n rPrime = c\n gPrime = 0\n bPrime = x\n }\n\n return {\n r: Math.round((rPrime + m) * 255),\n g: Math.round((gPrime + m) * 255),\n b: Math.round((bPrime + m) * 255),\n }\n}\n\n/**\n * Convert RGB values to hex string.\n */\nexport function rgbToHex(r: number, g: number, b: number): string {\n const toHex = (n: number) => {\n const clamped = Math.max(0, Math.min(255, Math.round(n)))\n return clamped.toString(16).padStart(2, '0')\n }\n return `#${toHex(r)}${toHex(g)}${toHex(b)}`\n}\n\n/**\n * Lighten a color by increasing its HSV Value component.\n *\n * @param hex - The hex color to lighten\n * @param amount - Amount to increase V by (0-1)\n */\nexport function lighten(hex: string, amount: number = 0.1): string {\n const rgb = hexToRgb(hex)\n if (!rgb) return hex\n\n const hsv = rgbToHsv(rgb.r, rgb.g, rgb.b)\n const newV = Math.min(1, hsv.v + amount)\n\n const newRgb = hsvToRgb(hsv.h, hsv.s, newV)\n return rgbToHex(newRgb.r, newRgb.g, newRgb.b)\n}\n\n/**\n * Darken a color by decreasing its HSV Value component.\n *\n * @param hex - The hex color to darken\n * @param amount - Amount to decrease V by (0-1)\n */\nexport function darken(hex: string, amount: number = 0.1): string {\n const rgb = hexToRgb(hex)\n if (!rgb) return hex\n\n const hsv = rgbToHsv(rgb.r, rgb.g, rgb.b)\n const newV = Math.max(0, hsv.v - amount)\n\n const newRgb = hsvToRgb(hsv.h, hsv.s, newV)\n return rgbToHex(newRgb.r, newRgb.g, newRgb.b)\n}\n\n/**\n * Get hover colors for a button based on its background color.\n * Automatically adapts intensity based on the color's luminance.\n *\n * @param bgColor - The button's background color (hex)\n * @param intensity - How strong the hover effect should be ('subtle' | 'medium' | 'strong')\n */\nexport function getHoverColors(\n bgColor: string,\n intensity: 'subtle' | 'medium' | 'strong' = 'medium'\n): { raised: string; pressed: string } {\n const amounts = {\n subtle: 0.01,\n medium: 0.02,\n strong: 0.03,\n }\n\n const amount = amounts[intensity]\n\n return {\n raised: lighten(bgColor, amount), // Raised hover: lighten (lifting up)\n pressed: darken(bgColor, amount), // Pressed hover: darken (pressing down)\n }\n}\n\n/**\n * Check if a color is considered \"dark\" (for choosing text color).\n * Uses HSV Value component for simplicity.\n */\nexport function isDark(hex: string): boolean {\n const rgb = hexToRgb(hex)\n if (!rgb) return true\n const hsv = rgbToHsv(rgb.r, rgb.g, rgb.b)\n return hsv.v < 0.6\n}\n\n/**\n * Shadow strength tiers. Retained because `elevation.ts` keys its level table on\n * them; the neumorphic shadow BUILDERS that used to live here are gone.\n */\nexport type ShadowIntensity = 'subtle' | 'medium' | 'strong'\n","/**\n * LIFT — the treatment a plane wears when it sits above its neighbour.\n *\n * Tone says which plane a container sits on; lift says it is resting ON the one\n * below. Two cues, both lit from above:\n *\n * RIM a crisp 1px top rim-light. The one neumorphism half that survives\n * near black. paperSheet's hero rim is 0.20 (VW-99 run 2); a card is\n * not a hero, so the default lift sits one grade quieter at 0.12,\n * chosen against 0.20 side by side in Lab/Depth (2026-09-08).\n * AMBIENT a soft shadow cast onto the plane below, growing with the number of\n * planes crossed. Content lifts (1–3) are tight; floating lifts (4–5)\n * are large and soft, describing separation from the page rather than\n * rank in a stack.\n *\n * Neither cue is a hairline ring: a ring is an edge, not a lift, and stays the\n * divider's job. Web carries the multi-layer boxShadow; native gets the single\n * shadow* set. The tone underneath is load-bearing on its own either way.\n */\nimport { Platform, type ViewStyle } from 'react-native'\nimport type { ThemeMode } from './tokens/semantic'\n\nexport type LiftStep = 1 | 2 | 3 | 4 | 5\n\n/** The lowest lift that is FLOATING (menu, popover, toast) rather than content. */\nexport const FLOATING_LIFT_MIN: LiftStep = 4\n\n/** Rim-light alpha per mode. Light mode is a placeholder pending its own pass. */\nexport const LIFT_RIM_ALPHA: Record<ThemeMode, number> = { dark: 0.12, light: 0.9 }\n\ninterface ShadowLayer {\n y: number\n blur: number\n alpha: number\n}\n\nconst AMBIENT: Record<LiftStep, ShadowLayer[]> = {\n 1: [\n { y: 1, blur: 2, alpha: 0.35 },\n { y: 2, blur: 6, alpha: 0.3 },\n ],\n 2: [\n { y: 1, blur: 2, alpha: 0.35 },\n { y: 4, blur: 12, alpha: 0.32 },\n ],\n 3: [\n { y: 2, blur: 4, alpha: 0.35 },\n { y: 8, blur: 22, alpha: 0.35 },\n ],\n 4: [\n { y: 1, blur: 2, alpha: 0.35 },\n { y: 10, blur: 24, alpha: 0.3 },\n { y: 24, blur: 48, alpha: 0.2 },\n ],\n 5: [\n { y: 2, blur: 4, alpha: 0.4 },\n { y: 16, blur: 32, alpha: 0.35 },\n { y: 32, blur: 64, alpha: 0.25 },\n ],\n}\n\n/** A light surface casts a lighter shadow: same geometry, scaled alpha. */\nconst AMBIENT_ALPHA_SCALE: Record<ThemeMode, number> = { dark: 1, light: 0.4 }\n\nexport interface LiftOptions {\n /** Override the rim alpha. `0` drops the rim and leaves the ambient shadow alone. */\n rim?: number\n}\n\nfunction ambientLayers(step: LiftStep, mode: ThemeMode): string[] {\n const scale = AMBIENT_ALPHA_SCALE[mode]\n return AMBIENT[step].map(\n ({ y, blur, alpha }) => `0 ${y}px ${blur}px rgba(0,0,0,${(alpha * scale).toFixed(2)})`\n )\n}\n\n/** The web boxShadow string for a lift: rim first, then the ambient layers. */\nexport function liftShadow(step: LiftStep, mode: ThemeMode = 'dark', opts: LiftOptions = {}) {\n const rim = opts.rim ?? LIFT_RIM_ALPHA[mode]\n const layers = ambientLayers(step, mode)\n if (rim > 0) layers.unshift(`inset 0 1px 0 rgba(255,255,255,${rim.toFixed(2)})`)\n return layers.join(', ')\n}\n\n/** Platform style for a lift. Compose after `backgroundColor`; never instead of it. */\nexport function liftStyle(\n step: LiftStep,\n mode: ThemeMode = 'dark',\n opts: LiftOptions = {}\n): ViewStyle {\n const deepest = AMBIENT[step][AMBIENT[step].length - 1]\n return Platform.select({\n web: { boxShadow: liftShadow(step, mode, opts) } as unknown as ViewStyle,\n default: {\n shadowColor: '#000',\n shadowOffset: { width: 0, height: Math.round(deepest.y / 2) },\n shadowOpacity: deepest.alpha * AMBIENT_ALPHA_SCALE[mode],\n shadowRadius: deepest.blur / 2,\n elevation: step,\n },\n }) as ViewStyle\n}\n","/**\n * The surface planes: the grey-ramp steps a container can sit on, darkest first.\n *\n * Every background a `<Surface>` or `<Card>` paints resolves through this list,\n * so a container can only ever land ON the ramp. Stepping up (a lifted card) or\n * down (a pressed well) is indexing `PLANE_ORDER`, clamped at both ends.\n *\n * `frame` is the bezel the ramp sits inside and the floor a pressed surface\n * clamps at. It replaced a separate `inset` level in TD-07.14: at ΔE 1.10 from\n * the frame that level was an imperceptible duplicate.\n */\nimport { getSemanticColors, type ThemeMode } from './tokens/semantic'\n\ntype ColorToken = keyof ReturnType<typeof getSemanticColors>\n\nexport type SurfaceLevel = 'frame' | 'background' | 'base' | 'elevated' | 'raised' | 'overlay'\n\n// Which semantic token backs each plane. Values live in `semantic.ts` and stay\n// in sync with the grey ramp; this map never carries literal hexes.\nexport const SURFACE_LEVEL_TOKEN = {\n frame: 'background-frame',\n background: 'background-base',\n base: 'surface-base',\n elevated: 'surface-elevated',\n raised: 'surface-raised',\n overlay: 'surface-overlay',\n} as const satisfies Record<SurfaceLevel, ColorToken>\n\n/** Darkest → lightest. Kept in lockstep with the grey ramp and surface.contract.test. */\nexport const PLANE_ORDER = [\n 'frame',\n 'background',\n 'base',\n 'elevated',\n 'raised',\n 'overlay',\n] as const satisfies readonly SurfaceLevel[]\n\n/** The background hex for a plane under a theme mode (literal hex, never a var()). */\nexport function surfaceBackground(level: SurfaceLevel, mode: ThemeMode): string {\n return getSemanticColors(mode)[SURFACE_LEVEL_TOKEN[level]]\n}\n\nfunction stepPlane(from: SurfaceLevel, delta: number): SurfaceLevel {\n const index = PLANE_ORDER.indexOf(from)\n const clamped = Math.min(PLANE_ORDER.length - 1, Math.max(0, index + delta))\n return PLANE_ORDER[clamped]\n}\n\n/**\n * The plane a `<Surface pressed>` resolves to: its parent's plane stepped one\n * index DOWN the ramp, clamped at the `frame` floor.\n * overlay→raised, raised→elevated, elevated→base, base→background,\n * background→frame, frame→frame (clamped).\n */\nexport function pressedLevel(parent: SurfaceLevel): SurfaceLevel {\n return stepPlane(parent, -1)\n}\n\n/**\n * The plane a lifted surface resolves to: its parent's plane stepped `steps`\n * UP the ramp, clamped at `overlay`. The clamp is what makes raised-on-raised\n * unrepresentable: a card inside an overlay stays on the overlay and relies on\n * its lift treatment, never on a lighter grey that is not on the ramp.\n */\nexport function raisedLevel(parent: SurfaceLevel, steps: number): SurfaceLevel {\n return stepPlane(parent, Math.max(0, steps))\n}\n","/**\n * Elevation — numeric depth that resolves to the grey ramp.\n *\n * A level is a plane on the surface ramp plus the treatment that plane wears:\n *\n * -2 frame recessed (inset well, two planes down)\n * -1 background recessed (inset well, one plane down)\n * 0 base flat, no treatment\n * 1 elevated lifted (tone + rim-light + ambient shadow)\n * 2 raised lifted\n * 3 overlay lifted\n * 4 overlay floating (same recipe, larger shadow)\n * 5 overlay floating\n *\n * These are ABSOLUTE readings from the page plane. `<Surface>` and `<Card>`\n * apply the same numbers RELATIVE to the plane they are nested in; see\n * `resolveSurfaceDepth`.\n *\n * No level can produce a colour off the ramp. The previous ladder lightened a\n * base colour in HSV by 2.5% per level and put five of its six stops between\n * ramp steps, drifting warmer as it rose while the ramp is designed to cool.\n * Floating levels share the overlay plane on purpose: past the top of the ramp,\n * separation is the shadow's job, not a lighter grey.\n *\n * Depth is TONE + LIFT by default. The earlier rule that levels 1–3 separate by\n * tone alone (TD-07.16) was reversed on 2026-09-08: the tight upper steps of the\n * ramp (ΔL* 2.5–3) need the second channel, and a soft ambient shadow on a\n * near-black plane is not inert once the rim-light gives it an edge to fall\n * from. See Foundations/Depth.\n */\nimport { Platform, type ViewStyle } from 'react-native'\nimport { hexToRgb } from './color-utils'\nimport { insetWell } from './materials'\nimport { FLOATING_LIFT_MIN, liftStyle, type LiftOptions, type LiftStep } from './lift'\nimport { surfaceBackground, type SurfaceLevel } from './surface-planes'\nimport type { ThemeMode } from './tokens/semantic'\n\nexport type ElevationLevel = -2 | -1 | 0 | 1 | 2 | 3 | 4 | 5\n\nexport const ELEVATION_PLANE: Record<ElevationLevel, SurfaceLevel> = {\n [-2]: 'frame',\n [-1]: 'background',\n [0]: 'base',\n [1]: 'elevated',\n [2]: 'raised',\n [3]: 'overlay',\n [4]: 'overlay',\n [5]: 'overlay',\n}\n\n/** The lowest elevation that is floating (menu, popover, toast) rather than content. */\nexport const FLOATING_ELEVATION_MIN: ElevationLevel = FLOATING_LIFT_MIN\n\n/** Elevation backing a `<Surface pressed>` recess: one plane down. */\nexport const PRESSED_ELEVATION_LEVEL: ElevationLevel = -1\n\n/** The ramp plane an absolute elevation sits on. */\nexport function elevationPlane(level: ElevationLevel): SurfaceLevel {\n return ELEVATION_PLANE[level]\n}\n\n/** The background hex for an absolute elevation: always a ramp step. */\nexport function getElevationSurface(level: ElevationLevel, mode: ThemeMode = 'dark'): string {\n return surfaceBackground(ELEVATION_PLANE[level], mode)\n}\n\n/**\n * Inner-shadow recess for a pressed (sunken) surface: the `insetWell` material's\n * cut, which the wall calibrated in VW-99. Web only; on native the recess reads\n * from the darker fill alone, which is why the fill is never optional.\n */\nexport function getPressedRecessShadow(fillColor: string, _mode: ThemeMode = 'dark'): ViewStyle {\n const { boxShadow } = insetWell(fillColor) as unknown as { boxShadow: string }\n return Platform.select({\n web: { boxShadow } as unknown as ViewStyle,\n default: {},\n }) as ViewStyle\n}\n\n/**\n * The treatment an absolute elevation wears: a recess below 0, nothing at 0,\n * a lift above it. Compose after `backgroundColor`.\n */\nexport function getElevationShadow(\n level: ElevationLevel,\n mode: ThemeMode = 'dark',\n opts: LiftOptions = {}\n): ViewStyle {\n if (level < 0) return getPressedRecessShadow(getElevationSurface(level, mode), mode)\n if (level === 0) return {}\n return liftStyle(level as LiftStep, mode, opts)\n}\n\n// =============================================================================\n// Glow Shadow Support\n// =============================================================================\n\nexport type GlowIntensity = 'tight' | 'subtle' | 'medium' | 'strong'\n\n// Four fixed intensities, chosen by EMPHASIS rather than by the element's size:\n// a caller says how loud the glow should be, not how big the thing is. `tight`\n// is the close halo a small indicator wore before glows were centralised; it is\n// kept as a rung on the scale so that look stays reachable.\nconst glowConfig: Record<GlowIntensity, { blur: number; spread: number; opacity: number }> = {\n tight: { blur: 4, spread: 0, opacity: 0.4 },\n subtle: { blur: 12, spread: 0, opacity: 0.25 },\n medium: { blur: 20, spread: 2, opacity: 0.4 },\n strong: { blur: 30, spread: 4, opacity: 0.55 },\n}\n\n/**\n * A coloured radial glow around an element, for emphasis and active states:\n * a live recording indicator, a success or error pulse, a focus halo.\n */\nexport function getGlowShadow(color: string, intensity: GlowIntensity = 'medium'): ViewStyle {\n const config = glowConfig[intensity]\n const rgb = hexToRgb(color)\n if (!rgb) return {}\n\n return Platform.select({\n web: {\n boxShadow: `0 0 ${config.blur}px ${config.spread}px rgba(${rgb.r}, ${rgb.g}, ${rgb.b}, ${config.opacity})`,\n } as unknown as ViewStyle,\n default: {\n shadowColor: color,\n shadowOffset: { width: 0, height: 0 },\n shadowOpacity: config.opacity,\n shadowRadius: config.blur / 2,\n elevation: 0,\n },\n }) as ViewStyle\n}\n","import type { CssPropertyManifest, VariantAxes } from './css-property-manifest.types'\n\n/** Result of validating a candidate manifest: valid iff errors is empty. */\nexport interface ManifestValidationResult {\n valid: boolean\n errors: string[]\n}\n\nconst isPlainObject = (value: unknown): value is Record<string, unknown> =>\n typeof value === 'object' && value !== null && !Array.isArray(value)\n\nconst isVariantAxes = (value: unknown): value is VariantAxes =>\n isPlainObject(value) &&\n Object.keys(value).length > 0 &&\n Object.values(value).every((axisValue) => typeof axisValue === 'string')\n\nfunction collectVariantOverrideErrors(override: unknown, path: string): string[] {\n if (!isPlainObject(override)) return [`${path} must be an object`]\n const errors: string[] = []\n if (!isVariantAxes(override.variant))\n errors.push(`${path}.variant must be a non-empty string-keyed object`)\n if (\n override.token !== undefined &&\n override.token !== null &&\n typeof override.token !== 'string'\n ) {\n errors.push(`${path}.token must be a string or null`)\n }\n if (typeof override.resolvedValue !== 'string' || override.resolvedValue.length === 0) {\n errors.push(`${path}.resolvedValue must be a non-empty string`)\n }\n return errors\n}\n\nfunction collectPropertyErrors(entry: unknown, path: string): string[] {\n if (!isPlainObject(entry)) return [`${path} must be an object`]\n const errors: string[] = []\n if (typeof entry.property !== 'string' || entry.property.length === 0) {\n errors.push(`${path}.property must be a non-empty string`)\n }\n if (entry.token !== null && typeof entry.token !== 'string') {\n errors.push(`${path}.token must be a string or null`)\n }\n if (typeof entry.resolvedValue !== 'string' || entry.resolvedValue.length === 0) {\n errors.push(`${path}.resolvedValue must be a non-empty string`)\n }\n if (entry.variantOverrides !== undefined) {\n if (!Array.isArray(entry.variantOverrides)) {\n errors.push(`${path}.variantOverrides must be an array`)\n } else {\n entry.variantOverrides.forEach((override, i) =>\n errors.push(...collectVariantOverrideErrors(override, `${path}.variantOverrides[${i}]`))\n )\n }\n }\n return errors\n}\n\n/** Structurally validates a candidate value against the CssPropertyManifest shape. */\nexport function validateCssPropertyManifest(candidate: unknown): ManifestValidationResult {\n if (!isPlainObject(candidate)) return { valid: false, errors: ['manifest must be an object'] }\n\n const errors: string[] = []\n if (typeof candidate.component !== 'string' || candidate.component.length === 0) {\n errors.push('component must be a non-empty string')\n }\n if (candidate.baseVariant !== undefined && !isVariantAxes(candidate.baseVariant)) {\n errors.push('baseVariant must be a non-empty string-keyed object')\n }\n if (!Array.isArray(candidate.properties) || candidate.properties.length === 0) {\n errors.push('properties must be a non-empty array')\n } else {\n candidate.properties.forEach((entry, i) =>\n errors.push(...collectPropertyErrors(entry, `properties[${i}]`))\n )\n }\n\n return { valid: errors.length === 0, errors }\n}\n\n/** Type guard variant of validateCssPropertyManifest for use in narrowing contexts. */\nexport function isCssPropertyManifest(candidate: unknown): candidate is CssPropertyManifest {\n return validateCssPropertyManifest(candidate).valid\n}\n","import { Platform } from 'react-native'\nimport { getSemanticColors, type ThemeMode } from './tokens/semantic'\n\ntype ColorToken = keyof ReturnType<typeof getSemanticColors>\n\n/**\n * Resolve a semantic color token for an inline style where a nativewind\n * className can't apply — gradients (`backgroundImage`), per-edge borders\n * (`borderTopColor`, …), SVG attributes, and conditional hex/token mixes.\n *\n * The companion to className color tokens: on **web** it returns the CSS\n * variable (`var(--color-…)`), so the dashboard's light/dark switching keeps\n * working exactly as `global.css` intends; on **native** it returns the\n * resolved hex from `getSemanticColors` (mobile is dark-only). This is why\n * these spots stay theme-correct on web while also rendering on-device.\n */\nexport function resolveColor(token: ColorToken, mode: ThemeMode = 'dark'): string {\n return Platform.OS === 'web' ? `var(--color-${token})` : getSemanticColors(mode)[token]\n}\n","import { resolveColor } from './resolve-color'\nimport { getSemanticColors, type ThemeMode } from './tokens/semantic'\n\ntype ColorToken = keyof ReturnType<typeof getSemanticColors>\n\n/** A `backgroundImage` style — web-only (RN ignores it); type it loosely for RN style arrays. */\nexport type GradientStyle = { backgroundImage: string }\n\n/**\n * A linear-gradient `backgroundImage` built from two semantic color tokens.\n *\n * Themeable + native-safe via {@link resolveColor}: on web the stops are CSS\n * variables (light/dark switching keeps working); on native it resolves to hex.\n * `backgroundImage` is a **web-only** paint, so pair this with a solid\n * `bg-*` className fallback for native (see the shell TopBar).\n */\nexport function linearGradient(\n from: ColorToken,\n to: ColorToken,\n angle = 180,\n mode: ThemeMode = 'dark'\n): GradientStyle {\n return {\n backgroundImage: `linear-gradient(${angle}deg, ${resolveColor(from, mode)}, ${resolveColor(to, mode)})`,\n }\n}\n\n/**\n * Named surface gradients — the shared substrate for gradient fills. Replaces\n * per-component inline `linear-gradient` strings.\n */\nexport const surfaceGradient = {\n /** Chrome bands (top bar, headers): elevated → base, a subtle dark wash. */\n chrome: (mode: ThemeMode = 'dark'): GradientStyle =>\n linearGradient('surface-elevated', 'background-base', 180, mode),\n}\n","import type { ThemePreset } from './types'\n\nfunction colorKeyToVar(key: string): string {\n return `--color-${key}`\n}\n\nfunction applyColorOverrides(colors: Record<string, string | undefined>, root: HTMLElement) {\n for (const [key, value] of Object.entries(colors)) {\n if (value !== undefined) {\n root.style.setProperty(colorKeyToVar(key), value)\n }\n }\n}\n\nfunction applyFontOverrides(fonts: Record<string, string | undefined>, root: HTMLElement) {\n const fontVarMap: Record<string, string> = {\n sans: '--font-family-sans',\n body: '--font-family-body',\n heading: '--font-family-heading',\n mono: '--font-family-mono',\n }\n for (const [key, value] of Object.entries(fonts)) {\n if (value !== undefined && fontVarMap[key]) {\n root.style.setProperty(fontVarMap[key], value)\n }\n }\n}\n\nfunction injectFontImport(url: string) {\n if (typeof document === 'undefined') return\n const existing = document.querySelector(`link[href=\"${url}\"]`)\n if (existing) return\n const link = document.createElement('link')\n link.rel = 'stylesheet'\n link.href = url\n document.head.appendChild(link)\n}\n\n/**\n * @deprecated Use `ThemeProvider` with semantic tokens — removed once audiobook\n * migrates off presets (AW-129).\n */\nexport function applyThemePreset(preset: ThemePreset): () => void {\n if (typeof document === 'undefined') {\n return () => {}\n }\n\n const root = document.documentElement\n const removals: (() => void)[] = []\n\n // Inject font import if specified\n if (preset.fontImport) {\n injectFontImport(preset.fontImport)\n }\n\n // Determine current theme mode\n const isLight = root.classList.contains('light')\n const modeColors = isLight ? preset.colors?.light : preset.colors?.dark\n\n // Apply color overrides\n if (modeColors) {\n const previousValues: Record<string, string | null> = {}\n for (const key of Object.keys(modeColors)) {\n previousValues[colorKeyToVar(key)] = root.style.getPropertyValue(colorKeyToVar(key)) || null\n }\n applyColorOverrides(modeColors, root)\n removals.push(() => {\n for (const [varName, prev] of Object.entries(previousValues)) {\n if (prev === null) {\n root.style.removeProperty(varName)\n } else {\n root.style.setProperty(varName, prev)\n }\n }\n })\n }\n\n // Apply font overrides\n if (preset.fonts) {\n applyFontOverrides(preset.fonts as Record<string, string | undefined>, root)\n }\n\n // Apply root classes\n if (preset.rootClasses) {\n for (const cls of preset.rootClasses) {\n root.classList.add(cls)\n }\n removals.push(() => {\n for (const cls of preset.rootClasses!) {\n root.classList.remove(cls)\n }\n })\n }\n\n // Return cleanup function\n return () => {\n for (const remove of removals) {\n remove()\n }\n }\n}\n","import type { ThemePreset } from './types'\n\n/**\n * @deprecated Use `ThemeProvider` with semantic tokens — removed once audiobook\n * migrates off presets (AW-129).\n */\nexport const defaultPreset: ThemePreset = {\n name: 'default',\n description: 'Titan Design System default theme — orange accent, steel secondary',\n}\n","import type { ThemePreset } from './types'\n\n/**\n * Audiobook Studio preset.\n *\n * Warm copper/patina aesthetic inspired by vintage audio equipment\n * and reading lounges. Dark-mode only design with editorial typography.\n *\n * @deprecated Use `ThemeProvider` with semantic tokens — removed once audiobook\n * migrates off presets (AW-129).\n */\nexport const audiobookPreset: ThemePreset = {\n name: 'audiobook',\n description: 'Warm copper/patina theme with editorial typography',\n fontImport:\n 'https://fonts.googleapis.com/css2?family=Newsreader:ital,wght@0,400;0,600;0,700;1,400&family=Outfit:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap',\n fonts: {\n sans: \"'Outfit', 'Avenir', 'Avenir Next', system-ui, sans-serif\",\n body: \"'Outfit', 'Avenir', 'Avenir Next', system-ui, sans-serif\",\n heading: \"'Newsreader', 'Libre Baskerville', Georgia, serif\",\n mono: \"'JetBrains Mono', 'SF Mono', 'Fira Code', monospace\",\n },\n colors: {\n dark: {\n // Brand: Copper accent\n 'brand-primary': '#d4782a',\n 'brand-primary-light': '#e8944a',\n 'brand-primary-dark': '#9a4a15',\n 'brand-primary-subtle': 'rgba(212, 120, 42, 0.12)',\n 'brand-primary-hover': '#e8944a',\n 'brand-primary-active': '#f5b070',\n\n // Brand secondary: Patina/verdigris\n 'brand-secondary': '#3a9b8a',\n 'brand-secondary-light': '#55baa7',\n 'brand-secondary-dark': '#1f5c52',\n 'brand-secondary-subtle': 'rgba(58, 155, 138, 0.12)',\n 'brand-secondary-hover': '#55baa7',\n 'brand-secondary-active': '#7ed4c4',\n\n 'on-brand-primary': '#FFFFFF',\n 'on-brand-secondary': '#FFFFFF',\n\n // Status colors (audiobook's warmer status palette)\n 'status-success': '#5fb870',\n 'status-error': '#d85c4a',\n 'status-warning': '#d4a43a',\n 'status-info': '#5a8fd4',\n\n // Text: warm off-whites\n 'text-primary': '#f4f3f1',\n 'text-secondary': '#b5b3af',\n 'text-tertiary': '#7a7875',\n\n // Surfaces: warm greys (not pure gray)\n 'surface-base': '#101114',\n 'surface-elevated': '#15171c',\n 'surface-raised': '#1a1d24',\n 'surface-overlay': '#15171c',\n 'surface-input': '#15171c',\n\n // Backgrounds\n 'background-base': '#0a0b0d',\n 'background-default': '#101114',\n 'background-subtle': '#1a1d24',\n\n // Borders\n 'hairline-default': 'rgba(255, 255, 255, 0.06)',\n 'hairline-subtle': 'rgba(255, 255, 255, 0.03)',\n 'hairline-strong': '#2d323d',\n 'border-focus': '#d4782a',\n 'border-input': '#2d323d',\n 'border-input-hover': '#454c5c',\n 'border-input-focus': '#d4782a',\n 'border-input-error': '#d85c4a',\n\n // Interactive\n 'interactive-hover': 'rgba(255, 255, 255, 0.04)',\n 'interactive-focus': 'rgba(255, 255, 255, 0.12)',\n 'interactive-active': 'rgba(255, 255, 255, 0.16)',\n 'interactive-selected': 'rgba(255, 255, 255, 0.08)',\n\n divider: 'rgba(255, 255, 255, 0.06)',\n\n // Glow RGB values for shadow utilities\n 'brand-primary-rgb': '212, 120, 42',\n 'brand-secondary-rgb': '58, 155, 138',\n 'status-success-rgb': '95, 184, 112',\n 'status-error-rgb': '216, 92, 74',\n 'status-warning-rgb': '212, 164, 58',\n 'status-info-rgb': '90, 143, 212',\n 'background-base-rgb': '10, 11, 13',\n },\n },\n rootClasses: ['atmosphere-warm', 'grain'],\n}\n","// On-surface colour context (TD-05.12).\n//\n// A <Surface> owns a background from the surface ramp AND publishes the current\n// theme mode so descendant text/icons resolve their colour from \"what surface am\n// I on\" instead of a `text-*` className. Those classNames silently fail to black\n// when the tree renders as raw RN in the standalone wall SPA (no global.css, no\n// nativewind), which is the bug class this primitive retires.\nimport { createContext, useContext } from 'react'\nimport { getSemanticColors, type ThemeMode } from '../../../theme/tokens/semantic'\nimport type { SurfaceLevel } from '../../../theme/surface-planes'\n\n// The plane vocabulary lives in the theme so `elevation.ts` can resolve levels\n// to planes without importing a component. Re-exported here for callers that\n// reached it through the Surface module.\nexport {\n SURFACE_LEVEL_TOKEN,\n PLANE_ORDER,\n surfaceBackground,\n pressedLevel,\n raisedLevel,\n type SurfaceLevel,\n} from '../../../theme/surface-planes'\n\ntype ColorToken = keyof ReturnType<typeof getSemanticColors>\n\n/** On-surface neutral text roles, resolved for the current surface + theme. */\nexport type OnSurfaceRole = 'primary' | 'secondary' | 'tertiary'\n\nconst ON_SURFACE_TOKEN = {\n primary: 'text-primary',\n secondary: 'text-secondary',\n tertiary: 'text-tertiary',\n} as const satisfies Record<OnSurfaceRole, ColorToken>\n\nexport interface SurfaceContextValue {\n /** Active theme mode. Defaults to dark (the wall). */\n mode: ThemeMode\n /** Plane of the nearest enclosing Surface. */\n level: SurfaceLevel\n}\n\n// Default context: dark 'base' plane, so descendants OUTSIDE any Surface still\n// resolve to real dark colours (never black) on the dark-only wall.\nconst DEFAULT_CONTEXT: SurfaceContextValue = { mode: 'dark', level: 'base' }\n\nexport const SurfaceContext = createContext<SurfaceContextValue>(DEFAULT_CONTEXT)\n\n/** The nearest surface context ({ mode, level }); default dark 'base'. */\nexport function useSurface(): SurfaceContextValue {\n return useContext(SurfaceContext)\n}\n\n/** The active theme mode from the nearest Surface/provider (default dark). */\nexport function useSurfaceMode(): ThemeMode {\n return useContext(SurfaceContext).mode\n}\n\n/**\n * Literal-hex on-surface neutral text colours for a theme mode. Uses\n * `getSemanticColors` (literal hex), never `resolveColor` (which returns `var()`\n * under the RNW vitest alias), so values stay real in tested component code and\n * on raw-RN surfaces alike.\n */\nexport function onSurfaceColors(mode: ThemeMode): Record<OnSurfaceRole, string> {\n const c = getSemanticColors(mode)\n return {\n primary: c[ON_SURFACE_TOKEN.primary],\n secondary: c[ON_SURFACE_TOKEN.secondary],\n tertiary: c[ON_SURFACE_TOKEN.tertiary],\n }\n}\n\n/** Resolve one on-surface text colour for descendants of a Surface. */\nexport function useOnSurfaceColor(role: OnSurfaceRole = 'primary'): string {\n return getSemanticColors(useSurfaceMode())[ON_SURFACE_TOKEN[role]]\n}\n","/**\n * Custom JSX runtime for titan-design's web distribution.\n *\n * Converts className props to $$css style objects at build time,\n * eliminating the need for NativeWind's runtime interopComponents\n * Map lookup. RNW's styleq recognizes $$css objects and applies\n * their values as CSS class names on DOM elements.\n *\n * This file is NOT used by source builds (specimen, storybook,\n * native Metro). It is only inlined into the dist by tsup via\n * an esbuild onResolve plugin.\n */\nimport { jsx as reactJsx, jsxs as reactJsxs, Fragment } from 'react/jsx-runtime'\nimport type { StyleProp } from 'react-native'\n\ntype JsxFn = typeof reactJsx\n\nfunction wrapJsx(fn: JsxFn): JsxFn {\n return function (type, props: Record<string, any>, ...rest) {\n if (props && typeof props.className === 'string' && props.className) {\n const cn = props.className\n const cssStyle = { $$css: true, [cn]: cn } as unknown as StyleProp<any>\n const existing = props.style\n props = {\n ...props,\n style: existing ? [cssStyle, existing] : cssStyle,\n }\n delete props.className\n }\n return fn(type, props, ...rest)\n } as JsxFn\n}\n\nconst jsx = wrapJsx(reactJsx)\nconst jsxs = wrapJsx(reactJsxs)\n\nexport { jsx, jsxs, Fragment }\n","// Cross-platform theme provider (TD native-theming).\n//\n// Registers titan's semantic color tokens as runtime CSS variables via\n// nativewind's `vars()` so that className color tokens (`text-text-secondary`,\n// `bg-surface-raised`, `border-hairline`, …) resolve on NATIVE React Native — the\n// native equivalent of the `:root {}` block `global.css` provides on web.\n//\n// Why this exists: titan's Workout organisms reference semantic colors as CSS\n// variables. On web (the dashboard, react-native-web) those come from\n// `global.css`. On native (the mobile app) nothing defined them, so any titan\n// component using a `--color-*` token rendered with an unresolved (black) color.\n// Wrap the mobile app root in `<ThemeProvider>` and the tokens resolve on-device.\n//\n// The var maps are the SAME canonical `darkThemeCSSVars` / `lightThemeCSSVars`\n// that generate `global.css`, so native and web resolve to identical values.\n//\n// It also seeds the on-surface colour context (`<Surface>`'s mode), so titan's\n// JS-resolved on-surface colours track the same theme as the className tokens.\nimport { vars, useColorScheme } from 'nativewind'\nimport { View, type ViewProps } from 'react-native'\nimport { SurfaceContext } from '../components/ui/surface/SurfaceContext'\nimport { darkThemeCSSVars, lightThemeCSSVars } from './config'\n\n/** `'system'` follows nativewind's `useColorScheme()` (mobile light/dark flip). */\nexport type ThemeProviderMode = 'dark' | 'light' | 'system'\n\n// Precomputed once — `vars()` is pure, so the same style object is reused across\n// renders. Native == web because these are the maps `tokens-css` emits.\nconst MODE_VARS = {\n dark: vars(darkThemeCSSVars),\n light: vars(lightThemeCSSVars),\n}\n\nexport interface ThemeProviderProps extends ViewProps {\n /**\n * Theme mode to register. `'system'` bridges nativewind's `useColorScheme()`\n * so mobile follows the OS light/dark flip; `'dark'`/`'light'` pin it. Mobile\n * is dark-only today, so this defaults to `dark`.\n */\n mode?: ThemeProviderMode\n}\n\n/**\n * Wrap the app root so descendant titan components' `--color-*` className tokens\n * resolve on native. Fills its parent (`flex: 1`) by default; pass `style` to\n * override. On web it is harmless (the dashboard already loads `global.css`).\n */\nexport function ThemeProvider({\n mode = 'dark',\n style,\n children,\n ...props\n}: ThemeProviderProps): React.JSX.Element {\n // `'system'` → follow nativewind's applied scheme, falling back to dark when\n // no scheme is set. `useColorScheme` runs unconditionally (rules of hooks);\n // its result is only used in the `'system'` branch.\n const { colorScheme } = useColorScheme()\n const resolved = mode === 'system' ? (colorScheme ?? 'dark') : mode\n\n return (\n <SurfaceContext.Provider value={{ mode: resolved, level: 'base' }}>\n <View style={[MODE_VARS[resolved], { flex: 1 }, style]} {...props}>\n {children}\n </View>\n </SurfaceContext.Provider>\n )\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../../src/theme/tokens/primitives.ts","../../src/theme/tokens/semantic.ts","../../src/theme/config.ts","../../src/theme/materials.ts","../../src/theme/color-utils.ts","../../src/theme/lift.ts","../../src/theme/surface-planes.ts","../../src/theme/elevation.ts","../../src/theme/manifest/css-property-manifest.validate.ts","../../src/theme/resolve-color.ts","../../src/theme/gradients.ts","../../src/theme/presets/apply.ts","../../src/theme/presets/default.ts","../../src/theme/presets/audiobook.ts","../../src/components/ui/surface/SurfaceContext.ts","../../src/web-jsx/jsx-runtime.ts","../../src/theme/ThemeProvider.tsx"],"names":["c","Platform","createContext","reactJsx","vars","useColorScheme","View"],"mappings":";;;;;;;;AAeO,IAAM,eAAA,GAAkB;AAAA,EAC7B,KAAA,EAAO,SAAA;AAAA,EACP,KAAA,EAAO,SAAA;AAAA,EACP,WAAA,EAAa;AACf;AAYO,IAAM,aAAA,GAAgB;AAStB,IAAM,mBAAA,GAAsB;AAAA,EACjC,OAAA,EAAS,SAAA;AAAA,EACT,WAAA,EAAa,SAAA;AAAA,EACb,OAAA,EAAS,SAAA;AAAA,EACT,WAAA,EAAa,SAAA;AAAA,EACb,YAAA,EAAc;AAChB;AAMO,IAAM,YAAA,GAAe;AAAA;AAAA,EAE1B,gBAAA,EAAkB,SAAA;AAAA;AAAA,EAElB,kBAAA,EAAoB,SAAA;AAAA;AAAA,EAEpB,mBAAA,EAAqB,SAAA;AAAA;AAAA,EAErB,YAAA,EAAc,SAAA;AAAA;AAAA;AAAA,EAGd,eAAA,EAAiB;AACnB;AAiCO,IAAM,QAAA,GAAW;AAAA,EACtB,EAAA,EAAI,SAAA;AAAA;AAAA,EACJ,GAAA,EAAK,SAAA;AAAA;AAAA,EACL,GAAA,EAAK,SAAA;AAAA;AAAA,EACL,GAAA,EAAK,SAAA;AAAA;AAAA,EACL,GAAA,EAAK,SAAA;AAAA;AAAA,EACL,GAAA,EAAK,SAAA;AAAA;AAAA,EACL,GAAA,EAAK,SAAA;AAAA;AAAA,EACL,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A,QACN,GAAG,KAAA;AAAA,QACH,KAAA,EAAO,QAAA,GAAW,CAAC,QAAA,EAAU,QAAQ,CAAA,GAAI;AAAA,OAC3C;AACA,MAAA,OAAO,KAAA,CAAM,SAAA;AAAA,IACf;AACA,IAAA,OAAO,EAAA,CAAG,IAAA,EAAM,KAAA,EAAO,GAAG,IAAI,CAAA;AAAA,EAChC,CAAA;AACF;AAEA,IAAM,GAAA,GAAM,QAAQC,cAAQ,CAAA;;;ACL5B,IAAM,SAAA,GAAY;AAAA,EAChB,IAAA,EAAMC,gBAAK,gBAAgB,CAAA;AAAA,EAC3B,KAAA,EAAOA,gBAAK,iBAAiB;AAC/B,CAAA;AAgBO,SAAS,aAAA,CAAc;AAAA,EAC5B,IAAA,GAAO,MAAA;AAAA,EACP,KAAA;AAAA,EACA,QAAA;AAAA,EACA,GAAG;AACL,CAAA,EAA0C;AAIxC,EAAA,MAAM,EAAE,WAAA,EAAY,GAAIC,yBAAA,EAAe;AACvC,EAAA,MAAM,QAAA,GAAW,IAAA,KAAS,QAAA,GAAY,WAAA,IAAe,MAAA,GAAU,IAAA;AAE/D,EAAA,uBACE,GAAA,CAAC,cAAA,CAAe,QAAA,EAAf,EAAwB,KAAA,EAAO,EAAE,IAAA,EAAM,QAAA,EAAU,KAAA,EAAO,MAAA,EAAO,EAC9D,QAAA,kBAAA,GAAA,CAACC,gBAAA,EAAA,EAAK,KAAA,EAAO,CAAC,SAAA,CAAU,QAAQ,CAAA,EAAG,EAAE,IAAA,EAAM,CAAA,EAAE,EAAG,KAAK,CAAA,EAAI,GAAG,KAAA,EACzD,QAAA,EACH,CAAA,EACF,CAAA;AAEJ","file":"index.js","sourcesContent":["/**\n * Primitive Design Tokens\n *\n * Raw values with no semantic meaning. These are the foundation of the design system\n * and should rarely be used directly in components. Use semantic tokens instead.\n */\n\n/**\n * Absolute colour keywords.\n *\n * This used to hold five scales — `blue`, `red`, `redVivid`, `neutral` and\n * `charcoal`. All five are gone (TD-07.14): the greys folded into `greyRamp`\n * below and the chromatics into the OKLCH `primitiveRamps`. What is left has no\n * scale because these three are not colours you tune, they are keywords.\n */\nexport const primitiveColors = {\n white: '#FFFFFF',\n black: '#000000',\n transparent: 'transparent',\n} as const\n\n/**\n * The vivid alert red: the one chromatic anchor outside the OKLCH ramps.\n *\n * It survived the TD-07.14 fold of the old `redVivid` scale only as the\n * `-rgb`, `-subtle` and glow encodings of `status-error-vivid`, while the token\n * itself was pinned to `red[600]` and collapsed onto `status-error`. Owning it\n * here means the semantic layer references a primitive instead of carrying a\n * literal. The red ramp has no step this saturated, and adding one means\n * regenerating the ramp, so it stays a pin.\n */\nexport const alertRedVivid = '#FF4757' as const\n\n/**\n * Result/outcome palette anchors (VW-83): Material-style green/red/grey chosen\n * for the result-improve/-degrade/-inconclusive tokens. No `primitiveRamps` step\n * matches any of these exactly (the ramps are OKLCH-generated with a different\n * hue/chroma arc), so they are pinned by name here rather than left as raw hex\n * in semantic.ts — same pattern as {@link alertRedVivid}.\n */\nexport const resultPaletteColors = {\n improve: '#4caf50',\n improveDark: '#248a24',\n degrade: '#ef5350',\n degradeDark: '#b30000',\n inconclusive: '#9E9A97',\n} as const\n\n/**\n * One-off semantic literals (VW-83) with no exact `greyRamp`/`primitiveRamps`\n * match, pinned by name instead of left as raw hex in semantic.ts.\n */\nexport const semanticPins = {\n // Cool navy-black; darker and more blue-shifted than any warm greyRamp step.\n textPrimaryLight: '#121828',\n // Cool blue-grey; outside greyRamp's warm (R>=G>=B) scale.\n textSecondaryLight: '#65748B',\n // Pure neutral grey (R=G=B); no warm greyRamp step lands on it exactly.\n backgroundBaseLight: '#EBEBEB',\n // Near-neutral grey, kept one step off backgroundBaseLight by design.\n dividerLight: '#E8E9EB',\n // Periwinkle/indigo; more purple than any primitiveRamps.blue step. Shared by\n // dark-mode text-link, border-focus and border-input-focus.\n focusIndigoDark: '#828DF8',\n} as const\n\n/**\n * Unified warm-neutral grey ramp (TD-07.14)\n *\n * The ONE achromatic scale. Regenerate with `scripts/generate-grey-ramp.mjs` —\n * preserve the generator, not just the hexes.\n *\n * The surface planes ARE steps here rather than a parallel object: `850` is\n * overlay, `975` is the bezel. That is the whole point of the ramp. `grey`,\n * `neutral`, `surfaceRampDark` and `backgroundFrameDark` all resolve into it,\n * which is why every plane step below is byte-identical to the value that\n * shipped in v0.10.0 — the surfaces do not move, only their names.\n *\n * TWO THINGS ABOUT THE NUMBERING, both deliberate and both previously re-derived\n * from scratch more than once because they were never written down:\n *\n * 1. `975` sits BELOW the standard grid. `canonL` — the median L* of the seven\n * chromatic `primitiveRamps` at each step — ends at L*10.3, which is step\n * `950`. The bezel is L*3.8, darker than the grid's last rung, so there is\n * simply no step number left for it and `975` extends past the end.\n * 2. `850`/`875` are quarter-steps because overlay/raised/elevated are only\n * ~2.7 L* apart and all three collide on `900` at normal resolution. `800`\n * is a generated bridge between `700` (L*37.9) and overlay (L*22.7) so the\n * spacing stays even across the join.\n *\n * There is no `inset`. It was retired, not renamed: at ΔE 1.10 from `975` it was\n * an imperceptible duplicate of the frame, which is exactly why `<Surface pressed>`\n * (surface − 1) kept collapsing into it. `975` is the floor.\n *\n * Spec, generator and the rejected v1/v2 cuts:\n * sources/design/foundations/warm-grey-ramp/\n */\nexport const greyRamp = {\n 50: '#F9F6F3', // L*97.0 W6\n 100: '#EDEAE7', // L*92.8 W6\n 200: '#D4D1CE', // L*84.0 W6 — warm silver\n 300: '#BDBAB7', // L*75.7 W6\n 400: '#A29F9D', // L*65.7 W5\n 500: '#888684', // L*56.0 W4\n 600: '#72716F', // L*47.7 W3\n 700: '#5A5958', // L*37.9 W2\n 800: '#424140', // L*27.6 W2 — generated bridge\n 850: '#373635', // L*22.7 W2 — surface overlay\n 875: '#31302F', // L*19.9 W2 — surface raised\n 900: '#2C2A28', // L*17.2 W4 — surface elevated\n 925: '#252321', // L*13.9 W4 — surface base\n 950: '#1C1916', // L*9.0 W6 — background base / shell\n 975: '#100D0A', // L*3.8 W6 — background frame / bezel\n} as const\n\n/**\n * The surface planes, as ramp steps — the mapping `<Surface level>` resolves through.\n *\n * Ordered darkest -> lightest, which is the order `pressedLevel()` walks.\n */\nexport const SURFACE_PLANE_STEPS = {\n frame: 975,\n background: 950,\n base: 925,\n elevated: 900,\n raised: 875,\n overlay: 850,\n} as const\n\n/**\n * Derived tonal ramps (TD-05.09 color foundations)\n *\n * Seven OKLCH-generated hue ramps, 11 perceptual lightness steps each (50 -> 950).\n * Built with hue-torsion + a chroma arc, anchored through existing brand/semantic\n * hexes. `pin` marks the step each ramp flows through its anchor.\n * This is the single source of truth for chromatic hexes — the categorical palette\n * below references these steps rather than duplicating values.\n * See sources/design/foundations.\n */\nexport const primitiveRamps = {\n red: {\n 50: '#FFF4F4',\n 100: '#FFE3E5',\n 200: '#FFC2C5',\n 300: '#FF9A9D',\n 400: '#F77175',\n 500: '#E05254',\n 600: '#D14343', // pin\n 700: '#A4221C',\n 800: '#7E1002',\n 900: '#5A0900',\n 950: '#3D0400',\n },\n orange: {\n 50: '#FFF5ED',\n 100: '#FFE6D4',\n 200: '#FFC7A2',\n 300: '#FFA063',\n 400: '#FF7900', // pin\n 500: '#DA5F00',\n 600: '#B94A00',\n 700: '#983804',\n 800: '#6F290F',\n 900: '#4E1C0C',\n 950: '#331107',\n },\n amber: {\n 50: '#FFF7DD',\n 100: '#FFEAA9',\n 200: '#FFD352',\n 300: '#F9B415', // pin\n 400: '#E08C00',\n 500: '#C27400',\n 600: '#A45E00',\n 700: '#814D14',\n 800: '#5B3A1A',\n 900: '#442503',\n 950: '#301500',\n },\n green: {\n 50: '#E3FFEE',\n 100: '#B5FFD2',\n 200: '#58F69E',\n 300: '#2ED573', // pin\n 400: '#21C05D',\n 500: '#22A444',\n 600: '#298732',\n 700: '#2B6B25',\n 800: '#264D1C',\n 900: '#1B3515',\n 950: '#11220D',\n },\n cyan: {\n 50: '#E6FBFF',\n 100: '#C2F6FF',\n 200: '#62EAFF',\n 300: '#22D3EE', // pin\n 400: '#01B5D1',\n 500: '#2697B7',\n 600: '#307B9B',\n 700: '#2A617F',\n 800: '#22465F',\n 900: '#0B3149',\n 950: '#001F36',\n },\n blue: {\n 50: '#EFF8FF',\n 100: '#D9EFFF',\n 200: '#ACDBFF',\n 300: '#78C2FF',\n 400: '#3CA8FF',\n 500: '#2196F3', // pin\n 600: '#1072CB',\n 700: '#135AA8',\n 800: '#14407E',\n 900: '#112C5A',\n 950: '#091B3C',\n },\n magenta: {\n 50: '#FFF3F9',\n 100: '#FFE2F1',\n 200: '#FFBDE2',\n 300: '#FF8FD5',\n 400: '#ED69C3',\n 500: '#D548AF',\n 600: '#BA2996',\n 700: '#9C0D7A', // pin\n 800: '#77005A',\n 900: '#56003F',\n 950: '#3B0029',\n },\n} as const\n\n/**\n * Categorical (qualitative) palette — an ordered, CVD-safe series expressed as\n * references into {@link primitiveRamps} (one source of truth; the palette moves\n * with the ramps).\n *\n * Design: a single canonical hue order (blue, magenta, red, orange, green, cyan,\n * amber), with steps chosen vivid-midtone-first and fanned lighter/darker as the\n * series grows to preserve separation. The sequence is nested-stable — a chart\n * with N series uses the first N colors, and the series index is stable as N\n * changes. Colorblind-safe worst-case deuteranopia/protanopia floor 8 holds\n * through {@link CATEGORICAL_CVD_SAFE_MAX} colors; the 7th is an extended color\n * that should be paired with a legend or other secondary encoding.\n *\n * Two variants: `default` (vivid, sits on neutral/light surfaces, legible under\n * black text) and `dark` (deeper shades legible under white text on a fill). A\n * separate \"light\" variant was dropped — the vivid `default` picks already clear\n * black-text contrast, so it doubles as the light-context palette.\n */\nexport const categoricalPalette = {\n default: [\n primitiveRamps.blue[500],\n primitiveRamps.magenta[500],\n primitiveRamps.red[500],\n primitiveRamps.orange[400],\n primitiveRamps.green[300],\n primitiveRamps.cyan[300],\n primitiveRamps.amber[600], // extended (7th) — pair with a legend\n ],\n dark: [\n primitiveRamps.blue[600],\n primitiveRamps.magenta[600],\n primitiveRamps.red[500],\n primitiveRamps.orange[600],\n primitiveRamps.green[800],\n primitiveRamps.cyan[800],\n primitiveRamps.amber[500], // extended (7th) — pair with a legend\n ],\n} as const\n\n/** Largest series count that holds the CVD floor without a legend. */\nexport const CATEGORICAL_CVD_SAFE_MAX = 6\n\n/**\n * Categorical palette variant.\n * - `default` : vivid; neutral/light surfaces, legible under black text\n * - `dark` : deeper shades, legible under white text on a filled swatch\n */\nexport type CategoricalVariant = keyof typeof categoricalPalette\n\n/**\n * Get a color from the ordered categorical palette by series index.\n * The palette is nested-stable, so the color for a given index does not change\n * with the total series count; `index` simply wraps past the end.\n *\n * @param index - 0-based series index (wraps past the end)\n * @param variant - `default` (black-text / light surfaces) or `dark` (white text)\n * @returns The hex color string\n */\nexport function getCategoricalColor(\n index: number,\n variant: CategoricalVariant = 'default'\n): string {\n const palette = categoricalPalette[variant]\n index = Math.max(0, Math.floor(index))\n return palette[index % palette.length]\n}\n\n/**\n * Diverging status scale (BodyMap training-status: under → optimal → over) as\n * references into {@link primitiveRamps}. A true diverging shape — `optimal` is\n * the lightest center, the extremes go darker — so the signal reads in lightness\n * (colorblind-robust; worst-case deut/protanopia min ΔE ~10.9) and the direction\n * reads in the blue↔red axis (the CVD-safe hue pair).\n *\n * Tuned so every stop is dark enough for the fill yet light enough that BLACK\n * text clears 4.5:1 on all five — no per-cell white/black flipping. The value\n * valley is symmetric: the two mid-arms (maintenance / approaching) sit at equal\n * lightness (both ~0.53 relative luminance), the ends darker.\n */\nexport const divergingScale = [\n primitiveRamps.blue[500], // under\n primitiveRamps.cyan[300], // maintenance\n primitiveRamps.green[200], // optimal (light center)\n primitiveRamps.amber[300], // approaching\n primitiveRamps.red[600], // over\n] as const\n\n/**\n * Sequential \"effort\" scale (low → high intensity: green → yellow → orange → red)\n * as references into {@link primitiveRamps}. A 6-stop ordinal palette; the\n * velocity/RPE strip sub-samples it. Every adjacent pair clears the CVD floor\n * (min deut/protan ΔE ≥ 4.5), and within that the hue walk is kept smooth —\n * the amber-200 → amber-300 → orange-400 run steps the yellow→orange transition\n * gradually rather than lurching. Order encodes magnitude, so it tolerates the\n * green↔red CVD pair. Stops 0–3 take black text; the dark reds take white.\n */\nexport const sequentialEffort = [\n primitiveRamps.green[300],\n primitiveRamps.amber[200],\n primitiveRamps.amber[300],\n primitiveRamps.orange[400],\n primitiveRamps.red[600],\n primitiveRamps.red[700],\n] as const\n\n/**\n * Best-contrast text color (black or white) for a solid fill — for labels sitting\n * on categorical/diverging/effort swatches. Uses the WCAG relative-luminance ratio.\n */\nexport function bestTextColor(hex: string): '#000000' | '#FFFFFF' {\n const [r, g, b] = [0, 2, 4].map((i) => {\n const c = parseInt(hex.replace('#', '').slice(i, i + 2), 16) / 255\n return c >= 0.04045 ? ((c + 0.055) / 1.055) ** 2.4 : c / 12.92\n })\n const l = 0.2126 * r + 0.7152 * g + 0.0722 * b\n return (l + 0.05) / 0.05 >= 1.05 / (l + 0.05) ? '#000000' : '#FFFFFF'\n}\n\n/**\n * Discrete rainbow palette for data visualization\n * Based on Paul Tol's color schemes: https://personal.sron.nl/~pault/#fig:scheme_rainbow_discrete\n */\nexport const discreteRainbow = [\n '#E8ECFB',\n '#D9CCE3',\n '#D1BBD7',\n '#CAACCB',\n '#BA8DB4',\n '#AE76A3',\n '#AA6F9E',\n '#994F88',\n '#882E72',\n '#1965B0',\n '#437DBF',\n '#5289C7',\n '#6195CF',\n '#7BAFDE',\n '#4EB265',\n '#90C987',\n '#CAE0AB',\n '#F7F056',\n '#F7CB45',\n '#F6C141',\n '#F4A736',\n '#F1932D',\n '#EE8026',\n '#E8601C',\n '#E65518',\n '#DC050C',\n '#A5170E',\n '#72190E',\n '#42150A',\n] as const\n\n/**\n * Palette indices for discrete rainbow colors at different palette sizes.\n * For a given palette size (index + 1), returns the indices of colors to use.\n */\nconst discreteRainbowPalettes: number[][] = [\n [10],\n [10, 26],\n [10, 18, 26],\n [10, 15, 18, 26],\n [10, 14, 15, 18, 26],\n [10, 14, 15, 17, 18, 26],\n [9, 10, 14, 15, 17, 18, 26],\n [9, 10, 14, 15, 17, 18, 23, 26],\n [9, 10, 14, 15, 17, 18, 23, 26, 28],\n [9, 10, 14, 15, 17, 18, 21, 24, 26, 28],\n [9, 10, 12, 14, 15, 17, 18, 21, 24, 26, 28],\n [3, 6, 9, 10, 12, 14, 15, 17, 18, 21, 24, 26],\n [3, 6, 9, 10, 12, 14, 15, 16, 17, 18, 21, 24, 26],\n [3, 6, 9, 10, 12, 14, 15, 16, 17, 18, 20, 22, 24, 26],\n [3, 6, 9, 10, 12, 14, 15, 16, 17, 18, 20, 22, 24, 26, 28],\n [3, 5, 7, 9, 10, 12, 14, 15, 16, 17, 18, 20, 22, 24, 26, 28],\n [3, 5, 7, 8, 9, 10, 12, 14, 15, 16, 17, 18, 20, 22, 24, 26, 28],\n [3, 5, 7, 8, 9, 10, 12, 14, 15, 16, 17, 18, 20, 22, 24, 26, 27, 28],\n [2, 4, 5, 7, 8, 9, 10, 12, 14, 15, 16, 17, 18, 20, 22, 24, 26, 27, 28],\n [2, 4, 5, 7, 8, 9, 10, 11, 13, 14, 15, 16, 17, 18, 20, 22, 24, 26, 27, 28],\n [2, 4, 5, 7, 8, 9, 10, 11, 13, 14, 15, 16, 17, 18, 19, 21, 23, 25, 26, 27, 28],\n [2, 4, 5, 7, 8, 9, 10, 11, 13, 14, 15, 16, 17, 18, 19, 21, 23, 25, 26, 27, 28, 29],\n [1, 2, 4, 5, 7, 8, 9, 10, 11, 13, 14, 15, 16, 17, 18, 19, 21, 23, 25, 26, 27, 28, 29],\n]\n\n/**\n * Get a color from the discrete rainbow palette for a given index and palette size.\n * Colors are optimized for visual distinction at each palette size.\n *\n * @param index - The index of the color in the series (0-based)\n * @param size - The total number of colors needed (1-23)\n * @returns The hex color string\n */\nexport function getDiscreteRainbowColor(index: number, size: number): string {\n index = Math.max(0, index)\n size = Math.min(Math.max(1, size), discreteRainbowPalettes.length)\n\n const palette = discreteRainbowPalettes[size - 1]\n if (index >= palette.length) index = index % palette.length\n\n return discreteRainbow[palette[index] - 1]\n}\n\nexport const primitiveTypography = {\n fontFamilies: {\n sans: [\n 'Inter',\n '-apple-system',\n 'BlinkMacSystemFont',\n 'Segoe UI',\n 'Helvetica',\n 'Arial',\n 'sans-serif',\n ],\n body: ['Nunito Sans', 'sans-serif'],\n heading: ['Space Grotesk', 'sans-serif'],\n mono: [\n 'SF Mono',\n 'Monaco',\n 'Inconsolata',\n 'Fira Mono',\n 'Droid Sans Mono',\n 'Source Code Pro',\n 'monospace',\n ],\n },\n fontSizes: {\n '2xs': '0.625rem', // 10px\n xs: '0.75rem', // 12px\n sm: '0.875rem', // 14px\n base: '1rem', // 16px\n lg: '1.125rem', // 18px\n xl: '1.5rem', // 24px\n '2xl': '2rem', // 32px\n '3xl': '2.25rem', // 36px\n '4xl': '3rem', // 48px\n '5xl': '3.5rem', // 56px\n },\n fontWeights: {\n normal: 400,\n medium: 500,\n semibold: 600,\n bold: 700,\n },\n lineHeights: {\n none: 1,\n tight: 1.375,\n snug: 1.5,\n normal: 1.57,\n relaxed: 1.66,\n loose: 1.75,\n },\n letterSpacing: {\n tighter: '-0.05em',\n tight: '-0.025em',\n normal: '0em',\n wide: '0.025em',\n wider: '0.05em',\n widest: '0.5px',\n },\n} as const\n\nexport const primitiveSpacing = {\n 0: '0',\n px: '1px',\n 0.5: '0.125rem', // 2px\n 1: '0.25rem', // 4px\n 1.5: '0.375rem', // 6px\n 2: '0.5rem', // 8px\n 2.5: '0.625rem', // 10px\n 3: '0.75rem', // 12px\n 3.5: '0.875rem', // 14px\n 4: '1rem', // 16px\n 5: '1.25rem', // 20px\n 6: '1.5rem', // 24px\n 7: '1.75rem', // 28px\n 8: '2rem', // 32px\n 9: '2.25rem', // 36px\n 10: '2.5rem', // 40px\n 11: '2.75rem', // 44px\n 12: '3rem', // 48px\n 14: '3.5rem', // 56px\n 16: '4rem', // 64px\n 20: '5rem', // 80px\n 24: '6rem', // 96px\n 28: '7rem', // 112px\n 32: '8rem', // 128px\n} as const\n\nexport const primitiveBorderRadius = {\n none: '0',\n sm: '4px',\n DEFAULT: '8px',\n md: '8px',\n lg: '12px',\n xl: '16px',\n '2xl': '24px',\n full: '9999px',\n} as const\n\nexport const primitiveBreakpoints = {\n xs: 0,\n sm: 600,\n md: 1000,\n lg: 1200,\n xl: 1920,\n} as const\n\nexport const primitiveZIndex = {\n hide: -1,\n auto: 'auto',\n base: 0,\n docked: 10,\n dropdown: 1000,\n sticky: 1100,\n drawer: 1100,\n banner: 1200,\n appBar: 1200,\n overlay: 1300,\n modal: 1400,\n popover: 1500,\n skipLink: 1600,\n toast: 1700,\n tooltip: 1800,\n} as const\n","/**\n * Semantic Design Tokens\n *\n * Meaningful tokens following DTCG (Design Tokens Community Group) naming conventions.\n * Pattern: {category}-{intent}-{variant?}-{state?}\n *\n * Categories:\n * - brand-* : Brand colors (primary, secondary, accent)\n * - status-* : Feedback colors (success, error, warning, info)\n * - result-* : Outcome indicators (improve, degrade, inconclusive, neutral)\n * - data-* : Data visualization colors (chart series)\n * - on-* : Text on colored backgrounds\n * - surface-* : Elevated containers (NOT \"paper\")\n * - background-* : Page backgrounds\n * - text-* : Text colors\n * - border-* : Border colors\n * - interactive-* : Hover/focus/active/disabled states\n */\n\nimport {\n primitiveColors as p,\n primitiveRamps as ramp,\n greyRamp,\n discreteRainbow,\n alertRedVivid,\n resultPaletteColors,\n semanticPins,\n} from './primitives'\n\n/**\n * GREY MAPPING (TD-07.14) — how the old cool scales resolved onto `greyRamp`.\n *\n * Every grey below came off `grey` (pure R=G=B) or `neutral` (cool, R−B\n * down to −26). They were snapped by NEAREST L*, not by matching step numbers,\n * because the two old scales were numbered incompatibly: `grey` ran\n * INVERTED and compressed (0 = #6E6E6E lightest, 900 = #101010 darkest), so\n * `grey[400]` and `greyRamp[400]` have nothing to do with each other.\n *\n * grey 200→800 300→900 400→925 500→950\n * neutral 50→50 100→100 300→200 400→400 500→600 600→700 900→950\n *\n * Surfaces move ΔE 1.9–4.8 — at or near imperceptible. The TEXT roles move\n * further (8.6–12.8), and that is the intended part of the change: they are\n * picking up the warmth the surfaces already had.\n *\n * Light gets its own column because strict L*-nearest collapsed `neutral[50]`\n * and `[100]` onto one step, flattening surface-elevated into surface-raised.\n * Light is still deferred as a design question — there is no `surfaceRampLight`.\n *\n * `border-default`, `-subtle` and `-strong` are GONE, replaced by `hairline-*`.\n * Once the planes became ramp steps, every value dark enough to read as a\n * border was also a plane's fill. Alpha composites instead of colliding.\n *\n * `text-tertiary` on dark is the one role that ignores L*-nearest; see it.\n */\n\n// Light mode semantic colors (default)\nexport const semanticColorsLight = {\n // Brand colors (brand-*)\n 'brand-primary': ramp.orange[400],\n 'brand-primary-light': ramp.orange[300],\n 'brand-primary-dark': ramp.orange[500],\n 'brand-primary-subtle': 'rgba(255, 121, 0, 0.08)',\n 'brand-primary-muted': 'rgba(255, 121, 0, 0.30)',\n 'brand-primary-strong': 'rgba(255, 121, 0, 0.50)',\n 'brand-primary-hover': ramp.orange[500],\n 'brand-primary-active': ramp.orange[600],\n\n 'brand-secondary': ramp.cyan[600],\n 'brand-secondary-light': ramp.cyan[500],\n 'brand-secondary-dark': ramp.cyan[700],\n 'brand-secondary-subtle': 'rgba(48, 123, 155, 0.08)',\n 'brand-secondary-muted': 'rgba(48, 123, 155, 0.30)',\n 'brand-secondary-strong': 'rgba(48, 123, 155, 0.50)',\n 'brand-secondary-hover': ramp.cyan[700],\n 'brand-secondary-active': ramp.cyan[800],\n\n // Text on brand backgrounds (on-*)\n 'on-brand-primary': p.white,\n 'on-brand-secondary': p.white,\n\n // Text ON a `-subtle` fill. Light mode keeps today's pairing (the base token) so\n // nothing moves here: light has the same disease mirrored — a light rung on a\n // near-white ramp[50] fill — but correcting it belongs with the light-mode pass\n // in AW-121, not this one.\n 'on-brand-primary-subtle': ramp.orange[400],\n 'on-brand-secondary-subtle': ramp.cyan[600],\n\n // Status colors (status-*)\n 'status-success': ramp.green[300],\n 'status-success-light': ramp.green[200],\n 'status-success-dark': ramp.green[600],\n 'status-success-subtle': ramp.green[50],\n 'status-success-muted': 'rgba(46, 213, 115, 0.30)',\n 'status-success-strong': 'rgba(46, 213, 115, 0.50)',\n\n // Live-session accent — its OWN role, decoupled from success so the two can diverge\n 'status-live': ramp.green[300],\n 'status-live-muted': ramp.green[500],\n\n 'status-error': ramp.red[600],\n 'status-error-light': ramp.red[500],\n 'status-error-dark': ramp.red[700],\n 'status-error-subtle': ramp.red[50],\n 'status-error-muted': 'rgba(209, 67, 67, 0.30)',\n 'status-error-strong': 'rgba(209, 67, 67, 0.50)',\n\n 'status-error-vivid': alertRedVivid, // NOT red[600], that is status-error\n 'status-error-vivid-light': ramp.red[500],\n 'status-error-vivid-dark': ramp.red[700],\n 'status-error-vivid-subtle': 'rgba(255, 71, 87, 0.12)',\n 'status-error-vivid-muted': 'rgba(255, 71, 87, 0.30)',\n 'status-error-vivid-strong': 'rgba(255, 71, 87, 0.50)',\n\n 'status-warning': ramp.amber[300],\n 'status-warning-light': ramp.amber[200],\n 'status-warning-dark': ramp.amber[500],\n 'status-warning-subtle': ramp.amber[50],\n 'status-warning-muted': 'rgba(249, 180, 21, 0.30)',\n 'status-warning-strong': 'rgba(249, 180, 21, 0.50)',\n\n 'status-info': ramp.blue[500],\n 'status-info-light': ramp.blue[300],\n 'status-info-dark': ramp.blue[600],\n 'status-info-subtle': ramp.blue[50],\n 'status-info-muted': 'rgba(33, 150, 243, 0.30)',\n 'status-info-strong': 'rgba(33, 150, 243, 0.50)',\n\n // Text ON a `-subtle` fill — see the on-brand-*-subtle note above.\n 'on-status-success-subtle': ramp.green[300],\n 'on-status-error-subtle': ramp.red[600],\n 'on-status-warning-subtle': ramp.amber[300],\n 'on-status-info-subtle': ramp.blue[500],\n\n // Text on status backgrounds (on-status-*)\n 'on-status-success': p.white,\n 'on-status-error': p.white,\n 'on-status-warning': p.white,\n 'on-status-info': p.white,\n\n // Result/outcome indicators (result-*)\n 'result-improve': resultPaletteColors.improve, // Green - positive outcome\n 'result-improve-light': 'rgba(76, 175, 80, 0.12)',\n 'result-improve-dark': resultPaletteColors.improveDark,\n 'result-degrade': resultPaletteColors.degrade, // Red - negative outcome\n 'result-degrade-light': 'rgba(239, 83, 80, 0.12)',\n 'result-degrade-dark': resultPaletteColors.degradeDark,\n 'result-inconclusive': resultPaletteColors.inconclusive, // Gray - no clear result\n 'result-inconclusive-light': 'rgba(158, 154, 151, 0.12)',\n 'result-neutral': greyRamp[600], // Neutral baseline\n\n // Text on result backgrounds (on-result-*)\n 'on-result-improve': p.white,\n 'on-result-degrade': p.white,\n 'on-result-inconclusive': p.white,\n\n // Data visualization colors (data-*)\n // First 10 colors from discrete rainbow optimized for charts\n 'data-1': discreteRainbow[9], // Blue\n 'data-2': discreteRainbow[14], // Green\n 'data-3': discreteRainbow[17], // Yellow\n 'data-4': discreteRainbow[25], // Red\n 'data-5': discreteRainbow[8], // Purple\n 'data-6': discreteRainbow[20], // Orange\n 'data-7': discreteRainbow[13], // Light Blue\n 'data-8': discreteRainbow[15], // Light Green\n 'data-9': discreteRainbow[3], // Lavender\n 'data-10': discreteRainbow[22], // Dark Orange\n\n // Text colors (text-*)\n 'text-primary': semanticPins.textPrimaryLight,\n 'text-secondary': semanticPins.textSecondaryLight,\n 'text-tertiary': greyRamp[400],\n 'text-disabled': 'rgba(55, 65, 81, 0.48)',\n 'text-inverse': p.white,\n 'text-link': ramp.blue[600],\n 'text-link-hover': ramp.blue[700],\n\n // Surface colors (surface-*) - for elevated containers\n 'surface-base': p.white,\n 'surface-elevated': greyRamp[50], // slightly off-white for elevated cards\n 'surface-raised': greyRamp[100], // light gray for raised cards\n 'surface-overlay': p.white,\n 'surface-input': greyRamp[50], // Input field background (filled variant)\n\n // Background colors (background-*)\n 'background-base': semanticPins.backgroundBaseLight,\n 'background-default': p.white,\n 'background-subtle': greyRamp[50],\n // Frame/bezel chrome — top bar + side nav shell, one step below\n // `background-base`. Placeholder pairing for light mode, which is deferred.\n 'background-frame': greyRamp[400],\n\n // Border colors (border-*)\n 'border-prominent': greyRamp[400], // high-visibility divider\n 'border-focus': ramp.blue[600],\n 'border-input': greyRamp[200], // Input field border\n 'border-input-hover': greyRamp[400], // Input field border on hover\n 'border-input-focus': ramp.blue[600], // Input field border on focus\n 'border-input-error': ramp.red[600], // Input field border on error\n\n // Alpha hairline separators (surface-independent — composite toward black on\n // light surfaces, mirroring the dark-mode white-alpha family). See §4/S-2.\n 'hairline-subtle': 'rgba(0, 0, 0, 0.06)',\n 'hairline-default': 'rgba(0, 0, 0, 0.09)',\n 'hairline-strong': 'rgba(0, 0, 0, 0.14)',\n\n // Interactive states (interactive-*)\n 'interactive-hover': 'rgba(55, 65, 81, 0.04)',\n 'interactive-focus': 'rgba(55, 65, 81, 0.12)',\n 'interactive-active': 'rgba(55, 65, 81, 0.16)',\n 'interactive-selected': 'rgba(55, 65, 81, 0.08)',\n 'interactive-disabled': 'rgba(55, 65, 81, 0.12)',\n 'interactive-disabled-text': 'rgba(55, 65, 81, 0.26)',\n\n // Divider\n divider: semanticPins.dividerLight,\n\n // Avatar default\n 'avatar-background': greyRamp[600],\n 'avatar-text': p.white,\n} as const\n\n// Dark mode semantic colors\nexport const semanticColorsDark = {\n // Brand colors stay the same in dark mode\n 'brand-primary': ramp.orange[400],\n 'brand-primary-light': ramp.orange[300],\n 'brand-primary-dark': ramp.orange[500],\n 'brand-primary-subtle': 'rgba(255, 121, 0, 0.12)',\n 'brand-primary-muted': 'rgba(255, 121, 0, 0.30)',\n 'brand-primary-strong': 'rgba(255, 121, 0, 0.50)',\n 'brand-primary-hover': ramp.orange[300],\n 'brand-primary-active': ramp.orange[200],\n\n 'brand-secondary': ramp.cyan[600],\n 'brand-secondary-light': ramp.cyan[500],\n 'brand-secondary-dark': ramp.cyan[700],\n 'brand-secondary-subtle': 'rgba(34, 211, 238, 0.12)',\n 'brand-secondary-muted': 'rgba(48, 123, 155, 0.30)',\n 'brand-secondary-strong': 'rgba(48, 123, 155, 0.50)',\n 'brand-secondary-hover': ramp.cyan[500],\n 'brand-secondary-active': ramp.cyan[400],\n\n // Text on brand backgrounds\n 'on-brand-primary': p.white,\n 'on-brand-secondary': p.white,\n\n // Text ON a `-subtle` fill. Its own role: `brand-primary` and friends are tuned to\n // carry a white label as a solid fill, which makes the two deepest of them\n // (cyan[600], red[600]) too dark to read as text on a dark plane. Levelling the\n // family at rung 300 puts every tone within OKLCH L 0.769-0.813 instead of\n // 0.550-0.813. Brand is deliberately left at its own orange[400] (operator, AW-133)\n // so the Voltras tone never drifts; it is the one tone under AA on a raised card.\n 'on-brand-primary-subtle': ramp.orange[400],\n 'on-brand-secondary-subtle': ramp.cyan[300],\n\n // Status colors\n 'status-success': ramp.green[300],\n 'status-success-light': ramp.green[200],\n 'status-success-dark': ramp.green[600],\n 'status-success-subtle': 'rgba(46, 213, 115, 0.12)',\n 'status-success-muted': 'rgba(46, 213, 115, 0.30)',\n 'status-success-strong': 'rgba(46, 213, 115, 0.50)',\n\n // Live-session accent — its OWN role, decoupled from success so the two can diverge\n 'status-live': ramp.green[300],\n 'status-live-muted': ramp.green[500],\n\n 'status-error': ramp.red[600],\n 'status-error-light': ramp.red[500],\n 'status-error-dark': ramp.red[700],\n // Alpha 0.08, not the family's 0.12: error's label is red[400], a rung darker than\n // its siblings so it reads RED rather than pink (rung 300 has only 0.121 chroma).\n // Thinning the fill buys back the contrast that extra darkness costs. See AW-133.\n 'status-error-subtle': 'rgba(247, 113, 117, 0.08)',\n 'status-error-muted': 'rgba(209, 67, 67, 0.30)',\n 'status-error-strong': 'rgba(209, 67, 67, 0.50)',\n\n 'status-error-vivid': alertRedVivid,\n 'status-error-vivid-light': ramp.red[500],\n 'status-error-vivid-dark': ramp.red[700],\n 'status-error-vivid-subtle': 'rgba(255, 71, 87, 0.12)',\n 'status-error-vivid-muted': 'rgba(255, 71, 87, 0.30)',\n 'status-error-vivid-strong': 'rgba(255, 71, 87, 0.50)',\n\n 'status-warning': ramp.amber[300],\n 'status-warning-light': ramp.amber[200],\n 'status-warning-dark': ramp.amber[500],\n 'status-warning-subtle': 'rgba(249, 180, 21, 0.12)',\n 'status-warning-muted': 'rgba(249, 180, 21, 0.30)',\n 'status-warning-strong': 'rgba(249, 180, 21, 0.50)',\n\n 'status-info': ramp.blue[500],\n 'status-info-light': ramp.blue[300],\n 'status-info-dark': ramp.blue[600],\n 'status-info-subtle': 'rgba(120, 194, 255, 0.12)',\n 'status-info-muted': 'rgba(33, 150, 243, 0.30)',\n 'status-info-strong': 'rgba(33, 150, 243, 0.50)',\n\n // Text on status backgrounds\n 'on-status-success': p.white,\n 'on-status-error': p.white,\n 'on-status-warning': p.white,\n 'on-status-info': p.white,\n\n // Text ON a `-subtle` fill — see the on-brand-*-subtle note above. Error is the\n // second deliberate exception to the rung-300 rule (operator, AW-133): red[300]\n // levelled perfectly but read PINK, because a red that light can only hold 0.121\n // chroma. red[400] carries 0.165 and reads red; its fill is thinned to compensate.\n 'on-status-success-subtle': ramp.green[300],\n 'on-status-error-subtle': ramp.red[400],\n 'on-status-warning-subtle': ramp.amber[300],\n 'on-status-info-subtle': ramp.blue[300],\n\n // Result/outcome indicators (result-*)\n 'result-improve': resultPaletteColors.improve,\n 'result-improve-light': 'rgba(76, 175, 80, 0.16)',\n 'result-improve-dark': resultPaletteColors.improveDark,\n 'result-degrade': resultPaletteColors.degrade,\n 'result-degrade-light': 'rgba(239, 83, 80, 0.16)',\n 'result-degrade-dark': resultPaletteColors.degradeDark,\n 'result-inconclusive': resultPaletteColors.inconclusive,\n 'result-inconclusive-light': 'rgba(158, 154, 151, 0.16)',\n 'result-neutral': greyRamp[400],\n\n // Text on result backgrounds\n 'on-result-improve': p.white,\n 'on-result-degrade': p.white,\n 'on-result-inconclusive': p.white,\n\n // Data visualization colors (same in dark mode for consistency)\n 'data-1': discreteRainbow[9],\n 'data-2': discreteRainbow[14],\n 'data-3': discreteRainbow[17],\n 'data-4': discreteRainbow[25],\n 'data-5': discreteRainbow[8],\n 'data-6': discreteRainbow[20],\n 'data-7': discreteRainbow[13],\n 'data-8': discreteRainbow[15],\n 'data-9': discreteRainbow[3],\n 'data-10': discreteRainbow[22],\n\n // Text colors - inverted for dark mode\n 'text-primary': greyRamp[50],\n 'text-secondary': greyRamp[400],\n // Deliberately ONE step lighter than the L*-nearest match (`greyRamp[600]`).\n // The colour this replaced failed WCAG large-text outright on the three\n // lightest planes — 2.96 / 2.72 / 2.49 against elevated / raised / overlay —\n // and `600` carried that failure forward almost exactly (2.93 / 2.70 / 2.47).\n // `500` clears 3:1 everywhere (3.32–5.34). Contrast beats colour fidelity for\n // text roles; borders and surfaces still use strict L*-nearest. See\n // semantic-contrast.test.ts, which fails if this is moved back down.\n 'text-tertiary': greyRamp[500],\n 'text-disabled': 'rgba(255, 255, 255, 0.38)',\n 'text-inverse': greyRamp[950],\n 'text-link': semanticPins.focusIndigoDark,\n 'text-link-hover': ramp.blue[400],\n\n // Surface colors - dark backgrounds — warm-tapered DERIVED ramp (TD-surface-tokens,\n // S-1, re-spaced S-3). Shipped verbatim from `deriveSurfaceRamp()` — see\n // `surfaceRampDark` in primitives.ts for the full derivation note. `surface-overlay`\n // and `surface-elevated` are distinct (were both #191919 pre-S-1); `surface-input`\n // tracks one plane above `surface-base`, same relative position as before the remap.\n // `background-base` backs `Surface level=\"background\"` (SurfaceContext.SURFACE_LEVEL_TOKEN),\n // so it takes the ramp's shell role. The deepest plane is `background-frame`,\n // which is also the `SurfaceLevel` floor a pressed surface clamps at.\n 'surface-base': greyRamp[925], // main surface (#252321, L*13.9)\n 'surface-elevated': greyRamp[900], // elevated surface (#2C2A28, L*17.2 — nav/rail)\n 'surface-raised': greyRamp[875], // raised surface (#31302F, L*19.9 — cards)\n 'surface-overlay': greyRamp[850], // overlay surface (#373635, L*22.7 — hero/popover)\n 'surface-input': greyRamp[900], // input surface (#2C2A28 — one plane above base)\n\n // Background colors — same ramp, the frame/shell end of it.\n 'background-base': greyRamp[950], // shell (#1C1916, L*9 — Surface level=\"background\")\n 'background-default': greyRamp[925], // main background (#252321, L*13.9 — matches surface-base)\n 'background-subtle': greyRamp[900], // subtle background (#2C2A28, L*17.2 — matches surface-elevated)\n // Frame/bezel chrome — the top bar + side nav shell, one step BELOW\n // `background-base`. It used to be described as sitting OUTSIDE the ramp; it\n // is simply the ramp's last step now, and the floor `<Surface pressed>` clamps at.\n 'background-frame': greyRamp[975], // frame / bezel (#100D0A, L*3.8)\n\n // Border colors — solid dark borders are RETIRED (TD-07.14). Not a preference — a structural\n // consequence of one ramp. Every step from 850 to 975 is now a surface plane,\n // so a solid border dark enough to read as a border necessarily equals some\n // plane's fill, which is exactly the collision `surface.contract.test.ts` R2\n // forbids. The only non-plane steps left in that band are 800 and 700, and\n // borders there jump from L*~10-25 to L*~28-38 — a restyle, not a migration.\n //\n // So separation moves to the alpha hairlines, which dark mode already called\n // \"the primary separation cue\". Being alpha, they composite against whatever\n // plane they land on and cannot collide with any of them — the problem stops\n // existing rather than being re-solved per plane. The three solid tokens were\n // deleted outright; consumers point at the `hairline-*` family below.\n //\n // `border-prominent` stays SOLID: it is the one border meant to be seen\n // outright (4 call sites, high-visibility dividers), and grey-800 is not a\n // plane, so it keeps its job without collision.\n 'border-prominent': greyRamp[800], // high-visibility divider\n 'border-focus': semanticPins.focusIndigoDark,\n 'border-input': greyRamp[700],\n 'border-input-hover': greyRamp[600],\n 'border-input-focus': semanticPins.focusIndigoDark,\n 'border-input-error': ramp.red[500],\n\n // Alpha hairline separators — the primary separation cue (§4/S-2). Self-\n // normalizing: composites toward white by ~the same amount on ANY plane, so\n // one family works at every elevation instead of per-surface border tokens.\n // Shadows are demoted to floating-overlay use only (not shipped as a fill\n // separator here — see elevation.ts, follow-up S-4).\n //\n // RETUNED on the wall (VW-99, S-6). The original .06/.09/.14 were set at a\n // desk. On the panel at ~3 m `subtle` rendered but was indiscernible, and\n // `default` — the load-bearing one, with no solid-border fallback since\n // TD-07.14 — went weak on the lightest plane. `strong` read cleanly with room\n // to spare, which is what made raising the whole family viable.\n //\n // Each tier steps up onto the next MEASURED-GOOD rung rather than an\n // interpolated one: the new `subtle` is the old `default`, and the new\n // `default` is the old `strong` — a value just confirmed legible on all four\n // planes. Spacing goes 1 : 1.56 : 2.33, against the original 1 : 1.5 : 2.33.\n //\n // RUN 2 (VW-99): all three tiers were seen on all four planes — the retune\n // worked — but `subtle` was still \"a bit hard to read\", so the whole family\n // took a further +.01. That is a comfort margin on a passing row, not a fix\n // for a failing one, which is why it is a flat offset: the 1 : 1.56 : 2.33\n // spacing that the run validated is preserved rather than re-derived.\n //\n // Keep these to TWO decimals. react-native-web quantises alpha to 8 bits, so\n // a 3-decimal value silently rounds on the way to the DOM (.135 renders as\n // .13) — the token would say one thing and paint another.\n //\n // DARK ONLY. The light family above composites toward BLACK on light planes,\n // which this run says nothing about — do not mirror these numbers into it\n // without its own verification.\n 'hairline-subtle': 'rgba(255, 255, 255, 0.10)',\n 'hairline-default': 'rgba(255, 255, 255, 0.15)',\n 'hairline-strong': 'rgba(255, 255, 255, 0.22)',\n\n // Interactive states\n 'interactive-hover': 'rgba(255, 255, 255, 0.04)',\n 'interactive-focus': 'rgba(255, 255, 255, 0.12)',\n 'interactive-active': 'rgba(255, 255, 255, 0.16)',\n 'interactive-selected': 'rgba(255, 255, 255, 0.08)',\n 'interactive-disabled': 'rgba(255, 255, 255, 0.12)',\n 'interactive-disabled-text': 'rgba(255, 255, 255, 0.26)',\n\n // Divider\n divider: 'rgba(255, 255, 255, 0.09)',\n\n // Avatar default\n 'avatar-background': greyRamp[700],\n 'avatar-text': p.white,\n} as const\n\n// Typography tokens matching existing app\nexport const semanticTypography = {\n // Headings (Space Grotesk)\n h1: {\n fontFamily: 'heading',\n fontSize: '3.5rem',\n fontWeight: 700,\n lineHeight: 1.375,\n },\n h2: {\n fontFamily: 'heading',\n fontSize: '3rem',\n fontWeight: 700,\n lineHeight: 1.375,\n },\n h3: {\n fontFamily: 'heading',\n fontSize: '2.25rem',\n fontWeight: 700,\n lineHeight: 1.375,\n },\n h4: {\n fontFamily: 'heading',\n fontSize: '2rem',\n fontWeight: 700,\n lineHeight: 1.375,\n },\n h5: {\n fontFamily: 'heading',\n fontSize: '1.5rem',\n fontWeight: 600,\n lineHeight: 1.375,\n },\n h6: {\n fontFamily: 'heading',\n fontSize: '1.125rem',\n fontWeight: 600,\n lineHeight: 1.375,\n },\n\n // Body text (Nunito Sans)\n body1: {\n fontFamily: 'body',\n fontSize: '1rem',\n fontWeight: 400,\n lineHeight: 1.5,\n },\n body2: {\n fontFamily: 'body',\n fontSize: '0.875rem',\n fontWeight: 400,\n lineHeight: 1.57,\n },\n subtitle1: {\n fontFamily: 'body',\n fontSize: '1rem',\n fontWeight: 500,\n lineHeight: 1.75,\n },\n subtitle2: {\n fontFamily: 'body',\n fontSize: '0.875rem',\n fontWeight: 500,\n lineHeight: 1.57,\n },\n caption: {\n fontFamily: 'body',\n fontSize: '0.75rem',\n fontWeight: 400,\n lineHeight: 1.66,\n },\n overline: {\n fontFamily: 'body',\n fontSize: '0.75rem',\n fontWeight: 600,\n lineHeight: 2.5,\n letterSpacing: '0.5px',\n textTransform: 'uppercase' as const,\n },\n button: {\n fontFamily: 'sans',\n fontSize: '0.875rem',\n fontWeight: 600,\n lineHeight: 1.75,\n },\n} as const\n\n// Button size tokens\nexport const buttonSizes = {\n sm: {\n paddingX: '16px',\n paddingY: '6px',\n fontSize: '0.875rem',\n },\n md: {\n paddingX: '20px',\n paddingY: '8px',\n fontSize: '0.875rem',\n },\n lg: {\n paddingX: '24px',\n paddingY: '11px',\n fontSize: '1rem',\n },\n} as const\n\n// Export type for theme mode\nexport type ThemeMode = 'light' | 'dark'\n\n// Helper to get semantic colors based on mode\nexport function getSemanticColors(mode: ThemeMode) {\n return mode === 'dark' ? semanticColorsDark : semanticColorsLight\n}\n","/**\n * Theme Configuration\n *\n * Maps semantic tokens to CSS custom properties for runtime theming.\n * Dark mode is the default theme.\n */\n\nimport { semanticColorsLight, semanticColorsDark, type ThemeMode } from './tokens/semantic'\n\n// Theme-independent custom properties: identical in light and dark in\n// global.css (RGB glow decompositions, font families, animation tokens). Kept\n// as literals since they are not part of the semantic COLOR maps, and spread\n// into both theme maps so codegen mirrors global.css exactly.\nconst themeIndependentCSSVars = {\n // RGB decomposed values for glow shadows\n '--color-brand-primary-rgb': '255, 121, 0',\n '--color-brand-secondary-rgb': '48, 123, 155',\n '--color-status-success-rgb': '46, 213, 115',\n '--color-status-error-rgb': '209, 67, 67',\n '--color-status-error-vivid-rgb': '255, 71, 87',\n '--color-status-warning-rgb': '249, 180, 21',\n '--color-status-info-rgb': '33, 150, 243',\n '--color-background-base-rgb': '16, 16, 16',\n\n // Font families\n '--font-family-sans': \"'Inter'\",\n '--font-family-body': \"'Nunito Sans'\",\n '--font-family-heading': \"'Space Grotesk'\",\n '--font-family-mono': \"'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace\",\n\n // Animation tokens\n '--ease-out': 'cubic-bezier(0.22, 1, 0.36, 1)',\n '--ease-in-out': 'cubic-bezier(0.65, 0, 0.35, 1)',\n '--ease-spring': 'cubic-bezier(0.34, 1.56, 0.64, 1)',\n '--duration-fast': '150ms',\n '--duration-normal': '250ms',\n '--duration-slow': '400ms',\n} as const\n\n// CSS custom properties for light mode\nexport const lightThemeCSSVars = {\n '--color-brand-primary': semanticColorsLight['brand-primary'],\n '--color-brand-primary-light': semanticColorsLight['brand-primary-light'],\n '--color-brand-primary-dark': semanticColorsLight['brand-primary-dark'],\n '--color-brand-primary-subtle': semanticColorsLight['brand-primary-subtle'],\n '--color-brand-primary-muted': semanticColorsLight['brand-primary-muted'],\n '--color-brand-primary-strong': semanticColorsLight['brand-primary-strong'],\n '--color-brand-secondary': semanticColorsLight['brand-secondary'],\n '--color-brand-secondary-light': semanticColorsLight['brand-secondary-light'],\n '--color-brand-secondary-dark': semanticColorsLight['brand-secondary-dark'],\n '--color-brand-secondary-subtle': semanticColorsLight['brand-secondary-subtle'],\n '--color-brand-secondary-muted': semanticColorsLight['brand-secondary-muted'],\n '--color-brand-secondary-strong': semanticColorsLight['brand-secondary-strong'],\n\n '--color-on-brand-primary': semanticColorsLight['on-brand-primary'],\n '--color-on-brand-secondary': semanticColorsLight['on-brand-secondary'],\n '--color-on-brand-primary-subtle': semanticColorsLight['on-brand-primary-subtle'],\n '--color-on-brand-secondary-subtle': semanticColorsLight['on-brand-secondary-subtle'],\n\n '--color-status-success': semanticColorsLight['status-success'],\n '--color-status-success-subtle': semanticColorsLight['status-success-subtle'],\n '--color-status-success-muted': semanticColorsLight['status-success-muted'],\n '--color-status-success-strong': semanticColorsLight['status-success-strong'],\n '--color-status-live': semanticColorsLight['status-live'],\n '--color-status-live-muted': semanticColorsLight['status-live-muted'],\n '--color-status-error': semanticColorsLight['status-error'],\n '--color-status-error-subtle': semanticColorsLight['status-error-subtle'],\n '--color-status-error-muted': semanticColorsLight['status-error-muted'],\n '--color-status-error-strong': semanticColorsLight['status-error-strong'],\n '--color-status-warning': semanticColorsLight['status-warning'],\n '--color-status-warning-subtle': semanticColorsLight['status-warning-subtle'],\n '--color-status-warning-muted': semanticColorsLight['status-warning-muted'],\n '--color-status-warning-strong': semanticColorsLight['status-warning-strong'],\n '--color-status-info': semanticColorsLight['status-info'],\n '--color-status-info-subtle': semanticColorsLight['status-info-subtle'],\n '--color-status-info-muted': semanticColorsLight['status-info-muted'],\n '--color-status-info-strong': semanticColorsLight['status-info-strong'],\n\n '--color-status-error-vivid': semanticColorsLight['status-error-vivid'],\n '--color-status-error-vivid-light': semanticColorsLight['status-error-vivid-light'],\n '--color-status-error-vivid-dark': semanticColorsLight['status-error-vivid-dark'],\n '--color-status-error-vivid-subtle': semanticColorsLight['status-error-vivid-subtle'],\n '--color-status-error-vivid-muted': semanticColorsLight['status-error-vivid-muted'],\n '--color-status-error-vivid-strong': semanticColorsLight['status-error-vivid-strong'],\n\n '--color-text-primary': semanticColorsLight['text-primary'],\n '--color-text-secondary': semanticColorsLight['text-secondary'],\n '--color-text-tertiary': semanticColorsLight['text-tertiary'],\n '--color-text-disabled': semanticColorsLight['text-disabled'],\n '--color-text-inverse': semanticColorsLight['text-inverse'],\n '--color-text-link': semanticColorsLight['text-link'],\n\n '--color-surface-base': semanticColorsLight['surface-base'],\n '--color-surface-elevated': semanticColorsLight['surface-elevated'],\n '--color-surface-raised': semanticColorsLight['surface-raised'],\n\n '--color-background-base': semanticColorsLight['background-base'],\n '--color-background-default': semanticColorsLight['background-default'],\n '--color-background-subtle': semanticColorsLight['background-subtle'],\n '--color-background-frame': semanticColorsLight['background-frame'],\n\n '--color-border-prominent': semanticColorsLight['border-prominent'],\n '--color-border-focus': semanticColorsLight['border-focus'],\n\n '--color-interactive-hover': semanticColorsLight['interactive-hover'],\n '--color-interactive-focus': semanticColorsLight['interactive-focus'],\n '--color-interactive-active': semanticColorsLight['interactive-active'],\n '--color-interactive-selected': semanticColorsLight['interactive-selected'],\n '--color-interactive-disabled': semanticColorsLight['interactive-disabled'],\n\n '--color-divider': semanticColorsLight['divider'],\n\n '--color-brand-primary-hover': semanticColorsLight['brand-primary-hover'],\n '--color-brand-primary-active': semanticColorsLight['brand-primary-active'],\n '--color-brand-secondary-hover': semanticColorsLight['brand-secondary-hover'],\n '--color-brand-secondary-active': semanticColorsLight['brand-secondary-active'],\n\n '--color-status-success-light': semanticColorsLight['status-success-light'],\n '--color-status-success-dark': semanticColorsLight['status-success-dark'],\n '--color-status-error-light': semanticColorsLight['status-error-light'],\n '--color-status-error-dark': semanticColorsLight['status-error-dark'],\n '--color-status-warning-light': semanticColorsLight['status-warning-light'],\n '--color-status-warning-dark': semanticColorsLight['status-warning-dark'],\n '--color-status-info-light': semanticColorsLight['status-info-light'],\n '--color-status-info-dark': semanticColorsLight['status-info-dark'],\n\n '--color-on-status-success': semanticColorsLight['on-status-success'],\n '--color-on-status-error': semanticColorsLight['on-status-error'],\n '--color-on-status-warning': semanticColorsLight['on-status-warning'],\n '--color-on-status-info': semanticColorsLight['on-status-info'],\n '--color-on-status-success-subtle': semanticColorsLight['on-status-success-subtle'],\n '--color-on-status-error-subtle': semanticColorsLight['on-status-error-subtle'],\n '--color-on-status-warning-subtle': semanticColorsLight['on-status-warning-subtle'],\n '--color-on-status-info-subtle': semanticColorsLight['on-status-info-subtle'],\n\n '--color-result-improve': semanticColorsLight['result-improve'],\n '--color-result-improve-light': semanticColorsLight['result-improve-light'],\n '--color-result-improve-dark': semanticColorsLight['result-improve-dark'],\n '--color-result-degrade': semanticColorsLight['result-degrade'],\n '--color-result-degrade-light': semanticColorsLight['result-degrade-light'],\n '--color-result-degrade-dark': semanticColorsLight['result-degrade-dark'],\n '--color-result-inconclusive': semanticColorsLight['result-inconclusive'],\n '--color-result-inconclusive-light': semanticColorsLight['result-inconclusive-light'],\n '--color-result-neutral': semanticColorsLight['result-neutral'],\n\n '--color-on-result-improve': semanticColorsLight['on-result-improve'],\n '--color-on-result-degrade': semanticColorsLight['on-result-degrade'],\n '--color-on-result-inconclusive': semanticColorsLight['on-result-inconclusive'],\n\n '--color-data-1': semanticColorsLight['data-1'],\n '--color-data-2': semanticColorsLight['data-2'],\n '--color-data-3': semanticColorsLight['data-3'],\n '--color-data-4': semanticColorsLight['data-4'],\n '--color-data-5': semanticColorsLight['data-5'],\n '--color-data-6': semanticColorsLight['data-6'],\n '--color-data-7': semanticColorsLight['data-7'],\n '--color-data-8': semanticColorsLight['data-8'],\n '--color-data-9': semanticColorsLight['data-9'],\n '--color-data-10': semanticColorsLight['data-10'],\n\n '--color-text-link-hover': semanticColorsLight['text-link-hover'],\n\n '--color-surface-overlay': semanticColorsLight['surface-overlay'],\n '--color-surface-input': semanticColorsLight['surface-input'],\n\n '--color-border-input': semanticColorsLight['border-input'],\n '--color-border-input-hover': semanticColorsLight['border-input-hover'],\n '--color-border-input-focus': semanticColorsLight['border-input-focus'],\n '--color-border-input-error': semanticColorsLight['border-input-error'],\n\n '--color-hairline-subtle': semanticColorsLight['hairline-subtle'],\n '--color-hairline-default': semanticColorsLight['hairline-default'],\n '--color-hairline-strong': semanticColorsLight['hairline-strong'],\n\n '--color-interactive-disabled-text': semanticColorsLight['interactive-disabled-text'],\n\n '--color-avatar-background': semanticColorsLight['avatar-background'],\n '--color-avatar-text': semanticColorsLight['avatar-text'],\n\n ...themeIndependentCSSVars,\n} as const\n\n// CSS custom properties for dark mode (default)\nexport const darkThemeCSSVars = {\n '--color-brand-primary': semanticColorsDark['brand-primary'],\n '--color-brand-primary-light': semanticColorsDark['brand-primary-light'],\n '--color-brand-primary-dark': semanticColorsDark['brand-primary-dark'],\n '--color-brand-primary-subtle': semanticColorsDark['brand-primary-subtle'],\n '--color-brand-primary-muted': semanticColorsDark['brand-primary-muted'],\n '--color-brand-primary-strong': semanticColorsDark['brand-primary-strong'],\n '--color-brand-secondary': semanticColorsDark['brand-secondary'],\n '--color-brand-secondary-light': semanticColorsDark['brand-secondary-light'],\n '--color-brand-secondary-dark': semanticColorsDark['brand-secondary-dark'],\n '--color-brand-secondary-subtle': semanticColorsDark['brand-secondary-subtle'],\n '--color-brand-secondary-muted': semanticColorsDark['brand-secondary-muted'],\n '--color-brand-secondary-strong': semanticColorsDark['brand-secondary-strong'],\n\n '--color-on-brand-primary': semanticColorsDark['on-brand-primary'],\n '--color-on-brand-secondary': semanticColorsDark['on-brand-secondary'],\n '--color-on-brand-primary-subtle': semanticColorsDark['on-brand-primary-subtle'],\n '--color-on-brand-secondary-subtle': semanticColorsDark['on-brand-secondary-subtle'],\n\n '--color-status-success': semanticColorsDark['status-success'],\n '--color-status-success-subtle': semanticColorsDark['status-success-subtle'],\n '--color-status-success-muted': semanticColorsDark['status-success-muted'],\n '--color-status-success-strong': semanticColorsDark['status-success-strong'],\n '--color-status-live': semanticColorsDark['status-live'],\n '--color-status-live-muted': semanticColorsDark['status-live-muted'],\n '--color-status-error': semanticColorsDark['status-error'],\n '--color-status-error-subtle': semanticColorsDark['status-error-subtle'],\n '--color-status-error-muted': semanticColorsDark['status-error-muted'],\n '--color-status-error-strong': semanticColorsDark['status-error-strong'],\n '--color-status-warning': semanticColorsDark['status-warning'],\n '--color-status-warning-subtle': semanticColorsDark['status-warning-subtle'],\n '--color-status-warning-muted': semanticColorsDark['status-warning-muted'],\n '--color-status-warning-strong': semanticColorsDark['status-warning-strong'],\n '--color-status-info': semanticColorsDark['status-info'],\n '--color-status-info-subtle': semanticColorsDark['status-info-subtle'],\n '--color-status-info-muted': semanticColorsDark['status-info-muted'],\n '--color-status-info-strong': semanticColorsDark['status-info-strong'],\n\n '--color-status-error-vivid': semanticColorsDark['status-error-vivid'],\n '--color-status-error-vivid-light': semanticColorsDark['status-error-vivid-light'],\n '--color-status-error-vivid-dark': semanticColorsDark['status-error-vivid-dark'],\n '--color-status-error-vivid-subtle': semanticColorsDark['status-error-vivid-subtle'],\n '--color-status-error-vivid-muted': semanticColorsDark['status-error-vivid-muted'],\n '--color-status-error-vivid-strong': semanticColorsDark['status-error-vivid-strong'],\n\n '--color-text-primary': semanticColorsDark['text-primary'],\n '--color-text-secondary': semanticColorsDark['text-secondary'],\n '--color-text-tertiary': semanticColorsDark['text-tertiary'],\n '--color-text-disabled': semanticColorsDark['text-disabled'],\n '--color-text-inverse': semanticColorsDark['text-inverse'],\n '--color-text-link': semanticColorsDark['text-link'],\n\n '--color-surface-base': semanticColorsDark['surface-base'],\n '--color-surface-elevated': semanticColorsDark['surface-elevated'],\n '--color-surface-raised': semanticColorsDark['surface-raised'],\n\n '--color-background-base': semanticColorsDark['background-base'],\n '--color-background-default': semanticColorsDark['background-default'],\n '--color-background-subtle': semanticColorsDark['background-subtle'],\n '--color-background-frame': semanticColorsDark['background-frame'],\n\n '--color-border-prominent': semanticColorsDark['border-prominent'],\n '--color-border-focus': semanticColorsDark['border-focus'],\n\n '--color-interactive-hover': semanticColorsDark['interactive-hover'],\n '--color-interactive-focus': semanticColorsDark['interactive-focus'],\n '--color-interactive-active': semanticColorsDark['interactive-active'],\n '--color-interactive-selected': semanticColorsDark['interactive-selected'],\n '--color-interactive-disabled': semanticColorsDark['interactive-disabled'],\n\n '--color-divider': semanticColorsDark['divider'],\n\n '--color-brand-primary-hover': semanticColorsDark['brand-primary-hover'],\n '--color-brand-primary-active': semanticColorsDark['brand-primary-active'],\n '--color-brand-secondary-hover': semanticColorsDark['brand-secondary-hover'],\n '--color-brand-secondary-active': semanticColorsDark['brand-secondary-active'],\n\n '--color-status-success-light': semanticColorsDark['status-success-light'],\n '--color-status-success-dark': semanticColorsDark['status-success-dark'],\n '--color-status-error-light': semanticColorsDark['status-error-light'],\n '--color-status-error-dark': semanticColorsDark['status-error-dark'],\n '--color-status-warning-light': semanticColorsDark['status-warning-light'],\n '--color-status-warning-dark': semanticColorsDark['status-warning-dark'],\n '--color-status-info-light': semanticColorsDark['status-info-light'],\n '--color-status-info-dark': semanticColorsDark['status-info-dark'],\n\n '--color-on-status-success': semanticColorsDark['on-status-success'],\n '--color-on-status-error': semanticColorsDark['on-status-error'],\n '--color-on-status-warning': semanticColorsDark['on-status-warning'],\n '--color-on-status-info': semanticColorsDark['on-status-info'],\n '--color-on-status-success-subtle': semanticColorsDark['on-status-success-subtle'],\n '--color-on-status-error-subtle': semanticColorsDark['on-status-error-subtle'],\n '--color-on-status-warning-subtle': semanticColorsDark['on-status-warning-subtle'],\n '--color-on-status-info-subtle': semanticColorsDark['on-status-info-subtle'],\n\n '--color-result-improve': semanticColorsDark['result-improve'],\n '--color-result-improve-light': semanticColorsDark['result-improve-light'],\n '--color-result-improve-dark': semanticColorsDark['result-improve-dark'],\n '--color-result-degrade': semanticColorsDark['result-degrade'],\n '--color-result-degrade-light': semanticColorsDark['result-degrade-light'],\n '--color-result-degrade-dark': semanticColorsDark['result-degrade-dark'],\n '--color-result-inconclusive': semanticColorsDark['result-inconclusive'],\n '--color-result-inconclusive-light': semanticColorsDark['result-inconclusive-light'],\n '--color-result-neutral': semanticColorsDark['result-neutral'],\n\n '--color-on-result-improve': semanticColorsDark['on-result-improve'],\n '--color-on-result-degrade': semanticColorsDark['on-result-degrade'],\n '--color-on-result-inconclusive': semanticColorsDark['on-result-inconclusive'],\n\n '--color-data-1': semanticColorsDark['data-1'],\n '--color-data-2': semanticColorsDark['data-2'],\n '--color-data-3': semanticColorsDark['data-3'],\n '--color-data-4': semanticColorsDark['data-4'],\n '--color-data-5': semanticColorsDark['data-5'],\n '--color-data-6': semanticColorsDark['data-6'],\n '--color-data-7': semanticColorsDark['data-7'],\n '--color-data-8': semanticColorsDark['data-8'],\n '--color-data-9': semanticColorsDark['data-9'],\n '--color-data-10': semanticColorsDark['data-10'],\n\n '--color-text-link-hover': semanticColorsDark['text-link-hover'],\n\n '--color-surface-overlay': semanticColorsDark['surface-overlay'],\n '--color-surface-input': semanticColorsDark['surface-input'],\n\n '--color-border-input': semanticColorsDark['border-input'],\n '--color-border-input-hover': semanticColorsDark['border-input-hover'],\n '--color-border-input-focus': semanticColorsDark['border-input-focus'],\n '--color-border-input-error': semanticColorsDark['border-input-error'],\n\n '--color-hairline-subtle': semanticColorsDark['hairline-subtle'],\n '--color-hairline-default': semanticColorsDark['hairline-default'],\n '--color-hairline-strong': semanticColorsDark['hairline-strong'],\n\n '--color-interactive-disabled-text': semanticColorsDark['interactive-disabled-text'],\n\n '--color-avatar-background': semanticColorsDark['avatar-background'],\n '--color-avatar-text': semanticColorsDark['avatar-text'],\n\n ...themeIndependentCSSVars,\n} as const\n\n// Helper to get CSS vars for a theme mode\nexport function getThemeCSSVars(mode: ThemeMode) {\n return mode === 'dark' ? darkThemeCSSVars : lightThemeCSSVars\n}\n\n// Gluestack UI theme configuration\nexport const gluestackConfig = {\n tokens: {\n colors: {\n // Map to our semantic colors via CSS vars\n primary500: 'var(--color-brand-primary)',\n primary600: 'var(--color-brand-primary-dark)',\n primary400: 'var(--color-brand-primary-light)',\n\n secondary500: 'var(--color-brand-secondary)',\n secondary600: 'var(--color-brand-secondary-dark)',\n secondary400: 'var(--color-brand-secondary-light)',\n\n success500: 'var(--color-status-success)',\n error500: 'var(--color-status-error)',\n warning500: 'var(--color-status-warning)',\n info500: 'var(--color-status-info)',\n\n textLight: 'var(--color-text-primary)',\n textDark: 'var(--color-text-inverse)',\n\n backgroundLight: 'var(--color-background-default)',\n backgroundDark: 'var(--color-surface-base)',\n },\n space: {\n '0': 0,\n '1': 4,\n '2': 8,\n '3': 12,\n '4': 16,\n '5': 20,\n '6': 24,\n '8': 32,\n '10': 40,\n '12': 48,\n '16': 64,\n '20': 80,\n '24': 96,\n },\n radii: {\n none: 0,\n sm: 4,\n md: 8,\n lg: 12,\n xl: 16,\n '2xl': 24,\n full: 9999,\n },\n fontSizes: {\n xs: 12,\n sm: 14,\n md: 16,\n lg: 18,\n xl: 20,\n '2xl': 24,\n '3xl': 30,\n '4xl': 36,\n '5xl': 48,\n },\n },\n aliases: {\n bg: 'backgroundColor',\n p: 'padding',\n px: 'paddingHorizontal',\n py: 'paddingVertical',\n m: 'margin',\n mx: 'marginHorizontal',\n my: 'marginVertical',\n h: 'height',\n w: 'width',\n rounded: 'borderRadius',\n },\n} as const\n\nexport type ThemeConfig = typeof gluestackConfig\n","/**\n * Surface MATERIALS — the treatments layered on top of the flat grey ramp.\n *\n * The ramp says how deep a plane sits. This says what it is made of. Two\n * materials, deliberately: a matte PAPER sheet for hero surfaces, and a recessed\n * INSET WELL for grouped or awaiting-data regions.\n *\n * SCOPE, and it is a hard rule rather than a preference: paper goes on hero\n * surfaces only — the live card, the LOAD/verdict chip, the rest hero. The\n * \"everything is a paper card\" look is explicitly NOT the model; it was an\n * over-application built to find the ceiling. There are no LEVELS of paper. One\n * treatment, used sparingly, or the texture stops meaning anything.\n *\n * Second hard rule: paper fills take DEEP/MUTED tones only (a ramp step, or a\n * categorical `dark` variant). Vivid and neon colours are ink ON paper — never\n * the paper itself.\n *\n * PLATFORM: `backgroundImage` and multi-layer `boxShadow` are web/RNW only. On\n * native these are ignored and the surface falls back to its flat fill, which is\n * why every material here keeps `backgroundColor` load-bearing on its own. A\n * material must never be the only thing carrying meaning.\n *\n * ── THE TONAL FILL IS GONE (VW-99, S-6 wall calibration) ───────────────────\n *\n * `paperSheet` used to carry a vertical ΔL* 3 gradient, sized \"just under seen\n * as a gradient\". On the wall panel at ~3 m it could not be told from a flat\n * sheet of the same tone, and the full material still read as — the operator's\n * words — \"a flat digital rectangle\". It failed its own stated purpose, which\n * was precisely to stop that.\n *\n * Raising it was not available. The design ceiling is ~ΔL* 4 (past that it reads\n * decorative, which the exploration rejected), and the same run showed why the\n * headroom would not have helped: the 0.025 ELEVATION step — a comparable ΔL*\n * — was called instantly, because it sits at a hard edge between two flat\n * fields. The fill spread the same amount smoothly over ~300 px, where vision is\n * genuinely poor. It is a spatial-frequency problem, not an amplitude one, so\n * the band between \"invisible\" and \"decorative\" may simply not exist here.\n *\n * ── AND THE DITHER WENT WITH IT (VW-99 run 2) ──────────────────────────────\n *\n * `ditherTile` was held back one run on the grounds that \"probably dead weight\"\n * is not a measurement. Run 1 could not measure it: with the fill invisible\n * there was no gradient to band, so the panel returned a guaranteed clean sheet.\n *\n * Run 2 settled it by adding a hand-quantised REFERENCE beside the smooth\n * control — the same tone span drawn as five hard-edged 1-level steps, which is\n * what the artefact looks like when it happens. The reference banded plainly and\n * the smooth gradient did not. So the panel can resolve banding; this render\n * path simply does not produce it. A mitigation for an artefact that does not\n * occur is cost with no benefit, and it is gone.\n *\n * That is a claim about THIS display, which is the one the product ships on and\n * the reason `paperSheet` is hero-surface-only. A phone is a separate question.\n *\n * Kept: grain, rim-light, contact shadow.\n *\n * See `sources/design/surface-system-north-star.md` §4 and\n * `sources/runbooks/VW-99-depth-wall-calibration.md`. Those paths are relative to\n * the `voltras-workspace` active-work initiative (`active-work open voltras-workspace`), not this repo —\n * titan-design has no `sources/` directory, so they do not resolve from here.\n */\nimport type { TextStyle, ViewStyle } from 'react-native'\nimport { getSemanticColors } from './tokens/semantic'\n\nconst c = getSemanticColors('dark')\n\n// ── colour math ─────────────────────────────────────────────────────────────\n\nfunction parseHex(hex: string): [number, number, number] | null {\n const h = hex.replace('#', '')\n const full =\n h.length === 3\n ? h\n .split('')\n .map((ch) => ch + ch)\n .join('')\n : h\n const rgb: [number, number, number] = [\n parseInt(full.slice(0, 2), 16),\n parseInt(full.slice(2, 4), 16),\n parseInt(full.slice(4, 6), 16),\n ]\n return rgb.some(Number.isNaN) ? null : rgb\n}\n\n/** sRGB perceived luminance (0 dark … 1 bright), Rec.601 weights. */\nfunction perceivedLuminance(hex: string): number {\n const rgb = parseHex(hex)\n if (!rgb) return 0.5\n const [r, g, b] = rgb\n return (0.299 * r + 0.587 * g + 0.114 * b) / 255\n}\n\n// The CIELAB conversion chain (srgb2lin/lin2srgb/fLab/fInv, hexToLab/labToHex,\n// shiftL) lived here so the tonal fill could be specified in ΔL*. It had no\n// other caller, so it went with the fill — see the module header.\n\n// ── grain ───────────────────────────────────────────────────────────────────\n\n/**\n * Grain opacity for a tone, scaled by perceived brightness.\n *\n * A fixed opacity reads hot on a dark plane and vanishes on a bright one, so\n * darker tones get a whisper and brighter tones keep full texture. Anchored so a\n * dark chip (lum ≈ 0.13) lands ≈ 0.06 and a bright bar (lum ≈ 0.58) lands ≈ 0.20.\n * Above roughly 0.05α on a mid tone it starts reading as \"dirty\" rather than\n * matte, which is what the clamp is protecting.\n *\n * This is the ONE curve all grain goes through — a card and a bar carry\n * proportional, not identical, texture. That is what makes them read as the same\n * material.\n */\nexport function grainOpacityForTone(baseColor: string): number {\n return Math.min(0.24, Math.max(0.04, 0.02 + 0.31 * perceivedLuminance(baseColor)))\n}\n\n/**\n * The matte grain tile as a `backgroundImage` url — one shared `feTurbulence`\n * fractal-noise tile, painted once, NEVER animated. Pair with\n * `backgroundColor: baseColor`.\n */\nexport function grainForTone(baseColor: string): string {\n const op = grainOpacityForTone(baseColor).toFixed(3)\n return (\n `url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E` +\n `%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E` +\n `%3Crect width='120' height='120' filter='url(%23n)' opacity='${op}'/%3E%3C/svg%3E\")`\n )\n}\n\n// `tonalFill` and `ditherTile` both lived here until VW-99 measured them on the\n// wall. Deleted rather than left exported-but-unused; the reasoning is in the\n// module header, which is the part worth keeping.\n\n// ── the materials ───────────────────────────────────────────────────────────\n\n/**\n * A matte PAPER hero sheet: brightness-scaled grain + a crisp top rim-light +\n * one soft contact shadow.\n *\n * The contact shadow is the ONE place a drop-shadow is still correct on a dark\n * surface: it is large, soft, and describes a sheet lying on a plane rather than\n * trying to encode hierarchy. Inline depth is the hairline's job.\n *\n * Defaults to `surface-raised` so a same-toned card laid inside reads as one\n * continuous sheet rather than a seam.\n *\n * THE RIM-LIGHT IS A HAIRLINE. Run 2 of VW-99 called it \"weak at distance\" on\n * both the card and the hero sheet, and the reason is visible in the number: it\n * was `rgba(255,255,255,0.10)`, a 1px white line on a dark plane — physically\n * the same cue as `hairline-*`, but set BELOW `hairline-default`, which the same\n * run had just had to raise twice. It is not a subtler species of edge, it was\n * simply mistuned. Raised to `0.20`, between `hairline-default` and\n * `hairline-strong`: this edge defines a hero surface, so it earns more than the\n * default separator, and unlike a separator there is no fallback behind it.\n *\n * Deliberately NOT wired to the token, though the values now agree in spirit: a\n * box-shadow rim and a border hairline are retuned by different evidence, and\n * coupling them means a hairline run silently restyles every hero sheet.\n *\n * HERO SURFACES ONLY, MUTED TONES ONLY — see the module header.\n */\nexport function paperSheet(tone: string = c['surface-raised']): ViewStyle {\n return {\n backgroundColor: tone,\n // Grain alone. The dither went with the gradient it protected — see header.\n backgroundImage: grainForTone(tone),\n boxShadow: 'inset 0 1px 0 rgba(255,255,255,0.20), 0 8px 22px rgba(0,0,0,0.50)',\n } as unknown as ViewStyle\n}\n\n/**\n * A recessed INSET WELL: a tone pressed BELOW the surrounding plane, cut in by an\n * inner top shadow with a faint light line on the floor.\n *\n * The bottom rim is the load-bearing half. A dark inset alone just reads as a\n * darker rectangle; it is the light catching the floor that says \"this is below\n * the surface\" — which is why the treatment survives at 16px where a full paper\n * treatment does not.\n *\n * The floor light was `0.04` and is now `0.12`, chosen on the wall in VW-99 run\n * 2 against a `.04`-vs-`.12`-vs-none forced choice. Worth recording that `.04`\n * was NOT invisible — the no-line decoy was correctly rejected and both real\n * values were seen, so this is a preference between two working values, not a\n * rescue. The rim-light next door was a genuine miss; this one was only thin.\n *\n * Note this is a MATERIAL, and independent of the surface LEVEL named `inset`\n * that was retired in TD-07.14. A well is something you apply; a level is\n * somewhere you sit.\n */\nexport function insetWell(tone: string = c['surface-input']): ViewStyle {\n return {\n backgroundColor: tone,\n boxShadow: 'inset 0 2px 6px rgba(0,0,0,0.55), inset 0 -1px 0 rgba(255,255,255,0.12)',\n } as unknown as ViewStyle\n}\n\n/**\n * Paper for a COLORED BAR — the same material as {@link paperSheet}, tuned for a\n * small saturated element: grain + top rim-light + a contact shadow cast past the\n * bar's leading edge, so a filled bar reads as a physical block that has travelled.\n *\n * No tonal fill or dither here: a bar is too narrow for a ΔL* 3 gradient to read,\n * and too narrow to band.\n *\n * `flip` = a vertically mirrored (`scaleY(-1)`) plot, i.e. the `down` wing of a\n * diverging chart. The contact shadow's y-offset is pre-inverted so the mirror\n * lands it pointing AWAY from the shared axis rather than up across it, and the\n * top rim-light is DROPPED — mirrored it would sit on the axis edge and read\n * wrong, so grain and shadow carry the material alone.\n */\nexport function barPaper(color: string, flip = false): ViewStyle {\n return {\n backgroundImage: grainForTone(color),\n boxShadow: flip\n ? '0 -6px 16px rgba(0,0,0,0.45)'\n : 'inset 0 1.5px 0 rgba(255,255,255,0.22), 0 6px 16px rgba(0,0,0,0.45)',\n } as unknown as ViewStyle\n}\n\n/**\n * A POST-IT card: a matte tinted sheet with a crisp rim, a defined contact\n * shadow, and a deliberate CANT (`deg`) so it reads as a stuck note — where a\n * small unit of data wants to feel pinned to the surface (alerts, next-set). A\n * degree or two, not a fraction, so the tilt is intentional rather than a bug.\n */\nexport function postIt(tone: string = c['surface-raised'], deg = -1.5): ViewStyle {\n return {\n backgroundColor: tone,\n backgroundImage: grainForTone(tone),\n boxShadow: 'inset 0 1px 0 rgba(255,255,255,0.12), 0 6px 14px rgba(0,0,0,0.45)',\n transform: [{ rotate: `${deg}deg` }],\n } as unknown as ViewStyle\n}\n\n/**\n * DEBOSSED (engraved) text: a 1px light highlight dropped just below the glyphs\n * so a label reads as pressed INTO the surface. Deliberate, for section eyebrows\n * on a matte plane — not body copy. Pair with a tertiary/dim text colour.\n */\nexport const debossLabel: TextStyle = {\n textShadowColor: 'rgba(255,255,255,0.11)',\n textShadowOffset: { width: 0, height: 1 },\n textShadowRadius: 0,\n}\n","/**\n * Colour math shared by the depth system.\n *\n * This file used to be `shadows.ts` and shipped a neumorphic shadow builder —\n * dual opposing shadows, dark bottom-right and light top-left. That was removed\n * in TD-07.16. Neumorphism needs a mid-tone background (roughly 75-90%\n * lightness) so BOTH shadows have somewhere to fall; our surfaces sit near 10%,\n * which leaves the dark half nothing to fall onto. It collapsed to a one-sided\n * rim light and read as noise on the wall.\n *\n * Inline depth is a hairline now (`hairline-*`, self-normalising alpha), texture\n * is `materials.ts`, and drop-shadow survives only for genuinely FLOATING\n * things — see `elevation.ts`.\n *\n * What is left here is the HSV/hex maths that `elevation.ts` still uses to\n * derive rim and shadow tints from whatever surface colour it is handed.\n */\n\n// ============================================================================\n// Color Math Utilities\n// ============================================================================\n\n/**\n * Parse a hex color to RGB values (0-255).\n * Supports both #RGB and #RRGGBB formats.\n */\nexport function hexToRgb(hex: string): { r: number; g: number; b: number } | null {\n const cleaned = hex.replace('#', '')\n\n let r: number, g: number, b: number\n\n if (cleaned.length === 3) {\n r = parseInt(cleaned[0] + cleaned[0], 16)\n g = parseInt(cleaned[1] + cleaned[1], 16)\n b = parseInt(cleaned[2] + cleaned[2], 16)\n } else if (cleaned.length === 6) {\n r = parseInt(cleaned.slice(0, 2), 16)\n g = parseInt(cleaned.slice(2, 4), 16)\n b = parseInt(cleaned.slice(4, 6), 16)\n } else {\n return null\n }\n\n return { r, g, b }\n}\n\n/**\n * Convert RGB (0-255) to HSV (h: 0-360, s: 0-1, v: 0-1).\n */\nexport function rgbToHsv(r: number, g: number, b: number): { h: number; s: number; v: number } {\n const rNorm = r / 255\n const gNorm = g / 255\n const bNorm = b / 255\n\n const max = Math.max(rNorm, gNorm, bNorm)\n const min = Math.min(rNorm, gNorm, bNorm)\n const delta = max - min\n\n // Value\n const v = max\n\n // Saturation\n const s = max === 0 ? 0 : delta / max\n\n // Hue\n let h = 0\n if (delta !== 0) {\n if (max === rNorm) {\n h = 60 * (((gNorm - bNorm) / delta) % 6)\n } else if (max === gNorm) {\n h = 60 * ((bNorm - rNorm) / delta + 2)\n } else {\n h = 60 * ((rNorm - gNorm) / delta + 4)\n }\n }\n if (h < 0) h += 360\n\n return { h, s, v }\n}\n\n/**\n * Convert HSV (h: 0-360, s: 0-1, v: 0-1) to RGB (0-255).\n */\nexport function hsvToRgb(h: number, s: number, v: number): { r: number; g: number; b: number } {\n const c = v * s\n const x = c * (1 - Math.abs(((h / 60) % 2) - 1))\n const m = v - c\n\n let rPrime: number, gPrime: number, bPrime: number\n\n if (h >= 0 && h < 60) {\n rPrime = c\n gPrime = x\n bPrime = 0\n } else if (h >= 60 && h < 120) {\n rPrime = x\n gPrime = c\n bPrime = 0\n } else if (h >= 120 && h < 180) {\n rPrime = 0\n gPrime = c\n bPrime = x\n } else if (h >= 180 && h < 240) {\n rPrime = 0\n gPrime = x\n bPrime = c\n } else if (h >= 240 && h < 300) {\n rPrime = x\n gPrime = 0\n bPrime = c\n } else {\n rPrime = c\n gPrime = 0\n bPrime = x\n }\n\n return {\n r: Math.round((rPrime + m) * 255),\n g: Math.round((gPrime + m) * 255),\n b: Math.round((bPrime + m) * 255),\n }\n}\n\n/**\n * Convert RGB values to hex string.\n */\nexport function rgbToHex(r: number, g: number, b: number): string {\n const toHex = (n: number) => {\n const clamped = Math.max(0, Math.min(255, Math.round(n)))\n return clamped.toString(16).padStart(2, '0')\n }\n return `#${toHex(r)}${toHex(g)}${toHex(b)}`\n}\n\n/**\n * Lighten a color by increasing its HSV Value component.\n *\n * @param hex - The hex color to lighten\n * @param amount - Amount to increase V by (0-1)\n */\nexport function lighten(hex: string, amount: number = 0.1): string {\n const rgb = hexToRgb(hex)\n if (!rgb) return hex\n\n const hsv = rgbToHsv(rgb.r, rgb.g, rgb.b)\n const newV = Math.min(1, hsv.v + amount)\n\n const newRgb = hsvToRgb(hsv.h, hsv.s, newV)\n return rgbToHex(newRgb.r, newRgb.g, newRgb.b)\n}\n\n/**\n * Darken a color by decreasing its HSV Value component.\n *\n * @param hex - The hex color to darken\n * @param amount - Amount to decrease V by (0-1)\n */\nexport function darken(hex: string, amount: number = 0.1): string {\n const rgb = hexToRgb(hex)\n if (!rgb) return hex\n\n const hsv = rgbToHsv(rgb.r, rgb.g, rgb.b)\n const newV = Math.max(0, hsv.v - amount)\n\n const newRgb = hsvToRgb(hsv.h, hsv.s, newV)\n return rgbToHex(newRgb.r, newRgb.g, newRgb.b)\n}\n\n/**\n * Get hover colors for a button based on its background color.\n * Automatically adapts intensity based on the color's luminance.\n *\n * @param bgColor - The button's background color (hex)\n * @param intensity - How strong the hover effect should be ('subtle' | 'medium' | 'strong')\n */\nexport function getHoverColors(\n bgColor: string,\n intensity: 'subtle' | 'medium' | 'strong' = 'medium'\n): { raised: string; pressed: string } {\n const amounts = {\n subtle: 0.01,\n medium: 0.02,\n strong: 0.03,\n }\n\n const amount = amounts[intensity]\n\n return {\n raised: lighten(bgColor, amount), // Raised hover: lighten (lifting up)\n pressed: darken(bgColor, amount), // Pressed hover: darken (pressing down)\n }\n}\n\n/**\n * Check if a color is considered \"dark\" (for choosing text color).\n * Uses HSV Value component for simplicity.\n */\nexport function isDark(hex: string): boolean {\n const rgb = hexToRgb(hex)\n if (!rgb) return true\n const hsv = rgbToHsv(rgb.r, rgb.g, rgb.b)\n return hsv.v < 0.6\n}\n\n/**\n * Shadow strength tiers. Retained because `elevation.ts` keys its level table on\n * them; the neumorphic shadow BUILDERS that used to live here are gone.\n */\nexport type ShadowIntensity = 'subtle' | 'medium' | 'strong'\n","/**\n * LIFT — the treatment a plane wears when it sits above its neighbour.\n *\n * Tone says which plane a container sits on; lift says it is resting ON the one\n * below. Two cues, both lit from above:\n *\n * RIM a crisp 1px top rim-light. The one neumorphism half that survives\n * near black. paperSheet's hero rim is 0.20 (VW-99 run 2); a card is\n * not a hero, so the default lift sits one grade quieter at 0.12,\n * chosen against 0.20 side by side in Lab/Depth (2026-09-08).\n * AMBIENT a soft shadow cast onto the plane below, growing with the number of\n * planes crossed. Content lifts (1–3) are tight; floating lifts (4–5)\n * are large and soft, describing separation from the page rather than\n * rank in a stack.\n *\n * Neither cue is a hairline ring: a ring is an edge, not a lift, and stays the\n * divider's job. Web carries the multi-layer boxShadow; native gets the single\n * shadow* set. The tone underneath is load-bearing on its own either way.\n */\nimport { Platform, type ViewStyle } from 'react-native'\nimport type { ThemeMode } from './tokens/semantic'\n\nexport type LiftStep = 1 | 2 | 3 | 4 | 5\n\n/** The lowest lift that is FLOATING (menu, popover, toast) rather than content. */\nexport const FLOATING_LIFT_MIN: LiftStep = 4\n\n/** Rim-light alpha per mode. Light mode is a placeholder pending its own pass. */\nexport const LIFT_RIM_ALPHA: Record<ThemeMode, number> = { dark: 0.12, light: 0.9 }\n\ninterface ShadowLayer {\n y: number\n blur: number\n alpha: number\n}\n\nconst AMBIENT: Record<LiftStep, ShadowLayer[]> = {\n 1: [\n { y: 1, blur: 2, alpha: 0.35 },\n { y: 2, blur: 6, alpha: 0.3 },\n ],\n 2: [\n { y: 1, blur: 2, alpha: 0.35 },\n { y: 4, blur: 12, alpha: 0.32 },\n ],\n 3: [\n { y: 2, blur: 4, alpha: 0.35 },\n { y: 8, blur: 22, alpha: 0.35 },\n ],\n 4: [\n { y: 1, blur: 2, alpha: 0.35 },\n { y: 10, blur: 24, alpha: 0.3 },\n { y: 24, blur: 48, alpha: 0.2 },\n ],\n 5: [\n { y: 2, blur: 4, alpha: 0.4 },\n { y: 16, blur: 32, alpha: 0.35 },\n { y: 32, blur: 64, alpha: 0.25 },\n ],\n}\n\n/** A light surface casts a lighter shadow: same geometry, scaled alpha. */\nconst AMBIENT_ALPHA_SCALE: Record<ThemeMode, number> = { dark: 1, light: 0.4 }\n\nexport interface LiftOptions {\n /** Override the rim alpha. `0` drops the rim and leaves the ambient shadow alone. */\n rim?: number\n}\n\nfunction ambientLayers(step: LiftStep, mode: ThemeMode): string[] {\n const scale = AMBIENT_ALPHA_SCALE[mode]\n return AMBIENT[step].map(\n ({ y, blur, alpha }) => `0 ${y}px ${blur}px rgba(0,0,0,${(alpha * scale).toFixed(2)})`\n )\n}\n\n/** The web boxShadow string for a lift: rim first, then the ambient layers. */\nexport function liftShadow(step: LiftStep, mode: ThemeMode = 'dark', opts: LiftOptions = {}) {\n const rim = opts.rim ?? LIFT_RIM_ALPHA[mode]\n const layers = ambientLayers(step, mode)\n if (rim > 0) layers.unshift(`inset 0 1px 0 rgba(255,255,255,${rim.toFixed(2)})`)\n return layers.join(', ')\n}\n\n/** Platform style for a lift. Compose after `backgroundColor`; never instead of it. */\nexport function liftStyle(\n step: LiftStep,\n mode: ThemeMode = 'dark',\n opts: LiftOptions = {}\n): ViewStyle {\n const deepest = AMBIENT[step][AMBIENT[step].length - 1]\n return Platform.select({\n web: { boxShadow: liftShadow(step, mode, opts) } as unknown as ViewStyle,\n default: {\n shadowColor: '#000',\n shadowOffset: { width: 0, height: Math.round(deepest.y / 2) },\n shadowOpacity: deepest.alpha * AMBIENT_ALPHA_SCALE[mode],\n shadowRadius: deepest.blur / 2,\n elevation: step,\n },\n }) as ViewStyle\n}\n","/**\n * The surface planes: the grey-ramp steps a container can sit on, darkest first.\n *\n * Every background a `<Surface>` or `<Card>` paints resolves through this list,\n * so a container can only ever land ON the ramp. Stepping up (a lifted card) or\n * down (a pressed well) is indexing `PLANE_ORDER`, clamped at both ends.\n *\n * `frame` is the bezel the ramp sits inside and the floor a pressed surface\n * clamps at. It replaced a separate `inset` level in TD-07.14: at ΔE 1.10 from\n * the frame that level was an imperceptible duplicate.\n */\nimport { getSemanticColors, type ThemeMode } from './tokens/semantic'\n\ntype ColorToken = keyof ReturnType<typeof getSemanticColors>\n\nexport type SurfaceLevel = 'frame' | 'background' | 'base' | 'elevated' | 'raised' | 'overlay'\n\n// Which semantic token backs each plane. Values live in `semantic.ts` and stay\n// in sync with the grey ramp; this map never carries literal hexes.\nexport const SURFACE_LEVEL_TOKEN = {\n frame: 'background-frame',\n background: 'background-base',\n base: 'surface-base',\n elevated: 'surface-elevated',\n raised: 'surface-raised',\n overlay: 'surface-overlay',\n} as const satisfies Record<SurfaceLevel, ColorToken>\n\n/** Darkest → lightest. Kept in lockstep with the grey ramp and surface.contract.test. */\nexport const PLANE_ORDER = [\n 'frame',\n 'background',\n 'base',\n 'elevated',\n 'raised',\n 'overlay',\n] as const satisfies readonly SurfaceLevel[]\n\n/** The background hex for a plane under a theme mode (literal hex, never a var()). */\nexport function surfaceBackground(level: SurfaceLevel, mode: ThemeMode): string {\n return getSemanticColors(mode)[SURFACE_LEVEL_TOKEN[level]]\n}\n\nfunction stepPlane(from: SurfaceLevel, delta: number): SurfaceLevel {\n const index = PLANE_ORDER.indexOf(from)\n const clamped = Math.min(PLANE_ORDER.length - 1, Math.max(0, index + delta))\n return PLANE_ORDER[clamped]\n}\n\n/**\n * The plane a `<Surface pressed>` resolves to: its parent's plane stepped one\n * index DOWN the ramp, clamped at the `frame` floor.\n * overlay→raised, raised→elevated, elevated→base, base→background,\n * background→frame, frame→frame (clamped).\n */\nexport function pressedLevel(parent: SurfaceLevel): SurfaceLevel {\n return stepPlane(parent, -1)\n}\n\n/**\n * The plane a lifted surface resolves to: its parent's plane stepped `steps`\n * UP the ramp, clamped at `overlay`. The clamp is what makes raised-on-raised\n * unrepresentable: a card inside an overlay stays on the overlay and relies on\n * its lift treatment, never on a lighter grey that is not on the ramp.\n */\nexport function raisedLevel(parent: SurfaceLevel, steps: number): SurfaceLevel {\n return stepPlane(parent, Math.max(0, steps))\n}\n","/**\n * Elevation — numeric depth that resolves to the grey ramp.\n *\n * A level is a plane on the surface ramp plus the treatment that plane wears:\n *\n * -2 frame recessed (inset well, two planes down)\n * -1 background recessed (inset well, one plane down)\n * 0 base flat, no treatment\n * 1 elevated lifted (tone + rim-light + ambient shadow)\n * 2 raised lifted\n * 3 overlay lifted\n * 4 overlay floating (same recipe, larger shadow)\n * 5 overlay floating\n *\n * These are ABSOLUTE readings from the page plane. `<Surface>` and `<Card>`\n * apply the same numbers RELATIVE to the plane they are nested in; see\n * `resolveSurfaceDepth`.\n *\n * No level can produce a colour off the ramp. The previous ladder lightened a\n * base colour in HSV by 2.5% per level and put five of its six stops between\n * ramp steps, drifting warmer as it rose while the ramp is designed to cool.\n * Floating levels share the overlay plane on purpose: past the top of the ramp,\n * separation is the shadow's job, not a lighter grey.\n *\n * Depth is TONE + LIFT by default. The earlier rule that levels 1–3 separate by\n * tone alone (TD-07.16) was reversed on 2026-09-08: the tight upper steps of the\n * ramp (ΔL* 2.5–3) need the second channel, and a soft ambient shadow on a\n * near-black plane is not inert once the rim-light gives it an edge to fall\n * from. See Foundations/Depth.\n */\nimport { Platform, type ViewStyle } from 'react-native'\nimport { hexToRgb } from './color-utils'\nimport { insetWell } from './materials'\nimport { FLOATING_LIFT_MIN, liftStyle, type LiftOptions, type LiftStep } from './lift'\nimport { surfaceBackground, type SurfaceLevel } from './surface-planes'\nimport type { ThemeMode } from './tokens/semantic'\n\nexport type ElevationLevel = -2 | -1 | 0 | 1 | 2 | 3 | 4 | 5\n\nexport const ELEVATION_PLANE: Record<ElevationLevel, SurfaceLevel> = {\n [-2]: 'frame',\n [-1]: 'background',\n [0]: 'base',\n [1]: 'elevated',\n [2]: 'raised',\n [3]: 'overlay',\n [4]: 'overlay',\n [5]: 'overlay',\n}\n\n/** The lowest elevation that is floating (menu, popover, toast) rather than content. */\nexport const FLOATING_ELEVATION_MIN: ElevationLevel = FLOATING_LIFT_MIN\n\n/** Elevation backing a `<Surface pressed>` recess: one plane down. */\nexport const PRESSED_ELEVATION_LEVEL: ElevationLevel = -1\n\n/** The ramp plane an absolute elevation sits on. */\nexport function elevationPlane(level: ElevationLevel): SurfaceLevel {\n return ELEVATION_PLANE[level]\n}\n\n/** The background hex for an absolute elevation: always a ramp step. */\nexport function getElevationSurface(level: ElevationLevel, mode: ThemeMode = 'dark'): string {\n return surfaceBackground(ELEVATION_PLANE[level], mode)\n}\n\n/**\n * Inner-shadow recess for a pressed (sunken) surface: the `insetWell` material's\n * cut, which the wall calibrated in VW-99. Web only; on native the recess reads\n * from the darker fill alone, which is why the fill is never optional.\n */\nexport function getPressedRecessShadow(fillColor: string, _mode: ThemeMode = 'dark'): ViewStyle {\n const { boxShadow } = insetWell(fillColor) as unknown as { boxShadow: string }\n return Platform.select({\n web: { boxShadow } as unknown as ViewStyle,\n default: {},\n }) as ViewStyle\n}\n\n/**\n * The treatment an absolute elevation wears: a recess below 0, nothing at 0,\n * a lift above it. Compose after `backgroundColor`.\n */\nexport function getElevationShadow(\n level: ElevationLevel,\n mode: ThemeMode = 'dark',\n opts: LiftOptions = {}\n): ViewStyle {\n if (level < 0) return getPressedRecessShadow(getElevationSurface(level, mode), mode)\n if (level === 0) return {}\n return liftStyle(level as LiftStep, mode, opts)\n}\n\n// =============================================================================\n// Glow Shadow Support\n// =============================================================================\n\nexport type GlowIntensity = 'tight' | 'subtle' | 'medium' | 'strong'\n\n// Four fixed intensities, chosen by EMPHASIS rather than by the element's size:\n// a caller says how loud the glow should be, not how big the thing is. `tight`\n// is the close halo a small indicator wore before glows were centralised; it is\n// kept as a rung on the scale so that look stays reachable.\nconst glowConfig: Record<GlowIntensity, { blur: number; spread: number; opacity: number }> = {\n tight: { blur: 4, spread: 0, opacity: 0.4 },\n subtle: { blur: 12, spread: 0, opacity: 0.25 },\n medium: { blur: 20, spread: 2, opacity: 0.4 },\n strong: { blur: 30, spread: 4, opacity: 0.55 },\n}\n\n/**\n * A coloured radial glow around an element, for emphasis and active states:\n * a live recording indicator, a success or error pulse, a focus halo.\n */\nexport function getGlowShadow(color: string, intensity: GlowIntensity = 'medium'): ViewStyle {\n const config = glowConfig[intensity]\n const rgb = hexToRgb(color)\n if (!rgb) return {}\n\n return Platform.select({\n web: {\n boxShadow: `0 0 ${config.blur}px ${config.spread}px rgba(${rgb.r}, ${rgb.g}, ${rgb.b}, ${config.opacity})`,\n } as unknown as ViewStyle,\n default: {\n shadowColor: color,\n shadowOffset: { width: 0, height: 0 },\n shadowOpacity: config.opacity,\n shadowRadius: config.blur / 2,\n elevation: 0,\n },\n }) as ViewStyle\n}\n","import type { CssPropertyManifest, VariantAxes } from './css-property-manifest.types'\n\n/** Result of validating a candidate manifest: valid iff errors is empty. */\nexport interface ManifestValidationResult {\n valid: boolean\n errors: string[]\n}\n\nconst isPlainObject = (value: unknown): value is Record<string, unknown> =>\n typeof value === 'object' && value !== null && !Array.isArray(value)\n\nconst isVariantAxes = (value: unknown): value is VariantAxes =>\n isPlainObject(value) &&\n Object.keys(value).length > 0 &&\n Object.values(value).every((axisValue) => typeof axisValue === 'string')\n\nfunction collectVariantOverrideErrors(override: unknown, path: string): string[] {\n if (!isPlainObject(override)) return [`${path} must be an object`]\n const errors: string[] = []\n if (!isVariantAxes(override.variant))\n errors.push(`${path}.variant must be a non-empty string-keyed object`)\n if (\n override.token !== undefined &&\n override.token !== null &&\n typeof override.token !== 'string'\n ) {\n errors.push(`${path}.token must be a string or null`)\n }\n if (typeof override.resolvedValue !== 'string' || override.resolvedValue.length === 0) {\n errors.push(`${path}.resolvedValue must be a non-empty string`)\n }\n return errors\n}\n\nfunction collectPropertyErrors(entry: unknown, path: string): string[] {\n if (!isPlainObject(entry)) return [`${path} must be an object`]\n const errors: string[] = []\n if (typeof entry.property !== 'string' || entry.property.length === 0) {\n errors.push(`${path}.property must be a non-empty string`)\n }\n if (entry.token !== null && typeof entry.token !== 'string') {\n errors.push(`${path}.token must be a string or null`)\n }\n if (typeof entry.resolvedValue !== 'string' || entry.resolvedValue.length === 0) {\n errors.push(`${path}.resolvedValue must be a non-empty string`)\n }\n if (entry.variantOverrides !== undefined) {\n if (!Array.isArray(entry.variantOverrides)) {\n errors.push(`${path}.variantOverrides must be an array`)\n } else {\n entry.variantOverrides.forEach((override, i) =>\n errors.push(...collectVariantOverrideErrors(override, `${path}.variantOverrides[${i}]`))\n )\n }\n }\n return errors\n}\n\n/** Structurally validates a candidate value against the CssPropertyManifest shape. */\nexport function validateCssPropertyManifest(candidate: unknown): ManifestValidationResult {\n if (!isPlainObject(candidate)) return { valid: false, errors: ['manifest must be an object'] }\n\n const errors: string[] = []\n if (typeof candidate.component !== 'string' || candidate.component.length === 0) {\n errors.push('component must be a non-empty string')\n }\n if (candidate.baseVariant !== undefined && !isVariantAxes(candidate.baseVariant)) {\n errors.push('baseVariant must be a non-empty string-keyed object')\n }\n if (!Array.isArray(candidate.properties) || candidate.properties.length === 0) {\n errors.push('properties must be a non-empty array')\n } else {\n candidate.properties.forEach((entry, i) =>\n errors.push(...collectPropertyErrors(entry, `properties[${i}]`))\n )\n }\n\n return { valid: errors.length === 0, errors }\n}\n\n/** Type guard variant of validateCssPropertyManifest for use in narrowing contexts. */\nexport function isCssPropertyManifest(candidate: unknown): candidate is CssPropertyManifest {\n return validateCssPropertyManifest(candidate).valid\n}\n","import { Platform } from 'react-native'\nimport { getSemanticColors, type ThemeMode } from './tokens/semantic'\n\ntype ColorToken = keyof ReturnType<typeof getSemanticColors>\n\n/**\n * Resolve a semantic color token for an inline style where a nativewind\n * className can't apply — gradients (`backgroundImage`), per-edge borders\n * (`borderTopColor`, …), SVG attributes, and conditional hex/token mixes.\n *\n * The companion to className color tokens: on **web** it returns the CSS\n * variable (`var(--color-…)`), so the dashboard's light/dark switching keeps\n * working exactly as `global.css` intends; on **native** it returns the\n * resolved hex from `getSemanticColors` (mobile is dark-only). This is why\n * these spots stay theme-correct on web while also rendering on-device.\n */\nexport function resolveColor(token: ColorToken, mode: ThemeMode = 'dark'): string {\n return Platform.OS === 'web' ? `var(--color-${token})` : getSemanticColors(mode)[token]\n}\n","import { resolveColor } from './resolve-color'\nimport { getSemanticColors, type ThemeMode } from './tokens/semantic'\n\ntype ColorToken = keyof ReturnType<typeof getSemanticColors>\n\n/** A `backgroundImage` style — web-only (RN ignores it); type it loosely for RN style arrays. */\nexport type GradientStyle = { backgroundImage: string }\n\n/**\n * A linear-gradient `backgroundImage` built from two semantic color tokens.\n *\n * Themeable + native-safe via {@link resolveColor}: on web the stops are CSS\n * variables (light/dark switching keeps working); on native it resolves to hex.\n * `backgroundImage` is a **web-only** paint, so pair this with a solid\n * `bg-*` className fallback for native (see the shell TopBar).\n */\nexport function linearGradient(\n from: ColorToken,\n to: ColorToken,\n angle = 180,\n mode: ThemeMode = 'dark'\n): GradientStyle {\n return {\n backgroundImage: `linear-gradient(${angle}deg, ${resolveColor(from, mode)}, ${resolveColor(to, mode)})`,\n }\n}\n\n/**\n * Named surface gradients — the shared substrate for gradient fills. Replaces\n * per-component inline `linear-gradient` strings.\n */\nexport const surfaceGradient = {\n /** Chrome bands (top bar, headers): elevated → base, a subtle dark wash. */\n chrome: (mode: ThemeMode = 'dark'): GradientStyle =>\n linearGradient('surface-elevated', 'background-base', 180, mode),\n}\n","import type { ThemePreset } from './types'\n\nfunction colorKeyToVar(key: string): string {\n return `--color-${key}`\n}\n\nfunction applyColorOverrides(colors: Record<string, string | undefined>, root: HTMLElement) {\n for (const [key, value] of Object.entries(colors)) {\n if (value !== undefined) {\n root.style.setProperty(colorKeyToVar(key), value)\n }\n }\n}\n\nfunction applyFontOverrides(fonts: Record<string, string | undefined>, root: HTMLElement) {\n const fontVarMap: Record<string, string> = {\n sans: '--font-family-sans',\n body: '--font-family-body',\n heading: '--font-family-heading',\n mono: '--font-family-mono',\n }\n for (const [key, value] of Object.entries(fonts)) {\n if (value !== undefined && fontVarMap[key]) {\n root.style.setProperty(fontVarMap[key], value)\n }\n }\n}\n\nfunction injectFontImport(url: string) {\n if (typeof document === 'undefined') return\n const existing = document.querySelector(`link[href=\"${url}\"]`)\n if (existing) return\n const link = document.createElement('link')\n link.rel = 'stylesheet'\n link.href = url\n document.head.appendChild(link)\n}\n\n/**\n * @deprecated Use `ThemeProvider` with semantic tokens — removed once audiobook\n * migrates off presets (AW-129).\n */\nexport function applyThemePreset(preset: ThemePreset): () => void {\n if (typeof document === 'undefined') {\n return () => {}\n }\n\n const root = document.documentElement\n const removals: (() => void)[] = []\n\n // Inject font import if specified\n if (preset.fontImport) {\n injectFontImport(preset.fontImport)\n }\n\n // Determine current theme mode\n const isLight = root.classList.contains('light')\n const modeColors = isLight ? preset.colors?.light : preset.colors?.dark\n\n // Apply color overrides\n if (modeColors) {\n const previousValues: Record<string, string | null> = {}\n for (const key of Object.keys(modeColors)) {\n previousValues[colorKeyToVar(key)] = root.style.getPropertyValue(colorKeyToVar(key)) || null\n }\n applyColorOverrides(modeColors, root)\n removals.push(() => {\n for (const [varName, prev] of Object.entries(previousValues)) {\n if (prev === null) {\n root.style.removeProperty(varName)\n } else {\n root.style.setProperty(varName, prev)\n }\n }\n })\n }\n\n // Apply font overrides\n if (preset.fonts) {\n applyFontOverrides(preset.fonts as Record<string, string | undefined>, root)\n }\n\n // Apply root classes\n if (preset.rootClasses) {\n for (const cls of preset.rootClasses) {\n root.classList.add(cls)\n }\n removals.push(() => {\n for (const cls of preset.rootClasses!) {\n root.classList.remove(cls)\n }\n })\n }\n\n // Return cleanup function\n return () => {\n for (const remove of removals) {\n remove()\n }\n }\n}\n","import type { ThemePreset } from './types'\n\n/**\n * @deprecated Use `ThemeProvider` with semantic tokens — removed once audiobook\n * migrates off presets (AW-129).\n */\nexport const defaultPreset: ThemePreset = {\n name: 'default',\n description: 'Titan Design System default theme — orange accent, steel secondary',\n}\n","import type { ThemePreset } from './types'\n\n/**\n * Audiobook Studio preset.\n *\n * Warm copper/patina aesthetic inspired by vintage audio equipment\n * and reading lounges. Dark-mode only design with editorial typography.\n *\n * @deprecated Use `ThemeProvider` with semantic tokens — removed once audiobook\n * migrates off presets (AW-129).\n */\nexport const audiobookPreset: ThemePreset = {\n name: 'audiobook',\n description: 'Warm copper/patina theme with editorial typography',\n fontImport:\n 'https://fonts.googleapis.com/css2?family=Newsreader:ital,wght@0,400;0,600;0,700;1,400&family=Outfit:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap',\n fonts: {\n sans: \"'Outfit', 'Avenir', 'Avenir Next', system-ui, sans-serif\",\n body: \"'Outfit', 'Avenir', 'Avenir Next', system-ui, sans-serif\",\n heading: \"'Newsreader', 'Libre Baskerville', Georgia, serif\",\n mono: \"'JetBrains Mono', 'SF Mono', 'Fira Code', monospace\",\n },\n colors: {\n dark: {\n // Brand: Copper accent\n 'brand-primary': '#d4782a',\n 'brand-primary-light': '#e8944a',\n 'brand-primary-dark': '#9a4a15',\n 'brand-primary-subtle': 'rgba(212, 120, 42, 0.12)',\n 'brand-primary-hover': '#e8944a',\n 'brand-primary-active': '#f5b070',\n\n // Brand secondary: Patina/verdigris\n 'brand-secondary': '#3a9b8a',\n 'brand-secondary-light': '#55baa7',\n 'brand-secondary-dark': '#1f5c52',\n 'brand-secondary-subtle': 'rgba(58, 155, 138, 0.12)',\n 'brand-secondary-hover': '#55baa7',\n 'brand-secondary-active': '#7ed4c4',\n\n 'on-brand-primary': '#FFFFFF',\n 'on-brand-secondary': '#FFFFFF',\n\n // Status colors (audiobook's warmer status palette)\n 'status-success': '#5fb870',\n 'status-error': '#d85c4a',\n 'status-warning': '#d4a43a',\n 'status-info': '#5a8fd4',\n\n // Text: warm off-whites\n 'text-primary': '#f4f3f1',\n 'text-secondary': '#b5b3af',\n 'text-tertiary': '#7a7875',\n\n // Surfaces: warm greys (not pure gray)\n 'surface-base': '#101114',\n 'surface-elevated': '#15171c',\n 'surface-raised': '#1a1d24',\n 'surface-overlay': '#15171c',\n 'surface-input': '#15171c',\n\n // Backgrounds\n 'background-base': '#0a0b0d',\n 'background-default': '#101114',\n 'background-subtle': '#1a1d24',\n\n // Borders\n 'hairline-default': 'rgba(255, 255, 255, 0.06)',\n 'hairline-subtle': 'rgba(255, 255, 255, 0.03)',\n 'hairline-strong': '#2d323d',\n 'border-focus': '#d4782a',\n 'border-input': '#2d323d',\n 'border-input-hover': '#454c5c',\n 'border-input-focus': '#d4782a',\n 'border-input-error': '#d85c4a',\n\n // Interactive\n 'interactive-hover': 'rgba(255, 255, 255, 0.04)',\n 'interactive-focus': 'rgba(255, 255, 255, 0.12)',\n 'interactive-active': 'rgba(255, 255, 255, 0.16)',\n 'interactive-selected': 'rgba(255, 255, 255, 0.08)',\n\n divider: 'rgba(255, 255, 255, 0.06)',\n\n // Glow RGB values for shadow utilities\n 'brand-primary-rgb': '212, 120, 42',\n 'brand-secondary-rgb': '58, 155, 138',\n 'status-success-rgb': '95, 184, 112',\n 'status-error-rgb': '216, 92, 74',\n 'status-warning-rgb': '212, 164, 58',\n 'status-info-rgb': '90, 143, 212',\n 'background-base-rgb': '10, 11, 13',\n },\n },\n rootClasses: ['atmosphere-warm', 'grain'],\n}\n","// On-surface colour context (TD-05.12).\n//\n// A <Surface> owns a background from the surface ramp AND publishes the current\n// theme mode so descendant text/icons resolve their colour from \"what surface am\n// I on\" instead of a `text-*` className. Those classNames silently fail to black\n// when the tree renders as raw RN in the standalone wall SPA (no global.css, no\n// nativewind), which is the bug class this primitive retires.\nimport { createContext, useContext } from 'react'\nimport { getSemanticColors, type ThemeMode } from '../../../theme/tokens/semantic'\nimport type { SurfaceLevel } from '../../../theme/surface-planes'\n\n// The plane vocabulary lives in the theme so `elevation.ts` can resolve levels\n// to planes without importing a component. Re-exported here for callers that\n// reached it through the Surface module.\nexport {\n SURFACE_LEVEL_TOKEN,\n PLANE_ORDER,\n surfaceBackground,\n pressedLevel,\n raisedLevel,\n type SurfaceLevel,\n} from '../../../theme/surface-planes'\n\ntype ColorToken = keyof ReturnType<typeof getSemanticColors>\n\n/** On-surface neutral text roles, resolved for the current surface + theme. */\nexport type OnSurfaceRole = 'primary' | 'secondary' | 'tertiary'\n\nconst ON_SURFACE_TOKEN = {\n primary: 'text-primary',\n secondary: 'text-secondary',\n tertiary: 'text-tertiary',\n} as const satisfies Record<OnSurfaceRole, ColorToken>\n\nexport interface SurfaceContextValue {\n /** Active theme mode. Defaults to dark (the wall). */\n mode: ThemeMode\n /** Plane of the nearest enclosing Surface. */\n level: SurfaceLevel\n}\n\n// Default context: dark 'base' plane, so descendants OUTSIDE any Surface still\n// resolve to real dark colours (never black) on the dark-only wall.\nconst DEFAULT_CONTEXT: SurfaceContextValue = { mode: 'dark', level: 'base' }\n\nexport const SurfaceContext = createContext<SurfaceContextValue>(DEFAULT_CONTEXT)\n\n/** The nearest surface context ({ mode, level }); default dark 'base'. */\nexport function useSurface(): SurfaceContextValue {\n return useContext(SurfaceContext)\n}\n\n/** The active theme mode from the nearest Surface/provider (default dark). */\nexport function useSurfaceMode(): ThemeMode {\n return useContext(SurfaceContext).mode\n}\n\n/**\n * Literal-hex on-surface neutral text colours for a theme mode. Uses\n * `getSemanticColors` (literal hex), never `resolveColor` (which returns `var()`\n * under the RNW vitest alias), so values stay real in tested component code and\n * on raw-RN surfaces alike.\n */\nexport function onSurfaceColors(mode: ThemeMode): Record<OnSurfaceRole, string> {\n const c = getSemanticColors(mode)\n return {\n primary: c[ON_SURFACE_TOKEN.primary],\n secondary: c[ON_SURFACE_TOKEN.secondary],\n tertiary: c[ON_SURFACE_TOKEN.tertiary],\n }\n}\n\n/** Resolve one on-surface text colour for descendants of a Surface. */\nexport function useOnSurfaceColor(role: OnSurfaceRole = 'primary'): string {\n return getSemanticColors(useSurfaceMode())[ON_SURFACE_TOKEN[role]]\n}\n","/**\n * Custom JSX runtime for titan-design's web distribution.\n *\n * Converts className props to $$css style objects at build time,\n * eliminating the need for NativeWind's runtime interopComponents\n * Map lookup. RNW's styleq recognizes $$css objects and applies\n * their values as CSS class names on DOM elements.\n *\n * This file is NOT used by source builds (specimen, storybook,\n * native Metro). It is only inlined into the dist by tsup via\n * an esbuild onResolve plugin.\n */\nimport { jsx as reactJsx, jsxs as reactJsxs, Fragment } from 'react/jsx-runtime'\nimport type { StyleProp } from 'react-native'\n\ntype JsxFn = typeof reactJsx\n\nfunction wrapJsx(fn: JsxFn): JsxFn {\n return function (type, props: Record<string, any>, ...rest) {\n if (props && typeof props.className === 'string' && props.className) {\n const cn = props.className\n const cssStyle = { $$css: true, [cn]: cn } as unknown as StyleProp<any>\n const existing = props.style\n props = {\n ...props,\n style: existing ? [cssStyle, existing] : cssStyle,\n }\n delete props.className\n }\n return fn(type, props, ...rest)\n } as JsxFn\n}\n\nconst jsx = wrapJsx(reactJsx)\nconst jsxs = wrapJsx(reactJsxs)\n\nexport { jsx, jsxs, Fragment }\n","// Cross-platform theme provider (TD native-theming).\n//\n// Registers titan's semantic color tokens as runtime CSS variables via\n// nativewind's `vars()` so that className color tokens (`text-text-secondary`,\n// `bg-surface-raised`, `border-hairline`, …) resolve on NATIVE React Native — the\n// native equivalent of the `:root {}` block `global.css` provides on web.\n//\n// Why this exists: titan's Workout organisms reference semantic colors as CSS\n// variables. On web (the dashboard, react-native-web) those come from\n// `global.css`. On native (the mobile app) nothing defined them, so any titan\n// component using a `--color-*` token rendered with an unresolved (black) color.\n// Wrap the mobile app root in `<ThemeProvider>` and the tokens resolve on-device.\n//\n// The var maps are the SAME canonical `darkThemeCSSVars` / `lightThemeCSSVars`\n// that generate `global.css`, so native and web resolve to identical values.\n//\n// It also seeds the on-surface colour context (`<Surface>`'s mode), so titan's\n// JS-resolved on-surface colours track the same theme as the className tokens.\nimport { vars, useColorScheme } from 'nativewind'\nimport { View, type ViewProps } from 'react-native'\nimport { SurfaceContext } from '../components/ui/surface/SurfaceContext'\nimport { darkThemeCSSVars, lightThemeCSSVars } from './config'\n\n/** `'system'` follows nativewind's `useColorScheme()` (mobile light/dark flip). */\nexport type ThemeProviderMode = 'dark' | 'light' | 'system'\n\n// Precomputed once — `vars()` is pure, so the same style object is reused across\n// renders. Native == web because these are the maps `tokens-css` emits.\nconst MODE_VARS = {\n dark: vars(darkThemeCSSVars),\n light: vars(lightThemeCSSVars),\n}\n\nexport interface ThemeProviderProps extends ViewProps {\n /**\n * Theme mode to register. `'system'` bridges nativewind's `useColorScheme()`\n * so mobile follows the OS light/dark flip; `'dark'`/`'light'` pin it. Mobile\n * is dark-only today, so this defaults to `dark`.\n */\n mode?: ThemeProviderMode\n}\n\n/**\n * Wrap the app root so descendant titan components' `--color-*` className tokens\n * resolve on native. Fills its parent (`flex: 1`) by default; pass `style` to\n * override. On web it is harmless (the dashboard already loads `global.css`).\n */\nexport function ThemeProvider({\n mode = 'dark',\n style,\n children,\n ...props\n}: ThemeProviderProps): React.JSX.Element {\n // `'system'` → follow nativewind's applied scheme, falling back to dark when\n // no scheme is set. `useColorScheme` runs unconditionally (rules of hooks);\n // its result is only used in the `'system'` branch.\n const { colorScheme } = useColorScheme()\n const resolved = mode === 'system' ? (colorScheme ?? 'dark') : mode\n\n return (\n <SurfaceContext.Provider value={{ mode: resolved, level: 'base' }}>\n <View style={[MODE_VARS[resolved], { flex: 1 }, style]} {...props}>\n {children}\n </View>\n </SurfaceContext.Provider>\n )\n}\n"]}
|