basalt-ui 2.25.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 +33 -0
- package/MIGRATING.md +152 -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/ChartCard.d.ts +5 -3
- package/dist/charts/ChartCard.d.ts.map +1 -1
- package/dist/charts/ChartCard.js +10 -2
- 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.map +1 -1
- package/dist/charts/compile.js +27 -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.map +1 -1
- package/dist/charts/state.js +6 -1
- 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 +17 -0
- 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 +38 -0
- 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 +2 -2
- package/package.json +1 -1
- package/src/charts/ChartCard.tsx +23 -4
- 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 +40 -1
- package/src/charts/legend.tsx +64 -16
- package/src/charts/sparkline.module.css +13 -9
- package/src/charts/state.tsx +18 -1
- 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 +17 -0
- package/src/dashboard/stat-strip.module.css +38 -0
- 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,36 @@
|
|
|
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
|
+
|
|
1
34
|
# [2.25.0](https://github.com/jkrumm/basalt-ui/compare/v2.24.0...v2.25.0) (2026-10-18)
|
|
2
35
|
|
|
3
36
|
|
package/MIGRATING.md
CHANGED
|
@@ -66,18 +66,18 @@ There is one row per SURFACE, not per export, and a surface earns a row once any
|
|
|
66
66
|
shipped lefthook preset both changed in 1.30.0 with no row that owned them — which is how a
|
|
67
67
|
consumer read this index, found nothing, and diffed a KPI row that had silently gone 4-up → 2-up.
|
|
68
68
|
|
|
69
|
-
| Surface | 1.27.0 | 1.28.0 | 1.29.0 | 1.30.0 | 1.30.1 | 1.30.2 | 1.31.0 | 1.32.0 | 1.32.1 | 1.33.0 | 1.34.0 | 1.34.1 | 1.35.0 | 1.36.0 | 1.36.1 | 1.37.0 | 1.37.1 | 1.38.0 | 1.38.1 | 1.39.0 | 1.40.0 | 1.40.1 | 1.40.2 | 1.40.3 | 1.41.0 | 2.0.0 | 2.0.1 | 2.0.2 | 2.0.3 | 2.0.4 | 2.0.5 | 2.1.0 | 2.2.0 | 2.3.0 | 2.4.0 | 2.5.0 | 2.6.0 | 2.6.1 | 2.7.0 | 2.7.1 | 2.7.2 | 2.7.3 | 2.8.0 | 2.8.1 | 2.9.0 | 2.9.1 | 2.10.0 | 2.11.0 | 2.11.1 | 2.12.0 | 2.13.0 | 2.13.1 | 2.13.2 | 2.13.3 | 2.14.0 | 2.15.0 | 2.16.0 | 2.17.0 | 2.18.0 | 2.19.0 | 2.20.0 | 2.21.0 | 2.22.0 | 2.23.0 | 2.24.0 | 2.25.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,114 @@ 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
|
+
|
|
1049
1157
|
## 2.25.0
|
|
1050
1158
|
|
|
1051
1159
|
_Nothing to migrate in this release._
|
|
@@ -1197,11 +1305,12 @@ No export is removed or renamed; one prop is added and two defaults move.
|
|
|
1197
1305
|
- **The compact legend is one row, and a zone-named chart has one.** Before: below 480px of chart width the key
|
|
1198
1306
|
wrapped to as many rows as it had entries (five entries, two rows), so argo dropped it with
|
|
1199
1307
|
`legend: false` and ACWR, recovery and stress read by hue alone at 390. Now: a chart with two or more legend
|
|
1200
|
-
entries shows
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
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`
|
|
1205
1314
|
still drops the legend at every width; delete the `compact && { legend: false }` workaround to take the new
|
|
1206
1315
|
default.
|
|
1207
1316
|
- **`ZoneSpec.legend: { label, mark?, color? }`** names a band in the legend, so a zone chart needs no always-`null`
|
|
@@ -1230,9 +1339,11 @@ No export is removed or renamed; one prop is added and two defaults move.
|
|
|
1230
1339
|
(12). argo's strength diagnostics shell then counted four sizes: title 15, chart-card title 13,
|
|
1231
1340
|
summary 12, chart ticks and legend 11.
|
|
1232
1341
|
|
|
1233
|
-
**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.
|
|
1234
1345
|
|
|
1235
|
-
**Opt out:**
|
|
1346
|
+
**Opt out:** replace the `Text` with a plain `<span>`, wrap it in a `Group`, or size it with your own class.
|
|
1236
1347
|
|
|
1237
1348
|
### Empty cells and Meters (Wave 38)
|
|
1238
1349
|
|
|
@@ -1298,6 +1409,28 @@ predate 2.16 and meet both rules on their next bump.
|
|
|
1298
1409
|
Opt-out: `"basalt": { "severity": { "raw-spacing": "warn", "inline-spacing": "warn" } }` keeps both a
|
|
1299
1410
|
warning; `"basalt": { "exemptRules": { "inline-spacing": ["<path>"] } }` silences one for a path.
|
|
1300
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
|
+
|
|
1301
1434
|
## 2.23.0 — Wave 37, argo's friction II
|
|
1302
1435
|
|
|
1303
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.
|
|
@@ -33,7 +33,8 @@ 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;
|
|
@@ -59,8 +60,9 @@ type ChartCardBaseProps = BasaltProps & SlotStylesProps<ChartCardSlot> & {
|
|
|
59
60
|
};
|
|
60
61
|
/**
|
|
61
62
|
* `facts` replaces the legacy `value`/`delta` hero: the two are mutually exclusive in the type. The
|
|
62
|
-
*
|
|
63
|
-
*
|
|
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.
|
|
64
66
|
*/
|
|
65
67
|
export type ChartCardProps = ChartCardBaseProps & ({
|
|
66
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,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAGnE,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AACnE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAA;AAM7D,OAAO,KAAK,EAAE,UAAU,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AAkFhE,mGAAmG;AACnG,MAAM,MAAM,SAAS,GAAG;IACtB,KAAK,EAAE,SAAS,CAAA;IAChB,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IACzB,8BAA8B;IAC9B,UAAU,C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A;IAC9B;;;;;;0DAMsD;IACtD,iBAAiB,CAAC,EAAE,MAAM,GAAG,qBAAqB,GAAG,SAAS,GAAG,SAAS,CAAA;IAC1E,8FAA8F;IAC9F,KAAK,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;IAC3B,qFAAqF;IACrF,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC9B,uFAAuF;IACvF,OAAO,CAAC,EAAE,CAAC,MAAM,IAAI,CAAC,GAAG,SAAS,CAAA;IAClC,8DAA8D;IAC9D,QAAQ,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;IAC9B,wFAAwF;IACxF,WAAW,CAAC,EAAE,SAAS,CAAA;IACvB,QAAQ,CAAC,EAAE,SAAS,CAAA;CACrB,CAAA;AAEH;;;;;GAKG;AACH,MAAM,MAAM,cAAc,GAAG,kBAAkB,GAC7C,CACI;IACE;uDACmD;IACnD,KAAK,EAAE,SAAS,GAAG,SAAS,SAAS,EAAE,CAAA;IACvC,KAAK,CAAC,EAAE,SAAS,CAAA;IACjB,KAAK,CAAC,EAAE,SAAS,CAAA;CAClB,GACD;IAAE,KAAK,CAAC,EAAE,SAAS,CAAA;CAAE,CACxB,CAAA;AAoEH,wBAAgB,SAAS,CAAC,EACxB,OAAO,EACP,KAAK,EACL,iBAAiB,EACjB,WAAW,EACX,KAAK,EACL,SAAS,EACT,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,7 +151,8 @@ 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",
|
|
@@ -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,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AAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAA;IACvC;yBACqB;IACrB,cAAc,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IACnC,uEAAuE;IACvE,MAAM,CAAC,EAAE,CAAC,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC,GAAG,SAAS,CAAA;IAChD;;sCAEkC;IAClC,MAAM,CAAC,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,CAAA;CACvC,CAAA;AAED,KAAK,KAAK,GAAG;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,CAAA;AAgJ5C;;;;;GAKG;AACH,wBAAgB,aAAa,CAC3B,IAAI,EAAE,SAAS,KAAK,EAAE,EACtB,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,MAAM,GAAG,KAAK,GACnB,SAAS,KAAK,EAAE,CAIlB;AAuPD,wBAAgB,SAAS,CAAC,KAAK,EAAE,cAAc,GAAG,YAAY,CA6N7D"}
|
package/dist/charts/Sparkline.js
CHANGED
|
@@ -244,13 +244,56 @@ function meanOf(rows) {
|
|
|
244
244
|
}
|
|
245
245
|
return sum / n;
|
|
246
246
|
}
|
|
247
|
-
|
|
247
|
+
const CLEAR = 4;
|
|
248
|
+
function lineHits(pts, box) {
|
|
249
|
+
const x0 = box.left - CLEAR;
|
|
250
|
+
const x1 = box.left + box.w + CLEAR;
|
|
251
|
+
const y0 = box.top - CLEAR;
|
|
252
|
+
const y1 = box.top + box.h + CLEAR;
|
|
253
|
+
for (let i = 0; i < pts.length; i += 1) {
|
|
254
|
+
const [ax, ay] = pts[i];
|
|
255
|
+
const next = pts[i + 1];
|
|
256
|
+
if (next === void 0) return ax >= x0 && ax <= x1 && ay >= y0 && ay <= y1;
|
|
257
|
+
const [bx, by] = next;
|
|
258
|
+
if (Math.max(ax, bx) < x0 || Math.min(ax, bx) > x1) continue;
|
|
259
|
+
const yAt = (x) => bx === ax ? ay : ay + (by - ay) * (x - ax) / (bx - ax);
|
|
260
|
+
const ya = yAt(Math.max(Math.min(ax, bx), x0));
|
|
261
|
+
const yb = yAt(Math.min(Math.max(ax, bx), x1));
|
|
262
|
+
if (Math.max(ya, yb) >= y0 && Math.min(ya, yb) <= y1) return true;
|
|
263
|
+
}
|
|
264
|
+
return false;
|
|
265
|
+
}
|
|
266
|
+
function placeStacked(node, line, fx) {
|
|
267
|
+
const layer = node.parentElement;
|
|
268
|
+
if (!layer) return;
|
|
269
|
+
const [W, H, w, h] = [layer.clientWidth, layer.clientHeight, node.offsetWidth, node.offsetHeight];
|
|
270
|
+
if (W <= 0 || H <= 0) return;
|
|
271
|
+
const pts = line().map(([x, y]) => [x * W, y * H]);
|
|
272
|
+
const slid = fx * (W - w);
|
|
273
|
+
const room = (left) => Math.min(Math.max(left, 0), Math.max(W - w, 0));
|
|
274
|
+
const lefts = [slid, room(fx * W + CLEAR * 2), room(fx * W - CLEAR * 2 - w)];
|
|
275
|
+
const tops = [0, Math.max(H - h, 0)];
|
|
276
|
+
const fit = lefts.flatMap((left) => tops.map((top) => ({ left, top, w, h }))).find((box) => !lineHits(pts, box));
|
|
277
|
+
if (!fit) {
|
|
278
|
+
node.style.top = `${H + CLEAR}px`;
|
|
279
|
+
return;
|
|
280
|
+
}
|
|
281
|
+
node.style.top = `${fit.top}px`;
|
|
282
|
+
node.style.marginLeft = `${fit.left - slid}px`;
|
|
283
|
+
}
|
|
284
|
+
function fitReadout(node, line, fx) {
|
|
248
285
|
const overflows = () => node.scrollWidth > node.clientWidth;
|
|
249
286
|
node.removeAttribute("data-tight");
|
|
250
287
|
node.removeAttribute("data-stacked");
|
|
288
|
+
if (line !== null) {
|
|
289
|
+
node.style.removeProperty("top");
|
|
290
|
+
node.style.removeProperty("margin-left");
|
|
291
|
+
}
|
|
251
292
|
if (!overflows()) return;
|
|
252
293
|
node.setAttribute("data-tight", "");
|
|
253
|
-
if (overflows())
|
|
294
|
+
if (!overflows()) return;
|
|
295
|
+
node.setAttribute("data-stacked", "");
|
|
296
|
+
if (line !== null) placeStacked(node, line, fx);
|
|
254
297
|
}
|
|
255
298
|
function Sparkline(props) {
|
|
256
299
|
const {
|
|
@@ -332,15 +375,30 @@ function Sparkline(props) {
|
|
|
332
375
|
} : null;
|
|
333
376
|
const beside = at === null ? null : at.fx > 0.5 ? "left" : "right";
|
|
334
377
|
const shown = at !== null;
|
|
378
|
+
const fxRef = useRef(0);
|
|
335
379
|
useLayoutEffect(() => {
|
|
336
|
-
|
|
337
|
-
}
|
|
380
|
+
fxRef.current = at?.fx ?? 0;
|
|
381
|
+
});
|
|
382
|
+
const fitRef = useRef(() => {
|
|
383
|
+
});
|
|
384
|
+
useLayoutEffect(() => {
|
|
385
|
+
const line = hosted && mark === "line" && model !== null ? () => model.rows.flatMap(
|
|
386
|
+
(r, i) => r.v === null ? [] : [
|
|
387
|
+
[
|
|
388
|
+
(i - model.frame.x[0]) / (model.frame.x[1] - model.frame.x[0]),
|
|
389
|
+
(model.frame.y[1] - r.v) / (model.frame.y[1] - model.frame.y[0])
|
|
390
|
+
]
|
|
391
|
+
]
|
|
392
|
+
) : null;
|
|
393
|
+
fitRef.current = () => {
|
|
394
|
+
if (readoutRef.current !== null) fitReadout(readoutRef.current, line, fxRef.current);
|
|
395
|
+
};
|
|
396
|
+
fitRef.current();
|
|
397
|
+
}, [active, at?.label, at?.value, beside, hosted, mark, model]);
|
|
338
398
|
useEffect(() => {
|
|
339
399
|
const layer = readoutRef.current?.parentElement;
|
|
340
400
|
if (!shown || !layer || typeof ResizeObserver === "undefined") return;
|
|
341
|
-
const observer = new ResizeObserver(() =>
|
|
342
|
-
if (readoutRef.current !== null) fitReadout(readoutRef.current);
|
|
343
|
-
});
|
|
401
|
+
const observer = new ResizeObserver(() => fitRef.current());
|
|
344
402
|
observer.observe(layer);
|
|
345
403
|
return () => observer.disconnect();
|
|
346
404
|
}, [shown]);
|
|
@@ -93,21 +93,64 @@
|
|
|
93
93
|
min-height: inherit;
|
|
94
94
|
}
|
|
95
95
|
|
|
96
|
+
/*
|
|
97
|
+
* A pending plot in the loaded shape (`state.tsx`): an axis baseline and a few bar ghosts in a
|
|
98
|
+
* neutral tone, so a loading card reads as the chart it will be rather than a blank plate. Heights
|
|
99
|
+
* are constants, so the server HTML is the client's. 18% ink over the panel is the tone of the
|
|
100
|
+
* facts skeleton (`chart-card.module.css`).
|
|
101
|
+
*/
|
|
102
|
+
.ghost {
|
|
103
|
+
box-sizing: border-box;
|
|
104
|
+
display: flex;
|
|
105
|
+
align-items: flex-end;
|
|
106
|
+
gap: 5%;
|
|
107
|
+
width: 100%;
|
|
108
|
+
height: 100%;
|
|
109
|
+
padding: 12px 4px 0;
|
|
110
|
+
/* The axis baseline: a 1px line painted under the ghosts, not a border (the divider law inventories those). */
|
|
111
|
+
background: linear-gradient(
|
|
112
|
+
color-mix(in srgb, var(--vx-ink) 24%, var(--vx-surface-panel)),
|
|
113
|
+
color-mix(in srgb, var(--vx-ink) 24%, var(--vx-surface-panel))
|
|
114
|
+
)
|
|
115
|
+
bottom / 100% 1px no-repeat;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.ghostBar {
|
|
119
|
+
flex: 1 1 0;
|
|
120
|
+
min-width: 0;
|
|
121
|
+
border-radius: 3px 3px 0 0;
|
|
122
|
+
background: color-mix(in srgb, var(--vx-ink) 18%, var(--vx-surface-panel));
|
|
123
|
+
}
|
|
124
|
+
|
|
96
125
|
/*
|
|
97
126
|
* The engine paints its tooltip rows as a grid of `.55rem | minmax(0, 1fr) | auto` with inline
|
|
98
127
|
* styles and `overflow-wrap: anywhere` on the card, so a narrow tooltip (a 390 viewport, a pointer
|
|
99
128
|
* near an edge) squeezes the name column to one character per line. The name keeps a floor and
|
|
100
|
-
* never wraps
|
|
101
|
-
* portalled out of the chart's tree, hence the global class names.
|
|
102
|
-
* engine's own values are inline.
|
|
129
|
+
* wraps at word breaks when it must; the figure never wraps and never ends in an ellipsis, it stays
|
|
130
|
+
* right-aligned. The tooltip is portalled out of the chart's tree, hence the global class names.
|
|
131
|
+
* `!important` because the engine's own values are inline.
|
|
103
132
|
*/
|
|
104
133
|
:global(.ts-chart-tooltip__row) {
|
|
105
|
-
grid-template-columns: 0.55rem minmax(6rem,
|
|
134
|
+
grid-template-columns: 0.55rem minmax(6rem, 1fr) auto !important;
|
|
106
135
|
}
|
|
107
136
|
|
|
108
137
|
:global(.ts-chart-tooltip__row > span:nth-child(2)) {
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
138
|
+
overflow-wrap: break-word;
|
|
139
|
+
white-space: normal;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
:global(.ts-chart-tooltip__row > span:nth-child(3)) {
|
|
112
143
|
white-space: nowrap;
|
|
113
144
|
}
|
|
145
|
+
|
|
146
|
+
/* Opaque in both schemes: `--vx-tooltip-bg` is translucent in dark and the card's footer ghosts
|
|
147
|
+
* through a tooltip that opens over it (a slotted `Bars`). The tint is layered over the elevated
|
|
148
|
+
* surface, so a consumer's `tooltipBg` and `--basalt-tooltip-surface` still colour it. The engine's
|
|
149
|
+
* own value is inline. */
|
|
150
|
+
:global(.ts-chart-tooltip) {
|
|
151
|
+
background: linear-gradient(
|
|
152
|
+
var(--basalt-tooltip-surface, var(--vx-tooltip-bg)),
|
|
153
|
+
var(--basalt-tooltip-surface, var(--vx-tooltip-bg))
|
|
154
|
+
)
|
|
155
|
+
var(--vx-surface-elevated) !important;
|
|
156
|
+
}
|