basalt-ui 2.20.0 → 2.21.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 (132) hide show
  1. package/CHANGELOG.md +39 -0
  2. package/MIGRATING.md +129 -12
  3. package/agent/agents/basalt-design-reviewer.md +22 -5
  4. package/agent/rules/basalt-tokens.md +2 -2
  5. package/agent/skills/basalt-design/SKILL.md +10 -23
  6. package/agent/skills/basalt-design/references/anti-defaults.md +24 -0
  7. package/agent/skills/basalt-design/references/catalogue.md +48 -0
  8. package/agent/skills/basalt-design/references/concept.md +36 -0
  9. package/agent/skills/basalt-design/references/encoding-rules.md +45 -0
  10. package/agent/skills/basalt-design/references/stat-tile.md +24 -0
  11. package/agent/templates/AGENTS-block.md.tpl +3 -3
  12. package/configs/oxlint-plugin.js +1 -0
  13. package/dist/charts/ChartCard.d.ts +6 -2
  14. package/dist/charts/ChartCard.d.ts.map +1 -1
  15. package/dist/charts/ChartCard.js +4 -0
  16. package/dist/charts/state.d.ts +5 -0
  17. package/dist/charts/state.d.ts.map +1 -1
  18. package/dist/charts/state.js +2 -0
  19. package/dist/cli/check-theme.d.ts.map +1 -1
  20. package/dist/cli/check-theme.js +3 -0
  21. package/dist/cli/help.d.ts.map +1 -1
  22. package/dist/cli/help.js +3 -2
  23. package/dist/cli/index.d.ts +4 -2
  24. package/dist/cli/index.d.ts.map +1 -1
  25. package/dist/cli/index.js +27 -15
  26. package/dist/cli/init.d.ts.map +1 -1
  27. package/dist/cli/init.js +3 -2
  28. package/dist/cli/shot/capture.d.ts.map +1 -1
  29. package/dist/cli/shot/capture.js +6 -1
  30. package/dist/cli/shot/detect.d.ts +51 -0
  31. package/dist/cli/shot/detect.d.ts.map +1 -0
  32. package/dist/cli/shot/detect.js +396 -0
  33. package/dist/cli/shot/index.d.ts.map +1 -1
  34. package/dist/cli/shot/index.js +7 -4
  35. package/dist/cli/shot/measure.d.ts +2 -0
  36. package/dist/cli/shot/measure.d.ts.map +1 -1
  37. package/dist/cli/shot/measure.js +2 -0
  38. package/dist/cli/shot/types.d.ts +4 -1
  39. package/dist/cli/shot/types.d.ts.map +1 -1
  40. package/dist/cli/shot/types.js +2 -0
  41. package/dist/cli/sync.d.ts +2 -0
  42. package/dist/cli/sync.d.ts.map +1 -1
  43. package/dist/cli/sync.js +2 -2
  44. package/dist/common/retry-button.d.ts +12 -0
  45. package/dist/common/retry-button.d.ts.map +1 -0
  46. package/dist/common/retry-button.js +22 -0
  47. package/dist/common/retry-button.module.css +58 -0
  48. package/dist/common/retry-button.module.css.d.ts +8 -0
  49. package/dist/dashboard/bar-list.d.ts +5 -2
  50. package/dist/dashboard/bar-list.d.ts.map +1 -1
  51. package/dist/dashboard/bar-list.js +2 -2
  52. package/dist/dashboard/meter-model.d.ts +34 -6
  53. package/dist/dashboard/meter-model.d.ts.map +1 -1
  54. package/dist/dashboard/meter-model.js +44 -13
  55. package/dist/dashboard/meter-parts.d.ts.map +1 -1
  56. package/dist/dashboard/meter-parts.js +167 -135
  57. package/dist/dashboard/meter.d.ts +11 -7
  58. package/dist/dashboard/meter.d.ts.map +1 -1
  59. package/dist/dashboard/meter.js +5 -1
  60. package/dist/dashboard/meter.module.css +18 -65
  61. package/dist/dashboard/meter.module.css.d.ts +2 -7
  62. package/dist/dashboard/query-state.d.ts +1 -1
  63. package/dist/dashboard/query-state.d.ts.map +1 -1
  64. package/dist/dashboard/query-state.js +3 -2
  65. package/dist/dashboard/stat-card.d.ts.map +1 -1
  66. package/dist/dashboard/stat-card.js +2 -1
  67. package/dist/dashboard/stat-strip.d.ts +17 -0
  68. package/dist/dashboard/stat-strip.d.ts.map +1 -1
  69. package/dist/dashboard/stat-strip.js +35 -5
  70. package/dist/dashboard/stat-strip.module.css +97 -14
  71. package/dist/dashboard/stat-strip.module.css.d.ts +4 -0
  72. package/dist/dashboard/visual-slot.d.ts +2 -0
  73. package/dist/dashboard/visual-slot.d.ts.map +1 -0
  74. package/dist/dashboard/visual-slot.js +5 -0
  75. package/dist/guard/index.d.ts +15 -2
  76. package/dist/guard/index.d.ts.map +1 -1
  77. package/dist/guard/index.js +14 -0
  78. package/dist/guard/palette.d.ts +51 -0
  79. package/dist/guard/palette.d.ts.map +1 -0
  80. package/dist/guard/palette.js +190 -0
  81. package/dist/guard/series-file.d.ts +15 -0
  82. package/dist/guard/series-file.d.ts.map +1 -0
  83. package/dist/guard/series-file.js +29 -0
  84. package/dist/guard/types.d.ts +3 -3
  85. package/dist/guard/types.d.ts.map +1 -1
  86. package/dist/surfaces.d.ts +1 -1
  87. package/dist/surfaces.d.ts.map +1 -1
  88. package/dist/surfaces.js +2 -0
  89. package/dist/theme/controls.module.css +10 -0
  90. package/dist/theme/index.d.ts.map +1 -1
  91. package/dist/theme/index.js +18 -0
  92. package/dist/tokens/oklab.d.ts +28 -0
  93. package/dist/tokens/oklab.d.ts.map +1 -0
  94. package/dist/tokens/oklab.js +73 -0
  95. package/llms.txt +7 -5
  96. package/package.json +1 -1
  97. package/src/charts/ChartCard.tsx +9 -1
  98. package/src/charts/state.tsx +9 -0
  99. package/src/cli/check-theme.ts +3 -0
  100. package/src/cli/help.ts +18 -1
  101. package/src/cli/index.ts +48 -17
  102. package/src/cli/init.ts +2 -1
  103. package/src/cli/shot/capture.ts +15 -2
  104. package/src/cli/shot/detect.ts +533 -0
  105. package/src/cli/shot/index.ts +8 -4
  106. package/src/cli/shot/measure.ts +4 -0
  107. package/src/cli/shot/types.ts +5 -1
  108. package/src/cli/sync.ts +4 -2
  109. package/src/common/retry-button.module.css +58 -0
  110. package/src/common/retry-button.module.css.d.ts +8 -0
  111. package/src/common/retry-button.tsx +29 -0
  112. package/src/dashboard/bar-list.tsx +11 -8
  113. package/src/dashboard/meter-model.ts +91 -20
  114. package/src/dashboard/meter-parts.tsx +155 -115
  115. package/src/dashboard/meter.module.css +18 -65
  116. package/src/dashboard/meter.module.css.d.ts +2 -7
  117. package/src/dashboard/meter.tsx +18 -8
  118. package/src/dashboard/query-state.tsx +4 -7
  119. package/src/dashboard/stat-card.tsx +4 -1
  120. package/src/dashboard/stat-strip.module.css +97 -14
  121. package/src/dashboard/stat-strip.module.css.d.ts +4 -0
  122. package/src/dashboard/stat-strip.tsx +85 -5
  123. package/src/dashboard/visual-slot.ts +8 -0
  124. package/src/guard/index.ts +16 -4
  125. package/src/guard/palette.ts +261 -0
  126. package/src/guard/series-file.ts +51 -0
  127. package/src/guard/types.ts +3 -2
  128. package/src/surfaces.ts +2 -0
  129. package/src/theme/__snapshots__/plain-theme.test.ts.snap +82 -48
  130. package/src/theme/controls.module.css +10 -0
  131. package/src/theme/index.ts +26 -0
  132. package/src/tokens/oklab.ts +97 -0
