basalt-ui 2.14.0 → 2.16.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 (134) hide show
  1. package/CHANGELOG.md +69 -0
  2. package/MIGRATING.md +81 -13
  3. package/agent/agents/basalt-design-reviewer.md +83 -0
  4. package/agent/rules/basalt-batteries.md +1 -2
  5. package/agent/rules/basalt-charts.md +1 -1
  6. package/agent/rules/basalt-controls.md +3 -3
  7. package/agent/rules/basalt-mantine.md +2 -3
  8. package/agent/rules/basalt-state.md +1 -2
  9. package/agent/rules/basalt-tokens.md +1 -3
  10. package/agent/skills/basalt-design/SKILL.md +26 -8
  11. package/agent/templates/AGENTS-block.md.tpl +7 -0
  12. package/configs/card-inset.test.ts +57 -0
  13. package/configs/oxlint-basalt.json +1 -1
  14. package/configs/oxlint-plugin.js +81 -20
  15. package/configs/oxlint-plugin.test.ts +85 -6
  16. package/dist/agent/chat/thread-message.js +1 -1
  17. package/dist/agent/chat/thread-outcome-card.js +1 -1
  18. package/dist/charts/ChartCard.js +1 -1
  19. package/dist/charts/chart-card.module.css +2 -2
  20. package/dist/charts/legend.d.ts +4 -4
  21. package/dist/cli/board-freshness.d.ts +25 -0
  22. package/dist/cli/board-freshness.d.ts.map +1 -0
  23. package/dist/cli/board-freshness.js +88 -0
  24. package/dist/cli/doctor.d.ts +2 -1
  25. package/dist/cli/doctor.d.ts.map +1 -1
  26. package/dist/cli/doctor.js +3 -1
  27. package/dist/cli/help.d.ts.map +1 -1
  28. package/dist/cli/help.js +9 -3
  29. package/dist/cli/index.d.ts +15 -1
  30. package/dist/cli/index.d.ts.map +1 -1
  31. package/dist/cli/index.js +57 -7
  32. package/dist/cli/init.d.ts.map +1 -1
  33. package/dist/cli/init.js +6 -1
  34. package/dist/cli/shot/board.d.ts +5 -0
  35. package/dist/cli/shot/board.d.ts.map +1 -0
  36. package/dist/cli/shot/board.js +96 -0
  37. package/dist/cli/shot/capture.d.ts +59 -0
  38. package/dist/cli/shot/capture.d.ts.map +1 -0
  39. package/dist/cli/shot/capture.js +473 -0
  40. package/dist/cli/shot/index.d.ts +45 -0
  41. package/dist/cli/shot/index.d.ts.map +1 -0
  42. package/dist/cli/shot/index.js +289 -0
  43. package/dist/cli/shot/measure.d.ts +47 -0
  44. package/dist/cli/shot/measure.d.ts.map +1 -0
  45. package/dist/cli/shot/measure.js +191 -0
  46. package/dist/cli/shot/playwright.d.ts +101 -0
  47. package/dist/cli/shot/playwright.d.ts.map +1 -0
  48. package/dist/cli/shot/playwright.js +60 -0
  49. package/dist/cli/shot/serve.d.ts +6 -0
  50. package/dist/cli/shot/serve.d.ts.map +1 -0
  51. package/dist/cli/shot/serve.js +33 -0
  52. package/dist/cli/shot/types.d.ts +98 -0
  53. package/dist/cli/shot/types.d.ts.map +1 -0
  54. package/dist/cli/shot/types.js +17 -0
  55. package/dist/cli/sync.d.ts.map +1 -1
  56. package/dist/cli/sync.js +2 -1
  57. package/dist/dashboard/settings-section.d.ts.map +1 -1
  58. package/dist/dashboard/settings-section.js +5 -2
  59. package/dist/dashboard/stat-card.js +12 -12
  60. package/dist/dashboard/stat-card.module.css +4 -4
  61. package/dist/dashboard/widget-header.module.css +3 -3
  62. package/dist/guard/guard-hook.d.ts.map +1 -1
  63. package/dist/guard/index.d.ts +4 -2
  64. package/dist/guard/index.d.ts.map +1 -1
  65. package/dist/guard/index.js +18 -4
  66. package/dist/guard/vx-names.d.ts.map +1 -1
  67. package/dist/guard/vx-names.js +1 -0
  68. package/dist/shell/app-mobile-nav.module.css +2 -2
  69. package/dist/shell/app-sidebar-account.js +1 -1
  70. package/dist/shell/app-sidebar.js +2 -2
  71. package/dist/shell/app-sidebar.module.css +8 -8
  72. package/dist/shell/index.js +5 -1
  73. package/dist/shell/page-bar.js +1 -1
  74. package/dist/surfaces.d.ts +2 -0
  75. package/dist/surfaces.d.ts.map +1 -1
  76. package/dist/surfaces.js +2 -0
  77. package/dist/table/data-table.d.ts.map +1 -1
  78. package/dist/table/data-table.js +3 -0
  79. package/dist/theme/index.d.ts.map +1 -1
  80. package/dist/theme/index.js +31 -21
  81. package/dist/tokens/core.d.ts +10 -4
  82. package/dist/tokens/core.d.ts.map +1 -1
  83. package/dist/tokens/core.js +16 -10
  84. package/dist/tokens/ctl-vars.d.ts +15 -0
  85. package/dist/tokens/ctl-vars.d.ts.map +1 -0
  86. package/dist/tokens/ctl-vars.js +22 -0
  87. package/dist/tokens/palette.d.ts +37 -29
  88. package/dist/tokens/palette.d.ts.map +1 -1
  89. package/dist/tokens/palette.js +32 -21
  90. package/dist/tokens/space-scale.d.ts +14 -0
  91. package/dist/tokens/space-scale.d.ts.map +1 -0
  92. package/dist/tokens/space-scale.js +10 -0
  93. package/llms.txt +2 -2
  94. package/package.json +1 -1
  95. package/src/agent/chat/thread-message.tsx +1 -1
  96. package/src/agent/chat/thread-outcome-card.tsx +2 -2
  97. package/src/charts/ChartCard.tsx +1 -1
  98. package/src/charts/chart-card.module.css +2 -2
  99. package/src/charts/legend.tsx +4 -4
  100. package/src/cli/board-freshness.ts +132 -0
  101. package/src/cli/doctor.ts +10 -1
  102. package/src/cli/help.ts +14 -2
  103. package/src/cli/index.ts +80 -10
  104. package/src/cli/init.ts +8 -1
  105. package/src/cli/shot/board.ts +154 -0
  106. package/src/cli/shot/capture.ts +650 -0
  107. package/src/cli/shot/index.ts +362 -0
  108. package/src/cli/shot/measure.ts +252 -0
  109. package/src/cli/shot/playwright.ts +152 -0
  110. package/src/cli/shot/serve.ts +35 -0
  111. package/src/cli/shot/types.ts +92 -0
  112. package/src/cli/sync.ts +2 -1
  113. package/src/dashboard/settings-section.tsx +5 -2
  114. package/src/dashboard/stat-card.module.css +4 -4
  115. package/src/dashboard/stat-card.tsx +13 -13
  116. package/src/dashboard/widget-header.module.css +3 -3
  117. package/src/guard/guard-hook.ts +3 -1
  118. package/src/guard/index.ts +27 -13
  119. package/src/guard/vx-names.ts +1 -0
  120. package/src/shell/app-mobile-nav.module.css +2 -2
  121. package/src/shell/app-sidebar-account.tsx +1 -1
  122. package/src/shell/app-sidebar.module.css +8 -8
  123. package/src/shell/app-sidebar.tsx +2 -2
  124. package/src/shell/index.tsx +10 -4
  125. package/src/shell/page-bar.tsx +1 -1
  126. package/src/surfaces.ts +5 -0
  127. package/src/table/data-table.tsx +10 -4
  128. package/src/theme/__snapshots__/plain-theme.test.ts.snap +57 -45
  129. package/src/theme/ctl-theme.tsx +1 -1
  130. package/src/theme/index.ts +43 -23
  131. package/src/tokens/core.ts +16 -8
  132. package/src/tokens/ctl-vars.ts +32 -0
  133. package/src/tokens/palette.ts +40 -29
  134. package/src/tokens/space-scale.ts +13 -0
