basalt-ui 2.15.0 → 2.17.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.
Files changed (152) hide show
  1. package/CHANGELOG.md +157 -105
  2. package/MIGRATING.md +160 -12
  3. package/agent/agents/basalt-design-reviewer.md +3 -3
  4. package/agent/rules/basalt-mantine.md +1 -1
  5. package/agent/skills/basalt-design/SKILL.md +2 -2
  6. package/configs/card-inset.test.ts +57 -0
  7. package/configs/oxlint-basalt.json +1 -1
  8. package/configs/oxlint-plugin.js +42 -18
  9. package/configs/oxlint-plugin.test.ts +37 -6
  10. package/dist/agent/chat/thread-message.js +1 -1
  11. package/dist/agent/chat/thread-outcome-card.js +1 -1
  12. package/dist/charts/ChartCard.js +1 -1
  13. package/dist/charts/Donut.d.ts.map +1 -1
  14. package/dist/charts/Donut.js +2 -2
  15. package/dist/charts/DualPanel.js +2 -2
  16. package/dist/charts/Heatmap.d.ts.map +1 -1
  17. package/dist/charts/Heatmap.js +2 -2
  18. package/dist/charts/MirroredBars.js +2 -2
  19. package/dist/charts/Sparkline.d.ts +4 -2
  20. package/dist/charts/Sparkline.d.ts.map +1 -1
  21. package/dist/charts/Sparkline.js +3 -3
  22. package/dist/charts/chart-card.module.css +2 -2
  23. package/dist/charts/compile.d.ts +8 -3
  24. package/dist/charts/compile.d.ts.map +1 -1
  25. package/dist/charts/compile.js +19 -9
  26. package/dist/charts/cursor.d.ts +14 -1
  27. package/dist/charts/cursor.d.ts.map +1 -1
  28. package/dist/charts/cursor.js +29 -3
  29. package/dist/charts/date-tick-format.d.ts +17 -0
  30. package/dist/charts/date-tick-format.d.ts.map +1 -0
  31. package/dist/charts/date-tick-format.js +81 -0
  32. package/dist/charts/panel.d.ts +2 -1
  33. package/dist/charts/panel.d.ts.map +1 -1
  34. package/dist/charts/panel.js +3 -2
  35. package/dist/charts/types.d.ts +5 -1
  36. package/dist/charts/types.d.ts.map +1 -1
  37. package/dist/cli/shot/board.js +1 -1
  38. package/dist/cli/shot/capture.d.ts +16 -0
  39. package/dist/cli/shot/capture.d.ts.map +1 -1
  40. package/dist/cli/shot/capture.js +24 -3
  41. package/dist/cli/shot/measure.d.ts +21 -2
  42. package/dist/cli/shot/measure.d.ts.map +1 -1
  43. package/dist/cli/shot/measure.js +20 -5
  44. package/dist/cli/shot/playwright.d.ts +4 -0
  45. package/dist/cli/shot/playwright.d.ts.map +1 -1
  46. package/dist/cli/shot/types.d.ts +3 -2
  47. package/dist/cli/shot/types.d.ts.map +1 -1
  48. package/dist/dashboard/delta-badge.d.ts +2 -2
  49. package/dist/dashboard/delta-badge.d.ts.map +1 -1
  50. package/dist/dashboard/delta-badge.js +12 -14
  51. package/dist/dashboard/query-state.d.ts +35 -0
  52. package/dist/dashboard/query-state.d.ts.map +1 -1
  53. package/dist/dashboard/query-state.js +12 -1
  54. package/dist/dashboard/settings-section.d.ts.map +1 -1
  55. package/dist/dashboard/settings-section.js +5 -2
  56. package/dist/dashboard/stat-card-parts.d.ts +40 -0
  57. package/dist/dashboard/stat-card-parts.d.ts.map +1 -0
  58. package/dist/dashboard/stat-card-parts.js +55 -0
  59. package/dist/dashboard/stat-card.d.ts +46 -34
  60. package/dist/dashboard/stat-card.d.ts.map +1 -1
  61. package/dist/dashboard/stat-card.js +157 -88
  62. package/dist/dashboard/stat-card.module.css +222 -9
  63. package/dist/dashboard/stat-card.module.css.d.ts +20 -0
  64. package/dist/dashboard/widget-header.d.ts.map +1 -1
  65. package/dist/dashboard/widget-header.js +73 -9
  66. package/dist/dashboard/widget-header.module.css +28 -20
  67. package/dist/guard/guard-hook.d.ts.map +1 -1
  68. package/dist/guard/index.d.ts +4 -2
  69. package/dist/guard/index.d.ts.map +1 -1
  70. package/dist/guard/index.js +18 -4
  71. package/dist/guard/vx-names.d.ts.map +1 -1
  72. package/dist/guard/vx-names.js +1 -0
  73. package/dist/shell/app-mobile-nav.module.css +2 -2
  74. package/dist/shell/app-sidebar-account.js +1 -1
  75. package/dist/shell/app-sidebar.js +2 -2
  76. package/dist/shell/app-sidebar.module.css +8 -8
  77. package/dist/shell/index.js +5 -1
  78. package/dist/shell/page-bar.js +1 -1
  79. package/dist/table/data-table.d.ts.map +1 -1
  80. package/dist/table/data-table.js +3 -0
  81. package/dist/theme/chrome-vars.d.ts +82 -0
  82. package/dist/theme/chrome-vars.d.ts.map +1 -0
  83. package/dist/theme/chrome-vars.js +36 -0
  84. package/dist/theme/controls.module.css +20 -1
  85. package/dist/theme/controls.module.css.d.ts +1 -0
  86. package/dist/theme/index.d.ts.map +1 -1
  87. package/dist/theme/index.js +61 -54
  88. package/dist/tokens/core.d.ts +10 -4
  89. package/dist/tokens/core.d.ts.map +1 -1
  90. package/dist/tokens/core.js +16 -10
  91. package/dist/tokens/ctl-vars.d.ts +15 -0
  92. package/dist/tokens/ctl-vars.d.ts.map +1 -0
  93. package/dist/tokens/ctl-vars.js +22 -0
  94. package/dist/tokens/derive.d.ts.map +1 -1
  95. package/dist/tokens/derive.js +2 -2
  96. package/dist/tokens/palette.d.ts +37 -29
  97. package/dist/tokens/palette.d.ts.map +1 -1
  98. package/dist/tokens/palette.js +32 -21
  99. package/dist/tokens/space-scale.d.ts +14 -0
  100. package/dist/tokens/space-scale.d.ts.map +1 -0
  101. package/dist/tokens/space-scale.js +10 -0
  102. package/llms.txt +6 -3
  103. package/package.json +1 -1
  104. package/src/agent/chat/thread-message.tsx +1 -1
  105. package/src/agent/chat/thread-outcome-card.tsx +2 -2
  106. package/src/charts/ChartCard.tsx +1 -1
  107. package/src/charts/Donut.tsx +2 -2
  108. package/src/charts/DualPanel.tsx +2 -2
  109. package/src/charts/Heatmap.tsx +2 -2
  110. package/src/charts/MirroredBars.tsx +2 -2
  111. package/src/charts/Sparkline.tsx +7 -5
  112. package/src/charts/chart-card.module.css +2 -2
  113. package/src/charts/compile.ts +31 -11
  114. package/src/charts/cursor.ts +48 -3
  115. package/src/charts/date-tick-format.ts +132 -0
  116. package/src/charts/panel.tsx +5 -3
  117. package/src/charts/types.ts +5 -1
  118. package/src/cli/shot/board.ts +1 -1
  119. package/src/cli/shot/capture.ts +35 -3
  120. package/src/cli/shot/measure.ts +33 -6
  121. package/src/cli/shot/playwright.ts +1 -1
  122. package/src/cli/shot/types.ts +3 -2
  123. package/src/dashboard/delta-badge.tsx +24 -18
  124. package/src/dashboard/query-state.tsx +38 -0
  125. package/src/dashboard/settings-section.tsx +5 -2
  126. package/src/dashboard/stat-card-parts.tsx +108 -0
  127. package/src/dashboard/stat-card.module.css +222 -9
  128. package/src/dashboard/stat-card.module.css.d.ts +20 -0
  129. package/src/dashboard/stat-card.tsx +291 -183
  130. package/src/dashboard/widget-header.module.css +28 -20
  131. package/src/dashboard/widget-header.tsx +103 -7
  132. package/src/guard/guard-hook.ts +3 -1
  133. package/src/guard/index.ts +27 -13
  134. package/src/guard/vx-names.ts +1 -0
  135. package/src/shell/app-mobile-nav.module.css +2 -2
  136. package/src/shell/app-sidebar-account.tsx +1 -1
  137. package/src/shell/app-sidebar.module.css +8 -8
  138. package/src/shell/app-sidebar.tsx +2 -2
  139. package/src/shell/index.tsx +10 -4
  140. package/src/shell/page-bar.tsx +1 -1
  141. package/src/table/data-table.tsx +10 -4
  142. package/src/theme/__snapshots__/plain-theme.test.ts.snap +185 -85
  143. package/src/theme/chrome-vars.ts +111 -0
  144. package/src/theme/controls.module.css +20 -1
  145. package/src/theme/controls.module.css.d.ts +1 -0
  146. package/src/theme/ctl-theme.tsx +1 -1
  147. package/src/theme/index.ts +82 -124
  148. package/src/tokens/core.ts +16 -8
  149. package/src/tokens/ctl-vars.ts +32 -0
  150. package/src/tokens/derive.ts +7 -2
  151. package/src/tokens/palette.ts +40 -29
  152. package/src/tokens/space-scale.ts +13 -0
