basalt-ui 2.24.0 → 2.26.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 +55 -0
- package/MIGRATING.md +191 -19
- package/configs/oxlint-basalt.json +1 -1
- package/configs/oxlint-plugin.js +3 -9
- package/configs/oxlint-plugin.test.ts +6 -0
- package/dist/charts/Bars.d.ts.map +1 -1
- package/dist/charts/Bars.js +4 -1
- package/dist/charts/CartesianChart.d.ts +2 -0
- package/dist/charts/CartesianChart.d.ts.map +1 -1
- package/dist/charts/ChartCard.d.ts +11 -5
- package/dist/charts/ChartCard.d.ts.map +1 -1
- package/dist/charts/ChartCard.js +11 -3
- package/dist/charts/Sparkline.d.ts.map +1 -1
- package/dist/charts/Sparkline.js +65 -7
- package/dist/charts/chart-box.module.css +50 -7
- package/dist/charts/chart-box.module.css.d.ts +2 -0
- package/dist/charts/chart-card.module.css +34 -0
- package/dist/charts/chart-card.module.css.d.ts +2 -0
- package/dist/charts/chart-legend.module.css +5 -6
- package/dist/charts/compile.d.ts +2 -0
- package/dist/charts/compile.d.ts.map +1 -1
- package/dist/charts/compile.js +45 -1
- package/dist/charts/legend.d.ts.map +1 -1
- package/dist/charts/legend.js +42 -9
- package/dist/charts/sparkline.module.css +13 -9
- package/dist/charts/state.d.ts +3 -1
- package/dist/charts/state.d.ts.map +1 -1
- package/dist/charts/state.js +15 -2
- package/dist/cli/shot/detect.d.ts.map +1 -1
- package/dist/cli/shot/detect.js +25 -36
- package/dist/dashboard/bar-list.d.ts.map +1 -1
- package/dist/dashboard/bar-list.js +16 -2
- package/dist/dashboard/bar-list.module.css +7 -2
- package/dist/dashboard/bar-list.module.css.d.ts +1 -0
- package/dist/dashboard/meter-model.d.ts +2 -0
- package/dist/dashboard/meter-model.d.ts.map +1 -1
- package/dist/dashboard/meter-model.js +99 -7
- package/dist/dashboard/meter-parts.d.ts +4 -7
- package/dist/dashboard/meter-parts.d.ts.map +1 -1
- package/dist/dashboard/meter-parts.js +102 -78
- package/dist/dashboard/meter.d.ts +1 -1
- package/dist/dashboard/meter.d.ts.map +1 -1
- package/dist/dashboard/meter.js +10 -7
- package/dist/dashboard/meter.module.css +43 -12
- package/dist/dashboard/meter.module.css.d.ts +1 -2
- package/dist/dashboard/section.d.ts +1 -2
- package/dist/dashboard/section.d.ts.map +1 -1
- package/dist/dashboard/section.module.css +8 -7
- package/dist/dashboard/stat-card.module.css +19 -2
- package/dist/dashboard/stat-strip.d.ts +9 -1
- package/dist/dashboard/stat-strip.d.ts.map +1 -1
- package/dist/dashboard/stat-strip.js +32 -6
- package/dist/dashboard/stat-strip.module.css +40 -1
- package/dist/dashboard/stat-strip.module.css.d.ts +3 -0
- package/dist/dashboard/visual-slot.d.ts +4 -0
- package/dist/dashboard/visual-slot.d.ts.map +1 -1
- package/dist/dashboard/visual-slot.js +2 -0
- package/dist/dashboard/widget-header.module.css +9 -0
- package/llms.txt +3 -3
- package/package.json +1 -1
- package/src/charts/Bars.tsx +7 -2
- package/src/charts/CartesianChart.tsx +2 -0
- package/src/charts/ChartCard.tsx +30 -7
- package/src/charts/Sparkline.tsx +105 -10
- package/src/charts/chart-box.module.css +50 -7
- package/src/charts/chart-box.module.css.d.ts +2 -0
- package/src/charts/chart-card.module.css +34 -0
- package/src/charts/chart-card.module.css.d.ts +2 -0
- package/src/charts/chart-legend.module.css +5 -6
- package/src/charts/compile.ts +60 -1
- package/src/charts/legend.tsx +64 -16
- package/src/charts/sparkline.module.css +13 -9
- package/src/charts/state.tsx +33 -7
- package/src/cli/shot/detect.ts +26 -40
- package/src/dashboard/bar-list.module.css +7 -2
- package/src/dashboard/bar-list.module.css.d.ts +1 -0
- package/src/dashboard/bar-list.tsx +14 -2
- package/src/dashboard/meter-model.ts +147 -12
- package/src/dashboard/meter-parts.tsx +71 -50
- package/src/dashboard/meter.module.css +43 -12
- package/src/dashboard/meter.module.css.d.ts +1 -2
- package/src/dashboard/meter.tsx +22 -9
- package/src/dashboard/section.module.css +8 -7
- package/src/dashboard/section.tsx +1 -2
- package/src/dashboard/stat-card.module.css +19 -2
- package/src/dashboard/stat-strip.module.css +40 -1
- package/src/dashboard/stat-strip.module.css.d.ts +3 -0
- package/src/dashboard/stat-strip.tsx +49 -8
- package/src/dashboard/visual-slot.ts +5 -0
- package/src/dashboard/widget-header.module.css +9 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,58 @@
|
|
|
1
|
+
# [2.26.0](https://github.com/jkrumm/basalt-ui/compare/v2.25.0...v2.26.0) (2026-10-19)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* a rows-only strip cell loads its Meter, one-column groups keep their clamp ([02dcecf](https://github.com/jkrumm/basalt-ui/commit/02dcecf9c66a9a3ea7b62f23c8cd35af28027ad9))
|
|
7
|
+
* cap a Section summary Text only when it carries a size ([e5b4261](https://github.com/jkrumm/basalt-ui/commit/e5b42610ab05440c0d91019103382d2fe77fd430))
|
|
8
|
+
* cap legend entries, fold only for a freed line ([d212cc0](https://github.com/jkrumm/basalt-ui/commit/d212cc0d7441826f7dfba39ce58af73b14e9c31d))
|
|
9
|
+
* chart loading in the loaded shape, facts kept while pending ([529f6d1](https://github.com/jkrumm/basalt-ui/commit/529f6d1b1edd900b0e4af79e94158e7df8ab9f72))
|
|
10
|
+
* compact legends keep every series named ([6777c9f](https://github.com/jkrumm/basalt-ui/commit/6777c9fe671827834fdc5417d1b1bd799894af4c))
|
|
11
|
+
* count legend lines by centre, undo a fold that frees none ([93ed0f1](https://github.com/jkrumm/basalt-ui/commit/93ed0f17eec27136537adc2bb6c4ea9e73e90175))
|
|
12
|
+
* day footer states the cap share, facts stay in every state ([7d37d1e](https://github.com/jkrumm/basalt-ui/commit/7d37d1e649728450d448af0dccbcf4d00195b644))
|
|
13
|
+
* end list and Meter card states at their content ([1b7d279](https://github.com/jkrumm/basalt-ui/commit/1b7d2799e388f4c96d811e1c4e9fc10da2e56686))
|
|
14
|
+
* footer entries declare absent states, the Caution zone fits ([24e6197](https://github.com/jkrumm/basalt-ui/commit/24e6197aabae90161a05cfdf73030c874f7d441e))
|
|
15
|
+
* forecast caption falls back to the boundary before it drops ([33e7ec0](https://github.com/jkrumm/basalt-ui/commit/33e7ec0b4bdd9ff8d062668967b5c8c536b58c52))
|
|
16
|
+
* hold Section summary and ChartCard actions text at 11 ([35953f8](https://github.com/jkrumm/basalt-ui/commit/35953f87b01fcf4149e82acfd2c696d2708a4cfe))
|
|
17
|
+
* hosted readouts keep their separator and their line ([01ab899](https://github.com/jkrumm/basalt-ui/commit/01ab89942c832facf542ac6115abc3ab29d22b7a))
|
|
18
|
+
* layer the tooltip tint over the opaque surface ([981b506](https://github.com/jkrumm/basalt-ui/commit/981b50636ca048041b79df262cde25adceee350d))
|
|
19
|
+
* match the load card's conditional fill in its source test ([6cf6fed](https://github.com/jkrumm/basalt-ui/commit/6cf6fed5e6e9e03e76c1903e525a240d64a6e252))
|
|
20
|
+
* one probe outage wording, guard the table card against a width cap ([8d15b3d](https://github.com/jkrumm/basalt-ui/commit/8d15b3d0935f34fbba93e67e1aa52d9bba9a304b))
|
|
21
|
+
* one wording per gap and real causes in S2–S4 states ([eee772c](https://github.com/jkrumm/basalt-ui/commit/eee772c11344b087ddba4d9c6d46f70d52d2d313))
|
|
22
|
+
* pin the actions cap against a control and the Mantine contract ([f05ac74](https://github.com/jkrumm/basalt-ui/commit/f05ac7464fc704d0fdd0b83cab45ec91f2869f7a))
|
|
23
|
+
* size list skeletons to the loaded rows, end empty load card ([1a3e30d](https://github.com/jkrumm/basalt-ui/commit/1a3e30d433d4306c54fbd5759df978eceab68461))
|
|
24
|
+
* strip and Meter loading in the loaded shape ([45afdd8](https://github.com/jkrumm/basalt-ui/commit/45afdd879627e59ccbd4e743d8206cd003f3c40a))
|
|
25
|
+
* strip cells paint visual, footer and delta while loading ([0a88ef6](https://github.com/jkrumm/basalt-ui/commit/0a88ef61656d6a13f702faed977507d362b585a6))
|
|
26
|
+
* the borrow pass runs again in the one register ([9d7f079](https://github.com/jkrumm/basalt-ui/commit/9d7f079aa11821d4be71192381f98d58024be0ae))
|
|
27
|
+
* type the short-fallback layout cases ([ab5259e](https://github.com/jkrumm/basalt-ui/commit/ab5259ea56fe14132f5a8580d5a7c870dd6eee32))
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
### Features
|
|
31
|
+
|
|
32
|
+
* promote card-inset to error ([f95068d](https://github.com/jkrumm/basalt-ui/commit/f95068de197a0c35a813e028752cdfcc2d432bb7))
|
|
33
|
+
|
|
34
|
+
# [2.25.0](https://github.com/jkrumm/basalt-ui/compare/v2.24.0...v2.25.0) (2026-10-18)
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
### Bug Fixes
|
|
38
|
+
|
|
39
|
+
* a slotted bars chart keeps y2 and sits like a sparkline ([3685696](https://github.com/jkrumm/basalt-ui/commit/368569645f531416b22acc0b26cabb593af3262c))
|
|
40
|
+
* join the distribution facts with the house separator ([23da2d0](https://github.com/jkrumm/basalt-ui/commit/23da2d0c7b0a242cb697d2b18635794c8792bec1))
|
|
41
|
+
* keep the anchor radius text, flag nested items explicitly ([ae40487](https://github.com/jkrumm/basalt-ui/commit/ae40487cd3cb994e2dc87d07cfdf604495f27a54))
|
|
42
|
+
* list and Meter card states end at their content ([20e03c1](https://github.com/jkrumm/basalt-ui/commit/20e03c1d9002b855a62e21a582bce5821e1c189f))
|
|
43
|
+
* match the capitalised median fact in the distribution test ([153914f](https://github.com/jkrumm/basalt-ui/commit/153914fd4145a34721d50812a493a77c2e0ca356))
|
|
44
|
+
* set the distribution fact apart from its headline value ([acfca2f](https://github.com/jkrumm/basalt-ui/commit/acfca2ff916f74848fb1ddb5900710b2a3e11c5c))
|
|
45
|
+
* shorten the distribution fact so it holds one line at 390 ([e55c828](https://github.com/jkrumm/basalt-ui/commit/e55c82848a0f26df674b151268ec3486ec206a99))
|
|
46
|
+
* state a figure in every S2 sentence and shorten the components table ([7258623](https://github.com/jkrumm/basalt-ui/commit/7258623f3ec50bf5b4360656e065c0f7a63d53f7))
|
|
47
|
+
* the slot parity test guards the strip reserve, comments say slotted chart ([3c3633c](https://github.com/jkrumm/basalt-ui/commit/3c3633ccf32b46d428ad4760797bb8c2e1857d3c))
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
### Features
|
|
51
|
+
|
|
52
|
+
* a nested off-scale radius is always P1 ([70f0175](https://github.com/jkrumm/basalt-ui/commit/70f017556fd3c9dbf713a6f58ed84418c987cc2b))
|
|
53
|
+
* an axis-less bars mode for a visual slot ([08496bf](https://github.com/jkrumm/basalt-ui/commit/08496bfd55bf9f24c2d55ad4edc2071ff78c0fd3))
|
|
54
|
+
* shot detect flags an off-scale nested radius ([5c15283](https://github.com/jkrumm/basalt-ui/commit/5c15283d61b2721e015f9aa644d31a6730b4c198))
|
|
55
|
+
|
|
1
56
|
# [2.24.0](https://github.com/jkrumm/basalt-ui/compare/v2.23.0...v2.24.0) (2026-10-18)
|
|
2
57
|
|
|
3
58
|
|
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 | 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) | — |
|
|
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 | 2.25.0 | 2.26.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) | — | `basalt/card-inset` → `error` (§ Guards) | — |
|
|
81
81
|
|
|
82
82
|
---
|
|
83
83
|
|
|
@@ -1046,6 +1046,118 @@ 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.26.0 — Wave 38, argo's friction III
|
|
1050
|
+
|
|
1051
|
+
### Chart card loading (Wave 38)
|
|
1052
|
+
|
|
1053
|
+
No export is removed or added. A pending `ChartCard` now loads in its loaded shape.
|
|
1054
|
+
|
|
1055
|
+
| Surface | Before | Now |
|
|
1056
|
+
| ----------------------------------------------- | ------------------------------------------- | -------------------------------------------------------------------------------- |
|
|
1057
|
+
| `ChartCard` with `facts`, `state={{ pending }}` | the facts row was dropped: 40–70 px shorter | a skeleton facts row (figure bar, basis line if `subtitle`) at the loaded height |
|
|
1058
|
+
| A pending chart body (`ChartPlaceholder`) | a near-invisible blank shimmer plate | a faint plot skeleton: an axis baseline and bar ghosts in a neutral tone |
|
|
1059
|
+
|
|
1060
|
+
The stale figure is never shown while pending. Error and empty keep their rule: no facts, and
|
|
1061
|
+
`placeholderHeight="content"` ends at the content. The plot skeleton is skipped for a `compact`
|
|
1062
|
+
placeholder (`Sparkline`).
|
|
1063
|
+
|
|
1064
|
+
Opt out: pass `state` only once the data settles, or draw the loading yourself as the card's
|
|
1065
|
+
`children` with `placeholderHeight="content"` (the card then renders `children` while pending). The
|
|
1066
|
+
facts skeleton follows `facts`; omit `facts` while pending to drop it.
|
|
1067
|
+
|
|
1068
|
+
### Strip and Meter loading (Wave 38)
|
|
1069
|
+
|
|
1070
|
+
No export is removed or added. A loading state is the loaded shape; two other defaults move with it.
|
|
1071
|
+
|
|
1072
|
+
| Surface | Before | Now |
|
|
1073
|
+
| --------------------------------------------------------------------- | ---------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
1074
|
+
| `Meter loading` (bar) | one track and one or two caption lines | the loaded rows (figure row above, zone-name row, reading row, caption row, part captions), text painted as skeleton, at the loaded height ±2 px |
|
|
1075
|
+
| Strip cell `loading` | a value bar alone; a `visual` and `footer` showed as loaded | the value bar, the `visual` slot and the `footer` line at their loaded height; the visual and footer are laid out hidden under a skeleton |
|
|
1076
|
+
| Forecast caption (committed/forecast `Meter`) | begins at the spent/forecast boundary | ends at the forecast fill end (clamped inside the track); if that collides it starts at the boundary instead, and drops only if neither fits; the reading stays at the committed end |
|
|
1077
|
+
| `StatGroup` hero size in a container under 480 px (a phone, an aside) | a card spanning the row rendered 22, its two-column row-mates 16 | one size for every card of the group in the two-column state (16) |
|
|
1078
|
+
|
|
1079
|
+
- **Pass the loaded structure.** A Meter keeps its rows from its own props (`ticks`, `zones`, `target`,
|
|
1080
|
+
`endCaption`, `segments`), so pass them while loading as at rest; the reading may be `null`. A strip
|
|
1081
|
+
cell keeps a visual or footer only when you pass it: pass the same `visual` and `footer` as at rest
|
|
1082
|
+
(an empty series is fine). A `Meter` in a loading cell's `visual` loads itself; any other visual is
|
|
1083
|
+
covered by one skeleton bar. Give `delta` too, or a delta that wraps under the value is not reserved.
|
|
1084
|
+
- **The ring is unchanged:** one skeleton disc.
|
|
1085
|
+
- Opt out of the forecast anchor: none (the old anchor put "Forecast" about 100 px from the fill it
|
|
1086
|
+
names); `readingAt="start"` keeps the pre-2.24 anchor at the boundary.
|
|
1087
|
+
- Opt out of the shared hero size: set `--basalt-stat-group-figure` (a length, e.g. `var(--vx-text-kpi)`) on the
|
|
1088
|
+
`StatGroup` or a wrapper; it replaces the group's two-column size.
|
|
1089
|
+
|
|
1090
|
+
### Compact legends keep series (Wave 38)
|
|
1091
|
+
|
|
1092
|
+
No export is removed or added. 2.24.0's compact legend folded series names into `+N`; this restores them.
|
|
1093
|
+
|
|
1094
|
+
| Surface | Before (2.24) | Now |
|
|
1095
|
+
| --------------------------- | --------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- |
|
|
1096
|
+
| Series in a compact legend | one row; any entry that did not fit folded into `+N`, so seven lines at 390 read by hue | every series stays named at every width; if the series alone overfill a row, it wraps |
|
|
1097
|
+
| Zone / reference entries | first in the DOM and the row; the last entries folded | after the series; they alone fold into `+N` (last first) until the key is one row |
|
|
1098
|
+
| An entry wider than the row | n/a (the compact row clipped it) | the label ellipsizes at the row's width, full name in `title` |
|
|
1099
|
+
| An entry's text | could wrap inside itself (`Low (< 0.8)` over three lines, `Push` / `(≥70)`) | never wraps: a threshold stays with its name |
|
|
1100
|
+
| Legend order at every width | zones and references before the series | series first, then zones and references; DOM order is the visual order |
|
|
1101
|
+
| A bottom-placed `Bars` key | labels wrapped inside their column (`Under 1 % of` / `calls`) | each label is one line; the row wraps between entries when it must |
|
|
1102
|
+
|
|
1103
|
+
The 2.24 premise ("the title and tooltip name the series") is false for a multi-line chart: argo's
|
|
1104
|
+
strength lifts and weekly volume (`+5` / `+3`), relative progression (`+2`), readiness (`+1`) and the sky
|
|
1105
|
+
panorama (`+3`) were told apart by hue alone. A chart with only series therefore never shows a `+N`, and a reference folds only when it frees a line the series row would not need.
|
|
1106
|
+
|
|
1107
|
+
The fold is measured in the browser, so the server-rendered first paint shows the unfolded key until hydration.
|
|
1108
|
+
|
|
1109
|
+
Opt-out: `legend: false` still drops the key, and `naming="endLabels"` names the lines on the plot. To
|
|
1110
|
+
keep a long zone name off the key, drop `ZoneSpec.legend` on that zone.
|
|
1111
|
+
|
|
1112
|
+
### Section subtitle and summary sizes (Wave 38)
|
|
1113
|
+
|
|
1114
|
+
**What 2.24.0 / 2.25.0 got wrong:** the summary cap was written as a `font-size` rule on
|
|
1115
|
+
`.summary > .mantine-Text-root`, which outranks a consumer's own class. argo's reading backlog sets
|
|
1116
|
+
its summary `Text` to 13 through a class, got 11 instead, and the shell held four sizes (title 15,
|
|
1117
|
+
rows 13, row meta 12, summary 11). The `Section` subtitle itself was at 12 (`xs`) as promised;
|
|
1118
|
+
argo's "subtitle" report was this summary line. Separately, a `<Text size="xs">` caption in a
|
|
1119
|
+
`ChartCard` `actions` slot stayed at 12 beside the chart's 11 ticks: argo's strength / load / balance
|
|
1120
|
+
shells held four sizes.
|
|
1121
|
+
|
|
1122
|
+
**Now:**
|
|
1123
|
+
|
|
1124
|
+
- The cap pins `--text-fz`, the variable `Text` reads, `!important`: a `Text` with a `size`, or none,
|
|
1125
|
+
in `Section summary` renders at 11; a `Text` sized by your own class keeps that size.
|
|
1126
|
+
- A `<Text size="xs">` in a `ChartCard` `actions` slot renders at 11, the chart text step. `sm` and
|
|
1127
|
+
`md` figures are untouched.
|
|
1128
|
+
|
|
1129
|
+
**Opt out:** size the `Text` with your own class, or replace the `Text` with a plain `span` (summary) / give
|
|
1130
|
+
it another `size` (actions).
|
|
1131
|
+
|
|
1132
|
+
| Shell (measured, 1440 and 390) | 2.24.0 / 2.25.0 | Now |
|
|
1133
|
+
| ------------------------------------------------------------ | ----------------- | ------------ |
|
|
1134
|
+
| `Section` head: title, `subtitle`, `count`, body | 12 / 13 / 15 | 12 / 13 / 15 |
|
|
1135
|
+
| reading backlog: class-sized summary over rows | 11 / 12 / 13 / 15 | 12 / 13 / 15 |
|
|
1136
|
+
| strength / load / balance: `ChartCard` `actions` xs captions | 11 / 12 / 13 / 15 | 11 / 13 / 15 |
|
|
1137
|
+
| strength diagnostics: `xs` summary | 11 / 13 / 15 | 11 / 13 / 15 |
|
|
1138
|
+
|
|
1139
|
+
### Hosted readouts and tooltips (Wave 38)
|
|
1140
|
+
|
|
1141
|
+
No export is removed or added. Three chart readouts keep what they print and stay where they belong.
|
|
1142
|
+
|
|
1143
|
+
| Surface | Before | Now |
|
|
1144
|
+
| ------------------------------------------ | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- |
|
|
1145
|
+
| `Sparkline` readout, tight | the " · " separator and its spaces collapsed (`62 bpm· 12 Oct`) | the separator and its air never drop; tightening only shrinks the chip's padding |
|
|
1146
|
+
| `Sparkline` readout, stacked (hosted line) | value over date at the plot's top, over the plotted line | value over date placed where the line is not: the plot's top or bottom, beside the cursor, else hung below the plot |
|
|
1147
|
+
| Slotted `Bars` tooltip, `Sparkline` chip | `--vx-tooltip-bg` (96% in dark): the card's footer ghosted through | the tooltip tint (`--vx-tooltip-bg`, or `--basalt-tooltip-surface`) layered over the opaque `--vx-surface-elevated`, both schemes |
|
|
1148
|
+
| Chart tooltip at the first or last point | placed against the viewport: it opened past the card's edge, over the neighbouring card | slid back inside its card (`ChartCard`, `StatCard`, strip cell) when the card is wide enough for it |
|
|
1149
|
+
| Tooltip rows | the label column was one line with an ellipsis, so a figure in a label ended in `…` | the label wraps at word breaks; the figure column never wraps or truncates |
|
|
1150
|
+
|
|
1151
|
+
Opt out: tint the tooltip and the readout chip with `--basalt-tooltip-surface` (a consumer's
|
|
1152
|
+
`tooltipBg` palette entry is honoured the same way); either is layered over the elevated surface, so
|
|
1153
|
+
the result stays opaque. `--basalt-spark-readout-lift: 0` still puts a one-line chip back in the
|
|
1154
|
+
plot. The card clamp has no switch: render the chart outside a card and the viewport placement
|
|
1155
|
+
stands.
|
|
1156
|
+
|
|
1157
|
+
## 2.25.0
|
|
1158
|
+
|
|
1159
|
+
_Nothing to migrate in this release._
|
|
1160
|
+
|
|
1049
1161
|
## 2.24.0 — Wave 38, argo's friction III
|
|
1050
1162
|
|
|
1051
1163
|
### Section and Button chrome (Wave 38)
|
|
@@ -1193,11 +1305,12 @@ No export is removed or renamed; one prop is added and two defaults move.
|
|
|
1193
1305
|
- **The compact legend is one row, and a zone-named chart has one.** Before: below 480px of chart width the key
|
|
1194
1306
|
wrapped to as many rows as it had entries (five entries, two rows), so argo dropped it with
|
|
1195
1307
|
`legend: false` and ACWR, recovery and stress read by hue alone at 390. Now: a chart with two or more legend
|
|
1196
|
-
entries shows
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1308
|
+
entries shows a compact key there, and what does not fit folds into a `+N` chip whose `title` and hidden text
|
|
1309
|
+
list the folded names. **Superseded in the next minor** (`### Compact legends keep series`): this release
|
|
1310
|
+
folded SERIES names too and put the zone / reference entries first, on the premise that "the title and tooltip
|
|
1311
|
+
name the series". That premise is false for a multi-line chart, where the series are told apart by the legend
|
|
1312
|
+
alone; the fold now takes zone / reference entries only and the series lead. From 480px up the key wraps and
|
|
1313
|
+
shows every entry. An explicit `legend: false`
|
|
1201
1314
|
still drops the legend at every width; delete the `compact && { legend: false }` workaround to take the new
|
|
1202
1315
|
default.
|
|
1203
1316
|
- **`ZoneSpec.legend: { label, mark?, color? }`** names a band in the legend, so a zone chart needs no always-`null`
|
|
@@ -1226,9 +1339,11 @@ No export is removed or renamed; one prop is added and two defaults move.
|
|
|
1226
1339
|
(12). argo's strength diagnostics shell then counted four sizes: title 15, chart-card title 13,
|
|
1227
1340
|
summary 12, chart ticks and legend 11.
|
|
1228
1341
|
|
|
1229
|
-
**Now:**
|
|
1342
|
+
**Now:** a `Text` that is a direct child of the summary slot renders at 11 (the chart text step),
|
|
1343
|
+
sized by a `size` prop or not. A `Text` sized by your own class keeps that size (see "Section
|
|
1344
|
+
subtitle and summary sizes" below). A bare `Text` nested inside a `Group` keeps the size it asks for.
|
|
1230
1345
|
|
|
1231
|
-
**Opt out:**
|
|
1346
|
+
**Opt out:** replace the `Text` with a plain `<span>`, wrap it in a `Group`, or size it with your own class.
|
|
1232
1347
|
|
|
1233
1348
|
### Empty cells and Meters (Wave 38)
|
|
1234
1349
|
|
|
@@ -1246,6 +1361,41 @@ A gap is stated once. Moved defaults:
|
|
|
1246
1361
|
|
|
1247
1362
|
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
1363
|
|
|
1364
|
+
### Bars in a visual slot (Wave 38)
|
|
1365
|
+
|
|
1366
|
+
New capability, no behaviour moves for a `Bars` outside a slot; a `Bars` already in a slot loses its axes. A `Bars` rendered inside a
|
|
1367
|
+
`StatCard` `sparkline` slot or a strip cell's `visual` now drops both axes, the grid, the plot margin
|
|
1368
|
+
and the legend, and fills the slot like a `Sparkline`: the catalogue's "distribution as a slot
|
|
1369
|
+
micro-visual". Nothing to opt into and no new prop; the slot is the signal. Give it the slot's box:
|
|
1370
|
+
|
|
1371
|
+
```tsx
|
|
1372
|
+
<StatCard
|
|
1373
|
+
title="Pace"
|
|
1374
|
+
sparkline={({ height }) => (
|
|
1375
|
+
<Bars ariaLabel="Pace by book" data={bins} x={(d) => d.bin} height={height} bars={[…]} />
|
|
1376
|
+
)}
|
|
1377
|
+
/>
|
|
1378
|
+
```
|
|
1379
|
+
|
|
1380
|
+
The marks keep the house fills. The bins are named in the tooltip, which opens below the slot, so
|
|
1381
|
+
5–12 bars read as a distribution, not a time series. A `Bars` you mount in a slot on purpose WITH axes
|
|
1382
|
+
has no way back; use a `ChartCard` (the catalogue's "distribution as a card's subject").
|
|
1383
|
+
|
|
1384
|
+
### List and Meter card states (Wave 38)
|
|
1385
|
+
|
|
1386
|
+
No export is removed. `ChartCard`'s `placeholderHeight` gains the value `'content'`; the default is unchanged.
|
|
1387
|
+
|
|
1388
|
+
| Before | Now | Opt-out |
|
|
1389
|
+
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------- |
|
|
1390
|
+
| A `ChartCard` around a list or a `Meter` showed its error and empty state in a box at the chart height (or your `placeholderHeight` number) — about half void under Retry for a four-row list | With `placeholderHeight="content"` the error and empty state end at their content: one title, the cause, Retry, no void. A pending state leaves `children` in place, so the body draws its own loading | leave `placeholderHeight` off (or a number): D37 keeps the box |
|
|
1391
|
+
| A `BarList` loading skeleton was fixed 1.5rem blocks, shorter than the rows it became | The skeleton is real empty rows with a skeleton over each: it keeps the loaded height in the compact and the wide layout | none: it is a layout fix, the rows are the list's own |
|
|
1392
|
+
|
|
1393
|
+
A chart body keeps D37 (the loaded height) by default. `BarList`'s own empty line is unchanged.
|
|
1394
|
+
|
|
1395
|
+
### `shot detect` judges a nested radius (Wave 38)
|
|
1396
|
+
|
|
1397
|
+
`craft-1/off-scale-radius` now also reads every `nested` surface in `metrics.json`, not just the anchor, and names it in the defect (`nested <path> 3px`). The steps are the round's own `scale.radius`, so a `radius` knob shift moves them. An off-scale nested radius is always P1; the anchor's own radius keeps P3 within 1 px of a step. A round that was clean may now list a finding; the fix is the component's radius token, not a suppression.
|
|
1398
|
+
|
|
1249
1399
|
### Guards
|
|
1250
1400
|
|
|
1251
1401
|
`raw-spacing` and `inline-spacing` promote from `warn` to `error`: their grace entries (since
|
|
@@ -1259,6 +1409,28 @@ predate 2.16 and meet both rules on their next bump.
|
|
|
1259
1409
|
Opt-out: `"basalt": { "severity": { "raw-spacing": "warn", "inline-spacing": "warn" } }` keeps both a
|
|
1260
1410
|
warning; `"basalt": { "exemptRules": { "inline-spacing": ["<path>"] } }` silences one for a path.
|
|
1261
1411
|
|
|
1412
|
+
`basalt/card-inset` is now `error` in the shipped preset (`warn` since 2.16.0; the redundant
|
|
1413
|
+
`py="sm" px="md"` pair class since 2.20.0). It fails an explicit `py="sm" px="md"` pair on a `Card`
|
|
1414
|
+
(the theme owns the 12/16 inset) and a partial inset. Delete the pair; for a flush card use
|
|
1415
|
+
`variant="flush"` or `Card.Section`; for a deliberate exception write
|
|
1416
|
+
`{/* theme-allow card-inset — reason */}`. Measured before flipping: argo already runs it at
|
|
1417
|
+
`error` with 0 findings.
|
|
1418
|
+
|
|
1419
|
+
Opt-out: in the consumer's `.oxlintrc.json` set `"basalt/card-inset": "warn"`.
|
|
1420
|
+
|
|
1421
|
+
### Footer shot states and zone names (Wave 38)
|
|
1422
|
+
|
|
1423
|
+
No export is removed or added. `StatStripFooterEntry` gains an optional `shotAbsent`, and a zoned `Meter` names more of its zones.
|
|
1424
|
+
|
|
1425
|
+
| Surface | Before | Now |
|
|
1426
|
+
| ---------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1427
|
+
| `StatStripFooterEntry` | no `shotAbsent`: a footer entry production omits in a state (argo's budget poller line under `empty`) was recorded by `shot` as an `error` ("anchor absent in this state") | `shotAbsent?: readonly StatStripShotState[]` on the entry emits `data-shot-absent` on its `strip-footer-<key>` anchor and replaces the strip's `shotAbsent` for that entry, as a cell's does |
|
|
1428
|
+
| `Meter` zone names | a name wider than its own span hid or fell to its `short` even with free room beside it (argo's ACWR `Caut.` at 1440) | the zone names beside it slide inside their own spans and it takes the gap, centre kept in its span: the full name shows wherever the row has room, then the `short`, then nothing. The holding zone, ticks and the one-register rule are unchanged |
|
|
1429
|
+
|
|
1430
|
+
A row that is genuinely too narrow still hides a name (argo's ACWR at 390 has 22px where `Caut.` needs 25); the name stays in the described-by text.
|
|
1431
|
+
|
|
1432
|
+
Opt-out: none for the zone names; a zone that must keep to its span sets a `short` that fits it, and a page that does not want a footer entry's shot anchor omitted declares no `shotAbsent`.
|
|
1433
|
+
|
|
1262
1434
|
## 2.23.0 — Wave 37, argo's friction II
|
|
1263
1435
|
|
|
1264
1436
|
No export is removed. `MeterTick` gains an optional `caption`; five Meter defaults move.
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"rules": {
|
|
4
4
|
"basalt/no-raw-font-size": "error",
|
|
5
5
|
"basalt/raw-size-literal": "error",
|
|
6
|
-
"basalt/card-inset": "
|
|
6
|
+
"basalt/card-inset": "error",
|
|
7
7
|
"basalt/chart-in-raw-surface": "error",
|
|
8
8
|
"basalt/shadow-basalt-export": "error",
|
|
9
9
|
"basalt/hand-rolled-shell": "error",
|
package/configs/oxlint-plugin.js
CHANGED
|
@@ -613,7 +613,7 @@ function attrValue(attr) {
|
|
|
613
613
|
return unwrapExpressionContainer(attr.value)
|
|
614
614
|
}
|
|
615
615
|
|
|
616
|
-
// Ships:
|
|
616
|
+
// Ships: error
|
|
617
617
|
const cardInset = {
|
|
618
618
|
meta: {
|
|
619
619
|
type: 'suggestion',
|
|
@@ -4216,7 +4216,7 @@ const routeViewTransition = {
|
|
|
4216
4216
|
|
|
4217
4217
|
/**
|
|
4218
4218
|
* Plugin rules still inside their grace minor — `warn` in the shipped consumer preset, `error`
|
|
4219
|
-
* repo-locally. This is the plugin's counterpart to `src/guard`'s `GRACE_PERIOD_KINDS`, and it
|
|
4219
|
+
* repo-locally. Empty since 2.26.0: `card-inset` (since 2.16.0), the last tenant, promoted. This is the plugin's counterpart to `src/guard`'s `GRACE_PERIOD_KINDS`, and it
|
|
4220
4220
|
* exists because its ABSENCE is what let three rules sit at `warn` for up to twelve minors with
|
|
4221
4221
|
* nothing tracking them: `configs/oxlint.json` is generated and its top-level keys are fixed by
|
|
4222
4222
|
* oxlint's own parser, so the ledger cannot live there.
|
|
@@ -4236,13 +4236,7 @@ const routeViewTransition = {
|
|
|
4236
4236
|
*
|
|
4237
4237
|
* @type {Record<string, GraceEntry>}
|
|
4238
4238
|
*/
|
|
4239
|
-
export const PLUGIN_RULE_GRACE = {
|
|
4240
|
-
'card-inset': {
|
|
4241
|
-
since: '2.16.0',
|
|
4242
|
-
promote: '2.26.0',
|
|
4243
|
-
why: 'Tightened in 2.16.0: only py="sm" px="md" together (or neither) passed. Inverted in 2.20.0 (Wave 35): the theme owns the 12/16 inset, so the pair is now a "redundant" finding and "neither" is the idiom; flush is variant="flush" or Card.Section. The redundant pair is a NEW finding class first shipping in 2.20.0, so consumers get the full grace again: promote moved 2.24.0 → 2.26.0.',
|
|
4244
|
-
},
|
|
4245
|
-
}
|
|
4239
|
+
export const PLUGIN_RULE_GRACE = {}
|
|
4246
4240
|
|
|
4247
4241
|
// ── Plugin export ───────────────────────────────────────────────────────────────────────────────
|
|
4248
4242
|
|
|
@@ -1535,6 +1535,12 @@ describe('PLUGIN_RULE_GRACE', () => {
|
|
|
1535
1535
|
const graceIds = graceEntries.map(([id]) => id)
|
|
1536
1536
|
const shippedBasaltIds = Object.keys(shipped.rules).filter((id) => id.startsWith('basalt/'))
|
|
1537
1537
|
|
|
1538
|
+
// Empty since 2.26.0 (`card-inset`, the last tenant, promoted). The per-entry tests below run
|
|
1539
|
+
// zero assertions on an empty ledger; the gate itself is proven on synthetic ledgers above.
|
|
1540
|
+
it('the ledger is empty (card-inset, its last tenant, promoted at 2.26.0)', () => {
|
|
1541
|
+
expect(graceIds).toEqual([])
|
|
1542
|
+
})
|
|
1543
|
+
|
|
1538
1544
|
// The mechanism whose ABSENCE let three rules sit at `warn` for up to twelve minors with nothing
|
|
1539
1545
|
// tracking them. Deleting a ledger entry IS the promotion, and this test makes flipping the
|
|
1540
1546
|
// shipped level part of the same commit.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Bars.d.ts","sourceRoot":"","sources":["../../src/charts/Bars.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Bars.d.ts","sourceRoot":"","sources":["../../src/charts/Bars.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAA;AAMzC,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,CAmFvF"}
|
package/dist/charts/Bars.js
CHANGED
|
@@ -2,8 +2,9 @@ import { jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { barY } from "@tanstack/charts/bar";
|
|
3
3
|
import { group } from "@tanstack/charts/group";
|
|
4
4
|
import { stack } from "@tanstack/charts/stack";
|
|
5
|
-
import { useCallback, useMemo } from "react";
|
|
5
|
+
import { useCallback, useContext, useMemo } from "react";
|
|
6
6
|
import { CartesianRung } from "./CartesianChart.js";
|
|
7
|
+
import { VisualSlotContext } from "../dashboard/visual-slot.js";
|
|
7
8
|
import { VX } from "../tokens/index.js";
|
|
8
9
|
import { emphasis, lineMark } from "./marks.js";
|
|
9
10
|
import { rowX } from "./types.js";
|
|
@@ -33,6 +34,7 @@ function Bars(props) {
|
|
|
33
34
|
const sharedColor = bars.some((b, i) => bars.findIndex((o) => o.color === b.color) !== i);
|
|
34
35
|
guardLogStack(layout, bars.length > 0 && rest.y?.scale === "log");
|
|
35
36
|
const sample = rest.data[0];
|
|
37
|
+
const bare = useContext(VisualSlotContext) !== null;
|
|
36
38
|
const series = useMemo(
|
|
37
39
|
() => [
|
|
38
40
|
// The legend has no datum: its swatch wears the shade the bars draw on the first row, so
|
|
@@ -96,6 +98,7 @@ function Bars(props) {
|
|
|
96
98
|
crosshair: false,
|
|
97
99
|
focusRing: false,
|
|
98
100
|
reverseRows: layout !== "grouped",
|
|
101
|
+
...bare && { bare, tooltipBelow: true, legend: false },
|
|
99
102
|
...layout !== "grouped" && { stack: layout }
|
|
100
103
|
}
|
|
101
104
|
);
|
|
@@ -18,6 +18,8 @@ export type RungOptions = {
|
|
|
18
18
|
focusRing?: boolean;
|
|
19
19
|
/** The legend goes from the wide class up, where `Lines`' end labels name the series. */
|
|
20
20
|
hideLegendAtWide?: boolean;
|
|
21
|
+
/** No axes, grid, margin or legend: the plot is the whole box (`Bars` in a visual slot). */
|
|
22
|
+
bare?: boolean;
|
|
21
23
|
};
|
|
22
24
|
/** What a chart's definition is compiled from, besides its own props: the chrome's live state. */
|
|
23
25
|
export type ShellContext = {
|
|
@@ -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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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"}
|
|
@@ -33,14 +33,19 @@ type ChartCardBaseProps = BasaltProps & SlotStylesProps<ChartCardSlot> & {
|
|
|
33
33
|
deltaPolarity?: DeltaPolarity | undefined;
|
|
34
34
|
/** A mono count tag after the title. */
|
|
35
35
|
count?: number | undefined;
|
|
36
|
-
/** Right-aligned controls.
|
|
36
|
+
/** Right-aligned controls. A `<Text size="xs">` caption here renders at 11 (the chart-text step,
|
|
37
|
+
* beside the plot's ticks); wrap it in a `span` or give it your own class to opt out. */
|
|
37
38
|
actions?: ReactNode;
|
|
38
39
|
/** A resolved state replaces `children` with its placeholder; the header stays. */
|
|
39
40
|
state?: ChartState | undefined;
|
|
40
41
|
/** Body height while a placeholder shows. Default: the chart height law, i.e. exactly the box an
|
|
41
42
|
* unsized chart takes — pass the chart's own `height` when it states one, so a `<Suspense
|
|
42
|
-
* fallback={<ChartCard state={{ pending: true }} …/>}>` reserves the final size.
|
|
43
|
-
|
|
43
|
+
* fallback={<ChartCard state={{ pending: true }} …/>}>` reserves the final size.
|
|
44
|
+
* `'content'` is for a body that is not a chart (a list, a `Meter`): an error or empty state
|
|
45
|
+
* ends at its content. A pending state renders `children` as they are, so the body must draw
|
|
46
|
+
* its own loading (`BarList loading`, a loading `Meter`); a children-less `<Suspense
|
|
47
|
+
* fallback>` should pass a numeric height instead. */
|
|
48
|
+
placeholderHeight?: number | ResponsiveChartHeight | 'content' | undefined;
|
|
44
49
|
/** Placeholder data is showing: the facts row dims with the plot (a strip cell's `stale`). */
|
|
45
50
|
stale?: boolean | undefined;
|
|
46
51
|
/** What an errored `state` names: "Could not load {stateNoun}". Default: no noun. */
|
|
@@ -55,8 +60,9 @@ type ChartCardBaseProps = BasaltProps & SlotStylesProps<ChartCardSlot> & {
|
|
|
55
60
|
};
|
|
56
61
|
/**
|
|
57
62
|
* `facts` replaces the legacy `value`/`delta` hero: the two are mutually exclusive in the type. The
|
|
58
|
-
*
|
|
59
|
-
*
|
|
63
|
+
* figures show only at rest: while `state` is errored or empty one would sit above a placeholder that
|
|
64
|
+
* contradicts it, so the header keeps its title row alone. While pending the row keeps its footprint
|
|
65
|
+
* as a skeleton (a figure bar and, with a `subtitle`, a basis line), never the stale figure.
|
|
60
66
|
*/
|
|
61
67
|
export type ChartCardProps = ChartCardBaseProps & ({
|
|
62
68
|
/** The headline figure(s) under the title: value, unit, comparison, period. Wraps at half
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChartCard.d.ts","sourceRoot":"","sources":["../../src/charts/ChartCard.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAiB,YAAY,EA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,OAAO,EACP,QAAQ,EACR,SAAS,EACT,UAAU,EACV,KAAK,EACL,QAAQ,EACR,KAAK,EACL,GAAG,MAAM,EACV,EAAE,cAAc,GAAG,YAAY,CA0D/B"}
|
package/dist/charts/ChartCard.js
CHANGED
|
@@ -100,6 +100,12 @@ function Facts({
|
|
|
100
100
|
basis !== void 0 && /* @__PURE__ */ jsx("p", { "data-basalt-facts-basis": "", className: classes.factsBasis, children: basis })
|
|
101
101
|
] });
|
|
102
102
|
}
|
|
103
|
+
function FactsSkeleton({ basis }) {
|
|
104
|
+
return /* @__PURE__ */ jsxs("div", { "data-basalt-facts-skeleton": "", "aria-hidden": "true", className: classes.facts, children: [
|
|
105
|
+
/* @__PURE__ */ jsx("div", { className: classes.factsRow, children: /* @__PURE__ */ jsx("span", { className: classes.skeletonFigure }) }),
|
|
106
|
+
basis && /* @__PURE__ */ jsx("p", { className: cx(classes.factsBasis, classes.skeletonBasis) })
|
|
107
|
+
] });
|
|
108
|
+
}
|
|
103
109
|
function ChartCard({
|
|
104
110
|
actions,
|
|
105
111
|
state,
|
|
@@ -119,7 +125,8 @@ function ChartCard({
|
|
|
119
125
|
const { ref, short } = useShortCard();
|
|
120
126
|
const resolved = resolveChartState(state);
|
|
121
127
|
const showFacts = facts !== void 0 && resolved === null;
|
|
122
|
-
const
|
|
128
|
+
const skeletonFacts = facts !== void 0 && resolved === "pending";
|
|
129
|
+
const hasHeader = actions !== void 0 || showFacts || skeletonFacts || HEADER_TRIGGERS.some((k) => header[k] !== void 0);
|
|
123
130
|
const { subtitle, ...rest } = header;
|
|
124
131
|
const headerProps = facts === void 0 ? header : rest;
|
|
125
132
|
return /* @__PURE__ */ jsx(ChartCardContext.Provider, { value: true, children: /* @__PURE__ */ jsxs(
|
|
@@ -144,14 +151,15 @@ function ChartCard({
|
|
|
144
151
|
}
|
|
145
152
|
}
|
|
146
153
|
),
|
|
147
|
-
showFacts && /* @__PURE__ */ jsx(Facts, { facts, basis: subtitle, stale })
|
|
154
|
+
showFacts && /* @__PURE__ */ jsx(Facts, { facts, basis: subtitle, stale }),
|
|
155
|
+
skeletonFacts && /* @__PURE__ */ jsx(FactsSkeleton, { basis: subtitle !== void 0 })
|
|
148
156
|
] }),
|
|
149
157
|
/* @__PURE__ */ jsx(
|
|
150
158
|
"div",
|
|
151
159
|
{
|
|
152
160
|
...classNames?.body !== void 0 && { className: classNames.body },
|
|
153
161
|
style: bodyClipStyle,
|
|
154
|
-
children: resolved === null ? children : /* @__PURE__ */ jsx(
|
|
162
|
+
children: resolved === null || resolved === "pending" && placeholderHeight === "content" ? children : /* @__PURE__ */ jsx(
|
|
155
163
|
ChartPlaceholder,
|
|
156
164
|
{
|
|
157
165
|
state,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Sparkline.d.ts","sourceRoot":"","sources":["../../src/charts/Sparkline.tsx"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAA0D,YAAY,EAAE,MAAM,OAAO,CAAA;AAEjG,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAclD,OAAO,KAAK,EAAc,UAAU,EAAE,MAAM,SAAS,CAAA;AAErD,MAAM,MAAM,cAAc,GAAG,WAAW,GAAG;IACzC,gFAAgF;IAChF,SAAS,EAAE,MAAM,CAAA;IACjB;yFACqF;IACrF,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS;QAAE,EAAE,EAAE,IAAI,GAAG,MAAM,GAAG,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,CAAA;IAClF,oBAAoB;IACpB,MAAM,EAAE,MAAM,CAAA;IACd,mEAAmE;IACnE,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B,wBAAwB;IACxB,IAAI,CAAC,EAAE,MAAM,GAAG,KAAK,GAAG,SAAS,CAAA;IACjC,0DAA0D;IAC1D,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B,4FAA4F;IAC5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