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
@@ -75,7 +75,7 @@ function SidebarAccount(props) {
75
75
  ...style !== void 0 && { style },
76
76
  children: [
77
77
  /* @__PURE__ */ jsx("span", { className: classes.footerIconSlot, children: /* @__PURE__ */ jsx(IconUser, {}) }),
78
- /* @__PURE__ */ jsx(Text, { className: classes.accountText, fz: VX.text.md, children: "Sign in" })
78
+ /* @__PURE__ */ jsx(Text, { className: classes.accountText, fz: VX.text.sm, children: "Sign in" })
79
79
  ]
80
80
  }
81
81
  );
@@ -282,7 +282,7 @@ function AppSidebar(props) {
282
282
  "aria-current": settingsCurrent(entry),
283
283
  children: [
284
284
  /* @__PURE__ */ jsx("span", { className: classes.footerIconSlot, children: entry.icon ?? /* @__PURE__ */ jsx(IconGear, {}) }),
285
- /* @__PURE__ */ jsx(Text, { className: classes.footerText, fz: VX.text.md, children: entry.label }),
285
+ /* @__PURE__ */ jsx(Text, { className: classes.footerText, fz: VX.text.sm, children: entry.label }),
286
286
  index === 0 ? ringMark : null,
287
287
  entry.active && entry.current !== "page" ? /* @__PURE__ */ jsx(IconCheck, {}) : null
288
288
  ]
@@ -293,7 +293,7 @@ function AppSidebar(props) {
293
293
  ] }) : /* @__PURE__ */ jsx(Group, { gap: "xs", wrap: "nowrap", children: /* @__PURE__ */ jsxs(Menu, { position: "right-start", withArrow: true, width: step.sidebarSettingsMenuWidth, zIndex: 500, children: [
294
294
  /* @__PURE__ */ jsx(Menu.Target, { children: /* @__PURE__ */ jsxs(UnstyledButton, { className: classes.footerBtn, "aria-label": "Settings", children: [
295
295
  /* @__PURE__ */ jsx(IconGear, {}),
296
- /* @__PURE__ */ jsx(Text, { className: classes.footerText, fz: VX.text.md, children: "Settings" }),
296
+ /* @__PURE__ */ jsx(Text, { className: classes.footerText, fz: VX.text.sm, children: "Settings" }),
297
297
  ringMark
298
298
  ] }) }),
299
299
  /* @__PURE__ */ jsxs(Menu.Dropdown, { children: [
@@ -35,12 +35,12 @@
35
35
  }
36
36
 
37
37
  .link {
38
- font-size: var(--vx-text-md);
38
+ font-size: var(--vx-text-sm);
39
39
  border-radius: var(--vx-radius-ctrl) !important;
40
40
  }
41
41
 
42
42
  .link :global(.mantine-NavLink-label) {
43
- font-size: var(--vx-text-md);
43
+ font-size: var(--vx-text-sm);
44
44
  }
45
45
 
46
46
  .link :global(.mantine-NavLink-section[data-position='left']) {
@@ -229,8 +229,8 @@
229
229
  }
230
230
 
231
231
  /*
232
- * Footer settings row — IDENTICAL geometry to a nav row (padding 6px 10px, radius 6, gap 10,
233
- * 15px): muted text + faint icon at rest, ink-6% tint + ink on hover, exactly like an inactive
232
+ * Footer settings row — IDENTICAL geometry to a nav row (the row inset tokens, control radius, nav
233
+ * icon gap, `sm` type): muted text + faint icon at rest, ink-6% tint + ink on hover, exactly like an inactive
234
234
  * nav item, so the footer never reads as a separate control family.
235
235
  */
236
236
  .footerBtn {
@@ -241,7 +241,7 @@
241
241
  gap: var(--vx-space-nav-icon-gap);
242
242
  padding: var(--vx-space-row-inset-y) var(--vx-space-row-inset-x);
243
243
  border-radius: var(--vx-radius-ctrl);
244
- font-size: var(--vx-text-md);
244
+ font-size: var(--vx-text-sm);
245
245
  /* The nav row's line-height, so a footer row is exactly as tall as a nav row (Mantine's `Text`
246
246
  * would otherwise bring its own 1.55 and add ~3px). */
247
247
  line-height: var(--vx-space-row-line-height);
@@ -329,7 +329,7 @@
329
329
 
330
330
  /* Identity name — weight 600, ink. */
331
331
  .accountName {
332
- font-size: var(--vx-text-md);
332
+ font-size: var(--vx-text-sm);
333
333
  font-weight: 600;
334
334
  color: var(--vx-ink);
335
335
  }
@@ -644,7 +644,7 @@
644
644
  }
645
645
 
646
646
  .childList :global(.mantine-NavLink-label) {
647
- font-size: var(--vx-text-sm);
647
+ font-size: var(--vx-text-xs);
648
648
  }
649
649
 
650
650
  /*
@@ -689,7 +689,7 @@
689
689
  }
690
690
 
691
691
  .subnavDropdown :global(.mantine-NavLink-label) {
692
- font-size: var(--vx-text-md);
692
+ font-size: var(--vx-text-sm);
693
693
  }
694
694
 
695
695
  /*
@@ -84,7 +84,11 @@ function ShellBody({
84
84
  style
85
85
  }) {
86
86
  const { step } = useBasaltSpacing();
87
- const inset = { base: step.appShellInsetMobile, sm: step.appShellInset };
87
+ const inset = {
88
+ base: step.appShellInsetMobile,
89
+ sm: step.appShellInset,
90
+ md: step.appShellInsetExpanded
91
+ };
88
92
  const aside = useAsideRegion();
89
93
  const sizeClass = useSizeClass();
90
94
  const [storedCollapsed, setStoredCollapsed, collapseIsSet] = collapseStore(storageKey)();
@@ -199,7 +199,7 @@ function PageBar({
199
199
  const hasPills = filters !== void 0 || panel !== null || filtersEndActions.length > 0;
200
200
  const row2 = hasRow2 ? /* @__PURE__ */ jsxs("div", { className: cx(classes.row2, classNames?.row2), "data-basalt-hit-scope": true, children: [
201
201
  tabs !== void 0 && /* @__PURE__ */ jsx("div", { className: classes.tabs, "data-basalt-page-bar-line": "tabs", children: /* @__PURE__ */ jsx(CtlSlot, { children: tabs }) }),
202
- hasPills && /* @__PURE__ */ jsxs("div", { className: classes.pills, "data-basalt-page-bar-line": "pills", children: [
202
+ hasPills && /* @__PURE__ */ jsxs("div", { className: classes.pills, "data-basalt-page-bar-line": "pills", "data-basalt-dense": true, children: [
203
203
  filters !== void 0 && /* @__PURE__ */ jsx("div", { className: classes.filters, children: /* @__PURE__ */ jsx(CtlSlot, { children: filters }) }),
204
204
  panel !== null && /* @__PURE__ */ jsx(
205
205
  FilterPill,
@@ -1 +1 @@
1
- {"version":3,"file":"data-table.d.ts","sourceRoot":"","sources":["../../src/table/data-table.tsx"],"names":[],"mappings":"AA+CA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AACnD,OAAO,KAAK,EAIV,kBAAkB,EAGlB,eAAe,EAEf,OAAO,EACP,iBAAiB,EACjB,YAAY,EAEb,MAAM,uBAAuB,CAAA;AAE9B,OAAO,KAAK,EAAgD,SAAS,EAAa,MAAM,OAAO,CAAA;AAI/F,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAOnE,OAAO,KAAK,EAAE,SAAS,EAAiB,WAAW,EAAE,MAAM,qBAAqB,CAAA;AAahF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA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M,EAAE,CAAA;IACxB,MAAM,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CACpC,GAAG,WAAW,CAAC,MAAM,CAAC,CAkBtB;AAoRD;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,eAAe,CAAC,CAAC,SAAS,OAAO,EAAE,KAAK,EAAE,oBAAoB,CAAC,CAAC,CAAC,+BAyrBhF"}
@@ -251,6 +251,8 @@ const TABLE_TOOLBAR_STYLE = { flex: "0 1 auto", minWidth: 0 };
251
251
  const SEARCH_WIDTH = 220;
252
252
  const SEARCH_DEBOUNCE_MS = 250;
253
253
  const TABLE_SEARCH_STYLE = {
254
+ // `width` as well as the basis — see the `SEARCH_WIDTH` JSDoc.
255
+ width: SEARCH_WIDTH,
254
256
  flex: `0 1 ${SEARCH_WIDTH}px`,
255
257
  minWidth: "12ch",
256
258
  maxWidth: "100%"
@@ -806,6 +808,7 @@ function BasaltDataTable(props) {
806
808
  Group,
807
809
  {
808
810
  className: cx(classNames?.toolbar),
811
+ "data-basalt-dense": true,
809
812
  gap: "xs",
810
813
  wrap: "wrap",
811
814
  align: "center",
@@ -0,0 +1,82 @@
1
+ /**
2
+ * Component `vars` that carry the Wave 33 chrome (`docs/waves/design-parity/SPEC.md` § 6.12) and the
3
+ * ON-COLOR re-point they sit beside. Pure functions of theme + props, kept out of `theme/index.ts`
4
+ * so the tests can call them directly.
5
+ */
6
+ import type { MantineTheme } from '@mantine/core';
7
+ /**
8
+ * ON-COLOR: the foreground for a filled surface, decided in CSS. THE fix for Mantine's
9
+ * scheme-blind, contrast-blind `autoContrast`.
10
+ *
11
+ * Mantine picks the filled-variant text color ONCE, in JS, via `parseThemeColor({ color, theme })`
12
+ * — with NO `colorScheme` argument, so it resolves against the LIGHT `primaryShade` and bakes a
13
+ * static `color: var(--mantine-color-white)` into the element, while the BACKGROUND it pairs that
14
+ * with (`--mantine-color-{c}-filled`) stays a scheme-reactive CSS var. It gets away with it
15
+ * upstream only because Mantine's default `primaryShade` is `{ light: 6, dark: 8 }` — DARKER on
16
+ * dark, so white happens to stay right. It is luck, not logic: point `primaryShade.dark` at a
17
+ * lighter shade (as Basalt originally did) and every filled control in dark mode turns white-on-
18
+ * light. And even in one scheme the pick is wrong, because `isLightColor` is a BT.601 BRIGHTNESS
19
+ * test that does not track WCAG contrast — it handed white to lime `#97ba2e` at 2.24:1.
20
+ *
21
+ * Basalt removes the JS decision entirely. A fill is now scheme-INDEPENDENT and sits in a
22
+ * luminance band chosen so a WHITE label always clears AA (see `FILL` / `ACCENT` in
23
+ * tokens/palette.ts), so the on-color is a token, not a computation. `--vx-on-{color}` is emitted
24
+ * per color and resolves in pure CSS at paint time — the same discipline the rest of the `--vx-*`
25
+ * system follows. It is still MEASURED here (`legibleOn`) rather than hardcoded to white, so a
26
+ * consumer that retunes a family outside the band still gets the legible foreground.
27
+ *
28
+ * The palette already KNEW the answer: `ACCENT.onAccent` ("text on an accent fill") existed, and
29
+ * `Composer`'s send button hand-wired `color: var(--vx-on-accent)` — which was the ONLY reason that
30
+ * one control stayed legible while every generic Mantine control did not. The token was right;
31
+ * nothing bound the chrome to it. It is bound now (see `accentBridge` / `familyBridge`), and the
32
+ * Composer no longer needs the override.
33
+ *
34
+ * Fix: never let a foreground be decided in JS. `--vx-on-{color}` is emitted per color under BOTH
35
+ * scheme blocks of `cssVariablesResolver` (each resolved against the shade that scheme actually
36
+ * paints), so the foreground resolves in pure CSS at paint time — the same discipline the rest of
37
+ * the `--vx-*` system already follows. `basaltVariantColorResolver` re-points every filled variant
38
+ * at it, and the components that bypass the variant resolver (Checkbox / Radio / Tabs / Pagination /
39
+ * Stepper / Indicator / Timeline all call Mantine's `getContrastColor` directly) are re-pointed at
40
+ * it too, in `components` below. Regression-locked by `contrast.test.ts`.
41
+ */
42
+ export declare function onColor(theme: MantineTheme, color: string | undefined): string | undefined;
43
+ /**
44
+ * The on-color for a component that bypasses the variant resolver and calls Mantine's
45
+ * `getContrastColor` directly. `undefined` (autoContrast off, or a hex / indexed color) leaves
46
+ * Mantine's own value in place — `mergeVars` strips undefined before merging.
47
+ */
48
+ export declare function onColorFor(theme: MantineTheme, props: {
49
+ color?: string | undefined;
50
+ autoContrast?: boolean | undefined;
51
+ }): string | undefined;
52
+ /** The chrome opt-out: a call site that names a colour (even the primary one) keeps its hue. */
53
+ export declare function hasExplicitColor(color: string | undefined): boolean;
54
+ /**
55
+ * A `subtle` Button / ActionIcon that names no colour takes neutral ink for its label and an
56
+ * ink-6% hover (`docs/DESIGN-SPEC.md` §5 ghost idiom). An explicit `color=` — the primary one
57
+ * included — keeps Mantine's tinted label and hover: `color="red"` on a destructive text action
58
+ * carries its hue as the whole signal. Mantine hands the variant resolver `color || primaryColor`,
59
+ * so only the component props can tell "unnamed" from "primary" — hence vars, not the resolver.
60
+ */
61
+ export declare function subtleInkVars(props: {
62
+ color?: string | undefined;
63
+ variant?: string | undefined;
64
+ }): {
65
+ color: string | undefined;
66
+ hover: string | undefined;
67
+ };
68
+ /**
69
+ * Tabs vars: the on-color re-point plus the active underline in ink (SPEC § 6.12). Only the
70
+ * underline `default` variant takes ink (`pills` fills with the colour); an explicit `color=` opts
71
+ * out. The return type lists `--tabs-text-color` and `--tabs-radius` because Mantine's
72
+ * `TabsCssVariables` type declares only `--tabs-color` / `--tabs-radius` while Tabs' OWN
73
+ * varsResolver writes `--tabs-text-color` (an upstream type gap).
74
+ */
75
+ export declare function tabsVars(theme: MantineTheme, props: {
76
+ color?: string | undefined;
77
+ variant?: string | undefined;
78
+ autoContrast?: boolean | undefined;
79
+ }): {
80
+ root: Record<'--tabs-color' | '--tabs-radius' | '--tabs-text-color', string | undefined>;
81
+ };
82
+ //# sourceMappingURL=chrome-vars.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chrome-vars.d.ts","sourceRoot":"","sources":["../../src/theme/chrome-vars.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAEjD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,wBAAgB,OAAO,CAAC,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAI1F;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CACxB,KAAK,EAAE,YAAY,EACnB,KAAK,EAAE;IAAE,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAAC,YAAY,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;CAAE,GACxE,MAAM,GAAG,SAAS,CAGpB;AAED,gGAAgG;AAChG,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAEnE;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE;IACnC,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAC7B,GAAG;IACF,KAAK,EAAE,MAAM,GAAG,SAAS,CAAA;IACzB,KAAK,EAAE,MAAM,GAAG,SAAS,CAAA;CAC1B,CAMA;AAED;;;;;;GAMG;AACH,wBAAgB,QAAQ,CACtB,KAAK,EAAE,YAAY,EACnB,KAAK,EAAE;IACL,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC5B,YAAY,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;CACnC,GACA;IAAE,IAAI,EAAE,MAAM,CAAC,cAAc,GAAG,eAAe,GAAG,mBAAmB,EAAE,MAAM,GAAG,SAAS,CAAC,CAAA;CAAE,CAS9F"}
@@ -0,0 +1,36 @@
1
+ function onColor(theme, color) {
2
+ const name = color ?? theme.primaryColor;
3
+ if (!Object.prototype.hasOwnProperty.call(theme.colors, name)) return void 0;
4
+ return `var(--vx-on-${name})`;
5
+ }
6
+ function onColorFor(theme, props) {
7
+ const autoContrast = props.autoContrast ?? theme.autoContrast;
8
+ return autoContrast ? onColor(theme, props.color) : void 0;
9
+ }
10
+ function hasExplicitColor(color) {
11
+ return color !== void 0;
12
+ }
13
+ function subtleInkVars(props) {
14
+ const ink = props.variant === "subtle" && !hasExplicitColor(props.color);
15
+ return {
16
+ color: ink ? "var(--vx-ink)" : void 0,
17
+ hover: ink ? "color-mix(in srgb, var(--vx-ink) 6%, transparent)" : void 0
18
+ };
19
+ }
20
+ function tabsVars(theme, props) {
21
+ const underline = !hasExplicitColor(props.color) && (props.variant ?? "default") === "default";
22
+ return {
23
+ root: {
24
+ "--tabs-text-color": onColorFor(theme, props),
25
+ "--tabs-color": underline ? "var(--vx-ink)" : void 0,
26
+ "--tabs-radius": void 0
27
+ }
28
+ };
29
+ }
30
+ export {
31
+ hasExplicitColor,
32
+ onColor,
33
+ onColorFor,
34
+ subtleInkVars,
35
+ tabsVars
36
+ };
@@ -276,7 +276,7 @@ html .accordionItem {
276
276
  /*
277
277
  * Tabs: the tab-list rule (and the inactive-tab hover underline) is a layout separator — the
278
278
  * divider token, not the heavy gray-3/dark-4 line. Mantine's scheme rules sit at (0,2,0); the
279
- * `html[...]` prefix lands (0,2,1). The active underline keeps `--tabs-color` untouched.
279
+ * `html[...]` prefix lands (0,2,1). The active underline's colour is set in the theme's Tabs `vars`.
280
280
  */
281
281
  html[data-mantine-color-scheme] .tabsRoot {
282
282
  --tab-border-color: var(--vx-divider);
@@ -304,3 +304,22 @@ html .tableRoot {
304
304
  html .tableRoot tbody tr:last-of-type {
305
305
  border-bottom: none;
306
306
  }
307
+
308
+ /*
309
+ * Badge leading glyph (`leftSection`): the state encoded by shape. 12px on a 20px chip, 4px gap
310
+ * (Mantine's own section margin is spacing.xs / 2 = 4), centred on the label.
311
+ */
312
+ .badgeSection {
313
+ --badge-section-margin: calc(0.25rem * var(--mantine-scale));
314
+ }
315
+
316
+ .badgeSection svg,
317
+ .badgeSection img {
318
+ width: calc(0.75rem * var(--mantine-scale));
319
+ height: calc(0.75rem * var(--mantine-scale));
320
+ flex-shrink: 0;
321
+ }
322
+
323
+ .badgeSection img {
324
+ object-fit: contain;
325
+ }
@@ -13,5 +13,6 @@ declare const classes: {
13
13
  readonly accordionItem: string
14
14
  readonly tabsRoot: string
15
15
  readonly tableRoot: string
16
+ readonly badgeSection: string
16
17
  }
17
18
  export default classes
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/theme/index.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EA0CV,oBAAoB,EAGpB,oBAAoB,EAErB,MAAM,eAAe,CAAA;AAStB,OAAO,KAAK,EAAe,YAAY,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAE/E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA;AAGpD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAA;AASvD;;;;;GAKG;AACH,YAAY,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAA;AAIvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAA;AAMvD,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,aAAa,CAAA;AAenE,OAAO,QAAQ,eAAe,CAAC;IAC7B,UAAU,iBAAiB;QACzB,YAAY,CAAC,EAAE,YAAY,CAAA;QAC3B,WAAW,CAAC,EAAE,iBAAiB,CAAA;QAC/B,YAAY,CAAC,EAAE,YAAY,CAAA;QAC3B,aAAa,CAAC,EAAE,WAAW,CAAA;KAC5B;CACF;AA4iCD;+EAC+E;AAC/E,eAAO,MAAM,SAAS,EAAE,oBAAuD,CAAA;AA8O/E,6FAA6F;AAC7F,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,GAAG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B,CAC/B,SAAS,CAAC,EAAE,IAAI,CAAC,oBAAoB,EAAE,aAAa,CAAC,EACrD,OAAO,CAAC,EAAE,wBAAwB,GACjC,oBAAoB,CAiCtB"}
@@ -14,8 +14,10 @@ import {
14
14
  SPACE_FIXED
15
15
  } from "../tokens/palette.js";
16
16
  import { DEFAULT_DERIVE_CONFIG, isDefaultDeriveConfig, resolveDeriveConfig } from "../tokens/derive.js";
17
- import { pxRem, VX } from "../tokens/core.js";
17
+ import { pxRem, TEXT_LINE, VX } from "../tokens/core.js";
18
+ import { CTL_HEIGHT_VARS } from "../tokens/ctl-vars.js";
18
19
  import { SIZE_CLASS_BREAKPOINTS } from "../tokens/size-classes.js";
20
+ import { onColor, onColorFor, subtleInkVars, tabsVars } from "./chrome-vars.js";
19
21
  import controlsClasses from "./controls.module.css";
20
22
  import floatingClasses from "./floating.module.css";
21
23
  import navLinkClasses from "./nav-link.module.css";
@@ -69,15 +71,6 @@ function buildDarkTuple(data) {
69
71
  "#09090b"
70
72
  ];
71
73
  }
72
- function onColor(theme, color) {
73
- const name = color ?? theme.primaryColor;
74
- if (!Object.prototype.hasOwnProperty.call(theme.colors, name)) return void 0;
75
- return `var(--vx-on-${name})`;
76
- }
77
- function onColorFor(theme, props) {
78
- const autoContrast = props.autoContrast ?? theme.autoContrast;
79
- return autoContrast ? onColor(theme, props.color) : void 0;
80
- }
81
74
  function relativeLuminance(hex) {
82
75
  const channels = hexToRgb(hex).map((c) => {
83
76
  const s = c / 255;
@@ -112,10 +105,6 @@ const basaltVariantColorResolver = (input) => {
112
105
  const autoContrast = input.autoContrast ?? input.theme.autoContrast;
113
106
  return autoContrast ? { ...resolved, color: on } : resolved;
114
107
  }
115
- if (input.variant === "subtle") {
116
- const isDefaultColor = input.color === void 0 || input.color === input.theme.primaryColor;
117
- return isDefaultColor ? { ...resolved, hover: `color-mix(in srgb, var(--vx-ink) 6%, transparent)` } : resolved;
118
- }
119
108
  if (input.variant === "outline") {
120
109
  return { ...resolved, color: `color-mix(in srgb, ${resolved.color} 70%, var(--vx-ink))` };
121
110
  }
@@ -161,7 +150,7 @@ function buildTheme(data, options = {}) {
161
150
  // buttons ≥28px sit at ~6px). `radius.md` = 0.375rem = 6px, mirrored by `--vx-radius-ctrl` — every
162
151
  // control without its own explicit `radius` prop (Button, ActionIcon, TextInput, NumberInput,
163
152
  // PasswordInput, Select, Textarea) falls back to this default. Card/Paper bypass this scale
164
- // entirely — they resolve straight to `var(--vx-radius-card)` (7px, see the
153
+ // entirely — they resolve straight to `var(--vx-radius-card)` (10px, see the
165
154
  // `components.Card`/`Paper` overrides below).
166
155
  defaultRadius: "md",
167
156
  // Named weight ladder (v9 fontWeights).
@@ -179,6 +168,11 @@ function buildTheme(data, options = {}) {
179
168
  lg: rem(VX.text.lg),
180
169
  xl: rem(VX.text.xl)
181
170
  },
171
+ // Dense rungs get grid-aligned line boxes (13/20, 12/16); md and up keep Mantine's ratios.
172
+ lineHeights: {
173
+ xs: lineRatio(TEXT_LINE.xs, VX.text.xs),
174
+ sm: lineRatio(TEXT_LINE.sm, VX.text.sm)
175
+ },
182
176
  // Deliberate, OWNED spacing + radius scales — the single edit point, not inherited Mantine
183
177
  // defaults. Denser than Mantine's stock lg/xl for a tighter, data-driven surface. 10 12 16 18 24.
184
178
  // Reads `spacing.scale`, NOT `spacing.anchors` — a scale stop tracks density independently of
@@ -232,7 +226,7 @@ function buildTheme(data, options = {}) {
232
226
  // resolves to the SAME three tokens:
233
227
  // • background → `--vx-surface-panel` (the panel surface, NOT the page body).
234
228
  // • depth → `--vx-shadow-card` (whisper shadow + ring, replaces `withBorder`).
235
- // • radius → `--vx-radius-card` (7px).
229
+ // • radius → `--vx-radius-card` (10px).
236
230
  // This is the single source the user's "strict surface across components" demands; the
237
231
  // `raw-surface` guard then stops consumers re-overriding any of it inline.
238
232
  Card: ext({
@@ -253,10 +247,12 @@ function buildTheme(data, options = {}) {
253
247
  }
254
248
  }
255
249
  }),
256
- // Mantine's default Badge radius is a full 1000px pill; the spec's delta/status badges sit at
257
- // radius 6 (docs/DESIGN-SPEC.md §4/§5). Count badges (radius 5) are a distinct, smaller-radius
258
- // usage left to the call site (`radius={5}` prop) since Badge has no state to key off here.
259
- Badge: ext({ defaultProps: { radius: radius.ctrl } }),
250
+ // Status chip (SPEC § 6.10): `light` + `tight`, neutral until `color=` opts in (the accent is
251
+ // never a status chip's default); a `leftSection` glyph is sized in `badgeSection`.
252
+ Badge: ext({
253
+ defaultProps: { variant: "light", color: "gray", radius: radius.tight },
254
+ classNames: { section: controlsClasses.badgeSection }
255
+ }),
260
256
  // Alert renders its title in the body font by default; bring it onto the head-font idiom
261
257
  // (docs/DESIGN-SPEC.md §5) like every other titled surface. Radius/padding/color tint are
262
258
  // already on-system (defaultRadius 'md' control tier + the variant color resolver), so only
@@ -322,19 +318,20 @@ function buildTheme(data, options = {}) {
322
318
  // `--nl-padding` var), so the spec padding is forced inline here, where it wins
323
319
  // deterministically on every render path.
324
320
  padding: "var(--vx-space-row-inset-y) var(--vx-space-row-inset-x)",
325
- // The body step on the ROOT, not just the label: the body element sizes itself from the
326
- // root's inherited line-height (which, left at the default 1.55, alone pushed rows to
327
- // ~37px). The tightened 1.35 keeps rows compact as the scale grows. Reads
321
+ // The dense-row step (`sm`) on the ROOT, not just the label: the body element sizes
322
+ // itself from the root's inherited line-height (which, left at the default 1.55, alone
323
+ // pushed rows to ~37px). The row line-height (1.54, a 20px line at 13px) keeps rows
324
+ // compact as the scale grows. Reads
328
325
  // `--vx-space-row-line-height` (density-tracking, ADDITIVE law — see `deriveSpacing`'s
329
326
  // doc in `tokens/palette.ts` for why this one differs from the padding's multiplier).
330
- fontSize: VX.text.md,
327
+ fontSize: VX.text.sm,
331
328
  lineHeight: "var(--vx-space-row-line-height)",
332
329
  // Nav rows sit in the 5-6px radius tier (docs/DESIGN-SPEC.md §4), not square.
333
330
  borderRadius: "var(--vx-radius-ctrl)"
334
331
  },
335
332
  // Mantine pins the label at `font-size-sm` explicitly, so the root value alone
336
333
  // doesn't reach it.
337
- label: { fontSize: VX.text.md, lineHeight: "var(--vx-space-row-line-height)" }
334
+ label: { fontSize: VX.text.sm, lineHeight: "var(--vx-space-row-line-height)" }
338
335
  }
339
336
  }),
340
337
  // Field idiom (docs/DESIGN-SPEC.md §5): field surface + `shadow-raised` depth + faint placeholder,
@@ -418,19 +415,29 @@ function buildTheme(data, options = {}) {
418
415
  // `size="xs"`) on Mantine's own static height.
419
416
  Button: ext({
420
417
  classNames: { root: controlsClasses.buttonRoot },
421
- vars: (_theme, props) => ({
422
- root: {
423
- "--button-height": props.size === "md" ? "calc(var(--vx-space-control-height) * var(--mantine-scale))" : void 0
424
- }
425
- })
418
+ vars: (_theme, props) => {
419
+ const ink = subtleInkVars(props);
420
+ return {
421
+ root: {
422
+ "--button-height": props.size === "md" ? "calc(var(--vx-space-control-height) * var(--mantine-scale))" : void 0,
423
+ "--button-color": ink.color,
424
+ "--button-hover": ink.hover
425
+ }
426
+ };
427
+ }
426
428
  }),
427
429
  ActionIcon: ext({
428
430
  classNames: { root: controlsClasses.actionIconRoot },
429
- vars: (_theme, props) => ({
430
- root: {
431
- "--ai-size": props.size === "md" ? "calc(var(--vx-space-control-height) * var(--mantine-scale))" : void 0
432
- }
433
- })
431
+ vars: (_theme, props) => {
432
+ const ink = subtleInkVars(props);
433
+ return {
434
+ root: {
435
+ "--ai-size": props.size === "md" ? "calc(var(--vx-space-control-height) * var(--mantine-scale))" : void 0,
436
+ "--ai-color": ink.color,
437
+ "--ai-hover": ink.hover
438
+ }
439
+ };
440
+ }
434
441
  }),
435
442
  // CheckboxCard / RadioCard (`withBorder`, true by default): same live regression as Button/
436
443
  // ActionIcon before this pass — Mantine ships `border: 1px solid transparent` as the BASE
@@ -488,12 +495,12 @@ function buildTheme(data, options = {}) {
488
495
  //
489
496
  // The track's padding is `SPACE_FIXED.segmentedTrackInset`, a plain literal — NOT a
490
497
  // `--vx-space-*` var — because it is density-EXEMPT: it is load-bearing for the nested-corner
491
- // law (`RADIUS.card === RADIUS_STEP.tight + segmentedTrackInset`, see that constant's doc in
492
- // `tokens/palette.ts`), and `radius.card`/`RADIUS_STEP.tight` two lines below already track the
498
+ // law (`RADIUS.ctrl === RADIUS_STEP.fine + segmentedTrackInset`, see that constant's doc in
499
+ // `tokens/palette.ts`), and `radius.ctrl`/`RADIUS_STEP.fine` below already track the
493
500
  // RADIUS knob together, so the inset between them must stay fixed at exactly 2 regardless of
494
501
  // density.
495
502
  SegmentedControl: ext({
496
- defaultProps: { radius: radius.card },
503
+ defaultProps: { radius: radius.ctrl },
497
504
  classNames: {
498
505
  label: segmentedControlClasses.label,
499
506
  control: segmentedControlClasses.control,
@@ -530,7 +537,7 @@ function buildTheme(data, options = {}) {
530
537
  // ink-12% fill sat one shade from the track and read as a hover state.
531
538
  boxShadow: "var(--vx-shadow-raised)",
532
539
  outline: "1px solid color-mix(in srgb, var(--vx-ink) 14%, transparent)",
533
- borderRadius: "var(--vx-radius-tight)"
540
+ borderRadius: "var(--vx-radius-fine)"
534
541
  },
535
542
  // Conditionally spread the WHOLE key (never a present `label: undefined`) — the package
536
543
  // builds under `exactOptionalPropertyTypes`, which treats a key present-but-`undefined` as
@@ -601,12 +608,12 @@ function buildTheme(data, options = {}) {
601
608
  },
602
609
  styles: {
603
610
  itemTitle: {
604
- fontSize: VX.text.md,
611
+ fontSize: VX.text.sm,
605
612
  fontWeight: 600,
606
613
  color: "var(--vx-ink)"
607
614
  },
608
615
  itemContent: {
609
- fontSize: VX.text.md,
616
+ fontSize: VX.text.sm,
610
617
  color: "var(--vx-muted)"
611
618
  }
612
619
  }
@@ -658,7 +665,7 @@ function buildTheme(data, options = {}) {
658
665
  boxShadow: "var(--vx-shadow-overlay)"
659
666
  },
660
667
  item: {
661
- fontSize: VX.text.md,
668
+ fontSize: VX.text.sm,
662
669
  borderRadius: "var(--vx-radius-ctrl)",
663
670
  padding: "var(--vx-space-row-inset-y) var(--vx-space-row-inset-x)"
664
671
  },
@@ -774,7 +781,7 @@ function buildTheme(data, options = {}) {
774
781
  textTransform: "uppercase",
775
782
  color: "var(--vx-faint)"
776
783
  },
777
- td: { height: spacing.step.tableRowHeight }
784
+ td: { height: spacing.step.tableRowHeight, fontSize: VX.text.sm }
778
785
  }
779
786
  }),
780
787
  // The v9 thumb indicator is a center dot painted in the TRACK color — over the remapped
@@ -792,14 +799,11 @@ function buildTheme(data, options = {}) {
792
799
  // The tab-list bottom rule (and the inactive-tab hover underline) is a layout separator, not
793
800
  // control chrome — it reads the divider token instead of the heavy gray-3/dark-4 line
794
801
  // (controls.module.css; custom properties are stripped from `styles` objects). The active tab
795
- // underline keeps `--tabs-color` (accent) untouched.
802
+ // underline takes ink, not the accent (SPEC § 6.12; DESIGN-CORE § Accent discipline);
803
+ // `color=` opts back in. Only the underline `default` variant — `pills` fills with the colour.
796
804
  Tabs: ext({
797
805
  classNames: { root: controlsClasses.tabsRoot },
798
- // The on-color re-point (see below). Cast: Mantine's `TabsCssVariables` type declares only
799
- // `--tabs-color` / `--tabs-radius`, yet Tabs' OWN varsResolver writes `--tabs-text-color` —
800
- // an upstream type gap, so the var it actually paints the active tab with is otherwise
801
- // unreachable from the theme.
802
- vars: (theme, props) => ({ root: { "--tabs-text-color": onColorFor(theme, props) } })
806
+ vars: tabsVars
803
807
  }),
804
808
  // ── ON-COLOR re-points (see the ON-COLOR doctrine above) ────────────────────────────────
805
809
  // These components never reach `variantColorResolver` — each calls Mantine's `getContrastColor`
@@ -903,11 +907,9 @@ const CTL_SLIDER_TRACK_SIZE = 6;
903
907
  function ctlSizeVars() {
904
908
  const ctlHeight = "calc(var(--vx-space-control-height-ctl) * var(--mantine-scale))";
905
909
  return {
906
- "--button-height-ctl": ctlHeight,
910
+ ...heightVars(ctlHeight),
907
911
  "--button-padding-x-ctl": `calc(${pxRem(CTL_PADDING_X)} * var(--mantine-scale))`,
908
- "--input-height-ctl": ctlHeight,
909
912
  "--input-padding-y-ctl": `calc(${pxRem(CTL_INPUT_PADDING_Y)} * var(--mantine-scale))`,
910
- "--ai-size-ctl": ctlHeight,
911
913
  "--ai-size-icon": "calc(var(--vx-space-control-height-widget) * var(--mantine-scale))",
912
914
  // A shorthand pair (`<y> <x>`), the shape SegmentedControl's own `--sc-padding-*` vars take.
913
915
  // `y` stays a bare literal (the label's own box height is now enforced by the `size === 'ctl'`
@@ -918,7 +920,6 @@ function ctlSizeVars() {
918
920
  "--combobox-chevron-size-ctl": pxRem(CTL_CHEVRON_SIZE),
919
921
  "--ni-chevron-size-ctl": pxRem(CTL_NUMBER_CHEVRON_SIZE),
920
922
  "--ni-right-section-width-ctl": `calc(${pxRem(CTL_NUMBER_RIGHT_SECTION_WIDTH)} * var(--mantine-scale))`,
921
- "--badge-height-ctl": ctlHeight,
922
923
  "--badge-padding-x-ctl": `calc(${pxRem(CTL_PADDING_X)} * var(--mantine-scale))`,
923
924
  "--badge-fz-ctl": `calc(${pxRem(VX.text.xs)} * var(--mantine-scale))`,
924
925
  // `= VX.text.sm` per `docs/CONTROLS-SPEC.md` §5 — same `calc(<rem> * var(--mantine-scale))`
@@ -926,7 +927,7 @@ function ctlSizeVars() {
926
927
  "--mantine-font-size-ctl": `calc(${pxRem(VX.text.sm)} * var(--mantine-scale))`,
927
928
  "--mantine-line-height-ctl": "var(--mantine-line-height-sm)",
928
929
  // Radio / Checkbox / Switch — the three components whose DEFAULT (`sm`, a 20px indicator) sat
929
- // beside a 13.5px option label in every popover and sheet basalt draws. Every prefix here was
930
+ // beside a 13px option label in every popover and sheet basalt draws. Every prefix here was
930
931
  // read out of the installed `@mantine/core` source, and `ctl-tier-coverage.test.ts` now scans
931
932
  // those three components too, so a future minor that adds a `getSize` call fails the build
932
933
  // instead of resolving the new var to its initial value. Note there is NO
@@ -945,6 +946,12 @@ function ctlSizeVars() {
945
946
  "--slider-size-ctl": `calc(${pxRem(CTL_SLIDER_TRACK_SIZE)} * var(--mantine-scale))`
946
947
  };
947
948
  }
949
+ function heightVars(height) {
950
+ return Object.fromEntries(CTL_HEIGHT_VARS.map((name) => [name, height]));
951
+ }
952
+ function lineRatio(linePx, fontPx) {
953
+ return String(Math.round(linePx / fontPx * 1e4) / 1e4);
954
+ }
948
955
  function buildCssVariablesResolver(data) {
949
956
  const { INK, NEUTRAL, SURFACE } = data;
950
957
  return (theme) => ({
@@ -33,6 +33,12 @@ export type SeriesMap = Record<string, ColorPair>;
33
33
  * alpha(VX.status.warn, 0.1) // zone-band fill
34
34
  */
35
35
  export declare const alpha: (token: string, a: number) => string;
36
+ /** Grid-aligned line boxes (px) for the two dense rungs — `theme/index.ts` re-expresses them as the
37
+ * Mantine `lineHeights` `xs`/`sm`, so a `<Text size="sm">` row is a 20px box and a meta line 16px. */
38
+ export declare const TEXT_LINE: {
39
+ readonly xs: 16;
40
+ readonly sm: 20;
41
+ };
36
42
  export declare const VX: {
37
43
  readonly lineWidth: 2.5;
38
44
  readonly line2Width: 2;
@@ -40,17 +46,17 @@ export declare const VX: {
40
46
  readonly dotR: number;
41
47
  readonly dashArray: "6 4";
42
48
  readonly legendGap: number;
43
- readonly legendFontSize: 13.5;
49
+ readonly legendFontSize: 13;
44
50
  readonly text: {
45
51
  readonly nano: 10;
46
52
  readonly micro: 11;
47
- readonly xs: 12.5;
48
- readonly sm: 13.5;
53
+ readonly xs: 12;
54
+ readonly sm: 13;
49
55
  readonly md: 15;
50
56
  readonly lg: 16;
51
57
  readonly xl: 18;
52
58
  readonly h2: 21;
53
- readonly kpi: 24;
59
+ readonly kpi: 22;
54
60
  readonly h1: 26;
55
61
  readonly display: 30;
56
62
  };