@@ -1 +1 @@
1
- {"version":3,"file":"meter.d.ts","sourceRoot":"","sources":["../../src/dashboard/meter.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmDG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACtC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAElD,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAIvE,KAAK,MAAM,GAAG,WAAW,GAAG;IAC1B,mGAAmG;IACnG,KAAK,EAAE,MAAM,CAAA;IACb,8BAA8B;IAC9B,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,8BAA8B;IAC9B,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,0FAA0F;IAC1F,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAA;IAClC,qDAAqD;IACrD,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,yFAAyF;IACzF,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAA;AAED,KAAK,SAAS,GAAG,MAAM,GAAG;IACxB,KAAK,CAAC,EAAE,KAAK,CAAA;IACb,iGA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,CAAC,EAAE,KAAK,CAAA;IACd,KAAK,CAAC,EAAE,KAAK,CAAA;IACb,IAAI,CAAC,EAAE,KAAK,CAAA;IACZ,IAAI,CAAC,EAAE,KAAK,CAAA;IACZ,YAAY,CAAC,EAAE,KAAK,CAAA;IACpB,UAAU,CAAC,EAAE,KAAK,CAAA;CACnB,CAAC,CAAA;AAkBN,wBAAgB,KAAK,CAAC,KAAK,EAAE,UAAU,+BAkCtC"}
@@ -10,6 +10,10 @@ function warnInvalidTrack(min, max) {
10
10
  `[basalt] Meter: max (${max}) must be greater than min (${min}); drawing an empty track`
11
11
  );
12
12
  }
