basalt-ui 0.4.2 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +70 -0
- package/CHANGELOG.md +199 -41
- package/LICENSE +201 -0
- package/README.md +434 -160
- package/agent/rules/basalt-agent.md +395 -0
- package/agent/rules/basalt-charts.md +170 -0
- package/agent/rules/basalt-commands.md +320 -0
- package/agent/rules/basalt-content.md +390 -0
- package/agent/rules/basalt-data.md +237 -0
- package/agent/rules/basalt-forms.md +186 -0
- package/agent/rules/basalt-mantine.md +327 -0
- package/agent/rules/basalt-notifications.md +264 -0
- package/agent/rules/basalt-query.md +130 -0
- package/agent/rules/basalt-router.md +173 -0
- package/agent/rules/basalt-state.md +99 -0
- package/agent/rules/basalt-tokens.md +148 -0
- package/agent/templates/CLAUDE-block.md.tpl +35 -0
- package/agent/templates/DESIGN.md.tpl +71 -0
- package/agent/templates/__root.tpl +31 -0
- package/agent/templates/query-client.ts.tpl +12 -0
- package/bin/basalt.mjs +14 -0
- package/configs/check.yml +29 -0
- package/configs/lefthook.yml +21 -0
- package/configs/oxfmt.json +8 -0
- package/configs/oxlint-plugin.js +269 -0
- package/configs/oxlint-plugin.test.ts +107 -0
- package/configs/oxlint.json +116 -0
- package/configs/tsconfig.base.json +20 -0
- package/configs/tsconfig.node.json +8 -0
- package/configs/tsconfig.react-app.json +8 -0
- package/dist/agent/ai-sdk-transport.d.ts +85 -0
- package/dist/agent/ai-sdk-transport.d.ts.map +1 -0
- package/dist/agent/ai-sdk-transport.js +109 -0
- package/dist/agent/history.d.ts +55 -0
- package/dist/agent/history.d.ts.map +1 -0
- package/dist/agent/history.js +32 -0
- package/dist/agent/index.d.ts +53 -0
- package/dist/agent/index.d.ts.map +1 -0
- package/dist/agent/index.js +23 -0
- package/dist/agent/outcome.d.ts +71 -0
- package/dist/agent/outcome.d.ts.map +1 -0
- package/dist/agent/outcome.js +30 -0
- package/dist/agent/part-list.d.ts +75 -0
- package/dist/agent/part-list.d.ts.map +1 -0
- package/dist/agent/part-list.js +127 -0
- package/dist/agent/parts.d.ts +91 -0
- package/dist/agent/parts.d.ts.map +1 -0
- package/dist/agent/parts.js +49 -0
- package/dist/agent/stick-to-bottom.d.ts +23 -0
- package/dist/agent/stick-to-bottom.d.ts.map +1 -0
- package/dist/agent/stick-to-bottom.js +73 -0
- package/dist/agent/thread.d.ts +124 -0
- package/dist/agent/thread.d.ts.map +1 -0
- package/dist/agent/thread.js +131 -0
- package/dist/agent/transport.d.ts +87 -0
- package/dist/agent/transport.d.ts.map +1 -0
- package/dist/agent/transport.js +21 -0
- package/dist/agent/use-agent-stream.d.ts +34 -0
- package/dist/agent/use-agent-stream.d.ts.map +1 -0
- package/dist/agent/use-agent-stream.js +56 -0
- package/dist/agent/use-agent-thread-runs.d.ts +72 -0
- package/dist/agent/use-agent-thread-runs.d.ts.map +1 -0
- package/dist/agent/use-agent-thread-runs.js +217 -0
- package/dist/agent-chat/composer.d.ts +18 -0
- package/dist/agent-chat/composer.d.ts.map +1 -0
- package/dist/agent-chat/composer.js +86 -0
- package/dist/agent-chat/index.d.ts +24 -0
- package/dist/agent-chat/index.d.ts.map +1 -0
- package/dist/agent-chat/index.js +15 -0
- package/dist/agent-chat/thread-detail-panel.d.ts +27 -0
- package/dist/agent-chat/thread-detail-panel.d.ts.map +1 -0
- package/dist/agent-chat/thread-detail-panel.js +108 -0
- package/dist/agent-chat/thread-feed.d.ts +18 -0
- package/dist/agent-chat/thread-feed.d.ts.map +1 -0
- package/dist/agent-chat/thread-feed.js +42 -0
- package/dist/agent-chat/thread-message.d.ts +31 -0
- package/dist/agent-chat/thread-message.d.ts.map +1 -0
- package/dist/agent-chat/thread-message.js +128 -0
- package/dist/agent-chat/thread-outcome-card.d.ts +19 -0
- package/dist/agent-chat/thread-outcome-card.d.ts.map +1 -0
- package/dist/agent-chat/thread-outcome-card.js +120 -0
- package/dist/agent-chat/thread-workspace.d.ts +27 -0
- package/dist/agent-chat/thread-workspace.d.ts.map +1 -0
- package/dist/agent-chat/thread-workspace.js +95 -0
- package/dist/charts/hooks/useChartSize.d.ts +25 -0
- package/dist/charts/hooks/useChartSize.d.ts.map +1 -0
- package/dist/charts/hooks/useChartSize.js +8 -0
- package/dist/charts/hooks/useChartTooltip.d.ts +13 -0
- package/dist/charts/hooks/useChartTooltip.d.ts.map +1 -0
- package/dist/charts/hooks/useChartTooltip.js +26 -0
- package/dist/charts/hooks/useHoverSync.d.ts +30 -0
- package/dist/charts/hooks/useHoverSync.d.ts.map +1 -0
- package/dist/charts/hooks/useHoverSync.js +70 -0
- package/dist/charts/hover-context.d.ts +21 -0
- package/dist/charts/hover-context.d.ts.map +1 -0
- package/dist/charts/hover-context.js +12 -0
- package/dist/charts/hover-sync.d.ts +14 -0
- package/dist/charts/hover-sync.d.ts.map +1 -0
- package/dist/charts/hover-sync.js +17 -0
- package/dist/charts/index.d.ts +47 -0
- package/dist/charts/index.d.ts.map +1 -0
- package/dist/charts/index.js +129 -0
- package/dist/charts/kinds/Bars.d.ts +129 -0
- package/dist/charts/kinds/Bars.d.ts.map +1 -0
- package/dist/charts/kinds/Bars.js +467 -0
- package/dist/charts/kinds/Donut.d.ts +65 -0
- package/dist/charts/kinds/Donut.d.ts.map +1 -0
- package/dist/charts/kinds/Donut.js +158 -0
- package/dist/charts/kinds/DualPanel.d.ts +67 -0
- package/dist/charts/kinds/DualPanel.d.ts.map +1 -0
- package/dist/charts/kinds/DualPanel.js +326 -0
- package/dist/charts/kinds/Heatmap.d.ts +59 -0
- package/dist/charts/kinds/Heatmap.d.ts.map +1 -0
- package/dist/charts/kinds/Heatmap.js +175 -0
- package/dist/charts/kinds/MultiLine.d.ts +73 -0
- package/dist/charts/kinds/MultiLine.d.ts.map +1 -0
- package/dist/charts/kinds/MultiLine.js +275 -0
- package/dist/charts/kinds/StackedArea.d.ts +35 -0
- package/dist/charts/kinds/StackedArea.d.ts.map +1 -0
- package/dist/charts/kinds/StackedArea.js +151 -0
- package/dist/charts/kinds/ZonedLine.d.ts +94 -0
- package/dist/charts/kinds/ZonedLine.d.ts.map +1 -0
- package/dist/charts/kinds/ZonedLine.js +218 -0
- package/dist/charts/primitives/AreaGradient.d.ts +18 -0
- package/dist/charts/primitives/AreaGradient.d.ts.map +1 -0
- package/dist/charts/primitives/AreaGradient.js +13 -0
- package/dist/charts/primitives/Axes.d.ts +22 -0
- package/dist/charts/primitives/Axes.d.ts.map +1 -0
- package/dist/charts/primitives/Axes.js +79 -0
- package/dist/charts/primitives/ChartCard.d.ts +14 -0
- package/dist/charts/primitives/ChartCard.d.ts.map +1 -0
- package/dist/charts/primitives/ChartCard.js +144 -0
- package/dist/charts/primitives/ChartFrame.d.ts +70 -0
- package/dist/charts/primitives/ChartFrame.d.ts.map +1 -0
- package/dist/charts/primitives/ChartFrame.js +77 -0
- package/dist/charts/primitives/ChartLegend.d.ts +36 -0
- package/dist/charts/primitives/ChartLegend.d.ts.map +1 -0
- package/dist/charts/primitives/ChartLegend.js +234 -0
- package/dist/charts/primitives/ChartTooltip.d.ts +34 -0
- package/dist/charts/primitives/ChartTooltip.d.ts.map +1 -0
- package/dist/charts/primitives/ChartTooltip.js +134 -0
- package/dist/charts/primitives/Crosshair.d.ts +23 -0
- package/dist/charts/primitives/Crosshair.d.ts.map +1 -0
- package/dist/charts/primitives/Crosshair.js +21 -0
- package/dist/charts/primitives/HoverOverlay.d.ts +9 -0
- package/dist/charts/primitives/HoverOverlay.d.ts.map +1 -0
- package/dist/charts/primitives/HoverOverlay.js +21 -0
- package/dist/charts/primitives/ResponsiveChart.d.ts +45 -0
- package/dist/charts/primitives/ResponsiveChart.d.ts.map +1 -0
- package/dist/charts/primitives/ResponsiveChart.js +24 -0
- package/dist/charts/primitives/ZoneRects.d.ts +38 -0
- package/dist/charts/primitives/ZoneRects.d.ts.map +1 -0
- package/dist/charts/primitives/ZoneRects.js +30 -0
- package/dist/charts/series.d.ts +99 -0
- package/dist/charts/series.d.ts.map +1 -0
- package/dist/charts/series.js +55 -0
- package/dist/charts/sparklines/BarSparkline.d.ts +13 -0
- package/dist/charts/sparklines/BarSparkline.d.ts.map +1 -0
- package/dist/charts/sparklines/BarSparkline.js +33 -0
- package/dist/charts/sparklines/LineSparkline.d.ts +15 -0
- package/dist/charts/sparklines/LineSparkline.d.ts.map +1 -0
- package/dist/charts/sparklines/LineSparkline.js +39 -0
- package/dist/charts/sparklines/index.d.ts +3 -0
- package/dist/charts/sparklines/index.d.ts.map +1 -0
- package/dist/charts/sparklines/index.js +6 -0
- package/dist/charts/theme.d.ts +21 -0
- package/dist/charts/theme.d.ts.map +1 -0
- package/dist/charts/theme.js +30 -0
- package/dist/charts/utils/domain.d.ts +20 -0
- package/dist/charts/utils/domain.d.ts.map +1 -0
- package/dist/charts/utils/domain.js +7 -0
- package/dist/charts/utils/format.d.ts +5 -0
- package/dist/charts/utils/format.d.ts.map +1 -0
- package/dist/charts/utils/format.js +27 -0
- package/dist/charts/utils/ticks.d.ts +5 -0
- package/dist/charts/utils/ticks.d.ts.map +1 -0
- package/dist/charts/utils/ticks.js +18 -0
- package/dist/cli/index.d.ts +273 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +907 -0
- package/dist/commands/ShortcutsHelp.d.ts +17 -0
- package/dist/commands/ShortcutsHelp.d.ts.map +1 -0
- package/dist/commands/ShortcutsHelp.js +64 -0
- package/dist/commands/define-commands.d.ts +140 -0
- package/dist/commands/define-commands.d.ts.map +1 -0
- package/dist/commands/define-commands.js +26 -0
- package/dist/commands/define-overlays.d.ts +134 -0
- package/dist/commands/define-overlays.d.ts.map +1 -0
- package/dist/commands/define-overlays.js +53 -0
- package/dist/commands/index.d.ts +42 -0
- package/dist/commands/index.d.ts.map +1 -0
- package/dist/commands/index.js +46 -0
- package/dist/commands/overlays-mount.d.ts +117 -0
- package/dist/commands/overlays-mount.d.ts.map +1 -0
- package/dist/commands/overlays-mount.js +116 -0
- package/dist/commands/projectors.d.ts +152 -0
- package/dist/commands/projectors.d.ts.map +1 -0
- package/dist/commands/projectors.js +87 -0
- package/dist/commands/shortcut-format.d.ts +48 -0
- package/dist/commands/shortcut-format.d.ts.map +1 -0
- package/dist/commands/shortcut-format.js +33 -0
- package/dist/commands/useCommandHotkeys.d.ts +14 -0
- package/dist/commands/useCommandHotkeys.d.ts.map +1 -0
- package/dist/commands/useCommandHotkeys.js +45 -0
- package/dist/connectivity/connectivity-indicator.d.ts +8 -0
- package/dist/connectivity/connectivity-indicator.d.ts.map +1 -0
- package/dist/connectivity/connectivity-indicator.js +203 -0
- package/dist/connectivity/connectivity-provider.d.ts +7 -0
- package/dist/connectivity/connectivity-provider.d.ts.map +1 -0
- package/dist/connectivity/connectivity-provider.js +125 -0
- package/dist/connectivity/index.d.ts +13 -0
- package/dist/connectivity/index.d.ts.map +1 -0
- package/dist/connectivity/index.js +8 -0
- package/dist/connectivity/types.d.ts +36 -0
- package/dist/connectivity/types.d.ts.map +1 -0
- package/dist/connectivity/types.js +0 -0
- package/dist/connectivity/use-connectivity.d.ts +3 -0
- package/dist/connectivity/use-connectivity.d.ts.map +1 -0
- package/dist/connectivity/use-connectivity.js +14 -0
- package/dist/content/article-actions.d.ts +39 -0
- package/dist/content/article-actions.d.ts.map +1 -0
- package/dist/content/article-actions.js +28 -0
- package/dist/content/article-card.d.ts +58 -0
- package/dist/content/article-card.d.ts.map +1 -0
- package/dist/content/article-card.js +76 -0
- package/dist/content/article-card.module.css +109 -0
- package/dist/content/article-card.module.css.d.ts +16 -0
- package/dist/content/article-filter-bar.d.ts +40 -0
- package/dist/content/article-filter-bar.d.ts.map +1 -0
- package/dist/content/article-filter-bar.js +56 -0
- package/dist/content/article-layout.d.ts +61 -0
- package/dist/content/article-layout.d.ts.map +1 -0
- package/dist/content/article-layout.js +71 -0
- package/dist/content/article-layout.module.css +131 -0
- package/dist/content/article-layout.module.css.d.ts +20 -0
- package/dist/content/article-model.d.ts +62 -0
- package/dist/content/article-model.d.ts.map +1 -0
- package/dist/content/article-model.js +41 -0
- package/dist/content/block-split.d.ts +24 -0
- package/dist/content/block-split.d.ts.map +1 -0
- package/dist/content/block-split.js +63 -0
- package/dist/content/callout-alert.d.ts +27 -0
- package/dist/content/callout-alert.d.ts.map +1 -0
- package/dist/content/callout-alert.js +59 -0
- package/dist/content/callout.d.ts +24 -0
- package/dist/content/callout.d.ts.map +1 -0
- package/dist/content/callout.js +59 -0
- package/dist/content/callout.module.css +77 -0
- package/dist/content/callout.module.css.d.ts +16 -0
- package/dist/content/code-block.d.ts +26 -0
- package/dist/content/code-block.d.ts.map +1 -0
- package/dist/content/code-block.js +41 -0
- package/dist/content/code-block.module.css +86 -0
- package/dist/content/code-block.module.css.d.ts +14 -0
- package/dist/content/copy-action.d.ts +29 -0
- package/dist/content/copy-action.d.ts.map +1 -0
- package/dist/content/copy-action.js +46 -0
- package/dist/content/fence-block.d.ts +19 -0
- package/dist/content/fence-block.d.ts.map +1 -0
- package/dist/content/fence-block.js +23 -0
- package/dist/content/glyphs.d.ts +18 -0
- package/dist/content/glyphs.d.ts.map +1 -0
- package/dist/content/glyphs.js +43 -0
- package/dist/content/guide.d.ts +47 -0
- package/dist/content/guide.d.ts.map +1 -0
- package/dist/content/guide.js +110 -0
- package/dist/content/guide.module.css +62 -0
- package/dist/content/guide.module.css.d.ts +13 -0
- package/dist/content/heading-anchor.d.ts +8 -0
- package/dist/content/heading-anchor.d.ts.map +1 -0
- package/dist/content/heading-anchor.js +23 -0
- package/dist/content/heading-components.d.ts +5 -0
- package/dist/content/heading-components.d.ts.map +1 -0
- package/dist/content/heading-components.js +41 -0
- package/dist/content/highlighter.d.ts +8 -0
- package/dist/content/highlighter.d.ts.map +1 -0
- package/dist/content/highlighter.js +85 -0
- package/dist/content/index.d.ts +45 -0
- package/dist/content/index.d.ts.map +1 -0
- package/dist/content/index.js +43 -0
- package/dist/content/markdown-hast.d.ts +23 -0
- package/dist/content/markdown-hast.d.ts.map +1 -0
- package/dist/content/markdown-hast.js +48 -0
- package/dist/content/markdown.d.ts +68 -0
- package/dist/content/markdown.d.ts.map +1 -0
- package/dist/content/markdown.js +180 -0
- package/dist/content/mdx.d.ts +20 -0
- package/dist/content/mdx.d.ts.map +1 -0
- package/dist/content/mdx.js +64 -0
- package/dist/content/mermaid.d.ts +32 -0
- package/dist/content/mermaid.d.ts.map +1 -0
- package/dist/content/mermaid.js +70 -0
- package/dist/content/mermaid.module.css +20 -0
- package/dist/content/mermaid.module.css.d.ts +8 -0
- package/dist/content/prose.d.ts +29 -0
- package/dist/content/prose.d.ts.map +1 -0
- package/dist/content/prose.js +24 -0
- package/dist/content/prose.module.css +330 -0
- package/dist/content/prose.module.css.d.ts +12 -0
- package/dist/content/reading-progress.d.ts +20 -0
- package/dist/content/reading-progress.d.ts.map +1 -0
- package/dist/content/reading-progress.js +38 -0
- package/dist/content/reading-progress.module.css +22 -0
- package/dist/content/reading-progress.module.css.d.ts +9 -0
- package/dist/content/slug.d.ts +28 -0
- package/dist/content/slug.d.ts.map +1 -0
- package/dist/content/slug.js +28 -0
- package/dist/content/toc.d.ts +37 -0
- package/dist/content/toc.d.ts.map +1 -0
- package/dist/content/toc.js +134 -0
- package/dist/content/toc.module.css +51 -0
- package/dist/content/toc.module.css.d.ts +13 -0
- package/dist/content/url-hardening.d.ts +23 -0
- package/dist/content/url-hardening.d.ts.map +1 -0
- package/dist/content/url-hardening.js +23 -0
- package/dist/dashboard/delta-badge.d.ts +13 -0
- package/dist/dashboard/delta-badge.d.ts.map +1 -0
- package/dist/dashboard/delta-badge.js +45 -0
- package/dist/dashboard/empty-state.d.ts +15 -0
- package/dist/dashboard/empty-state.d.ts.map +1 -0
- package/dist/dashboard/empty-state.js +56 -0
- package/dist/dashboard/index.d.ts +5 -0
- package/dist/dashboard/index.d.ts.map +1 -0
- package/dist/dashboard/index.js +16 -0
- package/dist/dashboard/settings-section.d.ts +24 -0
- package/dist/dashboard/settings-section.d.ts.map +1 -0
- package/dist/dashboard/settings-section.js +61 -0
- package/dist/dashboard/settings-section.module.css +23 -0
- package/dist/dashboard/settings-section.module.css.d.ts +10 -0
- package/dist/dashboard/stat-card.d.ts +18 -0
- package/dist/dashboard/stat-card.d.ts.map +1 -0
- package/dist/dashboard/stat-card.js +74 -0
- package/dist/data/data-table.d.ts +198 -0
- package/dist/data/data-table.d.ts.map +1 -0
- package/dist/data/data-table.js +342 -0
- package/dist/data/index.d.ts +34 -0
- package/dist/data/index.d.ts.map +1 -0
- package/dist/data/index.js +2 -0
- package/dist/data/table.d.ts +24 -0
- package/dist/data/table.d.ts.map +1 -0
- package/dist/data/table.js +20 -0
- package/dist/data/virtual-list.d.ts +74 -0
- package/dist/data/virtual-list.d.ts.map +1 -0
- package/dist/data/virtual-list.js +86 -0
- package/dist/data/virtual.d.ts +20 -0
- package/dist/data/virtual.d.ts.map +1 -0
- package/dist/data/virtual.js +4 -0
- package/dist/forms/FormErrorSummary.d.ts +29 -0
- package/dist/forms/FormErrorSummary.d.ts.map +1 -0
- package/dist/forms/FormErrorSummary.js +28 -0
- package/dist/forms/create-form.d.ts +31 -0
- package/dist/forms/create-form.d.ts.map +1 -0
- package/dist/forms/create-form.js +18 -0
- package/dist/forms/field.d.ts +22 -0
- package/dist/forms/field.d.ts.map +1 -0
- package/dist/forms/field.js +9 -0
- package/dist/forms/index.d.ts +17 -0
- package/dist/forms/index.d.ts.map +1 -0
- package/dist/forms/index.js +13 -0
- package/dist/forms/use-form-draft.d.ts +61 -0
- package/dist/forms/use-form-draft.d.ts.map +1 -0
- package/dist/forms/use-form-draft.js +55 -0
- package/dist/guard/guard-hook.d.ts +40 -0
- package/dist/guard/guard-hook.d.ts.map +1 -0
- package/dist/guard/guard-hook.js +55 -0
- package/dist/guard/index.d.ts +144 -0
- package/dist/guard/index.d.ts.map +1 -0
- package/dist/guard/index.js +315 -0
- package/dist/guard/types.d.ts +97 -0
- package/dist/guard/types.d.ts.map +1 -0
- package/dist/guard/types.js +0 -0
- package/dist/index.d.ts +24 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +90 -0
- package/dist/motion/index.d.ts +29 -0
- package/dist/motion/index.d.ts.map +1 -0
- package/dist/motion/index.js +12 -0
- package/dist/notifications/bell.d.ts +12 -0
- package/dist/notifications/bell.d.ts.map +1 -0
- package/dist/notifications/bell.js +84 -0
- package/dist/notifications/center.d.ts +20 -0
- package/dist/notifications/center.d.ts.map +1 -0
- package/dist/notifications/center.js +144 -0
- package/dist/notifications/define-notifications.d.ts +97 -0
- package/dist/notifications/define-notifications.d.ts.map +1 -0
- package/dist/notifications/define-notifications.js +27 -0
- package/dist/notifications/index.d.ts +36 -0
- package/dist/notifications/index.d.ts.map +1 -0
- package/dist/notifications/index.js +52 -0
- package/dist/notifications/notify.d.ts +92 -0
- package/dist/notifications/notify.d.ts.map +1 -0
- package/dist/notifications/notify.js +127 -0
- package/dist/notifications/overlay.d.ts +20 -0
- package/dist/notifications/overlay.d.ts.map +1 -0
- package/dist/notifications/overlay.js +12 -0
- package/dist/notifications/store.d.ts +120 -0
- package/dist/notifications/store.d.ts.map +1 -0
- package/dist/notifications/store.js +113 -0
- package/dist/provider/index.d.ts +93 -0
- package/dist/provider/index.d.ts.map +1 -0
- package/dist/provider/index.js +106 -0
- package/dist/query/devtools.d.ts +21 -0
- package/dist/query/devtools.d.ts.map +1 -0
- package/dist/query/devtools.js +12 -0
- package/dist/query/index.d.ts +65 -0
- package/dist/query/index.d.ts.map +1 -0
- package/dist/query/index.js +68 -0
- package/dist/register.d.ts +139 -0
- package/dist/register.d.ts.map +1 -0
- package/dist/register.js +6 -0
- package/dist/router-tanstack/index.d.ts +74 -0
- package/dist/router-tanstack/index.d.ts.map +1 -0
- package/dist/router-tanstack/index.js +29 -0
- package/dist/router-tanstack/multi-search-param-store.d.ts +78 -0
- package/dist/router-tanstack/multi-search-param-store.d.ts.map +1 -0
- package/dist/router-tanstack/multi-search-param-store.js +35 -0
- package/dist/router-tanstack/search-param-store.d.ts +92 -0
- package/dist/router-tanstack/search-param-store.d.ts.map +1 -0
- package/dist/router-tanstack/search-param-store.js +26 -0
- package/dist/shell/account-types.d.ts +118 -0
- package/dist/shell/account-types.d.ts.map +1 -0
- package/dist/shell/account-types.js +0 -0
- package/dist/shell/app-breadcrumbs.d.ts +17 -0
- package/dist/shell/app-breadcrumbs.d.ts.map +1 -0
- package/dist/shell/app-breadcrumbs.js +39 -0
- package/dist/shell/app-header.module.css +73 -0
- package/dist/shell/app-header.module.css.d.ts +11 -0
- package/dist/shell/app-mobile-nav.d.ts +26 -0
- package/dist/shell/app-mobile-nav.d.ts.map +1 -0
- package/dist/shell/app-mobile-nav.js +106 -0
- package/dist/shell/app-mobile-nav.module.css +100 -0
- package/dist/shell/app-mobile-nav.module.css.d.ts +14 -0
- package/dist/shell/app-sidebar-account.d.ts +3 -0
- package/dist/shell/app-sidebar-account.d.ts.map +1 -0
- package/dist/shell/app-sidebar-account.js +84 -0
- package/dist/shell/app-sidebar.d.ts +56 -0
- package/dist/shell/app-sidebar.d.ts.map +1 -0
- package/dist/shell/app-sidebar.js +455 -0
- package/dist/shell/app-sidebar.module.css +414 -0
- package/dist/shell/app-sidebar.module.css.d.ts +34 -0
- package/dist/shell/index.d.ts +123 -0
- package/dist/shell/index.d.ts.map +1 -0
- package/dist/shell/index.js +179 -0
- package/dist/shell/page-header.d.ts +13 -0
- package/dist/shell/page-header.d.ts.map +1 -0
- package/dist/shell/page-header.js +23 -0
- package/dist/shell/sidebar-search.d.ts +12 -0
- package/dist/shell/sidebar-search.d.ts.map +1 -0
- package/dist/shell/sidebar-search.js +62 -0
- package/dist/shell/sidebar-search.module.css +62 -0
- package/dist/shell/sidebar-search.module.css.d.ts +11 -0
- package/dist/state.d.ts +62 -0
- package/dist/state.d.ts.map +1 -0
- package/dist/state.js +124 -0
- package/dist/styles.css +166 -0
- package/dist/surfaces.d.ts +376 -0
- package/dist/surfaces.d.ts.map +1 -0
- package/dist/surfaces.js +306 -0
- package/dist/theme/controls.module.css +143 -0
- package/dist/theme/controls.module.css.d.ts +17 -0
- package/dist/theme/floating.module.css +35 -0
- package/dist/theme/floating.module.css.d.ts +9 -0
- package/dist/theme/index.d.ts +22 -0
- package/dist/theme/index.d.ts.map +1 -0
- package/dist/theme/index.js +733 -0
- package/dist/theme/nav-link.module.css +67 -0
- package/dist/theme/nav-link.module.css.d.ts +8 -0
- package/dist/theme/segmented-control.module.css +14 -0
- package/dist/theme/segmented-control.module.css.d.ts +8 -0
- package/dist/theme/timeline.module.css +29 -0
- package/dist/theme/timeline.module.css.d.ts +9 -0
- package/dist/theme-lab/index.d.ts +59 -0
- package/dist/theme-lab/index.d.ts.map +1 -0
- package/dist/theme-lab/index.js +263 -0
- package/dist/theme-toggle/index.d.ts +8 -0
- package/dist/theme-toggle/index.d.ts.map +1 -0
- package/dist/theme-toggle/index.js +155 -0
- package/dist/tokens/index.d.ts +151 -0
- package/dist/tokens/index.d.ts.map +1 -0
- package/dist/tokens/index.js +246 -0
- package/dist/tokens/palette.d.ts +304 -0
- package/dist/tokens/palette.d.ts.map +1 -0
- package/dist/tokens/palette.js +186 -0
- package/dist/vite.d.ts +30 -0
- package/dist/vite.d.ts.map +1 -0
- package/dist/vite.js +68 -0
- package/llms.txt +149 -0
- package/package.json +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 +658 -0
- package/src/cli/index.ts +1497 -0
- package/src/cli/init-sync.test.ts +160 -0
- package/src/commands/ShortcutsHelp.tsx +129 -0
- package/src/commands/define-commands.ts +184 -0
- package/src/commands/define-overlays.ts +197 -0
- package/src/commands/index.ts +86 -0
- package/src/commands/overlays-mount.tsx +301 -0
- package/src/commands/projectors.ts +267 -0
- package/src/commands/shortcut-format.ts +83 -0
- package/src/commands/useCommandHotkeys.ts +114 -0
- package/src/connectivity/connectivity-indicator.tsx +249 -0
- package/src/connectivity/connectivity-provider.tsx +186 -0
- package/src/connectivity/index.ts +18 -0
- package/src/connectivity/types.ts +39 -0
- package/src/connectivity/use-connectivity.ts +25 -0
- package/src/content/article-actions.test.ts +78 -0
- package/src/content/article-actions.ts +72 -0
- package/src/content/article-card.module.css +109 -0
- package/src/content/article-card.module.css.d.ts +16 -0
- package/src/content/article-card.tsx +173 -0
- package/src/content/article-filter-bar.tsx +88 -0
- package/src/content/article-layout.module.css +131 -0
- package/src/content/article-layout.module.css.d.ts +20 -0
- package/src/content/article-layout.tsx +167 -0
- package/src/content/article-model.test.ts +119 -0
- package/src/content/article-model.ts +110 -0
- package/src/content/block-split.test.ts +75 -0
- package/src/content/block-split.ts +102 -0
- package/src/content/callout-alert.ts +88 -0
- package/src/content/callout.module.css +77 -0
- package/src/content/callout.module.css.d.ts +16 -0
- package/src/content/callout.tsx +96 -0
- package/src/content/code-block.module.css +86 -0
- package/src/content/code-block.module.css.d.ts +14 -0
- package/src/content/code-block.tsx +82 -0
- package/src/content/copy-action.tsx +79 -0
- package/src/content/fence-block.tsx +39 -0
- package/src/content/glyphs.tsx +53 -0
- package/src/content/guide.module.css +62 -0
- package/src/content/guide.module.css.d.ts +13 -0
- package/src/content/guide.tsx +174 -0
- package/src/content/heading-anchor.tsx +54 -0
- package/src/content/heading-components.tsx +62 -0
- package/src/content/highlighter.ts +123 -0
- package/src/content/index.ts +60 -0
- package/src/content/markdown-hast.ts +80 -0
- package/src/content/markdown.tsx +346 -0
- package/src/content/mdx.tsx +127 -0
- package/src/content/mermaid.module.css +20 -0
- package/src/content/mermaid.module.css.d.ts +8 -0
- package/src/content/mermaid.tsx +124 -0
- package/src/content/prose.module.css +330 -0
- package/src/content/prose.module.css.d.ts +12 -0
- package/src/content/prose.tsx +53 -0
- package/src/content/reading-progress.module.css +22 -0
- package/src/content/reading-progress.module.css.d.ts +9 -0
- package/src/content/reading-progress.tsx +67 -0
- package/src/content/slug.test.ts +62 -0
- package/src/content/slug.ts +57 -0
- package/src/content/toc.module.css +51 -0
- package/src/content/toc.module.css.d.ts +13 -0
- package/src/content/toc.tsx +226 -0
- package/src/content/url-hardening.ts +46 -0
- package/src/dashboard/delta-badge.tsx +70 -0
- package/src/dashboard/empty-state.tsx +80 -0
- package/src/dashboard/index.ts +11 -0
- package/src/dashboard/settings-section.module.css +23 -0
- package/src/dashboard/settings-section.module.css.d.ts +10 -0
- package/src/dashboard/settings-section.tsx +118 -0
- package/src/dashboard/stat-card.tsx +105 -0
- package/src/data/data-table.tsx +695 -0
- package/src/data/index.ts +37 -0
- package/src/data/table.ts +46 -0
- package/src/data/virtual-list.tsx +180 -0
- package/src/data/virtual.ts +21 -0
- package/src/forms/FormErrorSummary.tsx +64 -0
- package/src/forms/create-form.ts +57 -0
- package/src/forms/field.ts +30 -0
- package/src/forms/index.ts +26 -0
- package/src/forms/use-form-draft.ts +170 -0
- package/src/guard/check-source.test.ts +834 -0
- package/src/guard/guard-hook.test.ts +173 -0
- package/src/guard/guard-hook.ts +122 -0
- package/src/guard/index.ts +510 -0
- package/src/guard/types.ts +117 -0
- package/src/index.ts +139 -0
- package/src/motion/index.ts +26 -0
- package/src/notifications/bell.tsx +108 -0
- package/src/notifications/center.tsx +245 -0
- package/src/notifications/define-notifications.ts +162 -0
- package/src/notifications/index.ts +79 -0
- package/src/notifications/notify.tsx +260 -0
- package/src/notifications/overlay.tsx +64 -0
- package/src/notifications/store.ts +287 -0
- package/src/provider/index.tsx +234 -0
- package/src/query/devtools.tsx +38 -0
- package/src/query/index.ts +129 -0
- package/src/register.ts +158 -0
- package/src/router-tanstack/index.ts +111 -0
- package/src/router-tanstack/multi-search-param-store.test.ts +56 -0
- package/src/router-tanstack/multi-search-param-store.ts +122 -0
- package/src/router-tanstack/search-param-store.ts +125 -0
- package/src/shell/account-types.ts +119 -0
- package/src/shell/app-breadcrumbs.tsx +90 -0
- package/src/shell/app-header.module.css +73 -0
- package/src/shell/app-header.module.css.d.ts +11 -0
- package/src/shell/app-mobile-nav.module.css +100 -0
- package/src/shell/app-mobile-nav.module.css.d.ts +14 -0
- package/src/shell/app-mobile-nav.tsx +146 -0
- package/src/shell/app-sidebar-account.tsx +142 -0
- package/src/shell/app-sidebar.module.css +414 -0
- package/src/shell/app-sidebar.module.css.d.ts +34 -0
- package/src/shell/app-sidebar.tsx +632 -0
- package/src/shell/index.tsx +343 -0
- package/src/shell/page-header.tsx +35 -0
- package/src/shell/sidebar-search.module.css +62 -0
- package/src/shell/sidebar-search.module.css.d.ts +11 -0
- package/src/shell/sidebar-search.tsx +80 -0
- package/src/state.ts +246 -0
- package/src/styles.css +166 -0
- package/src/styles.floor.test.ts +36 -0
- package/src/surfaces.ts +489 -0
- package/src/theme/border-coverage.test.ts +272 -0
- package/src/theme/contrast.test.ts +306 -0
- package/src/theme/controls.module.css +143 -0
- package/src/theme/controls.module.css.d.ts +17 -0
- package/src/theme/floating.module.css +35 -0
- package/src/theme/floating.module.css.d.ts +9 -0
- package/src/theme/index.ts +933 -0
- package/src/theme/nav-link.module.css +67 -0
- package/src/theme/nav-link.module.css.d.ts +8 -0
- package/src/theme/segmented-control.module.css +14 -0
- package/src/theme/segmented-control.module.css.d.ts +8 -0
- package/src/theme/shadow-surfaces.test.ts +421 -0
- package/src/theme/timeline.module.css +29 -0
- package/src/theme/timeline.module.css.d.ts +9 -0
- package/src/theme-lab/index.tsx +359 -0
- package/src/theme-lab/theme-lab.test.ts +60 -0
- package/src/theme-toggle/index.tsx +180 -0
- package/src/tokens/index.ts +363 -0
- package/src/tokens/palette.ts +288 -0
- package/src/vite.ts +122 -0
- package/src/index.css +0 -877
- package/src/starlight.css +0 -308
- package/tailwind.config.js +0 -78
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Active nav row = heavier weight + card depth, applied at the THEME level via `classNames` so it
|
|
3
|
+
* reaches EVERY NavLink render path — including a consumer's router `<Link>` mounted through
|
|
4
|
+
* `renderNavLink`, which a shell-scoped CSS module never sees. Mantine's `styles` prop only takes
|
|
5
|
+
* flat inline properties (a nested `&[data-active]` there throws a React warning), so the state
|
|
6
|
+
* selectors live here. React Router's NavLink marks the active item via `aria-current` rather than
|
|
7
|
+
* the `active` prop's `data-active`, so both states are matched.
|
|
8
|
+
*
|
|
9
|
+
* The row's background comes from `--nl-bg` (set in theme/index.ts, applies unconditionally via
|
|
10
|
+
* Mantine's own `[data-active]` CSS) — `shadow-card` is added here because there's no `--nl-*` var
|
|
11
|
+
* for depth.
|
|
12
|
+
*/
|
|
13
|
+
.root[data-active],
|
|
14
|
+
.root[aria-current='page'] {
|
|
15
|
+
font-weight: 600;
|
|
16
|
+
box-shadow: var(--vx-shadow-card);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/*
|
|
20
|
+
* Active-icon accent: only the leftSection (the icon, `data-position="left"`) turns accent-colored
|
|
21
|
+
* — the label stays ink (via `--nl-color`). Targets Mantine's own `data-position` attribute rather
|
|
22
|
+
* than a custom class, so the rightSection (child-expand chevron) is untouched.
|
|
23
|
+
*/
|
|
24
|
+
.root[data-active] [data-position='left'],
|
|
25
|
+
.root[aria-current='page'] [data-position='left'] {
|
|
26
|
+
color: var(--vx-accent);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/*
|
|
30
|
+
* Inactive rows: muted text, faint icon (docs/DESIGN-SPEC.md §5 Sidebar — "inactive = muted text,
|
|
31
|
+
* faint icon"). Mantine's own NavLink.css never sets a color on the base rule — it only colors the
|
|
32
|
+
* label under `[data-active]`/`[aria-current='page']` — so an inactive row otherwise falls through
|
|
33
|
+
* to the ambient `--mantine-color-text` (ink), same reasoning as the active-icon rule above.
|
|
34
|
+
*/
|
|
35
|
+
.root:not([data-active]):not([aria-current='page']) {
|
|
36
|
+
color: var(--vx-muted);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.root:not([data-active]):not([aria-current='page']) [data-position='left'] {
|
|
40
|
+
color: var(--vx-faint);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/*
|
|
44
|
+
* Inactive hover — the ink-6% ghost tint + ink text/icon (docs/DESIGN-SPEC.md §5). Lives here (not
|
|
45
|
+
* only in the shell module) so a consumer's `renderNavLink` path gets the same hover; Mantine's own
|
|
46
|
+
* hover fill uses `:where(scheme) .m_*:hover` (gray-0/dark-6), which this outranks on specificity.
|
|
47
|
+
* Active rows keep their panel fill + `--nl-hover` untouched.
|
|
48
|
+
*/
|
|
49
|
+
@media (hover: hover) {
|
|
50
|
+
.root:not([data-active]):not([aria-current='page']):hover {
|
|
51
|
+
background-color: color-mix(in srgb, var(--vx-ink) 6%, transparent);
|
|
52
|
+
color: var(--vx-ink);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.root:not([data-active]):not([aria-current='page']):hover [data-position='left'] {
|
|
56
|
+
color: var(--vx-ink);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/*
|
|
61
|
+
* Icon gap (docs/DESIGN-SPEC.md §5: "icon gap 10px") — Mantine pins the leftSection margin at
|
|
62
|
+
* `--mantine-spacing-sm` (12px) via a zero-specificity `:where()` rule; this lands the spec gap on
|
|
63
|
+
* every render path.
|
|
64
|
+
*/
|
|
65
|
+
.root [data-position='left'] {
|
|
66
|
+
margin-inline-end: 10px;
|
|
67
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Active-only label color + weight (docs/DESIGN-SPEC.md §5: "active segment = ... ink text weight
|
|
3
|
+
* 600; inactive = muted, transparent"). Mantine puts Mantine's own `data-active` attribute
|
|
4
|
+
* directly on the label element, so this targets it in place — same reasoning as NavLink's
|
|
5
|
+
* active-icon rule: the flat `styles.label` object in theme/index.ts applies to every option
|
|
6
|
+
* regardless of state, so the active-only rules have to live in a CSS module instead. Mantine's
|
|
7
|
+
* `--sc-label-color` var is only set per-label when a `color` prop is supplied (SegmentedControl's
|
|
8
|
+
* `theme.extend` `vars` resolver doesn't expose it), so without this the active label falls back
|
|
9
|
+
* to raw `--mantine-color-black`/`white` instead of the ink token.
|
|
10
|
+
*/
|
|
11
|
+
.label[data-active] {
|
|
12
|
+
color: var(--vx-ink);
|
|
13
|
+
font-weight: 600;
|
|
14
|
+
}
|
|
@@ -0,0 +1,421 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shadow-surface coverage — closes a class of bug `check-theme`'s regex scans cannot see: applying
|
|
3
|
+
* the depth token to the WRONG box.
|
|
4
|
+
*
|
|
5
|
+
* `--vx-shadow-card` (and `--vx-shadow-ctrl`) bakes a 1px ring into the shadow value itself (see
|
|
6
|
+
* `tokens/palette.ts`'s `SHADOW`). THE INVARIANT: an element applying the token must carry the
|
|
7
|
+
* surface's OWN `border-radius` — the ring is drawn by the shadow's rendering box and follows THAT
|
|
8
|
+
* box's own corners, not any other element's. We shipped a bug where `box-shadow: var(--vx-shadow-
|
|
9
|
+
* card)` landed on Mantine's Input WRAPPER, a bare `position: relative` box with `border-radius: 0`
|
|
10
|
+
* against an 8px rounded `<input>` inside it. The ring rendered square around a rounded corner,
|
|
11
|
+
* leaking visible grey nubs — a radius mismatch, not a missing background. (A shadowed box need not
|
|
12
|
+
* paint its OWN background: the ring is bound to the box's RADIUS, not its background — a transparent
|
|
13
|
+
* shadow box whose fill lives on a separate, identically-rounded box is legal as long as the two
|
|
14
|
+
* radii match. Background usually DOES co-locate, since most surfaces declare both on the same box —
|
|
15
|
+
* but it is the radius, not the background, that the ring is contractually bound to.) Nothing short of a
|
|
16
|
+
* mechanical inventory of every site that APPLIES the token would have caught it: a source-level
|
|
17
|
+
* guard can only flag a bad value, never a bad ELEMENT.
|
|
18
|
+
*
|
|
19
|
+
* This test IS that inventory: it scans basalt-ui's own source for every place that applies
|
|
20
|
+
* `--vx-shadow-card`/`--vx-shadow-ctrl` (a `box-shadow`/CSS-custom-property declaration in
|
|
21
|
+
* `*.module.css`, or a `boxShadow` object property — literal, `VX.shadowCard`/`VX.shadowCtrl`, or a
|
|
22
|
+
* template-literal composite of either — in `*.ts`/`*.tsx`) and asserts every one is registered in
|
|
23
|
+
* `SHADOW_SURFACES` below with a written `roundedBy` reason naming exactly where that box's
|
|
24
|
+
* `border-radius` comes from. Mere mentions in comments/docstrings and the token DEFINITION itself
|
|
25
|
+
* (`tokens/index.ts`, `tokens/palette.ts`) are excluded — this test only cares about APPLICATION.
|
|
26
|
+
*
|
|
27
|
+
* `roundedBy` is a REASON, not a rubber stamp: for several sites the radius is not co-declared on
|
|
28
|
+
* the same object/rule but arrives through a Mantine CSS var resolved elsewhere (`--button-radius`,
|
|
29
|
+
* `--ai-radius`, `--chip-radius`, `--input-radius`, `--card-radius`, `--notification-radius`) or an
|
|
30
|
+
* inline `styles.root.borderRadius` set in a different block of `theme/index.ts` (NavLink) — the
|
|
31
|
+
* whole point of writing it down is forcing whoever adds a new site to go verify that chain against
|
|
32
|
+
* Mantine's actual shipped CSS (`@mantine/core/styles/*.css`), not just copy the shadow line. A box
|
|
33
|
+
* that legitimately has `border-radius: 0` (a genuinely square surface) is a VALID reason too — say
|
|
34
|
+
* so plainly; a square ring on a square surface is correct, not a gap.
|
|
35
|
+
*
|
|
36
|
+
* THIS TEST IS DELIBERATELY COUPLED TO OUR OWN SOURCE. Adding a new `box-shadow: var(--vx-shadow-
|
|
37
|
+
* card)` (or `-ctrl`) anywhere SHOULD fail this test until it's registered — that failure IS the
|
|
38
|
+
* point. Do NOT "fix" a future failure by loosening the scan or bulk-registering with a placeholder
|
|
39
|
+
* reason; open the file, find the element the shadow is declared on, prove (or fix) that IT carries
|
|
40
|
+
* the surface's own border-radius, and write down where that radius comes from.
|
|
41
|
+
*
|
|
42
|
+
* NOTE — `overflow: hidden` does NOT threaten a box's own ring. An element's own outset `box-shadow`
|
|
43
|
+
* is painted outside its border box and is NOT clipped by that element's own `overflow` (only an
|
|
44
|
+
* ANCESTOR's overflow clips a descendant's shadow — verified in a browser). So a surface may safely
|
|
45
|
+
* carry `--vx-shadow-card` AND `overflow: hidden` on the SAME box (e.g. StatCard clipping a full-bleed
|
|
46
|
+
* sparkline). The outer/inner split some surfaces use (ChartCard) is about letting a DESCENDANT — an
|
|
47
|
+
* info-tooltip bubble — escape the clip, not about protecting the ring.
|
|
48
|
+
*/
|
|
49
|
+
import { readdirSync, readFileSync } from 'node:fs'
|
|
50
|
+
import { dirname, join, relative } from 'node:path'
|
|
51
|
+
import { fileURLToPath } from 'node:url'
|
|
52
|
+
import { describe, expect, test } from 'bun:test'
|
|
53
|
+
|
|
54
|
+
// ── Source scan ─────────────────────────────────────────────────────────────────────────────────
|
|
55
|
+
|
|
56
|
+
// `src/theme/../` — never a hardcoded absolute path, so the test keeps working regardless of where
|
|
57
|
+
// the repo is checked out.
|
|
58
|
+
const SRC_DIR = join(dirname(fileURLToPath(import.meta.url)), '..')
|
|
59
|
+
|
|
60
|
+
// The token's own DEFINITION files — every other mention is either an application (scanned) or a
|
|
61
|
+
// comment (ignored).
|
|
62
|
+
const DEFINITION_FILES = new Set(['tokens/index.ts', 'tokens/palette.ts'])
|
|
63
|
+
|
|
64
|
+
/** Recursively collects every `.css`/`.ts`/`.tsx` file under `SRC_DIR`, skipping `dist/` and test
|
|
65
|
+
* files (a test file, including this one, can quote the token in a string/comment without being an
|
|
66
|
+
* application site). */
|
|
67
|
+
function collectSourceFiles(dir: string, out: string[]): void {
|
|
68
|
+
for (const entry of readdirSync(dir, { withFileTypes: true })) {
|
|
69
|
+
if (entry.name === 'dist' || entry.name === 'node_modules') continue
|
|
70
|
+
const full = join(dir, entry.name)
|
|
71
|
+
if (entry.isDirectory()) {
|
|
72
|
+
collectSourceFiles(full, out)
|
|
73
|
+
continue
|
|
74
|
+
}
|
|
75
|
+
if (entry.name.endsWith('.test.ts') || entry.name.endsWith('.test.tsx')) continue
|
|
76
|
+
if (entry.name.endsWith('.css') || entry.name.endsWith('.ts') || entry.name.endsWith('.tsx')) {
|
|
77
|
+
out.push(full)
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
function stripCssComments(text: string): string {
|
|
83
|
+
return text.replace(/\/\*[\s\S]*?\*\//g, '')
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
// Strips `/* */` block comments and `//` line comments. The negative lookbehind on `//` excludes
|
|
87
|
+
// `://` (a URL) from being read as a comment start — not that we expect one here, but it's the
|
|
88
|
+
// standard guard against eating real code that happens to contain a protocol string.
|
|
89
|
+
function stripTsComments(text: string): string {
|
|
90
|
+
return text.replace(/\/\*[\s\S]*?\*\//g, '').replace(/(^|[^:])\/\/.*$/gm, '$1')
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
// A real application in CSS: `box-shadow:` OR a custom property (`--field-depth:`, the mechanism
|
|
94
|
+
// `.input` uses to receive the token conditionally) whose value contains the literal token var(). A
|
|
95
|
+
// bare mention of `--vx-shadow-card` in a comment never matches — comments are stripped first, and
|
|
96
|
+
// this requires an actual `property:` declaration.
|
|
97
|
+
const CSS_SHADOW_TOKEN =
|
|
98
|
+
/(?<![\w-])(?:box-shadow|--[\w-]+)\s*:\s*[^;]*var\(--vx-shadow-(?:card|ctrl)\)/
|
|
99
|
+
|
|
100
|
+
// A real application in TS/TSX: a `boxShadow` object property whose value is the literal CSS var
|
|
101
|
+
// string, `VX.shadowCard`/`VX.shadowCtrl`, or a template literal compositing either (e.g. the
|
|
102
|
+
// danger-zone ring: `` `${VX.shadowCard}, 0 0 0 1px ...` ``). Deliberately does NOT match
|
|
103
|
+
// `--vx-shadow-overlay` (a different, unrelated token) or a `boxShadow` string literal that doesn't
|
|
104
|
+
// reference either token (data-table's scroll-shadow, guard/index.ts's own regex source, etc.).
|
|
105
|
+
const TS_SHADOW_TOKEN =
|
|
106
|
+
/\bboxShadow\s*:\s*(?:'[^']*var\(--vx-shadow-(?:card|ctrl)\)[^']*'|`[^`]*(?:var\(--vx-shadow-(?:card|ctrl)\)|VX\.shadow(?:Card|Ctrl))[^`]*`|VX\.shadow(?:Card|Ctrl))/
|
|
107
|
+
|
|
108
|
+
type ShadowSite = {
|
|
109
|
+
/** Path relative to `src/`, e.g. `theme/controls.module.css`. */
|
|
110
|
+
readonly file: string
|
|
111
|
+
/** A stable, human-readable label for the box within that file — a CSS selector for `.css`
|
|
112
|
+
* files, or `Component.styles.slot`/a nearby object key for `.ts`/`.tsx` (`default` when a file
|
|
113
|
+
* has exactly one site and no enclosing key to name it, e.g. a bare inline `style={{}}`). */
|
|
114
|
+
readonly site: string
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/** Every rule in a CSS module whose declarations apply the token, keyed by the rule's own selector
|
|
118
|
+
* (multi-line selectors are collapsed to one line). Assumes flat, non-nested CSS (no native
|
|
119
|
+
* nesting) — the one `@media` block in this codebase sits after every shadow site, so a naive
|
|
120
|
+
* brace-pair scan never needs to understand at-rule nesting to find them. */
|
|
121
|
+
function cssShadowSites(relPath: string, text: string): ShadowSite[] {
|
|
122
|
+
const clean = stripCssComments(text)
|
|
123
|
+
const sites: ShadowSite[] = []
|
|
124
|
+
const RULE = /([^{}]+)\{([^{}]*)\}/g
|
|
125
|
+
let match: RegExpExecArray | null
|
|
126
|
+
while ((match = RULE.exec(clean))) {
|
|
127
|
+
const selector = match[1].trim().replace(/\s+/g, ' ')
|
|
128
|
+
const body = match[2]
|
|
129
|
+
if (CSS_SHADOW_TOKEN.test(body)) sites.push({ file: relPath, site: selector })
|
|
130
|
+
}
|
|
131
|
+
return sites
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
/** Every `boxShadow` application in a `.ts`/`.tsx` file, labeled by its nearest enclosing object
|
|
135
|
+
* key chain. Walks backward from each match: the first `key: {`-only line above it names the
|
|
136
|
+
* "slot" (`root`, `indicator`, `input`, …); continuing further back, the first `Name: Name.extend({`
|
|
137
|
+
* line names the Mantine component (`theme/index.ts`'s `components` block). Neither pattern found
|
|
138
|
+
* (a bare `style={{ … }}` object, common outside `theme/index.ts`) falls back to `'default'` — safe
|
|
139
|
+
* because every such file has exactly one site. */
|
|
140
|
+
function tsShadowSites(relPath: string, text: string): ShadowSite[] {
|
|
141
|
+
const clean = stripTsComments(text)
|
|
142
|
+
const lines = clean.split('\n')
|
|
143
|
+
const SLOT = /^\s*(\w+):\s*\{\s*$/
|
|
144
|
+
const COMPONENT = /^\s*(\w+):\s*\w+\.extend\(\{\s*$/
|
|
145
|
+
const LOOKBACK = 40
|
|
146
|
+
const sites: ShadowSite[] = []
|
|
147
|
+
for (const [i, line] of lines.entries()) {
|
|
148
|
+
if (!TS_SHADOW_TOKEN.test(line)) continue
|
|
149
|
+
let slot: string | null = null
|
|
150
|
+
let component: string | null = null
|
|
151
|
+
for (let j = i - 1; j >= 0 && j >= i - LOOKBACK; j--) {
|
|
152
|
+
if (slot === null) {
|
|
153
|
+
const slotMatch = SLOT.exec(lines[j])
|
|
154
|
+
if (slotMatch) {
|
|
155
|
+
slot = slotMatch[1]
|
|
156
|
+
continue
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
const componentMatch = COMPONENT.exec(lines[j])
|
|
160
|
+
if (componentMatch) {
|
|
161
|
+
component = componentMatch[1]
|
|
162
|
+
break
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
const label =
|
|
166
|
+
component !== null
|
|
167
|
+
? slot !== null
|
|
168
|
+
? `${component}.styles.${slot}`
|
|
169
|
+
: component
|
|
170
|
+
: (slot ?? 'default')
|
|
171
|
+
sites.push({ file: relPath, site: label })
|
|
172
|
+
}
|
|
173
|
+
return sites
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
/** Every application of `--vx-shadow-card`/`--vx-shadow-ctrl` across `src/**`. */
|
|
177
|
+
function scanShadowSites(): ShadowSite[] {
|
|
178
|
+
const files: string[] = []
|
|
179
|
+
collectSourceFiles(SRC_DIR, files)
|
|
180
|
+
const sites: ShadowSite[] = []
|
|
181
|
+
for (const file of files) {
|
|
182
|
+
const relPath = relative(SRC_DIR, file)
|
|
183
|
+
if (DEFINITION_FILES.has(relPath)) continue
|
|
184
|
+
const text = readFileSync(file, 'utf8')
|
|
185
|
+
if (file.endsWith('.css')) sites.push(...cssShadowSites(relPath, text))
|
|
186
|
+
else sites.push(...tsShadowSites(relPath, text))
|
|
187
|
+
}
|
|
188
|
+
return sites
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
function siteKey(site: ShadowSite): string {
|
|
192
|
+
return `${site.file} :: ${site.site}`
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
// ── SHADOW_SURFACES registry ────────────────────────────────────────────────────────────────────
|
|
196
|
+
|
|
197
|
+
type ShadowSurfaceEntry = ShadowSite & {
|
|
198
|
+
/** Where THIS box's `border-radius` comes from — a co-declared `border-radius`/`borderRadius` in
|
|
199
|
+
* the same rule/object, or a Mantine CSS var/prop resolved elsewhere, VERIFIED against Mantine's
|
|
200
|
+
* actual shipped CSS (`@mantine/core/styles/*.css`) or component source, never inferred from
|
|
201
|
+
* memory. A box with a genuine `border-radius: 0` is a valid reason too, stated plainly — a
|
|
202
|
+
* square ring on a square surface is correct. Never a placeholder — this is the thing a reviewer
|
|
203
|
+
* checks to confirm the ring actually follows this box's own, real corners. */
|
|
204
|
+
readonly roundedBy: string
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
/**
|
|
208
|
+
* The closed registry of every site in `src/**` that applies `--vx-shadow-card`/`--vx-shadow-ctrl`,
|
|
209
|
+
* each with a reasoned `roundedBy`. Modeled on `BORDER_ALLOWLIST` (`border-coverage.test.ts`) /
|
|
210
|
+
* `GUARD_RULES` (`guard/index.ts`): every entry is real, reviewable, and reasoned — never a bare
|
|
211
|
+
* string array.
|
|
212
|
+
*/
|
|
213
|
+
export const SHADOW_SURFACES: readonly ShadowSurfaceEntry[] = [
|
|
214
|
+
// ── theme/controls.module.css ────────────────────────────────────────────────────────────────
|
|
215
|
+
{
|
|
216
|
+
file: 'theme/controls.module.css',
|
|
217
|
+
site: ".input[data-variant='default']",
|
|
218
|
+
roundedBy:
|
|
219
|
+
"--input-radius (Mantine's own Input.css sets --input-radius: var(--mantine-radius-default) " +
|
|
220
|
+
'on the wrapper and consumes it via `border-radius: var(--input-radius)` directly on the ' +
|
|
221
|
+
'<input> element itself — the custom property inherits from wrapper to input, landing on the ' +
|
|
222
|
+
'exact element the shadow lands on).',
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
file: 'theme/controls.module.css',
|
|
226
|
+
site: ".buttonRoot[data-variant='default']",
|
|
227
|
+
roundedBy:
|
|
228
|
+
"--button-radius (Mantine's own Button.css declares `border-radius: var(--button-radius, " +
|
|
229
|
+
'var(--mantine-radius-default))` directly on the button root — the same element `.buttonRoot` ' +
|
|
230
|
+
'targets).',
|
|
231
|
+
},
|
|
232
|
+
{
|
|
233
|
+
file: 'theme/controls.module.css',
|
|
234
|
+
site: ".actionIconRoot[data-variant='default']",
|
|
235
|
+
roundedBy:
|
|
236
|
+
"--ai-radius (Mantine's own ActionIcon.css declares `border-radius: var(--ai-radius, " +
|
|
237
|
+
'var(--mantine-radius-default))` directly on the root — the same element `.actionIconRoot` ' +
|
|
238
|
+
'targets).',
|
|
239
|
+
},
|
|
240
|
+
{
|
|
241
|
+
file: 'theme/controls.module.css',
|
|
242
|
+
site: '.checkboxCardRoot[data-with-border], .radioCardRoot[data-with-border]',
|
|
243
|
+
roundedBy:
|
|
244
|
+
"--card-radius (Mantine's own CheckboxCard.css/RadioCard.css each declare `border-radius: " +
|
|
245
|
+
'var(--card-radius)` directly on the card root — the same element this rule targets).',
|
|
246
|
+
},
|
|
247
|
+
{
|
|
248
|
+
file: 'theme/controls.module.css',
|
|
249
|
+
site: '.chipLabel:not([data-checked]):not([data-disabled])',
|
|
250
|
+
roundedBy:
|
|
251
|
+
"--chip-radius (Mantine's own Chip.css declares `border-radius: var(--chip-radius, 1000rem)` " +
|
|
252
|
+
'directly on the label part — the same element `.chipLabel` targets).',
|
|
253
|
+
},
|
|
254
|
+
// ── theme/nav-link.module.css ────────────────────────────────────────────────────────────────
|
|
255
|
+
{
|
|
256
|
+
file: 'theme/nav-link.module.css',
|
|
257
|
+
site: ".root[data-active], .root[aria-current='page']",
|
|
258
|
+
roundedBy:
|
|
259
|
+
"borderRadius: 6 (theme/index.ts's NavLink.extend styles.root — Mantine renders this as an " +
|
|
260
|
+
'inline style on the root part, wired via `classNames: { root: navLinkClasses.root }` to the ' +
|
|
261
|
+
"exact `.root` element this rule's box-shadow lands on). Verified NOT a square surface: " +
|
|
262
|
+
"Mantine's own NavLink.css declares no border-radius at all for .root — the 6px comes only " +
|
|
263
|
+
'from our own theme override.',
|
|
264
|
+
},
|
|
265
|
+
// ── shell/app-mobile-nav.module.css ──────────────────────────────────────────────────────────
|
|
266
|
+
{
|
|
267
|
+
file: 'shell/app-mobile-nav.module.css',
|
|
268
|
+
site: '.sheet',
|
|
269
|
+
roundedBy:
|
|
270
|
+
'border-top-left-radius / border-top-right-radius: var(--mantine-radius-lg) (co-declared in ' +
|
|
271
|
+
'the same rule).',
|
|
272
|
+
},
|
|
273
|
+
// ── shell/sidebar-search.module.css ──────────────────────────────────────────────────────────
|
|
274
|
+
{
|
|
275
|
+
file: 'shell/sidebar-search.module.css',
|
|
276
|
+
site: '.trigger',
|
|
277
|
+
roundedBy:
|
|
278
|
+
'border-radius: var(--vx-radius-ctrl) (co-declared in the same .trigger rule, on the same ' +
|
|
279
|
+
"UnstyledButton root the box-shadow lands on — the ring follows this box's own corners). " +
|
|
280
|
+
'The collapsed `.railBtn` in the same file carries no shadow (radius only), so it is not a site.',
|
|
281
|
+
},
|
|
282
|
+
// ── theme/index.ts (baseTheme.components) ───────────────────────────────────────────────────
|
|
283
|
+
{
|
|
284
|
+
file: 'theme/index.ts',
|
|
285
|
+
site: 'Card.styles.root',
|
|
286
|
+
roundedBy:
|
|
287
|
+
"borderRadius: 'var(--vx-radius-card)' (co-declared in the same styles.root object).",
|
|
288
|
+
},
|
|
289
|
+
{
|
|
290
|
+
file: 'theme/index.ts',
|
|
291
|
+
site: 'Paper.styles.root',
|
|
292
|
+
roundedBy:
|
|
293
|
+
"borderRadius: 'var(--vx-radius-card)' (co-declared in the same styles.root object).",
|
|
294
|
+
},
|
|
295
|
+
{
|
|
296
|
+
file: 'theme/index.ts',
|
|
297
|
+
site: 'SegmentedControl.styles.indicator',
|
|
298
|
+
roundedBy: 'borderRadius: 5 (co-declared in the same styles.indicator object).',
|
|
299
|
+
},
|
|
300
|
+
{
|
|
301
|
+
file: 'theme/index.ts',
|
|
302
|
+
site: 'Notification.styles.root',
|
|
303
|
+
roundedBy:
|
|
304
|
+
'--notification-radius (defaultProps: { radius: 8 } on the same Notification.extend feeds ' +
|
|
305
|
+
"Mantine's own varsResolver — Notification.mjs sets `--notification-radius: getRadius(8)` " +
|
|
306
|
+
"on the root part; Mantine's own Notification.css declares `border-radius: var(--" +
|
|
307
|
+
'notification-radius)` on that same root element the styles.root boxShadow targets).',
|
|
308
|
+
},
|
|
309
|
+
// ── charts/primitives ────────────────────────────────────────────────────────────────────────
|
|
310
|
+
{
|
|
311
|
+
file: 'charts/primitives/ChartCard.tsx',
|
|
312
|
+
site: 'default',
|
|
313
|
+
roundedBy:
|
|
314
|
+
'Two shadowed boxes in this file, each co-declaring borderRadius: VX.radiusCard with its own ' +
|
|
315
|
+
'boxShadow (both fall back to the file-level default label). (1) cardStyle — the outer card box ' +
|
|
316
|
+
'co-declares borderRadius + boxShadow + backgroundColor, so the ring is bound to THIS radius and ' +
|
|
317
|
+
'matches. It carries NO overflow: the chart body clips itself on a separate inner box ' +
|
|
318
|
+
'(bodyClipStyle, identical bottom-corner radius, no shadow) so the header — and its info-tooltip ' +
|
|
319
|
+
'bubble — can escape the clip; the ring is safe on the outer box either way (an element’s own ' +
|
|
320
|
+
'overflow never clips its own shadow). (2) bubbleStyle — the info-tooltip bubble, a floating panel ' +
|
|
321
|
+
'surface whose ring likewise follows its co-declared card radius.',
|
|
322
|
+
},
|
|
323
|
+
{
|
|
324
|
+
file: 'charts/primitives/ChartTooltip.tsx',
|
|
325
|
+
site: 'default',
|
|
326
|
+
roundedBy: 'borderRadius: 8 (co-declared in the same TOOLTIP_STYLES object).',
|
|
327
|
+
},
|
|
328
|
+
// ── agent-chat ───────────────────────────────────────────────────────────────────────────────
|
|
329
|
+
{
|
|
330
|
+
file: 'agent-chat/composer.tsx',
|
|
331
|
+
site: 'input',
|
|
332
|
+
roundedBy: 'borderRadius: 8 (co-declared in the same styles.input object).',
|
|
333
|
+
},
|
|
334
|
+
{
|
|
335
|
+
file: 'agent-chat/thread-outcome-card.tsx',
|
|
336
|
+
site: 'default',
|
|
337
|
+
roundedBy: 'borderRadius: VX.radiusCard (co-declared in the same inline style object).',
|
|
338
|
+
},
|
|
339
|
+
{
|
|
340
|
+
file: 'agent-chat/thread-message.tsx',
|
|
341
|
+
site: 'default',
|
|
342
|
+
roundedBy: 'borderRadius: VX.radiusCard (co-declared in the same inline style object).',
|
|
343
|
+
},
|
|
344
|
+
// ── agent ────────────────────────────────────────────────────────────────────────────────────
|
|
345
|
+
{
|
|
346
|
+
file: 'agent/stick-to-bottom.tsx',
|
|
347
|
+
site: 'default',
|
|
348
|
+
roundedBy:
|
|
349
|
+
'borderRadius: 999 (co-declared in the same inline style object — a circular button).',
|
|
350
|
+
},
|
|
351
|
+
// ── dashboard ────────────────────────────────────────────────────────────────────────────────
|
|
352
|
+
{
|
|
353
|
+
file: 'dashboard/settings-section.tsx',
|
|
354
|
+
site: 'default',
|
|
355
|
+
roundedBy:
|
|
356
|
+
"Card.styles.root borderRadius: 'var(--vx-radius-card)' (theme/index.ts) — this DangerZone " +
|
|
357
|
+
"call site's inline `style` prop only overrides boxShadow (layering the danger-red ring on " +
|
|
358
|
+
"top); Card's themed border-radius stays active underneath on the same root element.",
|
|
359
|
+
},
|
|
360
|
+
]
|
|
361
|
+
|
|
362
|
+
// ── Tests ────────────────────────────────────────────────────────────────────────────────────────
|
|
363
|
+
|
|
364
|
+
describe('SHADOW_SURFACES is well-formed', () => {
|
|
365
|
+
test('every entry has a non-empty roundedBy reason', () => {
|
|
366
|
+
for (const entry of SHADOW_SURFACES) {
|
|
367
|
+
expect(entry.roundedBy.length).toBeGreaterThan(0)
|
|
368
|
+
}
|
|
369
|
+
})
|
|
370
|
+
|
|
371
|
+
test('no duplicate site entries', () => {
|
|
372
|
+
const keys = SHADOW_SURFACES.map(siteKey)
|
|
373
|
+
expect(new Set(keys).size).toBe(keys.length)
|
|
374
|
+
})
|
|
375
|
+
|
|
376
|
+
test('no orphaned entries — every registered site is still a real application in source', () => {
|
|
377
|
+
const found = new Set(scanShadowSites().map(siteKey))
|
|
378
|
+
const orphaned = SHADOW_SURFACES.map(siteKey).filter((key) => !found.has(key))
|
|
379
|
+
expect(orphaned).toEqual([])
|
|
380
|
+
})
|
|
381
|
+
})
|
|
382
|
+
|
|
383
|
+
describe('every applied --vx-shadow-card / --vx-shadow-ctrl site is registered', () => {
|
|
384
|
+
// The coverage assertion below is `expect(gaps).toEqual([])`, which passes VACUOUSLY if the scan
|
|
385
|
+
// finds nothing. That is exactly the failure mode `border-coverage.test.ts` already had to guard
|
|
386
|
+
// against once — this is the same tripwire: fail loudly here if the scan stops resolving real
|
|
387
|
+
// sites, rather than quietly nodding a broken scan through as "full coverage".
|
|
388
|
+
test('the scan actually resolves shadow-token application sites (guards against a vacuous pass)', () => {
|
|
389
|
+
const sites = scanShadowSites()
|
|
390
|
+
expect(sites.length).toBeGreaterThanOrEqual(8)
|
|
391
|
+
// .buttonRoot and Card/Paper are the origin sites of the doctrine (docs/DESIGN-SPEC.md §5) —
|
|
392
|
+
// if the scan can't see THEM, the scan is broken, whatever its total count says.
|
|
393
|
+
expect(
|
|
394
|
+
sites.some((s) => s.file === 'theme/controls.module.css' && s.site.includes('.buttonRoot')),
|
|
395
|
+
).toBe(true)
|
|
396
|
+
expect(sites.some((s) => s.file === 'theme/index.ts' && s.site === 'Card.styles.root')).toBe(
|
|
397
|
+
true,
|
|
398
|
+
)
|
|
399
|
+
expect(sites.some((s) => s.file === 'theme/index.ts' && s.site === 'Paper.styles.root')).toBe(
|
|
400
|
+
true,
|
|
401
|
+
)
|
|
402
|
+
})
|
|
403
|
+
|
|
404
|
+
test('every scanned site is registered with a reasoned roundedBy', () => {
|
|
405
|
+
const registered = new Set(SHADOW_SURFACES.map(siteKey))
|
|
406
|
+
|
|
407
|
+
const gaps = scanShadowSites()
|
|
408
|
+
.filter((site) => !registered.has(siteKey(site)))
|
|
409
|
+
.map(
|
|
410
|
+
(site) =>
|
|
411
|
+
`${site.file} (${site.site}): applies --vx-shadow-card/--vx-shadow-ctrl but has no ` +
|
|
412
|
+
'entry in SHADOW_SURFACES (src/theme/shadow-surfaces.test.ts). The ring baked into the ' +
|
|
413
|
+
"token follows THIS box's own border-radius — find where this box's radius comes from " +
|
|
414
|
+
'(a co-declared border-radius, or a Mantine CSS var/prop, verified against the shipped ' +
|
|
415
|
+
'@mantine/core CSS), and either register this site with a roundedBy reason, or fix the ' +
|
|
416
|
+
"radius mismatch if the box doesn't actually carry the surface's shape.",
|
|
417
|
+
)
|
|
418
|
+
|
|
419
|
+
expect(gaps).toEqual([])
|
|
420
|
+
})
|
|
421
|
+
})
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Timeline line + bullet idiom (docs/DESIGN-SPEC.md §5-adjacent activity feed). Custom-property
|
|
3
|
+
* declarations and state-dependent selectors are stripped from / unreachable through the flat
|
|
4
|
+
* `styles` object in theme/index.ts (same reasoning as SegmentedControl's active-label rule and
|
|
5
|
+
* NavLink's active-icon rule), so both live here instead.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
/* The connecting line reads `--item-border-color`, which Mantine's own CSS only ever sets to a
|
|
9
|
+
* raw gray-3/dark-4 step per scheme — retune it to the layout-divider token so the line stays a
|
|
10
|
+
* quiet hairline rather than the heavy default. */
|
|
11
|
+
.item {
|
|
12
|
+
--item-border-color: var(--vx-divider);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/* Default bullet: panel surface + a hairline ring, matching the shared card-adjacent surface
|
|
16
|
+
* idiom rather than Mantine's raw gray-3/dark-4 border + page-body fill. */
|
|
17
|
+
.itemBullet {
|
|
18
|
+
background-color: var(--vx-surface-panel);
|
|
19
|
+
border-color: var(--vx-surface-hairline);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/* Active bullet: solid accent fill + accent ring, text/icon in `on-accent` — regardless of
|
|
23
|
+
* whether the bullet carries child content (Mantine's own `[data-active]` rule only fills solid
|
|
24
|
+
* when a bullet child is present; a plain dot would otherwise render a white fill). */
|
|
25
|
+
.itemBullet[data-active] {
|
|
26
|
+
background-color: var(--vx-accentFill);
|
|
27
|
+
border-color: var(--vx-accentFill);
|
|
28
|
+
color: var(--vx-onAccent);
|
|
29
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Typed CSS-module declaration (the S4 CSS-modules path). Named string props — not an index
|
|
3
|
+
* signature — so dot access stays verbatim under the package's strict flags.
|
|
4
|
+
*/
|
|
5
|
+
declare const classes: {
|
|
6
|
+
readonly item: string
|
|
7
|
+
readonly itemBullet: string
|
|
8
|
+
}
|
|
9
|
+
export default classes
|