basalt-ui 2.14.0 → 2.15.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 +40 -0
- package/MIGRATING.md +19 -13
- package/agent/agents/basalt-design-reviewer.md +83 -0
- package/agent/rules/basalt-batteries.md +1 -2
- package/agent/rules/basalt-charts.md +1 -1
- package/agent/rules/basalt-controls.md +3 -3
- package/agent/rules/basalt-mantine.md +1 -2
- package/agent/rules/basalt-state.md +1 -2
- package/agent/rules/basalt-tokens.md +1 -3
- package/agent/skills/basalt-design/SKILL.md +26 -8
- package/agent/templates/AGENTS-block.md.tpl +7 -0
- package/configs/oxlint-plugin.js +39 -2
- package/configs/oxlint-plugin.test.ts +48 -0
- package/dist/charts/legend.d.ts +4 -4
- package/dist/cli/board-freshness.d.ts +25 -0
- package/dist/cli/board-freshness.d.ts.map +1 -0
- package/dist/cli/board-freshness.js +88 -0
- package/dist/cli/doctor.d.ts +2 -1
- package/dist/cli/doctor.d.ts.map +1 -1
- package/dist/cli/doctor.js +3 -1
- package/dist/cli/help.d.ts.map +1 -1
- package/dist/cli/help.js +9 -3
- package/dist/cli/index.d.ts +15 -1
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +57 -7
- package/dist/cli/init.d.ts.map +1 -1
- package/dist/cli/init.js +6 -1
- package/dist/cli/shot/board.d.ts +5 -0
- package/dist/cli/shot/board.d.ts.map +1 -0
- package/dist/cli/shot/board.js +96 -0
- package/dist/cli/shot/capture.d.ts +59 -0
- package/dist/cli/shot/capture.d.ts.map +1 -0
- package/dist/cli/shot/capture.js +473 -0
- package/dist/cli/shot/index.d.ts +45 -0
- package/dist/cli/shot/index.d.ts.map +1 -0
- package/dist/cli/shot/index.js +289 -0
- package/dist/cli/shot/measure.d.ts +28 -0
- package/dist/cli/shot/measure.d.ts.map +1 -0
- package/dist/cli/shot/measure.js +176 -0
- package/dist/cli/shot/playwright.d.ts +101 -0
- package/dist/cli/shot/playwright.d.ts.map +1 -0
- package/dist/cli/shot/playwright.js +60 -0
- package/dist/cli/shot/serve.d.ts +6 -0
- package/dist/cli/shot/serve.d.ts.map +1 -0
- package/dist/cli/shot/serve.js +33 -0
- package/dist/cli/shot/types.d.ts +97 -0
- package/dist/cli/shot/types.d.ts.map +1 -0
- package/dist/cli/shot/types.js +17 -0
- package/dist/cli/sync.d.ts.map +1 -1
- package/dist/cli/sync.js +2 -1
- package/dist/surfaces.d.ts +2 -0
- package/dist/surfaces.d.ts.map +1 -1
- package/dist/surfaces.js +2 -0
- package/llms.txt +2 -2
- package/package.json +1 -1
- package/src/charts/legend.tsx +4 -4
- package/src/cli/board-freshness.ts +132 -0
- package/src/cli/doctor.ts +10 -1
- package/src/cli/help.ts +14 -2
- package/src/cli/index.ts +80 -10
- package/src/cli/init.ts +8 -1
- package/src/cli/shot/board.ts +154 -0
- package/src/cli/shot/capture.ts +650 -0
- package/src/cli/shot/index.ts +362 -0
- package/src/cli/shot/measure.ts +225 -0
- package/src/cli/shot/playwright.ts +152 -0
- package/src/cli/shot/serve.ts +35 -0
- package/src/cli/shot/types.ts +91 -0
- package/src/cli/sync.ts +2 -1
- package/src/surfaces.ts +5 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,43 @@
|
|
|
1
|
+
# [2.15.0](https://github.com/jkrumm/basalt-ui/compare/v2.14.0...v2.15.0) (2026-10-16)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* address review of the scenario route and seeds ([10c6abd](https://github.com/jkrumm/basalt-ui/commit/10c6abdaae7aa7b97bf31c66f88dac6f5ecff1a2))
|
|
7
|
+
* align the reviewer's Craft numbering with SPEC and name accent leaks ([9213182](https://github.com/jkrumm/basalt-ui/commit/921318228048bf01198c11889d7edbc26174fec2))
|
|
8
|
+
* crop the tooltip at its settled size, not mid-animation ([0aa00e8](https://github.com/jkrumm/basalt-ui/commit/0aa00e8c26346c6a2003a133a6a31064885aa9b8))
|
|
9
|
+
* expect the reviewer's seven Craft items from SPEC 8.1 ([24cea30](https://github.com/jkrumm/basalt-ui/commit/24cea30b2c40b2add5b9dcd2eaf62de9d6c87a48))
|
|
10
|
+
* give the calibration seeds neutral route ids ([d8b4b3f](https://github.com/jkrumm/basalt-ui/commit/d8b4b3fe3375134b419e71bb2b9028bbb0d72387))
|
|
11
|
+
* give the good seed a focusable table and no dead tooltip target ([91767d5](https://github.com/jkrumm/basalt-ui/commit/91767d59f4aa97e7fe8247d73ad4ef9b0f9f28ca))
|
|
12
|
+
* give the good seed a stated share denominator and no row wrap ([fde2537](https://github.com/jkrumm/basalt-ui/commit/fde253707d2aae020e9f6deba11bc883a532774c))
|
|
13
|
+
* harden shot's out-dir swap, file names and metrics ([c5f17e6](https://github.com/jkrumm/basalt-ui/commit/c5f17e6274fb33ab43bd707fab4b1a08ea088a0e))
|
|
14
|
+
* harden the stale-board walk and move doctor's design section ([310f3bb](https://github.com/jkrumm/basalt-ui/commit/310f3bbad21e74b652026a14091af6680b9071e8))
|
|
15
|
+
* hold an opened tooltip in the hover and focus crops ([33c31df](https://github.com/jkrumm/basalt-ui/commit/33c31dfebc55d5bcbd62d6530acfd3bbfdff9775))
|
|
16
|
+
* keep primary buttons and focus rings out of the reviewer's accent leaks ([d85456e](https://github.com/jkrumm/basalt-ui/commit/d85456ed134317a89819335e2941e34973cb64df))
|
|
17
|
+
* make shot safe to re-run, and record the theme scale ([0630f36](https://github.com/jkrumm/basalt-ui/commit/0630f3675a7dbda1c2e807df99ed91d2a053e31b))
|
|
18
|
+
* make the good calibration seed sum to its whole, drop its info glyph ([41ee04f](https://github.com/jkrumm/basalt-ui/commit/41ee04f518e730c45abf38999551f2a75173882b))
|
|
19
|
+
* move the data-stress query tabs into Section.tabs ([d0d26d1](https://github.com/jkrumm/basalt-ui/commit/d0d26d1cd35cb02ec915473719659632d3d4b1c3))
|
|
20
|
+
* pick only the tooltip an action opened and sweep stale tmp safely ([0b6208a](https://github.com/jkrumm/basalt-ui/commit/0b6208a8d2e3d1f75a9c476e5cdb3a4b0e8057e5))
|
|
21
|
+
* pin the seed's ticks and tidy S4 copy after review round 2 ([de90bd5](https://github.com/jkrumm/basalt-ui/commit/de90bd5431559558a9e0c9956fc63fb9a506eac7))
|
|
22
|
+
* read basalt's own scale in shot and drop the grid from the reviewer ([637c519](https://github.com/jkrumm/basalt-ui/commit/637c5196eda8a6cc469e33147bd588e04a6bb7d3))
|
|
23
|
+
* reduce the good calibration board to its single metric card ([d1f97b3](https://github.com/jkrumm/basalt-ui/commit/d1f97b3e6c489c47450578cc0945e9c7470b9830))
|
|
24
|
+
* state the reviewer's accent sites exactly as the design law lists them ([4fd0e66](https://github.com/jkrumm/basalt-ui/commit/4fd0e66a35688cf73ee3cb01e242defe7eba9546))
|
|
25
|
+
* treat unreadable roots as unknown and require three design rounds ([27f6f24](https://github.com/jkrumm/basalt-ui/commit/27f6f248a46b65b1fbc2bca9fffc8e72a7f1343e))
|
|
26
|
+
* use a recent-days table on the good calibration board ([a3107de](https://github.com/jkrumm/basalt-ui/commit/a3107de4bb3d649f0ef4cbef4b5422a5e722465b))
|
|
27
|
+
* write a contact sheet per anchor and read component-scoped scale tokens ([951b832](https://github.com/jkrumm/basalt-ui/commit/951b83273b441baa40b1775327a5cb3227ac454c))
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
### Features
|
|
31
|
+
|
|
32
|
+
* add basalt-ui shot, a route renderer for design rounds ([1d4d520](https://github.com/jkrumm/basalt-ui/commit/1d4d520f784db6e7f6ee71c3f4f36f00103f3b4e))
|
|
33
|
+
* add the scenario route with the S4 spend fixture ([7550408](https://github.com/jkrumm/basalt-ui/commit/755040835f76bf3a087c8ab43371847bb721b53c))
|
|
34
|
+
* drop the untaggable design-procedure rule line, fix the placement test ([37b34aa](https://github.com/jkrumm/basalt-ui/commit/37b34aa0c3c7acba6d98d1cfda65e5710f5edb50))
|
|
35
|
+
* harden rule path rendering, the ViewTabs guard and the reviewer ([6eda9f8](https://github.com/jkrumm/basalt-ui/commit/6eda9f89d707871d5b20984fdf90f72b5cee9365))
|
|
36
|
+
* install the design reviewer and render rule paths from roots ([0044759](https://github.com/jkrumm/basalt-ui/commit/0044759f9be827d1d7cdfb993b4690c9ca88ae1a))
|
|
37
|
+
* map the design table to the shipped chart kinds ([147cb88](https://github.com/jkrumm/basalt-ui/commit/147cb88e651b4fbf17a64d5abfd031765a7ec8e3))
|
|
38
|
+
* render rule paths from the roots a sync would use, harden the edges ([47611ca](https://github.com/jkrumm/basalt-ui/commit/47611ca68226ba4086decc30c27000247e54d20a))
|
|
39
|
+
* ship the design-round procedure and the stale-board notice ([2a7205b](https://github.com/jkrumm/basalt-ui/commit/2a7205b267b1aeb857030ab1a42448289726dae5))
|
|
40
|
+
|
|
1
41
|
# [2.14.0](https://github.com/jkrumm/basalt-ui/compare/v2.13.3...v2.14.0) (2026-10-16)
|
|
2
42
|
|
|
3
43
|
|
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 | 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 | — | — | — | — | — | — | — | — | — | — | — |
|
|
72
|
-
| **charts** (`./charts`) | — | phone tier, `curve`, formatters, `state`, log axis (§ preamble) | `ChartState.empty: string`, `AxisBottomNumeric` (§ Additions) | responsive `height`, `legend.maxRows` (§ Charts) | `height` reaches the kinds; `maxRows` beats the `fill` fit (§ Charts) | — | container-class tier + `height` keys (§ 1.31.0) | — | `ResponsiveChartHeight` `sm` → key (§ Container recipes) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | `BandSpan.absentFraction` + `absentState` (§ 2.8.0) | — | — | — | — | — | — | — | — | — | — | — | — | — |
|
|
73
|
-
| **shell** (`.`) | — | scrollport, region seams, **the brand left the sidebar** (§§ scrollport, brand, Shell) | `PageTitle`, `BasaltDevDock`, `useBreakpoint` (§ Additions) | More popover, aside pill, the responsive gutter, `useBasaltSpacing` (§ Chrome) | — | — | `theme.breakpoints` derived, `useSizeClass`, `data-basalt-host`, `useBreakpoint` on notice (§ 1.31.0) | `useBreakpoint` removal → 1.33.0; `useSizeClass` is shell-only (§ 1.32.0) | shell-less `shell/` gutter, `AppShell` breakpoints, `useSizeClass` for overlays (§§ Shell-less, `useSizeClass`) | — | `useBreakpoint` removed (§ 1.34.0) | — | — | `useCoarsePointer()` (§ `useCoarsePointer()`) | — | — | — | — | | content gutter 16, block 8 from `sm` (§ 1.38.1) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | `BasaltProvider` embedded mode, `spotlight` (§ 2.8.0) | — | — | — | — | — | — | — | — | — | — | — | — | — |
|
|
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) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — |
|
|
75
|
-
| **forms** (`./forms`) | — | `field` → `inputProps`, **`inputProps` drops `key`**, the layout tier (§ `inputProps`) | `field` DELETED — and the `--fix` recipe no longer works (§ Consolidation) | — | — | — | — | — | `FormGroup` row no longer stretches (§ Fixes) | — | — | — | — | the layout + `useForm`/`schemaResolver` deprecated, removed 1.37.0 (§ The form layout moves) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | § 1.x compatibility layer removed | — | — | — | — | — | — | — | — | — | — | — |
|
|
76
|
-
| **data** (`./data/table`) | — | root is a `<div>`, row selection, `getItemKey` required (§ `basalt-ui/data`) | `./data` + `./query` + `./connectivity` dropped (§ Consolidation) | — | — | — | — | — | `renderCard` documented (§ `renderCard`) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — |
|
|
77
|
-
| **dashboard** (`.`) | `StatCard`: `unit`, `breakdown`, delta format (§ `StatCard`) | `StatGroup`, `WidgetGrid`, query-aware `StatCard` — additive | — | **the column law keys on the CONTAINER; `cols={4}` is 2-up at `sm`** (§ Dashboard) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | § 1.x compatibility layer removed | — | — | — | — | — | — | — | — | — | — | — |
|
|
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 | — | — | — | — | — | — | — | — | — | — | — |
|
|
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 | 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 | — | — | — | — | — | — | — | — | — | — | — | — |
|
|
72
|
+
| **charts** (`./charts`) | — | phone tier, `curve`, formatters, `state`, log axis (§ preamble) | `ChartState.empty: string`, `AxisBottomNumeric` (§ Additions) | responsive `height`, `legend.maxRows` (§ Charts) | `height` reaches the kinds; `maxRows` beats the `fill` fit (§ Charts) | — | container-class tier + `height` keys (§ 1.31.0) | — | `ResponsiveChartHeight` `sm` → key (§ Container recipes) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | `BandSpan.absentFraction` + `absentState` (§ 2.8.0) | — | — | — | — | — | — | — | — | — | — | — | — | — | — |
|
|
73
|
+
| **shell** (`.`) | — | scrollport, region seams, **the brand left the sidebar** (§§ scrollport, brand, Shell) | `PageTitle`, `BasaltDevDock`, `useBreakpoint` (§ Additions) | More popover, aside pill, the responsive gutter, `useBasaltSpacing` (§ Chrome) | — | — | `theme.breakpoints` derived, `useSizeClass`, `data-basalt-host`, `useBreakpoint` on notice (§ 1.31.0) | `useBreakpoint` removal → 1.33.0; `useSizeClass` is shell-only (§ 1.32.0) | shell-less `shell/` gutter, `AppShell` breakpoints, `useSizeClass` for overlays (§§ Shell-less, `useSizeClass`) | — | `useBreakpoint` removed (§ 1.34.0) | — | — | `useCoarsePointer()` (§ `useCoarsePointer()`) | — | — | — | — | | content gutter 16, block 8 from `sm` (§ 1.38.1) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | `BasaltProvider` embedded mode, `spotlight` (§ 2.8.0) | — | — | — | — | — | — | — | — | — | — | — | — | — | — |
|
|
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) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — |
|
|
75
|
+
| **forms** (`./forms`) | — | `field` → `inputProps`, **`inputProps` drops `key`**, the layout tier (§ `inputProps`) | `field` DELETED — and the `--fix` recipe no longer works (§ Consolidation) | — | — | — | — | — | `FormGroup` row no longer stretches (§ Fixes) | — | — | — | — | the layout + `useForm`/`schemaResolver` deprecated, removed 1.37.0 (§ The form layout moves) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | § 1.x compatibility layer removed | — | — | — | — | — | — | — | — | — | — | — | — |
|
|
76
|
+
| **data** (`./data/table`) | — | root is a `<div>`, row selection, `getItemKey` required (§ `basalt-ui/data`) | `./data` + `./query` + `./connectivity` dropped (§ Consolidation) | — | — | — | — | — | `renderCard` documented (§ `renderCard`) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — |
|
|
77
|
+
| **dashboard** (`.`) | `StatCard`: `unit`, `breakdown`, delta format (§ `StatCard`) | `StatGroup`, `WidgetGrid`, query-aware `StatCard` — additive | — | **the column law keys on the CONTAINER; `cols={4}` is 2-up at `sm`** (§ Dashboard) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | § 1.x compatibility layer removed | — | — | — | — | — | — | — | — | — | — | — | — |
|
|
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 | — | — | — | — | — | — | — | — | — | — | — | — |
|
|
81
81
|
|
|
82
82
|
---
|
|
83
83
|
|
|
@@ -1046,6 +1046,12 @@ 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.15.0 — the reviewer subagent and the ViewTabs law
|
|
1050
|
+
|
|
1051
|
+
- **Behaviour: `basalt/bound-control-outside-home` now reports a `ViewTabs` in every `PageBar` slot except `tabs` (`actions`, `filters`, `filtersEnd`, `sync`), in `Section.actions`, or inside a `FilterSet`.** It was accepted there (any slot was a home). A `ViewTabs` that switches a page or a section belongs in a `tabs` slot (`PageBar.tabs`, `Section.tabs`); one that switches only a card's view belongs in that `ChartCard` / `WidgetHeader` `actions` slot (still allowed). **Fix: move it to `tabs`.** The lint is structural: only a `ViewTabs` written inside the slot (JSX attribute or object spread) is seen; one passed through a hoisted `const` is not.
|
|
1052
|
+
- **Behaviour: `init`/`sync` render every installed rule's `paths:` from `basalt.roots`** — one `'<root>/**'` per root, with a leading `./` and trailing `/` stripped. Before, every rule shipped the fixed globs `src/**`, `apps/**/src/**` (and `packages/**/src/**` in `basalt-tokens.md`), and `basalt-charts.md` matched only `**/charts/**`. With `basalt.roots` unset, `init`/`sync` write the inferred roots first (a workspace repo gets each UI package's `src/`), so rules then load for exactly those roots; with nothing inferable they keep `src/**`, `apps/**/src/**`, `packages/**/src/**`. **Remedy: set `"basalt": { "roots": [...] }` to every directory the rules should load for** (a root you leave out stops loading them). `sync --check` reports the rules as drifted until you run `sync`.
|
|
1053
|
+
- **Added: `sync` / `init` install the `basalt-design-reviewer` subagent** at `.claude/agents/basalt-design-reviewer.md`, and the managed AGENTS.md block names the skills and the subagent. A `.claude/agents/basalt-*.md` that basalt stops shipping is retired like a rule. **Restart a running Claude Code session** after `sync`: subagents are read at session start, so the new one is not visible until then.
|
|
1054
|
+
|
|
1049
1055
|
## 2.14.0 — the format layer, the filter family and chart fixes
|
|
1050
1056
|
|
|
1051
1057
|
### `basalt-ui/format`
|
|
@@ -1068,7 +1074,7 @@ release renames it and opens a new one here._
|
|
|
1068
1074
|
### Charts
|
|
1069
1075
|
|
|
1070
1076
|
- **Fix: a follower chart draws nothing when the shared cursor's x is outside its x-domain.** Since 2.13.2 a follower clamped the leader's cursor onto its edge datum, so a chart covering 20:00–08:00 drew a dot at 12:00 the next day that was not the cursor's hour. The domain is the one the chart renders (`xDomain`, else the data extent); a cursor exactly on an edge still draws, and the leader is unaffected. No crosshair, no dots and no tooltip outside the domain, on `CartesianChart`, its kinds and `DualPanel`. Pass one `xDomain` to charts that should cover the same range.
|
|
1071
|
-
- **Fix: the line legend key reads as a dash at every size.** `LINE_SWATCH` in `legend.tsx`: below 480px the key is 14px (was 8px, dash `2.5 2`, which read as two dots) with dash `4 3`; from 480px it is 16px (was 12px) with dash `4 3`. The dots-mode gap between entries goes 38 → 30px to pay for it, so a four-entry legend still fits one row at 390px. Selectors or snapshots that expected an 8px or 12px line key match the new widths.
|
|
1077
|
+
- **Fix: the line legend key reads as a dash at every size.** `LINE_SWATCH` in `legend.tsx`: below 480px of chart width (a container query on the chart, not the viewport) the key is 14px (was 8px, dash `2.5 2`, which read as two dots) with dash `4 3`; from 480px of chart width it is 16px (was 12px) with dash `4 3`. The dots-mode gap between entries goes 38 → 30px to pay for it, so a four-entry legend still fits one row at 390px. Selectors or snapshots that expected an 8px or 12px line key match the new widths.
|
|
1072
1078
|
|
|
1073
1079
|
## 2.13.3 — the router defaults need no provider
|
|
1074
1080
|
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: basalt-design-reviewer
|
|
3
|
+
description: Fresh design scorer for a `basalt-ui shot` out dir — scores every component on Craft, Expression and Communication and cites each defect by crop. Use after a shot round; never for the agent that wrote the UI to grade itself.
|
|
4
|
+
tools: Read, Grep, Glob
|
|
5
|
+
model: inherit
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
You score a rendered UI. You did not build it. Do not read the app's source to excuse a defect: judge only what the shots show.
|
|
9
|
+
|
|
10
|
+
## Input
|
|
11
|
+
|
|
12
|
+
A shot out dir (default `.basalt/shots`, or the `out` in `.basalt/shots/last.json`):
|
|
13
|
+
|
|
14
|
+
- `board.html` — every crop, labelled by component, scheme, viewport and state.
|
|
15
|
+
- `metrics.json` — per anchor: `padding`, `gap`, `radius`, `nested`, `fontSizes`, `emptyRatio`, `contrast`, `sheet`; `scale` (the theme's resolved spacing, radius and font-size steps) and `scaleError`; `shots[]` with each file's `status`.
|
|
16
|
+
- `png/*.png` — the crops, images you can see. Each anchor has a contact sheet (`sheet`: one image holding that anchor's crop for every state × scheme × viewport, each labelled, with the status text where a crop does not exist) and each route a full-page shot (`_page`). Score every anchor in both schemes and both viewports.
|
|
17
|
+
- A layout-suite result, only if the out dir has one.
|
|
18
|
+
|
|
19
|
+
A shot with status `not-declared` or `skipped` (mobile hover and tooltip: touch has no hover, by design) is not a defect. A missing hover, focus or tooltip crop for an anchor that has such a target is (Craft 7).
|
|
20
|
+
|
|
21
|
+
## Fail closed
|
|
22
|
+
|
|
23
|
+
- `metrics.json` missing or unreadable → the whole run is `fail`: "metrics.json unreadable". Do not score by eye instead.
|
|
24
|
+
- Zero anchors → the whole run is `fail`: "no anchors". A shot with status `error` → its component is `fail`, naming the file.
|
|
25
|
+
- Read every anchor's `sheet` and every `_page` shot, whatever else you open; open single crops only for detail. A component whose sheet you did not read, or whose `sheet` is absent, is `unverified`.
|
|
26
|
+
- `scaleError` set, or `scale` absent: Craft 1 is `unverified` for every component.
|
|
27
|
+
- A [measured] item whose field is missing for a component cannot be checked: it is `unverified`, and `unverified` counts as fail. Name the missing field.
|
|
28
|
+
|
|
29
|
+
## Scoring
|
|
30
|
+
|
|
31
|
+
Score per component, then add one line per page for the page items (Communication 5). One failed item fails the component; only all-pass is a pass. Cite items as `Craft 3`, `Expression 2`.
|
|
32
|
+
|
|
33
|
+
### Craft
|
|
34
|
+
|
|
35
|
+
1. **[measured]** Every inset, gap and radius is a step in `metrics.json` `scale`; nested surfaces step by at least 3 px of radius. No `scale` → `unverified`. Never invent steps.
|
|
36
|
+
2. **[measured]** No more than three font sizes inside one component: `fontSizes` with more than 3 distinct values fails.
|
|
37
|
+
3. No empty region of 40 % or more of the component's height — **[measured]**: `emptyRatio` ≥ 0.4 fails; no dense-list row wraps at 390 — judged from the 390 crop.
|
|
38
|
+
4. One ring per surface, no bare hairline borders on cards, no accent on chrome: look at every crop for an accent hue on a tab underline, a selected row, a secondary button, a card ring or a solid-filled badge. The accent sites are the primary data series, active-nav icons and active child labels, links, primary buttons, focus rings and the leader bar in meters; chrome (borders, inactive states, backgrounds, general icons) stays neutral, and selection state (active nav row, selected tab) never takes the accent.
|
|
39
|
+
5. **[measured]** Text and meaningful marks meet contrast in both schemes (a non-empty `contrast.failures` fails); nothing is told apart only by colour.
|
|
40
|
+
6. Nothing overflows, clips or truncates a value at 1440 or 390.
|
|
41
|
+
7. Hover, focus and tooltip states are present in the shots; focus is the 2 px outline.
|
|
42
|
+
|
|
43
|
+
### Expression
|
|
44
|
+
|
|
45
|
+
1. Name the data's shape and the encoding used; both must match a row of the encoding table (the catalogue) in the `/basalt-design` skill.
|
|
46
|
+
2. Every visual answers the question its caption names; a decorative visual fails.
|
|
47
|
+
3. A hue appears only for a trend, a status or a category; a single metric is neutral. A delta is neutral text with a trend glyph: a solid-filled badge or coloured fill on a delta fails here and Craft 4.
|
|
48
|
+
4. A number with a target shows the target; a number with a history shows it; a whole with parts shows the parts.
|
|
49
|
+
5. No axis repeats a label; ticks fit the span.
|
|
50
|
+
|
|
51
|
+
### Communication
|
|
52
|
+
|
|
53
|
+
1. No banned filler (below).
|
|
54
|
+
2. Every number carries its unit inline; a rate or total carries its period.
|
|
55
|
+
3. A number whose definition, period or source is not stated on the surface has a tooltip or a one-line explanation; a count of visible items has none.
|
|
56
|
+
4. Titles are precise nouns with their scope ("Ride distance, 7 days"), not categories ("Metrics").
|
|
57
|
+
5. **[page]** A page is not three rows of KPI cards, and not a single table when its data has one of the catalogue's shapes.
|
|
58
|
+
6. Empty and error states say why and what to do.
|
|
59
|
+
|
|
60
|
+
### Banned filler
|
|
61
|
+
|
|
62
|
+
Fail any of these on sight, in any language the app ships:
|
|
63
|
+
|
|
64
|
+
- Narration of the UI: "Here you can see…", "This chart shows…", "Below is…", "The following…".
|
|
65
|
+
- Welcome and marketing tone: "Welcome to…", "at a glance", "powerful", "seamless", "insights", "unlock".
|
|
66
|
+
- A subtitle that restates the title, or a decorative subtitle with no number or fact in it.
|
|
67
|
+
- Generic titles: "Overview", "Metrics", "Data", "Stats", "Details" on their own.
|
|
68
|
+
- A bare "Total", "Count" or "Value" with no noun.
|
|
69
|
+
- "No data", "Nothing here", "N/A" (use the em dash for a missing value, and say why when a whole surface is empty).
|
|
70
|
+
- "Loading…" text where a skeleton belongs; "Click here"; exclamation marks; emoji in chrome.
|
|
71
|
+
- Units spelled out at length in a dense surface ("kilometres") where the unit symbol reads.
|
|
72
|
+
|
|
73
|
+
## Output
|
|
74
|
+
|
|
75
|
+
Strict. Nothing before the table, no praise, no summary, no code rewrites. Name the defect, not the fix.
|
|
76
|
+
|
|
77
|
+
1. A table, one row per component: `| component | verdict | failed items |` — `pass` or `fail`; failed items like `Craft 3, Communication 1`, or `—`. Add one `page` line per route for the page items.
|
|
78
|
+
Under it, one line per component: `Read: <sheet file>, <page shot files>, <any single crops opened>`.
|
|
79
|
+
2. Then, for EVERY failure, one line:
|
|
80
|
+
`<axis> <n> — <png file> (<scheme>, <viewport>, <state>) — <defect in one sentence>`
|
|
81
|
+
A [measured] item cites `metrics.json <anchor>` instead of a PNG; an `unverified` item names the missing input.
|
|
82
|
+
|
|
83
|
+
A failure you cannot cite from a crop or from `metrics.json` is not a failure.
|
|
@@ -2,8 +2,7 @@
|
|
|
2
2
|
source: basalt-ui
|
|
3
3
|
description: Where an interactive control lives and how it binds — homes, slots, store-bound filters and tabs, aside, sidebar blocks.
|
|
4
4
|
paths:
|
|
5
|
-
- 'src/**'
|
|
6
|
-
- 'apps/**/src/**'
|
|
5
|
+
- '**/src/**'
|
|
7
6
|
---
|
|
8
7
|
|
|
9
8
|
<!-- basalt:coverage -->
|
|
@@ -34,7 +33,8 @@ A control has one home and takes its state from a store field; the home sets its
|
|
|
34
33
|
## Binding
|
|
35
34
|
|
|
36
35
|
- A filter or tab takes `field={store.field.x}` and nothing else about state; `value`, `onChange` and `size` are type errors. [type ViewTabs]
|
|
37
|
-
- Filters are `RangeFilter`, `MultiSelectFilter`, `SelectFilter`, `SearchFilter`, `NumberFilter`, `ToggleFilter`, inside one `FilterSet` in `PageBar.filters
|
|
36
|
+
- Filters are `RangeFilter`, `MultiSelectFilter`, `SelectFilter`, `SearchFilter`, `NumberFilter`, `ToggleFilter`, inside one `FilterSet` in `PageBar.filters`. [type FilterSet]
|
|
37
|
+
- `ViewTabs` goes in a `tabs` slot (`PageBar.tabs`, `Section.tabs`) when it switches a page or section, or in a `ChartCard`/`WidgetHeader` `actions` slot when it switches only that card's view; every other `PageBar` slot, `Section.actions` and a `FilterSet` refuse it (the lint reads the slot it is written in, not a hoisted binding). [basalt/bound-control-outside-home]
|
|
38
38
|
- `FilterSet` folds overflow and the mobile `Filters (n)` sheet itself; never build either. [type FilterSet]
|
|
39
39
|
- Import `DateRangePicker` from `basalt-ui/controls-dates` and pass it as `RangeFilter` `customPicker`; never import `@mantine/dates` in a shared module. [type RangeFilter]
|
|
40
40
|
- Refresh is `SyncButton`: `scope="page"` in `PageBar.sync`, `scope="global"` in the shell's `globalActions`. [type SyncButton]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: basalt-design
|
|
3
|
-
description: Build or restyle dashboards and metric UIs in a basalt-ui app —
|
|
3
|
+
description: Build or restyle dashboards and metric UIs in a basalt-ui app — scenario, encoding, build, then rounds of screenshots scored by a reviewer subagent.
|
|
4
4
|
when_to_use: User is building or restyling dashboards, charts or metric UIs; tuning a palette; or says a UI looks inconsistent, over-colored or "AI default". Entry point for "make this look professional".
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -9,10 +9,28 @@ Method only; the law is `.claude/rules/basalt-*.md` and `./DESIGN.md`.
|
|
|
9
9
|
## Steps
|
|
10
10
|
|
|
11
11
|
1. Read `./DESIGN.md` and the rules `basalt-tokens.md`, `basalt-mantine.md`, `basalt-controls.md`, `basalt-charts.md`. No `DESIGN.md`: run `/basalt-app` first.
|
|
12
|
-
2.
|
|
13
|
-
3.
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
12
|
+
2. **Scenario first.** Write down realistic fixture data, the user's question, and the decision the view supports. Decide which metrics earn a hue (trend, status, separation; the rest neutral), the one primary action per view, each control's home (a `SettingsRow` preference via `createLocalStore`, never `useState`).
|
|
13
|
+
3. **Pick each encoding from the data's shape**, then the shipped composite (`StatCard`, `ChartCard`, `Section`, `WidgetHeader`, `BasaltDataTable`, `EmptyState`; a gap is reported, not routed around). Chart kinds and `ChartCard` import from `basalt-ui/charts`, `BasaltDataTable` from `basalt-ui/table`, the rest from `basalt-ui`:
|
|
14
|
+
|
|
15
|
+
| Data shape | Encoding | Component |
|
|
16
|
+
| ----------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------- |
|
|
17
|
+
| Single value with a trend | figure, text delta, axis-less sparkline along the card's bottom | `StatCard` + `sparkline` slot (`Sparkline`) |
|
|
18
|
+
| Value over time | line or stacked area | `Lines` / `StackedArea` in a `ChartCard` |
|
|
19
|
+
| Compare categories | bars | `Bars layout="grouped"` |
|
|
20
|
+
| Part of a whole, 2–6 parts | one segmented (stacked) bar, parts in order — not a donut plus a total card, not a row of N `StatCard`s | `Bars` (stacked, the default) |
|
|
21
|
+
| Distribution | small axis-less histogram | `Bars` in a `ChartCard` |
|
|
22
|
+
| Status over time | band strip; a heat grid for daily data | `BandStrip` / `Heatmap` |
|
|
23
|
+
| Many rows, several attributes | table, right-aligned mono figures | `BasaltDataTable` |
|
|
24
|
+
| Nothing yet / failed | why + what to do | `EmptyState` / the component's own state |
|
|
25
|
+
|
|
26
|
+
No row fits the data → say so; never default to a number in a box.
|
|
27
|
+
|
|
28
|
+
4. Build with Mantine primitives and the composites; every color from `VX.*` or a series token. Tune by eye in the theme lab (`dev.theme` Spotlight command, dev only) in both schemes, then bake values into the `derive` knobs of `createBasaltTheme` and series colors into `src/lib/series.ts`.
|
|
29
|
+
5. **Mark up for the board.** Tag each scored component `data-shot="<name>"`; hover and tooltip targets inside it get `data-shot-hover` / `data-shot-tooltip`. Declare supported states with `data-shot-states="empty loading error"` and render them when the `shot-state` URL param asks.
|
|
30
|
+
6. **Rounds, at least three.** Playwright is the app's dev dependency: `bun add -d playwright && bunx playwright install chromium`. Then:
|
|
31
|
+
- `basalt-ui shot <routes> --dist <built app>` (or `--base <url>` for a running server);
|
|
32
|
+
- hand the out dir (`.basalt/shots`) to the `basalt-design-reviewer` subagent by name; it reads each component's contact sheet (`png/*__sheet.png`) and every page shot;
|
|
33
|
+
- revise every failing item at its source, rebuild, and shoot again.
|
|
34
|
+
Boards stay local (gitignored); the scored verdict and notes are worth committing.
|
|
35
|
+
7. **Done** only when the reviewer passes every component, and never before round three: a pass earlier does not end the loop. After five failed rounds stop and show the owner the boards and the failing items.
|
|
36
|
+
8. Run the repo's own gate (e.g. `make check`); fix every finding at its source. `shot` captures desktop (1440) and mobile (390) in both schemes; check both.
|
|
@@ -18,6 +18,13 @@ the one exception. In a workspace: the app package's `node_modules/.bin/basalt-u
|
|
|
18
18
|
**Before guessing an import, read the installed `llms.txt`** at the install directory (in a workspace,
|
|
19
19
|
under the depending package; `basalt-ui doctor` prints where; a fresh worktree needs `bun install` first).
|
|
20
20
|
|
|
21
|
+
**Skills and subagent** (installed in `.claude/`; invoke by name):
|
|
22
|
+
|
|
23
|
+
- `/basalt-app`: scaffold, wire, upgrade or verify the app (`init`, `doctor`, `sync`).
|
|
24
|
+
- `/basalt-design`: build or restyle a screen — scenario, `basalt-ui shot` rounds, review, revise.
|
|
25
|
+
- `/basalt-charts`: add or extend a chart, register its series colors.
|
|
26
|
+
- `basalt-design-reviewer` (subagent): scores a `basalt-ui shot` out dir per component; run it after every shot round, never on your own work.
|
|
27
|
+
|
|
21
28
|
@./DESIGN.md
|
|
22
29
|
|
|
23
30
|
**Restraint override (supersedes `/frontend-design`).** This is a calm, data-dense professional
|
package/configs/oxlint-plugin.js
CHANGED
|
@@ -2133,6 +2133,12 @@ function spreadSlotOwnerBinding(property) {
|
|
|
2133
2133
|
return jsxRootName(owner.name)
|
|
2134
2134
|
}
|
|
2135
2135
|
|
|
2136
|
+
/** The slot's prop name, spelled as {@link slotOwnerBinding} reads it (`tabs=` or `{ 'tabs': … }`). */
|
|
2137
|
+
function slotAttrName(attr) {
|
|
2138
|
+
if (attr === undefined) return undefined
|
|
2139
|
+
return attr.type === 'Property' ? (attr.key?.name ?? attr.key?.value) : attr.name?.name
|
|
2140
|
+
}
|
|
2141
|
+
|
|
2136
2142
|
/** The home slot attribute that ENCLOSES `node`, or undefined. Stops at the attribute, never the element. */
|
|
2137
2143
|
function enclosingSlotAttribute(node) {
|
|
2138
2144
|
let current = node.parent
|
|
@@ -2324,6 +2330,7 @@ function createSlotContext(context) {
|
|
|
2324
2330
|
const attr = enclosingSlotAttribute(node)
|
|
2325
2331
|
return {
|
|
2326
2332
|
directOwner: attr === undefined ? undefined : slotOwnerBinding(attr),
|
|
2333
|
+
slotName: slotAttrName(attr),
|
|
2327
2334
|
declaratorName: enclosingDeclaratorName(node),
|
|
2328
2335
|
subtreeHosts: ancestorTagBindings(node, BASALT_HOST_TAGS),
|
|
2329
2336
|
}
|
|
@@ -2341,6 +2348,10 @@ function createSlotContext(context) {
|
|
|
2341
2348
|
}
|
|
2342
2349
|
return false
|
|
2343
2350
|
},
|
|
2351
|
+
/** The basalt EXPORTS of the subtree homes (`FilterSet`, `PageAside`, …) a captured node sits in. */
|
|
2352
|
+
hostExports(captured) {
|
|
2353
|
+
return captured.subtreeHosts.filter((b) => homes.has(b)).map((b) => homes.get(b))
|
|
2354
|
+
},
|
|
2344
2355
|
/** Does `name` resolve to a basalt home component in this file? */
|
|
2345
2356
|
isHome(name) {
|
|
2346
2357
|
return name !== undefined && homes.has(name)
|
|
@@ -3070,6 +3081,24 @@ const BOUND_CONTROL_OUTSIDE_HOME_MESSAGE =
|
|
|
3070
3081
|
`declared non-homes and never report. ${SHELL_LESS_HOME_HINT} ` +
|
|
3071
3082
|
'(basalt/bound-control-outside-home)'
|
|
3072
3083
|
|
|
3084
|
+
const VIEW_TABS_REFUSED_HOME_MESSAGE =
|
|
3085
|
+
'`ViewTabs` is not in its home. It switches a page or a section from a `tabs` slot ' +
|
|
3086
|
+
"(`PageBar.tabs`, `Section.tabs`), or one card's view from a `ChartCard` / `WidgetHeader` " +
|
|
3087
|
+
'`actions` slot; it is refused outside any slot, in every other `PageBar` slot (`actions`, ' +
|
|
3088
|
+
'`filters`, `filtersEnd`, `sync`), in `Section.actions` and in a `FilterSet` ' +
|
|
3089
|
+
'(agent/rules/basalt-controls.md). (basalt/bound-control-outside-home)'
|
|
3090
|
+
|
|
3091
|
+
/** A `ViewTabs` written directly in a refused slot — see {@link VIEW_TABS_REFUSED_HOME_MESSAGE}. */
|
|
3092
|
+
function viewTabsInRefusedSlot(slots, captured) {
|
|
3093
|
+
if (slots.hostExports(captured).includes('FilterSet')) return true
|
|
3094
|
+
if (captured.directOwner === undefined) return false
|
|
3095
|
+
const owners = slots.ownerExports(captured)
|
|
3096
|
+
return (
|
|
3097
|
+
(owners.includes('PageBar') && captured.slotName !== 'tabs') ||
|
|
3098
|
+
(owners.includes('Section') && captured.slotName === 'actions')
|
|
3099
|
+
)
|
|
3100
|
+
}
|
|
3101
|
+
|
|
3073
3102
|
/**
|
|
3074
3103
|
* A BOUND basalt control that is in no home at all — ledger G5 (`docs/ASIDE-SPEC.md` §2), the half
|
|
3075
3104
|
* of law C1 that had no guard: `control-outside-home` matches raw Mantine tags only, so a
|
|
@@ -3142,9 +3171,17 @@ const boundControlOutsideHome = {
|
|
|
3142
3171
|
for (const { node, root, captured, hosted } of candidates) {
|
|
3143
3172
|
const exported = controls.get(root)
|
|
3144
3173
|
if (exported === undefined || !BOUND_TAGS.has(exported)) continue
|
|
3145
|
-
if (hosted
|
|
3174
|
+
if (hosted) continue
|
|
3175
|
+
const refused = exported === 'ViewTabs' && viewTabsInRefusedSlot(slots, captured)
|
|
3176
|
+
if (!refused && (slots.resolve(captured) || slots.inSubtreeHome(captured))) continue
|
|
3146
3177
|
if (hasThemeAllow(context, node, 'bound-control-outside-home')) continue
|
|
3147
|
-
context.report({
|
|
3178
|
+
context.report({
|
|
3179
|
+
node,
|
|
3180
|
+
message:
|
|
3181
|
+
exported === 'ViewTabs'
|
|
3182
|
+
? VIEW_TABS_REFUSED_HOME_MESSAGE
|
|
3183
|
+
: BOUND_CONTROL_OUTSIDE_HOME_MESSAGE,
|
|
3184
|
+
})
|
|
3148
3185
|
}
|
|
3149
3186
|
},
|
|
3150
3187
|
}
|
|
@@ -2107,6 +2107,54 @@ describe('basalt/control-outside-home', () => {
|
|
|
2107
2107
|
expect(rules).not.toContain('control-outside-home')
|
|
2108
2108
|
})
|
|
2109
2109
|
|
|
2110
|
+
describe('ViewTabs homes', () => {
|
|
2111
|
+
const IMPORTS = `import { PageBar, Section, ChartCard } from 'basalt-ui'\nimport { FilterSet, ViewTabs } from 'basalt-ui/controls'\n`
|
|
2112
|
+
const refused = (jsx: string): void => {
|
|
2113
|
+
const { rules, output } = run(`${IMPORTS}export const C = () => ${jsx}\n`)
|
|
2114
|
+
expect(rules).toContain('bound-control-outside-home')
|
|
2115
|
+
expect(output).toContain('agent/rules/basalt-controls.md')
|
|
2116
|
+
}
|
|
2117
|
+
const allowed = (jsx: string): void => {
|
|
2118
|
+
const { code, rules } = run(`${IMPORTS}export const C = () => ${jsx}\n`)
|
|
2119
|
+
expect(code).toBe(0)
|
|
2120
|
+
expect(rules).not.toContain('bound-control-outside-home')
|
|
2121
|
+
}
|
|
2122
|
+
|
|
2123
|
+
it('allows PageBar.tabs, Section.tabs and a ChartCard actions slot', () => {
|
|
2124
|
+
allowed('<PageBar tabs={<ViewTabs field={f} />} />')
|
|
2125
|
+
allowed('<Section title="x" tabs={<ViewTabs field={f} />} />')
|
|
2126
|
+
allowed('<ChartCard title="x" actions={<ViewTabs field={f} />} />')
|
|
2127
|
+
})
|
|
2128
|
+
|
|
2129
|
+
it('refuses PageBar actions / filters / filtersEnd / sync', () => {
|
|
2130
|
+
for (const slot of ['actions', 'filters', 'filtersEnd', 'sync']) {
|
|
2131
|
+
refused(`<PageBar ${slot}={<ViewTabs field={f} />} />`)
|
|
2132
|
+
}
|
|
2133
|
+
})
|
|
2134
|
+
|
|
2135
|
+
it('reads a quoted-key slot spread the way the home resolver does', () => {
|
|
2136
|
+
refused("<PageBar {...{ 'actions': <ViewTabs field={f} /> }} />")
|
|
2137
|
+
allowed("<PageBar {...{ 'tabs': <ViewTabs field={f} /> }} />")
|
|
2138
|
+
})
|
|
2139
|
+
|
|
2140
|
+
// Structural lint: only a ViewTabs written inside the slot is seen. Pinned so a change is deliberate.
|
|
2141
|
+
it('does not see a hoisted binding handed to a refused slot', () => {
|
|
2142
|
+
allowed('(() => { const t = <ViewTabs field={f} />; return <PageBar actions={t} /> })()')
|
|
2143
|
+
})
|
|
2144
|
+
|
|
2145
|
+
it('uses the ViewTabs wording for one outside any slot', () => {
|
|
2146
|
+
const { output } = run(
|
|
2147
|
+
`${IMPORTS}export const C = () => <Section title="x"><ViewTabs field={f} /></Section>\n`,
|
|
2148
|
+
)
|
|
2149
|
+
expect(output).toContain('`ViewTabs` is not in its home')
|
|
2150
|
+
})
|
|
2151
|
+
|
|
2152
|
+
it('refuses Section.actions and a FilterSet', () => {
|
|
2153
|
+
refused('<Section title="x" actions={<ViewTabs field={f} />} />')
|
|
2154
|
+
refused('<FilterSet><ViewTabs field={f} /></FilterSet>')
|
|
2155
|
+
})
|
|
2156
|
+
})
|
|
2157
|
+
|
|
2110
2158
|
it('does NOT flag one inside a FilterSet subtree', () => {
|
|
2111
2159
|
const { rules } = run(
|
|
2112
2160
|
`import { FilterSet } from 'basalt-ui/controls'\n${MANTINE_IMPORT}` +
|
package/dist/charts/legend.d.ts
CHANGED
|
@@ -25,10 +25,10 @@ export type SignedSeries<T> = ChartSeries<T> & {
|
|
|
25
25
|
colorNegative?: string | undefined;
|
|
26
26
|
};
|
|
27
27
|
/**
|
|
28
|
-
* A line series' key: a stroke with its dash, compact below 480px
|
|
29
|
-
*
|
|
30
|
-
* dashed swatch has BUTT caps: a round cap grows each
|
|
31
|
-
* would close the gap.
|
|
28
|
+
* A line series' key: a stroke with its dash, compact below 480px of CHART width (a container
|
|
29
|
+
* query, not the viewport) and wide from 480px. Both are at least 14px with two or more clear
|
|
30
|
+
* dashes: a shorter key reads as two dots. A dashed swatch has BUTT caps: a round cap grows each
|
|
31
|
+
* dash by half the stroke width per end and would close the gap.
|
|
32
32
|
*/
|
|
33
33
|
export declare const LINE_SWATCH: {
|
|
34
34
|
readonly compact: {
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export declare const BOARD_NOTICE = "UI changed since the last board \u2014 run basalt-ui shot <routes> and the basalt-design-reviewer (/basalt-design)";
|
|
2
|
+
export declare const PLAYWRIGHT_INSTALL = "bun add -d playwright && bunx playwright install chromium";
|
|
3
|
+
/**
|
|
4
|
+
* The notice line when a UI file is newer than the last board, no valid board exists, or the walk
|
|
5
|
+
* hit its cap (unknown is reported, never "fresh"); else null. The signal is mtime-based, so a
|
|
6
|
+
* checkout or rebase can fire it on unchanged UI — a documented trade-off for a stat-only check.
|
|
7
|
+
*/
|
|
8
|
+
export declare function staleBoardNotice(cwd: string, roots: string[], walkCap?: number): string | null;
|
|
9
|
+
/** Loads `<id>/package.json` from the consumer; throws when unresolvable. Injectable for tests. */
|
|
10
|
+
export type PackageLoader = (id: string) => {
|
|
11
|
+
version?: string;
|
|
12
|
+
};
|
|
13
|
+
/** The consumer's Playwright version (`playwright`, then `playwright-core`), or null when absent. */
|
|
14
|
+
export declare function playwrightVersion(cwd: string, load?: PackageLoader): string | null;
|
|
15
|
+
/** Test seams for {@link designLoopLines}. */
|
|
16
|
+
export type DesignLoopProbes = {
|
|
17
|
+
notice?: (cwd: string, roots: string[]) => string | null;
|
|
18
|
+
playwright?: (cwd: string) => string | null;
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* Doctor's design-loop section: advisory info lines only. They never count as a warning, so they
|
|
22
|
+
* cannot change doctor's verdict or its "All checks passed" line.
|
|
23
|
+
*/
|
|
24
|
+
export declare function designLoopLines(cwd: string, roots: string[], probes?: DesignLoopProbes): string[];
|
|
25
|
+
//# sourceMappingURL=board-freshness.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"board-freshness.d.ts","sourceRoot":"","sources":["../../src/cli/board-freshness.ts"],"names":[],"mappings":"AAaA,eAAO,MAAM,YAAY,uHACwF,CAAA;AACjH,eAAO,MAAM,kBAAkB,8DAA8D,CAAA;AAwD7F;;;;GAIG;AACH,wBAAgB,gBAAgB,CAC9B,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,MAAM,EAAE,EACf,OAAO,GAAE,MAAiB,GACzB,MAAM,GAAG,IAAI,CAMf;AAED,mGAAmG;AACnG,MAAM,MAAM,aAAa,GAAG,CAAC,EAAE,EAAE,MAAM,KAAK;IAAE,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,CAAA;AAEhE,qGAAqG;AACrG,wBAAgB,iBAAiB,CAC/B,GAAG,EAAE,MAAM,EACX,IAAI,GAAE,aAA2D,GAChE,MAAM,GAAG,IAAI,CASf;AAED,8CAA8C;AAC9C,MAAM,MAAM,gBAAgB,GAAG;IAC7B,MAAM,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,MAAM,GAAG,IAAI,CAAA;IACxD,UAAU,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,GAAG,IAAI,CAAA;CAC5C,CAAA;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAC7B,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,MAAM,EAAE,EACf,MAAM,GAAE,gBAAqB,GAC5B,MAAM,EAAE,CAWV"}
|