basalt-ui 0.3.0 → 1.0.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 +70 -0
- package/CHANGELOG.md +216 -26
- package/LICENSE +201 -0
- package/README.md +434 -160
- package/agent/rules/basalt-agent.md +395 -0
- package/agent/rules/basalt-charts.md +170 -0
- package/agent/rules/basalt-commands.md +320 -0
- package/agent/rules/basalt-content.md +390 -0
- package/agent/rules/basalt-data.md +237 -0
- package/agent/rules/basalt-forms.md +186 -0
- package/agent/rules/basalt-mantine.md +327 -0
- package/agent/rules/basalt-notifications.md +264 -0
- package/agent/rules/basalt-query.md +130 -0
- package/agent/rules/basalt-router.md +173 -0
- package/agent/rules/basalt-state.md +99 -0
- package/agent/rules/basalt-tokens.md +148 -0
- package/agent/templates/CLAUDE-block.md.tpl +35 -0
- package/agent/templates/DESIGN.md.tpl +71 -0
- package/agent/templates/__root.tpl +31 -0
- package/agent/templates/query-client.ts.tpl +12 -0
- package/bin/basalt.mjs +14 -0
- package/configs/check.yml +29 -0
- package/configs/lefthook.yml +21 -0
- package/configs/oxfmt.json +8 -0
- package/configs/oxlint-plugin.js +269 -0
- package/configs/oxlint-plugin.test.ts +107 -0
- package/configs/oxlint.json +116 -0
- package/configs/tsconfig.base.json +20 -0
- package/configs/tsconfig.node.json +8 -0
- package/configs/tsconfig.react-app.json +8 -0
- package/dist/agent/ai-sdk-transport.d.ts +85 -0
- package/dist/agent/ai-sdk-transport.d.ts.map +1 -0
- package/dist/agent/ai-sdk-transport.js +109 -0
- package/dist/agent/history.d.ts +55 -0
- package/dist/agent/history.d.ts.map +1 -0
- package/dist/agent/history.js +32 -0
- package/dist/agent/index.d.ts +53 -0
- package/dist/agent/index.d.ts.map +1 -0
- package/dist/agent/index.js +23 -0
- package/dist/agent/outcome.d.ts +71 -0
- package/dist/agent/outcome.d.ts.map +1 -0
- package/dist/agent/outcome.js +30 -0
- package/dist/agent/part-list.d.ts +75 -0
- package/dist/agent/part-list.d.ts.map +1 -0
- package/dist/agent/part-list.js +127 -0
- package/dist/agent/parts.d.ts +91 -0
- package/dist/agent/parts.d.ts.map +1 -0
- package/dist/agent/parts.js +49 -0
- package/dist/agent/stick-to-bottom.d.ts +23 -0
- package/dist/agent/stick-to-bottom.d.ts.map +1 -0
- package/dist/agent/stick-to-bottom.js +73 -0
- package/dist/agent/thread.d.ts +124 -0
- package/dist/agent/thread.d.ts.map +1 -0
- package/dist/agent/thread.js +131 -0
- package/dist/agent/transport.d.ts +87 -0
- package/dist/agent/transport.d.ts.map +1 -0
- package/dist/agent/transport.js +21 -0
- package/dist/agent/use-agent-stream.d.ts +34 -0
- package/dist/agent/use-agent-stream.d.ts.map +1 -0
- package/dist/agent/use-agent-stream.js +56 -0
- package/dist/agent/use-agent-thread-runs.d.ts +72 -0
- package/dist/agent/use-agent-thread-runs.d.ts.map +1 -0
- package/dist/agent/use-agent-thread-runs.js +217 -0
- package/dist/agent-chat/composer.d.ts +18 -0
- package/dist/agent-chat/composer.d.ts.map +1 -0
- package/dist/agent-chat/composer.js +86 -0
- package/dist/agent-chat/index.d.ts +24 -0
- package/dist/agent-chat/index.d.ts.map +1 -0
- package/dist/agent-chat/index.js +15 -0
- package/dist/agent-chat/thread-detail-panel.d.ts +27 -0
- package/dist/agent-chat/thread-detail-panel.d.ts.map +1 -0
- package/dist/agent-chat/thread-detail-panel.js +108 -0
- package/dist/agent-chat/thread-feed.d.ts +18 -0
- package/dist/agent-chat/thread-feed.d.ts.map +1 -0
- package/dist/agent-chat/thread-feed.js +42 -0
- package/dist/agent-chat/thread-message.d.ts +31 -0
- package/dist/agent-chat/thread-message.d.ts.map +1 -0
- package/dist/agent-chat/thread-message.js +128 -0
- package/dist/agent-chat/thread-outcome-card.d.ts +19 -0
- package/dist/agent-chat/thread-outcome-card.d.ts.map +1 -0
- package/dist/agent-chat/thread-outcome-card.js +120 -0
- package/dist/agent-chat/thread-workspace.d.ts +27 -0
- package/dist/agent-chat/thread-workspace.d.ts.map +1 -0
- package/dist/agent-chat/thread-workspace.js +95 -0
- package/dist/charts/hooks/useChartSize.d.ts +25 -0
- package/dist/charts/hooks/useChartSize.d.ts.map +1 -0
- package/dist/charts/hooks/useChartSize.js +8 -0
- package/dist/charts/hooks/useChartTooltip.d.ts +13 -0
- package/dist/charts/hooks/useChartTooltip.d.ts.map +1 -0
- package/dist/charts/hooks/useChartTooltip.js +26 -0
- package/dist/charts/hooks/useHoverSync.d.ts +30 -0
- package/dist/charts/hooks/useHoverSync.d.ts.map +1 -0
- package/dist/charts/hooks/useHoverSync.js +70 -0
- package/dist/charts/hover-context.d.ts +21 -0
- package/dist/charts/hover-context.d.ts.map +1 -0
- package/dist/charts/hover-context.js +12 -0
- package/dist/charts/hover-sync.d.ts +14 -0
- package/dist/charts/hover-sync.d.ts.map +1 -0
- package/dist/charts/hover-sync.js +17 -0
- package/dist/charts/index.d.ts +47 -0
- package/dist/charts/index.d.ts.map +1 -0
- package/dist/charts/index.js +129 -0
- package/dist/charts/kinds/Bars.d.ts +129 -0
- package/dist/charts/kinds/Bars.d.ts.map +1 -0
- package/dist/charts/kinds/Bars.js +467 -0
- package/dist/charts/kinds/Donut.d.ts +65 -0
- package/dist/charts/kinds/Donut.d.ts.map +1 -0
- package/dist/charts/kinds/Donut.js +158 -0
- package/dist/charts/kinds/DualPanel.d.ts +67 -0
- package/dist/charts/kinds/DualPanel.d.ts.map +1 -0
- package/dist/charts/kinds/DualPanel.js +326 -0
- package/dist/charts/kinds/Heatmap.d.ts +59 -0
- package/dist/charts/kinds/Heatmap.d.ts.map +1 -0
- package/dist/charts/kinds/Heatmap.js +175 -0
- package/dist/charts/kinds/MultiLine.d.ts +73 -0
- package/dist/charts/kinds/MultiLine.d.ts.map +1 -0
- package/dist/charts/kinds/MultiLine.js +275 -0
- package/dist/charts/kinds/StackedArea.d.ts +35 -0
- package/dist/charts/kinds/StackedArea.d.ts.map +1 -0
- package/dist/charts/kinds/StackedArea.js +151 -0
- package/dist/charts/kinds/ZonedLine.d.ts +94 -0
- package/dist/charts/kinds/ZonedLine.d.ts.map +1 -0
- package/dist/charts/kinds/ZonedLine.js +218 -0
- package/dist/charts/primitives/AreaGradient.d.ts +18 -0
- package/dist/charts/primitives/AreaGradient.d.ts.map +1 -0
- package/dist/charts/primitives/AreaGradient.js +13 -0
- package/dist/charts/primitives/Axes.d.ts +22 -0
- package/dist/charts/primitives/Axes.d.ts.map +1 -0
- package/dist/charts/primitives/Axes.js +79 -0
- package/dist/charts/primitives/ChartCard.d.ts +14 -0
- package/dist/charts/primitives/ChartCard.d.ts.map +1 -0
- package/dist/charts/primitives/ChartCard.js +144 -0
- package/dist/charts/primitives/ChartFrame.d.ts +70 -0
- package/dist/charts/primitives/ChartFrame.d.ts.map +1 -0
- package/dist/charts/primitives/ChartFrame.js +77 -0
- package/dist/charts/primitives/ChartLegend.d.ts +36 -0
- package/dist/charts/primitives/ChartLegend.d.ts.map +1 -0
- package/dist/charts/primitives/ChartLegend.js +234 -0
- package/dist/charts/primitives/ChartTooltip.d.ts +34 -0
- package/dist/charts/primitives/ChartTooltip.d.ts.map +1 -0
- package/dist/charts/primitives/ChartTooltip.js +134 -0
- package/dist/charts/primitives/Crosshair.d.ts +23 -0
- package/dist/charts/primitives/Crosshair.d.ts.map +1 -0
- package/dist/charts/primitives/Crosshair.js +21 -0
- package/dist/charts/primitives/HoverOverlay.d.ts +9 -0
- package/dist/charts/primitives/HoverOverlay.d.ts.map +1 -0
- package/dist/charts/primitives/HoverOverlay.js +21 -0
- package/dist/charts/primitives/ResponsiveChart.d.ts +45 -0
- package/dist/charts/primitives/ResponsiveChart.d.ts.map +1 -0
- package/dist/charts/primitives/ResponsiveChart.js +24 -0
- package/dist/charts/primitives/ZoneRects.d.ts +38 -0
- package/dist/charts/primitives/ZoneRects.d.ts.map +1 -0
- package/dist/charts/primitives/ZoneRects.js +30 -0
- package/dist/charts/series.d.ts +99 -0
- package/dist/charts/series.d.ts.map +1 -0
- package/dist/charts/series.js +55 -0
- package/dist/charts/sparklines/BarSparkline.d.ts +13 -0
- package/dist/charts/sparklines/BarSparkline.d.ts.map +1 -0
- package/dist/charts/sparklines/BarSparkline.js +33 -0
- package/dist/charts/sparklines/LineSparkline.d.ts +15 -0
- package/dist/charts/sparklines/LineSparkline.d.ts.map +1 -0
- package/dist/charts/sparklines/LineSparkline.js +39 -0
- package/dist/charts/sparklines/index.d.ts +3 -0
- package/dist/charts/sparklines/index.d.ts.map +1 -0
- package/dist/charts/sparklines/index.js +6 -0
- package/dist/charts/theme.d.ts +21 -0
- package/dist/charts/theme.d.ts.map +1 -0
- package/dist/charts/theme.js +30 -0
- package/dist/charts/utils/domain.d.ts +20 -0
- package/dist/charts/utils/domain.d.ts.map +1 -0
- package/dist/charts/utils/domain.js +7 -0
- package/dist/charts/utils/format.d.ts +5 -0
- package/dist/charts/utils/format.d.ts.map +1 -0
- package/dist/charts/utils/format.js +27 -0
- package/dist/charts/utils/ticks.d.ts +5 -0
- package/dist/charts/utils/ticks.d.ts.map +1 -0
- package/dist/charts/utils/ticks.js +18 -0
- package/dist/cli/index.d.ts +273 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +907 -0
- package/dist/commands/ShortcutsHelp.d.ts +17 -0
- package/dist/commands/ShortcutsHelp.d.ts.map +1 -0
- package/dist/commands/ShortcutsHelp.js +64 -0
- package/dist/commands/define-commands.d.ts +140 -0
- package/dist/commands/define-commands.d.ts.map +1 -0
- package/dist/commands/define-commands.js +26 -0
- package/dist/commands/define-overlays.d.ts +134 -0
- package/dist/commands/define-overlays.d.ts.map +1 -0
- package/dist/commands/define-overlays.js +53 -0
- package/dist/commands/index.d.ts +42 -0
- package/dist/commands/index.d.ts.map +1 -0
- package/dist/commands/index.js +46 -0
- package/dist/commands/overlays-mount.d.ts +117 -0
- package/dist/commands/overlays-mount.d.ts.map +1 -0
- package/dist/commands/overlays-mount.js +116 -0
- package/dist/commands/projectors.d.ts +152 -0
- package/dist/commands/projectors.d.ts.map +1 -0
- package/dist/commands/projectors.js +87 -0
- package/dist/commands/shortcut-format.d.ts +48 -0
- package/dist/commands/shortcut-format.d.ts.map +1 -0
- package/dist/commands/shortcut-format.js +33 -0
- package/dist/commands/useCommandHotkeys.d.ts +14 -0
- package/dist/commands/useCommandHotkeys.d.ts.map +1 -0
- package/dist/commands/useCommandHotkeys.js +45 -0
- package/dist/connectivity/connectivity-indicator.d.ts +8 -0
- package/dist/connectivity/connectivity-indicator.d.ts.map +1 -0
- package/dist/connectivity/connectivity-indicator.js +203 -0
- package/dist/connectivity/connectivity-provider.d.ts +7 -0
- package/dist/connectivity/connectivity-provider.d.ts.map +1 -0
- package/dist/connectivity/connectivity-provider.js +125 -0
- package/dist/connectivity/index.d.ts +13 -0
- package/dist/connectivity/index.d.ts.map +1 -0
- package/dist/connectivity/index.js +8 -0
- package/dist/connectivity/types.d.ts +36 -0
- package/dist/connectivity/types.d.ts.map +1 -0
- package/dist/connectivity/types.js +0 -0
- package/dist/connectivity/use-connectivity.d.ts +3 -0
- package/dist/connectivity/use-connectivity.d.ts.map +1 -0
- package/dist/connectivity/use-connectivity.js +14 -0
- package/dist/content/article-actions.d.ts +39 -0
- package/dist/content/article-actions.d.ts.map +1 -0
- package/dist/content/article-actions.js +28 -0
- package/dist/content/article-card.d.ts +58 -0
- package/dist/content/article-card.d.ts.map +1 -0
- package/dist/content/article-card.js +76 -0
- package/dist/content/article-card.module.css +109 -0
- package/dist/content/article-card.module.css.d.ts +16 -0
- package/dist/content/article-filter-bar.d.ts +40 -0
- package/dist/content/article-filter-bar.d.ts.map +1 -0
- package/dist/content/article-filter-bar.js +56 -0
- package/dist/content/article-layout.d.ts +61 -0
- package/dist/content/article-layout.d.ts.map +1 -0
- package/dist/content/article-layout.js +71 -0
- package/dist/content/article-layout.module.css +131 -0
- package/dist/content/article-layout.module.css.d.ts +20 -0
- package/dist/content/article-model.d.ts +62 -0
- package/dist/content/article-model.d.ts.map +1 -0
- package/dist/content/article-model.js +41 -0
- package/dist/content/block-split.d.ts +24 -0
- package/dist/content/block-split.d.ts.map +1 -0
- package/dist/content/block-split.js +63 -0
- package/dist/content/callout-alert.d.ts +27 -0
- package/dist/content/callout-alert.d.ts.map +1 -0
- package/dist/content/callout-alert.js +59 -0
- package/dist/content/callout.d.ts +24 -0
- package/dist/content/callout.d.ts.map +1 -0
- package/dist/content/callout.js +59 -0
- package/dist/content/callout.module.css +77 -0
- package/dist/content/callout.module.css.d.ts +16 -0
- package/dist/content/code-block.d.ts +26 -0
- package/dist/content/code-block.d.ts.map +1 -0
- package/dist/content/code-block.js +41 -0
- package/dist/content/code-block.module.css +86 -0
- package/dist/content/code-block.module.css.d.ts +14 -0
- package/dist/content/copy-action.d.ts +29 -0
- package/dist/content/copy-action.d.ts.map +1 -0
- package/dist/content/copy-action.js +46 -0
- package/dist/content/fence-block.d.ts +19 -0
- package/dist/content/fence-block.d.ts.map +1 -0
- package/dist/content/fence-block.js +23 -0
- package/dist/content/glyphs.d.ts +18 -0
- package/dist/content/glyphs.d.ts.map +1 -0
- package/dist/content/glyphs.js +43 -0
- package/dist/content/guide.d.ts +47 -0
- package/dist/content/guide.d.ts.map +1 -0
- package/dist/content/guide.js +110 -0
- package/dist/content/guide.module.css +62 -0
- package/dist/content/guide.module.css.d.ts +13 -0
- package/dist/content/heading-anchor.d.ts +8 -0
- package/dist/content/heading-anchor.d.ts.map +1 -0
- package/dist/content/heading-anchor.js +23 -0
- package/dist/content/heading-components.d.ts +5 -0
- package/dist/content/heading-components.d.ts.map +1 -0
- package/dist/content/heading-components.js +41 -0
- package/dist/content/highlighter.d.ts +8 -0
- package/dist/content/highlighter.d.ts.map +1 -0
- package/dist/content/highlighter.js +85 -0
- package/dist/content/index.d.ts +45 -0
- package/dist/content/index.d.ts.map +1 -0
- package/dist/content/index.js +43 -0
- package/dist/content/markdown-hast.d.ts +23 -0
- package/dist/content/markdown-hast.d.ts.map +1 -0
- package/dist/content/markdown-hast.js +48 -0
- package/dist/content/markdown.d.ts +68 -0
- package/dist/content/markdown.d.ts.map +1 -0
- package/dist/content/markdown.js +180 -0
- package/dist/content/mdx.d.ts +20 -0
- package/dist/content/mdx.d.ts.map +1 -0
- package/dist/content/mdx.js +64 -0
- package/dist/content/mermaid.d.ts +32 -0
- package/dist/content/mermaid.d.ts.map +1 -0
- package/dist/content/mermaid.js +70 -0
- package/dist/content/mermaid.module.css +20 -0
- package/dist/content/mermaid.module.css.d.ts +8 -0
- package/dist/content/prose.d.ts +29 -0
- package/dist/content/prose.d.ts.map +1 -0
- package/dist/content/prose.js +24 -0
- package/dist/content/prose.module.css +330 -0
- package/dist/content/prose.module.css.d.ts +12 -0
- package/dist/content/reading-progress.d.ts +20 -0
- package/dist/content/reading-progress.d.ts.map +1 -0
- package/dist/content/reading-progress.js +38 -0
- package/dist/content/reading-progress.module.css +22 -0
- package/dist/content/reading-progress.module.css.d.ts +9 -0
- package/dist/content/slug.d.ts +28 -0
- package/dist/content/slug.d.ts.map +1 -0
- package/dist/content/slug.js +28 -0
- package/dist/content/toc.d.ts +37 -0
- package/dist/content/toc.d.ts.map +1 -0
- package/dist/content/toc.js +134 -0
- package/dist/content/toc.module.css +51 -0
- package/dist/content/toc.module.css.d.ts +13 -0
- package/dist/content/url-hardening.d.ts +23 -0
- package/dist/content/url-hardening.d.ts.map +1 -0
- package/dist/content/url-hardening.js +23 -0
- package/dist/dashboard/delta-badge.d.ts +13 -0
- package/dist/dashboard/delta-badge.d.ts.map +1 -0
- package/dist/dashboard/delta-badge.js +45 -0
- package/dist/dashboard/empty-state.d.ts +15 -0
- package/dist/dashboard/empty-state.d.ts.map +1 -0
- package/dist/dashboard/empty-state.js +56 -0
- package/dist/dashboard/index.d.ts +5 -0
- package/dist/dashboard/index.d.ts.map +1 -0
- package/dist/dashboard/index.js +16 -0
- package/dist/dashboard/settings-section.d.ts +24 -0
- package/dist/dashboard/settings-section.d.ts.map +1 -0
- package/dist/dashboard/settings-section.js +61 -0
- package/dist/dashboard/settings-section.module.css +23 -0
- package/dist/dashboard/settings-section.module.css.d.ts +10 -0
- package/dist/dashboard/stat-card.d.ts +18 -0
- package/dist/dashboard/stat-card.d.ts.map +1 -0
- package/dist/dashboard/stat-card.js +74 -0
- package/dist/data/data-table.d.ts +198 -0
- package/dist/data/data-table.d.ts.map +1 -0
- package/dist/data/data-table.js +342 -0
- package/dist/data/index.d.ts +34 -0
- package/dist/data/index.d.ts.map +1 -0
- package/dist/data/index.js +2 -0
- package/dist/data/table.d.ts +24 -0
- package/dist/data/table.d.ts.map +1 -0
- package/dist/data/table.js +20 -0
- package/dist/data/virtual-list.d.ts +74 -0
- package/dist/data/virtual-list.d.ts.map +1 -0
- package/dist/data/virtual-list.js +86 -0
- package/dist/data/virtual.d.ts +20 -0
- package/dist/data/virtual.d.ts.map +1 -0
- package/dist/data/virtual.js +4 -0
- package/dist/forms/FormErrorSummary.d.ts +29 -0
- package/dist/forms/FormErrorSummary.d.ts.map +1 -0
- package/dist/forms/FormErrorSummary.js +28 -0
- package/dist/forms/create-form.d.ts +31 -0
- package/dist/forms/create-form.d.ts.map +1 -0
- package/dist/forms/create-form.js +18 -0
- package/dist/forms/field.d.ts +22 -0
- package/dist/forms/field.d.ts.map +1 -0
- package/dist/forms/field.js +9 -0
- package/dist/forms/index.d.ts +17 -0
- package/dist/forms/index.d.ts.map +1 -0
- package/dist/forms/index.js +13 -0
- package/dist/forms/use-form-draft.d.ts +61 -0
- package/dist/forms/use-form-draft.d.ts.map +1 -0
- package/dist/forms/use-form-draft.js +55 -0
- package/dist/guard/guard-hook.d.ts +40 -0
- package/dist/guard/guard-hook.d.ts.map +1 -0
- package/dist/guard/guard-hook.js +55 -0
- package/dist/guard/index.d.ts +144 -0
- package/dist/guard/index.d.ts.map +1 -0
- package/dist/guard/index.js +315 -0
- package/dist/guard/types.d.ts +97 -0
- package/dist/guard/types.d.ts.map +1 -0
- package/dist/guard/types.js +0 -0
- package/dist/index.d.ts +24 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +90 -0
- package/dist/motion/index.d.ts +29 -0
- package/dist/motion/index.d.ts.map +1 -0
- package/dist/motion/index.js +12 -0
- package/dist/notifications/bell.d.ts +12 -0
- package/dist/notifications/bell.d.ts.map +1 -0
- package/dist/notifications/bell.js +84 -0
- package/dist/notifications/center.d.ts +20 -0
- package/dist/notifications/center.d.ts.map +1 -0
- package/dist/notifications/center.js +144 -0
- package/dist/notifications/define-notifications.d.ts +97 -0
- package/dist/notifications/define-notifications.d.ts.map +1 -0
- package/dist/notifications/define-notifications.js +27 -0
- package/dist/notifications/index.d.ts +36 -0
- package/dist/notifications/index.d.ts.map +1 -0
- package/dist/notifications/index.js +52 -0
- package/dist/notifications/notify.d.ts +92 -0
- package/dist/notifications/notify.d.ts.map +1 -0
- package/dist/notifications/notify.js +127 -0
- package/dist/notifications/overlay.d.ts +20 -0
- package/dist/notifications/overlay.d.ts.map +1 -0
- package/dist/notifications/overlay.js +12 -0
- package/dist/notifications/store.d.ts +120 -0
- package/dist/notifications/store.d.ts.map +1 -0
- package/dist/notifications/store.js +113 -0
- package/dist/provider/index.d.ts +93 -0
- package/dist/provider/index.d.ts.map +1 -0
- package/dist/provider/index.js +106 -0
- package/dist/query/devtools.d.ts +21 -0
- package/dist/query/devtools.d.ts.map +1 -0
- package/dist/query/devtools.js +12 -0
- package/dist/query/index.d.ts +65 -0
- package/dist/query/index.d.ts.map +1 -0
- package/dist/query/index.js +68 -0
- package/dist/register.d.ts +139 -0
- package/dist/register.d.ts.map +1 -0
- package/dist/register.js +6 -0
- package/dist/router-tanstack/index.d.ts +74 -0
- package/dist/router-tanstack/index.d.ts.map +1 -0
- package/dist/router-tanstack/index.js +29 -0
- package/dist/router-tanstack/multi-search-param-store.d.ts +78 -0
- package/dist/router-tanstack/multi-search-param-store.d.ts.map +1 -0
- package/dist/router-tanstack/multi-search-param-store.js +35 -0
- package/dist/router-tanstack/search-param-store.d.ts +92 -0
- package/dist/router-tanstack/search-param-store.d.ts.map +1 -0
- package/dist/router-tanstack/search-param-store.js +26 -0
- package/dist/shell/account-types.d.ts +118 -0
- package/dist/shell/account-types.d.ts.map +1 -0
- package/dist/shell/account-types.js +0 -0
- package/dist/shell/app-breadcrumbs.d.ts +17 -0
- package/dist/shell/app-breadcrumbs.d.ts.map +1 -0
- package/dist/shell/app-breadcrumbs.js +39 -0
- package/dist/shell/app-header.module.css +73 -0
- package/dist/shell/app-header.module.css.d.ts +11 -0
- package/dist/shell/app-mobile-nav.d.ts +26 -0
- package/dist/shell/app-mobile-nav.d.ts.map +1 -0
- package/dist/shell/app-mobile-nav.js +106 -0
- package/dist/shell/app-mobile-nav.module.css +100 -0
- package/dist/shell/app-mobile-nav.module.css.d.ts +14 -0
- package/dist/shell/app-sidebar-account.d.ts +3 -0
- package/dist/shell/app-sidebar-account.d.ts.map +1 -0
- package/dist/shell/app-sidebar-account.js +84 -0
- package/dist/shell/app-sidebar.d.ts +56 -0
- package/dist/shell/app-sidebar.d.ts.map +1 -0
- package/dist/shell/app-sidebar.js +455 -0
- package/dist/shell/app-sidebar.module.css +414 -0
- package/dist/shell/app-sidebar.module.css.d.ts +34 -0
- package/dist/shell/index.d.ts +123 -0
- package/dist/shell/index.d.ts.map +1 -0
- package/dist/shell/index.js +179 -0
- package/dist/shell/page-header.d.ts +13 -0
- package/dist/shell/page-header.d.ts.map +1 -0
- package/dist/shell/page-header.js +23 -0
- package/dist/shell/sidebar-search.d.ts +12 -0
- package/dist/shell/sidebar-search.d.ts.map +1 -0
- package/dist/shell/sidebar-search.js +62 -0
- package/dist/shell/sidebar-search.module.css +62 -0
- package/dist/shell/sidebar-search.module.css.d.ts +11 -0
- package/dist/state.d.ts +62 -0
- package/dist/state.d.ts.map +1 -0
- package/dist/state.js +124 -0
- package/dist/styles.css +166 -0
- package/dist/surfaces.d.ts +376 -0
- package/dist/surfaces.d.ts.map +1 -0
- package/dist/surfaces.js +306 -0
- package/dist/theme/controls.module.css +143 -0
- package/dist/theme/controls.module.css.d.ts +17 -0
- package/dist/theme/floating.module.css +35 -0
- package/dist/theme/floating.module.css.d.ts +9 -0
- package/dist/theme/index.d.ts +22 -0
- package/dist/theme/index.d.ts.map +1 -0
- package/dist/theme/index.js +733 -0
- package/dist/theme/nav-link.module.css +67 -0
- package/dist/theme/nav-link.module.css.d.ts +8 -0
- package/dist/theme/segmented-control.module.css +14 -0
- package/dist/theme/segmented-control.module.css.d.ts +8 -0
- package/dist/theme/timeline.module.css +29 -0
- package/dist/theme/timeline.module.css.d.ts +9 -0
- package/dist/theme-lab/index.d.ts +59 -0
- package/dist/theme-lab/index.d.ts.map +1 -0
- package/dist/theme-lab/index.js +263 -0
- package/dist/theme-toggle/index.d.ts +8 -0
- package/dist/theme-toggle/index.d.ts.map +1 -0
- package/dist/theme-toggle/index.js +155 -0
- package/dist/tokens/index.d.ts +151 -0
- package/dist/tokens/index.d.ts.map +1 -0
- package/dist/tokens/index.js +246 -0
- package/dist/tokens/palette.d.ts +304 -0
- package/dist/tokens/palette.d.ts.map +1 -0
- package/dist/tokens/palette.js +186 -0
- package/dist/vite.d.ts +30 -0
- package/dist/vite.d.ts.map +1 -0
- package/dist/vite.js +68 -0
- package/llms.txt +149 -0
- package/package.json +246 -37
- package/src/agent/ai-sdk-transport.ts +280 -0
- package/src/agent/history.ts +128 -0
- package/src/agent/index.ts +92 -0
- package/src/agent/outcome.ts +120 -0
- package/src/agent/part-list.tsx +292 -0
- package/src/agent/parts.ts +136 -0
- package/src/agent/stick-to-bottom.tsx +154 -0
- package/src/agent/thread.ts +312 -0
- package/src/agent/transport.ts +114 -0
- package/src/agent/use-agent-stream.ts +141 -0
- package/src/agent/use-agent-thread-runs.ts +440 -0
- package/src/agent-chat/composer.tsx +131 -0
- package/src/agent-chat/index.ts +35 -0
- package/src/agent-chat/thread-detail-panel.tsx +192 -0
- package/src/agent-chat/thread-feed.tsx +81 -0
- package/src/agent-chat/thread-message.tsx +251 -0
- package/src/agent-chat/thread-outcome-card.tsx +196 -0
- package/src/agent-chat/thread-workspace.tsx +179 -0
- package/src/charts/hooks/useChartSize.ts +31 -0
- package/src/charts/hooks/useChartTooltip.ts +31 -0
- package/src/charts/hooks/useHoverSync.ts +116 -0
- package/src/charts/hover-context.ts +28 -0
- package/src/charts/hover-sync.tsx +37 -0
- package/src/charts/index.ts +118 -0
- package/src/charts/kinds/Bars.tsx +634 -0
- package/src/charts/kinds/Donut.tsx +233 -0
- package/src/charts/kinds/DualPanel.tsx +432 -0
- package/src/charts/kinds/Heatmap.tsx +255 -0
- package/src/charts/kinds/MultiLine.tsx +376 -0
- package/src/charts/kinds/StackedArea.tsx +218 -0
- package/src/charts/kinds/ZonedLine.tsx +346 -0
- package/src/charts/primitives/AreaGradient.tsx +26 -0
- package/src/charts/primitives/Axes.tsx +97 -0
- package/src/charts/primitives/ChartCard.tsx +180 -0
- package/src/charts/primitives/ChartFrame.tsx +157 -0
- package/src/charts/primitives/ChartLegend.tsx +302 -0
- package/src/charts/primitives/ChartTooltip.tsx +158 -0
- package/src/charts/primitives/Crosshair.tsx +40 -0
- package/src/charts/primitives/HoverOverlay.tsx +24 -0
- package/src/charts/primitives/ResponsiveChart.tsx +64 -0
- package/src/charts/primitives/ZoneRects.tsx +67 -0
- package/src/charts/series.ts +163 -0
- package/src/charts/sparklines/BarSparkline.tsx +48 -0
- package/src/charts/sparklines/LineSparkline.tsx +57 -0
- package/src/charts/sparklines/index.ts +2 -0
- package/src/charts/theme.tsx +53 -0
- package/src/charts/utils/domain.test.ts +24 -0
- package/src/charts/utils/domain.ts +22 -0
- package/src/charts/utils/format.ts +27 -0
- package/src/charts/utils/ticks.ts +18 -0
- package/src/cli/check-theme.test.ts +658 -0
- package/src/cli/index.ts +1497 -0
- package/src/cli/init-sync.test.ts +160 -0
- package/src/commands/ShortcutsHelp.tsx +129 -0
- package/src/commands/define-commands.ts +184 -0
- package/src/commands/define-overlays.ts +197 -0
- package/src/commands/index.ts +86 -0
- package/src/commands/overlays-mount.tsx +301 -0
- package/src/commands/projectors.ts +267 -0
- package/src/commands/shortcut-format.ts +83 -0
- package/src/commands/useCommandHotkeys.ts +114 -0
- package/src/connectivity/connectivity-indicator.tsx +249 -0
- package/src/connectivity/connectivity-provider.tsx +186 -0
- package/src/connectivity/index.ts +18 -0
- package/src/connectivity/types.ts +39 -0
- package/src/connectivity/use-connectivity.ts +25 -0
- package/src/content/article-actions.test.ts +78 -0
- package/src/content/article-actions.ts +72 -0
- package/src/content/article-card.module.css +109 -0
- package/src/content/article-card.module.css.d.ts +16 -0
- package/src/content/article-card.tsx +173 -0
- package/src/content/article-filter-bar.tsx +88 -0
- package/src/content/article-layout.module.css +131 -0
- package/src/content/article-layout.module.css.d.ts +20 -0
- package/src/content/article-layout.tsx +167 -0
- package/src/content/article-model.test.ts +119 -0
- package/src/content/article-model.ts +110 -0
- package/src/content/block-split.test.ts +75 -0
- package/src/content/block-split.ts +102 -0
- package/src/content/callout-alert.ts +88 -0
- package/src/content/callout.module.css +77 -0
- package/src/content/callout.module.css.d.ts +16 -0
- package/src/content/callout.tsx +96 -0
- package/src/content/code-block.module.css +86 -0
- package/src/content/code-block.module.css.d.ts +14 -0
- package/src/content/code-block.tsx +82 -0
- package/src/content/copy-action.tsx +79 -0
- package/src/content/fence-block.tsx +39 -0
- package/src/content/glyphs.tsx +53 -0
- package/src/content/guide.module.css +62 -0
- package/src/content/guide.module.css.d.ts +13 -0
- package/src/content/guide.tsx +174 -0
- package/src/content/heading-anchor.tsx +54 -0
- package/src/content/heading-components.tsx +62 -0
- package/src/content/highlighter.ts +123 -0
- package/src/content/index.ts +60 -0
- package/src/content/markdown-hast.ts +80 -0
- package/src/content/markdown.tsx +346 -0
- package/src/content/mdx.tsx +127 -0
- package/src/content/mermaid.module.css +20 -0
- package/src/content/mermaid.module.css.d.ts +8 -0
- package/src/content/mermaid.tsx +124 -0
- package/src/content/prose.module.css +330 -0
- package/src/content/prose.module.css.d.ts +12 -0
- package/src/content/prose.tsx +53 -0
- package/src/content/reading-progress.module.css +22 -0
- package/src/content/reading-progress.module.css.d.ts +9 -0
- package/src/content/reading-progress.tsx +67 -0
- package/src/content/slug.test.ts +62 -0
- package/src/content/slug.ts +57 -0
- package/src/content/toc.module.css +51 -0
- package/src/content/toc.module.css.d.ts +13 -0
- package/src/content/toc.tsx +226 -0
- package/src/content/url-hardening.ts +46 -0
- package/src/dashboard/delta-badge.tsx +70 -0
- package/src/dashboard/empty-state.tsx +80 -0
- package/src/dashboard/index.ts +11 -0
- package/src/dashboard/settings-section.module.css +23 -0
- package/src/dashboard/settings-section.module.css.d.ts +10 -0
- package/src/dashboard/settings-section.tsx +118 -0
- package/src/dashboard/stat-card.tsx +105 -0
- package/src/data/data-table.tsx +695 -0
- package/src/data/index.ts +37 -0
- package/src/data/table.ts +46 -0
- package/src/data/virtual-list.tsx +180 -0
- package/src/data/virtual.ts +21 -0
- package/src/forms/FormErrorSummary.tsx +64 -0
- package/src/forms/create-form.ts +57 -0
- package/src/forms/field.ts +30 -0
- package/src/forms/index.ts +26 -0
- package/src/forms/use-form-draft.ts +170 -0
- package/src/guard/check-source.test.ts +834 -0
- package/src/guard/guard-hook.test.ts +173 -0
- package/src/guard/guard-hook.ts +122 -0
- package/src/guard/index.ts +510 -0
- package/src/guard/types.ts +117 -0
- package/src/index.ts +139 -0
- package/src/motion/index.ts +26 -0
- package/src/notifications/bell.tsx +108 -0
- package/src/notifications/center.tsx +245 -0
- package/src/notifications/define-notifications.ts +162 -0
- package/src/notifications/index.ts +79 -0
- package/src/notifications/notify.tsx +260 -0
- package/src/notifications/overlay.tsx +64 -0
- package/src/notifications/store.ts +287 -0
- package/src/provider/index.tsx +234 -0
- package/src/query/devtools.tsx +38 -0
- package/src/query/index.ts +129 -0
- package/src/register.ts +158 -0
- package/src/router-tanstack/index.ts +111 -0
- package/src/router-tanstack/multi-search-param-store.test.ts +56 -0
- package/src/router-tanstack/multi-search-param-store.ts +122 -0
- package/src/router-tanstack/search-param-store.ts +125 -0
- package/src/shell/account-types.ts +119 -0
- package/src/shell/app-breadcrumbs.tsx +90 -0
- package/src/shell/app-header.module.css +73 -0
- package/src/shell/app-header.module.css.d.ts +11 -0
- package/src/shell/app-mobile-nav.module.css +100 -0
- package/src/shell/app-mobile-nav.module.css.d.ts +14 -0
- package/src/shell/app-mobile-nav.tsx +146 -0
- package/src/shell/app-sidebar-account.tsx +142 -0
- package/src/shell/app-sidebar.module.css +414 -0
- package/src/shell/app-sidebar.module.css.d.ts +34 -0
- package/src/shell/app-sidebar.tsx +632 -0
- package/src/shell/index.tsx +343 -0
- package/src/shell/page-header.tsx +35 -0
- package/src/shell/sidebar-search.module.css +62 -0
- package/src/shell/sidebar-search.module.css.d.ts +11 -0
- package/src/shell/sidebar-search.tsx +80 -0
- package/src/state.ts +246 -0
- package/src/styles.css +166 -0
- package/src/styles.floor.test.ts +36 -0
- package/src/surfaces.ts +489 -0
- package/src/theme/border-coverage.test.ts +272 -0
- package/src/theme/contrast.test.ts +306 -0
- package/src/theme/controls.module.css +143 -0
- package/src/theme/controls.module.css.d.ts +17 -0
- package/src/theme/floating.module.css +35 -0
- package/src/theme/floating.module.css.d.ts +9 -0
- package/src/theme/index.ts +933 -0
- package/src/theme/nav-link.module.css +67 -0
- package/src/theme/nav-link.module.css.d.ts +8 -0
- package/src/theme/segmented-control.module.css +14 -0
- package/src/theme/segmented-control.module.css.d.ts +8 -0
- package/src/theme/shadow-surfaces.test.ts +421 -0
- package/src/theme/timeline.module.css +29 -0
- package/src/theme/timeline.module.css.d.ts +9 -0
- package/src/theme-lab/index.tsx +359 -0
- package/src/theme-lab/theme-lab.test.ts +60 -0
- package/src/theme-toggle/index.tsx +180 -0
- package/src/tokens/index.ts +363 -0
- package/src/tokens/palette.ts +288 -0
- package/src/vite.ts +122 -0
- package/src/index.css +0 -986
- package/src/starlight.css +0 -308
- package/tailwind.config.js +0 -78
package/README.md
CHANGED
|
@@ -3,252 +3,526 @@
|
|
|
3
3
|
[](https://www.npmjs.com/package/basalt-ui)
|
|
4
4
|
[](https://github.com/jkrumm/basalt-ui/blob/master/LICENSE)
|
|
5
5
|
|
|
6
|
-
>
|
|
6
|
+
> Opinionated framework for Mantine v9 + visx React apps — theme, app shell, chart system, and the agentic layer to drive them.
|
|
7
7
|
|
|
8
|
-
**[Documentation](
|
|
8
|
+
**[Documentation](#quick-start)** · **[GitHub](https://github.com/jkrumm/basalt-ui)** · **[npm](https://www.npmjs.com/package/basalt-ui)**
|
|
9
9
|
|
|
10
|
-
Building
|
|
10
|
+
Building a dashboard app means wiring a Mantine theme, a visx chart system, a typed token layer, and an app shell — each with its own opinions, and none of them talking to each other.
|
|
11
11
|
|
|
12
|
-
Basalt UI is
|
|
12
|
+
Basalt UI is the extraction of that setup from a production app. Install once, get a coherent system.
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
Most teams don't use just one UI tool anymore.
|
|
14
|
+
---
|
|
17
15
|
|
|
18
|
-
|
|
16
|
+
## Quick start
|
|
19
17
|
|
|
20
|
-
|
|
18
|
+
### 1. Install
|
|
21
19
|
|
|
22
|
-
|
|
20
|
+
```bash
|
|
21
|
+
bun add basalt-ui
|
|
22
|
+
bun add react react-dom @mantine/core @mantine/hooks @tanstack/react-query
|
|
23
|
+
```
|
|
23
24
|
|
|
24
|
-
|
|
25
|
+
Peer requirements: `react` / `react-dom` `^19`, `@mantine/core` + `@mantine/hooks` `^9.3`,
|
|
26
|
+
`@tanstack/react-query` (`BasaltProvider` hard-requires it at build time). Bun auto-installs
|
|
27
|
+
peers, but pnpm/npm consumers must add it explicitly or hit an unexplained build failure.
|
|
25
28
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
- **Self-hosted fonts** bundled automatically (Instrument Sans Variable, JetBrains Mono Variable)
|
|
29
|
-
- **Out-of-the-box support** for ShadCN, Starlight, and Tremor
|
|
30
|
-
- **Matching light and dark modes** by default
|
|
31
|
-
- **Framework-agnostic** - works with Next.js, Vite, Astro, and more
|
|
32
|
-
- **No config file needed** - uses Tailwind v4's CSS-first approach
|
|
29
|
+
A real app also needs `@types/react @types/react-dom` (dev) and a standard Vite `vite-env.d.ts`
|
|
30
|
+
for `tsc --noEmit` to pass.
|
|
33
31
|
|
|
34
|
-
|
|
32
|
+
### 2. Scaffold the repo doctrine (`basalt init`)
|
|
35
33
|
|
|
36
|
-
|
|
34
|
+
```bash
|
|
35
|
+
bunx basalt init
|
|
36
|
+
```
|
|
37
37
|
|
|
38
|
-
|
|
38
|
+
Writes into the consumer repo:
|
|
39
39
|
|
|
40
|
-
|
|
40
|
+
- `.claude/rules/basalt-*.md` — twelve Claude Code rules (`basalt-tokens`, `basalt-charts`, `basalt-mantine`, `basalt-router`, `basalt-query`, `basalt-state`, `basalt-forms`, `basalt-notifications`, `basalt-commands`, `basalt-data`, `basalt-agent`, `basalt-content`)
|
|
41
|
+
- A managed `<!-- basalt:begin/end -->` block in `CLAUDE.md` — stack facts, the DESIGN.md pointer, and the frontend-design restraint override
|
|
42
|
+
- A thin `DESIGN.md` seed — your app's deltas (series dictionary, identity, deviations)
|
|
43
|
+
- Toolchain templates: `.oxfmtrc.json`, `lefthook.yml`, `.github/workflows/check.yml`
|
|
44
|
+
- `.oxlintrc.json` with `"extends": ["./node_modules/basalt-ui/configs/oxlint.json"]`
|
|
45
|
+
- `.basalt/manifest.json` — sha256 per managed file for `sync` three-way diff
|
|
41
46
|
|
|
42
|
-
|
|
47
|
+
### 3. Install the plugin (skills)
|
|
43
48
|
|
|
44
49
|
```bash
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
50
|
+
claude plugin marketplace add jkrumm/basalt-ui
|
|
51
|
+
claude plugin install basalt@basalt-ui # enable auto-update when prompted
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Gives you `/basalt:app`, `/basalt:design`, `/basalt:charts` in every Claude Code session.
|
|
55
|
+
|
|
56
|
+
### The plugin and `basalt init` are a pair
|
|
48
57
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
58
|
+
| Channel | Ships | Scope |
|
|
59
|
+
| ----------------- | -------------------------------------------------------------------- | ------------------------------------------------------- |
|
|
60
|
+
| **Plugin** | The three skills (`/basalt:app`, `/basalt:design`, `/basalt:charts`) | User scope — installed once, available in every project |
|
|
61
|
+
| **`basalt init`** | The repo doctrine (rules, CLAUDE block, DESIGN.md, toolchain) | Per repo — run once per consumer |
|
|
52
62
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
63
|
+
A Claude Code plugin cannot write project context (`CLAUDE.md`, `.claude/rules/`, `DESIGN.md`) — that is why doctrine is a separate per-repo `init`. And `init` cannot auto-install a plugin at user scope — that is why the plugin is a one-time separate step. Skills without `init` degrade to generic advice. `init` without the plugin still loads the rules as context, but the design and charts workflows are not a slash command away. Do both.
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
## Wire the runtime
|
|
68
|
+
|
|
69
|
+
After `bunx basalt init`, wire the provider, overlays, and vite preset. This mirrors the canonical
|
|
70
|
+
reference, `apps/playground/src/main.tsx`:
|
|
71
|
+
|
|
72
|
+
```tsx
|
|
73
|
+
// main.tsx — plain Vite CSR entry. BasaltProvider defaults to the dark color scheme and reads any
|
|
74
|
+
// stored scheme from localStorage before mount, so a client-only app needs no ColorSchemeScript.
|
|
75
|
+
import '@mantine/core/styles.layer.css'
|
|
76
|
+
import '@mantine/notifications/styles.layer.css'
|
|
77
|
+
import '@mantine/spotlight/styles.layer.css'
|
|
78
|
+
import 'basalt-ui/styles.css'
|
|
79
|
+
import { BasaltProvider, createBasaltTheme } from 'basalt-ui'
|
|
80
|
+
import { BasaltOverlays } from 'basalt-ui/commands'
|
|
81
|
+
import { applyOverrides, loadOverrides } from 'basalt-ui/theme-lab'
|
|
82
|
+
import { createRoot } from 'react-dom/client'
|
|
83
|
+
import { App } from './App'
|
|
84
|
+
import { paletteGroups } from './theme/series'
|
|
85
|
+
|
|
86
|
+
// The theme lab owns only the editing UI — the host re-applies any persisted overrides at boot, so
|
|
87
|
+
// a tuning session survives a refresh.
|
|
88
|
+
applyOverrides(loadOverrides())
|
|
89
|
+
|
|
90
|
+
const theme = createBasaltTheme({
|
|
91
|
+
/* app deltas only */
|
|
92
|
+
})
|
|
93
|
+
|
|
94
|
+
createRoot(document.getElementById('root')!).render(
|
|
95
|
+
<BasaltProvider theme={theme} paletteOptions={{ groups: paletteGroups }}>
|
|
96
|
+
<BasaltOverlays>
|
|
97
|
+
<App />
|
|
98
|
+
</BasaltOverlays>
|
|
99
|
+
</BasaltProvider>,
|
|
100
|
+
)
|
|
56
101
|
```
|
|
57
102
|
|
|
58
|
-
**
|
|
103
|
+
> Use the **layered** `*.layer.css` bundles, never the plain ones — Mantine's unlayered bundle
|
|
104
|
+
> outranks basalt's `@layer basalt` styles (including the iOS 16px input floor) regardless of
|
|
105
|
+
> specificity. Only import `@mantine/notifications/styles.layer.css` /
|
|
106
|
+
> `@mantine/spotlight/styles.layer.css` if you install those optional-peer batteries
|
|
107
|
+
> (`./notifications` / `./commands` — see [Adapter batteries](#adapter-batteries) below).
|
|
108
|
+
|
|
109
|
+
`BasaltOverlays` (from `basalt-ui/commands`) is the composable overlay mount: it bundles
|
|
110
|
+
`ModalsProvider`, `Spotlight`, and `Notifications` into a single mount point and replaces a
|
|
111
|
+
standalone `<BasaltNotifications />`. `paletteOptions={{ groups: paletteGroups }}` emits your
|
|
112
|
+
app-specific series colors (see
|
|
113
|
+
[Consumer-series extensibility](#consumer-series-extensibility) below) alongside the framework
|
|
114
|
+
palette. Skip both — `BasaltOverlays` and `paletteGroups` — if you don't use those batteries yet.
|
|
115
|
+
|
|
116
|
+
> **SSR only:** Next.js / React Router (SSR) consumers must additionally render
|
|
117
|
+
> `<ColorSchemeScript defaultColorScheme="dark" />` (matching `BasaltProvider`'s default) in the
|
|
118
|
+
> document `<head>` to avoid a flash of the wrong theme during hydration. Plain Vite CSR apps don't
|
|
119
|
+
> need it — there is no hydration to mismatch. See `docs/MANTINE-THEMING.md`.
|
|
120
|
+
|
|
121
|
+
```tsx
|
|
122
|
+
// Shell — sidebar / mobile-nav / breadcrumbs / page-header; router-agnostic
|
|
123
|
+
import { BasaltShell, NavCountBadge } from 'basalt-ui'
|
|
124
|
+
import type { SidebarSection } from 'basalt-ui'
|
|
125
|
+
```
|
|
59
126
|
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
|
|
127
|
+
```ts
|
|
128
|
+
// vite.config.ts
|
|
129
|
+
import { basaltViteConfig } from 'basalt-ui/vite'
|
|
130
|
+
|
|
131
|
+
export default basaltViteConfig({ port: 5173, apiTarget: 'http://localhost:3000' })
|
|
63
132
|
```
|
|
64
133
|
|
|
65
|
-
|
|
134
|
+
> **Local consumption (sibling checkouts).** Developing against an unpublished / `file:`-linked
|
|
135
|
+
> basalt-ui from a sibling repo? Build `dist/` first — `bunx basalt` always resolves
|
|
136
|
+
> `bin/basalt.mjs` → `dist/cli/index.js`, even though the _runtime_ import can ride
|
|
137
|
+
> `basaltViteConfig`'s `BASALT_LOCAL`/`basaltSrc` source aliasing above. And in a monorepo, add
|
|
138
|
+
> `basalt-ui` as a **root** devDependency (not only a leaf-workspace dep) so its bin hoists into the
|
|
139
|
+
> root `node_modules/.bin` — otherwise `bunx basalt` silently resolves the stale published package
|
|
140
|
+
> from npm instead of your local checkout.
|
|
141
|
+
|
|
142
|
+
```ts
|
|
143
|
+
// Lint — theme guard is the teeth behind the token doctrine
|
|
144
|
+
// package.json scripts:
|
|
145
|
+
"lint": "oxlint . && basalt check-theme"
|
|
146
|
+
```
|
|
66
147
|
|
|
67
|
-
|
|
148
|
+
`check-theme` scans your own source roots, not basalt's — point it at them via a `"basalt"` key
|
|
149
|
+
in your `package.json` (defaults are argo's own paths and will scan 0 files in any other repo):
|
|
68
150
|
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
151
|
+
```json
|
|
152
|
+
// package.json
|
|
153
|
+
{
|
|
154
|
+
"basalt": {
|
|
155
|
+
"roots": ["src"]
|
|
156
|
+
}
|
|
157
|
+
}
|
|
73
158
|
```
|
|
74
159
|
|
|
75
|
-
|
|
160
|
+
`roots` is required for a real scan. `check-theme` warns (instead of a false `✓`) when the
|
|
161
|
+
configured roots resolve to zero scanned files. Other `"basalt"` config keys (`exempt`,
|
|
162
|
+
`spacingSteps`, `forbiddenAccents`, …) are documented on the `BasaltConfig` type.
|
|
76
163
|
|
|
77
164
|
---
|
|
78
165
|
|
|
79
|
-
##
|
|
166
|
+
## Subpath exports
|
|
167
|
+
|
|
168
|
+
| Subpath | Mantine? | Purpose |
|
|
169
|
+
| ------------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
170
|
+
| `.` | coupled | `BasaltProvider`, `createBasaltTheme` / `baseTheme` / `cssVariablesResolver`, `BasaltShell` + sidebar / mobile-nav / breadcrumbs / page-header, `NavCountBadge`, `SidebarAccount` + the provider-agnostic account contract (`BasaltAccountProps`/`State`/`Actions`), `ThreadWorkspace` + thread-chat components, shell types |
|
|
171
|
+
| `./charts` | **free** | visx chart primitives, sparklines, hooks, and token re-exports |
|
|
172
|
+
| `./tokens` | **free** | `VX` token refs, `buildPaletteCss`, `defineSeries`, `seriesTokens`, `groupTokens`, `alpha`, `ColorPair` / `SeriesMap` types |
|
|
173
|
+
| `./theme-lab` | coupled | `ThemeLabControls`, `applyOverrides`, `loadOverrides`, `COLOR_GROUPS` for live theme inspection |
|
|
174
|
+
| `./vite` | — | `basaltViteConfig(opts)` — Vite preset for basalt-ui consumer apps |
|
|
175
|
+
| `./guard` | **free** | `checkSource`, `GUARD_RULES`, `Finding` types — the headless theme-guard core |
|
|
176
|
+
| `./query` | **free** | `createBasaltQueryClient`, transport-agnostic `unwrap`, lazy `BasaltQueryDevtools` |
|
|
177
|
+
| `./router-tanstack` | **free** | TanStack Router bridge: `useBasaltNav` (active route) + `useRouterBreadcrumbs` |
|
|
178
|
+
| `./forms` | coupled | Mantine form adapter: `useBasaltForm`, `field`, `FormErrorSummary`, `useFormDraft` (Standard Schema) |
|
|
179
|
+
| `./notifications` | coupled | Mantine notifications: `notify` helpers, typed registry, persisted history, `NotificationBell` |
|
|
180
|
+
| `./commands` | coupled | Typed command bus + overlay controller, `toSpotlightActions`, `ShortcutsHelp`, `BasaltOverlays` |
|
|
181
|
+
| `./data` | coupled | Convenience barrel pulling both peer groups: `BasaltDataTable`, `BasaltVirtualList` (Mantine-rendered) — prefer `./data/table` / `./data/virtual` for per-feature opt-in |
|
|
182
|
+
| `./data/table` | coupled | `BasaltDataTable` — sortable data table over TanStack Table, rendered with Mantine |
|
|
183
|
+
| `./data/virtual` | coupled | `BasaltVirtualList` — windowed virtual list over TanStack Virtual, rendered with Mantine |
|
|
184
|
+
| `./agent` | **free** | Headless streaming layer (`useAgentStream`, `PartList`) + multi-thread `createThreadsStore` / `useAgentThreadRuns` / outcome seam |
|
|
185
|
+
| `./state` | **free** | `createPersistedState` (versioned localStorage) + `useOnlineStatus` — Mantine-free state primitives |
|
|
186
|
+
| `./connectivity` | coupled | `ConnectivityProvider` (aggregates browser/React-Query/SSE/health-check status), `useConnectivity`, `ConnectivityIndicator` — auto-mounted by `BasaltProvider` |
|
|
187
|
+
| `./content` | coupled | `Prose`, `CodeBlock`, `Callout`, `TableOfContents`, `ReadingProgress`, `Markdown`, `MermaidDiagram`, `ArticleLayout`, `ArticleCard` / `ArticleGrid`, `GuideLink` / `GuideDrawer`, `mdxComponents` |
|
|
188
|
+
| `./styles.css` | — | `@layer basalt` base styles, iOS input safety net, font stack |
|
|
189
|
+
| `./configs/*` | — | Raw toolchain presets — oxlint, oxfmt, tsconfig (base/react-app/node), lefthook |
|
|
190
|
+
| `./llms.txt` | — | Machine-readable surface map — one entry per published subpath with import specifier, description, layer, and optional peers |
|
|
191
|
+
|
|
192
|
+
Named exports only — no default exports.
|
|
80
193
|
|
|
81
|
-
|
|
194
|
+
---
|
|
82
195
|
|
|
83
|
-
|
|
84
|
-
<article class="prose">
|
|
85
|
-
<h2>Section Title</h2>
|
|
86
|
-
<p>This paragraph looks great with <a href="#">automatic styling</a>.</p>
|
|
87
|
-
<code>inline code</code> and <pre><code>code blocks</code></pre>
|
|
88
|
-
</article>
|
|
89
|
-
```
|
|
196
|
+
## Mantine-free boundary
|
|
90
197
|
|
|
91
|
-
|
|
198
|
+
`./charts` and `./tokens` import zero `@mantine/*`. `@visx/*` is only allowed inside `src/charts/**`. The root barrel (`.`) does not re-export `./charts` or `./tokens` — a charts/tokens-only consumer never pulls in Mantine.
|
|
92
199
|
|
|
93
|
-
|
|
94
|
-
<div class="p-4 bg-card text-foreground rounded-lg shadow">
|
|
95
|
-
<h3 class="text-h3 font-bold">Card Title</h3>
|
|
96
|
-
<p class="text-muted-foreground">Card content</p>
|
|
97
|
-
</div>
|
|
98
|
-
```
|
|
200
|
+
This boundary is enforced by oxlint `no-restricted-imports` in both the repo and the shipped consumer preset, so the constraint holds downstream too.
|
|
99
201
|
|
|
100
202
|
---
|
|
101
203
|
|
|
102
|
-
##
|
|
204
|
+
## Token system (`--vx-*`, three tiers)
|
|
103
205
|
|
|
104
|
-
|
|
206
|
+
```
|
|
207
|
+
Tier 1 — Palette data Pure data + string helpers (BP, p()). Zero React, zero Mantine, zero browser.
|
|
208
|
+
Tier 2 — CSS variables Emitted as --vx-* custom properties under light/dark color-scheme. Pure CSS.
|
|
209
|
+
Tier 3 — Token refs VX.* — just var(--vx-*) strings. Work in components and non-component files.
|
|
210
|
+
```
|
|
105
211
|
|
|
106
|
-
|
|
212
|
+
Apply opacity with `alpha(token, a)` (backed by `color-mix`) — never `rgba()`, so the hue keeps resolving per scheme.
|
|
107
213
|
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
214
|
+
### Consumer-series extensibility
|
|
215
|
+
|
|
216
|
+
App-specific series colors live in the consumer, not the framework. The framework ships the factories:
|
|
217
|
+
|
|
218
|
+
```ts
|
|
219
|
+
// src/theme/series.ts — the single guard-exempt file
|
|
220
|
+
import { defineSeries, groupTokens } from 'basalt-ui/tokens'
|
|
221
|
+
|
|
222
|
+
// 1. Declare the series with light/dark pairs (ColorPair shape — hex strings per scheme)
|
|
223
|
+
export const SERIES = defineSeries({
|
|
224
|
+
sessions: { light: '#4f78a4', dark: '#7099c4' },
|
|
225
|
+
signups: { light: '#3f8a63', dark: '#62c08f' },
|
|
226
|
+
revenue: { light: '#d9822b', dark: '#f0a868' },
|
|
227
|
+
churn: { light: '#c23030', dark: '#f08c8c' },
|
|
228
|
+
})
|
|
229
|
+
|
|
230
|
+
// 2. Augment BasaltRegister — gives exact-keyed typing everywhere that reads series
|
|
231
|
+
declare module 'basalt-ui' {
|
|
232
|
+
interface BasaltRegister {
|
|
233
|
+
series: typeof SERIES
|
|
113
234
|
}
|
|
114
235
|
}
|
|
236
|
+
|
|
237
|
+
// 3. Namespaced token refs — stale keys fail tsc at the call site
|
|
238
|
+
export const GROUP = 'app'
|
|
239
|
+
export const colors = groupTokens(GROUP, SERIES)
|
|
240
|
+
// colors.sessions → 'var(--vx-app-sessions)'
|
|
241
|
+
|
|
242
|
+
// 4. Hand the same map to BasaltProvider so the --vx-app-* vars are emitted
|
|
243
|
+
export const paletteGroups = { [`${GROUP}-`]: SERIES }
|
|
115
244
|
```
|
|
116
245
|
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
246
|
+
```tsx
|
|
247
|
+
// main.tsx — wire paletteGroups into BasaltProvider
|
|
248
|
+
import { BasaltProvider, createBasaltTheme } from 'basalt-ui'
|
|
249
|
+
import { paletteGroups } from './theme/series'
|
|
250
|
+
|
|
251
|
+
export function App() {
|
|
252
|
+
return (
|
|
253
|
+
<BasaltProvider theme={createBasaltTheme()} paletteOptions={{ groups: paletteGroups }}>
|
|
254
|
+
{/* app */}
|
|
255
|
+
</BasaltProvider>
|
|
256
|
+
)
|
|
257
|
+
}
|
|
258
|
+
```
|
|
123
259
|
|
|
124
|
-
|
|
125
|
-
- ❌ No `tailwind.config.js` file
|
|
126
|
-
- ❌ No manual font setup
|
|
127
|
-
- ❌ No theme configuration
|
|
128
|
-
- ❌ No PostCSS config
|
|
260
|
+
Every `defineX` factory is const-generic and exact-keyed — the return type mirrors the literal input shape, so `tsc` catches stale keys.
|
|
129
261
|
|
|
130
|
-
|
|
262
|
+
---
|
|
131
263
|
|
|
132
|
-
|
|
133
|
-
- `tailwindcss` v4+ - Core CSS framework
|
|
134
|
-
- `@tailwindcss/typography` - Powers `.prose` class
|
|
135
|
-
- `shadcn` - Component CLI tool
|
|
136
|
-
- `tw-animate-css` - Animation utilities
|
|
264
|
+
## Adapter batteries
|
|
137
265
|
|
|
138
|
-
|
|
139
|
-
- `@fontsource-variable/instrument-sans` - Heading and body font
|
|
140
|
-
- `@fontsource-variable/jetbrains-mono` - Monospace font
|
|
266
|
+
Seven optional-peer batteries extend the core. Install only what you use — core resolves without them.
|
|
141
267
|
|
|
142
|
-
|
|
143
|
-
- Prevents version conflicts across your project
|
|
144
|
-
- You control which versions to use
|
|
145
|
-
- Reduces duplicate packages in node_modules
|
|
146
|
-
- Standard practice for plugin ecosystems
|
|
268
|
+
### `./query` — TanStack Query adapter
|
|
147
269
|
|
|
148
|
-
|
|
270
|
+
```bash
|
|
271
|
+
bun add @tanstack/react-query @tanstack/react-query-devtools
|
|
272
|
+
```
|
|
149
273
|
|
|
150
|
-
|
|
274
|
+
```tsx
|
|
275
|
+
import { createBasaltQueryClient, QueryClientProvider, unwrap } from 'basalt-ui/query'
|
|
151
276
|
|
|
152
|
-
|
|
277
|
+
const [client] = useState(() => createBasaltQueryClient())
|
|
278
|
+
// queryFn: () => unwrap(api.users.get())
|
|
279
|
+
```
|
|
153
280
|
|
|
154
|
-
-
|
|
155
|
-
- ✅ **Vite** - React, Vue, Svelte, Solid
|
|
156
|
-
- ✅ **Astro** - Static sites and SSR
|
|
157
|
-
- ✅ **ShadCN UI** - All components work out of the box
|
|
158
|
-
- ✅ **Tremor** - Charts and dashboards
|
|
159
|
-
- ✅ **Starlight** - Documentation framework
|
|
281
|
+
### `./router-tanstack` — TanStack Router bridge
|
|
160
282
|
|
|
161
|
-
|
|
283
|
+
```bash
|
|
284
|
+
bun add @tanstack/react-router
|
|
285
|
+
```
|
|
162
286
|
|
|
163
|
-
|
|
287
|
+
```tsx
|
|
288
|
+
import { useBasaltNav, useRouterBreadcrumbs } from 'basalt-ui/router-tanstack'
|
|
289
|
+
|
|
290
|
+
const { isActive } = useBasaltNav()
|
|
291
|
+
const crumbs = useRouterBreadcrumbs()
|
|
292
|
+
```
|
|
293
|
+
|
|
294
|
+
### `./forms` — Mantine form adapter
|
|
164
295
|
|
|
165
|
-
|
|
296
|
+
```bash
|
|
297
|
+
bun add @mantine/form
|
|
298
|
+
```
|
|
166
299
|
|
|
167
|
-
|
|
300
|
+
```tsx
|
|
301
|
+
import { useBasaltForm, field, FormErrorSummary } from 'basalt-ui/forms'
|
|
168
302
|
|
|
169
|
-
|
|
170
|
-
<!-- Arbitrary values everywhere -->
|
|
171
|
-
<div class="text-[17px] p-[13px] bg-[#f3f3f3]">
|
|
172
|
-
<!-- Components conflict with global styles -->
|
|
173
|
-
<h2>Heading</h2> <!-- Styled globally -->
|
|
174
|
-
<Table>...</Table> <!-- Inherits unwanted styles -->
|
|
175
|
-
</div>
|
|
303
|
+
const form = useBasaltForm({ initialValues: { email: '' } })
|
|
176
304
|
```
|
|
177
305
|
|
|
178
|
-
|
|
179
|
-
- Arbitrary values lead to inconsistency
|
|
180
|
-
- Global semantic HTML styles conflict with component libraries
|
|
181
|
-
- Tremor/ShadCN components inherit unwanted styles
|
|
306
|
+
### `./notifications` — Mantine notifications
|
|
182
307
|
|
|
183
|
-
|
|
308
|
+
```bash
|
|
309
|
+
bun add @mantine/notifications
|
|
310
|
+
```
|
|
184
311
|
|
|
185
|
-
```
|
|
186
|
-
|
|
187
|
-
<div class="text-body p-4 bg-card">
|
|
188
|
-
<!-- Content areas: Use .prose -->
|
|
189
|
-
<article class="prose">
|
|
190
|
-
<h2>Heading</h2> <!-- Styled within .prose -->
|
|
191
|
-
</article>
|
|
312
|
+
```tsx
|
|
313
|
+
import { BasaltNotifications, notifySuccess, notifyError } from 'basalt-ui/notifications'
|
|
192
314
|
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
315
|
+
// in main.tsx: <BasaltProvider><BasaltNotifications /><App /></BasaltProvider>
|
|
316
|
+
notifySuccess('Saved')
|
|
317
|
+
notifyError('Upload failed', { title: 'Error' })
|
|
196
318
|
```
|
|
197
319
|
|
|
198
|
-
|
|
199
|
-
- Consistent, predictable design tokens
|
|
200
|
-
- `.prose` for content, clean components for UI
|
|
201
|
-
- No conflicts with ShadCN/Tremor
|
|
202
|
-
- Design system enforces consistency
|
|
320
|
+
### `./commands` — command bus + Spotlight overlay
|
|
203
321
|
|
|
204
|
-
|
|
322
|
+
```bash
|
|
323
|
+
bun add @mantine/spotlight @mantine/modals @mantine/notifications @tanstack/react-hotkeys
|
|
324
|
+
```
|
|
325
|
+
|
|
326
|
+
```tsx
|
|
327
|
+
import { defineCommands, runCommand, BasaltOverlays } from 'basalt-ui/commands'
|
|
328
|
+
|
|
329
|
+
export const COMMANDS = defineCommands({
|
|
330
|
+
'file:save': { label: 'Save', group: 'File', shortcut: 'Mod+S', run: () => save() },
|
|
331
|
+
})
|
|
332
|
+
// in main.tsx: <BasaltProvider><BasaltOverlays><App /></BasaltOverlays></BasaltProvider>
|
|
333
|
+
runCommand('file:save')
|
|
334
|
+
```
|
|
205
335
|
|
|
206
|
-
|
|
336
|
+
### `./data` — TanStack Table + Virtual
|
|
207
337
|
|
|
208
|
-
|
|
209
|
-
-
|
|
210
|
-
|
|
211
|
-
|
|
338
|
+
`./data` is a convenience barrel that pulls in both peer groups. Prefer the fine subpaths below
|
|
339
|
+
for per-feature opt-in — each only requires its own peer.
|
|
340
|
+
|
|
341
|
+
```bash
|
|
342
|
+
bun add @tanstack/react-table @tanstack/react-virtual
|
|
343
|
+
```
|
|
212
344
|
|
|
213
|
-
|
|
345
|
+
```tsx
|
|
346
|
+
import { BasaltDataTable, BasaltVirtualList, createColumnHelper } from 'basalt-ui/data'
|
|
347
|
+
|
|
348
|
+
const col = createColumnHelper<Row>()
|
|
349
|
+
const columns = [col.accessor('name', { header: 'Name' })]
|
|
350
|
+
// <BasaltDataTable data={rows} columns={columns} />
|
|
351
|
+
```
|
|
352
|
+
|
|
353
|
+
#### `./data/table` — BasaltDataTable only
|
|
354
|
+
|
|
355
|
+
```bash
|
|
356
|
+
bun add @tanstack/react-table
|
|
357
|
+
```
|
|
358
|
+
|
|
359
|
+
```tsx
|
|
360
|
+
import { BasaltDataTable, createColumnHelper } from 'basalt-ui/data/table'
|
|
361
|
+
```
|
|
362
|
+
|
|
363
|
+
#### `./data/virtual` — BasaltVirtualList only
|
|
364
|
+
|
|
365
|
+
```bash
|
|
366
|
+
bun add @tanstack/react-virtual
|
|
367
|
+
```
|
|
368
|
+
|
|
369
|
+
```tsx
|
|
370
|
+
import { BasaltVirtualList } from 'basalt-ui/data/virtual'
|
|
371
|
+
```
|
|
372
|
+
|
|
373
|
+
### `./content` — prose + markdown
|
|
374
|
+
|
|
375
|
+
````bash
|
|
376
|
+
bun add react-markdown remark-gfm # Markdown
|
|
377
|
+
bun add shiki # CodeBlock / fenced-code highlighting (brings @shikijs/langs, @shikijs/themes as optional peers)
|
|
378
|
+
bun add beautiful-mermaid # MermaidDiagram / ```mermaid fences
|
|
379
|
+
````
|
|
380
|
+
|
|
381
|
+
Every peer is lazily imported and degrades gracefully when absent (markdown falls back to plain
|
|
382
|
+
text, fences to plain mono, mermaid renders nothing). `Markdown` is the package's **only** markdown
|
|
383
|
+
renderer — it backs long-form content and AI chat alike:
|
|
384
|
+
|
|
385
|
+
```tsx
|
|
386
|
+
import { Markdown, Prose, CodeBlock, TableOfContents } from 'basalt-ui/content'
|
|
387
|
+
|
|
388
|
+
// Long-form: 72ch measure, article typography, heading anchors + slug dedup.
|
|
389
|
+
<Markdown>{article.body}</Markdown>
|
|
390
|
+
|
|
391
|
+
// AI output: chat density, block-split + memoized, `remend`-repaired in-flight tail.
|
|
392
|
+
<Markdown streaming density="chat">{part.text}</Markdown>
|
|
393
|
+
```
|
|
394
|
+
|
|
395
|
+
`streaming` also tightens image URLs to same-origin — LLM-authored markdown can otherwise exfiltrate
|
|
396
|
+
via a remote image URL. Full doctrine: `agent/rules/basalt-content.md`.
|
|
397
|
+
|
|
398
|
+
### `./agent` — streaming-chat layer
|
|
399
|
+
|
|
400
|
+
```bash
|
|
401
|
+
bun add ai use-stick-to-bottom
|
|
402
|
+
```
|
|
403
|
+
|
|
404
|
+
Ships no markdown renderer — `agent/** -> content` is lint-blocked by design, so `PartList` takes
|
|
405
|
+
a consumer-supplied `components.text`. Basalt's own is [`./content`](#content--prose--markdown)'s
|
|
406
|
+
`Markdown`, already wired in by `ThreadWorkspace`.
|
|
407
|
+
|
|
408
|
+
Single conversation — headless streaming primitives, `aiSdkTransport` (recommended default, optional
|
|
409
|
+
peer: `ai`):
|
|
410
|
+
|
|
411
|
+
```tsx
|
|
412
|
+
import { useAgentStream, aiSdkTransport, PartList } from 'basalt-ui/agent'
|
|
413
|
+
|
|
414
|
+
const transport = aiSdkTransport({ api: '/api/chat' })
|
|
415
|
+
const { parts, send, status } = useAgentStream({ transport })
|
|
416
|
+
```
|
|
417
|
+
|
|
418
|
+
Many short chats — the `ThreadWorkspace` composite (a distilled-outcome feed + a detail panel).
|
|
419
|
+
The headless multi-thread layer lives in `./agent`; the Mantine chrome ships from the root entry:
|
|
420
|
+
|
|
421
|
+
```tsx
|
|
422
|
+
import { ThreadWorkspace } from 'basalt-ui'
|
|
423
|
+
import { createThreadsStore, heuristicOutcome } from 'basalt-ui/agent'
|
|
424
|
+
|
|
425
|
+
// Once at module scope:
|
|
426
|
+
const useThreads = createThreadsStore({ key: 'main-threads', version: 1 })
|
|
427
|
+
|
|
428
|
+
function Inbox() {
|
|
429
|
+
return (
|
|
430
|
+
<ThreadWorkspace
|
|
431
|
+
useThreads={useThreads}
|
|
432
|
+
transport={transport}
|
|
433
|
+
resolveOutcome={heuristicOutcome} // swap for your LLM-backed {title, summary} resolver
|
|
434
|
+
newThreadPlaceholder="Ask anything…"
|
|
435
|
+
/>
|
|
436
|
+
)
|
|
437
|
+
}
|
|
438
|
+
```
|
|
439
|
+
|
|
440
|
+
`useAgentThreadRuns` streams each thread concurrently in the background; the feed shows only the
|
|
441
|
+
distilled `{ title, summary }` outcome, never the raw prompt or thinking. See
|
|
442
|
+
`agent/rules/basalt-agent.md` for the full doctrine.
|
|
214
443
|
|
|
215
444
|
---
|
|
216
445
|
|
|
217
|
-
##
|
|
446
|
+
## Type seam (`BasaltRegister`)
|
|
447
|
+
|
|
448
|
+
`BasaltRegister` is the single declaration-merge interface consumers augment to register their app-specific shapes for exact-keyed typing. It follows the same pattern as TanStack Router's `Register` interface — augment once per concern in the concern's own file, and every battery that reads the slot gets narrow types automatically.
|
|
449
|
+
|
|
450
|
+
```ts
|
|
451
|
+
// src/commands.ts — augment the commands slot
|
|
452
|
+
import { defineCommands } from 'basalt-ui/commands'
|
|
453
|
+
|
|
454
|
+
export const COMMANDS = defineCommands({
|
|
455
|
+
'file:save': { label: 'Save', group: 'File', shortcut: 'Mod+S', run: () => save() },
|
|
456
|
+
})
|
|
457
|
+
|
|
458
|
+
declare module 'basalt-ui' {
|
|
459
|
+
interface BasaltRegister {
|
|
460
|
+
commands: typeof COMMANDS
|
|
461
|
+
}
|
|
462
|
+
}
|
|
463
|
+
```
|
|
464
|
+
|
|
465
|
+
Current slots: `series` (read by `./charts` + `./tokens`), `commands` (read by `./commands`), and `overlays` / `notifications` (read by `./commands` / `./notifications`). An un-augmented slot defaults to a never-keyed `{}` — augment only the slots you use.
|
|
466
|
+
|
|
467
|
+
---
|
|
218
468
|
|
|
219
|
-
|
|
220
|
-
- **Tailwind CSS v4+** - Core CSS framework (uses `@theme inline` syntax)
|
|
221
|
-
- **@tailwindcss/typography v0.5+** - Typography plugin for `.prose` class
|
|
222
|
-
- **tw-animate-css v1.4+** - Animation utilities
|
|
223
|
-
- **shadcn v3.8+** - Component utilities
|
|
469
|
+
## CLI
|
|
224
470
|
|
|
225
|
-
|
|
471
|
+
```bash
|
|
472
|
+
bunx basalt init # scaffold doctrine into a consumer repo
|
|
473
|
+
bunx basalt sync # three-way diff against .basalt/manifest.json after a basalt-ui upgrade
|
|
474
|
+
bunx basalt sync --check # CI drift gate — non-zero exit on any managed-file drift
|
|
475
|
+
bunx basalt check-theme # palette guard — fails on colors that bypass the central --vx-* system
|
|
476
|
+
bunx basalt doctor # check consumer repo basalt integration health (manifest, CLAUDE.md block, rules, plugin)
|
|
477
|
+
bunx basalt info # human-readable surface map: subpath, layer, rule, skills, optional peers
|
|
478
|
+
bunx basalt info --json # same map as stable JSON (InfoOutput shape)
|
|
479
|
+
```
|
|
226
480
|
|
|
227
|
-
|
|
228
|
-
- Modern browsers with OKLCH support (Chrome 111+, Edge 111+, Safari 16.4+, Firefox 113+)
|
|
481
|
+
`sync` strategy per file: unchanged since last write → overwrite; locally edited → skip (show diff); missing → recreate. `--force` overwrites local edits.
|
|
229
482
|
|
|
230
483
|
---
|
|
231
484
|
|
|
232
|
-
##
|
|
485
|
+
## Toolchain
|
|
233
486
|
|
|
234
|
-
|
|
487
|
+
- **Lint**: oxlint (NOT ESLint / Biome)
|
|
488
|
+
- **Format**: oxfmt (NOT Prettier / Biome)
|
|
489
|
+
- **Runtime**: Bun
|
|
490
|
+
- **TypeScript**: strict mode throughout
|
|
491
|
+
- **Tarball ships `src/`** alongside `dist/` — go-to-definition lands in real source, not compiled output
|
|
235
492
|
|
|
236
|
-
|
|
237
|
-
2. Use OKLCH for all colors
|
|
238
|
-
3. Preserve semantic HTML defaults
|
|
239
|
-
4. Follow volcanic nature aesthetic
|
|
240
|
-
5. Document changes in CLAUDE.md
|
|
493
|
+
The `./configs/*` export gives consumer apps raw presets to `extends` or copy via `basalt init`:
|
|
241
494
|
|
|
242
|
-
|
|
495
|
+
```json
|
|
496
|
+
// .oxlintrc.json
|
|
497
|
+
{ "extends": ["./node_modules/basalt-ui/configs/oxlint.json"] }
|
|
498
|
+
```
|
|
243
499
|
|
|
244
500
|
---
|
|
245
501
|
|
|
246
|
-
##
|
|
502
|
+
## `basalt sync` in CI
|
|
247
503
|
|
|
248
|
-
|
|
504
|
+
Wire the drift gate to catch doctrine falling behind after a basalt-ui upgrade:
|
|
505
|
+
|
|
506
|
+
```yaml
|
|
507
|
+
# .github/workflows/check.yml (scaffolded by basalt init)
|
|
508
|
+
- run: bunx basalt sync --check
|
|
509
|
+
```
|
|
249
510
|
|
|
250
511
|
---
|
|
251
512
|
|
|
252
|
-
|
|
513
|
+
## Requirements
|
|
514
|
+
|
|
515
|
+
| Peer | Version | Notes |
|
|
516
|
+
| ----------------------- | ------- | ---------------------------------------------------------- |
|
|
517
|
+
| `react` / `react-dom` | `^19` | required |
|
|
518
|
+
| `@mantine/core` | `^9.3` | required |
|
|
519
|
+
| `@mantine/hooks` | `^9.3` | required |
|
|
520
|
+
| `@tanstack/react-query` | — | required — `BasaltProvider` hard-requires it at build time |
|
|
521
|
+
|
|
522
|
+
Optional peer batteries and their packages are listed per battery above.
|
|
523
|
+
|
|
524
|
+
---
|
|
525
|
+
|
|
526
|
+
## License
|
|
253
527
|
|
|
254
|
-
|
|
528
|
+
Apache 2.0 — use freely, modify as needed, keep attribution.
|