@adea-ai/ui 0.151.11 → 0.151.13
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/dist/NOTICE +3 -2
- package/dist/components/composites/about-dialog/about-dialog.d.ts.map +1 -1
- package/dist/components/composites/about-dialog/about-dialog.js +27 -48
- package/dist/components/composites/about-dialog/about-dialog.js.map +1 -1
- package/dist/components/composites/account-menu/account-menu.d.ts +2 -2
- package/dist/components/composites/account-menu/account-menu.d.ts.map +1 -1
- package/dist/components/composites/account-menu/account-menu.js +4 -22
- package/dist/components/composites/account-menu/account-menu.js.map +1 -1
- package/dist/components/composites/action-button/action-button.d.ts.map +1 -1
- package/dist/components/composites/action-button/action-button.js +2 -4
- package/dist/components/composites/action-button/action-button.js.map +1 -1
- package/dist/components/composites/appearance-editor/accent-swatch-groups.d.ts +1 -10
- package/dist/components/composites/appearance-editor/accent-swatch-groups.d.ts.map +1 -1
- package/dist/components/composites/appearance-editor/accent-swatch-groups.js +2 -1
- package/dist/components/composites/appearance-editor/accent-swatch-groups.js.map +1 -1
- package/dist/components/composites/appearance-editor/appearance-choices.d.ts.map +1 -1
- package/dist/components/composites/appearance-editor/appearance-choices.js +3 -2
- 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 +1 -0
- 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 +28 -53
- package/dist/components/composites/appearance-editor/appearance-rows.js.map +1 -1
- package/dist/components/composites/appearance-editor/font-settings-group.d.ts.map +1 -1
- package/dist/components/composites/appearance-editor/font-settings-group.js +7 -47
- package/dist/components/composites/appearance-editor/font-settings-group.js.map +1 -1
- package/dist/components/composites/appearance-editor/index.d.ts +1 -0
- package/dist/components/composites/appearance-editor/index.d.ts.map +1 -1
- package/dist/components/composites/appearance-editor/index.js +2 -1
- package/dist/components/composites/catalog-browser/catalog-browser.d.ts.map +1 -1
- package/dist/components/composites/catalog-browser/catalog-browser.js +8 -11
- package/dist/components/composites/catalog-browser/catalog-browser.js.map +1 -1
- package/dist/components/composites/chain-of-thought/chain-of-thought.d.ts +5 -4
- package/dist/components/composites/chain-of-thought/chain-of-thought.d.ts.map +1 -1
- package/dist/components/composites/chain-of-thought/chain-of-thought.js +5 -12
- package/dist/components/composites/chain-of-thought/chain-of-thought.js.map +1 -1
- package/dist/components/composites/chat/chat.d.ts +2 -2
- package/dist/components/composites/chat/chat.d.ts.map +1 -1
- package/dist/components/composites/chat/chat.js.map +1 -1
- package/dist/components/composites/checkpoint/checkpoint-model.js +1 -1
- package/dist/components/composites/checkpoint/checkpoint-model.js.map +1 -1
- package/dist/components/composites/checkpoint/checkpoint.js +3 -3
- package/dist/components/composites/checkpoint/checkpoint.js.map +1 -1
- package/dist/components/composites/confirmation/confirmation-model.d.ts +3 -12
- package/dist/components/composites/confirmation/confirmation-model.d.ts.map +1 -1
- package/dist/components/composites/confirmation/confirmation-model.js +5 -17
- package/dist/components/composites/confirmation/confirmation-model.js.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-model.js +1 -1
- package/dist/components/composites/context/context-model.js.map +1 -1
- package/dist/components/composites/file-tree/build-file-tree.d.ts +5 -12
- package/dist/components/composites/file-tree/build-file-tree.d.ts.map +1 -1
- package/dist/components/composites/file-tree/build-file-tree.js +26 -30
- package/dist/components/composites/file-tree/build-file-tree.js.map +1 -1
- package/dist/components/composites/file-tree/file-tree.d.ts +2 -2
- package/dist/components/composites/file-tree/file-tree.d.ts.map +1 -1
- package/dist/components/composites/file-tree/file-tree.js +4 -30
- package/dist/components/composites/file-tree/file-tree.js.map +1 -1
- package/dist/components/composites/file-tree/index.d.ts +2 -1
- package/dist/components/composites/file-tree/index.d.ts.map +1 -1
- package/dist/components/composites/file-tree/index.js +2 -1
- package/dist/components/composites/help-center/help-center.d.ts.map +1 -1
- package/dist/components/composites/help-center/help-center.js +9 -20
- package/dist/components/composites/help-center/help-center.js.map +1 -1
- package/dist/components/composites/icon-picker/icon-picker.d.ts.map +1 -1
- package/dist/components/composites/icon-picker/icon-picker.js +7 -11
- package/dist/components/composites/icon-picker/icon-picker.js.map +1 -1
- package/dist/components/composites/inline-citation/citation.d.ts.map +1 -1
- package/dist/components/composites/inline-citation/citation.js +2 -1
- package/dist/components/composites/inline-citation/citation.js.map +1 -1
- package/dist/components/composites/inline-citation/inline-citation.d.ts.map +1 -1
- package/dist/components/composites/inline-citation/inline-citation.js +2 -1
- package/dist/components/composites/inline-citation/inline-citation.js.map +1 -1
- package/dist/components/composites/message-scroller/message-scroller.d.ts +4 -5
- package/dist/components/composites/message-scroller/message-scroller.d.ts.map +1 -1
- package/dist/components/composites/message-scroller/message-scroller.js +19 -13
- package/dist/components/composites/message-scroller/message-scroller.js.map +1 -1
- package/dist/components/composites/message-scroller/scroll-anchor.d.ts +4 -3
- package/dist/components/composites/message-scroller/scroll-anchor.d.ts.map +1 -1
- package/dist/components/composites/message-scroller/scroll-anchor.js +5 -3
- package/dist/components/composites/message-scroller/scroll-anchor.js.map +1 -1
- package/dist/components/composites/model-selector/model-selector.d.ts.map +1 -1
- package/dist/components/composites/model-selector/model-selector.js +1 -1
- package/dist/components/composites/model-selector/model-selector.js.map +1 -1
- 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 +2 -3
- package/dist/components/composites/plan/plan.js.map +1 -1
- package/dist/components/composites/queue/queue.d.ts +2 -2
- package/dist/components/composites/queue/queue.d.ts.map +1 -1
- package/dist/components/composites/queue/queue.js +57 -64
- package/dist/components/composites/queue/queue.js.map +1 -1
- package/dist/components/composites/reasoning/index.js +3 -1
- package/dist/components/composites/reasoning/reasoning.d.ts +2 -3
- package/dist/components/composites/reasoning/reasoning.d.ts.map +1 -1
- package/dist/components/composites/reasoning/reasoning.js +5 -20
- package/dist/components/composites/reasoning/reasoning.js.map +1 -1
- package/dist/components/composites/settings/settings-layout.d.ts.map +1 -1
- package/dist/components/composites/settings/settings-layout.js +3 -2
- package/dist/components/composites/settings/settings-layout.js.map +1 -1
- package/dist/components/composites/settings/settings-navigation.d.ts.map +1 -1
- package/dist/components/composites/settings/settings-navigation.js +1 -1
- package/dist/components/composites/settings/settings-navigation.js.map +1 -1
- package/dist/components/composites/sources/index.js +2 -1
- package/dist/components/composites/sources/source.d.ts +3 -8
- package/dist/components/composites/sources/source.d.ts.map +1 -1
- package/dist/components/composites/sources/source.js +5 -30
- package/dist/components/composites/sources/source.js.map +1 -1
- package/dist/components/composites/sources/sources.js +2 -1
- package/dist/components/composites/sources/sources.js.map +1 -1
- package/dist/components/composites/stack-trace/stack-trace.d.ts.map +1 -1
- package/dist/components/composites/stack-trace/stack-trace.js +3 -12
- package/dist/components/composites/stack-trace/stack-trace.js.map +1 -1
- package/dist/components/composites/subagent/subagent.d.ts +3 -1
- package/dist/components/composites/subagent/subagent.d.ts.map +1 -1
- package/dist/components/composites/subagent/subagent.js +5 -17
- package/dist/components/composites/subagent/subagent.js.map +1 -1
- package/dist/components/composites/suggestion/suggestion.d.ts.map +1 -1
- package/dist/components/composites/suggestion/suggestion.js +3 -2
- package/dist/components/composites/suggestion/suggestion.js.map +1 -1
- package/dist/components/composites/task/task.d.ts +2 -3
- package/dist/components/composites/task/task.d.ts.map +1 -1
- package/dist/components/composites/task/task.js +49 -109
- package/dist/components/composites/task/task.js.map +1 -1
- package/dist/components/composites/terminal/terminal-model.d.ts +1 -2
- package/dist/components/composites/terminal/terminal-model.d.ts.map +1 -1
- package/dist/components/composites/terminal/terminal-model.js +7 -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 +3 -12
- package/dist/components/composites/terminal/terminal.js.map +1 -1
- package/dist/components/composites/test-results/test-results.d.ts.map +1 -1
- package/dist/components/composites/test-results/test-results.js +3 -12
- package/dist/components/composites/test-results/test-results.js.map +1 -1
- package/dist/components/composites/tool/tool.d.ts +0 -1
- package/dist/components/composites/tool/tool.d.ts.map +1 -1
- package/dist/components/composites/tool/tool.js +47 -41
- package/dist/components/composites/tool/tool.js.map +1 -1
- package/dist/components/composites/tree/tree-navigation.d.ts +6 -2
- package/dist/components/composites/tree/tree-navigation.d.ts.map +1 -1
- package/dist/components/composites/tree/tree-navigation.js +18 -1
- package/dist/components/composites/tree/tree-navigation.js.map +1 -1
- package/dist/components/composites/tree/tree.d.ts +6 -0
- package/dist/components/composites/tree/tree.d.ts.map +1 -1
- package/dist/components/composites/tree/tree.js +30 -4
- package/dist/components/composites/tree/tree.js.map +1 -1
- package/dist/components/composites/update-dialog/channel-control.d.ts.map +1 -1
- package/dist/components/composites/update-dialog/channel-control.js +7 -8
- package/dist/components/composites/update-dialog/channel-control.js.map +1 -1
- package/dist/components/composites/update-dialog/update-dialog.d.ts +2 -26
- package/dist/components/composites/update-dialog/update-dialog.d.ts.map +1 -1
- package/dist/components/composites/update-dialog/update-dialog.js +47 -125
- package/dist/components/composites/update-dialog/update-dialog.js.map +1 -1
- package/dist/components/composites/update-dialog/update-model.d.ts +65 -0
- package/dist/components/composites/update-dialog/update-model.d.ts.map +1 -0
- package/dist/components/composites/update-dialog/update-model.js +75 -0
- package/dist/components/composites/update-dialog/update-model.js.map +1 -0
- package/dist/components/composites/workspace-mark/workspace-mark.js.map +1 -1
- package/dist/components/composites/workspace-switcher/workspace-reorder-dialog.d.ts.map +1 -1
- package/dist/components/composites/workspace-switcher/workspace-reorder-dialog.js +3 -16
- package/dist/components/composites/workspace-switcher/workspace-reorder-dialog.js.map +1 -1
- package/dist/components/composites/workspace-switcher/workspace-switcher.d.ts.map +1 -1
- package/dist/components/composites/workspace-switcher/workspace-switcher.js +10 -14
- package/dist/components/composites/workspace-switcher/workspace-switcher.js.map +1 -1
- package/dist/components/conversation/busy-send-button.d.ts +3 -5
- package/dist/components/conversation/busy-send-button.d.ts.map +1 -1
- package/dist/components/conversation/busy-send-button.js +4 -15
- package/dist/components/conversation/busy-send-button.js.map +1 -1
- package/dist/components/conversation/chat-composer.d.ts +1 -1
- package/dist/components/conversation/chat-composer.d.ts.map +1 -1
- package/dist/components/conversation/chat-composer.js +1 -1
- package/dist/components/conversation/chat-composer.js.map +1 -1
- package/dist/components/conversation/composer-core.d.ts +35 -0
- package/dist/components/conversation/composer-core.d.ts.map +1 -0
- package/dist/components/conversation/composer-core.js +68 -0
- package/dist/components/conversation/composer-core.js.map +1 -0
- package/dist/components/conversation/composer-menu.d.ts +1 -1
- package/dist/components/conversation/composer-menu.d.ts.map +1 -1
- package/dist/components/conversation/composer-menu.js.map +1 -1
- package/dist/components/conversation/conversation-pane.d.ts +4 -1
- package/dist/components/conversation/conversation-pane.d.ts.map +1 -1
- package/dist/components/conversation/conversation-pane.js +4 -0
- package/dist/components/conversation/conversation-pane.js.map +1 -1
- package/dist/components/conversation/conversation-surface.d.ts +9 -6
- package/dist/components/conversation/conversation-surface.d.ts.map +1 -1
- package/dist/components/conversation/conversation-surface.js +7 -5
- package/dist/components/conversation/conversation-surface.js.map +1 -1
- package/dist/components/conversation/ime-guard.d.ts +1 -0
- package/dist/components/conversation/ime-guard.d.ts.map +1 -1
- package/dist/components/conversation/ime-guard.js +5 -0
- package/dist/components/conversation/ime-guard.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 +16 -50
- package/dist/components/conversation/internal/chat-composer-shell.js.map +1 -1
- package/dist/components/conversation/message-composer.d.ts +1 -3
- package/dist/components/conversation/message-composer.d.ts.map +1 -1
- package/dist/components/conversation/message-composer.js +15 -32
- package/dist/components/conversation/message-composer.js.map +1 -1
- package/dist/components/conversation/message-row.d.ts +10 -11
- package/dist/components/conversation/message-row.d.ts.map +1 -1
- package/dist/components/conversation/message-row.js +24 -49
- package/dist/components/conversation/message-row.js.map +1 -1
- package/dist/components/conversation/paste-token-editor.d.ts.map +1 -1
- package/dist/components/conversation/paste-token-editor.js +7 -17
- package/dist/components/conversation/paste-token-editor.js.map +1 -1
- package/dist/components/conversation/paste-tokens.d.ts +10 -1
- package/dist/components/conversation/paste-tokens.d.ts.map +1 -1
- package/dist/components/conversation/paste-tokens.js +26 -2
- package/dist/components/conversation/paste-tokens.js.map +1 -1
- package/dist/components/conversation/scroll-follow-core.d.ts +30 -79
- package/dist/components/conversation/scroll-follow-core.d.ts.map +1 -1
- package/dist/components/conversation/scroll-follow-core.js +65 -54
- package/dist/components/conversation/scroll-follow-core.js.map +1 -1
- package/dist/components/conversation/scroll-follow.d.ts +5 -1
- package/dist/components/conversation/scroll-follow.d.ts.map +1 -1
- package/dist/components/conversation/scroll-follow.js +27 -91
- package/dist/components/conversation/scroll-follow.js.map +1 -1
- package/dist/components/conversation/thread-panel.d.ts +0 -2
- package/dist/components/conversation/thread-panel.d.ts.map +1 -1
- 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 +4 -16
- package/dist/components/conversation/transcript-composition.js.map +1 -1
- package/dist/components/conversation/transcript-folding.d.ts +0 -1
- package/dist/components/conversation/transcript-folding.d.ts.map +1 -1
- package/dist/components/conversation/transcript-folding.js +1 -1
- package/dist/components/conversation/transcript-folding.js.map +1 -1
- package/dist/components/conversation/transcript-grouping.d.ts +8 -0
- package/dist/components/conversation/transcript-grouping.d.ts.map +1 -1
- package/dist/components/conversation/transcript-grouping.js +17 -3
- package/dist/components/conversation/transcript-grouping.js.map +1 -1
- package/dist/components/layout/contextual-sidebar/contextual-sidebar.d.ts +12 -0
- package/dist/components/layout/contextual-sidebar/contextual-sidebar.d.ts.map +1 -1
- package/dist/components/layout/contextual-sidebar/contextual-sidebar.js +53 -17
- package/dist/components/layout/contextual-sidebar/contextual-sidebar.js.map +1 -1
- package/dist/components/layout/contextual-sidebar/index.d.ts +1 -1
- package/dist/components/layout/contextual-sidebar/index.d.ts.map +1 -1
- package/dist/components/layout/contextual-sidebar/mobile-contextual-sidebar.js +1 -1
- package/dist/components/layout/contextual-sidebar/mobile-contextual-sidebar.js.map +1 -1
- package/dist/components/layout/floating-preview/index.js +2 -2
- package/dist/components/layout/floating-preview/model.d.ts +21 -55
- package/dist/components/layout/floating-preview/model.d.ts.map +1 -1
- package/dist/components/layout/floating-preview/model.js +33 -88
- package/dist/components/layout/floating-preview/model.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 +11 -5
- package/dist/components/layout/pixel-resize-handle/pixel-resize-handle.js.map +1 -1
- package/dist/components/layout/shell-top-bar/shell-top-bar.d.ts +18 -22
- package/dist/components/layout/shell-top-bar/shell-top-bar.d.ts.map +1 -1
- package/dist/components/layout/shell-top-bar/shell-top-bar.js +4 -2
- package/dist/components/layout/shell-top-bar/shell-top-bar.js.map +1 -1
- package/dist/components/layout/side-rail/side-rail-context.d.ts +0 -1
- package/dist/components/layout/side-rail/side-rail-context.d.ts.map +1 -1
- package/dist/components/layout/side-rail/side-rail-context.js +2 -8
- package/dist/components/layout/side-rail/side-rail-context.js.map +1 -1
- package/dist/components/layout/side-rail/side-rail.d.ts +0 -9
- package/dist/components/layout/side-rail/side-rail.d.ts.map +1 -1
- package/dist/components/layout/side-rail/side-rail.js +148 -128
- package/dist/components/layout/side-rail/side-rail.js.map +1 -1
- package/dist/components/layout/sidebar-nav/index.d.ts +2 -1
- package/dist/components/layout/sidebar-nav/index.d.ts.map +1 -1
- package/dist/components/layout/sidebar-nav/index.js +2 -1
- package/dist/components/layout/sidebar-nav/sidebar-nav-classes.d.ts +10 -0
- package/dist/components/layout/sidebar-nav/sidebar-nav-classes.d.ts.map +1 -0
- package/dist/components/layout/sidebar-nav/sidebar-nav-classes.js +18 -0
- package/dist/components/layout/sidebar-nav/sidebar-nav-classes.js.map +1 -0
- package/dist/components/layout/sidebar-nav/sidebar-nav-resize-handle.d.ts +1 -1
- package/dist/components/layout/sidebar-nav/sidebar-nav-resize-handle.d.ts.map +1 -1
- package/dist/components/layout/sidebar-nav/sidebar-nav-resize-handle.js.map +1 -1
- package/dist/components/layout/sidebar-nav/sidebar-nav.d.ts +5 -9
- package/dist/components/layout/sidebar-nav/sidebar-nav.d.ts.map +1 -1
- package/dist/components/layout/sidebar-nav/sidebar-nav.js +5 -23
- package/dist/components/layout/sidebar-nav/sidebar-nav.js.map +1 -1
- package/dist/components/layout/split-layout/geometry.d.ts.map +1 -1
- package/dist/components/layout/split-layout/geometry.js +2 -2
- package/dist/components/layout/split-layout/geometry.js.map +1 -1
- package/dist/components/layout/split-layout/index.js +2 -2
- package/dist/components/layout/split-layout/model.d.ts.map +1 -1
- package/dist/components/layout/split-layout/model.js +4 -4
- package/dist/components/layout/split-layout/model.js.map +1 -1
- package/dist/components/layout/split-layout/resize-controller-core-retry.d.ts +5 -0
- 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 +17 -10
- 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 +5 -0
- package/dist/components/layout/split-layout/resize-controller-core.d.ts.map +1 -1
- package/dist/components/layout/split-layout/resize-controller-core.js +17 -10
- 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 +54 -47
- package/dist/components/layout/split-layout/split-layout.js.map +1 -1
- package/dist/components/layout/split-layout/tree.d.ts +2 -0
- package/dist/components/layout/split-layout/tree.d.ts.map +1 -1
- package/dist/components/layout/split-layout/tree.js +5 -1
- package/dist/components/layout/split-layout/tree.js.map +1 -1
- package/dist/components/layout/top-bar/top-bar.d.ts +2 -9
- package/dist/components/layout/top-bar/top-bar.d.ts.map +1 -1
- package/dist/components/layout/top-bar/top-bar.js +4 -8
- package/dist/components/layout/top-bar/top-bar.js.map +1 -1
- package/dist/components/layout/top-bar/window-chrome.d.ts +13 -0
- package/dist/components/layout/top-bar/window-chrome.d.ts.map +1 -0
- package/dist/components/layout/top-bar/window-chrome.js +12 -0
- package/dist/components/layout/top-bar/window-chrome.js.map +1 -0
- package/dist/components/motion/presence.d.ts +1 -1
- package/dist/components/motion/presence.d.ts.map +1 -1
- package/dist/components/motion/presence.js +1 -4
- package/dist/components/motion/presence.js.map +1 -1
- package/dist/components/theme/appearance-panel.d.ts +3 -1
- package/dist/components/theme/appearance-panel.d.ts.map +1 -1
- package/dist/components/theme/appearance-panel.js +17 -9
- package/dist/components/theme/appearance-panel.js.map +1 -1
- package/dist/components/theme/index.d.ts +1 -1
- package/dist/components/theme/index.d.ts.map +1 -1
- package/dist/components/theme/index.js +5 -4
- package/dist/components/theme/lazy.d.ts +31 -5
- package/dist/components/theme/lazy.d.ts.map +1 -1
- package/dist/components/theme/lazy.js +39 -6
- package/dist/components/theme/lazy.js.map +1 -0
- package/dist/components/theme/script-projection.d.ts +17 -0
- package/dist/components/theme/script-projection.d.ts.map +1 -0
- package/dist/components/theme/script-projection.js +17 -0
- package/dist/components/theme/script-projection.js.map +1 -0
- package/dist/components/theme/script.js +3 -1
- package/dist/components/theme/theme-api.d.ts +14 -0
- package/dist/components/theme/theme-api.d.ts.map +1 -0
- package/dist/components/theme/theme-catalogue-source.d.ts.map +1 -1
- package/dist/components/theme/theme-catalogue-source.js +3 -2
- package/dist/components/theme/theme-catalogue-source.js.map +1 -1
- package/dist/components/theme/theme-document.d.ts +112 -10
- package/dist/components/theme/theme-document.d.ts.map +1 -1
- package/dist/components/theme/{theme-document-core.js → theme-document.js} +20 -10
- package/dist/components/theme/theme-document.js.map +1 -0
- package/dist/components/theme/theme-mode-toggle.d.ts +1 -1
- package/dist/components/theme/theme-mode-toggle.d.ts.map +1 -1
- package/dist/components/theme/theme-mode-toggle.js.map +1 -1
- package/dist/components/theme/theme-persistence.d.ts +6 -5
- package/dist/components/theme/theme-persistence.d.ts.map +1 -1
- package/dist/components/theme/theme-persistence.js +48 -80
- package/dist/components/theme/theme-persistence.js.map +1 -1
- package/dist/components/theme/theme-picker.d.ts +1 -1
- package/dist/components/theme/theme-picker.d.ts.map +1 -1
- package/dist/components/theme/theme-picker.js.map +1 -1
- package/dist/components/theme/theme-provider-value.d.ts +16 -16
- package/dist/components/theme/theme-provider-value.d.ts.map +1 -1
- package/dist/components/theme/theme-provider-value.js +33 -42
- package/dist/components/theme/theme-provider-value.js.map +1 -1
- package/dist/components/theme/theme-provider.d.ts +3 -9
- package/dist/components/theme/theme-provider.d.ts.map +1 -1
- package/dist/components/theme/theme-provider.js +8 -7
- package/dist/components/theme/theme-provider.js.map +1 -1
- package/dist/components/theme/theme-script.d.ts +24 -25
- package/dist/components/theme/theme-script.d.ts.map +1 -1
- package/dist/components/theme/theme-script.js +45 -39
- package/dist/components/theme/theme-script.js.map +1 -1
- package/dist/components/theme/theme-state.d.ts +241 -9
- package/dist/components/theme/theme-state.d.ts.map +1 -1
- package/dist/components/theme/{theme-state-core.js → theme-state.js} +10 -11
- package/dist/components/theme/theme-state.js.map +1 -0
- package/dist/components/theme/theme-toggle.d.ts +1 -1
- package/dist/components/theme/theme-toggle.d.ts.map +1 -1
- package/dist/components/theme/theme-toggle.js.map +1 -1
- package/dist/components/theme/token-projection-options.d.ts +3 -0
- package/dist/components/theme/token-projection-options.d.ts.map +1 -0
- package/dist/components/theme/token-projection-options.js +9 -0
- package/dist/components/theme/token-projection-options.js.map +1 -0
- package/dist/components/theme/token-projection.d.ts +22 -0
- package/dist/components/theme/token-projection.d.ts.map +1 -0
- package/dist/components/theme/token-projection.js +1 -0
- package/dist/components/ui/alert-dialog/alert-dialog.d.ts +7 -5
- package/dist/components/ui/alert-dialog/alert-dialog.d.ts.map +1 -1
- package/dist/components/ui/alert-dialog/alert-dialog.js +40 -36
- package/dist/components/ui/alert-dialog/alert-dialog.js.map +1 -1
- package/dist/components/ui/attachment/attachment.d.ts.map +1 -1
- package/dist/components/ui/attachment/attachment.js +5 -16
- package/dist/components/ui/attachment/attachment.js.map +1 -1
- package/dist/components/ui/avatar/avatar.d.ts.map +1 -1
- package/dist/components/ui/avatar/avatar.js +5 -2
- package/dist/components/ui/avatar/avatar.js.map +1 -1
- package/dist/components/ui/board/board.d.ts +0 -3
- package/dist/components/ui/board/board.d.ts.map +1 -1
- package/dist/components/ui/board/board.js +3 -6
- package/dist/components/ui/board/board.js.map +1 -1
- package/dist/components/ui/button-group/button-group.d.ts +1 -1
- package/dist/components/ui/button-group/button-group.d.ts.map +1 -1
- package/dist/components/ui/button-group/button-group.js.map +1 -1
- package/dist/components/ui/chart/chart.d.ts +0 -3
- package/dist/components/ui/chart/chart.d.ts.map +1 -1
- package/dist/components/ui/chart/chart.js.map +1 -1
- package/dist/components/ui/code-block/code-block.d.ts +0 -2
- package/dist/components/ui/code-block/code-block.d.ts.map +1 -1
- package/dist/components/ui/code-block/code-block.js +8 -24
- package/dist/components/ui/code-block/code-block.js.map +1 -1
- package/dist/components/ui/command/command.d.ts.map +1 -1
- package/dist/components/ui/command/command.js +56 -48
- package/dist/components/ui/command/command.js.map +1 -1
- package/dist/components/ui/context-menu/context-menu.d.ts +8 -30
- package/dist/components/ui/context-menu/context-menu.d.ts.map +1 -1
- package/dist/components/ui/context-menu/context-menu.js +13 -121
- package/dist/components/ui/context-menu/context-menu.js.map +1 -1
- package/dist/components/ui/dialog/dialog-layer.d.ts +46 -0
- package/dist/components/ui/dialog/dialog-layer.d.ts.map +1 -0
- package/dist/components/ui/dialog/dialog-layer.js +169 -0
- package/dist/components/ui/dialog/dialog-layer.js.map +1 -0
- package/dist/components/ui/dialog/dialog.d.ts +20 -26
- package/dist/components/ui/dialog/dialog.d.ts.map +1 -1
- package/dist/components/ui/dialog/dialog.js +69 -187
- package/dist/components/ui/dialog/dialog.js.map +1 -1
- package/dist/components/ui/drawer/drawer.d.ts.map +1 -1
- package/dist/components/ui/drawer/drawer.js +5 -8
- package/dist/components/ui/drawer/drawer.js.map +1 -1
- package/dist/components/ui/dropdown-menu/dropdown-menu.d.ts +39 -53
- package/dist/components/ui/dropdown-menu/dropdown-menu.d.ts.map +1 -1
- package/dist/components/ui/dropdown-menu/dropdown-menu.js +135 -191
- package/dist/components/ui/dropdown-menu/dropdown-menu.js.map +1 -1
- package/dist/components/ui/dropdown-menu/menu-parts.d.ts +46 -0
- package/dist/components/ui/dropdown-menu/menu-parts.d.ts.map +1 -0
- package/dist/components/ui/dropdown-menu/menu-parts.js +176 -0
- package/dist/components/ui/dropdown-menu/menu-parts.js.map +1 -0
- package/dist/components/ui/field/field.js.map +1 -1
- package/dist/components/ui/field/number-field.js.map +1 -1
- package/dist/components/ui/hover-card/hover-card.d.ts +1 -2
- package/dist/components/ui/hover-card/hover-card.d.ts.map +1 -1
- package/dist/components/ui/hover-card/hover-card.js +4 -21
- package/dist/components/ui/hover-card/hover-card.js.map +1 -1
- package/dist/components/ui/menubar/menubar.d.ts +19 -33
- package/dist/components/ui/menubar/menubar.d.ts.map +1 -1
- package/dist/components/ui/menubar/menubar.js +21 -116
- package/dist/components/ui/menubar/menubar.js.map +1 -1
- package/dist/components/ui/message/index.js +2 -1
- package/dist/components/ui/message/message.d.ts +0 -1
- package/dist/components/ui/message/message.d.ts.map +1 -1
- package/dist/components/ui/message/message.js.map +1 -1
- package/dist/components/ui/message/parse-message-text.d.ts +20 -2
- package/dist/components/ui/message/parse-message-text.d.ts.map +1 -1
- package/dist/components/ui/message/parse-message-text.js +94 -28
- package/dist/components/ui/message/parse-message-text.js.map +1 -1
- package/dist/components/ui/modal-dialog/modal-dialog.d.ts +5 -12
- package/dist/components/ui/modal-dialog/modal-dialog.d.ts.map +1 -1
- package/dist/components/ui/modal-dialog/modal-dialog.js +61 -77
- package/dist/components/ui/modal-dialog/modal-dialog.js.map +1 -1
- package/dist/components/ui/navigation-menu/navigation-menu.d.ts +0 -1
- package/dist/components/ui/navigation-menu/navigation-menu.d.ts.map +1 -1
- package/dist/components/ui/navigation-menu/navigation-menu.js.map +1 -1
- package/dist/components/ui/popover/popover.d.ts +1 -3
- package/dist/components/ui/popover/popover.d.ts.map +1 -1
- package/dist/components/ui/popover/popover.js +1 -22
- package/dist/components/ui/popover/popover.js.map +1 -1
- package/dist/components/ui/resizable/resizable.d.ts.map +1 -1
- package/dist/components/ui/resizable/resizable.js +12 -6
- package/dist/components/ui/resizable/resizable.js.map +1 -1
- package/dist/components/ui/sheet/sheet.d.ts +4 -6
- package/dist/components/ui/sheet/sheet.d.ts.map +1 -1
- package/dist/components/ui/sheet/sheet.js +31 -32
- package/dist/components/ui/sheet/sheet.js.map +1 -1
- package/dist/components/ui/text-link/index.d.ts.map +1 -1
- package/dist/components/ui/toggle-group/toggle-group.d.ts +1 -1
- package/dist/components/ui/toggle-group/toggle-group.d.ts.map +1 -1
- package/dist/components/ui/toggle-group/toggle-group.js +2 -7
- package/dist/components/ui/toggle-group/toggle-group.js.map +1 -1
- package/dist/components/ui/tooltip/tooltip.d.ts +17 -1
- package/dist/components/ui/tooltip/tooltip.d.ts.map +1 -1
- package/dist/components/ui/tooltip/tooltip.js +40 -20
- package/dist/components/ui/tooltip/tooltip.js.map +1 -1
- package/dist/components/ui/trace/index.d.ts +1 -1
- package/dist/components/ui/trace/index.d.ts.map +1 -1
- package/dist/components/ui/trace/index.js +1 -1
- package/dist/components/ui/trace/trace.d.ts +44 -3
- package/dist/components/ui/trace/trace.d.ts.map +1 -1
- package/dist/components/ui/trace/trace.js +87 -15
- package/dist/components/ui/trace/trace.js.map +1 -1
- package/dist/index.js +34 -28
- package/dist/lib/accent-presets.d.ts +7 -4
- package/dist/lib/accent-presets.d.ts.map +1 -1
- package/dist/lib/accent-presets.js +10 -5
- package/dist/lib/accent-presets.js.map +1 -1
- package/dist/lib/accent-roles.d.ts +20 -1
- package/dist/lib/accent-roles.d.ts.map +1 -1
- package/dist/lib/accent-roles.js +34 -26
- 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 +4 -4
- package/dist/lib/appearance-font-settings.js.map +1 -1
- package/dist/lib/async-action.d.ts +42 -0
- package/dist/lib/async-action.d.ts.map +1 -0
- package/dist/lib/async-action.js +61 -0
- package/dist/lib/async-action.js.map +1 -0
- package/dist/lib/breakpoints.d.ts +8 -0
- package/dist/lib/breakpoints.d.ts.map +1 -0
- package/dist/lib/breakpoints.js +11 -0
- package/dist/lib/breakpoints.js.map +1 -0
- package/dist/lib/bytes.d.ts +8 -0
- package/dist/lib/bytes.d.ts.map +1 -0
- package/dist/lib/bytes.js +20 -0
- package/dist/lib/bytes.js.map +1 -0
- package/dist/lib/clipboard.d.ts +13 -0
- package/dist/lib/clipboard.d.ts.map +1 -1
- package/dist/lib/clipboard.js +32 -1
- package/dist/lib/clipboard.js.map +1 -1
- package/dist/lib/events.d.ts +14 -0
- package/dist/lib/events.d.ts.map +1 -0
- package/dist/lib/events.js +16 -0
- package/dist/lib/events.js.map +1 -0
- package/dist/lib/external-link.d.ts +19 -0
- package/dist/lib/external-link.d.ts.map +1 -0
- package/dist/lib/external-link.js +27 -0
- package/dist/lib/external-link.js.map +1 -0
- package/dist/lib/font-catalog.d.ts +3 -6
- package/dist/lib/font-catalog.d.ts.map +1 -1
- package/dist/lib/font-catalog.js +16 -12
- package/dist/lib/font-catalog.js.map +1 -1
- package/dist/lib/font-zoom.d.ts +4 -4
- package/dist/lib/font-zoom.d.ts.map +1 -1
- package/dist/lib/font-zoom.js +9 -12
- package/dist/lib/font-zoom.js.map +1 -1
- package/dist/lib/overlay.d.ts +29 -1
- package/dist/lib/overlay.d.ts.map +1 -1
- package/dist/lib/overlay.js +32 -16
- package/dist/lib/overlay.js.map +1 -1
- package/dist/lib/preference-store.d.ts +13 -3
- package/dist/lib/preference-store.d.ts.map +1 -1
- package/dist/lib/preference-store.js +27 -37
- package/dist/lib/preference-store.js.map +1 -1
- package/dist/lib/resize-separator.d.ts +15 -0
- package/dist/lib/resize-separator.d.ts.map +1 -0
- package/dist/lib/resize-separator.js +23 -0
- package/dist/lib/resize-separator.js.map +1 -0
- package/dist/lib/safe-script.d.ts +19 -1
- package/dist/lib/safe-script.d.ts.map +1 -1
- package/dist/lib/safe-script.js +19 -1
- package/dist/lib/safe-script.js.map +1 -1
- package/dist/lib/scroll-geometry.d.ts +33 -0
- package/dist/lib/scroll-geometry.d.ts.map +1 -0
- package/dist/lib/scroll-geometry.js +48 -0
- package/dist/lib/scroll-geometry.js.map +1 -0
- package/dist/lib/text.d.ts +13 -0
- package/dist/lib/text.d.ts.map +1 -0
- package/dist/lib/text.js +30 -0
- package/dist/lib/text.js.map +1 -0
- package/dist/lib/theme-accents.d.ts +2 -0
- package/dist/lib/theme-accents.d.ts.map +1 -1
- package/dist/lib/theme-accents.js +2 -2
- package/dist/lib/theme-accents.js.map +1 -1
- package/dist/lib/theme-catalogue.d.ts.map +1 -1
- package/dist/lib/theme-catalogue.js +3 -4
- package/dist/lib/theme-catalogue.js.map +1 -1
- package/dist/lib/theme-css.d.ts +14 -1
- package/dist/lib/theme-css.d.ts.map +1 -1
- package/dist/lib/theme-css.js +25 -48
- package/dist/lib/theme-css.js.map +1 -1
- package/dist/lib/theme-defaults.d.ts +33 -5
- package/dist/lib/theme-defaults.d.ts.map +1 -1
- package/dist/lib/theme-defaults.generated.d.ts +1 -1
- package/dist/lib/theme-defaults.generated.d.ts.map +1 -1
- package/dist/lib/theme-defaults.generated.js.map +1 -1
- package/dist/lib/theme-defaults.js +59 -3
- package/dist/lib/theme-defaults.js.map +1 -1
- package/dist/lib/theme-engine-light.d.ts +6 -0
- package/dist/lib/theme-engine-light.d.ts.map +1 -1
- package/dist/lib/theme-engine-light.js +71 -57
- package/dist/lib/theme-engine-light.js.map +1 -1
- package/dist/lib/theme-engine.d.ts +20 -22
- package/dist/lib/theme-engine.d.ts.map +1 -1
- package/dist/lib/theme-engine.js +19 -6
- package/dist/lib/theme-engine.js.map +1 -1
- package/dist/lib/theme-records.d.ts +3 -3
- package/dist/lib/theme-records.d.ts.map +1 -1
- package/dist/lib/theme-records.js +20 -59
- package/dist/lib/theme-records.js.map +1 -1
- package/dist/lib/theme-types.d.ts +174 -0
- package/dist/lib/theme-types.d.ts.map +1 -0
- package/dist/lib/theme-types.js +105 -0
- package/dist/lib/theme-types.js.map +1 -0
- package/dist/lib/themes.d.ts +4 -159
- package/dist/lib/themes.d.ts.map +1 -1
- package/dist/lib/themes.js +14 -33
- package/dist/lib/themes.js.map +1 -1
- package/dist/lib/tokens.d.ts.map +1 -1
- package/dist/lib/tokens.js +0 -1
- package/dist/lib/tokens.js.map +1 -1
- package/dist/lib/url.d.ts +9 -0
- package/dist/lib/url.d.ts.map +1 -0
- package/dist/lib/url.js +24 -0
- package/dist/lib/url.js.map +1 -0
- package/dist/lib/version-notes.d.ts.map +1 -1
- package/dist/lib/version-notes.js +3 -10
- package/dist/lib/version-notes.js.map +1 -1
- package/dist/r/about-dialog.json +2 -1
- package/dist/r/action-button.json +2 -1
- package/dist/r/alert-dialog.json +1 -0
- package/dist/r/appearance-editor.json +1 -1
- package/dist/r/checkpoint.json +0 -2
- package/dist/r/code-block.json +1 -0
- package/dist/r/confirmation.json +0 -1
- package/dist/r/context-menu.json +2 -2
- package/dist/r/context.json +0 -1
- package/dist/r/conversation.json +6 -5
- package/dist/r/dialog.json +5 -0
- package/dist/r/drawer.json +0 -1
- package/dist/r/dropdown-menu.json +5 -0
- package/dist/r/lib.json +51 -1
- package/dist/r/menubar.json +2 -2
- package/dist/r/model-selector.json +0 -1
- package/dist/r/reasoning.json +2 -1
- package/dist/r/registry.json +120 -46
- package/dist/r/shell-top-bar.json +1 -0
- package/dist/r/sidebar-nav.json +5 -0
- package/dist/r/sources.json +2 -2
- package/dist/r/src/components/composites/about-dialog/about-dialog.tsx +22 -42
- package/dist/r/src/components/composites/account-menu/account-menu.tsx +9 -35
- package/dist/r/src/components/composites/action-button/action-button.tsx +5 -7
- package/dist/r/src/components/composites/appearance-editor/accent-swatch-groups.tsx +3 -11
- package/dist/r/src/components/composites/appearance-editor/appearance-choices.tsx +8 -5
- package/dist/r/src/components/composites/appearance-editor/appearance-editor.tsx +8 -6
- package/dist/r/src/components/composites/appearance-editor/appearance-rows.tsx +30 -82
- package/dist/r/src/components/composites/appearance-editor/font-settings-group.tsx +11 -77
- package/dist/r/src/components/composites/appearance-editor/index.ts +1 -0
- package/dist/r/src/components/composites/catalog-browser/catalog-browser.tsx +9 -13
- package/dist/r/src/components/composites/chain-of-thought/chain-of-thought.tsx +16 -18
- package/dist/r/src/components/composites/chat/chat.tsx +2 -2
- package/dist/r/src/components/composites/checkpoint/checkpoint-model.ts +3 -3
- package/dist/r/src/components/composites/checkpoint/checkpoint.tsx +3 -3
- package/dist/r/src/components/composites/confirmation/confirmation-model.ts +9 -17
- package/dist/r/src/components/composites/confirmation/confirmation.tsx +2 -2
- package/dist/r/src/components/composites/context/context-model.ts +1 -1
- package/dist/r/src/components/composites/file-tree/build-file-tree.ts +21 -39
- package/dist/r/src/components/composites/file-tree/file-tree.tsx +5 -58
- package/dist/r/src/components/composites/file-tree/index.ts +1 -1
- package/dist/r/src/components/composites/help-center/help-center.tsx +8 -21
- package/dist/r/src/components/composites/icon-picker/icon-picker.tsx +10 -11
- package/dist/r/src/components/composites/inline-citation/citation.ts +2 -1
- package/dist/r/src/components/composites/inline-citation/inline-citation.tsx +3 -2
- package/dist/r/src/components/composites/message-scroller/message-scroller.tsx +30 -30
- package/dist/r/src/components/composites/message-scroller/scroll-anchor.ts +5 -5
- package/dist/r/src/components/composites/model-selector/model-selector.tsx +3 -2
- package/dist/r/src/components/composites/model-selector/models.ts +1 -1
- package/dist/r/src/components/composites/plan/plan.tsx +1 -4
- package/dist/r/src/components/composites/queue/queue.tsx +8 -11
- package/dist/r/src/components/composites/reasoning/reasoning.tsx +5 -23
- package/dist/r/src/components/composites/settings/settings-layout.tsx +3 -2
- package/dist/r/src/components/composites/settings/settings-navigation.tsx +4 -1
- package/dist/r/src/components/composites/sources/source.ts +7 -53
- package/dist/r/src/components/composites/stack-trace/stack-trace.tsx +3 -12
- package/dist/r/src/components/composites/subagent/subagent.tsx +7 -17
- package/dist/r/src/components/composites/suggestion/suggestion.tsx +4 -3
- package/dist/r/src/components/composites/task/task.tsx +21 -64
- package/dist/r/src/components/composites/terminal/terminal-model.ts +4 -4
- package/dist/r/src/components/composites/terminal/terminal.tsx +3 -12
- package/dist/r/src/components/composites/test-results/test-results.tsx +3 -12
- package/dist/r/src/components/composites/tool/tool.tsx +34 -40
- package/dist/r/src/components/composites/tree/tree-navigation.ts +22 -2
- package/dist/r/src/components/composites/tree/tree.tsx +47 -3
- package/dist/r/src/components/composites/update-dialog/channel-control.tsx +10 -14
- package/dist/r/src/components/composites/update-dialog/update-dialog.tsx +66 -200
- package/dist/r/src/components/composites/update-dialog/update-model.ts +137 -0
- package/dist/r/src/components/composites/workspace-mark/workspace-mark.tsx +1 -1
- package/dist/r/src/components/composites/workspace-switcher/workspace-reorder-dialog.tsx +1 -18
- package/dist/r/src/components/composites/workspace-switcher/workspace-switcher.tsx +16 -19
- package/dist/r/src/components/conversation/busy-send-button.tsx +7 -34
- package/dist/r/src/components/conversation/chat-composer.tsx +1 -1
- package/dist/r/src/components/conversation/composer-core.ts +76 -0
- package/dist/r/src/components/conversation/composer-menu.tsx +1 -1
- package/dist/r/src/components/conversation/conversation-pane.tsx +4 -1
- package/dist/r/src/components/conversation/conversation-surface.tsx +23 -10
- package/dist/r/src/components/conversation/ime-guard.ts +6 -0
- package/dist/r/src/components/conversation/internal/chat-composer-shell.tsx +24 -65
- package/dist/r/src/components/conversation/message-composer.tsx +24 -54
- package/dist/r/src/components/conversation/message-row.tsx +33 -47
- package/dist/r/src/components/conversation/paste-token-editor.tsx +13 -16
- package/dist/r/src/components/conversation/paste-tokens.ts +36 -1
- package/dist/r/src/components/conversation/scroll-follow-core.ts +66 -137
- package/dist/r/src/components/conversation/scroll-follow.ts +26 -67
- package/dist/r/src/components/conversation/thread-panel.tsx +2 -4
- package/dist/r/src/components/conversation/transcript-composition.tsx +9 -33
- package/dist/r/src/components/conversation/transcript-folding.ts +2 -2
- package/dist/r/src/components/conversation/transcript-grouping.ts +18 -3
- package/dist/r/src/components/layout/contextual-sidebar/contextual-sidebar.tsx +80 -22
- package/dist/r/src/components/layout/contextual-sidebar/index.ts +1 -0
- package/dist/r/src/components/layout/contextual-sidebar/mobile-contextual-sidebar.tsx +1 -1
- package/dist/r/src/components/layout/floating-preview/model.ts +57 -195
- package/dist/r/src/components/layout/pixel-resize-handle/pixel-resize-handle.tsx +6 -12
- package/dist/r/src/components/layout/shell-top-bar/shell-top-bar.tsx +47 -54
- package/dist/r/src/components/layout/side-rail/side-rail-context.ts +1 -11
- package/dist/r/src/components/layout/side-rail/side-rail.tsx +95 -107
- package/dist/r/src/components/layout/sidebar-nav/index.ts +1 -2
- package/dist/r/src/components/layout/sidebar-nav/sidebar-nav-classes.ts +15 -0
- package/dist/r/src/components/layout/sidebar-nav/sidebar-nav-resize-handle.tsx +1 -4
- package/dist/r/src/components/layout/sidebar-nav/sidebar-nav.tsx +9 -27
- package/dist/r/src/components/layout/split-layout/geometry.ts +2 -9
- package/dist/r/src/components/layout/split-layout/model.ts +3 -6
- package/dist/r/src/components/layout/split-layout/resize-controller-core-retry.tsx +12 -6
- package/dist/r/src/components/layout/split-layout/resize-controller-core.tsx +12 -6
- package/dist/r/src/components/layout/split-layout/split-layout.tsx +46 -61
- package/dist/r/src/components/layout/split-layout/tree.ts +5 -0
- package/dist/r/src/components/layout/top-bar/top-bar.tsx +16 -38
- package/dist/r/src/components/layout/top-bar/window-chrome.ts +23 -0
- package/dist/r/src/components/motion/presence.tsx +1 -3
- package/dist/r/src/components/theme/appearance-panel.tsx +28 -19
- package/dist/r/src/components/theme/index.ts +1 -22
- package/dist/r/src/components/theme/lazy.ts +36 -26
- package/dist/r/src/components/theme/script-projection.ts +40 -0
- package/dist/r/src/components/theme/theme-api.ts +30 -0
- package/dist/r/src/components/theme/theme-catalogue-source.ts +3 -2
- package/dist/r/src/components/theme/theme-document.ts +248 -23
- package/dist/r/src/components/theme/theme-mode-toggle.tsx +1 -1
- package/dist/r/src/components/theme/theme-persistence.ts +74 -130
- package/dist/r/src/components/theme/theme-picker.tsx +2 -2
- package/dist/r/src/components/theme/theme-provider-value.ts +64 -69
- package/dist/r/src/components/theme/theme-provider.tsx +5 -24
- package/dist/r/src/components/theme/theme-script.ts +100 -47
- package/dist/r/src/components/theme/theme-state.ts +350 -10
- package/dist/r/src/components/theme/theme-toggle.tsx +1 -1
- package/dist/r/src/components/theme/token-projection-options.ts +14 -0
- package/dist/r/src/components/theme/token-projection.ts +37 -0
- package/dist/r/src/components/ui/alert-dialog/alert-dialog.tsx +43 -43
- package/dist/r/src/components/ui/attachment/attachment.tsx +4 -17
- package/dist/r/src/components/ui/avatar/avatar.tsx +3 -2
- package/dist/r/src/components/ui/board/board.tsx +4 -10
- package/dist/r/src/components/ui/button-group/button-group.tsx +1 -1
- package/dist/r/src/components/ui/chart/chart.tsx +0 -3
- package/dist/r/src/components/ui/code-block/code-block.tsx +7 -26
- package/dist/r/src/components/ui/command/command.tsx +43 -39
- package/dist/r/src/components/ui/context-menu/context-menu.tsx +18 -168
- package/dist/r/src/components/ui/dialog/dialog-layer.tsx +266 -0
- package/dist/r/src/components/ui/dialog/dialog.tsx +77 -271
- package/dist/r/src/components/ui/drawer/drawer.tsx +5 -23
- package/dist/r/src/components/ui/dropdown-menu/dropdown-menu.tsx +204 -226
- package/dist/r/src/components/ui/dropdown-menu/menu-parts.tsx +220 -0
- package/dist/r/src/components/ui/field/field.tsx +1 -1
- package/dist/r/src/components/ui/field/number-field.tsx +1 -1
- package/dist/r/src/components/ui/hover-card/hover-card.tsx +4 -11
- package/dist/r/src/components/ui/menubar/menubar.tsx +36 -169
- package/dist/r/src/components/ui/message/message.tsx +0 -1
- package/dist/r/src/components/ui/message/parse-message-text.ts +80 -32
- package/dist/r/src/components/ui/modal-dialog/modal-dialog.tsx +9 -39
- package/dist/r/src/components/ui/navigation-menu/navigation-menu.tsx +0 -1
- package/dist/r/src/components/ui/popover/popover.tsx +5 -11
- package/dist/r/src/components/ui/resizable/resizable.tsx +6 -16
- package/dist/r/src/components/ui/sheet/sheet.tsx +30 -42
- package/dist/r/src/components/ui/text-link/index.ts +0 -1
- package/dist/r/src/components/ui/toggle-group/toggle-group.tsx +3 -11
- package/dist/r/src/components/ui/tooltip/tooltip.tsx +47 -26
- package/dist/r/src/components/ui/trace/index.ts +7 -0
- package/dist/r/src/components/ui/trace/trace.tsx +100 -9
- package/dist/r/src/lib/accent-presets.ts +12 -8
- package/dist/r/src/lib/accent-roles.ts +43 -29
- package/dist/r/src/lib/appearance-font-settings.ts +5 -5
- package/dist/r/src/lib/async-action.ts +72 -0
- package/dist/r/src/lib/breakpoints.ts +7 -0
- package/dist/r/src/lib/bytes.ts +20 -0
- package/dist/r/src/lib/clipboard.ts +43 -0
- package/dist/r/src/lib/events.ts +17 -0
- package/dist/r/src/lib/external-link.ts +42 -0
- package/dist/r/src/lib/font-catalog.ts +4 -6
- package/dist/r/src/lib/font-zoom.ts +9 -14
- package/dist/r/src/lib/overlay.ts +55 -18
- package/dist/r/src/lib/preference-store.ts +36 -34
- package/dist/r/src/lib/resize-separator.ts +36 -0
- package/dist/r/src/lib/safe-script.ts +19 -1
- package/dist/r/src/lib/scroll-geometry.ts +69 -0
- package/dist/r/src/lib/text.ts +49 -0
- package/dist/r/src/lib/theme-accents.ts +1 -1
- package/dist/r/src/lib/theme-catalogue.ts +3 -4
- package/dist/r/src/lib/theme-css.ts +33 -54
- package/dist/r/src/lib/theme-defaults.generated.ts +1 -1
- package/dist/r/src/lib/theme-defaults.ts +55 -7
- package/dist/r/src/lib/theme-engine-light.ts +88 -72
- package/dist/r/src/lib/theme-engine.ts +29 -33
- package/dist/r/src/lib/theme-records.ts +33 -69
- package/dist/r/src/lib/theme-types.ts +199 -0
- package/dist/r/src/lib/themes.ts +33 -196
- package/dist/r/src/lib/tokens.ts +0 -1
- package/dist/r/src/lib/url.ts +25 -0
- package/dist/r/src/lib/version-notes.ts +3 -9
- package/dist/r/src/styles/theme-variants.css +32 -32
- package/dist/r/src/styles/theme.css +17 -13
- package/dist/r/subagent.json +0 -2
- package/dist/r/suggestion.json +0 -1
- package/dist/r/theming.json +21 -21
- package/dist/r/top-bar.json +5 -0
- package/dist/r/trace.json +1 -0
- package/dist/r/update-dialog.json +5 -0
- package/package.json +22 -8
- package/registry.json +120 -46
- package/src/components/composites/about-dialog/about-dialog.tsx +22 -42
- package/src/components/composites/account-menu/account-menu.tsx +9 -35
- package/src/components/composites/action-button/action-button.tsx +5 -7
- package/src/components/composites/appearance-editor/accent-swatch-groups.tsx +3 -11
- package/src/components/composites/appearance-editor/appearance-choices.tsx +8 -5
- package/src/components/composites/appearance-editor/appearance-editor.tsx +8 -6
- package/src/components/composites/appearance-editor/appearance-rows.tsx +30 -82
- package/src/components/composites/appearance-editor/font-settings-group.tsx +11 -77
- package/src/components/composites/appearance-editor/index.ts +1 -0
- package/src/components/composites/catalog-browser/catalog-browser.tsx +9 -13
- package/src/components/composites/chain-of-thought/chain-of-thought.tsx +16 -18
- package/src/components/composites/chat/chat.tsx +2 -2
- package/src/components/composites/checkpoint/checkpoint-model.ts +3 -3
- package/src/components/composites/checkpoint/checkpoint.tsx +3 -3
- package/src/components/composites/confirmation/confirmation-model.ts +9 -17
- package/src/components/composites/confirmation/confirmation.tsx +2 -2
- package/src/components/composites/context/context-model.ts +1 -1
- package/src/components/composites/file-tree/build-file-tree.ts +21 -39
- package/src/components/composites/file-tree/file-tree.tsx +5 -58
- package/src/components/composites/file-tree/index.ts +1 -1
- package/src/components/composites/help-center/help-center.tsx +8 -21
- package/src/components/composites/icon-picker/icon-picker.tsx +10 -11
- package/src/components/composites/inline-citation/citation.ts +2 -1
- package/src/components/composites/inline-citation/inline-citation.tsx +3 -2
- package/src/components/composites/message-scroller/message-scroller.tsx +30 -30
- package/src/components/composites/message-scroller/scroll-anchor.ts +5 -5
- package/src/components/composites/model-selector/model-selector.tsx +3 -2
- package/src/components/composites/model-selector/models.ts +1 -1
- package/src/components/composites/plan/plan.tsx +1 -4
- package/src/components/composites/queue/queue.tsx +8 -11
- package/src/components/composites/reasoning/reasoning.tsx +5 -23
- package/src/components/composites/settings/settings-layout.tsx +3 -2
- package/src/components/composites/settings/settings-navigation.tsx +4 -1
- package/src/components/composites/sources/source.ts +7 -53
- package/src/components/composites/stack-trace/stack-trace.tsx +3 -12
- package/src/components/composites/subagent/subagent.tsx +7 -17
- package/src/components/composites/suggestion/suggestion.tsx +4 -3
- package/src/components/composites/task/task.tsx +21 -64
- package/src/components/composites/terminal/terminal-model.ts +4 -4
- package/src/components/composites/terminal/terminal.tsx +3 -12
- package/src/components/composites/test-results/test-results.tsx +3 -12
- package/src/components/composites/tool/tool.tsx +34 -40
- package/src/components/composites/tree/tree-navigation.ts +22 -2
- package/src/components/composites/tree/tree.tsx +47 -3
- package/src/components/composites/update-dialog/channel-control.tsx +10 -14
- package/src/components/composites/update-dialog/update-dialog.tsx +66 -200
- package/src/components/composites/update-dialog/update-model.ts +137 -0
- package/src/components/composites/workspace-mark/workspace-mark.tsx +1 -1
- package/src/components/composites/workspace-switcher/workspace-reorder-dialog.tsx +1 -18
- package/src/components/composites/workspace-switcher/workspace-switcher.tsx +16 -19
- package/src/components/conversation/busy-send-button.tsx +7 -34
- package/src/components/conversation/chat-composer.tsx +1 -1
- package/src/components/conversation/composer-core.ts +76 -0
- package/src/components/conversation/composer-menu.tsx +1 -1
- package/src/components/conversation/conversation-pane.tsx +4 -1
- package/src/components/conversation/conversation-surface.tsx +23 -10
- package/src/components/conversation/ime-guard.ts +6 -0
- package/src/components/conversation/internal/chat-composer-shell.tsx +24 -65
- package/src/components/conversation/message-composer.tsx +24 -54
- package/src/components/conversation/message-row.tsx +33 -47
- package/src/components/conversation/paste-token-editor.tsx +13 -16
- package/src/components/conversation/paste-tokens.ts +36 -1
- package/src/components/conversation/scroll-follow-core.ts +66 -137
- package/src/components/conversation/scroll-follow.ts +26 -67
- package/src/components/conversation/thread-panel.tsx +2 -4
- package/src/components/conversation/transcript-composition.tsx +9 -33
- package/src/components/conversation/transcript-folding.ts +2 -2
- package/src/components/conversation/transcript-grouping.ts +18 -3
- package/src/components/layout/contextual-sidebar/contextual-sidebar.tsx +80 -22
- package/src/components/layout/contextual-sidebar/index.ts +1 -0
- package/src/components/layout/contextual-sidebar/mobile-contextual-sidebar.tsx +1 -1
- package/src/components/layout/floating-preview/model.ts +57 -195
- package/src/components/layout/pixel-resize-handle/pixel-resize-handle.tsx +6 -12
- package/src/components/layout/shell-top-bar/shell-top-bar.tsx +47 -54
- package/src/components/layout/side-rail/side-rail-context.ts +1 -11
- package/src/components/layout/side-rail/side-rail.tsx +95 -107
- package/src/components/layout/sidebar-nav/index.ts +1 -2
- package/src/components/layout/sidebar-nav/sidebar-nav-classes.ts +15 -0
- package/src/components/layout/sidebar-nav/sidebar-nav-resize-handle.tsx +1 -4
- package/src/components/layout/sidebar-nav/sidebar-nav.tsx +9 -27
- package/src/components/layout/split-layout/geometry.ts +2 -9
- package/src/components/layout/split-layout/model.ts +3 -6
- package/src/components/layout/split-layout/resize-controller-core-retry.tsx +12 -6
- package/src/components/layout/split-layout/resize-controller-core.tsx +12 -6
- package/src/components/layout/split-layout/split-layout.tsx +46 -61
- package/src/components/layout/split-layout/tree.ts +5 -0
- package/src/components/layout/top-bar/top-bar.tsx +16 -38
- package/src/components/layout/top-bar/window-chrome.ts +23 -0
- package/src/components/motion/presence.tsx +1 -3
- package/src/components/theme/appearance-panel.tsx +28 -19
- package/src/components/theme/index.ts +1 -22
- package/src/components/theme/lazy.ts +36 -26
- package/src/components/theme/script-projection.ts +40 -0
- package/src/components/theme/theme-api.ts +30 -0
- package/src/components/theme/theme-catalogue-source.ts +3 -2
- package/src/components/theme/theme-document.ts +248 -23
- package/src/components/theme/theme-mode-toggle.tsx +1 -1
- package/src/components/theme/theme-persistence.ts +74 -130
- package/src/components/theme/theme-picker.tsx +2 -2
- package/src/components/theme/theme-provider-value.ts +64 -69
- package/src/components/theme/theme-provider.tsx +5 -24
- package/src/components/theme/theme-script.ts +100 -47
- package/src/components/theme/theme-state.ts +350 -10
- package/src/components/theme/theme-toggle.tsx +1 -1
- package/src/components/theme/token-projection-options.ts +14 -0
- package/src/components/theme/token-projection.ts +37 -0
- package/src/components/ui/alert-dialog/alert-dialog.tsx +43 -43
- package/src/components/ui/attachment/attachment.tsx +4 -17
- package/src/components/ui/avatar/avatar.tsx +3 -2
- package/src/components/ui/board/board.tsx +4 -10
- package/src/components/ui/button-group/button-group.tsx +1 -1
- package/src/components/ui/chart/chart.tsx +0 -3
- package/src/components/ui/code-block/code-block.tsx +7 -26
- package/src/components/ui/command/command.tsx +43 -39
- package/src/components/ui/context-menu/context-menu.tsx +18 -168
- package/src/components/ui/dialog/dialog-layer.tsx +266 -0
- package/src/components/ui/dialog/dialog.tsx +77 -271
- package/src/components/ui/drawer/drawer.tsx +5 -23
- package/src/components/ui/dropdown-menu/dropdown-menu.tsx +204 -226
- package/src/components/ui/dropdown-menu/menu-parts.tsx +220 -0
- package/src/components/ui/field/field.tsx +1 -1
- package/src/components/ui/field/number-field.tsx +1 -1
- package/src/components/ui/hover-card/hover-card.tsx +4 -11
- package/src/components/ui/menubar/menubar.tsx +36 -169
- package/src/components/ui/message/message.tsx +0 -1
- package/src/components/ui/message/parse-message-text.ts +80 -32
- package/src/components/ui/modal-dialog/modal-dialog.tsx +9 -39
- package/src/components/ui/navigation-menu/navigation-menu.tsx +0 -1
- package/src/components/ui/popover/popover.tsx +5 -11
- package/src/components/ui/resizable/resizable.tsx +6 -16
- package/src/components/ui/sheet/sheet.tsx +30 -42
- package/src/components/ui/text-link/index.ts +0 -1
- package/src/components/ui/toggle-group/toggle-group.tsx +3 -11
- package/src/components/ui/tooltip/tooltip.tsx +47 -26
- package/src/components/ui/trace/index.ts +7 -0
- package/src/components/ui/trace/trace.tsx +100 -9
- package/src/lib/accent-presets.ts +12 -8
- package/src/lib/accent-roles.ts +43 -29
- package/src/lib/appearance-font-settings.ts +5 -5
- package/src/lib/async-action.ts +72 -0
- package/src/lib/breakpoints.ts +7 -0
- package/src/lib/bytes.ts +20 -0
- package/src/lib/clipboard.ts +43 -0
- package/src/lib/events.ts +17 -0
- package/src/lib/external-link.ts +42 -0
- package/src/lib/font-catalog.ts +4 -6
- package/src/lib/font-zoom.ts +9 -14
- package/src/lib/overlay.ts +55 -18
- package/src/lib/preference-store.ts +36 -34
- package/src/lib/resize-separator.ts +36 -0
- package/src/lib/safe-script.ts +19 -1
- package/src/lib/scroll-geometry.ts +69 -0
- package/src/lib/text.ts +49 -0
- package/src/lib/theme-accents.ts +1 -1
- package/src/lib/theme-catalogue.ts +3 -4
- package/src/lib/theme-css.ts +33 -54
- package/src/lib/theme-defaults.generated.ts +1 -1
- package/src/lib/theme-defaults.ts +55 -7
- package/src/lib/theme-engine-light.ts +88 -72
- package/src/lib/theme-engine.ts +29 -33
- package/src/lib/theme-records.ts +33 -69
- package/src/lib/theme-types.ts +199 -0
- package/src/lib/themes.ts +33 -196
- package/src/lib/tokens.ts +0 -1
- package/src/lib/url.ts +25 -0
- package/src/lib/version-notes.ts +3 -9
- package/src/styles/theme-variants.css +32 -32
- package/src/styles/theme.css +17 -13
- package/dist/components/conversation/paste-preview.d.ts +0 -11
- package/dist/components/conversation/paste-preview.d.ts.map +0 -1
- package/dist/components/conversation/paste-preview.js +0 -27
- package/dist/components/conversation/paste-preview.js.map +0 -1
- package/dist/components/theme/theme-document-core.d.ts +0 -123
- package/dist/components/theme/theme-document-core.d.ts.map +0 -1
- package/dist/components/theme/theme-document-core.js.map +0 -1
- package/dist/components/theme/theme-provider-core.d.ts +0 -19
- package/dist/components/theme/theme-provider-core.d.ts.map +0 -1
- package/dist/components/theme/theme-provider-core.js +0 -27
- package/dist/components/theme/theme-provider-core.js.map +0 -1
- package/dist/components/theme/theme-provider-lazy.d.ts +0 -28
- package/dist/components/theme/theme-provider-lazy.d.ts.map +0 -1
- package/dist/components/theme/theme-provider-lazy.js +0 -35
- package/dist/components/theme/theme-provider-lazy.js.map +0 -1
- package/dist/components/theme/theme-state-core.d.ts +0 -248
- package/dist/components/theme/theme-state-core.d.ts.map +0 -1
- package/dist/components/theme/theme-state-core.js.map +0 -1
- package/dist/r/src/components/conversation/paste-preview.ts +0 -35
- package/dist/r/src/components/theme/theme-document-core.ts +0 -262
- package/dist/r/src/components/theme/theme-provider-core.tsx +0 -40
- package/dist/r/src/components/theme/theme-provider-lazy.tsx +0 -34
- package/dist/r/src/components/theme/theme-state-core.ts +0 -364
- package/src/components/conversation/paste-preview.ts +0 -35
- package/src/components/theme/theme-document-core.ts +0 -262
- package/src/components/theme/theme-provider-core.tsx +0 -40
- package/src/components/theme/theme-provider-lazy.tsx +0 -34
- package/src/components/theme/theme-state-core.ts +0 -364
|
@@ -1,16 +1,248 @@
|
|
|
1
|
-
import type
|
|
2
|
-
import type {
|
|
3
|
-
import { type
|
|
4
|
-
|
|
1
|
+
import { type AppearanceEditorFontSettings } from '#lib/appearance-font-settings';
|
|
2
|
+
import type { AccentPreset } from '@adea-ai/themes';
|
|
3
|
+
import { type AccentRoles } from '#lib/accent-roles';
|
|
4
|
+
import { type FontZoomIntent } from '#lib/font-zoom';
|
|
5
|
+
import type { ThemeSurface } from '#lib/theme-surface';
|
|
6
|
+
import type { ThemeEngine } from '#lib/theme-engine';
|
|
7
|
+
import type { ThemeAppearance, ThemeVariant } from '#lib/theme-types';
|
|
5
8
|
/**
|
|
6
|
-
* The
|
|
7
|
-
*
|
|
9
|
+
* The pure half of the theme provider: what a selection is, how two selections
|
|
10
|
+
* merge, and what a selection resolves to.
|
|
11
|
+
*
|
|
12
|
+
* Nothing here touches the document, storage or a signal, so each rule can be
|
|
13
|
+
* tested by calling it. `ThemeProvider` owns the reactivity and wires these to it;
|
|
14
|
+
* `theme-document.ts` owns the writes; `theme-persistence.ts` owns the store. Every
|
|
15
|
+
* question only the catalogue can answer goes through the {@link ThemeEngine} a caller
|
|
16
|
+
* passes, so nothing here imports the catalogue.
|
|
17
|
+
*/
|
|
18
|
+
/**
|
|
19
|
+
* Four independent choices, and keeping them independent is the point:
|
|
20
|
+
*
|
|
21
|
+
* - **appearance** — light, dark, or follow the system.
|
|
22
|
+
* - **a theme per appearance** — so a user can run Catppuccin Mocha by night and
|
|
23
|
+
* Solarized Light by day without re-choosing when the system flips.
|
|
24
|
+
* - **an accent** — adea's six presets, or one of the accents the selected theme
|
|
25
|
+
* pair carries itself (`ansi-blue`…), which re-colour the interactive roles on
|
|
26
|
+
* top of whichever theme is active.
|
|
27
|
+
* - **fonts** — separate family and size choices for UI, content and code.
|
|
28
|
+
*/
|
|
29
|
+
export type ThemeSelection = {
|
|
30
|
+
/** `system` follows `prefers-color-scheme` and updates when it changes. */
|
|
31
|
+
appearance: ThemeAppearance | 'system';
|
|
32
|
+
/** The variant to use when the resolved appearance is light. */
|
|
33
|
+
lightThemeId: string;
|
|
34
|
+
/** The variant to use when the resolved appearance is dark. */
|
|
35
|
+
darkThemeId: string;
|
|
36
|
+
/**
|
|
37
|
+
* An `accentPresets` id, a theme accent id from `themeAccents()` (`ansi-blue`…),
|
|
38
|
+
* `theme` for the variant's own primary, or a custom colour as `#rrggbb`. A theme
|
|
39
|
+
* accent the current pair does not offer falls back to the variant's own primary.
|
|
40
|
+
*
|
|
41
|
+
* A custom colour is stored lower case and is raised to the contrast floor when it
|
|
42
|
+
* is painted, never when it is stored: the selection keeps what the user chose.
|
|
43
|
+
* Anything else that is not an id is dropped at paint, not rejected here.
|
|
44
|
+
*/
|
|
45
|
+
accent: string;
|
|
46
|
+
/** UI-family alias for consumers of the original single-font preference. */
|
|
47
|
+
font: string;
|
|
48
|
+
/** UI, content and code font settings. Omitted legacy records are migrated from `font`. */
|
|
49
|
+
fonts?: AppearanceEditorFontSettings;
|
|
50
|
+
/**
|
|
51
|
+
* `comfortable` is the system's default geometry; `compact` moves the control
|
|
52
|
+
* ladder down one rung.
|
|
53
|
+
*
|
|
54
|
+
* Optional, and defaulted on read, so a preference stored before density existed
|
|
55
|
+
* keeps working and `ThemeSelection` stays assignable without it.
|
|
56
|
+
*/
|
|
57
|
+
density?: ThemeDensity;
|
|
58
|
+
/**
|
|
59
|
+
* The terminal either follows the interface theme (`theme`, or absent) or is pinned
|
|
60
|
+
* to another theme's terminal palette by that theme's id. The pin is written over
|
|
61
|
+
* the interface variant's own `--terminal-*` properties, so a light interface can
|
|
62
|
+
* carry a dark terminal.
|
|
63
|
+
*
|
|
64
|
+
* An id the registry does not hold paints the interface palette and stays in the
|
|
65
|
+
* selection, the same rule as an unknown theme id.
|
|
66
|
+
*
|
|
67
|
+
* Optional and not defaulted: see {@link defaultThemeSelection}.
|
|
68
|
+
*/
|
|
69
|
+
terminalThemeId?: string;
|
|
70
|
+
/**
|
|
71
|
+
* How opaque elevated panels are. Written to `<html>` only when the provider's
|
|
72
|
+
* `surface` prop is on or this is set; absent, a host paints no surface axis at
|
|
73
|
+
* all. Resolved against the OS and the host's capability before it is painted —
|
|
74
|
+
* see `resolveSurface` — so the value stored is a preference, never the outcome.
|
|
75
|
+
*/
|
|
76
|
+
surface?: ThemeSurface;
|
|
77
|
+
/**
|
|
78
|
+
* The user's own Reduce Transparency switch, which forces the `opaque` surface the
|
|
79
|
+
* same way the operating system's setting does.
|
|
80
|
+
*/
|
|
81
|
+
reduceTransparency?: boolean;
|
|
82
|
+
};
|
|
83
|
+
/**
|
|
84
|
+
* The two density rungs.
|
|
85
|
+
*
|
|
86
|
+
* `comfortable` is the geometry in `theme.css`, so it is the absence of an
|
|
87
|
+
* attribute rather than a value: a document that ships no `data-density` at all
|
|
88
|
+
* renders correctly, which is what keeps this additive.
|
|
89
|
+
*/
|
|
90
|
+
export type ThemeDensity = 'comfortable' | 'compact';
|
|
91
|
+
/**
|
|
92
|
+
* Deliberately lists only the fields every consumer has always had. A field added
|
|
93
|
+
* to {@link ThemeSelection} later gets no default here: `JSON.stringify` drops an
|
|
94
|
+
* `undefined`, so a store written by a consumer that never sets the field stays
|
|
95
|
+
* byte-identical to what it was before the field existed.
|
|
96
|
+
*/
|
|
97
|
+
export declare const defaultThemeSelection: ThemeSelection;
|
|
98
|
+
/**
|
|
99
|
+
* A stored selection's density, defaulted.
|
|
100
|
+
*
|
|
101
|
+
* The stored value is read through here rather than trusted, because a preference
|
|
102
|
+
* written before density existed has no `density` key and a hand-edited store may
|
|
103
|
+
* hold anything.
|
|
104
|
+
*/
|
|
105
|
+
export declare function resolvedDensity(selection: ThemeSelection): ThemeDensity;
|
|
106
|
+
export type ThemeContextValue = {
|
|
107
|
+
/** The preference as stored. A {@link ThemeContextValue.preview} does not change it. */
|
|
108
|
+
selection: () => ThemeSelection;
|
|
109
|
+
/** What the preference resolves to right now, after `system`. */
|
|
110
|
+
resolvedAppearance: () => ThemeAppearance;
|
|
111
|
+
/**
|
|
112
|
+
* The appearance currently shown by the provider, including an active preview.
|
|
113
|
+
* Optional for compatibility with values supplied by an older copy of the UI
|
|
114
|
+
* package or by a host-owned context mock; providers always expose it.
|
|
115
|
+
*/
|
|
116
|
+
shownAppearance?: () => ThemeAppearance;
|
|
117
|
+
/** The variant in use. */
|
|
118
|
+
variant: () => ThemeVariant;
|
|
119
|
+
/** Update part of the preference. */
|
|
120
|
+
setSelection: (patch: Partial<ThemeSelection>) => void;
|
|
121
|
+
/**
|
|
122
|
+
* The built-in catalogue, so a picker does not import it separately. A plain
|
|
123
|
+
* array: {@link ThemeContextValue.allThemes} is the one that follows a host's
|
|
124
|
+
* extra themes. Under the lazy provider it holds only the default pair until
|
|
125
|
+
* {@link ThemeContextValue.catalogueReady}; read it again afterwards.
|
|
126
|
+
*/
|
|
127
|
+
themes: readonly ThemeVariant[];
|
|
128
|
+
/**
|
|
129
|
+
* The accents the selected light/dark pair carries, offered beside the presets.
|
|
130
|
+
* Follows the selection: a different theme pair may offer different slots.
|
|
131
|
+
*/
|
|
132
|
+
themeAccents: () => readonly AccentPreset[];
|
|
133
|
+
/**
|
|
134
|
+
* The built-in catalogue followed by the provider's `themes` prop. Reactive when
|
|
135
|
+
* that prop is a function that reads signals.
|
|
136
|
+
*/
|
|
137
|
+
allThemes: () => readonly ThemeVariant[];
|
|
138
|
+
/**
|
|
139
|
+
* Paint the document from `draft` laid over the stored selection, without
|
|
140
|
+
* persisting it or changing what {@link ThemeContextValue.selection} returns.
|
|
141
|
+
* `undefined` ends the preview. A {@link ThemeContextValue.setSelection} ends it
|
|
142
|
+
* too, because the committed selection is then what should be showing.
|
|
143
|
+
*/
|
|
144
|
+
preview: (draft: Partial<ThemeSelection> | undefined) => void;
|
|
145
|
+
/** True while a {@link ThemeContextValue.preview} draft is on the document. */
|
|
146
|
+
previewing: () => boolean;
|
|
147
|
+
/**
|
|
148
|
+
* The roles `accent` paints over `variantId` (default: the variant in use), held
|
|
149
|
+
* to the provider's `accentContrastFloor`, for an element-scoped override with
|
|
150
|
+
* `paintAccentRoles` — a workspace that carries its own colour. `undefined` for
|
|
151
|
+
* `null`, for `theme`, for an id that resolves to nothing, and for a variant the
|
|
152
|
+
* registry does not hold: each means "keep the inherited accent".
|
|
153
|
+
*/
|
|
154
|
+
accentRolesFor: (accent: string | null, variantId?: string) => AccentRoles | undefined;
|
|
155
|
+
/**
|
|
156
|
+
* The surface the committed selection paints, after Reduce Transparency and the
|
|
157
|
+
* host's translucency capability. `opaque` when the axis is off. Follows the
|
|
158
|
+
* committed selection, not a preview, like {@link ThemeContextValue.variant}.
|
|
159
|
+
*/
|
|
160
|
+
effectiveSurface: () => ThemeSurface;
|
|
161
|
+
/**
|
|
162
|
+
* True while the operating system or the selection's `reduceTransparency` forces
|
|
163
|
+
* opaque surfaces. Always false when the surface axis is off, because nothing is
|
|
164
|
+
* then listening to the operating system.
|
|
165
|
+
*/
|
|
166
|
+
reduceTransparencyActive: () => boolean;
|
|
167
|
+
/**
|
|
168
|
+
* Step the three text sizes together, or put them back to the defaults: what the
|
|
169
|
+
* `fontZoom` prop's chords do, for a host that binds its own keys or a menu. Goes
|
|
170
|
+
* through {@link ThemeContextValue.setSelection}, so it persists and ends a preview.
|
|
171
|
+
*/
|
|
172
|
+
zoomFonts: (intent: FontZoomIntent) => void;
|
|
173
|
+
/**
|
|
174
|
+
* True when `themes`, `allThemes()` and the variants they resolve are backed by the
|
|
175
|
+
* whole catalogue. Always true under `ThemeProvider`. Under the lazy provider
|
|
176
|
+
* (`@adea-ai/ui/components/theme/lazy`) it turns true once the catalogue has loaded,
|
|
177
|
+
* and until then only the default light and dark themes are available: a stored
|
|
178
|
+
* theme beyond them resolves to its appearance's default (the document keeps painting
|
|
179
|
+
* what the stylesheet gave it) until `catalogueReady()` is true. Absent on a context
|
|
180
|
+
* a host builds itself, where it should be read as true.
|
|
181
|
+
*/
|
|
182
|
+
catalogueReady?: () => boolean;
|
|
183
|
+
/**
|
|
184
|
+
* Start loading the whole catalogue (idempotent) and resolve when it is available.
|
|
185
|
+
* `AppearancePanel` calls it when it mounts; a host's own picker or settings page
|
|
186
|
+
* should too. A no-op under `ThemeProvider`, whose catalogue is already loaded.
|
|
187
|
+
*/
|
|
188
|
+
loadCatalogue?: () => Promise<void>;
|
|
189
|
+
};
|
|
190
|
+
/** Keep the deprecated single-font view synchronized with the UI axis. */
|
|
191
|
+
export declare function mergeThemeSelection(base: ThemeSelection, patch: Partial<ThemeSelection>): ThemeSelection;
|
|
192
|
+
/**
|
|
193
|
+
* The selection a provider starts from: the defaults, then whatever the store
|
|
194
|
+
* returned, then `initial`.
|
|
195
|
+
*
|
|
196
|
+
* `initial` wins over the store on every mount. That precedence is part of the
|
|
197
|
+
* contract Cortana relies on (its `initial` pins `appearance` and `font`), and it
|
|
198
|
+
* is why the store's answer is only the middle layer. A store that returned
|
|
199
|
+
* nothing, or threw, or answered with explicit `undefined`s, leaves the defaults
|
|
200
|
+
* standing for those fields.
|
|
201
|
+
*/
|
|
202
|
+
export declare function initialThemeSelection(stored: Partial<ThemeSelection> | undefined, initial: Partial<ThemeSelection> | undefined): ThemeSelection;
|
|
203
|
+
/** `system` resolved against what the operating system reports. */
|
|
204
|
+
export declare function resolveAppearance(preference: ThemeSelection['appearance'], system: ThemeAppearance): ThemeAppearance;
|
|
205
|
+
/** The theme id the selection names for a resolved appearance. */
|
|
206
|
+
export declare function selectedThemeId(selection: ThemeSelection, appearance: ThemeAppearance): string;
|
|
207
|
+
/**
|
|
208
|
+
* What a selection paints: the resolved appearance and the variant for it.
|
|
209
|
+
*
|
|
210
|
+
* An id the registry does not hold resolves to the appearance's default rather than
|
|
211
|
+
* being rewritten (see `resolveVariant`), so the selection a host stores is never
|
|
212
|
+
* changed by being unresolvable.
|
|
213
|
+
*/
|
|
214
|
+
export declare function resolveThemeState(selection: ThemeSelection, system: ThemeAppearance, registry: readonly ThemeVariant[]): {
|
|
215
|
+
appearance: ThemeAppearance;
|
|
216
|
+
variant: ThemeVariant;
|
|
217
|
+
};
|
|
218
|
+
/**
|
|
219
|
+
* The variant whose terminal palette is pinned, or `undefined` when the terminal
|
|
220
|
+
* follows the interface theme.
|
|
221
|
+
*
|
|
222
|
+
* `theme`, an absent id and an id the registry does not hold all mean the interface
|
|
223
|
+
* palette: a terminal must never resolve to a blank or half-painted palette because a
|
|
224
|
+
* theme was deleted after it was pinned.
|
|
225
|
+
*/
|
|
226
|
+
export declare function resolveTerminalVariant(terminalThemeId: string | undefined, registry: readonly ThemeVariant[]): ThemeVariant | undefined;
|
|
227
|
+
/**
|
|
228
|
+
* The font settings a zoom chord asks for: one pixel up or down on every axis, or
|
|
229
|
+
* the defaults for `reset`.
|
|
230
|
+
*/
|
|
231
|
+
export declare function zoomedFontSettings(selection: ThemeSelection, intent: FontZoomIntent): AppearanceEditorFontSettings;
|
|
232
|
+
/**
|
|
233
|
+
* The registry a provider resolves against: the catalogue, then the host's extras.
|
|
234
|
+
*
|
|
235
|
+
* The catalogue wins an id collision, because it is listed first and `resolveVariant`
|
|
236
|
+
* takes the first match: a host's variant can add a theme but cannot shadow one.
|
|
237
|
+
*/
|
|
238
|
+
export declare function mergeRegistry(builtin: readonly ThemeVariant[], extra: readonly ThemeVariant[] | undefined): readonly ThemeVariant[];
|
|
239
|
+
/**
|
|
240
|
+
* The roles an accent paints over a variant, for {@link ThemeContextValue.accentRolesFor}.
|
|
8
241
|
*
|
|
9
242
|
* Resolved against the committed selection's theme pair, so an `ansi-*` accent means
|
|
10
|
-
* the same colour here as it does on `<html>`.
|
|
11
|
-
* {@link accentRolesForStateWith} with the engine it has.
|
|
243
|
+
* the same colour here as it does on `<html>`.
|
|
12
244
|
*/
|
|
13
|
-
export declare function accentRolesForState(accent: string | null, variantId: string | undefined, state: {
|
|
245
|
+
export declare function accentRolesForState(engine: Pick<ThemeEngine, 'accentRolesForSelection'>, accent: string | null, variantId: string | undefined, state: {
|
|
14
246
|
selection: ThemeSelection;
|
|
15
247
|
variant: ThemeVariant;
|
|
16
248
|
registry: readonly ThemeVariant[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme-state.d.ts","sourceRoot":"","sources":["../../../src/components/theme/theme-state.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"theme-state.d.ts","sourceRoot":"","sources":["../../../src/components/theme/theme-state.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,4BAA4B,EAClC,MAAM,+BAA+B,CAAA;AACtC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AACnD,OAAO,EAAyB,KAAK,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAC3E,OAAO,EAA2B,KAAK,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAE7E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAEtD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AACpD,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA;AAErE;;;;;;;;;GASG;AAEH;;;;;;;;;;GAUG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B,2EAA2E;IAC3E,UAAU,EAAE,eAAe,GAAG,QAAQ,CAAA;IACtC,gEAAgE;IAChE,YAAY,EAAE,MAAM,CAAA;IACpB,+DAA+D;IAC/D,WAAW,EAAE,MAAM,CAAA;IACnB;;;;;;;;OAQG;IACH,MAAM,EAAE,MAAM,CAAA;IACd,4EAA4E;IAC5E,IAAI,EAAE,MAAM,CAAA;IACZ,2FAA2F;IAC3F,KAAK,CAAC,EAAE,4BAA4B,CAAA;IACpC;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,YAAY,CAAA;IACtB;;;;;;;;;;OAUG;IACH,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB;;;;;OAKG;IACH,OAAO,CAAC,EAAE,YAAY,CAAA;IACtB;;;OAGG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAA;CAC7B,CAAA;AAED;;;;;;GAMG;AACH,MAAM,MAAM,YAAY,GAAG,aAAa,GAAG,SAAS,CAAA;AAEpD;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,EAAE,cAOnC,CAAA;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,SAAS,EAAE,cAAc,GAAG,YAAY,CAEvE;AAED,MAAM,MAAM,iBAAiB,GAAG;IAC9B,wFAAwF;IACxF,SAAS,EAAE,MAAM,cAAc,CAAA;IAC/B,iEAAiE;IACjE,kBAAkB,EAAE,MAAM,eAAe,CAAA;IACzC;;;;OAIG;IACH,eAAe,CAAC,EAAE,MAAM,eAAe,CAAA;IACvC,0BAA0B;IAC1B,OAAO,EAAE,MAAM,YAAY,CAAA;IAC3B,qCAAqC;IACrC,YAAY,EAAE,CAAC,KAAK,EAAE,OAAO,CAAC,cAAc,CAAC,KAAK,IAAI,CAAA;IACtD;;;;;OAKG;IACH,MAAM,EAAE,SAAS,YAAY,EAAE,CAAA;IAC/B;;;OAGG;IACH,YAAY,EAAE,MAAM,SAAS,YAAY,EAAE,CAAA;IAC3C;;;OAGG;IACH,SAAS,EAAE,MAAM,SAAS,YAAY,EAAE,CAAA;IACxC;;;;;OAKG;IACH,OAAO,EAAE,CAAC,KAAK,EAAE,OAAO,CAAC,cAAc,CAAC,GAAG,SAAS,KAAK,IAAI,CAAA;IAC7D,+EAA+E;IAC/E,UAAU,EAAE,MAAM,OAAO,CAAA;IACzB;;;;;;OAMG;IACH,cAAc,EAAE,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,EAAE,SAAS,CAAC,EAAE,MAAM,KAAK,WAAW,GAAG,SAAS,CAAA;IACtF;;;;OAIG;IACH,gBAAgB,EAAE,MAAM,YAAY,CAAA;IACpC;;;;OAIG;IACH,wBAAwB,EAAE,MAAM,OAAO,CAAA;IACvC;;;;OAIG;IACH,SAAS,EAAE,CAAC,MAAM,EAAE,cAAc,KAAK,IAAI,CAAA;IAC3C;;;;;;;;OAQG;IACH,cAAc,CAAC,EAAE,MAAM,OAAO,CAAA;IAC9B;;;;OAIG;IACH,aAAa,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;CACpC,CAAA;AASD,0EAA0E;AAC1E,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,cAAc,EACpB,KAAK,EAAE,OAAO,CAAC,cAAc,CAAC,GAC7B,cAAc,CAuBhB;AAED;;;;;;;;;GASG;AACH,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,OAAO,CAAC,cAAc,CAAC,GAAG,SAAS,EAC3C,OAAO,EAAE,OAAO,CAAC,cAAc,CAAC,GAAG,SAAS,GAC3C,cAAc,CAGhB;AAED,mEAAmE;AACnE,wBAAgB,iBAAiB,CAC/B,UAAU,EAAE,cAAc,CAAC,YAAY,CAAC,EACxC,MAAM,EAAE,eAAe,GACtB,eAAe,CAEjB;AAED,kEAAkE;AAClE,wBAAgB,eAAe,CAAC,SAAS,EAAE,cAAc,EAAE,UAAU,EAAE,eAAe,GAAG,MAAM,CAE9F;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAC/B,SAAS,EAAE,cAAc,EACzB,MAAM,EAAE,eAAe,EACvB,QAAQ,EAAE,SAAS,YAAY,EAAE,GAChC;IAAE,UAAU,EAAE,eAAe,CAAC;IAAC,OAAO,EAAE,YAAY,CAAA;CAAE,CAMxD;AAED;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CACpC,eAAe,EAAE,MAAM,GAAG,SAAS,EACnC,QAAQ,EAAE,SAAS,YAAY,EAAE,GAChC,YAAY,GAAG,SAAS,CAG1B;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAChC,SAAS,EAAE,cAAc,EACzB,MAAM,EAAE,cAAc,GACrB,4BAA4B,CAG9B;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAC3B,OAAO,EAAE,SAAS,YAAY,EAAE,EAChC,KAAK,EAAE,SAAS,YAAY,EAAE,GAAG,SAAS,GACzC,SAAS,YAAY,EAAE,CAEzB;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,IAAI,CAAC,WAAW,EAAE,yBAAyB,CAAC,EACpD,MAAM,EAAE,MAAM,GAAG,IAAI,EACrB,SAAS,EAAE,MAAM,GAAG,SAAS,EAC7B,KAAK,EAAE;IACL,SAAS,EAAE,cAAc,CAAA;IACzB,OAAO,EAAE,YAAY,CAAA;IACrB,QAAQ,EAAE,SAAS,YAAY,EAAE,CAAA;IACjC,mBAAmB,CAAC,EAAE,MAAM,CAAA;CAC7B,GACA,WAAW,GAAG,SAAS,CAYzB"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { DEFAULT_APPEARANCE_EDITOR_FONT_SETTINGS, normalizeAppearanceEditorFontSettings } from "../../lib/appearance-font-settings.js";
|
|
2
2
|
import { normalizeCustomAccent } from "../../lib/accent-roles.js";
|
|
3
3
|
import { stepAppearanceFontSizes } from "../../lib/font-zoom.js";
|
|
4
|
-
import {
|
|
5
|
-
|
|
4
|
+
import { DEFAULT_FONT_ID } from "../../lib/font-catalog.js";
|
|
5
|
+
import { THEME_DEFAULT_ID, defaultThemePair, resolveVariant } from "../../lib/theme-defaults.js";
|
|
6
|
+
// src/components/theme/theme-state.ts
|
|
6
7
|
/**
|
|
7
8
|
* Deliberately lists only the fields every consumer has always had. A field added
|
|
8
9
|
* to {@link ThemeSelection} later gets no default here: `JSON.stringify` drops an
|
|
@@ -11,10 +12,9 @@ import { defaultDarkThemeId, defaultLightThemeId, resolveVariant } from "../../l
|
|
|
11
12
|
*/
|
|
12
13
|
var defaultThemeSelection = {
|
|
13
14
|
appearance: "system",
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
font: "system",
|
|
15
|
+
...defaultThemePair,
|
|
16
|
+
accent: THEME_DEFAULT_ID,
|
|
17
|
+
font: DEFAULT_FONT_ID,
|
|
18
18
|
fonts: DEFAULT_APPEARANCE_EDITOR_FONT_SETTINGS,
|
|
19
19
|
density: "comfortable"
|
|
20
20
|
};
|
|
@@ -125,10 +125,9 @@ function mergeRegistry(builtin, extra) {
|
|
|
125
125
|
* The roles an accent paints over a variant, for {@link ThemeContextValue.accentRolesFor}.
|
|
126
126
|
*
|
|
127
127
|
* Resolved against the committed selection's theme pair, so an `ansi-*` accent means
|
|
128
|
-
* the same colour here as it does on `<html>`.
|
|
129
|
-
* questions; `theme-state.ts` binds the full catalogue for callers that have none.
|
|
128
|
+
* the same colour here as it does on `<html>`.
|
|
130
129
|
*/
|
|
131
|
-
function
|
|
130
|
+
function accentRolesForState(engine, accent, variantId, state) {
|
|
132
131
|
if (accent === null) return void 0;
|
|
133
132
|
const variant = variantId === void 0 ? state.variant : state.registry.find((candidate) => candidate.id === variantId);
|
|
134
133
|
if (!variant) return void 0;
|
|
@@ -138,6 +137,6 @@ function accentRolesForStateWith(engine, accent, variantId, state) {
|
|
|
138
137
|
variantId: variant.id
|
|
139
138
|
});
|
|
140
139
|
}
|
|
141
|
-
export {
|
|
140
|
+
export { accentRolesForState, defaultThemeSelection, initialThemeSelection, mergeRegistry, mergeThemeSelection, resolveAppearance, resolveTerminalVariant, resolveThemeState, resolvedDensity, selectedThemeId, zoomedFontSettings };
|
|
142
141
|
|
|
143
|
-
//# sourceMappingURL=theme-state
|
|
142
|
+
//# sourceMappingURL=theme-state.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"theme-state.js","names":[],"sources":["../../../src/components/theme/theme-state.ts"],"sourcesContent":["import {\n DEFAULT_APPEARANCE_EDITOR_FONT_SETTINGS,\n normalizeAppearanceEditorFontSettings,\n type AppearanceEditorFontSettings,\n} from '#lib/appearance-font-settings'\nimport type { AccentPreset } from '@adea-ai/themes'\nimport { normalizeCustomAccent, type AccentRoles } from '#lib/accent-roles'\nimport { stepAppearanceFontSizes, type FontZoomIntent } from '#lib/font-zoom'\nimport { DEFAULT_FONT_ID } from '#lib/font-catalog'\nimport type { ThemeSurface } from '#lib/theme-surface'\nimport { THEME_DEFAULT_ID, defaultThemePair, resolveVariant } from '#lib/theme-defaults'\nimport type { ThemeEngine } from '#lib/theme-engine'\nimport type { ThemeAppearance, ThemeVariant } from '#lib/theme-types'\n\n/**\n * The pure half of the theme provider: what a selection is, how two selections\n * merge, and what a selection resolves to.\n *\n * Nothing here touches the document, storage or a signal, so each rule can be\n * tested by calling it. `ThemeProvider` owns the reactivity and wires these to it;\n * `theme-document.ts` owns the writes; `theme-persistence.ts` owns the store. Every\n * question only the catalogue can answer goes through the {@link ThemeEngine} a caller\n * passes, so nothing here imports the catalogue.\n */\n\n/**\n * Four independent choices, and keeping them independent is the point:\n *\n * - **appearance** — light, dark, or follow the system.\n * - **a theme per appearance** — so a user can run Catppuccin Mocha by night and\n * Solarized Light by day without re-choosing when the system flips.\n * - **an accent** — adea's six presets, or one of the accents the selected theme\n * pair carries itself (`ansi-blue`…), which re-colour the interactive roles on\n * top of whichever theme is active.\n * - **fonts** — separate family and size choices for UI, content and code.\n */\nexport type ThemeSelection = {\n /** `system` follows `prefers-color-scheme` and updates when it changes. */\n appearance: ThemeAppearance | 'system'\n /** The variant to use when the resolved appearance is light. */\n lightThemeId: string\n /** The variant to use when the resolved appearance is dark. */\n darkThemeId: string\n /**\n * An `accentPresets` id, a theme accent id from `themeAccents()` (`ansi-blue`…),\n * `theme` for the variant's own primary, or a custom colour as `#rrggbb`. A theme\n * accent the current pair does not offer falls back to the variant's own primary.\n *\n * A custom colour is stored lower case and is raised to the contrast floor when it\n * is painted, never when it is stored: the selection keeps what the user chose.\n * Anything else that is not an id is dropped at paint, not rejected here.\n */\n accent: string\n /** UI-family alias for consumers of the original single-font preference. */\n font: string\n /** UI, content and code font settings. Omitted legacy records are migrated from `font`. */\n fonts?: AppearanceEditorFontSettings\n /**\n * `comfortable` is the system's default geometry; `compact` moves the control\n * ladder down one rung.\n *\n * Optional, and defaulted on read, so a preference stored before density existed\n * keeps working and `ThemeSelection` stays assignable without it.\n */\n density?: ThemeDensity\n /**\n * The terminal either follows the interface theme (`theme`, or absent) or is pinned\n * to another theme's terminal palette by that theme's id. The pin is written over\n * the interface variant's own `--terminal-*` properties, so a light interface can\n * carry a dark terminal.\n *\n * An id the registry does not hold paints the interface palette and stays in the\n * selection, the same rule as an unknown theme id.\n *\n * Optional and not defaulted: see {@link defaultThemeSelection}.\n */\n terminalThemeId?: string\n /**\n * How opaque elevated panels are. Written to `<html>` only when the provider's\n * `surface` prop is on or this is set; absent, a host paints no surface axis at\n * all. Resolved against the OS and the host's capability before it is painted —\n * see `resolveSurface` — so the value stored is a preference, never the outcome.\n */\n surface?: ThemeSurface\n /**\n * The user's own Reduce Transparency switch, which forces the `opaque` surface the\n * same way the operating system's setting does.\n */\n reduceTransparency?: boolean\n}\n\n/**\n * The two density rungs.\n *\n * `comfortable` is the geometry in `theme.css`, so it is the absence of an\n * attribute rather than a value: a document that ships no `data-density` at all\n * renders correctly, which is what keeps this additive.\n */\nexport type ThemeDensity = 'comfortable' | 'compact'\n\n/**\n * Deliberately lists only the fields every consumer has always had. A field added\n * to {@link ThemeSelection} later gets no default here: `JSON.stringify` drops an\n * `undefined`, so a store written by a consumer that never sets the field stays\n * byte-identical to what it was before the field existed.\n */\nexport const defaultThemeSelection: ThemeSelection = {\n appearance: 'system',\n ...defaultThemePair,\n accent: THEME_DEFAULT_ID,\n font: DEFAULT_FONT_ID,\n fonts: DEFAULT_APPEARANCE_EDITOR_FONT_SETTINGS,\n density: 'comfortable',\n}\n\n/**\n * A stored selection's density, defaulted.\n *\n * The stored value is read through here rather than trusted, because a preference\n * written before density existed has no `density` key and a hand-edited store may\n * hold anything.\n */\nexport function resolvedDensity(selection: ThemeSelection): ThemeDensity {\n return selection.density === 'compact' ? 'compact' : 'comfortable'\n}\n\nexport type ThemeContextValue = {\n /** The preference as stored. A {@link ThemeContextValue.preview} does not change it. */\n selection: () => ThemeSelection\n /** What the preference resolves to right now, after `system`. */\n resolvedAppearance: () => ThemeAppearance\n /**\n * The appearance currently shown by the provider, including an active preview.\n * Optional for compatibility with values supplied by an older copy of the UI\n * package or by a host-owned context mock; providers always expose it.\n */\n shownAppearance?: () => ThemeAppearance\n /** The variant in use. */\n variant: () => ThemeVariant\n /** Update part of the preference. */\n setSelection: (patch: Partial<ThemeSelection>) => void\n /**\n * The built-in catalogue, so a picker does not import it separately. A plain\n * array: {@link ThemeContextValue.allThemes} is the one that follows a host's\n * extra themes. Under the lazy provider it holds only the default pair until\n * {@link ThemeContextValue.catalogueReady}; read it again afterwards.\n */\n themes: readonly ThemeVariant[]\n /**\n * The accents the selected light/dark pair carries, offered beside the presets.\n * Follows the selection: a different theme pair may offer different slots.\n */\n themeAccents: () => readonly AccentPreset[]\n /**\n * The built-in catalogue followed by the provider's `themes` prop. Reactive when\n * that prop is a function that reads signals.\n */\n allThemes: () => readonly ThemeVariant[]\n /**\n * Paint the document from `draft` laid over the stored selection, without\n * persisting it or changing what {@link ThemeContextValue.selection} returns.\n * `undefined` ends the preview. A {@link ThemeContextValue.setSelection} ends it\n * too, because the committed selection is then what should be showing.\n */\n preview: (draft: Partial<ThemeSelection> | undefined) => void\n /** True while a {@link ThemeContextValue.preview} draft is on the document. */\n previewing: () => boolean\n /**\n * The roles `accent` paints over `variantId` (default: the variant in use), held\n * to the provider's `accentContrastFloor`, for an element-scoped override with\n * `paintAccentRoles` — a workspace that carries its own colour. `undefined` for\n * `null`, for `theme`, for an id that resolves to nothing, and for a variant the\n * registry does not hold: each means \"keep the inherited accent\".\n */\n accentRolesFor: (accent: string | null, variantId?: string) => AccentRoles | undefined\n /**\n * The surface the committed selection paints, after Reduce Transparency and the\n * host's translucency capability. `opaque` when the axis is off. Follows the\n * committed selection, not a preview, like {@link ThemeContextValue.variant}.\n */\n effectiveSurface: () => ThemeSurface\n /**\n * True while the operating system or the selection's `reduceTransparency` forces\n * opaque surfaces. Always false when the surface axis is off, because nothing is\n * then listening to the operating system.\n */\n reduceTransparencyActive: () => boolean\n /**\n * Step the three text sizes together, or put them back to the defaults: what the\n * `fontZoom` prop's chords do, for a host that binds its own keys or a menu. Goes\n * through {@link ThemeContextValue.setSelection}, so it persists and ends a preview.\n */\n zoomFonts: (intent: FontZoomIntent) => void\n /**\n * True when `themes`, `allThemes()` and the variants they resolve are backed by the\n * whole catalogue. Always true under `ThemeProvider`. Under the lazy provider\n * (`@adea-ai/ui/components/theme/lazy`) it turns true once the catalogue has loaded,\n * and until then only the default light and dark themes are available: a stored\n * theme beyond them resolves to its appearance's default (the document keeps painting\n * what the stylesheet gave it) until `catalogueReady()` is true. Absent on a context\n * a host builds itself, where it should be read as true.\n */\n catalogueReady?: () => boolean\n /**\n * Start loading the whole catalogue (idempotent) and resolve when it is available.\n * `AppearancePanel` calls it when it mounts; a host's own picker or settings page\n * should too. A no-op under `ThemeProvider`, whose catalogue is already loaded.\n */\n loadCatalogue?: () => Promise<void>\n}\n\n/** A selection with the `undefined` keys of a patch left out. */\nfunction definedOnly<T extends object>(value: T): Partial<T> {\n return Object.fromEntries(\n Object.entries(value).filter(([, entry]) => entry !== undefined)\n ) as Partial<T>\n}\n\n/** Keep the deprecated single-font view synchronized with the UI axis. */\nexport function mergeThemeSelection(\n base: ThemeSelection,\n patch: Partial<ThemeSelection>\n): ThemeSelection {\n const merged = { ...base, ...patch }\n let fonts: AppearanceEditorFontSettings\n\n if (patch.fonts !== undefined) {\n fonts = normalizeAppearanceEditorFontSettings(patch.fonts).settings\n } else if (patch.font !== undefined) {\n const currentFonts = normalizeAppearanceEditorFontSettings(base.fonts, base.font).settings\n fonts = normalizeAppearanceEditorFontSettings({\n ...currentFonts,\n ui: { ...currentFonts.ui, family: patch.font },\n }).settings\n } else {\n fonts = normalizeAppearanceEditorFontSettings(merged.fonts, merged.font).settings\n }\n\n return {\n ...merged,\n // One spelling for a custom colour, so equal choices compare and store equal.\n accent: normalizeCustomAccent(merged.accent) ?? merged.accent,\n fonts,\n font: fonts.ui.family,\n }\n}\n\n/**\n * The selection a provider starts from: the defaults, then whatever the store\n * returned, then `initial`.\n *\n * `initial` wins over the store on every mount. That precedence is part of the\n * contract Cortana relies on (its `initial` pins `appearance` and `font`), and it\n * is why the store's answer is only the middle layer. A store that returned\n * nothing, or threw, or answered with explicit `undefined`s, leaves the defaults\n * standing for those fields.\n */\nexport function initialThemeSelection(\n stored: Partial<ThemeSelection> | undefined,\n initial: Partial<ThemeSelection> | undefined\n): ThemeSelection {\n const base = mergeThemeSelection(defaultThemeSelection, definedOnly(stored ?? {}))\n return mergeThemeSelection(base, initial ?? {})\n}\n\n/** `system` resolved against what the operating system reports. */\nexport function resolveAppearance(\n preference: ThemeSelection['appearance'],\n system: ThemeAppearance\n): ThemeAppearance {\n return preference === 'system' ? system : preference\n}\n\n/** The theme id the selection names for a resolved appearance. */\nexport function selectedThemeId(selection: ThemeSelection, appearance: ThemeAppearance): string {\n return appearance === 'dark' ? selection.darkThemeId : selection.lightThemeId\n}\n\n/**\n * What a selection paints: the resolved appearance and the variant for it.\n *\n * An id the registry does not hold resolves to the appearance's default rather than\n * being rewritten (see `resolveVariant`), so the selection a host stores is never\n * changed by being unresolvable.\n */\nexport function resolveThemeState(\n selection: ThemeSelection,\n system: ThemeAppearance,\n registry: readonly ThemeVariant[]\n): { appearance: ThemeAppearance; variant: ThemeVariant } {\n const appearance = resolveAppearance(selection.appearance, system)\n return {\n appearance,\n variant: resolveVariant(registry, selectedThemeId(selection, appearance), appearance),\n }\n}\n\n/**\n * The variant whose terminal palette is pinned, or `undefined` when the terminal\n * follows the interface theme.\n *\n * `theme`, an absent id and an id the registry does not hold all mean the interface\n * palette: a terminal must never resolve to a blank or half-painted palette because a\n * theme was deleted after it was pinned.\n */\nexport function resolveTerminalVariant(\n terminalThemeId: string | undefined,\n registry: readonly ThemeVariant[]\n): ThemeVariant | undefined {\n if (terminalThemeId === undefined || terminalThemeId === THEME_DEFAULT_ID) return undefined\n return registry.find((candidate) => candidate.id === terminalThemeId)\n}\n\n/**\n * The font settings a zoom chord asks for: one pixel up or down on every axis, or\n * the defaults for `reset`.\n */\nexport function zoomedFontSettings(\n selection: ThemeSelection,\n intent: FontZoomIntent\n): AppearanceEditorFontSettings {\n if (intent === 'reset') return { ...DEFAULT_APPEARANCE_EDITOR_FONT_SETTINGS }\n return stepAppearanceFontSizes(selection.fonts, intent === 'in' ? 1 : -1)\n}\n\n/**\n * The registry a provider resolves against: the catalogue, then the host's extras.\n *\n * The catalogue wins an id collision, because it is listed first and `resolveVariant`\n * takes the first match: a host's variant can add a theme but cannot shadow one.\n */\nexport function mergeRegistry(\n builtin: readonly ThemeVariant[],\n extra: readonly ThemeVariant[] | undefined\n): readonly ThemeVariant[] {\n return extra && extra.length > 0 ? [...builtin, ...extra] : builtin\n}\n\n/**\n * The roles an accent paints over a variant, for {@link ThemeContextValue.accentRolesFor}.\n *\n * Resolved against the committed selection's theme pair, so an `ansi-*` accent means\n * the same colour here as it does on `<html>`.\n */\nexport function accentRolesForState(\n engine: Pick<ThemeEngine, 'accentRolesForSelection'>,\n accent: string | null,\n variantId: string | undefined,\n state: {\n selection: ThemeSelection\n variant: ThemeVariant\n registry: readonly ThemeVariant[]\n accentContrastFloor?: number\n }\n): AccentRoles | undefined {\n if (accent === null) return undefined\n const variant =\n variantId === undefined\n ? state.variant\n : state.registry.find((candidate) => candidate.id === variantId)\n if (!variant) return undefined\n return engine.accentRolesForSelection(accent, variant.appearance, state.selection, {\n background: variant.colors.background,\n floor: state.accentContrastFloor,\n variantId: variant.id,\n })\n}\n"],"mappings":";;;;;;;;;;;;AA0GA,IAAa,wBAAwC;CACnD,YAAY;CACZ,GAAG;CACH,QAAQ;CACR,MAAM;CACN,OAAO;CACP,SAAS;AACX;;;;;;;;AASA,SAAgB,gBAAgB,WAAyC;CACvE,OAAO,UAAU,YAAY,YAAY,YAAY;AACvD;;AAwFA,SAAS,YAA8B,OAAsB;CAC3D,OAAO,OAAO,YACZ,OAAO,QAAQ,KAAK,CAAC,CAAC,QAAQ,GAAG,WAAW,UAAU,KAAA,CAAS,CACjE;AACF;;AAGA,SAAgB,oBACd,MACA,OACgB;CAChB,MAAM,SAAS;EAAE,GAAG;EAAM,GAAG;CAAM;CACnC,IAAI;CAEJ,IAAI,MAAM,UAAU,KAAA,GAClB,QAAQ,sCAAsC,MAAM,KAAK,CAAC,CAAC;MACtD,IAAI,MAAM,SAAS,KAAA,GAAW;EACnC,MAAM,eAAe,sCAAsC,KAAK,OAAO,KAAK,IAAI,CAAC,CAAC;EAClF,QAAQ,sCAAsC;GAC5C,GAAG;GACH,IAAI;IAAE,GAAG,aAAa;IAAI,QAAQ,MAAM;GAAK;EAC/C,CAAC,CAAC,CAAC;CACL,OACE,QAAQ,sCAAsC,OAAO,OAAO,OAAO,IAAI,CAAC,CAAC;CAG3E,OAAO;EACL,GAAG;EAEH,QAAQ,sBAAsB,OAAO,MAAM,KAAK,OAAO;EACvD;EACA,MAAM,MAAM,GAAG;CACjB;AACF;;;;;;;;;;;AAYA,SAAgB,sBACd,QACA,SACgB;CAEhB,OAAO,oBADM,oBAAoB,uBAAuB,YAAY,UAAU,CAAC,CAAC,CACrD,GAAM,WAAW,CAAC,CAAC;AAChD;;AAGA,SAAgB,kBACd,YACA,QACiB;CACjB,OAAO,eAAe,WAAW,SAAS;AAC5C;;AAGA,SAAgB,gBAAgB,WAA2B,YAAqC;CAC9F,OAAO,eAAe,SAAS,UAAU,cAAc,UAAU;AACnE;;;;;;;;AASA,SAAgB,kBACd,WACA,QACA,UACwD;CACxD,MAAM,aAAa,kBAAkB,UAAU,YAAY,MAAM;CACjE,OAAO;EACL;EACA,SAAS,eAAe,UAAU,gBAAgB,WAAW,UAAU,GAAG,UAAU;CACtF;AACF;;;;;;;;;AAUA,SAAgB,uBACd,iBACA,UAC0B;CAC1B,IAAI,oBAAoB,KAAA,KAAa,oBAAA,SAAsC,OAAO,KAAA;CAClF,OAAO,SAAS,MAAM,cAAc,UAAU,OAAO,eAAe;AACtE;;;;;AAMA,SAAgB,mBACd,WACA,QAC8B;CAC9B,IAAI,WAAW,SAAS,OAAO,EAAE,GAAG,wCAAwC;CAC5E,OAAO,wBAAwB,UAAU,OAAO,WAAW,OAAO,IAAI,EAAE;AAC1E;;;;;;;AAQA,SAAgB,cACd,SACA,OACyB;CACzB,OAAO,SAAS,MAAM,SAAS,IAAI,CAAC,GAAG,SAAS,GAAG,KAAK,IAAI;AAC9D;;;;;;;AAQA,SAAgB,oBACd,QACA,QACA,WACA,OAMyB;CACzB,IAAI,WAAW,MAAM,OAAO,KAAA;CAC5B,MAAM,UACJ,cAAc,KAAA,IACV,MAAM,UACN,MAAM,SAAS,MAAM,cAAc,UAAU,OAAO,SAAS;CACnE,IAAI,CAAC,SAAS,OAAO,KAAA;CACrB,OAAO,OAAO,wBAAwB,QAAQ,QAAQ,YAAY,MAAM,WAAW;EACjF,YAAY,QAAQ,OAAO;EAC3B,OAAO,MAAM;EACb,WAAW,QAAQ;CACrB,CAAC;AACH"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme-toggle.d.ts","sourceRoot":"","sources":["../../../src/components/theme/theme-toggle.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAG9C,OAAO,EAAE,WAAW,EAAmB,MAAM,
|
|
1
|
+
{"version":3,"file":"theme-toggle.d.ts","sourceRoot":"","sources":["../../../src/components/theme/theme-toggle.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAG9C,OAAO,EAAE,WAAW,EAAmB,MAAM,oBAAoB,CAAA;AAGjE;;;;;;;;;;GAUG;AACH,MAAM,MAAM,gBAAgB,GAAG,IAAI,CAAC,cAAc,CAAC,OAAO,WAAW,CAAC,EAAE,UAAU,CAAC,GAAG;IACpF,2EAA2E;IAC3E,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB,CAAA;AAQD,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,kCAkClD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme-toggle.js","names":["Monitor","Moon","Sun","ComponentProps","For","splitProps","cn","ToggleGroup","ToggleGroupItem","useTheme","ThemeToggleProps","Omit","withLabels","APPEARANCES","value","label","icon","const","ThemeToggle","props","local","rest","selection","setSelection","_$createComponent","_$mergeProps","attached","appearance","onChange","class","children","each","variant","size","aria-label","_$memo","_el$","_tmpl$","_$insert","_$createComponent","_$mergeProps","_$memo"],"sources":["../../../src/components/theme/theme-toggle.tsx"],"sourcesContent":["import { Monitor, Moon, Sun } from 'lucide-solid'\nimport type { ComponentProps } from 'solid-js'\nimport { For, splitProps } from 'solid-js'\nimport { cn } from '#lib/utils'\nimport { ToggleGroup, ToggleGroupItem } from '../ui/toggle-group
|
|
1
|
+
{"version":3,"file":"theme-toggle.js","names":["Monitor","Moon","Sun","ComponentProps","For","splitProps","cn","ToggleGroup","ToggleGroupItem","useTheme","ThemeToggleProps","Omit","withLabels","APPEARANCES","value","label","icon","const","ThemeToggle","props","local","rest","selection","setSelection","_$createComponent","_$mergeProps","attached","appearance","onChange","class","children","each","variant","size","aria-label","_$memo","_el$","_tmpl$","_$insert","_$createComponent","_$mergeProps","_$memo"],"sources":["../../../src/components/theme/theme-toggle.tsx"],"sourcesContent":["import { Monitor, Moon, Sun } from 'lucide-solid'\nimport type { ComponentProps } from 'solid-js'\nimport { For, splitProps } from 'solid-js'\nimport { cn } from '#lib/utils'\nimport { ToggleGroup, ToggleGroupItem } from '../ui/toggle-group'\nimport { useTheme } from './theme-context'\n\n/**\n * ThemeToggle.\n *\n * Three states, not two: light, dark, and follow the system. A two-state switch is\n * the common mistake — it forces a choice on someone who wanted the application to\n * track their OS, and it has no way to say \"I have not decided\", so the first click\n * silently overrides a system preference the user set deliberately.\n *\n * The icons carry the state and the accessible name comes from the label, so the\n * control is usable without seeing which glyph is lit.\n */\nexport type ThemeToggleProps = Omit<ComponentProps<typeof ToggleGroup>, 'children'> & {\n /** Draw labels beside the icons. Off by default: a toolbar wants icons. */\n withLabels?: boolean\n}\n\nconst APPEARANCES = [\n { value: 'light', label: 'Light', icon: Sun },\n { value: 'dark', label: 'Dark', icon: Moon },\n { value: 'system', label: 'System', icon: Monitor },\n] as const\n\nexport function ThemeToggle(props: ThemeToggleProps) {\n const [local, rest] = splitProps(props, ['class', 'withLabels'])\n const { selection, setSelection } = useTheme()\n\n return (\n <ToggleGroup\n attached\n value={selection().appearance}\n onChange={(value: string | null) => {\n // A toggle group reports the pressed value or null; null would leave the\n // appearance unset, so a re-press keeps the current one.\n if (typeof value === 'string') {\n setSelection({ appearance: value as 'light' | 'dark' | 'system' })\n }\n }}\n aria-label=\"Appearance\"\n class={cn(local.class)}\n {...rest}\n >\n <For each={APPEARANCES}>\n {(appearance) => (\n <ToggleGroupItem\n value={appearance.value}\n variant=\"outline\"\n size={local.withLabels ? 'sm' : 'icon-sm'}\n aria-label={appearance.label}\n >\n <appearance.icon />\n {local.withLabels ? <span>{appearance.label}</span> : null}\n </ToggleGroupItem>\n )}\n </For>\n </ToggleGroup>\n )\n}\n"],"mappings":";;;;;;;;AAuBA,IAAMa,cAAc;CAClB;EAAEC,OAAO;EAASC,OAAO;EAASC,MAAMd;CAAI;CAC5C;EAAEY,OAAO;EAAQC,OAAO;EAAQC,MAAMf;CAAK;CAC3C;EAAEa,OAAO;EAAUC,OAAO;EAAUC,MAAMhB;CAAQ;AAAC;AAGrD,SAAgBkB,YAAYC,OAAyB;CACnD,MAAM,CAACC,OAAOC,QAAQhB,WAAWc,OAAO,CAAC,SAAS,YAAY,CAAC;CAC/D,MAAM,EAAEG,WAAWC,iBAAiBd,SAAS;CAE7C,OAAAe,gBACGjB,aAAWkB,WAAA;EACVC,UAAQ;EAAA,IACRZ,QAAK;GAAA,OAAEQ,UAAU,CAAC,CAACK;EAAU;EAC7BC,WAAWd,UAAyB;GAGlC,IAAI,OAAOA,UAAU,UACnBS,aAAa,EAAEI,YAAYb,MAAqC,CAAC;EAErE;EAAC,cAAA;EAAA,KAAA,WAAA;GAAA,OAEMR,GAAGc,MAAMS,KAAK;EAAC;CAAA,GAClBR,MAAI,EAAA,IAAAS,WAAA;EAAA,OAAAN,gBAEPpB,KAAG;GAAC2B,MAAMlB;GAAWiB,WAClBH,eAAUH,gBACThB,iBAAe;IAAA,IACdM,QAAK;KAAA,OAAEa,WAAWb;IAAK;IACvBkB,SAAO;IAAA,IACPC,OAAI;KAAA,OAAEb,MAAMR,aAAa,OAAO;IAAS;IAAA,KAAA,gBAAA;KAAA,OAC7Be,WAAWZ;IAAK;IAAA,IAAAe,WAAA;KAAA,OAAA,CAAAN,gBAE3BG,WAAWX,MAAI,CAAA,CAAA,GAAAmB,WACfA,WAAA,CAAA,CAAAf,MAAMR,UAAU,CAAA,CAAA,WAAA;MAAA,IAAAwB,OAAAC,OAAA;MAAAC,OAAAF,YAAUT,WAAWZ,KAAK;MAAA,OAAAqB;KAAA,EAAA,CAAA,IAAW,IAAI,CAAA;IAAA;GAAA,CAAA;EAE7D,CAAA;CAAA,EAAA,CAAA,CAAA;AAIT"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"token-projection-options.d.ts","sourceRoot":"","sources":["../../../src/components/theme/token-projection-options.ts"],"names":[],"mappings":"AAAA,yFAAyF;AACzF,wBAAgB,gCAAgC,CAAC,MAAM,EAAE,OAAO,GAAG,IAAI,CAYtE"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// src/components/theme/token-projection-options.ts
|
|
2
|
+
/** Keep the runtime configuration check free of the optional Themes projector import. */
|
|
3
|
+
function assertThemeTokenProjectionConfig(config) {
|
|
4
|
+
if (config === void 0) return;
|
|
5
|
+
if (!config || typeof config !== "object" || !("rules" in config) || !Array.isArray(config.rules) || !("project" in config) || typeof config.project !== "function") throw new TypeError("tokenProjection requires both rules and project");
|
|
6
|
+
}
|
|
7
|
+
export { assertThemeTokenProjectionConfig };
|
|
8
|
+
|
|
9
|
+
//# sourceMappingURL=token-projection-options.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"token-projection-options.js","names":[],"sources":["../../../src/components/theme/token-projection-options.ts"],"sourcesContent":["/** Keep the runtime configuration check free of the optional Themes projector import. */\nexport function assertThemeTokenProjectionConfig(config: unknown): void {\n if (config === undefined) return\n if (\n !config ||\n typeof config !== 'object' ||\n !('rules' in config) ||\n !Array.isArray(config.rules) ||\n !('project' in config) ||\n typeof config.project !== 'function'\n ) {\n throw new TypeError('tokenProjection requires both rules and project')\n }\n}\n"],"mappings":";;AACA,SAAgB,iCAAiC,QAAuB;CACtE,IAAI,WAAW,KAAA,GAAW;CAC1B,IACE,CAAC,UACD,OAAO,WAAW,YAClB,EAAE,WAAW,WACb,CAAC,MAAM,QAAQ,OAAO,KAAK,KAC3B,EAAE,aAAa,WACf,OAAO,OAAO,YAAY,YAE1B,MAAM,IAAI,UAAU,iDAAiD;AAEzE"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Runtime token projection for hosts that opt in to projecting legacy theme maps.
|
|
3
|
+
* The default provider and boot script do not import this entry.
|
|
4
|
+
*/
|
|
5
|
+
import type { ThemeTokenProjection } from '@adea-ai/themes/theme-token-projection';
|
|
6
|
+
export { projectThemeTokens, projectThemeTokensDetailed, } from '@adea-ai/themes/theme-token-projection';
|
|
7
|
+
export type { ThemeTokenContrastRule, ThemeTokenProjection, ThemeTokenProjectionFailure, ThemeTokenProjectionResult, ThemeTokenProjectionRule, } from '@adea-ai/themes/theme-token-projection';
|
|
8
|
+
/** Function type for the shared projector supplied by opt-in hosts. */
|
|
9
|
+
export type ThemeTokenProjector = (tokens: Readonly<Record<string, string>>, projection: ThemeTokenProjection) => Record<string, string>;
|
|
10
|
+
/** Rules and their projector travel together through provider/document options. */
|
|
11
|
+
export type ThemeTokenProjectionConfig = Readonly<{
|
|
12
|
+
rules: ThemeTokenProjection;
|
|
13
|
+
project: ThemeTokenProjector;
|
|
14
|
+
}>;
|
|
15
|
+
/**
|
|
16
|
+
* Projection rules and their runtime; hosts that opt in provide both. The rules operate
|
|
17
|
+
* on each custom variant's raw `tokens` map, preserving the prepaint source's availability.
|
|
18
|
+
*/
|
|
19
|
+
export type ThemeTokenProjectionOptions = {
|
|
20
|
+
tokenProjection?: ThemeTokenProjectionConfig;
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=token-projection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"token-projection.d.ts","sourceRoot":"","sources":["../../../src/components/theme/token-projection.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,wCAAwC,CAAA;AAElF,OAAO,EACL,kBAAkB,EAClB,0BAA0B,GAC3B,MAAM,wCAAwC,CAAA;AAC/C,YAAY,EACV,sBAAsB,EACtB,oBAAoB,EACpB,2BAA2B,EAC3B,0BAA0B,EAC1B,wBAAwB,GACzB,MAAM,wCAAwC,CAAA;AAE/C,uEAAuE;AACvE,MAAM,MAAM,mBAAmB,GAAG,CAChC,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,EACxC,UAAU,EAAE,oBAAoB,KAC7B,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;AAE3B,mFAAmF;AACnF,MAAM,MAAM,0BAA0B,GAAG,QAAQ,CAAC;IAChD,KAAK,EAAE,oBAAoB,CAAA;IAC3B,OAAO,EAAE,mBAAmB,CAAA;CAC7B,CAAC,CAAA;AAEF;;;GAGG;AACH,MAAM,MAAM,2BAA2B,GAAG;IACxC,eAAe,CAAC,EAAE,0BAA0B,CAAA;CAC7C,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { projectThemeTokens, projectThemeTokensDetailed } from "@adea-ai/themes/theme-token-projection";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AlertDialog as KobalteAlertDialog, Content as KobalteAlertDialogContent } from '@kobalte/core/alert-dialog';
|
|
2
|
-
import type { ComponentProps } from 'solid-js';
|
|
2
|
+
import type { Accessor, ComponentProps } from 'solid-js';
|
|
3
3
|
/**
|
|
4
4
|
* AlertDialog.
|
|
5
5
|
*
|
|
@@ -16,11 +16,13 @@ import type { ComponentProps } from 'solid-js';
|
|
|
16
16
|
* There is deliberately no close button in the corner. An X has no label, and the
|
|
17
17
|
* point of this surface is that every exit is a named choice.
|
|
18
18
|
*/
|
|
19
|
-
export
|
|
20
|
-
export declare function AlertDialogTrigger(props: ComponentProps<typeof KobalteAlertDialog.Trigger>): import("solid-js").JSX.Element;
|
|
21
|
-
export declare function AlertDialogPortal(props: ComponentProps<typeof KobalteAlertDialog.Portal>): import("solid-js").JSX.Element;
|
|
19
|
+
export { Root as AlertDialog, Trigger as AlertDialogTrigger, Portal as AlertDialogPortal, } from '@kobalte/core/alert-dialog';
|
|
22
20
|
export declare function AlertDialogOverlay(props: ComponentProps<typeof KobalteAlertDialog.Overlay>): import("solid-js").JSX.Element;
|
|
23
|
-
export
|
|
21
|
+
export type AlertDialogContentProps = ComponentProps<typeof KobalteAlertDialogContent> & {
|
|
22
|
+
/** The control to focus on close when the one focused before opening is gone by then. */
|
|
23
|
+
restoreFocusRef?: Accessor<HTMLElement | undefined>;
|
|
24
|
+
};
|
|
25
|
+
export declare function AlertDialogContent(props: AlertDialogContentProps): import("solid-js").JSX.Element;
|
|
24
26
|
export declare function AlertDialogHeader(props: ComponentProps<'div'>): import("solid-js").JSX.Element;
|
|
25
27
|
export declare function AlertDialogFooter(props: ComponentProps<'div'>): import("solid-js").JSX.Element;
|
|
26
28
|
export declare function AlertDialogTitle(props: ComponentProps<typeof KobalteAlertDialog.Title>): import("solid-js").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alert-dialog.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/alert-dialog/alert-dialog.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,IAAI,kBAAkB,EACjC,OAAO,IAAI,yBAAyB,EACrC,MAAM,4BAA4B,CAAA;AAEnC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;
|
|
1
|
+
{"version":3,"file":"alert-dialog.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/alert-dialog/alert-dialog.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,IAAI,kBAAkB,EACjC,OAAO,IAAI,yBAAyB,EACrC,MAAM,4BAA4B,CAAA;AAEnC,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAgBxD;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EACL,IAAI,IAAI,WAAW,EACnB,OAAO,IAAI,kBAAkB,EAC7B,MAAM,IAAI,iBAAiB,GAC5B,MAAM,4BAA4B,CAAA;AAEnC,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,cAAc,CAAC,OAAO,kBAAkB,CAAC,OAAO,CAAC,kCAQ1F;AA+BD,MAAM,MAAM,uBAAuB,GAAG,cAAc,CAAC,OAAO,yBAAyB,CAAC,GAAG;IACvF,yFAAyF;IACzF,eAAe,CAAC,EAAE,QAAQ,CAAC,WAAW,GAAG,SAAS,CAAC,CAAA;CACpD,CAAA;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,uBAAuB,kCAqChE;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,cAAc,CAAC,KAAK,CAAC,kCAG7D;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,cAAc,CAAC,KAAK,CAAC,kCAG7D;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,cAAc,CAAC,OAAO,kBAAkB,CAAC,KAAK,CAAC,kCAGtF;AAED,wBAAgB,sBAAsB,CACpC,KAAK,EAAE,cAAc,CAAC,OAAO,kBAAkB,CAAC,WAAW,CAAC,kCAI7D;AA0CD,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,cAAc,CAAC,OAAO,kBAAkB,CAAC,WAAW,CAAC,kCAE7F;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,cAAc,CAAC,OAAO,kBAAkB,CAAC,WAAW,CAAC,kCAE7F"}
|
|
@@ -1,42 +1,18 @@
|
|
|
1
|
-
import { dialogSurface, overlayMotion, overlayPositioner, overlayScrim, overlayTitle } from "../../../lib/overlay.js";
|
|
1
|
+
import { dialogSurface, overlayDescription, overlayFooter, overlayHeader, overlayMotion, overlayPositioner, overlayScrim, overlayScrimMotion, overlayTitle } from "../../../lib/overlay.js";
|
|
2
2
|
import { cn } from "../../../lib/utils.js";
|
|
3
|
+
import { DialogEscapeTarget, createDialogLayer } from "../dialog/dialog-layer.js";
|
|
3
4
|
import { className, createComponent, insert, mergeProps, spread, template, use } from "solid-js/web";
|
|
4
5
|
import { createEffect, createSignal, splitProps } from "solid-js";
|
|
5
|
-
import { AlertDialog, Content } from "@kobalte/core/alert-dialog";
|
|
6
|
+
import { AlertDialog, Content, Portal as AlertDialogPortal, Root as AlertDialog$1, Trigger as AlertDialogTrigger } from "@kobalte/core/alert-dialog";
|
|
6
7
|
// src/components/ui/alert-dialog/alert-dialog.tsx
|
|
7
8
|
var _tmpl$ = /*#__PURE__*/ template(`<div>`);
|
|
8
9
|
var _tmpl$2 = /*#__PURE__*/ template(`<div data-slot=alert-dialog-header>`);
|
|
9
10
|
var _tmpl$3 = /*#__PURE__*/ template(`<div data-slot=alert-dialog-footer>`);
|
|
10
11
|
var _tmpl$4 = /*#__PURE__*/ template(`<span class=contents>`);
|
|
11
|
-
/**
|
|
12
|
-
* AlertDialog.
|
|
13
|
-
*
|
|
14
|
-
* A dialog that cannot be dismissed by accident: a click on the scrim does nothing,
|
|
15
|
-
* and the user must choose one of the actions. Escape is the keyboard's Cancel: it
|
|
16
|
-
* closes the dialog exactly as the cancel action does, so nothing is confirmed. That
|
|
17
|
-
* is the whole difference from Dialog, and it is why this exists as its own
|
|
18
|
-
* component rather than a prop — a caller has to reach for it deliberately.
|
|
19
|
-
*
|
|
20
|
-
* The consequence is a rule of use: this is for confirming a destructive or
|
|
21
|
-
* irreversible step. Wrapping an ordinary form in an AlertDialog traps someone who
|
|
22
|
-
* wants to back out.
|
|
23
|
-
*
|
|
24
|
-
* There is deliberately no close button in the corner. An X has no label, and the
|
|
25
|
-
* point of this surface is that every exit is a named choice.
|
|
26
|
-
*/
|
|
27
|
-
function AlertDialog$1(props) {
|
|
28
|
-
return createComponent(AlertDialog, props);
|
|
29
|
-
}
|
|
30
|
-
function AlertDialogTrigger(props) {
|
|
31
|
-
return createComponent(AlertDialog.Trigger, props);
|
|
32
|
-
}
|
|
33
|
-
function AlertDialogPortal(props) {
|
|
34
|
-
return createComponent(AlertDialog.Portal, props);
|
|
35
|
-
}
|
|
36
12
|
function AlertDialogOverlay(props) {
|
|
37
13
|
const [local, rest] = splitProps(props, ["class"]);
|
|
38
14
|
return createComponent(AlertDialog.Overlay, mergeProps({ get ["class"]() {
|
|
39
|
-
return cn(overlayScrim,
|
|
15
|
+
return cn(overlayScrim, overlayScrimMotion, local.class);
|
|
40
16
|
} }, rest));
|
|
41
17
|
}
|
|
42
18
|
/**
|
|
@@ -54,9 +30,9 @@ function AlertDialogOverlay(props) {
|
|
|
54
30
|
* Escape is deliberately left to the primitive. It can only ever cancel, never
|
|
55
31
|
* confirm, so it is not an accident that matters; refusing it traps a keyboard
|
|
56
32
|
* user who has changed their mind, and the WAI-ARIA alertdialog pattern says
|
|
57
|
-
* Escape closes. It reports `onOpenChange(false)` and
|
|
58
|
-
*
|
|
59
|
-
* closes only the confirmation, not a dialog underneath
|
|
33
|
+
* Escape closes. It reports `onOpenChange(false)` and returns focus to what had
|
|
34
|
+
* it before the confirmation opened, which is what the cancel action does, and
|
|
35
|
+
* as the topmost layer it closes only the confirmation, not a dialog underneath.
|
|
60
36
|
*
|
|
61
37
|
* There is deliberately no prop to turn the scrim blocking off. A surface that can be escaped
|
|
62
38
|
* accidentally does not need to be an AlertDialog; it is a Dialog, and using this
|
|
@@ -68,14 +44,42 @@ var blockDismissal = {
|
|
|
68
44
|
onInteractOutside: (event) => event.preventDefault()
|
|
69
45
|
};
|
|
70
46
|
function AlertDialogContent(props) {
|
|
71
|
-
const [local, rest] = splitProps(props, [
|
|
47
|
+
const [local, rest] = splitProps(props, [
|
|
48
|
+
"class",
|
|
49
|
+
"children",
|
|
50
|
+
"restoreFocusRef",
|
|
51
|
+
"onOpenAutoFocus",
|
|
52
|
+
"onCloseAutoFocus"
|
|
53
|
+
]);
|
|
54
|
+
const layer = createDialogLayer({
|
|
55
|
+
restoreFocusRef: local.restoreFocusRef,
|
|
56
|
+
onOpenAutoFocus: (event) => local.onOpenAutoFocus?.(event),
|
|
57
|
+
onCloseAutoFocus: (event) => local.onCloseAutoFocus?.(event)
|
|
58
|
+
});
|
|
72
59
|
return createComponent(AlertDialog.Portal, { get children() {
|
|
73
60
|
return [createComponent(AlertDialogOverlay, {}), (() => {
|
|
74
61
|
var _el$ = _tmpl$();
|
|
75
62
|
className(_el$, overlayPositioner);
|
|
76
63
|
insert(_el$, createComponent(Content, mergeProps(blockDismissal, { get ["class"]() {
|
|
77
64
|
return cn(dialogSurface, overlayMotion, "grid max-h-full w-full max-w-md gap-4 overflow-y-auto p-5", local.class);
|
|
78
|
-
} }, rest
|
|
65
|
+
} }, rest, {
|
|
66
|
+
get onOpenAutoFocus() {
|
|
67
|
+
return layer.onOpenAutoFocus;
|
|
68
|
+
},
|
|
69
|
+
get onCloseAutoFocus() {
|
|
70
|
+
return layer.onCloseAutoFocus;
|
|
71
|
+
},
|
|
72
|
+
get children() {
|
|
73
|
+
return createComponent(DialogEscapeTarget, {
|
|
74
|
+
get onEscapeKeyDown() {
|
|
75
|
+
return props.onEscapeKeyDown;
|
|
76
|
+
},
|
|
77
|
+
get children() {
|
|
78
|
+
return local.children;
|
|
79
|
+
}
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
})));
|
|
79
83
|
return _el$;
|
|
80
84
|
})()];
|
|
81
85
|
} });
|
|
@@ -85,7 +89,7 @@ function AlertDialogHeader(props) {
|
|
|
85
89
|
return (() => {
|
|
86
90
|
var _el$2 = _tmpl$2();
|
|
87
91
|
spread(_el$2, mergeProps({ get ["class"]() {
|
|
88
|
-
return cn(
|
|
92
|
+
return cn(overlayHeader, local.class);
|
|
89
93
|
} }, rest), false, false);
|
|
90
94
|
return _el$2;
|
|
91
95
|
})();
|
|
@@ -95,7 +99,7 @@ function AlertDialogFooter(props) {
|
|
|
95
99
|
return (() => {
|
|
96
100
|
var _el$3 = _tmpl$3();
|
|
97
101
|
spread(_el$3, mergeProps({ get ["class"]() {
|
|
98
|
-
return cn(
|
|
102
|
+
return cn(overlayFooter, local.class);
|
|
99
103
|
} }, rest), false, false);
|
|
100
104
|
return _el$3;
|
|
101
105
|
})();
|
|
@@ -109,7 +113,7 @@ function AlertDialogTitle(props) {
|
|
|
109
113
|
function AlertDialogDescription(props) {
|
|
110
114
|
const [local, rest] = splitProps(props, ["class"]);
|
|
111
115
|
return createComponent(AlertDialog.Description, mergeProps({ get ["class"]() {
|
|
112
|
-
return cn(
|
|
116
|
+
return cn(overlayDescription, local.class);
|
|
113
117
|
} }, rest));
|
|
114
118
|
}
|
|
115
119
|
/**
|