13
+ function barTone(tone, plain) {
14
+ if (tone === "ink") return void 0;
15
+ return tone === "muted" || plain ? "muted" : void 0;
16
+ }
13
17
  function Meter(props) {
14
18
  const { label, min = 0, max = 100, format = asText, className, style } = props;
15
19
  const row = props.size === "row";
@@ -34,7 +38,7 @@ function Meter(props) {
34
38
  zones: props.zones,
35
39
  target: isReading(props.target) ? props.target : void 0,
36
40
  ticks: props.ticks,
37
- tone: props.tone,
41
+ tone: barTone(props.tone, props.segments === void 0 && props.zones === void 0),
38
42
  forecastCaption: props.segments === void 0 ? void 0 : props.forecastCaption,
39
43
  startCaption: props.startCaption,
40
44
  endCaption: props.endCaption
@@ -14,10 +14,6 @@
14
14
  --basalt-meter-caption: var(--vx-text-micro);
15
15
  }
16
16
 
17
- .root.zoned {
18
- position: relative;
19
- }
20
-
21
17
  .track {
22
18
  position: relative;
23
19
  display: flex;
@@ -57,13 +53,15 @@
57
53
  }
58
54
 
59
55
  /*
60
- * Zone names under the band: absolutely placed at each band start so they stay on the band. When
61
- * they would collide the band collapses (hidden but still laid out, so it can be re-measured) and the
62
- * same names wrap as a list. The holding zone is ink, the rest muted.
56
+ * The one label row under (or, for a plain tick Meter, above) the track: zone names centred on their
57
+ * spans, labelled ticks hugging their marks, all absolutely placed on one baseline. A label that does
58
+ * not fit is hidden but stays laid out, so a resize can measure it again.
63
59
  */
64
- .zoneBand {
60
+ .labelRow {
61
+ --basalt-reading-dir: 1;
65
62
  position: relative;
66
- /* Labels are absolutely placed, so the row needs its own line height. */
63
+ /* A hidden name keeps its box (so it can be measured again) and may sit past the row's end. */
64
+ overflow-x: clip;
67
65
  height: 1.25em;
68
66
  font-family: var(--basalt-font-numeral, var(--basalt-font-sans));
69
67
  font-variant-numeric: lining-nums;
@@ -71,42 +69,28 @@
71
69
  color: var(--vx-muted);
72
70
  }
73
71
 
74
- /*
75
- * Hidden but laid out, so a resize can measure it again. Absolute against `.root.zoned`, which has
76
- * no inline padding, so `inset-inline: 0` gives the band the same width as when it was in flow.
77
- */
78
- .zoneBand[data-collapsed] {
79
- position: absolute;
80
- top: 0;
81
- inset-inline: 0;
82
- visibility: hidden;
83
- pointer-events: none;
72
+ .labelRow:dir(rtl) {
73
+ --basalt-reading-dir: -1;
84
74
  }
85
75
 
86
- .zoneLabel {
76
+ .rowLabel {
87
77
  position: absolute;
88
78
  top: 0;
89
79
  white-space: nowrap;
90
80
  }
91
81
 
92
- .zoneLabelHolding {
93
- font-weight: 500;
94
- color: var(--vx-ink);
82
+ .rowLabel[data-hidden] {
83
+ visibility: hidden;
95
84
  }
96
85
 
97
- .zoneList {
98
- display: flex;
99
- flex-wrap: wrap;
100
- gap: var(--vx-space-stack-xs) var(--vx-space-stack-sm);
101
- font-family: var(--basalt-font-numeral, var(--basalt-font-sans));
102
- font-variant-numeric: lining-nums;
103
- font-size: var(--basalt-meter-caption);
104
- color: var(--vx-muted);
86
+ /* A zone name is centred on its span: the physical `translate` flips sign in RTL. */
87
+ .zoneLabel {
88
+ translate: calc(-50% * var(--basalt-reading-dir)) 0;
105
89
  }
106
90
 
107
- .zoneListItem {
108
- min-width: 0;
109
- overflow-wrap: anywhere;
91
+ .zoneLabelHolding {
92
+ font-weight: 500;
93
+ color: var(--vx-ink);
110
94
  }
111
95
 
112
96
  /* The reading under the band, centred on the marker. Clipped so it never widens the row before the first measure. */
@@ -295,37 +279,6 @@
295
279
  height: 5rem;
296
280
  }
297
281
 
298
- /* ── tick captions ───────────────────────────────────────────────────────────────────────────── */
299
-
300
- /* Above the track, so they never share a row with the zone names or the captions below it. */
301
- .tickLabels {
302
- position: relative;
303
- }
304
-
305
- .tickBand {
306
- position: relative;
307
- height: 1.25em;
308
- font-family: var(--basalt-font-numeral, var(--basalt-font-sans));
309
- font-variant-numeric: lining-nums;
310
- font-size: var(--basalt-meter-caption);
311
- color: var(--vx-muted);
312
- }
313
-
314
- /* Hidden but laid out, so a resize can measure it again. */
315
- .tickBand[data-collapsed] {
316
- position: absolute;
317
- top: 0;
318
- inset-inline: 0;
319
- visibility: hidden;
320
- pointer-events: none;
321
- }
322
-
323
- .tickLabel {
324
- position: absolute;
325
- top: 0;
326
- white-space: nowrap;
327
- }
328
-
329
282
  /* ── size="row" ──────────────────────────────────────────────────────────────────────────────── */
330
283
 
331
284
  .row {
@@ -5,17 +5,15 @@
5
5
  declare const classes: {
6
6
  readonly root: string
7
7
  readonly summary: string
8
- readonly zoned: string
9
8
  readonly track: string
10
9
  readonly trackBox: string
11
10
  readonly fill: string
12
11
  readonly forecastFill: string
13
12
  readonly zone: string
14
- readonly zoneBand: string
13
+ readonly labelRow: string
14
+ readonly rowLabel: string
15
15
  readonly zoneLabel: string
16
16
  readonly zoneLabelHolding: string
17
- readonly zoneList: string
18
- readonly zoneListItem: string
19
17
  readonly zoneReadingRow: string
20
18
  readonly zoneReading: string
21
19
  readonly marker: string
@@ -36,9 +34,6 @@ declare const classes: {
36
34
  readonly ringArc: string
37
35
  readonly ringValue: string
38
36
  readonly skeletonRing: string
39
- readonly tickLabels: string
40
- readonly tickBand: string
41
- readonly tickLabel: string
42
37
  readonly row: string
43
38
  }
44
39
  export default classes
@@ -43,7 +43,7 @@ export type ErrorStateProps = BasaltProps & {
43
43
  /** Shown only when the server body carries no readable message. */
44
44
  fallback?: string;
45
45
  onRetry?: () => void;
46
- /** Disables/spins the retry button while a refetch is in flight. */
46
+ /** Disables the retry button while a refetch is in flight. */
47
47
  retrying?: boolean;
48
48
  /** How loud this state is. Default `'page'`. */
49
49
  tier?: QueryStateTier;
@@ -1 +1 @@
1
- {"version":3,"file":"query-state.d.ts","sourceRoot":"","sources":["../../src/dashboard/query-state.tsx"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAiB,SAAS,EAAE,MAAM,OAAO,CAAA;AAGrD,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAKnE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAA;AAEhE;;;;;;;GAOG;AACH,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,SAAS,CAAA;AAE/C;;;;;GAKG;AACH,YAAY,EAAE,cAAc,EAAE,CAAA;AAE9B,kGAAkG;AAClG,MAAM,MAAM,cAAc,GAAG;IAC3B,KAAK,EAAE,MAAM,CAAA;IACb,8EAA8E;IAC9E,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,2CAA2C;IAC3C,IAAI,CAAC,EAAE,SAAS,CAAA;IAChB,4DAA4D;IAC5D,MAAM,CAAC,EAAE,SAAS,CAAA;CACnB,CAAA;AAID,MAAM,MAAM,iBAAiB,GAAG,WAAW,GAAG;IAC5C,gDAAgD;IAChD,IAAI,CAAC,EAAE,cAAc,CAAA;IACrB,4DAA4D;IAC5D,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,CAAA;AAED,gGAAgG;AAChG,wBAAgB,YAAY,CAAC,EAC3B,IAAI,EACJ,KAAiB,EACjB,SAAS,EACT,KAAK,GACN,EAAE,iBAAiB,GAAG,SAAS,CAuB/B;AAID,MAAM,MAAM,eAAe,GAAG,WAAW,GAAG;IAC1C,kFAAkF;IAClF,KAAK,EAAE,OAAO,CAAA;IACd,oEAAoE;IACpE,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,mEAAmE;IACnE,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,OAAO,CAAC,EAAE,MAAM,IAAI,C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D,OAAO,CAAC,EAAE,SAAS,CAAA;CACpB,CAAA;AAEH;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,EAChC,KAAK,EACL,QAAQ,EACR,KAAK,EACL,OAAO,EACP,UAA6B,EAC7B,aAAqC,EACrC,WAAW,EACX,IAAI,EACJ,OAAO,EACP,SAAS,EACT,KAAK,EACL,UAAU,GACX,EAAE,eAAe,CAAC,KAAK,CAAC,GAAG,SAAS,CAqEpC"}
@@ -1,7 +1,8 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
- import { Button, Center, Group, Loader, Stack, Text } from "@mantine/core";
2
+ import { Center, Group, Loader, Stack, Text } from "@mantine/core";
3
3
  import { toErrorMessage } from "../common/errors.js";
4
4
  import { cx } from "../common/props.js";
5
+ import { RetryButton } from "../common/retry-button.js";
5
6
  import { VX } from "../tokens/index.js";
6
7
  import { StatusDot } from "../theme/status-dot.js";
7
8
  import { EmptyState } from "./empty-state.js";
@@ -59,7 +60,7 @@ function ErrorState({
59
60
  ] }),
60
61
  /* @__PURE__ */ jsx(Text, { size: "sm", c: "dimmed", children: toErrorMessage(error, fallback) }),
61
62
  (onRetry ?? action) !== void 0 && /* @__PURE__ */ jsxs(Group, { gap: "xs", children: [
62
- onRetry && /* @__PURE__ */ jsx(Button, { size: "xs", variant: "default", loading: retrying, onClick: onRetry, children: "Retry" }),
63
+ onRetry && /* @__PURE__ */ jsx(RetryButton, { onClick: onRetry, retrying }),
63
64
  action
64
65
  ] })
65
66
  ]
@@ -1 +1 @@
1
- {"version":3,"file":"stat-card.d.ts","sourceRoot":"","sources":["../../src/dashboard/stat-card.tsx"],"names":[],"mappings":"AA6FA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAUtC,OAAO,KAAK,EACV,sBAAsB,EACtB,uBAAuB,EACvB,sBAAsB,EACvB,MAAM,iBAAiB,CAAA;AAGxB,OAAO,KAAK,EAAE,WAAW,EAAE,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ACJ,SAAS,EACT,KAAK,EACL,UAAU,GACX,EAAE,aAAa,+BAgLf"}
@@ -14,6 +14,7 @@ import { DeltaBadge } from "./delta-badge.js";
14
14
  import { cx } from "../common/props.js";
15
15
  import { ErrorState, QueryState, resolveQueryBranch } from "./query-state.js";
16
16
  import classes from "./stat-card.module.css";
17
+ import { VisualSlotContext } from "./visual-slot.js";
17
18
  const SPARKLINE_RIGHT_WIDTH = 72;
18
19
  const SPARKLINE_HEIGHT = 22;
19
20
  function useSlotWidth(active) {
@@ -136,7 +137,7 @@ function StatCard({
136
137
  classNames?.sparkline
137
138
  ),
138
139
  ...!bleeds && { style: rightSlotStyle(SPARKLINE_RIGHT_WIDTH, SPARKLINE_HEIGHT) },
139
- children: isRender ? measured.width > 0 && sparkline(measured) : sparkline
140
+ children: /* @__PURE__ */ jsx(VisualSlotContext.Provider, { value: true, children: isRender ? measured.width > 0 && sparkline(measured) : sparkline })
140
141
  }
141
142
  );
142
143
  const figure = /* @__PURE__ */ jsxs("div", { className: classes.valueRow, children: [
@@ -9,6 +9,20 @@ export type StatStripRow = {
9
9
  /** A `DeltaBadge`. */
10
10
  delta?: ReactNode;
11
11
  };
12
+ /** What a cell shows instead of its readings. Mirrors `StatCard`'s `query` branches. */
13
+ type StatStripCellState = {
14
+ kind: 'empty';
15
+ /** Why there is no reading, one muted line (`'No sleep logged'`). */
16
+ reason?: string;
17
+ } | {
18
+ kind: 'error';
19
+ /** Whatever was thrown; decoded like `ErrorState`'s. */
20
+ error?: unknown;
21
+ /** Renders the shared Retry button. */
22
+ onRetry?: () => void;
23
+ /** A refetch is in flight: Retry is inert. */
24
+ retrying?: boolean;
25
+ };
12
26
  export type StatStripCell = {
13
27
  key: string;
14
28
  caption: string;
@@ -33,6 +47,8 @@ export type StatStripCell = {
33
47
  loading?: boolean;
34
48
  /** Dims the cell while placeholder data shows. */
35
49
  stale?: boolean;
50
+ /** Empty or failed: replaces the readings; `loading` wins while pending. */
51
+ state?: StatStripCellState;
36
52
  };
37
53
  export type StatStripProps = BasaltProps & {
38
54
  /** The strip's accessible name. */
@@ -47,4 +63,5 @@ export type StatStripProps = BasaltProps & {
47
63
  cols?: 2 | 3 | 4 | 5 | 6;
48
64
  };
49
65
  export declare function StatStrip({ label, cells, footer, cols, className, style }: StatStripProps): import("react").JSX.Element;
66
+ export {};
50
67
  //# sourceMappingURL=stat-strip.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"stat-strip.d.ts","sourceRoot":"","sources":["../../src/dashboard/stat-strip.tsx"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAiB,SAAS,EAAE,MAAM,OAAO,CAAA;AAErD,OAAO,KAAK,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAA;AAKxD,MAAM,MAAM,YAAY,GAAG;IACzB,GAAG,EAAE,MAAM,CAAA;IACX,KAAK,EAAE,MAAM,CAAA;IACb,0EAA0E;IAC1E,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;IACpB,MAAM,CAAC,EAAE,SAAS,CAAA;IAClB,sBAAsB;IACtB,KAAK,CAAC,EAAE,SAAS,CAAA;CAClB,CAAA;AAED,MAAM,MAAM,aAAa,GAAG;IAC1B,GAAG,EAAE,MAAM,CAAA;IACX,OAAO,EAAE,MAAM,CAAA;IACf,yDAAyD;IACzD,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,oEAAoE;IACpE,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,mFAAmF;IACnF,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACrB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,sBAAsB;IACtB,KAAK,CAAC,EAAE,SAAS,CAAA;IACjB,6DAA6D;IAC7D,MAAM,CAAC,EAAE,SAAS,CAAA;IAClB,4CAA4C;IAC5C,MAAM,CAAC,EAAE,SAAS,CAAA;IAClB,yEAAyE;IACzE,IAAI,CAAC,EAAE,SAAS,YAAY,EAAE,CAAA;IAC9B,kEAAkE;IAClE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C,GAAG,CAAC,CAAA;CACzB,CAAA;AAwHD,wBAAgB,SAAS,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,EAAE,cAAc,+BAyCzF"}
@@ -1,15 +1,39 @@
1
- import { jsx, jsxs } from "react/jsx-runtime";
1
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
2
2
  import { Card, Skeleton } from "@mantine/core";
3
3
  import { useId } from "react";
4
+ import { toErrorMessage } from "../common/errors.js";
4
5
  import { cx } from "../common/props.js";
6
+ import { RetryButton } from "../common/retry-button.js";
7
+ import { StatusDot } from "../theme/status-dot.js";
5
8
  import { VX } from "../tokens/index.js";
6
9
  import { InfoGlyph } from "./widget-header.js";
7
10
  import classes from "./stat-strip.module.css";
11
+ import { VisualSlotContext } from "./visual-slot.js";
8
12
  const EMPTY = "\u2014";
13
+ function CellState({ state }) {
14
+ if (state.kind === "empty") {
15
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
16
+ /* @__PURE__ */ jsx("div", { className: classes.valueRow, children: /* @__PURE__ */ jsx("span", { className: classes.value, "data-strip-value": true, children: EMPTY }) }),
17
+ state.reason !== void 0 && /* @__PURE__ */ jsx("p", { className: classes.reason, children: state.reason })
18
+ ] });
19
+ }
20
+ const message = toErrorMessage(state.error, "The request failed.");
21
+ return /* @__PURE__ */ jsxs("div", { className: classes.error, role: "alert", "data-strip-state": "error", children: [
22
+ /* @__PURE__ */ jsxs("span", { className: classes.errorHead, children: [
23
+ /* @__PURE__ */ jsx(StatusDot, { color: VX.status.bad }),
24
+ "Failed"
25
+ ] }),
26
+ /* @__PURE__ */ jsx("p", { className: classes.reason, children: message }),
27
+ state.onRetry !== void 0 && /* @__PURE__ */ jsx(RetryButton, { onClick: state.onRetry, retrying: state.retrying ?? false })
28
+ ] });
29
+ }
9
30
  function StripCell({ cell }) {
10
31
  const captionId = useId();
11
32
  const { rows, loading } = cell;
33
+ const state = loading ? void 0 : cell.state;
12
34
  const hasHero = cell.value !== void 0 || rows === void 0;
35
+ const ownFooter = cell.visual !== void 0 && rows === void 0;
36
+ const footerEl = cell.footer !== void 0 && /* @__PURE__ */ jsx("div", { className: classes.footer, "data-strip-footer": true, children: cell.footer });
13
37
  return /* @__PURE__ */ jsxs(
14
38
  "article",
15
39
  {
@@ -17,6 +41,8 @@ function StripCell({ cell }) {
17
41
  "data-strip-cell": cell.key,
18
42
  "data-shot": `strip-${cell.key}`,
19
43
  "aria-labelledby": captionId,
44
+ ...state === void 0 && cell.visual !== void 0 && { "data-strip-has-visual": "" },
45
+ ...state === void 0 && rows !== void 0 && { "data-strip-has-rows": "" },
20
46
  ...cell.stale && { "data-stale": "true" },
21
47
  children: [
22
48
  /* @__PURE__ */ jsxs("div", { className: classes.captionLine, children: [
@@ -26,7 +52,8 @@ function StripCell({ cell }) {
26
52
  ] }),
27
53
  cell.qualifier !== void 0 && /* @__PURE__ */ jsx("span", { className: classes.qualifier, children: cell.qualifier })
28
54
  ] }),
29
- hasHero && (loading ? /* @__PURE__ */ jsx(Skeleton, { className: classes.skeletonValue, radius: "sm" }) : /* @__PURE__ */ jsxs("div", { className: classes.valueRow, children: [
55
+ state !== void 0 && /* @__PURE__ */ jsx(CellState, { state }),
56
+ state === void 0 && hasHero && (loading ? /* @__PURE__ */ jsx(Skeleton, { className: classes.skeletonValue, radius: "sm" }) : /* @__PURE__ */ jsxs("div", { className: classes.valueRow, children: [
30
57
  /* @__PURE__ */ jsx(
31
58
  "span",
32
59
  {
@@ -39,14 +66,17 @@ function StripCell({ cell }) {
39
66
  cell.value !== void 0 && cell.value !== null && cell.unit !== void 0 && /* @__PURE__ */ jsx("span", { className: classes.unit, children: cell.unit }),
40
67
  cell.delta
41
68
  ] })),
42
- cell.visual !== void 0 && /* @__PURE__ */ jsx("div", { className: classes.visual, children: cell.visual }),
43
- rows !== void 0 && (loading ? /* @__PURE__ */ jsx("div", { className: classes.rows, "aria-hidden": "true", children: rows.map((row) => /* @__PURE__ */ jsx(Skeleton, { className: classes.skeletonRow, radius: "sm" }, row.key)) }) : /* @__PURE__ */ jsx("ul", { className: classes.rows, children: rows.map((row) => /* @__PURE__ */ jsxs("li", { className: classes.row, "data-strip-row": row.key, children: [
69
+ state === void 0 && cell.visual !== void 0 && /* @__PURE__ */ jsxs("div", { className: classes.visualStack, children: [
70
+ /* @__PURE__ */ jsx("div", { className: classes.visual, "data-strip-visual": true, children: /* @__PURE__ */ jsx(VisualSlotContext.Provider, { value: hasHero, children: cell.visual }) }),
71
+ ownFooter && footerEl
72
+ ] }),
73
+ state === void 0 && rows !== void 0 && (loading ? /* @__PURE__ */ jsx("div", { className: classes.rows, "aria-hidden": "true", children: rows.map((row) => /* @__PURE__ */ jsx(Skeleton, { className: classes.skeletonRow, radius: "sm" }, row.key)) }) : /* @__PURE__ */ jsx("ul", { className: classes.rows, "data-strip-rows": true, children: rows.map((row) => /* @__PURE__ */ jsxs("li", { className: classes.row, "data-strip-row": row.key, children: [
44
74
  /* @__PURE__ */ jsx("span", { className: classes.rowLabel, children: row.label }),
45
75
  /* @__PURE__ */ jsx("span", { className: classes.visual, children: row.visual }),
46
76
  /* @__PURE__ */ jsx("span", { className: classes.rowValue, children: row.value ?? EMPTY }),
47
77
  /* @__PURE__ */ jsx("span", { children: row.delta })
48
78
  ] }, row.key)) })),
49
- cell.footer !== void 0 && /* @__PURE__ */ jsx("div", { className: classes.footer, children: cell.footer })
79
+ state === void 0 && !ownFooter && footerEl
50
80
  ]
51
81
  }
52
82
  );
@@ -1,11 +1,12 @@
1
1
  /*
2
2
  * StatGroup `variant="strip"`: one joined surface, cells split by 1px hairlines.
3
3
  *
4
- * The hairlines are LEADING borders (inline-start + block-start) on every cell, and `.clip` hides
5
- * the ones that lead a row or the strip by pulling the grid 1px up/left inside an `overflow: hidden`
6
- * box. That is why the rail survives any column count and any wrap with no `nth-child` bookkeeping
7
- * (`stat-group.module.css` needs it because its cells are not clipped). No shadow per cell, no
8
- * coloured edge: the one surface is the Card's.
4
+ * The hairlines are LEADING edges (inline-start + block-start) drawn as outer box-shadows, so they
5
+ * take no layout space and every cell keeps the same `stack-md` inset. `.clip` hides the ones that
6
+ * lead a row or the strip by pulling the grid 1px up/left inside an `overflow: hidden` box. That is
7
+ * why the rail survives any column count and any wrap with no `nth-child` bookkeeping
8
+ * (`stat-group.module.css` needs it because its cells are not clipped). No coloured edge: the one
9
+ * surface is the Card's.
9
10
  *
10
11
  * The column law keys on the CONTAINER like `StatGroup`'s own: two columns at < 480px (the `regular` class boundary) with an odd
11
12
  * last cell spanning, never one; up to three below 800px; the full `cols` from 800px.
@@ -27,18 +28,67 @@
27
28
  }
28
29
 
29
30
  .cell {
30
- display: flex;
31
- flex-direction: column;
32
- gap: var(--vx-space-stack-sm);
31
+ display: grid;
32
+ grid-row: span 5;
33
+ grid-template-rows: subgrid;
33
34
  min-width: 0;
34
35
  padding: var(--vx-space-stack-md);
35
- border-inline-start: 1px solid var(--vx-divider);
36
+ box-shadow:
37
+ -1px 0 0 var(--vx-divider),
38
+ 0 -1px 0 var(--vx-divider);
36
39
  }
37
40
 
38
- /* The top line is adjacent-sibling: the first cell draws none (it leads the strip), every later one
39
- * draws its top edge, which is the rule between wrapped rows. */
40
- .cell + .cell {
41
- border-block-start: 1px solid var(--vx-divider);
41
+ /* Forced colors drop box-shadows, so the hairlines come back as CanvasText borders. Every cell takes
42
+ * both, so they stay level with each other; `.clip` still hides the leading ones. */
43
+ @media (forced-colors: active) {
44
+ .cell {
45
+ border-inline-start: 1px solid CanvasText;
46
+ border-block-start: 1px solid CanvasText;
47
+ }
48
+ }
49
+
50
+ /* Cells align by PART. Every cell spans the same five tracks of `.cells` (caption, hero, visual,
51
+ * rows, footer), so a row of cells shares one caption top and one value baseline, and a void opens
52
+ * only where a sibling's same part is taller. A part a cell lacks collapses its track (the spacing
53
+ * is a margin on the part, not a gap, so an empty track adds none). A cell without a visual keeps
54
+ * its rows (and a footer without rows) in the visual track, directly under its hero: short cells
55
+ * stay compact instead of stretching their footer to the row's bottom. A footer under a visual
56
+ * rides in the visual track with it (`.visualStack`), so it hugs its own visual; only a rows
57
+ * cell's footer uses the shared footer track. A hero-less cell (rows only) starts its rows in the
58
+ * visual track, so the hero track above them is the one void, and only as tall as a sibling's
59
+ * value. */
60
+ .cell > * {
61
+ grid-column: 1;
62
+ min-width: 0;
63
+ }
64
+
65
+ .cell > :not(.captionLine) {
66
+ margin-block-start: var(--vx-space-stack-sm);
67
+ }
68
+
69
+ .valueRow,
70
+ .skeletonValue,
71
+ .error {
72
+ grid-row: 2;
73
+ }
74
+
75
+ .cell > .visualStack,
76
+ .cell > .reason,
77
+ .cell > .rows,
78
+ .cell > .footer {
79
+ grid-row: 3;
80
+ }
81
+
82
+ .cell[data-strip-has-visual] > .rows {
83
+ grid-row: 4;
84
+ }
85
+
86
+ .cell[data-strip-has-rows] > .footer {
87
+ grid-row: 5;
88
+ }
89
+
90
+ .cell > .footer {
91
+ align-self: start;
42
92
  }
43
93
 
44
94
  @container basalt-grid (max-width: 479.9px) {
@@ -58,6 +108,7 @@
58
108
  }
59
109
 
60
110
  .captionLine {
111
+ grid-row: 1;
61
112
  display: flex;
62
113
  flex-wrap: wrap;
63
114
  align-items: center;
@@ -143,6 +194,10 @@
143
194
  min-width: 0;
144
195
  }
145
196
 
197
+ .visualStack > .footer {
198
+ margin-block-start: var(--vx-space-stack-sm);
199
+ }
200
+
146
201
  /* A Sparkline's hover readout takes this line above its plot (`charts/sparkline.module.css`). The
147
202
  * cell's own stack gap already sits above it; the slot reserves the rest, so the chip never covers
148
203
  * the value. */
@@ -154,8 +209,36 @@
154
209
  padding-top: max(0px, calc(var(--basalt-spark-readout-h) - var(--vx-space-stack-sm)));
155
210
  }
156
211
 
212
+ /* An empty cell's reason and an errored cell's message: one muted `sm` line, wrapping rather than
213
+ * clipping (a 390px two-column cell is ~170px wide). */
214
+ .reason {
215
+ margin: 0;
216
+ min-width: 0;
217
+ font-size: var(--vx-text-sm);
218
+ line-height: 1.3;
219
+ color: var(--vx-muted);
220
+ overflow-wrap: anywhere;
221
+ }
222
+
223
+ /* The compact error anatomy: dot + word, the message, Retry — a left-aligned stack in the cell. */
224
+ .error {
225
+ display: flex;
226
+ flex-direction: column;
227
+ align-items: flex-start;
228
+ gap: var(--vx-space-stack-xs);
229
+ min-width: 0;
230
+ }
231
+
232
+ .errorHead {
233
+ display: inline-flex;
234
+ align-items: center;
235
+ gap: var(--vx-space-stack-sm);
236
+ font-size: var(--vx-text-sm);
237
+ font-weight: 500;
238
+ color: var(--vx-ink);
239
+ }
240
+
157
241
  .footer {
158
- margin-top: auto;
159
242
  font-size: var(--vx-text-sm);
160
243
  color: var(--vx-muted);
161
244
  }
@@ -17,6 +17,10 @@ declare const classes: {
17
17
  readonly skeletonValue: string
18
18
  readonly skeletonRow: string
19
19
  readonly visual: string
20
+ readonly visualStack: string
21
+ readonly reason: string
22
+ readonly error: string
23
+ readonly errorHead: string
20
24
  readonly footer: string
21
25
  readonly rows: string
22
26
  readonly row: string
@@ -0,0 +1,2 @@
1
+ export declare const VisualSlotContext: import("react").Context<boolean>;
2
+ //# sourceMappingURL=visual-slot.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"visual-slot.d.ts","sourceRoot":"","sources":["../../src/dashboard/visual-slot.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,iBAAiB,kCAAuB,CAAA"}
@@ -0,0 +1,5 @@
1
+ import { createContext } from "react";
2
+ const VisualSlotContext = createContext(false);
3
+ export {
4
+ VisualSlotContext
5
+ };
@@ -3,7 +3,7 @@
3
3
  * (`tokens/space-scale`, `common/*`), never `tokens/palette` or `derive` (colour math on every
4
4
  * Write/Edit).
5
5
  *
6
- * GUARD_RULES: the closed registry of all 26 violation kinds.
6
+ * GUARD_RULES: the closed registry of all 27 violation kinds.
7
7
  * checkSource: pure (text, relPath, cfg) → Finding[]. No FS, no walk, no console.
8
8
  */
9
9
  import type { Finding, GuardConfig, GuardKind, GuardSeverity } from './types.js';
@@ -70,6 +70,13 @@ export type GraceEntry = {
70
70
  * }
71
71
  */
72
72
  export declare const GRACE_PERIOD_KINDS: Partial<Record<GuardKind, GraceEntry>>;
73
+ /** A kind's effective severity: consumer override first, then the grace table, then `error`. */
74
+ export declare function severityOf(kind: GuardKind, cfg: GuardConfig): GuardSeverity;
75
+ /**
76
+ * Whether `kind` is exempted at `relPath` via `cfg.exemptRules` — the config-driven, per-rule
77
+ * counterpart to `isChartFile`'s hardcoded path scoping.
78
+ */
79
+ export declare function isRuleExempt(kind: GuardKind, relPath: string, exemptRules: GuardConfig['exemptRules']): boolean;
73
80
  /** One `exemptRules` entry that suppressed nothing, and why — see {@link unmatchedExemptPatterns}. */
74
81
  export type UnmatchedExemptPattern = {
75
82
  readonly kind: string;
@@ -143,7 +150,7 @@ export declare const GENERATED_HEADER_LINE = "/* @generated basalt-ui \u2014 do
143
150
  */
144
151
  export declare const TOKENS_ONLY_DISABLED_KINDS: ReadonlySet<GuardKind>;
145
152
  /**
146
- * The closed registry of all 26 guard kinds. The triad test asserts
153
+ * The closed registry of all 27 guard kinds. The triad test asserts
147
154
  * `surface.guardKinds ⊆ keyof GUARD_RULES` at runtime.
148
155
  *
149
156
  * raw-surface, raw-html-layout, and sub-16-input-font are handled inline in checkSource
@@ -316,6 +323,12 @@ export declare const GUARD_RULES: {
316
323
  readonly pattern: RegExp;
317
324
  readonly message: `var() names a --vx-* token basalt does not emit, so it resolves to its fallback (or to nothing) with no error anywhere. Judged: every name inside a basalt-owned family (${string}), plus any name basalt used to emit in any family \u2014 pick the token from the stylesheet basalt-ui tokens:css emits; your own series belong in a family of their own (groupTokens throws on one inside basalt's, in dev builds). A removed name is reported with its replacement on the finding line (MIGRATING.md has the table). Any other name outside a basalt family is never judged, because groupTokens may declare it in a file this scan cannot see.`;
318
325
  };
326
+ readonly 'series-palette': {
327
+ readonly kind: "series-palette";
328
+ readonly pattern: RegExp;
329
+ readonly appliesTo: () => false;
330
+ readonly message: "The series file's palette fails a computed check (OKLCH lightness band, chroma floor, colour-blind separation of neighbours, worst-pair separation, 3:1 contrast against the surface, ≤ 8 series without a repeat) — retune the hex in the series file; it is judged per scheme, light against the light panel and dark against the dark one. A deliberately neutral series is keyed `other`.";
331
+ };
319
332
  };
320
333
  /**
321
334
  * The one-line remedy for `kind`, as a report reads it: `raw-hex: Route color through VX.* / …`.
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/guard/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAO7E,YAAY,EAAE,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,aAAa,EAAE,CAAA;AAgU9D;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC,CA8BpE,CAAA;AA8cD,8EAA8E;AAC9E,eAAO,MAAM,oBAAoB,EAAE,WAiBlC,CAAA;AAED;;;;;;GAMG;AACH,MAAM,MAAM,UAAU,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,CAAA;AAExE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,eAAO,MAAM,kBAAkB,EAAE,OAAO,CAAC,MAAM,CAAC,SAAS,EAAE,UAAU,CAAC,CAWrE,CAAA;AAoFD,sGAAsG;AACtG,MAAM,MAAM,sBAAsB,GAAG;IACnC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,MAAM,EAAE,cAAc,GAAG,UAAU,CAAA;CAC7C,CAAA;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,uBAAuB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