basalt-ui 1.9.0 → 1.10.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/AGENTS.md +1 -0
- package/CHANGELOG.md +8 -0
- package/README.md +64 -34
- package/agent/rules/basalt-agent.md +49 -6
- package/configs/oxlint-plugin.js +279 -0
- package/configs/oxlint-plugin.test.ts +216 -1
- package/configs/oxlint.json +5 -2
- package/dist/agent/use-agent-thread-runs.d.ts.map +1 -1
- package/dist/agent/use-agent-thread-runs.js +1 -0
- package/dist/agent-chat/index.d.ts +4 -3
- package/dist/agent-chat/index.d.ts.map +1 -1
- package/dist/cli/index.d.ts +33 -0
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +131 -0
- package/dist/surfaces.d.ts +10 -0
- package/dist/surfaces.d.ts.map +1 -1
- package/dist/surfaces.js +21 -0
- package/llms.txt +9 -2
- package/package.json +6 -1
- package/src/agent/ai-sdk-transport.test.ts +269 -0
- package/src/agent/parts.test.ts +261 -0
- package/src/agent/thread.test.ts +147 -0
- package/src/agent/use-agent-stream.test.tsx +231 -0
- package/src/agent/use-agent-thread-runs.resume.test.tsx +261 -0
- package/src/agent/use-agent-thread-runs.test.tsx +398 -0
- package/src/agent/use-agent-thread-runs.ts +7 -1
- package/src/agent/use-agent-thread-runs.wedge.test.tsx +299 -0
- package/src/agent-chat/index.ts +4 -3
- package/src/charts/primitives/ChartFrame.test.tsx +8 -5
- package/src/cli/index.ts +285 -0
- package/src/dashboard/stat-card.test.tsx +5 -3
- package/src/provider/index.test.tsx +6 -5
- package/src/surfaces.ts +22 -0
- package/src/theme/use-basalt-spacing.test.tsx +7 -4
- package/src/tokens/build-fonts-css.test.ts +3 -2
|
@@ -10,11 +10,12 @@
|
|
|
10
10
|
* The `BasaltBridge density wiring` block below covers the layer `composeInjectedCss` alone can't:
|
|
11
11
|
* that `BasaltBridge` (not just the pure `composeInjectedCss` helper) actually reads
|
|
12
12
|
* `theme.other.basaltDensity` off the RUNNING theme and feeds it through `buildDensityCss` into the
|
|
13
|
-
* injected `<style>`, end to end from `createBasaltTheme(undefined, { density })`.
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
13
|
+
* injected `<style>`, end to end from `createBasaltTheme(undefined, { density })`. A DOM harness now
|
|
14
|
+
* exists (`tests/setup/dom.ts`, preloaded via the root `bunfig.toml`) — this suite still uses
|
|
15
|
+
* `react-dom/server`'s `renderToStaticMarkup` deliberately, since the injected `<style>` is plain
|
|
16
|
+
* text content on server-rendered markup, not something that needs a live DOM to assert on.
|
|
17
|
+
* Converting this to mount through the DOM harness would only be worth it if a future assertion here
|
|
18
|
+
* needed live DOM behavior (event handling, layout, effects) rather than the static markup string.
|
|
18
19
|
*/
|
|
19
20
|
import { describe, expect, test } from 'bun:test'
|
|
20
21
|
import { renderToStaticMarkup } from 'react-dom/server'
|
package/src/surfaces.ts
CHANGED
|
@@ -371,6 +371,28 @@ export const SURFACES = {
|
|
|
371
371
|
// @visx/* ban dropped — `basalt/visx-boundary` now bans it universally outside charts.
|
|
372
372
|
forbiddenImports: [...MANTINE_BANS],
|
|
373
373
|
},
|
|
374
|
+
'./agent-chat': {
|
|
375
|
+
kind: 'doctrine',
|
|
376
|
+
layer: 'mantine-coupled',
|
|
377
|
+
rule: 'agent',
|
|
378
|
+
skill: ['basalt-app'],
|
|
379
|
+
guardKinds: [],
|
|
380
|
+
description:
|
|
381
|
+
'Mantine-styled thread-chat components over basalt-ui/agent: ThreadWorkspace, ThreadFeed, ThreadOutcomeCard, ThreadDetailPanel, Composer, ThreadTranscript, threadPartRenderers (Mantine-coupled). remend and motion are required, not optional — ThreadTranscript imports content/markdown.tsx (remend eagerly), and ThreadFeed/ThreadDetailPanel import motion/react eagerly, so this subpath fails to resolve without both installed even though peerDependenciesMeta marks them optional (npm has no per-subpath optionality).',
|
|
382
|
+
optionalPeers: [
|
|
383
|
+
'ai',
|
|
384
|
+
'motion',
|
|
385
|
+
'remend',
|
|
386
|
+
'use-stick-to-bottom',
|
|
387
|
+
'react-markdown',
|
|
388
|
+
'remark-gfm',
|
|
389
|
+
'shiki',
|
|
390
|
+
'@shikijs/langs',
|
|
391
|
+
'@shikijs/themes',
|
|
392
|
+
'beautiful-mermaid',
|
|
393
|
+
],
|
|
394
|
+
forbiddenImports: [],
|
|
395
|
+
},
|
|
374
396
|
'./content': {
|
|
375
397
|
kind: 'doctrine',
|
|
376
398
|
layer: 'mantine-coupled',
|
|
@@ -6,10 +6,13 @@
|
|
|
6
6
|
* with every other density test still green, since those all exercise `deriveSpacing`/
|
|
7
7
|
* `createBasaltTheme` directly, never this hook.
|
|
8
8
|
*
|
|
9
|
-
*
|
|
10
|
-
* doc for that same
|
|
11
|
-
*
|
|
12
|
-
*
|
|
9
|
+
* A DOM harness now exists (`tests/setup/dom.ts`, preloaded via the root `bunfig.toml`; see
|
|
10
|
+
* `tokens/build-fonts-css.test.ts`'s doc for that same note elsewhere) — this suite still uses
|
|
11
|
+
* `react-dom/server`'s `renderToStaticMarkup` deliberately: it's enough to invoke a hook inside a
|
|
12
|
+
* REAL `MantineProvider` tree without a DOM, so these assertions exercise the actual
|
|
13
|
+
* `useMantineTheme()` read, not a re-implementation of it. Converting to the DOM harness would only
|
|
14
|
+
* be worth it if a future assertion here needed the hook to react to a live DOM event (e.g. a
|
|
15
|
+
* `ResizeObserver`-driven remeasure) rather than a single render-time read.
|
|
13
16
|
*/
|
|
14
17
|
import { MantineProvider } from '@mantine/core'
|
|
15
18
|
import type { MantineProviderProps } from '@mantine/core'
|
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
* `buildFontsCss` — the pure CSS-building half of the `{ fonts }` option (see
|
|
3
3
|
* `../theme/fonts-option.test.ts` for the `theme.other.basaltFonts` round-trip this consumes).
|
|
4
4
|
* `BasaltBridge` calls this directly to append `--basalt-font-*` declarations to the same injected
|
|
5
|
-
* `<style>` as the palette CSS
|
|
6
|
-
* function
|
|
5
|
+
* `<style>` as the palette CSS. A DOM harness now exists (`tests/setup/dom.ts`, preloaded via the
|
|
6
|
+
* root `bunfig.toml`), but this pure function needs no render at all — it's the testable seam on
|
|
7
|
+
* its own, so this suite calls it directly rather than mounting anything.
|
|
7
8
|
*/
|
|
8
9
|
import { describe, expect, test } from 'bun:test'
|
|
9
10
|
import { buildFontsCss } from './index'
|