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
|
@@ -0,0 +1,733 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Accordion,
|
|
3
|
+
ActionIcon,
|
|
4
|
+
Alert,
|
|
5
|
+
Badge,
|
|
6
|
+
Breadcrumbs,
|
|
7
|
+
Button,
|
|
8
|
+
Card,
|
|
9
|
+
Checkbox,
|
|
10
|
+
CheckboxCard,
|
|
11
|
+
Chip,
|
|
12
|
+
Code,
|
|
13
|
+
Combobox,
|
|
14
|
+
createTheme,
|
|
15
|
+
defaultVariantColorsResolver,
|
|
16
|
+
Drawer,
|
|
17
|
+
getPrimaryShade,
|
|
18
|
+
Indicator,
|
|
19
|
+
Input,
|
|
20
|
+
Kbd,
|
|
21
|
+
Menu,
|
|
22
|
+
mergeThemeOverrides,
|
|
23
|
+
Modal,
|
|
24
|
+
NavLink,
|
|
25
|
+
Notification,
|
|
26
|
+
NumberInput,
|
|
27
|
+
Pagination,
|
|
28
|
+
Paper,
|
|
29
|
+
PasswordInput,
|
|
30
|
+
PillsInput,
|
|
31
|
+
Popover,
|
|
32
|
+
Progress,
|
|
33
|
+
Radio,
|
|
34
|
+
RadioCard,
|
|
35
|
+
rem,
|
|
36
|
+
Select,
|
|
37
|
+
SegmentedControl,
|
|
38
|
+
Stepper,
|
|
39
|
+
Switch,
|
|
40
|
+
Table,
|
|
41
|
+
Tabs,
|
|
42
|
+
Textarea,
|
|
43
|
+
TextInput,
|
|
44
|
+
Timeline,
|
|
45
|
+
Tooltip
|
|
46
|
+
} from "@mantine/core";
|
|
47
|
+
import { ACCENT, BP, FILL, INK, NEUTRAL, SURFACE } from "../tokens/palette.js";
|
|
48
|
+
import { VX } from "../tokens/index.js";
|
|
49
|
+
import controlsClasses from "./controls.module.css";
|
|
50
|
+
import floatingClasses from "./floating.module.css";
|
|
51
|
+
import navLinkClasses from "./nav-link.module.css";
|
|
52
|
+
import segmentedControlClasses from "./segmented-control.module.css";
|
|
53
|
+
import timelineClasses from "./timeline.module.css";
|
|
54
|
+
function hexToRgb(h) {
|
|
55
|
+
const n = Number.parseInt(h.slice(1), 16);
|
|
56
|
+
return [n >> 16 & 255, n >> 8 & 255, n & 255];
|
|
57
|
+
}
|
|
58
|
+
function mix(a, b, t) {
|
|
59
|
+
const A = hexToRgb(a);
|
|
60
|
+
const B = hexToRgb(b);
|
|
61
|
+
const c = A.map((v, i) => Math.round(v + (B[i] - v) * t));
|
|
62
|
+
return `#${c.map((v) => v.toString(16).padStart(2, "0")).join("")}`;
|
|
63
|
+
}
|
|
64
|
+
function ramp10(stops) {
|
|
65
|
+
const lite = stops.toReversed();
|
|
66
|
+
const out = [];
|
|
67
|
+
for (let i = 0; i < 10; i++) {
|
|
68
|
+
const pos = i / 9 * (lite.length - 1);
|
|
69
|
+
const lo = Math.floor(pos);
|
|
70
|
+
const hi = Math.min(lo + 1, lite.length - 1);
|
|
71
|
+
out.push(mix(lite[lo], lite[hi], pos - lo));
|
|
72
|
+
}
|
|
73
|
+
out[0] = mix(out[0], "#ffffff", 0.5);
|
|
74
|
+
return out;
|
|
75
|
+
}
|
|
76
|
+
function pinShades(tuple, overrides) {
|
|
77
|
+
const out = [...tuple];
|
|
78
|
+
for (const [i, hex] of Object.entries(overrides)) out[Number(i)] = hex;
|
|
79
|
+
return out;
|
|
80
|
+
}
|
|
81
|
+
const basaltDark = [
|
|
82
|
+
"#e5e5e5",
|
|
83
|
+
// text (= INK.ink.dark)
|
|
84
|
+
"#dddddd",
|
|
85
|
+
// emphasis body (= INK.ink2.dark)
|
|
86
|
+
"#d4d4d4",
|
|
87
|
+
// dimmed (= INK.muted.dark = NEUTRAL.neutral.dark)
|
|
88
|
+
"#a1a1a1",
|
|
89
|
+
// faint (= INK.faint.dark)
|
|
90
|
+
"#3f3f46",
|
|
91
|
+
// border fallback ("line"; resolver pins dark-4 → --vx-surface-border)
|
|
92
|
+
"#333338",
|
|
93
|
+
// hover (= SURFACE.panelHover.dark)
|
|
94
|
+
"#27272a",
|
|
95
|
+
// surface (panel) (= SURFACE.panel.dark)
|
|
96
|
+
"#232326",
|
|
97
|
+
// body (page bg) (= SURFACE.bg.dark)
|
|
98
|
+
"#18181b",
|
|
99
|
+
// deeper than body (= BP.darkGray[0])
|
|
100
|
+
"#09090b"
|
|
101
|
+
// darkest extreme
|
|
102
|
+
];
|
|
103
|
+
function onColor(theme, color) {
|
|
104
|
+
const name = color ?? theme.primaryColor;
|
|
105
|
+
if (!Object.prototype.hasOwnProperty.call(theme.colors, name)) return void 0;
|
|
106
|
+
return `var(--vx-on-${name})`;
|
|
107
|
+
}
|
|
108
|
+
function onColorFor(theme, props) {
|
|
109
|
+
const autoContrast = props.autoContrast ?? theme.autoContrast;
|
|
110
|
+
return autoContrast ? onColor(theme, props.color) : void 0;
|
|
111
|
+
}
|
|
112
|
+
function relativeLuminance(hex) {
|
|
113
|
+
const channels = hexToRgb(hex).map((c) => {
|
|
114
|
+
const s = c / 255;
|
|
115
|
+
return s <= 0.03928 ? s / 12.92 : ((s + 0.055) / 1.055) ** 2.4;
|
|
116
|
+
});
|
|
117
|
+
return 0.2126 * channels[0] + 0.7152 * channels[1] + 0.0722 * channels[2];
|
|
118
|
+
}
|
|
119
|
+
function contrastRatio(a, b) {
|
|
120
|
+
const [hi, lo] = [relativeLuminance(a), relativeLuminance(b)].toSorted((x, y) => y - x);
|
|
121
|
+
return (hi + 0.05) / (lo + 0.05);
|
|
122
|
+
}
|
|
123
|
+
function legibleOn(background, theme) {
|
|
124
|
+
return contrastRatio(background, theme.white) >= contrastRatio(background, theme.black) ? "var(--mantine-color-white)" : "var(--mantine-color-black)";
|
|
125
|
+
}
|
|
126
|
+
function onColorVars(theme, colorScheme) {
|
|
127
|
+
const shade = getPrimaryShade(theme, colorScheme);
|
|
128
|
+
const vars = {};
|
|
129
|
+
for (const [name, tuple] of Object.entries(theme.colors)) {
|
|
130
|
+
if (!Array.isArray(tuple)) continue;
|
|
131
|
+
const filled = tuple[shade];
|
|
132
|
+
if (typeof filled !== "string") continue;
|
|
133
|
+
vars[`--vx-on-${name}`] = name === theme.primaryColor ? `var(--vx-onAccent, ${ACCENT.onAccent[colorScheme]})` : legibleOn(filled, theme);
|
|
134
|
+
}
|
|
135
|
+
return vars;
|
|
136
|
+
}
|
|
137
|
+
const basaltVariantColorResolver = (input) => {
|
|
138
|
+
const resolved = defaultVariantColorsResolver(input);
|
|
139
|
+
const colorName = input.color ?? input.theme.primaryColor;
|
|
140
|
+
const on = onColor(input.theme, colorName);
|
|
141
|
+
if (on === void 0) return resolved;
|
|
142
|
+
if (input.variant === "filled") {
|
|
143
|
+
const autoContrast = input.autoContrast ?? input.theme.autoContrast;
|
|
144
|
+
return autoContrast ? { ...resolved, color: on } : resolved;
|
|
145
|
+
}
|
|
146
|
+
if (input.variant !== "light") return resolved;
|
|
147
|
+
const ink = `var(--mantine-color-${colorName}-light-color)`;
|
|
148
|
+
return {
|
|
149
|
+
...resolved,
|
|
150
|
+
background: `color-mix(in srgb, ${ink} 13%, transparent)`,
|
|
151
|
+
hover: `color-mix(in srgb, ${ink} 20%, transparent)`,
|
|
152
|
+
color: ink,
|
|
153
|
+
border: "none"
|
|
154
|
+
};
|
|
155
|
+
};
|
|
156
|
+
const baseTheme = createTheme({
|
|
157
|
+
primaryColor: "blue",
|
|
158
|
+
// ONE shade in both schemes — a filled control is a SURFACE, and the accent surface is the same
|
|
159
|
+
// hex either way (see `ACCENT.accentFill`). The scheme-inverting half of the accent lives in
|
|
160
|
+
// Mantine's dark `--mantine-color-{c}-text`, which is hardcoded to shade 4 = `ACCENT.accent.dark`.
|
|
161
|
+
primaryShade: 6,
|
|
162
|
+
autoContrast: true,
|
|
163
|
+
luminanceThreshold: 0.45,
|
|
164
|
+
// Force the `light` variant to a faint, AA-legible tint in both schemes (see resolver above).
|
|
165
|
+
variantColorResolver: basaltVariantColorResolver,
|
|
166
|
+
white: "#ffffff",
|
|
167
|
+
black: "#18181b",
|
|
168
|
+
// The three-font system (docs/DESIGN-SPEC.md §3): Nunito Sans body / Hubot Sans condensed
|
|
169
|
+
// headings / JetBrains Mono for numerals + micro-labels. The `--basalt-font-*` vars stay the
|
|
170
|
+
// override seam (shipped in styles.css, with system-font fallback chains).
|
|
171
|
+
fontFamily: "var(--basalt-font-sans, ui-sans-serif, system-ui, sans-serif)",
|
|
172
|
+
fontFamilyMonospace: "var(--basalt-font-mono, ui-monospace, 'SF Mono', Menlo, monospace)",
|
|
173
|
+
headings: {
|
|
174
|
+
fontFamily: "var(--basalt-font-head, var(--basalt-font-sans, ui-sans-serif, sans-serif))",
|
|
175
|
+
fontWeight: "550"
|
|
176
|
+
},
|
|
177
|
+
// Control radius tier (docs/DESIGN-SPEC.md §4: inputs, search, buttons, segmented track, icon
|
|
178
|
+
// buttons ≥28px sit at ~6px). `radius.md` = 0.375rem = 6px, mirrored by `--vx-radius-ctrl` — every
|
|
179
|
+
// control without its own explicit `radius` prop (Button, ActionIcon, TextInput, NumberInput,
|
|
180
|
+
// PasswordInput, Select, Textarea) falls back to this default. Card/Paper bypass this scale
|
|
181
|
+
// entirely — they resolve straight to `var(--vx-radius-card)` (7px, see the
|
|
182
|
+
// `components.Card`/`Paper` overrides below).
|
|
183
|
+
defaultRadius: "md",
|
|
184
|
+
// Named weight ladder (v9 fontWeights).
|
|
185
|
+
fontWeights: { regular: "400", medium: "500", semibold: "600", bold: "700" },
|
|
186
|
+
// The OWNED type scale — Mantine's xs…xl re-expressed from the single `VX.text` ladder
|
|
187
|
+
// (`tokens/index.ts`), so `<Text size="sm">` and a `--vx-text-sm` CSS module read the same step.
|
|
188
|
+
// Passed through Mantine's `rem()` (→ `calc(Xrem * var(--mantine-scale))`) rather than raw px, so
|
|
189
|
+
// the component surface honors the user's browser font-size and Mantine's own scale factor —
|
|
190
|
+
// the px numbers in `VX.text` exist only for inline styles and visx SVG, which can't take `var()`.
|
|
191
|
+
// `md` is the body step. Mantine's default ladder (12/14/16/18/20) is now fully replaced.
|
|
192
|
+
fontSizes: {
|
|
193
|
+
xs: rem(VX.text.xs),
|
|
194
|
+
sm: rem(VX.text.sm),
|
|
195
|
+
md: rem(VX.text.md),
|
|
196
|
+
lg: rem(VX.text.lg),
|
|
197
|
+
xl: rem(VX.text.xl)
|
|
198
|
+
},
|
|
199
|
+
// Deliberate, OWNED spacing + radius scales — the single edit point, not inherited Mantine
|
|
200
|
+
// defaults. Denser than Mantine's stock lg/xl for a tighter, data-driven surface. 10 12 16 18 24.
|
|
201
|
+
spacing: { xs: "0.625rem", sm: "0.75rem", md: "1rem", lg: "1.125rem", xl: "1.5rem" },
|
|
202
|
+
// 2 4 6 16 32 — the size scale; `md` (6px) is the control-radius default (`defaultRadius: 'md'`,
|
|
203
|
+
// inputs/buttons). Card/Paper/Popover/Modal/Notification read `--vx-radius-*` directly instead
|
|
204
|
+
// (7px cards / 6px controls), so the larger steps of this scale no longer mirror either token.
|
|
205
|
+
radius: { xs: "0.125rem", sm: "0.25rem", md: "0.375rem", lg: "1rem", xl: "2rem" },
|
|
206
|
+
// Shade 6 (= `primaryShade`) is pinned to the FILL BAND for every family, so the JS ramp and the
|
|
207
|
+
// `--vx-fill-*` tokens hold the SAME hex. That keeps `-filled` / `-text`(light) / `-outline`
|
|
208
|
+
// internally consistent, and lets the on-color be measured straight off the tuple (below).
|
|
209
|
+
colors: {
|
|
210
|
+
dark: basaltDark,
|
|
211
|
+
gray: pinShades(ramp10(BP.gray), { 6: FILL.gray }),
|
|
212
|
+
blue: pinShades(ramp10(BP.blue), { 4: ACCENT.accent.dark, 6: ACCENT.accentFill.light }),
|
|
213
|
+
cyan: pinShades(ramp10(BP.cerulean), { 6: FILL.cyan }),
|
|
214
|
+
teal: pinShades(ramp10(BP.turquoise), { 6: FILL.teal }),
|
|
215
|
+
green: pinShades(ramp10(BP.forest), { 6: FILL.green }),
|
|
216
|
+
lime: pinShades(ramp10(BP.lime), { 6: FILL.lime }),
|
|
217
|
+
yellow: pinShades(ramp10(BP.gold), { 6: FILL.yellow }),
|
|
218
|
+
orange: pinShades(ramp10(BP.orange), { 6: FILL.orange }),
|
|
219
|
+
red: pinShades(ramp10(BP.red), { 6: FILL.red }),
|
|
220
|
+
pink: pinShades(ramp10(BP.rose), { 6: FILL.pink }),
|
|
221
|
+
grape: pinShades(ramp10(BP.violet), { 6: FILL.grape }),
|
|
222
|
+
violet: pinShades(ramp10(BP.violet), { 6: FILL.violet }),
|
|
223
|
+
indigo: pinShades(ramp10(BP.indigo), { 6: FILL.indigo })
|
|
224
|
+
},
|
|
225
|
+
components: {
|
|
226
|
+
// Depth = `shadow-card` (a whisper shadow + a 1px ring baked into the SAME value) — never a
|
|
227
|
+
// separate `border` property (docs/DESIGN-SPEC.md doctrine inversion #1). Cards carry no
|
|
228
|
+
// `withBorder` at all; the ring lives inside `--vx-shadow-card`.
|
|
229
|
+
// ONE card identity, enforced at the theme so NO component can diverge. Every card-like
|
|
230
|
+
// surface — Mantine `Card`, a bare `Paper` used as a card, and the Mantine-free `ChartCard` —
|
|
231
|
+
// resolves to the SAME three tokens:
|
|
232
|
+
// • background → `--vx-surface-panel` (the panel surface, NOT the page body).
|
|
233
|
+
// • depth → `--vx-shadow-card` (whisper shadow + ring, replaces `withBorder`).
|
|
234
|
+
// • radius → `--vx-radius-card` (10px).
|
|
235
|
+
// This is the single source the user's "strict surface across components" demands; the
|
|
236
|
+
// `raw-surface` guard then stops consumers re-overriding any of it inline.
|
|
237
|
+
Card: Card.extend({
|
|
238
|
+
styles: {
|
|
239
|
+
root: {
|
|
240
|
+
backgroundColor: "var(--vx-surface-panel)",
|
|
241
|
+
boxShadow: "var(--vx-shadow-card)",
|
|
242
|
+
borderRadius: "var(--vx-radius-card)"
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
}),
|
|
246
|
+
Paper: Paper.extend({
|
|
247
|
+
styles: {
|
|
248
|
+
root: {
|
|
249
|
+
backgroundColor: "var(--vx-surface-panel)",
|
|
250
|
+
boxShadow: "var(--vx-shadow-card)",
|
|
251
|
+
borderRadius: "var(--vx-radius-card)"
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
}),
|
|
255
|
+
// Mantine's default Badge radius is a full 1000px pill; the spec's delta/status badges sit at
|
|
256
|
+
// radius 6 (docs/DESIGN-SPEC.md §4/§5). Count badges (radius 5) are a distinct, smaller-radius
|
|
257
|
+
// usage left to the call site (`radius={5}` prop) since Badge has no state to key off here.
|
|
258
|
+
Badge: Badge.extend({ defaultProps: { radius: 6 } }),
|
|
259
|
+
// Alert renders its title in the body font by default; bring it onto the head-font idiom
|
|
260
|
+
// (docs/DESIGN-SPEC.md §5) like every other titled surface. Radius/padding/color tint are
|
|
261
|
+
// already on-system (defaultRadius 'md' control tier + the variant color resolver), so only
|
|
262
|
+
// the title font is overridden.
|
|
263
|
+
Alert: Alert.extend({
|
|
264
|
+
styles: {
|
|
265
|
+
title: {
|
|
266
|
+
fontFamily: "var(--basalt-font-head)",
|
|
267
|
+
fontWeight: 550,
|
|
268
|
+
fontStretch: "88%"
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
}),
|
|
272
|
+
// "Ink earns its color" — a nav selection is UI state, not the identity accent on the LABEL.
|
|
273
|
+
// The active item is panel bg + `shadow-card` (forced here at the THEME level via NavLink's
|
|
274
|
+
// `--nl-*` vars, so it holds for every render path — including a consumer's router `<Link>`
|
|
275
|
+
// via `renderNavLink`, which never sees the shell CSS module); the active ICON is
|
|
276
|
+
// accent-colored via `nav-link.module.css` (targets the `[data-position='left']` leftSection,
|
|
277
|
+
// which the flat `vars`/`styles` API can't express conditionally on `[data-active]`).
|
|
278
|
+
NavLink: NavLink.extend({
|
|
279
|
+
vars: () => ({
|
|
280
|
+
root: {
|
|
281
|
+
"--nl-bg": "var(--vx-surface-panel)",
|
|
282
|
+
"--nl-color": "var(--vx-ink)",
|
|
283
|
+
"--nl-hover": "color-mix(in srgb, var(--vx-ink) 6%, transparent)"
|
|
284
|
+
},
|
|
285
|
+
children: {}
|
|
286
|
+
}),
|
|
287
|
+
// Dense, rounded nav rows — applied at the THEME level so they survive EVERY render path,
|
|
288
|
+
// including a consumer's router `<Link>` via `renderNavLink`, which never sees the shell CSS
|
|
289
|
+
// module (the module's `.link` only reaches the shell's own fallback `<NavLink>`). Same
|
|
290
|
+
// reasoning as the `--nl-*` fill above: layout is single-sourced here, not in two places.
|
|
291
|
+
// The active-weight/shadow/icon-accent state selectors can't live in `styles` (flat inline
|
|
292
|
+
// props only) — they're in nav-link.module.css, wired via `classNames` so they reach the
|
|
293
|
+
// same every-render-path scope.
|
|
294
|
+
classNames: { root: navLinkClasses.root },
|
|
295
|
+
styles: {
|
|
296
|
+
root: {
|
|
297
|
+
// Row geometry (docs/DESIGN-SPEC.md §5): 6px 10px padding lands ~29-30px rows. Mantine
|
|
298
|
+
// v9 hardcodes NavLink padding (`8px var(--mantine-spacing-sm)` — there is NO
|
|
299
|
+
// `--nl-padding` var), so the spec padding is forced inline here, where it wins
|
|
300
|
+
// deterministically on every render path.
|
|
301
|
+
padding: "6px 10px",
|
|
302
|
+
// The body step on the ROOT, not just the label: the body element sizes itself from the
|
|
303
|
+
// root's inherited line-height (which, left at the default 1.55, alone pushed rows to
|
|
304
|
+
// ~37px). The tightened 1.35 keeps rows compact as the scale grows.
|
|
305
|
+
fontSize: VX.text.md,
|
|
306
|
+
lineHeight: "1.35",
|
|
307
|
+
// Nav rows sit in the 5-6px radius tier (docs/DESIGN-SPEC.md §4), not square.
|
|
308
|
+
borderRadius: 6
|
|
309
|
+
},
|
|
310
|
+
// Mantine pins the label at `font-size-sm` explicitly, so the root value alone
|
|
311
|
+
// doesn't reach it.
|
|
312
|
+
label: { fontSize: VX.text.md, lineHeight: "1.35" }
|
|
313
|
+
}
|
|
314
|
+
}),
|
|
315
|
+
// Field idiom (docs/DESIGN-SPEC.md §5): field surface + `shadow-card` depth + faint placeholder,
|
|
316
|
+
// accent border + subtle accent ring on focus — see controls.module.css. The two slots carry
|
|
317
|
+
// different halves of it: the `wrapper` is where Mantine declares the `--input-*` vars, the
|
|
318
|
+
// `input` is the box that actually paints the surface (bg + radius) and therefore the only
|
|
319
|
+
// legal home for the shadow's ring. Theming the base `Input` covers
|
|
320
|
+
// TextInput/NumberInput/PasswordInput/Select/Textarea, which all render it internally (only
|
|
321
|
+
// `size` needs per-component defaults, since each resolves its own).
|
|
322
|
+
Input: Input.extend({
|
|
323
|
+
defaultProps: { size: "md" },
|
|
324
|
+
classNames: { wrapper: controlsClasses.inputWrapper, input: controlsClasses.input }
|
|
325
|
+
}),
|
|
326
|
+
TextInput: TextInput.extend({ defaultProps: { size: "md" } }),
|
|
327
|
+
NumberInput: NumberInput.extend({ defaultProps: { size: "md" } }),
|
|
328
|
+
PasswordInput: PasswordInput.extend({ defaultProps: { size: "md" } }),
|
|
329
|
+
Select: Select.extend({ defaultProps: { size: "md" } }),
|
|
330
|
+
Textarea: Textarea.extend({ defaultProps: { size: "md" } }),
|
|
331
|
+
// PillsInput (MultiSelect/TagsInput's outer field) renders `InputBase` internally but under
|
|
332
|
+
// its OWN `__staticSelector: 'PillsInput'`, so it never reads `theme.components.Input` — the
|
|
333
|
+
// field idiom above never reached it. `PillsInput.classes === InputBase.classes`, so the SAME
|
|
334
|
+
// part names apply here; reusing both control classes picks up the exact `[data-variant]` rules
|
|
335
|
+
// in controls.module.css for free, no new CSS needed. Both slots are required — `wrapper` alone
|
|
336
|
+
// would land the vars but leave the field flat, since the depth lives on `input`.
|
|
337
|
+
PillsInput: PillsInput.extend({
|
|
338
|
+
classNames: { wrapper: controlsClasses.inputWrapper, input: controlsClasses.input }
|
|
339
|
+
}),
|
|
340
|
+
// Button / ActionIcon (`default` variant): same `shadow-card` depth as every other control
|
|
341
|
+
// surface (docs/DESIGN-SPEC.md §5: "search trigger … panel + shadow-card", "icon button …
|
|
342
|
+
// panel + shadow-card"; doctrine inversion #1). Background already resolves through the shared
|
|
343
|
+
// `--mantine-color-default` var (→ `--vx-surface-panel`, see cssVariablesResolver below) and
|
|
344
|
+
// the border through `--mantine-color-default-border` (→ transparent, same resolver) — neither
|
|
345
|
+
// component had a `.extend()` block at all before this, which is why they never picked up
|
|
346
|
+
// either. Only the shadow needs adding here, in controls.module.css: Mantine's own
|
|
347
|
+
// `[data-variant='default']` rule never declares a `box-shadow`, so no specificity fight is
|
|
348
|
+
// needed to win one. `filled`/`subtle`/`light` variants are untouched — scoped by attribute
|
|
349
|
+
// selector in the CSS, not here.
|
|
350
|
+
Button: Button.extend({ classNames: { root: controlsClasses.buttonRoot } }),
|
|
351
|
+
ActionIcon: ActionIcon.extend({ classNames: { root: controlsClasses.actionIconRoot } }),
|
|
352
|
+
// CheckboxCard / RadioCard (`withBorder`, true by default): same live regression as Button/
|
|
353
|
+
// ActionIcon before this pass — Mantine ships `border: 1px solid transparent` as the BASE
|
|
354
|
+
// `[data-with-border]` declaration, but its own `:where([data-mantine-color-scheme=…])` block
|
|
355
|
+
// re-colors that to gray-3/dark-4 (pinned to `--vx-surface-border` by the strict-surface lever
|
|
356
|
+
// below), landing a real, flat hairline with no shadow at all — the exact "flat and edgeless"
|
|
357
|
+
// symptom, just via a different mechanism (`[data-with-border]`, not the `default`-variant
|
|
358
|
+
// border var). `.checkboxCardRoot[data-with-border]` / `.radioCardRoot[data-with-border]` are
|
|
359
|
+
// real attribute selectors ((0,2,0)) — Mantine's own rule wraps the same attribute in `:where()`
|
|
360
|
+
// (0 specificity, landing at (0,1,0) total), so no `html[…]` prefix fight is needed here either.
|
|
361
|
+
// Neither component sets a background of its own, so panel bg is added alongside the shadow —
|
|
362
|
+
// the same panel-bg + shadow-card + no-border triad as Card/Paper.
|
|
363
|
+
CheckboxCard: CheckboxCard.extend({
|
|
364
|
+
classNames: { card: controlsClasses.checkboxCardRoot }
|
|
365
|
+
}),
|
|
366
|
+
RadioCard: RadioCard.extend({
|
|
367
|
+
classNames: { card: controlsClasses.radioCardRoot }
|
|
368
|
+
}),
|
|
369
|
+
// Chip: unlike Button/Input, Chip has no literal `variant="default"` — its OWN default (no
|
|
370
|
+
// `variant` prop passed) resolves internally to `variant: 'filled'` (Chip's neutral/unselected
|
|
371
|
+
// look, NOT a "loud" filled color — `light`/`outline` are the other two Chip variants). The
|
|
372
|
+
// unchecked `filled`-variant label already ships a transparent border (`gray-1`/`dark-5` tint,
|
|
373
|
+
// no shadow) — borderless but flat, the same symptom as CheckboxCard/RadioCard above. The class
|
|
374
|
+
// is wired conditionally (function-form `classNames`, same pattern as the `vars` on-color
|
|
375
|
+
// re-points below) so it NEVER reaches a consumer-chosen `light`/`outline` Chip.
|
|
376
|
+
Chip: Chip.extend({
|
|
377
|
+
classNames: (_theme, props) => (props.variant ?? "filled") === "filled" ? { label: controlsClasses.chipLabel } : {}
|
|
378
|
+
}),
|
|
379
|
+
// Track = ink-6% tint, radius 7, 2px padding; active segment = panel bg + `shadow-ctrl`,
|
|
380
|
+
// radius 5. `--sc-radius`/`--sc-color` don't reach the root track background (Mantine
|
|
381
|
+
// hardcodes that to a raw gray step), so it's forced via `styles.root` same as Card/Paper.
|
|
382
|
+
// The active-only ink label color + weight can't live in the flat `styles.label` object
|
|
383
|
+
// (applies to every option regardless of state), so it's in segmented-control.module.css
|
|
384
|
+
// instead — same pattern as NavLink's active-icon accent.
|
|
385
|
+
SegmentedControl: SegmentedControl.extend({
|
|
386
|
+
defaultProps: { radius: 7 },
|
|
387
|
+
classNames: { label: segmentedControlClasses.label },
|
|
388
|
+
styles: {
|
|
389
|
+
root: {
|
|
390
|
+
backgroundColor: "color-mix(in srgb, var(--vx-ink) 6%, transparent)",
|
|
391
|
+
padding: 2
|
|
392
|
+
},
|
|
393
|
+
indicator: {
|
|
394
|
+
backgroundColor: "var(--vx-surface-panel)",
|
|
395
|
+
boxShadow: "var(--vx-shadow-ctrl)",
|
|
396
|
+
borderRadius: 5
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
}),
|
|
400
|
+
// Track = ink-8%; leader/section fill colors are a per-usage `color` prop (left to consumers).
|
|
401
|
+
Progress: Progress.extend({
|
|
402
|
+
defaultProps: { size: 6, radius: 4 },
|
|
403
|
+
styles: {
|
|
404
|
+
root: { backgroundColor: "color-mix(in srgb, var(--vx-ink) 8%, transparent)" }
|
|
405
|
+
}
|
|
406
|
+
}),
|
|
407
|
+
// Activity-feed idiom: 20-24px bullet, hairline connecting line (not Mantine's heavy default),
|
|
408
|
+
// head-weight title, muted body — zero call-site work for an on-spec Timeline. `bulletSize`/
|
|
409
|
+
// `lineWidth` land through Timeline's OWN `varsResolver` (real component vars, not our `styles`
|
|
410
|
+
// object), so they aren't subject to the custom-property stripping below. The bullet's
|
|
411
|
+
// panel/hairline/accent-active treatment and the line's divider color ARE custom-property
|
|
412
|
+
// declarations / state-selectors — both unreachable from a flat `styles` object (same
|
|
413
|
+
// reasoning as SegmentedControl's active-label rule and NavLink's active-icon rule) — so they
|
|
414
|
+
// live in `timeline.module.css` instead. `TimelineItem` renders through the PARENT Timeline's
|
|
415
|
+
// style context (`ctx.getStyles`), so `item`/`itemBullet`/`itemTitle`/`itemContent` are all
|
|
416
|
+
// themed from this ONE extend — no separate `TimelineItem` override needed.
|
|
417
|
+
Timeline: Timeline.extend({
|
|
418
|
+
defaultProps: { bulletSize: 22, lineWidth: 1 },
|
|
419
|
+
// The active bullet's icon sits on the accent fill — on-color, not a baked white (see above).
|
|
420
|
+
vars: (theme, props) => ({ root: { "--tl-icon-color": onColorFor(theme, props) } }),
|
|
421
|
+
classNames: {
|
|
422
|
+
item: timelineClasses.item,
|
|
423
|
+
itemBullet: timelineClasses.itemBullet
|
|
424
|
+
},
|
|
425
|
+
styles: {
|
|
426
|
+
itemTitle: {
|
|
427
|
+
fontSize: VX.text.md,
|
|
428
|
+
fontWeight: 600,
|
|
429
|
+
color: "var(--vx-ink)"
|
|
430
|
+
},
|
|
431
|
+
itemContent: {
|
|
432
|
+
fontSize: VX.text.md,
|
|
433
|
+
color: "var(--vx-muted)"
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
}),
|
|
437
|
+
// ── Floating layer (docs/DESIGN-SPEC.md §5) ─────────────────────────────────────────────
|
|
438
|
+
// ONE idiom for every detached surface: overlay surface + a REAL 1px `--vx-surface-border`
|
|
439
|
+
// border + the overlay elevation shadow. The border must be a real `border` property (never
|
|
440
|
+
// "ring in the shadow" like cards): Mantine's arrow is a rotated square that draws
|
|
441
|
+
// `1px solid var(--popover-border-color)` and inherits the dropdown's background — with
|
|
442
|
+
// `border: 'none'` on the dropdown the arrow rendered as a broken floating diamond edge.
|
|
443
|
+
// (`--popover-border-color` resolves to gray-2/dark-4, both pinned to `--vx-surface-border`
|
|
444
|
+
// by the resolver below, so dropdown and arrow always share the same edge color.)
|
|
445
|
+
// Tooltip is a standalone floating primitive (not Popover-based) — themed directly. Its arrow
|
|
446
|
+
// ships border-less (`border: 0`), so the same edge is applied inline to keep the ring closed.
|
|
447
|
+
Tooltip: Tooltip.extend({
|
|
448
|
+
defaultProps: { radius: 8 },
|
|
449
|
+
styles: {
|
|
450
|
+
tooltip: {
|
|
451
|
+
backgroundColor: "var(--vx-surface-overlay)",
|
|
452
|
+
color: "var(--vx-ink)",
|
|
453
|
+
border: "1px solid var(--vx-surface-border)",
|
|
454
|
+
boxShadow: "var(--vx-shadow-overlay)"
|
|
455
|
+
},
|
|
456
|
+
arrow: { border: "1px solid var(--vx-surface-border)" }
|
|
457
|
+
}
|
|
458
|
+
}),
|
|
459
|
+
// Popover is the shared floating primitive underneath Menu (Menu renders `<Popover>`
|
|
460
|
+
// internally with no `radius`/`shadow` of its own), so theming it here covers both.
|
|
461
|
+
Popover: Popover.extend({
|
|
462
|
+
defaultProps: { radius: 8 },
|
|
463
|
+
styles: {
|
|
464
|
+
dropdown: {
|
|
465
|
+
backgroundColor: "var(--vx-surface-overlay)",
|
|
466
|
+
border: "1px solid var(--vx-surface-border)",
|
|
467
|
+
boxShadow: "var(--vx-shadow-overlay)"
|
|
468
|
+
}
|
|
469
|
+
}
|
|
470
|
+
}),
|
|
471
|
+
// Menu rows: 13px, radius 6, ghost ink-6% hover (floating.module.css — custom properties are
|
|
472
|
+
// stripped from `styles` objects, and Menu's internal Popover does NOT consume
|
|
473
|
+
// `components.Popover.styles`, so the dropdown surface is repeated here). Menu.Label = the
|
|
474
|
+
// mono micro-label idiom; dividers use the layout-divider token.
|
|
475
|
+
Menu: Menu.extend({
|
|
476
|
+
classNames: { item: floatingClasses.menuItem },
|
|
477
|
+
styles: {
|
|
478
|
+
dropdown: {
|
|
479
|
+
backgroundColor: "var(--vx-surface-overlay)",
|
|
480
|
+
border: "1px solid var(--vx-surface-border)",
|
|
481
|
+
boxShadow: "var(--vx-shadow-overlay)"
|
|
482
|
+
},
|
|
483
|
+
item: { fontSize: VX.text.md, borderRadius: 6, padding: "6px 10px" },
|
|
484
|
+
label: {
|
|
485
|
+
fontFamily: "var(--basalt-font-mono)",
|
|
486
|
+
fontSize: VX.text.micro,
|
|
487
|
+
fontWeight: 500,
|
|
488
|
+
letterSpacing: "0.06em",
|
|
489
|
+
textTransform: "uppercase",
|
|
490
|
+
color: "var(--vx-faint)"
|
|
491
|
+
},
|
|
492
|
+
divider: { borderColor: "var(--vx-divider)" }
|
|
493
|
+
}
|
|
494
|
+
}),
|
|
495
|
+
// Combobox is the floating primitive underneath Select/Autocomplete/MultiSelect — like Menu,
|
|
496
|
+
// it doesn't consume `components.Popover.styles`, so the overlay dropdown idiom is repeated.
|
|
497
|
+
Combobox: Combobox.extend({
|
|
498
|
+
styles: {
|
|
499
|
+
dropdown: {
|
|
500
|
+
backgroundColor: "var(--vx-surface-overlay)",
|
|
501
|
+
border: "1px solid var(--vx-surface-border)",
|
|
502
|
+
boxShadow: "var(--vx-shadow-overlay)"
|
|
503
|
+
}
|
|
504
|
+
}
|
|
505
|
+
}),
|
|
506
|
+
// Modal/Drawer: overlay surface + overlay shadow on the content. The header goes transparent —
|
|
507
|
+
// Mantine paints it `--mantine-color-body`, which read as a grey band over the overlay
|
|
508
|
+
// surface. Title = head font; close button = the ghost idiom (floating.module.css).
|
|
509
|
+
Modal: Modal.extend({
|
|
510
|
+
defaultProps: { radius: 8 },
|
|
511
|
+
classNames: { close: floatingClasses.closeButton },
|
|
512
|
+
styles: {
|
|
513
|
+
content: {
|
|
514
|
+
backgroundColor: "var(--vx-surface-overlay)",
|
|
515
|
+
boxShadow: "var(--vx-shadow-overlay)"
|
|
516
|
+
},
|
|
517
|
+
header: { backgroundColor: "transparent" },
|
|
518
|
+
title: {
|
|
519
|
+
fontFamily: "var(--basalt-font-head)",
|
|
520
|
+
fontWeight: 550,
|
|
521
|
+
fontStretch: "88%"
|
|
522
|
+
}
|
|
523
|
+
}
|
|
524
|
+
}),
|
|
525
|
+
Drawer: Drawer.extend({
|
|
526
|
+
classNames: { close: floatingClasses.closeButton },
|
|
527
|
+
styles: {
|
|
528
|
+
content: {
|
|
529
|
+
backgroundColor: "var(--vx-surface-overlay)",
|
|
530
|
+
boxShadow: "var(--vx-shadow-overlay)"
|
|
531
|
+
},
|
|
532
|
+
header: { backgroundColor: "transparent" },
|
|
533
|
+
title: {
|
|
534
|
+
fontFamily: "var(--basalt-font-head)",
|
|
535
|
+
fontWeight: 550,
|
|
536
|
+
fontStretch: "88%"
|
|
537
|
+
}
|
|
538
|
+
}
|
|
539
|
+
}),
|
|
540
|
+
// Kbd/Code share the ink-tint idiom (docs/DESIGN-SPEC.md §2: "segmented-control track /
|
|
541
|
+
// count-badge bg: ink 6–8%") — mono, ink-7% bg, radius 5.
|
|
542
|
+
// Flat mono chip (mock's ⌘K badge) — Mantine's default Kbd draws a 3px "keyboard key" bottom
|
|
543
|
+
// border that reads as a heavy off-system rule, so the border goes entirely.
|
|
544
|
+
Kbd: Kbd.extend({
|
|
545
|
+
styles: {
|
|
546
|
+
root: {
|
|
547
|
+
backgroundColor: "color-mix(in srgb, var(--vx-ink) 7%, transparent)",
|
|
548
|
+
border: "none",
|
|
549
|
+
color: "var(--vx-ink2)",
|
|
550
|
+
borderRadius: 5
|
|
551
|
+
}
|
|
552
|
+
}
|
|
553
|
+
}),
|
|
554
|
+
Code: Code.extend({
|
|
555
|
+
styles: {
|
|
556
|
+
root: {
|
|
557
|
+
backgroundColor: "color-mix(in srgb, var(--vx-ink) 7%, transparent)",
|
|
558
|
+
borderRadius: 5
|
|
559
|
+
}
|
|
560
|
+
}
|
|
561
|
+
}),
|
|
562
|
+
// Header cells become a micro-label (mono, uppercase, faint) — numeral/tabular styling for
|
|
563
|
+
// body cells is a per-table call-site concern, left to consumers. `--table-border-color`
|
|
564
|
+
// drives row separators AND the opt-in `withTableBorder` outer border — both drop to the
|
|
565
|
+
// hairline (Mantine's default reads gray-3/dark-4 = the STRONG line, too heavy in a card).
|
|
566
|
+
Table: Table.extend({
|
|
567
|
+
classNames: { table: controlsClasses.tableRoot },
|
|
568
|
+
styles: {
|
|
569
|
+
th: {
|
|
570
|
+
fontFamily: "var(--basalt-font-mono)",
|
|
571
|
+
fontSize: VX.text.micro,
|
|
572
|
+
fontWeight: 500,
|
|
573
|
+
letterSpacing: "0.06em",
|
|
574
|
+
textTransform: "uppercase",
|
|
575
|
+
color: "var(--vx-faint)"
|
|
576
|
+
}
|
|
577
|
+
}
|
|
578
|
+
}),
|
|
579
|
+
// The v9 thumb indicator is a center dot painted in the TRACK color — over the remapped
|
|
580
|
+
// neutral track it read as an artifact, so it's disabled: clean track, plain thumb, accent
|
|
581
|
+
// fill when checked (`--switch-color` defaults to the primary filled shade = the accent).
|
|
582
|
+
Switch: Switch.extend({ defaultProps: { withThumbIndicator: false } }),
|
|
583
|
+
// The tab-list bottom rule (and the inactive-tab hover underline) is a layout separator, not
|
|
584
|
+
// control chrome — it reads the divider token instead of the heavy gray-3/dark-4 line
|
|
585
|
+
// (controls.module.css; custom properties are stripped from `styles` objects). The active tab
|
|
586
|
+
// underline keeps `--tabs-color` (accent) untouched.
|
|
587
|
+
Tabs: Tabs.extend({
|
|
588
|
+
classNames: { root: controlsClasses.tabsRoot },
|
|
589
|
+
// The on-color re-point (see below). Cast: Mantine's `TabsCssVariables` type declares only
|
|
590
|
+
// `--tabs-color` / `--tabs-radius`, yet Tabs' OWN varsResolver writes `--tabs-text-color` —
|
|
591
|
+
// an upstream type gap, so the var it actually paints the active tab with is otherwise
|
|
592
|
+
// unreachable from the theme.
|
|
593
|
+
vars: (theme, props) => ({ root: { "--tabs-text-color": onColorFor(theme, props) } })
|
|
594
|
+
}),
|
|
595
|
+
// ── ON-COLOR re-points (see the ON-COLOR doctrine above) ────────────────────────────────
|
|
596
|
+
// These components never reach `variantColorResolver` — each calls Mantine's `getContrastColor`
|
|
597
|
+
// straight from its own `varsResolver`, so each bakes the same scheme-blind white into its ONE
|
|
598
|
+
// foreground var. Theme `vars` merge AFTER a component's own `varsResolver` (Mantine
|
|
599
|
+
// `useStyles`), so re-pointing that var here wins on every render path. Without this, a dark-mode
|
|
600
|
+
// Checkbox/Radio paints a white checkmark on the light accent fill — invisible.
|
|
601
|
+
Checkbox: Checkbox.extend({
|
|
602
|
+
vars: (theme, props) => ({
|
|
603
|
+
root: {
|
|
604
|
+
// `iconColor` is an explicit call-site override, and `outline` paints the mark in the
|
|
605
|
+
// color itself on a transparent box — neither is an on-color surface.
|
|
606
|
+
"--checkbox-icon-color": props.iconColor || props.variant === "outline" ? void 0 : onColorFor(theme, props)
|
|
607
|
+
}
|
|
608
|
+
})
|
|
609
|
+
}),
|
|
610
|
+
Radio: Radio.extend({
|
|
611
|
+
vars: (theme, props) => ({
|
|
612
|
+
root: {
|
|
613
|
+
"--radio-icon-color": props.iconColor || props.variant === "outline" ? void 0 : onColorFor(theme, props)
|
|
614
|
+
}
|
|
615
|
+
})
|
|
616
|
+
}),
|
|
617
|
+
Pagination: Pagination.extend({
|
|
618
|
+
vars: (theme, props) => ({
|
|
619
|
+
root: { "--pagination-active-color": onColorFor(theme, props) }
|
|
620
|
+
})
|
|
621
|
+
}),
|
|
622
|
+
Stepper: Stepper.extend({
|
|
623
|
+
vars: (theme, props) => ({ root: { "--stepper-icon-color": onColorFor(theme, props) } })
|
|
624
|
+
}),
|
|
625
|
+
Indicator: Indicator.extend({
|
|
626
|
+
vars: (theme, props) => ({ root: { "--indicator-text-color": onColorFor(theme, props) } })
|
|
627
|
+
}),
|
|
628
|
+
// Accordion (default variant): hairline separators between items only — the color retune AND
|
|
629
|
+
// the last item's outer border-bottom drop both live in controls.module.css.
|
|
630
|
+
Accordion: Accordion.extend({ classNames: { item: controlsClasses.accordionItem } }),
|
|
631
|
+
// Parents faint, separator line-colored — the current-page treatment (head font, weight) is a
|
|
632
|
+
// shell-level concern (AppBreadcrumbs), not this generic Mantine primitive.
|
|
633
|
+
Breadcrumbs: Breadcrumbs.extend({
|
|
634
|
+
styles: {
|
|
635
|
+
breadcrumb: { color: "var(--vx-faint)" },
|
|
636
|
+
separator: { color: "var(--vx-surface-border)" }
|
|
637
|
+
}
|
|
638
|
+
}),
|
|
639
|
+
// Card idiom — same panel + shadow-card as every other surface.
|
|
640
|
+
Notification: Notification.extend({
|
|
641
|
+
defaultProps: { radius: 8 },
|
|
642
|
+
styles: {
|
|
643
|
+
root: {
|
|
644
|
+
backgroundColor: "var(--vx-surface-panel)",
|
|
645
|
+
boxShadow: "var(--vx-shadow-card)"
|
|
646
|
+
}
|
|
647
|
+
}
|
|
648
|
+
})
|
|
649
|
+
}
|
|
650
|
+
});
|
|
651
|
+
function accentBridge(theme, side) {
|
|
652
|
+
const c = theme.primaryColor;
|
|
653
|
+
return {
|
|
654
|
+
[`--mantine-color-${c}-filled`]: `var(--vx-accentFill, ${ACCENT.accentFill[side]})`,
|
|
655
|
+
[`--mantine-color-${c}-filled-hover`]: `var(--vx-accentFillHover, ${ACCENT.accentFillHover[side]})`,
|
|
656
|
+
[`--mantine-color-${c}-text`]: `var(--vx-accent, ${ACCENT.accent[side]})`,
|
|
657
|
+
[`--mantine-color-${c}-outline`]: `var(--vx-accent, ${ACCENT.accent[side]})`,
|
|
658
|
+
[`--mantine-color-${c}-light-color`]: `var(--vx-accent, ${ACCENT.accent[side]})`
|
|
659
|
+
};
|
|
660
|
+
}
|
|
661
|
+
function familyBridge() {
|
|
662
|
+
const vars = {};
|
|
663
|
+
for (const [name, hex] of Object.entries(FILL)) {
|
|
664
|
+
vars[`--mantine-color-${name}-filled`] = `var(--vx-fill-${name}, ${hex})`;
|
|
665
|
+
vars[`--mantine-color-${name}-filled-hover`] = `var(--vx-fillHover-${name}, color-mix(in srgb, ${hex} 88%, #000))`;
|
|
666
|
+
}
|
|
667
|
+
return vars;
|
|
668
|
+
}
|
|
669
|
+
const cssVariablesResolver = (theme) => ({
|
|
670
|
+
variables: {},
|
|
671
|
+
light: {
|
|
672
|
+
...onColorVars(theme, "light"),
|
|
673
|
+
...familyBridge(),
|
|
674
|
+
...accentBridge(theme, "light"),
|
|
675
|
+
"--mantine-color-body": `var(--vx-surface-bg, ${SURFACE.bg.light})`,
|
|
676
|
+
// page background
|
|
677
|
+
"--mantine-color-default": `var(--vx-surface-panel, ${SURFACE.panel.light})`,
|
|
678
|
+
// cards / default controls
|
|
679
|
+
"--mantine-color-default-hover": `var(--vx-surface-elevated, ${SURFACE.elevated.light})`,
|
|
680
|
+
// THE central lever for doctrine inversion #1 on CONTROLS (docs/DESIGN-SPEC.md §8): depth is
|
|
681
|
+
// `shadow-card`, never a hairline, for every `variant="default"` control — not just Card/Paper.
|
|
682
|
+
// `defaultVariantColorsResolver`'s `variant === 'default'` branch reads this ONE var for every
|
|
683
|
+
// component that uses it (Button, ActionIcon, Chip, CheckboxCard, RadioCard, …), so pointing it
|
|
684
|
+
// at `transparent` kills the stock 1px hairline everywhere at once. `transparent`, not `border:
|
|
685
|
+
// none` — the 1px border BOX stays, so focus/error can recolor the same box with no layout
|
|
686
|
+
// shift and `[data-error]` still wins a visible border.
|
|
687
|
+
"--mantine-color-default-border": "transparent",
|
|
688
|
+
"--mantine-color-dimmed": `var(--vx-neutral, ${NEUTRAL.neutral.light})`,
|
|
689
|
+
// secondary / muted text
|
|
690
|
+
"--mantine-color-text": `var(--vx-ink, ${INK.ink.light})`,
|
|
691
|
+
// primary body/heading text
|
|
692
|
+
"--app-shell-border-color": `var(--vx-surface-border, ${SURFACE.border.light})`,
|
|
693
|
+
// THE strict-surface lever. Mantine components do NOT chain border/surface colors through
|
|
694
|
+
// `--mantine-color-default-*`; each hardcodes a RAW ramp step (`--mantine-color-gray-{2,3,4}`
|
|
695
|
+
// on light) directly — which is why AppShell/Table/Input/Divider/Tabs/Popover/Accordion borders
|
|
696
|
+
// render an off-system color while cards use the hairline. Collapse the border-class ramp
|
|
697
|
+
// steps onto the ONE "line" token so EVERY component's border is identical and the agent
|
|
698
|
+
// cannot reintroduce a divergent border. (Hover/subtle BG steps are handled below.)
|
|
699
|
+
"--mantine-color-gray-2": `var(--vx-surface-border, ${SURFACE.border.light})`,
|
|
700
|
+
"--mantine-color-gray-3": `var(--vx-surface-border, ${SURFACE.border.light})`,
|
|
701
|
+
"--mantine-color-gray-4": `var(--vx-surface-border, ${SURFACE.border.light})`,
|
|
702
|
+
// Hover/subtle/striped/track surfaces read `gray-0/1` raw → the dedicated subtle token (a faint
|
|
703
|
+
// step below panel, so hover is actually visible). Dark hover uses the `basaltDark` dark-5/6/7
|
|
704
|
+
// steps, already on-identity.
|
|
705
|
+
"--mantine-color-gray-0": `var(--vx-surface-subtle, ${SURFACE.subtle.light})`,
|
|
706
|
+
"--mantine-color-gray-1": `var(--vx-surface-subtle, ${SURFACE.subtle.light})`
|
|
707
|
+
},
|
|
708
|
+
dark: {
|
|
709
|
+
...onColorVars(theme, "dark"),
|
|
710
|
+
...familyBridge(),
|
|
711
|
+
...accentBridge(theme, "dark"),
|
|
712
|
+
"--mantine-color-body": `var(--vx-surface-bg, ${SURFACE.bg.dark})`,
|
|
713
|
+
"--mantine-color-default": `var(--vx-surface-panel, ${SURFACE.panel.dark})`,
|
|
714
|
+
"--mantine-color-default-hover": `var(--vx-surface-elevated, ${SURFACE.elevated.dark})`,
|
|
715
|
+
// See the light block above — same lever, both schemes.
|
|
716
|
+
"--mantine-color-default-border": "transparent",
|
|
717
|
+
"--mantine-color-dimmed": `var(--vx-neutral, ${NEUTRAL.neutral.dark})`,
|
|
718
|
+
"--mantine-color-text": `var(--vx-ink, ${INK.ink.dark})`,
|
|
719
|
+
"--app-shell-border-color": `var(--vx-surface-border, ${SURFACE.border.dark})`,
|
|
720
|
+
// Dark components read `--mantine-color-dark-4` (border) raw. The `basaltDark` tuple already
|
|
721
|
+
// sets dark-4, but to a slightly lighter step than the hairline token, so layout borders read
|
|
722
|
+
// marginally heavier than card borders. Pin dark-4 to the SAME "line" token for parity.
|
|
723
|
+
"--mantine-color-dark-4": `var(--vx-surface-border, ${SURFACE.border.dark})`
|
|
724
|
+
}
|
|
725
|
+
});
|
|
726
|
+
function createBasaltTheme(overrides) {
|
|
727
|
+
return overrides ? mergeThemeOverrides(baseTheme, overrides) : baseTheme;
|
|
728
|
+
}
|
|
729
|
+
export {
|
|
730
|
+
baseTheme,
|
|
731
|
+
createBasaltTheme,
|
|
732
|
+
cssVariablesResolver
|
|
733
|
+
};
|