@@ -0,0 +1,60 @@
1
+ import { createRequire } from "node:module";
2
+ import { join } from "node:path";
3
+ const INSTALL_LINE = "basalt-ui shot needs Playwright: bun add -d playwright && bunx playwright install chromium";
4
+ const KILL_TIMEOUT_MS = 1e4;
5
+ class ShotError extends Error {
6
+ }
7
+ const isPlaywright = (mod) => {
8
+ const chromium = mod?.chromium;
9
+ return typeof chromium?.["launchServer"] === "function" && typeof chromium["connect"] === "function";
10
+ };
11
+ const resolvePlaywright = (cwd) => {
12
+ const require2 = createRequire(join(cwd, "package.json"));
13
+ for (const name of ["playwright", "playwright-core"]) {
14
+ try {
15
+ const mod = require2(name);
16
+ if (isPlaywright(mod)) return mod;
17
+ } catch {
18
+ }
19
+ }
20
+ return null;
21
+ };
22
+ const firstLine = (error) => (error instanceof Error ? error.message : String(error)).split("\n")[0] ?? "";
23
+ function killBounded(server) {
24
+ const guard = new Promise((resolve) => setTimeout(resolve, KILL_TIMEOUT_MS).unref());
25
+ return Promise.race([server.kill().catch(() => void 0), guard]);
26
+ }
27
+ async function withBrowser(pw, fn, { channels = [void 0, "chrome"], stops } = {}) {
28
+ const chromiumSandbox = !process.env["CI"];
29
+ const failures = [];
30
+ for (const channel of channels) {
31
+ const label = channel ?? "bundled chromium";
32
+ let server;
33
+ let browser;
34
+ try {
35
+ server = await pw.chromium.launchServer(
36
+ channel ? { channel, chromiumSandbox } : { chromiumSandbox }
37
+ );
38
+ browser = await pw.chromium.connect(server.wsEndpoint());
39
+ } catch (error) {
40
+ failures.push(` ${label}: ${firstLine(error)}`);
41
+ if (server) await killBounded(server);
42
+ continue;
43
+ }
44
+ const live = server;
45
+ stops?.push(() => killBounded(live));
46
+ try {
47
+ return await fn(browser, channel ?? "chromium");
48
+ } finally {
49
+ await killBounded(live);
50
+ }
51
+ }
52
+ throw new ShotError([INSTALL_LINE, ...failures].join("\n"));
53
+ }
54
+ export {
55
+ INSTALL_LINE,
56
+ ShotError,
57
+ isPlaywright,
58
+ resolvePlaywright,
59
+ withBrowser
60
+ };
@@ -0,0 +1,6 @@
1
+ /** Static server for a built SPA dir: real files as-is, extensionless misses fall back to index.html. */
2
+ export declare function serveDist(distDir: string): {
3
+ origin: string;
4
+ stop: () => void;
5
+ };
6
+ //# sourceMappingURL=serve.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"serve.d.ts","sourceRoot":"","sources":["../../../src/cli/shot/serve.ts"],"names":[],"mappings":"AAKA,yGAAyG;AACzG,wBAAgB,SAAS,CAAC,OAAO,EAAE,MAAM,GAAG;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,IAAI,CAAA;CAAE,CA4B/E"}
@@ -0,0 +1,33 @@
1
+ import { existsSync, statSync } from "node:fs";
2
+ import { join, normalize, resolve, sep } from "node:path";
3
+ import { ShotError } from "./playwright.js";
4
+ function serveDist(distDir) {
5
+ const root = resolve(distDir);
6
+ if (!existsSync(root) || !statSync(root).isDirectory()) {
7
+ throw new ShotError(`--dist ${distDir} is not a directory`);
8
+ }
9
+ const fileFor = (pathname) => {
10
+ const file = normalize(join(root, decodeURIComponent(pathname)));
11
+ if (file !== root && !file.startsWith(root + sep)) return null;
12
+ if (existsSync(file) && statSync(file).isFile()) return file;
13
+ if (/\.[a-z0-9]+$/i.test(pathname)) return null;
14
+ const index = join(root, "index.html");
15
+ return existsSync(index) ? index : null;
16
+ };
17
+ const server = Bun.serve({
18
+ port: 0,
19
+ hostname: "127.0.0.1",
20
+ fetch(req) {
21
+ try {
22
+ const file = fileFor(new URL(req.url).pathname);
23
+ return file ? new Response(Bun.file(file), { headers: { "cache-control": "no-store" } }) : new Response("not found", { status: 404 });
24
+ } catch {
25
+ return new Response("bad request", { status: 400 });
26
+ }
27
+ }
28
+ });
29
+ return { origin: `http://127.0.0.1:${server.port}`, stop: () => void server.stop(true) };
30
+ }
31
+ export {
32
+ serveDist
33
+ };
@@ -0,0 +1,98 @@
1
+ export declare const SCHEMES: readonly ["light", "dark"];
2
+ export declare const VIEWPORTS: readonly ["desktop", "mobile"];
3
+ export declare const STATES: readonly ["rest", "hover", "focus", "tooltip", "empty", "loading", "error"];
4
+ /** The states a page opts into with `data-shot-states`; reached through the `shot-state` URL param. */
5
+ export declare const URL_STATES: readonly ["empty", "loading", "error"];
6
+ /** The `name` of a route's full-page shot: not a valid `data-shot` value. */
7
+ export declare const PAGE_ANCHOR = "_page";
8
+ export type Scheme = (typeof SCHEMES)[number];
9
+ export type Viewport = (typeof VIEWPORTS)[number];
10
+ export type ShotState = (typeof STATES)[number];
11
+ export declare const VIEWPORT_SPECS: Record<Viewport, {
12
+ width: number;
13
+ height: number;
14
+ mobile: boolean;
15
+ }>;
16
+ export type Sides = {
17
+ top: number;
18
+ right: number;
19
+ bottom: number;
20
+ left: number;
21
+ };
22
+ export type ContrastFailure = {
23
+ text: string;
24
+ ratio: number;
25
+ fg: string;
26
+ bg: string;
27
+ fontSize: number;
28
+ };
29
+ /** What the in-page measurer returns for one anchor. */
30
+ export type Measurement = {
31
+ box: {
32
+ width: number;
33
+ height: number;
34
+ };
35
+ padding: Sides;
36
+ gap: {
37
+ row: number;
38
+ column: number;
39
+ };
40
+ /** px, or `'full'` for a radius that rounds the box completely (`50%`, `9999px`). */
41
+ radius: number | 'full';
42
+ borderWidth: number;
43
+ fontSizes: number[];
44
+ nested: {
45
+ path: string;
46
+ radius: number | 'full';
47
+ padding: Sides;
48
+ }[];
49
+ emptyRatio: number;
50
+ /** `min` is null when the anchor holds no text. */
51
+ contrast: {
52
+ min: number | null;
53
+ failures: ContrastFailure[];
54
+ /** Set when some text sat on no opaque ancestor background and white was assumed. */
55
+ backdrop?: 'assumed-white';
56
+ };
57
+ };
58
+ export type AnchorMetrics = Measurement & {
59
+ route: string;
60
+ name: string;
61
+ scheme: Scheme;
62
+ viewport: Viewport;
63
+ /** The anchor's contact sheet (`png/…__sheet.png`): every state × scheme × viewport on one image. Absent when it could not be written. */
64
+ sheet?: string;
65
+ };
66
+ export type ShotRecord = {
67
+ route: string;
68
+ name: string;
69
+ scheme: Scheme;
70
+ viewport: Viewport;
71
+ state: ShotState;
72
+ file: string | null;
73
+ status: 'ok' | 'not-declared' | 'skipped' | 'error';
74
+ note?: string;
75
+ };
76
+ /** The theme's resolved steps (px) for one scheme × viewport; a missing custom property is omitted. */
77
+ export type Scale = {
78
+ scheme: Scheme;
79
+ viewport: Viewport;
80
+ spacing: Record<string, number>;
81
+ radius: Record<string, number>;
82
+ fontSizes: Record<string, number>;
83
+ };
84
+ export type ShotMetrics = {
85
+ version: 1;
86
+ generatedAt: string;
87
+ base: string;
88
+ routes: string[];
89
+ viewports: Viewport[];
90
+ schemes: Scheme[];
91
+ states: ShotState[];
92
+ scale: Scale[];
93
+ /** Why `scale` is empty or partial; absent when it was read. */
94
+ scaleError?: string;
95
+ anchors: AnchorMetrics[];
96
+ shots: ShotRecord[];
97
+ };
98
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/cli/shot/types.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,4BAA6B,CAAA;AACjD,eAAO,MAAM,SAAS,gCAAiC,CAAA;AACvD,eAAO,MAAM,MAAM,6EAA8E,CAAA;AACjG,uGAAuG;AACvG,eAAO,MAAM,UAAU,wCAAyC,C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;IACV,WAAW,EAAE,MAAM,CAAA;IACnB,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,MAAM,EAAE,CAAA;IAChB,SAAS,EAAE,QAAQ,EAAE,CAAA;IACrB,OAAO,EAAE,MAAM,EAAE,CAAA;IACjB,MAAM,EAAE,SAAS,EAAE,CAAA;IACnB,KAAK,EAAE,KAAK,EAAE,CAAA;IACd,gEAAgE;IAChE,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,OAAO,EAAE,aAAa,EAAE,CAAA;IACxB,KAAK,EAAE,UAAU,EAAE,CAAA;CACpB,CAAA"}
@@ -0,0 +1,17 @@
1
+ const SCHEMES = ["light", "dark"];
2
+ const VIEWPORTS = ["desktop", "mobile"];
3
+ const STATES = ["rest", "hover", "focus", "tooltip", "empty", "loading", "error"];
4
+ const URL_STATES = ["empty", "loading", "error"];
5
+ const PAGE_ANCHOR = "_page";
6
+ const VIEWPORT_SPECS = {
7
+ desktop: { width: 1440, height: 900, mobile: false },
8
+ mobile: { width: 390, height: 844, mobile: true }
9
+ };
10
+ export {
11
+ PAGE_ANCHOR,
12
+ SCHEMES,
13
+ STATES,
14
+ URL_STATES,
15
+ VIEWPORTS,
16
+ VIEWPORT_SPECS
17
+ };
@@ -1 +1 @@
1
- {"version":3,"file":"sync.d.ts","sourceRoot":"","sources":["../../src/cli/sync.ts"],"names":[],"mappings":"AA+CA,gGAAgG;AAChG,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,CAGjE;AAED,MAAM,MAAM,WAAW,GAAG;IACxB,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,mGAAmG;IACnG,KAAK,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;CAC1B,CAAA;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAKrF;AAQD;;;;;;;;;GASG;AACH,wBAAgB,IAAI,CAAC,IAAI,GAAE,WAAgB,EAAE,aAAa,GAAE,MAAsB,GAAG,MAAM,CAiP1F"}
1
+ {"version":3,"file":"sync.d.ts","sourceRoot":"","sources":["../../src/cli/sync.ts"],"names":[],"mappings":"AAgDA,gGAAgG;AAChG,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,CAGjE;AAED,MAAM,MAAM,WAAW,GAAG;IACxB,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,mGAAmG;IACnG,KAAK,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;CAC1B,CAAA;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAKrF;AAQD;;;;;;;;;GASG;AACH,wBAAgB,IAAI,CAAC,IAAI,GAAE,WAAgB,EAAE,aAAa,GAAE,MAAsB,GAAG,MAAM,CAiP1F"}
package/dist/cli/sync.js CHANGED
@@ -24,6 +24,7 @@ import {
24
24
  readManifest,
25
25
  readSource,
26
26
  reconcileRoots,
27
+ ruleRootsFor,
27
28
  relativePosix,
28
29
  renderContext,
29
30
  reportPrune,
@@ -92,7 +93,7 @@ function sync(opts = {}, invocationCwd = process.cwd()) {
92
93
  return 1;
93
94
  }
94
95
  const rootsState = reconcileRoots(cwd, { write: opts.check !== true });
95
- const ctx = renderContext(cwd);
96
+ const ctx = renderContext(cwd, ruleRootsFor(rootsState));
96
97
  const manifest = readManifest(cwd);
97
98
  const placement = resolvePlacement(cwd);
98
99
  const { skip: seedSkip, skipped } = routerSeedPlan(cwd, placement.appRel);
@@ -1 +1 @@
1
- {"version":3,"file":"settings-section.d.ts","sourceRoot":"","sources":["../../src/dashboard/settings-section.tsx"],"names":[],"mappings":"AA+BA,OAAO,KAA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AAK,EACL,WAAW,EACX,OAAO,EACP,QAAQ,EACR,SAAS,EACT,KAAK,EACL,UAAU,GACX,EAAE,gBAAgB,+BAelB;AAED,MAAM,MAAM,eAAe,GAAG,oBAAoB,CAAA;AAElD,wBAAgB,UAAU,CAAC,EACzB,KAAK,EACL,IAAI,EACJ,QAAQ,EACR,IAAI,EACJ,OAAO,EACP,QAAQ,EACR,SAAS,EACT,KAAK,EACL,UAAU,GACX,EAAE,eAAe,+BAwBjB"}
@@ -28,7 +28,10 @@ function SettingsSection({
28
28
  Card,
29
29
  {
30
30
  className: cx(classNames?.root, className),
31
- style: { padding: "var(--mantine-spacing-xs) var(--mantine-spacing-sm)", ...style },
31
+ style: {
32
+ padding: "var(--vx-space-card-inset-y, 0.75rem) var(--vx-space-card-inset-x, 1rem)",
33
+ ...style
34
+ },
32
35
  children: [
33
36
  /* @__PURE__ */ jsx("div", { className: cx(classes.header, classNames?.header), children: /* @__PURE__ */ jsx(
34
37
  WidgetHeader,
@@ -86,7 +89,7 @@ function DangerZone({
86
89
  {
87
90
  className: cx(classNames?.root, className),
88
91
  style: {
89
- padding: "var(--mantine-spacing-xs) var(--mantine-spacing-sm)",
92
+ padding: "var(--vx-space-card-inset-y, 0.75rem) var(--vx-space-card-inset-x, 1rem)",
90
93
  boxShadow: `${VX.shadowCard}, 0 0 0 1px ${alpha(VX.status.bad, 0.25)}`,
91
94
  ...style
92
95
  },
@@ -119,24 +119,24 @@ function StatCard({
119
119
  {
120
120
  className: cx(classNames?.root, className),
121
121
  style: {
122
- // Card inset = the `cardInsetY`/`cardInsetX` role tokens (11/13 at level 0 — the same
123
- // `xs`/`sm` rungs this used to spell as `--mantine-spacing-*`), matching every other basalt
124
- // card because `ChartCard` reads the SAME two vars. Below `sm` the horizontal one steps a
125
- // rung down on its own: the responsive half of the ladder lives in `spaceMobileDecls`
126
- // (`tokens/index.ts`), which is the only home that can reach an inline style like this one.
127
- // `overflow: hidden` clips
128
- // the full-bleed sparkline to the card's rounded corners; an element's own `box-shadow`
129
- // renders outside its border box and is NOT clipped by its own `overflow`, so the
130
- // shadow-card ring is unaffected (verified — only an ANCESTOR's overflow clips a
131
- // descendant's shadow). Mantine's Card root already sets `overflow: hidden`; this is
132
- // explicit for intent.
122
+ // Card inset = the `cardInsetY`/`cardInsetX` role tokens (12/16 at level 0, the `sm`/`md`
123
+ // rungs of the spacing grid), matching every other basalt card because `ChartCard` reads
124
+ // the SAME two vars. Below `sm` the horizontal one steps a rung down (to 12) on its own:
125
+ // the responsive half of the ladder lives in `spaceMobileDecls` (`tokens/index.ts`), which
126
+ // is the only home that can reach an inline style like this one.
127
+ //
128
+ // `overflow: hidden` clips the full-bleed sparkline to the card's rounded corners. An
129
+ // element's own `box-shadow` renders outside its border box and is NOT clipped by its own
130
+ // `overflow`, so the shadow-card ring is unaffected (verified — only an ANCESTOR's overflow
131
+ // clips a descendant's shadow). Mantine's Card root already sets `overflow: hidden`; this
132
+ // is explicit for intent.
133
133
  //
134
134
  // NO `minHeight`. It was 118px, which is ~25px of dead space under a card holding a title
135
135
  // row, a hero row and a 26px trend — and it was dead space the card could not use, since the
136
136
  // body is `height: 100%` and the sparkline is `margin-top: auto`. The content is what states
137
137
  // the height now (~88-96px), and four cards in a `SimpleGrid` still match because a grid row
138
138
  // stretches its items.
139
- padding: "var(--vx-space-card-inset-y, 0.6875rem) var(--vx-space-card-inset-x, 0.8125rem)",
139
+ padding: "var(--vx-space-card-inset-y, 0.75rem) var(--vx-space-card-inset-x, 1rem)",
140
140
  overflow: "hidden",
141
141
  // Anchors the tone rail. Set unconditionally so a card's stacking context does not change
142
142
  // depending on whether it happens to have crossed a threshold this render.
@@ -123,8 +123,8 @@
123
123
 
124
124
  .sparklineBleed {
125
125
  margin-top: auto;
126
- margin-inline: calc(-1 * var(--mantine-spacing-sm));
127
- margin-bottom: calc(-1 * var(--mantine-spacing-xs));
126
+ margin-inline: calc(-1 * var(--vx-space-card-inset-x, 1rem));
127
+ margin-bottom: calc(-1 * var(--vx-space-card-inset-y, 0.75rem));
128
128
  }
129
129
 
130
130
  /* Asks for `StatCard`'s `SPARKLINE_RIGHT_WIDTH`/`_HEIGHT` (handed down as custom properties, so this
@@ -159,7 +159,7 @@
159
159
  flex: none;
160
160
  align-self: stretch;
161
161
  margin-top: auto;
162
- margin-inline: calc(-1 * var(--mantine-spacing-sm));
163
- margin-bottom: calc(-1 * var(--mantine-spacing-xs));
162
+ margin-inline: calc(-1 * var(--vx-space-card-inset-x, 1rem));
163
+ margin-bottom: calc(-1 * var(--vx-space-card-inset-y, 0.75rem));
164
164
  }
165
165
  }
@@ -102,7 +102,7 @@
102
102
 
103
103
  /*
104
104
  * The icon slot PINS its glyph's box. A consumer's icon arrives at whatever size its own component
105
- * chose (the playground's is 18px), and an 18px mark beside a 13.5px title is a bullet, not a label
105
+ * chose (the playground's is 18px), and an 18px mark beside a 13px title is a bullet, not a label
106
106
  * icon — so the tier states the size here rather than asking every call site to pass one.
107
107
  */
108
108
  /*
@@ -174,7 +174,7 @@
174
174
  overflow-wrap: anywhere;
175
175
  font-family: var(--basalt-font-mono);
176
176
  font-size: var(--vx-text-kpi);
177
- font-weight: 600;
177
+ font-weight: 500;
178
178
  letter-spacing: -0.02em;
179
179
  color: var(--vx-ink);
180
180
  }
@@ -288,7 +288,7 @@
288
288
  z-index: 10;
289
289
  width: max-content;
290
290
  max-width: 260px;
291
- padding: 7px 10px;
291
+ padding: var(--vx-space-stack-sm) var(--vx-space-row-inset-x);
292
292
  border-radius: var(--vx-radius-card);
293
293
  background-color: var(--vx-surface-panel);
294
294
  box-shadow: var(--vx-shadow-card);
@@ -1 +1 @@
1
- {"version":3,"file":"guard-hook.d.ts","sourceRoot":"","sources":["../../src/guard/guard-hook.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAE1C,uEAAuE;AACvE,MAAM,MAAM,UAAU,GAAG;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,IAAI,EA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WAAW,EAChB,IAAI,CAAC,EAAE,wBAAwB,GAC9B,eAAe,CA0BjB"}
@@ -1,5 +1,7 @@
1
1
  /**
2
- * ./guard — headless policy core. Mantine-free, dependency-free.
2
+ * ./guard — headless policy core. Mantine-free and light: it may import dependency-free leaves
3
+ * (`tokens/space-scale`, `common/*`), never `tokens/palette` or `derive` (colour math on every
4
+ * Write/Edit).
3
5
  *
4
6
  * GUARD_RULES: the closed registry of all 26 violation kinds.
5
7
  * checkSource: pure (text, relPath, cfg) → Finding[]. No FS, no walk, no console.
@@ -212,7 +214,7 @@ export declare const GUARD_RULES: {
212
214
  readonly pattern: RegExp;
213
215
  readonly enabled: (cfg: GuardConfig) => boolean;
214
216
  readonly appliesTo: (relPath: string) => boolean;
215
- readonly message: "withBorder on a Card/Paper double-draws the edge — card depth is --vx-shadow-card, which already bakes a 1px ring into the shadow. Drop the prop (docs/DESIGN-SPEC.md doctrine inversion #1) — and fix the inset in the same edit: an explicit p/padding or radius on that Card/Paper is the other half of the idiom, which only the oxlint lane sees (basalt/card-inset); leave both to the theme or use py=\"xs\" px=\"sm\".";
217
+ readonly message: "withBorder on a Card/Paper double-draws the edge — card depth is --vx-shadow-card, which already bakes a 1px ring into the shadow. Drop the prop (docs/DESIGN-SPEC.md doctrine inversion #1) — and fix the inset in the same edit: an explicit p/padding or radius on that Card/Paper is the other half of the idiom, which only the oxlint lane sees (basalt/card-inset); leave both to the theme or use py=\"sm\" px=\"md\".";
216
218
  };
217
219
  readonly 'off-system-surface-var': {
218
220
  readonly kind: "off-system-surface-var";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/guard/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAM7E,YAAY,EAAE,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,aAAa,EAAE,CAAA;AAgU9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,7 @@ import { vxFamilyOf } from "../common/vx-family.js";
2
2
  import { BASALT_VX_FAMILIES } from "../common/vx-families.js";
3
3
  import { FONTS_CSS_HINT } from "./fonts-hint.js";
4
4
  import { BASALT_VX_NAMES } from "./vx-names.js";
5
+ import { SPACE_SCALE_LEVEL0 } from "../tokens/space-scale.js";
5
6
  const HEX = /#(?!(?<=&#)\d+;)[0-9a-fA-F]{3,8}\b/g;
6
7
  const FUNC = /\b(?:rgba?|hsla?)\((?!\s*\$\{)/g;
7
8
  const LOCALSTORAGE_THEME = /localStorage\s*\.\s*getItem\s*\(\s*['"]theme['"]\s*\)/g;
@@ -124,7 +125,7 @@ const INLINE_SPACING = new RegExp(
124
125
  `(?<![\\w-])(?:${SPACING_PROP})\\s*:\\s*(?!var\\()['"]?[-+]?(?!0(?![.\\d]))${SPACING_NUMBER}`,
125
126
  "g"
126
127
  );
127
- const MICRO_SPACING_CEILING_PX = 10;
128
+ const MICRO_SPACING_CEILING_PX = SPACE_SCALE_LEVEL0.xs - 1;
128
129
  const STYLE_ATTRIBUTE_OPENER = /\b(?:style|styles|sx|css)\s*=\s*\{?\s*$/;
129
130
  const OBJECT_DECLARATION = /\b(?:const|let|var)\s+([A-Za-z_$][\w$]*)\s*(?::([^=]*))?=\s*$/;
130
131
  const STYLE_OBJECT_NAME = /(?:Style|Styles|Css)$|^(?:style|styles|css|sx)$/;
@@ -233,7 +234,9 @@ const BASALT_ANY_IMPORT = /\b(?:from|import)\s+['"]basalt-ui(?:\/[^'"]*)?['"]/;
233
234
  const MANTINE_FORM_IMPORT = /from\s+['"]@mantine\/form['"]/;
234
235
  const STYLES_INPUT_PART = /\bstyles\s*=\s*\{\{\s*input\s*:\s*\{([^}]*)\}/g;
235
236
  const SUB_16_FONT_SIZE = /font-?[Ss]ize\s*:\s*['"]?(-?\d+(?:\.\d+)?)(?:px)?['"]?(?=[,\s}]|$)/g;
236
- const DEFAULT_SPACING_STEPS = [11, 13, 18, 20, 26];
237
+ const DEFAULT_SPACING_STEPS = Object.values(SPACE_SCALE_LEVEL0).toSorted(
238
+ (a, b) => a - b
239
+ );
237
240
  const DEFAULT_FORBIDDEN_ACCENTS = ["teal", "violet", "grape", "indigo", "pink"];
238
241
  const DEFAULT_GUARD_CONFIG = {
239
242
  spacingSteps: DEFAULT_SPACING_STEPS,
@@ -253,7 +256,18 @@ const DEFAULT_GUARD_CONFIG = {
253
256
  exemptRules: {},
254
257
  severity: {}
255
258
  };
256
- const GRACE_PERIOD_KINDS = {};
259
+ const GRACE_PERIOD_KINDS = {
260
+ "raw-spacing": {
261
+ since: "2.16.0",
262
+ promote: "2.17.0",
263
+ why: "The spacing scale moved to 8/12/16/20/24 in 2.16.0: a prop value equal to a NEW step (p={16}) is newly a finding."
264
+ },
265
+ "inline-spacing": {
266
+ since: "2.16.0",
267
+ promote: "2.17.0",
268
+ why: "The scale moved to 8/12/16/20/24 and the CSS micro ceiling dropped 10 \u2192 7 in 2.16.0: a literal 8px/10px in CSS is newly a finding."
269
+ }
270
+ };
257
271
  function severityOf(kind, cfg) {
258
272
  return cfg.severity?.[kind] ?? (Object.hasOwn(GRACE_PERIOD_KINDS, kind) ? "warn" : "error");
259
273
  }
@@ -802,7 +816,7 @@ const GUARD_RULES = {
802
816
  enabled: (cfg) => cfg.cardWithBorder,
803
817
  // JSX-tag-shaped (`<Card withBorder>`) — never appears in CSS text.
804
818
  appliesTo: (relPath) => !relPath.endsWith(".css"),
805
- message: 'withBorder on a Card/Paper double-draws the edge \u2014 card depth is --vx-shadow-card, which already bakes a 1px ring into the shadow. Drop the prop (docs/DESIGN-SPEC.md doctrine inversion #1) \u2014 and fix the inset in the same edit: an explicit p/padding or radius on that Card/Paper is the other half of the idiom, which only the oxlint lane sees (basalt/card-inset); leave both to the theme or use py="xs" px="sm".'
819
+ message: 'withBorder on a Card/Paper double-draws the edge \u2014 card depth is --vx-shadow-card, which already bakes a 1px ring into the shadow. Drop the prop (docs/DESIGN-SPEC.md doctrine inversion #1) \u2014 and fix the inset in the same edit: an explicit p/padding or radius on that Card/Paper is the other half of the idiom, which only the oxlint lane sees (basalt/card-inset); leave both to the theme or use py="sm" px="md".'
806
820
  },
807
821
  "off-system-surface-var": {
808
822
  kind: "off-system-surface-var",
@@ -1 +1 @@
1
- {"version":3,"file":"vx-names.d.ts","sourceRoot":"","sources":["../../src/guard/vx-names.ts"],"names":[],"mappings":"AAEA,6FAA6F;AAC7F,eAAO,MAAM,eAAe,EAAE,SAAS,MAAM,EA6N5C,CAAA"}
1
+ {"version":3,"file":"vx-names.d.ts","sourceRoot":"","sources":["../../src/guard/vx-names.ts"],"names":[],"mappings":"AAEA,6FAA6F;AAC7F,eAAO,MAAM,eAAe,EAAE,SAAS,MAAM,EA8N5C,CAAA"}
@@ -108,6 +108,7 @@ const BASALT_VX_NAMES = [
108
108
  "--vx-space-control-gap",
109
109
  "--vx-space-control-height",
110
110
  "--vx-space-control-height-ctl",
111
+ "--vx-space-control-height-dense",
111
112
  "--vx-space-control-height-tag",
112
113
  "--vx-space-control-height-widget",
113
114
  "--vx-space-guide-body-gap-bottom",
@@ -158,7 +158,7 @@
158
158
  }
159
159
 
160
160
  .menuItem :global(.mantine-Menu-itemLabel) {
161
- font-size: var(--mantine-font-size-md) !important;
161
+ font-size: var(--mantine-font-size-sm) !important;
162
162
  }
163
163
 
164
164
  /* An active destination reads the same in the More surface as it does in the sheet. */
@@ -245,7 +245,7 @@
245
245
  * touch target with a `min-height` floor and symmetric inset, so growing one side of it would make
246
246
  * that row read as a different size from its siblings. */
247
247
  .menuDropdown .menuSectionStart {
248
- margin-top: 8px;
248
+ margin-top: var(--vx-space-stack-sm);
249
249
  }
250
250
 
251
251
  /*
@@ -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,
@@ -379,6 +379,8 @@ export declare const RULE_NAMES: readonly RuleName[];
379
379
  * SKILL_NAMES.includes('basalt-design') // true
380
380
  */
381
381
  export declare const SKILL_NAMES: readonly SkillName[];
382
+ /** The shipped subagents (`agent/agents/<name>.md`), installed at `.claude/agents/`. */
383
+ export declare const AGENT_NAMES: readonly ["basalt-design-reviewer"];
382
384
  /**
383
385
  * Headless SURFACES keys whose Mantine-free guarantee is enforced by the `basalt/token-layer-
384
386
  * boundary` oxlint plugin rule (`configs/oxlint-plugin.js`) instead of a `forbiddenImports`