@adea-ai/ui 0.152.4 → 0.154.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/README.md +469 -580
- package/dist/NOTICE +10 -1
- package/dist/components/composites/account-menu/account-menu.d.ts +5 -0
- package/dist/components/composites/account-menu/account-menu.d.ts.map +1 -1
- package/dist/components/composites/account-menu/account-menu.js +37 -13
- package/dist/components/composites/account-menu/account-menu.js.map +1 -1
- package/dist/components/composites/action-button/action-button.d.ts +2 -1
- package/dist/components/composites/action-button/action-button.d.ts.map +1 -1
- package/dist/components/composites/action-button/action-button.js +92 -66
- package/dist/components/composites/action-button/action-button.js.map +1 -1
- package/dist/components/composites/appearance-editor/accent-swatch-groups.d.ts +3 -3
- package/dist/components/composites/appearance-editor/accent-swatch-groups.js +1 -1
- package/dist/components/composites/appearance-editor/accent-swatch-groups.js.map +1 -1
- package/dist/components/composites/appearance-editor/appearance-choices.d.ts +1 -1
- package/dist/components/composites/appearance-editor/appearance-choices.js +1 -1
- package/dist/components/composites/appearance-editor/appearance-choices.js.map +1 -1
- package/dist/components/composites/appearance-editor/appearance-editor.d.ts.map +1 -1
- package/dist/components/composites/appearance-editor/appearance-editor.js +57 -57
- package/dist/components/composites/appearance-editor/appearance-editor.js.map +1 -1
- package/dist/components/composites/appearance-editor/appearance-rows.d.ts.map +1 -1
- package/dist/components/composites/appearance-editor/appearance-rows.js +9 -9
- package/dist/components/composites/appearance-editor/appearance-rows.js.map +1 -1
- package/dist/components/composites/appearance-editor/appearance-types.d.ts +7 -7
- package/dist/components/composites/appearance-editor/theme-preview.d.ts +1 -1
- package/dist/components/composites/appearance-editor/theme-preview.js +1 -1
- package/dist/components/composites/appearance-editor/theme-preview.js.map +1 -1
- package/dist/components/composites/catalog-browser/catalog-browser.d.ts.map +1 -1
- package/dist/components/composites/catalog-browser/catalog-browser.js +6 -10
- package/dist/components/composites/catalog-browser/catalog-browser.js.map +1 -1
- package/dist/components/composites/catalog-browser/catalog-detail.d.ts.map +1 -1
- package/dist/components/composites/catalog-browser/catalog-detail.js +36 -36
- package/dist/components/composites/catalog-browser/catalog-detail.js.map +1 -1
- package/dist/components/composites/chain-of-thought/chain-of-thought.d.ts +4 -4
- package/dist/components/composites/chain-of-thought/chain-of-thought.js.map +1 -1
- package/dist/components/composites/chat/chat.d.ts.map +1 -1
- package/dist/components/composites/chat/chat.js +33 -37
- package/dist/components/composites/chat/chat.js.map +1 -1
- package/dist/components/composites/checkpoint/checkpoint-model.d.ts +3 -3
- package/dist/components/composites/checkpoint/checkpoint-model.js +2 -2
- package/dist/components/composites/checkpoint/checkpoint-model.js.map +1 -1
- package/dist/components/composites/checkpoint/checkpoint.d.ts +2 -2
- package/dist/components/composites/checkpoint/checkpoint.js.map +1 -1
- package/dist/components/composites/confirmation/confirmation.d.ts.map +1 -1
- package/dist/components/composites/confirmation/confirmation.js +1 -1
- package/dist/components/composites/confirmation/confirmation.js.map +1 -1
- package/dist/components/composites/context/context.d.ts +2 -2
- package/dist/components/composites/context/context.js.map +1 -1
- package/dist/components/composites/file-tree/build-file-tree.d.ts +1 -1
- package/dist/components/composites/file-tree/build-file-tree.js +1 -1
- package/dist/components/composites/file-tree/build-file-tree.js.map +1 -1
- package/dist/components/composites/file-tree/file-tree.d.ts.map +1 -1
- package/dist/components/composites/file-tree/file-tree.js +7 -3
- package/dist/components/composites/file-tree/file-tree.js.map +1 -1
- package/dist/components/composites/icon-picker/icon-picker.js +1 -3
- package/dist/components/composites/icon-picker/icon-picker.js.map +1 -1
- package/dist/components/composites/inline-citation/citation.d.ts +1 -1
- package/dist/components/composites/inline-citation/citation.js +1 -1
- package/dist/components/composites/inline-citation/citation.js.map +1 -1
- package/dist/components/composites/inline-citation/inline-citation.d.ts +2 -2
- package/dist/components/composites/inline-citation/inline-citation.js.map +1 -1
- package/dist/components/composites/list-row/list-row-control.d.ts.map +1 -1
- package/dist/components/composites/list-row/list-row-control.js +22 -22
- package/dist/components/composites/list-row/list-row-control.js.map +1 -1
- package/dist/components/composites/list-row/list-row.d.ts +5 -0
- package/dist/components/composites/list-row/list-row.d.ts.map +1 -1
- package/dist/components/composites/list-row/list-row.js +75 -83
- package/dist/components/composites/list-row/list-row.js.map +1 -1
- package/dist/components/composites/message-scroller/message-scroller.d.ts +1 -1
- package/dist/components/composites/message-scroller/message-scroller.js.map +1 -1
- package/dist/components/composites/model-selector/model-selector.d.ts +19 -5
- package/dist/components/composites/model-selector/model-selector.d.ts.map +1 -1
- package/dist/components/composites/model-selector/model-selector.js +263 -29
- package/dist/components/composites/model-selector/model-selector.js.map +1 -1
- package/dist/components/composites/model-selector/models.d.ts +2 -2
- package/dist/components/composites/model-selector/models.js +1 -1
- package/dist/components/composites/model-selector/models.js.map +1 -1
- package/dist/components/composites/plan/plan.d.ts.map +1 -1
- package/dist/components/composites/plan/plan.js +17 -15
- package/dist/components/composites/plan/plan.js.map +1 -1
- package/dist/components/composites/queue/queue.d.ts.map +1 -1
- package/dist/components/composites/queue/queue.js +5 -7
- package/dist/components/composites/queue/queue.js.map +1 -1
- package/dist/components/composites/reasoning/reasoning.d.ts +4 -4
- package/dist/components/composites/reasoning/reasoning.js +4 -4
- package/dist/components/composites/reasoning/reasoning.js.map +1 -1
- package/dist/components/composites/settings/settings-navigation.d.ts.map +1 -1
- package/dist/components/composites/settings/settings-navigation.js +63 -14
- package/dist/components/composites/settings/settings-navigation.js.map +1 -1
- package/dist/components/composites/settings/settings.d.ts.map +1 -1
- package/dist/components/composites/settings/settings.js +32 -32
- package/dist/components/composites/settings/settings.js.map +1 -1
- package/dist/components/composites/sources/source.d.ts +1 -1
- package/dist/components/composites/sources/source.js.map +1 -1
- package/dist/components/composites/sources/sources.d.ts +2 -2
- package/dist/components/composites/sources/sources.js.map +1 -1
- package/dist/components/composites/stack-trace/parse-stack-trace.d.ts +3 -3
- package/dist/components/composites/stack-trace/parse-stack-trace.js +4 -4
- package/dist/components/composites/stack-trace/parse-stack-trace.js.map +1 -1
- package/dist/components/composites/stack-trace/stack-trace.d.ts +3 -3
- package/dist/components/composites/stack-trace/stack-trace.js.map +1 -1
- package/dist/components/composites/stat/stat.d.ts.map +1 -1
- package/dist/components/composites/stat/stat.js +14 -16
- package/dist/components/composites/stat/stat.js.map +1 -1
- package/dist/components/composites/subagent/subagent.d.ts.map +1 -1
- package/dist/components/composites/subagent/subagent.js +6 -4
- package/dist/components/composites/subagent/subagent.js.map +1 -1
- package/dist/components/composites/task/task.d.ts +1 -1
- package/dist/components/composites/task/task.js.map +1 -1
- package/dist/components/composites/terminal/ansi.d.ts +3 -3
- package/dist/components/composites/terminal/ansi.js.map +1 -1
- package/dist/components/composites/terminal/terminal-model.d.ts +3 -3
- package/dist/components/composites/terminal/terminal-model.d.ts.map +1 -1
- package/dist/components/composites/terminal/terminal-model.js +1 -1
- package/dist/components/composites/terminal/terminal-model.js.map +1 -1
- package/dist/components/composites/terminal/terminal.d.ts.map +1 -1
- package/dist/components/composites/terminal/terminal.js +24 -11
- package/dist/components/composites/terminal/terminal.js.map +1 -1
- package/dist/components/composites/test-results/test-results-model.d.ts +4 -4
- package/dist/components/composites/test-results/test-results-model.js +2 -2
- package/dist/components/composites/test-results/test-results-model.js.map +1 -1
- package/dist/components/composites/test-results/test-results.d.ts +1 -1
- package/dist/components/composites/test-results/test-results.js.map +1 -1
- package/dist/components/composites/tool/tool.d.ts +4 -4
- package/dist/components/composites/tool/tool.js.map +1 -1
- package/dist/components/composites/tree/tree.d.ts +1 -1
- package/dist/components/composites/tree/tree.d.ts.map +1 -1
- package/dist/components/composites/tree/tree.js +25 -18
- package/dist/components/composites/tree/tree.js.map +1 -1
- package/dist/components/composites/update-dialog/channel-control.d.ts +10 -4
- package/dist/components/composites/update-dialog/channel-control.d.ts.map +1 -1
- package/dist/components/composites/update-dialog/channel-control.js +14 -19
- package/dist/components/composites/update-dialog/channel-control.js.map +1 -1
- package/dist/components/composites/update-dialog/index.d.ts +1 -1
- package/dist/components/composites/update-dialog/index.d.ts.map +1 -1
- package/dist/components/composites/update-dialog/update-dialog.js +4 -5
- package/dist/components/composites/update-dialog/update-dialog.js.map +1 -1
- package/dist/components/composites/workspace-mark/workspace-mark.d.ts.map +1 -1
- package/dist/components/composites/workspace-mark/workspace-mark.js +19 -20
- package/dist/components/composites/workspace-mark/workspace-mark.js.map +1 -1
- package/dist/components/conversation/busy-send-button.d.ts.map +1 -1
- package/dist/components/conversation/busy-send-button.js +18 -20
- package/dist/components/conversation/busy-send-button.js.map +1 -1
- package/dist/components/conversation/composer-menu.d.ts +3 -3
- package/dist/components/conversation/composer-menu.js +3 -3
- package/dist/components/conversation/composer-menu.js.map +1 -1
- package/dist/components/conversation/conversation-avatar.js +2 -4
- package/dist/components/conversation/conversation-avatar.js.map +1 -1
- package/dist/components/conversation/conversation-pane.d.ts.map +1 -1
- package/dist/components/conversation/conversation-pane.js +6 -5
- package/dist/components/conversation/conversation-pane.js.map +1 -1
- package/dist/components/conversation/conversation-surface.js +3 -7
- package/dist/components/conversation/conversation-surface.js.map +1 -1
- package/dist/components/conversation/internal/chat-composer-shell.d.ts.map +1 -1
- package/dist/components/conversation/internal/chat-composer-shell.js +76 -76
- package/dist/components/conversation/internal/chat-composer-shell.js.map +1 -1
- package/dist/components/conversation/message-composer.d.ts.map +1 -1
- package/dist/components/conversation/message-composer.js +32 -38
- package/dist/components/conversation/message-composer.js.map +1 -1
- package/dist/components/conversation/message-row.d.ts.map +1 -1
- package/dist/components/conversation/message-row.js +79 -73
- package/dist/components/conversation/message-row.js.map +1 -1
- package/dist/components/conversation/scroll-follow-core.d.ts +7 -7
- package/dist/components/conversation/scroll-follow-core.js +4 -4
- package/dist/components/conversation/scroll-follow-core.js.map +1 -1
- package/dist/components/conversation/scroll-follow.d.ts.map +1 -1
- package/dist/components/conversation/scroll-follow.js +19 -4
- package/dist/components/conversation/scroll-follow.js.map +1 -1
- package/dist/components/conversation/thread-panel.d.ts.map +1 -1
- package/dist/components/conversation/thread-panel.js +23 -23
- package/dist/components/conversation/thread-panel.js.map +1 -1
- package/dist/components/conversation/transcript-composition.d.ts.map +1 -1
- package/dist/components/conversation/transcript-composition.js +2 -2
- package/dist/components/conversation/transcript-composition.js.map +1 -1
- package/dist/components/layout/app-shell/app-shell.d.ts +1 -1
- package/dist/components/layout/app-shell/app-shell.js +1 -1
- package/dist/components/layout/app-shell/app-shell.js.map +1 -1
- package/dist/components/layout/app-shell/skip-link.d.ts.map +1 -1
- package/dist/components/layout/app-shell/skip-link.js +4 -6
- package/dist/components/layout/app-shell/skip-link.js.map +1 -1
- package/dist/components/layout/page/page.d.ts.map +1 -1
- package/dist/components/layout/page/page.js +17 -17
- package/dist/components/layout/page/page.js.map +1 -1
- package/dist/components/layout/panel/panel.js +2 -4
- package/dist/components/layout/panel/panel.js.map +1 -1
- package/dist/components/layout/pixel-resize-handle/pixel-resize-handle.d.ts.map +1 -1
- package/dist/components/layout/pixel-resize-handle/pixel-resize-handle.js +16 -1
- package/dist/components/layout/pixel-resize-handle/pixel-resize-handle.js.map +1 -1
- package/dist/components/layout/side-rail/side-rail-context.d.ts +1 -1
- package/dist/components/layout/side-rail/side-rail-context.js.map +1 -1
- package/dist/components/layout/side-rail/side-rail.d.ts.map +1 -1
- package/dist/components/layout/side-rail/side-rail.js +62 -57
- package/dist/components/layout/side-rail/side-rail.js.map +1 -1
- package/dist/components/layout/sidebar-nav/sidebar-nav.d.ts.map +1 -1
- package/dist/components/layout/sidebar-nav/sidebar-nav.js +23 -23
- package/dist/components/layout/sidebar-nav/sidebar-nav.js.map +1 -1
- package/dist/components/layout/split-layout/resize-controller-core-retry.d.ts.map +1 -1
- package/dist/components/layout/split-layout/resize-controller-core-retry.js +25 -7
- package/dist/components/layout/split-layout/resize-controller-core-retry.js.map +1 -1
- package/dist/components/layout/split-layout/resize-controller-core.d.ts.map +1 -1
- package/dist/components/layout/split-layout/resize-controller-core.js +25 -7
- package/dist/components/layout/split-layout/resize-controller-core.js.map +1 -1
- package/dist/components/layout/split-layout/split-layout.d.ts.map +1 -1
- package/dist/components/layout/split-layout/split-layout.js +2 -2
- package/dist/components/layout/split-layout/split-layout.js.map +1 -1
- package/dist/components/layout/status-bar/status-bar.d.ts +1 -1
- package/dist/components/layout/status-bar/status-bar.js +1 -1
- package/dist/components/layout/status-bar/status-bar.js.map +1 -1
- package/dist/components/layout/top-bar/top-bar.d.ts.map +1 -1
- package/dist/components/layout/top-bar/top-bar.js +15 -14
- package/dist/components/layout/top-bar/top-bar.js.map +1 -1
- package/dist/components/motion/presence.d.ts +2 -2
- package/dist/components/motion/presence.js.map +1 -1
- package/dist/components/theme/appearance-panel.d.ts +5 -5
- package/dist/components/theme/appearance-panel.js.map +1 -1
- package/dist/components/theme/lazy.d.ts +1 -1
- package/dist/components/theme/lazy.js.map +1 -1
- package/dist/components/theme/theme-catalogue-source.d.ts +2 -2
- package/dist/components/theme/theme-catalogue-source.js +2 -2
- package/dist/components/theme/theme-catalogue-source.js.map +1 -1
- package/dist/components/theme/theme-context.d.ts +2 -2
- package/dist/components/theme/theme-context.js +3 -3
- package/dist/components/theme/theme-context.js.map +1 -1
- package/dist/components/theme/theme-document.d.ts.map +1 -1
- package/dist/components/theme/theme-document.js +14 -9
- package/dist/components/theme/theme-document.js.map +1 -1
- package/dist/components/theme/theme-picker.d.ts +5 -5
- package/dist/components/theme/theme-picker.js.map +1 -1
- package/dist/components/theme/theme-provider-value.d.ts +0 -6
- package/dist/components/theme/theme-provider-value.d.ts.map +1 -1
- package/dist/components/theme/theme-provider-value.js +9 -3
- package/dist/components/theme/theme-provider-value.js.map +1 -1
- package/dist/components/theme/theme-script.d.ts +14 -0
- package/dist/components/theme/theme-script.d.ts.map +1 -1
- package/dist/components/theme/theme-script.js +1 -0
- package/dist/components/theme/theme-script.js.map +1 -1
- package/dist/components/theme/theme-state.d.ts +7 -7
- package/dist/components/theme/theme-state.js.map +1 -1
- package/dist/components/theme/theme-toggle.d.ts +1 -1
- package/dist/components/theme/theme-toggle.js.map +1 -1
- package/dist/components/ui/alert/alert.d.ts.map +1 -1
- package/dist/components/ui/alert/alert.js +4 -3
- package/dist/components/ui/alert/alert.js.map +1 -1
- package/dist/components/ui/alert-dialog/alert-dialog.d.ts +1 -1
- package/dist/components/ui/alert-dialog/alert-dialog.js +3 -3
- package/dist/components/ui/alert-dialog/alert-dialog.js.map +1 -1
- package/dist/components/ui/badge/badge.d.ts +1 -1
- package/dist/components/ui/badge/badge.js +2 -2
- package/dist/components/ui/badge/badge.js.map +1 -1
- package/dist/components/ui/board/board.d.ts.map +1 -1
- package/dist/components/ui/board/board.js +10 -6
- package/dist/components/ui/board/board.js.map +1 -1
- package/dist/components/ui/bubble/bubble.d.ts.map +1 -1
- package/dist/components/ui/bubble/bubble.js +6 -4
- package/dist/components/ui/bubble/bubble.js.map +1 -1
- package/dist/components/ui/button/button.js +2 -2
- package/dist/components/ui/button/button.js.map +1 -1
- package/dist/components/ui/button-group/button-group.d.ts +1 -1
- package/dist/components/ui/button-group/button-group.js +1 -1
- package/dist/components/ui/button-group/button-group.js.map +1 -1
- package/dist/components/ui/calendar/calendar.js +6 -6
- package/dist/components/ui/calendar/calendar.js.map +1 -1
- package/dist/components/ui/callout/callout.d.ts +4 -4
- package/dist/components/ui/callout/callout.js +4 -4
- package/dist/components/ui/callout/callout.js.map +1 -1
- package/dist/components/ui/card/card.d.ts +2 -2
- package/dist/components/ui/card/card.js +2 -2
- package/dist/components/ui/card/card.js.map +1 -1
- package/dist/components/ui/carousel/carousel.d.ts +4 -4
- package/dist/components/ui/carousel/carousel.d.ts.map +1 -1
- package/dist/components/ui/carousel/carousel.js.map +1 -1
- package/dist/components/ui/chart/chart-options.d.ts +7 -7
- package/dist/components/ui/chart/chart-options.js +9 -9
- package/dist/components/ui/chart/chart-options.js.map +1 -1
- package/dist/components/ui/chart/chart.d.ts.map +1 -1
- package/dist/components/ui/chart/chart.js +16 -7
- package/dist/components/ui/chart/chart.js.map +1 -1
- package/dist/components/ui/checkbox/checkbox.d.ts.map +1 -1
- package/dist/components/ui/checkbox/checkbox.js +8 -6
- package/dist/components/ui/checkbox/checkbox.js.map +1 -1
- package/dist/components/ui/code-block/code-block.d.ts.map +1 -1
- package/dist/components/ui/code-block/code-block.js +8 -6
- package/dist/components/ui/code-block/code-block.js.map +1 -1
- package/dist/components/ui/command/command.d.ts +4 -4
- package/dist/components/ui/command/command.js +4 -4
- package/dist/components/ui/command/command.js.map +1 -1
- package/dist/components/ui/context-menu/context-menu.d.ts +1 -1
- package/dist/components/ui/context-menu/context-menu.js.map +1 -1
- package/dist/components/ui/detail-panel/detail-panel.d.ts.map +1 -1
- package/dist/components/ui/detail-panel/detail-panel.js +13 -13
- package/dist/components/ui/detail-panel/detail-panel.js.map +1 -1
- package/dist/components/ui/dialog/dialog-layer.d.ts +0 -4
- package/dist/components/ui/dialog/dialog-layer.d.ts.map +1 -1
- package/dist/components/ui/dialog/dialog-layer.js +17 -1
- package/dist/components/ui/dialog/dialog-layer.js.map +1 -1
- package/dist/components/ui/dialog/dialog.d.ts.map +1 -1
- package/dist/components/ui/dialog/dialog.js +4 -3
- package/dist/components/ui/dialog/dialog.js.map +1 -1
- package/dist/components/ui/diff-block/diff-block.d.ts +6 -6
- package/dist/components/ui/diff-block/diff-block.js +3 -3
- package/dist/components/ui/diff-block/diff-block.js.map +1 -1
- package/dist/components/ui/drawer/drawer.d.ts +3 -3
- package/dist/components/ui/drawer/drawer.js +2 -2
- package/dist/components/ui/drawer/drawer.js.map +1 -1
- package/dist/components/ui/dropdown-menu/dropdown-menu.d.ts +5 -5
- package/dist/components/ui/dropdown-menu/dropdown-menu.js +3 -3
- package/dist/components/ui/dropdown-menu/dropdown-menu.js.map +1 -1
- package/dist/components/ui/dropdown-menu/menu-parts.d.ts +3 -3
- package/dist/components/ui/dropdown-menu/menu-parts.js +1 -1
- package/dist/components/ui/dropdown-menu/menu-parts.js.map +1 -1
- package/dist/components/ui/empty/empty-state.d.ts.map +1 -1
- package/dist/components/ui/empty/empty-state.js +33 -36
- package/dist/components/ui/empty/empty-state.js.map +1 -1
- package/dist/components/ui/empty/empty.d.ts +1 -1
- package/dist/components/ui/empty/empty.js +1 -1
- package/dist/components/ui/empty/empty.js.map +1 -1
- package/dist/components/ui/entity-icon/entity-icon.d.ts.map +1 -1
- package/dist/components/ui/entity-icon/entity-icon.js +7 -7
- package/dist/components/ui/entity-icon/entity-icon.js.map +1 -1
- package/dist/components/ui/field/field.d.ts.map +1 -1
- package/dist/components/ui/field/field.js +15 -15
- package/dist/components/ui/field/field.js.map +1 -1
- package/dist/components/ui/field/number-field.d.ts +1 -1
- package/dist/components/ui/field/number-field.js +1 -1
- package/dist/components/ui/field/number-field.js.map +1 -1
- package/dist/components/ui/hover-card/hover-card.d.ts +1 -1
- package/dist/components/ui/hover-card/hover-card.js.map +1 -1
- package/dist/components/ui/input-group/input-group.d.ts +1 -1
- package/dist/components/ui/input-group/input-group.js.map +1 -1
- package/dist/components/ui/input-otp/input-otp.d.ts +1 -1
- package/dist/components/ui/input-otp/input-otp.js.map +1 -1
- package/dist/components/ui/item/item.d.ts.map +1 -1
- package/dist/components/ui/item/item.js +26 -26
- package/dist/components/ui/item/item.js.map +1 -1
- package/dist/components/ui/kbd/kbd.d.ts +25 -12
- package/dist/components/ui/kbd/kbd.d.ts.map +1 -1
- package/dist/components/ui/kbd/kbd.js +44 -13
- package/dist/components/ui/kbd/kbd.js.map +1 -1
- package/dist/components/ui/kbd/platform-modifier.d.ts +3 -3
- package/dist/components/ui/kbd/platform-modifier.js +3 -3
- package/dist/components/ui/kbd/platform-modifier.js.map +1 -1
- package/dist/components/ui/label/label.d.ts +1 -1
- package/dist/components/ui/label/label.js +1 -1
- package/dist/components/ui/label/label.js.map +1 -1
- package/dist/components/ui/marker/marker.d.ts.map +1 -1
- package/dist/components/ui/marker/marker.js +17 -19
- package/dist/components/ui/marker/marker.js.map +1 -1
- package/dist/components/ui/menubar/menubar.d.ts +2 -2
- package/dist/components/ui/menubar/menubar.js +1 -1
- package/dist/components/ui/menubar/menubar.js.map +1 -1
- package/dist/components/ui/message/message.d.ts.map +1 -1
- package/dist/components/ui/message/message.js +16 -18
- package/dist/components/ui/message/message.js.map +1 -1
- package/dist/components/ui/modal-dialog/modal-dialog.d.ts.map +1 -1
- package/dist/components/ui/modal-dialog/modal-dialog.js +7 -11
- package/dist/components/ui/modal-dialog/modal-dialog.js.map +1 -1
- package/dist/components/ui/native-select/native-select.d.ts +1 -1
- package/dist/components/ui/native-select/native-select.js.map +1 -1
- package/dist/components/ui/navigation-menu/navigation-menu.d.ts.map +1 -1
- package/dist/components/ui/navigation-menu/navigation-menu.js +5 -4
- package/dist/components/ui/navigation-menu/navigation-menu.js.map +1 -1
- package/dist/components/ui/pagination/pagination.js +2 -4
- package/dist/components/ui/pagination/pagination.js.map +1 -1
- package/dist/components/ui/popover/popover.d.ts.map +1 -1
- package/dist/components/ui/popover/popover.js +11 -4
- package/dist/components/ui/popover/popover.js.map +1 -1
- package/dist/components/ui/progress/progress.d.ts.map +1 -1
- package/dist/components/ui/progress/progress.js +6 -8
- package/dist/components/ui/progress/progress.js.map +1 -1
- package/dist/components/ui/questionnaire/questionnaire.d.ts.map +1 -1
- package/dist/components/ui/questionnaire/questionnaire.js +73 -73
- package/dist/components/ui/questionnaire/questionnaire.js.map +1 -1
- package/dist/components/ui/radio-group/radio-group.d.ts.map +1 -1
- package/dist/components/ui/radio-group/radio-group.js +12 -6
- package/dist/components/ui/radio-group/radio-group.js.map +1 -1
- package/dist/components/ui/resizable/resizable.d.ts +2 -2
- package/dist/components/ui/resizable/resizable.js +3 -3
- package/dist/components/ui/resizable/resizable.js.map +1 -1
- package/dist/components/ui/select/select.d.ts +3 -3
- package/dist/components/ui/select/select.js +1 -1
- package/dist/components/ui/select/select.js.map +1 -1
- package/dist/components/ui/sheet/sheet.d.ts.map +1 -1
- package/dist/components/ui/sheet/sheet.js +4 -3
- package/dist/components/ui/sheet/sheet.js.map +1 -1
- package/dist/components/ui/skeleton/skeleton.d.ts +1 -1
- package/dist/components/ui/skeleton/skeleton.js +1 -1
- package/dist/components/ui/skeleton/skeleton.js.map +1 -1
- package/dist/components/ui/slider/slider.d.ts +1 -1
- package/dist/components/ui/slider/slider.js.map +1 -1
- package/dist/components/ui/spinner/spinner.d.ts +1 -1
- package/dist/components/ui/spinner/spinner.js +1 -1
- package/dist/components/ui/spinner/spinner.js.map +1 -1
- package/dist/components/ui/status-chip/status-chip.d.ts +13 -13
- package/dist/components/ui/status-chip/status-chip.d.ts.map +1 -1
- package/dist/components/ui/status-chip/status-chip.js +11 -11
- package/dist/components/ui/status-chip/status-chip.js.map +1 -1
- package/dist/components/ui/switch/switch.d.ts.map +1 -1
- package/dist/components/ui/switch/switch.js +8 -6
- package/dist/components/ui/switch/switch.js.map +1 -1
- package/dist/components/ui/tabs/tabs.d.ts +4 -4
- package/dist/components/ui/tabs/tabs.js +4 -4
- package/dist/components/ui/tabs/tabs.js.map +1 -1
- package/dist/components/ui/textarea/textarea.d.ts +1 -1
- package/dist/components/ui/textarea/textarea.js +1 -1
- package/dist/components/ui/textarea/textarea.js.map +1 -1
- package/dist/components/ui/toast/toast.d.ts.map +1 -1
- package/dist/components/ui/toast/toast.js +13 -15
- package/dist/components/ui/toast/toast.js.map +1 -1
- package/dist/components/ui/toggle/toggle.d.ts +1 -1
- package/dist/components/ui/toggle/toggle.js +1 -1
- package/dist/components/ui/toggle/toggle.js.map +1 -1
- package/dist/components/ui/tooltip/deferred-tooltip.d.ts +51 -0
- package/dist/components/ui/tooltip/deferred-tooltip.d.ts.map +1 -0
- package/dist/components/ui/tooltip/deferred-tooltip.js +103 -0
- package/dist/components/ui/tooltip/deferred-tooltip.js.map +1 -0
- package/dist/components/ui/tooltip/index.d.ts +1 -0
- package/dist/components/ui/tooltip/index.d.ts.map +1 -1
- package/dist/components/ui/tooltip/index.js +3 -1
- package/dist/components/ui/tooltip/tooltip.d.ts.map +1 -1
- package/dist/components/ui/tooltip/tooltip.js +6 -5
- package/dist/components/ui/tooltip/tooltip.js.map +1 -1
- package/dist/components/ui/trace/trace.d.ts.map +1 -1
- package/dist/components/ui/trace/trace.js +17 -17
- package/dist/components/ui/trace/trace.js.map +1 -1
- package/dist/components/ui/typography/typography.d.ts +3 -3
- package/dist/components/ui/typography/typography.js +5 -5
- package/dist/components/ui/typography/typography.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -3
- package/dist/lib/accent-presets.d.ts +1 -1
- package/dist/lib/accent-presets.js.map +1 -1
- package/dist/lib/accent-roles.d.ts +2 -2
- package/dist/lib/accent-roles.js +2 -2
- package/dist/lib/accent-roles.js.map +1 -1
- package/dist/lib/appearance-font-settings.d.ts.map +1 -1
- package/dist/lib/appearance-font-settings.js +15 -7
- package/dist/lib/appearance-font-settings.js.map +1 -1
- package/dist/lib/create-poll.d.ts +39 -0
- package/dist/lib/create-poll.d.ts.map +1 -0
- package/dist/lib/create-poll.js +116 -0
- package/dist/lib/create-poll.js.map +1 -0
- package/dist/lib/font-zoom.d.ts +1 -1
- package/dist/lib/font-zoom.js +1 -1
- package/dist/lib/font-zoom.js.map +1 -1
- package/dist/lib/keyed-rows.d.ts +2 -1
- package/dist/lib/keyed-rows.d.ts.map +1 -1
- package/dist/lib/keyed-rows.js +3 -2
- package/dist/lib/keyed-rows.js.map +1 -1
- package/dist/lib/overlay.d.ts +6 -6
- package/dist/lib/overlay.d.ts.map +1 -1
- package/dist/lib/overlay.js +6 -6
- package/dist/lib/overlay.js.map +1 -1
- package/dist/lib/preference-store.d.ts +2 -2
- package/dist/lib/preference-store.js +2 -2
- package/dist/lib/preference-store.js.map +1 -1
- package/dist/lib/safe-script.d.ts +2 -2
- package/dist/lib/safe-script.js +2 -2
- package/dist/lib/safe-script.js.map +1 -1
- package/dist/lib/scroll-geometry.d.ts +1 -1
- package/dist/lib/scroll-geometry.js +1 -1
- package/dist/lib/scroll-geometry.js.map +1 -1
- package/dist/lib/text.d.ts +1 -1
- package/dist/lib/text.js +1 -1
- package/dist/lib/text.js.map +1 -1
- package/dist/lib/theme-accents.js +3 -3
- package/dist/lib/theme-accents.js.map +1 -1
- package/dist/lib/theme-css.js.map +1 -1
- package/dist/lib/theme-defaults.d.ts +4 -4
- package/dist/lib/theme-defaults.js +4 -4
- package/dist/lib/theme-defaults.js.map +1 -1
- package/dist/lib/theme-engine-light.js.map +1 -1
- package/dist/lib/theme-engine.d.ts +2 -2
- package/dist/lib/theme-engine.js +2 -2
- package/dist/lib/theme-engine.js.map +1 -1
- package/dist/lib/theme-projection.d.ts +1 -1
- package/dist/lib/theme-projection.js +2 -2
- package/dist/lib/theme-projection.js.map +1 -1
- package/dist/lib/theme-records.d.ts +2 -2
- package/dist/lib/theme-records.js +2 -2
- package/dist/lib/theme-records.js.map +1 -1
- package/dist/lib/theme-types.d.ts +1 -1
- package/dist/lib/theme-types.js.map +1 -1
- package/dist/lib/themes.d.ts +13 -13
- package/dist/lib/themes.js +13 -13
- package/dist/lib/themes.js.map +1 -1
- package/dist/lib/tokens.d.ts +2 -2
- package/dist/lib/tokens.js +1 -1
- package/dist/lib/tokens.js.map +1 -1
- package/dist/lib/tooltip-focus-gate.d.ts +2 -2
- package/dist/lib/tooltip-focus-gate.js +2 -2
- package/dist/lib/tooltip-focus-gate.js.map +1 -1
- package/dist/lib/utils.d.ts +1 -1
- package/dist/lib/utils.js +1 -1
- package/dist/lib/utils.js.map +1 -1
- package/dist/lib/variants.d.ts +4 -4
- package/dist/lib/variants.js +1 -1
- package/dist/lib/variants.js.map +1 -1
- package/dist/lib/version-notes.d.ts +4 -4
- package/dist/lib/version-notes.js +4 -4
- package/dist/lib/version-notes.js.map +1 -1
- package/dist/lint.js.map +1 -1
- package/dist/r/account-menu.json +1 -0
- package/dist/r/lib.json +5 -0
- package/dist/r/model-selector.json +1 -0
- package/dist/r/registry.json +14 -0
- package/dist/r/side-rail.json +1 -0
- package/dist/r/src/components/composites/account-menu/account-menu.tsx +22 -2
- package/dist/r/src/components/composites/action-button/action-button.tsx +124 -78
- package/dist/r/src/components/composites/appearance-editor/accent-swatch-groups.tsx +3 -3
- package/dist/r/src/components/composites/appearance-editor/appearance-choices.tsx +3 -3
- package/dist/r/src/components/composites/appearance-editor/appearance-editor.tsx +15 -9
- package/dist/r/src/components/composites/appearance-editor/appearance-rows.tsx +3 -1
- package/dist/r/src/components/composites/appearance-editor/appearance-types.ts +7 -7
- package/dist/r/src/components/composites/appearance-editor/theme-preview.tsx +1 -1
- package/dist/r/src/components/composites/catalog-browser/catalog-browser.tsx +6 -2
- package/dist/r/src/components/composites/catalog-browser/catalog-detail.tsx +15 -6
- package/dist/r/src/components/composites/chain-of-thought/chain-of-thought.tsx +4 -4
- package/dist/r/src/components/composites/chat/chat.tsx +15 -9
- package/dist/r/src/components/composites/checkpoint/checkpoint-model.ts +3 -3
- package/dist/r/src/components/composites/checkpoint/checkpoint.tsx +2 -2
- package/dist/r/src/components/composites/confirmation/confirmation.tsx +8 -4
- package/dist/r/src/components/composites/context/context.tsx +2 -2
- package/dist/r/src/components/composites/file-tree/build-file-tree.ts +1 -1
- package/dist/r/src/components/composites/file-tree/file-tree.tsx +16 -2
- package/dist/r/src/components/composites/icon-picker/icon-picker.tsx +1 -1
- package/dist/r/src/components/composites/inline-citation/citation.ts +1 -1
- package/dist/r/src/components/composites/inline-citation/inline-citation.tsx +2 -2
- package/dist/r/src/components/composites/list-row/list-row-control.tsx +31 -22
- package/dist/r/src/components/composites/list-row/list-row.tsx +69 -73
- package/dist/r/src/components/composites/message-scroller/message-scroller.tsx +1 -1
- package/dist/r/src/components/composites/model-selector/model-selector.tsx +190 -14
- package/dist/r/src/components/composites/model-selector/models.ts +2 -2
- package/dist/r/src/components/composites/plan/plan.tsx +19 -11
- package/dist/r/src/components/composites/queue/queue.tsx +5 -3
- package/dist/r/src/components/composites/reasoning/reasoning.tsx +4 -4
- package/dist/r/src/components/composites/settings/settings-navigation.tsx +57 -17
- package/dist/r/src/components/composites/settings/settings.tsx +14 -6
- package/dist/r/src/components/composites/sources/source.ts +1 -1
- package/dist/r/src/components/composites/sources/sources.tsx +2 -2
- package/dist/r/src/components/composites/stack-trace/parse-stack-trace.ts +7 -7
- package/dist/r/src/components/composites/stack-trace/stack-trace.tsx +3 -3
- package/dist/r/src/components/composites/stat/stat.tsx +20 -16
- package/dist/r/src/components/composites/subagent/subagent.tsx +6 -4
- package/dist/r/src/components/composites/task/task.tsx +1 -1
- package/dist/r/src/components/composites/terminal/ansi.ts +3 -3
- package/dist/r/src/components/composites/terminal/terminal-model.ts +3 -3
- package/dist/r/src/components/composites/terminal/terminal.tsx +24 -12
- package/dist/r/src/components/composites/test-results/test-results-model.ts +4 -4
- package/dist/r/src/components/composites/test-results/test-results.tsx +1 -1
- package/dist/r/src/components/composites/tool/tool.tsx +4 -4
- package/dist/r/src/components/composites/tree/tree.tsx +31 -15
- package/dist/r/src/components/composites/update-dialog/channel-control.tsx +17 -8
- package/dist/r/src/components/composites/update-dialog/index.ts +1 -0
- package/dist/r/src/components/composites/update-dialog/update-dialog.tsx +7 -7
- package/dist/r/src/components/composites/workspace-mark/workspace-mark.tsx +15 -12
- package/dist/r/src/components/conversation/busy-send-button.tsx +6 -2
- package/dist/r/src/components/conversation/composer-menu.tsx +3 -3
- package/dist/r/src/components/conversation/conversation-avatar.tsx +1 -1
- package/dist/r/src/components/conversation/conversation-pane.tsx +8 -5
- package/dist/r/src/components/conversation/conversation-surface.tsx +2 -2
- package/dist/r/src/components/conversation/internal/chat-composer-shell.tsx +18 -12
- package/dist/r/src/components/conversation/message-composer.tsx +4 -6
- package/dist/r/src/components/conversation/message-row.tsx +34 -26
- package/dist/r/src/components/conversation/scroll-follow-core.ts +8 -8
- package/dist/r/src/components/conversation/scroll-follow.ts +24 -8
- package/dist/r/src/components/conversation/thread-panel.tsx +7 -3
- package/dist/r/src/components/conversation/transcript-composition.tsx +4 -2
- package/dist/r/src/components/layout/app-shell/app-shell.tsx +1 -1
- package/dist/r/src/components/layout/app-shell/skip-link.tsx +3 -2
- package/dist/r/src/components/layout/page/page.tsx +15 -11
- package/dist/r/src/components/layout/panel/panel.tsx +1 -1
- package/dist/r/src/components/layout/pixel-resize-handle/pixel-resize-handle.tsx +21 -1
- package/dist/r/src/components/layout/side-rail/side-rail-context.ts +1 -1
- package/dist/r/src/components/layout/side-rail/side-rail.tsx +41 -28
- package/dist/r/src/components/layout/sidebar-nav/sidebar-nav.tsx +22 -16
- package/dist/r/src/components/layout/split-layout/resize-controller-core-retry.tsx +25 -7
- package/dist/r/src/components/layout/split-layout/resize-controller-core.tsx +25 -7
- package/dist/r/src/components/layout/split-layout/split-layout.tsx +6 -2
- package/dist/r/src/components/layout/status-bar/status-bar.tsx +1 -1
- package/dist/r/src/components/layout/top-bar/top-bar.tsx +4 -6
- package/dist/r/src/components/motion/presence.tsx +2 -2
- package/dist/r/src/components/theme/appearance-panel.tsx +5 -5
- package/dist/r/src/components/theme/lazy.ts +1 -1
- package/dist/r/src/components/theme/theme-catalogue-source.ts +2 -2
- package/dist/r/src/components/theme/theme-context.ts +3 -3
- package/dist/r/src/components/theme/theme-document.ts +22 -11
- package/dist/r/src/components/theme/theme-picker.tsx +5 -5
- package/dist/r/src/components/theme/theme-provider-value.ts +15 -3
- package/dist/r/src/components/theme/theme-script.ts +20 -0
- package/dist/r/src/components/theme/theme-state.ts +7 -7
- package/dist/r/src/components/theme/theme-toggle.tsx +1 -1
- package/dist/r/src/components/ui/alert/alert.tsx +4 -3
- package/dist/r/src/components/ui/alert-dialog/alert-dialog.tsx +4 -4
- package/dist/r/src/components/ui/badge/badge.tsx +2 -2
- package/dist/r/src/components/ui/board/board.tsx +17 -5
- package/dist/r/src/components/ui/bubble/bubble.tsx +6 -4
- package/dist/r/src/components/ui/button/button.tsx +2 -2
- package/dist/r/src/components/ui/button-group/button-group.tsx +1 -1
- package/dist/r/src/components/ui/calendar/calendar.tsx +2 -2
- package/dist/r/src/components/ui/callout/callout.tsx +4 -4
- package/dist/r/src/components/ui/card/card.tsx +2 -2
- package/dist/r/src/components/ui/carousel/carousel.tsx +6 -6
- package/dist/r/src/components/ui/chart/chart-options.ts +9 -9
- package/dist/r/src/components/ui/chart/chart.tsx +14 -1
- package/dist/r/src/components/ui/checkbox/checkbox.tsx +9 -6
- package/dist/r/src/components/ui/code-block/code-block.tsx +14 -7
- package/dist/r/src/components/ui/command/command.tsx +7 -7
- package/dist/r/src/components/ui/context-menu/context-menu.tsx +1 -1
- package/dist/r/src/components/ui/detail-panel/detail-panel.tsx +5 -3
- package/dist/r/src/components/ui/dialog/dialog-layer.tsx +25 -1
- package/dist/r/src/components/ui/dialog/dialog.tsx +4 -3
- package/dist/r/src/components/ui/diff-block/diff-block.tsx +6 -6
- package/dist/r/src/components/ui/drawer/drawer.tsx +3 -3
- package/dist/r/src/components/ui/dropdown-menu/dropdown-menu.tsx +6 -6
- package/dist/r/src/components/ui/dropdown-menu/menu-parts.tsx +5 -5
- package/dist/r/src/components/ui/empty/empty-state.tsx +23 -18
- package/dist/r/src/components/ui/empty/empty.tsx +1 -1
- package/dist/r/src/components/ui/entity-icon/entity-icon.tsx +5 -1
- package/dist/r/src/components/ui/field/field.tsx +15 -7
- package/dist/r/src/components/ui/field/number-field.tsx +1 -1
- package/dist/r/src/components/ui/hover-card/hover-card.tsx +1 -1
- package/dist/r/src/components/ui/input-group/input-group.tsx +1 -1
- package/dist/r/src/components/ui/input-otp/input-otp.tsx +1 -1
- package/dist/r/src/components/ui/item/item.tsx +24 -18
- package/dist/r/src/components/ui/kbd/kbd.tsx +55 -14
- package/dist/r/src/components/ui/kbd/platform-modifier.ts +3 -3
- package/dist/r/src/components/ui/label/label.tsx +1 -1
- package/dist/r/src/components/ui/marker/marker.tsx +9 -5
- package/dist/r/src/components/ui/menubar/menubar.tsx +2 -2
- package/dist/r/src/components/ui/message/message.tsx +14 -13
- package/dist/r/src/components/ui/modal-dialog/modal-dialog.tsx +9 -5
- package/dist/r/src/components/ui/native-select/native-select.tsx +1 -1
- package/dist/r/src/components/ui/navigation-menu/navigation-menu.tsx +5 -4
- package/dist/r/src/components/ui/pagination/pagination.tsx +1 -1
- package/dist/r/src/components/ui/popover/popover.tsx +4 -2
- package/dist/r/src/components/ui/progress/progress.tsx +5 -3
- package/dist/r/src/components/ui/questionnaire/questionnaire.tsx +10 -5
- package/dist/r/src/components/ui/radio-group/radio-group.tsx +9 -6
- package/dist/r/src/components/ui/resizable/resizable.tsx +5 -5
- package/dist/r/src/components/ui/select/select.tsx +4 -4
- package/dist/r/src/components/ui/sheet/sheet.tsx +4 -3
- package/dist/r/src/components/ui/skeleton/skeleton.tsx +1 -1
- package/dist/r/src/components/ui/slider/slider.tsx +1 -1
- package/dist/r/src/components/ui/spinner/spinner.tsx +1 -1
- package/dist/r/src/components/ui/status-chip/status-chip.tsx +13 -13
- package/dist/r/src/components/ui/switch/switch.tsx +9 -6
- package/dist/r/src/components/ui/tabs/tabs.tsx +4 -4
- package/dist/r/src/components/ui/textarea/textarea.tsx +1 -1
- package/dist/r/src/components/ui/toast/toast.tsx +6 -4
- package/dist/r/src/components/ui/toggle/toggle.tsx +1 -1
- package/dist/r/src/components/ui/tooltip/deferred-tooltip.tsx +131 -0
- package/dist/r/src/components/ui/tooltip/index.ts +1 -0
- package/dist/r/src/components/ui/tooltip/tooltip.tsx +6 -4
- package/dist/r/src/components/ui/trace/trace.tsx +13 -9
- package/dist/r/src/components/ui/typography/typography.tsx +5 -5
- package/dist/r/src/lib/accent-presets.ts +1 -1
- package/dist/r/src/lib/accent-roles.ts +2 -2
- package/dist/r/src/lib/appearance-font-settings.ts +18 -7
- package/dist/r/src/lib/create-poll.ts +150 -0
- package/dist/r/src/lib/font-zoom.ts +3 -3
- package/dist/r/src/lib/keyed-rows.ts +3 -2
- package/dist/r/src/lib/overlay.ts +6 -6
- package/dist/r/src/lib/preference-store.ts +2 -2
- package/dist/r/src/lib/safe-script.ts +2 -2
- package/dist/r/src/lib/scroll-geometry.ts +1 -1
- package/dist/r/src/lib/text.ts +1 -1
- package/dist/r/src/lib/theme-accents.ts +3 -3
- package/dist/r/src/lib/theme-css.ts +2 -2
- package/dist/r/src/lib/theme-defaults.ts +4 -4
- package/dist/r/src/lib/theme-engine-light.ts +2 -2
- package/dist/r/src/lib/theme-engine.ts +2 -2
- package/dist/r/src/lib/theme-projection.ts +2 -2
- package/dist/r/src/lib/theme-records.ts +2 -2
- package/dist/r/src/lib/theme-types.ts +1 -1
- package/dist/r/src/lib/themes.ts +14 -14
- package/dist/r/src/lib/tokens.ts +2 -2
- package/dist/r/src/lib/tooltip-focus-gate.ts +11 -11
- package/dist/r/src/lib/utils.ts +1 -1
- package/dist/r/src/lib/variants.ts +4 -4
- package/dist/r/src/lib/version-notes.ts +4 -4
- package/dist/r/src/styles/base.css +12 -43
- package/dist/r/src/styles/fonts.css +1 -1
- package/dist/r/src/styles/theme.css +35 -35
- package/dist/r/tooltip.json +5 -0
- package/dist/r/top-bar.json +1 -0
- package/package.json +2 -1
- package/registry.json +14 -0
- package/src/components/composites/account-menu/account-menu.tsx +22 -2
- package/src/components/composites/action-button/action-button.tsx +124 -78
- package/src/components/composites/appearance-editor/accent-swatch-groups.tsx +3 -3
- package/src/components/composites/appearance-editor/appearance-choices.tsx +3 -3
- package/src/components/composites/appearance-editor/appearance-editor.tsx +15 -9
- package/src/components/composites/appearance-editor/appearance-rows.tsx +3 -1
- package/src/components/composites/appearance-editor/appearance-types.ts +7 -7
- package/src/components/composites/appearance-editor/theme-preview.tsx +1 -1
- package/src/components/composites/catalog-browser/catalog-browser.tsx +6 -2
- package/src/components/composites/catalog-browser/catalog-detail.tsx +15 -6
- package/src/components/composites/chain-of-thought/chain-of-thought.tsx +4 -4
- package/src/components/composites/chat/chat.tsx +15 -9
- package/src/components/composites/checkpoint/checkpoint-model.ts +3 -3
- package/src/components/composites/checkpoint/checkpoint.tsx +2 -2
- package/src/components/composites/confirmation/confirmation.tsx +8 -4
- package/src/components/composites/context/context.tsx +2 -2
- package/src/components/composites/file-tree/build-file-tree.ts +1 -1
- package/src/components/composites/file-tree/file-tree.tsx +16 -2
- package/src/components/composites/icon-picker/icon-picker.tsx +1 -1
- package/src/components/composites/inline-citation/citation.ts +1 -1
- package/src/components/composites/inline-citation/inline-citation.tsx +2 -2
- package/src/components/composites/list-row/list-row-control.tsx +31 -22
- package/src/components/composites/list-row/list-row.tsx +69 -73
- package/src/components/composites/message-scroller/message-scroller.tsx +1 -1
- package/src/components/composites/model-selector/model-selector.tsx +190 -14
- package/src/components/composites/model-selector/models.ts +2 -2
- package/src/components/composites/plan/plan.tsx +19 -11
- package/src/components/composites/queue/queue.tsx +5 -3
- package/src/components/composites/reasoning/reasoning.tsx +4 -4
- package/src/components/composites/settings/settings-navigation.tsx +57 -17
- package/src/components/composites/settings/settings.tsx +14 -6
- package/src/components/composites/sources/source.ts +1 -1
- package/src/components/composites/sources/sources.tsx +2 -2
- package/src/components/composites/stack-trace/parse-stack-trace.ts +7 -7
- package/src/components/composites/stack-trace/stack-trace.tsx +3 -3
- package/src/components/composites/stat/stat.tsx +20 -16
- package/src/components/composites/subagent/subagent.tsx +6 -4
- package/src/components/composites/task/task.tsx +1 -1
- package/src/components/composites/terminal/ansi.ts +3 -3
- package/src/components/composites/terminal/terminal-model.ts +3 -3
- package/src/components/composites/terminal/terminal.tsx +24 -12
- package/src/components/composites/test-results/test-results-model.ts +4 -4
- package/src/components/composites/test-results/test-results.tsx +1 -1
- package/src/components/composites/tool/tool.tsx +4 -4
- package/src/components/composites/tree/tree.tsx +31 -15
- package/src/components/composites/update-dialog/channel-control.tsx +17 -8
- package/src/components/composites/update-dialog/index.ts +1 -0
- package/src/components/composites/update-dialog/update-dialog.tsx +7 -7
- package/src/components/composites/workspace-mark/workspace-mark.tsx +15 -12
- package/src/components/conversation/busy-send-button.tsx +6 -2
- package/src/components/conversation/composer-menu.tsx +3 -3
- package/src/components/conversation/conversation-avatar.tsx +1 -1
- package/src/components/conversation/conversation-pane.tsx +8 -5
- package/src/components/conversation/conversation-surface.tsx +2 -2
- package/src/components/conversation/internal/chat-composer-shell.tsx +18 -12
- package/src/components/conversation/message-composer.tsx +4 -6
- package/src/components/conversation/message-row.tsx +34 -26
- package/src/components/conversation/scroll-follow-core.ts +8 -8
- package/src/components/conversation/scroll-follow.ts +24 -8
- package/src/components/conversation/thread-panel.tsx +7 -3
- package/src/components/conversation/transcript-composition.tsx +4 -2
- package/src/components/layout/app-shell/app-shell.tsx +1 -1
- package/src/components/layout/app-shell/skip-link.tsx +3 -2
- package/src/components/layout/page/page.tsx +15 -11
- package/src/components/layout/panel/panel.tsx +1 -1
- package/src/components/layout/pixel-resize-handle/pixel-resize-handle.tsx +21 -1
- package/src/components/layout/side-rail/side-rail-context.ts +1 -1
- package/src/components/layout/side-rail/side-rail.tsx +41 -28
- package/src/components/layout/sidebar-nav/sidebar-nav.tsx +22 -16
- package/src/components/layout/split-layout/resize-controller-core-retry.tsx +25 -7
- package/src/components/layout/split-layout/resize-controller-core.tsx +25 -7
- package/src/components/layout/split-layout/split-layout.tsx +6 -2
- package/src/components/layout/status-bar/status-bar.tsx +1 -1
- package/src/components/layout/top-bar/top-bar.tsx +4 -6
- package/src/components/motion/presence.tsx +2 -2
- package/src/components/theme/appearance-panel.tsx +5 -5
- package/src/components/theme/lazy.ts +1 -1
- package/src/components/theme/theme-catalogue-source.ts +2 -2
- package/src/components/theme/theme-context.ts +3 -3
- package/src/components/theme/theme-document.ts +22 -11
- package/src/components/theme/theme-picker.tsx +5 -5
- package/src/components/theme/theme-provider-value.ts +15 -3
- package/src/components/theme/theme-script.ts +20 -0
- package/src/components/theme/theme-state.ts +7 -7
- package/src/components/theme/theme-toggle.tsx +1 -1
- package/src/components/ui/alert/alert.tsx +4 -3
- package/src/components/ui/alert-dialog/alert-dialog.tsx +4 -4
- package/src/components/ui/badge/badge.tsx +2 -2
- package/src/components/ui/board/board.tsx +17 -5
- package/src/components/ui/bubble/bubble.tsx +6 -4
- package/src/components/ui/button/button.tsx +2 -2
- package/src/components/ui/button-group/button-group.tsx +1 -1
- package/src/components/ui/calendar/calendar.tsx +2 -2
- package/src/components/ui/callout/callout.tsx +4 -4
- package/src/components/ui/card/card.tsx +2 -2
- package/src/components/ui/carousel/carousel.tsx +6 -6
- package/src/components/ui/chart/chart-options.ts +9 -9
- package/src/components/ui/chart/chart.tsx +14 -1
- package/src/components/ui/checkbox/checkbox.tsx +9 -6
- package/src/components/ui/code-block/code-block.tsx +14 -7
- package/src/components/ui/command/command.tsx +7 -7
- package/src/components/ui/context-menu/context-menu.tsx +1 -1
- package/src/components/ui/detail-panel/detail-panel.tsx +5 -3
- package/src/components/ui/dialog/dialog-layer.tsx +25 -1
- package/src/components/ui/dialog/dialog.tsx +4 -3
- package/src/components/ui/diff-block/diff-block.tsx +6 -6
- package/src/components/ui/drawer/drawer.tsx +3 -3
- package/src/components/ui/dropdown-menu/dropdown-menu.tsx +6 -6
- package/src/components/ui/dropdown-menu/menu-parts.tsx +5 -5
- package/src/components/ui/empty/empty-state.tsx +23 -18
- package/src/components/ui/empty/empty.tsx +1 -1
- package/src/components/ui/entity-icon/entity-icon.tsx +5 -1
- package/src/components/ui/field/field.tsx +15 -7
- package/src/components/ui/field/number-field.tsx +1 -1
- package/src/components/ui/hover-card/hover-card.tsx +1 -1
- package/src/components/ui/input-group/input-group.tsx +1 -1
- package/src/components/ui/input-otp/input-otp.tsx +1 -1
- package/src/components/ui/item/item.tsx +24 -18
- package/src/components/ui/kbd/kbd.tsx +55 -14
- package/src/components/ui/kbd/platform-modifier.ts +3 -3
- package/src/components/ui/label/label.tsx +1 -1
- package/src/components/ui/marker/marker.tsx +9 -5
- package/src/components/ui/menubar/menubar.tsx +2 -2
- package/src/components/ui/message/message.tsx +14 -13
- package/src/components/ui/modal-dialog/modal-dialog.tsx +9 -5
- package/src/components/ui/native-select/native-select.tsx +1 -1
- package/src/components/ui/navigation-menu/navigation-menu.tsx +5 -4
- package/src/components/ui/pagination/pagination.tsx +1 -1
- package/src/components/ui/popover/popover.tsx +4 -2
- package/src/components/ui/progress/progress.tsx +5 -3
- package/src/components/ui/questionnaire/questionnaire.tsx +10 -5
- package/src/components/ui/radio-group/radio-group.tsx +9 -6
- package/src/components/ui/resizable/resizable.tsx +5 -5
- package/src/components/ui/select/select.tsx +4 -4
- package/src/components/ui/sheet/sheet.tsx +4 -3
- package/src/components/ui/skeleton/skeleton.tsx +1 -1
- package/src/components/ui/slider/slider.tsx +1 -1
- package/src/components/ui/spinner/spinner.tsx +1 -1
- package/src/components/ui/status-chip/status-chip.tsx +13 -13
- package/src/components/ui/switch/switch.tsx +9 -6
- package/src/components/ui/tabs/tabs.tsx +4 -4
- package/src/components/ui/textarea/textarea.tsx +1 -1
- package/src/components/ui/toast/toast.tsx +6 -4
- package/src/components/ui/toggle/toggle.tsx +1 -1
- package/src/components/ui/tooltip/deferred-tooltip.tsx +131 -0
- package/src/components/ui/tooltip/index.ts +1 -0
- package/src/components/ui/tooltip/tooltip.tsx +6 -4
- package/src/components/ui/trace/trace.tsx +13 -9
- package/src/components/ui/typography/typography.tsx +5 -5
- package/src/index.ts +1 -0
- package/src/lib/accent-presets.ts +1 -1
- package/src/lib/accent-roles.ts +2 -2
- package/src/lib/appearance-font-settings.ts +18 -7
- package/src/lib/create-poll.ts +150 -0
- package/src/lib/font-zoom.ts +3 -3
- package/src/lib/keyed-rows.ts +3 -2
- package/src/lib/overlay.ts +6 -6
- package/src/lib/preference-store.ts +2 -2
- package/src/lib/safe-script.ts +2 -2
- package/src/lib/scroll-geometry.ts +1 -1
- package/src/lib/text.ts +1 -1
- package/src/lib/theme-accents.ts +3 -3
- package/src/lib/theme-css.ts +2 -2
- package/src/lib/theme-defaults.ts +4 -4
- package/src/lib/theme-engine-light.ts +2 -2
- package/src/lib/theme-engine.ts +2 -2
- package/src/lib/theme-projection.ts +2 -2
- package/src/lib/theme-records.ts +2 -2
- package/src/lib/theme-types.ts +1 -1
- package/src/lib/themes.ts +14 -14
- package/src/lib/tokens.ts +2 -2
- package/src/lib/tooltip-focus-gate.ts +11 -11
- package/src/lib/utils.ts +1 -1
- package/src/lib/variants.ts +4 -4
- package/src/lib/version-notes.ts +4 -4
- package/src/lint/index.ts +1 -1
- package/src/styles/base.css +12 -43
- package/src/styles/fonts.css +1 -1
- package/src/styles/theme.css +35 -35
- package/src/styles/themes/aardvark-blue.css +98 -0
- package/src/styles/themes/aardvark-ink.css +98 -0
- package/src/styles/themes/adea-dark-colorblind.css +98 -0
- package/src/styles/themes/adea-dark-high-contrast.css +98 -0
- package/src/styles/themes/adea-dark.css +47 -0
- package/src/styles/themes/adea-light-colorblind.css +141 -0
- package/src/styles/themes/adea-light-high-contrast.css +141 -0
- package/src/styles/themes/adea-light.css +47 -0
- package/src/styles/themes/ayu-light.css +141 -0
- package/src/styles/themes/ayu-mirage.css +98 -0
- package/src/styles/themes/ayu.css +98 -0
- package/src/styles/themes/catppuccin-frappe.css +98 -0
- package/src/styles/themes/catppuccin-latte.css +141 -0
- package/src/styles/themes/catppuccin-macchiato.css +98 -0
- package/src/styles/themes/catppuccin-mocha.css +98 -0
- package/src/styles/themes/dracula.css +98 -0
- package/src/styles/themes/everforest-dark.css +98 -0
- package/src/styles/themes/everforest-light.css +141 -0
- package/src/styles/themes/gruvbox-dark.css +98 -0
- package/src/styles/themes/gruvbox-light.css +141 -0
- package/src/styles/themes/kanagawa.css +98 -0
- package/src/styles/themes/monokai.css +98 -0
- package/src/styles/themes/nord-light.css +141 -0
- package/src/styles/themes/nord.css +98 -0
- package/src/styles/themes/one-dark.css +98 -0
- package/src/styles/themes/rosepine-dawn.css +141 -0
- package/src/styles/themes/rosepine-moon.css +98 -0
- package/src/styles/themes/rosepine.css +98 -0
- package/src/styles/themes/solarized-dark.css +98 -0
- package/src/styles/themes/solarized-light.css +141 -0
- package/src/styles/themes/tokyonight-day.css +141 -0
- package/src/styles/themes/tokyonight-night.css +98 -0
- package/src/styles/themes/tokyonight-storm.css +98 -0
- package/src/styles/themes/vesper.css +98 -0
|
@@ -17,8 +17,8 @@ let loading: Promise<ThemeEngine> | undefined
|
|
|
17
17
|
* forgotten so the next call retries.
|
|
18
18
|
*
|
|
19
19
|
* The lazy provider calls this itself the moment a selection needs a theme beyond the
|
|
20
|
-
* default pair. Call it earlier
|
|
21
|
-
* entry
|
|
20
|
+
* default pair. Call it earlier, when a settings page mounts, or on hover of its
|
|
21
|
+
* entry, to have the picker ready by the time it opens.
|
|
22
22
|
*/
|
|
23
23
|
export function loadThemeCatalogue(): Promise<ThemeEngine> {
|
|
24
24
|
if (loadedEngine) return Promise.resolve(loadedEngine)
|
|
@@ -5,7 +5,7 @@ import type { ThemeContextValue } from './theme-state'
|
|
|
5
5
|
* Where the context object lives: on the global, under a registered symbol.
|
|
6
6
|
*
|
|
7
7
|
* A context is an object identity, and a bundle can legitimately load this module
|
|
8
|
-
* twice
|
|
8
|
+
* twice, a dev graph where a relative import and a package subpath are distinct
|
|
9
9
|
* module records, or two copies of the package at different versions. Each copy
|
|
10
10
|
* would then call `createContext` and own its own object; a provider from one and a
|
|
11
11
|
* `useOptionalTheme()` from the other would never meet, and the second would return
|
|
@@ -34,8 +34,8 @@ export function useTheme(): ThemeContextValue {
|
|
|
34
34
|
/**
|
|
35
35
|
* The theme context, or `undefined` outside a `ThemeProvider`.
|
|
36
36
|
*
|
|
37
|
-
* For a component that can run both ways
|
|
38
|
-
* a story, or a host that has not mounted a provider
|
|
37
|
+
* For a component that can run both ways, a shared control rendered in a harness,
|
|
38
|
+
* a story, or a host that has not mounted a provider, and would rather degrade
|
|
39
39
|
* than throw.
|
|
40
40
|
*/
|
|
41
41
|
export function useOptionalTheme(): ThemeContextValue | undefined {
|
|
@@ -165,8 +165,11 @@ export function applyThemeToRoot(
|
|
|
165
165
|
): ReadonlySet<string> {
|
|
166
166
|
const { tokens, accented } = themeDocumentTokens(engine, state, options)
|
|
167
167
|
|
|
168
|
+
// Every pass recomputes the whole token set (an accent or font step included);
|
|
169
|
+
// only the values that changed are written, so an unchanged palette does not
|
|
170
|
+
// dirty the document's style. Custom property values read back as written.
|
|
168
171
|
for (const [name, value] of Object.entries(tokens)) {
|
|
169
|
-
root.style.setProperty(name, value)
|
|
172
|
+
if (root.style.getPropertyValue(name) !== value) root.style.setProperty(name, value)
|
|
170
173
|
}
|
|
171
174
|
if (previous) {
|
|
172
175
|
for (const name of previous) {
|
|
@@ -175,24 +178,26 @@ export function applyThemeToRoot(
|
|
|
175
178
|
}
|
|
176
179
|
|
|
177
180
|
root.classList.toggle('dark', state.appearance === 'dark')
|
|
178
|
-
root
|
|
179
|
-
root
|
|
180
|
-
root.style.colorScheme = state.appearance
|
|
181
|
+
setData(root, 'theme', state.variant.id)
|
|
182
|
+
setData(root, 'appearance', state.appearance)
|
|
183
|
+
if (root.style.colorScheme !== state.appearance) root.style.colorScheme = state.appearance
|
|
181
184
|
|
|
182
185
|
// A custom colour has no stylesheet block to select, and its value is the
|
|
183
186
|
// attribute's worst possible content, so it is reported as `custom`.
|
|
184
187
|
if (!accented) root.removeAttribute('data-accent')
|
|
185
188
|
else
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
+
setData(
|
|
190
|
+
root,
|
|
191
|
+
'accent',
|
|
192
|
+
isCustomAccent(state.selection.accent) ? 'custom' : state.selection.accent
|
|
193
|
+
)
|
|
189
194
|
|
|
190
195
|
// The surface axis is opt-in, so its absence removes rather than defaults: a host
|
|
191
196
|
// that never enables it keeps an `<html>` with neither attribute, and one that
|
|
192
197
|
// turns it off leaves nothing behind. (`--surface-alpha` is swept with the tokens.)
|
|
193
198
|
if (state.surface) {
|
|
194
|
-
root
|
|
195
|
-
root
|
|
199
|
+
setData(root, 'surface', state.surface.surface)
|
|
200
|
+
setData(root, 'reduceTransparency', state.surface.reduceTransparencyActive ? 'true' : 'false')
|
|
196
201
|
} else {
|
|
197
202
|
root.removeAttribute('data-surface')
|
|
198
203
|
root.removeAttribute('data-reduce-transparency')
|
|
@@ -203,12 +208,18 @@ export function applyThemeToRoot(
|
|
|
203
208
|
normalizeAppearanceEditorFontSettings(state.selection.fonts, state.selection.font).settings
|
|
204
209
|
)
|
|
205
210
|
|
|
206
|
-
|
|
207
|
-
|
|
211
|
+
const density = resolvedDensity(state.selection)
|
|
212
|
+
if (density === 'comfortable') root.removeAttribute('data-density')
|
|
213
|
+
else setData(root, 'density', density)
|
|
208
214
|
|
|
209
215
|
return new Set(Object.keys(tokens))
|
|
210
216
|
}
|
|
211
217
|
|
|
218
|
+
/** Rewriting an attribute with its own value still queues a mutation and a style check. */
|
|
219
|
+
function setData(root: ThemeRoot, key: string, value: string) {
|
|
220
|
+
if (root.dataset[key] !== value) root.dataset[key] = value
|
|
221
|
+
}
|
|
222
|
+
|
|
212
223
|
/** What {@link applyWithoutTransitions} needs of a document. */
|
|
213
224
|
export type TransitionDocument = {
|
|
214
225
|
head: { appendChild(node: unknown): unknown }
|
|
@@ -12,7 +12,7 @@ import { Button } from '../ui/button'
|
|
|
12
12
|
* apart at a glance and to recognise the one you want without applying it.
|
|
13
13
|
*
|
|
14
14
|
* A swatch is **read from the variant object**, not from a stylesheet, so a picker
|
|
15
|
-
* can show a theme that is not currently applied
|
|
15
|
+
* can show a theme that is not currently applied, which is the whole point of a
|
|
16
16
|
* picker. That is also why the catalogue is data rather than CSS.
|
|
17
17
|
*/
|
|
18
18
|
export type ThemeSwatchProps = ComponentProps<'span'> & {
|
|
@@ -67,8 +67,8 @@ export function ThemeSwatch(props: ThemeSwatchProps) {
|
|
|
67
67
|
* A miniature of the interface, painted in a theme's own colours: a rail, a panel,
|
|
68
68
|
* a heading, body text, a primary button and a destructive one.
|
|
69
69
|
*
|
|
70
|
-
* The point is that a colour strip cannot answer the question a user actually has
|
|
71
|
-
* "would I want to look at this all day?"
|
|
70
|
+
* The point is that a colour strip cannot answer the question a user actually has,
|
|
71
|
+
* "would I want to look at this all day?", and a real preview can. It is drawn
|
|
72
72
|
* with inline colours from the variant rather than by applying the theme, so a list
|
|
73
73
|
* of twenty previews costs one object read each instead of twenty theme swaps.
|
|
74
74
|
*/
|
|
@@ -124,8 +124,8 @@ export function ThemePreview(props: ThemePreviewProps) {
|
|
|
124
124
|
/**
|
|
125
125
|
* ThemePicker.
|
|
126
126
|
*
|
|
127
|
-
* The catalogue as a selectable grid. One appearance at a time
|
|
128
|
-
* lists light themes and a dark picker lists dark ones
|
|
127
|
+
* The catalogue as a selectable grid. One appearance at a time, a light picker
|
|
128
|
+
* lists light themes and a dark picker lists dark ones, because choosing a dark
|
|
129
129
|
* theme while looking at a light interface is a choice nobody can evaluate.
|
|
130
130
|
*
|
|
131
131
|
* `onSelect` rather than an internal signal: the selection belongs to the
|
|
@@ -200,6 +200,12 @@ function reducedTransparencyMedia(): MediaQueryList | undefined {
|
|
|
200
200
|
* Nothing here imports catalogue code or data, which is what lets the lazy entry keep
|
|
201
201
|
* them out of a consumer's start-up chunk.
|
|
202
202
|
*/
|
|
203
|
+
|
|
204
|
+
/** Selections are small plain records built in one key order, so this is exact. */
|
|
205
|
+
function sameThemeSelection(a: ThemeSelection, b: ThemeSelection) {
|
|
206
|
+
return a === b || JSON.stringify(a) === JSON.stringify(b)
|
|
207
|
+
}
|
|
208
|
+
|
|
203
209
|
export function ThemeProviderWith(
|
|
204
210
|
props: ThemeProviderProps & { catalogue: ThemeCatalogueSource }
|
|
205
211
|
): JSX.Element {
|
|
@@ -249,8 +255,12 @@ export function createThemeContextValue(
|
|
|
249
255
|
const engine = () => source().engine()
|
|
250
256
|
const registry = createMemo(() => mergeRegistry(engine().builtinThemes, extraThemes()))
|
|
251
257
|
|
|
258
|
+
// A patch that changes nothing (pressing the current toggle again, a font step
|
|
259
|
+
// that clamps) leaves the signal alone, so the document pass and the store write
|
|
260
|
+
// that follow every change do not run for it.
|
|
252
261
|
const [selection, setSelectionState] = createSignal<ThemeSelection>(
|
|
253
|
-
initialThemeSelection(readPersisted(persistence), local.initial)
|
|
262
|
+
initialThemeSelection(readPersisted(persistence), local.initial),
|
|
263
|
+
{ equals: sameThemeSelection }
|
|
254
264
|
)
|
|
255
265
|
|
|
256
266
|
// The controlled half of the contract. A patch from the owner replaces the
|
|
@@ -429,9 +439,11 @@ export function createThemeContextValue(
|
|
|
429
439
|
reduceTransparencyActive: () => committedSurface()?.reduceTransparencyActive ?? false,
|
|
430
440
|
zoomFonts,
|
|
431
441
|
setSelection(patch) {
|
|
432
|
-
const
|
|
433
|
-
|
|
442
|
+
const current = selection()
|
|
443
|
+
const next = mergeThemeSelection(current, patch)
|
|
434
444
|
setDraft(undefined)
|
|
445
|
+
if (sameThemeSelection(current, next)) return
|
|
446
|
+
setSelectionState(next)
|
|
435
447
|
writePersisted(persistence, next)
|
|
436
448
|
},
|
|
437
449
|
}
|
|
@@ -63,6 +63,20 @@ export type ThemeScriptOptions = ThemeStorageSchema & {
|
|
|
63
63
|
palette?: 'inline' | 'stylesheet'
|
|
64
64
|
/** The only `version` of the library document read. Default `1`. */
|
|
65
65
|
libraryVersion?: number
|
|
66
|
+
/**
|
|
67
|
+
* Load only the resolved catalogue theme's stylesheet instead of bundling
|
|
68
|
+
* `theme-variants.css`: a URL template with `{id}` where the theme id goes, for
|
|
69
|
+
* the files the package ships as `@adea-ai/ui/themes/<id>.css` (copied to where
|
|
70
|
+
* the host serves them). The script adds one `<link rel="stylesheet"
|
|
71
|
+
* blocking="render">` to `<head>`, so the first frame still waits for the palette
|
|
72
|
+
* it chose and no other theme's rules are fetched or parsed. A theme read from
|
|
73
|
+
* the stored library is written inline as before and loads no sheet.
|
|
74
|
+
*
|
|
75
|
+
* Pair it with `palette="inline"` on the provider: the sheet covers the first
|
|
76
|
+
* paint, and the provider writes the same values when it mounts, so a later
|
|
77
|
+
* switch needs no sheet.
|
|
78
|
+
*/
|
|
79
|
+
stylesheetHref?: string
|
|
66
80
|
}
|
|
67
81
|
|
|
68
82
|
/**
|
|
@@ -235,6 +249,12 @@ function optionsFormScript(
|
|
|
235
249
|
`r.dataset.theme=id;`,
|
|
236
250
|
`r.dataset.appearance=dark?'dark':'light';`
|
|
237
251
|
)
|
|
252
|
+
if (options.stylesheetHref !== undefined) {
|
|
253
|
+
// Only a catalogue id names a shipped sheet; `tokens` marks a library theme.
|
|
254
|
+
parts.push(
|
|
255
|
+
`if(!tokens&&ids.indexOf(id)!==-1){var l=document.createElement('link');l.rel='stylesheet';l.setAttribute('blocking','render');l.setAttribute('data-theme-stylesheet',id);l.href=${literal(options.stylesheetHref)}.split('{id}').join(id);(document.head||r).appendChild(l)}`
|
|
256
|
+
)
|
|
257
|
+
}
|
|
238
258
|
if (options.libraryKey !== undefined) {
|
|
239
259
|
parts.push(
|
|
240
260
|
`if(tokens){if(typeof projectTokens==='function'){${projectionFallbackCode}tokens=projectTokens(tokens,tokenProjection)}for(var n in tokens){if(Object.prototype.hasOwnProperty.call(tokens,n)&&n.slice(0,2)==='--'&&typeof tokens[n]==='string')s.setProperty(n,tokens[n])}}`
|
|
@@ -26,13 +26,13 @@ import type { ThemeAppearance, ThemeVariant } from '../../lib/theme-types'
|
|
|
26
26
|
/**
|
|
27
27
|
* Four independent choices, and keeping them independent is the point:
|
|
28
28
|
*
|
|
29
|
-
* - **appearance
|
|
30
|
-
* - **a theme per appearance
|
|
29
|
+
* - **appearance**: light, dark, or follow the system.
|
|
30
|
+
* - **a theme per appearance**: so a user can run Catppuccin Mocha by night and
|
|
31
31
|
* Solarized Light by day without re-choosing when the system flips.
|
|
32
|
-
* - **an accent
|
|
32
|
+
* - **an accent**: adea's six presets, or one of the accents the selected theme
|
|
33
33
|
* pair carries itself (`ansi-blue`…), which re-colour the interactive roles on
|
|
34
34
|
* top of whichever theme is active.
|
|
35
|
-
* - **fonts
|
|
35
|
+
* - **fonts**: separate family and size choices for UI, content and code.
|
|
36
36
|
*/
|
|
37
37
|
export type ThemeSelection = {
|
|
38
38
|
/** `system` follows `prefers-color-scheme` and updates when it changes. */
|
|
@@ -78,8 +78,8 @@ export type ThemeSelection = {
|
|
|
78
78
|
/**
|
|
79
79
|
* How opaque elevated panels are. Written to `<html>` only when the provider's
|
|
80
80
|
* `surface` prop is on or this is set; absent, a host paints no surface axis at
|
|
81
|
-
* all. Resolved against the OS and the host's capability before it is painted
|
|
82
|
-
* see `resolveSurface
|
|
81
|
+
* all. Resolved against the OS and the host's capability before it is painted,
|
|
82
|
+
* see `resolveSurface`, so the value stored is a preference, never the outcome.
|
|
83
83
|
*/
|
|
84
84
|
surface?: ThemeSurface
|
|
85
85
|
/**
|
|
@@ -168,7 +168,7 @@ export type ThemeContextValue = {
|
|
|
168
168
|
/**
|
|
169
169
|
* The roles `accent` paints over `variantId` (default: the variant in use), held
|
|
170
170
|
* to the provider's `accentContrastFloor`, for an element-scoped override with
|
|
171
|
-
* `paintAccentRoles
|
|
171
|
+
* `paintAccentRoles`, a workspace that carries its own colour. `undefined` for
|
|
172
172
|
* `null`, for `theme`, for an id that resolves to nothing, and for a variant the
|
|
173
173
|
* registry does not hold: each means "keep the inherited accent".
|
|
174
174
|
*/
|
|
@@ -9,7 +9,7 @@ import { useTheme } from './theme-context'
|
|
|
9
9
|
* ThemeToggle.
|
|
10
10
|
*
|
|
11
11
|
* Three states, not two: light, dark, and follow the system. A two-state switch is
|
|
12
|
-
* the common mistake
|
|
12
|
+
* the common mistake, it forces a choice on someone who wanted the application to
|
|
13
13
|
* track their OS, and it has no way to say "I have not decided", so the first click
|
|
14
14
|
* silently overrides a system preference the user set deliberately.
|
|
15
15
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AlertCircle, CheckCircle2, Info, TriangleAlert } from 'lucide-solid'
|
|
2
2
|
import type { ComponentProps, JSX } from 'solid-js'
|
|
3
|
-
import { splitProps } from 'solid-js'
|
|
3
|
+
import { children as resolveChildren, splitProps } from 'solid-js'
|
|
4
4
|
import { Dynamic } from 'solid-js/web'
|
|
5
5
|
import { cva, type VariantProps } from '../../../lib/variants'
|
|
6
6
|
import { cn } from '../../../lib/utils'
|
|
@@ -62,6 +62,7 @@ export function Alert(props: AlertProps) {
|
|
|
62
62
|
const [local, rest] = splitProps(props, ['class', 'variant', 'icon', 'children'])
|
|
63
63
|
|
|
64
64
|
const tone = () => local.variant ?? 'default'
|
|
65
|
+
const icon = resolveChildren(() => local.icon)
|
|
65
66
|
|
|
66
67
|
return (
|
|
67
68
|
<div
|
|
@@ -70,12 +71,12 @@ export function Alert(props: AlertProps) {
|
|
|
70
71
|
class={cn(alertVariants({ variant: local.variant }), local.class)}
|
|
71
72
|
{...rest}
|
|
72
73
|
>
|
|
73
|
-
{
|
|
74
|
+
{icon() === null ? null : (
|
|
74
75
|
<span
|
|
75
76
|
data-slot="alert-icon"
|
|
76
77
|
class={cn('row-span-2 pt-0.5 [&_svg]:size-4', alertIconTones[tone()])}
|
|
77
78
|
>
|
|
78
|
-
{
|
|
79
|
+
{icon() ?? <Dynamic component={alertIcons[tone()]} />}
|
|
79
80
|
</span>
|
|
80
81
|
)}
|
|
81
82
|
{local.children}
|
|
@@ -26,7 +26,7 @@ import { createDialogLayer, DialogEscapeTarget } from '../dialog/dialog-layer'
|
|
|
26
26
|
* and the user must choose one of the actions. Escape is the keyboard's Cancel: it
|
|
27
27
|
* closes the dialog exactly as the cancel action does, so nothing is confirmed. That
|
|
28
28
|
* is the whole difference from Dialog, and it is why this exists as its own
|
|
29
|
-
* component rather than a prop
|
|
29
|
+
* component rather than a prop, a caller has to reach for it deliberately.
|
|
30
30
|
*
|
|
31
31
|
* The consequence is a rule of use: this is for confirming a destructive or
|
|
32
32
|
* irreversible step. Wrapping an ordinary form in an AlertDialog traps someone who
|
|
@@ -55,7 +55,7 @@ export function AlertDialogOverlay(props: ComponentProps<typeof KobalteAlertDial
|
|
|
55
55
|
* The panel.
|
|
56
56
|
*
|
|
57
57
|
* Kobalte's `AlertDialog.Content` is `Dialog.Content` with `role="alertdialog"`
|
|
58
|
-
* and nothing else
|
|
58
|
+
* and nothing else, an outside click dismisses it exactly as it dismisses a
|
|
59
59
|
* Dialog. That is a real gap in the primitive, so the blocking is implemented
|
|
60
60
|
* here, and it is the whole difference between this component and a Dialog:
|
|
61
61
|
*
|
|
@@ -156,8 +156,8 @@ export function AlertDialogDescription(
|
|
|
156
156
|
* destructive action from the safe one.
|
|
157
157
|
*
|
|
158
158
|
* The injected label is removed rather than overridden with an empty one. An empty
|
|
159
|
-
* `aria-label` is not reliably ignored
|
|
160
|
-
* as an explicit empty name, which leaves the button unnamed
|
|
159
|
+
* `aria-label` is not reliably ignored, some name computations treat its presence
|
|
160
|
+
* as an explicit empty name, which leaves the button unnamed, so the attribute
|
|
161
161
|
* has to go, and the visible text becomes the name. A caller whose button is an
|
|
162
162
|
* icon passes its own `aria-label`, and that one is left alone.
|
|
163
163
|
*
|
|
@@ -7,7 +7,7 @@ import { cn } from '../../../lib/utils'
|
|
|
7
7
|
* Badge.
|
|
8
8
|
*
|
|
9
9
|
* A short, non-interactive status label. If it can be clicked it is a Button
|
|
10
|
-
* with `size="2xs"`, not a Badge
|
|
10
|
+
* with `size="2xs"`, not a Badge, the difference matters because a Badge
|
|
11
11
|
* carries no focus or pressed state and must never be the only way to reach an
|
|
12
12
|
* action.
|
|
13
13
|
*/
|
|
@@ -33,7 +33,7 @@ export const badgeVariants = cva(
|
|
|
33
33
|
* A count that asks for attention, pinned to a corner of another control
|
|
34
34
|
* (a workspace mark, a rail icon). At `sm` it is a 2xs label on whatever
|
|
35
35
|
* surface sits behind the corner, where the destructive tint all but
|
|
36
|
-
* disappears
|
|
36
|
+
* disappears, so it takes the solid, contrast-measured action fill.
|
|
37
37
|
*/
|
|
38
38
|
notification: 'bg-destructive-action text-destructive-action-foreground',
|
|
39
39
|
},
|
|
@@ -2,12 +2,14 @@ import {
|
|
|
2
2
|
type ComponentProps,
|
|
3
3
|
createEffect,
|
|
4
4
|
createMemo,
|
|
5
|
+
createSelector,
|
|
5
6
|
createSignal,
|
|
6
7
|
For,
|
|
7
8
|
Index,
|
|
8
9
|
onCleanup,
|
|
9
10
|
Show,
|
|
10
11
|
splitProps,
|
|
12
|
+
untrack,
|
|
11
13
|
type JSX,
|
|
12
14
|
} from 'solid-js'
|
|
13
15
|
import { cva, type VariantProps } from '../../../lib/variants'
|
|
@@ -168,6 +170,11 @@ export function Board<T>(props: BoardProps<T>) {
|
|
|
168
170
|
// The dragged item, not its id: `canDrop` takes the item itself, and the
|
|
169
171
|
// pointer may leave the card before it is dropped.
|
|
170
172
|
const [dragging, setDragging] = createSignal<T | null>(null)
|
|
173
|
+
// Only the two cards whose answer flips update when a drag starts or ends.
|
|
174
|
+
const isDraggingId = createSelector(() => {
|
|
175
|
+
const current = dragging()
|
|
176
|
+
return current ? local.itemId(current) : undefined
|
|
177
|
+
})
|
|
171
178
|
const [overColumn, setOverColumn] = createSignal<string | null>(null)
|
|
172
179
|
const [announcement, setAnnouncement] = createSignal('')
|
|
173
180
|
const cardElements = new Map<string, HTMLElement>()
|
|
@@ -354,10 +361,7 @@ export function Board<T>(props: BoardProps<T>) {
|
|
|
354
361
|
<div class="flex min-h-16 flex-1 flex-col gap-2 overflow-y-auto px-2 pb-2">
|
|
355
362
|
<For each={items()}>
|
|
356
363
|
{(item) => {
|
|
357
|
-
const isDragging = () =>
|
|
358
|
-
const current = dragging()
|
|
359
|
-
return Boolean(current && local.itemId(current) === local.itemId(item))
|
|
360
|
-
}
|
|
364
|
+
const isDragging = () => isDraggingId(local.itemId(item))
|
|
361
365
|
return (
|
|
362
366
|
<article
|
|
363
367
|
ref={(element) => {
|
|
@@ -396,7 +400,15 @@ export function Board<T>(props: BoardProps<T>) {
|
|
|
396
400
|
)
|
|
397
401
|
}}
|
|
398
402
|
>
|
|
399
|
-
{
|
|
403
|
+
{/* The selector notifies only the card whose drag state
|
|
404
|
+
changed, so a drag start or end re-runs that one card's
|
|
405
|
+
render function (with a plain boolean, as the contract
|
|
406
|
+
says) instead of every card's. The call itself is
|
|
407
|
+
untracked: only the drag state re-runs it. */}
|
|
408
|
+
{(() => {
|
|
409
|
+
const isItemDragging = isDragging()
|
|
410
|
+
return untrack(() => local.children(item, { dragging: isItemDragging }))
|
|
411
|
+
})()}
|
|
400
412
|
</article>
|
|
401
413
|
)
|
|
402
414
|
}}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { splitProps, type ComponentProps, type JSX } from 'solid-js'
|
|
1
|
+
import { children as resolveChildren, splitProps, type ComponentProps, type JSX } from 'solid-js'
|
|
2
2
|
import { cn } from '../../../lib/utils'
|
|
3
3
|
import { cva, type VariantProps } from '../../../lib/variants'
|
|
4
4
|
|
|
@@ -58,6 +58,8 @@ export function Bubble(props: BubbleProps) {
|
|
|
58
58
|
'status',
|
|
59
59
|
'statusAction',
|
|
60
60
|
])
|
|
61
|
+
const status = resolveChildren(() => local.status)
|
|
62
|
+
const statusAction = resolveChildren(() => local.statusAction)
|
|
61
63
|
return (
|
|
62
64
|
<div class="flex max-w-full min-w-0 flex-col items-end gap-1" data-slot="bubble-root">
|
|
63
65
|
<div
|
|
@@ -68,7 +70,7 @@ export function Bubble(props: BubbleProps) {
|
|
|
68
70
|
>
|
|
69
71
|
{local.children}
|
|
70
72
|
</div>
|
|
71
|
-
{
|
|
73
|
+
{status() != null || statusAction() != null ? (
|
|
72
74
|
<div
|
|
73
75
|
data-slot="bubble-status"
|
|
74
76
|
role={local.state === 'failed' ? 'alert' : 'status'}
|
|
@@ -77,8 +79,8 @@ export function Bubble(props: BubbleProps) {
|
|
|
77
79
|
'text-muted-foreground': local.state !== 'failed',
|
|
78
80
|
})}
|
|
79
81
|
>
|
|
80
|
-
{
|
|
81
|
-
{
|
|
82
|
+
{status()}
|
|
83
|
+
{statusAction()}
|
|
82
84
|
</div>
|
|
83
85
|
) : null}
|
|
84
86
|
</div>
|
|
@@ -37,8 +37,8 @@ export const buttonVariants = cva(
|
|
|
37
37
|
ghost: 'text-foreground hover:bg-surface-hover',
|
|
38
38
|
/**
|
|
39
39
|
* A ghost that opens something: a sheet, menu or popover trigger in a
|
|
40
|
-
* toolbar. While its surface is open it holds the accent's own tint
|
|
41
|
-
* the same treatment that drives the side rail's active destination
|
|
40
|
+
* toolbar. While its surface is open it holds the accent's own tint,
|
|
41
|
+
* the same treatment that drives the side rail's active destination,
|
|
42
42
|
* so the open control never reads identical to its closed neighbours
|
|
43
43
|
* and the app's pressed chrome reads as one accent chroma. The
|
|
44
44
|
* compound hover keeps the tint when an open control is pointed at.
|
|
@@ -72,7 +72,7 @@ export function ButtonGroupSeparator(
|
|
|
72
72
|
}
|
|
73
73
|
|
|
74
74
|
/**
|
|
75
|
-
* Static text in a group
|
|
75
|
+
* Static text in a group, a unit, a label, a readout that is not a control. It
|
|
76
76
|
* takes the group's border and height so it sits in the row as a peer, but it is
|
|
77
77
|
* not focusable and does not pretend to be.
|
|
78
78
|
*/
|
|
@@ -256,7 +256,7 @@ export function DatePicker(props: DatePickerProps) {
|
|
|
256
256
|
return (
|
|
257
257
|
<div class={cn('grid w-fit gap-2', local.class)}>
|
|
258
258
|
<Show when={local.label}>
|
|
259
|
-
<p class="text-xs font-semibold text-foreground">{
|
|
259
|
+
{(labelSlot) => <p class="text-xs font-semibold text-foreground">{labelSlot()}</p>}
|
|
260
260
|
</Show>
|
|
261
261
|
<CalendarSurface
|
|
262
262
|
{...rest}
|
|
@@ -265,7 +265,7 @@ export function DatePicker(props: DatePickerProps) {
|
|
|
265
265
|
onValueChange={local.onValueChange}
|
|
266
266
|
/>
|
|
267
267
|
<Show when={local.footer}>
|
|
268
|
-
<div class="flex justify-end gap-2">{
|
|
268
|
+
{(footerSlot) => <div class="flex justify-end gap-2">{footerSlot()}</div>}
|
|
269
269
|
</Show>
|
|
270
270
|
</div>
|
|
271
271
|
)
|
|
@@ -12,7 +12,7 @@ import { cn } from '../../../lib/utils'
|
|
|
12
12
|
* nothing about it interrupts the reader.
|
|
13
13
|
*
|
|
14
14
|
* That is the difference from `Alert`. An `Alert` is a message about the state of
|
|
15
|
-
* the surface it sits in
|
|
15
|
+
* the surface it sits in, a failed sync, a validation summary, so it is always
|
|
16
16
|
* `role="alert"`, a live announcement, with a tone glyph and a tinted status
|
|
17
17
|
* surface. A callout is static page content: a plain `div` with `role="note"`, no
|
|
18
18
|
* live region, no icon, and no tint. A caller whose note really is a status
|
|
@@ -30,9 +30,9 @@ import { cn } from '../../../lib/utils'
|
|
|
30
30
|
* sets `p-*` or a border width to make one denser. The rungs are Cortana's three
|
|
31
31
|
* answer-view callouts, expressed in the Tailwind spacing scale:
|
|
32
32
|
*
|
|
33
|
-
* - `lg`: 22px / 24px padding, 3px rule
|
|
34
|
-
* - `md`: 18px / 20px padding, 3px rule
|
|
35
|
-
* - `sm`: 12px / 14px padding, 2px rule
|
|
33
|
+
* - `lg`: 22px / 24px padding, 3px rule: Cortana's `.answer-copy`.
|
|
34
|
+
* - `md`: 18px / 20px padding, 3px rule: Cortana's `.answer-memory`.
|
|
35
|
+
* - `sm`: 12px / 14px padding, 2px rule: Cortana's `.answer-note`.
|
|
36
36
|
*
|
|
37
37
|
* Type size and colour are inherited rather than set (only the card foreground is
|
|
38
38
|
* applied), so a callout in a dense panel and one in an article both read at the
|
|
@@ -7,8 +7,8 @@ import { headingVariants } from '../typography'
|
|
|
7
7
|
/**
|
|
8
8
|
* Card.
|
|
9
9
|
*
|
|
10
|
-
* A surface that sits on the canvas. Every card carries its own edge
|
|
11
|
-
* border
|
|
10
|
+
* A surface that sits on the canvas. Every card carries its own edge, a
|
|
11
|
+
* border, because in the light theme `--card` is one faint step off a white
|
|
12
12
|
* `--background`, and a borderless card there all but disappears. Making the border
|
|
13
13
|
* structural rather than optional is what stops one app's cards from reading
|
|
14
14
|
* as floating panels and another's as nothing at all.
|
|
@@ -9,7 +9,7 @@ import { Button } from '../button'
|
|
|
9
9
|
* Carousel.
|
|
10
10
|
*
|
|
11
11
|
* A horizontal scroller with snap points, over embla. The primitive owns the
|
|
12
|
-
* physics
|
|
12
|
+
* physics, momentum, snapping, drag, and this owns the two things a carousel
|
|
13
13
|
* always needs and embla deliberately leaves to the caller: a keyboard path and a
|
|
14
14
|
* way to tell how far along you are.
|
|
15
15
|
*
|
|
@@ -23,8 +23,8 @@ import { Button } from '../button'
|
|
|
23
23
|
*
|
|
24
24
|
* `orientation="vertical"` exists because embla supports it and a vertical
|
|
25
25
|
* carousel is what a short list of cards becomes on a phone. It is a prop rather
|
|
26
|
-
* than a second component because every part
|
|
27
|
-
* buttons, the dots
|
|
26
|
+
* than a second component because every part, the track, the previous/next
|
|
27
|
+
* buttons, the dots, has the same relationship to the axis.
|
|
28
28
|
*
|
|
29
29
|
* The dot indicators are buttons, not spans: a carousel with twelve slides and a
|
|
30
30
|
* "go to slide 7" affordance is the only way to reach the seventh without
|
|
@@ -47,7 +47,7 @@ export type CarouselProps = {
|
|
|
47
47
|
loop?: boolean
|
|
48
48
|
/** Show the previous/next controls. */
|
|
49
49
|
controls?: boolean
|
|
50
|
-
/** Show the dot indicators. Off by default
|
|
50
|
+
/** Show the dot indicators. Off by default, a single-slide carousel needs none. */
|
|
51
51
|
dots?: boolean
|
|
52
52
|
/** Accessible names. Override for a non-English application. */
|
|
53
53
|
previousLabel?: string
|
|
@@ -77,7 +77,7 @@ export function Carousel(props: CarouselProps) {
|
|
|
77
77
|
|
|
78
78
|
const orientation = () => local.orientation ?? 'horizontal'
|
|
79
79
|
|
|
80
|
-
// The first element of the tuple is the ref setter, the second the accessor
|
|
80
|
+
// The first element of the tuple is the ref setter, the second the accessor,
|
|
81
81
|
// so `ref={emblaRef}` is the whole wiring.
|
|
82
82
|
const [emblaRef, embla] = createEmblaCarousel(() => ({
|
|
83
83
|
axis: orientation() === 'vertical' ? 'y' : 'x',
|
|
@@ -128,7 +128,7 @@ export function Carousel(props: CarouselProps) {
|
|
|
128
128
|
>
|
|
129
129
|
<div
|
|
130
130
|
ref={emblaRef}
|
|
131
|
-
// A scroll container has to be reachable by keyboard
|
|
131
|
+
// A scroll container has to be reachable by keyboard, the same
|
|
132
132
|
// requirement the code block's scroller meets.
|
|
133
133
|
tabindex="0"
|
|
134
134
|
class={cn(
|
|
@@ -5,8 +5,8 @@ import type { ChartOptions } from 'chart.js'
|
|
|
5
5
|
* defaults and the merge rules are testable on their own.
|
|
6
6
|
*
|
|
7
7
|
* Every colour here is written as `var(--token)`. A canvas cannot read a custom
|
|
8
|
-
* property
|
|
9
|
-
* canvas ignores and paints in its default black
|
|
8
|
+
* property, `fillStyle = 'var(--chart-1)'` is an invalid colour, which the
|
|
9
|
+
* canvas ignores and paints in its default black, so these strings are the
|
|
10
10
|
* *declaration* of which token a colour comes from. The components resolve them
|
|
11
11
|
* against their own element at render time (see `resolveCssVariables` and the
|
|
12
12
|
* resolver in `chart.tsx`).
|
|
@@ -49,8 +49,8 @@ export type ChartScaleShape = 'cartesian' | 'radial' | 'none'
|
|
|
49
49
|
* The chart's type: the UI face from the font axis and a rung of the type scale,
|
|
50
50
|
* declared as tokens like the colours.
|
|
51
51
|
*
|
|
52
|
-
* Chart.js does not inherit the page's font
|
|
53
|
-
* family
|
|
52
|
+
* Chart.js does not inherit the page's font, it paints in its own default
|
|
53
|
+
* family, so every text a chart draws names `--font-sans` explicitly, and the
|
|
54
54
|
* chart follows `data-font` the same way it follows `.dark`. Everything is
|
|
55
55
|
* `--text-2xs`, the rung `ChartLegend` and the frame's metadata already use, so
|
|
56
56
|
* a canvas legend and an HTML one beside it are the same size.
|
|
@@ -124,8 +124,8 @@ function mergeInto(target: Record<string, unknown>, source: Record<string, unkno
|
|
|
124
124
|
* Merge Chart.js options, later sources winning, object by object.
|
|
125
125
|
*
|
|
126
126
|
* Deep, because Chart.js options are deep: `{ scales: { x: { stacked: true } } }`
|
|
127
|
-
* means "also stack x", and a spread would replace the whole axis
|
|
128
|
-
* its tick colour, its font
|
|
127
|
+
* means "also stack x", and a spread would replace the whole axis, its grid,
|
|
128
|
+
* its tick colour, its font, with that one flag. Arrays, functions (scriptable
|
|
129
129
|
* options) and class instances (gradients, patterns) are values and replace
|
|
130
130
|
* rather than merge. No source is mutated.
|
|
131
131
|
*/
|
|
@@ -141,7 +141,7 @@ export function mergeChartOptions(...sources: (ChartOptions | undefined)[]): Cha
|
|
|
141
141
|
* The theme's defaults as Chart.js options.
|
|
142
142
|
*
|
|
143
143
|
* Exported so a caller can spread it and change one thing, rather than
|
|
144
|
-
* restating every colour. Everything a chart draws that is not data
|
|
144
|
+
* restating every colour. Everything a chart draws that is not data, grid,
|
|
145
145
|
* ticks, legend, tooltip — is decided here once, which is what makes two charts
|
|
146
146
|
* in one application look like they came from the same place. `overrides` is
|
|
147
147
|
* merged deeply; `shape` selects the scales the chart type has.
|
|
@@ -192,8 +192,8 @@ export function chartOptions(
|
|
|
192
192
|
const cssVariable = /^\s*var\(\s*(--[\w-]+)\s*(?:,\s*(.*?))?\s*\)\s*$/
|
|
193
193
|
|
|
194
194
|
/**
|
|
195
|
-
* Replace every `var(--token)` string in `value
|
|
196
|
-
* arrays
|
|
195
|
+
* Replace every `var(--token)` string in `value`, options, datasets, nested
|
|
196
|
+
* arrays, with what `read` returns for the token, which may be a number (a
|
|
197
197
|
* length token read as pixels). A token `read` cannot
|
|
198
198
|
* resolve falls back to the `var()`'s own fallback, then to the string as
|
|
199
199
|
* written. Functions and class instances pass through untouched, so scriptable
|
|
@@ -105,7 +105,20 @@ export { chartOptions, chartSeriesColors }
|
|
|
105
105
|
*/
|
|
106
106
|
let swatch: CanvasRenderingContext2D | null | undefined
|
|
107
107
|
|
|
108
|
+
// A computed colour string always paints the same pixel, so each is converted once.
|
|
109
|
+
// Bounded so a long session of custom accents cannot grow it without limit.
|
|
110
|
+
const canvasColors = new Map<string, string>()
|
|
111
|
+
|
|
108
112
|
function toCanvasColor(value: string): string {
|
|
113
|
+
const cached = canvasColors.get(value)
|
|
114
|
+
if (cached !== undefined) return cached
|
|
115
|
+
const converted = paintCanvasColor(value)
|
|
116
|
+
if (canvasColors.size >= 512) canvasColors.clear()
|
|
117
|
+
canvasColors.set(value, converted)
|
|
118
|
+
return converted
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
function paintCanvasColor(value: string): string {
|
|
109
122
|
if (typeof CSS === 'undefined' || !CSS.supports('color', value)) return value
|
|
110
123
|
if (swatch === undefined) {
|
|
111
124
|
const canvas = document.createElement('canvas')
|
|
@@ -207,7 +220,7 @@ export function ChartFrame(props: ChartFrameProps) {
|
|
|
207
220
|
<div>
|
|
208
221
|
<h3 class="text-sm font-semibold text-foreground">{local.title}</h3>
|
|
209
222
|
<Show when={local.description}>
|
|
210
|
-
<p class="text-xs text-muted-foreground">{
|
|
223
|
+
{(descriptionSlot) => <p class="text-xs text-muted-foreground">{descriptionSlot()}</p>}
|
|
211
224
|
</Show>
|
|
212
225
|
</div>
|
|
213
226
|
{local.actions}
|