@@ -317,10 +317,15 @@ const INK_TONE: Record<Side, Record<InkKey, number>> = {
317
317
  export type StatusKey = 'good' | 'warn' | 'bad'
318
318
 
319
319
  const STATUS_HUE: Record<StatusKey, number> = { good: 151.975, warn: 76.64, bad: 29.905 }
320
+ // Every stop is read as TEXT somewhere (`DeltaBadge`, a toned breakdown row), so each clears WCAG AA
321
+ // (4.5:1) on every text surface (bg / panel / panelHover / elevated / subtle / field) at the default
322
+ // derive config only (default seed, every level knob 0) — pinned in `derive.test.ts`; a retuned
323
+ // `lightLevel` / `darkLevel` / `neutral` is not covered. `warn` light sat at tone 54.64 (3.64:1 on the panel) and `bad`
324
+ // dark at 58.58 (4.22:1); both moved along their lightness axis only, hue and chroma untouched.
320
325
  const STATUS_STOP: Record<StatusKey, Record<Side, { tone: number; chroma: number }>> = {
321
326
  good: { light: { tone: 45.75, chroma: 37.75 }, dark: { tone: 70.23, chroma: 53.23 } },
322
- warn: { light: { tone: 54.64, chroma: 61.12 }, dark: { tone: 72.34, chroma: 62.55 } },
323
- bad: { light: { tone: 43.86, chroma: 54.46 }, dark: { tone: 58.58, chroma: 53.79 } },
327
+ warn: { light: { tone: 46, chroma: 61.12 }, dark: { tone: 72.34, chroma: 62.55 } },
328
+ bad: { light: { tone: 43.86, chroma: 54.46 }, dark: { tone: 66.5, chroma: 53.79 } },
324
329
  }
325
330
 
326
331
  /**
@@ -29,6 +29,7 @@
29
29
  * `STATUS.excellent`/`STATUS.neutral`) stays hand-authored, unchanged.
30
30
  */
31
31
 
32
+ import { SPACE_SCALE_LEVEL0 } from './space-scale'
32
33
  import { DEFAULT_DERIVE_CONFIG, deriveTokens, isDefaultDeriveConfig } from './derive'
33
34
  import type { DeriveConfig } from './derive'
34
35
  import type { ColorPair } from './core'
@@ -172,10 +173,10 @@ export const RADIUS_LEVEL_RANGE = { min: -5, max: 5 } as const
172
173
  /**
173
174
  * Derive the two radius anchors (`card`/`ctrl`) and their dependent offsets from a single integer
174
175
  * `level` (`docs/DESIGN-SPEC.md` §4) — the radius analog of `deriveTokens`'s color knobs. `level: 0`
175
- * reproduces the shipped identity exactly (`card: 7, ctrl: 6, floating: 8, tight: 5, fine: 4`,
176
+ * reproduces the shipped identity exactly (`card: 10, ctrl: 6, floating: 11, tight: 5, fine: 4`,
176
177
  * locked by `theme/radius.test.ts`).
177
178
  *
178
- * The law: `card = 7 + level`, `ctrl = 6 + level`, both clamped to `≥ 0`; every offset then follows
179
+ * The law: `card = 10 + level`, `ctrl = 6 + level`, both clamped to `≥ 0`; every offset then follows
179
180
  * its anchor — `floating = card + 1`, `tight = ctrl - 1`, `fine = ctrl - 2` — each ALSO clamped to
180
181
  * `≥ 0` (so an aggressive negative level flattens the smaller tiers to square before the larger
181
182
  * ones). The three independent Mantine-scale stops (`RADIUS_STEP.scaleXs/scaleLg/scaleXl`) are not
@@ -194,7 +195,7 @@ export function deriveRadius(level: number): RadiusValues {
194
195
  `deriveRadius: level must be an integer in [${RADIUS_LEVEL_RANGE.min}, ${RADIUS_LEVEL_RANGE.max}], got ${level}`,
195
196
  )
196
197
  }
197
- const card = clampRadius(7 + level)
198
+ const card = clampRadius(10 + level)
198
199
  const ctrl = clampRadius(6 + level)
199
200
  return {
200
201
  card,
@@ -236,7 +237,7 @@ export const RADIUS = {
236
237
  export const RADIUS_STEP = {
237
238
  /** Tooltip / Popover / Modal / Notification (`docs/DESIGN-SPEC.md` §5 floating tier) — one step
238
239
  * above the card radius. */
239
- floating: DEFAULT_RADIUS_VALUES.floating, // 8
240
+ floating: DEFAULT_RADIUS_VALUES.floating, // 11
240
241
  /** SegmentedControl's active indicator, Kbd, Code — one step below the control radius. */
241
242
  tight: DEFAULT_RADIUS_VALUES.tight, // 5
242
243
  /** Progress bar, and the Mantine scale's `sm` step — two steps below the control radius. */
@@ -317,10 +318,16 @@ const SPACE_ANCHORS_BASE = {
317
318
  * 32, up from 30. At 30 this tier was the ONLY chrome number in the shell that did not agree with
318
319
  * its neighbours: the sidebar search trigger is 32 (`sidebarSearchTriggerHeight`), a sidebar block
319
320
  * row is 32 (`sidebarBlockRowHeight`), and a NavLink row resolves to ~32 (`2 * rowInsetY +
320
- * rowLineHeight * text.md`) — so a `size="ctl"` button sitting beside any of them read 2px short
321
+ * rowLineHeight * text.sm`, 12 + 1.54 * 13 = 32.02) — so a `size="ctl"` button sitting beside any of them read 2px short
321
322
  * and the whole band looked unresolved. 32 lands the entire chrome tier on ONE number, which is
322
323
  * also the smallest square that still holds a 16px icon with a 8px surround. */
323
324
  controlHeightCtl: 32,
325
+ /** The DENSE control tier (`docs/waves/design-parity/SPEC.md` § 5, D6) — INTERNAL, no public export.
326
+ * `BasaltDataTable`'s toolbar and `FilterSet` rows re-point the `ctl` tier's size vars at this
327
+ * (`styles.css`, `[data-basalt-dense]`) at FINE pointers only, so a search, its filter pills and the
328
+ * actions share one row at 1440. A coarse pointer keeps `ctl` and the 44px hit overlay. Floored at
329
+ * 24px in {@link deriveSpacing} (WCAG 2.5.8). */
330
+ controlHeightDense: 28,
324
331
  } as const
325
332
 
326
333
  /**
@@ -338,13 +345,7 @@ const SPACE_ANCHORS_BASE = {
338
345
  * control tier IS the `md` stop, hence `defaultRadius: 'md'` — no such relation exists here). Base
339
346
  * table for {@link deriveSpacing}.
340
347
  */
341
- const SPACE_SCALE_BASE = {
342
- xs: 11,
343
- sm: 13,
344
- md: 18,
345
- lg: 20,
346
- xl: 26,
347
- } as const
348
+ const SPACE_SCALE_BASE = SPACE_SCALE_LEVEL0
348
349
 
349
350
  /**
350
351
  * Density-tracking, genuine one-offs — named insets that fit neither the anchor vertical rhythm/
@@ -659,6 +660,11 @@ const SPACE_STEP_BASE = {
659
660
  * (`shell/app-brand.module.css`), so the page gutter is free to be a gutter. The header's
660
661
  * breadcrumb, the page-bar band and Main all land on this one number. */
661
662
  appShellInset: 16,
663
+ /** The page gutter at the EXPANDED size class only — a TRIAL (`docs/waves/design-parity/SPEC.md`
664
+ * D7): the reference measures 24 at 1440, and 16 was a deliberate earlier choice down from 20, so
665
+ * the wider gutter applies where the evidence is and is reverted by setting this to
666
+ * `appShellInset` (one line). Medium keeps `appShellInset`, compact keeps `appShellInsetMobile`. */
667
+ appShellInsetExpanded: 24,
662
668
  /** The page gutter BELOW `sm` — the phone half of `appShellInset` above. A separate entry rather
663
669
  * than one responsive value for the same reason `appShellNavbarWidth` is one: there is no sidebar
664
670
  * seam to align to on a phone, so the number is answering a different question (how much of a
@@ -762,7 +768,7 @@ const SPACE_STEP_BASE = {
762
768
  // it never moved, so a 390px phone still read "content spacing too big" after the gutter fix.
763
769
  //
764
770
  // Each value is deliberately the rung of an existing ladder rather than a fresh literal: the card
765
- // inset IS `SPACE_SCALE.xs`/`.sm` (which is what `StatCard`/`ChartCard` spelled as
771
+ // inset IS `SPACE_SCALE.sm`/`.md` (12/16; the compact horizontal step is `.sm`) (which is what `StatCard`/`ChartCard` spelled as
766
772
  // `--mantine-spacing-xs`/`-sm` before they were named here) and the Section gap IS
767
773
  // `SPACE.stackMd`. Naming them buys the ROLE, not a new number — a role the `< sm` override can
768
774
  // then re-point without touching the scale every other consumer of `xs`/`sm` reads.
@@ -776,10 +782,10 @@ const SPACE_STEP_BASE = {
776
782
  * must render identically (a StatCard and a ChartCard sit in the same grid row). Does NOT step
777
783
  * below `sm`: the phone is short of WIDTH, and shaving the vertical inset of a card that already
778
784
  * hugs its content buys a few pixels at the cost of the card's own breathing room. */
779
- cardInsetY: 11,
785
+ cardInsetY: 12,
780
786
  /** Card inset, HORIZONTAL — same two files, same must-match reason. This IS the half that steps
781
- * below `sm` (to `SPACE_SCALE.xs`), because horizontal is where a 390px viewport is short. */
782
- cardInsetX: 13,
787
+ * in a compact container (to `SPACE_SCALE.sm`, 12), because horizontal is where a 390px viewport is short. */
788
+ cardInsetX: 16,
783
789
  /** `dashboard/section.module.css`'s header→body and body-child gap — a page-level GROUPING
784
790
  * rhythm, which is why it reads the stack scale rather than the card-inset one. Steps to
785
791
  * `SPACE.stackSm` below `sm`. Distinct from `sidebarSectionGap` above, which is the gap between
@@ -834,10 +840,11 @@ export const SPACE_FIXED = {
834
840
  readingProgressHeight: 2,
835
841
  /** SegmentedControl track's optical inset (`styles.root` padding) — moved OUT of `SPACE_STEP` and
836
842
  * exempted from the density knob because it is load-bearing for the nested-corner law
837
- * (docs/DESIGN-SPEC.md §4): `RADIUS.card === RADIUS_STEP.tight + segmentedTrackInset` (`7 = 5 +
838
- * 2`). `RADIUS.card`/`RADIUS_STEP.tight` both shift together under the RADIUS knob (`card = 7 +
839
- * level`, `tight = ctrl - 1 = 5 + level`), so their difference is ALWAYS exactly 2 regardless of
840
- * that knob — a density-tracking inset would break concentricity in both directions (verified: this
843
+ * (docs/DESIGN-SPEC.md §4): `RADIUS.ctrl === RADIUS_STEP.fine + segmentedTrackInset` (`6 = 4 +
844
+ * 2`; the track takes the control radius, the indicator the `fine` tier). `RADIUS.ctrl`/
845
+ * `RADIUS_STEP.fine` both shift together under the RADIUS knob (`ctrl = 6 + level`, `fine = ctrl
846
+ * - 2`), so their difference is exactly 2 regardless of that knob (down to level -4; at -5 `fine`
847
+ * clamps to 0 against `ctrl` 1) — a density-tracking inset would break concentricity in both directions (verified: this
841
848
  * inset's own value, HAD it stayed density-tracking, resolves via `scaleSpace(2, level, multiplier)`
842
849
  * to 1 at density's floor level -3 and 3 at its ceiling level +3 — the widest swing `deriveSpacing`'s
843
850
  * `[-3, 3]` range can produce) for no compensating benefit, since the two radii it sits between
@@ -984,15 +991,15 @@ const ROW_LINE_HEIGHT_STEP = 1 / 30
984
991
  * still overrides `--vx-space-sticky-header-clearance`. Documented on the `./content` surface too
985
992
  * (`docs/CONTENT-SPEC.md` §5), not only here.
986
993
  *
987
- * `rowLineHeight` is the ONE exception to the multiplier entirely: `1.35 + ROW_LINE_HEIGHT_STEP *
994
+ * `rowLineHeight` is the ONE exception to the multiplier entirely: `1.54 + ROW_LINE_HEIGHT_STEP *
988
995
  * level`, ADDITIVE, its own gentler, INDEPENDENT coefficient (see {@link ROW_LINE_HEIGHT_STEP}'s own
989
996
  * doc for why it must stay independent of `multiplier`). It carries the NavLink row's
990
- * `lineHeight: '1.35'` (`theme/index.ts`, load-bearing for row height) along with the row's padding,
991
- * but the multiplier law would overshoot it — `1.35 * 1.3` at level +3 is already a much larger
997
+ * `lineHeight: '1.54'` (`theme/index.ts`, load-bearing for row height) along with the row's padding,
998
+ * but the multiplier law would overshoot it — `1.54 * 1.3` at level +3 is already a much larger
992
999
  * relative move than the padding it accompanies, well past the readable line-height range. The
993
- * additive step instead lands `1.25`..`1.45` across the full range, a proportionate nudge. Rounded
994
- * to 2 decimals (`Math.round(x * 100) / 100`) to avoid floating-point noise (`1.35 +
995
- * ROW_LINE_HEIGHT_STEP * 3` is not exactly `1.45` in raw IEEE-754 arithmetic).
1000
+ * additive step instead lands `1.44`..`1.64` across the full range, a proportionate nudge. Rounded
1001
+ * to 2 decimals (`Math.round(x * 100) / 100`) to avoid floating-point noise (`1.54 +
1002
+ * ROW_LINE_HEIGHT_STEP * 3` is not exactly `1.64` in raw IEEE-754 arithmetic).
996
1003
  *
997
1004
  * `SPACE_FIXED` is NEVER part of this law — see that constant's own doc for why.
998
1005
  *
@@ -1073,6 +1080,7 @@ export function deriveSpacing(level: number): SpaceValues {
1073
1080
  anchors.controlHeightTag = Math.max(18, anchors.controlHeightTag)
1074
1081
  anchors.controlHeightWidget = Math.max(22, anchors.controlHeightWidget)
1075
1082
  anchors.controlHeightCtl = Math.max(28, anchors.controlHeightCtl)
1083
+ anchors.controlHeightDense = Math.max(24, anchors.controlHeightDense)
1076
1084
 
1077
1085
  const mappedStep = mapSpaceGroup(SPACE_STEP_BASE, level, multiplier)
1078
1086
  // WCAG 2.5.8 minimum interactive-target size — see this function's doc for why the trigger's
@@ -1108,7 +1116,7 @@ export function deriveSpacing(level: number): SpaceValues {
1108
1116
  step,
1109
1117
  // Additive, gentler, INDEPENDENT law than the multiplier — see `ROW_LINE_HEIGHT_STEP`'s own doc
1110
1118
  // for why it must NOT be computed from `multiplier`.
1111
- rowLineHeight: Math.round((1.35 + ROW_LINE_HEIGHT_STEP * level) * 100) / 100,
1119
+ rowLineHeight: Math.round((1.54 + ROW_LINE_HEIGHT_STEP * level) * 100) / 100,
1112
1120
  }
1113
1121
  }
1114
1122
 
@@ -1137,7 +1145,7 @@ export const SPACE_SCALE = DEFAULT_SPACE_VALUES.scale
1137
1145
  * doc (third bullet) for why. */
1138
1146
  export const SPACE_STEP = DEFAULT_SPACE_VALUES.step
1139
1147
 
1140
- /** NavLink row line-height at the shipped identity (`1.35`) — `deriveSpacing(0)`'s `rowLineHeight`,
1148
+ /** NavLink row line-height at the shipped identity (`1.54`, a 20px line at `sm`) — `deriveSpacing(0)`'s `rowLineHeight`,
1141
1149
  * UNCHANGED from the shipped identity (locked by `theme/spacing.test.ts`). */
1142
1150
  export const ROW_LINE_HEIGHT = DEFAULT_SPACE_VALUES.rowLineHeight
1143
1151
 
@@ -1207,7 +1215,10 @@ function buildPaletteDataUncached(config: DeriveConfig) {
1207
1215
  const NEUTRAL = {
1208
1216
  line: { light: BP.gray[0], dark: BP.gray[4] }, // primary line
1209
1217
  line2: { light: BP.gray[1], dark: BP.gray[2] }, // secondary line
1210
- axis: { light: inkRgba(inkLight, 0.6), dark: 'rgba(255, 255, 255, 0.6)' },
1218
+ // Axis ticks / small chart labels at 10–11px: the DERIVED `faint` ink (opaque, tone stops in
1219
+ // `derive.ts`'s `INK_TONE`, ≥ 4.5:1 on every text surface), not an ink-at-60% alpha — that
1220
+ // measured 4.06:1 on the light panel (`docs/waves/design-parity/w31/s4-baseline.md`, Craft 5).
1221
+ axis: DERIVED.ink.faint,
1211
1222
  axisStroke: { light: inkRgba(inkLight, 0.12), dark: 'rgba(255, 255, 255, 0.12)' },
1212
1223
  grid: { light: inkRgba(inkLight, 0.07), dark: 'rgba(255, 255, 255, 0.06)' },
1213
1224
  crosshair: { light: inkRgba(inkLight, 0.32), dark: 'rgba(255, 255, 255, 0.42)' },
@@ -0,0 +1,13 @@
1
+ /**
2
+ * The Mantine `spacing` size-scale at level 0, in its own dependency-free module so the headless
3
+ * guard core (`guard/index.ts`, which runs on every Write/Edit) can read the SAME constant the token
4
+ * layer derives from without dragging `derive.ts`/`hct.ts`'s colour math in. `tokens/palette.ts`
5
+ * documents the scale's role (`SPACE_SCALE_BASE`); this file only owns the numbers.
6
+ */
7
+ export const SPACE_SCALE_LEVEL0 = {
8
+ xs: 8,
9
+ sm: 12,
10
+ md: 16,
11
+ lg: 20,
12
+ xl: 24,
13
+ } as const