@titan-design/react-ui 0.11.0 → 0.12.1

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.
Files changed (152) hide show
  1. package/dist/bodymap.js +173 -343
  2. package/dist/bodymap.js.map +1 -1
  3. package/dist/bodymap.mjs +173 -343
  4. package/dist/bodymap.mjs.map +1 -1
  5. package/dist/index.d.mts +27 -22
  6. package/dist/index.d.ts +27 -22
  7. package/dist/index.js +366 -561
  8. package/dist/index.js.map +1 -1
  9. package/dist/index.mjs +360 -553
  10. package/dist/index.mjs.map +1 -1
  11. package/dist/pages.js +242 -407
  12. package/dist/pages.js.map +1 -1
  13. package/dist/pages.mjs +242 -407
  14. package/dist/pages.mjs.map +1 -1
  15. package/dist/theme/index.d.mts +250 -1157
  16. package/dist/theme/index.d.ts +250 -1157
  17. package/dist/theme/index.js +234 -408
  18. package/dist/theme/index.js.map +1 -1
  19. package/dist/theme/index.mjs +227 -399
  20. package/dist/theme/index.mjs.map +1 -1
  21. package/dist/theme/tokens-css.js +141 -140
  22. package/dist/theme/tokens-css.js.map +1 -1
  23. package/dist/theme/tokens-css.mjs +141 -140
  24. package/dist/theme/tokens-css.mjs.map +1 -1
  25. package/dist/theme/tokens.d.mts +904 -0
  26. package/dist/theme/tokens.d.ts +904 -0
  27. package/dist/theme/tokens.js +856 -0
  28. package/dist/theme/tokens.js.map +1 -0
  29. package/dist/theme/tokens.mjs +833 -0
  30. package/dist/theme/tokens.mjs.map +1 -0
  31. package/package.json +7 -1
  32. package/src/arch/Architecture.stories.tsx +9 -9
  33. package/src/components/custom/DateTime/DateTime.stories.tsx +1 -1
  34. package/src/components/custom/Fatigue/DualGhostSpark.stories.tsx +3 -3
  35. package/src/components/custom/Fatigue/FatigueLights.stories.tsx +2 -2
  36. package/src/components/custom/Fatigue/GhostSpark.stories.tsx +3 -3
  37. package/src/components/custom/Fatigue/LiveFatigueCard.tsx +1 -1
  38. package/src/components/custom/Fatigue/LiveFatiguePanel.stories.tsx +2 -2
  39. package/src/components/custom/Fatigue/RomProgressionChart.stories.tsx +2 -2
  40. package/src/components/custom/Fatigue/SilverRedPalette.stories.tsx +4 -4
  41. package/src/components/custom/Fatigue/VelocityHero.stories.tsx +3 -3
  42. package/src/components/custom/Fatigue/VerdictHero.stories.tsx +2 -2
  43. package/src/components/custom/Fatigue/fatigue-tokens.ts +12 -12
  44. package/src/components/custom/Sidebar/Sidebar.tsx +4 -4
  45. package/src/components/custom/Table/Table.tsx +2 -2
  46. package/src/components/custom/Workout/ActiveWorkoutPage.tsx +3 -3
  47. package/src/components/custom/Workout/BaseBadge.test.tsx +6 -1
  48. package/src/components/custom/Workout/BaseBadge.tsx +1 -1
  49. package/src/components/custom/Workout/BodyMap.tsx +2 -2
  50. package/src/components/custom/Workout/BodyMapDetailPanel.tsx +2 -2
  51. package/src/components/custom/Workout/DeviationBar.test.tsx +2 -1
  52. package/src/components/custom/Workout/DeviationBar.tsx +3 -2
  53. package/src/components/custom/Workout/ExerciseCard.test.tsx +3 -3
  54. package/src/components/custom/Workout/ExerciseCard.tsx +2 -2
  55. package/src/components/custom/Workout/ExerciseDetailPage.tsx +4 -4
  56. package/src/components/custom/Workout/InputBar.tsx +2 -2
  57. package/src/components/custom/Workout/LiveAuraFrame.stories.tsx +1 -1
  58. package/src/components/custom/Workout/LiveAuraFrame.test.tsx +1 -1
  59. package/src/components/custom/Workout/LiveAuraFrame.tsx +3 -3
  60. package/src/components/custom/Workout/MesoCard.tsx +3 -1
  61. package/src/components/custom/Workout/MuscleGroupChip.tsx +4 -3
  62. package/src/components/custom/Workout/PrHistoryModal.tsx +2 -2
  63. package/src/components/custom/Workout/ProgramPlanningPage.tsx +1 -1
  64. package/src/components/custom/Workout/README.md +1 -1
  65. package/src/components/custom/Workout/ReadinessCheck.tsx +2 -2
  66. package/src/components/custom/Workout/RestTimer.tsx +2 -2
  67. package/src/components/custom/Workout/S3SetTypes.stories.tsx +3 -3
  68. package/src/components/custom/Workout/SessionHeader.stories.tsx +2 -2
  69. package/src/components/custom/Workout/SessionHeader.tsx +1 -1
  70. package/src/components/custom/Workout/SessionRail.stories.tsx +2 -2
  71. package/src/components/custom/Workout/SessionRail.tsx +13 -5
  72. package/src/components/custom/Workout/SetBar.tsx +3 -3
  73. package/src/components/custom/Workout/SetRow.test.tsx +6 -3
  74. package/src/components/custom/Workout/StatusDot.tsx +5 -4
  75. package/src/components/custom/Workout/StrengthTrendChart.tsx +1 -1
  76. package/src/components/custom/Workout/TrainingStatusPage.tsx +2 -2
  77. package/src/components/custom/Workout/VelocityStrip.test.tsx +5 -2
  78. package/src/components/custom/Workout/VelocityStrip.tsx +4 -4
  79. package/src/components/custom/Workout/VolumeLandmarkBar.tsx +3 -3
  80. package/src/components/custom/Workout/WeightBadge.test.tsx +6 -1
  81. package/src/components/custom/Workout/WeightBadge.tsx +2 -1
  82. package/src/components/custom/Workout/WorkoutCard.tsx +3 -1
  83. package/src/components/custom/Workout/WorkoutPill.tsx +5 -2
  84. package/src/components/custom/Workout/ZoneTrack.tsx +4 -4
  85. package/src/components/custom/Workout/setHeadingKit.tsx +14 -8
  86. package/src/components/custom/Workout/velocity-story-kit.tsx +2 -2
  87. package/src/components/custom/charts/SetBarChart.tsx +3 -3
  88. package/src/components/custom/stepper/Stepper.stories.tsx +1 -1
  89. package/src/components/custom/stepper/Stepper.tsx +3 -3
  90. package/src/components/shell/DeviceMenu.tsx +2 -2
  91. package/src/components/shell/README.md +1 -1
  92. package/src/components/shell/SessionRailSpecimen.stories.tsx +1 -1
  93. package/src/components/shell/SideNav.tsx +1 -1
  94. package/src/components/shell/TopBar.tsx +1 -1
  95. package/src/components/ui/autocomplete/Autocomplete.stories.tsx +1 -1
  96. package/src/components/ui/autocomplete/Autocomplete.tsx +1 -1
  97. package/src/components/ui/avatar/Avatar.tsx +2 -2
  98. package/src/components/ui/badge/Badge.tsx +2 -2
  99. package/src/components/ui/card/Card.tsx +3 -3
  100. package/src/components/ui/checkbox/Checkbox.tsx +1 -1
  101. package/src/components/ui/collapse/Collapse.tsx +1 -1
  102. package/src/components/ui/data-row/DataRow.stories.tsx +1 -1
  103. package/src/components/ui/drawer/Drawer.tsx +3 -3
  104. package/src/components/ui/form-field/FormField.tsx +1 -1
  105. package/src/components/ui/help-tip/HelpTip.tsx +1 -1
  106. package/src/components/ui/menu/Menu.tsx +2 -2
  107. package/src/components/ui/pill/Pill.tsx +2 -2
  108. package/src/components/ui/popover/Popover.stories.tsx +2 -2
  109. package/src/components/ui/popover/Popover.tsx +1 -1
  110. package/src/components/ui/progress/Progress.tsx +3 -3
  111. package/src/components/ui/radio/Radio.stories.tsx +1 -1
  112. package/src/components/ui/radio/Radio.tsx +4 -4
  113. package/src/components/ui/select/Select.tsx +3 -3
  114. package/src/components/ui/surface/Surface.stories.tsx +3 -3
  115. package/src/components/ui/surface/Surface.test.tsx +32 -19
  116. package/src/components/ui/surface/Surface.tsx +3 -3
  117. package/src/components/ui/surface/SurfaceContext.ts +19 -29
  118. package/src/components/ui/surface/surface.contract.test.ts +58 -45
  119. package/src/components/ui/switch/Switch.tsx +1 -1
  120. package/src/components/ui/tabs/Tabs.tsx +2 -2
  121. package/src/components/ui/toolbar-button/ToolbarButton.stories.tsx +5 -5
  122. package/src/components/ui/toolbar-button/ToolbarButton.test.tsx +1 -1
  123. package/src/components/ui/toolbar-button/ToolbarButton.tsx +36 -22
  124. package/src/stories/PresetShowcase.stories.tsx +21 -21
  125. package/src/theme/ColorPalettes.stories.tsx +41 -38
  126. package/src/theme/ColorPrimitives.stories.tsx +89 -41
  127. package/src/theme/Depth.stories.tsx +312 -0
  128. package/src/theme/DepthCalibration.stories.tsx +655 -0
  129. package/src/theme/ThemeProvider.tsx +1 -1
  130. package/src/theme/barrel.ts +7 -14
  131. package/src/theme/color-stories.coverage.test.ts +15 -20
  132. package/src/theme/color-story-kit.tsx +1 -1
  133. package/src/theme/color-utils.ts +197 -0
  134. package/src/theme/config.ts +0 -8
  135. package/src/theme/depth-calibration.test.tsx +97 -0
  136. package/src/theme/elevation.test.ts +62 -1
  137. package/src/theme/elevation.ts +34 -8
  138. package/src/theme/global.css +47 -53
  139. package/src/theme/grey-ramp.test.ts +166 -0
  140. package/src/theme/materials.test.ts +106 -0
  141. package/src/theme/materials.ts +211 -0
  142. package/src/theme/presets/audiobook.ts +4 -4
  143. package/src/theme/presets/types.ts +3 -3
  144. package/src/theme/semantic-contrast.test.ts +83 -0
  145. package/src/theme/token-export-guard.test.ts +104 -0
  146. package/src/theme/tokens/primitives.ts +63 -116
  147. package/src/theme/tokens/semantic.ts +130 -82
  148. package/src/utils/colors.ts +1 -1
  149. package/tailwind.config.js +2 -5
  150. package/src/theme/bar-paper.ts +0 -59
  151. package/src/theme/shadows.stories.tsx +0 -523
  152. package/src/theme/shadows.ts +0 -439
