basalt-ui 1.28.0 → 1.29.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +12 -19
- package/CHANGELOG.md +23 -0
- package/MIGRATING.md +171 -7
- package/README.md +66 -105
- package/agent/rules/basalt-batteries.md +60 -183
- 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/agent/templates/query-client.ts.tpl +1 -1
- package/configs/oxlint-plugin.js +84 -254
- package/configs/oxlint-plugin.test.ts +23 -266
- package/configs/oxlint.json +0 -2
- 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 +26 -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.d.ts +1 -1
- 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 +53 -32
- 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 +67 -0
- package/dist/query-client.d.ts.map +1 -0
- package/dist/query-client.js +35 -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 +48 -60
- 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 +162 -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 +2 -2
- package/src/guard/index.ts +80 -69
- 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 +105 -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 +47 -61
- 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/dist/guard/types.d.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
|
-
/** The
|
|
9
|
-
export type GuardKind = 'raw-hex' | 'raw-color-fn' | 'localstorage-theme' | 'off-identity-accent' | 'mantine-shade-index' | 'raw-spacing' | 'raw-radius' | 'raw-surface' | 'card-with-border' | 'off-system-surface-var' | 'raw-html-layout' | 'inline-spacing' | 'inline-display' | 'raw-visx-axis' | 'raw-motion-value' | '
|
|
13
|
+
/** The 26 theme-guard violation kinds. */
|
|
14
|
+
export type GuardKind = 'raw-hex' | 'raw-color-fn' | 'localstorage-theme' | 'off-identity-accent' | 'mantine-shade-index' | 'raw-spacing' | 'raw-radius' | 'raw-surface' | 'card-with-border' | 'off-system-surface-var' | 'raw-html-layout' | 'inline-spacing' | 'inline-display' | 'raw-visx-axis' | 'raw-motion-value' | 'chart-missing-aria-label' | 'raw-form-control' | 'sub-16-input-font' | 'raw-font-family' | 'theme-allow-unscoped' | 'surface-shadow-override' | 'css-raw-surface' | 'inline-font-size' | 'hidden-inline-style' | 'in-body-page-title' | 'raw-selection-control';
|
|
10
15
|
/**
|
|
11
16
|
* How hard a finding lands. `error` fails the build; `warn` reports and passes.
|
|
12
17
|
*
|
|
@@ -96,13 +101,6 @@ export type GuardConfig = {
|
|
|
96
101
|
readonly rawVisxAxis: boolean;
|
|
97
102
|
/** Flag a hardcoded duration/spring/ease literal in a `transition={{...}}` prop. Default true. */
|
|
98
103
|
readonly rawMotionValue: boolean;
|
|
99
|
-
/**
|
|
100
|
-
* Flag a hand-rolled `<ChartLegend items={[...]}>` array literal — legend entries must be
|
|
101
|
-
* derived (e.g. `items={deriveLegend(series)}`), never authored inline, so a bespoke chart
|
|
102
|
-
* can't silently drift from the shared legend. Default `true` (ON). Set `false` to disable the
|
|
103
|
-
* `unframed-chart` check.
|
|
104
|
-
*/
|
|
105
|
-
readonly unframedChart: boolean;
|
|
106
104
|
/**
|
|
107
105
|
* Flag a chart-kind JSX usage (`<MultiLine>`, `<Bars>`, `<Donut>`, `<DualPanel>`, `<Heatmap>`,
|
|
108
106
|
* `<ZonedLine>`, `<StackedArea>`, `<LineSparkline>`, `<BarSparkline>`) missing an `ariaLabel`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/guard/types.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/guard/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,0CAA0C;AAC1C,MAAM,MAAM,SAAS,GACjB,SAAS,GACT,cAAc,GACd,oBAAoB,GACpB,qBAAqB,GACrB,qBAAqB,GACrB,aAAa,GACb,YAAY,GACZ,aAAa,GACb,kBAAkB,GAClB,wBAAwB,GACxB,iBAAiB,GACjB,gBAAgB,GAChB,gBAAgB,GAChB,eAAe,GACf,kBAAkB,GAClB,0BAA0B,GAC1B,kBAAkB,GAClB,mBAAmB,GACnB,iBAAiB,GACjB,sBAAsB,GACtB,yBAAyB,GACzB,iBAAiB,GACjB,kBAAkB,GAClB,qBAAqB,GACrB,oBAAoB,GACpB,uBAAuB,CAAA;AAE3B;;;;;;;;;;;;;GAaG;AACH,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,OAAO,CAAA;AAE5C;;;;;;;GAOG;AACH,MAAM,MAAM,OAAO,GAAG;IACpB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,IAAI,EAAE,MA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AAQ,CAAC,YAAY,EAAE,MAAM,CAAA;IAC7B;;;;;;;;;;;OAWG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,GAAG,aAAa,CAAA;IAC5C;;;;;;;;;;;;;;;;;;;OAmBG;IACH,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC,MAAM,CAAC,SAAS,EAAE,MAAM,EAAE,CAAC,CAAC,CAAA;IAC1D;;;;;;;;;;;;;;;OAeG;IACH,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC,MAAM,CAAC,SAAS,EAAE,aAAa,CAAC,CAAC,CAAA;CAC7D,CAAA"}
|
package/dist/index.d.ts
CHANGED
|
@@ -5,12 +5,13 @@
|
|
|
5
5
|
* `basalt-ui/tokens` and `basalt-ui/charts` subpath exports (see package.json), NOT re-exported
|
|
6
6
|
* here, so a tokens/charts-only consumer never pulls in `@mantine/*`.
|
|
7
7
|
*/
|
|
8
|
-
export { BasaltProvider, type BasaltProviderProps, BasaltErrorBoundary, type BasaltErrorContext, } from './provider/index.js';
|
|
9
|
-
export { type BasaltProps, type SlotClassNames, type SlotStylesProps, type Tone, type ToneWithNeutral, type Tier, cx,
|
|
8
|
+
export { BasaltProvider, type BasaltProviderProps, BasaltErrorBoundary, type BasaltErrorBoundaryProps, type BasaltErrorContext, } from './provider/index.js';
|
|
9
|
+
export { type BasaltProps, type SlotClassNames, type SlotStylesProps, type Tone, type ToneWithNeutral, type Tier, cx, scrollParentOf, SCROLLPORT_ATTRIBUTE, } from './common/index.js';
|
|
10
10
|
export { createBasaltTheme, baseTheme, cssVariablesResolver } from './theme/index.js';
|
|
11
11
|
export type { BasaltFontsConfig, CreateBasaltThemeOptions } from './theme/index.js';
|
|
12
12
|
export { CTL_THEME, CtlSlot } from './theme/index.js';
|
|
13
13
|
export type { CtlSlotProps } from './theme/index.js';
|
|
14
|
+
export { ThemeToggle, type ThemeToggleProps } from './theme/theme-toggle.js';
|
|
14
15
|
/**
|
|
15
16
|
* The action vocabulary every home's `actions` slot takes (`docs/CONTROLS-SPEC.md` §2.1). The
|
|
16
17
|
* OTHER components that project it (`OverflowMenu`, `SyncButton`, and the filter family) live on
|
|
@@ -18,20 +19,24 @@ export type { CtlSlotProps } from './theme/index.js';
|
|
|
18
19
|
* `PageBar`/`BasaltShell` `actions` wrapper needs only this one subpath.
|
|
19
20
|
*/
|
|
20
21
|
export { ActionGroup, type BarAction, type ActionGroupProps, type GlobalAction, } from './controls/actions.js';
|
|
21
|
-
export {
|
|
22
|
-
export {
|
|
23
|
-
export { BasaltShell, NavCountBadge, type NavCountBadgeProps, AppSidebar, SidebarSearch, type SidebarSearchProps, type SidebarSearchConfig, type SidebarSearchActions, SidebarAccount, MobileNav, type MobileNavProps, projectMobileNav, type ProjectMobileNavOptions, MOBILE_MAX_TABS_DEFAULT, MOBILE_MENU_MAX_DEFAULT, MOBILE_MORE_KEY, AppBreadcrumbs, type AppBreadcrumbsProps, PageBar, type PageBarProps, type PageBarSlot, PageAside, type PageAsideProps, type PageAsideSlot, type SidebarSection, type SidebarItem, type SidebarBlock, type SidebarBlockItem, type SidebarBlockTone, type SidebarListBlock, type SidebarProgressBlock, type SidebarCustomBlock, type NavAnchor, type NavAnchorProps, type NavMobilePlacement, type NavSectionMobile, type MobileNavConfig, type MobileNavGroup, type MobileNavModel, type MobileNavSlot, type MobileNavSurface, type BasaltShellProps, type BrandConfig, type SettingsMenuItem, type AppSidebarProps, type AccountBadgeTone, type BasaltIdentity, type BasaltRole, type BasaltPlan, type AccountMenuItem, type BasaltAccountState, type BasaltAccountActions, type BasaltAccountProps, } from './shell/index.js';
|
|
22
|
+
export { MOTION_DURATION, MOTION_SPRING, MOTION_EASE_STANDARD } from './common/motion.js';
|
|
23
|
+
export { BasaltShell, NavCountBadge, type NavCountBadgeProps, AppSidebar, SidebarSearch, type SidebarSearchProps, type SidebarSearchConfig, type SidebarSearchActions, SidebarAccount, MobileNav, type MobileNavProps, projectMobileNav, type ProjectMobileNavOptions, MOBILE_MAX_TABS_DEFAULT, MOBILE_MENU_MAX_DEFAULT, MOBILE_MORE_KEY, AppBreadcrumbs, type AppBreadcrumbsProps, PageBar, type PageBarProps, type PageBarSlot, PageAside, type PageAsideProps, type PageAsideSlot, useBreakpoint, type BreakpointName, PageTitle, type PageTitleProps, type PageTitleSlot, type SidebarSection, type SidebarItem, type SidebarBlock, type SidebarBlockItem, type SidebarBlockTone, type SidebarListBlock, type SidebarProgressBlock, type SidebarCustomBlock, type NavAnchor, type NavAnchorProps, type NavMobilePlacement, type NavSectionMobile, type MobileNavConfig, type MobileNavGroup, type MobileNavModel, type MobileNavSlot, type MobileNavSurface, type BasaltShellProps, type BrandConfig, type SettingsMenuItem, type AppSidebarProps, type AccountBadgeTone, type BasaltIdentity, type BasaltRole, type BasaltPlan, type AccountMenuItem, type BasaltAccountState, type BasaltAccountActions, type BasaltAccountProps, } from './shell/index.js';
|
|
24
24
|
export { type BasaltRegister, type Slot, type Series, type SeriesKey, type AsyncState, assertNever, type StandardSchemaV1, } from './register.js';
|
|
25
25
|
export { createPersistedState, type PersistedStateOptions, readPersistedValue, createLocalStore, type LocalStore, type AnyField, type BooleanField, type EnumField, type FieldFallback, type FieldHandle, type FieldLane, type FieldOption, type FieldSetOptions, type FieldValue, type MultiField, type NumberField, type RangeField, type RangeParams, type RangePresets, type RangeValue, type RangeWindow, type RangeWindows, type ResolvedLane, type ResolveLane, type SearchValues, type StoredValues, type StringField, } from './state.js';
|
|
26
|
-
export { WidgetHeader, type WidgetHeaderDeltaProps, type WidgetHeaderMetricProps, type WidgetHeaderProps, type WidgetHeaderSlot, type WidgetHeaderTier, type WidgetHeaderTitleProps, DeltaBadge, type DeltaBadgeProps, type DeltaPolarity, } from './
|
|
27
|
-
export {
|
|
28
|
-
export {
|
|
29
|
-
export {
|
|
30
|
-
export type { ConnectivityStatus, ConnectivitySnapshot, ConnectivityProviderProps, ConnectivityOverride, } from './connectivity
|
|
26
|
+
export { WidgetHeader, type WidgetHeaderDeltaProps, type WidgetHeaderMetricProps, type WidgetHeaderProps, type WidgetHeaderSlot, type WidgetHeaderTier, type WidgetHeaderTitleProps, DeltaBadge, type DeltaBadgeProps, type DeltaPolarity, Section, type SectionProps, type SectionSlot, StatCard, type StatCardBreakdownRow, type StatCardProps, type StatCardSlot, type StatCardTone, WidgetGrid, type WidgetGridCols, type WidgetGridItemProps, type WidgetGridProps, StatGroup, type StatGroupCols, type StatGroupProps, EmptyState, type EmptyStateProps, type EmptyStateSlot, SettingsSection, type SettingsSectionProps, type SettingsSectionSlot, SettingsRow, type SettingsRowProps, type SettingsRowSlot, DangerZone, type DangerZoneProps, QueryState, type QueryStateProps, type QueryStateLike, type QueryStateSlot, type QueryStateTier, type QueryEmptyCopy, LoadingState, type LoadingStateProps, ErrorState, type ErrorStateProps, } from './dashboard/index.js';
|
|
27
|
+
export { ConnectivityProvider } from './provider/connectivity-provider.js';
|
|
28
|
+
export { ConnectivityIndicator } from './provider/connectivity-indicator.js';
|
|
29
|
+
export { useConnectivity } from './provider/use-connectivity.js';
|
|
30
|
+
export type { ConnectivityStatus, ConnectivitySnapshot, ConnectivityProviderProps, ConnectivityOverride, } from './provider/connectivity-types.js';
|
|
31
|
+
export type { ConnectivityIndicatorProps } from './provider/connectivity-indicator.js';
|
|
32
|
+
export { createBasaltQueryClient, unwrap } from './query-client.js';
|
|
33
|
+
export { BasaltQueryDevtools } from './query-devtools.js';
|
|
34
|
+
export { toErrorMessage, errorStatus } from './common/errors.js';
|
|
35
|
+
export { BasaltDevDock, type BasaltDevDockProps, type BasaltDevDockTool } from './dev-dock.js';
|
|
31
36
|
export type { SurfaceSpec, RuleName, SkillName } from './surfaces.js';
|
|
32
37
|
export type { GuardKind } from './guard/types.js';
|
|
33
38
|
export { ThreadWorkspace, ThreadFeed, ThreadFeedRow, ThreadOutcomeCard, ThreadDetailPanel, Composer, threadPartRenderers, ThreadTranscript, ToolChip, } from './agent-chat/index.js';
|
|
34
|
-
export type { ThreadWorkspaceProps, ThreadFeedProps, ThreadFeedRowProps, ThreadOutcomeCardProps, ThreadDetailPanelProps, ComposerProps, ComposerSubmit, ComposerAttachment, ComposerHandle, ThreadTranscriptProps, MessageAffordances, VirtualizeOptions, VirtualizeProps, ToolChipProps, } from './agent-chat/index.js';
|
|
39
|
+
export type { ThreadWorkspaceProps, ThreadFeedProps, ThreadFeedRowProps, ThreadOutcomeCardProps, ThreadDetailPanelProps, ComposerProps, ComposerSubmit, ComposerAttachment, ComposerHandle, ThreadTranscriptProps, MessageAffordances, VirtualizeOptions, VirtualizeProps, RowHeightProps, ToolChipProps, } from './agent-chat/index.js';
|
|
35
40
|
export { createAdapterThreadsStore, createThreadsStore, heuristicOutcome, threadsStoreAdapterContract, useAgentThreadRuns, } from './agent/index.js';
|
|
36
41
|
export type { AdapterThreadsStoreOptions, AgentThread, AgentOutcome, ThreadStatus, ThreadsStore, ThreadsStoreAdapter, ThreadsStoreAdapterContractCase, ThreadsStoreOptions, OutcomeResolver, ChatMessage, AgentPart, AgentTransport, } from './agent/index.js';
|
|
37
42
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,cAAc,EACd,KAAK,mBAAmB,EACxB,mBAAmB,EACnB,KAAK,kBAAkB,GACxB,MAAM,YAAY,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,cAAc,EACd,KAAK,mBAAmB,EACxB,mBAAmB,EACnB,KAAK,wBAAwB,EAC7B,KAAK,kBAAkB,GACxB,MAAM,YAAY,CAAA;AASnB,OAAO,EACL,KAAK,WAAW,EAChB,KAAK,cAAc,EACnB,KAAK,eAAe,EACpB,KAAK,IAAI,EACT,KAAK,eAAe,EACpB,KAAK,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E,QAAQ,EAAE,SAAS,EAAE,MAAM,YAAY,CAAA;AAClE,YAAY,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAU9C,OAAO,EACL,eAAe,EACf,UAAU,EACV,aAAa,EACb,iBAAiB,EACjB,iBAAiB,EACjB,QAAQ,EACR,mBAAmB,EACnB,gBAAgB,EAChB,QAAQ,GACT,MAAM,cAAc,CAAA;AACrB,YAAY,EACV,oBAAoB,EACpB,eAAe,EACf,kBAAkB,EAClB,sBAAsB,EACtB,sBAAsB,EACtB,aAAa,EACb,cAAc,EACd,kBAAkB,EAClB,cAAc,EACd,qBAAqB,EACrB,kBAAkB,EAClB,iBAAiB,EACjB,eAAe,EACf,cAAc,EACd,aAAa,GACd,MAAM,cAAc,CAAA;AACrB,OAAO,EACL,yBAAyB,EACzB,kBAAkB,EAClB,gBAAgB,EAChB,2BAA2B,EAC3B,kBAAkB,GACnB,MAAM,SAAS,CAAA;AAChB,YAAY,EACV,0BAA0B,EAC1B,WAAW,EACX,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,mBAAmB,EACnB,+BAA+B,EAC/B,mBAAmB,EACnB,eAAe,EACf,WAAW,EACX,SAAS,EACT,cAAc,GACf,MAAM,SAAS,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -4,26 +4,16 @@ import {
|
|
|
4
4
|
} from "./provider/index.js";
|
|
5
5
|
import {
|
|
6
6
|
cx,
|
|
7
|
-
assignRef,
|
|
8
|
-
mergeRefs,
|
|
9
|
-
BASALT_PREFIX,
|
|
10
|
-
requiredProp,
|
|
11
|
-
oneOf,
|
|
12
|
-
deprecatedProp,
|
|
13
|
-
duplicateMount,
|
|
14
|
-
missingLayer,
|
|
15
|
-
useValidateProps,
|
|
16
|
-
assertRequiredProps,
|
|
17
7
|
scrollParentOf,
|
|
18
8
|
SCROLLPORT_ATTRIBUTE
|
|
19
9
|
} from "./common/index.js";
|
|
20
10
|
import { createBasaltTheme, baseTheme, cssVariablesResolver } from "./theme/index.js";
|
|
21
11
|
import { CTL_THEME, CtlSlot } from "./theme/index.js";
|
|
12
|
+
import { ThemeToggle } from "./theme/theme-toggle.js";
|
|
22
13
|
import {
|
|
23
14
|
ActionGroup
|
|
24
15
|
} from "./controls/actions.js";
|
|
25
|
-
import {
|
|
26
|
-
import { MOTION_DURATION, MOTION_SPRING, MOTION_EASE_STANDARD } from "./motion/index.js";
|
|
16
|
+
import { MOTION_DURATION, MOTION_SPRING, MOTION_EASE_STANDARD } from "./common/motion.js";
|
|
27
17
|
import {
|
|
28
18
|
BasaltShell,
|
|
29
19
|
NavCountBadge,
|
|
@@ -37,7 +27,9 @@ import {
|
|
|
37
27
|
MOBILE_MORE_KEY,
|
|
38
28
|
AppBreadcrumbs,
|
|
39
29
|
PageBar,
|
|
40
|
-
PageAside
|
|
30
|
+
PageAside,
|
|
31
|
+
useBreakpoint,
|
|
32
|
+
PageTitle
|
|
41
33
|
} from "./shell/index.js";
|
|
42
34
|
import {
|
|
43
35
|
assertNever
|
|
@@ -49,10 +41,8 @@ import {
|
|
|
49
41
|
} from "./state.js";
|
|
50
42
|
import {
|
|
51
43
|
WidgetHeader,
|
|
52
|
-
DeltaBadge
|
|
53
|
-
|
|
54
|
-
import { Section } from "./section/index.js";
|
|
55
|
-
import {
|
|
44
|
+
DeltaBadge,
|
|
45
|
+
Section,
|
|
56
46
|
StatCard,
|
|
57
47
|
WidgetGrid,
|
|
58
48
|
StatGroup,
|
|
@@ -64,7 +54,13 @@ import {
|
|
|
64
54
|
LoadingState,
|
|
65
55
|
ErrorState
|
|
66
56
|
} from "./dashboard/index.js";
|
|
67
|
-
import { ConnectivityProvider
|
|
57
|
+
import { ConnectivityProvider } from "./provider/connectivity-provider.js";
|
|
58
|
+
import { ConnectivityIndicator } from "./provider/connectivity-indicator.js";
|
|
59
|
+
import { useConnectivity } from "./provider/use-connectivity.js";
|
|
60
|
+
import { createBasaltQueryClient, unwrap } from "./query-client.js";
|
|
61
|
+
import { BasaltQueryDevtools } from "./query-devtools.js";
|
|
62
|
+
import { toErrorMessage, errorStatus } from "./common/errors.js";
|
|
63
|
+
import { BasaltDevDock } from "./dev-dock.js";
|
|
68
64
|
import {
|
|
69
65
|
ThreadWorkspace,
|
|
70
66
|
ThreadFeed,
|
|
@@ -87,9 +83,10 @@ export {
|
|
|
87
83
|
ActionGroup,
|
|
88
84
|
AppBreadcrumbs,
|
|
89
85
|
AppSidebar,
|
|
90
|
-
|
|
86
|
+
BasaltDevDock,
|
|
91
87
|
BasaltErrorBoundary,
|
|
92
88
|
BasaltProvider,
|
|
89
|
+
BasaltQueryDevtools,
|
|
93
90
|
BasaltShell,
|
|
94
91
|
CTL_THEME,
|
|
95
92
|
Composer,
|
|
@@ -111,6 +108,7 @@ export {
|
|
|
111
108
|
NavCountBadge,
|
|
112
109
|
PageAside,
|
|
113
110
|
PageBar,
|
|
111
|
+
PageTitle,
|
|
114
112
|
QueryState,
|
|
115
113
|
SCROLLPORT_ATTRIBUTE,
|
|
116
114
|
Section,
|
|
@@ -131,29 +129,25 @@ export {
|
|
|
131
129
|
WidgetGrid,
|
|
132
130
|
WidgetHeader,
|
|
133
131
|
assertNever,
|
|
134
|
-
assertRequiredProps,
|
|
135
|
-
assignRef,
|
|
136
132
|
baseTheme,
|
|
137
133
|
createAdapterThreadsStore,
|
|
134
|
+
createBasaltQueryClient,
|
|
138
135
|
createBasaltTheme,
|
|
139
136
|
createLocalStore,
|
|
140
137
|
createPersistedState,
|
|
141
138
|
createThreadsStore,
|
|
142
139
|
cssVariablesResolver,
|
|
143
140
|
cx,
|
|
144
|
-
|
|
145
|
-
duplicateMount,
|
|
141
|
+
errorStatus,
|
|
146
142
|
heuristicOutcome,
|
|
147
|
-
mergeRefs,
|
|
148
|
-
missingLayer,
|
|
149
|
-
oneOf,
|
|
150
143
|
projectMobileNav,
|
|
151
144
|
readPersistedValue,
|
|
152
|
-
requiredProp,
|
|
153
145
|
scrollParentOf,
|
|
154
146
|
threadPartRenderers,
|
|
155
147
|
threadsStoreAdapterContract,
|
|
148
|
+
toErrorMessage,
|
|
149
|
+
unwrap,
|
|
156
150
|
useAgentThreadRuns,
|
|
157
|
-
|
|
158
|
-
|
|
151
|
+
useBreakpoint,
|
|
152
|
+
useConnectivity
|
|
159
153
|
};
|
|
@@ -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'
|
|
@@ -35,6 +37,4 @@ export { NotificationBell } from './bell.js';
|
|
|
35
37
|
export type { NotificationBellProps } from './bell.js';
|
|
36
38
|
export { NotificationCenter } from './center.js';
|
|
37
39
|
export type { NotificationCenterProps } from './center.js';
|
|
38
|
-
export { BasaltNotifications } from './overlay.js';
|
|
39
|
-
export type { BasaltNotificationsProps } from './overlay.js';
|
|
40
40
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/notifications/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/notifications/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAGH,OAAO,EACL,MAAM,EACN,aAAa,EACb,WAAW,EACX,aAAa,EACb,UAAU,EACV,aAAa,EACb,UAAU,EACV,cAAc,GACf,MAAM,UAAU,CAAA;AACjB,YAAY,EACV,aAAa,EACb,qBAAqB,EACrB,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,UAAU,CAAA;AAGjB,OAAO,EACL,kBAAkB,EAClB,mBAAmB,EACnB,IAAI,EACJ,aAAa,EACb,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,GACxB,MAAM,wBAAwB,CAAA;AAG/B,OAAO,EACL,GAAG,EACH,QAAQ,EACR,WAAW,EACX,OAAO,EACP,UAAU,EACV,MAAM,EACN,KAAK,EACL,cAAc,EACd,sBAAsB,GACvB,MAAM,SAAS,CAAA;AAChB,YAAY,EACV,qBAAqB,EACrB,uBAAuB,EACvB,wBAAwB,EACxB,4BAA4B,GAC7B,MAAM,SAAS,CAAA;AAGhB,OAAO,EAAE,gBAAgB,EAAE,MAAM,QAAQ,CAAA;AACzC,YAAY,EAAE,qBAAqB,EAAE,MAAM,QAAQ,CAAA;AAGnD,OAAO,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAA;AAC7C,YAAY,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAA"}
|
|
@@ -27,9 +27,7 @@ import {
|
|
|
27
27
|
} from "./store.js";
|
|
28
28
|
import { NotificationBell } from "./bell.js";
|
|
29
29
|
import { NotificationCenter } from "./center.js";
|
|
30
|
-
import { BasaltNotifications } from "./overlay.js";
|
|
31
30
|
export {
|
|
32
|
-
BasaltNotifications,
|
|
33
31
|
NotificationBell,
|
|
34
32
|
NotificationCenter,
|
|
35
33
|
add,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mount-guard.d.ts","sourceRoot":"","sources":["../../src/notifications/mount-guard.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"mount-guard.d.ts","sourceRoot":"","sources":["../../src/notifications/mount-guard.ts"],"names":[],"mappings":"AAkBA;;;;;GAKG;AACH,wBAAgB,0BAA0B,IAAI,IAAI,CAcjD"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { useEffect } from "react";
|
|
2
|
-
import { isDev } from "../
|
|
2
|
+
import { isDev } from "../common/is-dev.js";
|
|
3
3
|
let mountedNotificationsCount = 0;
|
|
4
4
|
function useNotificationsMountGuard() {
|
|
5
5
|
useEffect(() => {
|
|
6
6
|
mountedNotificationsCount++;
|
|
7
7
|
if (mountedNotificationsCount > 1 && isDev()) {
|
|
8
8
|
console.warn(
|
|
9
|
-
"[basalt] more than one Notifications overlay is mounted at once \u2014 mount ONE
|
|
9
|
+
"[basalt] more than one Notifications overlay is mounted at once \u2014 mount exactly ONE <BasaltOverlays notifications /> (they all render Mantine's <Notifications />, so toasts would double-fire)."
|
|
10
10
|
);
|
|
11
11
|
}
|
|
12
12
|
return () => {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"connectivity-indicator.d.ts","sourceRoot":"","sources":["../../src/provider/connectivity-indicator.tsx"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAKlD,MAAM,MAAM,0BAA0B,GAAG,WAAW,CAAA;AAyJpD;;;;;;;;GAQG;AACH,wBAAgB,qBAAqB,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,GAAE,0BAA+B,+BAiF1F"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
|
-
import type { ConnectivitySnapshot, ConnectivityProviderProps } from './types.js';
|
|
2
|
+
import type { ConnectivitySnapshot, ConnectivityProviderProps } from './connectivity-types.js';
|
|
3
3
|
export declare const ConnectivityContext: import("react").Context<ConnectivitySnapshot | null>;
|
|
4
4
|
export declare function ConnectivityProvider({ children, sseUrl, healthUrl, healthIntervalMs, override, }: ConnectivityProviderProps & {
|
|
5
5
|
children: ReactNode;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"connectivity-provider.d.ts","sourceRoot":"","sources":["../../src/provider/connectivity-provider.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEtC,OAAO,KAAK,EAAE,oBAAoB,EAAE,yBAAyB,EAAE,MAAM,sBAAsB,CAAA;AAmB3F,eAAO,MAAM,mBAAmB,sDAAmD,CAAA;AAyBnF,wBAAgB,oBAAoB,CAAC,EACnC,QAAQ,EACR,MAAM,EACN,SAAS,EACT,gBAAyB,EACzB,QAAQ,GACT,EAAE,yBAAyB,GAAG;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,+BAgIrD"}
|
|
@@ -33,4 +33,4 @@ export type ConnectivityProviderProps = {
|
|
|
33
33
|
/** Override individual signal values for testing / simulation. Non-overridden keys use real signals. */
|
|
34
34
|
override?: ConnectivityOverride;
|
|
35
35
|
};
|
|
36
|
-
//# sourceMappingURL=types.d.ts.map
|
|
36
|
+
//# sourceMappingURL=connectivity-types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"connectivity-types.d.ts","sourceRoot":"","sources":["../../src/provider/connectivity-types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,MAAM,MAAM,kBAAkB,GAAG,QAAQ,GAAG,SAAS,GAAG,UAAU,CAAA;AAElE,MAAM,MAAM,oBAAoB,GAAG;IACjC,MAAM,EAAE,kBAAkB,CAAA;IAC1B,+DAA+D;IAC/D,OAAO,EAAE;QACP,aAAa,EAAE,OAAO,CAAA;QAItB,WAAW,EAAE,OAAO,CAAA;QACpB,OAAO,EAAE,OAAO,GAAG,IAAI,CAAA;QACvB,aAAa,EAAE,OAAO,GAAG,IAAI,CAAA;KAC9B,CAAA;CACF,CAAA;AAED,MAAM,MAAM,oBAAoB,GAAG;IACjC,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,OAAO,CAAC,EAAE,OAAO,GAAG,IAAI,CAAA;IACxB,aAAa,CAAC,EAAE,OAAO,GAAG,IAAI,CAAA;CAC/B,CAAA;AAED,MAAM,MAAM,yBAAyB,GAAG;IACtC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,iGAAiG;IACjG,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,oGAAoG;IACpG,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,8DAA8D;IAC9D,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,wGAAwG;IACxG,QAAQ,CAAC,EAAE,oBAAoB,CAAA;CAChC,CAAA"}
|
|
@@ -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
|
package/dist/provider/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { MantineProviderProps } from '@mantine/core';
|
|
2
2
|
import { Component } from 'react';
|
|
3
3
|
import type { ErrorInfo, ReactNode } from 'react';
|
|
4
|
-
import type { ConnectivityProviderProps } from '
|
|
4
|
+
import type { ConnectivityProviderProps } from './connectivity-types.js';
|
|
5
5
|
import type { BuildPaletteOpts } from '../tokens/index.js';
|
|
6
6
|
/**
|
|
7
7
|
* Where an error surfaced — drives consumer routing (a render error vs a global rejection differ).
|
|
@@ -75,30 +75,28 @@ export type BasaltProviderProps = {
|
|
|
75
75
|
* Options threaded through to the auto-mounted `ConnectivityProvider` (everything except
|
|
76
76
|
* `children`) — `sseUrl`, `healthUrl`, `healthIntervalMs`, and `override` (previously
|
|
77
77
|
* unreachable through `BasaltProvider`: the only way to reach it was a second, shadowing
|
|
78
|
-
* `ConnectivityProvider`).
|
|
79
|
-
* are set.
|
|
78
|
+
* `ConnectivityProvider`).
|
|
80
79
|
*/
|
|
81
80
|
connectivity?: Omit<ConnectivityProviderProps, 'children'>;
|
|
81
|
+
} & Omit<MantineProviderProps, 'children' | 'theme' | 'defaultColorScheme' | 'cssVariablesResolver'>;
|
|
82
|
+
/**
|
|
83
|
+
* `BasaltErrorBoundary`'s props — exported (C5 consolidation) so a consumer mounting a nested
|
|
84
|
+
* boundary can name the type, e.g. for a wrapper component's own prop forwarding.
|
|
85
|
+
*/
|
|
86
|
+
export type BasaltErrorBoundaryProps = {
|
|
87
|
+
children: ReactNode;
|
|
82
88
|
/**
|
|
83
|
-
*
|
|
84
|
-
*
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
/**
|
|
88
|
-
* @deprecated Use `connectivity={{ healthUrl }}` instead. Still honoured when `connectivity` is
|
|
89
|
-
* unset or omits `healthUrl`; removed in 1.29.0.
|
|
89
|
+
* Report the caught render error. Unset → `defaultOnError` (console.error in dev, no-op in
|
|
90
|
+
* prod — the same fallback `BasaltProvider`'s own top-level `onError` uses), so a NESTED
|
|
91
|
+
* boundary mounted with no `onError` still surfaces something in dev instead of silently
|
|
92
|
+
* swallowing it.
|
|
90
93
|
*/
|
|
91
|
-
|
|
94
|
+
onError?: (error: unknown, ctx: BasaltErrorContext) => void;
|
|
92
95
|
/**
|
|
93
|
-
*
|
|
94
|
-
* `
|
|
96
|
+
* UI to render when a render error is caught. If a function, called with the error. Unset →
|
|
97
|
+
* {@link DefaultErrorFallback} — a minimal `PageTitle` + reload button, never a silent `null`;
|
|
98
|
+
* pass `fallback={null}` explicitly for the old swallow-it behaviour.
|
|
95
99
|
*/
|
|
96
|
-
healthIntervalMs?: number;
|
|
97
|
-
} & Omit<MantineProviderProps, 'children' | 'theme' | 'defaultColorScheme' | 'cssVariablesResolver'>;
|
|
98
|
-
type BoundaryProps = {
|
|
99
|
-
children: ReactNode;
|
|
100
|
-
onError: (error: unknown, ctx: BasaltErrorContext) => void;
|
|
101
|
-
/** Optional UI to render when a render error is caught. If a function, called with the error. Defaults to null. */
|
|
102
100
|
fallback?: ReactNode | ((error: unknown) => ReactNode);
|
|
103
101
|
};
|
|
104
102
|
type BoundaryState = {
|
|
@@ -115,8 +113,8 @@ type BoundaryState = {
|
|
|
115
113
|
* <MyFeature />
|
|
116
114
|
* </BasaltErrorBoundary>
|
|
117
115
|
*/
|
|
118
|
-
export declare class BasaltErrorBoundary extends Component<
|
|
119
|
-
constructor(props:
|
|
116
|
+
export declare class BasaltErrorBoundary extends Component<BasaltErrorBoundaryProps, BoundaryState> {
|
|
117
|
+
constructor(props: BasaltErrorBoundaryProps);
|
|
120
118
|
static getDerivedStateFromError(error: unknown): BoundaryState;
|
|
121
119
|
componentDidCatch(error: unknown, info: ErrorInfo): void;
|
|
122
120
|
render(): ReactNode;
|
|
@@ -135,20 +133,6 @@ export declare class BasaltErrorBoundary extends Component<BoundaryProps, Bounda
|
|
|
135
133
|
* rendering a React tree.
|
|
136
134
|
*/
|
|
137
135
|
export declare function composeInjectedCss(base: string, fontsCss: string, radiusCss: string, densityCss: string): string;
|
|
138
|
-
|
|
139
|
-
* Resolves the `connectivity` object against the three deprecated flattened props: `connectivity`
|
|
140
|
-
* wins WHOLESALE when provided, not per-key — a partial `connectivity={{ sseUrl }}` no longer picks
|
|
141
|
-
* up a stray `healthUrl` left on the old prop, which was surprising for a mid-migration consumer who
|
|
142
|
-
* expected the new prop to fully replace the old ones once set. Warns once, dev builds only, when
|
|
143
|
-
* both are actually supplied. Exported as a pure function (same rationale as `composeInjectedCss`
|
|
144
|
-
* above) so `provider/index.test.ts` can assert the precedence without rendering a tree.
|
|
145
|
-
*/
|
|
146
|
-
export declare function resolveConnectivityProps(props: {
|
|
147
|
-
connectivity: Omit<ConnectivityProviderProps, 'children'> | undefined;
|
|
148
|
-
sseUrl: string | undefined;
|
|
149
|
-
healthUrl: string | undefined;
|
|
150
|
-
healthIntervalMs: number | undefined;
|
|
151
|
-
}): Omit<ConnectivityProviderProps, 'children'>;
|
|
152
|
-
export declare function BasaltProvider({ children, theme, injectPalette, paletteOptions, defaultColorScheme, onError, nonce, connectivity, sseUrl, healthUrl, healthIntervalMs, ...rest }: BasaltProviderProps): import("react").JSX.Element;
|
|
136
|
+
export declare function BasaltProvider({ children, theme, injectPalette, paletteOptions, defaultColorScheme, onError, nonce, connectivity, ...rest }: BasaltProviderProps): import("react").JSX.Element;
|
|
153
137
|
export {};
|
|
154
138
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/provider/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":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edColorScheme,
|
|
5
|
+
useMantineColorScheme,
|
|
6
|
+
useMantineTheme
|
|
7
|
+
} from "@mantine/core";
|
|
3
8
|
import { Component, useEffect, useMemo } from "react";
|
|
4
9
|
import { VxThemeProvider } from "../charts/theme.js";
|
|
5
|
-
import
|
|
10
|
+
import fallbackClasses from "./error-fallback.module.css";
|
|
11
|
+
import { ConnectivityProvider } from "./connectivity-provider.js";
|
|
6
12
|
import { cssVariablesResolver } from "../theme/index.js";
|
|
7
13
|
import { useLabTheme } from "./lab-theme.js";
|
|
8
14
|
import { buildDensityCss, buildFontsCss, buildPaletteCss, buildRadiusCss } from "../tokens/index.js";
|
|
9
15
|
import { isDefaultDeriveConfig } from "../tokens/derive.js";
|
|
10
16
|
import { buildPaletteData } from "../tokens/palette.js";
|
|
11
|
-
import { isDev } from "../
|
|
17
|
+
import { isDev } from "../common/is-dev.js";
|
|
18
|
+
import { registerColorSchemeSetter } from "../commands/shell-bridge.js";
|
|
19
|
+
import { PageTitle } from "../shell/page-title.js";
|
|
12
20
|
function defaultOnError(error, ctx) {
|
|
13
21
|
if (isDev()) {
|
|
14
22
|
console.error("[BasaltProvider] unhandled error", ctx.kind, error);
|
|
15
23
|
}
|
|
16
24
|
}
|
|
25
|
+
function DefaultErrorFallback() {
|
|
26
|
+
return /* @__PURE__ */ jsxs("div", { className: fallbackClasses.root, children: [
|
|
27
|
+
/* @__PURE__ */ jsx(
|
|
28
|
+
PageTitle,
|
|
29
|
+
{
|
|
30
|
+
title: "Something went wrong",
|
|
31
|
+
subtitle: "The page hit an unexpected error and was unloaded to keep the app stable."
|
|
32
|
+
}
|
|
33
|
+
),
|
|
34
|
+
/* @__PURE__ */ jsx(
|
|
35
|
+
"button",
|
|
36
|
+
{
|
|
37
|
+
type: "button",
|
|
38
|
+
className: fallbackClasses.reload,
|
|
39
|
+
onClick: () => window.location.reload(),
|
|
40
|
+
children: "Reload page"
|
|
41
|
+
}
|
|
42
|
+
)
|
|
43
|
+
] });
|
|
44
|
+
}
|
|
17
45
|
class BasaltErrorBoundary extends Component {
|
|
18
46
|
constructor(props) {
|
|
19
47
|
super(props);
|
|
@@ -23,12 +51,14 @@ class BasaltErrorBoundary extends Component {
|
|
|
23
51
|
return { hasError: true, error };
|
|
24
52
|
}
|
|
25
53
|
componentDidCatch(error, info) {
|
|
26
|
-
this.props.onError
|
|
54
|
+
const onError = this.props.onError ?? defaultOnError;
|
|
55
|
+
onError(error, { kind: "render", info });
|
|
27
56
|
}
|
|
28
57
|
render() {
|
|
29
58
|
if (this.state.hasError) {
|
|
30
59
|
const { fallback } = this.props;
|
|
31
|
-
if (fallback === void 0) return
|
|
60
|
+
if (fallback === void 0) return /* @__PURE__ */ jsx(DefaultErrorFallback, {});
|
|
61
|
+
if (fallback === null) return null;
|
|
32
62
|
return typeof fallback === "function" ? fallback(this.state.error) : fallback;
|
|
33
63
|
}
|
|
34
64
|
return this.props.children;
|
|
@@ -45,6 +75,11 @@ function BasaltBridge({
|
|
|
45
75
|
onError
|
|
46
76
|
}) {
|
|
47
77
|
const resolved = useComputedColorScheme("dark");
|
|
78
|
+
const { setColorScheme: setMantineColorScheme } = useMantineColorScheme();
|
|
79
|
+
useEffect(() => {
|
|
80
|
+
registerColorSchemeSetter(setMantineColorScheme);
|
|
81
|
+
return () => registerColorSchemeSetter(null);
|
|
82
|
+
}, [setMantineColorScheme]);
|
|
48
83
|
const theme = useMantineTheme();
|
|
49
84
|
const deriveConfig = theme.other?.basaltDerive;
|
|
50
85
|
const fontsConfig = theme.other?.basaltFonts;
|
|
@@ -96,22 +131,6 @@ function useDuplicateProviderGuard() {
|
|
|
96
131
|
};
|
|
97
132
|
}, []);
|
|
98
133
|
}
|
|
99
|
-
function resolveConnectivityProps(props) {
|
|
100
|
-
if (props.connectivity !== void 0) {
|
|
101
|
-
const hasDeprecated = props.sseUrl !== void 0 || props.healthUrl !== void 0 || props.healthIntervalMs !== void 0;
|
|
102
|
-
if (hasDeprecated && isDev()) {
|
|
103
|
-
console.warn(
|
|
104
|
-
"[basalt] BasaltProvider: `connectivity` and one of `sseUrl`/`healthUrl`/`healthIntervalMs` were both supplied \u2014 `connectivity` wins wholesale and the deprecated props are ignored."
|
|
105
|
-
);
|
|
106
|
-
}
|
|
107
|
-
return props.connectivity;
|
|
108
|
-
}
|
|
109
|
-
return {
|
|
110
|
-
...props.sseUrl !== void 0 ? { sseUrl: props.sseUrl } : {},
|
|
111
|
-
...props.healthUrl !== void 0 ? { healthUrl: props.healthUrl } : {},
|
|
112
|
-
...props.healthIntervalMs !== void 0 ? { healthIntervalMs: props.healthIntervalMs } : {}
|
|
113
|
-
};
|
|
114
|
-
}
|
|
115
134
|
function BasaltProvider({
|
|
116
135
|
children,
|
|
117
136
|
theme,
|
|
@@ -121,20 +140,12 @@ function BasaltProvider({
|
|
|
121
140
|
onError,
|
|
122
141
|
nonce,
|
|
123
142
|
connectivity,
|
|
124
|
-
sseUrl,
|
|
125
|
-
healthUrl,
|
|
126
|
-
healthIntervalMs,
|
|
127
143
|
...rest
|
|
128
144
|
}) {
|
|
129
145
|
useDuplicateProviderGuard();
|
|
130
146
|
const errorHandler = onError ?? defaultOnError;
|
|
131
147
|
const resolvedTheme = useLabTheme(theme);
|
|
132
|
-
const resolvedConnectivity =
|
|
133
|
-
connectivity,
|
|
134
|
-
sseUrl,
|
|
135
|
-
healthUrl,
|
|
136
|
-
healthIntervalMs
|
|
137
|
-
});
|
|
148
|
+
const resolvedConnectivity = connectivity ?? {};
|
|
138
149
|
return (
|
|
139
150
|
// `...rest` spreads FIRST so a consumer's `MantineProviderProps` can never shadow the three
|
|
140
151
|
// values that follow it — `cssVariablesResolver` in particular is the resolver the package
|
|
@@ -164,6 +175,5 @@ function BasaltProvider({
|
|
|
164
175
|
export {
|
|
165
176
|
BasaltErrorBoundary,
|
|
166
177
|
BasaltProvider,
|
|
167
|
-
composeInjectedCss
|
|
168
|
-
resolveConnectivityProps
|
|
178
|
+
composeInjectedCss
|
|
169
179
|
};
|
|
@@ -2,7 +2,7 @@ import { mergeThemeOverrides } from "@mantine/core";
|
|
|
2
2
|
import { useMemo } from "react";
|
|
3
3
|
import { useDeriveControlsState, toDeriveOverride } from "../theme-lab/derive-state.js";
|
|
4
4
|
import { baseTheme, createBasaltTheme } from "../theme/index.js";
|
|
5
|
-
import { isDev } from "../
|
|
5
|
+
import { isDev } from "../common/is-dev.js";
|
|
6
6
|
const isPlainObject = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
7
7
|
function sameLeaf(a, b) {
|
|
8
8
|
if (a === b) return true;
|