basalt-ui 2.21.0 → 2.22.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 (226) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/MIGRATING.md +277 -12
  3. package/agent/agents/basalt-design-reviewer.md +1 -1
  4. package/agent/rules/basalt-tokens.md +1 -1
  5. package/agent/skills/basalt-design/SKILL.md +1 -1
  6. package/agent/skills/basalt-design/references/anti-defaults.md +1 -1
  7. package/agent/skills/basalt-design/references/catalogue.md +1 -0
  8. package/dist/charts/BandStrip.d.ts.map +1 -1
  9. package/dist/charts/BandStrip.js +27 -3
  10. package/dist/charts/Bars.d.ts.map +1 -1
  11. package/dist/charts/Bars.js +5 -0
  12. package/dist/charts/CartesianChart.d.ts +8 -0
  13. package/dist/charts/CartesianChart.d.ts.map +1 -1
  14. package/dist/charts/CartesianChart.js +8 -5
  15. package/dist/charts/ChartCard.d.ts +12 -3
  16. package/dist/charts/ChartCard.d.ts.map +1 -1
  17. package/dist/charts/ChartCard.js +29 -8
  18. package/dist/charts/DualPanel.d.ts.map +1 -1
  19. package/dist/charts/DualPanel.js +5 -8
  20. package/dist/charts/Heatmap.d.ts +12 -1
  21. package/dist/charts/Heatmap.d.ts.map +1 -1
  22. package/dist/charts/Heatmap.js +34 -5
  23. package/dist/charts/Lines.d.ts +3 -0
  24. package/dist/charts/Lines.d.ts.map +1 -1
  25. package/dist/charts/Lines.js +29 -6
  26. package/dist/charts/MirroredBars.d.ts.map +1 -1
  27. package/dist/charts/MirroredBars.js +4 -6
  28. package/dist/charts/Sparkline.d.ts +7 -1
  29. package/dist/charts/Sparkline.d.ts.map +1 -1
  30. package/dist/charts/Sparkline.js +39 -14
  31. package/dist/charts/StackedArea.d.ts +4 -1
  32. package/dist/charts/StackedArea.d.ts.map +1 -1
  33. package/dist/charts/StackedArea.js +9 -3
  34. package/dist/charts/band-fold.d.ts +20 -1
  35. package/dist/charts/band-fold.d.ts.map +1 -1
  36. package/dist/charts/band-fold.js +9 -0
  37. package/dist/charts/chart-box.module.css +19 -0
  38. package/dist/charts/chart-card.module.css +25 -0
  39. package/dist/charts/chart-legend.module.css +7 -0
  40. package/dist/charts/compile.d.ts +17 -6
  41. package/dist/charts/compile.d.ts.map +1 -1
  42. package/dist/charts/compile.js +145 -74
  43. package/dist/charts/labels.d.ts +15 -4
  44. package/dist/charts/labels.d.ts.map +1 -1
  45. package/dist/charts/labels.js +34 -10
  46. package/dist/charts/legend.d.ts +2 -0
  47. package/dist/charts/legend.d.ts.map +1 -1
  48. package/dist/charts/legend.js +7 -21
  49. package/dist/charts/marks.js +1 -1
  50. package/dist/charts/panel.d.ts +0 -6
  51. package/dist/charts/panel.d.ts.map +1 -1
  52. package/dist/charts/panel.js +1 -10
  53. package/dist/charts/ref-label.d.ts +26 -0
  54. package/dist/charts/ref-label.d.ts.map +1 -0
  55. package/dist/charts/ref-label.js +63 -0
  56. package/dist/charts/scales.d.ts +4 -1
  57. package/dist/charts/scales.d.ts.map +1 -1
  58. package/dist/charts/scales.js +14 -3
  59. package/dist/charts/sparkline.module.css +10 -11
  60. package/dist/charts/sparkline.module.css.d.ts +1 -2
  61. package/dist/charts/state.d.ts +2 -0
  62. package/dist/charts/state.d.ts.map +1 -1
  63. package/dist/charts/state.js +2 -1
  64. package/dist/charts/types.d.ts +14 -5
  65. package/dist/charts/types.d.ts.map +1 -1
  66. package/dist/cli/doctor-upgrade.d.ts +1 -0
  67. package/dist/cli/doctor-upgrade.d.ts.map +1 -1
  68. package/dist/cli/doctor-upgrade.js +1 -0
  69. package/dist/cli/init.d.ts +2 -0
  70. package/dist/cli/init.d.ts.map +1 -1
  71. package/dist/cli/init.js +68 -4
  72. package/dist/cli/shot/capture.d.ts +21 -2
  73. package/dist/cli/shot/capture.d.ts.map +1 -1
  74. package/dist/cli/shot/capture.js +194 -32
  75. package/dist/cli/shot/detect.d.ts.map +1 -1
  76. package/dist/cli/shot/detect.js +14 -1
  77. package/dist/cli/shot/playwright.d.ts +5 -2
  78. package/dist/cli/shot/playwright.d.ts.map +1 -1
  79. package/dist/cli/shot/types.d.ts +2 -0
  80. package/dist/cli/shot/types.d.ts.map +1 -1
  81. package/dist/cli/shot/types.js +2 -0
  82. package/dist/controls/controls.module.css +11 -1
  83. package/dist/controls/filter-pill.d.ts.map +1 -1
  84. package/dist/controls/filter-pill.js +1 -0
  85. package/dist/controls/sync-button.d.ts.map +1 -1
  86. package/dist/controls/sync-button.js +22 -3
  87. package/dist/controls/sync-button.module.css +34 -2
  88. package/dist/controls/sync-button.module.css.d.ts +1 -0
  89. package/dist/dashboard/bar-list.d.ts.map +1 -1
  90. package/dist/dashboard/bar-list.js +7 -8
  91. package/dist/dashboard/bar-list.module.css +53 -0
  92. package/dist/dashboard/bar-list.module.css.d.ts +1 -0
  93. package/dist/dashboard/index.d.ts +1 -0
  94. package/dist/dashboard/index.d.ts.map +1 -1
  95. package/dist/dashboard/index.js +2 -0
  96. package/dist/dashboard/meter-model.d.ts +77 -3
  97. package/dist/dashboard/meter-model.d.ts.map +1 -1
  98. package/dist/dashboard/meter-model.js +88 -15
  99. package/dist/dashboard/meter-parts.d.ts +8 -0
  100. package/dist/dashboard/meter-parts.d.ts.map +1 -1
  101. package/dist/dashboard/meter-parts.js +238 -71
  102. package/dist/dashboard/meter.d.ts +43 -60
  103. package/dist/dashboard/meter.d.ts.map +1 -1
  104. package/dist/dashboard/meter.js +20 -3
  105. package/dist/dashboard/meter.module.css +61 -0
  106. package/dist/dashboard/meter.module.css.d.ts +5 -0
  107. package/dist/dashboard/page-summary.d.ts +20 -0
  108. package/dist/dashboard/page-summary.d.ts.map +1 -0
  109. package/dist/dashboard/page-summary.js +28 -0
  110. package/dist/dashboard/page-summary.module.css +89 -0
  111. package/dist/dashboard/page-summary.module.css.d.ts +15 -0
  112. package/dist/dashboard/section.d.ts +25 -2
  113. package/dist/dashboard/section.d.ts.map +1 -1
  114. package/dist/dashboard/section.js +10 -5
  115. package/dist/dashboard/section.module.css +23 -0
  116. package/dist/dashboard/section.module.css.d.ts +1 -0
  117. package/dist/dashboard/stat-card-parts.d.ts.map +1 -1
  118. package/dist/dashboard/stat-card-parts.js +1 -1
  119. package/dist/dashboard/stat-card.d.ts +4 -2
  120. package/dist/dashboard/stat-card.d.ts.map +1 -1
  121. package/dist/dashboard/stat-card.js +7 -5
  122. package/dist/dashboard/stat-card.module.css +17 -0
  123. package/dist/dashboard/stat-strip.d.ts +7 -1
  124. package/dist/dashboard/stat-strip.d.ts.map +1 -1
  125. package/dist/dashboard/stat-strip.js +74 -46
  126. package/dist/dashboard/stat-strip.module.css +67 -20
  127. package/dist/dashboard/stat-strip.module.css.d.ts +4 -0
  128. package/dist/dashboard/visual-slot.d.ts +7 -1
  129. package/dist/dashboard/visual-slot.d.ts.map +1 -1
  130. package/dist/dashboard/visual-slot.js +3 -1
  131. package/dist/guard/vx-names.d.ts.map +1 -1
  132. package/dist/guard/vx-names.js +2 -0
  133. package/dist/index.d.ts +1 -1
  134. package/dist/index.d.ts.map +1 -1
  135. package/dist/index.js +3 -1
  136. package/dist/styles.css +34 -2
  137. package/dist/theme/chrome-vars.d.ts +20 -5
  138. package/dist/theme/chrome-vars.d.ts.map +1 -1
  139. package/dist/theme/chrome-vars.js +46 -3
  140. package/dist/theme/controls.module.css +23 -0
  141. package/dist/theme/controls.module.css.d.ts +1 -0
  142. package/dist/theme/index.d.ts.map +1 -1
  143. package/dist/theme/index.js +8 -20
  144. package/dist/tokens/core.d.ts +2 -1
  145. package/dist/tokens/core.d.ts.map +1 -1
  146. package/dist/tokens/core.js +6 -1
  147. package/dist/tokens/derive.d.ts +3 -1
  148. package/dist/tokens/derive.d.ts.map +1 -1
  149. package/dist/tokens/derive.js +16 -1
  150. package/dist/tokens/palette.d.ts +4 -0
  151. package/dist/tokens/palette.d.ts.map +1 -1
  152. package/dist/tokens/palette.js +4 -0
  153. package/dist/tokens/status-text.d.ts.map +1 -1
  154. package/dist/tokens/status-text.js +3 -1
  155. package/llms.txt +38 -20
  156. package/package.json +1 -1
  157. package/src/charts/BandStrip.tsx +33 -3
  158. package/src/charts/Bars.tsx +6 -0
  159. package/src/charts/CartesianChart.tsx +16 -3
  160. package/src/charts/ChartCard.tsx +34 -6
  161. package/src/charts/DualPanel.tsx +3 -6
  162. package/src/charts/Heatmap.tsx +54 -5
  163. package/src/charts/Lines.tsx +56 -10
  164. package/src/charts/MirroredBars.tsx +3 -5
  165. package/src/charts/Sparkline.tsx +50 -13
  166. package/src/charts/StackedArea.tsx +14 -4
  167. package/src/charts/band-fold.ts +31 -1
  168. package/src/charts/chart-box.module.css +19 -0
  169. package/src/charts/chart-card.module.css +25 -0
  170. package/src/charts/chart-legend.module.css +7 -0
  171. package/src/charts/compile.ts +210 -85
  172. package/src/charts/labels.ts +48 -14
  173. package/src/charts/legend.tsx +10 -20
  174. package/src/charts/marks.ts +1 -1
  175. package/src/charts/panel.tsx +1 -16
  176. package/src/charts/ref-label.ts +104 -0
  177. package/src/charts/scales.ts +22 -2
  178. package/src/charts/sparkline.module.css +10 -11
  179. package/src/charts/sparkline.module.css.d.ts +1 -2
  180. package/src/charts/state.tsx +3 -1
  181. package/src/charts/types.ts +14 -5
  182. package/src/cli/doctor-upgrade.ts +1 -1
  183. package/src/cli/init.ts +100 -3
  184. package/src/cli/shot/capture.ts +251 -32
  185. package/src/cli/shot/detect.ts +18 -1
  186. package/src/cli/shot/playwright.ts +2 -2
  187. package/src/cli/shot/types.ts +3 -0
  188. package/src/controls/controls.module.css +11 -1
  189. package/src/controls/filter-pill.tsx +2 -0
  190. package/src/controls/sync-button.module.css +34 -2
  191. package/src/controls/sync-button.module.css.d.ts +1 -0
  192. package/src/controls/sync-button.tsx +40 -4
  193. package/src/dashboard/bar-list.module.css +53 -0
  194. package/src/dashboard/bar-list.module.css.d.ts +1 -0
  195. package/src/dashboard/bar-list.tsx +78 -69
  196. package/src/dashboard/index.ts +1 -0
  197. package/src/dashboard/meter-model.ts +186 -20
  198. package/src/dashboard/meter-parts.tsx +285 -64
  199. package/src/dashboard/meter.module.css +61 -0
  200. package/src/dashboard/meter.module.css.d.ts +5 -0
  201. package/src/dashboard/meter.tsx +60 -10
  202. package/src/dashboard/page-summary.module.css +89 -0
  203. package/src/dashboard/page-summary.module.css.d.ts +15 -0
  204. package/src/dashboard/page-summary.tsx +95 -0
  205. package/src/dashboard/section.module.css +23 -0
  206. package/src/dashboard/section.module.css.d.ts +1 -0
  207. package/src/dashboard/section.tsx +59 -11
  208. package/src/dashboard/stat-card-parts.tsx +5 -1
  209. package/src/dashboard/stat-card.module.css +17 -0
  210. package/src/dashboard/stat-card.tsx +12 -6
  211. package/src/dashboard/stat-strip.module.css +67 -20
  212. package/src/dashboard/stat-strip.module.css.d.ts +4 -0
  213. package/src/dashboard/stat-strip.tsx +118 -72
  214. package/src/dashboard/visual-slot.ts +12 -3
  215. package/src/guard/vx-names.ts +2 -0
  216. package/src/index.ts +2 -0
  217. package/src/styles.css +34 -2
  218. package/src/theme/__snapshots__/plain-theme.test.ts.snap +186 -60
  219. package/src/theme/chrome-vars.ts +77 -8
  220. package/src/theme/controls.module.css +23 -0
  221. package/src/theme/controls.module.css.d.ts +1 -0
  222. package/src/theme/index.ts +12 -25
  223. package/src/tokens/core.ts +4 -1
  224. package/src/tokens/derive.ts +32 -3
  225. package/src/tokens/palette.ts +4 -0
  226. package/src/tokens/status-text.ts +2 -0
