basalt-ui 2.7.0 → 2.7.2
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/AGENTS.md +1 -1
- package/CHANGELOG.md +17 -0
- package/MIGRATING.md +30 -12
- package/agent/rules/basalt-batteries.md +2 -2
- package/agent/rules/basalt-controls.md +2 -2
- package/agent/skills/basalt-app/SKILL.md +44 -0
- package/dist/charts/DualPanel.d.ts +1 -1
- package/dist/charts/DualPanel.d.ts.map +1 -1
- package/dist/charts/DualPanel.js +2 -1
- package/dist/charts/legend.d.ts +15 -2
- package/dist/charts/legend.d.ts.map +1 -1
- package/dist/charts/legend.js +3 -2
- package/dist/commands/define-overlays.d.ts +5 -0
- package/dist/commands/define-overlays.d.ts.map +1 -1
- package/dist/commands/define-overlays.js +2 -0
- package/dist/commands/index.d.ts +4 -0
- package/dist/commands/index.d.ts.map +1 -1
- package/dist/commands/notifications/define-notifications.d.ts +3 -0
- package/dist/commands/notifications/define-notifications.d.ts.map +1 -1
- package/dist/surfaces.d.ts +1 -1
- package/dist/surfaces.js +1 -1
- package/dist/table/data-table.d.ts +4 -0
- package/dist/table/data-table.d.ts.map +1 -1
- package/dist/table/index.d.ts +1 -0
- package/dist/table/index.d.ts.map +1 -1
- package/llms.txt +429 -3
- package/package.json +1 -1
- package/src/charts/DualPanel.tsx +5 -3
- package/src/charts/legend.tsx +22 -6
- package/src/commands/define-overlays.ts +5 -0
- package/src/commands/index.ts +4 -0
- package/src/commands/notifications/define-notifications.ts +3 -0
- package/src/surfaces.ts +1 -1
- package/src/table/data-table.tsx +4 -0
- package/src/table/index.ts +2 -0
package/AGENTS.md
CHANGED
|
@@ -21,7 +21,7 @@ and `./package.json` are **not exports** (`llms.txt` still ships in the tarball
|
|
|
21
21
|
| `basalt-ui/vite` | build-tooling | basaltViteConfig(opts) — Vite preset for basalt-ui consumer apps; basaltAppPlugin(opts) — PWA head, manifest, and icon metadata derived from the token palette |
|
|
22
22
|
| `basalt-ui/format` | headless | integer/money/percent/durationClock/relativeTime/weekday/km/kcal — Intl-backed, Mantine-free, React-free formatting; the chart layer formats through the same implementation |
|
|
23
23
|
| `basalt-ui/forms` | mantine-coupled | Mantine form layer: useBasaltForm + inputProps/fieldKey (two calls — a spread `key` is a React 19 warning), on @mantine/form |
|
|
24
|
-
| `basalt-ui/commands` | mantine-coupled | defineCommands (typed command bus), defineOverlays/overlays, setColorScheme, toggleSidebar, ShortcutsHelp, defineNotifications/emit/NotificationBell (folded in from ./notifications); BasaltProvider mounts Spotlight, Modals and Notifications
|
|
24
|
+
| `basalt-ui/commands` | mantine-coupled | defineCommands (typed command bus), defineOverlays/overlays (a form dialog is a registered overlay opened with overlays.open), setColorScheme, toggleSidebar, ShortcutsHelp, defineNotifications/emit/NotificationBell (emit only accepts kinds registered in defineNotifications; folded in from ./notifications); BasaltProvider mounts Spotlight, Modals and Notifications |
|
|
25
25
|
| `basalt-ui/table` | mantine-coupled | BasaltDataTable and createColumnHelper: a data table over TanStack Table v9, rendered with Mantine (renamed from ./data/table) |
|
|
26
26
|
| `basalt-ui/agent` | mantine-coupled | Streaming-chat surface: aiSdkTransport, useAgentThreadRuns, parseAgentPart, the open part-registry types, the consumer-owned thread contracts (AgentThread/ThreadsStore/ChatMessage), and the Mantine chat UI folded in from ./agent-chat (ThreadFeed, ThreadFeedRow, Composer, ToolChip). motion is subpath-required: the chat UI imports it eagerly |
|
|
27
27
|
| `basalt-ui/content` | mantine-coupled | Prose (article/chat typography), Callout, TableOfContents, Markdown (react-markdown + remark-gfm, optional peers; `streaming` is a rendering mode ONLY — `contentTrust` is the independent security input, and any surface rendering agent/model output must pin `contentTrust="untrusted"`, the sole input to the image-origin allowlist; `fenceRenderers` extends fenced-block rendering — settledOnly/FenceRenderer/FenceRenderers; `sanitizeSchema` is an additions-only SanitizeSchemaExtension merged over the default via mergeSanitizeSchema; shiki code blocks, beautiful-mermaid diagrams and the remend streaming repair load lazily from optional peers), ArticleLayout (docs-page frame), GuideLink (contextual-help link) — the content/prose surface |
|
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,20 @@
|
|
|
1
|
+
## [2.7.2](https://github.com/jkrumm/basalt-ui/compare/v2.7.1...v2.7.2) (2026-10-15)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* llms.txt lists component props for every subpath, one legend swatch shape ([80b1e91](https://github.com/jkrumm/basalt-ui/commit/80b1e91d372fdc063290776807bb38964cea22ea))
|
|
7
|
+
|
|
8
|
+
## [2.7.1](https://github.com/jkrumm/basalt-ui/compare/v2.7.0...v2.7.1) (2026-10-15)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* document the form dialog and notification seams in the shipped layer ([5836d52](https://github.com/jkrumm/basalt-ui/commit/5836d52579f6d20781823fffd74e6d444084ff73))
|
|
14
|
+
* name the form dialog and notification seams in the commands description ([8ec0ef0](https://github.com/jkrumm/basalt-ui/commit/8ec0ef043019271f8379e72edec47209e3bff0f1))
|
|
15
|
+
* scope the signed swatch to the DualPanel bar and harden its tests ([c840048](https://github.com/jkrumm/basalt-ui/commit/c840048e2f6b2a125650b9bc49b8b35f40421041))
|
|
16
|
+
* signed bar legends get a split swatch and DataTableRowAction is exported ([6602b3c](https://github.com/jkrumm/basalt-ui/commit/6602b3c86f4d5229f98c834ea4c68e42f8a70a5d))
|
|
17
|
+
|
|
1
18
|
# [2.7.0](https://github.com/jkrumm/basalt-ui/compare/v2.6.1...v2.7.0) (2026-10-15)
|
|
2
19
|
|
|
3
20
|
|
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 | 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) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — |
|
|
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) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — |
|
|
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) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — |
|
|
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) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — |
|
|
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) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — |
|
|
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) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — |
|
|
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) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — |
|
|
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 | 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) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — |
|
|
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) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — |
|
|
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) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — |
|
|
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) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — |
|
|
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) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — |
|
|
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) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — |
|
|
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) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — |
|
|
81
81
|
|
|
82
82
|
---
|
|
83
83
|
|
|
@@ -992,6 +992,24 @@ optional, subpath-required peers.
|
|
|
992
992
|
_Nothing yet. Author the next section under this heading as `## Unreleased — <title>`; the
|
|
993
993
|
release renames it and opens a new one here._
|
|
994
994
|
|
|
995
|
+
## 2.7.2 — llms.txt props for every subpath
|
|
996
|
+
|
|
997
|
+
- `llms.txt` now lists a props block under every exported component and hook on every public
|
|
998
|
+
subpath, not just `./table`, `./charts` and `./forms` (argo friction row 57); `PageAside`'s
|
|
999
|
+
`title` and `persistKey` no longer send an agent to `dist/**/*.d.ts`. No API change.
|
|
1000
|
+
- Documented, not changed: a signed `DualPanel` legend swatch is a split circle below 480px of chart
|
|
1001
|
+
width and a split square from 480px, because the legend mode follows the container (friction row
|
|
1002
|
+
58).
|
|
1003
|
+
|
|
1004
|
+
## 2.7.1 — signed bar legend, DataTableRowAction export
|
|
1005
|
+
|
|
1006
|
+
- `DualPanel`'s bar legend entry is a split swatch (`positive` | `negative`) instead of the positive
|
|
1007
|
+
colour alone (argo friction row 52) — a visual change on every `DualPanel`, since the bar is
|
|
1008
|
+
always sign-coloured. Still one entry and one toggle: the sign halves hide together, because a
|
|
1009
|
+
sign is a property of a datum, not a series. No prop changes; plain `Bars` is unaffected.
|
|
1010
|
+
- `DataTableRowAction<T>` is now actually exported from `basalt-ui/table` (argo friction row 53);
|
|
1011
|
+
§ 2.7.0 said it was, and it was not (TS2305).
|
|
1012
|
+
|
|
995
1013
|
## 2.7.0 — table row actions, checkbox bindings, typed field errors
|
|
996
1014
|
|
|
997
1015
|
- `BasaltDataTable` takes `rowActions` (argo friction row 48): typed data in `BarActionItem`'s
|
|
@@ -20,6 +20,7 @@ paths:
|
|
|
20
20
|
|
|
21
21
|
- Wrap every API-client `queryFn` response in `unwrap()` from `basalt-ui` (it throws on the error branch and on `null` data); a mock returning plain data needs none, and the lint sees only an inline `queryFn` calling `fetch(`. [basalt/query-fn-unwrap]
|
|
22
22
|
- The client comes from `createBasaltRouter`; extend it via its `query:` option. [type createBasaltRouter]
|
|
23
|
+
- Register every kind in `defineNotifications` (augment `BasaltRegister` `notifications`) before calling `emit('kind', payload)`; an unregistered kind is a type error. [type emit]
|
|
23
24
|
|
|
24
25
|
## Forms
|
|
25
26
|
|
|
@@ -37,6 +38,5 @@ paths:
|
|
|
37
38
|
## Agent
|
|
38
39
|
|
|
39
40
|
- Chat uses `basalt-ui/agent` (`useAgentThreadRuns`, `ThreadFeed`, `Composer`); never `useChat` or `Chat` from `@ai-sdk/react`. [basalt/agent-no-raw-usechat]
|
|
40
|
-
- Keep `ai` and `@ai-sdk/*` on one major across packages
|
|
41
|
+
- Keep `ai` and `@ai-sdk/*` on one major across packages; an intentional split is waived with `basalt-agent-allow`, never `theme-allow`. [basalt/ai-sdk-major]
|
|
41
42
|
- End every switch over `AgentPart` with `default: return part satisfies never`. [type AgentPart]
|
|
42
|
-
- An intentional `ai` major split is waived with `basalt-agent-allow`, never `theme-allow`. [basalt/ai-sdk-major]
|
|
@@ -24,12 +24,12 @@ A control has one home and takes its state from a store field; the home sets its
|
|
|
24
24
|
- A control lives in exactly one home: a `PageBar` slot (`actions`, `sync`, `filters`, `filtersEnd`, `tabs`), a `Section` slot (`actions`, `tabs`), a `WidgetHeader`/`ChartCard`/`StatCard`/`BasaltDataTable` `actions` slot, or a form row (`SettingsRow.control`, `FormRow`, `FormGroup`). A per-row action is `BasaltDataTable rowActions` (typed data: `label`, `icon`, `onClick(row)`, `danger`, `disabled(row)`), never a `Menu`/`ActionIcon` in a column `cell`/`display` renderer. [basalt/control-outside-home]
|
|
25
25
|
- A raw Mantine selection control (`Select`, `SegmentedControl`, …) in a home slot is a filter without a `field`. [basalt/hand-rolled-filter] [check-theme raw-selection-control]
|
|
26
26
|
- A basalt filter outside a slot, `FilterSet`, `PageAside` or form row has no home. [basalt/bound-control-outside-home]
|
|
27
|
-
- `PageBar` `actions` holds at most 5 entries with exactly one `primary`. [type PageBar]
|
|
28
|
-
- A `Section` holds at most 3 `actions`. [type Section]
|
|
27
|
+
- `PageBar` `actions` holds at most 5 entries with exactly one `primary`; a `Section` holds at most 3 `actions`. [type PageBar] [type Section]
|
|
29
28
|
- A control in a home slot carries no `size`, `w`, `fullWidth`, `visibleFrom` or `hiddenFrom`; the home sizes it. [basalt/control-size-literal]
|
|
30
29
|
- Never render the same control twice under `visibleFrom`/`hiddenFrom`; the control swaps itself in CSS. [basalt/responsive-twin]
|
|
31
30
|
- A section, card or table title is a `WidgetHeader`; no in-body `<Title order={1|2}>`. [basalt/in-body-page-title]
|
|
32
31
|
- An overlay rendered by the parent lives in a file named `*-{modal,drawer,popover,panel,form}.tsx`, or opts out with `theme-allow-file control-outside-home — overlay`. [basalt/control-outside-home]
|
|
32
|
+
- A form dialog is a `defineOverlays` entry (augment `BasaltRegister` `overlays`) opened with `overlays.open('id', props)` from a row action; its component lives in a `*-modal.tsx`. [type overlays]
|
|
33
33
|
|
|
34
34
|
## Binding
|
|
35
35
|
|
|
@@ -83,6 +83,50 @@ export const Revenue = ({ rows }: { rows: Row[] }) => (
|
|
|
83
83
|
)
|
|
84
84
|
```
|
|
85
85
|
|
|
86
|
+
## Add a form dialog
|
|
87
|
+
|
|
88
|
+
A form dialog is a `defineOverlays` entry opened from a `BasaltDataTable` row action; success is an `emit` of a kind registered in `defineNotifications`. The form component lives in a `*-modal.tsx`:
|
|
89
|
+
|
|
90
|
+
```tsx
|
|
91
|
+
// @check
|
|
92
|
+
import { Button, TextInput } from '@mantine/core'
|
|
93
|
+
import { defineNotifications, defineOverlays, emit, overlays } from 'basalt-ui/commands'
|
|
94
|
+
import { fieldKey, inputProps, useBasaltForm } from 'basalt-ui/forms'
|
|
95
|
+
|
|
96
|
+
export const NOTIFICATIONS = defineNotifications({
|
|
97
|
+
'item:saved': { intent: 'success', toMessage: (p: { name: string }) => `Saved ${p.name}` },
|
|
98
|
+
})
|
|
99
|
+
function ItemForm({ name }: { name: string }) {
|
|
100
|
+
const form = useBasaltForm({ initialValues: { name } })
|
|
101
|
+
const save = form.onSubmit((v) => {
|
|
102
|
+
overlays.close() // after the mutation succeeds
|
|
103
|
+
emit('item:saved', { name: v.name })
|
|
104
|
+
})
|
|
105
|
+
return (
|
|
106
|
+
<form onSubmit={save}>
|
|
107
|
+
<TextInput key={fieldKey(form, 'name')} {...inputProps(form, 'name')} label="Name" />
|
|
108
|
+
<Button type="submit">Save</Button>
|
|
109
|
+
</form>
|
|
110
|
+
)
|
|
111
|
+
}
|
|
112
|
+
export const OVERLAYS = defineOverlays({
|
|
113
|
+
'item:edit': { title: 'Edit item', render: (p: { name: string }) => <ItemForm name={p.name} /> },
|
|
114
|
+
})
|
|
115
|
+
declare module 'basalt-ui' {
|
|
116
|
+
interface BasaltRegister {
|
|
117
|
+
notifications: typeof NOTIFICATIONS
|
|
118
|
+
overlays: typeof OVERLAYS
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
// BasaltDataTable rowActions entry
|
|
122
|
+
export const editAction = {
|
|
123
|
+
key: 'edit',
|
|
124
|
+
label: 'Edit',
|
|
125
|
+
icon: <i />,
|
|
126
|
+
onClick: (row: { name: string }) => overlays.open('item:edit', { name: row.name }),
|
|
127
|
+
}
|
|
128
|
+
```
|
|
129
|
+
|
|
86
130
|
## Stream a slow section
|
|
87
131
|
|
|
88
132
|
The shell holds no promise; the loader returns the slow promise unawaited (settled, so a failure renders the chart's error state), and the fallback is the same chart pending (it fills the final box):
|
|
@@ -6,7 +6,7 @@ export type DualPanelLine<T> = Pick<ChartSeries<T>, 'key' | 'label' | 'color' |
|
|
|
6
6
|
export type DualPanelBar<T> = {
|
|
7
7
|
label: string;
|
|
8
8
|
getValue: (d: T) => number | null;
|
|
9
|
-
/** The fill above zero
|
|
9
|
+
/** The fill above zero; the legend swatch splits positive | negative (one entry, one toggle). */
|
|
10
10
|
positive: string;
|
|
11
11
|
/** The fill below zero. */
|
|
12
12
|
negative: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DualPanel.d.ts","sourceRoot":"","sources":["../../src/charts/DualPanel.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"DualPanel.d.ts","sourceRoot":"","sources":["../../src/charts/DualPanel.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAA;AAUzC,OAAO,KAAK,EAAE,mBAAmB,EAAE,WAAW,EAAwB,MAAM,SAAS,CAAA;AAcrF,uBAAuB;AACvB,MAAM,MAAM,aAAa,CAAC,CAAC,IAAI,IAAI,CACjC,WAAW,CAAC,CAAC,CAAC,EACZ,KAAK,GACL,OAAO,GACP,OAAO,GACP,UAAU,GACV,aAAa,GACb,SAAS,GACT,QAAQ,GACR,MAAM,GACN,MAAM,GACN,MAAM,GACN,OAAO,GACP,aAAa,GACb,eAAe,GACf,WAAW,CACd,CAAA;AAED,mEAAmE;AACnE,MAAM,MAAM,YAAY,CAAC,CAAC,IAAI;IAC5B,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,CAAC,CAAC,EAAE,CAAC,KAAK,MAAM,GAAG,IAAI,CAAA;IACjC,iGAAiG;IACjG,QAAQ,EAAE,MAAM,CAAA;IAChB,2BAA2B;IAC3B,QAAQ,EAAE,MAAM,CAAA;IAChB,6EAA6E;IAC7E,MAAM,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,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M,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;KAAE,GAC1E,SAAS,CAAA;IACb,GAAG,EAAE,YAAY,CAAC,CAAC,CAAC,CAAA;IACpB,8DAA8D;IAC9D,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CACjC,CAAA;AAiBD,wBAAgB,SAAS,CAAC,CAAC,EAAE,CAAC,SAAS,IAAI,GAAG,MAAM,GAAG,IAAI,GAAG,MAAM,EAClE,KAAK,EAAE,cAAc,CAAC,CAAC,EAAE,CAAC,CAAC,GAC1B,YAAY,CAwOd"}
|
package/dist/charts/DualPanel.js
CHANGED
|
@@ -53,10 +53,11 @@ function DualPanel(props) {
|
|
|
53
53
|
key: BAR_KEY,
|
|
54
54
|
label: bar.label,
|
|
55
55
|
color: bar.positive,
|
|
56
|
+
colorNegative: bar.negative,
|
|
56
57
|
mark: "bar",
|
|
57
58
|
getValue: bar.getValue
|
|
58
59
|
}),
|
|
59
|
-
[bar.label, bar.positive, bar.getValue]
|
|
60
|
+
[bar.label, bar.positive, bar.negative, bar.getValue]
|
|
60
61
|
);
|
|
61
62
|
const all = useMemo(() => [...lines, barSeries], [lines, barSeries]);
|
|
62
63
|
const topFormat = top?.format ?? defaultNumberFormat;
|
package/dist/charts/legend.d.ts
CHANGED
|
@@ -6,12 +6,25 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import type { ReactElement } from 'react';
|
|
8
8
|
import type { ChartSeries } from './types.js';
|
|
9
|
-
/**
|
|
9
|
+
/**
|
|
10
|
+
* `auto` renders both swatches and lets the container decide: none, dots or chips (CSS). The
|
|
11
|
+
* swatch SHAPE follows the mode, signed split included: below 480px a dot (8px circle), from 480px
|
|
12
|
+
* a chip (10px square) — so one `DualPanel` bar legend is a split circle on a narrow card and a
|
|
13
|
+
* split square on a wide one. By design (friction row 58), not a per-chart prop.
|
|
14
|
+
*/
|
|
10
15
|
export type LegendMode = 'dots' | 'chips' | 'auto';
|
|
11
16
|
/** The entries a series list derives, in display order (by role when `groups`). */
|
|
12
17
|
export declare function legendEntries<T>(series: readonly ChartSeries<T>[], groups: boolean): ChartSeries<T>[][];
|
|
18
|
+
/**
|
|
19
|
+
* A legend entry that may be a sign-coloured bar: `colorNegative` is the below-zero colour and the
|
|
20
|
+
* swatch splits `color` | `colorNegative`. Only `DualPanel`'s bar sets it; the entry stays one
|
|
21
|
+
* toggle, so the sign halves hide together.
|
|
22
|
+
*/
|
|
23
|
+
export type SignedSeries<T> = ChartSeries<T> & {
|
|
24
|
+
colorNegative?: string | undefined;
|
|
25
|
+
};
|
|
13
26
|
export type ChartLegendProps<T> = {
|
|
14
|
-
series: readonly
|
|
27
|
+
series: readonly SignedSeries<T>[];
|
|
15
28
|
hidden: ReadonlySet<string>;
|
|
16
29
|
mode: LegendMode;
|
|
17
30
|
groups: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"legend.d.ts","sourceRoot":"","sources":["../../src/charts/legend.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAiB,YAAY,EAAE,MAAM,OAAO,CAAA;AAGxD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAE1C
|
|
1
|
+
{"version":3,"file":"legend.d.ts","sourceRoot":"","sources":["../../src/charts/legend.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAiB,YAAY,EAAE,MAAM,OAAO,CAAA;AAGxD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAE1C;;;;;GAKG;AACH,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,CAAA;AAUlD,mFAAmF;AACnF,wBAAgB,aAAa,CAAC,CAAC,EAC7B,MAAM,EAAE,SAAS,WAAW,CAAC,CAAC,CAAC,EAAE,EACjC,MAAM,EAAE,OAAO,GACd,WAAW,CAAC,CAAC,CAAC,EAAE,EAAE,CAMpB;AAuCD;;;;GAIG;AACH,MAAM,MAAM,YAAY,CAAC,CAAC,IAAI,WAAW,CAAC,CAAC,CAAC,GAAG;IAAE,aAAa,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,CAAA;AAoErF,MAAM,MAAM,gBAAgB,CAAC,CAAC,IAAI;IAChC,MAAM,EAAE,SAAS,YAAY,CAAC,CAAC,CAAC,EAAE,CAAA;IAClC,MAAM,EAAE,WAAW,CAAC,MAAM,CAAC,CAAA;IAC3B,IAAI,EAAE,UAAU,CAAA;IAChB,MAAM,EAAE,OAAO,CAAA;IACf,MAAM,EAAE,OAAO,CAAA;IACf,QAAQ,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAA;IAC/B,WAAW,EAAE,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAA;CAC1C,CAAA;AAED,wBAAgB,WAAW,CAAC,CAAC,EAAE,KAAK,EAAE,gBAAgB,CAAC,CAAC,CAAC,GAAG,YAAY,GAAG,IAAI,CAmE9E"}
|
package/dist/charts/legend.js
CHANGED
|
@@ -43,6 +43,7 @@ const buttonStyle = {
|
|
|
43
43
|
borderRadius: VX.radiusCtrl
|
|
44
44
|
};
|
|
45
45
|
const noteStyle = { color: VX.axis };
|
|
46
|
+
const swatchFill = (s) => s.colorNegative ? `linear-gradient(90deg, ${s.color} 50%, ${s.colorNegative} 50%)` : s.color;
|
|
46
47
|
function Swatch({ s, mode }) {
|
|
47
48
|
if (mode === "auto")
|
|
48
49
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
@@ -60,7 +61,7 @@ function Swatch({ s, mode }) {
|
|
|
60
61
|
height: 8,
|
|
61
62
|
// theme-allow raw-surface — a legend dot is a circle, not a surface corner
|
|
62
63
|
borderRadius: "50%",
|
|
63
|
-
background: s
|
|
64
|
+
background: swatchFill(s),
|
|
64
65
|
opacity: s.fillOpacity ?? 1,
|
|
65
66
|
flex: "none"
|
|
66
67
|
}
|
|
@@ -91,7 +92,7 @@ function Swatch({ s, mode }) {
|
|
|
91
92
|
height: 10,
|
|
92
93
|
// theme-allow raw-surface — swatch geometry, not a surface corner
|
|
93
94
|
borderRadius: 2,
|
|
94
|
-
background: s
|
|
95
|
+
background: swatchFill(s),
|
|
95
96
|
opacity: s.fillOpacity ?? 1,
|
|
96
97
|
flex: "none"
|
|
97
98
|
}
|
|
@@ -5,6 +5,9 @@
|
|
|
5
5
|
* `overlays` imperative controller — unknown keys are tsc errors. The type slot gives the
|
|
6
6
|
* compile-time key union; the module-level stash gives the runtime values.
|
|
7
7
|
*
|
|
8
|
+
* A form dialog is an entry whose `render` returns the form; open it from a row action with
|
|
9
|
+
* `overlays.open('id', props)` and put its component in a `*-modal.tsx`.
|
|
10
|
+
*
|
|
8
11
|
* Uses @mantine/modals under the hood. ModalsProvider must be mounted (BasaltProvider does this).
|
|
9
12
|
*
|
|
10
13
|
* @example
|
|
@@ -189,6 +192,8 @@ export declare const overlays: {
|
|
|
189
192
|
* Open a registered overlay by key. Resolves the Overlay spec from the runtime stash and calls
|
|
190
193
|
* modals.open() with the rendered body. The props type is inferred from the registered overlay.
|
|
191
194
|
*
|
|
195
|
+
* Needs the key registered first: `defineOverlays` plus the `BasaltRegister` `overlays` augmentation.
|
|
196
|
+
*
|
|
192
197
|
* `overlays.open('nonexistent', …)` is a tsc error when BasaltRegister.overlays is augmented.
|
|
193
198
|
* Un-augmented: OverlayKey = never → effectively uncallable.
|
|
194
199
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"define-overlays.d.ts","sourceRoot":"","sources":["../../src/commands/define-overlays.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"define-overlays.d.ts","sourceRoot":"","sources":["../../src/commands/define-overlays.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OA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AAM,CAAC,EAAE,OAAO,CAAA;IAChB,qDAAqD;IACrD,SAAS,EAAE,MAAM,IAAI,CAAA;IACrB,+FAA+F;IAC/F,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAA;CACtB,CAAA;AAED,iGAAiG;AACjG,MAAM,MAAM,oBAAoB,GAAG;IACjC;;;;OAIG;IACH,OAAO,EAAE,MAAM,CAAA;IACf,4BAA4B;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,qDAAqD;IACrD,SAAS,EAAE,MAAM,IAAI,CAAA;CACtB,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,iBAAe,OAAO,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,OAAO,CAAC,CA0DhE;AAED;;;;;;;GAOG;AACH,iBAAS,aAAa,CAAC,OAAO,EAAE,oBAAoB,GAAG,OAAO,CAAC,OAAO,CAAC,CAUtE;AAID;;;;GAIG;AACH,KAAK,YAAY,CAAC,CAAC,SAAS,UAAU,IAAI,QAAQ,SAAS;KAAG,EAAE,IAAI,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;CAAE,GACtF,CAAC,GACD,KAAK,CAAA;AAET;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,QAAQ;IACnB;;;;;;;;;;;OAWG;SACE,CAAC,SAAS,UAAU,OAAO,CAAC,SAAS,YAAY,CAAC,CAAC,CAAC,GAAG,IAAI;IAehE;;;;;OAKG;;IAGH;;;;;OAKG;;IAGH;;;;;OAKG;aACM,IAAI;CAGd,CAAA"}
|
|
@@ -92,6 +92,8 @@ const overlays = {
|
|
|
92
92
|
* Open a registered overlay by key. Resolves the Overlay spec from the runtime stash and calls
|
|
93
93
|
* modals.open() with the rendered body. The props type is inferred from the registered overlay.
|
|
94
94
|
*
|
|
95
|
+
* Needs the key registered first: `defineOverlays` plus the `BasaltRegister` `overlays` augmentation.
|
|
96
|
+
*
|
|
95
97
|
* `overlays.open('nonexistent', …)` is a tsc error when BasaltRegister.overlays is augmented.
|
|
96
98
|
* Un-augmented: OverlayKey = never → effectively uncallable.
|
|
97
99
|
*
|
package/dist/commands/index.d.ts
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* ./commands — the command bus, overlay controller, shortcuts help and the notification registry.
|
|
3
3
|
*
|
|
4
|
+
* Two seams need registering first: `emit(kind)` only accepts kinds registered in `defineNotifications`,
|
|
5
|
+
* and a form dialog is a `defineOverlays` entry opened with `overlays.open('id', props)`; both
|
|
6
|
+
* register their keys through the `declare module 'basalt-ui'` augmentation (see each factory).
|
|
7
|
+
*
|
|
4
8
|
* `BasaltProvider` mounts modals, Spotlight, hotkeys and notifications; this barrel is only what
|
|
5
9
|
* an app declares and calls.
|
|
6
10
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/commands/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/commands/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,cAAc,EAAE,KAAK,OAAO,EAAE,MAAM,mBAAmB,CAAA;AAChE,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAC5D,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAA;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAG/C,OAAO,EAAE,mBAAmB,EAAE,IAAI,EAAE,MAAM,sCAAsC,CAAA;AAChF,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAA"}
|
|
@@ -2,6 +2,9 @@
|
|
|
2
2
|
* defineNotifications — const-generic factory for typed notification kind registries.
|
|
3
3
|
* Mirrors the defineSeries pattern from ./tokens (const-generic, identity passthrough).
|
|
4
4
|
*
|
|
5
|
+
* `emit` only accepts kinds registered here first: call `defineNotifications` and augment
|
|
6
|
+
* `BasaltRegister.notifications` before emitting.
|
|
7
|
+
*
|
|
5
8
|
* Consumer augments BasaltRegister.notifications with the spec map type, then uses the typed
|
|
6
9
|
* `emit` helper which resolves the registered kind at compile-time. An unknown kind is a tsc error.
|
|
7
10
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"define-notifications.d.ts","sourceRoot":"","sources":["../../../src/commands/notifications/define-notifications.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"define-notifications.d.ts","sourceRoot":"","sources":["../../../src/commands/notifications/define-notifications.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACtC,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAA;AAE1C,OAAO,KAAK,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAA;AACjE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AAEpD,YAAY,EAAE,kBAAkB,EAAE,CAAA;AAIlC;;;;;;;;GAQG;AACH,MAAM,MAAM,kBAAkB,CAAC,CAAC,GAAG,OAAO,IAAI;IAC5C,KAAK,EAAE,MAAM,CAAA;IACb,GAAG,EAAE,CAAC,OAAO,EAAE,CAAC,KAAK,IAAI,CAAA;CAC1B,CAAA;AAID;;;;;;GAMG;AACH,MAAM,MAAM,gBAAgB,CAAC,CAAC,GAAG,OAAO,IAAI;IAC1C,MAAM,CAAC,EAAE,kBAAkB,CAAA;IAC3B,SAAS,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,KAAK,SAAS,CAAA;IACrC,MAAM,CAAC,EAAE,kBAAkB,CAAC,CAAC,CAAC,CAAA;CAC/B,CAAA;AAED,wDAAwD;AAExD,MAAM,MAAM,mBAAmB,GAAG,MAAM,CAAC,MAAM,EA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;;;GAIG;AACH,wBAAgB,aAAa,CAC3B,GAAG,EAAE,qBAAqB,GACzB;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,IAAI,CAAA;CAAE,GAAG,SAAS,CAIhD"}
|
package/dist/surfaces.d.ts
CHANGED
|
@@ -248,7 +248,7 @@ export declare const SURFACES: {
|
|
|
248
248
|
readonly skill: readonly ["basalt-app"];
|
|
249
249
|
readonly guardKinds: readonly [];
|
|
250
250
|
readonly pluginRules: readonly [];
|
|
251
|
-
readonly description: "defineCommands (typed command bus), defineOverlays/overlays, setColorScheme, toggleSidebar, ShortcutsHelp, defineNotifications/emit/NotificationBell (folded in from ./notifications); BasaltProvider mounts Spotlight, Modals and Notifications";
|
|
251
|
+
readonly description: "defineCommands (typed command bus), defineOverlays/overlays (a form dialog is a registered overlay opened with overlays.open), setColorScheme, toggleSidebar, ShortcutsHelp, defineNotifications/emit/NotificationBell (emit only accepts kinds registered in defineNotifications; folded in from ./notifications); BasaltProvider mounts Spotlight, Modals and Notifications";
|
|
252
252
|
readonly optionalPeers: readonly ["@tanstack/react-hotkeys"];
|
|
253
253
|
readonly forbiddenImports: readonly [];
|
|
254
254
|
};
|
package/dist/surfaces.js
CHANGED
|
@@ -209,7 +209,7 @@ const SURFACES = {
|
|
|
209
209
|
skill: ["basalt-app"],
|
|
210
210
|
guardKinds: [],
|
|
211
211
|
pluginRules: [],
|
|
212
|
-
description: "defineCommands (typed command bus), defineOverlays/overlays, setColorScheme, toggleSidebar, ShortcutsHelp, defineNotifications/emit/NotificationBell (folded in from ./notifications); BasaltProvider mounts Spotlight, Modals and Notifications",
|
|
212
|
+
description: "defineCommands (typed command bus), defineOverlays/overlays (a form dialog is a registered overlay opened with overlays.open), setColorScheme, toggleSidebar, ShortcutsHelp, defineNotifications/emit/NotificationBell (emit only accepts kinds registered in defineNotifications; folded in from ./notifications); BasaltProvider mounts Spotlight, Modals and Notifications",
|
|
213
213
|
optionalPeers: ["@tanstack/react-hotkeys"],
|
|
214
214
|
forbiddenImports: []
|
|
215
215
|
},
|
|
@@ -339,6 +339,10 @@ export type BasaltDataTableProps<T extends RowData> = BasaltProps & SlotStylesPr
|
|
|
339
339
|
* whenever the array identity changes. A `renderCard` projection owns its own card, so the
|
|
340
340
|
* column renders in the table body only.
|
|
341
341
|
*
|
|
342
|
+
* State-dependent actions keep that array stable and read the state per row: put it in
|
|
343
|
+
* `disabled(row)` / `loading(row)` (state in a ref or the row itself), or `useMemo` the array
|
|
344
|
+
* keyed on exactly that state.
|
|
345
|
+
*
|
|
342
346
|
* @example
|
|
343
347
|
* const ROW_ACTIONS: DataTableRowAction<Row>[] = [
|
|
344
348
|
* { key: 'edit', label: 'Edit', icon: <IconEdit />, onClick: (row) => edit(row) },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data-table.d.ts","sourceRoot":"","sources":["../../src/table/data-table.tsx"],"names":[],"mappings":"AA+CA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AACnD,OAAO,KAAK,EAIV,kBAAkB,EAGlB,eAAe,EAEf,OAAO,EACP,iBAAiB,EACjB,YAAY,EAEb,MAAM,uBAAuB,CAAA;AAE9B,OAAO,KAAK,EAAgD,SAAS,EAAa,MAAM,OAAO,CAAA;AAI/F,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAOnE,OAAO,KAAK,EAAE,SAAS,EAAiB,WAAW,EAAE,MAAM,qBAAqB,CAAA;AAahF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAA;AAU9D,OAAO,KAAK,EAAE,eAAe,EAAuC,MAAM,kBAAkB,CAAA;AA8B5F,0GAA0G;AAC1G,MAAM,MAAM,oBAAoB,GAAG;IACjC,kFAAkF;IAClF,KAAK,EAAE,MAAM,CAAA;IACb,yCAAyC;IACzC,KAAK,EAAE,MAAM,CAAA;CACd,CAAA;AAED;;;;;;;GAOG;AACH,MAA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,2DAA2D;IAC3D,eAAe,CAAC,EAAE,cAAc,CAAA;IAChC,6DAA6D;IAC7D,iBAAiB,CAAC,EAAE,cAAc,CAAA;IAClC,0FAA0F;IAC1F,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB;;;;;;;;;;;;;;;OAeG;IACH,eAAe,CAAC,EAAE,OAAO,CAAA;CAC1B,CAAA;AAuKH;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE;IACpC,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,EAAE,MAAM,CAAA;IACnB,QAAQ,EAAE,MAAM,CAAA;IAChB,gEAAgE;IAChE,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,KAAK,EAAE,SAAS,MAAM,EAAE,CAAA;IACxB,MAAM,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CACpC,GAAG,WAAW,CAAC,MAAM,CAAC,CAkBtB;AAoRD;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,eAAe,CAAC,CAAC,SAAS,OAAO,EAAE,KAAK,EAAE,oBAAoB,CAAC,CAAC,CAAC,+BAwrBhF"}
|
package/dist/table/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/table/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AAC9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/table/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AAC9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAA;AAErD,YAAY,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAA"}
|
package/llms.txt
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# basalt-ui v2.7.
|
|
1
|
+
# basalt-ui v2.7.2
|
|
2
2
|
# Opinionated framework for Mantine-based React apps — theme, app shell, TanStack Charts, toolchain presets
|
|
3
3
|
#
|
|
4
4
|
# Entry points: use the exact import specifier below; do not guess.
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
# A subpath's `Install:` line is its required peers; `OptionalPeers:` are import()-only, install on use.
|
|
14
14
|
|
|
15
15
|
Package: basalt-ui
|
|
16
|
-
Version: 2.7.
|
|
16
|
+
Version: 2.7.2
|
|
17
17
|
|
|
18
18
|
## basalt-ui
|
|
19
19
|
Import: import { ... } from 'basalt-ui'
|
|
@@ -21,25 +21,198 @@ Description: Wiring (`BasaltProvider`, `createBasaltTheme`, `createBasaltRouter`
|
|
|
21
21
|
Layer: mantine-coupled
|
|
22
22
|
Rule: basalt-mantine
|
|
23
23
|
Signature: BasaltProvider(props: BasaltProviderProps): JSX.Element
|
|
24
|
+
router: BasaltRouter
|
|
25
|
+
theme?: PartialObjectDeep<MantineTheme, { recurseIntoArrays: false;…
|
|
26
|
+
telemetry?: Telemetry
|
|
27
|
+
fallback?: ReactNode | ((error: unknown) => ReactNode)
|
|
28
|
+
injectPalette?: boolean
|
|
29
|
+
paletteOptions?: BuildPaletteOpts
|
|
30
|
+
defaultColorScheme?: MantineColorScheme
|
|
31
|
+
nonce?: string
|
|
32
|
+
sizeClassHint?: "compact" | "medium" | "expanded"
|
|
33
|
+
navCommandLabel?: (item: FlatNavItem) => string
|
|
24
34
|
Signature: BasaltShell(props: BasaltShellProps<G, T>): JSX.Element
|
|
35
|
+
className?: string
|
|
36
|
+
style?: CSSProperties
|
|
37
|
+
brand: BrandConfig & { menu?: AccountMenuItem[]; }
|
|
38
|
+
globalActions?: GlobalAction[]
|
|
39
|
+
sidebarBlocks?: SidebarBlock[]
|
|
40
|
+
settingsMenuItems?: SettingsMenuItem[]
|
|
41
|
+
settingsMenu?: "auto" | "flat" | "menu"
|
|
42
|
+
account?: BasaltAccountProps
|
|
43
|
+
search?: SidebarSearchConfig & { actions?: SidebarSearchActions; }
|
|
44
|
+
storageKey?: string
|
|
45
|
+
collapsed?: boolean
|
|
46
|
+
onCollapsedChange?: (collapsed: boolean) => void
|
|
47
|
+
headerHeight?: number
|
|
48
|
+
children?: ReactNode
|
|
49
|
+
badges?: Partial<Record<Extract<keyof NavIndex<G>, string>, ReactNod…
|
|
50
|
+
isActive?: (item: NavItemMeta & { link: AnyNavLink; children?: Readonl…
|
|
51
|
+
getScrollElement?: () => HTMLElement | null
|
|
52
|
+
nav: NavConfig<G, T>
|
|
25
53
|
Signature: DangerZone(props: SettingsSectionProps): JSX.Element
|
|
54
|
+
className?: string
|
|
55
|
+
style?: CSSProperties
|
|
56
|
+
classNames?: Partial<Record<SettingsSectionSlot, string>>
|
|
57
|
+
icon?: ReactNode
|
|
58
|
+
title: string
|
|
59
|
+
subtitle?: string
|
|
60
|
+
info?: string
|
|
61
|
+
actions?: ReactNode
|
|
62
|
+
children: ReactNode
|
|
26
63
|
Signature: DeltaBadge(props: DeltaBadgeProps): JSX.Element
|
|
64
|
+
value: number
|
|
65
|
+
polarity?: DeltaPolarity
|
|
66
|
+
format?: (value: number) => string
|
|
67
|
+
withGlyph?: boolean
|
|
68
|
+
period?: string
|
|
27
69
|
Signature: EmptyState(props: EmptyStateProps): JSX.Element
|
|
70
|
+
className?: string
|
|
71
|
+
style?: CSSProperties
|
|
72
|
+
classNames?: Partial<Record<EmptyStateSlot, string>>
|
|
73
|
+
icon?: ReactNode
|
|
74
|
+
title: string
|
|
75
|
+
description?: string
|
|
76
|
+
action?: ReactNode
|
|
77
|
+
tier?: "section" | "page"
|
|
28
78
|
Signature: PageAside(props: PageAsideProps): ReactNode
|
|
79
|
+
className?: string
|
|
80
|
+
style?: CSSProperties
|
|
81
|
+
classNames?: Partial<Record<PageAsideSlot, string>>
|
|
82
|
+
title: string
|
|
83
|
+
persistKey?: string
|
|
84
|
+
defaultFolded?: boolean
|
|
85
|
+
children: ReactNode
|
|
29
86
|
Signature: PageBar(props: PageBarProps): ReactNode
|
|
87
|
+
className?: string
|
|
88
|
+
style?: CSSProperties
|
|
89
|
+
classNames?: Partial<Record<PageBarSlot, string>>
|
|
90
|
+
title?: string
|
|
91
|
+
icon?: ReactNode
|
|
92
|
+
actions?: PageBarActions
|
|
93
|
+
sync?: Omit<SyncButtonProps, "scope">
|
|
94
|
+
filters?: ReactNode
|
|
95
|
+
filtersEnd?: BarAction[]
|
|
96
|
+
tabs?: ReactNode
|
|
30
97
|
Signature: PageTitle(props: PageTitleProps): ReactNode
|
|
98
|
+
className?: string
|
|
99
|
+
style?: CSSProperties
|
|
100
|
+
classNames?: Partial<Record<PageTitleSlot, string>>
|
|
101
|
+
title: ReactNode
|
|
102
|
+
subtitle?: ReactNode
|
|
103
|
+
icon?: ReactNode
|
|
31
104
|
Signature: Section(props: SectionProps): JSX.Element
|
|
105
|
+
icon?: ReactNode
|
|
106
|
+
className?: string
|
|
107
|
+
style?: CSSProperties
|
|
108
|
+
title: string
|
|
109
|
+
subtitle?: string
|
|
110
|
+
info?: string
|
|
111
|
+
value?: string
|
|
112
|
+
unit?: string
|
|
113
|
+
delta?: number
|
|
114
|
+
deltaPeriod?: string
|
|
115
|
+
deltaPolarity?: DeltaPolarity
|
|
116
|
+
deltaFormat?: (delta: number) => string
|
|
117
|
+
deltaGlyph?: boolean
|
|
118
|
+
sparkline?: ReactNode
|
|
119
|
+
count?: number
|
|
120
|
+
classNames?: Partial<Record<SectionSlot, string>>
|
|
121
|
+
actions?: SectionActions
|
|
122
|
+
query?: QueryStateLike<unknown>
|
|
123
|
+
empty?: QueryEmptyCopy
|
|
124
|
+
tabs?: ReactNode
|
|
125
|
+
collapsible?: boolean
|
|
126
|
+
persistKey?: string
|
|
127
|
+
defaultOpen?: boolean
|
|
128
|
+
summary?: ReactNode
|
|
129
|
+
id?: string
|
|
130
|
+
children: ReactNode
|
|
32
131
|
Signature: SettingsRow(props: SettingsRowProps): JSX.Element
|
|
132
|
+
className?: string
|
|
133
|
+
style?: CSSProperties
|
|
134
|
+
classNames?: Partial<Record<SettingsRowSlot, string>>
|
|
135
|
+
label: string
|
|
136
|
+
description?: string
|
|
137
|
+
control?: ReactNode
|
|
138
|
+
children?: ReactNode
|
|
33
139
|
Signature: SettingsSection(props: SettingsSectionProps): JSX.Element
|
|
140
|
+
className?: string
|
|
141
|
+
style?: CSSProperties
|
|
142
|
+
classNames?: Partial<Record<SettingsSectionSlot, string>>
|
|
143
|
+
icon?: ReactNode
|
|
144
|
+
title: string
|
|
145
|
+
subtitle?: string
|
|
146
|
+
info?: string
|
|
147
|
+
actions?: ReactNode
|
|
148
|
+
children: ReactNode
|
|
34
149
|
Signature: StatCard(props: StatCardProps): JSX.Element
|
|
150
|
+
className?: string
|
|
151
|
+
style?: CSSProperties
|
|
152
|
+
classNames?: Partial<Record<StatCardSlot, string>>
|
|
153
|
+
icon?: ReactNode
|
|
154
|
+
title: string
|
|
155
|
+
subtitle?: string
|
|
156
|
+
info?: string
|
|
157
|
+
unit?: string
|
|
158
|
+
delta?: number
|
|
159
|
+
deltaPeriod?: string
|
|
160
|
+
deltaPolarity?: DeltaPolarity
|
|
161
|
+
deltaFormat?: (delta: number) => string
|
|
162
|
+
deltaGlyph?: boolean
|
|
163
|
+
value: string
|
|
164
|
+
breakdown?: readonly StatCardBreakdownRow[]
|
|
165
|
+
query?: QueryStateLike<unknown>
|
|
166
|
+
sparkline?: ReactNode | ((size: StatCardSparklineSize) => ReactNode)
|
|
167
|
+
sparklinePlacement?: "bleed" | "right"
|
|
168
|
+
actions?: ReactNode
|
|
169
|
+
tone?: Tone
|
|
35
170
|
Signature: StatGroup(props: StatGroupProps): JSX.Element
|
|
171
|
+
className?: string
|
|
172
|
+
style?: CSSProperties
|
|
173
|
+
cols?: StatGroupCols
|
|
174
|
+
divided?: boolean
|
|
175
|
+
children: ReactNode
|
|
36
176
|
Signature: ThemeToggle(props: ThemeToggleProps): JSX.Element
|
|
177
|
+
className?: string
|
|
178
|
+
style?: CSSProperties
|
|
179
|
+
openDelay?: number
|
|
180
|
+
closeDelay?: number
|
|
37
181
|
Signature: WidgetHeader(props: WidgetHeaderProps): JSX.Element
|
|
182
|
+
className?: string
|
|
183
|
+
style?: CSSProperties
|
|
184
|
+
classNames?: Partial<Record<WidgetHeaderSlot, string>>
|
|
185
|
+
tier: WidgetHeaderTier
|
|
186
|
+
title: string
|
|
187
|
+
icon?: ReactNode
|
|
188
|
+
subtitle?: string
|
|
189
|
+
info?: string
|
|
190
|
+
value?: string
|
|
191
|
+
unit?: string
|
|
192
|
+
delta?: number
|
|
193
|
+
deltaPeriod?: string
|
|
194
|
+
deltaPolarity?: DeltaPolarity
|
|
195
|
+
deltaFormat?: (delta: number) => string
|
|
196
|
+
deltaGlyph?: boolean
|
|
197
|
+
sparkline?: ReactNode
|
|
198
|
+
count?: number
|
|
199
|
+
actions?: ReactNode
|
|
38
200
|
Signature: createBasaltRouter(options: { routeTree: TRouteTree; context?: TContext; query?: QueryClientConfi…): BasaltRouter<TRouteTree>
|
|
201
|
+
routeTree: TRouteTree
|
|
202
|
+
context?: TContext
|
|
203
|
+
query?: QueryClientConfig
|
|
204
|
+
defaultViewTransition?: never
|
|
39
205
|
Signature: createBasaltTheme(overrides: Omit<PartialObjectDeep<MantineTheme, { recurseIntoArrays: false; allo…, options: CreateBasaltThemeOptions | undefined): PartialObjectDeep<Ma…
|
|
40
206
|
Signature: defineNav(config: "basalt: declare Register { router }"): NavConfig<G, T>
|
|
41
207
|
Signature: flattenNav(config: { groups: ReadonlyArray<AnyNavGroup>; }): FlatNavItem[]
|
|
208
|
+
groups: readonly AnyNavGroup[]
|
|
42
209
|
Signature: navGroup(meta: Exact<M, NavGroupMeta>, items: NavItemsInput<T>): M & { items: T; }
|
|
210
|
+
id: string
|
|
211
|
+
label: string
|
|
212
|
+
icon?: ReactNode
|
|
213
|
+
collapsible?: boolean
|
|
214
|
+
defaultCollapsed?: boolean
|
|
215
|
+
mobile?: false | NavSectionMobile
|
|
43
216
|
Signature: navTarget(config: C, id: K): NavIndex<C["groups"]>[K]
|
|
44
217
|
Signature: scrollParentOf(el: Element | null): HTMLElement | null
|
|
45
218
|
Signature: unwrap(response: R): UnwrapResult<R>
|
|
@@ -270,6 +443,13 @@ Signature: CONTAINER_KEYS: { compact, regular, wide }
|
|
|
270
443
|
Signature: VX: { lineWidth, line2Width, axisFont, dotR, dashArray, legendGap, legendFontSize, text, radiusCard, radiusCtrl, radiusPill, hit, space, line2Dark, good, goodSoft, bad, …
|
|
271
444
|
Signature: alpha(token: string, a: number): string
|
|
272
445
|
Signature: buildPaletteCss(opts: BuildPaletteOpts, data: { ACCENT: { readonly accent: ColorPair; readonly accentHover: ColorPa…): string
|
|
446
|
+
groups?: readonly SeriesGroup[]
|
|
447
|
+
derived?: string[]
|
|
448
|
+
scheme?: ColorSchemeSelector
|
|
449
|
+
defaultScheme?: "light" | "dark" | "none"
|
|
450
|
+
mediaFallback?: boolean
|
|
451
|
+
only?: "core" | "all"
|
|
452
|
+
legacyAliases?: boolean
|
|
273
453
|
Signature: defineSeries(map: T): T
|
|
274
454
|
Signature: groupTokens(name: string, map: T): { readonly [K in keyof T]: GroupRef; }
|
|
275
455
|
Signature: p(fam: readonly string[], light: number, dark: number): ColorPair
|
|
@@ -280,7 +460,29 @@ Import: import { ... } from 'basalt-ui/vite'
|
|
|
280
460
|
Description: basaltViteConfig(opts) — Vite preset for basalt-ui consumer apps; basaltAppPlugin(opts) — PWA head, manifest, and icon metadata derived from the token palette
|
|
281
461
|
Layer: build-tooling
|
|
282
462
|
Signature: basaltAppPlugin(options: BasaltAppOptions): PluginOption[]
|
|
463
|
+
name: string
|
|
464
|
+
shortName?: string
|
|
465
|
+
description?: string
|
|
466
|
+
themeColor?: "auto" | { light: string; dark: string; }
|
|
467
|
+
colorScheme?: false | "light" | "dark" | "auto"
|
|
468
|
+
backgroundColor?: string
|
|
469
|
+
display?: "standalone" | "minimal-ui" | "fullscreen" | "browser"
|
|
470
|
+
startUrl?: string
|
|
471
|
+
scope?: string
|
|
472
|
+
id?: string
|
|
473
|
+
icons?: false | { dir?: string; } | readonly BasaltAppIcon[]
|
|
474
|
+
darkreader?: false | "lock"
|
|
475
|
+
seo?: { url?: string; image?: string; twitterCard?: "summary" | "…
|
|
476
|
+
manifest?: false
|
|
477
|
+
serviceWorker?: boolean | Record<string, unknown>
|
|
283
478
|
Signature: basaltViteConfig(opts: BasaltViteOptions): UserConfig
|
|
479
|
+
port: number
|
|
480
|
+
host?: string | boolean
|
|
481
|
+
allowedHosts?: string[]
|
|
482
|
+
apiTarget?: string
|
|
483
|
+
basaltSrc?: string
|
|
484
|
+
version?: string
|
|
485
|
+
enforcementNotice?: boolean
|
|
284
486
|
Install: bun add 'vite@^7 || ^8'
|
|
285
487
|
OptionalPeers: vite-plugin-pwa@^1.3.0
|
|
286
488
|
|
|
@@ -311,11 +513,18 @@ Install: bun add @mantine/form@^9.7.0
|
|
|
311
513
|
|
|
312
514
|
## basalt-ui/commands
|
|
313
515
|
Import: import { ... } from 'basalt-ui/commands'
|
|
314
|
-
Description: defineCommands (typed command bus), defineOverlays/overlays, setColorScheme, toggleSidebar, ShortcutsHelp, defineNotifications/emit/NotificationBell (folded in from ./notifications); BasaltProvider mounts Spotlight, Modals and Notifications
|
|
516
|
+
Description: defineCommands (typed command bus), defineOverlays/overlays (a form dialog is a registered overlay opened with overlays.open), setColorScheme, toggleSidebar, ShortcutsHelp, defineNotifications/emit/NotificationBell (emit only accepts kinds registered in defineNotifications; folded in from ./notifications); BasaltProvider mounts Spotlight, Modals and Notifications
|
|
315
517
|
Layer: mantine-coupled
|
|
316
518
|
Rule: basalt-batteries
|
|
317
519
|
Signature: NotificationBell(props: NotificationBellProps): JSX.Element
|
|
520
|
+
className?: string
|
|
521
|
+
style?: CSSProperties
|
|
522
|
+
label?: string
|
|
318
523
|
Signature: ShortcutsHelp(props: ShortcutsHelpProps): JSX.Element | null
|
|
524
|
+
className?: string
|
|
525
|
+
style?: CSSProperties
|
|
526
|
+
title?: string
|
|
527
|
+
maw?: string | number
|
|
319
528
|
Signature: defineCommands(spec: T): T
|
|
320
529
|
Signature: defineNotifications(spec: T): T
|
|
321
530
|
Signature: defineOverlays(spec: T): T
|
|
@@ -381,13 +590,54 @@ Description: Streaming-chat surface: aiSdkTransport, useAgentThreadRuns, parseAg
|
|
|
381
590
|
Layer: mantine-coupled
|
|
382
591
|
Rule: basalt-batteries
|
|
383
592
|
Signature: Composer(props: ComposerProps): JSX.Element
|
|
593
|
+
className?: string
|
|
594
|
+
style?: CSSProperties
|
|
595
|
+
classNames?: Partial<Record<ComposerSlot, string>>
|
|
596
|
+
ref?: Ref<ComposerHandle>
|
|
597
|
+
onSubmit: (payload: ComposerSubmit) => void | Promise<void>
|
|
598
|
+
placeholder?: string
|
|
599
|
+
autoFocus?: boolean
|
|
600
|
+
maxRows?: number
|
|
601
|
+
disabled?: boolean
|
|
602
|
+
streaming?: boolean
|
|
603
|
+
allowSubmitWhileStreaming?: boolean
|
|
604
|
+
onStop?: (() => void)
|
|
605
|
+
leftSection?: ReactNode
|
|
606
|
+
rightSection?: ReactNode
|
|
607
|
+
attachments?: readonly ComposerAttachment[]
|
|
608
|
+
onAttachmentsChange?: ((next: readonly ComposerAttachment[]) => void)
|
|
609
|
+
onPaste?: ((event: ClipboardEvent<HTMLTextAreaElement>) => void)
|
|
610
|
+
draftKey?: string
|
|
611
|
+
hint?: ReactNode
|
|
384
612
|
Signature: ThreadFeed(props: ThreadFeedProps): JSX.Element
|
|
613
|
+
className?: string
|
|
614
|
+
style?: CSSProperties
|
|
615
|
+
threads: AgentThread[]
|
|
616
|
+
activeId: string | null
|
|
617
|
+
onSelect: (id: string) => void
|
|
618
|
+
variant?: "outcome" | "inline"
|
|
619
|
+
onSend?: ((thread: AgentThread, payload: ComposerSubmit) => void)
|
|
620
|
+
renderRow?: ((thread: AgentThread) => ReactNode)
|
|
621
|
+
anchor?: "start" | "end"
|
|
385
622
|
Signature: ThreadFeedRow(props: ThreadFeedRowProps): JSX.Element
|
|
386
623
|
Signature: ToolChip(props: ToolChipProps): JSX.Element
|
|
624
|
+
className?: string
|
|
625
|
+
style?: CSSProperties
|
|
626
|
+
part: ToolCallPart
|
|
627
|
+
defaultExpanded?: boolean
|
|
628
|
+
onApprove?: ((approvalId: string) => void)
|
|
629
|
+
onDeny?: ((approvalId: string, reason?: string) => void)
|
|
387
630
|
Signature: aiSdkTransport(options: AiSdkTransportOptions): AiSdkTransport<TPart>
|
|
388
631
|
Signature: parseAgentPart(raw: unknown): AgentPart | null
|
|
389
632
|
Signature: toAgentError(error: unknown): AgentError
|
|
390
633
|
Signature: useAgentThreadRuns(props: UseAgentThreadRunsArgs<TPart>): UseAgentThreadRunsReturn<TPart>
|
|
634
|
+
transport: AgentTransport<TPart, string> | ((threadId: string) => Agen…
|
|
635
|
+
store: ThreadsStore<TPart>
|
|
636
|
+
resolveOutcome: OutcomeResolver<TPart>
|
|
637
|
+
toUserParts?: ((input: string) => TPart[])
|
|
638
|
+
onError?: ((info: { readonly threadId: string; readonly error: unknow…
|
|
639
|
+
throttle?: number
|
|
640
|
+
telemetry?: Telemetry
|
|
391
641
|
Install: bun add ai@^7.0.137 @ai-sdk/provider@^4.0.26 motion@14.1.0
|
|
392
642
|
OptionalPeers: use-stick-to-bottom@^1.1.6, @tanstack/react-virtual@>=3.14.0 <4
|
|
393
643
|
|
|
@@ -397,12 +647,74 @@ Description: Prose (article/chat typography), Callout, TableOfContents, Markdown
|
|
|
397
647
|
Layer: mantine-coupled
|
|
398
648
|
Rule: basalt-batteries
|
|
399
649
|
Signature: ArticleLayout(props: ArticleLayoutProps): JSX.Element
|
|
650
|
+
children: ReactNode
|
|
651
|
+
meta?: ArticleLayoutMeta
|
|
652
|
+
toc?: boolean
|
|
653
|
+
readingProgress?: boolean
|
|
654
|
+
prev?: ArticleNavTarget
|
|
655
|
+
next?: ArticleNavTarget
|
|
656
|
+
renderLink?: (target: ArticleNavTarget, node: ReactNode) => ReactNode
|
|
657
|
+
density?: ProseDensity
|
|
658
|
+
locale?: string
|
|
659
|
+
className?: string
|
|
660
|
+
style?: CSSProperties
|
|
400
661
|
Signature: Callout(props: CalloutProps): JSX.Element
|
|
662
|
+
className?: string
|
|
663
|
+
style?: CSSProperties
|
|
664
|
+
kind?: CalloutKind
|
|
665
|
+
title?: string
|
|
666
|
+
icon?: ReactNode
|
|
667
|
+
children: ReactNode
|
|
401
668
|
Signature: GuideLink(props: GuideLinkProps): JSX.Element
|
|
669
|
+
className?: string
|
|
670
|
+
style?: CSSProperties
|
|
671
|
+
label?: string
|
|
672
|
+
title: string
|
|
673
|
+
children?: ReactNode
|
|
674
|
+
markdown?: string
|
|
675
|
+
fullPageHref?: string
|
|
676
|
+
renderLink?: (target: ArticleNavTarget, node: ReactNode) => ReactNode
|
|
677
|
+
iconOnly?: boolean
|
|
402
678
|
Signature: Markdown(props: MarkdownProps): JSX.Element
|
|
679
|
+
children: string
|
|
680
|
+
density?: ProseDensity
|
|
681
|
+
measure?: boolean
|
|
682
|
+
streaming?: boolean
|
|
683
|
+
contentTrust?: MarkdownContentTrust
|
|
684
|
+
components?: Components
|
|
685
|
+
fenceRenderers?: Readonly<Record<string, FenceRenderer>>
|
|
686
|
+
sanitizeSchema?: SanitizeSchemaExtension
|
|
687
|
+
allowedLinkPrefixes?: readonly string[]
|
|
688
|
+
allowedImagePrefixes?: readonly string[]
|
|
689
|
+
defaultOrigin?: string
|
|
690
|
+
remarkPlugins?: readonly unknown[]
|
|
691
|
+
rehypePlugins?: readonly unknown[]
|
|
692
|
+
className?: string
|
|
693
|
+
style?: CSSProperties
|
|
403
694
|
Signature: Prose(props: ProseProps): JSX.Element
|
|
695
|
+
density?: ProseDensity
|
|
696
|
+
measure?: boolean
|
|
697
|
+
children: ReactNode
|
|
698
|
+
className?: string
|
|
699
|
+
style?: CSSProperties
|
|
404
700
|
Signature: TableOfContents(props: TableOfContentsProps): JSX.Element | null
|
|
701
|
+
items?: TocItem[]
|
|
702
|
+
containerRef?: RefObject<HTMLElement | null>
|
|
703
|
+
levels?: readonly [number, number]
|
|
704
|
+
title?: string
|
|
705
|
+
onNavigate?: (id: string) => void
|
|
706
|
+
className?: string
|
|
405
707
|
Signature: mergeSanitizeSchema(base: SanitizeSchemaInput, extensions: readonly (SanitizeSchemaExtension | undefined)[]): SanitizeSchema
|
|
708
|
+
allowComments?: boolean | null
|
|
709
|
+
allowDoctypes?: boolean | null
|
|
710
|
+
ancestors?: Readonly<Record<string, readonly string[]>> | null
|
|
711
|
+
attributes?: Readonly<Record<string, readonly SanitizePropertyDefinition…
|
|
712
|
+
clobber?: readonly string[] | null
|
|
713
|
+
clobberPrefix?: string | null
|
|
714
|
+
protocols?: Readonly<Record<string, readonly string[] | null | undefine…
|
|
715
|
+
required?: Readonly<Record<string, Readonly<Record<string, unknown>>>>…
|
|
716
|
+
strip?: readonly string[] | null
|
|
717
|
+
tagNames?: readonly string[] | null
|
|
406
718
|
Signature: settledOnly(render: FenceRenderer): FenceRenderer
|
|
407
719
|
Install: bun add react-markdown@^10.1.0
|
|
408
720
|
OptionalPeers: shiki@^4.5.0, @shikijs/langs@^4.5.0, @shikijs/themes@^4.5.0, beautiful-mermaid@^1.1.0, remark-gfm@^4.0.1, rehype-sanitize@^6.0.0, remend@1.4.0
|
|
@@ -413,16 +725,112 @@ Description: The control tier (docs/CONTROLS-SPEC.md §3). Exports: `FilterSet`
|
|
|
413
725
|
Layer: mantine-coupled
|
|
414
726
|
Rule: basalt-controls
|
|
415
727
|
Signature: FilterSet(props: FilterSetProps): ReactNode
|
|
728
|
+
className?: string
|
|
729
|
+
style?: CSSProperties
|
|
730
|
+
classNames?: Partial<Record<"root" | "sheet", string>>
|
|
731
|
+
children: ReactNode
|
|
732
|
+
inline?: number
|
|
416
733
|
Signature: FormGroup(props: FormGroupProps): JSX.Element
|
|
734
|
+
className?: string
|
|
735
|
+
style?: CSSProperties
|
|
736
|
+
label: string
|
|
737
|
+
hint?: string
|
|
738
|
+
error?: ReactNode
|
|
739
|
+
required?: boolean
|
|
740
|
+
direction?: "row" | "column"
|
|
741
|
+
children: ReactNode
|
|
417
742
|
Signature: FormRow(props: FormRowProps): JSX.Element
|
|
743
|
+
className?: string
|
|
744
|
+
style?: CSSProperties
|
|
745
|
+
classNames?: Partial<Record<FormRowSlot, string>>
|
|
746
|
+
label: string
|
|
747
|
+
hint?: string
|
|
748
|
+
error?: ReactNode
|
|
749
|
+
required?: boolean
|
|
750
|
+
htmlFor?: string
|
|
751
|
+
children: ReactNode
|
|
418
752
|
Signature: MultiSelectFilter(props: MultiSelectFilterProps<T>): ReactNode
|
|
753
|
+
className?: string
|
|
754
|
+
style?: CSSProperties
|
|
755
|
+
value?: never
|
|
756
|
+
onChange?: never
|
|
757
|
+
size?: never
|
|
758
|
+
field: FieldHandle<MultiField<T>>
|
|
759
|
+
label: string
|
|
760
|
+
icon?: ReactNode
|
|
761
|
+
noun?: string
|
|
762
|
+
options?: readonly FilterOption[]
|
|
763
|
+
counts?: Record<string, number>
|
|
764
|
+
max?: number
|
|
419
765
|
Signature: NumberFilter(props: NumberFilterProps): ReactNode
|
|
766
|
+
className?: string
|
|
767
|
+
style?: CSSProperties
|
|
768
|
+
value?: never
|
|
769
|
+
onChange?: never
|
|
770
|
+
size?: never
|
|
771
|
+
field: FieldHandle<NumberField>
|
|
772
|
+
label: string
|
|
773
|
+
icon?: ReactNode
|
|
774
|
+
options?: readonly NumberFilterOption[]
|
|
775
|
+
step?: number
|
|
776
|
+
clearable?: boolean
|
|
420
777
|
Signature: RangeFilter(props: RangeFilterProps<P, C>): ReactNode
|
|
778
|
+
className?: string
|
|
779
|
+
style?: CSSProperties
|
|
780
|
+
value?: never
|
|
781
|
+
onChange?: never
|
|
782
|
+
size?: never
|
|
783
|
+
field: FieldHandle<RangeField<P, C>>
|
|
784
|
+
icon?: ReactNode
|
|
785
|
+
label?: string
|
|
786
|
+
customPicker?: ComponentType<RangeCustomPickerProps>
|
|
421
787
|
Signature: SearchFilter(props: SearchFilterProps): ReactNode
|
|
788
|
+
className?: string
|
|
789
|
+
style?: CSSProperties
|
|
790
|
+
value?: never
|
|
791
|
+
onChange?: never
|
|
792
|
+
size?: never
|
|
793
|
+
field: FieldHandle<StringField>
|
|
794
|
+
placeholder?: string
|
|
795
|
+
label?: string
|
|
422
796
|
Signature: SelectFilter(props: SelectFilterEnumProps<T>): ReactNode
|
|
797
|
+
className?: string
|
|
798
|
+
style?: CSSProperties
|
|
799
|
+
value?: never
|
|
800
|
+
onChange?: never
|
|
801
|
+
size?: never
|
|
802
|
+
label: string
|
|
803
|
+
icon?: ReactNode
|
|
804
|
+
clearable?: boolean
|
|
805
|
+
field: FieldHandle<EnumField<T>>
|
|
806
|
+
options?: readonly FilterOption[]
|
|
423
807
|
Signature: SyncButton(props: SyncButtonProps): ReactNode
|
|
808
|
+
className?: string
|
|
809
|
+
style?: CSSProperties
|
|
810
|
+
syncing: boolean
|
|
811
|
+
lastCompletedAt?: number | Date | null
|
|
812
|
+
onSync: () => void
|
|
813
|
+
scope: "page" | "global"
|
|
814
|
+
label?: string
|
|
815
|
+
error?: string
|
|
424
816
|
Signature: ToggleFilter(props: ToggleFilterProps): ReactNode
|
|
817
|
+
className?: string
|
|
818
|
+
style?: CSSProperties
|
|
819
|
+
value?: never
|
|
820
|
+
onChange?: never
|
|
821
|
+
size?: never
|
|
822
|
+
field: FieldHandle<BooleanField>
|
|
823
|
+
label: string
|
|
824
|
+
icon?: ReactNode
|
|
425
825
|
Signature: ViewTabs(props: ViewTabsProps<T>): ReactNode
|
|
826
|
+
className?: string
|
|
827
|
+
style?: CSSProperties
|
|
828
|
+
value?: never
|
|
829
|
+
onChange?: never
|
|
830
|
+
size?: never
|
|
831
|
+
field: FieldHandle<EnumField<T>>
|
|
832
|
+
options?: readonly ViewTabsOption<T>[]
|
|
833
|
+
label?: string
|
|
426
834
|
|
|
427
835
|
## basalt-ui/controls-dates
|
|
428
836
|
Import: import { ... } from 'basalt-ui/controls-dates'
|
|
@@ -430,6 +838,8 @@ Description: DateRangePicker — the @mantine/dates implementation of RangeFilte
|
|
|
430
838
|
Layer: mantine-coupled
|
|
431
839
|
Rule: basalt-controls
|
|
432
840
|
Signature: DateRangePicker(props: RangeCustomPickerProps): ReactNode
|
|
841
|
+
value: { readonly from?: string | undefined; readonly to?: string …
|
|
842
|
+
onChange: (next: { from: string; to: string; }) => void
|
|
433
843
|
Install: bun add @mantine/dates@^9.7.0 dayjs@^1.11.0
|
|
434
844
|
|
|
435
845
|
## basalt-ui/state
|
|
@@ -438,9 +848,25 @@ Description: field.enum/multi/range/number/boolean/string (the store field vocab
|
|
|
438
848
|
Layer: headless
|
|
439
849
|
Rule: basalt-state
|
|
440
850
|
Signature: createLocalStore(o: { key: string; fields: S; version?: number; }): LocalStore<S>
|
|
851
|
+
key: string
|
|
852
|
+
fields: S
|
|
853
|
+
version?: number
|
|
441
854
|
Signature: createPersistedState(opts: PersistedStateOptions<T>): () => readonly [T, (next: T) => void]
|
|
855
|
+
key: string
|
|
856
|
+
version: number
|
|
857
|
+
initial: T
|
|
858
|
+
migrate?: (persisted: unknown, fromVersion: number) => T
|
|
859
|
+
schema?: StandardSchemaV1<unknown, T>
|
|
442
860
|
Signature: createSearchStore(o: CreateSearchStoreOptions<S>): SearchStore<S>
|
|
861
|
+
key: string
|
|
862
|
+
fields: S
|
|
863
|
+
version?: number
|
|
864
|
+
resets?: readonly string[]
|
|
443
865
|
Signature: externalField(o: { values: readonly T[]; fallback: NoInfer<T>; labels?: Partial<Record…): FieldHandle<EnumField<T, ResolvedLane>>
|
|
866
|
+
values: readonly T[]
|
|
867
|
+
fallback: NoInfer<T>
|
|
868
|
+
labels?: Partial<Record<T, string>>
|
|
869
|
+
store: ExternalStore<T>
|
|
444
870
|
Signature: field: { enum, multi, range, number, boolean, string }
|
|
445
871
|
|
|
446
872
|
## basalt-ui/styles.css
|
package/package.json
CHANGED
package/src/charts/DualPanel.tsx
CHANGED
|
@@ -18,6 +18,7 @@ import { defaultFormatX, defaultNumberFormat, engineRow, seriesRow, visibleSerie
|
|
|
18
18
|
import { barMark, emphasis, lineMark, markersOf, thinFill } from './marks'
|
|
19
19
|
import { PanelRung, chartHeightOf, paneX, paneY, rowsOf } from './panel'
|
|
20
20
|
import type { PaneBuilder, PanelInput, PanelPlan } from './panel'
|
|
21
|
+
import type { SignedSeries } from './legend'
|
|
21
22
|
import { xScaleFor } from './scales'
|
|
22
23
|
import { rowX } from './types'
|
|
23
24
|
import type { CartesianChartProps, ChartSeries, PlotContext, PlotRow } from './types'
|
|
@@ -57,7 +58,7 @@ export type DualPanelLine<T> = Pick<
|
|
|
57
58
|
export type DualPanelBar<T> = {
|
|
58
59
|
label: string
|
|
59
60
|
getValue: (d: T) => number | null
|
|
60
|
-
/** The fill above zero
|
|
61
|
+
/** The fill above zero; the legend swatch splits positive | negative (one entry, one toggle). */
|
|
61
62
|
positive: string
|
|
62
63
|
/** The fill below zero. */
|
|
63
64
|
negative: string
|
|
@@ -149,15 +150,16 @@ export function DualPanel<T, X extends Date | number = Date | number>(
|
|
|
149
150
|
() => series.map((s) => ({ ...s, mark: 'line' as const })),
|
|
150
151
|
[series],
|
|
151
152
|
)
|
|
152
|
-
const barSeries = useMemo<
|
|
153
|
+
const barSeries = useMemo<SignedSeries<T>>(
|
|
153
154
|
() => ({
|
|
154
155
|
key: BAR_KEY,
|
|
155
156
|
label: bar.label,
|
|
156
157
|
color: bar.positive,
|
|
158
|
+
colorNegative: bar.negative,
|
|
157
159
|
mark: 'bar',
|
|
158
160
|
getValue: bar.getValue,
|
|
159
161
|
}),
|
|
160
|
-
[bar.label, bar.positive, bar.getValue],
|
|
162
|
+
[bar.label, bar.positive, bar.negative, bar.getValue],
|
|
161
163
|
)
|
|
162
164
|
const all = useMemo(() => [...lines, barSeries], [lines, barSeries])
|
|
163
165
|
const topFormat = top?.format ?? defaultNumberFormat
|
package/src/charts/legend.tsx
CHANGED
|
@@ -9,7 +9,12 @@ import { VX } from '../tokens'
|
|
|
9
9
|
import classes from './chart-legend.module.css'
|
|
10
10
|
import type { ChartSeries } from './types'
|
|
11
11
|
|
|
12
|
-
/**
|
|
12
|
+
/**
|
|
13
|
+
* `auto` renders both swatches and lets the container decide: none, dots or chips (CSS). The
|
|
14
|
+
* swatch SHAPE follows the mode, signed split included: below 480px a dot (8px circle), from 480px
|
|
15
|
+
* a chip (10px square) — so one `DualPanel` bar legend is a split circle on a narrow card and a
|
|
16
|
+
* split square on a wide one. By design (friction row 58), not a per-chart prop.
|
|
17
|
+
*/
|
|
13
18
|
export type LegendMode = 'dots' | 'chips' | 'auto'
|
|
14
19
|
|
|
15
20
|
const ROLE_ORDER = ['series', 'overlay', 'reference'] as const
|
|
@@ -69,11 +74,22 @@ const buttonStyle: CSSProperties = {
|
|
|
69
74
|
}
|
|
70
75
|
const noteStyle: CSSProperties = { color: VX.axis }
|
|
71
76
|
|
|
77
|
+
/**
|
|
78
|
+
* A legend entry that may be a sign-coloured bar: `colorNegative` is the below-zero colour and the
|
|
79
|
+
* swatch splits `color` | `colorNegative`. Only `DualPanel`'s bar sets it; the entry stays one
|
|
80
|
+
* toggle, so the sign halves hide together.
|
|
81
|
+
*/
|
|
82
|
+
export type SignedSeries<T> = ChartSeries<T> & { colorNegative?: string | undefined }
|
|
83
|
+
|
|
72
84
|
type SwatchStyle = Pick<
|
|
73
|
-
|
|
74
|
-
'color' | 'mark' | 'dash' | 'strokeOpacity' | 'fillOpacity'
|
|
85
|
+
SignedSeries<never>,
|
|
86
|
+
'color' | 'colorNegative' | 'mark' | 'dash' | 'strokeOpacity' | 'fillOpacity'
|
|
75
87
|
>
|
|
76
88
|
|
|
89
|
+
/** A swatch fill: the series colour, or a hard-stop split for a sign-coloured bar. */
|
|
90
|
+
const swatchFill = (s: SwatchStyle): string =>
|
|
91
|
+
s.colorNegative ? `linear-gradient(90deg, ${s.color} 50%, ${s.colorNegative} 50%)` : s.color
|
|
92
|
+
|
|
77
93
|
function Swatch({ s, mode }: { s: SwatchStyle; mode: LegendMode }): ReactElement {
|
|
78
94
|
if (mode === 'auto')
|
|
79
95
|
return (
|
|
@@ -92,7 +108,7 @@ function Swatch({ s, mode }: { s: SwatchStyle; mode: LegendMode }): ReactElement
|
|
|
92
108
|
height: 8,
|
|
93
109
|
// theme-allow raw-surface — a legend dot is a circle, not a surface corner
|
|
94
110
|
borderRadius: '50%',
|
|
95
|
-
background: s
|
|
111
|
+
background: swatchFill(s),
|
|
96
112
|
opacity: s.fillOpacity ?? 1,
|
|
97
113
|
flex: 'none',
|
|
98
114
|
}}
|
|
@@ -123,7 +139,7 @@ function Swatch({ s, mode }: { s: SwatchStyle; mode: LegendMode }): ReactElement
|
|
|
123
139
|
height: 10,
|
|
124
140
|
// theme-allow raw-surface — swatch geometry, not a surface corner
|
|
125
141
|
borderRadius: 2,
|
|
126
|
-
background: s
|
|
142
|
+
background: swatchFill(s),
|
|
127
143
|
opacity: s.fillOpacity ?? 1,
|
|
128
144
|
flex: 'none',
|
|
129
145
|
}}
|
|
@@ -132,7 +148,7 @@ function Swatch({ s, mode }: { s: SwatchStyle; mode: LegendMode }): ReactElement
|
|
|
132
148
|
}
|
|
133
149
|
|
|
134
150
|
export type ChartLegendProps<T> = {
|
|
135
|
-
series: readonly
|
|
151
|
+
series: readonly SignedSeries<T>[]
|
|
136
152
|
hidden: ReadonlySet<string>
|
|
137
153
|
mode: LegendMode
|
|
138
154
|
groups: boolean
|
|
@@ -5,6 +5,9 @@
|
|
|
5
5
|
* `overlays` imperative controller — unknown keys are tsc errors. The type slot gives the
|
|
6
6
|
* compile-time key union; the module-level stash gives the runtime values.
|
|
7
7
|
*
|
|
8
|
+
* A form dialog is an entry whose `render` returns the form; open it from a row action with
|
|
9
|
+
* `overlays.open('id', props)` and put its component in a `*-modal.tsx`.
|
|
10
|
+
*
|
|
8
11
|
* Uses @mantine/modals under the hood. ModalsProvider must be mounted (BasaltProvider does this).
|
|
9
12
|
*
|
|
10
13
|
* @example
|
|
@@ -338,6 +341,8 @@ export const overlays = {
|
|
|
338
341
|
* Open a registered overlay by key. Resolves the Overlay spec from the runtime stash and calls
|
|
339
342
|
* modals.open() with the rendered body. The props type is inferred from the registered overlay.
|
|
340
343
|
*
|
|
344
|
+
* Needs the key registered first: `defineOverlays` plus the `BasaltRegister` `overlays` augmentation.
|
|
345
|
+
*
|
|
341
346
|
* `overlays.open('nonexistent', …)` is a tsc error when BasaltRegister.overlays is augmented.
|
|
342
347
|
* Un-augmented: OverlayKey = never → effectively uncallable.
|
|
343
348
|
*
|
package/src/commands/index.ts
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* ./commands — the command bus, overlay controller, shortcuts help and the notification registry.
|
|
3
3
|
*
|
|
4
|
+
* Two seams need registering first: `emit(kind)` only accepts kinds registered in `defineNotifications`,
|
|
5
|
+
* and a form dialog is a `defineOverlays` entry opened with `overlays.open('id', props)`; both
|
|
6
|
+
* register their keys through the `declare module 'basalt-ui'` augmentation (see each factory).
|
|
7
|
+
*
|
|
4
8
|
* `BasaltProvider` mounts modals, Spotlight, hotkeys and notifications; this barrel is only what
|
|
5
9
|
* an app declares and calls.
|
|
6
10
|
*
|
|
@@ -2,6 +2,9 @@
|
|
|
2
2
|
* defineNotifications — const-generic factory for typed notification kind registries.
|
|
3
3
|
* Mirrors the defineSeries pattern from ./tokens (const-generic, identity passthrough).
|
|
4
4
|
*
|
|
5
|
+
* `emit` only accepts kinds registered here first: call `defineNotifications` and augment
|
|
6
|
+
* `BasaltRegister.notifications` before emitting.
|
|
7
|
+
*
|
|
5
8
|
* Consumer augments BasaltRegister.notifications with the spec map type, then uses the typed
|
|
6
9
|
* `emit` helper which resolves the registered kind at compile-time. An unknown kind is a tsc error.
|
|
7
10
|
*
|
package/src/surfaces.ts
CHANGED
|
@@ -409,7 +409,7 @@ export const SURFACES = {
|
|
|
409
409
|
guardKinds: [],
|
|
410
410
|
pluginRules: [],
|
|
411
411
|
description:
|
|
412
|
-
'defineCommands (typed command bus), defineOverlays/overlays, setColorScheme, toggleSidebar, ShortcutsHelp, defineNotifications/emit/NotificationBell (folded in from ./notifications); BasaltProvider mounts Spotlight, Modals and Notifications',
|
|
412
|
+
'defineCommands (typed command bus), defineOverlays/overlays (a form dialog is a registered overlay opened with overlays.open), setColorScheme, toggleSidebar, ShortcutsHelp, defineNotifications/emit/NotificationBell (emit only accepts kinds registered in defineNotifications; folded in from ./notifications); BasaltProvider mounts Spotlight, Modals and Notifications',
|
|
413
413
|
optionalPeers: ['@tanstack/react-hotkeys'],
|
|
414
414
|
forbiddenImports: [],
|
|
415
415
|
},
|
package/src/table/data-table.tsx
CHANGED
|
@@ -781,6 +781,10 @@ export type BasaltDataTableProps<T extends RowData> = BasaltProps &
|
|
|
781
781
|
* whenever the array identity changes. A `renderCard` projection owns its own card, so the
|
|
782
782
|
* column renders in the table body only.
|
|
783
783
|
*
|
|
784
|
+
* State-dependent actions keep that array stable and read the state per row: put it in
|
|
785
|
+
* `disabled(row)` / `loading(row)` (state in a ref or the row itself), or `useMemo` the array
|
|
786
|
+
* keyed on exactly that state.
|
|
787
|
+
*
|
|
784
788
|
* @example
|
|
785
789
|
* const ROW_ACTIONS: DataTableRowAction<Row>[] = [
|
|
786
790
|
* { key: 'edit', label: 'Edit', icon: <IconEdit />, onClick: (row) => edit(row) },
|
package/src/table/index.ts
CHANGED