basalt-ui 1.28.0 → 1.29.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 +11 -18
- package/CHANGELOG.md +13 -0
- package/MIGRATING.md +151 -7
- package/README.md +23 -66
- package/agent/rules/basalt-batteries.md +59 -182
- package/agent/rules/basalt-charts.md +56 -75
- package/agent/rules/basalt-controls.md +38 -69
- package/agent/rules/basalt-mantine.md +58 -103
- package/agent/rules/basalt-state.md +42 -60
- package/agent/rules/basalt-tokens.md +46 -67
- package/agent/skills/basalt-app/SKILL.md +2 -0
- package/agent/templates/CLAUDE-block.md.tpl +14 -14
- package/configs/oxlint-plugin.js +70 -167
- package/configs/oxlint-plugin.test.ts +20 -186
- package/configs/oxlint.json +0 -1
- package/dist/agent/ai-sdk-transport.d.ts.map +1 -1
- package/dist/agent/ai-sdk-transport.js +7 -4
- package/dist/agent/coalesce.js +1 -1
- package/dist/agent/merge.js +1 -1
- package/dist/agent/transport.d.ts +13 -2
- package/dist/agent/transport.d.ts.map +1 -1
- package/dist/agent/use-agent-thread-runs.d.ts +12 -1
- package/dist/agent/use-agent-thread-runs.d.ts.map +1 -1
- package/dist/agent/use-agent-thread-runs.js +20 -6
- package/dist/agent-chat/index.d.ts +1 -1
- package/dist/agent-chat/index.d.ts.map +1 -1
- package/dist/agent-chat/relative-time.js +1 -1
- package/dist/agent-chat/thread-detail-panel.js +1 -1
- package/dist/agent-chat/thread-feed-row.d.ts +32 -7
- package/dist/agent-chat/thread-feed-row.d.ts.map +1 -1
- package/dist/agent-chat/thread-feed-row.js +121 -86
- package/dist/agent-chat/thread-feed.d.ts +11 -1
- package/dist/agent-chat/thread-feed.d.ts.map +1 -1
- package/dist/agent-chat/thread-feed.js +10 -6
- package/dist/agent-chat/thread-message.js +1 -1
- package/dist/agent-chat/virtualize.d.ts +39 -0
- package/dist/agent-chat/virtualize.d.ts.map +1 -1
- package/dist/agent-chat/virtualize.js +15 -0
- package/dist/charts/index.d.ts +3 -3
- package/dist/charts/index.d.ts.map +1 -1
- package/dist/charts/index.js +8 -4
- package/dist/charts/kinds/BandStrip.js +1 -1
- package/dist/charts/kinds/Bars.d.ts +1 -3
- package/dist/charts/kinds/Bars.d.ts.map +1 -1
- package/dist/charts/kinds/Bars.js +1 -1
- package/dist/charts/kinds/DualPanel.d.ts +3 -1
- package/dist/charts/kinds/DualPanel.d.ts.map +1 -1
- package/dist/charts/kinds/DualPanel.js +1 -1
- package/dist/charts/kinds/StackedArea.js +1 -1
- package/dist/charts/kinds/ZonedLine.d.ts +1 -3
- package/dist/charts/kinds/ZonedLine.d.ts.map +1 -1
- package/dist/charts/primitives/Axes.d.ts +21 -2
- package/dist/charts/primitives/Axes.d.ts.map +1 -1
- package/dist/charts/primitives/Axes.js +34 -2
- package/dist/charts/primitives/ChartCard.d.ts +20 -4
- package/dist/charts/primitives/ChartCard.d.ts.map +1 -1
- package/dist/charts/primitives/ChartCard.js +62 -33
- package/dist/charts/primitives/ChartFrame.d.ts.map +1 -1
- package/dist/charts/primitives/ChartFrame.js +8 -1
- package/dist/charts/primitives/ChartPending.d.ts +12 -6
- package/dist/charts/primitives/ChartPending.d.ts.map +1 -1
- package/dist/charts/primitives/ChartPending.js +1 -1
- package/dist/charts/utils/format.d.ts +5 -92
- package/dist/charts/utils/format.d.ts.map +1 -1
- package/dist/charts/utils/format.js +10 -80
- package/dist/cli/audit-allows.d.ts +24 -0
- package/dist/cli/audit-allows.d.ts.map +1 -0
- package/dist/cli/audit-allows.js +240 -0
- package/dist/cli/check-theme.d.ts +10 -0
- package/dist/cli/check-theme.d.ts.map +1 -0
- package/dist/cli/check-theme.js +139 -0
- package/dist/cli/doctor.d.ts +47 -0
- package/dist/cli/doctor.d.ts.map +1 -0
- package/dist/cli/doctor.js +197 -0
- package/dist/cli/guard-hook.d.ts +9 -0
- package/dist/cli/guard-hook.d.ts.map +1 -0
- package/dist/cli/guard-hook.js +93 -0
- package/dist/cli/help.d.ts +9 -0
- package/dist/cli/help.d.ts.map +1 -0
- package/dist/cli/help.js +53 -0
- package/dist/cli/index.d.ts +360 -270
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +85 -1901
- package/dist/cli/init.d.ts +4 -0
- package/dist/cli/init.d.ts.map +1 -0
- package/dist/cli/init.js +165 -0
- package/dist/cli/sync.d.ts +43 -0
- package/dist/cli/sync.d.ts.map +1 -0
- package/dist/cli/sync.js +206 -0
- package/dist/cli/tokens-css.d.ts +51 -0
- package/dist/cli/tokens-css.d.ts.map +1 -0
- package/dist/cli/tokens-css.js +165 -0
- package/dist/commands/define-commands.js +1 -1
- package/dist/commands/define-overlays.js +1 -1
- package/dist/commands/index.d.ts +2 -1
- package/dist/commands/index.d.ts.map +1 -1
- package/dist/commands/index.js +6 -0
- package/dist/commands/overlays-mount.d.ts +7 -9
- package/dist/commands/overlays-mount.d.ts.map +1 -1
- package/dist/commands/shell-bridge.d.ts +57 -0
- package/dist/commands/shell-bridge.d.ts.map +1 -0
- package/dist/commands/shell-bridge.js +32 -0
- package/dist/common/errors.d.ts +35 -0
- package/dist/common/errors.d.ts.map +1 -1
- package/dist/common/errors.js +29 -1
- package/dist/common/index.d.ts +2 -0
- package/dist/common/index.d.ts.map +1 -1
- package/dist/common/index.js +6 -0
- package/dist/common/is-dev.d.ts.map +1 -0
- package/dist/{motion/index.d.ts → common/motion.d.ts} +1 -1
- package/dist/common/motion.d.ts.map +1 -0
- package/dist/common/props.d.ts +1 -1
- package/dist/common/props.d.ts.map +1 -1
- package/dist/common/validate.js +1 -1
- package/dist/content/markdown.d.ts +3 -4
- package/dist/content/markdown.d.ts.map +1 -1
- package/dist/content/markdown.js +1 -4
- package/dist/controls/actions.d.ts +1 -1
- package/dist/controls/actions.d.ts.map +1 -1
- package/dist/controls/panel-row.js +1 -1
- package/dist/controls/range-filter.js +1 -1
- package/dist/dashboard/delta-badge.d.ts +18 -10
- package/dist/dashboard/delta-badge.d.ts.map +1 -1
- package/dist/dashboard/delta-badge.js +33 -1
- package/dist/dashboard/empty-state.d.ts +1 -4
- package/dist/dashboard/empty-state.d.ts.map +1 -1
- package/dist/dashboard/empty-state.js +1 -2
- package/dist/dashboard/index.d.ts +4 -2
- package/dist/dashboard/index.d.ts.map +1 -1
- package/dist/dashboard/index.js +7 -1
- package/dist/dashboard/query-state.d.ts +4 -13
- package/dist/dashboard/query-state.d.ts.map +1 -1
- package/dist/dashboard/query-state.js +4 -7
- package/dist/{section → dashboard}/section.d.ts +2 -2
- package/dist/{section → dashboard}/section.d.ts.map +1 -1
- package/dist/{section → dashboard}/section.js +2 -2
- package/dist/dashboard/settings-section.d.ts +1 -1
- package/dist/dashboard/settings-section.d.ts.map +1 -1
- package/dist/dashboard/settings-section.js +1 -1
- package/dist/dashboard/stat-card.d.ts +1 -1
- package/dist/dashboard/stat-card.d.ts.map +1 -1
- package/dist/dashboard/stat-card.js +1 -1
- package/dist/dashboard/widget-header.d.ts.map +1 -0
- package/dist/data/data-table.js +2 -2
- package/dist/data/table.d.ts +1 -1
- package/dist/data/table.d.ts.map +1 -1
- package/dist/data/table.js +2 -16
- package/dist/data/virtual.d.ts +3 -3
- package/dist/dev-dock.d.ts +28 -0
- package/dist/dev-dock.d.ts.map +1 -0
- package/dist/dev-dock.js +85 -0
- package/dist/format/date.d.ts +62 -0
- package/dist/format/date.d.ts.map +1 -0
- package/dist/format/date.js +106 -0
- package/dist/format/index.d.ts +39 -0
- package/dist/format/index.d.ts.map +1 -0
- package/dist/format/index.js +54 -0
- package/dist/format/measure.d.ts +15 -0
- package/dist/format/measure.d.ts.map +1 -0
- package/dist/format/measure.js +16 -0
- package/dist/format/number.d.ts +69 -0
- package/dist/format/number.d.ts.map +1 -0
- package/dist/format/number.js +62 -0
- package/dist/format/shared.d.ts +27 -0
- package/dist/format/shared.d.ts.map +1 -0
- package/dist/format/shared.js +29 -0
- package/dist/forms/field.d.ts +4 -20
- package/dist/forms/field.d.ts.map +1 -1
- package/dist/forms/field.js +0 -4
- package/dist/forms/form-layout.d.ts +1 -1
- package/dist/forms/form-layout.d.ts.map +1 -1
- package/dist/forms/form-layout.js +1 -1
- package/dist/forms/index.d.ts +1 -1
- package/dist/forms/index.d.ts.map +1 -1
- package/dist/forms/index.js +1 -2
- package/dist/forms/use-form-submit.js +1 -1
- package/dist/guard/index.d.ts +2 -9
- package/dist/guard/index.d.ts.map +1 -1
- package/dist/guard/index.js +16 -26
- package/dist/guard/types.d.ts +8 -10
- package/dist/guard/types.d.ts.map +1 -1
- package/dist/index.d.ts +16 -11
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +23 -29
- package/dist/notifications/index.d.ts +5 -5
- package/dist/notifications/index.d.ts.map +1 -1
- package/dist/notifications/index.js +0 -2
- package/dist/notifications/mount-guard.d.ts.map +1 -1
- package/dist/notifications/mount-guard.js +2 -2
- package/dist/provider/connectivity-indicator.d.ts.map +1 -0
- package/dist/{connectivity → provider}/connectivity-provider.d.ts +1 -1
- package/dist/provider/connectivity-provider.d.ts.map +1 -0
- package/dist/{connectivity/types.d.ts → provider/connectivity-types.d.ts} +1 -1
- package/dist/provider/connectivity-types.d.ts.map +1 -0
- package/dist/provider/error-fallback.module.css +21 -0
- package/dist/provider/error-fallback.module.css.d.ts +9 -0
- package/dist/provider/index.d.ts +20 -36
- package/dist/provider/index.d.ts.map +1 -1
- package/dist/provider/index.js +42 -32
- package/dist/provider/lab-theme.js +1 -1
- package/dist/provider/use-connectivity.d.ts +3 -0
- package/dist/provider/use-connectivity.d.ts.map +1 -0
- package/dist/query-client.d.ts +63 -0
- package/dist/query-client.d.ts.map +1 -0
- package/dist/query-client.js +33 -0
- package/dist/{query/devtools.d.ts → query-devtools.d.ts} +2 -2
- package/dist/query-devtools.d.ts.map +1 -0
- package/dist/register.d.ts +17 -3
- package/dist/register.d.ts.map +1 -1
- package/dist/router-tanstack/index.d.ts +4 -7
- package/dist/router-tanstack/index.d.ts.map +1 -1
- package/dist/router-tanstack/index.js +1 -9
- package/dist/router-tanstack/nav.d.ts +1 -1
- package/dist/router-tanstack/nav.d.ts.map +1 -1
- package/dist/router-tanstack/search-store.d.ts +3 -6
- package/dist/router-tanstack/search-store.d.ts.map +1 -1
- package/dist/router-tanstack/use-nav.d.ts +1 -1
- package/dist/router-tanstack/use-nav.d.ts.map +1 -1
- package/dist/shell/app-breadcrumbs.d.ts +1 -1
- package/dist/shell/app-breadcrumbs.d.ts.map +1 -1
- package/dist/shell/app-main.module.css +11 -0
- package/dist/shell/app-mobile-nav.d.ts +1 -1
- package/dist/shell/app-mobile-nav.d.ts.map +1 -1
- package/dist/shell/app-mobile-nav.js +24 -2
- package/dist/shell/app-sidebar.d.ts +1 -1
- package/dist/shell/app-sidebar.d.ts.map +1 -1
- package/dist/shell/app-sidebar.js +31 -2
- package/dist/shell/app-sidebar.module.css +10 -0
- package/dist/shell/index.d.ts +10 -4
- package/dist/shell/index.d.ts.map +1 -1
- package/dist/shell/index.js +13 -17
- package/dist/shell/mobile-nav-model.d.ts +1 -1
- package/dist/shell/mobile-nav-model.d.ts.map +1 -1
- package/dist/{nav/types.d.ts → shell/nav-types.d.ts} +1 -1
- package/dist/shell/nav-types.d.ts.map +1 -0
- package/dist/shell/page-aside.d.ts.map +1 -1
- package/dist/shell/page-aside.js +2 -29
- package/dist/shell/page-title.d.ts +14 -0
- package/dist/shell/page-title.d.ts.map +1 -0
- package/dist/shell/page-title.js +25 -0
- package/dist/shell/page-title.module.css +33 -0
- package/dist/shell/page-title.module.css.d.ts +11 -0
- package/dist/shell/sidebar-block-model.d.ts +1 -1
- package/dist/shell/sidebar-block-model.d.ts.map +1 -1
- package/dist/shell/sidebar-blocks.d.ts +1 -1
- package/dist/shell/sidebar-blocks.d.ts.map +1 -1
- package/dist/shell/use-breakpoint.d.ts +11 -0
- package/dist/shell/use-breakpoint.d.ts.map +1 -0
- package/dist/shell/use-breakpoint.js +33 -0
- package/dist/state/fields.d.ts +3 -19
- package/dist/state/fields.d.ts.map +1 -1
- package/dist/state/fields.js +6 -16
- package/dist/styles.css +36 -0
- package/dist/surfaces.d.ts +18 -41
- package/dist/surfaces.d.ts.map +1 -1
- package/dist/surfaces.js +46 -59
- package/dist/theme/index.d.ts.map +1 -1
- package/dist/{theme-toggle/index.d.ts → theme/theme-toggle.d.ts} +1 -1
- package/dist/theme/theme-toggle.d.ts.map +1 -0
- package/dist/{theme-toggle/index.js → theme/theme-toggle.js} +1 -1
- package/dist/tokens/index.d.ts +1 -0
- package/dist/tokens/index.d.ts.map +1 -1
- package/dist/tokens/index.js +10 -0
- package/dist/tokens/palette.d.ts +12 -0
- package/dist/tokens/palette.d.ts.map +1 -1
- package/dist/tokens/palette.js +13 -1
- package/dist/tokens.css +1 -0
- package/llms.txt +9 -24
- package/package.json +12 -16
- package/src/agent/ai-sdk-transport.ts +11 -4
- package/src/agent/coalesce.ts +1 -1
- package/src/agent/merge.ts +1 -1
- package/src/agent/transport.ts +15 -2
- package/src/agent/use-agent-thread-runs.ts +65 -15
- package/src/agent-chat/index.ts +6 -4
- package/src/agent-chat/relative-time.ts +1 -1
- package/src/agent-chat/thread-detail-panel.tsx +1 -1
- package/src/agent-chat/thread-feed-row.tsx +105 -30
- package/src/agent-chat/thread-feed.tsx +51 -25
- package/src/agent-chat/thread-message.tsx +1 -1
- package/src/agent-chat/virtualize.ts +48 -0
- package/src/charts/index.ts +7 -10
- package/src/charts/kinds/BandStrip.tsx +1 -1
- package/src/charts/kinds/Bars.tsx +2 -5
- package/src/charts/kinds/DualPanel.tsx +4 -3
- package/src/charts/kinds/StackedArea.tsx +1 -1
- package/src/charts/kinds/ZonedLine.tsx +1 -4
- package/src/charts/primitives/Axes.tsx +49 -0
- package/src/charts/primitives/ChartCard.tsx +49 -6
- package/src/charts/primitives/ChartFrame.tsx +5 -1
- package/src/charts/primitives/ChartPending.tsx +14 -8
- package/src/charts/utils/format.ts +17 -186
- package/src/cli/audit-allows.ts +371 -0
- package/src/cli/check-theme.ts +197 -0
- package/src/cli/doctor.ts +331 -0
- package/src/cli/guard-hook.ts +115 -0
- package/src/cli/help.ts +101 -0
- package/src/cli/index.ts +269 -3439
- package/src/cli/init.ts +247 -0
- package/src/cli/sync.ts +324 -0
- package/src/cli/tokens-css.ts +252 -0
- package/src/commands/define-commands.ts +1 -1
- package/src/commands/define-overlays.ts +1 -1
- package/src/commands/index.ts +10 -1
- package/src/commands/overlays-mount.tsx +8 -10
- package/src/commands/shell-bridge.ts +86 -0
- package/src/common/errors.ts +70 -0
- package/src/common/index.ts +2 -0
- package/src/common/props.ts +1 -1
- package/src/common/validate.ts +1 -1
- package/src/content/markdown.tsx +4 -8
- package/src/controls/actions.tsx +1 -1
- package/src/controls/panel-row.tsx +1 -1
- package/src/controls/range-filter.tsx +1 -1
- package/src/dashboard/delta-badge.tsx +74 -7
- package/src/dashboard/empty-state.tsx +2 -6
- package/src/dashboard/index.ts +11 -2
- package/src/dashboard/query-state.tsx +5 -18
- package/src/{section → dashboard}/section.tsx +4 -4
- package/src/dashboard/settings-section.tsx +2 -2
- package/src/dashboard/stat-card.tsx +2 -2
- package/src/data/data-table.tsx +3 -3
- package/src/data/table.ts +6 -25
- package/src/data/virtual-list.tsx +1 -1
- package/src/data/virtual.ts +3 -3
- package/src/dev-dock.tsx +159 -0
- package/src/format/date.ts +184 -0
- package/src/format/index.ts +69 -0
- package/src/format/measure.ts +31 -0
- package/src/format/number.ts +129 -0
- package/src/format/shared.ts +63 -0
- package/src/forms/field.ts +4 -24
- package/src/forms/form-layout.tsx +2 -2
- package/src/forms/index.ts +1 -2
- package/src/forms/use-form-submit.ts +1 -1
- package/src/guard/index.ts +30 -56
- package/src/guard/types.ts +7 -10
- package/src/index.ts +38 -29
- package/src/notifications/index.ts +5 -7
- package/src/notifications/mount-guard.ts +7 -9
- package/src/{connectivity → provider}/connectivity-indicator.tsx +1 -1
- package/src/{connectivity → provider}/connectivity-provider.tsx +1 -1
- package/src/provider/error-fallback.module.css +21 -0
- package/src/provider/error-fallback.module.css.d.ts +9 -0
- package/src/provider/index.tsx +71 -71
- package/src/provider/lab-theme.ts +1 -1
- package/src/{connectivity → provider}/use-connectivity.ts +3 -3
- package/src/query-client.ts +100 -0
- package/src/{query/devtools.tsx → query-devtools.tsx} +5 -4
- package/src/register.ts +20 -4
- package/src/router-tanstack/index.ts +4 -15
- package/src/router-tanstack/nav.ts +1 -1
- package/src/router-tanstack/search-store.ts +3 -4
- package/src/router-tanstack/use-nav.ts +1 -1
- package/src/shell/app-breadcrumbs.tsx +1 -1
- package/src/shell/app-main.module.css +11 -0
- package/src/shell/app-mobile-nav.tsx +28 -1
- package/src/shell/app-sidebar.module.css +10 -0
- package/src/shell/app-sidebar.tsx +31 -2
- package/src/shell/index.tsx +23 -28
- package/src/shell/mobile-nav-model.ts +1 -1
- package/src/shell/page-aside.tsx +2 -52
- package/src/shell/page-title.module.css +33 -0
- package/src/shell/page-title.module.css.d.ts +11 -0
- package/src/shell/page-title.tsx +57 -0
- package/src/shell/sidebar-block-model.ts +1 -1
- package/src/shell/sidebar-blocks.tsx +1 -1
- package/src/shell/use-breakpoint.ts +73 -0
- package/src/state/fields.ts +7 -43
- package/src/styles.css +36 -0
- package/src/surfaces.ts +45 -60
- package/src/theme/index.ts +7 -0
- package/src/{theme-toggle/index.tsx → theme/theme-toggle.tsx} +1 -1
- package/src/tokens/index.ts +10 -0
- package/src/tokens/palette.ts +12 -0
- package/dist/connectivity/connectivity-indicator.d.ts.map +0 -1
- package/dist/connectivity/connectivity-provider.d.ts.map +0 -1
- package/dist/connectivity/index.d.ts +0 -14
- package/dist/connectivity/index.d.ts.map +0 -1
- package/dist/connectivity/index.js +0 -8
- package/dist/connectivity/types.d.ts.map +0 -1
- package/dist/connectivity/use-connectivity.d.ts +0 -3
- package/dist/connectivity/use-connectivity.d.ts.map +0 -1
- package/dist/data/index.d.ts +0 -38
- package/dist/data/index.d.ts.map +0 -1
- package/dist/data/index.js +0 -24
- package/dist/motion/index.d.ts.map +0 -1
- package/dist/nav/types.d.ts.map +0 -1
- package/dist/notifications/overlay.d.ts +0 -20
- package/dist/notifications/overlay.d.ts.map +0 -1
- package/dist/notifications/overlay.js +0 -14
- package/dist/query/devtools.d.ts.map +0 -1
- package/dist/query/error-message.d.ts +0 -41
- package/dist/query/error-message.d.ts.map +0 -1
- package/dist/query/error-message.js +0 -30
- package/dist/query/index.d.ts +0 -47
- package/dist/query/index.d.ts.map +0 -1
- package/dist/query/index.js +0 -56
- package/dist/router-tanstack/field.d.ts +0 -14
- package/dist/router-tanstack/field.d.ts.map +0 -1
- package/dist/router-tanstack/field.js +0 -4
- package/dist/router-tanstack/multi-search-param-store.d.ts +0 -43
- package/dist/router-tanstack/multi-search-param-store.d.ts.map +0 -1
- package/dist/router-tanstack/multi-search-param-store.js +0 -30
- package/dist/router-tanstack/search-param-store.d.ts +0 -42
- package/dist/router-tanstack/search-param-store.d.ts.map +0 -1
- package/dist/router-tanstack/search-param-store.js +0 -25
- package/dist/section/index.d.ts +0 -2
- package/dist/section/index.d.ts.map +0 -1
- package/dist/section/index.js +0 -4
- package/dist/theme-toggle/index.d.ts.map +0 -1
- package/dist/utils/is-dev.d.ts.map +0 -1
- package/dist/widget-header/delta-badge.d.ts +0 -19
- package/dist/widget-header/delta-badge.d.ts.map +0 -1
- package/dist/widget-header/delta-badge.js +0 -36
- package/dist/widget-header/index.d.ts +0 -3
- package/dist/widget-header/index.d.ts.map +0 -1
- package/dist/widget-header/index.js +0 -8
- package/dist/widget-header/widget-header.d.ts.map +0 -1
- package/src/connectivity/index.ts +0 -19
- package/src/data/index.ts +0 -69
- package/src/notifications/overlay.tsx +0 -66
- package/src/query/error-message.ts +0 -70
- package/src/query/index.ts +0 -97
- package/src/router-tanstack/field.ts +0 -36
- package/src/router-tanstack/multi-search-param-store.ts +0 -106
- package/src/router-tanstack/search-param-store.ts +0 -100
- package/src/section/index.ts +0 -1
- package/src/widget-header/delta-badge.tsx +0 -77
- package/src/widget-header/index.ts +0 -10
- /package/dist/{utils → common}/is-dev.d.ts +0 -0
- /package/dist/{utils → common}/is-dev.js +0 -0
- /package/dist/{motion/index.js → common/motion.js} +0 -0
- /package/dist/{section → dashboard}/section.module.css +0 -0
- /package/dist/{section → dashboard}/section.module.css.d.ts +0 -0
- /package/dist/{widget-header → dashboard}/widget-header.d.ts +0 -0
- /package/dist/{widget-header → dashboard}/widget-header.js +0 -0
- /package/dist/{widget-header → dashboard}/widget-header.module.css +0 -0
- /package/dist/{widget-header → dashboard}/widget-header.module.css.d.ts +0 -0
- /package/dist/{connectivity → provider}/connectivity-indicator.d.ts +0 -0
- /package/dist/{connectivity → provider}/connectivity-indicator.js +0 -0
- /package/dist/{connectivity → provider}/connectivity-provider.js +0 -0
- /package/dist/{connectivity/types.js → provider/connectivity-types.js} +0 -0
- /package/dist/{connectivity → provider}/use-connectivity.js +0 -0
- /package/dist/{query/devtools.js → query-devtools.js} +0 -0
- /package/dist/{nav/types.js → shell/nav-types.js} +0 -0
- /package/src/{utils → common}/is-dev.ts +0 -0
- /package/src/{motion/index.ts → common/motion.ts} +0 -0
- /package/src/{section → dashboard}/section.module.css +0 -0
- /package/src/{section → dashboard}/section.module.css.d.ts +0 -0
- /package/src/{widget-header → dashboard}/widget-header.module.css +0 -0
- /package/src/{widget-header → dashboard}/widget-header.module.css.d.ts +0 -0
- /package/src/{widget-header → dashboard}/widget-header.tsx +0 -0
- /package/src/{connectivity/types.ts → provider/connectivity-types.ts} +0 -0
- /package/src/{nav/types.ts → shell/nav-types.ts} +0 -0
package/src/guard/index.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* ./guard — headless policy core. Mantine-free, dependency-free.
|
|
3
3
|
*
|
|
4
|
-
* GUARD_RULES: the closed registry of all
|
|
4
|
+
* GUARD_RULES: the closed registry of all 26 violation kinds.
|
|
5
5
|
* checkSource: pure (text, relPath, cfg) → Finding[]. No FS, no walk, no console.
|
|
6
6
|
*/
|
|
7
7
|
import type { Finding, GuardConfig, GuardKind, GuardSeverity } from './types'
|
|
@@ -409,31 +409,23 @@ const MOTION_TRANSITION_NUMERIC =
|
|
|
409
409
|
/\btransition\s*=\s*\{\{[^}]*\b(?:duration|stiffness|damping|mass)\s*:\s*-?\d/g
|
|
410
410
|
const MOTION_TRANSITION_EASE_ARRAY = /\btransition\s*=\s*\{\{[^}]*\bease\s*:\s*\[/g
|
|
411
411
|
|
|
412
|
-
// A hand-rolled <ChartLegend items={[ …array literal… ]}> — legend entries authored inline
|
|
413
|
-
// instead of derived (`items={deriveLegend(series)}`, a call expression, which must NOT match).
|
|
414
|
-
// Scoped to the JSX tag itself ([^>]* is bounded by the tag's own closing `>`, which also makes
|
|
415
|
-
// this a full-text scan rather than the per-line style every other kind uses — a multi-line-
|
|
416
|
-
// formatted <ChartLegend ...\n items={[...\n/> still resolves to one match). Bounded scans over
|
|
417
|
-
// text this small are not a performance concern.
|
|
418
|
-
const RAW_CHART_LEGEND_ARRAY = /<ChartLegend\b[^>]*?\bitems\s*=\s*\{\s*\[/g
|
|
419
|
-
|
|
420
412
|
// A chart entry-point JSX tag (the 7 kinds + 2 sparklines) — full opening/self-closing tag,
|
|
421
413
|
// scanned for a missing `ariaLabel` prop (an accessible text alternative for the SVG graphic).
|
|
422
|
-
// Bounded, full-text scan
|
|
423
|
-
//
|
|
424
|
-
//
|
|
425
|
-
//
|
|
426
|
-
//
|
|
427
|
-
//
|
|
414
|
+
// Bounded, full-text scan so a multi-line-formatted tag still resolves to one match. The scan must
|
|
415
|
+
// survive two `>` decoys inside an opening tag: an explicit JSX generic argument
|
|
416
|
+
// (`<MultiLine<Point>`) — consumed by the optional `<[^<>]*>` group — and arrow functions in prop
|
|
417
|
+
// expressions (`getX={(d) => d.date}`) — consumed atomically by the `=>` alternative so their `>`
|
|
418
|
+
// never terminates the tag early. A bare `>` comparison inside a prop expression still ends the
|
|
419
|
+
// match (accepted limitation of the bounded scan).
|
|
428
420
|
const CHART_ENTRY_POINT_TAG =
|
|
429
421
|
/<(MultiLine|Bars|BandStrip|Donut|DualPanel|Heatmap|MirroredBars|ZonedLine|StackedArea|LineSparkline|BarSparkline)\b(?:<[^<>]*>)?(?:=>|[^>])*?>/g
|
|
430
422
|
const HAS_ARIA_LABEL_PROP = /\bariaLabel\s*=/
|
|
431
423
|
|
|
432
|
-
// ── Tag provenance, shared by
|
|
424
|
+
// ── Tag provenance, shared by chart-missing-aria-label ────────────────────────────────────────────
|
|
433
425
|
//
|
|
434
|
-
//
|
|
435
|
-
//
|
|
436
|
-
//
|
|
426
|
+
// `chart-missing-aria-label` keys on a JSX tag NAME, which is the whole of its signal — so a
|
|
427
|
+
// consumer's OWN component that merely shares a shipped kind's name collected the finding too.
|
|
428
|
+
// Reported by a consumer on 1.23.0: a hand-composed local `<MirroredBars>` was
|
|
437
429
|
// told to pass an `ariaLabel` prop it does not accept, by a rule that presents as a correctness
|
|
438
430
|
// finding rather than as a naming one. `shadow-basalt-export` / `ai-sdk-major` scope through
|
|
439
431
|
// `isBasaltScopedFile` (package-level); the analogous file-level signal here is where the name in
|
|
@@ -632,7 +624,6 @@ export const DEFAULT_GUARD_CONFIG: GuardConfig = {
|
|
|
632
624
|
inlineDisplay: true,
|
|
633
625
|
rawVisxAxis: true,
|
|
634
626
|
rawMotionValue: true,
|
|
635
|
-
unframedChart: true,
|
|
636
627
|
chartMissingAriaLabel: true,
|
|
637
628
|
rawFormControl: true,
|
|
638
629
|
sub16InputFont: true,
|
|
@@ -882,11 +873,10 @@ export const PLUGIN_RULE_IDS: ReadonlySet<string> = new Set([
|
|
|
882
873
|
'responsive-twin',
|
|
883
874
|
'search-literal-link',
|
|
884
875
|
'use-search-from-literal',
|
|
885
|
-
// The
|
|
886
|
-
// reach: provenance here is an import graph and a JSX ancestry, neither of which
|
|
887
|
-
// regex window has. Same reason `bound-control-outside-home` has no text-lane twin.
|
|
876
|
+
// The three remaining F5 rules and the B4 deprecation rule — all AST-only, all outside
|
|
877
|
+
// `checkSource`'s reach: provenance here is an import graph and a JSX ancestry, neither of which
|
|
878
|
+
// a 12-line regex window has. Same reason `bound-control-outside-home` has no text-lane twin.
|
|
888
879
|
'provider-above-router',
|
|
889
|
-
'duplicate-notifications-mount',
|
|
890
880
|
'query-dual-import',
|
|
891
881
|
'query-fn-unwrap',
|
|
892
882
|
'deprecated-export',
|
|
@@ -899,11 +889,21 @@ export const PLUGIN_RULE_IDS: ReadonlySet<string> = new Set([
|
|
|
899
889
|
'visx-boundary',
|
|
900
890
|
'visx-tooltip',
|
|
901
891
|
'token-layer-boundary',
|
|
892
|
+
'no-import-meta-env',
|
|
902
893
|
// These three honour `basalt-agent-allow`, never `theme-allow` — but they are still REAL ids, so
|
|
903
894
|
// a `theme-allow ai-sdk-major` must parse as a (useless) scoped annotation rather than as prose.
|
|
904
895
|
'agent-resume-guard',
|
|
905
896
|
'agent-no-raw-usechat',
|
|
906
897
|
'ai-sdk-major',
|
|
898
|
+
// Retired guard kinds — `unframed-chart`'s only case (`<ChartLegend items={[...]}>`) is fully
|
|
899
|
+
// subsumed by `basalt/chart-legend-literal`. Kept here (mirrored by the plugin's own
|
|
900
|
+
// `RETIRED_RULE_IDS`) so an existing `theme-allow unframed-chart` reads as a dead waiver via
|
|
901
|
+
// `--audit-allows`, never as an unknown-id typo.
|
|
902
|
+
'unframed-chart',
|
|
903
|
+
// Retired plugin rule — `<BasaltNotifications />` mounted beside `<BasaltOverlays
|
|
904
|
+
// notifications>` is unreachable now that `BasaltNotifications` no longer exists as a
|
|
905
|
+
// standalone export. Mirrored by the plugin's own `RETIRED_RULE_IDS`.
|
|
906
|
+
'duplicate-notifications-mount',
|
|
907
907
|
])
|
|
908
908
|
|
|
909
909
|
/** The shortest string accepted as a written reason — enough to exclude a stray separator. */
|
|
@@ -1518,7 +1518,6 @@ export const TOKENS_ONLY_DISABLED_KINDS: ReadonlySet<GuardKind> = new Set([
|
|
|
1518
1518
|
'inline-display',
|
|
1519
1519
|
'raw-visx-axis',
|
|
1520
1520
|
'raw-motion-value',
|
|
1521
|
-
'unframed-chart',
|
|
1522
1521
|
'chart-missing-aria-label',
|
|
1523
1522
|
'raw-form-control',
|
|
1524
1523
|
'sub-16-input-font',
|
|
@@ -1747,7 +1746,7 @@ type GuardRule = {
|
|
|
1747
1746
|
}
|
|
1748
1747
|
|
|
1749
1748
|
/**
|
|
1750
|
-
* The closed registry of all
|
|
1749
|
+
* The closed registry of all 26 guard kinds. The triad test asserts
|
|
1751
1750
|
* `surface.guardKinds ⊆ keyof GUARD_RULES` at runtime.
|
|
1752
1751
|
*
|
|
1753
1752
|
* raw-surface, raw-html-layout, and sub-16-input-font are handled inline in checkSource
|
|
@@ -1900,15 +1899,6 @@ export const GUARD_RULES = {
|
|
|
1900
1899
|
message:
|
|
1901
1900
|
'Route animation timing through MOTION_DURATION / MOTION_SPRING / MOTION_EASE_STANDARD (basalt-ui motion tokens) instead of a hardcoded duration/spring/ease.',
|
|
1902
1901
|
},
|
|
1903
|
-
'unframed-chart': {
|
|
1904
|
-
kind: 'unframed-chart',
|
|
1905
|
-
pattern: RAW_CHART_LEGEND_ARRAY, // handled inline (full-text tag-scoped scan); entry keeps registry complete
|
|
1906
|
-
enabled: (cfg: GuardConfig) => cfg.unframedChart,
|
|
1907
|
-
// JSX-tag-shaped (`<ChartLegend items={[…]}>`) — never appears in CSS text.
|
|
1908
|
-
appliesTo: (relPath) => !relPath.endsWith('.css'),
|
|
1909
|
-
message:
|
|
1910
|
-
'Hand-rolled ChartLegend built from an inline array literal — pass a derived legend (deriveLegend(series)), or compose ChartFrame, which derives it for you.',
|
|
1911
|
-
},
|
|
1912
1902
|
'chart-missing-aria-label': {
|
|
1913
1903
|
kind: 'chart-missing-aria-label',
|
|
1914
1904
|
pattern: CHART_ENTRY_POINT_TAG, // handled inline (full-text tag-scoped scan); entry keeps registry complete
|
|
@@ -2342,32 +2332,16 @@ export function checkSource(text: string, relPath: string, cfg: GuardConfig): Fi
|
|
|
2342
2332
|
}
|
|
2343
2333
|
}
|
|
2344
2334
|
|
|
2345
|
-
//
|
|
2346
|
-
// Computed once, and only if
|
|
2347
|
-
const unframedChartRuns =
|
|
2348
|
-
GUARD_RULES['unframed-chart'].enabled!(cfg) && ruleApplies('unframed-chart', relPath)
|
|
2335
|
+
// The aria-label tag rule below gates on tag PROVENANCE (see the block above LOCAL_COMPONENT_DEF).
|
|
2336
|
+
// Computed once, and only if the rule actually runs.
|
|
2349
2337
|
const ariaLabelRuns =
|
|
2350
2338
|
GUARD_RULES['chart-missing-aria-label'].enabled!(cfg) &&
|
|
2351
2339
|
ruleApplies('chart-missing-aria-label', relPath)
|
|
2352
|
-
const localNames =
|
|
2353
|
-
|
|
2354
|
-
const basaltNames =
|
|
2355
|
-
unframedChartRuns || ariaLabelRuns ? basaltImportedNames(codeText) : new Set<string>()
|
|
2340
|
+
const localNames = ariaLabelRuns ? localComponentNames(codeText) : new Set<string>()
|
|
2341
|
+
const basaltNames = ariaLabelRuns ? basaltImportedNames(codeText) : new Set<string>()
|
|
2356
2342
|
const isShippedTag = (tag: string): boolean => basaltNames.has(tag) || !localNames.has(tag)
|
|
2357
2343
|
|
|
2358
|
-
//
|
|
2359
|
-
// Scans `codeText` (comment-stripped) so a legend example inside a comment can't match; reports
|
|
2360
|
-
// at the line of the `items={[` token itself. Skipped wholesale when `ChartLegend` is this file's
|
|
2361
|
-
// OWN component: a consumer's legend taking an `items` array is not the shipped one that derives
|
|
2362
|
-
// its entries, and the remedy ("pass deriveLegend(series)") is unreachable there.
|
|
2363
|
-
if (unframedChartRuns && isShippedTag('ChartLegend')) {
|
|
2364
|
-
for (const m of codeText.matchAll(RAW_CHART_LEGEND_ARRAY)) {
|
|
2365
|
-
const lineNo = codeText.slice(0, (m.index ?? 0) + m[0].length).split('\n').length
|
|
2366
|
-
push('unframed-chart', lineNo, 'items={[')
|
|
2367
|
-
}
|
|
2368
|
-
}
|
|
2369
|
-
|
|
2370
|
-
// chart-missing-aria-label — full-text tag-scoped scan (same shape as unframed-chart above).
|
|
2344
|
+
// chart-missing-aria-label — full-text tag-scoped scan.
|
|
2371
2345
|
// A tag is a violation only when its own (possibly multi-line) prop list has no `ariaLabel=`.
|
|
2372
2346
|
// Reports at the tag's OPENING line, like card-with-border below and unlike the end-of-match
|
|
2373
2347
|
// arithmetic this used to do: on a multi-line-formatted chart the end lands on the closing `/>`,
|
package/src/guard/types.ts
CHANGED
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Guard types — Mantine-free, dependency-free (zero imports beyond TS types).
|
|
3
3
|
*
|
|
4
|
-
* GuardKind is the closed set of
|
|
4
|
+
* GuardKind is the closed set of 26 violation kinds the theme guard can emit — `unframed-chart`
|
|
5
|
+
* retired at the C2 consolidation wave: its only case (a hand-authored `<ChartLegend items={[...]}>`
|
|
6
|
+
* array literal) is fully subsumed by the oxlint plugin's `basalt/chart-legend-literal`, which also
|
|
7
|
+
* catches the `.map()`-over-a-non-series form the regex never could. `'unframed-chart'` stays a
|
|
8
|
+
* recognized id in `PLUGIN_RULE_IDS`/`KNOWN_RULE_IDS` so an existing `theme-allow unframed-chart`
|
|
9
|
+
* reads as a dead waiver, not a typo.
|
|
5
10
|
* Finding is the structured result per violation, replacing the old `Violation` shape.
|
|
6
11
|
* GuardConfig is the per-run configuration that drives checkSource.
|
|
7
12
|
*/
|
|
8
13
|
|
|
9
|
-
/** The
|
|
14
|
+
/** The 26 theme-guard violation kinds. */
|
|
10
15
|
export type GuardKind =
|
|
11
16
|
| 'raw-hex'
|
|
12
17
|
| 'raw-color-fn'
|
|
@@ -23,7 +28,6 @@ export type GuardKind =
|
|
|
23
28
|
| 'inline-display'
|
|
24
29
|
| 'raw-visx-axis'
|
|
25
30
|
| 'raw-motion-value'
|
|
26
|
-
| 'unframed-chart'
|
|
27
31
|
| 'chart-missing-aria-label'
|
|
28
32
|
| 'raw-form-control'
|
|
29
33
|
| 'sub-16-input-font'
|
|
@@ -127,13 +131,6 @@ export type GuardConfig = {
|
|
|
127
131
|
readonly rawVisxAxis: boolean
|
|
128
132
|
/** Flag a hardcoded duration/spring/ease literal in a `transition={{...}}` prop. Default true. */
|
|
129
133
|
readonly rawMotionValue: boolean
|
|
130
|
-
/**
|
|
131
|
-
* Flag a hand-rolled `<ChartLegend items={[...]}>` array literal — legend entries must be
|
|
132
|
-
* derived (e.g. `items={deriveLegend(series)}`), never authored inline, so a bespoke chart
|
|
133
|
-
* can't silently drift from the shared legend. Default `true` (ON). Set `false` to disable the
|
|
134
|
-
* `unframed-chart` check.
|
|
135
|
-
*/
|
|
136
|
-
readonly unframedChart: boolean
|
|
137
134
|
/**
|
|
138
135
|
* Flag a chart-kind JSX usage (`<MultiLine>`, `<Bars>`, `<Donut>`, `<DualPanel>`, `<Heatmap>`,
|
|
139
136
|
* `<ZonedLine>`, `<StackedArea>`, `<LineSparkline>`, `<BarSparkline>`) missing an `ariaLabel`
|
package/src/index.ts
CHANGED
|
@@ -10,12 +10,17 @@ export {
|
|
|
10
10
|
BasaltProvider,
|
|
11
11
|
type BasaltProviderProps,
|
|
12
12
|
BasaltErrorBoundary,
|
|
13
|
+
type BasaltErrorBoundaryProps,
|
|
13
14
|
type BasaltErrorContext,
|
|
14
15
|
} from './provider'
|
|
15
16
|
// -- Common primitives (src/common) ------------------------------------------------------------
|
|
16
17
|
// Not a subpath of its own: `BasaltProps` is the base every component's props extend, so it belongs
|
|
17
18
|
// on the entry a consumer already imports. The module is Mantine-free (`common/boundary.test.ts`),
|
|
18
|
-
// which is what lets `./charts` reach `cx
|
|
19
|
+
// which is what lets `./charts` reach `cx` without breaching the layer boundary.
|
|
20
|
+
// The validate/errors internals (`useValidateProps`/`assertRequiredProps`/`requiredProp`/`oneOf`/
|
|
21
|
+
// `deprecatedProp`/`duplicateMount`/`missingLayer`/`BASALT_PREFIX`) and the ref helpers
|
|
22
|
+
// (`assignRef`/`mergeRefs`) are basalt's own diagnostic vocabulary, not a consumer's — no consumer
|
|
23
|
+
// imports them, so they stay internal (C1 consolidation).
|
|
19
24
|
export {
|
|
20
25
|
type BasaltProps,
|
|
21
26
|
type SlotClassNames,
|
|
@@ -24,16 +29,6 @@ export {
|
|
|
24
29
|
type ToneWithNeutral,
|
|
25
30
|
type Tier,
|
|
26
31
|
cx,
|
|
27
|
-
assignRef,
|
|
28
|
-
mergeRefs,
|
|
29
|
-
BASALT_PREFIX,
|
|
30
|
-
requiredProp,
|
|
31
|
-
oneOf,
|
|
32
|
-
deprecatedProp,
|
|
33
|
-
duplicateMount,
|
|
34
|
-
missingLayer,
|
|
35
|
-
useValidateProps,
|
|
36
|
-
assertRequiredProps,
|
|
37
32
|
scrollParentOf,
|
|
38
33
|
SCROLLPORT_ATTRIBUTE,
|
|
39
34
|
} from './common'
|
|
@@ -42,6 +37,7 @@ export { createBasaltTheme, baseTheme, cssVariablesResolver } from './theme'
|
|
|
42
37
|
export type { BasaltFontsConfig, CreateBasaltThemeOptions } from './theme'
|
|
43
38
|
export { CTL_THEME, CtlSlot } from './theme'
|
|
44
39
|
export type { CtlSlotProps } from './theme'
|
|
40
|
+
export { ThemeToggle, type ThemeToggleProps } from './theme/theme-toggle'
|
|
45
41
|
/**
|
|
46
42
|
* The action vocabulary every home's `actions` slot takes (`docs/CONTROLS-SPEC.md` §2.1). The
|
|
47
43
|
* OTHER components that project it (`OverflowMenu`, `SyncButton`, and the filter family) live on
|
|
@@ -54,8 +50,7 @@ export {
|
|
|
54
50
|
type ActionGroupProps,
|
|
55
51
|
type GlobalAction,
|
|
56
52
|
} from './controls/actions'
|
|
57
|
-
export {
|
|
58
|
-
export { MOTION_DURATION, MOTION_SPRING, MOTION_EASE_STANDARD } from './motion'
|
|
53
|
+
export { MOTION_DURATION, MOTION_SPRING, MOTION_EASE_STANDARD } from './common/motion'
|
|
59
54
|
export {
|
|
60
55
|
BasaltShell,
|
|
61
56
|
NavCountBadge,
|
|
@@ -81,6 +76,11 @@ export {
|
|
|
81
76
|
PageAside,
|
|
82
77
|
type PageAsideProps,
|
|
83
78
|
type PageAsideSlot,
|
|
79
|
+
useBreakpoint,
|
|
80
|
+
type BreakpointName,
|
|
81
|
+
PageTitle,
|
|
82
|
+
type PageTitleProps,
|
|
83
|
+
type PageTitleSlot,
|
|
84
84
|
type SidebarSection,
|
|
85
85
|
type SidebarItem,
|
|
86
86
|
type SidebarBlock,
|
|
@@ -127,10 +127,10 @@ export {
|
|
|
127
127
|
|
|
128
128
|
// ── Persisted state + the headless store kernel (state.ts) ───────────────────────────────────────
|
|
129
129
|
// The `field.*` VALUE is deliberately not re-exported here. `basalt-ui/forms` used to own the
|
|
130
|
-
// name `field` too and collide with this one; that forms helper is
|
|
131
|
-
//
|
|
132
|
-
// `basalt-ui/router-tanstack` (beside `createSearchStore`) or from `basalt-ui/state`
|
|
133
|
-
// `createLocalStore`).
|
|
130
|
+
// name `field` too and collide with this one; that forms helper is `inputProps` now (the
|
|
131
|
+
// `@deprecated field` alias was removed in 1.29.0, C1 consolidation — see MIGRATING.md). Import
|
|
132
|
+
// `field.*` from `basalt-ui/router-tanstack` (beside `createSearchStore`) or from `basalt-ui/state`
|
|
133
|
+
// (beside `createLocalStore`).
|
|
134
134
|
export {
|
|
135
135
|
createPersistedState,
|
|
136
136
|
type PersistedStateOptions,
|
|
@@ -161,7 +161,8 @@ export {
|
|
|
161
161
|
type StringField,
|
|
162
162
|
} from './state'
|
|
163
163
|
|
|
164
|
-
// ──
|
|
164
|
+
// ── Dashboard composites (WidgetHeader/Section heading family + KPI atoms + settings building
|
|
165
|
+
// blocks, docs/CONTROLS-SPEC.md §2.2) ──────────────────────────────────────────────────────────────
|
|
165
166
|
export {
|
|
166
167
|
WidgetHeader,
|
|
167
168
|
type WidgetHeaderDeltaProps,
|
|
@@ -173,13 +174,9 @@ export {
|
|
|
173
174
|
DeltaBadge,
|
|
174
175
|
type DeltaBadgeProps,
|
|
175
176
|
type DeltaPolarity,
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
export { Section, type SectionProps, type SectionSlot } from './section'
|
|
180
|
-
|
|
181
|
-
// ── Dashboard composites (KPI atoms + settings building blocks) ──────────────────────────────────
|
|
182
|
-
export {
|
|
177
|
+
Section,
|
|
178
|
+
type SectionProps,
|
|
179
|
+
type SectionSlot,
|
|
183
180
|
StatCard,
|
|
184
181
|
type StatCardBreakdownRow,
|
|
185
182
|
type StatCardProps,
|
|
@@ -208,7 +205,6 @@ export {
|
|
|
208
205
|
type QueryStateLike,
|
|
209
206
|
type QueryStateSlot,
|
|
210
207
|
type QueryStateTier,
|
|
211
|
-
type QueryStateVariant,
|
|
212
208
|
type QueryEmptyCopy,
|
|
213
209
|
LoadingState,
|
|
214
210
|
type LoadingStateProps,
|
|
@@ -216,14 +212,26 @@ export {
|
|
|
216
212
|
type ErrorStateProps,
|
|
217
213
|
} from './dashboard'
|
|
218
214
|
|
|
219
|
-
// ── Connectivity (auto-mounted by BasaltProvider
|
|
220
|
-
|
|
215
|
+
// ── Connectivity (auto-mounted by BasaltProvider, merged into ./provider — dropped ./connectivity
|
|
216
|
+
// subpath) ──────────────────────────────────────────────────────────────────────────────────────
|
|
217
|
+
export { ConnectivityProvider } from './provider/connectivity-provider'
|
|
218
|
+
export { ConnectivityIndicator } from './provider/connectivity-indicator'
|
|
219
|
+
export { useConnectivity } from './provider/use-connectivity'
|
|
221
220
|
export type {
|
|
222
221
|
ConnectivityStatus,
|
|
223
222
|
ConnectivitySnapshot,
|
|
224
223
|
ConnectivityProviderProps,
|
|
225
224
|
ConnectivityOverride,
|
|
226
|
-
} from './connectivity'
|
|
225
|
+
} from './provider/connectivity-types'
|
|
226
|
+
export type { ConnectivityIndicatorProps } from './provider/connectivity-indicator'
|
|
227
|
+
|
|
228
|
+
// ── Query (createBasaltQueryClient, unwrap, lazy devtools — dropped ./query subpath) ──────────────
|
|
229
|
+
export { createBasaltQueryClient, unwrap } from './query-client'
|
|
230
|
+
export { BasaltQueryDevtools } from './query-devtools'
|
|
231
|
+
export { toErrorMessage, errorStatus } from './common/errors'
|
|
232
|
+
|
|
233
|
+
// ── BasaltDevDock (C5 consolidation) ────────────────────────────────────────────────────────────
|
|
234
|
+
export { BasaltDevDock, type BasaltDevDockProps, type BasaltDevDockTool } from './dev-dock'
|
|
227
235
|
|
|
228
236
|
// ── Type-only re-exports for compile fixtures (H.4) ──────────────────────────────────────────────
|
|
229
237
|
// SurfaceSpec/RuleName/SkillName: the value SURFACES stays internal; types only for surfaces-broken
|
|
@@ -264,6 +272,7 @@ export type {
|
|
|
264
272
|
MessageAffordances,
|
|
265
273
|
VirtualizeOptions,
|
|
266
274
|
VirtualizeProps,
|
|
275
|
+
RowHeightProps,
|
|
267
276
|
ToolChipProps,
|
|
268
277
|
} from './agent-chat'
|
|
269
278
|
export {
|
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
* ./notifications — Mantine notification adapter battery.
|
|
3
3
|
*
|
|
4
4
|
* Provides notify helpers, a typed registry, a persisted history store, and a bell/center
|
|
5
|
-
*
|
|
5
|
+
* component on top of @mantine/notifications. The overlay mount is `<BasaltOverlays notifications
|
|
6
|
+
* />` (`basalt-ui/commands`) — this subpath no longer ships one of its own (C1 consolidation:
|
|
7
|
+
* `BasaltNotifications` was superseded and is removed).
|
|
6
8
|
*
|
|
7
9
|
* Optional peer: @mantine/notifications ^9.3.0.
|
|
8
10
|
*
|
|
@@ -10,8 +12,8 @@
|
|
|
10
12
|
*
|
|
11
13
|
* @example
|
|
12
14
|
* // main.tsx — mount the overlay:
|
|
13
|
-
* import {
|
|
14
|
-
* <BasaltProvider><
|
|
15
|
+
* import { BasaltOverlays } from 'basalt-ui/commands'
|
|
16
|
+
* <BasaltProvider><BasaltOverlays><App /></BasaltOverlays></BasaltProvider>
|
|
15
17
|
*
|
|
16
18
|
* // Usage:
|
|
17
19
|
* import { notifySuccess, notifyError, notifyPromise, NotificationBell } from 'basalt-ui/notifications'
|
|
@@ -84,7 +86,3 @@ export type { NotificationBellProps } from './bell'
|
|
|
84
86
|
// ── NotificationCenter ────────────────────────────────────────────────────────
|
|
85
87
|
export { NotificationCenter } from './center'
|
|
86
88
|
export type { NotificationCenterProps } from './center'
|
|
87
|
-
|
|
88
|
-
// ── BasaltNotifications overlay ───────────────────────────────────────────────
|
|
89
|
-
export { BasaltNotifications } from './overlay'
|
|
90
|
-
export type { BasaltNotificationsProps } from './overlay'
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Duplicate-Notifications-mount guard (F15) — a shared module-level counter, not a per-caller ref,
|
|
3
|
-
* because the whole point is detecting a SECOND, unrelated caller
|
|
4
|
-
* (`commands/overlays-mount.tsx`)
|
|
5
|
-
* Mantine's `<Notifications />` and neither can see the other
|
|
6
|
-
* JSDoc has warned against combining them since it shipped ("do NOT mount both … (double-mount of
|
|
7
|
-
* `<Notifications />`)") with nothing enforcing it — this is that enforcement, finally.
|
|
3
|
+
* because the whole point is detecting a SECOND, unrelated caller mounting `<BasaltOverlays
|
|
4
|
+
* notifications />` (`commands/overlays-mount.tsx`) at once — nested/duplicate mounts double-render
|
|
5
|
+
* Mantine's `<Notifications />` and neither instance can see the other.
|
|
8
6
|
*
|
|
9
7
|
* Lives here (`./notifications`), not `./commands`, so `commands` is the one importing a shared util
|
|
10
8
|
* rather than the reverse — `./notifications` never depends on `./commands`. Zero `@mantine/*`
|
|
@@ -14,7 +12,7 @@
|
|
|
14
12
|
* as `provider/lab-theme.ts`.
|
|
15
13
|
*/
|
|
16
14
|
import { useEffect } from 'react'
|
|
17
|
-
import { isDev } from '../
|
|
15
|
+
import { isDev } from '../common/is-dev'
|
|
18
16
|
|
|
19
17
|
let mountedNotificationsCount = 0
|
|
20
18
|
|
|
@@ -29,9 +27,9 @@ export function useNotificationsMountGuard(): void {
|
|
|
29
27
|
mountedNotificationsCount++
|
|
30
28
|
if (mountedNotificationsCount > 1 && isDev()) {
|
|
31
29
|
console.warn(
|
|
32
|
-
'[basalt] more than one Notifications overlay is mounted at once — mount ONE
|
|
33
|
-
|
|
34
|
-
|
|
30
|
+
'[basalt] more than one Notifications overlay is mounted at once — mount exactly ONE ' +
|
|
31
|
+
"<BasaltOverlays notifications /> (they all render Mantine's <Notifications />, so " +
|
|
32
|
+
'toasts would double-fire).',
|
|
35
33
|
)
|
|
36
34
|
}
|
|
37
35
|
return () => {
|
|
@@ -19,7 +19,7 @@ import { useRef } from 'react'
|
|
|
19
19
|
import type { BasaltProps } from '../common/props'
|
|
20
20
|
import { alpha, VX } from '../tokens'
|
|
21
21
|
import { useConnectivity } from './use-connectivity'
|
|
22
|
-
import type { ConnectivityStatus } from './types'
|
|
22
|
+
import type { ConnectivityStatus } from './connectivity-types'
|
|
23
23
|
|
|
24
24
|
export type ConnectivityIndicatorProps = BasaltProps
|
|
25
25
|
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
import { createContext, useCallback, useEffect, useMemo, useRef, useState } from 'react'
|
|
9
9
|
import type { ReactNode } from 'react'
|
|
10
10
|
import { onlineManager } from '@tanstack/react-query'
|
|
11
|
-
import type { ConnectivitySnapshot, ConnectivityProviderProps } from './types'
|
|
11
|
+
import type { ConnectivitySnapshot, ConnectivityProviderProps } from './connectivity-types'
|
|
12
12
|
|
|
13
13
|
// ── SSR-safe default ────────────────────────────────────────────────────────────────────────────────
|
|
14
14
|
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/* The boundary renders ABOVE MantineProvider, so its fallback is plain HTML styled here — no
|
|
2
|
+
Mantine primitive, no inline style object (hidden-inline-style). Tokens only. */
|
|
3
|
+
.root {
|
|
4
|
+
max-width: 32rem;
|
|
5
|
+
margin: 0 auto;
|
|
6
|
+
padding: var(--vx-space-stack-xl);
|
|
7
|
+
display: flex;
|
|
8
|
+
flex-direction: column;
|
|
9
|
+
gap: var(--vx-space-stack-md);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.reload {
|
|
13
|
+
align-self: flex-start;
|
|
14
|
+
font: inherit;
|
|
15
|
+
cursor: pointer;
|
|
16
|
+
padding: var(--vx-space-stack-xs) var(--vx-space-stack-md);
|
|
17
|
+
border: 1px solid var(--vx-divider);
|
|
18
|
+
border-radius: var(--vx-radius-ctrl);
|
|
19
|
+
background: transparent;
|
|
20
|
+
color: inherit;
|
|
21
|
+
}
|
|
@@ -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 root: string
|
|
7
|
+
readonly reload: string
|
|
8
|
+
}
|
|
9
|
+
export default classes
|