basalt-ui 2.23.0 → 2.24.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.
- package/CHANGELOG.md +41 -0
- package/MIGRATING.md +225 -12
- package/agent/agents/basalt-design-reviewer.md +2 -2
- package/agent/skills/basalt-design/SKILL.md +1 -1
- package/agent/skills/basalt-design/references/catalogue.md +22 -19
- package/agent/skills/basalt-design/references/states.md +39 -0
- package/dist/charts/Bars.d.ts.map +1 -1
- package/dist/charts/Bars.js +17 -2
- package/dist/charts/CartesianChart.d.ts.map +1 -1
- package/dist/charts/CartesianChart.js +7 -3
- package/dist/charts/Sparkline.d.ts.map +1 -1
- package/dist/charts/Sparkline.js +32 -6
- package/dist/charts/StackedArea.d.ts.map +1 -1
- package/dist/charts/StackedArea.js +5 -1
- package/dist/charts/chart-legend.module.css +16 -0
- package/dist/charts/compile.d.ts +2 -0
- package/dist/charts/compile.d.ts.map +1 -1
- package/dist/charts/compile.js +47 -3
- package/dist/charts/legend.d.ts +0 -6
- package/dist/charts/legend.d.ts.map +1 -1
- package/dist/charts/legend.js +87 -35
- package/dist/charts/sparkline.module.css +59 -6
- package/dist/charts/sparkline.module.css.d.ts +1 -0
- package/dist/charts/state.js +1 -1
- package/dist/charts/types.d.ts +11 -0
- package/dist/charts/types.d.ts.map +1 -1
- package/dist/cli/shot/measure.js +19 -23
- package/dist/dashboard/bar-list.module.css +3 -15
- package/dist/dashboard/empty-state.d.ts.map +1 -1
- package/dist/dashboard/meter-model.d.ts +30 -1
- package/dist/dashboard/meter-model.d.ts.map +1 -1
- package/dist/dashboard/meter-model.js +74 -5
- package/dist/dashboard/meter-parts.d.ts +8 -1
- package/dist/dashboard/meter-parts.d.ts.map +1 -1
- package/dist/dashboard/meter-parts.js +64 -21
- package/dist/dashboard/meter.d.ts +8 -1
- package/dist/dashboard/meter.d.ts.map +1 -1
- package/dist/dashboard/meter.js +14 -3
- package/dist/dashboard/meter.module.css +42 -2
- package/dist/dashboard/meter.module.css.d.ts +4 -0
- package/dist/dashboard/query-state.d.ts +7 -3
- package/dist/dashboard/query-state.d.ts.map +1 -1
- package/dist/dashboard/query-state.js +14 -6
- package/dist/dashboard/section.d.ts +2 -1
- package/dist/dashboard/section.d.ts.map +1 -1
- package/dist/dashboard/section.module.css +12 -0
- package/dist/dashboard/settings-section.d.ts +1 -1
- package/dist/dashboard/settings-section.d.ts.map +1 -1
- package/dist/dashboard/settings-section.js +3 -3
- package/dist/dashboard/stat-card.module.css +24 -10
- package/dist/dashboard/stat-group.module.css +8 -0
- package/dist/dashboard/stat-strip.d.ts +3 -2
- package/dist/dashboard/stat-strip.d.ts.map +1 -1
- package/dist/dashboard/stat-strip.js +83 -73
- package/dist/dashboard/stat-strip.module.css +22 -38
- package/dist/dashboard/stat-strip.module.css.d.ts +1 -0
- package/dist/dashboard/widget-header.d.ts.map +1 -1
- package/dist/dashboard/widget-header.js +19 -1
- package/dist/dashboard/widget-header.module.css +6 -0
- package/dist/guard/index.d.ts +2 -2
- package/dist/guard/index.d.ts.map +1 -1
- package/dist/guard/index.js +1 -12
- package/dist/table/data-table.js +1 -1
- package/dist/theme/controls.module.css +7 -2
- package/dist/theme/index.d.ts.map +1 -1
- package/dist/theme/index.js +7 -5
- package/dist/tokens/palette.d.ts +2 -2
- package/dist/tokens/palette.d.ts.map +1 -1
- package/dist/tokens/palette.js +2 -2
- package/llms.txt +3 -2
- package/package.json +1 -1
- package/src/charts/Bars.tsx +29 -2
- package/src/charts/CartesianChart.tsx +7 -3
- package/src/charts/Sparkline.tsx +66 -21
- package/src/charts/StackedArea.tsx +12 -1
- package/src/charts/chart-legend.module.css +16 -0
- package/src/charts/compile.ts +84 -2
- package/src/charts/legend.tsx +70 -3
- package/src/charts/sparkline.module.css +59 -6
- package/src/charts/sparkline.module.css.d.ts +1 -0
- package/src/charts/state.tsx +1 -1
- package/src/charts/types.ts +9 -0
- package/src/cli/shot/measure.ts +27 -27
- package/src/dashboard/bar-list.module.css +3 -15
- package/src/dashboard/empty-state.tsx +4 -2
- package/src/dashboard/meter-model.ts +124 -7
- package/src/dashboard/meter-parts.tsx +127 -31
- package/src/dashboard/meter.module.css +42 -2
- package/src/dashboard/meter.module.css.d.ts +4 -0
- package/src/dashboard/meter.tsx +22 -3
- package/src/dashboard/query-state.tsx +19 -8
- package/src/dashboard/section.module.css +12 -0
- package/src/dashboard/section.tsx +2 -1
- package/src/dashboard/settings-section.tsx +4 -4
- package/src/dashboard/stat-card.module.css +24 -10
- package/src/dashboard/stat-group.module.css +8 -0
- package/src/dashboard/stat-strip.module.css +22 -38
- package/src/dashboard/stat-strip.module.css.d.ts +1 -0
- package/src/dashboard/stat-strip.tsx +63 -43
- package/src/dashboard/widget-header.module.css +6 -0
- package/src/dashboard/widget-header.tsx +28 -1
- package/src/guard/index.ts +3 -14
- package/src/table/data-table.tsx +1 -1
- package/src/theme/__snapshots__/plain-theme.test.ts.snap +6 -6
- package/src/theme/controls.module.css +7 -2
- package/src/theme/index.ts +7 -5
- package/src/tokens/palette.ts +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,44 @@
|
|
|
1
|
+
# [2.24.0](https://github.com/jkrumm/basalt-ui/compare/v2.23.0...v2.24.0) (2026-10-18)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* a bleed sparkline reserves its readout line ([0fa1154](https://github.com/jkrumm/basalt-ui/commit/0fa11545974ed75e02bd864ec7e582e24c179153))
|
|
7
|
+
* a compact legend folds to one row, an explicit false stays ([3f7614a](https://github.com/jkrumm/basalt-ui/commit/3f7614a8fee7cf5a41e72dcc172fe55981da6325))
|
|
8
|
+
* a Section summary line joins the chart text step ([e73ea84](https://github.com/jkrumm/basalt-ui/commit/e73ea84504b80eb340942244a855fd534cb688e7))
|
|
9
|
+
* announce a null Meter, name the dropped strip hook ([98a6a8c](https://github.com/jkrumm/basalt-ui/commit/98a6a8c6f0820e4e90566d2351ab9254cb629935))
|
|
10
|
+
* cap the hosted readout chip to its box ([36edd7d](https://github.com/jkrumm/basalt-ui/commit/36edd7d7bcdbb41a137f8bf81d6f7260bcdd85d2))
|
|
11
|
+
* empty strip cells and Meters state the gap once ([1054fb2](https://github.com/jkrumm/basalt-ui/commit/1054fb22cf0d8a355f31091ec4078345beecca14))
|
|
12
|
+
* footer Meter captions never wrap, card qualifiers agree ([a35374d](https://github.com/jkrumm/basalt-ui/commit/a35374dcfdf4a5996a6df06261496f1b2ba56128))
|
|
13
|
+
* hoist nested-radius test helpers ([57463d3](https://github.com/jkrumm/basalt-ui/commit/57463d38333aa26512defb95d42cbede9a0ea029))
|
|
14
|
+
* hover the Filled sizes, drop the error glyph ([2c7f098](https://github.com/jkrumm/basalt-ui/commit/2c7f0987026a68fc601cf12547df31a4b883f863))
|
|
15
|
+
* keep the info bubble on screen and off its glyph ([3d2eab4](https://github.com/jkrumm/basalt-ui/commit/3d2eab4ab86018b032787b90e82acc57596c8ccc))
|
|
16
|
+
* keep the state guidance to public props ([a680a42](https://github.com/jkrumm/basalt-ui/commit/a680a4299462818e063af68a70c6672504100e01))
|
|
17
|
+
* name the +N chip, put the zones first in the legend DOM ([b8cd318](https://github.com/jkrumm/basalt-ui/commit/b8cd31891f0edc8f5dbf628ddcc962f50849072c))
|
|
18
|
+
* name the public state props and label the skeleton ([412d9c0](https://github.com/jkrumm/basalt-ui/commit/412d9c08a0fe0c3dbfcad3d4f6fd7e364c490af8))
|
|
19
|
+
* nested indicator radii on the radius scale ([0d7225f](https://github.com/jkrumm/basalt-ui/commit/0d7225f4df9bd4d55e7aae81138a0a03196aeb12))
|
|
20
|
+
* shot counts a pseudo fill only when it covers its host ([1620645](https://github.com/jkrumm/basalt-ui/commit/1620645fd9d2255aea8c2812e3b0da8a8511bcf2))
|
|
21
|
+
* shot measures skeleton bars as content ([42ca986](https://github.com/jkrumm/basalt-ui/commit/42ca986bc071d8a4059de63d41e7adc54fbb524f))
|
|
22
|
+
* sparkline readout lift is opt-in by host ([1672af5](https://github.com/jkrumm/basalt-ui/commit/1672af5e7bba568ffcac38c2c0c87d91992eabc4))
|
|
23
|
+
* state the Section summary size, pin the exact size set ([0a367b5](https://github.com/jkrumm/basalt-ui/commit/0a367b51b6acaa0d8bbba71018ca9598cf47729f))
|
|
24
|
+
* trim the nested-radius expression under the gzip budgets ([be36e52](https://github.com/jkrumm/basalt-ui/commit/be36e52c362ccda465a96e6b92dae83f7b5fd4af))
|
|
25
|
+
* update the legend order expectations, state the order change ([930b0fe](https://github.com/jkrumm/basalt-ui/commit/930b0fe5a5aea8545718fb00981c4971ae77987d))
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
### Features
|
|
29
|
+
|
|
30
|
+
* a legend survives 390 and a readout keeps its date ([06ae4d8](https://github.com/jkrumm/basalt-ui/commit/06ae4d8c9ef6bfe72a07d73a6f47c25b268f38a4))
|
|
31
|
+
* a qualifier wraps beside or under its caption, never truncates ([d7ee522](https://github.com/jkrumm/basalt-ui/commit/d7ee522d7bac00b51a07f4bb7aef0d6409624971))
|
|
32
|
+
* apply review on the state copy guidance ([bc466e0](https://github.com/jkrumm/basalt-ui/commit/bc466e0e9a61c450e6d58ba0a418ae3c7774a5e7))
|
|
33
|
+
* chart readouts off the line, units kept at 390 ([28066b0](https://github.com/jkrumm/basalt-ui/commit/28066b0884b0b019afad053d1250b4028e59db9e))
|
|
34
|
+
* one title size per section, bubbles stay in their card ([fe457d2](https://github.com/jkrumm/basalt-ui/commit/fe457d2d9d418a54542ca774af4b90d3e6e5cd7f))
|
|
35
|
+
* promote raw-spacing and inline-spacing to error ([7e21ed1](https://github.com/jkrumm/basalt-ui/commit/7e21ed1f76a5c50dc127ba78606cba94c8e32c02))
|
|
36
|
+
* state copy that says why and what to do next ([a292ac7](https://github.com/jkrumm/basalt-ui/commit/a292ac77fbecbc5b27a5140d44abce558bb57e40))
|
|
37
|
+
* state each S2–S4 playground figure once ([d9e1604](https://github.com/jkrumm/basalt-ui/commit/d9e1604ec1a12d8a6d3038555b13a5b56b969c2f))
|
|
38
|
+
* strip footers that follow their cell, a steady delta column ([3d26c7a](https://github.com/jkrumm/basalt-ui/commit/3d26c7a00e12f39e3e41ef73d774320a7225b8b1))
|
|
39
|
+
* the Meter reading at its fill end, captions that never wrap ([0255c45](https://github.com/jkrumm/basalt-ui/commit/0255c459a790b716cd8f46f726827f2ef67cfa0d))
|
|
40
|
+
* zoned end figures above the track, undroppable captions stay put ([99bd204](https://github.com/jkrumm/basalt-ui/commit/99bd20401c1920a487bcc093c847220622d7d606))
|
|
41
|
+
|
|
1
42
|
# [2.23.0](https://github.com/jkrumm/basalt-ui/compare/v2.22.0...v2.23.0) (2026-10-18)
|
|
2
43
|
|
|
3
44
|
|
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 | 2.22.0 | 2.23.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) | — | `series-palette` → `error` (§ Guards) | — |
|
|
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 | 2.23.0 | 2.24.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) | — | error fallback `The request failed.` (§ State defaults) | — |
|
|
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`) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | `BasaltDataTable` error title `Could not load rows` (§ State defaults) | — |
|
|
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) | — | — | `LoadingState` section skeleton, page spinner neutral (§ State defaults) | — |
|
|
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) | — | `series-palette` → `error` (§ Guards) | `raw-spacing`, `inline-spacing` → `error` (§ Guards) | — |
|
|
81
81
|
|
|
82
82
|
---
|
|
83
83
|
|
|
@@ -1046,6 +1046,219 @@ 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.24.0 — Wave 38, argo's friction III
|
|
1050
|
+
|
|
1051
|
+
### Section and Button chrome (Wave 38)
|
|
1052
|
+
|
|
1053
|
+
A Section shell holds three type sizes (title 15, note and count 12, body 13). Moved defaults:
|
|
1054
|
+
|
|
1055
|
+
| Surface | Before | Now |
|
|
1056
|
+
| -------------------------------------------------- | ------------ | --------- |
|
|
1057
|
+
| `Section` / `WidgetHeader tier="section"` subtitle | `sm` (13) | `xs` (12) |
|
|
1058
|
+
| `SettingsRow` label | `md` (15) | `sm` (13) |
|
|
1059
|
+
| `SettingsRow` description | `sm` (13) | `xs` (12) |
|
|
1060
|
+
| `DangerZone` eyebrow | `micro` (11) | `xs` (12) |
|
|
1061
|
+
|
|
1062
|
+
Opt out: restyle the slot with `classNames.header` (Section / SettingsSection / DangerZone) or
|
|
1063
|
+
`classNames.label` (`SettingsRow`).
|
|
1064
|
+
|
|
1065
|
+
An info bubble inside a `basalt-card` no longer flips above the glyph into the card above (it
|
|
1066
|
+
covered that card's hero at 390): it opens below, slides up to fit, or flips only into room the card
|
|
1067
|
+
owns, and never covers its own glyph. Outside a card the viewport flip is unchanged.
|
|
1068
|
+
|
|
1069
|
+
### Chart readouts and chrome (Wave 38)
|
|
1070
|
+
|
|
1071
|
+
No export is removed or added. Six chart defaults move.
|
|
1072
|
+
|
|
1073
|
+
- **`Sparkline` readout sits above the plot in a host that reserves a line.** In a `StatCard` sparkline
|
|
1074
|
+
slot or a strip cell's `visual` (the `VisualSlotContext` hosts; the sparkline carries
|
|
1075
|
+
`data-basalt-hosted`) the hover/focus chip no longer overlays the plotted line: it takes the reserved
|
|
1076
|
+
line above the plot (`--basalt-spark-readout-h`). A bare `Sparkline` is unchanged in kind: its chip
|
|
1077
|
+
stays inside its own box, on the half away from the point. A hosted chip slides with the point,
|
|
1078
|
+
so it stays inside the box at either edge and no longer truncates. A composite visual (a `Meter` above a
|
|
1079
|
+
`Sparkline` in one `StatCard` or strip slot) sets `--basalt-spark-readout-lift: 0` on its wrapper, or the
|
|
1080
|
+
chip lifts over the `Meter`. Opt out in a host: set
|
|
1081
|
+
`--basalt-spark-readout-lift: 0` on it to put the chip back in the box.
|
|
1082
|
+
- **Hourly readouts name the hour.** `{ at, value }` points inside one UTC day read `0 runs · 14:00` (the
|
|
1083
|
+
clock alone); a window that crosses midnight (24 points from 12:00, or 12:00 to 12:00) reads
|
|
1084
|
+
`16 Oct 14:00`, so no clock repeats bare. Opt out: pass `labels`.
|
|
1085
|
+
- **A bar tooltip stays under the card's headline.** `Bars` (any chart with a bar series) lowers the
|
|
1086
|
+
tooltip anchor, and steps it beside a tall bar, so its tooltip no longer opens over the header; the anchor
|
|
1087
|
+
is clamped into the plot. A short bar is unchanged. Opt-out: none (the tooltip's own `placement` is the
|
|
1088
|
+
engine's and not exposed; the old position covered the card's headline, so there is nothing to keep).
|
|
1089
|
+
- **A compact y axis keeps a fixed domain's end.** At the compact width, `y.domain: [0, 25]` ticks
|
|
1090
|
+
`0 · 10 · 20 · 25` (the end joins when it leaves at least 40% of a step above the last tick; the uneven
|
|
1091
|
+
last step is intended), so a unit the formatter puts on the top tick survives at 390 px. Opt out: `y.ticks` (a count or exact values).
|
|
1092
|
+
- **`Bars` series of one colour step down in shade.** Two or more bars sharing a `color`, none setting
|
|
1093
|
+
`fillOpacity` and no `barOpacity`, draw at full strength down to 0.4. Any stacked or normalized `Bars`
|
|
1094
|
+
where two bars share a colour also draws a surface hairline between segments. Opt out: set `fillOpacity`
|
|
1095
|
+
on a bar, or pass `barOpacity` (the shades), and give the bars distinct colours (the hairline).
|
|
1096
|
+
- **`StackedArea` skips a band whose every value is `0`.** No band, legend entry or tooltip row; a `null`
|
|
1097
|
+
stays a gap and the band stays. Opt out: none (a zero band drew nothing but a legend entry; to keep
|
|
1098
|
+
the entry, give the band one non-zero value or pass `null` for the zeros).
|
|
1099
|
+
|
|
1100
|
+
### State defaults (Wave 38)
|
|
1101
|
+
|
|
1102
|
+
| Surface | Before | After | Opt-out |
|
|
1103
|
+
| ------------------------------------- | --------------------------- | ------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------- |
|
|
1104
|
+
| `LoadingState tier="section"` | an accent `Loader` spinner | three neutral `Skeleton` bars in an `<output>` named by `label`; the block grows from ~18 px to ~58 px | pass `loading` to `QueryState` with a skeleton in the loaded shape; a directly placed `LoadingState` is replaced by your own node |
|
|
1105
|
+
| `LoadingState` (page tier) | a `Loader` in the accent | the same spinner in `VX.muted` | no opt-out; the spinner is neutral by design |
|
|
1106
|
+
| `BasaltDataTable` `query` error title | `Could not load` | `Could not load rows` | no opt-out; the title is not a prop |
|
|
1107
|
+
| `ChartCard` / chart error, no message | `The chart failed to load.` | `The request failed.` (the same fallback `ErrorState` shows) | an `Error` with a message, or `state.error` as a string |
|
|
1108
|
+
|
|
1109
|
+
### Strip and card (Wave 38)
|
|
1110
|
+
|
|
1111
|
+
No export is removed or renamed; four defaults move.
|
|
1112
|
+
|
|
1113
|
+
- **A strip footer entry `under` a cell is part of that cell.** It now renders inside the cell's slot, under its
|
|
1114
|
+
content, at every width, instead of in a footer-row grid column from 800px (and full width below). The cell
|
|
1115
|
+
grows by the footer, siblings keep their own height, and the footer follows its cell when the strip folds.
|
|
1116
|
+
`data-placed` and `--basalt-strip-footer-col` are gone; `data-strip-footer-cell` / `data-shot="strip-footer-<key>"`
|
|
1117
|
+
stay. An entry with no `under`, or one naming no cell, still takes the full row. No opt-out: put the meter in the
|
|
1118
|
+
cell's `visual`/`footer` if you want it flush, or drop `under` to keep the old full-width row.
|
|
1119
|
+
- **`StatGroup` (grid) folds an odd count to a full-width last cell** below 480px, as the strip already did. Three
|
|
1120
|
+
cards were two plus a half-empty row. Opt-out for an odd count that should stay two-up: pad the group with a
|
|
1121
|
+
cell (an empty `div` spans nothing, so the last row keeps its half), or use `variant="strip"`, which has always
|
|
1122
|
+
spanned. An even count is unchanged.
|
|
1123
|
+
- **A qualifier never truncates** (`StatCard` and strip cell). It stays on the caption row while it fits beside the
|
|
1124
|
+
caption and wraps whole to its own line under it otherwise, and wraps again there instead of ending in an
|
|
1125
|
+
ellipsis (the strip's qualifier also loses its `title`). A short qualifier in a narrow cell (`all time`) is no
|
|
1126
|
+
longer stranded alone on its own line. The cost: a qualifier that needs a second line pushes its own value down
|
|
1127
|
+
by that line, so a row-mate's value no longer shares its baseline. This holds at EVERY width (a ~300px cell
|
|
1128
|
+
wraps a long qualifier too), not only in narrow cells; only the wrapped cell's own value moves. Opt-out: shorten
|
|
1129
|
+
the qualifier, or state the band in `info`.
|
|
1130
|
+
- **The `under` footer** is a sibling after the cell's `article`, outside its `aria-labelledby` region.
|
|
1131
|
+
- **`BarList` delta column: glyph and figure are one unit**, end-aligned together. The fixed glyph slot and the
|
|
1132
|
+
four-character figure slot are gone, so `▲ 9%` and `▲ 13%` share a right edge but no longer share a glyph x.
|
|
1133
|
+
|
|
1134
|
+
### Nested radii (Wave 38)
|
|
1135
|
+
|
|
1136
|
+
The `ViewTabs` / `SegmentedControl` indicator and an inline `Code` inside an `Alert` sat 3 px under
|
|
1137
|
+
their container (`craft-1/nested-radius-step`), which put them at 3 px: off the radius scale. Both
|
|
1138
|
+
now snap DOWN onto the scale, so every radius is a § 5 step. Under the default 6 px container the
|
|
1139
|
+
only step that keeps the 3 px step is 2 (`RADIUS_STEP.scaleXs`); under a container below 5 px it
|
|
1140
|
+
is 0. Where the two rules cannot both hold, "every radius is a scale step" wins over the 3 px step.
|
|
1141
|
+
|
|
1142
|
+
| | Before (2.23) | Now |
|
|
1143
|
+
| --------------------------------------------- | ------------- | --------- |
|
|
1144
|
+
| `ViewTabs` indicator, default `radius` | 3 | 2 |
|
|
1145
|
+
| inline `Code` in an `Alert`, default `radius` | 3 | 2 |
|
|
1146
|
+
| either, `radius` knob −5 / 0 / +5 | 0 / 3 / 8 | 0 / 2 / 2 |
|
|
1147
|
+
|
|
1148
|
+
Opt-out: restore the 3 px nested radius. The theme's `SegmentedControl` `styles` is a function, and
|
|
1149
|
+
an object `styles` replaces it (dropping the track background, padding and label rules), so re-spread
|
|
1150
|
+
its output:
|
|
1151
|
+
|
|
1152
|
+
```ts
|
|
1153
|
+
type StylesFn = (theme: unknown, props: object, ctx: unknown) => Record<string, object>
|
|
1154
|
+
const base = createBasaltTheme().components?.SegmentedControl?.styles as StylesFn
|
|
1155
|
+
createBasaltTheme({
|
|
1156
|
+
components: {
|
|
1157
|
+
SegmentedControl: {
|
|
1158
|
+
styles: (theme, props, ctx) => {
|
|
1159
|
+
const b = base(theme, props, ctx)
|
|
1160
|
+
return {
|
|
1161
|
+
...b,
|
|
1162
|
+
indicator: {
|
|
1163
|
+
...(b.indicator as object),
|
|
1164
|
+
borderRadius: 'max(0px, var(--sc-radius) - 3px)',
|
|
1165
|
+
},
|
|
1166
|
+
}
|
|
1167
|
+
},
|
|
1168
|
+
},
|
|
1169
|
+
},
|
|
1170
|
+
})
|
|
1171
|
+
```
|
|
1172
|
+
|
|
1173
|
+
For `Code`, set `--basalt-code-radius` on the Alert root
|
|
1174
|
+
(`.mantine-Alert-root { --basalt-code-radius: 3px }`).
|
|
1175
|
+
|
|
1176
|
+
### Meter captions (Wave 38)
|
|
1177
|
+
|
|
1178
|
+
No export is removed. `Meter` gains one optional prop, `readingAt`; six caption defaults move.
|
|
1179
|
+
|
|
1180
|
+
| Before | Now | Opt-out |
|
|
1181
|
+
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- |
|
|
1182
|
+
| The reading caption (the default `format(value)` or your `startCaption`) sat at the track's start | It ends at the end of the fill, clamped inside the track (at the start when the fill is too short to hold it); a committed/forecast bar anchors at the end of the committed part | `readingAt="start"` (a pure opt-out; it does not opt out of caption dropping) |
|
|
1183
|
+
| The default target figure (`Target 28 sessions`) could wrap to two lines and clip at the card edge | It is one line and never wraps; your own `endCaption` is prose and still wraps | none: shorten it with `format` |
|
|
1184
|
+
| Captions that did not fit one line wrapped onto a second row | Tick captions go first, then the forecast caption, until the row fits; the reading and the target never drop. A dropped caption stays in the accessible description | `startCaption`/`endCaption` state what stays; a host that wants a caption always visible gives the Meter a wider row |
|
|
1185
|
+
| A zone name fell back to its `short` alone, so one zone read "Over" beside "Low", "Optimal", "High" | Once one name falls back to its `short`, every other name that has one follows; the holding zone keeps its full name | give the zones no `short`, or none will fall back |
|
|
1186
|
+
| On a zoned Meter, the figures at the track's two ends (ticks at `min` / `max`) shared the row below with the zone names and won every clash, so a name could vanish ("Good" beside "100") | They sit in a row above the track; the zone names own the row below and show whenever they fit their span. The zoned Meter is one caption row taller when it has end ticks | none: drop the end ticks to drop the row |
|
|
1187
|
+
| Categorical part captions that did not fit under their segments wrapped, which could leave one entry alone on a second row | One row when they fit, else a grid with the most columns that fit and no lone entry on the last row | none |
|
|
1188
|
+
|
|
1189
|
+
### Narrow legends and readouts (Wave 38)
|
|
1190
|
+
|
|
1191
|
+
No export is removed or renamed; one prop is added and two defaults move.
|
|
1192
|
+
|
|
1193
|
+
- **The compact legend is one row, and a zone-named chart has one.** Before: below 480px of chart width the key
|
|
1194
|
+
wrapped to as many rows as it had entries (five entries, two rows), so argo dropped it with
|
|
1195
|
+
`legend: false` and ACWR, recovery and stress read by hue alone at 390. Now: a chart with two or more legend
|
|
1196
|
+
entries shows ONE row there. The zone / reference entries (which hue alone cannot name) lead, the series
|
|
1197
|
+
follow (the title and tooltip name those), and what does not fit folds into a `+N` chip whose `title` and
|
|
1198
|
+
hidden text list the folded names. From 480px up the key wraps and shows every entry, but the zone / reference
|
|
1199
|
+
entries now come BEFORE the series at every width (the DOM order is the compact row order; before they
|
|
1200
|
+
followed the series). An explicit `legend: false`
|
|
1201
|
+
still drops the legend at every width; delete the `compact && { legend: false }` workaround to take the new
|
|
1202
|
+
default.
|
|
1203
|
+
- **`ZoneSpec.legend: { label, mark?, color? }`** names a band in the legend, so a zone chart needs no always-`null`
|
|
1204
|
+
legend-only series (argo's `ACWR_SERIES` zone keys). `mark` defaults to `'bar'`; `color` is the swatch when the
|
|
1205
|
+
fill is a whisper-alpha wash (`alpha(VX.goodSolid, 0.06)` would vanish in a 10px swatch), else the fill (a
|
|
1206
|
+
status tint maps to its solid). Named zones count as entries, so one series plus named zones now shows a legend
|
|
1207
|
+
by default. Opt-out: omit `legend` on the zone, or `legend: false` on the chart.
|
|
1208
|
+
- **A `Sparkline` readout never ends in an ellipsis.** Before: a chip wider than the box was clipped (`62 bpm · Sun
|
|
1209
|
+
5 O…`, the date lost). Now: a chip that overflows first drops the air round its `·` and its padding, and if it
|
|
1210
|
+
still overflows the date moves to its own line under the value and wraps, inside the top band of the plot (never
|
|
1211
|
+
up past the host's reserved readout line). Opt-out: pass a shorter `labels` entry (`5/10`) so the one-line form
|
|
1212
|
+
fits.
|
|
1213
|
+
- **A `StatCard` with a bleed sparkline reserves its readout line.** The sparkline slot and the foot's minimum height
|
|
1214
|
+
grow by the readout line less the card gap, so EVERY `StatCard` is about 10px taller (the foot's reserve is
|
|
1215
|
+
unconditional, so cards with and without a sparkline keep one height) and a hovered readout sits above the plot
|
|
1216
|
+
instead of on the delta / qualifier row. Opt-out: none; the reserve is the
|
|
1217
|
+
fix.
|
|
1218
|
+
|
|
1219
|
+
### `basalt-ui shot`: skeleton bars count as content (Wave 38)
|
|
1220
|
+
|
|
1221
|
+
`emptyRatio` now counts a `::before`/`::after` fill (Mantine `Skeleton` paints its bar there) as a painted box, so a card of loading skeletons no longer measures near 1 and no longer fails `craft-3`. A loading anchor's `metrics.json` `emptyRatio` drops; a genuinely blank card still reads 1. No opt-out needed.
|
|
1222
|
+
|
|
1223
|
+
### Section summary line (Wave 38)
|
|
1224
|
+
|
|
1225
|
+
**Before:** a bare `<Text size="xs">` passed as `Section summary` rendered at the size it asked for
|
|
1226
|
+
(12). argo's strength diagnostics shell then counted four sizes: title 15, chart-card title 13,
|
|
1227
|
+
summary 12, chart ticks and legend 11.
|
|
1228
|
+
|
|
1229
|
+
**Now:** that text renders at 11 (the chart text step) whatever its `size`, so the shell is 15, 13, 11. Only a direct `Text` child of the summary slot is capped; a bare `Text` nested inside a `Group` keeps the size it asks for.
|
|
1230
|
+
|
|
1231
|
+
**Opt out:** wrap the text in a `<span>` or a `Group`.
|
|
1232
|
+
|
|
1233
|
+
### Empty cells and Meters (Wave 38)
|
|
1234
|
+
|
|
1235
|
+
A gap is stated once. Moved defaults:
|
|
1236
|
+
|
|
1237
|
+
| Surface | Before | Now |
|
|
1238
|
+
| ---------------------------------------------------------- | ------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1239
|
+
| Strip cell `state: { kind: 'empty', reason }` | `—` in the value slot, the reason under it | the reason in the value's place, no glyph (`data-strip-reason` replaces the `data-strip-value` hook on that cell); `—` and `data-strip-value` only when no `reason` is given |
|
|
1240
|
+
| `Meter` with a null reading | muted track with a `—` caption line under it | muted track, one blank caption line (two when zoned), no glyph, a visually hidden `No reading`; `emptyText` still wins |
|
|
1241
|
+
| `Meter` `loading` (bar) | track plus a short skeleton bar, about half the loaded height | the loaded footprint: figure row (zoned), track, caption / zone-name row |
|
|
1242
|
+
| Footer `Meter` captions in a strip (placed at their marks) | an end caption could wrap to a second line and spill out of its footer box | every placed caption is one line (`nowrap`); a caption that does not fit drops, never wraps |
|
|
1243
|
+
| `StatCard` qualifier in a card narrower than 240px | beside the caption when it fit, under it otherwise, so siblings of one group differed | always on its own line under the caption (the reserved line is now always used) |
|
|
1244
|
+
|
|
1245
|
+
`size="row"` keeps no caption lines, empty or loading. Ring Meters are unchanged (the centre reading stays `—`).
|
|
1246
|
+
|
|
1247
|
+
Opt out: none for the caption and qualifier rows (they are layout fixes; shorten the text instead); pass `emptyText="—"` on a `Meter` to keep the dash caption; for a strip cell, drop `reason` (and say it in the caption or qualifier) to keep the bare `—`.
|
|
1248
|
+
|
|
1249
|
+
### Guards
|
|
1250
|
+
|
|
1251
|
+
`raw-spacing` and `inline-spacing` promote from `warn` to `error`: their grace entries (since
|
|
1252
|
+
2.16.0, re-dated to 2.24.0) came due at 2.24.0. `check-theme` now fails on a Mantine spacing prop
|
|
1253
|
+
equal to a scale step (`p={16}`, `gap={24}`) and on an inline spacing literal (`style={{ padding: 16 }}`,
|
|
1254
|
+
a CSS `padding: 8px`). The remedy is the scale: `xs` 8, `sm` 12, `md` 16, `lg` 20, `xl` 24 as a
|
|
1255
|
+
prop (`p="md"`) or `var(--mantine-spacing-md)` in CSS. Measured before flipping: argo
|
|
1256
|
+
`apps/dashboard` on 2.23.0 reports 0 findings of either kind; rb (2.13.1) and rollhook (2.11.1)
|
|
1257
|
+
predate 2.16 and meet both rules on their next bump.
|
|
1258
|
+
|
|
1259
|
+
Opt-out: `"basalt": { "severity": { "raw-spacing": "warn", "inline-spacing": "warn" } }` keeps both a
|
|
1260
|
+
warning; `"basalt": { "exemptRules": { "inline-spacing": ["<path>"] } }` silences one for a path.
|
|
1261
|
+
|
|
1049
1262
|
## 2.23.0 — Wave 37, argo's friction II
|
|
1050
1263
|
|
|
1051
1264
|
No export is removed. `MeterTick` gains an optional `caption`; five Meter defaults move.
|
|
@@ -37,7 +37,7 @@ Score per component, then add one line per page for the page items (Communicatio
|
|
|
37
37
|
|
|
38
38
|
1. **[measured]** Every inset, gap and radius is a step in `metrics.json` `scale`; nested surfaces step by at least 3 px of radius. No `scale` → `unverified`. Never invent steps.
|
|
39
39
|
2. **[measured]** No more than three font sizes inside one component: `fontSizes` with more than 3 distinct values fails.
|
|
40
|
-
3. No empty region of 40 % or more of the component's height — **[measured]**: `emptyRatio` ≥ 0.4 fails; no dense-list row wraps at 390 — judged from the 390 crop.
|
|
40
|
+
3. No empty region of 40 % or more of the component's height — **[measured]**: `emptyRatio` ≥ 0.4 fails; no dense-list row wraps at 390 — judged from the 390 crop. **D37, not scored:** an errored or empty chart body that keeps its loaded height with its anatomy top-aligned is the SSR-first contract, not a void defect (list it as `D37, not scored`); any other void still fails, and so does a loading skeleton much shorter than the loaded body. D37 covers chart bodies only; a list that keeps a void is scored.
|
|
41
41
|
4. One ring per surface, no bare hairline borders on cards, no accent on chrome: look at every crop for an accent hue on a tab underline, a selected row, a secondary button, a card ring or a solid-filled badge. The accent sites are the primary data series, active-nav icons and active child labels, links, primary buttons, focus rings and the leader bar in meters; chrome (borders, inactive states, backgrounds, general icons) stays neutral, and selection state (active nav row, selected tab) never takes the accent. A status is a dot plus a word, or the value's own ink; a coloured edge stripe or rail down a card, row or callout for status fails here (Craft 4), and a card's `tone` dot-and-word verdict passes.
|
|
42
42
|
5. **[measured]** Text and meaningful marks meet contrast in both schemes (a non-empty `contrast.failures` fails); nothing is told apart only by colour.
|
|
43
43
|
6. Nothing overflows, clips or truncates a value at 1440 or 390.
|
|
@@ -58,7 +58,7 @@ Score per component, then add one line per page for the page items (Communicatio
|
|
|
58
58
|
3. A number whose definition, period or source is not stated on the surface has a tooltip or a one-line explanation; a count of visible items has none.
|
|
59
59
|
4. Titles are precise nouns with their scope ("Ride distance, 7 days"), not categories ("Metrics").
|
|
60
60
|
5. **[page]** A page is not three rows of KPI cards, and not a single table when its data has one of the catalogue's shapes.
|
|
61
|
-
6. Empty and error states say why and what to do.
|
|
61
|
+
6. Empty and error states say why and what to do, per `.claude/skills/basalt-design/references/states.md`: an error is one "Could not load <thing>" title, the cause, one Retry, with the error dot and no empty-state glyph; a loading state is a skeleton in the loaded shape; one wording per repeated gap across cards.
|
|
62
62
|
|
|
63
63
|
### Banned filler
|
|
64
64
|
|
|
@@ -11,7 +11,7 @@ Method only; the law is `.claude/rules/basalt-*.md` and `./DESIGN.md`. Each step
|
|
|
11
11
|
1. **Concept — mandatory, gating.** Nothing is built before the concept exists: write `docs/design/<screen>.md` (the user's question, the decision, datasets and chosen encodings, layout at 1440 and 390, copy, pass criteria) before any component code. Template: `references/concept.md`. Also read `./DESIGN.md` and the rules `basalt-tokens.md`, `basalt-mantine.md`, `basalt-controls.md`, `basalt-charts.md`; no `DESIGN.md`: run `/basalt-app` first.
|
|
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
|
-
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`.
|
|
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). Empty, loading and error copy follows `references/states.md`. 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
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 P2 (`craft-7/no-declared-states`), raised only when an anchor renders a state surface. 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;
|
|
@@ -17,25 +17,28 @@ Run this first. A "yes, chart" answer sends you to § 2.
|
|
|
17
17
|
|
|
18
18
|
## 2. Data shape to expression
|
|
19
19
|
|
|
20
|
-
| Data shape | Encoding
|
|
21
|
-
| ------------------------------------------------------------ |
|
|
22
|
-
| Single value with a trend | Figure, text delta, `qualifier`, axis-less sparkline with end dot along the bottom
|
|
23
|
-
| Progress to a target | Filled track, target tick, end captions; extra cut-offs as `ticks`
|
|
24
|
-
| Committed vs forecast | Two segments, the forecast lighter, a tick and a caption at the boundary
|
|
25
|
-
| Headline ratio where the shape is the message | Ring, value centred, one per row
|
|
26
|
-
| Reading in named bands (low / ok / high) | Zoned bar with the reading as a marker; `ticks` mark cut-offs or a window mean
|
|
27
|
-
| Part of a whole, 2–6 parts | One segmented bar, parts in order, captions under the segments
|
|
28
|
-
| Part of a whole when the parts are the page's subject | Donut
|
|
29
|
-
| Ranked list, top N (5–10) | Label, bar on a shared scale, right-aligned value
|
|
30
|
-
| Value over time | Line; stacked area for parts of a total
|
|
31
|
-
|
|
|
32
|
-
|
|
|
33
|
-
| Distribution as a
|
|
34
|
-
|
|
|
35
|
-
|
|
|
36
|
-
|
|
|
37
|
-
|
|
|
38
|
-
|
|
|
20
|
+
| Data shape | Encoding | basalt export (import path) | Not this |
|
|
21
|
+
| ------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | ------------------------------------------- |
|
|
22
|
+
| Single value with a trend | Figure, text delta, `qualifier`, axis-less sparkline with end dot along the bottom | `StatCard` (`basalt-ui`) + `sparkline` slot with `Sparkline` (`basalt-ui/charts`) | A bare number in a box |
|
|
23
|
+
| Progress to a target | Filled track, target tick, end captions; extra cut-offs as `ticks` | `Meter` (`basalt-ui`) with `target`, `ticks` | A hand-rolled progress bar |
|
|
24
|
+
| Committed vs forecast | Two segments, the forecast lighter, a tick and a caption at the boundary | `Meter` `segments`, `forecastCaption` | Two cards |
|
|
25
|
+
| Headline ratio where the shape is the message | Ring, value centred, one per row | `Meter shape="ring"` | A donut plus a total card |
|
|
26
|
+
| Reading in named bands (low / ok / high) | Zoned bar with the reading as a marker; each zone names its `short` label for a narrow track; `ticks` mark cut-offs or a window mean | `Meter` `zones`, `ticks` | Colour-only thresholds |
|
|
27
|
+
| Part of a whole, 2–6 parts | One segmented bar, parts in order, captions under the segments | `Meter` `segments`; `Bars` stacked | A row of N `StatCard`s; a donut |
|
|
28
|
+
| Part of a whole when the parts are the page's subject | Donut | `Donut` (`basalt-ui/charts`) | Donut beside a total card |
|
|
29
|
+
| Ranked list, top N (5–10) | Label, bar on a shared scale, right-aligned value | `BarList` (`basalt-ui`), its default thin-track rows | A table with a `%` column |
|
|
30
|
+
| Value over time | Line; stacked area for parts of a total | `Lines` / `StackedArea` in a `ChartCard` | A bar per day |
|
|
31
|
+
| Spend over a period against a budget | Cumulative line against the budget line; the forecast end labelled with its figure and date, the budget crossing labelled. Strip form: `Meter` with the reading at the fill end and the target figure on the tick via `caption` | `Lines` + `refLines` in a `ChartCard`; `Meter` `target`, `ticks` | A daily bar per day; an unlabelled forecast |
|
|
32
|
+
| Compare categories | Bars | `Bars layout="grouped"` in a `ChartCard` | A pie |
|
|
33
|
+
| Distribution as a slot micro-visual (`StatCard`, strip cell) | Small axis-less histogram | `Bars`, no axes, in the slot | A mean alone |
|
|
34
|
+
| 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 |
|
|
35
|
+
| Status over time | Band strip; heat grid for daily data | `BandStrip` / `Heatmap` (`basalt-ui/charts`) | A table of dates |
|
|
36
|
+
| 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 |
|
|
37
|
+
| A set of KPIs about one record | One joined surface, cells split by hairlines | `StatGroup variant="strip"` | N unrelated cards |
|
|
38
|
+
| Many rows, several attributes | Table, right-aligned figures | `BasaltDataTable` (`basalt-ui/table`) | Cards per row |
|
|
39
|
+
| Nothing yet / failed | Why and what to do | `EmptyState`, or the component's own `query` state | "No data" |
|
|
40
|
+
|
|
41
|
+
Sections that sit side by side use one title size; a `Section` beside a `ChartCard` does not step a size down.
|
|
39
42
|
|
|
40
43
|
## Not shipped — report the gap, don't hand-roll
|
|
41
44
|
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# State copy — why, and what to do next
|
|
2
|
+
|
|
3
|
+
Every empty, loading and error state answers two things: why, and what the reader does next. The reviewer cites this file for Communication 6. Components own the shape (`EmptyState`, the `query` branch, `ChartCard` `state`); you own the words.
|
|
4
|
+
|
|
5
|
+
## Per state
|
|
6
|
+
|
|
7
|
+
| State | Say | Never |
|
|
8
|
+
| ------- | --------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- |
|
|
9
|
+
| Empty | The cause, then the next step. A filter caused it: name the filter and offer the reset | A bare "No data"; a false zero (a missing value renders as `—`, not `0`) |
|
|
10
|
+
| Loading | A skeleton in the section's or card's loaded shape, the same height (`QueryState.loading` takes it) | An accent spinner in a card; "Loading…" text; wording that reads as an error; a skeleton far shorter than the loaded body |
|
|
11
|
+
| Error | One title, "Could not load <thing>" (the dot is the glyph); the cause in one line; one Retry | An empty-state glyph (a magnifying glass) on a failure; a second button; a red panel; "Oops" |
|
|
12
|
+
|
|
13
|
+
One wording per repeated gap: the same missing source reads the same on every card that depends on it. Write it once and pass it to each (`emptyText`, `ChartCard` `state`), never rephrase per card.
|
|
14
|
+
|
|
15
|
+
The default error title is a bare "Could not load" and relies on the host's title naming the thing; outside a titled host the title must name it ("Could not load <thing>"): `QueryState.errorTitle` / `QueryState.errorFallback`, `ErrorState.title` / `ErrorState.fallback`, and `ChartCard` `stateNoun` on a chart. "The request failed." is the fallback only, never a cause: the real cause is the server message or the fallback prop. The table's empty default ("No data to display.") is a fallback too; pass `emptyState` with the cause and the next step.
|
|
16
|
+
|
|
17
|
+
## Do / don't, on three shapes
|
|
18
|
+
|
|
19
|
+
A decision queue (items with ages and states):
|
|
20
|
+
|
|
21
|
+
| Do | Don't |
|
|
22
|
+
| ----------------------------------------------------------------------------------------------------------------------- | ---------------------- |
|
|
23
|
+
| Empty (table `emptyState`, `EmptyState`): "No decisions are waiting. New ones appear when an agent asks for a verdict." | "No data" |
|
|
24
|
+
| Filtered: "No blocked decisions older than 2 d. Clear the age filter to see all 12." | "No results found" |
|
|
25
|
+
| Error: "Could not load decisions" / "The queue service did not answer.", Retry | "Something went wrong" |
|
|
26
|
+
|
|
27
|
+
A health score with zones (low / ok / high):
|
|
28
|
+
|
|
29
|
+
| Do | Don't |
|
|
30
|
+
| --------------------------------------------------------------------------- | ----------------------------- |
|
|
31
|
+
| No reading yet: the figure is `—`, the caption "No sleep logged since Tue." | `0`, or a marker on the track |
|
|
32
|
+
| Loading: a track-shaped skeleton at the Meter's height | A centred spinner |
|
|
33
|
+
|
|
34
|
+
A cost ledger against a budget:
|
|
35
|
+
|
|
36
|
+
| Do | Don't |
|
|
37
|
+
| ----------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------- |
|
|
38
|
+
| Empty month (`StatCard` `emptyText`, `ChartCard` `state={{ empty }}`): "No spend recorded in October. Costs appear after the first billed run." | A flat line at `$0` that reads as "free" |
|
|
39
|
+
| One missing source on three cards: "Billing export unavailable" on each, worded identically | Three phrasings of the same gap |
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Bars.d.ts","sourceRoot":"","sources":["../../src/charts/Bars.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"Bars.d.ts","sourceRoot":"","sources":["../../src/charts/Bars.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAA;AAKzC,OAAO,KAAK,EACV,mBAAmB,EAEnB,WAAW,EACX,MAAM,EAGP,MAAM,SAAS,CAAA;AAEhB,oDAAoD;AACpD,MAAM,MAAM,OAAO,CAAC,CAAC,IAAI,IAAI,CAC3B,WAAW,CAAC,CAAC,CAAC,EACd,KAAK,GAAG,OAAO,GAAG,OAAO,GAAG,UAAU,GAAG,aAAa,GAAG,SAAS,GAAG,QAAQ,GAAG,MAAM,GAAG,MAAM,CAChG,GAAG;IACF,oBAAoB;IACpB,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CACjC,CAAA;AAED,8DAA8D;AAC9D,MAAM,MAAM,QAAQ,CAAC,CAAC,IAAI,IAAI,CAC5B,WAAW,CAAC,CAAC,CAAC,EACZ,KAAK,GACL,OAAO,GACP,OAAO,GACP,UAAU,GACV,aAAa,GACb,SAAS,GACT,QAAQ,GACR,MAAM,GACN,MAAM,GACN,MAAM,GACN,MAAM,GACN,OAAO,GACP,aAAa,GACb,eAAe,CAClB,CAAA;AAED,MAAM,MAAM,SAAS,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,GAAG,MAAM,IAAI,IAAI,CACxD,mBAAmB,CAAC,CAAC,EAAE,CAAC,CAAC,EACzB,OAAO,GAAG,QAAQ,CACnB,GAAG;IACF,IAAI,EAAE,SAAS,OAAO,CAAC,CAAC,CAAC,EAAE,CAAA;IAC3B,KAAK,CAAC,EAAE,SAAS,QAAQ,CAAC,CAAC,CAAC,EAAE,GAAG,SAAS,CAAA;IAC1C,mFAAmF;IACnF,MAAM,CAAC,EAAE,SAAS,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;AAyCD,wBAAgB,IAAI,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,GAAG,MAAM,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,YAAY,CAiFvF"}
|
package/dist/charts/Bars.js
CHANGED
|
@@ -4,9 +4,20 @@ import { group } from "@tanstack/charts/group";
|
|
|
4
4
|
import { stack } from "@tanstack/charts/stack";
|
|
5
5
|
import { useCallback, useMemo } from "react";
|
|
6
6
|
import { CartesianRung } from "./CartesianChart.js";
|
|
7
|
+
import { VX } from "../tokens/index.js";
|
|
7
8
|
import { emphasis, lineMark } from "./marks.js";
|
|
8
9
|
import { rowX } from "./types.js";
|
|
9
10
|
const DEFAULT_BAR_OPACITY = 0.85;
|
|
11
|
+
const SHADE_FLOOR = 0.4;
|
|
12
|
+
function shadeSharedColors(bars, barOpacity) {
|
|
13
|
+
if (barOpacity !== void 0) return bars;
|
|
14
|
+
return bars.map((b) => {
|
|
15
|
+
const group2 = bars.filter((o) => o.color === b.color);
|
|
16
|
+
if (group2.length < 2 || group2.some((g) => g.fillOpacity !== void 0)) return b;
|
|
17
|
+
const step = (1 - SHADE_FLOOR) / (group2.length - 1);
|
|
18
|
+
return { ...b, fillOpacity: 1 - group2.indexOf(b) * step };
|
|
19
|
+
});
|
|
20
|
+
}
|
|
10
21
|
const paint = (color, opacity) => opacity >= 1 ? color : `color-mix(in srgb, ${color} ${Math.round(opacity * 100)}%, transparent)`;
|
|
11
22
|
let warnedLogStack = false;
|
|
12
23
|
function guardLogStack(layout, onLog) {
|
|
@@ -17,7 +28,9 @@ function guardLogStack(layout, onLog) {
|
|
|
17
28
|
warnedLogStack = true;
|
|
18
29
|
}
|
|
19
30
|
function Bars(props) {
|
|
20
|
-
const { bars, lines, layout = "stacked", barOpacity, ...rest } = props;
|
|
31
|
+
const { bars: given, lines, layout = "stacked", barOpacity, ...rest } = props;
|
|
32
|
+
const bars = useMemo(() => shadeSharedColors(given, barOpacity), [given, barOpacity]);
|
|
33
|
+
const sharedColor = bars.some((b, i) => bars.findIndex((o) => o.color === b.color) !== i);
|
|
21
34
|
guardLogStack(layout, bars.length > 0 && rest.y?.scale === "log");
|
|
22
35
|
const sample = rest.data[0];
|
|
23
36
|
const series = useMemo(
|
|
@@ -57,6 +70,8 @@ function Bars(props) {
|
|
|
57
70
|
y: "y",
|
|
58
71
|
z: "series",
|
|
59
72
|
fill,
|
|
73
|
+
// Series of one colour differ by shade alone: a surface hairline keeps stacked segments apart.
|
|
74
|
+
...sharedColor && layout !== "grouped" && { stroke: VX.surface.panel, strokeWidth: 1 },
|
|
60
75
|
// The hovered x is its own highlight: the bar reads at full strength (no dimming, no
|
|
61
76
|
// point marker, no crosshair rule: that is line-chart chrome; `focusRing={false}` on the rung).
|
|
62
77
|
states: [{ when: { focus: "x" }, style: { fill: solid } }],
|
|
@@ -69,7 +84,7 @@ function Bars(props) {
|
|
|
69
84
|
}
|
|
70
85
|
return out;
|
|
71
86
|
},
|
|
72
|
-
[bars, layout, barOpacity]
|
|
87
|
+
[bars, layout, barOpacity, sharedColor]
|
|
73
88
|
);
|
|
74
89
|
return /* @__PURE__ */ jsx(
|
|
75
90
|
CartesianRung,
|
|
@@ -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;IAChC,8FAA8F;IAC9F,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,gFAAgF;IAChF,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,0FAA0F;IAC1F,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,yFAAyF;IACzF,gBAAgB,CAAC,EAAE,OAAO,CAAA;CAC3B,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;IACf,gFAAgF;IAChF,KAAK,EAAE,MAAM,CAAA;IACb,gFAAgF;IAChF,IAAI,EAAE,SAAS,GAAG,IAAI,CAAA;CACvB,CAAA;AAED,MAAM,MAAM,eAAe,CAAC,CAAC,IAAI,IAAI,CACnC,mBAAmB,CAAC,CAAC,EAAE,MAAM,CAAC,EAC9B,WAAW,GAAG,QAAQ,GAAG,QAAQ,GAAG,OAAO,GAAG,WAAW,GAAG,OAAO,CACpE,GAAG;IACF,qCAAqC;IACrC,MAAM,EAAE,SAAS,WAAW,CAAC,CAAC,CAAC,EAAE,CAAA;IACjC,6FAA6F;IAC7F,OAAO,EAAE,CAAC,GAAG,EAAE,YAAY,KAAK,mBAAmB,CAAA;IACnD,+EAA+E;IAC/E,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,+DAA+D;IAC/D,gBAAgB,CAAC,EAAE,OAAO,CAAA;CAC3B,CAAA;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,CAAC,EAAE,KAAK,EAAE,eAAe,CAAC,CAAC,CAAC,GAAG,YAAY,CAkFrE;AAED,wBAAgB,aAAa,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,EAC/C,KAAK,EAAE,mBAAmB,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,WAAW,GAC7C,YAAY,
|
|
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;IAChC,8FAA8F;IAC9F,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,gFAAgF;IAChF,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,0FAA0F;IAC1F,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,yFAAyF;IACzF,gBAAgB,CAAC,EAAE,OAAO,CAAA;CAC3B,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;IACf,gFAAgF;IAChF,KAAK,EAAE,MAAM,CAAA;IACb,gFAAgF;IAChF,IAAI,EAAE,SAAS,GAAG,IAAI,CAAA;CACvB,CAAA;AAED,MAAM,MAAM,eAAe,CAAC,CAAC,IAAI,IAAI,CACnC,mBAAmB,CAAC,CAAC,EAAE,MAAM,CAAC,EAC9B,WAAW,GAAG,QAAQ,GAAG,QAAQ,GAAG,OAAO,GAAG,WAAW,GAAG,OAAO,CACpE,GAAG;IACF,qCAAqC;IACrC,MAAM,EAAE,SAAS,WAAW,CAAC,CAAC,CAAC,EAAE,CAAA;IACjC,6FAA6F;IAC7F,OAAO,EAAE,CAAC,GAAG,EAAE,YAAY,KAAK,mBAAmB,CAAA;IACnD,+EAA+E;IAC/E,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,+DAA+D;IAC/D,gBAAgB,CAAC,EAAE,OAAO,CAAA;CAC3B,CAAA;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,CAAC,EAAE,KAAK,EAAE,eAAe,CAAC,CAAC,CAAC,GAAG,YAAY,CAkFrE;AAED,wBAAgB,aAAa,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,EAC/C,KAAK,EAAE,mBAAmB,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,WAAW,GAC7C,YAAY,CA8Bd;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,cAAc,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,EAChD,KAAK,EAAE,mBAAmB,CAAC,CAAC,EAAE,CAAC,CAAC,GAC/B,YAAY,CAEd"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useCallback, useId, useMemo, useState } from "react";
|
|
3
3
|
import { useInChartCard } from "./card-context.js";
|
|
4
|
-
import { compileCartesian, refLegendSeries } from "./compile.js";
|
|
4
|
+
import { compileCartesian, refLegendSeries, zoneLegendSeries } from "./compile.js";
|
|
5
5
|
import { samePlots } from "./plot-context.js";
|
|
6
6
|
import { ChartEngine, idPrefixOf } from "./host.js";
|
|
7
7
|
import { ChartLegend, legendEntries } from "./legend.js";
|
|
@@ -107,8 +107,12 @@ function CartesianRung(props) {
|
|
|
107
107
|
[stable]
|
|
108
108
|
);
|
|
109
109
|
const legendSeries = useMemo(
|
|
110
|
-
() => [
|
|
111
|
-
|
|
110
|
+
() => [
|
|
111
|
+
...stable.series,
|
|
112
|
+
...refLegendSeries(stable.refLines),
|
|
113
|
+
...zoneLegendSeries(stable.zones)
|
|
114
|
+
],
|
|
115
|
+
[stable.series, stable.refLines, stable.zones]
|
|
112
116
|
);
|
|
113
117
|
return /* @__PURE__ */ jsx(
|
|
114
118
|
ChartShell,
|