package/CHANGELOG.md CHANGED
@@ -1,3 +1,36 @@
1
+ # [2.22.0](https://github.com/jkrumm/basalt-ui/compare/v2.21.0...v2.22.0) (2026-10-18)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * address review round 1 on PageSummary and Section ([13f92e8](https://github.com/jkrumm/basalt-ui/commit/13f92e8fda655720f1a25718c42a3346853593ec))
7
+ * apply the Meter gap step only between a tick and a label ([4503cfe](https://github.com/jkrumm/basalt-ui/commit/4503cfeec62d8a738ada9c7b1a3476eba9c0ecd8))
8
+ * cap the BarList label column and frame every state ([43f7dc6](https://github.com/jkrumm/basalt-ui/commit/43f7dc66bfd9826a7ed9d9084f045c725c5114ef))
9
+ * chart chrome review round 1 ([3b3b869](https://github.com/jkrumm/basalt-ui/commit/3b3b869fa121185d654f41c43bbb28b04fc061e1))
10
+ * frame restores the chrome when it throws after hiding it ([c825c35](https://github.com/jkrumm/basalt-ui/commit/c825c3596c55e57eed17719e2fec9d6502575267))
11
+ * hidden rest anchors fail, chrome hiding spares only open popups ([b497af1](https://github.com/jkrumm/basalt-ui/commit/b497af1331e90516b9a093fe15382879afdf9511))
12
+ * let a Meter end tick yield to a zone name and re-measure captions ([8c40451](https://github.com/jkrumm/basalt-ui/commit/8c4045130eef1bf78f423f1e6e5692493fcf0d52))
13
+ * pin tooltip header tests to the runtime's own Intl output ([6b44e7e](https://github.com/jkrumm/basalt-ui/commit/6b44e7ec17582f9e56145027a53b5854d4bb955a))
14
+ * reset the zero feature at the root instead of per head-face selector ([e0ef952](https://github.com/jkrumm/basalt-ui/commit/e0ef952080d0996008e4fa90a796b1ef688887a9))
15
+ * restore MIGRATING's tail and follow the head-face rule list ([f3fe9c0](https://github.com/jkrumm/basalt-ui/commit/f3fe9c0e35fe0fbb9a810fed3f0b888acbb69c4a))
16
+ * reviewer note limits absent to pointer states and declared absence ([c923661](https://github.com/jkrumm/basalt-ui/commit/c923661fa743985008b9c060e2bba5bc96332117))
17
+ * scope the badge dot, solve row-surface contrast, narrow the zero reset ([6a1843a](https://github.com/jkrumm/basalt-ui/commit/6a1843a2fa089640c4290c67a443f63996808009))
18
+
19
+
20
+ ### Features
21
+
22
+ * a strip cell's tone colours the Meter in its visual ([fa1ff95](https://github.com/jkrumm/basalt-ui/commit/fa1ff95645dae2633aa3d6e88d1c66981fa12ecf))
23
+ * add Meter reading switch, muted zones, stops and ring ticks ([a1cd367](https://github.com/jkrumm/basalt-ui/commit/a1cd367e3d51383dc5052b65c1d7f40b7b94ffa2))
24
+ * chart facts, sparklines and strips gain tone, glyph and focus ([9b41136](https://github.com/jkrumm/basalt-ui/commit/9b41136c9d5e4ea72943647be56888bc351d5dec))
25
+ * chart tooltips, ticks and reference labels read cleanly ([d7c6b49](https://github.com/jkrumm/basalt-ui/commit/d7c6b4904900aef679daab3dc9b89f28fd4f876e))
26
+ * export PageSummary, untitled Section and page-bar fixes ([1cf8719](https://github.com/jkrumm/basalt-ui/commit/1cf8719fa180d4e1254e6a1a41c99ec89e1f53ef))
27
+ * glyph defaults, panel ink and one readout layer on chart cards ([3b49967](https://github.com/jkrumm/basalt-ui/commit/3b499677a47282dc154a694f10851e2810afea81))
28
+ * keep a BarList name beside its value in a wide card ([d25833b](https://github.com/jkrumm/basalt-ui/commit/d25833b9838fabfaa1ca6569ea15dfcbd4db9d2c))
29
+ * neutral tab pill, row surfaces and data-text numerals ([67e2994](https://github.com/jkrumm/basalt-ui/commit/67e299437801399618c921e9747c2cd874e09085))
30
+ * pin strip footer kinds and the qualifier guarantee ([97462b2](https://github.com/jkrumm/basalt-ui/commit/97462b2c2b147efe93728e1f98336119a2a832d6))
31
+ * shot captures tall anchors and init wires a stock Vite app ([e2d8d23](https://github.com/jkrumm/basalt-ui/commit/e2d8d2382a453f7a69b8a53c1b915ba09cb0f733))
32
+ * strip cells stay compact; stat cards keep their states tidy ([f7d78e3](https://github.com/jkrumm/basalt-ui/commit/f7d78e3f9c6ea877ad39e47c431d2956cd76dcdd))
33
+
1
34
  # [2.21.0](https://github.com/jkrumm/basalt-ui/compare/v2.20.0...v2.21.0) (2026-10-18)
2
35
 
3
36
 
package/MIGRATING.md CHANGED
@@ -66,18 +66,18 @@ There is one row per SURFACE, not per export, and a surface earns a row once any
66
66
  shipped lefthook preset both changed in 1.30.0 with no row that owned them — which is how a
67
67
  consumer read this index, found nothing, and diffed a KPI row that had silently gone 4-up → 2-up.
68
68
 
69
- | Surface | 1.27.0 | 1.28.0 | 1.29.0 | 1.30.0 | 1.30.1 | 1.30.2 | 1.31.0 | 1.32.0 | 1.32.1 | 1.33.0 | 1.34.0 | 1.34.1 | 1.35.0 | 1.36.0 | 1.36.1 | 1.37.0 | 1.37.1 | 1.38.0 | 1.38.1 | 1.39.0 | 1.40.0 | 1.40.1 | 1.40.2 | 1.40.3 | 1.41.0 | 2.0.0 | 2.0.1 | 2.0.2 | 2.0.3 | 2.0.4 | 2.0.5 | 2.1.0 | 2.2.0 | 2.3.0 | 2.4.0 | 2.5.0 | 2.6.0 | 2.6.1 | 2.7.0 | 2.7.1 | 2.7.2 | 2.7.3 | 2.8.0 | 2.8.1 | 2.9.0 | 2.9.1 | 2.10.0 | 2.11.0 | 2.11.1 | 2.12.0 | 2.13.0 | 2.13.1 | 2.13.2 | 2.13.3 | 2.14.0 | 2.15.0 | 2.16.0 | 2.17.0 | 2.18.0 | 2.19.0 | 2.20.0 | 2.21.0 | Unreleased |
70
- | ----------------------------- | ------------------------------------------------------------ | -------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | --------------------------------------------------------------------- | ------ | ----------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ---------------------------------- | ------ | ------ | -------------------------------------------------------------------------------------------- | ------ | ------ | ------ | ------ | ------ | ----------------------------------------------- | ------ | ------ | ------ | ------ | ------------------------------------------------------------ | ---------- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
71
- | **tokens** (`./tokens`) | — | `--vx-divider` → `rgba()` on both schemes (§ Shell) | `--vx-space-touch-target` added (§ Additions) | eight spacing numbers (§ Chrome) | — | — | `--vx-hit` replaces the touch vars; `SIZE_CLASSES` (§ 1.31.0) | — | `SIZE_CLASSES`/`CONTAINER_CLASSES` actually exported (§ Fixes) | `CONTAINER_GRID_BREAKPOINTS`; `raw-breakpoint` trusts it (§ 1.33.0) | `CONTAINER_KEYS` (§ 1.34.0) | — | — | — | — | — | — | — | | `appShellInset` 20 → 16 (§ 1.38.1) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | § 1.x compatibility layer removed | — | — | — | — | — | — | — | — | — | — | — | spacing, radius, type and the dense tier (§ 2.16.0) | — | — | — | — | — | — |
72
- | **charts** (`./charts`) | — | phone tier, `curve`, formatters, `state`, log axis (§ preamble) | `ChartState.empty: string`, `AxisBottomNumeric` (§ Additions) | responsive `height`, `legend.maxRows` (§ Charts) | `height` reaches the kinds; `maxRows` beats the `fill` fit (§ Charts) | — | container-class tier + `height` keys (§ 1.31.0) | — | `ResponsiveChartHeight` `sm` → key (§ Container recipes) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | `BandSpan.absentFraction` + `absentState` (§ 2.8.0) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — |
73
- | **shell** (`.`) | — | scrollport, region seams, **the brand left the sidebar** (§§ scrollport, brand, Shell) | `PageTitle`, `BasaltDevDock`, `useBreakpoint` (§ Additions) | More popover, aside pill, the responsive gutter, `useBasaltSpacing` (§ Chrome) | — | — | `theme.breakpoints` derived, `useSizeClass`, `data-basalt-host`, `useBreakpoint` on notice (§ 1.31.0) | `useBreakpoint` removal → 1.33.0; `useSizeClass` is shell-only (§ 1.32.0) | shell-less `shell/` gutter, `AppShell` breakpoints, `useSizeClass` for overlays (§§ Shell-less, `useSizeClass`) | — | `useBreakpoint` removed (§ 1.34.0) | — | — | `useCoarsePointer()` (§ `useCoarsePointer()`) | — | — | — | — | | content gutter 16, block 8 from `sm` (§ 1.38.1) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | `BasaltProvider` embedded mode, `spotlight` (§ 2.8.0) | — | — | — | — | — | — | — | — | — | — | — | — | — | expanded gutter 24 (§ 2.16.0) | — | — | light/outline Buttons ink, no status edges (§ 2.19.0) | — | — | — |
74
- | **controls** (`./controls`) | `NumberFilter`, `field.number` (§ Controls) | sheet renders panel rows; `PanelRow`, `SliderControl` (§ `basalt-ui/controls`) | — | — | — | — | — | — | — | `NumberFilter clearable`; `createSearchStore` `resets` (§ State and controls) | — | — | — | `FormSection`/`FormRow`/`FormGroup`/`FormActions` move here (§ The form layout moves) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | dense 28 tier at a fine pointer (§ 2.16.0) | — | — | — | — | — | — |
75
- | **forms** (`./forms`) | — | `field` → `inputProps`, **`inputProps` drops `key`**, the layout tier (§ `inputProps`) | `field` DELETED — and the `--fix` recipe no longer works (§ Consolidation) | — | — | — | — | — | `FormGroup` row no longer stretches (§ Fixes) | — | — | — | — | the layout + `useForm`/`schemaResolver` deprecated, removed 1.37.0 (§ The form layout moves) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | § 1.x compatibility layer removed | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — |
76
- | **data** (`./data/table`) | — | root is a `<div>`, row selection, `getItemKey` required (§ `basalt-ui/data`) | `./data` + `./query` + `./connectivity` dropped (§ Consolidation) | — | — | — | — | — | `renderCard` documented (§ `renderCard`) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — |
77
- | **dashboard** (`.`) | `StatCard`: `unit`, `breakdown`, delta format (§ `StatCard`) | `StatGroup`, `WidgetGrid`, query-aware `StatCard` — additive | — | **the column law keys on the CONTAINER; `cols={4}` is 2-up at `sm`** (§ Dashboard) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | § 1.x compatibility layer removed | — | — | — | — | — | — | — | — | — | — | — | card inset 12/16, `kpi` 22 / 500 (§ 2.16.0) | — | — | StatCard status dot, Meter/BarList refinements (§ 2.19.0) | — | plain `Meter` value bar fill muted (`tone="ink"` to opt out); `BarList` default `thin`, `variant="default"` → `inline` (§ 2.21.0) | — |
78
- | **toolchain** (`./configs/*`) | — | — | the shipped lefthook preset's `check-theme` BROKE — the CLI resolver stopped ascending (§ CLI) | the preset's default bin, and the `root:` recipe (§ Toolchain) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — |
79
- | **CLI** (`basalt-ui`) | — | — | **resolver stops relocating; `doctor` loses 6 of 10 checks** (§ CLI) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | the managed block moves `CLAUDE.md` → `AGENTS.md` (§ 1.41.0) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | `doctor`: CSS + forced dropped subpaths, `oxlint-floor`, Start wiring (§ 2.8.0) | — | § 1.x compatibility layer removed | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — |
80
- | **guards** | five rules → `error` (§ Guards) | six new ids at `warn` (§ preamble) | `query-dual-import` retired in 1.29.1 (§ Guards) | four rules → `error` (§ Guards) | — | — | — | `raw-breakpoint`: the container-grid answer, `error` at 1.33.0 (§ 1.32.0) | `FormRow`/`FormGroup` homes in both lanes; `basalt-main` dropped (§ Fixes) | C1 + breakpoint pairs → `error`; `unknown-vx-token` `warn` (§ Guards) | — | — | — | `unknown-vx-token` → `error`; the token factories throw (§ Guards) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | § 1.x compatibility layer removed | — | — | — | — | — | — | — | — | — | — | — | `inline-spacing` steps, `card-inset` accepts both pairs (§ 2.16.0) | — | — | — | — | `series-palette` at `warn` (§ 2.21.0) | — |
69
+ | Surface | 1.27.0 | 1.28.0 | 1.29.0 | 1.30.0 | 1.30.1 | 1.30.2 | 1.31.0 | 1.32.0 | 1.32.1 | 1.33.0 | 1.34.0 | 1.34.1 | 1.35.0 | 1.36.0 | 1.36.1 | 1.37.0 | 1.37.1 | 1.38.0 | 1.38.1 | 1.39.0 | 1.40.0 | 1.40.1 | 1.40.2 | 1.40.3 | 1.41.0 | 2.0.0 | 2.0.1 | 2.0.2 | 2.0.3 | 2.0.4 | 2.0.5 | 2.1.0 | 2.2.0 | 2.3.0 | 2.4.0 | 2.5.0 | 2.6.0 | 2.6.1 | 2.7.0 | 2.7.1 | 2.7.2 | 2.7.3 | 2.8.0 | 2.8.1 | 2.9.0 | 2.9.1 | 2.10.0 | 2.11.0 | 2.11.1 | 2.12.0 | 2.13.0 | 2.13.1 | 2.13.2 | 2.13.3 | 2.14.0 | 2.15.0 | 2.16.0 | 2.17.0 | 2.18.0 | 2.19.0 | 2.20.0 | 2.21.0 | 2.22.0 | Unreleased |
70
+ | ----------------------------- | ------------------------------------------------------------ | -------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | --------------------------------------------------------------------- | ------ | ----------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ---------------------------------- | ------ | ------ | -------------------------------------------------------------------------------------------- | ------ | ------ | ------ | ------ | ------ | ----------------------------------------------- | ------ | ------ | ------ | ------ | ------------------------------------------------------------ | ---------- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
71
+ | **tokens** (`./tokens`) | — | `--vx-divider` → `rgba()` on both schemes (§ Shell) | `--vx-space-touch-target` added (§ Additions) | eight spacing numbers (§ Chrome) | — | — | `--vx-hit` replaces the touch vars; `SIZE_CLASSES` (§ 1.31.0) | — | `SIZE_CLASSES`/`CONTAINER_CLASSES` actually exported (§ Fixes) | `CONTAINER_GRID_BREAKPOINTS`; `raw-breakpoint` trusts it (§ 1.33.0) | `CONTAINER_KEYS` (§ 1.34.0) | — | — | — | — | — | — | — | | `appShellInset` 20 → 16 (§ 1.38.1) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | § 1.x compatibility layer removed | — | — | — | — | — | — | — | — | — | — | — | spacing, radius, type and the dense tier (§ 2.16.0) | — | — | — | — | — | — | — |
72
+ | **charts** (`./charts`) | — | phone tier, `curve`, formatters, `state`, log axis (§ preamble) | `ChartState.empty: string`, `AxisBottomNumeric` (§ Additions) | responsive `height`, `legend.maxRows` (§ Charts) | `height` reaches the kinds; `maxRows` beats the `fill` fit (§ Charts) | — | container-class tier + `height` keys (§ 1.31.0) | — | `ResponsiveChartHeight` `sm` → key (§ Container recipes) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | `BandSpan.absentFraction` + `absentState` (§ 2.8.0) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | `Lines` linear curve, `naming`, no lone-series legend, locale tooltip header, y gutter, `RefLine.labelPosition`, `StackedArea.fillOpacity` (§ Chart chrome) | — |
73
+ | **shell** (`.`) | — | scrollport, region seams, **the brand left the sidebar** (§§ scrollport, brand, Shell) | `PageTitle`, `BasaltDevDock`, `useBreakpoint` (§ Additions) | More popover, aside pill, the responsive gutter, `useBasaltSpacing` (§ Chrome) | — | — | `theme.breakpoints` derived, `useSizeClass`, `data-basalt-host`, `useBreakpoint` on notice (§ 1.31.0) | `useBreakpoint` removal → 1.33.0; `useSizeClass` is shell-only (§ 1.32.0) | shell-less `shell/` gutter, `AppShell` breakpoints, `useSizeClass` for overlays (§§ Shell-less, `useSizeClass`) | — | `useBreakpoint` removed (§ 1.34.0) | — | — | `useCoarsePointer()` (§ `useCoarsePointer()`) | — | — | — | — | | content gutter 16, block 8 from `sm` (§ 1.38.1) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | `BasaltProvider` embedded mode, `spotlight` (§ 2.8.0) | — | — | — | — | — | — | — | — | — | — | — | — | — | expanded gutter 24 (§ 2.16.0) | — | — | light/outline Buttons ink, no status edges (§ 2.19.0) | — | — | — | — |
74
+ | **controls** (`./controls`) | `NumberFilter`, `field.number` (§ Controls) | sheet renders panel rows; `PanelRow`, `SliderControl` (§ `basalt-ui/controls`) | — | — | — | — | — | — | — | `NumberFilter clearable`; `createSearchStore` `resets` (§ State and controls) | — | — | — | `FormSection`/`FormRow`/`FormGroup`/`FormActions` move here (§ The form layout moves) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | dense 28 tier at a fine pointer (§ 2.16.0) | — | — | — | — | — | — | — |
75
+ | **forms** (`./forms`) | — | `field` → `inputProps`, **`inputProps` drops `key`**, the layout tier (§ `inputProps`) | `field` DELETED — and the `--fix` recipe no longer works (§ Consolidation) | — | — | — | — | — | `FormGroup` row no longer stretches (§ Fixes) | — | — | — | — | the layout + `useForm`/`schemaResolver` deprecated, removed 1.37.0 (§ The form layout moves) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | § 1.x compatibility layer removed | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — |
76
+ | **data** (`./data/table`) | — | root is a `<div>`, row selection, `getItemKey` required (§ `basalt-ui/data`) | `./data` + `./query` + `./connectivity` dropped (§ Consolidation) | — | — | — | — | — | `renderCard` documented (§ `renderCard`) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — |
77
+ | **dashboard** (`.`) | `StatCard`: `unit`, `breakdown`, delta format (§ `StatCard`) | `StatGroup`, `WidgetGrid`, query-aware `StatCard` — additive | — | **the column law keys on the CONTAINER; `cols={4}` is 2-up at `sm`** (§ Dashboard) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | § 1.x compatibility layer removed | — | — | — | — | — | — | — | — | — | — | — | card inset 12/16, `kpi` 22 / 500 (§ 2.16.0) | — | — | StatCard status dot, Meter/BarList refinements (§ 2.19.0) | — | plain `Meter` value bar fill muted (`tone="ink"` to opt out); `BarList` default `thin`, `variant="default"` → `inline` (§ 2.21.0) | — | — |
78
+ | **toolchain** (`./configs/*`) | — | — | the shipped lefthook preset's `check-theme` BROKE — the CLI resolver stopped ascending (§ CLI) | the preset's default bin, and the `root:` recipe (§ Toolchain) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — |
79
+ | **CLI** (`basalt-ui`) | — | — | **resolver stops relocating; `doctor` loses 6 of 10 checks** (§ CLI) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | the managed block moves `CLAUDE.md` → `AGENTS.md` (§ 1.41.0) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | `doctor`: CSS + forced dropped subpaths, `oxlint-floor`, Start wiring (§ 2.8.0) | — | § 1.x compatibility layer removed | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — |
80
+ | **guards** | five rules → `error` (§ Guards) | six new ids at `warn` (§ preamble) | `query-dual-import` retired in 1.29.1 (§ Guards) | four rules → `error` (§ Guards) | — | — | — | `raw-breakpoint`: the container-grid answer, `error` at 1.33.0 (§ 1.32.0) | `FormRow`/`FormGroup` homes in both lanes; `basalt-main` dropped (§ Fixes) | C1 + breakpoint pairs → `error`; `unknown-vx-token` `warn` (§ Guards) | — | — | — | `unknown-vx-token` → `error`; the token factories throw (§ Guards) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | § 1.x compatibility layer removed | — | — | — | — | — | — | — | — | — | — | — | `inline-spacing` steps, `card-inset` accepts both pairs (§ 2.16.0) | — | — | — | — | `series-palette` at `warn` (§ 2.21.0) | — | — |
81
81
 
82
82
  ---
83
83
 
@@ -1046,6 +1046,271 @@ The `basalt-ui/router-tanstack` subpath is **removed** in 2.x, not moved: an imp
1046
1046
  _Nothing yet. Author the next section under this heading as `## Unreleased — <title>`; the
1047
1047
  release renames it and opens a new one here._
1048
1048
 
1049
+ ## 2.22.0 — Wave 37, argo's friction II
1050
+
1051
+ No export is removed. Five defaults move and one export is new.
1052
+
1053
+ ### `PageSummary` (new export)
1054
+
1055
+ `import { PageSummary } from 'basalt-ui'` — the SPEC § 6.9 page-summary recipe: `sentence` (must carry
1056
+ a live number), `facts` (`null`/`false` drop; sans `xs` muted, `·` separators that never lead a wrapped
1057
+ line), `aside`, and `loading` for a same-shape skeleton. argo's `components/upstream/page-summary.tsx`
1058
+ is deleted in favour of it; its `facts` were mono, they are sans now (D33) — a fact that is a time may
1059
+ wrap itself in `<span style={{ fontFamily: 'var(--basalt-font-mono)' }}>`.
1060
+
1061
+ ### Behaviour changes
1062
+
1063
+ | Surface | Before | Now | Opt-out |
1064
+ | ------------------------------------ | ---------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------- |
1065
+ | `Section` with `tabs` and no `title` | `title` was required, so a tabs-only switch carried a restated heading | `title` is optional when `tabs` is given: no heading, no fold, the header row is the tabs; a `ViewTabs` names its own tablist, so the section adds no second name (pass `aria-label` for tabs that are not self-naming); `count`, `info`, `subtitle`, `icon` and the hero metric are type errors | pass a `title` |
1066
+ | `Section` `group` tier heading | `micro` (11) | `xs` (12), the step the rows' meta already use: three sizes where argo counted four | none; the rank still reads from case, face and tracking |
1067
+ | `SyncButton scope="page"` below `sm` | icon only | icon plus a short locale-narrow age (`2m`, `2 Min.`, `now`), one line, content-width; no age → the square icon as before | omit `lastCompletedAt` |
1068
+ | Filter pill (`PageBar filters`) | clipped at `15rem` | fits its selected option up to `24rem`, then truncates with the full name as `title` | none |
1069
+ | `ViewTabs` phone `Select` | 10.67 px inline-start inset | the `ctl` inset (10 px), the buttons' | none |
1070
+
1071
+ The sticky-PageBar anchor clearance argo filed (`--vx-space-sticky-header-clearance` 12 px vs a 36 px
1072
+ bar) needs no change: a shell-less `Section id` already adds the bar's published height
1073
+ (`--basalt-page-bar-h`), and in `BasaltShell` both bars sit outside the scrollport. `section-anchor`
1074
+ now pins the title, not just the root, at 390 and 1440.
1075
+
1076
+ ### Chart facts, sparklines and strips gain tone, glyph and focus
1077
+
1078
+ New, additive: `ChartFact` takes `tone` (`good` / `warn` / `bad` / `muted`: ink only, never a fill)
1079
+ and `period` takes a list, joined by `·`; `ChartCard` takes `stale` (the facts dim to the strip
1080
+ cell's 0.55 while placeholder data shows) and `stateNoun` (an errored card reads "Could not load
1081
+ {stateNoun}"); `Sparkline` takes `tone="muted"` and `referenceLabel`; a state of `BandStrip` or
1082
+ `Heatmap` takes `glyph` (drawn centred in each of its cells wide enough for it, 12px); a `Heatmap`
1083
+ state takes `tone` (`good` / `warn` / `bad` / `neutral`) instead of a `color`. A categorical status grid is therefore `states` + `getState` with a
1084
+ `tone` per state, nothing read from `dist`.
1085
+
1086
+ **Changed defaults:**
1087
+
1088
+ - A failed `ChartCard` / `ChartPlaceholder` used to read "Could not load this chart"; it now reads
1089
+ "Could not load". **Opt out:** `stateNoun="this chart"` on the card restores the old words.
1090
+ - The `Sparkline` readout reads the value, then the day (`3 items · 12 Oct`, the label in the
1091
+ proportional sans, no longer mono and first), and rides the hovered point instead of sitting
1092
+ at the opposite corner. **Opt out:** none for the placement.
1093
+ - A line `Sparkline`'s plot has a 3px margin so its end marker clears the keyboard focus outline;
1094
+ the line is 6px shorter in each axis. **Opt out:** none.
1095
+ - A `BandStrip` or `Heatmap` state whose `color` is `VX.status.warn` / `VX.status.bad` (or whose
1096
+ `tone` is `warn` / `bad`) now draws `!` / `×` in its cells wide enough for it, in the panel
1097
+ surface ink. **Opt out:** `glyph: ''` on the state.
1098
+ - A `Heatmap` tooltip opens below the hovered cell (above only when there is no room), so it no
1099
+ longer covers the caption row over the grid. **Opt out:** none.
1100
+
1101
+ ### Chart chrome: tooltips, ticks, reference captions and the `Lines` defaults
1102
+
1103
+ Wave 37, the cartesian half. Every change below is a default; the opt-out is named in each line.
1104
+
1105
+ - **`Lines` and `Bars` line overlays default to `curve: 'linear'`.** Discrete daily or monthly values
1106
+ are joined by straight segments; the smoothed curve drew crossings between points that never
1107
+ happened. **Opt out:** `curve: 'monotone'` on the series (a continuous measure). `StackedArea` and
1108
+ `Sparkline` are unchanged.
1109
+ - **A single-series chart draws no legend.** The title, the axis and the tooltip name it.
1110
+ **Opt out:** `legend={{}}` (any explicit `legend` config draws it).
1111
+ - **`Lines` takes `naming?: 'auto' | 'legend' | 'endLabels'`.** `auto` (default): from the wide class
1112
+ a chart of up to three lines and no `y2` names them with end labels and its legend is hidden; below
1113
+ wide the legend names them and no end label draws. A chart whose legend names more than its lines (a
1114
+ `y2`, a legend-named `refLines` entry, a `role: 'reference'` series) keeps the legend at every width
1115
+ and draws no end labels, as does one whose last point a narrower `xDomain` clips. From the wide class
1116
+ the legend's series toggle is gone with the legend. Two end labels that collide are now spread apart
1117
+ instead of both dropped. **Opt out:** `naming="legend"` for the old always-legend chart (toggle kept); `naming="endLabels"` for end labels
1118
+ at every width and no legend.
1119
+ - **The tooltip header reads the page locale and drops a clock time a daily bucket never had.** It
1120
+ was `Mon Sep 1 2026` (a fixed US order) and printed `22:00` for a bucket keyed by a local midnight
1121
+ east of UTC. A day-granular x (every step at least a day) is now the date only — weekday, day, month,
1122
+ year through `Intl` in the locale `BasaltProvider`/`defineFormat` set, on the nearest UTC day; a
1123
+ sub-day x adds `HH:MM`. **Opt out:** `tooltip.formatHeader`.
1124
+ - **A lone series whose formatted value already ends in its own name prints the name once**
1125
+ (`Sessions` / `27 sessions` is `Sessions` / `27`). **Opt out:** `tooltip.rows` for a custom row, or a
1126
+ `formatValue` that omits the unit.
1127
+ - **The tooltip name column never wraps.** It keeps a 6rem floor, stays on one line and ends in an
1128
+ ellipsis past 14rem; the value stays right-aligned. No prop; the full name is in the tooltip's
1129
+ accessible label.
1130
+ - **Y tick labels always sit in a gutter outside the plot.** The compact-and-short mode that drew them
1131
+ inside the plot, above their grid line, is gone (a line ran through the label). The plot is
1132
+ correspondingly narrower on a chart under 180 px tall at the compact width. **Opt out:** none.
1133
+ - **An auto y domain ends on a tick at or above the data's maximum.** The padded top could fall
1134
+ between ticks, so the line peaked above the last label (`4` as the top tick for a series reaching
1135
+ `5`); the domain now rises to the next tick. **Opt out:** `y.domain` as a tuple or function, or
1136
+ `y.nice`.
1137
+ - **Ticks and the legend share one size step** (the 11 px tick step, `VX.text.micro`); the legend was
1138
+ 12 px. `VX.legendFontSize` is deleted (nothing else read it): use `VX.text.micro`. A bar legend swatch is one rounded
1139
+ square at every width (it was a circle below 480 px).
1140
+ - **`Bars` hover highlights the bar** (the hovered x paints at full series strength) and paints no
1141
+ crosshair rule; the rule is line-chart chrome. **Opt out:** none.
1142
+
1143
+ New, additive:
1144
+
1145
+ - **`RefLine.labelPosition`:** `'end-above' | 'end-below' | 'start-above' | 'start-below'` pins the
1146
+ caption's spot. Without it the caption takes the first spot (the plot's end above the line; the
1147
+ start for a right-axis line) that stays inside the plot and that no data line runs through, so a
1148
+ line in the top or bottom quarter, or one a series ends on, moves its caption instead of sitting on
1149
+ the data. **Opt out:** pin the old spot with `'end-above'`.
1150
+ - **`StackedArea` `fillOpacity`:** every band's opacity, 0–1; a band's own `fillOpacity` wins. The
1151
+ default (0.85) and the legend swatch are unchanged without it.
1152
+
1153
+ ### `Meter`: the reading once, muted zones, stops, ring ticks, captions at their marks
1154
+
1155
+ New, additive (a `Meter` that passes none of them draws as before):
1156
+
1157
+ - `reading={false}` — a zoned bar prints no reading at its marker (the marker keeps its
1158
+ `aria-valuenow` / `aria-valuetext`). Inside a basalt host (`StatCard` slot, strip `visual`) it was
1159
+ already dropped; pass `reading` there to print it. Use it when your own headline states the value.
1160
+ - `track={false}` — a `value` bar with no `target` and no `ticks` draws no track (still `role="meter"`).
1161
+ - `tone: 'muted'` on a `MeterZone` or `MeterSegment` — a muted lightness ramp instead of the line ramp.
1162
+ - `shape="ring"` takes `target` and `ticks`: a short radial mark at the value, listed in the
1163
+ described-by text; the value stays centred.
1164
+ - `stops: { at, color }[]` on a `value` bar — one gradient track through your colours with the reading
1165
+ as a marker; no labels unless `ticks` are given.
1166
+ - A plain bar or ring with no `tone` / `color` takes its host's verdict tone once a host passes one.
1167
+
1168
+ Changed behaviour (no API change):
1169
+
1170
+ - **Captions sit at their marks.** The forecast caption and the target caption are centred on their
1171
+ tick (clamped inside the track) instead of at the track end, whenever every caption fits a gap step
1172
+ apart; otherwise the row flows and wraps as before. **Opt out:** pass your own `endCaption` (it stays
1173
+ at the end as written); the forecast caption has no opt-out beyond `forecastCaption`.
1174
+ - **Ticks keep a gap step from zone names, and the end tick yields.** A tick on the zone row now keeps at
1175
+ least `--vx-space-control-gap` from every label (it was "not touching"); zone names among themselves
1176
+ keep the old rule. A zone name
1177
+ that clears the holding one is placed before a tick at the track's start or end, so that end tick
1178
+ hides where it would touch the name (a zone name used to lose to it); interior labelled ticks still
1179
+ beat a name. A hidden name or tick stays in the described-by text. **Opt out:** none; give the zone a
1180
+ `short` label.
1181
+ - **The uncoloured zone ramp is floored at 15 points per step**, so five or more zones step further
1182
+ apart than before (cap 95 %); `tone: 'muted'` uses the same ramp. Up to six zones (five segments)
1183
+ stay distinguishable by lightness.
1184
+ - **`size="row"` keeps categorical part captions** (swatch, name, value); it dropped them before, so
1185
+ the parts were unnamed. **Opt out:** none for `segments`; a `value` bar is unaffected.
1186
+ - **Part captions never wrap inside themselves** while they fit: each sits under its own segment when
1187
+ all of them fit there, else the wrapped list (a caption wider than the row still wraps).
1188
+
1189
+ ### Strip cells end at their content (`StatGroup variant="strip"`)
1190
+
1191
+ **Changed:** each strip cell now spans only the shared tracks down to its last part, so a cell's own
1192
+ box (`[data-strip-cell]`, `data-shot="strip-<key>"`) ends at its content instead of filling the row
1193
+ height. Captions still share one top and values one baseline across a row; a footer under a hero
1194
+ alone now has its own track right under the hero (it hugs the value, and sibling footers share one
1195
+ top); a rows cell's footer keeps the shared footer track. The vertical dividers moved from the cell
1196
+ to a row-high `[data-strip-slot]` wrapper, so they still run the full row and the area under a short
1197
+ cell is the strip's own surface. The cell's foot inset moved to the slot with them. `stale` dims the cell content only; the dividers on
1198
+ the wrapper stay at full strength.
1199
+ **Affects you if** you selected `[data-strip-cell]` for its height or its box-shadow, or painted a
1200
+ background on it. **Opt out:** none needed for markup; a custom rule that needs the old full-row
1201
+ cell can target `[data-strip-slot]` instead (it is the row-high box). No per-cell `align="stretch"`
1202
+ was added: no consumer case needs it.
1203
+
1204
+ A strip footer-row entry that is a `Meter` now keeps its start and end captions together
1205
+ (`Today €5 €5 left of €10`) instead of at the two ends of a wide track.
1206
+
1207
+ New, additive: `StatStripCell.action` (a control at the end of the caption line; the caption
1208
+ truncates first, so it never wraps the line), and `StatStripRow.hideValue` (print the row label
1209
+ only, for a reading the hero already shows; `value` is ignored).
1210
+
1211
+ ### A cell's `tone` colours its visual
1212
+
1213
+ A strip cell's `tone` (and `StatCard`'s) now also reaches a plain `Meter` in its `visual` / sparkline
1214
+ slot as the fill's verdict colour, not just the value. **Opt out:** give the `Meter` its own `tone` or
1215
+ `color`.
1216
+
1217
+ ### `StatCard` states
1218
+
1219
+ **Changed:** in the `empty` and `error` states the `subtitle` footer is no longer drawn (it captioned
1220
+ a sparkline that is not there). The default error title is `Could not load` (was
1221
+ `Could not load this figure`) so the error line stays on one line in a two-column phone card. A
1222
+ `qualifier` in a card narrower than 240px (a two-column phone cell) no longer wraps under the caption:
1223
+ it truncates, with the full text in its `title`, so the value keeps its row neighbours' line. That
1224
+ is the whole guarantee: in a card of 240px or more a long qualifier still wraps and moves the value
1225
+ down a line (measured: 10px at a 304px card). **Opt out:** put the
1226
+ text in `info` or `subtitle` instead of `qualifier`; for the error title, render `ErrorState` yourself.
1227
+
1228
+ ### `BarList` in a wide container
1229
+
1230
+ A thin `BarList` in a container 480px or wider now lays each row out as `[label][value][secondary][track]`:
1231
+ the label column fits the longest label (capped at 40% or 14rem, truncating with its `title`), value and secondary
1232
+ are right-aligned and shared by every row, and the bar track takes the remaining width on the one shared
1233
+ scale. Compact containers keep the stacked layout. Every state (list, loading, empty) is now a `div`
1234
+ frame around the list, and `className` / `style` land on that frame. The frame is a size container
1235
+ named `basalt-card` (the only names the theme guard permits) with `inline-size: 100%`: it shadows an
1236
+ enclosing card's container for the list's descendants only, and the 480px threshold measures the list's
1237
+ own width. Opt-out: `variant="inline"` is unchanged; to keep the stacked
1238
+ thin layout in a wide card, constrain the list's width below 480px.
1239
+
1240
+ ### `basalt-ui shot` captures tall anchors and keeps chrome off crops; `init` wires a stock Vite app
1241
+
1242
+ **Changed:** an anchor that is not rendered at a viewport (a hidden mobile pane, `display: none`) now
1243
+ fails in under 5 s with the reason, where it used to wait out a 30 s Playwright timeout: a hover,
1244
+ focus or tooltip shot is recorded `absent`, a `rest` shot stays an `error` unless the anchor
1245
+ declares `data-shot-absent="rest"`. A hung step costs 5 s, never 30. Crops of an anchor hide the shell's fixed and
1246
+ sticky chrome (PageBar, mobile bottom nav) for the shot, and an anchor taller than the viewport is
1247
+ captured whole (the viewport grows for that shot). The `_page` shot grows the viewport by what an
1248
+ inner scrollport hides, so it reaches the end of the page at 390 with the chrome kept. Focus, hover
1249
+ and tooltip crops read the anchor's box once it stops moving. A route whose anchors declare no
1250
+ `data-shot-states` logs a warning, its URL-state shots carry the note `page declares no
1251
+ data-shot-states`, and `shot detect` reports it as `craft-7/no-declared-states` (P1, exit 2).
1252
+ **Opt out:** none for the capture; declare `data-shot-states` on an anchor (`empty loading error`)
1253
+ to clear the finding.
1254
+
1255
+ `basalt-ui init` over an unmodified create-vite `src/main.tsx` now replaces it with the seeded entry
1256
+ and adds the peers `basalt-ui` imports (Mantine, TanStack Router and Query, the three fonts,
1257
+ `motion`) to `package.json` `dependencies`; it prints `bun install` and never installs. An edited
1258
+ `main.tsx` is still left alone, with the wiring steps and the missing peers printed. **Opt out:**
1259
+ edit `main.tsx` before running `init`.
1260
+
1261
+ ### Selected Tabs are ink in every variant
1262
+
1263
+ **Changed default:** the selected `pills` tab filled with the accent and the `outline` border took the
1264
+ default border; both now follow `default`'s underline and read by ink. The pill is an ink-mixed
1265
+ panel with an ink label, the outline border is ink. **Opt out:** pass `color="blue"` (any
1266
+ colour) and the tab keeps its hue and the on-colour label.
1267
+
1268
+ ### A status `Badge` is a dot on the neutral surface
1269
+
1270
+ **Changed default:** the `light` Badge (the theme default) painted a tint of its colour, so a row of
1271
+ status chips read as coloured slabs. It is now the subtle surface with an ink word, and a named theme
1272
+ colour (`color="green"`, `"red.6"`, `"#e03131"`, a var) adds a leading 6px dot in that colour; an unnamed or `gray` chip has no dot.
1273
+ A `leftSection` or `rightSection` replaces the dot. `filled`, `outline`, `dot` and `default` are
1274
+ unchanged, so an accent count keeps its fill. **Opt out:** `variant="filled"` for the old strong chip,
1275
+ or a per-site `vars` with `--badge-bg` and `--badge-color` for the tint.
1276
+
1277
+ ### Disabled Button and the icon-side inset
1278
+
1279
+ **Changed default:** a disabled `Button`/`ActionIcon` has one ink-mixed panel surface in both schemes
1280
+ (dark had none and read as the subtle variant). A `Button`'s `leftSection`/`rightSection` inset now
1281
+ equals its text side (it was one scale step tighter: 8/12, 12/16, 12/20), so an icon Button is
1282
+ balanced and one step wider. **Opt out:** set `--button-section-padding-x` on the Button.
1283
+
1284
+ ### No slashed zero in titles; no mono ligatures
1285
+
1286
+ **Changed default:** `:root` resets the `zero` feature (its off state; nothing in the package turns it
1287
+ on), so every head-face surface (headings, `Title`, section/card/widget titles, a CSS-module class that
1288
+ only sets the family) inherits a plain zero: `2026` and `90 days` no longer carry a slashed one.
1289
+ `font-variant-ligatures: none` applies to `code`, `kbd`, `samp`, `pre`, `[data-numeric]`,
1290
+ `[data-monospace]`, a `ff="monospace"` Text and `Code`/`Kbd`, so `<>` in a facts line is two
1291
+ characters; body sans keeps its ligatures. Mono-only CSS-module classes are not reached by the
1292
+ ligature selectors (follow-up). **Opt out:** an unlayered `font-feature-settings` or
1293
+ `font-variant-ligatures` on the element.
1294
+
1295
+ ### Chart focus ring
1296
+
1297
+ **Fixed:** the chart host's keyboard focus ring was the UA ring (white in dark); it is now
1298
+ `2px solid var(--vx-accent)`, like every Mantine control. It was never a mobile or coarse-pointer
1299
+ branch: no `mantine-focus-*` class reaches the host, so the UA drew it at every width in dark.
1300
+
1301
+ ### `VX.surface.rowHover` and `VX.surface.rowSelected`
1302
+
1303
+ New, additive: `--vx-surface-row-hover` and `--vx-surface-row-selected`, typed on `VX.surface`. The
1304
+ panel mixed toward the ink (5% / 7.5% light, 7% / 9% dark), so a hovered or selected row on a panel
1305
+ reads in both schemes where `panelHover` (lighter than `panel` in light) does not. Replace a
1306
+ hand-rolled `color-mix(in srgb, var(--vx-ink) N%, …)` row wash with them.
1307
+
1308
+ **Changed default (derivation):** the row surfaces join the status-text solve, and every text colour
1309
+ clears 4.5:1 on both. At the default config three status hexes moved to clear them: good light
1310
+ `#327a4d` → `#2f774b`, warn light `#966200` → `#935f00`, bad dark `#f97d74` → `#fe8178`; and the dark
1311
+ `faint` ink `#a1a1a4` → `#a7a7aa` (tone 66.24 → 68.5). **Opt out:** none for the hexes; a consumer
1312
+ that pinned them reads them from `VX.status.*` / `VX.faint`.
1313
+
1049
1314
  ## 2.21.0 — strip cell state, one Retry, and the marker reading
1050
1315
 
1051
1316
  ### One Retry in the shared error anatomy
@@ -19,7 +19,7 @@ A shot out dir (default `.basalt/shots`, or the `out` in `.basalt/shots/last.jso
19
19
  - `detect.json`, only if the out dir has one (`basalt-ui shot detect`): the deterministic findings for the [measured] items and `basalt/*` lint. Cite each at its own severity as `metrics.json <anchor>`, do not re-derive them, and map the rule to its item: `craft-N/*` → Craft N, `lint/*` → its rubric item, Craft 4 by default.
20
20
  - A layout-suite result, only if the out dir has one.
21
21
 
22
- A shot with status `not-declared`, `absent` (the anchor declares itself missing in that state) or `skipped` (mobile hover and tooltip: touch has no hover, by design) is not a defect. A missing hover, focus or tooltip crop for an anchor that has such a target is (Craft 7).
22
+ A shot with status `not-declared`, `absent` (a hover, focus or tooltip state not reachable at that viewport, or an anchor that declares itself missing in that state with `data-shot-absent`; the note says why) or `skipped` (mobile hover and tooltip: touch has no hover, by design) is not a defect, except a `not-declared` URL-state shot noted `page declares no data-shot-states`: no state was ever rendered, and `shot detect` reports it as `craft-7/no-declared-states`. A hidden `rest` anchor is an `error` shot, a defect, never `absent`. A missing hover, focus or tooltip crop for an anchor that has such a target is (Craft 7).
23
23
 
24
24
  ## Fail closed
25
25
 
@@ -29,7 +29,7 @@ Every value is a `VX.*` reference or a theme prop; the palette is derived, never
29
29
 
30
30
  ## Surfaces, radius, depth
31
31
 
32
- - Surfaces are `VX.surface.{bg,panel,panelHover,elevated,subtle,overlay,field,border,hairline}`; the seam between shell regions is `VX.divider`. [type VX]
32
+ - Surfaces are `VX.surface.{bg,panel,panelHover,rowHover,rowSelected,elevated,subtle,overlay,field,border,hairline}`; the seam between shell regions is `VX.divider`. [type VX]
33
33
  - Never set border, radius or shadow on a card; the theme owns them (`VX.shadowCard`, `VX.radiusCard`). [check-theme raw-surface]
34
34
  - Never replace a surface's shadow with your own `boxShadow`; compose with the depth token. [check-theme surface-shadow-override]
35
35
  - In CSS, corners and depth are `var(--vx-radius-card)` (cards) or `var(--vx-radius-ctrl)` (controls) and `var(--vx-shadow-card)`. [check-theme css-raw-surface]
@@ -12,7 +12,7 @@ Method only; the law is `.claude/rules/basalt-*.md` and `./DESIGN.md`. Each step
12
12
  2. **Scenario.** Realistic fixture data. Decide which metrics earn a hue (trend, status, separation; the rest neutral), the one primary action per view, each control's home (a `SettingsRow` preference via `createLocalStore`, never `useState`).
13
13
  3. **Encoding: is it even a chart?** Run the router, then pick each encoding from the data's shape, then the shipped composite. A gap is reported, not routed around; no row fits the data → say so, never default to a number in a box. `references/catalogue.md`. A metric tile follows the slot contract in `references/stat-tile.md`.
14
14
  4. **Build** with Mantine primitives and the composites; every color from `VX.*` or a series token. Chart kinds and `ChartCard` import from `basalt-ui/charts`, `BasaltDataTable` from `basalt-ui/table`, `FilterSet` and the other filters from `basalt-ui/controls`, the rest from `basalt-ui`. Hold the encoding law (`references/encoding-rules.md`: axes, color, tooltips, refetch, filters, number typography) and avoid the dashboard tells (`references/anti-defaults.md`: fact-only copy, uniform cards, one radius). Tune by eye in the theme lab (`dev.theme` Spotlight command, dev only) in both schemes, then bake values into the `derive` knobs of `createBasaltTheme` and series colors into `src/lib/series.ts`.
15
- 5. **Mark up for the board.** Tag each scored component `data-shot="<name>"`; hover and tooltip targets inside it get `data-shot-hover` / `data-shot-tooltip`; when the target's centre paints no readout (a donut's hole), add `data-shot-at="x,y"` (fractions of its box, e.g. `0.25,0.2`) and the shot hovers there. Declare supported states with `data-shot-states="empty loading error"` and render them when the `shot-state` URL param asks. An anchor legitimately absent in some states declares them with `data-shot-absent="empty error"`.
15
+ 5. **Mark up for the board.** Tag each scored component `data-shot="<name>"`; hover and tooltip targets inside it get `data-shot-hover` / `data-shot-tooltip`; when the target's centre paints no readout (a donut's hole), add `data-shot-at="x,y"` (fractions of its box, e.g. `0.25,0.2`) and the shot hovers there. Declare supported states with `data-shot-states="empty loading error"` and render them when the `shot-state` URL param asks; a route declaring none is a P1 (`craft-7/no-declared-states`). An anchor legitimately absent in some states declares them with `data-shot-absent="empty error"`.
16
16
  6. **Rounds, at least three.** Playwright is the app's dev dependency: `bun add -d playwright && bunx playwright install chromium`. Then:
17
17
  - `basalt-ui shot <routes> --dist <built app>` (or `--base <url>` for a running server); a real, signed-in app (live data, no `data-shot` yet): `basalt-ui shot /overview --dist dist --api /api=https://app.example.com --local-storage auth-token=@env:APP_TOKEN --auto-anchors` seeds the token (app origin only; `@env:`/`@file:`, never inline), proxies GET/HEAD under `/api` (writes get 405 unless `--api-allow-writes`) and crops every large Card, Paper and table. One `--header authorization=@env:NAME` goes to EVERY `--api` origin (https required for any secret), never on a navigation. A redirect, 401/403/404, 5xx or dead API fails every shot of that page; a key the app already holds is never overwritten. These shots reach the reviewer subagent's model provider, the session's own: an app holding third parties' data should point `--api` at staging or synthetic data;
18
18
  - review with TWO isolated passes: (A) hand the out dir (`.basalt/shots`) to the `basalt-design-reviewer` subagent by name; it reads each component's contact sheet (`png/*__sheet.png`) and every page shot; (B) run the deterministic detector `basalt-ui shot detect` on the same out dir (exit 0 clean / 2 findings / 1 scan failure). A review the builder runs inline instead of the subagent starts with a `DEGRADED` banner and does not count as done;
@@ -3,7 +3,7 @@
3
3
  ## Fact-only copy
4
4
 
5
5
  - The banned-filler list lives in the `basalt-design-reviewer` subagent; do not duplicate it, write to it.
6
- - A page summary sentence carries at least one live number ("12 tickets open, 3 past SLA."); a summary with none is cut.
6
+ - A page summary (`PageSummary`, one sentence plus a facts line) carries at least one live number ("12 tickets open, 3 past SLA."); a summary with none is cut.
7
7
  - Titles are precise nouns with their scope ("Ride distance, 7 days"). Empty states say why and what to do.
8
8
 
9
9
  ## Dashboard tells
@@ -32,6 +32,7 @@ Run this first. A "yes, chart" answer sends you to § 2.
32
32
  | Distribution as a slot micro-visual (`StatCard`, strip cell) | Small axis-less histogram | `Bars`, no axes, in the slot | A mean alone |
33
33
  | Distribution as a card's subject | One bar per bin, x labelled with the bin range ("€0–50"), y axis optional | `Bars` in a `ChartCard` | A mean alone; an axis-less histogram |
34
34
  | Status over time | Band strip; heat grid for daily data | `BandStrip` / `Heatmap` (`basalt-ui/charts`) | A table of dates |
35
+ | Categorical status per cell (up, degraded, down) | Flat status fills; a glyph on warn and bad, never hue alone | `Heatmap` `states` with a `tone` each, no hex; `BandStrip` `glyph` | A hue-only grid |
35
36
  | A set of KPIs about one record | One joined surface, cells split by hairlines | `StatGroup variant="strip"` | N unrelated cards |
36
37
  | Many rows, several attributes | Table, right-aligned figures | `BasaltDataTable` (`basalt-ui/table`) | Cards per row |
37
38
  | Nothing yet / failed | Why and what to do | `EmptyState`, or the component's own `query` state | "No data" |
@@ -1 +1 @@
1
- {"version":3,"file":"BandStrip.d.ts","sourceRoot":"","sources":["../../src/charts/BandStrip.tsx"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAA;AAMzC,OAAO,KAAK,EAAS,eAAe,EAAE,MAAM,aAAa,CAAA;AAGzD,OAAO,KAAK,EAEV,mBAAmB,EAGnB,MAAM,EAGP,MAAM,SAAS,CAAA;AAEhB,gGAAgG;AAChG,MAAM,MAAM,eAAe,CAAC,CAAC,IAAI,eAAe,GAAG;IACjD;;;OAGG;IACH,WAAW,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,MAAM,GAAG,IAAI,CAAC,GAAG,SAAS,CAAA;CACpD,CAAA;AAED,2DAA2D;AAC3D,MAAM,MAAM,QAAQ,GAAG;IACrB,qEAAqE;IACrE,KAAK,EAAE,MAAM,CAAA;IACb,oGAAoG;IACpG,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IACzB;;;;OAIG;IACH,cAAc,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IACnC;;;OAGG;IACH,MAAM,CAAC,EACH;QACE,0CAA0C;QAC1C,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;QAC1B,uEAAuE;QACvE,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;KAC3B,GACD,SA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AAE,CAAC,EAAE,CAAA;IACpD,oGAAoG;IACpG,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,KAAK,QAAQ,CAAA;IAC3B,IAAI,CAAC,EAAE,QAAQ,CAAC,CAAC,CAAC,GAAG,SAAS,CAAA;IAC9B;;;;;OAKG;IACH,WAAW,CAAC,EAAE,CAAC,GAAG,SAAS,CAAA;CAC5B,CAAA;AA+MD,wBAAgB,SAAS,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,GAAG,MAAM,EAAE,CAAC,SAAS,MAAM,GAAG,MAAM,EAC/E,KAAK,EAAE,cAAc,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,GAC7B,YAAY,CAiKd"}
@@ -2,12 +2,13 @@ import { jsx } from "react/jsx-runtime";
2
2
  import { barY } from "@tanstack/charts/bar";
3
3
  import { decorative } from "@tanstack/charts/mark/decorative";
4
4
  import { rect } from "@tanstack/charts/rect";
5
+ import { text } from "@tanstack/charts/text";
5
6
  import { useCallback, useMemo } from "react";
6
7
  import { oneOf, requiredProp } from "../common/errors.js";
7
8
  import { NON_FINITE } from "../format/shared.js";
8
9
  import { VX, alpha } from "../tokens/index.js";
9
10
  import { CartesianRung } from "./CartesianChart.js";
10
- import { groupsOf, resolveNamedState } from "./band-fold.js";
11
+ import { GLYPH_MIN_PX, glyphOf, groupsOf, resolveNamedState } from "./band-fold.js";
11
12
  import { emphasis } from "./marks.js";
12
13
  import { rowX } from "./types.js";
13
14
  const DEFAULT_MIN_BAND_PX = 3;
@@ -93,12 +94,19 @@ function layoutBands(input) {
93
94
  absentKey
94
95
  };
95
96
  const hits = [];
97
+ const glyphs = [];
96
98
  for (const g of groups) {
97
99
  const datum = fold && g.items.length > 1 ? fold.merge(g.items) : g.items[0];
98
100
  if (datum === void 0) continue;
99
101
  const span = getBand(datum);
100
102
  const cell = { f0: g.start / data.length, f1: (g.start + g.items.length) / data.length };
101
103
  const answers = paintSpan(ctx, span, cell);
104
+ const named = input.states.get(span.state);
105
+ const glyph = named && glyphOf(named);
106
+ if (answers.primary && glyph && (cell.f1 - cell.f0) * input.width >= GLYPH_MIN_PX) {
107
+ const share = absentShareOf(span, absentKey);
108
+ glyphs.push({ f: cell.f0 + (cell.f1 - cell.f0) * (1 - share) / 2, glyph });
109
+ }
102
110
  g.items.forEach((source, i) => {
103
111
  const slot = g.start + i;
104
112
  if (answers.primary) hits.push({ slot, source, state: span.state, datum });
@@ -106,7 +114,7 @@ function layoutBands(input) {
106
114
  hits.push({ slot, source, state: absentKey, datum });
107
115
  });
108
116
  }
109
- return { base: [...ctx.base.values()], markers: [...ctx.markers.values()], hits };
117
+ return { base: [...ctx.base.values()], markers: [...ctx.markers.values()], hits, glyphs };
110
118
  }
111
119
  function BandStrip(props) {
112
120
  const {
@@ -147,7 +155,7 @@ function BandStrip(props) {
147
155
  );
148
156
  const marks = useCallback(
149
157
  (plot) => {
150
- const { base, markers, hits } = layoutBands({
158
+ const { base, markers, hits, glyphs } = layoutBands({
151
159
  data,
152
160
  getBand,
153
161
  fold,
@@ -180,6 +188,21 @@ function BandStrip(props) {
180
188
  })
181
189
  )
182
190
  ),
191
+ ...glyphs.length > 0 ? [
192
+ decorative(
193
+ text(glyphs, {
194
+ id: "band-glyphs",
195
+ x: "f",
196
+ y: () => 0.5,
197
+ xScale: "zx",
198
+ text: "glyph",
199
+ fill: VX.surface.panel,
200
+ fontSize: VX.text.xs,
201
+ fontWeight: 600,
202
+ anchor: "middle"
203
+ })
204
+ )
205
+ ] : [],
183
206
  ...rows.length > 0 ? [
184
207
  barY(rows, {
185
208
  id: "hit",
@@ -228,6 +251,7 @@ function BandStrip(props) {
228
251
  series,
229
252
  marks,
230
253
  band: true,
254
+ tooltipBelow: true,
231
255
  y: STRIP_AXIS,
232
256
  xZones: ZX_ANCHOR,
233
257
  cursorResolution,
@@ -1 +1 @@
1
- {"version":3,"file":"Bars.d.ts","sourceRoot":"","sources":["../../src/charts/Bars.tsx"],"names":[],"mappings":"AAUA,OAAO,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GAAG,SAAS,GAAG,YAAY,GAAG,SAAS,CAAA;IACzD,6JAA6J;IAC7J,UAAU,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,GAAG,EAAE,MAAM,KAAK,MAAM,CAAC,GAAG,SAAS,CAAA;CACzD,CAAA;AAoBD,wBAAgB,IAAI,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,GAAG,MAAM,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,YAAY,CA2EvF"}
@@ -40,6 +40,7 @@ function Bars(props) {
40
40
  const byKey = new Map(bars.map((b) => [b.key, b]));
41
41
  const rows = visibleBars.flatMap((s) => plot.rows(s.key));
42
42
  const h = plot.highlighted;
43
+ const solid = ({ datum }) => byKey.get(datum.series)?.color ?? "transparent";
43
44
  const fill = (row) => {
44
45
  const bar = byKey.get(row.series);
45
46
  if (!bar) return "transparent";
@@ -56,6 +57,9 @@ function Bars(props) {
56
57
  y: "y",
57
58
  z: "series",
58
59
  fill,
60
+ // The hovered x is its own highlight: the bar reads at full strength (no dimming, no
61
+ // point marker, no crosshair rule: that is line-chart chrome).
62
+ states: [{ when: { focus: "x" }, style: { fill: solid } }],
59
63
  layout: layout === "grouped" ? group({ padding: 0.1 }) : stack({ order, ...layout === "normalized" && { offset: "normalize" } })
60
64
  })
61
65
  );
@@ -74,6 +78,7 @@ function Bars(props) {
74
78
  series,
75
79
  marks,
76
80
  band: true,
81
+ crosshair: false,
77
82
  reverseRows: layout !== "grouped",
78
83
  ...layout !== "grouped" && { stack: layout }
79
84
  }
@@ -10,6 +10,12 @@ export type RungOptions = {
10
10
  reverseRows?: boolean;
11
11
  /** How the bar series combine for the auto domain. */
12
12
  stack?: 'stacked' | 'normalized';
13
+ /** The tooltip opens below the chart (a strip of cells), above only when there is no room. */
14
+ tooltipBelow?: boolean;
15
+ /** No vertical rule under the cursor (a bar kind's hover is the bar itself). */
16
+ crosshair?: boolean;
17
+ /** The legend goes from the wide class up, where `Lines`' end labels name the series. */
18
+ hideLegendAtWide?: boolean;
13
19
  };
14
20
  /** What a chart's definition is compiled from, besides its own props: the chrome's live state. */
15
21
  export type ShellContext = {
@@ -33,6 +39,8 @@ export type ChartShellProps<T> = Pick<CartesianChartProps<T, ChartX>, 'ariaLabel
33
39
  compile: (ctx: ShellContext) => CartesianDefinition;
34
40
  /** Recompile when the measured width changes (default: it is not an input). */
35
41
  byWidth?: boolean;
42
+ /** `auto` legend only: hidden from the wide class up (CSS). */
43
+ hideLegendAtWide?: boolean;
36
44
  };
37
45
  /**
38
46
  * The chrome around every chart: size, the `hidden`/`highlighted` legend state, the derived legend
@@ -1 +1 @@
1
- {"version":3,"file":"CartesianChart.d.ts","sourceRoot":"","sources":["../../src/charts/CartesianChart.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAiB,YAAY,EAAa,MAAM,OAAO,CAAA;AAGnE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAA;AAEpD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAK/C,OAAO,KAAK,EAAE,mBAAmB,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,SAAS,CAAA;AAEvE,6DAA6D;AAC7D,MAAM,MAAM,WAAW,GAAG;IACxB,6BAA6B;IAC7B,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,yDAAyD;IACzD,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,sDAAsD;IACtD,KAAK,CAAC,EAAE,SAAS,GAAG,YAAY,CAAA;CACjC,CAAA;AAgCD,kGAAkG;AAClG,MAAM,MAAM,YAAY,GAAG;IACzB,gDAAgD;IAChD,OAAO,EAAE,MAAM,CAAA;IACf,8CAA8C;IAC9C,MAAM,EAAE,WAAW,CAAC,MAAM,CAAC,CAAA;IAC3B,0CAA0C;IAC1C,WAAW,EAAE,MAAM,GAAG,IAAI,CAAA;IAC1B,gCAAgC;IAChC,MAAM,EAAE,OAAO,CAAA;I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