basalt-ui 0.3.0 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +70 -0
- package/CHANGELOG.md +216 -26
- package/LICENSE +201 -0
- package/README.md +434 -160
- package/agent/rules/basalt-agent.md +395 -0
- package/agent/rules/basalt-charts.md +170 -0
- package/agent/rules/basalt-commands.md +320 -0
- package/agent/rules/basalt-content.md +390 -0
- package/agent/rules/basalt-data.md +237 -0
- package/agent/rules/basalt-forms.md +186 -0
- package/agent/rules/basalt-mantine.md +327 -0
- package/agent/rules/basalt-notifications.md +264 -0
- package/agent/rules/basalt-query.md +130 -0
- package/agent/rules/basalt-router.md +173 -0
- package/agent/rules/basalt-state.md +99 -0
- package/agent/rules/basalt-tokens.md +148 -0
- package/agent/templates/CLAUDE-block.md.tpl +35 -0
- package/agent/templates/DESIGN.md.tpl +71 -0
- package/agent/templates/__root.tpl +31 -0
- package/agent/templates/query-client.ts.tpl +12 -0
- package/bin/basalt.mjs +14 -0
- package/configs/check.yml +29 -0
- package/configs/lefthook.yml +21 -0
- package/configs/oxfmt.json +8 -0
- package/configs/oxlint-plugin.js +269 -0
- package/configs/oxlint-plugin.test.ts +107 -0
- package/configs/oxlint.json +116 -0
- package/configs/tsconfig.base.json +20 -0
- package/configs/tsconfig.node.json +8 -0
- package/configs/tsconfig.react-app.json +8 -0
- package/dist/agent/ai-sdk-transport.d.ts +85 -0
- package/dist/agent/ai-sdk-transport.d.ts.map +1 -0
- package/dist/agent/ai-sdk-transport.js +109 -0
- package/dist/agent/history.d.ts +55 -0
- package/dist/agent/history.d.ts.map +1 -0
- package/dist/agent/history.js +32 -0
- package/dist/agent/index.d.ts +53 -0
- package/dist/agent/index.d.ts.map +1 -0
- package/dist/agent/index.js +23 -0
- package/dist/agent/outcome.d.ts +71 -0
- package/dist/agent/outcome.d.ts.map +1 -0
- package/dist/agent/outcome.js +30 -0
- package/dist/agent/part-list.d.ts +75 -0
- package/dist/agent/part-list.d.ts.map +1 -0
- package/dist/agent/part-list.js +127 -0
- package/dist/agent/parts.d.ts +91 -0
- package/dist/agent/parts.d.ts.map +1 -0
- package/dist/agent/parts.js +49 -0
- package/dist/agent/stick-to-bottom.d.ts +23 -0
- package/dist/agent/stick-to-bottom.d.ts.map +1 -0
- package/dist/agent/stick-to-bottom.js +73 -0
- package/dist/agent/thread.d.ts +124 -0
- package/dist/agent/thread.d.ts.map +1 -0
- package/dist/agent/thread.js +131 -0
- package/dist/agent/transport.d.ts +87 -0
- package/dist/agent/transport.d.ts.map +1 -0
- package/dist/agent/transport.js +21 -0
- package/dist/agent/use-agent-stream.d.ts +34 -0
- package/dist/agent/use-agent-stream.d.ts.map +1 -0
- package/dist/agent/use-agent-stream.js +56 -0
- package/dist/agent/use-agent-thread-runs.d.ts +72 -0
- package/dist/agent/use-agent-thread-runs.d.ts.map +1 -0
- package/dist/agent/use-agent-thread-runs.js +217 -0
- package/dist/agent-chat/composer.d.ts +18 -0
- package/dist/agent-chat/composer.d.ts.map +1 -0
- package/dist/agent-chat/composer.js +86 -0
- package/dist/agent-chat/index.d.ts +24 -0
- package/dist/agent-chat/index.d.ts.map +1 -0
- package/dist/agent-chat/index.js +15 -0
- package/dist/agent-chat/thread-detail-panel.d.ts +27 -0
- package/dist/agent-chat/thread-detail-panel.d.ts.map +1 -0
- package/dist/agent-chat/thread-detail-panel.js +108 -0
- package/dist/agent-chat/thread-feed.d.ts +18 -0
- package/dist/agent-chat/thread-feed.d.ts.map +1 -0
- package/dist/agent-chat/thread-feed.js +42 -0
- package/dist/agent-chat/thread-message.d.ts +31 -0
- package/dist/agent-chat/thread-message.d.ts.map +1 -0
- package/dist/agent-chat/thread-message.js +128 -0
- package/dist/agent-chat/thread-outcome-card.d.ts +19 -0
- package/dist/agent-chat/thread-outcome-card.d.ts.map +1 -0
- package/dist/agent-chat/thread-outcome-card.js +120 -0
- package/dist/agent-chat/thread-workspace.d.ts +27 -0
- package/dist/agent-chat/thread-workspace.d.ts.map +1 -0
- package/dist/agent-chat/thread-workspace.js +95 -0
- package/dist/charts/hooks/useChartSize.d.ts +25 -0
- package/dist/charts/hooks/useChartSize.d.ts.map +1 -0
- package/dist/charts/hooks/useChartSize.js +8 -0
- package/dist/charts/hooks/useChartTooltip.d.ts +13 -0
- package/dist/charts/hooks/useChartTooltip.d.ts.map +1 -0
- package/dist/charts/hooks/useChartTooltip.js +26 -0
- package/dist/charts/hooks/useHoverSync.d.ts +30 -0
- package/dist/charts/hooks/useHoverSync.d.ts.map +1 -0
- package/dist/charts/hooks/useHoverSync.js +70 -0
- package/dist/charts/hover-context.d.ts +21 -0
- package/dist/charts/hover-context.d.ts.map +1 -0
- package/dist/charts/hover-context.js +12 -0
- package/dist/charts/hover-sync.d.ts +14 -0
- package/dist/charts/hover-sync.d.ts.map +1 -0
- package/dist/charts/hover-sync.js +17 -0
- package/dist/charts/index.d.ts +47 -0
- package/dist/charts/index.d.ts.map +1 -0
- package/dist/charts/index.js +129 -0
- package/dist/charts/kinds/Bars.d.ts +129 -0
- package/dist/charts/kinds/Bars.d.ts.map +1 -0
- package/dist/charts/kinds/Bars.js +467 -0
- package/dist/charts/kinds/Donut.d.ts +65 -0
- package/dist/charts/kinds/Donut.d.ts.map +1 -0
- package/dist/charts/kinds/Donut.js +158 -0
- package/dist/charts/kinds/DualPanel.d.ts +67 -0
- package/dist/charts/kinds/DualPanel.d.ts.map +1 -0
- package/dist/charts/kinds/DualPanel.js +326 -0
- package/dist/charts/kinds/Heatmap.d.ts +59 -0
- package/dist/charts/kinds/Heatmap.d.ts.map +1 -0
- package/dist/charts/kinds/Heatmap.js +175 -0
- package/dist/charts/kinds/MultiLine.d.ts +73 -0
- package/dist/charts/kinds/MultiLine.d.ts.map +1 -0
- package/dist/charts/kinds/MultiLine.js +275 -0
- package/dist/charts/kinds/StackedArea.d.ts +35 -0
- package/dist/charts/kinds/StackedArea.d.ts.map +1 -0
- package/dist/charts/kinds/StackedArea.js +151 -0
- package/dist/charts/kinds/ZonedLine.d.ts +94 -0
- package/dist/charts/kinds/ZonedLine.d.ts.map +1 -0
- package/dist/charts/kinds/ZonedLine.js +218 -0
- package/dist/charts/primitives/AreaGradient.d.ts +18 -0
- package/dist/charts/primitives/AreaGradient.d.ts.map +1 -0
- package/dist/charts/primitives/AreaGradient.js +13 -0
- package/dist/charts/primitives/Axes.d.ts +22 -0
- package/dist/charts/primitives/Axes.d.ts.map +1 -0
- package/dist/charts/primitives/Axes.js +79 -0
- package/dist/charts/primitives/ChartCard.d.ts +14 -0
- package/dist/charts/primitives/ChartCard.d.ts.map +1 -0
- package/dist/charts/primitives/ChartCard.js +144 -0
- package/dist/charts/primitives/ChartFrame.d.ts +70 -0
- package/dist/charts/primitives/ChartFrame.d.ts.map +1 -0
- package/dist/charts/primitives/ChartFrame.js +77 -0
- package/dist/charts/primitives/ChartLegend.d.ts +36 -0
- package/dist/charts/primitives/ChartLegend.d.ts.map +1 -0
- package/dist/charts/primitives/ChartLegend.js +234 -0
- package/dist/charts/primitives/ChartTooltip.d.ts +34 -0
- package/dist/charts/primitives/ChartTooltip.d.ts.map +1 -0
- package/dist/charts/primitives/ChartTooltip.js +134 -0
- package/dist/charts/primitives/Crosshair.d.ts +23 -0
- package/dist/charts/primitives/Crosshair.d.ts.map +1 -0
- package/dist/charts/primitives/Crosshair.js +21 -0
- package/dist/charts/primitives/HoverOverlay.d.ts +9 -0
- package/dist/charts/primitives/HoverOverlay.d.ts.map +1 -0
- package/dist/charts/primitives/HoverOverlay.js +21 -0
- package/dist/charts/primitives/ResponsiveChart.d.ts +45 -0
- package/dist/charts/primitives/ResponsiveChart.d.ts.map +1 -0
- package/dist/charts/primitives/ResponsiveChart.js +24 -0
- package/dist/charts/primitives/ZoneRects.d.ts +38 -0
- package/dist/charts/primitives/ZoneRects.d.ts.map +1 -0
- package/dist/charts/primitives/ZoneRects.js +30 -0
- package/dist/charts/series.d.ts +99 -0
- package/dist/charts/series.d.ts.map +1 -0
- package/dist/charts/series.js +55 -0
- package/dist/charts/sparklines/BarSparkline.d.ts +13 -0
- package/dist/charts/sparklines/BarSparkline.d.ts.map +1 -0
- package/dist/charts/sparklines/BarSparkline.js +33 -0
- package/dist/charts/sparklines/LineSparkline.d.ts +15 -0
- package/dist/charts/sparklines/LineSparkline.d.ts.map +1 -0
- package/dist/charts/sparklines/LineSparkline.js +39 -0
- package/dist/charts/sparklines/index.d.ts +3 -0
- package/dist/charts/sparklines/index.d.ts.map +1 -0
- package/dist/charts/sparklines/index.js +6 -0
- package/dist/charts/theme.d.ts +21 -0
- package/dist/charts/theme.d.ts.map +1 -0
- package/dist/charts/theme.js +30 -0
- package/dist/charts/utils/domain.d.ts +20 -0
- package/dist/charts/utils/domain.d.ts.map +1 -0
- package/dist/charts/utils/domain.js +7 -0
- package/dist/charts/utils/format.d.ts +5 -0
- package/dist/charts/utils/format.d.ts.map +1 -0
- package/dist/charts/utils/format.js +27 -0
- package/dist/charts/utils/ticks.d.ts +5 -0
- package/dist/charts/utils/ticks.d.ts.map +1 -0
- package/dist/charts/utils/ticks.js +18 -0
- package/dist/cli/index.d.ts +273 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +907 -0
- package/dist/commands/ShortcutsHelp.d.ts +17 -0
- package/dist/commands/ShortcutsHelp.d.ts.map +1 -0
- package/dist/commands/ShortcutsHelp.js +64 -0
- package/dist/commands/define-commands.d.ts +140 -0
- package/dist/commands/define-commands.d.ts.map +1 -0
- package/dist/commands/define-commands.js +26 -0
- package/dist/commands/define-overlays.d.ts +134 -0
- package/dist/commands/define-overlays.d.ts.map +1 -0
- package/dist/commands/define-overlays.js +53 -0
- package/dist/commands/index.d.ts +42 -0
- package/dist/commands/index.d.ts.map +1 -0
- package/dist/commands/index.js +46 -0
- package/dist/commands/overlays-mount.d.ts +117 -0
- package/dist/commands/overlays-mount.d.ts.map +1 -0
- package/dist/commands/overlays-mount.js +116 -0
- package/dist/commands/projectors.d.ts +152 -0
- package/dist/commands/projectors.d.ts.map +1 -0
- package/dist/commands/projectors.js +87 -0
- package/dist/commands/shortcut-format.d.ts +48 -0
- package/dist/commands/shortcut-format.d.ts.map +1 -0
- package/dist/commands/shortcut-format.js +33 -0
- package/dist/commands/useCommandHotkeys.d.ts +14 -0
- package/dist/commands/useCommandHotkeys.d.ts.map +1 -0
- package/dist/commands/useCommandHotkeys.js +45 -0
- package/dist/connectivity/connectivity-indicator.d.ts +8 -0
- package/dist/connectivity/connectivity-indicator.d.ts.map +1 -0
- package/dist/connectivity/connectivity-indicator.js +203 -0
- package/dist/connectivity/connectivity-provider.d.ts +7 -0
- package/dist/connectivity/connectivity-provider.d.ts.map +1 -0
- package/dist/connectivity/connectivity-provider.js +125 -0
- package/dist/connectivity/index.d.ts +13 -0
- package/dist/connectivity/index.d.ts.map +1 -0
- package/dist/connectivity/index.js +8 -0
- package/dist/connectivity/types.d.ts +36 -0
- package/dist/connectivity/types.d.ts.map +1 -0
- package/dist/connectivity/types.js +0 -0
- package/dist/connectivity/use-connectivity.d.ts +3 -0
- package/dist/connectivity/use-connectivity.d.ts.map +1 -0
- package/dist/connectivity/use-connectivity.js +14 -0
- package/dist/content/article-actions.d.ts +39 -0
- package/dist/content/article-actions.d.ts.map +1 -0
- package/dist/content/article-actions.js +28 -0
- package/dist/content/article-card.d.ts +58 -0
- package/dist/content/article-card.d.ts.map +1 -0
- package/dist/content/article-card.js +76 -0
- package/dist/content/article-card.module.css +109 -0
- package/dist/content/article-card.module.css.d.ts +16 -0
- package/dist/content/article-filter-bar.d.ts +40 -0
- package/dist/content/article-filter-bar.d.ts.map +1 -0
- package/dist/content/article-filter-bar.js +56 -0
- package/dist/content/article-layout.d.ts +61 -0
- package/dist/content/article-layout.d.ts.map +1 -0
- package/dist/content/article-layout.js +71 -0
- package/dist/content/article-layout.module.css +131 -0
- package/dist/content/article-layout.module.css.d.ts +20 -0
- package/dist/content/article-model.d.ts +62 -0
- package/dist/content/article-model.d.ts.map +1 -0
- package/dist/content/article-model.js +41 -0
- package/dist/content/block-split.d.ts +24 -0
- package/dist/content/block-split.d.ts.map +1 -0
- package/dist/content/block-split.js +63 -0
- package/dist/content/callout-alert.d.ts +27 -0
- package/dist/content/callout-alert.d.ts.map +1 -0
- package/dist/content/callout-alert.js +59 -0
- package/dist/content/callout.d.ts +24 -0
- package/dist/content/callout.d.ts.map +1 -0
- package/dist/content/callout.js +59 -0
- package/dist/content/callout.module.css +77 -0
- package/dist/content/callout.module.css.d.ts +16 -0
- package/dist/content/code-block.d.ts +26 -0
- package/dist/content/code-block.d.ts.map +1 -0
- package/dist/content/code-block.js +41 -0
- package/dist/content/code-block.module.css +86 -0
- package/dist/content/code-block.module.css.d.ts +14 -0
- package/dist/content/copy-action.d.ts +29 -0
- package/dist/content/copy-action.d.ts.map +1 -0
- package/dist/content/copy-action.js +46 -0
- package/dist/content/fence-block.d.ts +19 -0
- package/dist/content/fence-block.d.ts.map +1 -0
- package/dist/content/fence-block.js +23 -0
- package/dist/content/glyphs.d.ts +18 -0
- package/dist/content/glyphs.d.ts.map +1 -0
- package/dist/content/glyphs.js +43 -0
- package/dist/content/guide.d.ts +47 -0
- package/dist/content/guide.d.ts.map +1 -0
- package/dist/content/guide.js +110 -0
- package/dist/content/guide.module.css +62 -0
- package/dist/content/guide.module.css.d.ts +13 -0
- package/dist/content/heading-anchor.d.ts +8 -0
- package/dist/content/heading-anchor.d.ts.map +1 -0
- package/dist/content/heading-anchor.js +23 -0
- package/dist/content/heading-components.d.ts +5 -0
- package/dist/content/heading-components.d.ts.map +1 -0
- package/dist/content/heading-components.js +41 -0
- package/dist/content/highlighter.d.ts +8 -0
- package/dist/content/highlighter.d.ts.map +1 -0
- package/dist/content/highlighter.js +85 -0
- package/dist/content/index.d.ts +45 -0
- package/dist/content/index.d.ts.map +1 -0
- package/dist/content/index.js +43 -0
- package/dist/content/markdown-hast.d.ts +23 -0
- package/dist/content/markdown-hast.d.ts.map +1 -0
- package/dist/content/markdown-hast.js +48 -0
- package/dist/content/markdown.d.ts +68 -0
- package/dist/content/markdown.d.ts.map +1 -0
- package/dist/content/markdown.js +180 -0
- package/dist/content/mdx.d.ts +20 -0
- package/dist/content/mdx.d.ts.map +1 -0
- package/dist/content/mdx.js +64 -0
- package/dist/content/mermaid.d.ts +32 -0
- package/dist/content/mermaid.d.ts.map +1 -0
- package/dist/content/mermaid.js +70 -0
- package/dist/content/mermaid.module.css +20 -0
- package/dist/content/mermaid.module.css.d.ts +8 -0
- package/dist/content/prose.d.ts +29 -0
- package/dist/content/prose.d.ts.map +1 -0
- package/dist/content/prose.js +24 -0
- package/dist/content/prose.module.css +330 -0
- package/dist/content/prose.module.css.d.ts +12 -0
- package/dist/content/reading-progress.d.ts +20 -0
- package/dist/content/reading-progress.d.ts.map +1 -0
- package/dist/content/reading-progress.js +38 -0
- package/dist/content/reading-progress.module.css +22 -0
- package/dist/content/reading-progress.module.css.d.ts +9 -0
- package/dist/content/slug.d.ts +28 -0
- package/dist/content/slug.d.ts.map +1 -0
- package/dist/content/slug.js +28 -0
- package/dist/content/toc.d.ts +37 -0
- package/dist/content/toc.d.ts.map +1 -0
- package/dist/content/toc.js +134 -0
- package/dist/content/toc.module.css +51 -0
- package/dist/content/toc.module.css.d.ts +13 -0
- package/dist/content/url-hardening.d.ts +23 -0
- package/dist/content/url-hardening.d.ts.map +1 -0
- package/dist/content/url-hardening.js +23 -0
- package/dist/dashboard/delta-badge.d.ts +13 -0
- package/dist/dashboard/delta-badge.d.ts.map +1 -0
- package/dist/dashboard/delta-badge.js +45 -0
- package/dist/dashboard/empty-state.d.ts +15 -0
- package/dist/dashboard/empty-state.d.ts.map +1 -0
- package/dist/dashboard/empty-state.js +56 -0
- package/dist/dashboard/index.d.ts +5 -0
- package/dist/dashboard/index.d.ts.map +1 -0
- package/dist/dashboard/index.js +16 -0
- package/dist/dashboard/settings-section.d.ts +24 -0
- package/dist/dashboard/settings-section.d.ts.map +1 -0
- package/dist/dashboard/settings-section.js +61 -0
- package/dist/dashboard/settings-section.module.css +23 -0
- package/dist/dashboard/settings-section.module.css.d.ts +10 -0
- package/dist/dashboard/stat-card.d.ts +18 -0
- package/dist/dashboard/stat-card.d.ts.map +1 -0
- package/dist/dashboard/stat-card.js +74 -0
- package/dist/data/data-table.d.ts +198 -0
- package/dist/data/data-table.d.ts.map +1 -0
- package/dist/data/data-table.js +342 -0
- package/dist/data/index.d.ts +34 -0
- package/dist/data/index.d.ts.map +1 -0
- package/dist/data/index.js +2 -0
- package/dist/data/table.d.ts +24 -0
- package/dist/data/table.d.ts.map +1 -0
- package/dist/data/table.js +20 -0
- package/dist/data/virtual-list.d.ts +74 -0
- package/dist/data/virtual-list.d.ts.map +1 -0
- package/dist/data/virtual-list.js +86 -0
- package/dist/data/virtual.d.ts +20 -0
- package/dist/data/virtual.d.ts.map +1 -0
- package/dist/data/virtual.js +4 -0
- package/dist/forms/FormErrorSummary.d.ts +29 -0
- package/dist/forms/FormErrorSummary.d.ts.map +1 -0
- package/dist/forms/FormErrorSummary.js +28 -0
- package/dist/forms/create-form.d.ts +31 -0
- package/dist/forms/create-form.d.ts.map +1 -0
- package/dist/forms/create-form.js +18 -0
- package/dist/forms/field.d.ts +22 -0
- package/dist/forms/field.d.ts.map +1 -0
- package/dist/forms/field.js +9 -0
- package/dist/forms/index.d.ts +17 -0
- package/dist/forms/index.d.ts.map +1 -0
- package/dist/forms/index.js +13 -0
- package/dist/forms/use-form-draft.d.ts +61 -0
- package/dist/forms/use-form-draft.d.ts.map +1 -0
- package/dist/forms/use-form-draft.js +55 -0
- package/dist/guard/guard-hook.d.ts +40 -0
- package/dist/guard/guard-hook.d.ts.map +1 -0
- package/dist/guard/guard-hook.js +55 -0
- package/dist/guard/index.d.ts +144 -0
- package/dist/guard/index.d.ts.map +1 -0
- package/dist/guard/index.js +315 -0
- package/dist/guard/types.d.ts +97 -0
- package/dist/guard/types.d.ts.map +1 -0
- package/dist/guard/types.js +0 -0
- package/dist/index.d.ts +24 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +90 -0
- package/dist/motion/index.d.ts +29 -0
- package/dist/motion/index.d.ts.map +1 -0
- package/dist/motion/index.js +12 -0
- package/dist/notifications/bell.d.ts +12 -0
- package/dist/notifications/bell.d.ts.map +1 -0
- package/dist/notifications/bell.js +84 -0
- package/dist/notifications/center.d.ts +20 -0
- package/dist/notifications/center.d.ts.map +1 -0
- package/dist/notifications/center.js +144 -0
- package/dist/notifications/define-notifications.d.ts +97 -0
- package/dist/notifications/define-notifications.d.ts.map +1 -0
- package/dist/notifications/define-notifications.js +27 -0
- package/dist/notifications/index.d.ts +36 -0
- package/dist/notifications/index.d.ts.map +1 -0
- package/dist/notifications/index.js +52 -0
- package/dist/notifications/notify.d.ts +92 -0
- package/dist/notifications/notify.d.ts.map +1 -0
- package/dist/notifications/notify.js +127 -0
- package/dist/notifications/overlay.d.ts +20 -0
- package/dist/notifications/overlay.d.ts.map +1 -0
- package/dist/notifications/overlay.js +12 -0
- package/dist/notifications/store.d.ts +120 -0
- package/dist/notifications/store.d.ts.map +1 -0
- package/dist/notifications/store.js +113 -0
- package/dist/provider/index.d.ts +93 -0
- package/dist/provider/index.d.ts.map +1 -0
- package/dist/provider/index.js +106 -0
- package/dist/query/devtools.d.ts +21 -0
- package/dist/query/devtools.d.ts.map +1 -0
- package/dist/query/devtools.js +12 -0
- package/dist/query/index.d.ts +65 -0
- package/dist/query/index.d.ts.map +1 -0
- package/dist/query/index.js +68 -0
- package/dist/register.d.ts +139 -0
- package/dist/register.d.ts.map +1 -0
- package/dist/register.js +6 -0
- package/dist/router-tanstack/index.d.ts +74 -0
- package/dist/router-tanstack/index.d.ts.map +1 -0
- package/dist/router-tanstack/index.js +29 -0
- package/dist/router-tanstack/multi-search-param-store.d.ts +78 -0
- package/dist/router-tanstack/multi-search-param-store.d.ts.map +1 -0
- package/dist/router-tanstack/multi-search-param-store.js +35 -0
- package/dist/router-tanstack/search-param-store.d.ts +92 -0
- package/dist/router-tanstack/search-param-store.d.ts.map +1 -0
- package/dist/router-tanstack/search-param-store.js +26 -0
- package/dist/shell/account-types.d.ts +118 -0
- package/dist/shell/account-types.d.ts.map +1 -0
- package/dist/shell/account-types.js +0 -0
- package/dist/shell/app-breadcrumbs.d.ts +17 -0
- package/dist/shell/app-breadcrumbs.d.ts.map +1 -0
- package/dist/shell/app-breadcrumbs.js +39 -0
- package/dist/shell/app-header.module.css +73 -0
- package/dist/shell/app-header.module.css.d.ts +11 -0
- package/dist/shell/app-mobile-nav.d.ts +26 -0
- package/dist/shell/app-mobile-nav.d.ts.map +1 -0
- package/dist/shell/app-mobile-nav.js +106 -0
- package/dist/shell/app-mobile-nav.module.css +100 -0
- package/dist/shell/app-mobile-nav.module.css.d.ts +14 -0
- package/dist/shell/app-sidebar-account.d.ts +3 -0
- package/dist/shell/app-sidebar-account.d.ts.map +1 -0
- package/dist/shell/app-sidebar-account.js +84 -0
- package/dist/shell/app-sidebar.d.ts +56 -0
- package/dist/shell/app-sidebar.d.ts.map +1 -0
- package/dist/shell/app-sidebar.js +455 -0
- package/dist/shell/app-sidebar.module.css +414 -0
- package/dist/shell/app-sidebar.module.css.d.ts +34 -0
- package/dist/shell/index.d.ts +123 -0
- package/dist/shell/index.d.ts.map +1 -0
- package/dist/shell/index.js +179 -0
- package/dist/shell/page-header.d.ts +13 -0
- package/dist/shell/page-header.d.ts.map +1 -0
- package/dist/shell/page-header.js +23 -0
- package/dist/shell/sidebar-search.d.ts +12 -0
- package/dist/shell/sidebar-search.d.ts.map +1 -0
- package/dist/shell/sidebar-search.js +62 -0
- package/dist/shell/sidebar-search.module.css +62 -0
- package/dist/shell/sidebar-search.module.css.d.ts +11 -0
- package/dist/state.d.ts +62 -0
- package/dist/state.d.ts.map +1 -0
- package/dist/state.js +124 -0
- package/dist/styles.css +166 -0
- package/dist/surfaces.d.ts +376 -0
- package/dist/surfaces.d.ts.map +1 -0
- package/dist/surfaces.js +306 -0
- package/dist/theme/controls.module.css +143 -0
- package/dist/theme/controls.module.css.d.ts +17 -0
- package/dist/theme/floating.module.css +35 -0
- package/dist/theme/floating.module.css.d.ts +9 -0
- package/dist/theme/index.d.ts +22 -0
- package/dist/theme/index.d.ts.map +1 -0
- package/dist/theme/index.js +733 -0
- package/dist/theme/nav-link.module.css +67 -0
- package/dist/theme/nav-link.module.css.d.ts +8 -0
- package/dist/theme/segmented-control.module.css +14 -0
- package/dist/theme/segmented-control.module.css.d.ts +8 -0
- package/dist/theme/timeline.module.css +29 -0
- package/dist/theme/timeline.module.css.d.ts +9 -0
- package/dist/theme-lab/index.d.ts +59 -0
- package/dist/theme-lab/index.d.ts.map +1 -0
- package/dist/theme-lab/index.js +263 -0
- package/dist/theme-toggle/index.d.ts +8 -0
- package/dist/theme-toggle/index.d.ts.map +1 -0
- package/dist/theme-toggle/index.js +155 -0
- package/dist/tokens/index.d.ts +151 -0
- package/dist/tokens/index.d.ts.map +1 -0
- package/dist/tokens/index.js +246 -0
- package/dist/tokens/palette.d.ts +304 -0
- package/dist/tokens/palette.d.ts.map +1 -0
- package/dist/tokens/palette.js +186 -0
- package/dist/vite.d.ts +30 -0
- package/dist/vite.d.ts.map +1 -0
- package/dist/vite.js +68 -0
- package/llms.txt +149 -0
- package/package.json +246 -37
- package/src/agent/ai-sdk-transport.ts +280 -0
- package/src/agent/history.ts +128 -0
- package/src/agent/index.ts +92 -0
- package/src/agent/outcome.ts +120 -0
- package/src/agent/part-list.tsx +292 -0
- package/src/agent/parts.ts +136 -0
- package/src/agent/stick-to-bottom.tsx +154 -0
- package/src/agent/thread.ts +312 -0
- package/src/agent/transport.ts +114 -0
- package/src/agent/use-agent-stream.ts +141 -0
- package/src/agent/use-agent-thread-runs.ts +440 -0
- package/src/agent-chat/composer.tsx +131 -0
- package/src/agent-chat/index.ts +35 -0
- package/src/agent-chat/thread-detail-panel.tsx +192 -0
- package/src/agent-chat/thread-feed.tsx +81 -0
- package/src/agent-chat/thread-message.tsx +251 -0
- package/src/agent-chat/thread-outcome-card.tsx +196 -0
- package/src/agent-chat/thread-workspace.tsx +179 -0
- package/src/charts/hooks/useChartSize.ts +31 -0
- package/src/charts/hooks/useChartTooltip.ts +31 -0
- package/src/charts/hooks/useHoverSync.ts +116 -0
- package/src/charts/hover-context.ts +28 -0
- package/src/charts/hover-sync.tsx +37 -0
- package/src/charts/index.ts +118 -0
- package/src/charts/kinds/Bars.tsx +634 -0
- package/src/charts/kinds/Donut.tsx +233 -0
- package/src/charts/kinds/DualPanel.tsx +432 -0
- package/src/charts/kinds/Heatmap.tsx +255 -0
- package/src/charts/kinds/MultiLine.tsx +376 -0
- package/src/charts/kinds/StackedArea.tsx +218 -0
- package/src/charts/kinds/ZonedLine.tsx +346 -0
- package/src/charts/primitives/AreaGradient.tsx +26 -0
- package/src/charts/primitives/Axes.tsx +97 -0
- package/src/charts/primitives/ChartCard.tsx +180 -0
- package/src/charts/primitives/ChartFrame.tsx +157 -0
- package/src/charts/primitives/ChartLegend.tsx +302 -0
- package/src/charts/primitives/ChartTooltip.tsx +158 -0
- package/src/charts/primitives/Crosshair.tsx +40 -0
- package/src/charts/primitives/HoverOverlay.tsx +24 -0
- package/src/charts/primitives/ResponsiveChart.tsx +64 -0
- package/src/charts/primitives/ZoneRects.tsx +67 -0
- package/src/charts/series.ts +163 -0
- package/src/charts/sparklines/BarSparkline.tsx +48 -0
- package/src/charts/sparklines/LineSparkline.tsx +57 -0
- package/src/charts/sparklines/index.ts +2 -0
- package/src/charts/theme.tsx +53 -0
- package/src/charts/utils/domain.test.ts +24 -0
- package/src/charts/utils/domain.ts +22 -0
- package/src/charts/utils/format.ts +27 -0
- package/src/charts/utils/ticks.ts +18 -0
- package/src/cli/check-theme.test.ts +658 -0
- package/src/cli/index.ts +1497 -0
- package/src/cli/init-sync.test.ts +160 -0
- package/src/commands/ShortcutsHelp.tsx +129 -0
- package/src/commands/define-commands.ts +184 -0
- package/src/commands/define-overlays.ts +197 -0
- package/src/commands/index.ts +86 -0
- package/src/commands/overlays-mount.tsx +301 -0
- package/src/commands/projectors.ts +267 -0
- package/src/commands/shortcut-format.ts +83 -0
- package/src/commands/useCommandHotkeys.ts +114 -0
- package/src/connectivity/connectivity-indicator.tsx +249 -0
- package/src/connectivity/connectivity-provider.tsx +186 -0
- package/src/connectivity/index.ts +18 -0
- package/src/connectivity/types.ts +39 -0
- package/src/connectivity/use-connectivity.ts +25 -0
- package/src/content/article-actions.test.ts +78 -0
- package/src/content/article-actions.ts +72 -0
- package/src/content/article-card.module.css +109 -0
- package/src/content/article-card.module.css.d.ts +16 -0
- package/src/content/article-card.tsx +173 -0
- package/src/content/article-filter-bar.tsx +88 -0
- package/src/content/article-layout.module.css +131 -0
- package/src/content/article-layout.module.css.d.ts +20 -0
- package/src/content/article-layout.tsx +167 -0
- package/src/content/article-model.test.ts +119 -0
- package/src/content/article-model.ts +110 -0
- package/src/content/block-split.test.ts +75 -0
- package/src/content/block-split.ts +102 -0
- package/src/content/callout-alert.ts +88 -0
- package/src/content/callout.module.css +77 -0
- package/src/content/callout.module.css.d.ts +16 -0
- package/src/content/callout.tsx +96 -0
- package/src/content/code-block.module.css +86 -0
- package/src/content/code-block.module.css.d.ts +14 -0
- package/src/content/code-block.tsx +82 -0
- package/src/content/copy-action.tsx +79 -0
- package/src/content/fence-block.tsx +39 -0
- package/src/content/glyphs.tsx +53 -0
- package/src/content/guide.module.css +62 -0
- package/src/content/guide.module.css.d.ts +13 -0
- package/src/content/guide.tsx +174 -0
- package/src/content/heading-anchor.tsx +54 -0
- package/src/content/heading-components.tsx +62 -0
- package/src/content/highlighter.ts +123 -0
- package/src/content/index.ts +60 -0
- package/src/content/markdown-hast.ts +80 -0
- package/src/content/markdown.tsx +346 -0
- package/src/content/mdx.tsx +127 -0
- package/src/content/mermaid.module.css +20 -0
- package/src/content/mermaid.module.css.d.ts +8 -0
- package/src/content/mermaid.tsx +124 -0
- package/src/content/prose.module.css +330 -0
- package/src/content/prose.module.css.d.ts +12 -0
- package/src/content/prose.tsx +53 -0
- package/src/content/reading-progress.module.css +22 -0
- package/src/content/reading-progress.module.css.d.ts +9 -0
- package/src/content/reading-progress.tsx +67 -0
- package/src/content/slug.test.ts +62 -0
- package/src/content/slug.ts +57 -0
- package/src/content/toc.module.css +51 -0
- package/src/content/toc.module.css.d.ts +13 -0
- package/src/content/toc.tsx +226 -0
- package/src/content/url-hardening.ts +46 -0
- package/src/dashboard/delta-badge.tsx +70 -0
- package/src/dashboard/empty-state.tsx +80 -0
- package/src/dashboard/index.ts +11 -0
- package/src/dashboard/settings-section.module.css +23 -0
- package/src/dashboard/settings-section.module.css.d.ts +10 -0
- package/src/dashboard/settings-section.tsx +118 -0
- package/src/dashboard/stat-card.tsx +105 -0
- package/src/data/data-table.tsx +695 -0
- package/src/data/index.ts +37 -0
- package/src/data/table.ts +46 -0
- package/src/data/virtual-list.tsx +180 -0
- package/src/data/virtual.ts +21 -0
- package/src/forms/FormErrorSummary.tsx +64 -0
- package/src/forms/create-form.ts +57 -0
- package/src/forms/field.ts +30 -0
- package/src/forms/index.ts +26 -0
- package/src/forms/use-form-draft.ts +170 -0
- package/src/guard/check-source.test.ts +834 -0
- package/src/guard/guard-hook.test.ts +173 -0
- package/src/guard/guard-hook.ts +122 -0
- package/src/guard/index.ts +510 -0
- package/src/guard/types.ts +117 -0
- package/src/index.ts +139 -0
- package/src/motion/index.ts +26 -0
- package/src/notifications/bell.tsx +108 -0
- package/src/notifications/center.tsx +245 -0
- package/src/notifications/define-notifications.ts +162 -0
- package/src/notifications/index.ts +79 -0
- package/src/notifications/notify.tsx +260 -0
- package/src/notifications/overlay.tsx +64 -0
- package/src/notifications/store.ts +287 -0
- package/src/provider/index.tsx +234 -0
- package/src/query/devtools.tsx +38 -0
- package/src/query/index.ts +129 -0
- package/src/register.ts +158 -0
- package/src/router-tanstack/index.ts +111 -0
- package/src/router-tanstack/multi-search-param-store.test.ts +56 -0
- package/src/router-tanstack/multi-search-param-store.ts +122 -0
- package/src/router-tanstack/search-param-store.ts +125 -0
- package/src/shell/account-types.ts +119 -0
- package/src/shell/app-breadcrumbs.tsx +90 -0
- package/src/shell/app-header.module.css +73 -0
- package/src/shell/app-header.module.css.d.ts +11 -0
- package/src/shell/app-mobile-nav.module.css +100 -0
- package/src/shell/app-mobile-nav.module.css.d.ts +14 -0
- package/src/shell/app-mobile-nav.tsx +146 -0
- package/src/shell/app-sidebar-account.tsx +142 -0
- package/src/shell/app-sidebar.module.css +414 -0
- package/src/shell/app-sidebar.module.css.d.ts +34 -0
- package/src/shell/app-sidebar.tsx +632 -0
- package/src/shell/index.tsx +343 -0
- package/src/shell/page-header.tsx +35 -0
- package/src/shell/sidebar-search.module.css +62 -0
- package/src/shell/sidebar-search.module.css.d.ts +11 -0
- package/src/shell/sidebar-search.tsx +80 -0
- package/src/state.ts +246 -0
- package/src/styles.css +166 -0
- package/src/styles.floor.test.ts +36 -0
- package/src/surfaces.ts +489 -0
- package/src/theme/border-coverage.test.ts +272 -0
- package/src/theme/contrast.test.ts +306 -0
- package/src/theme/controls.module.css +143 -0
- package/src/theme/controls.module.css.d.ts +17 -0
- package/src/theme/floating.module.css +35 -0
- package/src/theme/floating.module.css.d.ts +9 -0
- package/src/theme/index.ts +933 -0
- package/src/theme/nav-link.module.css +67 -0
- package/src/theme/nav-link.module.css.d.ts +8 -0
- package/src/theme/segmented-control.module.css +14 -0
- package/src/theme/segmented-control.module.css.d.ts +8 -0
- package/src/theme/shadow-surfaces.test.ts +421 -0
- package/src/theme/timeline.module.css +29 -0
- package/src/theme/timeline.module.css.d.ts +9 -0
- package/src/theme-lab/index.tsx +359 -0
- package/src/theme-lab/theme-lab.test.ts +60 -0
- package/src/theme-toggle/index.tsx +180 -0
- package/src/tokens/index.ts +363 -0
- package/src/tokens/palette.ts +288 -0
- package/src/vite.ts +122 -0
- package/src/index.css +0 -986
- package/src/starlight.css +0 -308
- package/tailwind.config.js +0 -78
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { describe, expect, test } from 'bun:test'
|
|
2
|
+
import { createMultiSearchParamStore } from './multi-search-param-store'
|
|
3
|
+
|
|
4
|
+
const VALUES = ['api', 'design', 'guide'] as const
|
|
5
|
+
|
|
6
|
+
describe('createMultiSearchParamStore', () => {
|
|
7
|
+
describe('validateSearch', () => {
|
|
8
|
+
test('URL value wins when it decodes to a non-empty array', () => {
|
|
9
|
+
const store = createMultiSearchParamStore({ key: 'tags-a', param: 'tags', values: VALUES })
|
|
10
|
+
expect(store.validateSearch({ tags: ['api'] })).toEqual({ tags: ['api'] })
|
|
11
|
+
})
|
|
12
|
+
|
|
13
|
+
test('an allowlist rejects unknown/tampered values', () => {
|
|
14
|
+
const store = createMultiSearchParamStore({ key: 'tags-b', param: 'tags', values: VALUES })
|
|
15
|
+
expect(store.validateSearch({ tags: ['api', 'not-a-real-tag'] })).toEqual({ tags: ['api'] })
|
|
16
|
+
})
|
|
17
|
+
|
|
18
|
+
test('dedupes repeated entries', () => {
|
|
19
|
+
const store = createMultiSearchParamStore({ key: 'tags-c', param: 'tags', values: VALUES })
|
|
20
|
+
expect(store.validateSearch({ tags: ['api', 'api', 'design'] })).toEqual({
|
|
21
|
+
tags: ['api', 'design'],
|
|
22
|
+
})
|
|
23
|
+
})
|
|
24
|
+
|
|
25
|
+
test('canonically re-orders into the values declaration order', () => {
|
|
26
|
+
const store = createMultiSearchParamStore({ key: 'tags-d', param: 'tags', values: VALUES })
|
|
27
|
+
const a = store.validateSearch({ tags: ['design', 'api'] })
|
|
28
|
+
const b = store.validateSearch({ tags: ['api', 'design'] })
|
|
29
|
+
expect(a).toEqual(b)
|
|
30
|
+
expect(a.tags).toEqual(['api', 'design'])
|
|
31
|
+
})
|
|
32
|
+
|
|
33
|
+
test('a non-array URL value falls through to the fallback (no localStorage in this env)', () => {
|
|
34
|
+
const store = createMultiSearchParamStore({ key: 'tags-e', param: 'tags', values: VALUES })
|
|
35
|
+
expect(store.validateSearch({ tags: 'api' })).toEqual({ tags: [] })
|
|
36
|
+
expect(store.validateSearch({})).toEqual({ tags: [] })
|
|
37
|
+
})
|
|
38
|
+
|
|
39
|
+
test('an empty URL array falls through to the fallback', () => {
|
|
40
|
+
const store = createMultiSearchParamStore({
|
|
41
|
+
key: 'tags-f',
|
|
42
|
+
param: 'tags',
|
|
43
|
+
values: VALUES,
|
|
44
|
+
fallback: ['guide'],
|
|
45
|
+
})
|
|
46
|
+
expect(store.validateSearch({ tags: [] })).toEqual({ tags: ['guide'] })
|
|
47
|
+
})
|
|
48
|
+
})
|
|
49
|
+
|
|
50
|
+
describe('readStored', () => {
|
|
51
|
+
test('returns null when nothing is persisted (no localStorage in this test environment)', () => {
|
|
52
|
+
const store = createMultiSearchParamStore({ key: 'tags-g', param: 'tags', values: VALUES })
|
|
53
|
+
expect(store.readStored()).toBeNull()
|
|
54
|
+
})
|
|
55
|
+
})
|
|
56
|
+
})
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* createMultiSearchParamStore — the multi-select sibling of `createSearchParamStore`, for search
|
|
3
|
+
* params backed by an ANY-OF set (e.g. a tag filter) instead of a single value (e.g. a tab).
|
|
4
|
+
*
|
|
5
|
+
* Same three-concern factory shape as `createSearchParamStore`:
|
|
6
|
+
* 1. `validateSearch` — pass directly to `createFileRoute({ validateSearch })`.
|
|
7
|
+
* Falls back to localStorage when the URL param is absent or invalid, then to `fallback`.
|
|
8
|
+
* 2. `useStore` — React hook: `const [values, persist] = store.useStore()`.
|
|
9
|
+
* Call `persist(next)` alongside `navigate` so the selection survives navigation.
|
|
10
|
+
* 3. `readStored` — plain function for non-React contexts (tests, guards).
|
|
11
|
+
*
|
|
12
|
+
* Headless — no Mantine, no JSX. Same tier as `createSearchParamStore`.
|
|
13
|
+
*
|
|
14
|
+
* ## Encoding — array-native, not CSV
|
|
15
|
+
*
|
|
16
|
+
* TanStack Router's default search serialization is `stringifySearchWith(JSON.stringify,
|
|
17
|
+
* JSON.parse)`, and its `stringifyValue` branches on `typeof val === 'object' && val !== null` —
|
|
18
|
+
* an array is an object, so `{ tags: ['a', 'b'] }` serializes to `?tags=%5B%22a%22%2C%22b%22%5D`
|
|
19
|
+
* and `parseSearchWith(JSON.parse)` reverses it losslessly. This store deals entirely in arrays
|
|
20
|
+
* (what `validateSearch` returns is exactly what the router stringifies), so a CSV encoding is not
|
|
21
|
+
* reachable from here — there is no string-building step to intercept. A consumer who wants
|
|
22
|
+
* prettier URLs (e.g. `?tags=a,b`) configures router-global `parseSearch`/`stringifySearch` (see
|
|
23
|
+
* TanStack Router's documented custom-search-param-serialization recipe); this store keeps working
|
|
24
|
+
* untouched either way, because it hands the router an array, not an encoding.
|
|
25
|
+
*
|
|
26
|
+
* ## Decoding — defensive and canonical
|
|
27
|
+
*
|
|
28
|
+
* Any value pulled from the URL or localStorage is normalized in this order:
|
|
29
|
+
* 1. Accept only `Array.isArray` input — anything else decodes to empty.
|
|
30
|
+
* 2. Keep only entries present in `opts.values` (drops tampered values and values dropped from the
|
|
31
|
+
* vocabulary since the URL/localStorage entry was written).
|
|
32
|
+
* 3. Dedupe.
|
|
33
|
+
* 4. Re-sort into `opts.values` DECLARATION order.
|
|
34
|
+
*
|
|
35
|
+
* Canonical ordering means `['api', 'design']` and `['design', 'api']` normalize to the SAME
|
|
36
|
+
* array — one URL for one logical selection, so history entries and any loader cache keyed on the
|
|
37
|
+
* search stay stable regardless of the order a user toggled filters in.
|
|
38
|
+
*
|
|
39
|
+
* @example
|
|
40
|
+
* export const articleTags = createMultiSearchParamStore({
|
|
41
|
+
* key: 'article-tags', param: 'tags',
|
|
42
|
+
* values: ['api', 'design', 'guide'] as const,
|
|
43
|
+
* })
|
|
44
|
+
*
|
|
45
|
+
* export const Route = createFileRoute('/content')({
|
|
46
|
+
* validateSearch: articleTags.validateSearch,
|
|
47
|
+
* })
|
|
48
|
+
*/
|
|
49
|
+
|
|
50
|
+
import { createPersistedState, readPersistedValue } from '../state'
|
|
51
|
+
|
|
52
|
+
// ── Types ──────────────────────────────────────────────────────────────────
|
|
53
|
+
|
|
54
|
+
export type MultiSearchParamStoreOptions<T extends string, P extends string = string> = {
|
|
55
|
+
/** localStorage key (namespaced `basalt:<key>` automatically). */
|
|
56
|
+
key: string
|
|
57
|
+
/** URL search-param name (e.g. `"tags"`, `"categories"`). */
|
|
58
|
+
param: P
|
|
59
|
+
/** Allowed values — `as const` for best type inference. Also the canonical sort order. */
|
|
60
|
+
values: readonly T[]
|
|
61
|
+
/** Factory default when nothing is in the URL or localStorage. Default `[]` (unfiltered). */
|
|
62
|
+
fallback?: readonly T[]
|
|
63
|
+
/** Envelope version — bump when `values` change to discard stale localStorage. */
|
|
64
|
+
version?: number
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export type MultiSearchParamStore<T extends string, P extends string = string> = {
|
|
68
|
+
/**
|
|
69
|
+
* validateSearch — pass directly to `createFileRoute({ validateSearch })`.
|
|
70
|
+
* Falls back to localStorage, then to `fallback`.
|
|
71
|
+
*/
|
|
72
|
+
validateSearch: (search: Record<string, unknown>) => { [K in P]: readonly T[] }
|
|
73
|
+
/**
|
|
74
|
+
* React hook: `const [current, persist] = store.useStore()`.
|
|
75
|
+
* Call `persist(next)` in your filter's `onChange` alongside `navigate()`.
|
|
76
|
+
*/
|
|
77
|
+
useStore: () => readonly [readonly T[], (next: readonly T[]) => void]
|
|
78
|
+
/** Plain read — for use outside React (tests, guards, fallback reads). */
|
|
79
|
+
readStored: () => readonly T[] | null
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
// ── Implementation ─────────────────────────────────────────────────────────
|
|
83
|
+
|
|
84
|
+
export function createMultiSearchParamStore<const T extends string, const P extends string>(
|
|
85
|
+
opts: MultiSearchParamStoreOptions<T, P>,
|
|
86
|
+
): MultiSearchParamStore<T, P> {
|
|
87
|
+
const version = opts.version ?? 1
|
|
88
|
+
const fallback = opts.fallback ?? []
|
|
89
|
+
const allowed = new Set<string>(opts.values)
|
|
90
|
+
|
|
91
|
+
/** Array-only, allowlist-filtered, deduped, canonically re-sorted into `opts.values` order. */
|
|
92
|
+
const normalize = (raw: unknown): readonly T[] => {
|
|
93
|
+
if (!Array.isArray(raw)) return []
|
|
94
|
+
const present = new Set<T>()
|
|
95
|
+
for (const entry of raw) {
|
|
96
|
+
if (typeof entry === 'string' && allowed.has(entry)) present.add(entry as T)
|
|
97
|
+
}
|
|
98
|
+
return opts.values.filter((value) => present.has(value))
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
const readStored = (): readonly T[] | null => {
|
|
102
|
+
const raw = readPersistedValue(opts.key, version)
|
|
103
|
+
if (!Array.isArray(raw)) return null
|
|
104
|
+
return normalize(raw)
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
const validateSearch = (search: Record<string, unknown>): { [K in P]: readonly T[] } => {
|
|
108
|
+
const fromUrl = normalize(search[opts.param])
|
|
109
|
+
if (fromUrl.length > 0) {
|
|
110
|
+
return { [opts.param]: fromUrl } as { [K in P]: readonly T[] }
|
|
111
|
+
}
|
|
112
|
+
return { [opts.param]: readStored() ?? fallback } as { [K in P]: readonly T[] }
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
const useStore = createPersistedState<readonly T[]>({
|
|
116
|
+
key: opts.key,
|
|
117
|
+
version,
|
|
118
|
+
initial: fallback,
|
|
119
|
+
})
|
|
120
|
+
|
|
121
|
+
return { validateSearch, useStore, readStored }
|
|
122
|
+
}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* createSearchParamStore — bridge between TanStack Router URL search params and
|
|
3
|
+
* basalt-ui's localStorage persistence.
|
|
4
|
+
*
|
|
5
|
+
* Combines three concerns into one factory:
|
|
6
|
+
* 1. `validateSearch` — pass directly to `createFileRoute({ validateSearch })`.
|
|
7
|
+
* Falls back to localStorage when the URL param is absent or invalid.
|
|
8
|
+
* 2. `useStore` — React hook: `const [value, persist] = store.useStore()`.
|
|
9
|
+
* Call `persist(next)` alongside `navigate` so the selection survives
|
|
10
|
+
* navigation away from and back to the route.
|
|
11
|
+
* 3. `readStored` — plain function for non-React contexts (tests, guards).
|
|
12
|
+
*
|
|
13
|
+
* Headless — no Mantine, no JSX. Same tier as `useBasaltNav` and
|
|
14
|
+
* `useRouterBreadcrumbs`.
|
|
15
|
+
*
|
|
16
|
+
* ## Full integration recipe (5 steps)
|
|
17
|
+
*
|
|
18
|
+
* **1. Define** — one call per search param, e.g. in a shared lib/ module:
|
|
19
|
+
*
|
|
20
|
+
* export const dashboardRange = createSearchParamStore({
|
|
21
|
+
* key: 'dashboard-range', param: 'range',
|
|
22
|
+
* values: ['1d', '7d', '30d'] as const, fallback: '30d',
|
|
23
|
+
* })
|
|
24
|
+
*
|
|
25
|
+
* **2. Route** — plug validateSearch into the parent layout route:
|
|
26
|
+
*
|
|
27
|
+
* export const Route = createFileRoute('/dashboard')({
|
|
28
|
+
* validateSearch: dashboardRange.validateSearch,
|
|
29
|
+
* component: DashboardLayout, // renders <DateFilter/> + <Outlet/>
|
|
30
|
+
* })
|
|
31
|
+
*
|
|
32
|
+
* **3. Filter** — a component in the shell header (PageActions portal):
|
|
33
|
+
*
|
|
34
|
+
* function DateFilter() {
|
|
35
|
+
* const { range } = useSearch({ from: '/dashboard' })
|
|
36
|
+
* const [, persist] = dashboardRange.useStore()
|
|
37
|
+
* return <SegmentedControl value={range}
|
|
38
|
+
* onChange={(v) => { persist(v); navigate({ to: '.',
|
|
39
|
+
* search: (prev) => ({ ...prev, range: v }) }) }} />
|
|
40
|
+
* }
|
|
41
|
+
*
|
|
42
|
+
* **4. Page** — accepts the param as a **prop**, NOT from useSearch:
|
|
43
|
+
*
|
|
44
|
+
* // CRITICAL: never call useSearch({ from: '/dashboard' }) in a page
|
|
45
|
+
* // component that renders on a sibling route (e.g. /activity).
|
|
46
|
+
* // Sibling routes aren't children — the `from` fails.
|
|
47
|
+
* function DashboardPage({ range = '30d' }: { range?: DateRange }) {
|
|
48
|
+
* const data = useMemo(() => generateData(range), [range])
|
|
49
|
+
* return <Charts data={data} range={range} />
|
|
50
|
+
* }
|
|
51
|
+
*
|
|
52
|
+
* **5. Nav links** — carry the param across sub-pages via search={true},
|
|
53
|
+
* guarded by a path-prefix check so non-dashboard links stay clean:
|
|
54
|
+
*
|
|
55
|
+
* const renderNavLink = (item, { active }) => {
|
|
56
|
+
* const isDashboard = item.href?.startsWith('/dashboard/')
|
|
57
|
+
* || item.href === '/dashboard'
|
|
58
|
+
* return <MantineNavLink component={Link} to={item.href}
|
|
59
|
+
* {...(isDashboard ? { search: true } : {})}
|
|
60
|
+
* label={item.label} active={active} />
|
|
61
|
+
* }
|
|
62
|
+
*/
|
|
63
|
+
|
|
64
|
+
import { createPersistedState, readPersistedValue } from '../state'
|
|
65
|
+
|
|
66
|
+
// ── Types ──────────────────────────────────────────────────────────────────
|
|
67
|
+
|
|
68
|
+
export type SearchParamStoreOptions<T extends string, P extends string = string> = {
|
|
69
|
+
/** localStorage key (namespaced `basalt:<key>` automatically). */
|
|
70
|
+
key: string
|
|
71
|
+
/** URL search-param name (e.g. `"range"`, `"tab"`, `"filter"`). */
|
|
72
|
+
param: P
|
|
73
|
+
/** Allowed values — `as const` for best type inference. */
|
|
74
|
+
values: readonly T[]
|
|
75
|
+
/** Factory default when nothing is in the URL or localStorage. */
|
|
76
|
+
fallback: T
|
|
77
|
+
/** Envelope version — bump when `values` change to discard stale localStorage. */
|
|
78
|
+
version?: number
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export type SearchParamStore<T extends string, P extends string = string> = {
|
|
82
|
+
/**
|
|
83
|
+
* validateSearch — pass directly to `createFileRoute({ validateSearch })`.
|
|
84
|
+
* Falls back to localStorage, then to `fallback`.
|
|
85
|
+
*/
|
|
86
|
+
validateSearch: (search: Record<string, unknown>) => { [K in P]: T }
|
|
87
|
+
/**
|
|
88
|
+
* React hook: `const [current, persist] = store.useStore()`.
|
|
89
|
+
* Call `persist(next)` in your filter's `onChange` alongside `navigate()`.
|
|
90
|
+
*/
|
|
91
|
+
useStore: () => readonly [T, (next: T) => void]
|
|
92
|
+
/** Plain read — for use outside React (tests, guards, fallback reads). */
|
|
93
|
+
readStored: () => T | null
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
// ── Implementation ─────────────────────────────────────────────────────────
|
|
97
|
+
|
|
98
|
+
export function createSearchParamStore<const T extends string, const P extends string>(
|
|
99
|
+
opts: SearchParamStoreOptions<T, P>,
|
|
100
|
+
): SearchParamStore<T, P> {
|
|
101
|
+
const version = opts.version ?? 1
|
|
102
|
+
|
|
103
|
+
const readStored = (): T | null => {
|
|
104
|
+
const raw = readPersistedValue(opts.key, version)
|
|
105
|
+
if (typeof raw !== 'string') return null
|
|
106
|
+
if ((opts.values as readonly string[]).includes(raw)) return raw as T
|
|
107
|
+
return null
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
const validateSearch = (search: Record<string, unknown>): { [K in P]: T } => {
|
|
111
|
+
const raw = search[opts.param]
|
|
112
|
+
if (typeof raw === 'string' && (opts.values as readonly string[]).includes(raw)) {
|
|
113
|
+
return { [opts.param]: raw as T } as { [K in P]: T }
|
|
114
|
+
}
|
|
115
|
+
return { [opts.param]: (readStored() ?? opts.fallback) as T } as { [K in P]: T }
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
const useStore = createPersistedState<T>({
|
|
119
|
+
key: opts.key,
|
|
120
|
+
version,
|
|
121
|
+
initial: opts.fallback,
|
|
122
|
+
})
|
|
123
|
+
|
|
124
|
+
return { validateSearch, useStore, readStored }
|
|
125
|
+
}
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Provider-agnostic account contract for the sidebar footer (`SidebarAccount`). Mantine-free —
|
|
3
|
+
* these are plain types; the consumer's real auth client (Better Auth, Clerk, a homegrown session
|
|
4
|
+
* hook, …) maps into `BasaltAccountState` + `BasaltAccountActions`. basalt-ui has zero dependency
|
|
5
|
+
* on any auth library and ships no `./auth` subpath — this is the seam, not an adapter.
|
|
6
|
+
*/
|
|
7
|
+
import type { ReactNode } from 'react'
|
|
8
|
+
|
|
9
|
+
/** Badge tone for a role/plan chip. No dedicated tone union exists elsewhere in the shell/tokens
|
|
10
|
+
* layers, so this is defined locally. */
|
|
11
|
+
export type AccountBadgeTone = 'neutral' | 'brand' | 'success' | 'warn'
|
|
12
|
+
|
|
13
|
+
/** The signed-in user's identity. `image` is nullable and currently unused by `SidebarAccount`
|
|
14
|
+
* (which renders a generic, non-personalized icon rather than an avatar/initials) — kept on the
|
|
15
|
+
* contract for consumers that surface it elsewhere (e.g. an account settings page). */
|
|
16
|
+
export type BasaltIdentity = {
|
|
17
|
+
id: string
|
|
18
|
+
name: string
|
|
19
|
+
email: string
|
|
20
|
+
image?: string | null
|
|
21
|
+
emailVerified?: boolean
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/** An optional role chip (e.g. org role, admin flag). */
|
|
25
|
+
export type BasaltRole = {
|
|
26
|
+
label: string
|
|
27
|
+
key?: string
|
|
28
|
+
tone?: AccountBadgeTone
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/** An optional plan/billing chip. `isFree` gates the "Upgrade" menu entry. */
|
|
32
|
+
export type BasaltPlan = {
|
|
33
|
+
key: string
|
|
34
|
+
label: string
|
|
35
|
+
status?: 'active' | 'trialing' | 'past_due' | 'canceled' | 'none'
|
|
36
|
+
isFree?: boolean
|
|
37
|
+
renewsAt?: Date | null
|
|
38
|
+
tone?: AccountBadgeTone
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/** A consumer-supplied extra entry appended to the account menu, before the divider + sign-out. */
|
|
42
|
+
export type AccountMenuItem = {
|
|
43
|
+
key: string
|
|
44
|
+
label: string
|
|
45
|
+
icon?: ReactNode
|
|
46
|
+
onClick: () => void
|
|
47
|
+
danger?: boolean
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* The account's current state — a discriminated union so `SidebarAccount` renders exactly one of
|
|
52
|
+
* a loading skeleton, a compact sign-in control, or the full identity row. Nothing here assumes a
|
|
53
|
+
* particular auth library; the consumer derives this from whatever session hook it already has.
|
|
54
|
+
*/
|
|
55
|
+
export type BasaltAccountState =
|
|
56
|
+
| { status: 'loading' }
|
|
57
|
+
| { status: 'unauthenticated' }
|
|
58
|
+
| { status: 'authenticated'; identity: BasaltIdentity; role?: BasaltRole; plan?: BasaltPlan }
|
|
59
|
+
|
|
60
|
+
/** Callbacks wired by the consumer; each menu entry only renders when its callback is present. */
|
|
61
|
+
export type BasaltAccountActions = {
|
|
62
|
+
onSignIn?: () => void
|
|
63
|
+
onSignOut?: () => void | Promise<void>
|
|
64
|
+
onManageAccount?: () => void
|
|
65
|
+
onManageBilling?: () => void
|
|
66
|
+
/** Surfaced only when `plan.isFree` is true. */
|
|
67
|
+
onUpgrade?: () => void
|
|
68
|
+
extraMenuItems?: AccountMenuItem[]
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Props for `SidebarAccount` (and the `account` prop threaded through `AppSidebar`/`BasaltShell`).
|
|
73
|
+
* Presentational only — basalt-ui has no auth dependency; the consumer maps its real auth client
|
|
74
|
+
* into this shape.
|
|
75
|
+
*
|
|
76
|
+
* ## Better-Auth mapping recipe (documentation only — basalt-ui does NOT depend on better-auth)
|
|
77
|
+
*
|
|
78
|
+
* - `identity` ← `authClient.useSession().data.user` (`id`/`name`/`email`/`image`/`emailVerified`).
|
|
79
|
+
* - `state.status` ← derived from `useSession()`: `isPending` → `'loading'`; `data == null` →
|
|
80
|
+
* `'unauthenticated'`; else `'authenticated'`.
|
|
81
|
+
* - `role` ← the admin plugin's `session.user.role`, or the org plugin's
|
|
82
|
+
* `authClient.organization.useActiveMember().data.role`.
|
|
83
|
+
* - `plan` ← a billing adapter, provider-specific:
|
|
84
|
+
* - Polar: `authClient.customer.state().activeSubscriptions[]` (none ⇒
|
|
85
|
+
* `{ key: 'free', isFree: true }`).
|
|
86
|
+
* - Stripe: `authClient.subscription.list()`.
|
|
87
|
+
* - `onSignOut` ← `authClient.signOut(...)`.
|
|
88
|
+
* - `onManageBilling` ← Polar `authClient.customer.portal()`.
|
|
89
|
+
* - `onUpgrade` ← `authClient.checkout({ slug })`.
|
|
90
|
+
* - `onManageAccount` ← an account route built on `authClient.updateUser`/`authClient.changeEmail`.
|
|
91
|
+
*
|
|
92
|
+
* **Reactivity caveat:** only client `authClient.*` calls re-render `useSession` — a known Better
|
|
93
|
+
* Auth issue (better-auth#3608). Server-side mutations need a manual refetch/invalidate.
|
|
94
|
+
*
|
|
95
|
+
* @example
|
|
96
|
+
* const { data, isPending } = authClient.useSession()
|
|
97
|
+
* const account: BasaltAccountProps = {
|
|
98
|
+
* state: isPending
|
|
99
|
+
* ? { status: 'loading' }
|
|
100
|
+
* : data == null
|
|
101
|
+
* ? { status: 'unauthenticated' }
|
|
102
|
+
* : { status: 'authenticated', identity: data.user, plan: myPlan },
|
|
103
|
+
* actions: {
|
|
104
|
+
* onSignIn: () => authClient.signIn.social({ provider: 'google' }),
|
|
105
|
+
* onSignOut: () => authClient.signOut(),
|
|
106
|
+
* onManageBilling: () => authClient.customer.portal(),
|
|
107
|
+
* },
|
|
108
|
+
* }
|
|
109
|
+
* <BasaltShell {...rest} account={account} />
|
|
110
|
+
*/
|
|
111
|
+
export type BasaltAccountProps = {
|
|
112
|
+
state: BasaltAccountState
|
|
113
|
+
actions?: BasaltAccountActions
|
|
114
|
+
/**
|
|
115
|
+
* Renders the identity's email beneath the name. Defaults to false — hidden by default since a
|
|
116
|
+
* consumer app on a shared screen/screenshot may not want the email visible.
|
|
117
|
+
*/
|
|
118
|
+
showEmail?: boolean
|
|
119
|
+
}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Slim top-bar breadcrumb: `Section / Page`. Section is muted (nav context), page is emphasized.
|
|
3
|
+
*
|
|
4
|
+
* Grounded verbatim in argo `apps/dashboard/src/components/app-shell/app-breadcrumbs.tsx`. This is
|
|
5
|
+
* a real, presentational component (no app coupling) — not a stub.
|
|
6
|
+
*
|
|
7
|
+
* Typography (docs/DESIGN-SPEC.md §5) is applied via the `style` prop rather than a CSS module:
|
|
8
|
+
* the sizes come off the `VX.text` ladder, plus a `font-stretch` Mantine `Text` has no prop for.
|
|
9
|
+
* Matches the existing house pattern for shell-local micro-typography (see `SectionLabel` in
|
|
10
|
+
* `app-sidebar.tsx`) and sidesteps any CSS-module-vs-Mantine-stylesheet cascade-order ambiguity in
|
|
11
|
+
* a consumer's bundler.
|
|
12
|
+
*/
|
|
13
|
+
import { Anchor, Group, Text } from '@mantine/core'
|
|
14
|
+
import type { CSSProperties, ReactNode } from 'react'
|
|
15
|
+
import { VX } from '../tokens'
|
|
16
|
+
|
|
17
|
+
export type BreadcrumbLinkRenderer = (href: string, label: string) => ReactNode
|
|
18
|
+
|
|
19
|
+
/** Parent/section crumbs — faint. */
|
|
20
|
+
const crumbStyle: CSSProperties = { fontSize: VX.text.md, color: 'var(--vx-faint)' }
|
|
21
|
+
|
|
22
|
+
/** `/` separators — in the "line" (strong border) color. */
|
|
23
|
+
const separatorStyle: CSSProperties = { fontSize: VX.text.md, color: 'var(--vx-surface-border)' }
|
|
24
|
+
|
|
25
|
+
/** The active page — head font at 88% stretch, weight 550, ink. */
|
|
26
|
+
const currentStyle: CSSProperties = {
|
|
27
|
+
fontFamily: 'var(--basalt-font-head, var(--basalt-font-sans, ui-sans-serif, sans-serif))',
|
|
28
|
+
fontStretch: '88%',
|
|
29
|
+
fontSize: VX.text.lg,
|
|
30
|
+
fontWeight: 550,
|
|
31
|
+
color: 'var(--vx-ink)',
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export function AppBreadcrumbs({
|
|
35
|
+
section,
|
|
36
|
+
parent,
|
|
37
|
+
parentHref,
|
|
38
|
+
renderBreadcrumbLink,
|
|
39
|
+
page,
|
|
40
|
+
}: {
|
|
41
|
+
section?: string
|
|
42
|
+
/** Parent item label — shown when the active page is a nested child (e.g. "Dashboard"). */
|
|
43
|
+
parent?: string | undefined
|
|
44
|
+
/** Parent item href — when provided, the parent label renders as a clickable link. */
|
|
45
|
+
parentHref?: string | undefined
|
|
46
|
+
/**
|
|
47
|
+
* Optional router link renderer for the parent breadcrumb segment. When provided, the parent
|
|
48
|
+
* label is rendered through this callback instead of a plain `<a href>`, enabling client-side
|
|
49
|
+
* navigation (e.g. TanStack `<Link>`).
|
|
50
|
+
*/
|
|
51
|
+
renderBreadcrumbLink?: BreadcrumbLinkRenderer | undefined
|
|
52
|
+
page?: string
|
|
53
|
+
}) {
|
|
54
|
+
if (!page) return null
|
|
55
|
+
return (
|
|
56
|
+
<Group gap={6} wrap="nowrap" style={{ minWidth: 0 }}>
|
|
57
|
+
{section && (
|
|
58
|
+
<>
|
|
59
|
+
<Text style={crumbStyle} truncate>
|
|
60
|
+
{section}
|
|
61
|
+
</Text>
|
|
62
|
+
<Text style={separatorStyle}>/</Text>
|
|
63
|
+
</>
|
|
64
|
+
)}
|
|
65
|
+
{parent && parentHref && (
|
|
66
|
+
<>
|
|
67
|
+
{renderBreadcrumbLink ? (
|
|
68
|
+
renderBreadcrumbLink(parentHref, parent)
|
|
69
|
+
) : (
|
|
70
|
+
<Anchor style={crumbStyle} underline="never" href={parentHref} truncate>
|
|
71
|
+
{parent}
|
|
72
|
+
</Anchor>
|
|
73
|
+
)}
|
|
74
|
+
<Text style={separatorStyle}>/</Text>
|
|
75
|
+
</>
|
|
76
|
+
)}
|
|
77
|
+
{parent && !parentHref && (
|
|
78
|
+
<>
|
|
79
|
+
<Text style={crumbStyle} truncate>
|
|
80
|
+
{parent}
|
|
81
|
+
</Text>
|
|
82
|
+
<Text style={separatorStyle}>/</Text>
|
|
83
|
+
</>
|
|
84
|
+
)}
|
|
85
|
+
<Text style={currentStyle} truncate>
|
|
86
|
+
{page}
|
|
87
|
+
</Text>
|
|
88
|
+
</Group>
|
|
89
|
+
)
|
|
90
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/* App-shell top bar layout. Desktop: a single 56px row —
|
|
2
|
+
* [burger? · breadcrumb] ········ [page actions] | [global actions].
|
|
3
|
+
* Mobile (< sm): wraps to two rows — lead + global on row 1, the page action row
|
|
4
|
+
* (horizontally scrollable) on row 2. Header height is responsive to match. */
|
|
5
|
+
|
|
6
|
+
/*
|
|
7
|
+
* Transparent header (docs/DESIGN-SPEC.md §5): NO bottom rule at all. The header and the page body
|
|
8
|
+
* share the same page background, so a separator only draws a line across an already-continuous
|
|
9
|
+
* surface. The AppShell's own built-in border is disabled too (`withBorder={false}` in index.tsx).
|
|
10
|
+
*/
|
|
11
|
+
.bar {
|
|
12
|
+
display: flex;
|
|
13
|
+
align-items: center;
|
|
14
|
+
gap: var(--mantine-spacing-sm);
|
|
15
|
+
width: 100%;
|
|
16
|
+
height: 100%;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.lead {
|
|
20
|
+
display: flex;
|
|
21
|
+
align-items: center;
|
|
22
|
+
gap: var(--mantine-spacing-sm);
|
|
23
|
+
flex-shrink: 0;
|
|
24
|
+
min-width: 0;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.pageActions {
|
|
28
|
+
flex: 1 1 auto;
|
|
29
|
+
min-width: 0;
|
|
30
|
+
display: flex;
|
|
31
|
+
align-items: center;
|
|
32
|
+
justify-content: flex-end;
|
|
33
|
+
gap: var(--mantine-spacing-xs);
|
|
34
|
+
overflow-x: auto;
|
|
35
|
+
scrollbar-width: thin;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/* Keep the whole control row on one horizontally-scrollable line. Mantine Group
|
|
39
|
+
* defaults to flex-wrap:wrap, which otherwise stacks the nested control groups and
|
|
40
|
+
* clips them against the slim bar's fixed height. */
|
|
41
|
+
.pageActions :global(.mantine-Group-root) {
|
|
42
|
+
flex-wrap: nowrap;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.global {
|
|
46
|
+
display: flex;
|
|
47
|
+
align-items: center;
|
|
48
|
+
gap: var(--mantine-spacing-xs);
|
|
49
|
+
flex-shrink: 0;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
@media (max-width: 47.99em) {
|
|
53
|
+
.bar {
|
|
54
|
+
flex-wrap: wrap;
|
|
55
|
+
align-content: center;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.lead {
|
|
59
|
+
order: 1;
|
|
60
|
+
flex: 1 1 auto;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.global {
|
|
64
|
+
order: 2;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.pageActions {
|
|
68
|
+
order: 3;
|
|
69
|
+
flex-basis: 100%;
|
|
70
|
+
height: 52px;
|
|
71
|
+
justify-content: flex-start;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
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 bar: string
|
|
7
|
+
readonly lead: string
|
|
8
|
+
readonly pageActions: string
|
|
9
|
+
readonly global: string
|
|
10
|
+
}
|
|
11
|
+
export default classes
|