@adea-ai/ui 0.153.0 → 0.154.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -10
- package/dist/NOTICE +10 -1
- package/dist/components/composites/about-dialog/about-dialog.d.ts.map +1 -1
- package/dist/components/composites/about-dialog/about-dialog.js +3 -1
- package/dist/components/composites/about-dialog/about-dialog.js.map +1 -1
- package/dist/components/composites/accent-picker/accent-picker.js +20 -9
- package/dist/components/composites/accent-picker/accent-picker.js.map +1 -1
- package/dist/components/composites/account-menu/account-menu.d.ts.map +1 -1
- package/dist/components/composites/account-menu/account-menu.js +20 -10
- 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 +37 -24
- package/dist/components/composites/action-button/action-button.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 +7 -3
- 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 +11 -6
- 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 +8 -3
- 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 +8 -4
- package/dist/components/composites/appearance-editor/font-settings-group.js.map +1 -1
- package/dist/components/composites/catalog-browser/catalog-browser-group.d.ts.map +1 -1
- package/dist/components/composites/catalog-browser/catalog-browser-group.js +7 -3
- package/dist/components/composites/catalog-browser/catalog-browser-group.js.map +1 -1
- package/dist/components/composites/catalog-browser/catalog-browser.d.ts.map +1 -1
- package/dist/components/composites/catalog-browser/catalog-browser.js +8 -4
- package/dist/components/composites/catalog-browser/catalog-browser.js.map +1 -1
- 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 +3 -1
- package/dist/components/composites/chain-of-thought/chain-of-thought.js.map +1 -1
- package/dist/components/composites/chat/chat.d.ts.map +1 -1
- package/dist/components/composites/chat/chat.js +5 -1
- package/dist/components/composites/chat/chat.js.map +1 -1
- package/dist/components/composites/checkpoint/checkpoint.d.ts.map +1 -1
- package/dist/components/composites/checkpoint/checkpoint.js +3 -1
- package/dist/components/composites/checkpoint/checkpoint.js.map +1 -1
- package/dist/components/composites/confirmation/confirmation.d.ts.map +1 -1
- package/dist/components/composites/confirmation/confirmation.js +11 -5
- package/dist/components/composites/confirmation/confirmation.js.map +1 -1
- package/dist/components/composites/context/context.d.ts.map +1 -1
- package/dist/components/composites/context/context.js +7 -4
- package/dist/components/composites/context/context.js.map +1 -1
- package/dist/components/composites/file-tree/file-tree.d.ts.map +1 -1
- package/dist/components/composites/file-tree/file-tree.js +7 -3
- package/dist/components/composites/file-tree/file-tree.js.map +1 -1
- package/dist/components/composites/help-center/help-center.d.ts.map +1 -1
- package/dist/components/composites/help-center/help-center.js +3 -1
- package/dist/components/composites/help-center/help-center.js.map +1 -1
- package/dist/components/composites/icon-picker/icon-picker.d.ts +2 -2
- package/dist/components/composites/icon-picker/icon-picker.d.ts.map +1 -1
- package/dist/components/composites/icon-picker/icon-picker.js +77 -71
- package/dist/components/composites/icon-picker/icon-picker.js.map +1 -1
- package/dist/components/composites/icon-picker/shell-icons.d.ts.map +1 -1
- package/dist/components/composites/icon-picker/shell-icons.js +119 -59
- package/dist/components/composites/icon-picker/shell-icons.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 +5 -2
- package/dist/components/composites/inline-citation/inline-citation.js.map +1 -1
- package/dist/components/composites/list-row/list-row-control.d.ts.map +1 -1
- package/dist/components/composites/list-row/list-row-control.js +3 -4
- package/dist/components/composites/list-row/list-row-control.js.map +1 -1
- package/dist/components/composites/message-scroller/message-scroller.d.ts.map +1 -1
- package/dist/components/composites/message-scroller/message-scroller.js +5 -2
- package/dist/components/composites/message-scroller/message-scroller.js.map +1 -1
- package/dist/components/composites/model-selector/model-selector.d.ts +15 -1
- package/dist/components/composites/model-selector/model-selector.d.ts.map +1 -1
- package/dist/components/composites/model-selector/model-selector.js +271 -33
- package/dist/components/composites/model-selector/model-selector.js.map +1 -1
- package/dist/components/composites/plan/plan.d.ts.map +1 -1
- package/dist/components/composites/plan/plan.js +3 -1
- package/dist/components/composites/plan/plan.js.map +1 -1
- package/dist/components/composites/queue/queue.d.ts.map +1 -1
- package/dist/components/composites/queue/queue.js +11 -5
- package/dist/components/composites/queue/queue.js.map +1 -1
- package/dist/components/composites/reasoning/reasoning.d.ts.map +1 -1
- package/dist/components/composites/reasoning/reasoning.js +3 -1
- package/dist/components/composites/reasoning/reasoning.js.map +1 -1
- package/dist/components/composites/scene-controls/scene-controls.d.ts.map +1 -1
- package/dist/components/composites/scene-controls/scene-controls.js +14 -7
- package/dist/components/composites/scene-controls/scene-controls.js.map +1 -1
- package/dist/components/composites/settings/settings.d.ts.map +1 -1
- package/dist/components/composites/settings/settings.js +77 -67
- package/dist/components/composites/settings/settings.js.map +1 -1
- package/dist/components/composites/sources/sources.d.ts.map +1 -1
- package/dist/components/composites/sources/sources.js +39 -39
- 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 +9 -4
- package/dist/components/composites/stack-trace/stack-trace.js.map +1 -1
- package/dist/components/composites/stat/stat.d.ts.map +1 -1
- package/dist/components/composites/stat/stat.js +4 -1
- package/dist/components/composites/stat/stat.js.map +1 -1
- package/dist/components/composites/subagent/subagent.d.ts.map +1 -1
- package/dist/components/composites/subagent/subagent.js +3 -1
- package/dist/components/composites/subagent/subagent.js.map +1 -1
- package/dist/components/composites/task/task.d.ts.map +1 -1
- package/dist/components/composites/task/task.js +3 -1
- package/dist/components/composites/task/task.js.map +1 -1
- package/dist/components/composites/terminal/ansi.d.ts.map +1 -1
- package/dist/components/composites/terminal/ansi.js +16 -0
- package/dist/components/composites/terminal/ansi.js.map +1 -1
- package/dist/components/composites/terminal/terminal.d.ts.map +1 -1
- package/dist/components/composites/terminal/terminal.js +15 -7
- 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 +15 -7
- package/dist/components/composites/test-results/test-results.js.map +1 -1
- package/dist/components/composites/tool/tool.d.ts.map +1 -1
- package/dist/components/composites/tool/tool.js +3 -1
- package/dist/components/composites/tool/tool.js.map +1 -1
- package/dist/components/composites/tree/tree.d.ts.map +1 -1
- package/dist/components/composites/tree/tree.js +3 -1
- package/dist/components/composites/tree/tree.js.map +1 -1
- package/dist/components/composites/update-dialog/update-dialog.d.ts.map +1 -1
- package/dist/components/composites/update-dialog/update-dialog.js +34 -24
- package/dist/components/composites/update-dialog/update-dialog.js.map +1 -1
- package/dist/components/composites/workspace-mark/workspace-mark.d.ts.map +1 -1
- package/dist/components/composites/workspace-mark/workspace-mark.js +17 -12
- 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 +5 -2
- 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 +9 -4
- package/dist/components/composites/workspace-switcher/workspace-switcher.js.map +1 -1
- package/dist/components/conversation/busy-send-button.d.ts.map +1 -1
- package/dist/components/conversation/busy-send-button.js +9 -5
- package/dist/components/conversation/busy-send-button.js.map +1 -1
- package/dist/components/conversation/conversation-avatar.d.ts.map +1 -1
- package/dist/components/conversation/conversation-avatar.js +6 -3
- package/dist/components/conversation/conversation-avatar.js.map +1 -1
- package/dist/components/conversation/conversation-surface.d.ts.map +1 -1
- package/dist/components/conversation/conversation-surface.js +3 -1
- package/dist/components/conversation/conversation-surface.js.map +1 -1
- package/dist/components/conversation/internal/chat-composer-shell.d.ts.map +1 -1
- package/dist/components/conversation/internal/chat-composer-shell.js +9 -4
- package/dist/components/conversation/internal/chat-composer-shell.js.map +1 -1
- package/dist/components/conversation/message-composer.d.ts.map +1 -1
- package/dist/components/conversation/message-composer.js +9 -4
- package/dist/components/conversation/message-composer.js.map +1 -1
- package/dist/components/conversation/message-row.d.ts.map +1 -1
- package/dist/components/conversation/message-row.js +11 -5
- package/dist/components/conversation/message-row.js.map +1 -1
- package/dist/components/conversation/thread-panel.d.ts.map +1 -1
- package/dist/components/conversation/thread-panel.js +3 -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 +3 -1
- package/dist/components/conversation/transcript-composition.js.map +1 -1
- package/dist/components/layout/floating-preview/floating-preview.d.ts.map +1 -1
- package/dist/components/layout/floating-preview/floating-preview.js +5 -2
- package/dist/components/layout/floating-preview/floating-preview.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 +3 -1
- package/dist/components/layout/pixel-resize-handle/pixel-resize-handle.js.map +1 -1
- package/dist/components/layout/shell-rail/shell-rail.d.ts.map +1 -1
- package/dist/components/layout/shell-rail/shell-rail.js +3 -1
- package/dist/components/layout/shell-rail/shell-rail.js.map +1 -1
- package/dist/components/layout/side-rail/side-rail.d.ts.map +1 -1
- package/dist/components/layout/side-rail/side-rail.js +46 -42
- package/dist/components/layout/side-rail/side-rail.js.map +1 -1
- package/dist/components/layout/sidebar-nav/sidebar-nav.d.ts.map +1 -1
- package/dist/components/layout/sidebar-nav/sidebar-nav.js +3 -1
- package/dist/components/layout/sidebar-nav/sidebar-nav.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 +5 -2
- package/dist/components/layout/split-layout/split-layout.js.map +1 -1
- package/dist/components/layout/top-bar/top-bar.d.ts.map +1 -1
- package/dist/components/layout/top-bar/top-bar.js +16 -13
- package/dist/components/layout/top-bar/top-bar.js.map +1 -1
- package/dist/components/theme/appearance-panel.d.ts.map +1 -1
- package/dist/components/theme/appearance-panel.js +3 -1
- package/dist/components/theme/appearance-panel.js.map +1 -1
- package/dist/components/theme/theme-mode-toggle.d.ts.map +1 -1
- package/dist/components/theme/theme-mode-toggle.js +6 -3
- package/dist/components/theme/theme-mode-toggle.js.map +1 -1
- package/dist/components/theme/theme-toggle.d.ts.map +1 -1
- package/dist/components/theme/theme-toggle.js +6 -3
- package/dist/components/theme/theme-toggle.js.map +1 -1
- package/dist/components/ui/accordion/accordion.d.ts.map +1 -1
- package/dist/components/ui/accordion/accordion.js +3 -1
- package/dist/components/ui/accordion/accordion.js.map +1 -1
- package/dist/components/ui/alert/alert.d.ts.map +1 -1
- package/dist/components/ui/alert/alert.js +15 -9
- package/dist/components/ui/alert/alert.js.map +1 -1
- package/dist/components/ui/annotation-surface/annotation-surface.d.ts.map +1 -1
- package/dist/components/ui/annotation-surface/annotation-surface.js +5 -4
- package/dist/components/ui/annotation-surface/annotation-surface.js.map +1 -1
- package/dist/components/ui/attachment/attachment.d.ts.map +1 -1
- package/dist/components/ui/attachment/attachment.js +18 -9
- package/dist/components/ui/attachment/attachment.js.map +1 -1
- package/dist/components/ui/badge/badge.d.ts.map +1 -1
- package/dist/components/ui/badge/badge.js +30 -11
- package/dist/components/ui/badge/badge.js.map +1 -1
- package/dist/components/ui/breadcrumb/breadcrumb.d.ts.map +1 -1
- package/dist/components/ui/breadcrumb/breadcrumb.js +5 -2
- package/dist/components/ui/breadcrumb/breadcrumb.js.map +1 -1
- package/dist/components/ui/button/button.d.ts.map +1 -1
- package/dist/components/ui/button/button.js +37 -13
- package/dist/components/ui/button/button.js.map +1 -1
- package/dist/components/ui/calendar/calendar.d.ts.map +1 -1
- package/dist/components/ui/calendar/calendar.js +5 -2
- package/dist/components/ui/calendar/calendar.js.map +1 -1
- package/dist/components/ui/carousel/carousel.d.ts.map +1 -1
- package/dist/components/ui/carousel/carousel.js +12 -6
- package/dist/components/ui/carousel/carousel.js.map +1 -1
- package/dist/components/ui/checkbox/checkbox.d.ts +13 -0
- package/dist/components/ui/checkbox/checkbox.d.ts.map +1 -1
- package/dist/components/ui/checkbox/checkbox.js +296 -21
- package/dist/components/ui/checkbox/checkbox.js.map +1 -1
- package/dist/components/ui/code-block/code-block.d.ts.map +1 -1
- package/dist/components/ui/code-block/code-block.js +9 -6
- package/dist/components/ui/code-block/code-block.js.map +1 -1
- package/dist/components/ui/combobox/combobox.d.ts.map +1 -1
- package/dist/components/ui/combobox/combobox.js +8 -11
- package/dist/components/ui/combobox/combobox.js.map +1 -1
- package/dist/components/ui/command/command.d.ts.map +1 -1
- package/dist/components/ui/command/command.js +4 -2
- package/dist/components/ui/command/command.js.map +1 -1
- package/dist/components/ui/detail-panel/detail-panel.d.ts.map +1 -1
- package/dist/components/ui/detail-panel/detail-panel.js +3 -1
- package/dist/components/ui/detail-panel/detail-panel.js.map +1 -1
- package/dist/components/ui/dialog/dialog-layer.d.ts.map +1 -1
- package/dist/components/ui/dialog/dialog-layer.js +10 -10
- package/dist/components/ui/dialog/dialog-layer.js.map +1 -1
- package/dist/components/ui/dialog/dialog.d.ts.map +1 -1
- package/dist/components/ui/dialog/dialog.js +3 -1
- package/dist/components/ui/dialog/dialog.js.map +1 -1
- package/dist/components/ui/dropdown-menu/menu-parts.d.ts.map +1 -1
- package/dist/components/ui/dropdown-menu/menu-parts.js +7 -3
- package/dist/components/ui/dropdown-menu/menu-parts.js.map +1 -1
- package/dist/components/ui/empty/empty-state.d.ts.map +1 -1
- package/dist/components/ui/empty/empty-state.js +3 -1
- package/dist/components/ui/empty/empty-state.js.map +1 -1
- package/dist/components/ui/field/field.d.ts.map +1 -1
- package/dist/components/ui/field/field.js +12 -6
- package/dist/components/ui/field/field.js.map +1 -1
- package/dist/components/ui/input/input-control.d.ts +2 -0
- package/dist/components/ui/input/input-control.d.ts.map +1 -1
- package/dist/components/ui/input/input-control.js +24 -6
- package/dist/components/ui/input/input-control.js.map +1 -1
- package/dist/components/ui/input/input.d.ts.map +1 -1
- package/dist/components/ui/input/input.js +47 -48
- package/dist/components/ui/input/input.js.map +1 -1
- package/dist/components/ui/input-group/input-group.d.ts.map +1 -1
- package/dist/components/ui/input-group/input-group.js +1 -8
- package/dist/components/ui/input-group/input-group.js.map +1 -1
- package/dist/components/ui/kbd/kbd.d.ts +23 -10
- package/dist/components/ui/kbd/kbd.d.ts.map +1 -1
- package/dist/components/ui/kbd/kbd.js +42 -11
- package/dist/components/ui/kbd/kbd.js.map +1 -1
- package/dist/components/ui/message/index.d.ts +1 -1
- package/dist/components/ui/message/index.d.ts.map +1 -1
- package/dist/components/ui/message/index.js +2 -2
- package/dist/components/ui/message/message.d.ts.map +1 -1
- package/dist/components/ui/message/message.js +5 -3
- package/dist/components/ui/message/message.js.map +1 -1
- package/dist/components/ui/message/parse-message-text.d.ts +32 -0
- package/dist/components/ui/message/parse-message-text.d.ts.map +1 -1
- package/dist/components/ui/message/parse-message-text.js +63 -3
- package/dist/components/ui/message/parse-message-text.js.map +1 -1
- package/dist/components/ui/native-select/native-select.d.ts.map +1 -1
- package/dist/components/ui/native-select/native-select.js +4 -9
- package/dist/components/ui/native-select/native-select.js.map +1 -1
- package/dist/components/ui/navigation-menu/navigation-menu.d.ts.map +1 -1
- package/dist/components/ui/navigation-menu/navigation-menu.js +3 -1
- package/dist/components/ui/navigation-menu/navigation-menu.js.map +1 -1
- package/dist/components/ui/pagination/pagination.d.ts.map +1 -1
- package/dist/components/ui/pagination/pagination.js +7 -3
- package/dist/components/ui/pagination/pagination.js.map +1 -1
- package/dist/components/ui/questionnaire/questionnaire.d.ts.map +1 -1
- package/dist/components/ui/questionnaire/questionnaire.js +9 -4
- package/dist/components/ui/questionnaire/questionnaire.js.map +1 -1
- package/dist/components/ui/radio-group/radio-group.d.ts.map +1 -1
- package/dist/components/ui/radio-group/radio-group.js +4 -9
- package/dist/components/ui/radio-group/radio-group.js.map +1 -1
- package/dist/components/ui/resizable/resizable.d.ts.map +1 -1
- package/dist/components/ui/resizable/resizable.js +3 -1
- package/dist/components/ui/resizable/resizable.js.map +1 -1
- package/dist/components/ui/select/select.d.ts.map +1 -1
- package/dist/components/ui/select/select.js +7 -3
- package/dist/components/ui/select/select.js.map +1 -1
- package/dist/components/ui/sheet/sheet.d.ts.map +1 -1
- package/dist/components/ui/sheet/sheet.js +3 -1
- package/dist/components/ui/sheet/sheet.js.map +1 -1
- package/dist/components/ui/spinner/spinner.d.ts.map +1 -1
- package/dist/components/ui/spinner/spinner.js +3 -1
- package/dist/components/ui/spinner/spinner.js.map +1 -1
- package/dist/components/ui/status-chip/status-chip.d.ts.map +1 -1
- package/dist/components/ui/status-chip/status-chip.js +35 -30
- package/dist/components/ui/status-chip/status-chip.js.map +1 -1
- package/dist/components/ui/switch/switch.d.ts +7 -0
- package/dist/components/ui/switch/switch.d.ts.map +1 -1
- package/dist/components/ui/switch/switch.js +255 -17
- package/dist/components/ui/switch/switch.js.map +1 -1
- package/dist/components/ui/textarea/textarea.d.ts.map +1 -1
- package/dist/components/ui/textarea/textarea.js +1 -8
- package/dist/components/ui/textarea/textarea.js.map +1 -1
- package/dist/components/ui/toast/toast.d.ts.map +1 -1
- package/dist/components/ui/toast/toast.js +3 -1
- package/dist/components/ui/toast/toast.js.map +1 -1
- package/dist/components/ui/tooltip/deferred-tooltip.d.ts.map +1 -1
- package/dist/components/ui/tooltip/deferred-tooltip.js +10 -4
- package/dist/components/ui/tooltip/deferred-tooltip.js.map +1 -1
- package/dist/components/ui/tooltip/index.d.ts +1 -0
- package/dist/components/ui/tooltip/index.d.ts.map +1 -1
- package/dist/components/ui/tooltip/index.js +2 -1
- package/dist/components/ui/tooltip/lazy-tooltip.d.ts +40 -0
- package/dist/components/ui/tooltip/lazy-tooltip.d.ts.map +1 -0
- package/dist/components/ui/tooltip/lazy-tooltip.js +61 -0
- package/dist/components/ui/tooltip/lazy-tooltip.js.map +1 -0
- package/dist/components/ui/trace/trace.d.ts.map +1 -1
- package/dist/components/ui/trace/trace.js +82 -68
- package/dist/components/ui/trace/trace.js.map +1 -1
- package/dist/components/ui/typography/typography.d.ts +1 -1
- package/dist/components/ui/typography/typography.d.ts.map +1 -1
- package/dist/components/ui/typography/typography.js +5 -6
- package/dist/components/ui/typography/typography.js.map +1 -1
- package/dist/index.js +3 -2
- package/dist/lib/clipboard.d.ts.map +1 -1
- package/dist/lib/clipboard.js +3 -0
- package/dist/lib/clipboard.js.map +1 -1
- package/dist/lib/fast-icon.d.ts +18 -0
- package/dist/lib/fast-icon.d.ts.map +1 -0
- package/dist/lib/fast-icon.js +75 -0
- package/dist/lib/fast-icon.js.map +1 -0
- package/dist/lib/form-field.d.ts +1 -1
- package/dist/lib/form-field.js +3 -1
- package/dist/lib/form-field.js.map +1 -1
- package/dist/lib/observe-resize.d.ts +14 -0
- package/dist/lib/observe-resize.d.ts.map +1 -0
- package/dist/lib/observe-resize.js +19 -0
- package/dist/lib/observe-resize.js.map +1 -0
- package/dist/lib/overlay.d.ts +1 -1
- package/dist/lib/overlay.d.ts.map +1 -1
- package/dist/lib/overlay.js +1 -1
- package/dist/lib/overlay.js.map +1 -1
- package/dist/lint/index.d.ts +1 -0
- package/dist/lint/index.d.ts.map +1 -1
- package/dist/lint.js +251 -118
- package/dist/lint.js.map +1 -1
- package/dist/r/action-button.json +3 -1
- package/dist/r/floating-preview.json +2 -1
- package/dist/r/icon-picker.json +0 -1
- package/dist/r/lib.json +10 -0
- package/dist/r/model-selector.json +1 -0
- package/dist/r/plan.json +2 -1
- package/dist/r/queue.json +2 -1
- package/dist/r/registry.json +33 -9
- package/dist/r/scene-controls.json +2 -1
- package/dist/r/side-rail.json +1 -0
- package/dist/r/src/components/composites/about-dialog/about-dialog.tsx +5 -1
- package/dist/r/src/components/composites/accent-picker/accent-picker.tsx +22 -17
- package/dist/r/src/components/composites/account-menu/account-menu.tsx +21 -9
- package/dist/r/src/components/composites/action-button/action-button.tsx +38 -21
- package/dist/r/src/components/composites/appearance-editor/appearance-choices.tsx +7 -1
- package/dist/r/src/components/composites/appearance-editor/appearance-editor.tsx +13 -1
- package/dist/r/src/components/composites/appearance-editor/appearance-rows.tsx +13 -1
- package/dist/r/src/components/composites/appearance-editor/font-settings-group.tsx +13 -1
- package/dist/r/src/components/composites/catalog-browser/catalog-browser-group.tsx +11 -1
- package/dist/r/src/components/composites/catalog-browser/catalog-browser.tsx +11 -1
- package/dist/r/src/components/composites/chain-of-thought/chain-of-thought.tsx +5 -1
- package/dist/r/src/components/composites/chat/chat.tsx +11 -1
- package/dist/r/src/components/composites/checkpoint/checkpoint.tsx +5 -1
- package/dist/r/src/components/composites/confirmation/confirmation.tsx +15 -1
- package/dist/r/src/components/composites/context/context.tsx +9 -1
- package/dist/r/src/components/composites/file-tree/file-tree.tsx +11 -1
- package/dist/r/src/components/composites/help-center/help-center.tsx +5 -1
- package/dist/r/src/components/composites/icon-picker/icon-picker.tsx +59 -31
- package/dist/r/src/components/composites/icon-picker/shell-icons.ts +121 -59
- package/dist/r/src/components/composites/inline-citation/inline-citation.tsx +6 -1
- package/dist/r/src/components/composites/list-row/list-row-control.tsx +7 -5
- package/dist/r/src/components/composites/message-scroller/message-scroller.tsx +6 -1
- package/dist/r/src/components/composites/model-selector/model-selector.tsx +197 -11
- package/dist/r/src/components/composites/plan/plan.tsx +5 -1
- package/dist/r/src/components/composites/queue/queue.tsx +15 -1
- package/dist/r/src/components/composites/reasoning/reasoning.tsx +5 -1
- package/dist/r/src/components/composites/scene-controls/scene-controls.tsx +17 -1
- package/dist/r/src/components/composites/settings/settings.tsx +23 -14
- package/dist/r/src/components/composites/sources/sources.tsx +27 -20
- package/dist/r/src/components/composites/stack-trace/stack-trace.tsx +13 -1
- package/dist/r/src/components/composites/stat/stat.tsx +9 -1
- package/dist/r/src/components/composites/subagent/subagent.tsx +5 -1
- package/dist/r/src/components/composites/task/task.tsx +5 -1
- package/dist/r/src/components/composites/terminal/ansi.ts +18 -0
- package/dist/r/src/components/composites/terminal/terminal.tsx +17 -7
- package/dist/r/src/components/composites/test-results/test-results.tsx +17 -7
- package/dist/r/src/components/composites/tool/tool.tsx +5 -1
- package/dist/r/src/components/composites/tree/tree.tsx +5 -1
- package/dist/r/src/components/composites/update-dialog/update-dialog.tsx +35 -15
- package/dist/r/src/components/composites/workspace-mark/workspace-mark.tsx +14 -7
- package/dist/r/src/components/composites/workspace-switcher/workspace-reorder-dialog.tsx +6 -1
- package/dist/r/src/components/composites/workspace-switcher/workspace-switcher.tsx +13 -1
- package/dist/r/src/components/conversation/busy-send-button.tsx +11 -1
- package/dist/r/src/components/conversation/conversation-avatar.tsx +7 -1
- package/dist/r/src/components/conversation/conversation-surface.tsx +5 -1
- package/dist/r/src/components/conversation/internal/chat-composer-shell.tsx +13 -1
- package/dist/r/src/components/conversation/message-composer.tsx +13 -1
- package/dist/r/src/components/conversation/message-row.tsx +15 -1
- package/dist/r/src/components/conversation/thread-panel.tsx +5 -1
- package/dist/r/src/components/conversation/transcript-composition.tsx +5 -1
- package/dist/r/src/components/layout/floating-preview/floating-preview.tsx +6 -1
- package/dist/r/src/components/layout/pixel-resize-handle/pixel-resize-handle.tsx +5 -1
- package/dist/r/src/components/layout/shell-rail/shell-rail.tsx +5 -1
- package/dist/r/src/components/layout/side-rail/side-rail.tsx +16 -19
- package/dist/r/src/components/layout/sidebar-nav/sidebar-nav.tsx +5 -1
- package/dist/r/src/components/layout/split-layout/split-layout.tsx +6 -1
- package/dist/r/src/components/layout/top-bar/top-bar.tsx +8 -8
- package/dist/r/src/components/theme/appearance-panel.tsx +6 -1
- package/dist/r/src/components/theme/theme-mode-toggle.tsx +7 -1
- package/dist/r/src/components/theme/theme-toggle.tsx +7 -1
- package/dist/r/src/components/ui/accordion/accordion.tsx +5 -1
- package/dist/r/src/components/ui/alert/alert.tsx +20 -3
- package/dist/r/src/components/ui/annotation-surface/annotation-surface.tsx +6 -3
- package/dist/r/src/components/ui/attachment/attachment.tsx +19 -8
- package/dist/r/src/components/ui/badge/badge.tsx +24 -8
- package/dist/r/src/components/ui/breadcrumb/breadcrumb.tsx +9 -1
- package/dist/r/src/components/ui/button/button.tsx +47 -16
- package/dist/r/src/components/ui/calendar/calendar.tsx +6 -1
- package/dist/r/src/components/ui/carousel/carousel.tsx +15 -5
- package/dist/r/src/components/ui/checkbox/checkbox.tsx +260 -22
- package/dist/r/src/components/ui/code-block/code-block.tsx +11 -5
- package/dist/r/src/components/ui/combobox/combobox.tsx +8 -9
- package/dist/r/src/components/ui/command/command.tsx +8 -4
- package/dist/r/src/components/ui/detail-panel/detail-panel.tsx +5 -1
- package/dist/r/src/components/ui/dialog/dialog-layer.tsx +16 -18
- package/dist/r/src/components/ui/dialog/dialog.tsx +5 -1
- package/dist/r/src/components/ui/dropdown-menu/menu-parts.tsx +11 -1
- package/dist/r/src/components/ui/empty/empty-state.tsx +5 -1
- package/dist/r/src/components/ui/field/field.tsx +14 -5
- package/dist/r/src/components/ui/input/input-control.tsx +28 -19
- package/dist/r/src/components/ui/input/input.tsx +9 -12
- package/dist/r/src/components/ui/input-group/input-group.tsx +1 -8
- package/dist/r/src/components/ui/kbd/kbd.tsx +53 -12
- package/dist/r/src/components/ui/message/index.ts +3 -0
- package/dist/r/src/components/ui/message/message.tsx +11 -2
- package/dist/r/src/components/ui/message/parse-message-text.ts +94 -2
- package/dist/r/src/components/ui/native-select/native-select.tsx +6 -9
- package/dist/r/src/components/ui/navigation-menu/navigation-menu.tsx +5 -1
- package/dist/r/src/components/ui/pagination/pagination.tsx +11 -1
- package/dist/r/src/components/ui/questionnaire/questionnaire.tsx +13 -1
- package/dist/r/src/components/ui/radio-group/radio-group.tsx +6 -9
- package/dist/r/src/components/ui/resizable/resizable.tsx +5 -1
- package/dist/r/src/components/ui/select/select.tsx +11 -1
- package/dist/r/src/components/ui/sheet/sheet.tsx +5 -1
- package/dist/r/src/components/ui/spinner/spinner.tsx +5 -1
- package/dist/r/src/components/ui/status-chip/status-chip.tsx +14 -7
- package/dist/r/src/components/ui/switch/switch.tsx +235 -28
- package/dist/r/src/components/ui/textarea/textarea.tsx +1 -8
- package/dist/r/src/components/ui/toast/toast.tsx +5 -1
- package/dist/r/src/components/ui/tooltip/deferred-tooltip.tsx +14 -8
- package/dist/r/src/components/ui/tooltip/index.ts +1 -0
- package/dist/r/src/components/ui/tooltip/lazy-tooltip.tsx +73 -0
- package/dist/r/src/components/ui/trace/trace.tsx +61 -28
- package/dist/r/src/components/ui/typography/typography.tsx +6 -5
- package/dist/r/src/lib/clipboard.ts +4 -0
- package/dist/r/src/lib/fast-icon.ts +88 -0
- package/dist/r/src/lib/form-field.ts +7 -7
- package/dist/r/src/lib/observe-resize.ts +28 -0
- package/dist/r/src/lib/overlay.ts +1 -1
- package/dist/r/subagent.json +2 -1
- package/dist/r/tool.json +2 -1
- package/dist/r/tooltip.json +5 -0
- package/dist/r/top-bar.json +1 -0
- package/dist/r/trace.json +0 -1
- package/package.json +1 -1
- package/registry.json +33 -9
- package/src/components/composites/about-dialog/about-dialog.tsx +5 -1
- package/src/components/composites/accent-picker/accent-picker.tsx +22 -17
- package/src/components/composites/account-menu/account-menu.tsx +21 -9
- package/src/components/composites/action-button/action-button.tsx +38 -21
- package/src/components/composites/appearance-editor/appearance-choices.tsx +7 -1
- package/src/components/composites/appearance-editor/appearance-editor.tsx +13 -1
- package/src/components/composites/appearance-editor/appearance-rows.tsx +13 -1
- package/src/components/composites/appearance-editor/font-settings-group.tsx +13 -1
- package/src/components/composites/catalog-browser/catalog-browser-group.tsx +11 -1
- package/src/components/composites/catalog-browser/catalog-browser.tsx +11 -1
- package/src/components/composites/chain-of-thought/chain-of-thought.tsx +5 -1
- package/src/components/composites/chat/chat.tsx +11 -1
- package/src/components/composites/checkpoint/checkpoint.tsx +5 -1
- package/src/components/composites/confirmation/confirmation.tsx +15 -1
- package/src/components/composites/context/context.tsx +9 -1
- package/src/components/composites/file-tree/file-tree.tsx +11 -1
- package/src/components/composites/help-center/help-center.tsx +5 -1
- package/src/components/composites/icon-picker/icon-picker.tsx +59 -31
- package/src/components/composites/icon-picker/shell-icons.ts +121 -59
- package/src/components/composites/inline-citation/inline-citation.tsx +6 -1
- package/src/components/composites/list-row/list-row-control.tsx +7 -5
- package/src/components/composites/message-scroller/message-scroller.tsx +6 -1
- package/src/components/composites/model-selector/model-selector.tsx +197 -11
- package/src/components/composites/plan/plan.tsx +5 -1
- package/src/components/composites/queue/queue.tsx +15 -1
- package/src/components/composites/reasoning/reasoning.tsx +5 -1
- package/src/components/composites/scene-controls/scene-controls.tsx +17 -1
- package/src/components/composites/settings/settings.tsx +23 -14
- package/src/components/composites/sources/sources.tsx +27 -20
- package/src/components/composites/stack-trace/stack-trace.tsx +13 -1
- package/src/components/composites/stat/stat.tsx +9 -1
- package/src/components/composites/subagent/subagent.tsx +5 -1
- package/src/components/composites/task/task.tsx +5 -1
- package/src/components/composites/terminal/ansi.ts +18 -0
- package/src/components/composites/terminal/terminal.tsx +17 -7
- package/src/components/composites/test-results/test-results.tsx +17 -7
- package/src/components/composites/tool/tool.tsx +5 -1
- package/src/components/composites/tree/tree.tsx +5 -1
- package/src/components/composites/update-dialog/update-dialog.tsx +35 -15
- package/src/components/composites/workspace-mark/workspace-mark.tsx +14 -7
- package/src/components/composites/workspace-switcher/workspace-reorder-dialog.tsx +6 -1
- package/src/components/composites/workspace-switcher/workspace-switcher.tsx +13 -1
- package/src/components/conversation/busy-send-button.tsx +11 -1
- package/src/components/conversation/conversation-avatar.tsx +7 -1
- package/src/components/conversation/conversation-surface.tsx +5 -1
- package/src/components/conversation/internal/chat-composer-shell.tsx +13 -1
- package/src/components/conversation/message-composer.tsx +13 -1
- package/src/components/conversation/message-row.tsx +15 -1
- package/src/components/conversation/thread-panel.tsx +5 -1
- package/src/components/conversation/transcript-composition.tsx +5 -1
- package/src/components/layout/floating-preview/floating-preview.tsx +6 -1
- package/src/components/layout/pixel-resize-handle/pixel-resize-handle.tsx +5 -1
- package/src/components/layout/shell-rail/shell-rail.tsx +5 -1
- package/src/components/layout/side-rail/side-rail.tsx +16 -19
- package/src/components/layout/sidebar-nav/sidebar-nav.tsx +5 -1
- package/src/components/layout/split-layout/split-layout.tsx +6 -1
- package/src/components/layout/top-bar/top-bar.tsx +8 -8
- package/src/components/theme/appearance-panel.tsx +6 -1
- package/src/components/theme/theme-mode-toggle.tsx +7 -1
- package/src/components/theme/theme-toggle.tsx +7 -1
- package/src/components/ui/accordion/accordion.tsx +5 -1
- package/src/components/ui/alert/alert.tsx +20 -3
- package/src/components/ui/annotation-surface/annotation-surface.tsx +6 -3
- package/src/components/ui/attachment/attachment.tsx +19 -8
- package/src/components/ui/badge/badge.tsx +24 -8
- package/src/components/ui/breadcrumb/breadcrumb.tsx +9 -1
- package/src/components/ui/button/button.tsx +47 -16
- package/src/components/ui/calendar/calendar.tsx +6 -1
- package/src/components/ui/carousel/carousel.tsx +15 -5
- package/src/components/ui/checkbox/checkbox.tsx +260 -22
- package/src/components/ui/code-block/code-block.tsx +11 -5
- package/src/components/ui/combobox/combobox.tsx +8 -9
- package/src/components/ui/command/command.tsx +8 -4
- package/src/components/ui/detail-panel/detail-panel.tsx +5 -1
- package/src/components/ui/dialog/dialog-layer.tsx +16 -18
- package/src/components/ui/dialog/dialog.tsx +5 -1
- package/src/components/ui/dropdown-menu/menu-parts.tsx +11 -1
- package/src/components/ui/empty/empty-state.tsx +5 -1
- package/src/components/ui/field/field.tsx +14 -5
- package/src/components/ui/input/input-control.tsx +28 -19
- package/src/components/ui/input/input.tsx +9 -12
- package/src/components/ui/input-group/input-group.tsx +1 -8
- package/src/components/ui/kbd/kbd.tsx +53 -12
- package/src/components/ui/message/index.ts +3 -0
- package/src/components/ui/message/message.tsx +11 -2
- package/src/components/ui/message/parse-message-text.ts +94 -2
- package/src/components/ui/native-select/native-select.tsx +6 -9
- package/src/components/ui/navigation-menu/navigation-menu.tsx +5 -1
- package/src/components/ui/pagination/pagination.tsx +11 -1
- package/src/components/ui/questionnaire/questionnaire.tsx +13 -1
- package/src/components/ui/radio-group/radio-group.tsx +6 -9
- package/src/components/ui/resizable/resizable.tsx +5 -1
- package/src/components/ui/select/select.tsx +11 -1
- package/src/components/ui/sheet/sheet.tsx +5 -1
- package/src/components/ui/spinner/spinner.tsx +5 -1
- package/src/components/ui/status-chip/status-chip.tsx +14 -7
- package/src/components/ui/switch/switch.tsx +235 -28
- package/src/components/ui/textarea/textarea.tsx +1 -8
- package/src/components/ui/toast/toast.tsx +5 -1
- package/src/components/ui/tooltip/deferred-tooltip.tsx +14 -8
- package/src/components/ui/tooltip/index.ts +1 -0
- package/src/components/ui/tooltip/lazy-tooltip.tsx +73 -0
- package/src/components/ui/trace/trace.tsx +61 -28
- package/src/components/ui/typography/typography.tsx +6 -5
- package/src/lib/clipboard.ts +4 -0
- package/src/lib/fast-icon.ts +88 -0
- package/src/lib/form-field.ts +7 -7
- package/src/lib/observe-resize.ts +28 -0
- package/src/lib/overlay.ts +1 -1
- package/src/lint/index.ts +199 -0
|
@@ -74,14 +74,7 @@ export function Textarea(props: TextareaProps) {
|
|
|
74
74
|
'aria-invalid',
|
|
75
75
|
'aria-errormessage',
|
|
76
76
|
])
|
|
77
|
-
const field = useFormFieldControl('control',
|
|
78
|
-
id: local.id,
|
|
79
|
-
'aria-label': local['aria-label'],
|
|
80
|
-
'aria-labelledby': local['aria-labelledby'],
|
|
81
|
-
'aria-describedby': local['aria-describedby'],
|
|
82
|
-
'aria-invalid': local['aria-invalid'],
|
|
83
|
-
'aria-errormessage': local['aria-errormessage'],
|
|
84
|
-
})
|
|
77
|
+
const field = useFormFieldControl('control', local)
|
|
85
78
|
|
|
86
79
|
return (
|
|
87
80
|
<textarea
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import { Toast as KobalteToast, type ToastComponentProps, toaster } from '@kobalte/core/toast'
|
|
2
|
-
import { X } from 'lucide-solid'
|
|
2
|
+
import { X as LucideX } from 'lucide-solid'
|
|
3
3
|
import type { ComponentProps, JSX } from 'solid-js'
|
|
4
4
|
import { Show, splitProps } from 'solid-js'
|
|
5
5
|
import { cn } from '#lib/utils'
|
|
6
|
+
import { fastIcon } from '#lib/fast-icon'
|
|
7
|
+
|
|
8
|
+
// lucide icons drawn from a cloned template (see fastIcon).
|
|
9
|
+
const X = fastIcon(LucideX)
|
|
6
10
|
|
|
7
11
|
/**
|
|
8
12
|
* Toast.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Accessor, JSX } from 'solid-js'
|
|
2
|
-
import {
|
|
2
|
+
import { createSignal, onCleanup, splitProps, untrack } from 'solid-js'
|
|
3
3
|
import { isServer, spread } from 'solid-js/web'
|
|
4
4
|
import { callHandler } from '#lib/events'
|
|
5
5
|
import { acquireTooltipFocusGate, releaseTooltipFocusGate } from '#lib/tooltip-focus-gate'
|
|
@@ -58,16 +58,22 @@ export function createDeferredTooltip(options: {
|
|
|
58
58
|
const [armed, setArmed] = createSignal(false)
|
|
59
59
|
let replaying = false
|
|
60
60
|
|
|
61
|
-
// Held only
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
61
|
+
// Held only by a control that has a tooltip: a control without one needs no gate
|
|
62
|
+
// and no effect. A tooltip added later takes the gate when it first arms.
|
|
63
|
+
let holdsGate = false
|
|
64
|
+
const holdGate = () => {
|
|
65
|
+
if (holdsGate || isServer) return
|
|
66
|
+
holdsGate = true
|
|
67
|
+
acquireTooltipFocusGate()
|
|
68
|
+
}
|
|
69
|
+
if (untrack(options.enabled)) holdGate()
|
|
70
|
+
onCleanup(() => {
|
|
71
|
+
if (holdsGate) releaseTooltipFocusGate()
|
|
72
|
+
})
|
|
68
73
|
|
|
69
74
|
const arm = (replay: () => void) => {
|
|
70
75
|
if (armed() || !options.enabled()) return
|
|
76
|
+
holdGate()
|
|
71
77
|
setArmed(true)
|
|
72
78
|
replaying = true
|
|
73
79
|
try {
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import type { JSX } from 'solid-js'
|
|
2
|
+
import { createSignal, createUniqueId, Show } from 'solid-js'
|
|
3
|
+
import { createDeferredTooltip } from './deferred-tooltip'
|
|
4
|
+
import {
|
|
5
|
+
Tooltip,
|
|
6
|
+
TooltipContent,
|
|
7
|
+
TooltipTrigger,
|
|
8
|
+
type TooltipContentProps,
|
|
9
|
+
type TooltipRootProps,
|
|
10
|
+
} from './tooltip'
|
|
11
|
+
|
|
12
|
+
export type LazyTooltipTrigger = {
|
|
13
|
+
/** Pass as the control's `ref`. */
|
|
14
|
+
ref: (element: HTMLElement) => void
|
|
15
|
+
/** Pass as the control's `onPointerEnter`. */
|
|
16
|
+
onPointerEnter: (event: PointerEvent) => void
|
|
17
|
+
/** Pass as the control's `onFocus`. */
|
|
18
|
+
onFocus: (event: FocusEvent) => void
|
|
19
|
+
/** Pass as the control's `aria-describedby`: the tip's id while it is open. */
|
|
20
|
+
describedBy: () => string | undefined
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export type LazyTooltipProps = {
|
|
24
|
+
/** The tip. */
|
|
25
|
+
content: JSX.Element
|
|
26
|
+
placement?: TooltipRootProps['placement']
|
|
27
|
+
/** Extra props for the tooltip content (an icon, a class). */
|
|
28
|
+
contentProps?: Omit<TooltipContentProps, 'id' | 'children'>
|
|
29
|
+
/** Renders the control once, wired to the trigger handlers it is given. */
|
|
30
|
+
children: (trigger: LazyTooltipTrigger) => JSX.Element
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* A tooltip around a control that mounts on the control's first hover or focus.
|
|
35
|
+
*
|
|
36
|
+
* The packaged form of `createDeferredTooltip` for a control that always has a
|
|
37
|
+
* tip: a settings help button, a status chip, a rail mark. A page of them
|
|
38
|
+
* renders plain controls and builds a Kobalte tooltip only for the ones a
|
|
39
|
+
* pointer or keyboard actually reaches.
|
|
40
|
+
*
|
|
41
|
+
* ```tsx
|
|
42
|
+
* <LazyTooltip content="Saved locally">
|
|
43
|
+
* {(tip) => (
|
|
44
|
+
* <button ref={tip.ref} onPointerEnter={tip.onPointerEnter} onFocus={tip.onFocus}
|
|
45
|
+
* aria-describedby={tip.describedBy()}>…</button>
|
|
46
|
+
* )}
|
|
47
|
+
* </LazyTooltip>
|
|
48
|
+
* ```
|
|
49
|
+
*/
|
|
50
|
+
export function LazyTooltip(props: LazyTooltipProps) {
|
|
51
|
+
const [open, setOpen] = createSignal(false)
|
|
52
|
+
const id = `lazy-tooltip-${createUniqueId()}`
|
|
53
|
+
const deferred = createDeferredTooltip({ enabled: () => true })
|
|
54
|
+
const control = props.children({
|
|
55
|
+
ref: deferred.ref,
|
|
56
|
+
onPointerEnter: deferred.onPointerEnter,
|
|
57
|
+
onFocus: deferred.onFocus,
|
|
58
|
+
describedBy: () => (open() ? id : undefined),
|
|
59
|
+
})
|
|
60
|
+
return (
|
|
61
|
+
<>
|
|
62
|
+
{control}
|
|
63
|
+
<Show when={deferred.armed()}>
|
|
64
|
+
<Tooltip placement={props.placement} open={open()} onOpenChange={setOpen}>
|
|
65
|
+
<TooltipTrigger as={deferred.Target} />
|
|
66
|
+
<TooltipContent {...props.contentProps} id={id}>
|
|
67
|
+
{props.content}
|
|
68
|
+
</TooltipContent>
|
|
69
|
+
</Tooltip>
|
|
70
|
+
</Show>
|
|
71
|
+
</>
|
|
72
|
+
)
|
|
73
|
+
}
|
|
@@ -1,17 +1,35 @@
|
|
|
1
|
-
import { Collapsible as KobalteCollapsible } from '@kobalte/core/collapsible'
|
|
2
1
|
import {
|
|
3
|
-
Check,
|
|
4
|
-
ChevronRight,
|
|
5
|
-
CircleAlert,
|
|
6
|
-
CircleDashed,
|
|
7
|
-
CircleSlash,
|
|
8
|
-
Dot,
|
|
9
|
-
ExternalLink,
|
|
10
|
-
LoaderCircle,
|
|
2
|
+
Check as LucideCheck,
|
|
3
|
+
ChevronRight as LucideChevronRight,
|
|
4
|
+
CircleAlert as LucideCircleAlert,
|
|
5
|
+
CircleDashed as LucideCircleDashed,
|
|
6
|
+
CircleSlash as LucideCircleSlash,
|
|
7
|
+
Dot as LucideDot,
|
|
8
|
+
ExternalLink as LucideExternalLink,
|
|
9
|
+
LoaderCircle as LucideLoaderCircle,
|
|
11
10
|
} from 'lucide-solid'
|
|
12
|
-
import {
|
|
11
|
+
import {
|
|
12
|
+
createMemo,
|
|
13
|
+
createSignal,
|
|
14
|
+
createUniqueId,
|
|
15
|
+
Show,
|
|
16
|
+
splitProps,
|
|
17
|
+
type ComponentProps,
|
|
18
|
+
type JSX,
|
|
19
|
+
} from 'solid-js'
|
|
13
20
|
import { cn } from '#lib/utils'
|
|
14
21
|
import { CodeBlock, type CodeLineMark } from '../code-block'
|
|
22
|
+
import { fastIcon } from '#lib/fast-icon'
|
|
23
|
+
|
|
24
|
+
// lucide icons drawn from a cloned template (see fastIcon).
|
|
25
|
+
const Check = fastIcon(LucideCheck)
|
|
26
|
+
const ChevronRight = fastIcon(LucideChevronRight)
|
|
27
|
+
const CircleAlert = fastIcon(LucideCircleAlert)
|
|
28
|
+
const CircleDashed = fastIcon(LucideCircleDashed)
|
|
29
|
+
const CircleSlash = fastIcon(LucideCircleSlash)
|
|
30
|
+
const Dot = fastIcon(LucideDot)
|
|
31
|
+
const ExternalLink = fastIcon(LucideExternalLink)
|
|
32
|
+
const LoaderCircle = fastIcon(LucideLoaderCircle)
|
|
15
33
|
|
|
16
34
|
/**
|
|
17
35
|
* Trace.
|
|
@@ -295,6 +313,16 @@ export function TraceLine(props: TraceLineProps) {
|
|
|
295
313
|
// closed, still makes the line a disclosure, and a lazy body is not run until
|
|
296
314
|
// `insert` places it.
|
|
297
315
|
const content = createMemo(() => local.children as JSX.Element)
|
|
316
|
+
// A plain disclosure: a button with aria-expanded and a region mounted while open.
|
|
317
|
+
// Kobalte's Collapsible cost a polymorphic button, a presence tracker and three
|
|
318
|
+
// contexts per line, more than the rest of the line put together.
|
|
319
|
+
const [ownOpen, setOwnOpen] = createSignal(local.defaultOpen ?? false)
|
|
320
|
+
const isOpen = () => local.open ?? ownOpen()
|
|
321
|
+
const setOpen = (next: boolean) => {
|
|
322
|
+
if (local.open === undefined) setOwnOpen(next)
|
|
323
|
+
local.onOpenChange?.(next)
|
|
324
|
+
}
|
|
325
|
+
const contentId = createUniqueId()
|
|
298
326
|
const head = (trailing?: JSX.Element) => (
|
|
299
327
|
<LineHead
|
|
300
328
|
title={local.title}
|
|
@@ -346,31 +374,36 @@ export function TraceLine(props: TraceLineProps) {
|
|
|
346
374
|
}
|
|
347
375
|
>
|
|
348
376
|
<Show when={content()} fallback={<div class={lineClass}>{head()}</div>}>
|
|
349
|
-
<
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
377
|
+
<div class="group/trace" data-expanded={isOpen() ? '' : undefined}>
|
|
378
|
+
<button
|
|
379
|
+
type="button"
|
|
380
|
+
aria-expanded={isOpen()}
|
|
381
|
+
aria-controls={isOpen() ? contentId : undefined}
|
|
382
|
+
class={cn(lineClass, interactiveClass)}
|
|
383
|
+
onClick={() => setOpen(!isOpen())}
|
|
384
|
+
>
|
|
356
385
|
{head(
|
|
357
386
|
<ChevronRight
|
|
358
387
|
aria-hidden="true"
|
|
359
388
|
class="size-3.5 shrink-0 text-muted-foreground transition-transform ease-out group-data-[expanded]/trace:rotate-90"
|
|
360
389
|
/>
|
|
361
390
|
)}
|
|
362
|
-
</
|
|
363
|
-
<
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
{
|
|
391
|
+
</button>
|
|
392
|
+
<Show when={isOpen()}>
|
|
393
|
+
<div
|
|
394
|
+
id={contentId}
|
|
395
|
+
data-slot="trace-content"
|
|
396
|
+
data-expanded=""
|
|
397
|
+
class="overflow-hidden animate-in fade-in-0"
|
|
398
|
+
>
|
|
399
|
+
{/* The rail is drawn from the mark's centre, so a nested line reads as
|
|
400
|
+
belonging to the one above it without an indent that eats the width. */}
|
|
401
|
+
<div class="ms-[0.6875rem] mt-0.5 mb-1 flex min-w-0 flex-col gap-1 border-s border-border ps-3">
|
|
402
|
+
{content()}
|
|
403
|
+
</div>
|
|
371
404
|
</div>
|
|
372
|
-
</
|
|
373
|
-
</
|
|
405
|
+
</Show>
|
|
406
|
+
</div>
|
|
374
407
|
</Show>
|
|
375
408
|
</Show>
|
|
376
409
|
</Show>
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { PolymorphicProps } from '@kobalte/core/polymorphic'
|
|
2
2
|
import { type ComponentProps, splitProps, type ValidComponent } from 'solid-js'
|
|
3
|
+
import { Dynamic } from 'solid-js/web'
|
|
3
4
|
import { cva, type VariantProps } from '#lib/variants'
|
|
4
5
|
import { cn } from '#lib/utils'
|
|
5
6
|
|
|
@@ -100,8 +101,8 @@ export function Heading<T extends ValidComponent = 'h2'>(props: HeadingProps<T>)
|
|
|
100
101
|
])
|
|
101
102
|
|
|
102
103
|
return (
|
|
103
|
-
<
|
|
104
|
-
|
|
104
|
+
<Dynamic
|
|
105
|
+
component={local.as ?? headingElement[(local.size ?? 'section') as HeadingSize]}
|
|
105
106
|
data-slot="heading"
|
|
106
107
|
class={cn(
|
|
107
108
|
headingVariants({
|
|
@@ -206,8 +207,8 @@ export function Text<T extends ValidComponent = 'p'>(props: TextProps<T>) {
|
|
|
206
207
|
])
|
|
207
208
|
|
|
208
209
|
return (
|
|
209
|
-
<
|
|
210
|
-
|
|
210
|
+
<Dynamic
|
|
211
|
+
component={local.as ?? textElement[(local.variant ?? 'body') as TextVariant]}
|
|
211
212
|
data-slot="text"
|
|
212
213
|
class={cn(
|
|
213
214
|
textVariants({
|
package/src/lib/clipboard.ts
CHANGED
|
@@ -63,17 +63,21 @@ export function createCopyFeedback(): CopyFeedback {
|
|
|
63
63
|
if (timer !== undefined) clearTimeout(timer)
|
|
64
64
|
timer = undefined
|
|
65
65
|
}
|
|
66
|
+
// Copies can finish out of order; only the newest one may set the feedback.
|
|
67
|
+
let latest = 0
|
|
66
68
|
if (getOwner()) onCleanup(clear)
|
|
67
69
|
return {
|
|
68
70
|
copied,
|
|
69
71
|
failed,
|
|
70
72
|
async copy(text) {
|
|
73
|
+
const attempt = ++latest
|
|
71
74
|
let ok = true
|
|
72
75
|
try {
|
|
73
76
|
await writeClipboardText(text)
|
|
74
77
|
} catch {
|
|
75
78
|
ok = false
|
|
76
79
|
}
|
|
80
|
+
if (attempt !== latest) return ok
|
|
77
81
|
clear()
|
|
78
82
|
setCopied(ok)
|
|
79
83
|
setFailed(!ok)
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import type { JSX } from 'solid-js'
|
|
2
|
+
import { createRoot, mergeProps, splitProps } from 'solid-js'
|
|
3
|
+
import { isServer, spread } from 'solid-js/web'
|
|
4
|
+
|
|
5
|
+
type IconComponent = (props: JSX.SvgSVGAttributes<SVGSVGElement>) => JSX.Element
|
|
6
|
+
// lucide's own drawing props: an icon given one keeps lucide's component.
|
|
7
|
+
const DRAWING = [
|
|
8
|
+
'size',
|
|
9
|
+
'color',
|
|
10
|
+
'strokeWidth',
|
|
11
|
+
'absoluteStrokeWidth',
|
|
12
|
+
'nonScalingStroke',
|
|
13
|
+
'width',
|
|
14
|
+
'height',
|
|
15
|
+
]
|
|
16
|
+
type Captured = { attributes: [string, string][]; className: string; body: DocumentFragment }
|
|
17
|
+
|
|
18
|
+
const captured = new WeakMap<IconComponent, Captured>()
|
|
19
|
+
const A11Y = /^(aria-|role$|title$)/
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* The same lucide icon, built by cloning a template instead of by components.
|
|
23
|
+
*
|
|
24
|
+
* lucide-solid builds every icon as a `<For>` of `<Dynamic>` children, one
|
|
25
|
+
* component and one spread effect per path. A plain six-path icon cost as much
|
|
26
|
+
* to mount as a Button, and a transcript row spent a quarter of its mount time
|
|
27
|
+
* in its avatar's icon. The paths never change, so they are drawn once per icon
|
|
28
|
+
* and cloned after that; only the outer `<svg>` takes props.
|
|
29
|
+
*
|
|
30
|
+
* The first instance renders the lucide component itself and records what it
|
|
31
|
+
* drew, so the markup (attributes, class names, path keys) stays exactly
|
|
32
|
+
* lucide's. Props that change the drawing (`size`, `color`, `strokeWidth`,
|
|
33
|
+
* `absoluteStrokeWidth`) or a `LucideProvider` are not supported: those callers
|
|
34
|
+
* keep the lucide component. On the server the lucide component renders as is.
|
|
35
|
+
*/
|
|
36
|
+
export function fastIcon<T extends (props: never) => JSX.Element>(LucideIcon: T): T {
|
|
37
|
+
const Icon = LucideIcon as unknown as IconComponent
|
|
38
|
+
const Fast = (props: JSX.SvgSVGAttributes<SVGSVGElement>) => {
|
|
39
|
+
// Children (a <title>), drawing props and the server keep lucide's component.
|
|
40
|
+
if (isServer || props.children !== undefined || DRAWING.some((key) => key in props))
|
|
41
|
+
return Icon(props)
|
|
42
|
+
const template = capture(Icon)
|
|
43
|
+
const [local, rest] = splitProps(props, ['class'])
|
|
44
|
+
const svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg')
|
|
45
|
+
let labelled = false
|
|
46
|
+
for (const key in rest) if (A11Y.test(key)) labelled = true
|
|
47
|
+
for (const [name, value] of template.attributes) svg.setAttribute(name, value)
|
|
48
|
+
svg.append(template.body.cloneNode(true))
|
|
49
|
+
// In lucide's order: its attributes, the class, aria-hidden, then the caller's.
|
|
50
|
+
spread(
|
|
51
|
+
svg,
|
|
52
|
+
mergeProps(
|
|
53
|
+
{
|
|
54
|
+
get class() {
|
|
55
|
+
return local.class ? `${template.className} ${local.class}` : template.className
|
|
56
|
+
},
|
|
57
|
+
...(labelled ? {} : { 'aria-hidden': 'true' }),
|
|
58
|
+
},
|
|
59
|
+
rest
|
|
60
|
+
) as never,
|
|
61
|
+
true,
|
|
62
|
+
true
|
|
63
|
+
)
|
|
64
|
+
return svg as unknown as JSX.Element
|
|
65
|
+
}
|
|
66
|
+
return Fast as unknown as T
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
function capture(Icon: IconComponent): Captured {
|
|
70
|
+
const known = captured.get(Icon)
|
|
71
|
+
if (known) return known
|
|
72
|
+
const svg = createRoot((dispose) => {
|
|
73
|
+
const element = Icon({}) as unknown as SVGSVGElement
|
|
74
|
+
dispose()
|
|
75
|
+
return element
|
|
76
|
+
})
|
|
77
|
+
const attributes: [string, string][] = []
|
|
78
|
+
let className = ''
|
|
79
|
+
for (const attribute of Array.from(svg.attributes)) {
|
|
80
|
+
if (attribute.name === 'class') className = attribute.value
|
|
81
|
+
else if (attribute.name !== 'aria-hidden') attributes.push([attribute.name, attribute.value])
|
|
82
|
+
}
|
|
83
|
+
const body = document.createDocumentFragment()
|
|
84
|
+
for (const child of Array.from(svg.childNodes)) body.append(child.cloneNode(true))
|
|
85
|
+
const result = { attributes, className, body }
|
|
86
|
+
captured.set(Icon, result)
|
|
87
|
+
return result
|
|
88
|
+
}
|
package/src/lib/form-field.ts
CHANGED
|
@@ -71,15 +71,15 @@ export function useFormFieldControl(
|
|
|
71
71
|
|
|
72
72
|
const groupedDescendant = field.group() && kind !== 'group'
|
|
73
73
|
const id = groupedDescendant ? props.id : field.registerControlId(props.id)
|
|
74
|
-
const labelledBy =
|
|
75
|
-
props['aria-label'] || props['aria-labelledby']
|
|
76
|
-
? props['aria-labelledby']
|
|
77
|
-
: groupedDescendant
|
|
78
|
-
? undefined
|
|
79
|
-
: field.labelId
|
|
80
74
|
return {
|
|
81
75
|
id,
|
|
82
|
-
'aria-labelledby'
|
|
76
|
+
get 'aria-labelledby'() {
|
|
77
|
+
return props['aria-label'] || props['aria-labelledby']
|
|
78
|
+
? props['aria-labelledby']
|
|
79
|
+
: groupedDescendant
|
|
80
|
+
? undefined
|
|
81
|
+
: field.labelId
|
|
82
|
+
},
|
|
83
83
|
get 'aria-describedby'() {
|
|
84
84
|
return mergeIds(props['aria-describedby'], field.describedBy())
|
|
85
85
|
},
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Watch an element's size through one ResizeObserver shared by every caller.
|
|
3
|
+
*
|
|
4
|
+
* A component that creates its own observer per instance pays for one observer
|
|
5
|
+
* object, one browser registration and one delivery callback per mount; a reply
|
|
6
|
+
* with a dozen code blocks made a dozen. The shared observer delivers every
|
|
7
|
+
* changed element in one batch per frame and calls each element's callback.
|
|
8
|
+
*
|
|
9
|
+
* Returns a function that stops watching. Outside a browser it does nothing.
|
|
10
|
+
*/
|
|
11
|
+
type ResizeCallback = (entry: ResizeObserverEntry) => void
|
|
12
|
+
|
|
13
|
+
let shared: ResizeObserver | undefined
|
|
14
|
+
const callbacks = new WeakMap<Element, ResizeCallback>()
|
|
15
|
+
|
|
16
|
+
export function observeResize(element: Element, callback: ResizeCallback): () => void {
|
|
17
|
+
if (typeof ResizeObserver === 'undefined') return () => {}
|
|
18
|
+
shared ??= new ResizeObserver((entries) => {
|
|
19
|
+
for (const entry of entries) callbacks.get(entry.target)?.(entry)
|
|
20
|
+
})
|
|
21
|
+
callbacks.set(element, callback)
|
|
22
|
+
shared.observe(element)
|
|
23
|
+
return () => {
|
|
24
|
+
if (callbacks.get(element) !== callback) return
|
|
25
|
+
callbacks.delete(element)
|
|
26
|
+
shared?.unobserve(element)
|
|
27
|
+
}
|
|
28
|
+
}
|
package/src/lib/overlay.ts
CHANGED
|
@@ -130,7 +130,7 @@ export const menuLabel =
|
|
|
130
130
|
'px-2 py-1.5 text-2xs font-medium tracking-wide text-muted-foreground uppercase'
|
|
131
131
|
|
|
132
132
|
/** The chord drawn at a row's trailing edge: menus and the command palette. */
|
|
133
|
-
export const menuShortcut = 'text-muted-foreground ms-auto
|
|
133
|
+
export const menuShortcut = 'text-muted-foreground ms-auto text-xs tracking-widest'
|
|
134
134
|
|
|
135
135
|
/** The rule between menu groups. */
|
|
136
136
|
export const menuSeparator = 'bg-border -mx-1 my-1 h-px'
|