@adea-ai/ui 0.162.6 → 0.162.8
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/components/composites/about-dialog/about-dialog.js +5 -5
- package/dist/components/composites/about-dialog/about-dialog.js.map +1 -1
- package/dist/components/composites/accent-picker/accent-picker.js +3 -3
- package/dist/components/composites/accent-picker/accent-picker.js.map +1 -1
- package/dist/components/composites/accent-picker/custom-color-popover.js +2 -2
- package/dist/components/composites/accent-picker/custom-color-popover.js.map +1 -1
- package/dist/components/composites/account-menu/account-menu.js +22 -22
- package/dist/components/composites/account-menu/account-menu.js.map +1 -1
- package/dist/components/composites/action-button/action-button.js +2 -2
- package/dist/components/composites/action-button/action-button.js.map +1 -1
- package/dist/components/composites/appearance-editor/accent-swatch-groups.js +3 -3
- package/dist/components/composites/appearance-editor/accent-swatch-groups.js.map +1 -1
- package/dist/components/composites/appearance-editor/appearance-choices.js +10 -10
- package/dist/components/composites/appearance-editor/appearance-choices.js.map +1 -1
- package/dist/components/composites/appearance-editor/appearance-editor.js +13 -13
- package/dist/components/composites/appearance-editor/appearance-editor.js.map +1 -1
- package/dist/components/composites/appearance-editor/appearance-rows.js +12 -12
- package/dist/components/composites/appearance-editor/appearance-rows.js.map +1 -1
- package/dist/components/composites/appearance-editor/font-settings-group.js +13 -13
- package/dist/components/composites/appearance-editor/font-settings-group.js.map +1 -1
- package/dist/components/composites/appearance-editor/theme-preview.js +1 -1
- package/dist/components/composites/appearance-editor/theme-preview.js.map +1 -1
- package/dist/components/composites/catalog-browser/catalog-browser-group.js +9 -9
- package/dist/components/composites/catalog-browser/catalog-browser-group.js.map +1 -1
- package/dist/components/composites/catalog-browser/catalog-browser.js +10 -10
- package/dist/components/composites/catalog-browser/catalog-browser.js.map +1 -1
- package/dist/components/composites/catalog-browser/catalog-detail.js +1 -1
- package/dist/components/composites/catalog-browser/catalog-detail.js.map +1 -1
- package/dist/components/composites/chain-of-thought/chain-of-thought.js +5 -5
- package/dist/components/composites/chain-of-thought/chain-of-thought.js.map +1 -1
- package/dist/components/composites/chat/chat.js +7 -7
- package/dist/components/composites/chat/chat.js.map +1 -1
- package/dist/components/composites/checkpoint/checkpoint.js +5 -5
- package/dist/components/composites/checkpoint/checkpoint.js.map +1 -1
- package/dist/components/composites/confirmation/confirmation.js +13 -13
- package/dist/components/composites/confirmation/confirmation.js.map +1 -1
- package/dist/components/composites/context/context.js +7 -7
- package/dist/components/composites/context/context.js.map +1 -1
- package/dist/components/composites/file-tree/build-file-tree.js +1 -1
- package/dist/components/composites/file-tree/build-file-tree.js.map +1 -1
- package/dist/components/composites/file-tree/file-tree.js +9 -9
- package/dist/components/composites/file-tree/file-tree.js.map +1 -1
- package/dist/components/composites/help-center/help-center.js +5 -5
- package/dist/components/composites/help-center/help-center.js.map +1 -1
- package/dist/components/composites/icon-picker/icon-picker.js +10 -10
- package/dist/components/composites/icon-picker/icon-picker.js.map +1 -1
- package/dist/components/composites/icon-picker/image-data-url.js.map +1 -1
- package/dist/components/composites/icon-picker/shell-icons.js +117 -117
- package/dist/components/composites/icon-picker/shell-icons.js.map +1 -1
- package/dist/components/composites/inline-citation/inline-citation.js +7 -7
- package/dist/components/composites/inline-citation/inline-citation.js.map +1 -1
- package/dist/components/composites/list-row/list-row-control.js +1 -1
- package/dist/components/composites/list-row/list-row-control.js.map +1 -1
- package/dist/components/composites/list-row/list-row.js +2 -2
- package/dist/components/composites/list-row/list-row.js.map +1 -1
- package/dist/components/composites/message-scroller/message-scroller.js +7 -7
- package/dist/components/composites/message-scroller/message-scroller.js.map +1 -1
- package/dist/components/composites/message-scroller/scroll-anchor.js +1 -1
- package/dist/components/composites/message-scroller/scroll-anchor.js.map +1 -1
- package/dist/components/composites/model-selector/model-selector.js +12 -12
- package/dist/components/composites/model-selector/model-selector.js.map +1 -1
- package/dist/components/composites/plan/plan.js +5 -5
- package/dist/components/composites/plan/plan.js.map +1 -1
- package/dist/components/composites/prompt-input/prompt-input.js +3 -3
- package/dist/components/composites/prompt-input/prompt-input.js.map +1 -1
- package/dist/components/composites/queue/queue.js +13 -13
- package/dist/components/composites/queue/queue.js.map +1 -1
- package/dist/components/composites/reasoning/reasoning.js +5 -5
- package/dist/components/composites/reasoning/reasoning.js.map +1 -1
- package/dist/components/composites/scene-controls/scene-controls.js +16 -16
- package/dist/components/composites/scene-controls/scene-controls.js.map +1 -1
- package/dist/components/composites/settings/settings-layout.js +2 -2
- package/dist/components/composites/settings/settings-layout.js.map +1 -1
- package/dist/components/composites/settings/settings-navigation.js +2 -2
- package/dist/components/composites/settings/settings-navigation.js.map +1 -1
- package/dist/components/composites/settings/settings.js +5 -5
- package/dist/components/composites/settings/settings.js.map +1 -1
- package/dist/components/composites/sources/sources.js +5 -5
- package/dist/components/composites/sources/sources.js.map +1 -1
- package/dist/components/composites/stack-trace/parse-stack-trace.js +2 -2
- package/dist/components/composites/stack-trace/parse-stack-trace.js.map +1 -1
- package/dist/components/composites/stack-trace/stack-trace.js +10 -10
- package/dist/components/composites/stack-trace/stack-trace.js.map +1 -1
- package/dist/components/composites/stat/stat.js +6 -6
- package/dist/components/composites/stat/stat.js.map +1 -1
- package/dist/components/composites/subagent/subagent.js +5 -5
- package/dist/components/composites/subagent/subagent.js.map +1 -1
- package/dist/components/composites/suggestion/suggestion.js +2 -2
- package/dist/components/composites/suggestion/suggestion.js.map +1 -1
- package/dist/components/composites/task/task.js +5 -5
- package/dist/components/composites/task/task.js.map +1 -1
- package/dist/components/composites/terminal/ansi.js +1 -1
- package/dist/components/composites/terminal/ansi.js.map +1 -1
- package/dist/components/composites/terminal/terminal.js +18 -18
- package/dist/components/composites/terminal/terminal.js.map +1 -1
- package/dist/components/composites/test-results/test-results.js +17 -17
- package/dist/components/composites/test-results/test-results.js.map +1 -1
- package/dist/components/composites/tool/tool.js +5 -5
- package/dist/components/composites/tool/tool.js.map +1 -1
- package/dist/components/composites/tree/tree.js +6 -6
- package/dist/components/composites/tree/tree.js.map +1 -1
- package/dist/components/composites/update-dialog/channel-control.js +1 -1
- package/dist/components/composites/update-dialog/channel-control.js.map +1 -1
- package/dist/components/composites/update-dialog/update-dialog.js +23 -23
- package/dist/components/composites/update-dialog/update-dialog.js.map +1 -1
- package/dist/components/composites/workspace-mark/workspace-mark.js +2 -2
- package/dist/components/composites/workspace-mark/workspace-mark.js.map +1 -1
- package/dist/components/composites/workspace-switcher/workspace-reorder-dialog.js +6 -6
- package/dist/components/composites/workspace-switcher/workspace-reorder-dialog.js.map +1 -1
- package/dist/components/composites/workspace-switcher/workspace-switcher.js +11 -11
- package/dist/components/composites/workspace-switcher/workspace-switcher.js.map +1 -1
- package/dist/components/conversation/atomic/chat-composer.js +1 -1
- package/dist/components/conversation/busy-send-button.js +10 -10
- package/dist/components/conversation/busy-send-button.js.map +1 -1
- package/dist/components/conversation/chat-composer.js +1 -1
- package/dist/components/conversation/composer-core.js +1 -1
- package/dist/components/conversation/composer-menu.js +2 -2
- package/dist/components/conversation/composer-menu.js.map +1 -1
- package/dist/components/conversation/conversation-avatar.js +7 -7
- package/dist/components/conversation/conversation-avatar.js.map +1 -1
- package/dist/components/conversation/conversation-pane.js +1 -1
- package/dist/components/conversation/conversation-pane.js.map +1 -1
- package/dist/components/conversation/conversation-surface.js +5 -5
- package/dist/components/conversation/conversation-surface.js.map +1 -1
- package/dist/components/conversation/internal/chat-composer-shell.js +9 -9
- package/dist/components/conversation/internal/chat-composer-shell.js.map +1 -1
- package/dist/components/conversation/message-composer.js +9 -9
- package/dist/components/conversation/message-composer.js.map +1 -1
- package/dist/components/conversation/message-row.js +13 -13
- package/dist/components/conversation/message-row.js.map +1 -1
- package/dist/components/conversation/paste-token-editor.js +1 -1
- package/dist/components/conversation/paste-token-editor.js.map +1 -1
- package/dist/components/conversation/scroll-follow.js +1 -1
- package/dist/components/conversation/thread-panel.js +5 -5
- package/dist/components/conversation/thread-panel.js.map +1 -1
- package/dist/components/conversation/transcript-composition.js +5 -5
- package/dist/components/conversation/transcript-composition.js.map +1 -1
- package/dist/components/layout/app-shell/app-shell.js +1 -1
- package/dist/components/layout/app-shell/app-shell.js.map +1 -1
- package/dist/components/layout/app-shell/skip-link.js +1 -1
- package/dist/components/layout/app-shell/skip-link.js.map +1 -1
- package/dist/components/layout/contextual-sidebar/contextual-sidebar.js +2 -2
- package/dist/components/layout/contextual-sidebar/contextual-sidebar.js.map +1 -1
- package/dist/components/layout/contextual-sidebar/mobile-contextual-sidebar.js +1 -1
- package/dist/components/layout/floating-preview/floating-preview.js +7 -7
- package/dist/components/layout/floating-preview/floating-preview.js.map +1 -1
- package/dist/components/layout/orbit-layout/orbit-layout.js +1 -1
- package/dist/components/layout/orbit-layout/orbit-layout.js.map +1 -1
- package/dist/components/layout/page/page.js +2 -2
- package/dist/components/layout/page/page.js.map +1 -1
- package/dist/components/layout/panel/panel.js +1 -1
- package/dist/components/layout/panel/panel.js.map +1 -1
- package/dist/components/layout/pixel-pane/pixel-pane.js +1 -1
- package/dist/components/layout/pixel-resize-handle/pixel-resize-handle.js +5 -5
- package/dist/components/layout/pixel-resize-handle/pixel-resize-handle.js.map +1 -1
- package/dist/components/layout/shell-rail/shell-rail.js +5 -5
- package/dist/components/layout/shell-rail/shell-rail.js.map +1 -1
- package/dist/components/layout/shell-top-bar/shell-top-bar.js +2 -2
- package/dist/components/layout/shell-top-bar/shell-top-bar.js.map +1 -1
- package/dist/components/layout/side-rail/side-rail.js +2 -2
- package/dist/components/layout/side-rail/side-rail.js.map +1 -1
- package/dist/components/layout/sidebar-nav/sidebar-nav-resize-handle.js +1 -1
- package/dist/components/layout/sidebar-nav/sidebar-nav.js +5 -5
- package/dist/components/layout/sidebar-nav/sidebar-nav.js.map +1 -1
- package/dist/components/layout/split-layout/pane-focus.js.map +1 -1
- package/dist/components/layout/split-layout/resize-controller-core-retry.js +1 -1
- package/dist/components/layout/split-layout/resize-controller-core-retry.js.map +1 -1
- package/dist/components/layout/split-layout/resize-controller-core.js +1 -1
- package/dist/components/layout/split-layout/resize-controller-core.js.map +1 -1
- package/dist/components/layout/split-layout/split-layout.js +7 -7
- package/dist/components/layout/split-layout/split-layout.js.map +1 -1
- package/dist/components/layout/status-bar/status-bar.js +1 -1
- package/dist/components/layout/status-bar/status-bar.js.map +1 -1
- package/dist/components/layout/top-bar/top-bar.js +5 -5
- package/dist/components/layout/top-bar/top-bar.js.map +1 -1
- package/dist/components/layout/virtual-window/virtual-window.js +1 -1
- package/dist/components/layout/virtual-window/virtual-window.js.map +1 -1
- package/dist/components/motion/presence.js +1 -1
- package/dist/components/theme/appearance-panel.js +3 -3
- package/dist/components/theme/appearance-panel.js.map +1 -1
- package/dist/components/theme/lazy.js +3 -3
- package/dist/components/theme/lazy.js.map +1 -1
- package/dist/components/theme/script-projection.js +1 -1
- package/dist/components/theme/theme-catalogue-source.js +1 -1
- package/dist/components/theme/theme-document.js.map +1 -1
- package/dist/components/theme/theme-mode-toggle.js +7 -7
- package/dist/components/theme/theme-mode-toggle.js.map +1 -1
- package/dist/components/theme/theme-picker.js +2 -2
- package/dist/components/theme/theme-picker.js.map +1 -1
- package/dist/components/theme/theme-provider-value.js +1 -1
- package/dist/components/theme/theme-provider-value.js.map +1 -1
- package/dist/components/theme/theme-provider.js +1 -1
- package/dist/components/theme/theme-toggle.js +7 -7
- package/dist/components/theme/theme-toggle.js.map +1 -1
- package/dist/components/ui/accordion/accordion.js +13 -13
- package/dist/components/ui/accordion/accordion.js.map +1 -1
- package/dist/components/ui/alert/alert.js +12 -12
- package/dist/components/ui/alert/alert.js.map +1 -1
- package/dist/components/ui/alert-dialog/alert-dialog.js +14 -14
- package/dist/components/ui/alert-dialog/alert-dialog.js.map +1 -1
- package/dist/components/ui/annotation-surface/annotation-surface.js +2 -2
- package/dist/components/ui/annotation-surface/annotation-surface.js.map +1 -1
- package/dist/components/ui/aspect-ratio/aspect-ratio.js +1 -1
- package/dist/components/ui/aspect-ratio/aspect-ratio.js.map +1 -1
- package/dist/components/ui/attachment/attachment.js +16 -16
- package/dist/components/ui/attachment/attachment.js.map +1 -1
- package/dist/components/ui/avatar/avatar.js +1 -1
- package/dist/components/ui/avatar/avatar.js.map +1 -1
- package/dist/components/ui/badge/badge.js +2 -2
- package/dist/components/ui/badge/badge.js.map +1 -1
- package/dist/components/ui/board/board.js +2 -2
- package/dist/components/ui/board/board.js.map +1 -1
- package/dist/components/ui/breadcrumb/breadcrumb.js +7 -7
- package/dist/components/ui/breadcrumb/breadcrumb.js.map +1 -1
- package/dist/components/ui/bubble/bubble.js +2 -2
- package/dist/components/ui/bubble/bubble.js.map +1 -1
- package/dist/components/ui/button/button.js +2 -2
- package/dist/components/ui/button-group/button-group.js +2 -2
- package/dist/components/ui/button-group/button-group.js.map +1 -1
- package/dist/components/ui/calendar/calendar.js +8 -8
- package/dist/components/ui/calendar/calendar.js.map +1 -1
- package/dist/components/ui/callout/callout.js +2 -2
- package/dist/components/ui/callout/callout.js.map +1 -1
- package/dist/components/ui/card/card.js +2 -2
- package/dist/components/ui/card/card.js.map +1 -1
- package/dist/components/ui/carousel/carousel.js +8 -8
- package/dist/components/ui/carousel/carousel.js.map +1 -1
- package/dist/components/ui/chart/chart.js +2 -2
- package/dist/components/ui/chart/chart.js.map +1 -1
- package/dist/components/ui/checkbox/checkbox.js +6 -6
- package/dist/components/ui/checkbox/checkbox.js.map +1 -1
- package/dist/components/ui/code-block/code-block.js +6 -6
- package/dist/components/ui/code-block/code-block.js.map +1 -1
- package/dist/components/ui/collapsible/collapsible.js +7 -7
- package/dist/components/ui/collapsible/collapsible.js.map +1 -1
- package/dist/components/ui/combobox/combobox.js +21 -21
- package/dist/components/ui/combobox/combobox.js.map +1 -1
- package/dist/components/ui/combobox/value-combobox.js +1 -1
- package/dist/components/ui/command/command.js +23 -23
- package/dist/components/ui/command/command.js.map +1 -1
- package/dist/components/ui/context-menu/context-menu.js +2 -2
- package/dist/components/ui/detail-panel/detail-panel.js +5 -5
- package/dist/components/ui/detail-panel/detail-panel.js.map +1 -1
- package/dist/components/ui/dialog/dialog-layer.js +2 -2
- package/dist/components/ui/dialog/dialog-layer.js.map +1 -1
- package/dist/components/ui/dialog/dialog.js +21 -21
- package/dist/components/ui/dialog/dialog.js.map +1 -1
- package/dist/components/ui/diff-block/diff-block.js +2 -2
- package/dist/components/ui/diff-block/diff-block.js.map +1 -1
- package/dist/components/ui/drawer/drawer.js +14 -14
- package/dist/components/ui/drawer/drawer.js.map +1 -1
- package/dist/components/ui/dropdown-menu/dropdown-menu.js +3 -3
- package/dist/components/ui/dropdown-menu/menu-parts.js +10 -10
- package/dist/components/ui/dropdown-menu/menu-parts.js.map +1 -1
- package/dist/components/ui/empty/empty-state.js +5 -5
- package/dist/components/ui/empty/empty-state.js.map +1 -1
- package/dist/components/ui/empty/empty.js +1 -1
- package/dist/components/ui/empty/empty.js.map +1 -1
- package/dist/components/ui/entity-icon/entity-icon.js +2 -2
- package/dist/components/ui/entity-icon/entity-icon.js.map +1 -1
- package/dist/components/ui/field/field.js +14 -14
- package/dist/components/ui/field/field.js.map +1 -1
- package/dist/components/ui/field/number-field.js +2 -2
- package/dist/components/ui/field/number-field.js.map +1 -1
- package/dist/components/ui/hover-card/hover-card.js +10 -10
- package/dist/components/ui/hover-card/hover-card.js.map +1 -1
- package/dist/components/ui/input/input-control.js +1 -1
- package/dist/components/ui/input/input-control.js.map +1 -1
- package/dist/components/ui/input/input.js +2 -2
- package/dist/components/ui/input/input.js.map +1 -1
- package/dist/components/ui/input-group/input-group.js +2 -2
- package/dist/components/ui/input-group/input-group.js.map +1 -1
- package/dist/components/ui/input-group/secret-input-group.js +2 -2
- package/dist/components/ui/input-otp/input-otp.js +2 -2
- package/dist/components/ui/input-otp/input-otp.js.map +1 -1
- package/dist/components/ui/item/item.js +2 -2
- package/dist/components/ui/item/item.js.map +1 -1
- package/dist/components/ui/kbd/kbd.js +2 -2
- package/dist/components/ui/kbd/kbd.js.map +1 -1
- package/dist/components/ui/label/label.js +1 -1
- package/dist/components/ui/label/label.js.map +1 -1
- package/dist/components/ui/marker/marker.js +2 -2
- package/dist/components/ui/marker/marker.js.map +1 -1
- package/dist/components/ui/menubar/menubar.js +7 -7
- package/dist/components/ui/menubar/menubar.js.map +1 -1
- package/dist/components/ui/message/message.js +3 -3
- package/dist/components/ui/message/message.js.map +1 -1
- package/dist/components/ui/modal-dialog/modal-dialog.js +2 -2
- package/dist/components/ui/modal-dialog/modal-dialog.js.map +1 -1
- package/dist/components/ui/native-select/native-select.js +5 -5
- package/dist/components/ui/native-select/native-select.js.map +1 -1
- package/dist/components/ui/navigation-menu/navigation-menu.js +18 -18
- package/dist/components/ui/navigation-menu/navigation-menu.js.map +1 -1
- package/dist/components/ui/pagination/pagination.js +28 -28
- package/dist/components/ui/pagination/pagination.js.map +1 -1
- package/dist/components/ui/popover/popover.js +15 -15
- package/dist/components/ui/popover/popover.js.map +1 -1
- package/dist/components/ui/progress/progress.js +5 -5
- package/dist/components/ui/progress/progress.js.map +1 -1
- package/dist/components/ui/questionnaire/questionnaire.js +10 -10
- package/dist/components/ui/questionnaire/questionnaire.js.map +1 -1
- package/dist/components/ui/radio-group/radio-group.js +9 -9
- package/dist/components/ui/radio-group/radio-group.js.map +1 -1
- package/dist/components/ui/resizable/resizable.js +11 -11
- package/dist/components/ui/resizable/resizable.js.map +1 -1
- package/dist/components/ui/scroll-area/scroll-area.js +1 -1
- package/dist/components/ui/scroll-area/scroll-area.js.map +1 -1
- package/dist/components/ui/select/select.js +21 -21
- package/dist/components/ui/select/select.js.map +1 -1
- package/dist/components/ui/separator/separator.js +5 -5
- package/dist/components/ui/separator/separator.js.map +1 -1
- package/dist/components/ui/sheet/sheet.js +6 -6
- package/dist/components/ui/sheet/sheet.js.map +1 -1
- package/dist/components/ui/skeleton/skeleton.js +1 -1
- package/dist/components/ui/skeleton/skeleton.js.map +1 -1
- package/dist/components/ui/slider/slider.js +5 -5
- package/dist/components/ui/slider/slider.js.map +1 -1
- package/dist/components/ui/spinner/spinner.js +5 -5
- package/dist/components/ui/spinner/spinner.js.map +1 -1
- package/dist/components/ui/status-chip/status-chip.js +2 -2
- package/dist/components/ui/status-chip/status-chip.js.map +1 -1
- package/dist/components/ui/switch/switch.js +4 -4
- package/dist/components/ui/switch/switch.js.map +1 -1
- package/dist/components/ui/table/table.js +1 -1
- package/dist/components/ui/table/table.js.map +1 -1
- package/dist/components/ui/tabs/tabs.js +7 -7
- package/dist/components/ui/tabs/tabs.js.map +1 -1
- package/dist/components/ui/text-link/text-link.js +1 -1
- package/dist/components/ui/text-link/text-link.js.map +1 -1
- package/dist/components/ui/textarea/textarea.js +2 -2
- package/dist/components/ui/textarea/textarea.js.map +1 -1
- package/dist/components/ui/toast/toast.js +7 -7
- package/dist/components/ui/toast/toast.js.map +1 -1
- package/dist/components/ui/toggle/toggle.js +6 -6
- package/dist/components/ui/toggle/toggle.js.map +1 -1
- package/dist/components/ui/toggle-group/toggle-group.js +7 -8
- package/dist/components/ui/toggle-group/toggle-group.js.map +1 -1
- package/dist/components/ui/tooltip/deferred-tooltip.js +6 -6
- package/dist/components/ui/tooltip/deferred-tooltip.js.map +1 -1
- package/dist/components/ui/tooltip/lazy-tooltip.js +2 -2
- package/dist/components/ui/tooltip/tooltip.js +10 -10
- package/dist/components/ui/tooltip/tooltip.js.map +1 -1
- package/dist/components/ui/trace/trace.js +19 -19
- package/dist/components/ui/trace/trace.js.map +1 -1
- package/dist/components/ui/typography/typography.js +2 -2
- package/dist/lib/accent-presets.js +1 -1
- package/dist/lib/accent-roles.js +2 -2
- package/dist/lib/async-action.js +1 -1
- package/dist/lib/create-poll.js +1 -1
- package/dist/lib/create-poll.js.map +1 -1
- package/dist/lib/external-link.js +1 -1
- package/dist/lib/external-link.js.map +1 -1
- package/dist/lib/fast-icon.js +1 -1
- package/dist/lib/theme-css.js +1 -1
- package/dist/lib/theme-engine-light.js +1 -1
- package/dist/lib/theme-projection.js +2 -2
- package/dist/lib/theme-records.js +1 -1
- package/dist/lib/themes.js +1 -1
- package/dist/lib/themes.js.map +1 -1
- package/dist/lib/tooltip-focus-gate.js.map +1 -1
- package/dist/lib/utils.js +1 -1
- package/dist/vite/source-parser.js +1 -1
- package/dist/vite/tailwind-sources.js +1 -1
- package/package.json +7 -7
|
@@ -1,15 +1,15 @@
|
|
|
1
|
+
import { createComponent, effect, insert, memo, ref, setAttribute, setStyleProperty, template } from "@solidjs/web";
|
|
2
|
+
import { createEffect, createSignal, onSettled } from "solid-js";
|
|
3
|
+
import { Move as Move$1, X as X$1 } from "@lucide/solid";
|
|
1
4
|
import { ActionButton } from "../../composites/action-button/action-button.js";
|
|
2
5
|
import { ScrollArea } from "../../ui/scroll-area/scroll-area.js";
|
|
3
6
|
import { resizeFloatingPreview, resolveFloatingPreviewFrame } from "./model.js";
|
|
4
7
|
import { fastIcon } from "../../../lib/fast-icon.js";
|
|
5
|
-
import { createComponent, effect, insert, memo, ref, setAttribute, setStyleProperty, template } from "@solidjs/web";
|
|
6
|
-
import { Move, X } from "@lucide/solid";
|
|
7
|
-
import { createEffect, createSignal, onSettled } from "solid-js";
|
|
8
8
|
// src/components/layout/floating-preview/floating-preview.tsx
|
|
9
9
|
var _tmpl$ = /* @__PURE__ */ template(`<div class="pointer-events-none absolute inset-0 z-(--z-sticky) overflow-hidden"><section class="pointer-events-auto absolute flex flex-col overflow-visible rounded-lg border border-border bg-card text-card-foreground shadow-lg"><header class="flex h-control-sm items-center gap-1 border-b border-border p-1"><div class="flex items-center gap-1"></div><!></header><!><!>`);
|
|
10
10
|
var _tmpl$2 = /* @__PURE__ */ template(`<span aria-hidden=true>`);
|
|
11
|
-
var Move
|
|
12
|
-
var X
|
|
11
|
+
var Move = fastIcon(Move$1);
|
|
12
|
+
var X = fastIcon(X$1);
|
|
13
13
|
var directions = [
|
|
14
14
|
{
|
|
15
15
|
direction: "north",
|
|
@@ -206,7 +206,7 @@ function FloatingPreview(props) {
|
|
|
206
206
|
onLostPointerCapture: end,
|
|
207
207
|
onKeyDown: keyboardMove,
|
|
208
208
|
get children() {
|
|
209
|
-
return [createComponent(Move
|
|
209
|
+
return [createComponent(Move, { "aria-hidden": "true" }), "Move"];
|
|
210
210
|
}
|
|
211
211
|
}), _el$4);
|
|
212
212
|
insert(_el$4, () => {
|
|
@@ -231,7 +231,7 @@ function FloatingPreview(props) {
|
|
|
231
231
|
return props.onClose;
|
|
232
232
|
},
|
|
233
233
|
get children() {
|
|
234
|
-
return createComponent(X
|
|
234
|
+
return createComponent(X, { "aria-hidden": "true" });
|
|
235
235
|
}
|
|
236
236
|
}) : props.onClose;
|
|
237
237
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"floating-preview.js","names":["ref={bounds}","<ActionButton\n type=\"button\"\n variant=\"ghost\"\n size=\"sm\"\n class=\"flex-1 cursor-move touch-none\"\n aria-label={`Move ${props.label}`}\n tooltip={`Move ${props.label}. Use arrow keys to adjust its position.`}\n onPointerDown={(event) => start(event, null)}\n onPointerMove={move}\n onPointerUp={end}\n onPointerCancel={end}\n onLostPointerCapture={end}\n onKeyDown={keyboardMove}\n >\n <>\n <Move aria-hidden=\"true\" />\n Move\n </>\n </ActionButton>","type=\"button\"","variant=\"ghost\"","size=\"sm\"","class=\"flex-1 cursor-move touch-none\"","onPointerDown={(event) => start(event, null)}","onPointerMove={move}","onPointerUp={end}","onPointerCancel={end}","onLostPointerCapture={end}","onKeyDown={keyboardMove}","<Move aria-hidden=\"true\" />","<header class=\"flex h-control-sm items-center gap-1 border-b border-border p-1\">\n <ActionButton\n type=\"button\"\n variant=\"ghost\"\n size=\"sm\"\n class=\"flex-1 cursor-move touch-none\"\n aria-label={`Move ${props.label}`}\n tooltip={`Move ${props.label}. Use arrow keys to adjust its position.`}\n onPointerDown={(event) => start(event, null)}\n onPointerMove={move}\n onPointerUp={end}\n onPointerCancel={end}\n onLostPointerCapture={end}\n onKeyDown={keyboardMove}\n >\n <>\n <Move aria-hidden=\"true\" />\n Move\n </>\n </ActionButton>\n <div class=\"flex items-center gap-1\">{props.actions}</div>\n {props.onClose && (\n <ActionButton\n type=\"button\"\n variant=\"ghost\"\n size=\"icon-sm\"\n aria-label={`Close ${props.label}`}\n tooltip={`Close ${props.label}.`}\n onClick={props.onClose}\n >\n <X aria-hidden=\"true\" />\n </ActionButton>\n )}\n </header>","<ActionButton\n type=\"button\"\n variant=\"ghost\"\n size=\"icon-sm\"\n aria-label={`Close ${props.label}`}\n tooltip={`Close ${props.label}.`}\n onClick={props.onClose}\n >\n <X aria-hidden=\"true\" />\n </ActionButton>","size=\"icon-sm\"","<X aria-hidden=\"true\" />","<ScrollArea role=\"region\" aria-label={`${props.label} content`} class=\"flex-1\" tabindex={0}>\n {props.children}\n </ScrollArea>","role=\"region\"","class=\"flex-1\"","tabindex={0}","<section\n class=\"pointer-events-auto absolute flex flex-col overflow-visible rounded-lg border border-border bg-card text-card-foreground shadow-lg\"\n aria-label={props.label}\n style={{\n left: `${frame().x}px`,\n top: `${frame().y}px`,\n width: `${frame().width}px`,\n height: `${frame().height}px`,\n }}\n >\n <header class=\"flex h-control-sm items-center gap-1 border-b border-border p-1\">\n <ActionButton\n type=\"button\"\n variant=\"ghost\"\n size=\"sm\"\n class=\"flex-1 cursor-move touch-none\"\n aria-label={`Move ${props.label}`}\n tooltip={`Move ${props.label}. Use arrow keys to adjust its position.`}\n onPointerDown={(event) => start(event, null)}\n onPointerMove={move}\n onPointerUp={end}\n onPointerCancel={end}\n onLostPointerCapture={end}\n onKeyDown={keyboardMove}\n >\n <>\n <Move aria-hidden=\"true\" />\n Move\n </>\n </ActionButton>\n <div class=\"flex items-center gap-1\">{props.actions}</div>\n {props.onClose && (\n <ActionButton\n type=\"button\"\n variant=\"ghost\"\n size=\"icon-sm\"\n aria-label={`Close ${props.label}`}\n tooltip={`Close ${props.label}.`}\n onClick={props.onClose}\n >\n <X aria-hidden=\"true\" />\n </ActionButton>\n )}\n </header>\n <ScrollArea role=\"region\" aria-label={`${props.label} content`} class=\"flex-1\" tabindex={0}>\n {props.children}\n </ScrollArea>\n {directions.map(({ direction, class: className, glyph }) => (\n <ActionButton\n type=\"button\"\n variant=\"ghost\"\n size=\"icon-sm\"\n class={className}\n data-direction={direction}\n aria-label={`Resize ${props.label} ${direction}`}\n tooltip={`Resize ${props.label} from the ${direction} edge. Use arrow keys to resize.`}\n onPointerDown={(event) => start(event, direction)}\n onPointerMove={move}\n onPointerUp={end}\n onPointerCancel={end}\n onLostPointerCapture={end}\n onKeyDown={(event) => keyboardResize(event, direction)}\n >\n <span aria-hidden=\"true\">{glyph}</span>\n </ActionButton>\n ))}\n </section>","<ActionButton\n type=\"button\"\n variant=\"ghost\"\n size=\"icon-sm\"\n class={className}\n data-direction={direction}\n aria-label={`Resize ${props.label} ${direction}`}\n tooltip={`Resize ${props.label} from the ${direction} edge. Use arrow keys to resize.`}\n onPointerDown={(event) => start(event, direction)}\n onPointerMove={move}\n onPointerUp={end}\n onPointerCancel={end}\n onLostPointerCapture={end}\n onKeyDown={(event) => keyboardResize(event, direction)}\n >\n <span aria-hidden=\"true\">{glyph}</span>\n </ActionButton>","class={className}","onPointerDown={(event) => start(event, direction)}","onKeyDown={(event) => keyboardResize(event, direction)}","<span aria-hidden=\"true\">{glyph}</span>","aria-label={props.label}","left: `${frame().x}px`","top: `${frame().y}px`","width: `${frame().width}px`","height: `${frame().height}px`","<div\n ref={bounds}\n class=\"pointer-events-none absolute inset-0 z-(--z-sticky) overflow-hidden\"\n aria-label={props.label}\n >\n <section\n class=\"pointer-events-auto absolute flex flex-col overflow-visible rounded-lg border border-border bg-card text-card-foreground shadow-lg\"\n aria-label={props.label}\n style={{\n left: `${frame().x}px`,\n top: `${frame().y}px`,\n width: `${frame().width}px`,\n height: `${frame().height}px`,\n }}\n >\n <header class=\"flex h-control-sm items-center gap-1 border-b border-border p-1\">\n <ActionButton\n type=\"button\"\n variant=\"ghost\"\n size=\"sm\"\n class=\"flex-1 cursor-move touch-none\"\n aria-label={`Move ${props.label}`}\n tooltip={`Move ${props.label}. Use arrow keys to adjust its position.`}\n onPointerDown={(event) => start(event, null)}\n onPointerMove={move}\n onPointerUp={end}\n onPointerCancel={end}\n onLostPointerCapture={end}\n onKeyDown={keyboardMove}\n >\n <>\n <Move aria-hidden=\"true\" />\n Move\n </>\n </ActionButton>\n <div class=\"flex items-center gap-1\">{props.actions}</div>\n {props.onClose && (\n <ActionButton\n type=\"button\"\n variant=\"ghost\"\n size=\"icon-sm\"\n aria-label={`Close ${props.label}`}\n tooltip={`Close ${props.label}.`}\n onClick={props.onClose}\n >\n <X aria-hidden=\"true\" />\n </ActionButton>\n )}\n </header>\n <ScrollArea role=\"region\" aria-label={`${props.label} content`} class=\"flex-1\" tabindex={0}>\n {props.children}\n </ScrollArea>\n {directions.map(({ direction, class: className, glyph }) => (\n <ActionButton\n type=\"button\"\n variant=\"ghost\"\n size=\"icon-sm\"\n class={className}\n data-direction={direction}\n aria-label={`Resize ${props.label} ${direction}`}\n tooltip={`Resize ${props.label} from the ${direction} edge. Use arrow keys to resize.`}\n onPointerDown={(event) => start(event, direction)}\n onPointerMove={move}\n onPointerUp={end}\n onPointerCancel={end}\n onLostPointerCapture={end}\n onKeyDown={(event) => keyboardResize(event, direction)}\n >\n <span aria-hidden=\"true\">{glyph}</span>\n </ActionButton>\n ))}\n </section>\n </div>","Move","LucideMove","X","LucideX","_$setAttribute","_$setStyleProperty"],"sources":["../../../../src/components/layout/floating-preview/floating-preview.tsx"],"sourcesContent":["import { createEffect, createSignal, onSettled } from 'solid-js'\nimport { type JSX } from '@solidjs/web'\nimport { Move as LucideMove, X as LucideX } from '@lucide/solid'\nimport { ActionButton } from '../../composites/action-button'\nimport { ScrollArea } from '../../ui/scroll-area'\nimport {\n type FloatingPreviewFrame,\n type FloatingPreviewResizeDirection,\n type FloatingPreviewSize,\n resolveFloatingPreviewFrame,\n resizeFloatingPreview,\n} from './model'\nimport { fastIcon } from '#lib/fast-icon'\n\n// lucide icons drawn from a cloned template (see fastIcon).\nconst Move = fastIcon(LucideMove)\nconst X = fastIcon(LucideX)\n\nconst directions: readonly {\n direction: FloatingPreviewResizeDirection\n class: string\n glyph: string\n}[] = [\n {\n direction: 'north',\n class: 'absolute -top-3 right-6 left-6 h-control-xs w-auto cursor-ns-resize touch-none',\n glyph: '↕',\n },\n {\n direction: 'south',\n class: 'absolute -bottom-3 right-6 left-6 h-control-xs w-auto cursor-ns-resize touch-none',\n glyph: '↕',\n },\n {\n direction: 'east',\n class: 'absolute -right-3 top-6 bottom-6 w-6 h-auto cursor-ew-resize touch-none',\n glyph: '↔',\n },\n {\n direction: 'west',\n class: 'absolute -left-3 top-6 bottom-6 w-6 h-auto cursor-ew-resize touch-none',\n glyph: '↔',\n },\n {\n direction: 'northwest',\n class: 'absolute -top-3 -left-3 size-control-xs cursor-nwse-resize touch-none',\n glyph: '↖',\n },\n {\n direction: 'northeast',\n class: 'absolute -top-3 -right-3 size-control-xs cursor-nesw-resize touch-none',\n glyph: '↗',\n },\n {\n direction: 'southwest',\n class: 'absolute -bottom-3 -left-3 size-control-xs cursor-nesw-resize touch-none',\n glyph: '↙',\n },\n {\n direction: 'southeast',\n class: 'absolute -bottom-3 -right-3 size-control-xs cursor-nwse-resize touch-none',\n glyph: '↘',\n },\n]\n\nexport type FloatingPreviewProps = {\n label: string\n source: FloatingPreviewSize\n onClose?: () => void\n actions?: JSX.Element\n children: JSX.Element\n}\n\n/** A host-bounded movable preview frame. Content and actions remain caller-owned. */\nexport function FloatingPreview(props: FloatingPreviewProps) {\n const [frame, setFrame] = createSignal<FloatingPreviewFrame>({ x: 0, y: 0, width: 1, height: 1 })\n // oxlint-disable-next-line no-unassigned-vars -- assigned through Solid's ref callback.\n let bounds: HTMLDivElement | undefined\n let gesture:\n | {\n id: number\n x: number\n y: number\n start: FloatingPreviewFrame\n direction: FloatingPreviewResizeDirection | null\n }\n | undefined\n\n const measure = () => {\n const rect = bounds?.getBoundingClientRect()\n if (!rect) return\n setFrame((current) =>\n resolveFloatingPreviewFrame({\n width: current.width > 1 ? current.width : null,\n position: current.width > 1 ? { x: current.x, y: current.y } : null,\n source: props.source,\n container: { width: rect.width, height: rect.height },\n })\n )\n }\n // Re-fit when the source dimensions change; the first fit happens once the\n // frame is mounted and measurable, below.\n createEffect(\n () => [props.source.width, props.source.height] as const,\n () => measure(),\n { defer: true }\n )\n onSettled(() => {\n if (!bounds) return\n const observer = new ResizeObserver(measure)\n observer.observe(bounds)\n measure()\n return () => observer.disconnect()\n })\n\n function start(event: PointerEvent, direction: FloatingPreviewResizeDirection | null) {\n if (event.button !== 0 || gesture) return\n event.preventDefault()\n event.stopPropagation()\n gesture = { id: event.pointerId, x: event.clientX, y: event.clientY, start: frame(), direction }\n ;(event.currentTarget as HTMLElement).setPointerCapture(event.pointerId)\n }\n function move(event: PointerEvent) {\n if (!gesture || gesture.id !== event.pointerId) return\n const rect = bounds?.getBoundingClientRect()\n if (!rect) return\n const container = { width: rect.width, height: rect.height }\n const delta = { x: event.clientX - gesture.x, y: event.clientY - gesture.y }\n setFrame(\n gesture.direction\n ? resizeFloatingPreview({\n start: gesture.start,\n direction: gesture.direction,\n delta,\n source: props.source,\n container,\n })\n : resolveFloatingPreviewFrame({\n width: gesture.start.width,\n position: { x: gesture.start.x + delta.x, y: gesture.start.y + delta.y },\n source: props.source,\n container,\n })\n )\n }\n function end(event: PointerEvent) {\n if (gesture?.id === event.pointerId) gesture = undefined\n }\n function keyboardMove(event: KeyboardEvent) {\n const delta = { x: 0, y: 0 }\n if (event.key === 'ArrowLeft') delta.x = -10\n else if (event.key === 'ArrowRight') delta.x = 10\n else if (event.key === 'ArrowUp') delta.y = -10\n else if (event.key === 'ArrowDown') delta.y = 10\n else return\n event.preventDefault()\n const rect = bounds?.getBoundingClientRect()\n if (!rect) return\n const current = frame()\n setFrame(\n resolveFloatingPreviewFrame({\n width: current.width,\n position: { x: current.x + delta.x, y: current.y + delta.y },\n source: props.source,\n container: { width: rect.width, height: rect.height },\n })\n )\n }\n function keyboardResize(event: KeyboardEvent, direction: FloatingPreviewResizeDirection) {\n if (!event.key.startsWith('Arrow')) return\n event.preventDefault()\n const rect = bounds?.getBoundingClientRect()\n if (!rect) return\n const delta = {\n x: event.key === 'ArrowRight' ? 10 : event.key === 'ArrowLeft' ? -10 : 0,\n y: event.key === 'ArrowDown' ? 10 : event.key === 'ArrowUp' ? -10 : 0,\n }\n setFrame(\n resizeFloatingPreview({\n start: frame(),\n direction,\n delta,\n source: props.source,\n container: { width: rect.width, height: rect.height },\n })\n )\n }\n\n return (\n <div\n ref={bounds}\n class=\"pointer-events-none absolute inset-0 z-(--z-sticky) overflow-hidden\"\n aria-label={props.label}\n >\n <section\n class=\"pointer-events-auto absolute flex flex-col overflow-visible rounded-lg border border-border bg-card text-card-foreground shadow-lg\"\n aria-label={props.label}\n style={{\n left: `${frame().x}px`,\n top: `${frame().y}px`,\n width: `${frame().width}px`,\n height: `${frame().height}px`,\n }}\n >\n <header class=\"flex h-control-sm items-center gap-1 border-b border-border p-1\">\n <ActionButton\n type=\"button\"\n variant=\"ghost\"\n size=\"sm\"\n class=\"flex-1 cursor-move touch-none\"\n aria-label={`Move ${props.label}`}\n tooltip={`Move ${props.label}. Use arrow keys to adjust its position.`}\n onPointerDown={(event) => start(event, null)}\n onPointerMove={move}\n onPointerUp={end}\n onPointerCancel={end}\n onLostPointerCapture={end}\n onKeyDown={keyboardMove}\n >\n <>\n <Move aria-hidden=\"true\" />\n Move\n </>\n </ActionButton>\n <div class=\"flex items-center gap-1\">{props.actions}</div>\n {props.onClose && (\n <ActionButton\n type=\"button\"\n variant=\"ghost\"\n size=\"icon-sm\"\n aria-label={`Close ${props.label}`}\n tooltip={`Close ${props.label}.`}\n onClick={props.onClose}\n >\n <X aria-hidden=\"true\" />\n </ActionButton>\n )}\n </header>\n <ScrollArea role=\"region\" aria-label={`${props.label} content`} class=\"flex-1\" tabindex={0}>\n {props.children}\n </ScrollArea>\n {directions.map(({ direction, class: className, glyph }) => (\n <ActionButton\n type=\"button\"\n variant=\"ghost\"\n size=\"icon-sm\"\n class={className}\n data-direction={direction}\n aria-label={`Resize ${props.label} ${direction}`}\n tooltip={`Resize ${props.label} from the ${direction} edge. Use arrow keys to resize.`}\n onPointerDown={(event) => start(event, direction)}\n onPointerMove={move}\n onPointerUp={end}\n onPointerCancel={end}\n onLostPointerCapture={end}\n onKeyDown={(event) => keyboardResize(event, direction)}\n >\n <span aria-hidden=\"true\">{glyph}</span>\n </ActionButton>\n ))}\n </section>\n </div>\n )\n}\n"],"mappings":";;;;;;;;;;AAeA,IAAMiC,SAAO,SAASC,IAAU;AAChC,IAAMC,MAAI,SAASC,CAAO;AAE1B,IAAM,aAIA;CACJ;EACE,WAAW;EACX,OAAO;EACP,OAAO;CACT;CACA;EACE,WAAW;EACX,OAAO;EACP,OAAO;CACT;CACA;EACE,WAAW;EACX,OAAO;EACP,OAAO;CACT;CACA;EACE,WAAW;EACX,OAAO;EACP,OAAO;CACT;CACA;EACE,WAAW;EACX,OAAO;EACP,OAAO;CACT;CACA;EACE,WAAW;EACX,OAAO;EACP,OAAO;CACT;CACA;EACE,WAAW;EACX,OAAO;EACP,OAAO;CACT;CACA;EACE,WAAW;EACX,OAAO;EACP,OAAO;CACT;AACF;;AAWA,SAAgB,gBAAgB,OAA6B;CAC3D,MAAM,CAAC,OAAO,YAAY,aAAmC;EAAE,GAAG;EAAG,GAAG;EAAG,OAAO;EAAG,QAAQ;CAAE,CAAC;CAEhG,IAAI;CACJ,IAAI;CAUJ,MAAM,gBAAgB;EACpB,MAAM,OAAO,QAAQ,sBAAsB;EAC3C,IAAI,CAAC,MAAM;EACX,UAAU,YACR,4BAA4B;GAC1B,OAAO,QAAQ,QAAQ,IAAI,QAAQ,QAAQ;GAC3C,UAAU,QAAQ,QAAQ,IAAI;IAAE,GAAG,QAAQ;IAAG,GAAG,QAAQ;GAAE,IAAI;GAC/D,QAAQ,MAAM;GACd,WAAW;IAAE,OAAO,KAAK;IAAO,QAAQ,KAAK;GAAO;EACtD,CAAC,CACH;CACF;CAGA,mBACQ,CAAC,MAAM,OAAO,OAAO,MAAM,OAAO,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W;GAChD,IAAA,UAAA;IAAS,OAAA,UAAU,MAAM,MAAM,YAAY,UAAU;GAAiC;GACtFC,gBAAgB,UAAU,MAAM,OAAO,SAAS;GAChDjB,eAAe;GACfC,aAAa;GACbC,iBAAiB;GACjBC,sBAAsB;GACtBe,YAAY,UAAU,eAAe,OAAO,SAAS;GAbvD,IAAA,WAAA;IAeE,IAAA,QAAA,QAAsC;IAAtC,OAAA,OAA0B,KAAY;IAfxC,OAeEC;GACY;EACf,CAAA,CAAA;CAAC,GAjEJL,KAkES;CApET,aAAA;;GAAY,GAAA,MAAM;GAIhBM,GAAY,MAAM;GAEhBC,GAAM,GAAG,MAAM,CAAC,CAAC,EAAE;GACnBC,GAAK,GAAG,MAAM,CAAC,CAAC,EAAE;GAClBC,GAAO,GAAG,MAAM,CAAC,CAAC,MAAM;GACxBC,GAAQ,GAAG,MAAM,CAAC,CAAC,OAAO;EATP;CAAvB,IAAA,EAAA,GAAA,GAAA,GAAA,GAAA,GAAA,KAAA,QAAA;EAAuB,MAAA,KAAA,KAAAM,aAAA,MAAA,cAAA,CAAA;EAIrB,MAAA,KAAA,KAAAA,aAAA,OAAA,cAAA,CAAuB;EAErB,MAAA,KAAA,KAAAC,iBAAA,OAAA,QAAA,CAAqB;EACrB,MAAA,KAAA,KAAAA,iBAAA,OAAA,OAAA,CAAoB;EACpB,MAAA,KAAA,KAAAA,iBAAA,OAAA,SAAA,CAA0B;EAC1B,MAAA,KAAA,KAAAA,iBAAA,OAAA,UAAA,CAA4B;CATT,CAAA;CAJ3B,OACEN;AA0EJ"}
|
|
1
|
+
{"version":3,"file":"floating-preview.js","names":["ref={bounds}","<ActionButton\n type=\"button\"\n variant=\"ghost\"\n size=\"sm\"\n class=\"flex-1 cursor-move touch-none\"\n aria-label={`Move ${props.label}`}\n tooltip={`Move ${props.label}. Use arrow keys to adjust its position.`}\n onPointerDown={(event) => start(event, null)}\n onPointerMove={move}\n onPointerUp={end}\n onPointerCancel={end}\n onLostPointerCapture={end}\n onKeyDown={keyboardMove}\n >\n <>\n <Move aria-hidden=\"true\" />\n Move\n </>\n </ActionButton>","type=\"button\"","variant=\"ghost\"","size=\"sm\"","class=\"flex-1 cursor-move touch-none\"","onPointerDown={(event) => start(event, null)}","onPointerMove={move}","onPointerUp={end}","onPointerCancel={end}","onLostPointerCapture={end}","onKeyDown={keyboardMove}","<Move aria-hidden=\"true\" />","<header class=\"flex h-control-sm items-center gap-1 border-b border-border p-1\">\n <ActionButton\n type=\"button\"\n variant=\"ghost\"\n size=\"sm\"\n class=\"flex-1 cursor-move touch-none\"\n aria-label={`Move ${props.label}`}\n tooltip={`Move ${props.label}. Use arrow keys to adjust its position.`}\n onPointerDown={(event) => start(event, null)}\n onPointerMove={move}\n onPointerUp={end}\n onPointerCancel={end}\n onLostPointerCapture={end}\n onKeyDown={keyboardMove}\n >\n <>\n <Move aria-hidden=\"true\" />\n Move\n </>\n </ActionButton>\n <div class=\"flex items-center gap-1\">{props.actions}</div>\n {props.onClose && (\n <ActionButton\n type=\"button\"\n variant=\"ghost\"\n size=\"icon-sm\"\n aria-label={`Close ${props.label}`}\n tooltip={`Close ${props.label}.`}\n onClick={props.onClose}\n >\n <X aria-hidden=\"true\" />\n </ActionButton>\n )}\n </header>","<ActionButton\n type=\"button\"\n variant=\"ghost\"\n size=\"icon-sm\"\n aria-label={`Close ${props.label}`}\n tooltip={`Close ${props.label}.`}\n onClick={props.onClose}\n >\n <X aria-hidden=\"true\" />\n </ActionButton>","size=\"icon-sm\"","<X aria-hidden=\"true\" />","<ScrollArea role=\"region\" aria-label={`${props.label} content`} class=\"flex-1\" tabindex={0}>\n {props.children}\n </ScrollArea>","role=\"region\"","class=\"flex-1\"","tabindex={0}","<section\n class=\"pointer-events-auto absolute flex flex-col overflow-visible rounded-lg border border-border bg-card text-card-foreground shadow-lg\"\n aria-label={props.label}\n style={{\n left: `${frame().x}px`,\n top: `${frame().y}px`,\n width: `${frame().width}px`,\n height: `${frame().height}px`,\n }}\n >\n <header class=\"flex h-control-sm items-center gap-1 border-b border-border p-1\">\n <ActionButton\n type=\"button\"\n variant=\"ghost\"\n size=\"sm\"\n class=\"flex-1 cursor-move touch-none\"\n aria-label={`Move ${props.label}`}\n tooltip={`Move ${props.label}. Use arrow keys to adjust its position.`}\n onPointerDown={(event) => start(event, null)}\n onPointerMove={move}\n onPointerUp={end}\n onPointerCancel={end}\n onLostPointerCapture={end}\n onKeyDown={keyboardMove}\n >\n <>\n <Move aria-hidden=\"true\" />\n Move\n </>\n </ActionButton>\n <div class=\"flex items-center gap-1\">{props.actions}</div>\n {props.onClose && (\n <ActionButton\n type=\"button\"\n variant=\"ghost\"\n size=\"icon-sm\"\n aria-label={`Close ${props.label}`}\n tooltip={`Close ${props.label}.`}\n onClick={props.onClose}\n >\n <X aria-hidden=\"true\" />\n </ActionButton>\n )}\n </header>\n <ScrollArea role=\"region\" aria-label={`${props.label} content`} class=\"flex-1\" tabindex={0}>\n {props.children}\n </ScrollArea>\n {directions.map(({ direction, class: className, glyph }) => (\n <ActionButton\n type=\"button\"\n variant=\"ghost\"\n size=\"icon-sm\"\n class={className}\n data-direction={direction}\n aria-label={`Resize ${props.label} ${direction}`}\n tooltip={`Resize ${props.label} from the ${direction} edge. Use arrow keys to resize.`}\n onPointerDown={(event) => start(event, direction)}\n onPointerMove={move}\n onPointerUp={end}\n onPointerCancel={end}\n onLostPointerCapture={end}\n onKeyDown={(event) => keyboardResize(event, direction)}\n >\n <span aria-hidden=\"true\">{glyph}</span>\n </ActionButton>\n ))}\n </section>","<ActionButton\n type=\"button\"\n variant=\"ghost\"\n size=\"icon-sm\"\n class={className}\n data-direction={direction}\n aria-label={`Resize ${props.label} ${direction}`}\n tooltip={`Resize ${props.label} from the ${direction} edge. Use arrow keys to resize.`}\n onPointerDown={(event) => start(event, direction)}\n onPointerMove={move}\n onPointerUp={end}\n onPointerCancel={end}\n onLostPointerCapture={end}\n onKeyDown={(event) => keyboardResize(event, direction)}\n >\n <span aria-hidden=\"true\">{glyph}</span>\n </ActionButton>","class={className}","onPointerDown={(event) => start(event, direction)}","onKeyDown={(event) => keyboardResize(event, direction)}","<span aria-hidden=\"true\">{glyph}</span>","aria-label={props.label}","left: `${frame().x}px`","top: `${frame().y}px`","width: `${frame().width}px`","height: `${frame().height}px`","<div\n ref={bounds}\n class=\"pointer-events-none absolute inset-0 z-(--z-sticky) overflow-hidden\"\n aria-label={props.label}\n >\n <section\n class=\"pointer-events-auto absolute flex flex-col overflow-visible rounded-lg border border-border bg-card text-card-foreground shadow-lg\"\n aria-label={props.label}\n style={{\n left: `${frame().x}px`,\n top: `${frame().y}px`,\n width: `${frame().width}px`,\n height: `${frame().height}px`,\n }}\n >\n <header class=\"flex h-control-sm items-center gap-1 border-b border-border p-1\">\n <ActionButton\n type=\"button\"\n variant=\"ghost\"\n size=\"sm\"\n class=\"flex-1 cursor-move touch-none\"\n aria-label={`Move ${props.label}`}\n tooltip={`Move ${props.label}. Use arrow keys to adjust its position.`}\n onPointerDown={(event) => start(event, null)}\n onPointerMove={move}\n onPointerUp={end}\n onPointerCancel={end}\n onLostPointerCapture={end}\n onKeyDown={keyboardMove}\n >\n <>\n <Move aria-hidden=\"true\" />\n Move\n </>\n </ActionButton>\n <div class=\"flex items-center gap-1\">{props.actions}</div>\n {props.onClose && (\n <ActionButton\n type=\"button\"\n variant=\"ghost\"\n size=\"icon-sm\"\n aria-label={`Close ${props.label}`}\n tooltip={`Close ${props.label}.`}\n onClick={props.onClose}\n >\n <X aria-hidden=\"true\" />\n </ActionButton>\n )}\n </header>\n <ScrollArea role=\"region\" aria-label={`${props.label} content`} class=\"flex-1\" tabindex={0}>\n {props.children}\n </ScrollArea>\n {directions.map(({ direction, class: className, glyph }) => (\n <ActionButton\n type=\"button\"\n variant=\"ghost\"\n size=\"icon-sm\"\n class={className}\n data-direction={direction}\n aria-label={`Resize ${props.label} ${direction}`}\n tooltip={`Resize ${props.label} from the ${direction} edge. Use arrow keys to resize.`}\n onPointerDown={(event) => start(event, direction)}\n onPointerMove={move}\n onPointerUp={end}\n onPointerCancel={end}\n onLostPointerCapture={end}\n onKeyDown={(event) => keyboardResize(event, direction)}\n >\n <span aria-hidden=\"true\">{glyph}</span>\n </ActionButton>\n ))}\n </section>\n </div>","LucideMove","LucideX","_$insert","_$effect","_$setAttribute","_$setStyleProperty"],"sources":["../../../../src/components/layout/floating-preview/floating-preview.tsx"],"sourcesContent":["import { createEffect, createSignal, onSettled } from 'solid-js'\nimport { type JSX } from '@solidjs/web'\nimport { Move as LucideMove, X as LucideX } from '@lucide/solid'\nimport { ActionButton } from '../../composites/action-button'\nimport { ScrollArea } from '../../ui/scroll-area'\nimport {\n type FloatingPreviewFrame,\n type FloatingPreviewResizeDirection,\n type FloatingPreviewSize,\n resolveFloatingPreviewFrame,\n resizeFloatingPreview,\n} from './model'\nimport { fastIcon } from '#lib/fast-icon'\n\n// lucide icons drawn from a cloned template (see fastIcon).\nconst Move = fastIcon(LucideMove)\nconst X = fastIcon(LucideX)\n\nconst directions: readonly {\n direction: FloatingPreviewResizeDirection\n class: string\n glyph: string\n}[] = [\n {\n direction: 'north',\n class: 'absolute -top-3 right-6 left-6 h-control-xs w-auto cursor-ns-resize touch-none',\n glyph: '↕',\n },\n {\n direction: 'south',\n class: 'absolute -bottom-3 right-6 left-6 h-control-xs w-auto cursor-ns-resize touch-none',\n glyph: '↕',\n },\n {\n direction: 'east',\n class: 'absolute -right-3 top-6 bottom-6 w-6 h-auto cursor-ew-resize touch-none',\n glyph: '↔',\n },\n {\n direction: 'west',\n class: 'absolute -left-3 top-6 bottom-6 w-6 h-auto cursor-ew-resize touch-none',\n glyph: '↔',\n },\n {\n direction: 'northwest',\n class: 'absolute -top-3 -left-3 size-control-xs cursor-nwse-resize touch-none',\n glyph: '↖',\n },\n {\n direction: 'northeast',\n class: 'absolute -top-3 -right-3 size-control-xs cursor-nesw-resize touch-none',\n glyph: '↗',\n },\n {\n direction: 'southwest',\n class: 'absolute -bottom-3 -left-3 size-control-xs cursor-nesw-resize touch-none',\n glyph: '↙',\n },\n {\n direction: 'southeast',\n class: 'absolute -bottom-3 -right-3 size-control-xs cursor-nwse-resize touch-none',\n glyph: '↘',\n },\n]\n\nexport type FloatingPreviewProps = {\n label: string\n source: FloatingPreviewSize\n onClose?: () => void\n actions?: JSX.Element\n children: JSX.Element\n}\n\n/** A host-bounded movable preview frame. Content and actions remain caller-owned. */\nexport function FloatingPreview(props: FloatingPreviewProps) {\n const [frame, setFrame] = createSignal<FloatingPreviewFrame>({ x: 0, y: 0, width: 1, height: 1 })\n // oxlint-disable-next-line no-unassigned-vars -- assigned through Solid's ref callback.\n let bounds: HTMLDivElement | undefined\n let gesture:\n | {\n id: number\n x: number\n y: number\n start: FloatingPreviewFrame\n direction: FloatingPreviewResizeDirection | null\n }\n | undefined\n\n const measure = () => {\n const rect = bounds?.getBoundingClientRect()\n if (!rect) return\n setFrame((current) =>\n resolveFloatingPreviewFrame({\n width: current.width > 1 ? current.width : null,\n position: current.width > 1 ? { x: current.x, y: current.y } : null,\n source: props.source,\n container: { width: rect.width, height: rect.height },\n })\n )\n }\n // Re-fit when the source dimensions change; the first fit happens once the\n // frame is mounted and measurable, below.\n createEffect(\n () => [props.source.width, props.source.height] as const,\n () => measure(),\n { defer: true }\n )\n onSettled(() => {\n if (!bounds) return\n const observer = new ResizeObserver(measure)\n observer.observe(bounds)\n measure()\n return () => observer.disconnect()\n })\n\n function start(event: PointerEvent, direction: FloatingPreviewResizeDirection | null) {\n if (event.button !== 0 || gesture) return\n event.preventDefault()\n event.stopPropagation()\n gesture = { id: event.pointerId, x: event.clientX, y: event.clientY, start: frame(), direction }\n ;(event.currentTarget as HTMLElement).setPointerCapture(event.pointerId)\n }\n function move(event: PointerEvent) {\n if (!gesture || gesture.id !== event.pointerId) return\n const rect = bounds?.getBoundingClientRect()\n if (!rect) return\n const container = { width: rect.width, height: rect.height }\n const delta = { x: event.clientX - gesture.x, y: event.clientY - gesture.y }\n setFrame(\n gesture.direction\n ? resizeFloatingPreview({\n start: gesture.start,\n direction: gesture.direction,\n delta,\n source: props.source,\n container,\n })\n : resolveFloatingPreviewFrame({\n width: gesture.start.width,\n position: { x: gesture.start.x + delta.x, y: gesture.start.y + delta.y },\n source: props.source,\n container,\n })\n )\n }\n function end(event: PointerEvent) {\n if (gesture?.id === event.pointerId) gesture = undefined\n }\n function keyboardMove(event: KeyboardEvent) {\n const delta = { x: 0, y: 0 }\n if (event.key === 'ArrowLeft') delta.x = -10\n else if (event.key === 'ArrowRight') delta.x = 10\n else if (event.key === 'ArrowUp') delta.y = -10\n else if (event.key === 'ArrowDown') delta.y = 10\n else return\n event.preventDefault()\n const rect = bounds?.getBoundingClientRect()\n if (!rect) return\n const current = frame()\n setFrame(\n resolveFloatingPreviewFrame({\n width: current.width,\n position: { x: current.x + delta.x, y: current.y + delta.y },\n source: props.source,\n container: { width: rect.width, height: rect.height },\n })\n )\n }\n function keyboardResize(event: KeyboardEvent, direction: FloatingPreviewResizeDirection) {\n if (!event.key.startsWith('Arrow')) return\n event.preventDefault()\n const rect = bounds?.getBoundingClientRect()\n if (!rect) return\n const delta = {\n x: event.key === 'ArrowRight' ? 10 : event.key === 'ArrowLeft' ? -10 : 0,\n y: event.key === 'ArrowDown' ? 10 : event.key === 'ArrowUp' ? -10 : 0,\n }\n setFrame(\n resizeFloatingPreview({\n start: frame(),\n direction,\n delta,\n source: props.source,\n container: { width: rect.width, height: rect.height },\n })\n )\n }\n\n return (\n <div\n ref={bounds}\n class=\"pointer-events-none absolute inset-0 z-(--z-sticky) overflow-hidden\"\n aria-label={props.label}\n >\n <section\n class=\"pointer-events-auto absolute flex flex-col overflow-visible rounded-lg border border-border bg-card text-card-foreground shadow-lg\"\n aria-label={props.label}\n style={{\n left: `${frame().x}px`,\n top: `${frame().y}px`,\n width: `${frame().width}px`,\n height: `${frame().height}px`,\n }}\n >\n <header class=\"flex h-control-sm items-center gap-1 border-b border-border p-1\">\n <ActionButton\n type=\"button\"\n variant=\"ghost\"\n size=\"sm\"\n class=\"flex-1 cursor-move touch-none\"\n aria-label={`Move ${props.label}`}\n tooltip={`Move ${props.label}. Use arrow keys to adjust its position.`}\n onPointerDown={(event) => start(event, null)}\n onPointerMove={move}\n onPointerUp={end}\n onPointerCancel={end}\n onLostPointerCapture={end}\n onKeyDown={keyboardMove}\n >\n <>\n <Move aria-hidden=\"true\" />\n Move\n </>\n </ActionButton>\n <div class=\"flex items-center gap-1\">{props.actions}</div>\n {props.onClose && (\n <ActionButton\n type=\"button\"\n variant=\"ghost\"\n size=\"icon-sm\"\n aria-label={`Close ${props.label}`}\n tooltip={`Close ${props.label}.`}\n onClick={props.onClose}\n >\n <X aria-hidden=\"true\" />\n </ActionButton>\n )}\n </header>\n <ScrollArea role=\"region\" aria-label={`${props.label} content`} class=\"flex-1\" tabindex={0}>\n {props.children}\n </ScrollArea>\n {directions.map(({ direction, class: className, glyph }) => (\n <ActionButton\n type=\"button\"\n variant=\"ghost\"\n size=\"icon-sm\"\n class={className}\n data-direction={direction}\n aria-label={`Resize ${props.label} ${direction}`}\n tooltip={`Resize ${props.label} from the ${direction} edge. Use arrow keys to resize.`}\n onPointerDown={(event) => start(event, direction)}\n onPointerMove={move}\n onPointerUp={end}\n onPointerCancel={end}\n onLostPointerCapture={end}\n onKeyDown={(event) => keyboardResize(event, direction)}\n >\n <span aria-hidden=\"true\">{glyph}</span>\n </ActionButton>\n ))}\n </section>\n </div>\n )\n}\n"],"mappings":";;;;;;;;;;AAeA,IAAM,OAAO,SAASiC,MAAU;AAChC,IAAM,IAAI,SAASC,GAAO;AAE1B,IAAM,aAIA;CACJ;EACE,WAAW;EACX,OAAO;EACP,OAAO;CACT;CACA;EACE,WAAW;EACX,OAAO;EACP,OAAO;CACT;CACA;EACE,WAAW;EACX,OAAO;EACP,OAAO;CACT;CACA;EACE,WAAW;EACX,OAAO;EACP,OAAO;CACT;CACA;EACE,WAAW;EACX,OAAO;EACP,OAAO;CACT;CACA;EACE,WAAW;EACX,OAAO;EACP,OAAO;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GAAA,GAAA,GAAA,GAAA,KAAA,QAAA;EAAuB,MAAA,KAAA,KAAAM,aAAA,MAAA,cAAA,CAAA;EAIrB,MAAA,KAAA,KAAAA,aAAA,OAAA,cAAA,CAAuB;EAErB,MAAA,KAAA,KAAAC,iBAAA,OAAA,QAAA,CAAqB;EACrB,MAAA,KAAA,KAAAA,iBAAA,OAAA,OAAA,CAAoB;EACpB,MAAA,KAAA,KAAAA,iBAAA,OAAA,SAAA,CAA0B;EAC1B,MAAA,KAAA,KAAAA,iBAAA,OAAA,UAAA,CAA4B;CATT,CAAA;CAJ3B,OACEN;AA0EJ"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { cn } from "../../../lib/utils.js";
|
|
2
1
|
import { createComponent, insert, spread, template } from "@solidjs/web";
|
|
3
2
|
import { createContext, createMemo, omit, useContext } from "solid-js";
|
|
3
|
+
import { cn } from "../../../lib/utils.js";
|
|
4
4
|
// src/components/layout/orbit-layout/orbit-layout.tsx
|
|
5
5
|
var _tmpl$ = /* @__PURE__ */ template(`<div>`);
|
|
6
6
|
var DEFAULT_ORBIT_RADIUS = "calc(50% - 2rem)";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"orbit-layout.js","names":["<OrbitRadiusContext value={radius}>\n <OrbitModeContext value={mode}>\n <div\n {...rest}\n data-slot=\"orbit-layout\"\n class={cn(mode() === 'flow' ? 'grid gap-3' : 'relative size-full', local.class)}\n >\n {local.children}\n </div>\n </OrbitModeContext>\n </OrbitRadiusContext>","value={radius}","<OrbitModeContext value={mode}>\n <div\n {...rest}\n data-slot=\"orbit-layout\"\n class={cn(mode() === 'flow' ? 'grid gap-3' : 'relative size-full', local.class)}\n >\n {local.children}\n </div>\n </OrbitModeContext>","value={mode}","<div\n {...rest}\n data-slot=\"orbit-layout\"\n class={cn(mode() === 'flow' ? 'grid gap-3' : 'relative size-full', local.class)}\n >\n {local.children}\n </div>","<div\n {...rest}\n data-slot=\"orbit-item\"\n class={cn(mode() === 'flow' ? undefined : 'absolute', local.class)}\n style={positionStyle()}\n >\n {local.children}\n </div>"],"sources":["../../../../src/components/layout/orbit-layout/orbit-layout.tsx"],"sourcesContent":["import type { ComponentProps } from '@solidjs/web'\nimport { createContext, createMemo, omit, useContext, type Accessor } from 'solid-js'\nimport { cn } from '#lib/utils'\n\n/** A CSS length or expression used to place an item away from the orbit center. */\nexport type OrbitRadius = number | string\nexport type OrbitLayoutMode = 'radial' | 'flow'\n\nconst DEFAULT_ORBIT_RADIUS = 'calc(50% - 2rem)'\nconst OrbitRadiusContext = createContext<Accessor<string>>()\nconst OrbitModeContext = createContext<Accessor<OrbitLayoutMode>>()\n\nfunction resolveRadius(radius: OrbitRadius | undefined): string {\n if (typeof radius === 'number') return `${Number.isFinite(radius) ? Math.max(0, radius) : 0}px`\n return radius?.trim() || DEFAULT_ORBIT_RADIUS\n}\n\n/**\n * OrbitLayout.\n *\n * Provides a positioned canvas and a shared radius for its OrbitItems. It does\n * not assign list semantics or alter DOM order: callers choose semantics, and\n * keyboard and screen-reader order remain the source order of the children.\n */\nexport type OrbitLayoutProps = Omit<ComponentProps<'div'>, 'style'> & {\n /** JSX style props are owned by this geometry primitive. */\n style?: never\n /** Responsive radius used by every OrbitItem unless that item overrides it. */\n radius?: OrbitRadius\n /** `flow` places items in source order; `radial` positions them around the host. */\n mode?: OrbitLayoutMode\n}\n\nexport function OrbitLayout(props: OrbitLayoutProps) {\n const local = props\n const rest = omit(props, 'class', 'radius', 'mode', 'style', 'children')\n const radius = createMemo(() => resolveRadius(local.radius))\n const mode = createMemo(() => local.mode ?? 'radial')\n\n return (\n <OrbitRadiusContext value={radius}>\n <OrbitModeContext value={mode}>\n <div\n {...rest}\n data-slot=\"orbit-layout\"\n class={cn(mode() === 'flow' ? 'grid gap-3' : 'relative size-full', local.class)}\n >\n {local.children}\n </div>\n </OrbitModeContext>\n </OrbitRadiusContext>\n )\n}\n\n/**\n * OrbitItem.\n *\n * Positions one ordinary child around its OrbitLayout. This is geometry only:\n * the wrapper has no role, tabindex, or interaction of its own.\n */\nexport type OrbitItemProps = Omit<ComponentProps<'div'>, 'style'> & {\n /** JSX style props are owned by this geometry primitive. */\n style?: never\n /**\n * Zero-based position in the rendered sequence. Index 0 sits at three o'clock\n * (the positive x axis) and the sequence runs clockwise, because the y axis\n * points down the screen: with four items, 0 is east, 1 south, 2 west, 3 north.\n */\n index: number\n /** Number of items sharing this orbit. */\n count: number\n /** Per-item override for OrbitLayout's responsive radius. */\n radius?: OrbitRadius\n}\n\nexport function OrbitItem(props: OrbitItemProps) {\n const local = props\n const rest = omit(props, 'class', 'index', 'count', 'radius', 'style', 'children')\n const inheritedRadius = useContext(OrbitRadiusContext)\n const inheritedMode = useContext(OrbitModeContext)\n const mode = () => inheritedMode?.() ?? 'radial'\n const radius = () =>\n local.radius !== undefined\n ? resolveRadius(local.radius)\n : (inheritedRadius?.() ?? DEFAULT_ORBIT_RADIUS)\n const angle = createMemo(() => {\n const count = Number.isFinite(local.count) ? Math.max(1, Math.trunc(local.count)) : 1\n const rawIndex = Number.isFinite(local.index) ? Math.trunc(local.index) : 0\n const index = ((rawIndex % count) + count) % count\n return `${(index / count) * Math.PI * 2}rad`\n })\n const positionStyle = () =>\n mode() === 'flow'\n ? undefined\n : {\n top: `calc(50% + sin(${angle()}) * ${radius()})`,\n left: `calc(50% + cos(${angle()}) * ${radius()})`,\n translate: '-50% -50%',\n }\n\n return (\n <div\n {...rest}\n data-slot=\"orbit-item\"\n class={cn(mode() === 'flow' ? undefined : 'absolute', local.class)}\n style={positionStyle()}\n >\n {local.children}\n </div>\n )\n}\n"],"mappings":";;;;;AAQA,IAAM,uBAAuB;AAC7B,IAAM,qBAAqB,cAAgC;AAC3D,IAAM,mBAAmB,cAAyC;AAElE,SAAS,cAAc,QAAyC;CAC9D,IAAI,OAAO,WAAW,UAAU,OAAO,GAAG,OAAO,SAAS,MAAM,IAAI,KAAK,IAAI,GAAG,MAAM,IAAI,EAAE;CAC5F,OAAO,QAAQ,KAAK,KAAK;AAC3B;AAkBA,SAAgB,YAAY,OAAyB;CACnD,MAAM,QAAQ;CACd,MAAM,OAAO,KAAK,OAAO,SAAS,UAAU,QAAQ,SAAS,UAAU;CACvE,MAAM,SAAS,iBAAiB,cAAc,MAAM,MAAM,CAAC;CAC3D,MAAM,OAAO,iBAAiB,MAAM,QAAQ,QAAQ;CAEpD,OACEA,gBAAAA,oBAAAA;EAAoBC,OAAO;EAA3B,IAAA,WAAA;GACEC,OAAAA,gBAAAA,kBAAAA;IAAkBC,OAAO;IAAzB,IAAA,WAAA;KACE,IAAA,OAAA,OAMK;
|
|
1
|
+
{"version":3,"file":"orbit-layout.js","names":["<OrbitRadiusContext value={radius}>\n <OrbitModeContext value={mode}>\n <div\n {...rest}\n data-slot=\"orbit-layout\"\n class={cn(mode() === 'flow' ? 'grid gap-3' : 'relative size-full', local.class)}\n >\n {local.children}\n </div>\n </OrbitModeContext>\n </OrbitRadiusContext>","value={radius}","<OrbitModeContext value={mode}>\n <div\n {...rest}\n data-slot=\"orbit-layout\"\n class={cn(mode() === 'flow' ? 'grid gap-3' : 'relative size-full', local.class)}\n >\n {local.children}\n </div>\n </OrbitModeContext>","value={mode}","<div\n {...rest}\n data-slot=\"orbit-layout\"\n class={cn(mode() === 'flow' ? 'grid gap-3' : 'relative size-full', local.class)}\n >\n {local.children}\n </div>","<div\n {...rest}\n data-slot=\"orbit-item\"\n class={cn(mode() === 'flow' ? undefined : 'absolute', local.class)}\n style={positionStyle()}\n >\n {local.children}\n </div>","_$spread","_$insert"],"sources":["../../../../src/components/layout/orbit-layout/orbit-layout.tsx"],"sourcesContent":["import type { ComponentProps } from '@solidjs/web'\nimport { createContext, createMemo, omit, useContext, type Accessor } from 'solid-js'\nimport { cn } from '#lib/utils'\n\n/** A CSS length or expression used to place an item away from the orbit center. */\nexport type OrbitRadius = number | string\nexport type OrbitLayoutMode = 'radial' | 'flow'\n\nconst DEFAULT_ORBIT_RADIUS = 'calc(50% - 2rem)'\nconst OrbitRadiusContext = createContext<Accessor<string>>()\nconst OrbitModeContext = createContext<Accessor<OrbitLayoutMode>>()\n\nfunction resolveRadius(radius: OrbitRadius | undefined): string {\n if (typeof radius === 'number') return `${Number.isFinite(radius) ? Math.max(0, radius) : 0}px`\n return radius?.trim() || DEFAULT_ORBIT_RADIUS\n}\n\n/**\n * OrbitLayout.\n *\n * Provides a positioned canvas and a shared radius for its OrbitItems. It does\n * not assign list semantics or alter DOM order: callers choose semantics, and\n * keyboard and screen-reader order remain the source order of the children.\n */\nexport type OrbitLayoutProps = Omit<ComponentProps<'div'>, 'style'> & {\n /** JSX style props are owned by this geometry primitive. */\n style?: never\n /** Responsive radius used by every OrbitItem unless that item overrides it. */\n radius?: OrbitRadius\n /** `flow` places items in source order; `radial` positions them around the host. */\n mode?: OrbitLayoutMode\n}\n\nexport function OrbitLayout(props: OrbitLayoutProps) {\n const local = props\n const rest = omit(props, 'class', 'radius', 'mode', 'style', 'children')\n const radius = createMemo(() => resolveRadius(local.radius))\n const mode = createMemo(() => local.mode ?? 'radial')\n\n return (\n <OrbitRadiusContext value={radius}>\n <OrbitModeContext value={mode}>\n <div\n {...rest}\n data-slot=\"orbit-layout\"\n class={cn(mode() === 'flow' ? 'grid gap-3' : 'relative size-full', local.class)}\n >\n {local.children}\n </div>\n </OrbitModeContext>\n </OrbitRadiusContext>\n )\n}\n\n/**\n * OrbitItem.\n *\n * Positions one ordinary child around its OrbitLayout. This is geometry only:\n * the wrapper has no role, tabindex, or interaction of its own.\n */\nexport type OrbitItemProps = Omit<ComponentProps<'div'>, 'style'> & {\n /** JSX style props are owned by this geometry primitive. */\n style?: never\n /**\n * Zero-based position in the rendered sequence. Index 0 sits at three o'clock\n * (the positive x axis) and the sequence runs clockwise, because the y axis\n * points down the screen: with four items, 0 is east, 1 south, 2 west, 3 north.\n */\n index: number\n /** Number of items sharing this orbit. */\n count: number\n /** Per-item override for OrbitLayout's responsive radius. */\n radius?: OrbitRadius\n}\n\nexport function OrbitItem(props: OrbitItemProps) {\n const local = props\n const rest = omit(props, 'class', 'index', 'count', 'radius', 'style', 'children')\n const inheritedRadius = useContext(OrbitRadiusContext)\n const inheritedMode = useContext(OrbitModeContext)\n const mode = () => inheritedMode?.() ?? 'radial'\n const radius = () =>\n local.radius !== undefined\n ? resolveRadius(local.radius)\n : (inheritedRadius?.() ?? DEFAULT_ORBIT_RADIUS)\n const angle = createMemo(() => {\n const count = Number.isFinite(local.count) ? Math.max(1, Math.trunc(local.count)) : 1\n const rawIndex = Number.isFinite(local.index) ? Math.trunc(local.index) : 0\n const index = ((rawIndex % count) + count) % count\n return `${(index / count) * Math.PI * 2}rad`\n })\n const positionStyle = () =>\n mode() === 'flow'\n ? undefined\n : {\n top: `calc(50% + sin(${angle()}) * ${radius()})`,\n left: `calc(50% + cos(${angle()}) * ${radius()})`,\n translate: '-50% -50%',\n }\n\n return (\n <div\n {...rest}\n data-slot=\"orbit-item\"\n class={cn(mode() === 'flow' ? undefined : 'absolute', local.class)}\n style={positionStyle()}\n >\n {local.children}\n </div>\n )\n}\n"],"mappings":";;;;;AAQA,IAAM,uBAAuB;AAC7B,IAAM,qBAAqB,cAAgC;AAC3D,IAAM,mBAAmB,cAAyC;AAElE,SAAS,cAAc,QAAyC;CAC9D,IAAI,OAAO,WAAW,UAAU,OAAO,GAAG,OAAO,SAAS,MAAM,IAAI,KAAK,IAAI,GAAG,MAAM,IAAI,EAAE;CAC5F,OAAO,QAAQ,KAAK,KAAK;AAC3B;AAkBA,SAAgB,YAAY,OAAyB;CACnD,MAAM,QAAQ;CACd,MAAM,OAAO,KAAK,OAAO,SAAS,UAAU,QAAQ,SAAS,UAAU;CACvE,MAAM,SAAS,iBAAiB,cAAc,MAAM,MAAM,CAAC;CAC3D,MAAM,OAAO,iBAAiB,MAAM,QAAQ,QAAQ;CAEpD,OACEA,gBAAAA,oBAAAA;EAAoBC,OAAO;EAA3B,IAAA,WAAA;GACEC,OAAAA,gBAAAA,kBAAAA;IAAkBC,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M;CAAQ,CACZ;CARP,OACEF;AASJ"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { cn } from "../../../lib/utils.js";
|
|
2
|
-
import { Heading, headingVariants } from "../../ui/typography/typography.js";
|
|
3
1
|
import { createComponent, insert, spread, template } from "@solidjs/web";
|
|
4
2
|
import { Show, omit } from "solid-js";
|
|
3
|
+
import { cn } from "../../../lib/utils.js";
|
|
4
|
+
import { Heading, headingVariants } from "../../ui/typography/typography.js";
|
|
5
5
|
// src/components/layout/page/page.tsx
|
|
6
6
|
var _tmpl$ = /* @__PURE__ */ template(`<header>`);
|
|
7
7
|
var _tmpl$2 = /* @__PURE__ */ template(`<div>`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"page.js","names":["<header\n data-slot=\"page-header\"\n class={cn(\n 'flex shrink-0 flex-wrap items-start justify-between gap-x-4 gap-y-3 px-5 pt-5 pb-4',\n local.class\n )}\n {...rest}\n />","<div\n data-slot=\"page-header-content\"\n class={cn('flex min-w-0 flex-col gap-1', local.class)}\n {...rest}\n />","<h1\n data-slot=\"page-header-title\"\n class={cn(headingVariants({ size: 'page' }), local.class)}\n {...rest}\n />","<p\n data-slot=\"page-header-description\"\n class={cn('max-w-prose text-sm text-muted-foreground text-pretty', local.class)}\n {...rest}\n />","<div\n data-slot=\"page-header-actions\"\n class={cn('flex shrink-0 items-center gap-2', local.class)}\n {...rest}\n />","<Show when={local.title}>\n {(titleSlot) => (\n <div class=\"flex items-baseline justify-between gap-3\">\n <div class=\"flex min-w-0 flex-col gap-0.5\">\n <Heading size=\"section\">{titleSlot()}</Heading>\n <Show when={local.description}>\n {(descriptionSlot) => (\n <p class=\"max-w-prose text-sm text-muted-foreground text-pretty\">\n {descriptionSlot()}\n </p>\n )}\n </Show>\n </div>\n <Show when={local.action}>\n {(actionSlot) => <div class=\"flex shrink-0 items-center gap-2\">{actionSlot()}</div>}\n </Show>\n </div>\n )}\n </Show>","<Heading size=\"section\">{titleSlot()}</Heading>","size=\"section\"","<div class=\"flex min-w-0 flex-col gap-0.5\">\n <Heading size=\"section\">{titleSlot()}</Heading>\n <Show when={local.description}>\n {(descriptionSlot) => (\n <p class=\"max-w-prose text-sm text-muted-foreground text-pretty\">\n {descriptionSlot()}\n </p>\n )}\n </Show>\n </div>","<Show when={local.description}>\n {(descriptionSlot) => (\n <p class=\"max-w-prose text-sm text-muted-foreground text-pretty\">\n {descriptionSlot()}\n </p>\n )}\n </Show>","<Show when={local.action}>\n {(actionSlot) => <div class=\"flex shrink-0 items-center gap-2\">{actionSlot()}</div>}\n </Show>","<section\n data-slot=\"page-section\"\n class={cn('flex flex-col gap-3 px-5 py-4', local.class)}\n {...rest}\n >\n <Show when={local.title}>\n {(titleSlot) => (\n <div class=\"flex items-baseline justify-between gap-3\">\n <div class=\"flex min-w-0 flex-col gap-0.5\">\n <Heading size=\"section\">{titleSlot()}</Heading>\n <Show when={local.description}>\n {(descriptionSlot) => (\n <p class=\"max-w-prose text-sm text-muted-foreground text-pretty\">\n {descriptionSlot()}\n </p>\n )}\n </Show>\n </div>\n <Show when={local.action}>\n {(actionSlot) => <div class=\"flex shrink-0 items-center gap-2\">{actionSlot()}</div>}\n </Show>\n </div>\n )}\n </Show>\n {local.children}\n </section>","<div\n data-slot=\"page\"\n class={cn('flex min-h-0 flex-1 flex-col overflow-y-auto', local.class)}\n {...rest}\n />"],"sources":["../../../../src/components/layout/page/page.tsx"],"sourcesContent":["import type { ComponentProps, JSX } from '@solidjs/web'\nimport { Show, omit } from 'solid-js'\nimport { cn } from '#lib/utils'\nimport { Heading, headingVariants } from '../../ui/typography'\n\n/**\n * PageHeader.\n *\n * The title block at the top of a scrollable page: where the user is, what this\n * page is, and the actions that apply to the whole of it.\n *\n * The action slot is single and singular on purpose. A page header with four\n * equally-weighted buttons has not decided what the page is for; the design\n * system can only make that look tidy, not make it true. Put the primary action\n * here and the rest in an overflow menu or on the rows they belong to.\n */\nexport function PageHeader(props: ComponentProps<'header'>) {\n const local = props\n const rest = omit(props, 'class')\n\n return (\n <header\n data-slot=\"page-header\"\n class={cn(\n 'flex shrink-0 flex-wrap items-start justify-between gap-x-4 gap-y-3 px-5 pt-5 pb-4',\n local.class\n )}\n {...rest}\n />\n )\n}\n\nexport function PageHeaderContent(props: ComponentProps<'div'>) {\n const local = props\n const rest = omit(props, 'class')\n return (\n <div\n data-slot=\"page-header-content\"\n class={cn('flex min-w-0 flex-col gap-1', local.class)}\n {...rest}\n />\n )\n}\n\nexport function PageHeaderTitle(props: ComponentProps<'h1'>) {\n const local = props\n const rest = omit(props, 'class')\n return (\n <h1\n data-slot=\"page-header-title\"\n class={cn(headingVariants({ size: 'page' }), local.class)}\n {...rest}\n />\n )\n}\n\nexport function PageHeaderDescription(props: ComponentProps<'p'>) {\n const local = props\n const rest = omit(props, 'class')\n return (\n <p\n data-slot=\"page-header-description\"\n class={cn('max-w-prose text-sm text-muted-foreground text-pretty', local.class)}\n {...rest}\n />\n )\n}\n\n/** The trailing action group. One primary action, at most. */\nexport function PageHeaderActions(props: ComponentProps<'div'>) {\n const local = props\n const rest = omit(props, 'class')\n return (\n <div\n data-slot=\"page-header-actions\"\n class={cn('flex shrink-0 items-center gap-2', local.class)}\n {...rest}\n />\n )\n}\n\n/**\n * A section inside a page, with an optional title and a description.\n * Sections are separated by space rather than by rules — a page of boxed\n * sections reads as a dashboard, and most pages are not one.\n */\nexport function PageSection(\n props: ComponentProps<'section'> & { title?: string; description?: string; action?: JSX.Element }\n) {\n const local = props\n const rest = omit(props, 'class', 'title', 'description', 'action', 'children')\n\n return (\n <section\n data-slot=\"page-section\"\n class={cn('flex flex-col gap-3 px-5 py-4', local.class)}\n {...rest}\n >\n <Show when={local.title}>\n {(titleSlot) => (\n <div class=\"flex items-baseline justify-between gap-3\">\n <div class=\"flex min-w-0 flex-col gap-0.5\">\n <Heading size=\"section\">{titleSlot()}</Heading>\n <Show when={local.description}>\n {(descriptionSlot) => (\n <p class=\"max-w-prose text-sm text-muted-foreground text-pretty\">\n {descriptionSlot()}\n </p>\n )}\n </Show>\n </div>\n <Show when={local.action}>\n {(actionSlot) => <div class=\"flex shrink-0 items-center gap-2\">{actionSlot()}</div>}\n </Show>\n </div>\n )}\n </Show>\n {local.children}\n </section>\n )\n}\n\n/** The scroll container a page's header and sections sit in. */\nexport function Page(props: ComponentProps<'div'>) {\n const local = props\n const rest = omit(props, 'class')\n return (\n <div\n data-slot=\"page\"\n class={cn('flex min-h-0 flex-1 flex-col overflow-y-auto', local.class)}\n {...rest}\n />\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAgBA,SAAgB,WAAW,OAAiC;CAC1D,MAAM,QAAQ;CACd,MAAM,OAAO,KAAK,OAAO,OAAO;CAG9B,IAAA,OAAA,OAOC;CADC,OAAA,MAAA,CAAA;EALA,aAAA;EACA,IAAA,UAAA;GAAO,OAAA,GACL,sFACA,MAAM,KACR;EAAC;CACO,GAAJ,IAAA,GAAA,KAAA;CAPR,OACEA;AASJ;AAEA,SAAgB,kBAAkB,OAA8B;CAC9D,MAAM,QAAQ;CACd,MAAM,OAAO,KAAK,OAAO,OAAO;CAE9B,IAAA,QAAA,QAIC;CADC,OAAA,OAAA,CAAA;EAFA,aAAA;EACA,IAAA,UAAA;GAAO,OAAA,GAAG,+BAA+B,MAAM,KAAK;EAAC;CAC7C,GAAJ,IAAA,GAAA,KAAA;CAJR,OACEC;AAMJ;AAEA,SAAgB,gBAAgB,OAA6B;CAC3D,MAAM,QAAQ;CACd,MAAM,OAAO,KAAK,OAAO,OAAO;CAE9B,IAAA,QAAA,QAIC;CADC,OAAA,OAAA,CAAA;EAFA,aAAA;EACA,IAAA,UAAA;GAAO,OAAA,GAAG,gBAAgB,EAAE,MAAM,OAAO,CAAC,GAAG,MAAM,KAAK;EAAC;CACjD,GAAJ,IAAA,GAAA,KAAA;CAJR,OACEC;AAMJ;AAEA,SAAgB,sBAAsB,OAA4B;CAChE,MAAM,QAAQ;CACd,MAAM,OAAO,KAAK,OA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OAAA;KAAM,OAAA,MAAM;IAAM;IAAxBA,WACI,sBAAe;KAAiE,IAAA,SAAA,QAAA;KAAjE,OAAA,QAA+C,UAAkB;KAAjE,OAAA;IAAiE,EAAA,CAAA;GAC9E,CAAA,GAbR,IAcK;GAdL,OAAA;EAcK,EAAA,CAAA;CAEH,CAAA,GAvBRC,KAyBS;CAzBT,OAAA,aAwBE;EAAC,OAAA,MAAM;CAAQ,GAxBjBA,KAyBS;CA1BX,OACEA;AA2BJ;;AAGA,SAAgB,KAAK,OAA8B;CACjD,MAAM,QAAQ;CACd,MAAM,OAAO,KAAK,OAAO,OAAO;CAE9B,IAAA,SAAA,QAIC;CADC,OAAA,QAAA,CAAA;EAFA,aAAA;EACA,IAAA,UAAA;GAAO,OAAA,GAAG,gDAAgD,MAAM,KAAK;EAAC;CAC9D,GAAJ,IAAA,GAAA,KAAA;CAJR,OACEC;AAMJ"}
|
|
1
|
+
{"version":3,"file":"page.js","names":["<header\n data-slot=\"page-header\"\n class={cn(\n 'flex shrink-0 flex-wrap items-start justify-between gap-x-4 gap-y-3 px-5 pt-5 pb-4',\n local.class\n )}\n {...rest}\n />","<div\n data-slot=\"page-header-content\"\n class={cn('flex min-w-0 flex-col gap-1', local.class)}\n {...rest}\n />","<h1\n data-slot=\"page-header-title\"\n class={cn(headingVariants({ size: 'page' }), local.class)}\n {...rest}\n />","<p\n data-slot=\"page-header-description\"\n class={cn('max-w-prose text-sm text-muted-foreground text-pretty', local.class)}\n {...rest}\n />","<div\n data-slot=\"page-header-actions\"\n class={cn('flex shrink-0 items-center gap-2', local.class)}\n {...rest}\n />","<Show when={local.title}>\n {(titleSlot) => (\n <div class=\"flex items-baseline justify-between gap-3\">\n <div class=\"flex min-w-0 flex-col gap-0.5\">\n <Heading size=\"section\">{titleSlot()}</Heading>\n <Show when={local.description}>\n {(descriptionSlot) => (\n <p class=\"max-w-prose text-sm text-muted-foreground text-pretty\">\n {descriptionSlot()}\n </p>\n )}\n </Show>\n </div>\n <Show when={local.action}>\n {(actionSlot) => <div class=\"flex shrink-0 items-center gap-2\">{actionSlot()}</div>}\n </Show>\n </div>\n )}\n </Show>","<Heading size=\"section\">{titleSlot()}</Heading>","size=\"section\"","<div class=\"flex min-w-0 flex-col gap-0.5\">\n <Heading size=\"section\">{titleSlot()}</Heading>\n <Show when={local.description}>\n {(descriptionSlot) => (\n <p class=\"max-w-prose text-sm text-muted-foreground text-pretty\">\n {descriptionSlot()}\n </p>\n )}\n </Show>\n </div>","<Show when={local.description}>\n {(descriptionSlot) => (\n <p class=\"max-w-prose text-sm text-muted-foreground text-pretty\">\n {descriptionSlot()}\n </p>\n )}\n </Show>","<Show when={local.action}>\n {(actionSlot) => <div class=\"flex shrink-0 items-center gap-2\">{actionSlot()}</div>}\n </Show>","<section\n data-slot=\"page-section\"\n class={cn('flex flex-col gap-3 px-5 py-4', local.class)}\n {...rest}\n >\n <Show when={local.title}>\n {(titleSlot) => (\n <div class=\"flex items-baseline justify-between gap-3\">\n <div class=\"flex min-w-0 flex-col gap-0.5\">\n <Heading size=\"section\">{titleSlot()}</Heading>\n <Show when={local.description}>\n {(descriptionSlot) => (\n <p class=\"max-w-prose text-sm text-muted-foreground text-pretty\">\n {descriptionSlot()}\n </p>\n )}\n </Show>\n </div>\n <Show when={local.action}>\n {(actionSlot) => <div class=\"flex shrink-0 items-center gap-2\">{actionSlot()}</div>}\n </Show>\n </div>\n )}\n </Show>\n {local.children}\n </section>","<div\n data-slot=\"page\"\n class={cn('flex min-h-0 flex-1 flex-col overflow-y-auto', local.class)}\n {...rest}\n />","_$spread","_$insert"],"sources":["../../../../src/components/layout/page/page.tsx"],"sourcesContent":["import type { ComponentProps, JSX } from '@solidjs/web'\nimport { Show, omit } from 'solid-js'\nimport { cn } from '#lib/utils'\nimport { Heading, headingVariants } from '../../ui/typography'\n\n/**\n * PageHeader.\n *\n * The title block at the top of a scrollable page: where the user is, what this\n * page is, and the actions that apply to the whole of it.\n *\n * The action slot is single and singular on purpose. A page header with four\n * equally-weighted buttons has not decided what the page is for; the design\n * system can only make that look tidy, not make it true. Put the primary action\n * here and the rest in an overflow menu or on the rows they belong to.\n */\nexport function PageHeader(props: ComponentProps<'header'>) {\n const local = props\n const rest = omit(props, 'class')\n\n return (\n <header\n data-slot=\"page-header\"\n class={cn(\n 'flex shrink-0 flex-wrap items-start justify-between gap-x-4 gap-y-3 px-5 pt-5 pb-4',\n local.class\n )}\n {...rest}\n />\n )\n}\n\nexport function PageHeaderContent(props: ComponentProps<'div'>) {\n const local = props\n const rest = omit(props, 'class')\n return (\n <div\n data-slot=\"page-header-content\"\n class={cn('flex min-w-0 flex-col gap-1', local.class)}\n {...rest}\n />\n )\n}\n\nexport function PageHeaderTitle(props: ComponentProps<'h1'>) {\n const local = props\n const rest = omit(props, 'class')\n return (\n <h1\n data-slot=\"page-header-title\"\n class={cn(headingVariants({ size: 'page' }), local.class)}\n {...rest}\n />\n )\n}\n\nexport function PageHeaderDescription(props: ComponentProps<'p'>) {\n const local = props\n const rest = omit(props, 'class')\n return (\n <p\n data-slot=\"page-header-description\"\n class={cn('max-w-prose text-sm text-muted-foreground text-pretty', local.class)}\n {...rest}\n />\n )\n}\n\n/** The trailing action group. One primary action, at most. */\nexport function PageHeaderActions(props: ComponentProps<'div'>) {\n const local = props\n const rest = omit(props, 'class')\n return (\n <div\n data-slot=\"page-header-actions\"\n class={cn('flex shrink-0 items-center gap-2', local.class)}\n {...rest}\n />\n )\n}\n\n/**\n * A section inside a page, with an optional title and a description.\n * Sections are separated by space rather than by rules — a page of boxed\n * sections reads as a dashboard, and most pages are not one.\n */\nexport function PageSection(\n props: ComponentProps<'section'> & { title?: string; description?: string; action?: JSX.Element }\n) {\n const local = props\n const rest = omit(props, 'class', 'title', 'description', 'action', 'children')\n\n return (\n <section\n data-slot=\"page-section\"\n class={cn('flex flex-col gap-3 px-5 py-4', local.class)}\n {...rest}\n >\n <Show when={local.title}>\n {(titleSlot) => (\n <div class=\"flex items-baseline justify-between gap-3\">\n <div class=\"flex min-w-0 flex-col gap-0.5\">\n <Heading size=\"section\">{titleSlot()}</Heading>\n <Show when={local.description}>\n {(descriptionSlot) => (\n <p class=\"max-w-prose text-sm text-muted-foreground text-pretty\">\n {descriptionSlot()}\n </p>\n )}\n </Show>\n </div>\n <Show when={local.action}>\n {(actionSlot) => <div class=\"flex shrink-0 items-center gap-2\">{actionSlot()}</div>}\n </Show>\n </div>\n )}\n </Show>\n {local.children}\n </section>\n )\n}\n\n/** The scroll container a page's header and sections sit in. */\nexport function Page(props: ComponentProps<'div'>) {\n const local = props\n const rest = omit(props, 'class')\n return (\n <div\n data-slot=\"page\"\n class={cn('flex min-h-0 flex-1 flex-col overflow-y-auto', local.class)}\n {...rest}\n />\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAgBA,SAAgB,WAAW,OAAiC;CAC1D,MAAM,QAAQ;CACd,MAAM,OAAO,KAAK,OAAO,OAAO;CAG9B,IAAA,OAAA,OAOC;CADCa,OAAA,MAAA,CAAA;EALA,aAAA;EACA,IAAA,UAAA;GAAO,OAAA,GACL,sFACA,MAAM,KACR;EAAC;CACO,GAAJ,IAAA,GAAA,KAAA;CAPR,OACEb;AASJ;AAEA,SAAgB,kBAAkB,OAA8B;CAC9D,MAAM,QAAQ;CACd,MAAM,OAAO,KAAK,OAAO,OAAO;CAE9B,IAAA,QAAA,QAIC;CADCa,OAAA,OAAA,CAAA;EAFA,aAAA;EACA,IAAA,UAAA;GAAO,OAAA,GAAG,+BAA+B,MAAM,KAAK;EAAC;CAC7C,GAAJ,IAAA,GAAA,KAAA;CAJR,OACEZ;AAMJ;AAEA,SAAgB,gBAAgB,OAA6B;CAC3D,MAAM,QAAQ;CACd,MAAM,OAAO,KAAK,OAAO,OAAO;CAE9B,IAAA,QAAA,QAIC;CADCY,OAAA,OAAA,CAAA;EAFA,aAAA;EACA,IAAA,UAAA;GAAO,OAAA,GAAG,gBAAgB,EAAE,MAAM,OAAO,CAAC,GAAG,MAAM,KAA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A,SAAA,QAAA;KAFHK,OAAA,QACG,eACA;KAFH,OAAA;IAEG,EAAA,CAAA;GAED,CAAA,GARRN,MASK;GAVPM,OAAA,OAWEJ,gBAAAA,MAAAA;IAAM,IAAA,OAAA;KAAM,OAAA,MAAM;IAAM;IAAxBA,WACI,sBAAe;KAAiE,IAAA,SAAA,QAAA;KAAjEI,OAAA,QAA+C,UAAkB;KAAjE,OAAA;IAAiE,EAAA,CAAA;GAC9E,CAAA,GAbR,IAcK;GAdL,OAAA;EAcK,EAAA,CAAA;CAEH,CAAA,GAvBRH,KAyBS;CAzBTG,OAAA,aAwBE;EAAC,OAAA,MAAM;CAAQ,GAxBjBH,KAyBS;CA1BX,OACEA;AA2BJ;;AAGA,SAAgB,KAAK,OAA8B;CACjD,MAAM,QAAQ;CACd,MAAM,OAAO,KAAK,OAAO,OAAO;CAE9B,IAAA,SAAA,QAIC;CADCE,OAAA,QAAA,CAAA;EAFA,aAAA;EACA,IAAA,UAAA;GAAO,OAAA,GAAG,gDAAgD,MAAM,KAAK;EAAC;CAC9D,GAAJ,IAAA,GAAA,KAAA;CAJR,OACED;AAMJ"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { cn } from "../../../lib/utils.js";
|
|
2
1
|
import { createComponent, insert, memo, mergeProps, spread, template } from "@solidjs/web";
|
|
3
2
|
import { Show, omit } from "solid-js";
|
|
3
|
+
import { cn } from "../../../lib/utils.js";
|
|
4
4
|
// src/components/layout/panel/panel.tsx
|
|
5
5
|
var _tmpl$ = /* @__PURE__ */ template(`<section>`);
|
|
6
6
|
var _tmpl$2 = /* @__PURE__ */ template(`<header>`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"panel.js","names":["<section\n data-slot=\"panel\"\n class={cn(\n 'bg-surface flex h-full min-h-0 min-w-0 flex-1 flex-col overflow-hidden',\n local.class\n )}\n {...rest}\n />","<Panel\n class={cn(\n 'bg-card m-2 h-[calc(100%-1rem)] rounded-xl border border-border shadow-xs',\n local.class\n )}\n {...rest}\n />","<header\n data-slot=\"panel-header\"\n class={cn(\n 'flex min-h-(--topbar-height) shrink-0 items-center gap-2 border-b border-border px-3',\n local.class\n )}\n {...rest}\n />","<h2\n data-slot=\"panel-title\"\n class={cn('min-w-0 truncate text-sm font-semibold tracking-tight', local.class)}\n {...rest}\n />","<p\n data-slot=\"panel-description\"\n class={cn('truncate text-xs text-muted-foreground', local.class)}\n {...rest}\n />","<div\n data-slot=\"panel-actions\"\n class={cn('ms-auto flex shrink-0 items-center gap-1', local.class)}\n {...rest}\n />","<div\n data-slot=\"panel-toolbar\"\n class={cn(\n 'flex min-h-9 shrink-0 items-center gap-1.5 border-b border-border px-2',\n local.class\n )}\n {...rest}\n />","<div\n data-slot=\"panel-body\"\n class={cn('min-h-0 flex-1 overflow-y-auto', { 'p-3': !local.bare }, local.class)}\n {...rest}\n />","<footer\n data-slot=\"panel-footer\"\n class={cn('flex shrink-0 items-center gap-2 border-t border-border px-3 py-2', local.class)}\n {...rest}\n />","<Show when={local.children}>{(childrenSlot) => <>{childrenSlot()}</>}</Show>","{childrenSlot()}","<div\n data-slot=\"panel-placeholder\"\n class={cn(\n 'text-muted-foreground flex h-full min-h-32 flex-col items-center justify-center gap-2 p-6 text-center text-sm',\n local.class\n )}\n {...rest}\n >\n <Show when={local.children}>{(childrenSlot) => <>{childrenSlot()}</>}</Show>\n </div>"],"sources":["../../../../src/components/layout/panel/panel.tsx"],"sourcesContent":["import type { ComponentProps } from '@solidjs/web'\nimport { Show, omit } from 'solid-js'\nimport { cn } from '#lib/utils'\n\n/**\n * Panel.\n *\n * A titled region inside the content area — an editor, an inspector, a list, a\n * terminal. It is the third level of surface after the shell and the sidebar,\n * and like them its parts are fixed: a header with a title and a toolbar, a\n * scrolling body, an optional footer.\n *\n * The body scrolls and the header does not, which is the whole reason this is a\n * component. A panel whose header scrolls away loses the name of what the user\n * is looking at, and every hand-built panel gets this wrong at least once.\n *\n * Component props are `title`-agnostic on purpose: the panel does not decide\n * how large its title is, so an inspector's title and an editor's title agree.\n */\nexport function Panel(props: ComponentProps<'section'>) {\n const local = props\n const rest = omit(props, 'class')\n\n return (\n <section\n data-slot=\"panel\"\n class={cn(\n 'bg-surface flex h-full min-h-0 min-w-0 flex-1 flex-col overflow-hidden',\n local.class\n )}\n {...rest}\n />\n )\n}\n\n/** A panel whose surface is raised, for a panel floating over the canvas. */\nexport function PanelCard(props: ComponentProps<'section'>) {\n const local = props\n const rest = omit(props, 'class')\n\n return (\n <Panel\n class={cn(\n 'bg-card m-2 h-[calc(100%-1rem)] rounded-xl border border-border shadow-xs',\n local.class\n )}\n {...rest}\n />\n )\n}\n\nexport function PanelHeader(props: ComponentProps<'header'>) {\n const local = props\n const rest = omit(props, 'class')\n\n return (\n <header\n data-slot=\"panel-header\"\n class={cn(\n 'flex min-h-(--topbar-height) shrink-0 items-center gap-2 border-b border-border px-3',\n local.class\n )}\n {...rest}\n />\n )\n}\n\nexport function PanelTitle(props: ComponentProps<'h2'>) {\n const local = props\n const rest = omit(props, 'class')\n return (\n <h2\n data-slot=\"panel-title\"\n class={cn('min-w-0 truncate text-sm font-semibold tracking-tight', local.class)}\n {...rest}\n />\n )\n}\n\nexport function PanelDescription(props: ComponentProps<'p'>) {\n const local = props\n const rest = omit(props, 'class')\n return (\n <p\n data-slot=\"panel-description\"\n class={cn('truncate text-xs text-muted-foreground', local.class)}\n {...rest}\n />\n )\n}\n\n/** The trailing group in a panel header: buttons, tabs, a menu. */\nexport function PanelActions(props: ComponentProps<'div'>) {\n const local = props\n const rest = omit(props, 'class')\n return (\n <div\n data-slot=\"panel-actions\"\n class={cn('ms-auto flex shrink-0 items-center gap-1', local.class)}\n {...rest}\n />\n )\n}\n\n/** A secondary row under the header: a toolbar, tabs, a filter bar. */\nexport function PanelToolbar(props: ComponentProps<'div'>) {\n const local = props\n const rest = omit(props, 'class')\n return (\n <div\n data-slot=\"panel-toolbar\"\n class={cn(\n 'flex min-h-9 shrink-0 items-center gap-1.5 border-b border-border px-2',\n local.class\n )}\n {...rest}\n />\n )\n}\n\n/**\n * The scrolling region.\n *\n * `min-h-0` is required and easy to omit: a flex child's default `min-height`\n * is its content, so without it a long body pushes the panel past its parent\n * instead of scrolling.\n */\nexport function PanelBody(\n props: ComponentProps<'div'> & { /** Remove the default padding. */ bare?: boolean }\n) {\n const local = props\n const rest = omit(props, 'class', 'bare')\n\n return (\n <div\n data-slot=\"panel-body\"\n class={cn('min-h-0 flex-1 overflow-y-auto', { 'p-3': !local.bare }, local.class)}\n {...rest}\n />\n )\n}\n\nexport function PanelFooter(props: ComponentProps<'footer'>) {\n const local = props\n const rest = omit(props, 'class')\n return (\n <footer\n data-slot=\"panel-footer\"\n class={cn('flex shrink-0 items-center gap-2 border-t border-border px-3 py-2', local.class)}\n {...rest}\n />\n )\n}\n\n/**\n * The centered message a panel shows when it has no content. Distinct from\n * `Empty`, which is a full-page state with room for media and actions; this is\n * the in-pane version, sized for a column.\n */\nexport function PanelPlaceholder(props: ComponentProps<'div'>) {\n const local = props\n const rest = omit(props, 'class', 'children')\n\n return (\n <div\n data-slot=\"panel-placeholder\"\n class={cn(\n 'text-muted-foreground flex h-full min-h-32 flex-col items-center justify-center gap-2 p-6 text-center text-sm',\n local.class\n )}\n {...rest}\n >\n <Show when={local.children}>{(childrenSlot) => <>{childrenSlot()}</>}</Show>\n </div>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAmBA,SAAgB,MAAM,OAAkC;CACtD,MAAM,QAAQ;CACd,MAAM,OAAO,KAAK,OAAO,OAAO;CAG9B,IAAA,OAAA,OAOC;
|
|
1
|
+
{"version":3,"file":"panel.js","names":["<section\n data-slot=\"panel\"\n class={cn(\n 'bg-surface flex h-full min-h-0 min-w-0 flex-1 flex-col overflow-hidden',\n local.class\n )}\n {...rest}\n />","<Panel\n class={cn(\n 'bg-card m-2 h-[calc(100%-1rem)] rounded-xl border border-border shadow-xs',\n local.class\n )}\n {...rest}\n />","<header\n data-slot=\"panel-header\"\n class={cn(\n 'flex min-h-(--topbar-height) shrink-0 items-center gap-2 border-b border-border px-3',\n local.class\n )}\n {...rest}\n />","<h2\n data-slot=\"panel-title\"\n class={cn('min-w-0 truncate text-sm font-semibold tracking-tight', local.class)}\n {...rest}\n />","<p\n data-slot=\"panel-description\"\n class={cn('truncate text-xs text-muted-foreground', local.class)}\n {...rest}\n />","<div\n data-slot=\"panel-actions\"\n class={cn('ms-auto flex shrink-0 items-center gap-1', local.class)}\n {...rest}\n />","<div\n data-slot=\"panel-toolbar\"\n class={cn(\n 'flex min-h-9 shrink-0 items-center gap-1.5 border-b border-border px-2',\n local.class\n )}\n {...rest}\n />","<div\n data-slot=\"panel-body\"\n class={cn('min-h-0 flex-1 overflow-y-auto', { 'p-3': !local.bare }, local.class)}\n {...rest}\n />","<footer\n data-slot=\"panel-footer\"\n class={cn('flex shrink-0 items-center gap-2 border-t border-border px-3 py-2', local.class)}\n {...rest}\n />","<Show when={local.children}>{(childrenSlot) => <>{childrenSlot()}</>}</Show>","{childrenSlot()}","<div\n data-slot=\"panel-placeholder\"\n class={cn(\n 'text-muted-foreground flex h-full min-h-32 flex-col items-center justify-center gap-2 p-6 text-center text-sm',\n local.class\n )}\n {...rest}\n >\n <Show when={local.children}>{(childrenSlot) => <>{childrenSlot()}</>}</Show>\n </div>","_$spread","_$insert"],"sources":["../../../../src/components/layout/panel/panel.tsx"],"sourcesContent":["import type { ComponentProps } from '@solidjs/web'\nimport { Show, omit } from 'solid-js'\nimport { cn } from '#lib/utils'\n\n/**\n * Panel.\n *\n * A titled region inside the content area — an editor, an inspector, a list, a\n * terminal. It is the third level of surface after the shell and the sidebar,\n * and like them its parts are fixed: a header with a title and a toolbar, a\n * scrolling body, an optional footer.\n *\n * The body scrolls and the header does not, which is the whole reason this is a\n * component. A panel whose header scrolls away loses the name of what the user\n * is looking at, and every hand-built panel gets this wrong at least once.\n *\n * Component props are `title`-agnostic on purpose: the panel does not decide\n * how large its title is, so an inspector's title and an editor's title agree.\n */\nexport function Panel(props: ComponentProps<'section'>) {\n const local = props\n const rest = omit(props, 'class')\n\n return (\n <section\n data-slot=\"panel\"\n class={cn(\n 'bg-surface flex h-full min-h-0 min-w-0 flex-1 flex-col overflow-hidden',\n local.class\n )}\n {...rest}\n />\n )\n}\n\n/** A panel whose surface is raised, for a panel floating over the canvas. */\nexport function PanelCard(props: ComponentProps<'section'>) {\n const local = props\n const rest = omit(props, 'class')\n\n return (\n <Panel\n class={cn(\n 'bg-card m-2 h-[calc(100%-1rem)] rounded-xl border border-border shadow-xs',\n local.class\n )}\n {...rest}\n />\n )\n}\n\nexport function PanelHeader(props: ComponentProps<'header'>) {\n const local = props\n const rest = omit(props, 'class')\n\n return (\n <header\n data-slot=\"panel-header\"\n class={cn(\n 'flex min-h-(--topbar-height) shrink-0 items-center gap-2 border-b border-border px-3',\n local.class\n )}\n {...rest}\n />\n )\n}\n\nexport function PanelTitle(props: ComponentProps<'h2'>) {\n const local = props\n const rest = omit(props, 'class')\n return (\n <h2\n data-slot=\"panel-title\"\n class={cn('min-w-0 truncate text-sm font-semibold tracking-tight', local.class)}\n {...rest}\n />\n )\n}\n\nexport function PanelDescription(props: ComponentProps<'p'>) {\n const local = props\n const rest = omit(props, 'class')\n return (\n <p\n data-slot=\"panel-description\"\n class={cn('truncate text-xs text-muted-foreground', local.class)}\n {...rest}\n />\n )\n}\n\n/** The trailing group in a panel header: buttons, tabs, a menu. */\nexport function PanelActions(props: ComponentProps<'div'>) {\n const local = props\n const rest = omit(props, 'class')\n return (\n <div\n data-slot=\"panel-actions\"\n class={cn('ms-auto flex shrink-0 items-center gap-1', local.class)}\n {...rest}\n />\n )\n}\n\n/** A secondary row under the header: a toolbar, tabs, a filter bar. */\nexport function PanelToolbar(props: ComponentProps<'div'>) {\n const local = props\n const rest = omit(props, 'class')\n return (\n <div\n data-slot=\"panel-toolbar\"\n class={cn(\n 'flex min-h-9 shrink-0 items-center gap-1.5 border-b border-border px-2',\n local.class\n )}\n {...rest}\n />\n )\n}\n\n/**\n * The scrolling region.\n *\n * `min-h-0` is required and easy to omit: a flex child's default `min-height`\n * is its content, so without it a long body pushes the panel past its parent\n * instead of scrolling.\n */\nexport function PanelBody(\n props: ComponentProps<'div'> & { /** Remove the default padding. */ bare?: boolean }\n) {\n const local = props\n const rest = omit(props, 'class', 'bare')\n\n return (\n <div\n data-slot=\"panel-body\"\n class={cn('min-h-0 flex-1 overflow-y-auto', { 'p-3': !local.bare }, local.class)}\n {...rest}\n />\n )\n}\n\nexport function PanelFooter(props: ComponentProps<'footer'>) {\n const local = props\n const rest = omit(props, 'class')\n return (\n <footer\n data-slot=\"panel-footer\"\n class={cn('flex shrink-0 items-center gap-2 border-t border-border px-3 py-2', local.class)}\n {...rest}\n />\n )\n}\n\n/**\n * The centered message a panel shows when it has no content. Distinct from\n * `Empty`, which is a full-page state with room for media and actions; this is\n * the in-pane version, sized for a column.\n */\nexport function PanelPlaceholder(props: ComponentProps<'div'>) {\n const local = props\n const rest = omit(props, 'class', 'children')\n\n return (\n <div\n data-slot=\"panel-placeholder\"\n class={cn(\n 'text-muted-foreground flex h-full min-h-32 flex-col items-center justify-center gap-2 p-6 text-center text-sm',\n local.class\n )}\n {...rest}\n >\n <Show when={local.children}>{(childrenSlot) => <>{childrenSlot()}</>}</Show>\n </div>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAmBA,SAAgB,MAAM,OAAkC;CACtD,MAAM,QAAQ;CACd,MAAM,OAAO,KAAK,OAAO,OAAO;CAG9B,IAAA,OAAA,OAOC;CADCY,OAAA,MAAA,CAAA;EALA,aAAA;EACA,IAAA,UAAA;GAAO,OAAA,GACL,0EACA,MAAM,KACR;EAAC;CACO,GAAJ,IAAA,GAAA,KAAA;CAPR,OACEZ;AASJ;;AAGA,SAAgB,UAAU,OAAkC;CAC1D,MAAM,QAAQ;CACd,MAAM,OAAO,KAAK,OAAO,OAAO;CAEhC,OACEC,gBAAAA,OAAAA,WAAAA,EAC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AAA;EACA,IAAA,UAAA;GAAO,OAAA,GACL,0EACA,MAAM,KACR;EAAC;CACO,GAAJ,IAAA,GAAA,KAAA;CAPR,OACEN;AASJ;;;;;;;;AASA,SAAgB,UACd,OACA;CACA,MAAM,QAAQ;CACd,MAAM,OAAO,KAAK,OAAO,SAAS,MAAM;CAGtC,IAAA,QAAA,QAIC;CADCM,OAAA,OAAA,CAAA;EAFA,aAAA;EACA,IAAA,UAAA;GAAO,OAAA,GAAG,kCAAkC,EAAE,OAAO,CAAC,MAAM,KAAK,GAAG,MAAM,KAAK;EAAC;CACxE,GAAJ,IAAA,GAAA,KAAA;CAJR,OACEL;AAMJ;AAEA,SAAgB,YAAY,OAAiC;CAC3D,MAAM,QAAQ;CACd,MAAM,OAAO,KAAK,OAAO,OAAO;CAE9B,IAAA,QAAA,QAIC;CADCK,OAAA,OAAA,CAAA;EAFA,aAAA;EACA,IAAA,UAAA;GAAO,OAAA,GAAG,qEAAqE,MAAM,KAAK;EAAC;CACnF,GAAJ,IAAA,GAAA,KAAA;CAJR,OACEJ;AAMJ;;;;;;AAOA,SAAgB,iBAAiB,OAA8B;CAC7D,MAAM,QAAQ;CACd,MAAM,OAAO,KAAK,OAAO,SAAS,UAAU;CAG1C,IAAA,QAAA,QASK;CAHHI,OAAA,OAAA,CAAA;EALA,aAAA;EACA,IAAA,UAAA;GAAO,OAAA,GACL,iHACA,MAAM,KACR;EAAC;CACO,GAAJ,IAAA,GAAA,IAAA;CANNC,OAAA,OAQEJ,gBAAAA,MAAAA;EAAM,IAAA,OAAA;GAAM,OAAA,MAAM;EAAQ;EAA1BA,WAA8B,iBAAmBC,KAAC,YAAc;CAAW,CAAA,CACxE;CAVP,OACEC;AAWJ"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { cn } from "../../../lib/utils.js";
|
|
2
1
|
import { spread, template } from "@solidjs/web";
|
|
3
2
|
import { omit } from "solid-js";
|
|
3
|
+
import { cn } from "../../../lib/utils.js";
|
|
4
4
|
// src/components/layout/pixel-pane/pixel-pane.tsx
|
|
5
5
|
var _tmpl$ = /* @__PURE__ */ template(`<div>`);
|
|
6
6
|
/**
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
+
import { className, createComponent, delegateEvents, effect, insert, memo, readShallow, setAttribute, setStyleProperty, template } from "@solidjs/web";
|
|
2
|
+
import { GripVertical as GripVertical$1 } from "@lucide/solid";
|
|
3
|
+
import { createSignal, onCleanup } from "solid-js";
|
|
1
4
|
import { cn } from "../../../lib/utils.js";
|
|
2
5
|
import { resizeGripClass, resizeGripIconClass, resizeSeparatorClass } from "../../../lib/resize-separator.js";
|
|
3
6
|
import { fastIcon } from "../../../lib/fast-icon.js";
|
|
4
|
-
import { className, createComponent, delegateEvents, effect, insert, memo, readShallow, setAttribute, setStyleProperty, template } from "@solidjs/web";
|
|
5
|
-
import { GripVertical } from "@lucide/solid";
|
|
6
|
-
import { createSignal, onCleanup } from "solid-js";
|
|
7
7
|
// src/components/layout/pixel-resize-handle/pixel-resize-handle.tsx
|
|
8
8
|
var _tmpl$ = /* @__PURE__ */ template(`<div><div role=separator tabindex=0 aria-orientation=vertical>`);
|
|
9
9
|
var _tmpl$2 = /* @__PURE__ */ template(`<div>`);
|
|
10
10
|
var _tmpl$3 = /* @__PURE__ */ template(`<div data-slot=resizable-grip>`);
|
|
11
|
-
var GripVertical
|
|
11
|
+
var GripVertical = fastIcon(GripVertical$1);
|
|
12
12
|
/**
|
|
13
13
|
* PixelResizeHandle.
|
|
14
14
|
*
|
|
@@ -148,7 +148,7 @@ function PixelResizeHandle(props) {
|
|
|
148
148
|
return () => {
|
|
149
149
|
return _c$() ? (() => {
|
|
150
150
|
var _el$3 = _tmpl$2();
|
|
151
|
-
insert(_el$3, createComponent(GripVertical
|
|
151
|
+
insert(_el$3, createComponent(GripVertical, { class: resizeGripIconClass }));
|
|
152
152
|
effect(() => readShallow(resizeGripClass.chip), (_v$, _$p) => {
|
|
153
153
|
className(_el$3, _v$, _$p);
|
|
154
154
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pixel-resize-handle.js","names":["<GripVertical class={resizeGripIconClass} />","class={resizeGripIconClass}","width: `${maximum()}px`","aria-label={props.label ?? `Resize ${props.side} pane`}","aria-controls={props.controls}","aria-valuemin={minimum()}","aria-valuemax={maximum()}","aria-valuenow={value()}","aria-valuetext={`${value()} pixels`}","data-dragging={drag() ? '' : undefined}","left: `${isRight() ? maximum() - value() : value()}px`","class={cn(\n resizeSeparatorClass(props.grip ?? 'rung'),\n 'pointer-events-auto absolute inset-y-0 w-px cursor-pointer'\n )}","<div\n class={cn(\n 'pointer-events-none absolute inset-y-0',\n {\n 'left-0': props.side === 'left',\n 'right-0': props.side === 'right',\n },\n props.class\n )}\n style={{ width: `${maximum()}px` }}\n >\n <div\n role=\"separator\"\n tabindex={0}\n aria-orientation=\"vertical\"\n aria-label={props.label ?? `Resize ${props.side} pane`}\n aria-controls={props.controls}\n aria-valuemin={minimum()}\n aria-valuemax={maximum()}\n aria-valuenow={value()}\n aria-valuetext={`${value()} pixels`}\n data-dragging={drag() ? '' : undefined}\n style={{ left: `${isRight() ? maximum() - value() : value()}px` }}\n class={cn(\n resizeSeparatorClass(props.grip ?? 'rung'),\n 'pointer-events-auto absolute inset-y-0 w-px cursor-pointer'\n )}\n onPointerDown={(event) => {\n if (event.button !== 0 || !event.isPrimary) return\n const handle = event.currentTarget\n endPointer(false)\n interacting = false\n handle.focus()\n handle.setPointerCapture(event.pointerId)\n pointerValue = undefined\n setDrag({\n pointerId: event.pointerId,\n startX: event.clientX,\n startValue: value(),\n handle,\n })\n }}\n onPointerMove={(event) => {\n const current = drag()\n if (!current || event.pointerId !== current.pointerId) return\n if (!current.handle.hasPointerCapture(current.pointerId)) {\n endPointer(false)\n return\n }\n const delta = (event.clientX - current.startX) * (isRight() ? -1 : 1)\n scheduleMove(bounded(current.startValue + delta))\n }}\n // A press that lands in a text selection would start a native drag of it,\n // and the browser cancels the pointer gesture for that drag.\n onDragStart={(event) => event.preventDefault()}\n onPointerUp={(event) => {\n if (event.pointerId === drag()?.pointerId) endPointer(true)\n }}\n onPointerCancel={(event) => {\n if (event.pointerId === drag()?.pointerId) endPointer(false)\n }}\n onLostPointerCapture={(event) => {\n if (event.pointerId === drag()?.pointerId) endPointer(false)\n }}\n onBlur={() => {\n endKeyboard()\n endPointer(false)\n }}\n onKeyDown={(event) => {\n const current = drag()\n if (current && !current.handle.hasPointerCapture(current.pointerId)) endPointer(false)\n if (drag()) {\n event.preventDefault()\n return\n }\n const direction = KEY_DIRECTION[event.key]\n if (direction !== undefined) {\n event.preventDefault()\n interacting = true\n move(bounded(value() + direction * (isRight() ? -1 : 1) * (props.step ?? 16)))\n } else if (event.key === 'Home' || event.key === 'End') {\n event.preventDefault()\n interacting = true\n move(event.key === 'Home' ? minimum() : maximum())\n }\n }}\n onKeyUp={(event) => {\n if (['ArrowLeft', 'ArrowRight', 'Home', 'End'].includes(event.key)) endKeyboard()\n }}\n >\n {props.grip === 'chip' ? (\n <div class={resizeGripClass.chip}>\n <GripVertical class={resizeGripIconClass} />\n </div>\n ) : (\n <div data-slot=\"resizable-grip\" class={resizeGripClass.rung} />\n )}\n </div>\n </div>","GripVertical","LucideGripVertical","_$readShallow","_$setStyleProperty","_$setAttribute"],"sources":["../../../../src/components/layout/pixel-resize-handle/pixel-resize-handle.tsx"],"sourcesContent":["import { GripVertical as LucideGripVertical } from '@lucide/solid'\nimport { createSignal, onCleanup } from 'solid-js'\nimport { cn } from '#lib/utils'\nimport { resizeGripClass, resizeGripIconClass, resizeSeparatorClass } from '#lib/resize-separator'\nimport { fastIcon } from '#lib/fast-icon'\n\n// lucide icons drawn from a cloned template (see fastIcon).\nconst GripVertical = fastIcon(LucideGripVertical)\n\nexport type PixelResizeHandleProps = {\n /** Which physical edge of the ruler the resizable surface is attached to. */\n side: 'left' | 'right'\n /** Current width in CSS pixels. */\n value: number\n minimum: number\n maximum: number\n step?: number\n label?: string\n controls?: string\n class?: string\n /**\n * The grip drawn on the edge: the quieter rung by default, or the bordered\n * chip for hosts that want the heavier affordance.\n */\n grip?: 'chip' | 'rung'\n onChange(value: number): void\n onCommit?(value: number): void\n}\n\n/**\n * PixelResizeHandle.\n *\n * A keyboard- and pointer-operable edge ruler for a host-owned pane. Keep the\n * pane's actual width and any persistence in its layout owner; this component\n * reports a bounded pixel value and draws the grip at the matching left or\n * right edge.\n *\n * The ruler is a single separator positioned inside a box as wide as the\n * maximum, so it needs no panel-group geometry (and none of the split-layout\n * code that comes with one): arrow keys move it by `step` along its visual\n * edge, Home and End jump to the bounds, and a pointer drag is captured on the\n * handle so cancellation and lost capture end the gesture.\n */\nexport function PixelResizeHandle(props: PixelResizeHandleProps) {\n const maximum = () => Math.max(1, props.maximum)\n const minimum = () => Math.min(maximum(), Math.max(0, props.minimum))\n const value = () => Math.min(maximum(), Math.max(minimum(), Math.round(props.value)))\n const isRight = () => props.side === 'right'\n const bounded = (next: number) => Math.min(maximum(), Math.max(minimum(), Math.round(next)))\n const commit = (next = value()) => props.onCommit?.(next)\n let interacting = false\n const [drag, setDrag] = createSignal<{\n pointerId: number\n startX: number\n startValue: number\n handle: HTMLElement\n }>()\n // Pointer moves are applied once per frame: each `onChange` relays out the\n // shell, and pointer events can arrive faster than frames (WebKit does not align\n // them). Ending the gesture applies the last pending value first.\n let pendingMove: number | undefined\n let moveFrame: number | undefined\n // The last value the pointer asked for, whether or not its frame has run. A\n // release reads this rather than the prop, which reports the host's previous\n // width until the update renders.\n let pointerValue: number | undefined\n const flushMove = () => {\n if (moveFrame !== undefined) cancelAnimationFrame(moveFrame)\n moveFrame = undefined\n const next = pendingMove\n pendingMove = undefined\n if (next === undefined) return\n move(next)\n return next\n }\n const scheduleMove = (next: number) => {\n pendingMove = next\n pointerValue = next\n if (moveFrame === undefined) moveFrame = requestAnimationFrame(flushMove)\n }\n const endPointer = (shouldCommit: boolean) => {\n const current = drag()\n if (!current) return\n const applied = flushMove()\n // The pending move is applied to the host first, but the prop it reports\n // through is read on the next render. Commit the value just applied, not\n // the stale prop, or a fast release reports the previous width.\n const committed = applied ?? pointerValue ?? value()\n pointerValue = undefined\n setDrag(undefined)\n if (current.handle.hasPointerCapture(current.pointerId))\n current.handle.releasePointerCapture(current.pointerId)\n if (shouldCommit) commit(committed)\n }\n const endKeyboard = () => {\n const wasInteracting = interacting\n interacting = false\n if (wasInteracting) commit()\n }\n onCleanup(() => {\n endKeyboard()\n endPointer(false)\n })\n const move = (next: number) => {\n if (next !== value()) props.onChange(next)\n }\n // Arrow keys describe physical movement of the handle: on a right-edge pane\n // moving the handle left widens the pane.\n const KEY_DIRECTION: Record<string, number> = { ArrowLeft: -1, ArrowRight: 1 }\n\n return (\n <div\n class={cn(\n 'pointer-events-none absolute inset-y-0',\n {\n 'left-0': props.side === 'left',\n 'right-0': props.side === 'right',\n },\n props.class\n )}\n style={{ width: `${maximum()}px` }}\n >\n <div\n role=\"separator\"\n tabindex={0}\n aria-orientation=\"vertical\"\n aria-label={props.label ?? `Resize ${props.side} pane`}\n aria-controls={props.controls}\n aria-valuemin={minimum()}\n aria-valuemax={maximum()}\n aria-valuenow={value()}\n aria-valuetext={`${value()} pixels`}\n data-dragging={drag() ? '' : undefined}\n style={{ left: `${isRight() ? maximum() - value() : value()}px` }}\n class={cn(\n resizeSeparatorClass(props.grip ?? 'rung'),\n 'pointer-events-auto absolute inset-y-0 w-px cursor-pointer'\n )}\n onPointerDown={(event) => {\n if (event.button !== 0 || !event.isPrimary) return\n const handle = event.currentTarget\n endPointer(false)\n interacting = false\n handle.focus()\n handle.setPointerCapture(event.pointerId)\n pointerValue = undefined\n setDrag({\n pointerId: event.pointerId,\n startX: event.clientX,\n startValue: value(),\n handle,\n })\n }}\n onPointerMove={(event) => {\n const current = drag()\n if (!current || event.pointerId !== current.pointerId) return\n if (!current.handle.hasPointerCapture(current.pointerId)) {\n endPointer(false)\n return\n }\n const delta = (event.clientX - current.startX) * (isRight() ? -1 : 1)\n scheduleMove(bounded(current.startValue + delta))\n }}\n // A press that lands in a text selection would start a native drag of it,\n // and the browser cancels the pointer gesture for that drag.\n onDragStart={(event) => event.preventDefault()}\n onPointerUp={(event) => {\n if (event.pointerId === drag()?.pointerId) endPointer(true)\n }}\n onPointerCancel={(event) => {\n if (event.pointerId === drag()?.pointerId) endPointer(false)\n }}\n onLostPointerCapture={(event) => {\n if (event.pointerId === drag()?.pointerId) endPointer(false)\n }}\n onBlur={() => {\n endKeyboard()\n endPointer(false)\n }}\n onKeyDown={(event) => {\n const current = drag()\n if (current && !current.handle.hasPointerCapture(current.pointerId)) endPointer(false)\n if (drag()) {\n event.preventDefault()\n return\n }\n const direction = KEY_DIRECTION[event.key]\n if (direction !== undefined) {\n event.preventDefault()\n interacting = true\n move(bounded(value() + direction * (isRight() ? -1 : 1) * (props.step ?? 16)))\n } else if (event.key === 'Home' || event.key === 'End') {\n event.preventDefault()\n interacting = true\n move(event.key === 'Home' ? minimum() : maximum())\n }\n }}\n onKeyUp={(event) => {\n if (['ArrowLeft', 'ArrowRight', 'Home', 'End'].includes(event.key)) endKeyboard()\n }}\n >\n {props.grip === 'chip' ? (\n <div class={resizeGripClass.chip}>\n <GripVertical class={resizeGripIconClass} />\n </div>\n ) : (\n <div data-slot=\"resizable-grip\" class={resizeGripClass.rung} />\n )}\n </div>\n </div>\n )\n}\n"],"mappings":";;;;;;;;;;AAOA,IAAMa,iBAAe,SAASC,YAAkB;;;;;;;;;;;;;;;AAoChD,SAAgB,kBAAkB,OAA+B;CAC/D,MAAM,gBAAgB,KAAK,IAAI,GAAG,MAAM,OAAO;CAC/C,MAAM,gBAAgB,KAAK,IAAI,QAAQ,GAAG,KAAK,IAAI,GAAG,MAAM,OAAO,CAAC;CACpE,MAAM,cAAc,KAAK,IAAI,QAAQ,GAAG,KAAK,IAAI,QAAQ,GAAG,KAAK,MAAM,MAAM,KAAK,CAAC,CAAC;CACpF,MAAM,gBAAgB,MAAM,SAAS;CACrC,MAAM,WAAW,SAAiB,KAAK,I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MAAM,GACzC,4DACF,CAAC;EAlBF;CAPD,IAAA,EAAA,GAAA,GAAA,GAAA,GAAA,GAAA,GAAA,GAAA,GAAA,GAAA,GAAA,KAAA,QAAA;EAOC,UAAA,MAAA,GAAA,KAAA,CAAA;EACQ,MAAA,KAAA,KAAAK,iBAAA,MAAA,SAAA,CAAsB;EAM7B,MAAA,KAAA,KAAAC,aAAA,OAAA,cAAA,CAAsD;EACtD,MAAA,KAAA,KAAAA,aAAA,OAAA,iBAAA,CAA6B;EAC7B,MAAA,KAAA,KAAAA,aAAA,OAAA,iBAAA,CAAwB;EACxB,MAAA,KAAA,KAAAA,aAAA,OAAA,iBAAA,CAAwB;EACxB,MAAA,KAAA,KAAAA,aAAA,OAAA,iBAAA,CAAsB;EACtB,MAAA,KAAA,KAAAA,aAAA,OAAA,kBAAA,CAAmC;EACnC,MAAA,KAAA,KAAAA,aAAA,OAAA,iBAAA,CAAsC;EAC7B,MAAA,KAAA,KAAAD,iBAAA,OAAA,QAAA,CAAqD;EAC9D,UAAA,OAAA,GAAA,KAAA,CAGC;CAlBF,CAAA;CATL,OACEJ;AAoGJ"}
|
|
1
|
+
{"version":3,"file":"pixel-resize-handle.js","names":["<GripVertical class={resizeGripIconClass} />","class={resizeGripIconClass}","width: `${maximum()}px`","aria-label={props.label ?? `Resize ${props.side} pane`}","aria-controls={props.controls}","aria-valuemin={minimum()}","aria-valuemax={maximum()}","aria-valuenow={value()}","aria-valuetext={`${value()} pixels`}","data-dragging={drag() ? '' : undefined}","left: `${isRight() ? maximum() - value() : value()}px`","class={cn(\n resizeSeparatorClass(props.grip ?? 'rung'),\n 'pointer-events-auto absolute inset-y-0 w-px cursor-pointer'\n )}","<div\n class={cn(\n 'pointer-events-none absolute inset-y-0',\n {\n 'left-0': props.side === 'left',\n 'right-0': props.side === 'right',\n },\n props.class\n )}\n style={{ width: `${maximum()}px` }}\n >\n <div\n role=\"separator\"\n tabindex={0}\n aria-orientation=\"vertical\"\n aria-label={props.label ?? `Resize ${props.side} pane`}\n aria-controls={props.controls}\n aria-valuemin={minimum()}\n aria-valuemax={maximum()}\n aria-valuenow={value()}\n aria-valuetext={`${value()} pixels`}\n data-dragging={drag() ? '' : undefined}\n style={{ left: `${isRight() ? maximum() - value() : value()}px` }}\n class={cn(\n resizeSeparatorClass(props.grip ?? 'rung'),\n 'pointer-events-auto absolute inset-y-0 w-px cursor-pointer'\n )}\n onPointerDown={(event) => {\n if (event.button !== 0 || !event.isPrimary) return\n const handle = event.currentTarget\n endPointer(false)\n interacting = false\n handle.focus()\n handle.setPointerCapture(event.pointerId)\n pointerValue = undefined\n setDrag({\n pointerId: event.pointerId,\n startX: event.clientX,\n startValue: value(),\n handle,\n })\n }}\n onPointerMove={(event) => {\n const current = drag()\n if (!current || event.pointerId !== current.pointerId) return\n if (!current.handle.hasPointerCapture(current.pointerId)) {\n endPointer(false)\n return\n }\n const delta = (event.clientX - current.startX) * (isRight() ? -1 : 1)\n scheduleMove(bounded(current.startValue + delta))\n }}\n // A press that lands in a text selection would start a native drag of it,\n // and the browser cancels the pointer gesture for that drag.\n onDragStart={(event) => event.preventDefault()}\n onPointerUp={(event) => {\n if (event.pointerId === drag()?.pointerId) endPointer(true)\n }}\n onPointerCancel={(event) => {\n if (event.pointerId === drag()?.pointerId) endPointer(false)\n }}\n onLostPointerCapture={(event) => {\n if (event.pointerId === drag()?.pointerId) endPointer(false)\n }}\n onBlur={() => {\n endKeyboard()\n endPointer(false)\n }}\n onKeyDown={(event) => {\n const current = drag()\n if (current && !current.handle.hasPointerCapture(current.pointerId)) endPointer(false)\n if (drag()) {\n event.preventDefault()\n return\n }\n const direction = KEY_DIRECTION[event.key]\n if (direction !== undefined) {\n event.preventDefault()\n interacting = true\n move(bounded(value() + direction * (isRight() ? -1 : 1) * (props.step ?? 16)))\n } else if (event.key === 'Home' || event.key === 'End') {\n event.preventDefault()\n interacting = true\n move(event.key === 'Home' ? minimum() : maximum())\n }\n }}\n onKeyUp={(event) => {\n if (['ArrowLeft', 'ArrowRight', 'Home', 'End'].includes(event.key)) endKeyboard()\n }}\n >\n {props.grip === 'chip' ? (\n <div class={resizeGripClass.chip}>\n <GripVertical class={resizeGripIconClass} />\n </div>\n ) : (\n <div data-slot=\"resizable-grip\" class={resizeGripClass.rung} />\n )}\n </div>\n </div>","LucideGripVertical","_$insert","_$effect","_$readShallow","_$className","_$setStyleProperty","_$setAttribute"],"sources":["../../../../src/components/layout/pixel-resize-handle/pixel-resize-handle.tsx"],"sourcesContent":["import { GripVertical as LucideGripVertical } from '@lucide/solid'\nimport { createSignal, onCleanup } from 'solid-js'\nimport { cn } from '#lib/utils'\nimport { resizeGripClass, resizeGripIconClass, resizeSeparatorClass } from '#lib/resize-separator'\nimport { fastIcon } from '#lib/fast-icon'\n\n// lucide icons drawn from a cloned template (see fastIcon).\nconst GripVertical = fastIcon(LucideGripVertical)\n\nexport type PixelResizeHandleProps = {\n /** Which physical edge of the ruler the resizable surface is attached to. */\n side: 'left' | 'right'\n /** Current width in CSS pixels. */\n value: number\n minimum: number\n maximum: number\n step?: number\n label?: string\n controls?: string\n class?: string\n /**\n * The grip drawn on the edge: the quieter rung by default, or the bordered\n * chip for hosts that want the heavier affordance.\n */\n grip?: 'chip' | 'rung'\n onChange(value: number): void\n onCommit?(value: number): void\n}\n\n/**\n * PixelResizeHandle.\n *\n * A keyboard- and pointer-operable edge ruler for a host-owned pane. Keep the\n * pane's actual width and any persistence in its layout owner; this component\n * reports a bounded pixel value and draws the grip at the matching left or\n * right edge.\n *\n * The ruler is a single separator positioned inside a box as wide as the\n * maximum, so it needs no panel-group geometry (and none of the split-layout\n * code that comes with one): arrow keys move it by `step` along its visual\n * edge, Home and End jump to the bounds, and a pointer drag is captured on the\n * handle so cancellation and lost capture end the gesture.\n */\nexport function PixelResizeHandle(props: PixelResizeHandleProps) {\n const maximum = () => Math.max(1, props.maximum)\n const minimum = () => Math.min(maximum(), Math.max(0, props.minimum))\n const value = () => Math.min(maximum(), Math.max(minimum(), Math.round(props.value)))\n const isRight = () => props.side === 'right'\n const bounded = (next: number) => Math.min(maximum(), Math.max(minimum(), Math.round(next)))\n const commit = (next = value()) => props.onCommit?.(next)\n let interacting = false\n const [drag, setDrag] = createSignal<{\n pointerId: number\n startX: number\n startValue: number\n handle: HTMLElement\n }>()\n // Pointer moves are applied once per frame: each `onChange` relays out the\n // shell, and pointer events can arrive faster than frames (WebKit does not align\n // them). Ending the gesture applies the last pending value first.\n let pendingMove: number | undefined\n let moveFrame: number | undefined\n // The last value the pointer asked for, whether or not its frame has run. A\n // release reads this rather than the prop, which reports the host's previous\n // width until the update renders.\n let pointerValue: number | undefined\n const flushMove = () => {\n if (moveFrame !== undefined) cancelAnimationFrame(moveFrame)\n moveFrame = undefined\n const next = pendingMove\n pendingMove = undefined\n if (next === undefined) return\n move(next)\n return next\n }\n const scheduleMove = (next: number) => {\n pendingMove = next\n pointerValue = next\n if (moveFrame === undefined) moveFrame = requestAnimationFrame(flushMove)\n }\n const endPointer = (shouldCommit: boolean) => {\n const current = drag()\n if (!current) return\n const applied = flushMove()\n // The pending move is applied to the host first, but the prop it reports\n // through is read on the next render. Commit the value just applied, not\n // the stale prop, or a fast release reports the previous width.\n const committed = applied ?? pointerValue ?? value()\n pointerValue = undefined\n setDrag(undefined)\n if (current.handle.hasPointerCapture(current.pointerId))\n current.handle.releasePointerCapture(current.pointerId)\n if (shouldCommit) commit(committed)\n }\n const endKeyboard = () => {\n const wasInteracting = interacting\n interacting = false\n if (wasInteracting) commit()\n }\n onCleanup(() => {\n endKeyboard()\n endPointer(false)\n })\n const move = (next: number) => {\n if (next !== value()) props.onChange(next)\n }\n // Arrow keys describe physical movement of the handle: on a right-edge pane\n // moving the handle left widens the pane.\n const KEY_DIRECTION: Record<string, number> = { ArrowLeft: -1, ArrowRight: 1 }\n\n return (\n <div\n class={cn(\n 'pointer-events-none absolute inset-y-0',\n {\n 'left-0': props.side === 'left',\n 'right-0': props.side === 'right',\n },\n props.class\n )}\n style={{ width: `${maximum()}px` }}\n >\n <div\n role=\"separator\"\n tabindex={0}\n aria-orientation=\"vertical\"\n aria-label={props.label ?? `Resize ${props.side} pane`}\n aria-controls={props.controls}\n aria-valuemin={minimum()}\n aria-valuemax={maximum()}\n aria-valuenow={value()}\n aria-valuetext={`${value()} pixels`}\n data-dragging={drag() ? '' : undefined}\n style={{ left: `${isRight() ? maximum() - value() : value()}px` }}\n class={cn(\n resizeSeparatorClass(props.grip ?? 'rung'),\n 'pointer-events-auto absolute inset-y-0 w-px cursor-pointer'\n )}\n onPointerDown={(event) => {\n if (event.button !== 0 || !event.isPrimary) return\n const handle = event.currentTarget\n endPointer(false)\n interacting = false\n handle.focus()\n handle.setPointerCapture(event.pointerId)\n pointerValue = undefined\n setDrag({\n pointerId: event.pointerId,\n startX: event.clientX,\n startValue: value(),\n handle,\n })\n }}\n onPointerMove={(event) => {\n const current = drag()\n if (!current || event.pointerId !== current.pointerId) return\n if (!current.handle.hasPointerCapture(current.pointerId)) {\n endPointer(false)\n return\n }\n const delta = (event.clientX - current.startX) * (isRight() ? -1 : 1)\n scheduleMove(bounded(current.startValue + delta))\n }}\n // A press that lands in a text selection would start a native drag of it,\n // and the browser cancels the pointer gesture for that drag.\n onDragStart={(event) => event.preventDefault()}\n onPointerUp={(event) => {\n if (event.pointerId === drag()?.pointerId) endPointer(true)\n }}\n onPointerCancel={(event) => {\n if (event.pointerId === drag()?.pointerId) endPointer(false)\n }}\n onLostPointerCapture={(event) => {\n if (event.pointerId === drag()?.pointerId) endPointer(false)\n }}\n onBlur={() => {\n endKeyboard()\n endPointer(false)\n }}\n onKeyDown={(event) => {\n const current = drag()\n if (current && !current.handle.hasPointerCapture(current.pointerId)) endPointer(false)\n if (drag()) {\n event.preventDefault()\n return\n }\n const direction = KEY_DIRECTION[event.key]\n if (direction !== undefined) {\n event.preventDefault()\n interacting = true\n move(bounded(value() + direction * (isRight() ? -1 : 1) * (props.step ?? 16)))\n } else if (event.key === 'Home' || event.key === 'End') {\n event.preventDefault()\n interacting = true\n move(event.key === 'Home' ? minimum() : maximum())\n }\n }}\n onKeyUp={(event) => {\n if (['ArrowLeft', 'ArrowRight', 'Home', 'End'].includes(event.key)) endKeyboard()\n }}\n >\n {props.grip === 'chip' ? (\n <div class={resizeGripClass.chip}>\n <GripVertical class={resizeGripIconClass} />\n </div>\n ) : (\n <div data-slot=\"resizable-grip\" class={resizeGripClass.rung} />\n )}\n </div>\n </div>\n )\n}\n"],"mappings":";;;;;;;;;;AAOA,IAAM,eAAe,SAASa,cAAkB;;;;;;;;;;;;;;;AAoChD,SAAgB,kBAAkB,OAA+B;CAC/D,MAAM,gBAAgB,KAAK,IAAI,GAAG,MAAM,OAAO;CAC/C,MAAM,gBAAgB,KAAK,IAAI,QAAQ,GAAG,KAAK,IAAI,GAAG,MAAM,OAAO,CAAC;CACpE,MAAM,cAAc,KAAK,IAAI,QAAQ,GAAG,KAAK,IAAI,QAAQ,GAAG,KAAK,MAAM,MAAM,KAAK,CAAC,CAAC;CACpF,MAAM,gBAAgB,MAAM,SAAS;CACrC,MAAM,WAAW,SAAiB,KAAK,IAAI,QAAQ,GAAG,KAAK,IAAI,QAAQ,GAAG,KAAK,MAAM,IAAI,CAAC,CAAC;CAC3F,MAAM,UAAU,OAAO,MAAM,MAAM,MAAM,WAAW,IAAI;CACxD,IAAI,cAAc;CAClB,MAAM,CAAC,MAAM,WAAW,aAKrB;CAIH,IAAI;CACJ,IAAI;CAIJ,IAAI;CACJ,MAAM,kBAAkB;EACtB,IAAI,cAAc,KAAA,GAAW,qBAAqB,SAAS;EAC3D,YAAY,KAAA;EACZ,MAAM,OAAO;EACb,cAAc,KAAA;EACd,IAAI,SAAS,KAAA,GAAW;EACxB,KAAK,IAAI;EACT,OAAO;CACT;CACA,MAAM,gBAAgB,SAAiB;EACrC,cAAc;EACd,eAAe;EACf,IAAI,cAAc,KAAA,GAAW,YAAY,sBAAsB,SAAS;CAC1E;CACA,MAAM,cAAc,iBAA0B;EAC5C,MAAM,UAAU,KA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AAA,OAAA,iBAAA,CAAsC;EAC7B,MAAA,KAAA,KAAAD,iBAAA,OAAA,QAAA,CAAqD;EAC9DD,UAAA,OAAA,GAAA,KAAA,CAGC;CAlBF,CAAA;CATL,OACEL;AAoGJ"}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
+
import { createComponent, insert, memo, mergeProps, template } from "@solidjs/web";
|
|
2
|
+
import { Search as Search$1 } from "@lucide/solid";
|
|
3
|
+
import { For, Show, children, omit } from "solid-js";
|
|
1
4
|
import { cn } from "../../../lib/utils.js";
|
|
2
5
|
import { Kbd, KbdGroup } from "../../ui/kbd/kbd.js";
|
|
3
6
|
import { Separator } from "../../ui/separator/separator.js";
|
|
4
7
|
import { SideRail, SideRailContent, SideRailFooter, SideRailHeader, SideRailItem } from "../side-rail/side-rail.js";
|
|
5
8
|
import { fastIcon } from "../../../lib/fast-icon.js";
|
|
6
|
-
import { createComponent, insert, memo, mergeProps, template } from "@solidjs/web";
|
|
7
|
-
import { Search } from "@lucide/solid";
|
|
8
|
-
import { For, Show, children, omit } from "solid-js";
|
|
9
9
|
// src/components/layout/shell-rail/shell-rail.tsx
|
|
10
10
|
var _tmpl$ = /* @__PURE__ */ template(`<span data-slot=shell-rail-mark aria-hidden=true class="flex h-rail-item items-center justify-center">`);
|
|
11
11
|
var _tmpl$2 = /* @__PURE__ */ template(`<div data-slot=shell-rail-search class="flex min-w-0 flex-col gap-0.5"><!><!>`);
|
|
12
|
-
var Search
|
|
12
|
+
var Search = fastIcon(Search$1);
|
|
13
13
|
function ShellRail(props) {
|
|
14
14
|
const local = props;
|
|
15
15
|
const rest = omit(props, "class", "mark", "onSearch", "searchLabel", "searchKeyshortcuts", "searchKeys", "children", "footer", "aria-label");
|
|
@@ -67,7 +67,7 @@ function ShellRail(props) {
|
|
|
67
67
|
},
|
|
68
68
|
onClick: () => local.onSearch?.(),
|
|
69
69
|
get children() {
|
|
70
|
-
return createComponent(Search
|
|
70
|
+
return createComponent(Search, { "aria-hidden": "true" });
|
|
71
71
|
}
|
|
72
72
|
}), _el$3);
|
|
73
73
|
insert(_el$2, (() => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shell-rail.js","names":["<SideRail\n collapsed\n data-slot=\"shell-rail\"\n aria-label={local['aria-label'] ?? 'Global navigation'}\n class={cn('relative z-(--z-sticky) min-w-0', local.class)}\n {...rest}\n >\n <SideRailHeader data-slot=\"shell-rail-header\" class=\"h-auto justify-center px-0 pt-1\">\n <span\n data-slot=\"shell-rail-mark\"\n aria-hidden=\"true\"\n class=\"flex h-rail-item items-center justify-center\"\n >\n {local.mark}\n </span>\n </SideRailHeader>\n\n <SideRailContent data-slot=\"shell-rail-content\" class=\"pt-0.5\">\n <Show when={local.onSearch}>\n <div data-slot=\"shell-rail-search\" class=\"flex min-w-0 flex-col gap-0.5\">\n <SideRailItem\n as=\"button\"\n type=\"button\"\n label={local.searchLabel ?? 'Search'}\n aria-label={local.searchLabel ?? 'Search'}\n keyshortcuts={local.searchKeyshortcuts}\n shortcut={local.searchKeys?.join('')}\n onClick={() => local.onSearch?.()}\n >\n <Search aria-hidden=\"true\" />\n </SideRailItem>\n {/* The chord is drawn as key caps under the icon: the one row that\n advertises a shortcut. The accessible chord stays on the row. */}\n <Show when={local.searchKeys?.length}>\n <KbdGroup\n size=\"compact\"\n class=\"justify-center pb-1\"\n data-slot=\"shell-rail-search-keys\"\n >\n <For each={local.searchKeys}>{(key) => <Kbd size=\"compact\">{key}</Kbd>}</For>\n </KbdGroup>\n </Show>\n </div>\n <Separator class=\"my-1\" />\n </Show>\n {content()}\n </SideRailContent>\n\n <Show when={footer()}>\n <SideRailFooter data-slot=\"shell-rail-footer\">{footer()}</SideRailFooter>\n </Show>\n </SideRail>","<SideRailHeader data-slot=\"shell-rail-header\" class=\"h-auto justify-center px-0 pt-1\">\n <span\n data-slot=\"shell-rail-mark\"\n aria-hidden=\"true\"\n class=\"flex h-rail-item items-center justify-center\"\n >\n {local.mark}\n </span>\n </SideRailHeader>","class=\"h-auto justify-center px-0 pt-1\"","<span\n data-slot=\"shell-rail-mark\"\n aria-hidden=\"true\"\n class=\"flex h-rail-item items-center justify-center\"\n >\n {local.mark}\n </span>","<SideRailContent data-slot=\"shell-rail-content\" class=\"pt-0.5\">\n <Show when={local.onSearch}>\n <div data-slot=\"shell-rail-search\" class=\"flex min-w-0 flex-col gap-0.5\">\n <SideRailItem\n as=\"button\"\n type=\"button\"\n label={local.searchLabel ?? 'Search'}\n aria-label={local.searchLabel ?? 'Search'}\n keyshortcuts={local.searchKeyshortcuts}\n shortcut={local.searchKeys?.join('')}\n onClick={() => local.onSearch?.()}\n >\n <Search aria-hidden=\"true\" />\n </SideRailItem>\n {/* The chord is drawn as key caps under the icon: the one row that\n advertises a shortcut. The accessible chord stays on the row. */}\n <Show when={local.searchKeys?.length}>\n <KbdGroup\n size=\"compact\"\n class=\"justify-center pb-1\"\n data-slot=\"shell-rail-search-keys\"\n >\n <For each={local.searchKeys}>{(key) => <Kbd size=\"compact\">{key}</Kbd>}</For>\n </KbdGroup>\n </Show>\n </div>\n <Separator class=\"my-1\" />\n </Show>\n {content()}\n </SideRailContent>","class=\"pt-0.5\"","<Show when={local.onSearch}>\n <div data-slot=\"shell-rail-search\" class=\"flex min-w-0 flex-col gap-0.5\">\n <SideRailItem\n as=\"button\"\n type=\"button\"\n label={local.searchLabel ?? 'Search'}\n aria-label={local.searchLabel ?? 'Search'}\n keyshortcuts={local.searchKeyshortcuts}\n shortcut={local.searchKeys?.join('')}\n onClick={() => local.onSearch?.()}\n >\n <Search aria-hidden=\"true\" />\n </SideRailItem>\n {/* The chord is drawn as key caps under the icon: the one row that\n advertises a shortcut. The accessible chord stays on the row. */}\n <Show when={local.searchKeys?.length}>\n <KbdGroup\n size=\"compact\"\n class=\"justify-center pb-1\"\n data-slot=\"shell-rail-search-keys\"\n >\n <For each={local.searchKeys}>{(key) => <Kbd size=\"compact\">{key}</Kbd>}</For>\n </KbdGroup>\n </Show>\n </div>\n <Separator class=\"my-1\" />\n </Show>","<SideRailItem\n as=\"button\"\n type=\"button\"\n label={local.searchLabel ?? 'Search'}\n aria-label={local.searchLabel ?? 'Search'}\n keyshortcuts={local.searchKeyshortcuts}\n shortcut={local.searchKeys?.join('')}\n onClick={() => local.onSearch?.()}\n >\n <Search aria-hidden=\"true\" />\n </SideRailItem>","as=\"button\"","type=\"button\"","onClick={() => local.onSearch?.()}","<Search aria-hidden=\"true\" />","<div data-slot=\"shell-rail-search\" class=\"flex min-w-0 flex-col gap-0.5\">\n <SideRailItem\n as=\"button\"\n type=\"button\"\n label={local.searchLabel ?? 'Search'}\n aria-label={local.searchLabel ?? 'Search'}\n keyshortcuts={local.searchKeyshortcuts}\n shortcut={local.searchKeys?.join('')}\n onClick={() => local.onSearch?.()}\n >\n <Search aria-hidden=\"true\" />\n </SideRailItem>\n {/* The chord is drawn as key caps under the icon: the one row that\n advertises a shortcut. The accessible chord stays on the row. */}\n <Show when={local.searchKeys?.length}>\n <KbdGroup\n size=\"compact\"\n class=\"justify-center pb-1\"\n data-slot=\"shell-rail-search-keys\"\n >\n <For each={local.searchKeys}>{(key) => <Kbd size=\"compact\">{key}</Kbd>}</For>\n </KbdGroup>\n </Show>\n </div>","<KbdGroup\n size=\"compact\"\n class=\"justify-center pb-1\"\n data-slot=\"shell-rail-search-keys\"\n >\n <For each={local.searchKeys}>{(key) => <Kbd size=\"compact\">{key}</Kbd>}</For>\n </KbdGroup>","size=\"compact\"","class=\"justify-center pb-1\"","<For each={local.searchKeys}>{(key) => <Kbd size=\"compact\">{key}</Kbd>}</For>","<Kbd size=\"compact\">{key}</Kbd>","<Separator class=\"my-1\" />","class=\"my-1\"","content()","<Show when={footer()}>\n <SideRailFooter data-slot=\"shell-rail-footer\">{footer()}</SideRailFooter>\n </Show>","<SideRailFooter data-slot=\"shell-rail-footer\">{footer()}</SideRailFooter>","Search","LucideSearch"],"sources":["../../../../src/components/layout/shell-rail/shell-rail.tsx"],"sourcesContent":["import { Search as LucideSearch } from '@lucide/solid'\nimport type { ComponentProps, JSX } from '@solidjs/web'\nimport { children, For, Show, omit } from 'solid-js'\nimport { cn } from '#lib/utils'\nimport { Kbd, KbdGroup } from '../../ui/kbd'\nimport { Separator } from '../../ui/separator'\nimport {\n SideRail,\n SideRailContent,\n SideRailFooter,\n SideRailHeader,\n SideRailItem,\n} from '../side-rail'\nimport { fastIcon } from '#lib/fast-icon'\n\n// lucide icons drawn from a cloned template (see fastIcon).\nconst Search = fastIcon(LucideSearch)\n\n/**\n * ShellRail.\n *\n * The side rail both applications put at the window's leading edge: always the\n * collapsed icon column, with the app's mark at the top, a search entry point\n * under it, the app's destinations in the middle and a footer for account and\n * settings.\n *\n * The rail is never the thing the sidebar toggle collapses. The toggle belongs\n * to the sidebar beside the rail, which is why this component takes no\n * `collapsed` prop: a rail that could be expanded would be a second sidebar,\n * and the two apps would drift on which of them the toggle meant.\n *\n * Destinations are the caller's: pass `SideRailItem`s (or a `SideRailSection`)\n * as children. The mark, the search row and the footer are slots with the\n * geometry decided here, so the rail's rhythm cannot differ between apps.\n */\nexport type ShellRailProps = Omit<ComponentProps<'nav'>, 'children' | 'aria-label'> & {\n /** The rail's landmark name; defaults to \"Global navigation\". */\n 'aria-label'?: string\n /** The app's mark. Decorative: the rail names itself through `aria-label`. */\n mark: JSX.Element\n /** Opens search. Omit to leave the search row out. */\n onSearch?: () => void\n /** The search row's accessible name. */\n searchLabel?: string\n /** The chord as it is announced, e.g. `Meta+K Control+K`. */\n searchKeyshortcuts?: string\n /** The cap labels drawn under the icon, in press order, e.g. `['⌘', 'K']`. */\n searchKeys?: readonly string[]\n /** Destinations between the search row and the footer. */\n children?: JSX.Element\n /** Account, plugins, settings. Pinned to the rail's foot. */\n footer?: JSX.Element\n}\n\nexport function ShellRail(props: ShellRailProps) {\n const local = props\n const rest = omit(\n props,\n 'class',\n 'mark',\n 'onSearch',\n 'searchLabel',\n 'searchKeyshortcuts',\n 'searchKeys',\n 'children',\n 'footer',\n 'aria-label'\n )\n\n // Resolve the footer once: reading a JSX prop twice builds two copies.\n const footer = children(() => local.footer)\n const content = children(() => local.children)\n\n return (\n <SideRail\n collapsed\n data-slot=\"shell-rail\"\n aria-label={local['aria-label'] ?? 'Global navigation'}\n class={cn('relative z-(--z-sticky) min-w-0', local.class)}\n {...rest}\n >\n <SideRailHeader data-slot=\"shell-rail-header\" class=\"h-auto justify-center px-0 pt-1\">\n <span\n data-slot=\"shell-rail-mark\"\n aria-hidden=\"true\"\n class=\"flex h-rail-item items-center justify-center\"\n >\n {local.mark}\n </span>\n </SideRailHeader>\n\n <SideRailContent data-slot=\"shell-rail-content\" class=\"pt-0.5\">\n <Show when={local.onSearch}>\n <div data-slot=\"shell-rail-search\" class=\"flex min-w-0 flex-col gap-0.5\">\n <SideRailItem\n as=\"button\"\n type=\"button\"\n label={local.searchLabel ?? 'Search'}\n aria-label={local.searchLabel ?? 'Search'}\n keyshortcuts={local.searchKeyshortcuts}\n shortcut={local.searchKeys?.join('')}\n onClick={() => local.onSearch?.()}\n >\n <Search aria-hidden=\"true\" />\n </SideRailItem>\n {/* The chord is drawn as key caps under the icon: the one row that\n advertises a shortcut. The accessible chord stays on the row. */}\n <Show when={local.searchKeys?.length}>\n <KbdGroup\n size=\"compact\"\n class=\"justify-center pb-1\"\n data-slot=\"shell-rail-search-keys\"\n >\n <For each={local.searchKeys}>{(key) => <Kbd size=\"compact\">{key}</Kbd>}</For>\n </KbdGroup>\n </Show>\n </div>\n <Separator class=\"my-1\" />\n </Show>\n {content()}\n </SideRailContent>\n\n <Show when={footer()}>\n <SideRailFooter data-slot=\"shell-rail-footer\">{footer()}</SideRailFooter>\n </Show>\n </SideRail>\n )\n}\n"],"mappings":";;;;;;;;;;;AAgBA,IAAMuB,WAAS,SAASC,MAAY;AAsCpC,SAAgB,UAAU,OAAuB;CAC/C,MAAM,QAAQ;CACd,MAAM,OAAO,KACX,OACA,SACA,QACA,YACA,eACA,sBACA,cACA,YACA,UACA,YACF;CAGA,MA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WACN,aAAU;WAHZ,IAAA,WAAA;YAKEC,OAAAA,gBAAAA,KAAAA;aAAK,IAAA,OAAA;cAAM,OAAA,MAAM;aAAU;aAA3BA,WAA+B,QAAQC,gBAAAA,KAAAA;cAAKH,MAAK;cAAVG,UAAqB;aAAS,CAAA;YAAO,CAAA;WACpE;UAPZ,CAAA,IAAA,KAAA;SAQM;QAAC,EAAA,CAAD,GAtBRL,KAuBK;QAvBL,OAAA;OAuBK,EAAA,CAAA,GACLM,gBAAAA,WAAAA,EAAWC,OAAM,OAAQ,CAAA,CAxB1B;MAyBK;KACLC,CAAAA,GAAAA,WAAAA;MAAQ,OAAA,QAAA;KA3BV,CAAA,CAAA;IA4BgB;;GAEjBC,gBAAAA,MAAAA;IAAM,IAAA,OAAA;KAAM,OAAA,OAAO;IAAC;IAApB,IAAA,WAAA;KACEC,OAAAA,gBAAAA,gBAAAA;MAAgB,aAAU;MAA1B,IAAA,WAAA;OAA+C,OAAA,OAAO;MAAkB;;IACpE;;EA3CP;CA4CS,EAAA,CAAA,CAAA;AAEd"}
|
|
1
|
+
{"version":3,"file":"shell-rail.js","names":["<SideRail\n collapsed\n data-slot=\"shell-rail\"\n aria-label={local['aria-label'] ?? 'Global navigation'}\n class={cn('relative z-(--z-sticky) min-w-0', local.class)}\n {...rest}\n >\n <SideRailHeader data-slot=\"shell-rail-header\" class=\"h-auto justify-center px-0 pt-1\">\n <span\n data-slot=\"shell-rail-mark\"\n aria-hidden=\"true\"\n class=\"flex h-rail-item items-center justify-center\"\n >\n {local.mark}\n </span>\n </SideRailHeader>\n\n <SideRailContent data-slot=\"shell-rail-content\" class=\"pt-0.5\">\n <Show when={local.onSearch}>\n <div data-slot=\"shell-rail-search\" class=\"flex min-w-0 flex-col gap-0.5\">\n <SideRailItem\n as=\"button\"\n type=\"button\"\n label={local.searchLabel ?? 'Search'}\n aria-label={local.searchLabel ?? 'Search'}\n keyshortcuts={local.searchKeyshortcuts}\n shortcut={local.searchKeys?.join('')}\n onClick={() => local.onSearch?.()}\n >\n <Search aria-hidden=\"true\" />\n </SideRailItem>\n {/* The chord is drawn as key caps under the icon: the one row that\n advertises a shortcut. The accessible chord stays on the row. */}\n <Show when={local.searchKeys?.length}>\n <KbdGroup\n size=\"compact\"\n class=\"justify-center pb-1\"\n data-slot=\"shell-rail-search-keys\"\n >\n <For each={local.searchKeys}>{(key) => <Kbd size=\"compact\">{key}</Kbd>}</For>\n </KbdGroup>\n </Show>\n </div>\n <Separator class=\"my-1\" />\n </Show>\n {content()}\n </SideRailContent>\n\n <Show when={footer()}>\n <SideRailFooter data-slot=\"shell-rail-footer\">{footer()}</SideRailFooter>\n </Show>\n </SideRail>","<SideRailHeader data-slot=\"shell-rail-header\" class=\"h-auto justify-center px-0 pt-1\">\n <span\n data-slot=\"shell-rail-mark\"\n aria-hidden=\"true\"\n class=\"flex h-rail-item items-center justify-center\"\n >\n {local.mark}\n </span>\n </SideRailHeader>","class=\"h-auto justify-center px-0 pt-1\"","<span\n data-slot=\"shell-rail-mark\"\n aria-hidden=\"true\"\n class=\"flex h-rail-item items-center justify-center\"\n >\n {local.mark}\n </span>","<SideRailContent data-slot=\"shell-rail-content\" class=\"pt-0.5\">\n <Show when={local.onSearch}>\n <div data-slot=\"shell-rail-search\" class=\"flex min-w-0 flex-col gap-0.5\">\n <SideRailItem\n as=\"button\"\n type=\"button\"\n label={local.searchLabel ?? 'Search'}\n aria-label={local.searchLabel ?? 'Search'}\n keyshortcuts={local.searchKeyshortcuts}\n shortcut={local.searchKeys?.join('')}\n onClick={() => local.onSearch?.()}\n >\n <Search aria-hidden=\"true\" />\n </SideRailItem>\n {/* The chord is drawn as key caps under the icon: the one row that\n advertises a shortcut. The accessible chord stays on the row. */}\n <Show when={local.searchKeys?.length}>\n <KbdGroup\n size=\"compact\"\n class=\"justify-center pb-1\"\n data-slot=\"shell-rail-search-keys\"\n >\n <For each={local.searchKeys}>{(key) => <Kbd size=\"compact\">{key}</Kbd>}</For>\n </KbdGroup>\n </Show>\n </div>\n <Separator class=\"my-1\" />\n </Show>\n {content()}\n </SideRailContent>","class=\"pt-0.5\"","<Show when={local.onSearch}>\n <div data-slot=\"shell-rail-search\" class=\"flex min-w-0 flex-col gap-0.5\">\n <SideRailItem\n as=\"button\"\n type=\"button\"\n label={local.searchLabel ?? 'Search'}\n aria-label={local.searchLabel ?? 'Search'}\n keyshortcuts={local.searchKeyshortcuts}\n shortcut={local.searchKeys?.join('')}\n onClick={() => local.onSearch?.()}\n >\n <Search aria-hidden=\"true\" />\n </SideRailItem>\n {/* The chord is drawn as key caps under the icon: the one row that\n advertises a shortcut. The accessible chord stays on the row. */}\n <Show when={local.searchKeys?.length}>\n <KbdGroup\n size=\"compact\"\n class=\"justify-center pb-1\"\n data-slot=\"shell-rail-search-keys\"\n >\n <For each={local.searchKeys}>{(key) => <Kbd size=\"compact\">{key}</Kbd>}</For>\n </KbdGroup>\n </Show>\n </div>\n <Separator class=\"my-1\" />\n </Show>","<SideRailItem\n as=\"button\"\n type=\"button\"\n label={local.searchLabel ?? 'Search'}\n aria-label={local.searchLabel ?? 'Search'}\n keyshortcuts={local.searchKeyshortcuts}\n shortcut={local.searchKeys?.join('')}\n onClick={() => local.onSearch?.()}\n >\n <Search aria-hidden=\"true\" />\n </SideRailItem>","as=\"button\"","type=\"button\"","onClick={() => local.onSearch?.()}","<Search aria-hidden=\"true\" />","<div data-slot=\"shell-rail-search\" class=\"flex min-w-0 flex-col gap-0.5\">\n <SideRailItem\n as=\"button\"\n type=\"button\"\n label={local.searchLabel ?? 'Search'}\n aria-label={local.searchLabel ?? 'Search'}\n keyshortcuts={local.searchKeyshortcuts}\n shortcut={local.searchKeys?.join('')}\n onClick={() => local.onSearch?.()}\n >\n <Search aria-hidden=\"true\" />\n </SideRailItem>\n {/* The chord is drawn as key caps under the icon: the one row that\n advertises a shortcut. The accessible chord stays on the row. */}\n <Show when={local.searchKeys?.length}>\n <KbdGroup\n size=\"compact\"\n class=\"justify-center pb-1\"\n data-slot=\"shell-rail-search-keys\"\n >\n <For each={local.searchKeys}>{(key) => <Kbd size=\"compact\">{key}</Kbd>}</For>\n </KbdGroup>\n </Show>\n </div>","<KbdGroup\n size=\"compact\"\n class=\"justify-center pb-1\"\n data-slot=\"shell-rail-search-keys\"\n >\n <For each={local.searchKeys}>{(key) => <Kbd size=\"compact\">{key}</Kbd>}</For>\n </KbdGroup>","size=\"compact\"","class=\"justify-center pb-1\"","<For each={local.searchKeys}>{(key) => <Kbd size=\"compact\">{key}</Kbd>}</For>","<Kbd size=\"compact\">{key}</Kbd>","<Separator class=\"my-1\" />","class=\"my-1\"","content()","<Show when={footer()}>\n <SideRailFooter data-slot=\"shell-rail-footer\">{footer()}</SideRailFooter>\n </Show>","<SideRailFooter data-slot=\"shell-rail-footer\">{footer()}</SideRailFooter>","LucideSearch","_$insert"],"sources":["../../../../src/components/layout/shell-rail/shell-rail.tsx"],"sourcesContent":["import { Search as LucideSearch } from '@lucide/solid'\nimport type { ComponentProps, JSX } from '@solidjs/web'\nimport { children, For, Show, omit } from 'solid-js'\nimport { cn } from '#lib/utils'\nimport { Kbd, KbdGroup } from '../../ui/kbd'\nimport { Separator } from '../../ui/separator'\nimport {\n SideRail,\n SideRailContent,\n SideRailFooter,\n SideRailHeader,\n SideRailItem,\n} from '../side-rail'\nimport { fastIcon } from '#lib/fast-icon'\n\n// lucide icons drawn from a cloned template (see fastIcon).\nconst Search = fastIcon(LucideSearch)\n\n/**\n * ShellRail.\n *\n * The side rail both applications put at the window's leading edge: always the\n * collapsed icon column, with the app's mark at the top, a search entry point\n * under it, the app's destinations in the middle and a footer for account and\n * settings.\n *\n * The rail is never the thing the sidebar toggle collapses. The toggle belongs\n * to the sidebar beside the rail, which is why this component takes no\n * `collapsed` prop: a rail that could be expanded would be a second sidebar,\n * and the two apps would drift on which of them the toggle meant.\n *\n * Destinations are the caller's: pass `SideRailItem`s (or a `SideRailSection`)\n * as children. The mark, the search row and the footer are slots with the\n * geometry decided here, so the rail's rhythm cannot differ between apps.\n */\nexport type ShellRailProps = Omit<ComponentProps<'nav'>, 'children' | 'aria-label'> & {\n /** The rail's landmark name; defaults to \"Global navigation\". */\n 'aria-label'?: string\n /** The app's mark. Decorative: the rail names itself through `aria-label`. */\n mark: JSX.Element\n /** Opens search. Omit to leave the search row out. */\n onSearch?: () => void\n /** The search row's accessible name. */\n searchLabel?: string\n /** The chord as it is announced, e.g. `Meta+K Control+K`. */\n searchKeyshortcuts?: string\n /** The cap labels drawn under the icon, in press order, e.g. `['⌘', 'K']`. */\n searchKeys?: readonly string[]\n /** Destinations between the search row and the footer. */\n children?: JSX.Element\n /** Account, plugins, settings. Pinned to the rail's foot. */\n footer?: JSX.Element\n}\n\nexport function ShellRail(props: ShellRailProps) {\n const local = props\n const rest = omit(\n props,\n 'class',\n 'mark',\n 'onSearch',\n 'searchLabel',\n 'searchKeyshortcuts',\n 'searchKeys',\n 'children',\n 'footer',\n 'aria-label'\n )\n\n // Resolve the footer once: reading a JSX prop twice builds two copies.\n const footer = children(() => local.footer)\n const content = children(() => local.children)\n\n return (\n <SideRail\n collapsed\n data-slot=\"shell-rail\"\n aria-label={local['aria-label'] ?? 'Global navigation'}\n class={cn('relative z-(--z-sticky) min-w-0', local.class)}\n {...rest}\n >\n <SideRailHeader data-slot=\"shell-rail-header\" class=\"h-auto justify-center px-0 pt-1\">\n <span\n data-slot=\"shell-rail-mark\"\n aria-hidden=\"true\"\n class=\"flex h-rail-item items-center justify-center\"\n >\n {local.mark}\n </span>\n </SideRailHeader>\n\n <SideRailContent data-slot=\"shell-rail-content\" class=\"pt-0.5\">\n <Show when={local.onSearch}>\n <div data-slot=\"shell-rail-search\" class=\"flex min-w-0 flex-col gap-0.5\">\n <SideRailItem\n as=\"button\"\n type=\"button\"\n label={local.searchLabel ?? 'Search'}\n aria-label={local.searchLabel ?? 'Search'}\n keyshortcuts={local.searchKeyshortcuts}\n shortcut={local.searchKeys?.join('')}\n onClick={() => local.onSearch?.()}\n >\n <Search aria-hidden=\"true\" />\n </SideRailItem>\n {/* The chord is drawn as key caps under the icon: the one row that\n advertises a shortcut. The accessible chord stays on the row. */}\n <Show when={local.searchKeys?.length}>\n <KbdGroup\n size=\"compact\"\n class=\"justify-center pb-1\"\n data-slot=\"shell-rail-search-keys\"\n >\n <For each={local.searchKeys}>{(key) => <Kbd size=\"compact\">{key}</Kbd>}</For>\n </KbdGroup>\n </Show>\n </div>\n <Separator class=\"my-1\" />\n </Show>\n {content()}\n </SideRailContent>\n\n <Show when={footer()}>\n <SideRailFooter data-slot=\"shell-rail-footer\">{footer()}</SideRailFooter>\n </Show>\n </SideRail>\n )\n}\n"],"mappings":";;;;;;;;;;;AAgBA,IAAM,SAAS,SAASuB,QAAY;AAsCpC,SAAgB,UAAU,OAAuB;CAC/C,MAAM,QAAQ;CACd,MAAM,OAAO,KACX,OACA,SACA,QACA,YACA,eACA,sBACA,cACA,YACA,UACA,YACF;CAGA,MAAM,SAAS,eAAe,MAAM,MAAM;CAC1C,MAAM,UAAU,eAAe,MAAM,QAAQ;CAE7C,OACEvB,gBAAAA,UAAAA,WAAAA;EACE,WAAA;EACA,aAAU;EACV,IAAA,eAAA;GAAY,OAAA,MAAM,iBAAiB;EAAmB;EACtD,IAAA,UAAA;GAAO,OAAA,GAAG,mCAAmC,MAAM,KAAK;EAAC;CA+CjD,GA9CJ,MALN,EAAA,IAAA,WAAA;EAMC,OAAA;GACCC,gBAAAA,gBAAAA;IAAgB,aAAU;IAAoBC,OAAM;IAApD,IAAA,WAAA;KACE,IAAA,OAAA,OAMM;KANNsB,OAAA,YAKE;MAAC,OAAA,MAAM;KAAI,CACP;KAPR,OACErB;IAOc;;GAEhBC,gBAAAA,iBAAAA;IAAiB,aAAU;IAAqBC,OAAM;IAAtD,IAAA,WAAA;KAA+D,OAAA,CAC7DC,gBAAAA,MAAAA;MAAM,IAAA,OAAA;OAAM,OAAA,MAAM;MAAQ;MAA1B,IAAA,WAAA;OAA4B,OAAA,QAC1B;QAuBK,IAAA,QAAA,Q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
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import { className, createComponent, effect, insert, memo, readShallow, setAttribute, spread, template } from "@solidjs/web";
|
|
2
|
+
import { children, omit } from "solid-js";
|
|
1
3
|
import { cn } from "../../../lib/utils.js";
|
|
2
4
|
import { Separator } from "../../ui/separator/separator.js";
|
|
3
5
|
import { windowChromeClass } from "../top-bar/window-chrome.js";
|
|
4
|
-
import { className, createComponent, effect, insert, memo, readShallow, setAttribute, spread, template } from "@solidjs/web";
|
|
5
|
-
import { children, omit } from "solid-js";
|
|
6
6
|
// src/components/layout/shell-top-bar/shell-top-bar.tsx
|
|
7
7
|
var _tmpl$ = /* @__PURE__ */ template(`<header><div data-slot=shell-top-bar-leading><!><!><!></div><!><!><!><!><!>`);
|
|
8
8
|
var _tmpl$2 = /* @__PURE__ */ template(`<div data-slot=shell-top-bar-navigation class="flex shrink-0 items-center gap-2">`);
|