@@ -2,52 +2,37 @@
2
2
 
3
3
  // src/theme/tokens/primitives.ts
4
4
  var primitiveColors = {
5
- // Blue scale
6
- blue: {
7
- 400: "#60A5FA",
8
- 600: "#5048E5",
9
- 700: "#3832A0"},
10
- // Red scale
11
- red: {
12
- 500: "#EF4444",
13
- 600: "#D14343"},
14
- // Vivid red scale
15
- redVivid: {
16
- 400: "#FF6070",
17
- 500: "#FF4757",
18
- 700: "#C42539"},
19
- // Neutral/Gray scale
20
- neutral: {
21
- 50: "#FAFAFA",
22
- 100: "#F3F4F6",
23
- 300: "#D1D5DB",
24
- 400: "#9CA3AF",
25
- 500: "#6B7280",
26
- 600: "#4B5563",
27
- 900: "#111827"},
28
- // Charcoal scale (dark backgrounds)
29
- charcoal: {
30
- 200: "#3C3C3C",
31
- 300: "#2C2C2C",
32
- 400: "#1F1F1F",
33
- 500: "#1C1C1C"},
34
- // Pure colors
35
5
  white: "#FFFFFF"};
36
- var surfaceRampDark = {
37
- inset: "#13100D",
38
- // L*4.5 — sub-shell well / pressed
39
- background: "#1C1916",
40
- // L*9 — shell / frame
41
- base: "#252321",
42
- // L*13.5 — main content plane
43
- elevated: "#2C2A28",
44
- // L*17 — nav / rail
45
- raised: "#31302F",
46
- // L*20 — cards
47
- overlay: "#373635"
48
- // L*22.5 — hero / popover
6
+ var greyRamp = {
7
+ 50: "#F9F6F3",
8
+ // L*97.0 W6
9
+ 100: "#EDEAE7",
10
+ // L*92.8 W6
11
+ 200: "#D4D1CE",
12
+ // L*75.7 W6
13
+ 400: "#A29F9D",
14
+ // L*65.7 W5
15
+ 500: "#888684",
16
+ // L*56.0 W4
17
+ 600: "#72716F",
18
+ // L*47.7 W3
19
+ 700: "#5A5958",
20
+ // L*37.9 W2
21
+ 800: "#424140",
22
+ // L*27.6 W2 — generated bridge
23
+ 850: "#373635",
24
+ // L*22.7 W2 — surface overlay
25
+ 875: "#31302F",
26
+ // L*19.9 W2 — surface raised
27
+ 900: "#2C2A28",
28
+ // L*17.2 W4 — surface elevated
29
+ 925: "#252321",
30
+ // L*13.9 W4 — surface base
31
+ 950: "#1C1916",
32
+ // L*9.0 W6 — background base / shell
33
+ 975: "#100D0A"
34
+ // L*3.8 W6 — background frame / bezel
49
35
  };
50
- var backgroundFrameDark = "#100D0A";
51
36
  var primitiveRamps = {
52
37
  red: {
53
38
  50: "#FFF4F4",
@@ -83,9 +68,11 @@ var primitiveRamps = {
83
68
  blue: {
84
69
  50: "#EFF8FF",
85
70
  300: "#78C2FF",
71
+ 400: "#3CA8FF",
86
72
  500: "#2196F3",
87
73
  // pin
88
- 600: "#1072CB"}};
74
+ 600: "#1072CB",
75
+ 700: "#135AA8"}};
89
76
  var discreteRainbow = [
90
77
  "#E8ECFB",
91
78
  "#D9CCE3",
@@ -148,10 +135,10 @@ var semanticColorsLight = {
148
135
  "status-error-light": primitiveRamps.red[500],
149
136
  "status-error-dark": primitiveRamps.red[700],
150
137
  "status-error-subtle": primitiveRamps.red[50],
151
- "status-error-vivid": primitiveColors.redVivid[500],
138
+ "status-error-vivid": primitiveRamps.red[600],
152
139
  // vivid alert red
153
- "status-error-vivid-light": primitiveColors.redVivid[400],
154
- "status-error-vivid-dark": primitiveColors.redVivid[700],
140
+ "status-error-vivid-light": primitiveRamps.red[500],
141
+ "status-error-vivid-dark": primitiveRamps.red[700],
155
142
  "status-error-vivid-subtle": "rgba(255, 71, 87, 0.12)",
156
143
  "status-warning": primitiveRamps.amber[300],
157
144
  "status-warning-light": primitiveRamps.amber[200],
@@ -178,7 +165,7 @@ var semanticColorsLight = {
178
165
  "result-inconclusive": "#9E9A97",
179
166
  // Gray - no clear result
180
167
  "result-inconclusive-light": "rgba(158, 154, 151, 0.12)",
181
- "result-neutral": primitiveColors.neutral[500],
168
+ "result-neutral": greyRamp[600],
182
169
  // Neutral baseline
183
170
  // Text on result backgrounds (on-result-*)
184
171
  "on-result-improve": primitiveColors.white,
@@ -209,47 +196,38 @@ var semanticColorsLight = {
209
196
  // Text colors (text-*)
210
197
  "text-primary": "#121828",
211
198
  "text-secondary": "#65748B",
212
- "text-tertiary": primitiveColors.neutral[400],
199
+ "text-tertiary": greyRamp[400],
213
200
  "text-disabled": "rgba(55, 65, 81, 0.48)",
214
201
  "text-inverse": primitiveColors.white,
215
- "text-link": primitiveColors.blue[600],
216
- "text-link-hover": primitiveColors.blue[700],
202
+ "text-link": primitiveRamps.blue[600],
203
+ "text-link-hover": primitiveRamps.blue[700],
217
204
  // Surface colors (surface-*) - for elevated containers
218
205
  "surface-base": primitiveColors.white,
219
- "surface-elevated": primitiveColors.neutral[50],
206
+ "surface-elevated": greyRamp[50],
220
207
  // slightly off-white for elevated cards
221
- "surface-raised": primitiveColors.neutral[100],
208
+ "surface-raised": greyRamp[100],
222
209
  // light gray for raised cards
223
210
  "surface-overlay": primitiveColors.white,
224
- "surface-input": primitiveColors.neutral[50],
211
+ "surface-input": greyRamp[50],
225
212
  // Input field background (filled variant)
226
- // Deepest pressed pit (TD-surface-tokens, S-3) — light-mode counterpart of
227
- // the dark ramp's `inset` plane; a placeholder pairing, not part of the
228
- // dark-ramp investigation (surface.contract.test.ts is dark-mode only).
229
- "surface-inset": primitiveColors.neutral[300],
230
213
  // Background colors (background-*)
231
214
  "background-base": "#EBEBEB",
232
215
  "background-default": primitiveColors.white,
233
- "background-subtle": primitiveColors.neutral[50],
234
- // Frame/bezel chrome (TD-surface-tokens, S-3) — top bar + side nav shell,
235
- // one step below `background-base` (darker still than `surface-inset`
236
- // above, mirroring the dark-mode ordering). Placeholder pairing for light
237
- // mode (see dark-mode note on `surface-inset` above).
238
- "background-frame": primitiveColors.neutral[400],
216
+ "background-subtle": greyRamp[50],
217
+ // Frame/bezel chrome — top bar + side nav shell, one step below
218
+ // `background-base`. Placeholder pairing for light mode, which is deferred.
219
+ "background-frame": greyRamp[400],
239
220
  // Border colors (border-*)
240
- "border-default": "#E8E9EB",
241
- "border-subtle": primitiveColors.neutral[100],
242
- "border-strong": primitiveColors.neutral[300],
243
- "border-prominent": primitiveColors.neutral[400],
221
+ "border-prominent": greyRamp[400],
244
222
  // high-visibility divider
245
- "border-focus": primitiveColors.blue[600],
246
- "border-input": primitiveColors.neutral[300],
223
+ "border-focus": primitiveRamps.blue[600],
224
+ "border-input": greyRamp[200],
247
225
  // Input field border
248
- "border-input-hover": primitiveColors.neutral[400],
226
+ "border-input-hover": greyRamp[400],
249
227
  // Input field border on hover
250
- "border-input-focus": primitiveColors.blue[600],
228
+ "border-input-focus": primitiveRamps.blue[600],
251
229
  // Input field border on focus
252
- "border-input-error": primitiveColors.red[600],
230
+ "border-input-error": primitiveRamps.red[600],
253
231
  // Input field border on error
254
232
  // Alpha hairline separators (surface-independent — composite toward black on
255
233
  // light surfaces, mirroring the dark-mode white-alpha family). See §4/S-2.
@@ -266,7 +244,7 @@ var semanticColorsLight = {
266
244
  // Divider
267
245
  "divider": "#E8E9EB",
268
246
  // Avatar default
269
- "avatar-background": primitiveColors.neutral[500],
247
+ "avatar-background": greyRamp[600],
270
248
  "avatar-text": primitiveColors.white
271
249
  };
272
250
  var semanticColorsDark = {
@@ -298,9 +276,9 @@ var semanticColorsDark = {
298
276
  "status-error-light": primitiveRamps.red[500],
299
277
  "status-error-dark": primitiveRamps.red[700],
300
278
  "status-error-subtle": "rgba(209, 67, 67, 0.12)",
301
- "status-error-vivid": primitiveColors.redVivid[500],
302
- "status-error-vivid-light": primitiveColors.redVivid[400],
303
- "status-error-vivid-dark": primitiveColors.redVivid[700],
279
+ "status-error-vivid": primitiveRamps.red[600],
280
+ "status-error-vivid-light": primitiveRamps.red[500],
281
+ "status-error-vivid-dark": primitiveRamps.red[700],
304
282
  "status-error-vivid-subtle": "rgba(255, 71, 87, 0.12)",
305
283
  "status-warning": primitiveRamps.amber[300],
306
284
  "status-warning-light": primitiveRamps.amber[200],
@@ -324,7 +302,7 @@ var semanticColorsDark = {
324
302
  "result-degrade-dark": "#b30000",
325
303
  "result-inconclusive": "#9E9A97",
326
304
  "result-inconclusive-light": "rgba(158, 154, 151, 0.16)",
327
- "result-neutral": primitiveColors.neutral[400],
305
+ "result-neutral": greyRamp[400],
328
306
  // Text on result backgrounds
329
307
  "on-result-improve": primitiveColors.white,
330
308
  "on-result-degrade": primitiveColors.white,
@@ -341,74 +319,106 @@ var semanticColorsDark = {
341
319
  "data-9": discreteRainbow[3],
342
320
  "data-10": discreteRainbow[22],
343
321
  // Text colors - inverted for dark mode
344
- "text-primary": primitiveColors.neutral[100],
345
- "text-secondary": primitiveColors.neutral[400],
346
- "text-tertiary": primitiveColors.neutral[500],
322
+ "text-primary": greyRamp[50],
323
+ "text-secondary": greyRamp[400],
324
+ // Deliberately ONE step lighter than the L*-nearest match (`greyRamp[600]`).
325
+ // The colour this replaced failed WCAG large-text outright on the three
326
+ // lightest planes — 2.96 / 2.72 / 2.49 against elevated / raised / overlay —
327
+ // and `600` carried that failure forward almost exactly (2.93 / 2.70 / 2.47).
328
+ // `500` clears 3:1 everywhere (3.32–5.34). Contrast beats colour fidelity for
329
+ // text roles; borders and surfaces still use strict L*-nearest. See
330
+ // semantic-contrast.test.ts, which fails if this is moved back down.
331
+ "text-tertiary": greyRamp[500],
347
332
  "text-disabled": "rgba(255, 255, 255, 0.38)",
348
- "text-inverse": primitiveColors.neutral[900],
333
+ "text-inverse": greyRamp[950],
349
334
  "text-link": "#828DF8",
350
- "text-link-hover": primitiveColors.blue[400],
335
+ "text-link-hover": primitiveRamps.blue[400],
351
336
  // Surface colors - dark backgrounds — warm-tapered DERIVED ramp (TD-surface-tokens,
352
337
  // S-1, re-spaced S-3). Shipped verbatim from `deriveSurfaceRamp()` — see
353
338
  // `surfaceRampDark` in primitives.ts for the full derivation note. `surface-overlay`
354
339
  // and `surface-elevated` are distinct (were both #191919 pre-S-1); `surface-input`
355
340
  // tracks one plane above `surface-base`, same relative position as before the remap.
356
341
  // `background-base` backs `Surface level="background"` (SurfaceContext.SURFACE_LEVEL_TOKEN),
357
- // so it takes the ramp's `background` (shell/frame) role, NOT `inset`. The ramp's
358
- // deepest `inset` plane is now promoted to `surface-inset` below (S-3) still no
359
- // `SurfaceLevel` member for it (follow-up, alongside the elevation.ts -1/-2 pressed
360
- // levels — parallel workstream, not this branch).
361
- "surface-base": surfaceRampDark.base,
362
- // main surface (#252321, L*13.5)
363
- "surface-elevated": surfaceRampDark.elevated,
364
- // elevated surface (#2C2A28, L*17 nav/rail)
365
- "surface-raised": surfaceRampDark.raised,
366
- // raised surface (#31302F, L*20 cards)
367
- "surface-overlay": surfaceRampDark.overlay,
368
- // overlay surface (#373635, L*22.5 — hero/popover)
369
- "surface-input": surfaceRampDark.elevated,
342
+ // so it takes the ramp's shell role. The deepest plane is `background-frame`,
343
+ // which is also the `SurfaceLevel` floor a pressed surface clamps at.
344
+ "surface-base": greyRamp[925],
345
+ // main surface (#252321, L*13.9)
346
+ "surface-elevated": greyRamp[900],
347
+ // elevated surface (#2C2A28, L*17.2 — nav/rail)
348
+ "surface-raised": greyRamp[875],
349
+ // raised surface (#31302F, L*19.9 cards)
350
+ "surface-overlay": greyRamp[850],
351
+ // overlay surface (#373635, L*22.7 hero/popover)
352
+ "surface-input": greyRamp[900],
370
353
  // input surface (#2C2A28 — one plane above base)
371
- "surface-inset": surfaceRampDark.inset,
372
- // deepest pressed pit (#13100D, L*4.5 — sub-shell well)
373
354
  // Background colors — same ramp, the frame/shell end of it.
374
- "background-base": surfaceRampDark.background,
375
- // shell / frame (#1C1916, L*9 — Surface level="background")
376
- "background-default": surfaceRampDark.base,
377
- // main background (#252321, L*13.5 — matches surface-base)
378
- "background-subtle": surfaceRampDark.elevated,
379
- // subtle background (#2C2A28, L*17 — matches surface-elevated)
380
- // Frame/bezel chrome (S-3) — the top bar + side nav shell; one step BELOW
381
- // `background-base`, darker even than `surface-inset` it exits the content
382
- // ramp entirely rather than sitting in it. See `backgroundFrameDark` in
383
- // primitives.ts.
384
- "background-frame": backgroundFrameDark,
385
- // frame / bezel (#100D0A, L*3.79)
386
- // Border colors `border-subtle` (#1C1C1C) previously collided with
387
- // `surface-raised` (also #1C1C1C, an invisible border on raised cards). The
388
- // re-spaced ramp above moved `surface-raised` to #2D2C2B, so this value is now
389
- // distinct from every surface hex without needing to change it see
390
- // `surface.contract.test.ts` R2/R4.
391
- "border-default": primitiveColors.charcoal[400],
392
- // default border
393
- "border-subtle": primitiveColors.charcoal[500],
394
- // subtle border
395
- "border-strong": primitiveColors.charcoal[300],
396
- // strong border
397
- "border-prominent": primitiveColors.charcoal[200],
355
+ "background-base": greyRamp[950],
356
+ // shell (#1C1916, L*9 — Surface level="background")
357
+ "background-default": greyRamp[925],
358
+ // main background (#252321, L*13.9 — matches surface-base)
359
+ "background-subtle": greyRamp[900],
360
+ // subtle background (#2C2A28, L*17.2 — matches surface-elevated)
361
+ // Frame/bezel chrome — the top bar + side nav shell, one step BELOW
362
+ // `background-base`. It used to be described as sitting OUTSIDE the ramp; it
363
+ // is simply the ramp's last step now, and the floor `<Surface pressed>` clamps at.
364
+ "background-frame": greyRamp[975],
365
+ // frame / bezel (#100D0A, L*3.8)
366
+ // Border colors — solid dark borders are RETIRED (TD-07.14). Not a preference — a structural
367
+ // consequence of one ramp. Every step from 850 to 975 is now a surface plane,
368
+ // so a solid border dark enough to read as a border necessarily equals some
369
+ // plane's fill, which is exactly the collision `surface.contract.test.ts` R2
370
+ // forbids. The only non-plane steps left in that band are 800 and 700, and
371
+ // borders there jump from L*~10-25 to L*~28-38 — a restyle, not a migration.
372
+ //
373
+ // So separation moves to the alpha hairlines, which dark mode already called
374
+ // "the primary separation cue". Being alpha, they composite against whatever
375
+ // plane they land on and cannot collide with any of them — the problem stops
376
+ // existing rather than being re-solved per plane. The three solid tokens were
377
+ // deleted outright; consumers point at the `hairline-*` family below.
378
+ //
379
+ // `border-prominent` stays SOLID: it is the one border meant to be seen
380
+ // outright (4 call sites, high-visibility dividers), and grey-800 is not a
381
+ // plane, so it keeps its job without collision.
382
+ "border-prominent": greyRamp[800],
398
383
  // high-visibility divider
399
384
  "border-focus": "#828DF8",
400
- "border-input": primitiveColors.neutral[600],
401
- "border-input-hover": primitiveColors.neutral[500],
385
+ "border-input": greyRamp[700],
386
+ "border-input-hover": greyRamp[600],
402
387
  "border-input-focus": "#828DF8",
403
- "border-input-error": primitiveColors.red[500],
388
+ "border-input-error": primitiveRamps.red[500],
404
389
  // Alpha hairline separators — the primary separation cue (§4/S-2). Self-
405
390
  // normalizing: composites toward white by ~the same amount on ANY plane, so
406
391
  // one family works at every elevation instead of per-surface border tokens.
407
392
  // Shadows are demoted to floating-overlay use only (not shipped as a fill
408
393
  // separator here — see elevation.ts, follow-up S-4).
409
- "hairline-subtle": "rgba(255, 255, 255, 0.06)",
410
- "hairline-default": "rgba(255, 255, 255, 0.09)",
411
- "hairline-strong": "rgba(255, 255, 255, 0.14)",
394
+ //
395
+ // RETUNED on the wall (VW-99, S-6). The original .06/.09/.14 were set at a
396
+ // desk. On the panel at ~3 m `subtle` rendered but was indiscernible, and
397
+ // `default` — the load-bearing one, with no solid-border fallback since
398
+ // TD-07.14 — went weak on the lightest plane. `strong` read cleanly with room
399
+ // to spare, which is what made raising the whole family viable.
400
+ //
401
+ // Each tier steps up onto the next MEASURED-GOOD rung rather than an
402
+ // interpolated one: the new `subtle` is the old `default`, and the new
403
+ // `default` is the old `strong` — a value just confirmed legible on all four
404
+ // planes. Spacing goes 1 : 1.56 : 2.33, against the original 1 : 1.5 : 2.33.
405
+ //
406
+ // RUN 2 (VW-99): all three tiers were seen on all four planes — the retune
407
+ // worked — but `subtle` was still "a bit hard to read", so the whole family
408
+ // took a further +.01. That is a comfort margin on a passing row, not a fix
409
+ // for a failing one, which is why it is a flat offset: the 1 : 1.56 : 2.33
410
+ // spacing that the run validated is preserved rather than re-derived.
411
+ //
412
+ // Keep these to TWO decimals. react-native-web quantises alpha to 8 bits, so
413
+ // a 3-decimal value silently rounds on the way to the DOM (.135 renders as
414
+ // .13) — the token would say one thing and paint another.
415
+ //
416
+ // DARK ONLY. The light family above composites toward BLACK on light planes,
417
+ // which this run says nothing about — do not mirror these numbers into it
418
+ // without its own verification.
419
+ "hairline-subtle": "rgba(255, 255, 255, 0.10)",
420
+ "hairline-default": "rgba(255, 255, 255, 0.15)",
421
+ "hairline-strong": "rgba(255, 255, 255, 0.22)",
412
422
  // Interactive states
413
423
  "interactive-hover": "rgba(255, 255, 255, 0.04)",
414
424
  "interactive-focus": "rgba(255, 255, 255, 0.12)",
@@ -417,10 +427,9 @@ var semanticColorsDark = {
417
427
  "interactive-disabled": "rgba(255, 255, 255, 0.12)",
418
428
  "interactive-disabled-text": "rgba(255, 255, 255, 0.26)",
419
429
  // Divider
420
- "divider": primitiveColors.charcoal[400],
421
- // divider color
430
+ "divider": "rgba(255, 255, 255, 0.09)",
422
431
  // Avatar default
423
- "avatar-background": primitiveColors.neutral[600],
432
+ "avatar-background": greyRamp[700],
424
433
  "avatar-text": primitiveColors.white
425
434
  };
426
435
 
@@ -482,14 +491,10 @@ var lightThemeCSSVars = {
482
491
  "--color-surface-base": semanticColorsLight["surface-base"],
483
492
  "--color-surface-elevated": semanticColorsLight["surface-elevated"],
484
493
  "--color-surface-raised": semanticColorsLight["surface-raised"],
485
- "--color-surface-inset": semanticColorsLight["surface-inset"],
486
494
  "--color-background-base": semanticColorsLight["background-base"],
487
495
  "--color-background-default": semanticColorsLight["background-default"],
488
496
  "--color-background-subtle": semanticColorsLight["background-subtle"],
489
497
  "--color-background-frame": semanticColorsLight["background-frame"],
490
- "--color-border-default": semanticColorsLight["border-default"],
491
- "--color-border-subtle": semanticColorsLight["border-subtle"],
492
- "--color-border-strong": semanticColorsLight["border-strong"],
493
498
  "--color-border-prominent": semanticColorsLight["border-prominent"],
494
499
  "--color-border-focus": semanticColorsLight["border-focus"],
495
500
  "--color-interactive-hover": semanticColorsLight["interactive-hover"],
@@ -585,14 +590,10 @@ var darkThemeCSSVars = {
585
590
  "--color-surface-base": semanticColorsDark["surface-base"],
586
591
  "--color-surface-elevated": semanticColorsDark["surface-elevated"],
587
592
  "--color-surface-raised": semanticColorsDark["surface-raised"],
588
- "--color-surface-inset": semanticColorsDark["surface-inset"],
589
593
  "--color-background-base": semanticColorsDark["background-base"],
590
594
  "--color-background-default": semanticColorsDark["background-default"],
591
595
  "--color-background-subtle": semanticColorsDark["background-subtle"],
592
596
  "--color-background-frame": semanticColorsDark["background-frame"],
593
- "--color-border-default": semanticColorsDark["border-default"],
594
- "--color-border-subtle": semanticColorsDark["border-subtle"],
595
- "--color-border-strong": semanticColorsDark["border-strong"],
596
597
  "--color-border-prominent": semanticColorsDark["border-prominent"],
597
598
  "--color-border-focus": semanticColorsDark["border-focus"],
598
599
  "--color-interactive-hover": semanticColorsDark["interactive-hover"],