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.
@@ -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 })`. No
14
- * `@testing-library/react`/jsdom is configured in this repo (see `tokens/build-fonts-css.test.ts`'s
15
- * doc for that same limitation elsewhere) — `react-dom/server`'s `renderToStaticMarkup` renders the
16
- * real `BasaltProvider` tree without a DOM, which is enough since the injected `<style>` is plain
17
- * text content, not something that needs a live DOM to assert on.
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
- * No `@testing-library/react`/jsdom is configured in this repo (see `tokens/build-fonts-css.test.ts`'s
10
- * doc for that same limitation elsewhere) — `react-dom/server`'s `renderToStaticMarkup` is enough to
11
- * invoke a hook inside a REAL `MantineProvider` tree without a DOM, so these assertions exercise the
12
- * actual `useMantineTheme()` read, not a re-implementation of it.
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; no DOM/render harness is configured in this package, so the pure
6
- * function is the testable seam.
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'