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