basalt-ui 2.0.5 → 2.1.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 +12 -0
- package/MIGRATING.md +24 -12
- package/dist/agent/error.d.ts +16 -1
- package/dist/agent/error.d.ts.map +1 -1
- package/dist/agent/index.d.ts +1 -0
- package/dist/agent/index.d.ts.map +1 -1
- package/dist/agent/index.js +2 -0
- package/dist/shell/app-main.module.css +5 -3
- package/dist/shell/app-sidebar.d.ts.map +1 -1
- package/dist/shell/app-sidebar.js +1 -1
- package/dist/table/data-table.module.css +4 -10
- package/llms.txt +2 -2
- package/package.json +1 -1
- package/src/agent/error.ts +16 -1
- package/src/agent/index.ts +1 -0
- package/src/shell/app-main.module.css +5 -3
- package/src/shell/app-sidebar.tsx +3 -1
- package/src/table/data-table.module.css +4 -10
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
# [2.1.0](https://github.com/jkrumm/basalt-ui/compare/v2.0.5...v2.1.0) (2026-10-14)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* reach folded nav groups from the collapsed rail ([9dc75b7](https://github.com/jkrumm/basalt-ui/commit/9dc75b70350aab4c58ebb2264710d8b71a03e707))
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* export toAgentError from basalt-ui/agent ([8f23111](https://github.com/jkrumm/basalt-ui/commit/8f23111b7f4f9eb13c44df135138ff879da89f93))
|
|
12
|
+
|
|
1
13
|
## [2.0.5](https://github.com/jkrumm/basalt-ui/compare/v2.0.4...v2.0.5) (2026-10-14)
|
|
2
14
|
|
|
3
15
|
|
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 | 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 | 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,18 @@ 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.1.0 — the rail reaches folded groups, `toAgentError`
|
|
996
|
+
|
|
997
|
+
- `basalt-ui/agent` exports `toAgentError(error: unknown): AgentError`, the classifier
|
|
998
|
+
`useAgentThreadRuns` uses for `ThreadRunState.error`. A custom transport calls it instead of a
|
|
999
|
+
hand-rolled mapping; for a `Response`, pass `{ statusCode: response.status }`.
|
|
1000
|
+
- The collapsed rail now shows every row of a `collapsible` section, including one folded by
|
|
1001
|
+
`defaultCollapsed` or by the user. Its header is hidden in the rail, so a folded group (argo's
|
|
1002
|
+
"Other") used to strand its destinations and their count dots. Expanding the sidebar restores the
|
|
1003
|
+
stored fold. No API change.
|
|
1004
|
+
- `AppShell.Main`'s block padding is published as `--basalt-main-pad-block`; the data table's
|
|
1005
|
+
page-sticky offset reads it, replacing a duplicated `sm` media query. No consumer action.
|
|
1006
|
+
|
|
995
1007
|
## 2.0.5 — subpath peers
|
|
996
1008
|
|
|
997
1009
|
- `doctor` gains `subpath-peers`: when your source imports a basalt-ui subpath whose required peers
|
package/dist/agent/error.d.ts
CHANGED
|
@@ -26,6 +26,21 @@ export type AgentError = {
|
|
|
26
26
|
} | {
|
|
27
27
|
readonly kind: 'aborted';
|
|
28
28
|
};
|
|
29
|
-
/**
|
|
29
|
+
/**
|
|
30
|
+
* Classifies whatever a chat transport threw or received into the closed `AgentError` union — the
|
|
31
|
+
* same mapping `useAgentThreadRuns` applies to `ThreadRunState.error`, so a custom transport can
|
|
32
|
+
* report failures identically.
|
|
33
|
+
*
|
|
34
|
+
* Input is any thrown value, matched by shape (never `instanceof`, so the optional `ai` peer is not
|
|
35
|
+
* loaded). First match wins:
|
|
36
|
+
* - `name === 'AbortError'` (an `Error` or a `DOMException`) → `{ kind: 'aborted' }`
|
|
37
|
+
* - numeric `statusCode` (AI SDK `APICallError`) → `{ kind: 'http', status }`
|
|
38
|
+
* - string `chunkType` and `chunkId` (AI SDK `UIMessageStreamError`) → `{ kind: 'stream', ... }`
|
|
39
|
+
* - anything else, including an `error` chunk's text, a plain object or a primitive →
|
|
40
|
+
* `{ kind: 'server', message }` with the value's `message` string, else `String(value)`.
|
|
41
|
+
*
|
|
42
|
+
* A `Response` is not classified: read its `status` and pass `{ statusCode: response.status }`.
|
|
43
|
+
* Never throws.
|
|
44
|
+
*/
|
|
30
45
|
export declare function toAgentError(error: unknown): AgentError;
|
|
31
46
|
//# sourceMappingURL=error.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../../src/agent/error.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH;;;;;;GAMG;AACH,MAAM,MAAM,UAAU,GAClB;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GAClD;IAAE,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IAAC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GACjF;IAAE,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GACrD;IAAE,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAA;CAAE,CAAA;AAQhC
|
|
1
|
+
{"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../../src/agent/error.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH;;;;;;GAMG;AACH,MAAM,MAAM,UAAU,GAClB;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GAClD;IAAE,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IAAC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GACjF;IAAE,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GACrD;IAAE,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAA;CAAE,CAAA;AAQhC;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO,GAAG,UAAU,CAavD"}
|
package/dist/agent/index.d.ts
CHANGED
|
@@ -14,6 +14,7 @@ export { aiSdkTransport } from './ai-sdk-transport.js';
|
|
|
14
14
|
export { useAgentThreadRuns } from './use-agent-thread-runs.js';
|
|
15
15
|
export type { ThreadRunState } from './use-agent-thread-runs.js';
|
|
16
16
|
export type { AgentError } from './error.js';
|
|
17
|
+
export { toAgentError } from './error.js';
|
|
17
18
|
export type { ChatMessage } from './history.js';
|
|
18
19
|
export type { AgentThread, ThreadStatus, ThreadsStore } from './thread.js';
|
|
19
20
|
export type { AgentOutcome, OutcomeResolver } from './outcome.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/agent/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,YAAY,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AACxC,YAAY,EAAE,WAAW,EAAE,cAAc,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAGzF,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAA;AACnD,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;AAC5D,YAAY,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AAC7D,YAAY,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/agent/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,YAAY,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AACxC,YAAY,EAAE,WAAW,EAAE,cAAc,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAGzF,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAA;AACnD,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;AAC5D,YAAY,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AAC7D,YAAY,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAGtC,YAAY,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;AAC5C,YAAY,EAAE,WAAW,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AACvE,YAAY,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,WAAW,CAAA;AAC9D,YAAY,EAAE,cAAc,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAA;AAG1E,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAA;AACtD,YAAY,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAA;AACpE,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAC1C,YAAY,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AACrE,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA"}
|
package/dist/agent/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { parseAgentPart } from "./parts.js";
|
|
2
2
|
import { aiSdkTransport } from "./ai-sdk-transport.js";
|
|
3
3
|
import { useAgentThreadRuns } from "./use-agent-thread-runs.js";
|
|
4
|
+
import { toAgentError } from "./error.js";
|
|
4
5
|
import { ThreadFeed } from "./chat/thread-feed.js";
|
|
5
6
|
import { ThreadFeedRow } from "./chat/thread-feed-row.js";
|
|
6
7
|
import { Composer } from "./chat/composer.js";
|
|
@@ -12,5 +13,6 @@ export {
|
|
|
12
13
|
ToolChip,
|
|
13
14
|
aiSdkTransport,
|
|
14
15
|
parseAgentPart,
|
|
16
|
+
toAgentError,
|
|
15
17
|
useAgentThreadRuns
|
|
16
18
|
};
|
|
@@ -103,9 +103,11 @@
|
|
|
103
103
|
* Block is breathing room under the band's single `--vx-divider` line — nothing aligns to it.
|
|
104
104
|
* `stack-md` (12) on a phone, one rung down (`stack-sm`, 8) from `sm` up where the inline gutter
|
|
105
105
|
* is 16: the page then sits 16 from the seam and 8 under the header, rather than the 20/12 it
|
|
106
|
-
* used to.
|
|
106
|
+
* used to. The value rides `--basalt-main-pad-block`, which descendants inherit: the data
|
|
107
|
+
* table's page-sticky offset reads it instead of repeating this module's `sm` switch.
|
|
107
108
|
*/
|
|
108
|
-
|
|
109
|
+
--basalt-main-pad-block: var(--vx-space-stack-md);
|
|
110
|
+
padding: var(--basalt-main-pad-block) var(--app-shell-padding);
|
|
109
111
|
/* Without this a wide flex/grid child (a bare table, a nowrap control row) sizes Main to ITSELF. */
|
|
110
112
|
min-width: 0;
|
|
111
113
|
overflow-y: auto;
|
|
@@ -124,7 +126,7 @@
|
|
|
124
126
|
|
|
125
127
|
@media (min-width: 52.5em) {
|
|
126
128
|
.main {
|
|
127
|
-
|
|
129
|
+
--basalt-main-pad-block: var(--vx-space-stack-sm);
|
|
128
130
|
}
|
|
129
131
|
}
|
|
130
132
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app-sidebar.d.ts","sourceRoot":"","sources":["../../src/shell/app-sidebar.tsx"],"names":[],"mappings":"AAoCA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAElD,OAAO,KAAK,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAA;AAC5D,OAAO,KAAK,EAAE,YAAY,EAAe,cAAc,EAAE,MAAM,aAAa,CAAA;AAI5E,OAAO,KAAK,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAA;AAE1E,OAAO,KAAK,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAA;AAgBjF,MAAM,MAAM,eAAe,GAAG,WAAW,GAAG;IAC1C;;;;OAIG;IACH,KAAK,EAAE,WAAW,GAAG;QAAE,IAAI,CAAC,EAAE,eAAe,EAAE,CAAA;KAAE,CAAA;IACjD,QAAQ,EAAE,cAAc,EAAE,CAAA;IAC1B,SAAS,EAAE,OAAO,CAAA;IAClB;;;;OAIG;IACH,gBAAgB,EAAE,MAAM,IAAI,CAAA;IAC5B;;;;;;;;;;;OAWG;IACH,iBAAiB,CAAC,EAAE,gBAAgB,EAAE,CAAA;IACtC;;;;;;;;;;;;;;;;OAgBG;IACH,YAAY,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAA;IACvC;;;;OAIG;IACH,OAAO,CAAC,EAAE,kBAAkB,CAAA;IAC5B;;;;OAIG;IACH,MAAM,CAAC,EAAE,mBAAmB,GAAG;QAAE,OAAO,CAAC,EAAE,oBAAoB,CAAA;KAAE,CAAA;IACjE;;;;;;;;;;OAUG;IACH,MAAM,CAAC,EAAE,YAAY,EAAE,CAAA;CACxB,CAAA;
|
|
1
|
+
{"version":3,"file":"app-sidebar.d.ts","sourceRoot":"","sources":["../../src/shell/app-sidebar.tsx"],"names":[],"mappings":"AAoCA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAElD,OAAO,KAAK,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAA;AAC5D,OAAO,KAAK,EAAE,YAAY,EAAe,cAAc,EAAE,MAAM,aAAa,CAAA;AAI5E,OAAO,KAAK,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAA;AAE1E,OAAO,KAAK,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAA;AAgBjF,MAAM,MAAM,eAAe,GAAG,WAAW,GAAG;IAC1C;;;;OAIG;IACH,KAAK,EAAE,WAAW,GAAG;QAAE,IAAI,CAAC,EAAE,eAAe,EAAE,CAAA;KAAE,CAAA;IACjD,QAAQ,EAAE,cAAc,EAAE,CAAA;IAC1B,SAAS,EAAE,OAAO,CAAA;IAClB;;;;OAIG;IACH,gBAAgB,EAAE,MAAM,IAAI,CAAA;IAC5B;;;;;;;;;;;OAWG;IACH,iBAAiB,CAAC,EAAE,gBAAgB,EAAE,CAAA;IACtC;;;;;;;;;;;;;;;;OAgBG;IACH,YAAY,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAA;IACvC;;;;OAIG;IACH,OAAO,CAAC,EAAE,kBAAkB,CAAA;IAC5B;;;;OAIG;IACH,MAAM,CAAC,EAAE,mBAAmB,GAAG;QAAE,OAAO,CAAC,EAAE,oBAAoB,CAAA;KAAE,CAAA;IACjE;;;;;;;;;;OAUG;IACH,MAAM,CAAC,EAAE,YAAY,EAAE,CAAA;CACxB,CAAA;AAmUD,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,+BA2KhD"}
|
|
@@ -163,7 +163,7 @@ function NavSection({ section, collapsed }) {
|
|
|
163
163
|
]
|
|
164
164
|
}
|
|
165
165
|
),
|
|
166
|
-
/* @__PURE__ */ jsx(Collapse, { expanded: !folded, children: /* @__PURE__ */ jsx(Stack, { gap: 1, children: items }) })
|
|
166
|
+
/* @__PURE__ */ jsx(Collapse, { expanded: !folded || collapsed, children: /* @__PURE__ */ jsx(Stack, { gap: 1, children: items }) })
|
|
167
167
|
] });
|
|
168
168
|
}
|
|
169
169
|
function NavItemRow({ item, collapsed }) {
|
|
@@ -70,20 +70,14 @@
|
|
|
70
70
|
* one rung down to `stack-sm` from `sm` up). A sticky `<thead>` resolves against the scrollport's
|
|
71
71
|
* CONTENT edge, so at `top: 0` it parked that padding below the band and every body row scrolled
|
|
72
72
|
* through the gap. A negative offset equal to the padding moves the stick line out to the band's
|
|
73
|
-
* edge, flush. The
|
|
74
|
-
* (`data-table.layout.test.ts
|
|
73
|
+
* edge, flush. The padding is read from `--basalt-main-pad-block`, which `.main` sets and owns
|
|
74
|
+
* (including its `sm` switch), so the two cannot drift; `data-table.layout.test.ts` invariant 8
|
|
75
|
+
* pins both steps. A consumer `stickyHeaderOffset` is an
|
|
75
76
|
* inline `--table-sticky-header-offset` on the table and beats this class, so it still wins.
|
|
76
77
|
* Outside a shell no `.mantine-AppShell-main` ancestor matches and the offset stays 0.
|
|
77
78
|
*/
|
|
78
79
|
:global(.mantine-AppShell-main) .pageSticky {
|
|
79
|
-
--table-sticky-header-offset: calc(-1 * var(--
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
/* theme-allow raw-media-query — mirrors app-main.module.css's own `sm` switch for Main's block padding; invariant 8 in data-table.layout.test.ts fails on drift */
|
|
83
|
-
@media (min-width: 52.5em) {
|
|
84
|
-
:global(.mantine-AppShell-main) .pageSticky {
|
|
85
|
-
--table-sticky-header-offset: calc(-1 * var(--vx-space-stack-sm));
|
|
86
|
-
}
|
|
80
|
+
--table-sticky-header-offset: calc(-1 * var(--basalt-main-pad-block, 0px));
|
|
87
81
|
}
|
|
88
82
|
|
|
89
83
|
/*
|
package/llms.txt
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# basalt-ui v2.0
|
|
1
|
+
# basalt-ui v2.1.0
|
|
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.0
|
|
16
|
+
Version: 2.1.0
|
|
17
17
|
|
|
18
18
|
## basalt-ui
|
|
19
19
|
Import: import { ... } from 'basalt-ui'
|
package/package.json
CHANGED
package/src/agent/error.ts
CHANGED
|
@@ -26,7 +26,22 @@ function stringField(value: unknown, key: string): string | undefined {
|
|
|
26
26
|
return typeof field === 'string' ? field : undefined
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
/**
|
|
29
|
+
/**
|
|
30
|
+
* Classifies whatever a chat transport threw or received into the closed `AgentError` union — the
|
|
31
|
+
* same mapping `useAgentThreadRuns` applies to `ThreadRunState.error`, so a custom transport can
|
|
32
|
+
* report failures identically.
|
|
33
|
+
*
|
|
34
|
+
* Input is any thrown value, matched by shape (never `instanceof`, so the optional `ai` peer is not
|
|
35
|
+
* loaded). First match wins:
|
|
36
|
+
* - `name === 'AbortError'` (an `Error` or a `DOMException`) → `{ kind: 'aborted' }`
|
|
37
|
+
* - numeric `statusCode` (AI SDK `APICallError`) → `{ kind: 'http', status }`
|
|
38
|
+
* - string `chunkType` and `chunkId` (AI SDK `UIMessageStreamError`) → `{ kind: 'stream', ... }`
|
|
39
|
+
* - anything else, including an `error` chunk's text, a plain object or a primitive →
|
|
40
|
+
* `{ kind: 'server', message }` with the value's `message` string, else `String(value)`.
|
|
41
|
+
*
|
|
42
|
+
* A `Response` is not classified: read its `status` and pass `{ statusCode: response.status }`.
|
|
43
|
+
* Never throws.
|
|
44
|
+
*/
|
|
30
45
|
export function toAgentError(error: unknown): AgentError {
|
|
31
46
|
// By name, not `instanceof Error`: a `fetch` abort is a DOMException, which is not an Error.
|
|
32
47
|
if (stringField(error, 'name') === 'AbortError') return { kind: 'aborted' }
|
package/src/agent/index.ts
CHANGED
|
@@ -18,6 +18,7 @@ export { aiSdkTransport } from './ai-sdk-transport'
|
|
|
18
18
|
export { useAgentThreadRuns } from './use-agent-thread-runs'
|
|
19
19
|
export type { ThreadRunState } from './use-agent-thread-runs'
|
|
20
20
|
export type { AgentError } from './error'
|
|
21
|
+
export { toAgentError } from './error'
|
|
21
22
|
|
|
22
23
|
// ── Thread contracts (the store is consumer-owned) ────────────────────────────
|
|
23
24
|
export type { ChatMessage } from './history'
|
|
@@ -103,9 +103,11 @@
|
|
|
103
103
|
* Block is breathing room under the band's single `--vx-divider` line — nothing aligns to it.
|
|
104
104
|
* `stack-md` (12) on a phone, one rung down (`stack-sm`, 8) from `sm` up where the inline gutter
|
|
105
105
|
* is 16: the page then sits 16 from the seam and 8 under the header, rather than the 20/12 it
|
|
106
|
-
* used to.
|
|
106
|
+
* used to. The value rides `--basalt-main-pad-block`, which descendants inherit: the data
|
|
107
|
+
* table's page-sticky offset reads it instead of repeating this module's `sm` switch.
|
|
107
108
|
*/
|
|
108
|
-
|
|
109
|
+
--basalt-main-pad-block: var(--vx-space-stack-md);
|
|
110
|
+
padding: var(--basalt-main-pad-block) var(--app-shell-padding);
|
|
109
111
|
/* Without this a wide flex/grid child (a bare table, a nowrap control row) sizes Main to ITSELF. */
|
|
110
112
|
min-width: 0;
|
|
111
113
|
overflow-y: auto;
|
|
@@ -124,7 +126,7 @@
|
|
|
124
126
|
|
|
125
127
|
@media (min-width: 52.5em) {
|
|
126
128
|
.main {
|
|
127
|
-
|
|
129
|
+
--basalt-main-pad-block: var(--vx-space-stack-sm);
|
|
128
130
|
}
|
|
129
131
|
}
|
|
130
132
|
|
|
@@ -327,7 +327,9 @@ function NavSection({ section, collapsed }: { section: SidebarSection; collapsed
|
|
|
327
327
|
<SectionLabel>{section.label}</SectionLabel>
|
|
328
328
|
<IconChevron open={!folded} />
|
|
329
329
|
</UnstyledButton>
|
|
330
|
-
|
|
330
|
+
{/* The rail hides the header (the only way to unfold), so a folded section would strand its
|
|
331
|
+
destinations and their badges: the rail ignores the fold; expanding restores it. */}
|
|
332
|
+
<Collapse expanded={!folded || collapsed}>
|
|
331
333
|
<Stack gap={1}>{items}</Stack>
|
|
332
334
|
</Collapse>
|
|
333
335
|
</div>
|
|
@@ -70,20 +70,14 @@
|
|
|
70
70
|
* one rung down to `stack-sm` from `sm` up). A sticky `<thead>` resolves against the scrollport's
|
|
71
71
|
* CONTENT edge, so at `top: 0` it parked that padding below the band and every body row scrolled
|
|
72
72
|
* through the gap. A negative offset equal to the padding moves the stick line out to the band's
|
|
73
|
-
* edge, flush. The
|
|
74
|
-
* (`data-table.layout.test.ts
|
|
73
|
+
* edge, flush. The padding is read from `--basalt-main-pad-block`, which `.main` sets and owns
|
|
74
|
+
* (including its `sm` switch), so the two cannot drift; `data-table.layout.test.ts` invariant 8
|
|
75
|
+
* pins both steps. A consumer `stickyHeaderOffset` is an
|
|
75
76
|
* inline `--table-sticky-header-offset` on the table and beats this class, so it still wins.
|
|
76
77
|
* Outside a shell no `.mantine-AppShell-main` ancestor matches and the offset stays 0.
|
|
77
78
|
*/
|
|
78
79
|
:global(.mantine-AppShell-main) .pageSticky {
|
|
79
|
-
--table-sticky-header-offset: calc(-1 * var(--
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
/* theme-allow raw-media-query — mirrors app-main.module.css's own `sm` switch for Main's block padding; invariant 8 in data-table.layout.test.ts fails on drift */
|
|
83
|
-
@media (min-width: 52.5em) {
|
|
84
|
-
:global(.mantine-AppShell-main) .pageSticky {
|
|
85
|
-
--table-sticky-header-offset: calc(-1 * var(--vx-space-stack-sm));
|
|
86
|
-
}
|
|
80
|
+
--table-sticky-header-offset: calc(-1 * var(--basalt-main-pad-block, 0px));
|
|
87
81
|
}
|
|
88
82
|
|
|
89
83
|
/*
|