@adea-ai/ui 0.152.2 → 0.152.3
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.map +1 -1
- package/dist/components/composites/accent-picker/accent-picker.js.map +1 -1
- package/dist/components/composites/accent-picker/custom-color-popover.js.map +1 -1
- package/dist/components/composites/account-menu/account-menu.js.map +1 -1
- package/dist/components/composites/action-button/action-button.js.map +1 -1
- package/dist/components/composites/appearance-editor/accent-swatch-groups.js.map +1 -1
- package/dist/components/composites/appearance-editor/appearance-choices.js.map +1 -1
- package/dist/components/composites/appearance-editor/appearance-editor.js.map +1 -1
- package/dist/components/composites/appearance-editor/appearance-rows.js.map +1 -1
- package/dist/components/composites/appearance-editor/font-settings-group.js.map +1 -1
- package/dist/components/composites/appearance-editor/theme-preview.js.map +1 -1
- package/dist/components/composites/catalog-browser/catalog-browser-group.js.map +1 -1
- package/dist/components/composites/catalog-browser/catalog-browser.js.map +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.map +1 -1
- package/dist/components/composites/chat/chat.js.map +1 -1
- package/dist/components/composites/checkpoint/checkpoint.js.map +1 -1
- package/dist/components/composites/confirmation/confirmation.js.map +1 -1
- package/dist/components/composites/context/context.js.map +1 -1
- package/dist/components/composites/file-tree/file-tree.js.map +1 -1
- package/dist/components/composites/help-center/help-center.js.map +1 -1
- package/dist/components/composites/icon-picker/icon-picker.js.map +1 -1
- package/dist/components/composites/inline-citation/inline-citation.js.map +1 -1
- package/dist/components/composites/list-row/list-row-control.js.map +1 -1
- package/dist/components/composites/list-row/list-row.js.map +1 -1
- package/dist/components/composites/message-scroller/message-scroller.js.map +1 -1
- package/dist/components/composites/model-selector/model-selector.js +3 -0
- package/dist/components/composites/model-selector/model-selector.js.map +1 -1
- package/dist/components/composites/plan/plan.js.map +1 -1
- package/dist/components/composites/queue/queue.js.map +1 -1
- package/dist/components/composites/reasoning/reasoning.js.map +1 -1
- package/dist/components/composites/scene-controls/scene-controls.js.map +1 -1
- package/dist/components/composites/settings/settings-layout.js.map +1 -1
- package/dist/components/composites/settings/settings-navigation.js.map +1 -1
- package/dist/components/composites/settings/settings.js.map +1 -1
- package/dist/components/composites/sources/sources.js.map +1 -1
- package/dist/components/composites/stack-trace/stack-trace.js.map +1 -1
- package/dist/components/composites/stat/stat.js.map +1 -1
- package/dist/components/composites/subagent/subagent.js.map +1 -1
- package/dist/components/composites/suggestion/suggestion.js.map +1 -1
- package/dist/components/composites/task/task.js.map +1 -1
- package/dist/components/composites/terminal/terminal.js.map +1 -1
- package/dist/components/composites/test-results/test-results.js.map +1 -1
- package/dist/components/composites/tool/tool.js.map +1 -1
- package/dist/components/composites/tree/tree.js.map +1 -1
- package/dist/components/composites/update-dialog/channel-control.js.map +1 -1
- package/dist/components/composites/update-dialog/update-dialog.js.map +1 -1
- package/dist/components/composites/workspace-mark/workspace-mark.js.map +1 -1
- package/dist/components/composites/workspace-switcher/workspace-reorder-dialog.js.map +1 -1
- package/dist/components/composites/workspace-switcher/workspace-switcher.js.map +1 -1
- package/dist/components/conversation/atomic/chat-composer.js.map +1 -1
- package/dist/components/conversation/busy-send-button.js.map +1 -1
- package/dist/components/conversation/chat-composer.js.map +1 -1
- package/dist/components/conversation/composer-menu.js.map +1 -1
- package/dist/components/conversation/conversation-avatar.js.map +1 -1
- package/dist/components/conversation/conversation-pane.js.map +1 -1
- package/dist/components/conversation/conversation-surface.js.map +1 -1
- package/dist/components/conversation/internal/chat-composer-shell.js.map +1 -1
- package/dist/components/conversation/message-composer.js.map +1 -1
- package/dist/components/conversation/message-row.js.map +1 -1
- package/dist/components/conversation/paste-token-editor.js.map +1 -1
- package/dist/components/conversation/thread-panel.js.map +1 -1
- package/dist/components/conversation/transcript-composition.js.map +1 -1
- package/dist/components/layout/app-shell/app-shell.js.map +1 -1
- package/dist/components/layout/app-shell/skip-link.js.map +1 -1
- package/dist/components/layout/contextual-sidebar/contextual-sidebar.js.map +1 -1
- package/dist/components/layout/contextual-sidebar/mobile-contextual-sidebar.js.map +1 -1
- package/dist/components/layout/floating-preview/floating-preview.js.map +1 -1
- package/dist/components/layout/orbit-layout/orbit-layout.js.map +1 -1
- package/dist/components/layout/page/page.js.map +1 -1
- package/dist/components/layout/panel/panel.js.map +1 -1
- package/dist/components/layout/pixel-pane/pixel-pane.js.map +1 -1
- package/dist/components/layout/pixel-resize-handle/pixel-resize-handle.js.map +1 -1
- package/dist/components/layout/shell-rail/shell-rail.js.map +1 -1
- package/dist/components/layout/shell-top-bar/shell-top-bar.js.map +1 -1
- package/dist/components/layout/side-rail/side-rail.js.map +1 -1
- package/dist/components/layout/sidebar-nav/sidebar-nav-resize-handle.js.map +1 -1
- package/dist/components/layout/sidebar-nav/sidebar-nav.js.map +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.map +1 -1
- package/dist/components/layout/split-layout/split-layout.js.map +1 -1
- package/dist/components/layout/status-bar/status-bar.js.map +1 -1
- package/dist/components/layout/top-bar/top-bar.js.map +1 -1
- package/dist/components/layout/virtual-window/virtual-window.js.map +1 -1
- package/dist/components/motion/presence.js.map +1 -1
- package/dist/components/theme/appearance-panel.js.map +1 -1
- package/dist/components/theme/theme-mode-toggle.js.map +1 -1
- package/dist/components/theme/theme-picker.js.map +1 -1
- package/dist/components/theme/theme-provider.js.map +1 -1
- package/dist/components/theme/theme-toggle.js.map +1 -1
- package/dist/components/ui/accordion/accordion.js.map +1 -1
- package/dist/components/ui/alert/alert.js.map +1 -1
- package/dist/components/ui/alert-dialog/alert-dialog.js.map +1 -1
- package/dist/components/ui/annotation-surface/annotation-surface.js.map +1 -1
- package/dist/components/ui/aspect-ratio/aspect-ratio.js.map +1 -1
- package/dist/components/ui/attachment/attachment.js.map +1 -1
- package/dist/components/ui/avatar/avatar.js.map +1 -1
- package/dist/components/ui/badge/badge.js.map +1 -1
- package/dist/components/ui/board/board.js.map +1 -1
- package/dist/components/ui/breadcrumb/breadcrumb.js.map +1 -1
- package/dist/components/ui/bubble/bubble.js.map +1 -1
- package/dist/components/ui/button/button.js.map +1 -1
- package/dist/components/ui/button-group/button-group.js.map +1 -1
- package/dist/components/ui/calendar/calendar.js.map +1 -1
- package/dist/components/ui/callout/callout.js.map +1 -1
- package/dist/components/ui/card/card.js.map +1 -1
- package/dist/components/ui/carousel/carousel.js.map +1 -1
- package/dist/components/ui/chart/chart.js.map +1 -1
- package/dist/components/ui/checkbox/checkbox.js.map +1 -1
- package/dist/components/ui/code-block/code-block.js.map +1 -1
- package/dist/components/ui/collapsible/collapsible.js.map +1 -1
- package/dist/components/ui/combobox/combobox.js.map +1 -1
- package/dist/components/ui/combobox/value-combobox.js.map +1 -1
- package/dist/components/ui/command/command.js.map +1 -1
- package/dist/components/ui/context-menu/context-menu.js.map +1 -1
- package/dist/components/ui/detail-panel/detail-panel.js.map +1 -1
- package/dist/components/ui/dialog/dialog-layer.js.map +1 -1
- package/dist/components/ui/dialog/dialog.js.map +1 -1
- package/dist/components/ui/diff-block/diff-block.js.map +1 -1
- package/dist/components/ui/drawer/drawer.js.map +1 -1
- package/dist/components/ui/dropdown-menu/dropdown-menu.js.map +1 -1
- package/dist/components/ui/dropdown-menu/menu-parts.js.map +1 -1
- package/dist/components/ui/empty/empty-state.js.map +1 -1
- package/dist/components/ui/empty/empty.js.map +1 -1
- package/dist/components/ui/entity-icon/entity-icon.js.map +1 -1
- package/dist/components/ui/field/field.js.map +1 -1
- package/dist/components/ui/field/number-field.js.map +1 -1
- package/dist/components/ui/hover-card/hover-card.js.map +1 -1
- package/dist/components/ui/input/input-control.js.map +1 -1
- package/dist/components/ui/input/input.js.map +1 -1
- package/dist/components/ui/input-group/input-group.js.map +1 -1
- package/dist/components/ui/input-group/secret-input-group.js.map +1 -1
- package/dist/components/ui/input-otp/input-otp.js.map +1 -1
- package/dist/components/ui/item/item.js.map +1 -1
- package/dist/components/ui/kbd/kbd.js.map +1 -1
- package/dist/components/ui/label/label.js.map +1 -1
- package/dist/components/ui/marker/marker.js.map +1 -1
- package/dist/components/ui/menubar/menubar.js.map +1 -1
- package/dist/components/ui/message/message.js.map +1 -1
- package/dist/components/ui/modal-dialog/modal-dialog.js.map +1 -1
- package/dist/components/ui/native-select/native-select.js.map +1 -1
- package/dist/components/ui/navigation-menu/navigation-menu.js.map +1 -1
- package/dist/components/ui/pagination/pagination.js.map +1 -1
- package/dist/components/ui/popover/popover.js.map +1 -1
- package/dist/components/ui/progress/progress.js.map +1 -1
- package/dist/components/ui/questionnaire/questionnaire.js.map +1 -1
- package/dist/components/ui/radio-group/radio-group.js.map +1 -1
- package/dist/components/ui/resizable/resizable.js.map +1 -1
- package/dist/components/ui/scroll-area/scroll-area.js.map +1 -1
- package/dist/components/ui/select/select.js.map +1 -1
- package/dist/components/ui/separator/separator.js.map +1 -1
- package/dist/components/ui/sheet/sheet.js.map +1 -1
- package/dist/components/ui/skeleton/skeleton.js.map +1 -1
- package/dist/components/ui/slider/slider.js.map +1 -1
- package/dist/components/ui/spinner/spinner.js.map +1 -1
- package/dist/components/ui/status-chip/status-chip.js.map +1 -1
- package/dist/components/ui/switch/switch.js.map +1 -1
- package/dist/components/ui/table/table.js.map +1 -1
- package/dist/components/ui/tabs/tabs.js.map +1 -1
- package/dist/components/ui/text-link/text-link.js.map +1 -1
- package/dist/components/ui/textarea/textarea.js.map +1 -1
- package/dist/components/ui/toast/toast.js.map +1 -1
- package/dist/components/ui/toggle/toggle.js.map +1 -1
- package/dist/components/ui/toggle-group/toggle-group.js.map +1 -1
- package/dist/components/ui/tooltip/tooltip.js.map +1 -1
- package/dist/components/ui/trace/trace.js.map +1 -1
- package/dist/components/ui/typography/typography.js.map +1 -1
- package/dist/r/about-dialog.json +1 -1
- package/dist/r/accordion.json +1 -1
- package/dist/r/account-menu.json +1 -1
- package/dist/r/alert.json +1 -1
- package/dist/r/appearance-editor.json +1 -1
- package/dist/r/attachment.json +1 -1
- package/dist/r/breadcrumb.json +1 -1
- package/dist/r/calendar.json +1 -1
- package/dist/r/carousel.json +1 -1
- package/dist/r/catalog-browser.json +1 -1
- package/dist/r/chain-of-thought.json +1 -1
- package/dist/r/chat.json +1 -1
- package/dist/r/checkbox.json +1 -1
- package/dist/r/checkpoint.json +1 -1
- package/dist/r/code-block.json +1 -1
- package/dist/r/combobox.json +1 -1
- package/dist/r/command.json +1 -1
- package/dist/r/confirmation.json +1 -1
- package/dist/r/context.json +1 -1
- package/dist/r/conversation.json +1 -1
- package/dist/r/detail-panel.json +1 -1
- package/dist/r/dialog.json +1 -1
- package/dist/r/dropdown-menu.json +1 -1
- package/dist/r/empty.json +1 -1
- package/dist/r/file-tree.json +1 -1
- package/dist/r/floating-preview.json +1 -1
- package/dist/r/help-center.json +1 -1
- package/dist/r/icon-picker.json +1 -1
- package/dist/r/inline-citation.json +1 -1
- package/dist/r/lib.json +1 -1
- package/dist/r/message-scroller.json +1 -1
- package/dist/r/model-selector.json +1 -1
- package/dist/r/native-select.json +1 -1
- package/dist/r/navigation-menu.json +1 -1
- package/dist/r/pagination.json +1 -1
- package/dist/r/pixel-resize-handle.json +1 -1
- package/dist/r/plan.json +1 -1
- package/dist/r/questionnaire.json +1 -1
- package/dist/r/queue.json +1 -1
- package/dist/r/radio-group.json +1 -1
- package/dist/r/reasoning.json +1 -1
- package/dist/r/registry.json +65 -65
- package/dist/r/resizable.json +1 -1
- package/dist/r/scene-controls.json +1 -1
- package/dist/r/select.json +1 -1
- package/dist/r/settings.json +1 -1
- package/dist/r/sheet.json +1 -1
- package/dist/r/shell-rail.json +1 -1
- package/dist/r/sidebar-nav.json +1 -1
- package/dist/r/sources.json +1 -1
- package/dist/r/spinner.json +1 -1
- package/dist/r/split-layout.json +1 -1
- package/dist/r/src/components/composites/model-selector/model-selector.tsx +4 -1
- package/dist/r/stack-trace.json +1 -1
- package/dist/r/stat.json +1 -1
- package/dist/r/subagent.json +1 -1
- package/dist/r/task.json +1 -1
- package/dist/r/terminal.json +1 -1
- package/dist/r/test-results.json +1 -1
- package/dist/r/theming.json +1 -1
- package/dist/r/toast.json +1 -1
- package/dist/r/tool.json +1 -1
- package/dist/r/top-bar.json +1 -1
- package/dist/r/trace.json +1 -1
- package/dist/r/tree.json +1 -1
- package/dist/r/update-dialog.json +1 -1
- package/dist/r/workspace-switcher.json +1 -1
- package/package.json +11 -11
- package/registry.json +65 -65
- package/src/components/composites/model-selector/model-selector.tsx +4 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"split-layout.js","names":["For","createEffect","createComputed","createMemo","createUniqueId","createSignal","onMount","onCleanup","on","Show","Accessor","JSX","Dynamic","X","GripVertical","ActionButton","Button","resizeSeparatorClass","cn","computeLayoutFrames","LayoutRect","paneDropIntent","PaneDropIntent","PANE_DRAG_TYPE","DRAG_PREVIEW_MAX_WIDTH","DRAG_PREVIEW_MAX_HEIGHT","listLeaves","MAX_SPLIT_RATIO","MIN_SPLIT_RATIO","SplitLayoutBranch","SplitLayoutLeaf","SplitLayoutState","SplitLayoutResizeControllerProps","ResizeController","props","L","Element","ResizeControllerState","resizeControllerEntries","SplitLayoutProps","state","label","labelForLeaf","leaf","renderLeaf","renderPaneLabel","paneTabIndex","labelForSeparator","branch","onResize","splitId","ratio","onFocus","leafId","onClose","onMove","targetId","intent","renderPaneActions","class","rectStyle","rect","CSSProperties","left","x","top","y","width","height","separatorPlaceholderStyle","horizontal","direction","transform","dragPreviewPlaceholder","source","HTMLElement","message","placeholder","document","createElement","className","getAttribute","setAttribute","localName","textContent","boundedSnapshotSize","sourceWidth","Math","max","sourceHeight","scale","min","round","cloneDragPreviewNode","Node","nodeType","TEXT_NODE","cloneNode","SVGElement","includes","undefined","HTMLImageElement","snapshot","size","naturalWidth","naturalHeight","complete","Error","context","getContext","drawImage","children","createDocumentFragment","child","childNodes","clone","append","length","attribute","removeAttribute","Array","from","attributes","test","name","HTMLCanvasElement","childClone","SplitLayout","root","HTMLDivElement","pendingFrame","disposed","resizeLoadGeneration","resizeControllerEntry","focusAfterResizeLoad","pendingFocusFrame","pendingFocusRetryTimer","refs","Map","domIds","prefix","resizeReloadWarningId","nextDomId","nextDragId","dragPreview","drag","setDrag","id","token","drop","setDrop","resizeController","setResizeController","reloadRequired","cancelPendingFocusRestore","cancelAnimationFrame","clearTimeout","focusAfterRender","selector","preserveCurrentFocus","attemptFocus","retries","currentFocus","ownerDocument","activeElement","body","target","querySelector","focus","preventScroll","window","setTimeout","requestAnimationFrame","trackFocusChange","event","FocusEvent","addEventListener","removeEventListener","clearDrag","remove","createDragPreview","preview","inert","domId","existing","get","created","set","leaves","center","leafMap","map","frames","branches","values","flatMap","frame","node","kind","generation","entry","then","default","Controller","shouldFocusHandle","current","has","allowedTarget","transfer","DataTransfer","types","dropLabel","placement","branchMap","schedule","action","active","contains","field","HTMLTextAreaElement","HTMLInputElement","selection","start","selectionStart","end","selectionEnd","selectionDirection","isConnected","setSelectionRange","clear","close","next","_el$","_tmpl$","_el$2","firstChild","_$use","el","_$insert","_$createComponent","each","initial","content","paneLabel","actions","delete","_el$3","_tmpl$2","_el$4","_el$5","_el$6","_el$7","nextSibling","$$focusin","dataTransfer","clientX","clientY","currentTarget","getBoundingClientRect","accepted","getData","preventDefault","relatedTarget","dropEffect","_$setAttribute","setData","effectAllowed","setDragImage","previewFrame","scaleX","scaleY","_c$2","_$memo","_c$3","variant","aria-label","tooltip","onClick","_c$4","_el$8","_tmpl$3","_$effect","_$className","_p$","_v$4","_v$5","_v$6","_v$7","focusedLeafId","_v$8","_v$9","_v$0","_v$1","_v$10","Boolean","_v$11","_v$12","e","t","a","o","i","n","s","h","_$style","r","d","l","when","fallback","_el$9","_tmpl$4","_v$13","_v$14","_v$15","join","_v$16","_v$17","_v$18","_v$19","_v$20","component","_c$","_el$0","_tmpl$5","_c$5","_el$1","_tmpl$6","aria-describedby","location","reload","_v$","_v$2","_v$3","_$delegateEvents","_$createComponent","_$memo","_$className","_$setAttribute","_$style","_$delegateEvents"],"sources":["../../../../src/components/layout/split-layout/split-layout.tsx"],"sourcesContent":["import {\n For,\n createEffect,\n createComputed,\n createMemo,\n createUniqueId,\n createSignal,\n onMount,\n onCleanup,\n on,\n Show,\n type Accessor,\n type JSX,\n} from 'solid-js'\nimport { Dynamic } from 'solid-js/web'\nimport { X, GripVertical } from 'lucide-solid'\nimport { ActionButton } from '../../composites/action-button'\nimport { Button } from '../../ui/button'\nimport { resizeSeparatorClass } from '#lib/resize-separator'\nimport { cn } from '#lib/utils'\nimport { computeLayoutFrames, type LayoutRect } from './geometry'\nimport { paneDropIntent, type PaneDropIntent } from './drop'\nexport type { PaneDropIntent } from './drop'\nconst PANE_DRAG_TYPE = 'application/x-adea-pane-move'\nconst DRAG_PREVIEW_MAX_WIDTH = 384\nconst DRAG_PREVIEW_MAX_HEIGHT = 256\nimport {\n listLeaves,\n MAX_SPLIT_RATIO,\n MIN_SPLIT_RATIO,\n type SplitLayoutBranch,\n type SplitLayoutLeaf,\n type SplitLayoutState,\n} from './model'\nimport type { SplitLayoutResizeControllerProps } from './resize-controller-core'\n\ntype ResizeController<L extends SplitLayoutLeaf> = (\n props: SplitLayoutResizeControllerProps<L>\n) => JSX.Element\ntype ResizeControllerState<L extends SplitLayoutLeaf> = ResizeController<L> | false | 'error'\n\n/*\n * Browsers cache a failed module import under its URL, failed static\n * dependencies included, so retrying the same specifier fails again without a\n * request. Each attempt therefore takes the next entry: a second facade over\n * the same implementation (a failed facade request recovers without fetching\n * the implementation twice), then a facade over a byte-identical copy of the\n * implementation (a failed implementation chunk recovers). After the last one\n * only a reload can fetch the controller.\n */\nconst resizeControllerEntries = [\n () => import('./resize-controller'),\n () => import('./resize-controller-retry'),\n () => import('./resize-controller-retry-2'),\n]\n\nexport type SplitLayoutProps<L extends SplitLayoutLeaf> = {\n state: SplitLayoutState<L>\n label: string\n /** Accessible name for a pane region and its close button. */\n labelForLeaf: (leaf: L) => string\n /** Called once per stable leaf owner; the accessor tracks opaque payload replacement. */\n renderLeaf: (leaf: Accessor<L>) => JSX.Element\n /** Inline visible header composition, separate from the region and close-button name. */\n renderPaneLabel?: (leaf: Accessor<L>) => JSX.Element\n /** Whether pane regions participate in sequential keyboard navigation; defaults to programmatic focus only. */\n paneTabIndex?: 0 | -1\n /** Accessible splitter name; defaults to the current orientation-specific label. */\n labelForSeparator?: (branch: SplitLayoutBranch<L>) => string\n onResize: (splitId: string, ratio: number) => void\n onFocus?: (leafId: string) => void\n /** Host performs the model transition and returns the surviving focus destination. */\n onClose?: (leafId: string) => string | undefined\n /** Pointer placement only; the host supplies keyboard commands and performs the model transition. */\n onMove?: (leafId: string, targetId: string, intent: PaneDropIntent) => void\n /** Stable header composition for host-owned keyboard actions/capability feedback. */\n renderPaneActions?: (leaf: Accessor<L>) => JSX.Element\n class?: string\n}\nfunction rectStyle(rect: LayoutRect): JSX.CSSProperties {\n return {\n left: `${rect.x * 100}%`,\n top: `${rect.y * 100}%`,\n width: `${rect.width * 100}%`,\n height: `${rect.height * 100}%`,\n }\n}\nfunction separatorPlaceholderStyle(branch: SplitLayoutBranch, rect: LayoutRect): JSX.CSSProperties {\n const horizontal = branch.direction === 'row'\n return {\n left: `${(rect.x + (horizontal ? rect.width * branch.ratio : 0)) * 100}%`,\n top: `${(rect.y + (horizontal ? 0 : rect.height * branch.ratio)) * 100}%`,\n width: horizontal ? '1px' : `${rect.width * 100}%`,\n height: horizontal ? `${rect.height * 100}%` : '1px',\n transform: horizontal ? 'translateX(-50%)' : 'translateY(-50%)',\n }\n}\nfunction dragPreviewPlaceholder(source: HTMLElement, message: string) {\n const placeholder = document.createElement('div')\n placeholder.className = cn(\n source.getAttribute('class'),\n 'flex min-h-8 min-w-0 items-center justify-center bg-muted px-2 text-center text-xs text-muted-foreground'\n )\n placeholder.setAttribute('data-split-drag-placeholder', source.localName)\n placeholder.textContent = message\n return placeholder\n}\nfunction boundedSnapshotSize(width: number, height: number) {\n const sourceWidth = Math.max(1, width)\n const sourceHeight = Math.max(1, height)\n const scale = Math.min(\n 1,\n DRAG_PREVIEW_MAX_WIDTH / sourceWidth,\n DRAG_PREVIEW_MAX_HEIGHT / sourceHeight\n )\n return {\n width: Math.max(1, Math.round(sourceWidth * scale)),\n height: Math.max(1, Math.round(sourceHeight * scale)),\n }\n}\nfunction cloneDragPreviewNode(source: Node): Node | undefined {\n if (source.nodeType === Node.TEXT_NODE) return source.cloneNode(false)\n if (!(source instanceof HTMLElement || source instanceof SVGElement))\n return source.cloneNode(false)\n\n if (['script', 'style', 'link', 'source', 'track', 'meta'].includes(source.localName))\n return undefined\n if (['iframe', 'video', 'audio', 'object', 'embed'].includes(source.localName))\n return dragPreviewPlaceholder(\n source as HTMLElement,\n 'Embedded content unavailable while moving'\n )\n if (source instanceof HTMLImageElement) {\n const snapshot = document.createElement('canvas')\n const size = boundedSnapshotSize(\n source.naturalWidth || source.width,\n source.naturalHeight || source.height\n )\n snapshot.width = size.width\n snapshot.height = size.height\n snapshot.className = source.getAttribute('class') ?? ''\n snapshot.setAttribute('data-split-drag-image', '')\n try {\n if (!source.complete || source.naturalWidth === 0)\n throw new Error('image has no decoded pixels')\n const context = snapshot.getContext('2d')\n if (!context) throw new Error('canvas snapshot context is unavailable')\n context.drawImage(source, 0, 0, snapshot.width, snapshot.height)\n return snapshot\n } catch {\n return dragPreviewPlaceholder(source, 'Image preview unavailable')\n }\n }\n\n // Copying a defined custom element can run its constructor; inserting it can\n // also reconnect a stream or terminal session. Flatten its display tree.\n if (source instanceof HTMLElement && source.localName.includes('-')) {\n const children = document.createDocumentFragment()\n for (const child of source.childNodes) {\n const clone = cloneDragPreviewNode(child)\n if (clone) children.append(clone)\n }\n return children.childNodes.length > 0\n ? children\n : dragPreviewPlaceholder(source, 'Live component preview unavailable while moving')\n }\n\n const clone = source.cloneNode(false) as HTMLElement | SVGElement\n for (const attribute of [\n 'id',\n 'style',\n 'draggable',\n 'data-pane-drag-handle',\n 'data-pane-id',\n 'src',\n 'srcset',\n 'href',\n 'xlink:href',\n 'data',\n 'poster',\n ])\n clone.removeAttribute(attribute)\n for (const attribute of Array.from(clone.attributes))\n if (/^on/i.test(attribute.name)) clone.removeAttribute(attribute.name)\n\n if (source instanceof HTMLCanvasElement && clone instanceof HTMLCanvasElement) {\n const size = boundedSnapshotSize(source.width, source.height)\n clone.width = size.width\n clone.height = size.height\n try {\n const context = clone.getContext('2d')\n if (!context) throw new Error('canvas snapshot context is unavailable')\n context.drawImage(source, 0, 0, clone.width, clone.height)\n } catch {\n return dragPreviewPlaceholder(source, 'Canvas preview unavailable while moving')\n }\n return clone\n }\n\n for (const child of source.childNodes) {\n const childClone = cloneDragPreviewNode(child)\n if (childClone) clone.append(childClone)\n }\n return clone\n}\n/** Muxy frame geometry keeps leaf owners stable; the lazy resize controller owns constrained separator interactions. */\nexport function SplitLayout<L extends SplitLayoutLeaf>(props: SplitLayoutProps<L>) {\n let root: HTMLDivElement | undefined\n let pendingFrame: number | undefined\n let disposed = false\n let resizeLoadGeneration = 0\n let resizeControllerEntry = 0\n let focusAfterResizeLoad = false\n let pendingFocusFrame: number | undefined\n let pendingFocusRetryTimer: number | undefined\n const refs = new Map<string, HTMLElement>()\n const domIds = new Map<string, string>()\n const prefix = createUniqueId()\n const resizeReloadWarningId = `${prefix}-resize-reload-warning`\n let nextDomId = 0\n let nextDragId = 0\n let dragPreview: HTMLElement | undefined\n const [drag, setDrag] = createSignal<{ id: string; token: string }>()\n const [drop, setDrop] = createSignal<{ id: string; intent: PaneDropIntent }>()\n const [resizeController, setResizeController] = createSignal<ResizeControllerState<L>>()\n const reloadRequired = () => resizeControllerEntry >= resizeControllerEntries.length\n const cancelPendingFocusRestore = () => {\n if (pendingFocusFrame !== undefined) cancelAnimationFrame(pendingFocusFrame)\n pendingFocusFrame = undefined\n if (pendingFocusRetryTimer !== undefined) clearTimeout(pendingFocusRetryTimer)\n pendingFocusRetryTimer = undefined\n }\n const focusAfterRender = (selector: string, preserveCurrentFocus = false) => {\n const attemptFocus = (retries: number) => {\n if (preserveCurrentFocus) {\n const currentFocus = root?.ownerDocument.activeElement\n if (currentFocus && currentFocus !== root?.ownerDocument.body && currentFocus !== root)\n return\n }\n const target = root?.querySelector<HTMLElement>(selector)\n if (target) {\n target.focus({ preventScroll: true })\n return\n }\n // A Solid state update can commit the replacement control after the\n // first frame. Retry in bounded tasks so a backgrounded page's paused\n // animation frames cannot strand keyboard focus.\n if (retries > 0)\n pendingFocusRetryTimer = window.setTimeout(() => {\n pendingFocusRetryTimer = undefined\n attemptFocus(retries - 1)\n }, 0)\n }\n cancelPendingFocusRestore()\n pendingFocusFrame = requestAnimationFrame(() => {\n pendingFocusFrame = undefined\n attemptFocus(2)\n })\n }\n const trackFocusChange = (event: FocusEvent) => {\n if (event.target === document.body) return\n focusAfterResizeLoad = false\n cancelPendingFocusRestore()\n }\n onMount(() => {\n document.addEventListener('focusin', trackFocusChange)\n onCleanup(() => document.removeEventListener('focusin', trackFocusChange))\n })\n const clearDrag = () => {\n setDrag(undefined)\n setDrop(undefined)\n dragPreview?.remove()\n dragPreview = undefined\n }\n const createDragPreview = (source: HTMLElement) => {\n dragPreview?.remove()\n const preview = cloneDragPreviewNode(source) as HTMLElement\n preview.className =\n 'pointer-events-none fixed -left-full top-0 z-(--z-dialog) flex h-64 max-h-screen w-96 max-w-screen min-h-0 min-w-0 flex-col overflow-hidden rounded-lg border border-border bg-card text-card-foreground shadow-xl'\n preview.removeAttribute('id')\n preview.removeAttribute('style')\n preview.removeAttribute('role')\n preview.removeAttribute('aria-label')\n preview.removeAttribute('data-pane-id')\n preview.removeAttribute('data-focused')\n preview.removeAttribute('data-drag-source')\n preview.removeAttribute('data-drop-direction')\n preview.removeAttribute('data-drop-placement')\n preview.setAttribute('data-split-drag-preview', '')\n preview.setAttribute('aria-hidden', 'true')\n preview.inert = true\n document.body.append(preview)\n dragPreview = preview\n return preview\n }\n const domId = (id: string) => {\n const existing = domIds.get(id)\n if (existing) return existing\n const created = `${prefix}-pane-${nextDomId++}`\n domIds.set(id, created)\n return created\n }\n const leaves = createMemo(() => listLeaves(props.state.center))\n const leafMap = createMemo(() => new Map(leaves().map((leaf) => [leaf.id, leaf])))\n const frames = createMemo(() => computeLayoutFrames(props.state.center))\n const branches = createMemo(() =>\n Array.from(frames().values()).flatMap((frame) =>\n frame.node.kind === 'split' ? [frame.node] : []\n )\n )\n createEffect(() => {\n if (branches().length === 0) {\n resizeLoadGeneration += 1\n focusAfterResizeLoad = false\n cancelPendingFocusRestore()\n // Keep a loaded controller so a later split does not re-import an entry\n // that may have failed before recovery. Clear only transient UI state.\n if (resizeController() === false || resizeController() === 'error')\n setResizeController(undefined)\n return\n }\n if (resizeController() !== undefined) return\n const generation = ++resizeLoadGeneration\n const entry = Math.min(resizeControllerEntry, resizeControllerEntries.length - 1)\n cancelPendingFocusRestore()\n setResizeController(false)\n void resizeControllerEntries[entry]!().then(\n ({ default: Controller }) => {\n if (disposed || generation !== resizeLoadGeneration || branches().length === 0) return\n const shouldFocusHandle = focusAfterResizeLoad\n focusAfterResizeLoad = false\n setResizeController(() => Controller)\n if (shouldFocusHandle) focusAfterRender('[data-split-layout-handle]', true)\n },\n () => {\n // The next split must start from the next entry as well.\n resizeControllerEntry = Math.max(resizeControllerEntry, entry + 1)\n if (!disposed && generation === resizeLoadGeneration && branches().length > 0) {\n setResizeController('error')\n if (focusAfterResizeLoad) focusAfterRender('[data-resize-retry]')\n }\n }\n )\n })\n createComputed(() => {\n const current = drag()\n if (current && (!props.onMove || !leafMap().has(current.id))) clearDrag()\n const target = drop()\n if (target && !leafMap().has(target.id)) setDrop(undefined)\n })\n const allowedTarget = (id: string, transfer: DataTransfer | null) => {\n const current = drag()\n return props.onMove &&\n current &&\n current.id !== id &&\n leafMap().has(current.id) &&\n leafMap().has(id) &&\n transfer?.types.includes(PANE_DRAG_TYPE)\n ? current\n : undefined\n }\n const dropLabel = createMemo(() => {\n const target = drop()\n const leaf = target ? leafMap().get(target.id) : undefined\n return target && leaf\n ? `Drop to place pane ${target.intent.placement} ${props.labelForLeaf(leaf)}`\n : ''\n })\n const branchMap = createMemo(() => new Map(branches().map((branch) => [branch.id, branch])))\n const schedule = (action: () => void) => {\n if (pendingFrame !== undefined) cancelAnimationFrame(pendingFrame)\n pendingFrame = requestAnimationFrame(() => {\n pendingFrame = undefined\n action()\n })\n }\n // Register before keyed children update: capture a focused editor before an\n // ordered DOM move can blur it. Never override a newer focus outside this root.\n createComputed(\n on(\n () => props.state.center,\n () => {\n const active = root?.ownerDocument.activeElement\n if (!root || !(active instanceof HTMLElement) || !root.contains(active)) return\n const field =\n active instanceof HTMLTextAreaElement || active instanceof HTMLInputElement\n ? active\n : undefined\n const selection = field\n ? {\n start: field.selectionStart,\n end: field.selectionEnd,\n direction: field.selectionDirection,\n }\n : undefined\n schedule(() => {\n if (!active.isConnected || !root?.contains(active)) return\n const current = active.ownerDocument.activeElement\n if (current !== active && current !== active.ownerDocument.body) return\n active.focus({ preventScroll: true })\n if (field && selection?.start !== null && selection?.end !== null && selection)\n field.setSelectionRange(\n selection.start,\n selection.end,\n selection.direction ?? undefined\n )\n })\n }\n )\n )\n onCleanup(() => {\n disposed = true\n focusAfterResizeLoad = false\n cancelPendingFocusRestore()\n if (pendingFrame !== undefined) cancelAnimationFrame(pendingFrame)\n clearDrag()\n refs.clear()\n domIds.clear()\n })\n const close = (id: string) => {\n const next = props.onClose?.(id)\n if (next) schedule(() => refs.get(next)?.focus({ preventScroll: true }))\n }\n return (\n <div\n ref={(el) => {\n root = el\n }}\n role=\"group\"\n aria-label={props.label}\n data-slot=\"split-layout\"\n data-dragging={drag() ? '' : undefined}\n class={cn('relative size-full min-h-0 min-w-0 data-[dragging]:cursor-grabbing', props.class)}\n >\n <For each={leaves().map((leaf) => leaf.id)}>\n {(id) => {\n const initial = leafMap().get(id)!\n const leaf = () => leafMap().get(id) ?? initial\n const content = props.renderLeaf(leaf)\n const paneLabel = props.renderPaneLabel?.(leaf)\n const actions = props.renderPaneActions?.(leaf)\n const intent = () => (drop()?.id === id ? drop()?.intent : undefined)\n onCleanup(() => {\n refs.delete(id)\n domIds.delete(id)\n })\n return (\n <section\n ref={(el) => refs.set(id, el)}\n id={domId(id)}\n role=\"region\"\n aria-label={props.labelForLeaf(leaf())}\n tabIndex={props.paneTabIndex ?? -1}\n data-pane-id={id}\n data-focused={props.state.focusedLeafId === id ? '' : undefined}\n data-drag-source={drag()?.id === id ? '' : undefined}\n data-drop-direction={intent()?.direction}\n data-drop-placement={intent()?.placement}\n onDragOver={(event) => {\n if (!allowedTarget(id, event.dataTransfer)) return\n const next = paneDropIntent(\n event.clientX,\n event.clientY,\n event.currentTarget.getBoundingClientRect()\n )\n if (!next) {\n setDrop(undefined)\n return\n }\n event.preventDefault()\n if (event.dataTransfer) event.dataTransfer.dropEffect = 'move'\n setDrop({ id, intent: next })\n }}\n onDragLeave={(event) => {\n if (\n event.relatedTarget instanceof Node &&\n event.currentTarget.contains(event.relatedTarget)\n )\n return\n if (drop()?.id === id) setDrop(undefined)\n }}\n onDrop={(event) => {\n const current = allowedTarget(id, event.dataTransfer)\n const next = paneDropIntent(\n event.clientX,\n event.clientY,\n event.currentTarget.getBoundingClientRect()\n )\n const accepted =\n current && next && event.dataTransfer?.getData(PANE_DRAG_TYPE) === current.token\n clearDrag()\n if (!accepted) return\n event.preventDefault()\n props.onMove?.(current.id, id, next)\n }}\n style={rectStyle(frames().get(id)?.rect ?? { x: 0, y: 0, width: 0, height: 0 })}\n class=\"absolute flex min-h-0 min-w-0 flex-col overflow-hidden border border-border transition-opacity motion-reduce:transition-none data-[drag-source]:opacity-40 data-[focused]:border-primary bg-background text-foreground focus-visible:outline focus-visible:outline-2 focus-visible:outline-ring\"\n onFocusIn={() => props.onFocus?.(id)}\n >\n <header class=\"flex min-w-0 shrink-0 items-center gap-2 bg-surface px-2\">\n <span\n data-pane-drag-handle=\"\"\n draggable={Boolean(props.onMove)}\n class={cn('flex min-w-0 flex-1 items-center gap-2 truncate text-sm', {\n 'cursor-grab': Boolean(props.onMove),\n 'cursor-grabbing': drag()?.id === id,\n })}\n title={props.onMove ? `Drag ${props.labelForLeaf(leaf())} to move` : undefined}\n onDragStart={(event) => {\n if (!props.onMove || !event.dataTransfer) {\n event.preventDefault()\n return\n }\n const token = `${prefix}-${++nextDragId}`\n setDrag({ id, token })\n event.dataTransfer.setData(PANE_DRAG_TYPE, token)\n event.dataTransfer.effectAllowed = 'move'\n // The native drag image carries this pane's actual content\n // in a bounded floating-window frame; the source recedes\n // independently as the browser follows the image pointer.\n const source = refs.get(id)\n const frame = source?.getBoundingClientRect()\n if (source && frame && typeof event.dataTransfer.setDragImage === 'function') {\n const preview = createDragPreview(source)\n const previewFrame = preview.getBoundingClientRect()\n const scaleX = previewFrame.width / frame.width\n const scaleY = previewFrame.height / frame.height\n event.dataTransfer.setDragImage(\n preview,\n Math.max(0, Math.round((event.clientX - frame.left) * scaleX)),\n Math.max(0, Math.round((event.clientY - frame.top) * scaleY))\n )\n preview.setAttribute('data-native-drag-image', '')\n }\n }}\n onDragEnd={clearDrag}\n >\n {props.onMove ? (\n <GripVertical class=\"size-3 shrink-0\" aria-hidden=\"true\" />\n ) : null}\n <span class=\"min-w-0 flex-1 truncate\">\n {paneLabel ?? props.labelForLeaf(leaf())}\n </span>\n </span>\n {actions}\n {props.onClose ? (\n <ActionButton\n variant=\"ghost\"\n size=\"icon-xs\"\n aria-label={`Close ${props.labelForLeaf(leaf())}`}\n tooltip={`Close ${props.labelForLeaf(leaf())}.`}\n onClick={() => close(id)}\n >\n <X />\n </ActionButton>\n ) : null}\n </header>\n <div class=\"min-h-0 min-w-0 flex-1 overflow-auto\">{content}</div>\n {intent() ? (\n <div\n aria-hidden=\"true\"\n class={cn('pointer-events-none absolute border-2 border-primary bg-primary/10', {\n 'inset-y-0 left-0 w-1/2':\n intent()?.direction === 'row' && intent()?.placement === 'before',\n 'inset-y-0 right-0 w-1/2':\n intent()?.direction === 'row' && intent()?.placement === 'after',\n 'inset-x-0 top-0 h-1/2':\n intent()?.direction === 'column' && intent()?.placement === 'before',\n 'inset-x-0 bottom-0 h-1/2':\n intent()?.direction === 'column' && intent()?.placement === 'after',\n })}\n />\n ) : null}\n </section>\n )\n }}\n </For>\n <span class=\"sr-only\" role=\"status\">\n {dropLabel() ||\n (resizeController() === 'error'\n ? reloadRequired()\n ? 'Resize controls didn’t load. Reloading may lose unsaved pane content.'\n : 'Resize controls did not load.'\n : '')}\n </span>\n <For each={branches().map((branch) => branch.id)}>\n {(id) => {\n const initial = branchMap().get(id)!\n const branch: Accessor<SplitLayoutBranch<L>> = () => branchMap().get(id) ?? initial\n const rect = () => frames().get(id)?.rect ?? { x: 0, y: 0, width: 0, height: 0 }\n return (\n <Show\n when={typeof resizeController() === 'function'}\n fallback={\n <div\n role=\"separator\"\n aria-label={\n props.labelForSeparator?.(branch()) ??\n (branch().direction === 'row' ? 'Resize pane columns' : 'Resize pane rows')\n }\n aria-orientation={branch().direction === 'row' ? 'vertical' : 'horizontal'}\n aria-controls={listLeaves(branch())\n .map((leaf) => domId(leaf.id))\n .join(' ')}\n aria-valuemin={Math.round(MIN_SPLIT_RATIO * 100)}\n aria-valuemax={Math.round(MAX_SPLIT_RATIO * 100)}\n aria-valuenow={Math.round(branch().ratio * 100)}\n aria-disabled=\"true\"\n tabIndex={-1}\n data-direction={branch().direction}\n style={separatorPlaceholderStyle(branch(), rect())}\n class=\"pointer-events-none absolute bg-border\"\n />\n }\n >\n <Dynamic\n component={resizeController() as ResizeController<L>}\n branch={branch}\n rect={() => rectStyle(rect())}\n domId={domId}\n root={() => root}\n labelForSeparator={props.labelForSeparator}\n class={cn(resizeSeparatorClass(), 'pointer-events-auto absolute cursor-pointer')}\n onResize={props.onResize}\n />\n </Show>\n )\n }}\n </For>\n {resizeController() === 'error' ? (\n <div class=\"absolute top-2 right-2 z-(--z-menu) flex max-w-sm flex-col items-end gap-2\">\n {reloadRequired() ? (\n <p\n id={resizeReloadWarningId}\n role=\"alert\"\n class=\"rounded-md border bg-background p-2 text-sm shadow-md\"\n >\n Reloading may discard unsaved pane content.\n </p>\n ) : null}\n <Button\n variant=\"outline\"\n size=\"sm\"\n data-resize-retry\n aria-describedby={reloadRequired() ? resizeReloadWarningId : undefined}\n onClick={(event) => {\n if (reloadRequired()) {\n window.location.reload()\n return\n }\n focusAfterResizeLoad = document.activeElement === event.currentTarget\n setResizeController(undefined)\n }}\n >\n {reloadRequired() ? 'Reload page to retry resizing' : 'Retry pane resizing'}\n </Button>\n </div>\n ) : null}\n </div>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAuBA,IAAMuB,iBAAiB;AACvB,IAAMC,yBAAyB;AAC/B,IAAMC,0BAA0B;AAyBhC,IAAMa,0BAA0B;OACxB,OAAO;OACP,OAAO;OACP,OAAO;AAA8B;AA0B7C,SAASsB,UAAUC,MAAqC;CACtD,OAAO;EACLE,MAAM,GAAGF,KAAKG,IAAI,IAAG;EACrBC,KAAK,GAAGJ,KAAKK,IAAI,IAAG;EACpBC,OAAO,GAAGN,KAAKM,QAAQ,IAAG;EAC1BC,QAAQ,GAAGP,KAAKO,SAAS,IAAG;CAC9B;AACF;AACA,SAASC,0BAA0BrB,QAA2Ba,MAAqC;CACjG,MAAMS,aAAatB,OAAOuB,cAAc;CACxC,OAAO;EACLR,MAAM,IAAIF,KAAKG,KAAKM,aAAaT,KAAKM,QAAQnB,OAAOG,QAAQ,MAAM,IAAG;EACtEc,KAAK,IAAIJ,KAAKK,KAAKI,aAAa,IAAIT,KAAKO,SAASpB,OAAOG,UAAU,IAAG;EACtEgB,OAAOG,aAAa,QAAQ,GAAGT,KAAKM,QAAQ,IAAG;EAC/CC,QAAQE,aAAa,GAAGT,KAAKO,SAAS,IAAG,KAAM;EAC/CI,WAAWF,aAAa,qBAAqB;CAC/C;AACF;AACA,SAASG,uBAAuBC,QAAqBE,SAAiB;CACpE,MAAMC,cAAcC,SAASC,cAAc,KAAK;CAChDF,YAAYG,YAAY9D,GACtBwD,OAAOO,aAAa,O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AAhC,MAAA,iBAAAmD,IAAAe,IAAAmC,IAAA;GAAAC,SAAAnD,IAAAgB,KAAAjB,UAAAlD,MAAAmD,IAAAgB,IAAAmC,IAAA;GAAA,OAAAnD;EAAA,GAAA;GAAAc,GAAArM,KAAAA;GAAAsM,GAAAtM,KAAAA;GAAAuM,GAAAvM,KAAAA;EAAA,CAAA;EAAA,OAAAoI;CAAA,EAAA,CAAA;AAoOlG;AAACuG,eAAA,CAAA,SAAA,CAAA"}
|
|
1
|
+
{"version":3,"file":"split-layout.js","names":["For","createEffect","createComputed","createMemo","createUniqueId","createSignal","onMount","onCleanup","on","Show","Dynamic","X","GripVertical","ActionButton","Button","resizeSeparatorClass","cn","computeLayoutFrames","paneDropIntent","PANE_DRAG_TYPE","DRAG_PREVIEW_MAX_WIDTH","DRAG_PREVIEW_MAX_HEIGHT","listLeaves","MAX_SPLIT_RATIO","MIN_SPLIT_RATIO","props","resizeControllerEntries","state","label","labelForLeaf","leaf","renderLeaf","renderPaneLabel","paneTabIndex","labelForSeparator","branch","onResize","ratio","onFocus","onClose","onMove","intent","renderPaneActions","class","rectStyle","rect","left","x","top","y","width","height","separatorPlaceholderStyle","horizontal","direction","transform","dragPreviewPlaceholder","source","HTMLElement","message","placeholder","document","createElement","className","getAttribute","setAttribute","localName","textContent","boundedSnapshotSize","sourceWidth","Math","max","sourceHeight","scale","min","round","cloneDragPreviewNode","Node","nodeType","TEXT_NODE","cloneNode","SVGElement","includes","undefined","HTMLImageElement","snapshot","size","naturalWidth","naturalHeight","complete","Error","context","getContext","drawImage","children","createDocumentFragment","child","childNodes","clone","append","length","attribute","removeAttribute","Array","from","attributes","test","name","HTMLCanvasElement","childClone","SplitLayout","root","pendingFrame","disposed","resizeLoadGeneration","resizeControllerEntry","focusAfterResizeLoad","pendingFocusFrame","pendingFocusRetryTimer","refs","Map","domIds","prefix","resizeReloadWarningId","nextDomId","nextDragId","dragPreview","drag","setDrag","id","token","drop","setDrop","resizeController","setResizeController","reloadRequired","cancelPendingFocusRestore","cancelAnimationFrame","clearTimeout","focusAfterRender","selector","preserveCurrentFocus","attemptFocus","retries","currentFocus","ownerDocument","activeElement","body","target","querySelector","focus","preventScroll","window","setTimeout","requestAnimationFrame","trackFocusChange","event","addEventListener","removeEventListener","clearDrag","remove","createDragPreview","preview","inert","domId","existing","get","created","set","leaves","center","leafMap","map","frames","branches","values","flatMap","frame","node","kind","generation","entry","then","default","Controller","shouldFocusHandle","current","has","allowedTarget","transfer","types","dropLabel","placement","branchMap","schedule","action","active","contains","field","HTMLTextAreaElement","HTMLInputElement","selection","start","selectionStart","end","selectionEnd","selectionDirection","isConnected","setSelectionRange","clear","close","next","_el$","_tmpl$","_el$2","firstChild","_$use","el","_$insert","_$createComponent","each","initial","content","paneLabel","actions","delete","_el$3","_tmpl$2","_el$4","_el$5","_el$6","_el$7","nextSibling","$$focusin","dataTransfer","clientX","clientY","currentTarget","getBoundingClientRect","accepted","getData","preventDefault","relatedTarget","dropEffect","_$setAttribute","setData","effectAllowed","setDragImage","previewFrame","scaleX","scaleY","_c$2","_$memo","_c$3","variant","tooltip","onClick","_c$4","_el$8","_tmpl$3","_$effect","_$className","_p$","_v$4","_v$5","_v$6","_v$7","focusedLeafId","_v$8","_v$9","_v$0","_v$1","_v$10","Boolean","_v$11","_v$12","e","t","a","o","i","n","s","h","_$style","r","d","l","when","fallback","_el$9","_tmpl$4","_v$13","_v$14","_v$15","join","_v$16","_v$17","_v$18","_v$19","_v$20","component","_c$","_el$0","_tmpl$5","_c$5","_el$1","_tmpl$6","location","reload","_v$","_v$2","_v$3","_$delegateEvents"],"sources":["../../../../src/components/layout/split-layout/split-layout.tsx"],"sourcesContent":["import {\n For,\n createEffect,\n createComputed,\n createMemo,\n createUniqueId,\n createSignal,\n onMount,\n onCleanup,\n on,\n Show,\n type Accessor,\n type JSX,\n} from 'solid-js'\nimport { Dynamic } from 'solid-js/web'\nimport { X, GripVertical } from 'lucide-solid'\nimport { ActionButton } from '../../composites/action-button'\nimport { Button } from '../../ui/button'\nimport { resizeSeparatorClass } from '#lib/resize-separator'\nimport { cn } from '#lib/utils'\nimport { computeLayoutFrames, type LayoutRect } from './geometry'\nimport { paneDropIntent, type PaneDropIntent } from './drop'\nexport type { PaneDropIntent } from './drop'\nconst PANE_DRAG_TYPE = 'application/x-adea-pane-move'\nconst DRAG_PREVIEW_MAX_WIDTH = 384\nconst DRAG_PREVIEW_MAX_HEIGHT = 256\nimport {\n listLeaves,\n MAX_SPLIT_RATIO,\n MIN_SPLIT_RATIO,\n type SplitLayoutBranch,\n type SplitLayoutLeaf,\n type SplitLayoutState,\n} from './model'\nimport type { SplitLayoutResizeControllerProps } from './resize-controller-core'\n\ntype ResizeController<L extends SplitLayoutLeaf> = (\n props: SplitLayoutResizeControllerProps<L>\n) => JSX.Element\ntype ResizeControllerState<L extends SplitLayoutLeaf> = ResizeController<L> | false | 'error'\n\n/*\n * Browsers cache a failed module import under its URL, failed static\n * dependencies included, so retrying the same specifier fails again without a\n * request. Each attempt therefore takes the next entry: a second facade over\n * the same implementation (a failed facade request recovers without fetching\n * the implementation twice), then a facade over a byte-identical copy of the\n * implementation (a failed implementation chunk recovers). After the last one\n * only a reload can fetch the controller.\n */\nconst resizeControllerEntries = [\n () => import('./resize-controller'),\n () => import('./resize-controller-retry'),\n () => import('./resize-controller-retry-2'),\n]\n\nexport type SplitLayoutProps<L extends SplitLayoutLeaf> = {\n state: SplitLayoutState<L>\n label: string\n /** Accessible name for a pane region and its close button. */\n labelForLeaf: (leaf: L) => string\n /** Called once per stable leaf owner; the accessor tracks opaque payload replacement. */\n renderLeaf: (leaf: Accessor<L>) => JSX.Element\n /** Inline visible header composition, separate from the region and close-button name. */\n renderPaneLabel?: (leaf: Accessor<L>) => JSX.Element\n /** Whether pane regions participate in sequential keyboard navigation; defaults to programmatic focus only. */\n paneTabIndex?: 0 | -1\n /** Accessible splitter name; defaults to the current orientation-specific label. */\n labelForSeparator?: (branch: SplitLayoutBranch<L>) => string\n onResize: (splitId: string, ratio: number) => void\n onFocus?: (leafId: string) => void\n /** Host performs the model transition and returns the surviving focus destination. */\n onClose?: (leafId: string) => string | undefined\n /** Pointer placement only; the host supplies keyboard commands and performs the model transition. */\n onMove?: (leafId: string, targetId: string, intent: PaneDropIntent) => void\n /** Stable header composition for host-owned keyboard actions/capability feedback. */\n renderPaneActions?: (leaf: Accessor<L>) => JSX.Element\n class?: string\n}\nfunction rectStyle(rect: LayoutRect): JSX.CSSProperties {\n return {\n left: `${rect.x * 100}%`,\n top: `${rect.y * 100}%`,\n width: `${rect.width * 100}%`,\n height: `${rect.height * 100}%`,\n }\n}\nfunction separatorPlaceholderStyle(branch: SplitLayoutBranch, rect: LayoutRect): JSX.CSSProperties {\n const horizontal = branch.direction === 'row'\n return {\n left: `${(rect.x + (horizontal ? rect.width * branch.ratio : 0)) * 100}%`,\n top: `${(rect.y + (horizontal ? 0 : rect.height * branch.ratio)) * 100}%`,\n width: horizontal ? '1px' : `${rect.width * 100}%`,\n height: horizontal ? `${rect.height * 100}%` : '1px',\n transform: horizontal ? 'translateX(-50%)' : 'translateY(-50%)',\n }\n}\nfunction dragPreviewPlaceholder(source: HTMLElement, message: string) {\n const placeholder = document.createElement('div')\n placeholder.className = cn(\n source.getAttribute('class'),\n 'flex min-h-8 min-w-0 items-center justify-center bg-muted px-2 text-center text-xs text-muted-foreground'\n )\n placeholder.setAttribute('data-split-drag-placeholder', source.localName)\n placeholder.textContent = message\n return placeholder\n}\nfunction boundedSnapshotSize(width: number, height: number) {\n const sourceWidth = Math.max(1, width)\n const sourceHeight = Math.max(1, height)\n const scale = Math.min(\n 1,\n DRAG_PREVIEW_MAX_WIDTH / sourceWidth,\n DRAG_PREVIEW_MAX_HEIGHT / sourceHeight\n )\n return {\n width: Math.max(1, Math.round(sourceWidth * scale)),\n height: Math.max(1, Math.round(sourceHeight * scale)),\n }\n}\nfunction cloneDragPreviewNode(source: Node): Node | undefined {\n if (source.nodeType === Node.TEXT_NODE) return source.cloneNode(false)\n if (!(source instanceof HTMLElement || source instanceof SVGElement))\n return source.cloneNode(false)\n\n if (['script', 'style', 'link', 'source', 'track', 'meta'].includes(source.localName))\n return undefined\n if (['iframe', 'video', 'audio', 'object', 'embed'].includes(source.localName))\n return dragPreviewPlaceholder(\n source as HTMLElement,\n 'Embedded content unavailable while moving'\n )\n if (source instanceof HTMLImageElement) {\n const snapshot = document.createElement('canvas')\n const size = boundedSnapshotSize(\n source.naturalWidth || source.width,\n source.naturalHeight || source.height\n )\n snapshot.width = size.width\n snapshot.height = size.height\n snapshot.className = source.getAttribute('class') ?? ''\n snapshot.setAttribute('data-split-drag-image', '')\n try {\n if (!source.complete || source.naturalWidth === 0)\n throw new Error('image has no decoded pixels')\n const context = snapshot.getContext('2d')\n if (!context) throw new Error('canvas snapshot context is unavailable')\n context.drawImage(source, 0, 0, snapshot.width, snapshot.height)\n return snapshot\n } catch {\n return dragPreviewPlaceholder(source, 'Image preview unavailable')\n }\n }\n\n // Copying a defined custom element can run its constructor; inserting it can\n // also reconnect a stream or terminal session. Flatten its display tree.\n if (source instanceof HTMLElement && source.localName.includes('-')) {\n const children = document.createDocumentFragment()\n for (const child of source.childNodes) {\n const clone = cloneDragPreviewNode(child)\n if (clone) children.append(clone)\n }\n return children.childNodes.length > 0\n ? children\n : dragPreviewPlaceholder(source, 'Live component preview unavailable while moving')\n }\n\n const clone = source.cloneNode(false) as HTMLElement | SVGElement\n for (const attribute of [\n 'id',\n 'style',\n 'draggable',\n 'data-pane-drag-handle',\n 'data-pane-id',\n 'src',\n 'srcset',\n 'href',\n 'xlink:href',\n 'data',\n 'poster',\n ])\n clone.removeAttribute(attribute)\n for (const attribute of Array.from(clone.attributes))\n if (/^on/i.test(attribute.name)) clone.removeAttribute(attribute.name)\n\n if (source instanceof HTMLCanvasElement && clone instanceof HTMLCanvasElement) {\n const size = boundedSnapshotSize(source.width, source.height)\n clone.width = size.width\n clone.height = size.height\n try {\n const context = clone.getContext('2d')\n if (!context) throw new Error('canvas snapshot context is unavailable')\n context.drawImage(source, 0, 0, clone.width, clone.height)\n } catch {\n return dragPreviewPlaceholder(source, 'Canvas preview unavailable while moving')\n }\n return clone\n }\n\n for (const child of source.childNodes) {\n const childClone = cloneDragPreviewNode(child)\n if (childClone) clone.append(childClone)\n }\n return clone\n}\n/** Muxy frame geometry keeps leaf owners stable; the lazy resize controller owns constrained separator interactions. */\nexport function SplitLayout<L extends SplitLayoutLeaf>(props: SplitLayoutProps<L>) {\n let root: HTMLDivElement | undefined\n let pendingFrame: number | undefined\n let disposed = false\n let resizeLoadGeneration = 0\n let resizeControllerEntry = 0\n let focusAfterResizeLoad = false\n let pendingFocusFrame: number | undefined\n let pendingFocusRetryTimer: number | undefined\n const refs = new Map<string, HTMLElement>()\n const domIds = new Map<string, string>()\n const prefix = createUniqueId()\n const resizeReloadWarningId = `${prefix}-resize-reload-warning`\n let nextDomId = 0\n let nextDragId = 0\n let dragPreview: HTMLElement | undefined\n const [drag, setDrag] = createSignal<{ id: string; token: string }>()\n const [drop, setDrop] = createSignal<{ id: string; intent: PaneDropIntent }>()\n const [resizeController, setResizeController] = createSignal<ResizeControllerState<L>>()\n const reloadRequired = () => resizeControllerEntry >= resizeControllerEntries.length\n const cancelPendingFocusRestore = () => {\n if (pendingFocusFrame !== undefined) cancelAnimationFrame(pendingFocusFrame)\n pendingFocusFrame = undefined\n if (pendingFocusRetryTimer !== undefined) clearTimeout(pendingFocusRetryTimer)\n pendingFocusRetryTimer = undefined\n }\n const focusAfterRender = (selector: string, preserveCurrentFocus = false) => {\n const attemptFocus = (retries: number) => {\n if (preserveCurrentFocus) {\n const currentFocus = root?.ownerDocument.activeElement\n if (currentFocus && currentFocus !== root?.ownerDocument.body && currentFocus !== root)\n return\n }\n const target = root?.querySelector<HTMLElement>(selector)\n if (target) {\n target.focus({ preventScroll: true })\n return\n }\n // A Solid state update can commit the replacement control after the\n // first frame. Retry in bounded tasks so a backgrounded page's paused\n // animation frames cannot strand keyboard focus.\n if (retries > 0)\n pendingFocusRetryTimer = window.setTimeout(() => {\n pendingFocusRetryTimer = undefined\n attemptFocus(retries - 1)\n }, 0)\n }\n cancelPendingFocusRestore()\n pendingFocusFrame = requestAnimationFrame(() => {\n pendingFocusFrame = undefined\n attemptFocus(2)\n })\n }\n const trackFocusChange = (event: FocusEvent) => {\n if (event.target === document.body) return\n focusAfterResizeLoad = false\n cancelPendingFocusRestore()\n }\n onMount(() => {\n document.addEventListener('focusin', trackFocusChange)\n onCleanup(() => document.removeEventListener('focusin', trackFocusChange))\n })\n const clearDrag = () => {\n setDrag(undefined)\n setDrop(undefined)\n dragPreview?.remove()\n dragPreview = undefined\n }\n const createDragPreview = (source: HTMLElement) => {\n dragPreview?.remove()\n const preview = cloneDragPreviewNode(source) as HTMLElement\n preview.className =\n 'pointer-events-none fixed -left-full top-0 z-(--z-dialog) flex h-64 max-h-screen w-96 max-w-screen min-h-0 min-w-0 flex-col overflow-hidden rounded-lg border border-border bg-card text-card-foreground shadow-xl'\n preview.removeAttribute('id')\n preview.removeAttribute('style')\n preview.removeAttribute('role')\n preview.removeAttribute('aria-label')\n preview.removeAttribute('data-pane-id')\n preview.removeAttribute('data-focused')\n preview.removeAttribute('data-drag-source')\n preview.removeAttribute('data-drop-direction')\n preview.removeAttribute('data-drop-placement')\n preview.setAttribute('data-split-drag-preview', '')\n preview.setAttribute('aria-hidden', 'true')\n preview.inert = true\n document.body.append(preview)\n dragPreview = preview\n return preview\n }\n const domId = (id: string) => {\n const existing = domIds.get(id)\n if (existing) return existing\n const created = `${prefix}-pane-${nextDomId++}`\n domIds.set(id, created)\n return created\n }\n const leaves = createMemo(() => listLeaves(props.state.center))\n const leafMap = createMemo(() => new Map(leaves().map((leaf) => [leaf.id, leaf])))\n const frames = createMemo(() => computeLayoutFrames(props.state.center))\n const branches = createMemo(() =>\n Array.from(frames().values()).flatMap((frame) =>\n frame.node.kind === 'split' ? [frame.node] : []\n )\n )\n createEffect(() => {\n if (branches().length === 0) {\n resizeLoadGeneration += 1\n focusAfterResizeLoad = false\n cancelPendingFocusRestore()\n // Keep a loaded controller so a later split does not re-import an entry\n // that may have failed before recovery. Clear only transient UI state.\n if (resizeController() === false || resizeController() === 'error')\n setResizeController(undefined)\n return\n }\n if (resizeController() !== undefined) return\n const generation = ++resizeLoadGeneration\n const entry = Math.min(resizeControllerEntry, resizeControllerEntries.length - 1)\n cancelPendingFocusRestore()\n setResizeController(false)\n void resizeControllerEntries[entry]!().then(\n ({ default: Controller }) => {\n if (disposed || generation !== resizeLoadGeneration || branches().length === 0) return\n const shouldFocusHandle = focusAfterResizeLoad\n focusAfterResizeLoad = false\n setResizeController(() => Controller)\n if (shouldFocusHandle) focusAfterRender('[data-split-layout-handle]', true)\n },\n () => {\n // The next split must start from the next entry as well.\n resizeControllerEntry = Math.max(resizeControllerEntry, entry + 1)\n if (!disposed && generation === resizeLoadGeneration && branches().length > 0) {\n setResizeController('error')\n if (focusAfterResizeLoad) focusAfterRender('[data-resize-retry]')\n }\n }\n )\n })\n createComputed(() => {\n const current = drag()\n if (current && (!props.onMove || !leafMap().has(current.id))) clearDrag()\n const target = drop()\n if (target && !leafMap().has(target.id)) setDrop(undefined)\n })\n const allowedTarget = (id: string, transfer: DataTransfer | null) => {\n const current = drag()\n return props.onMove &&\n current &&\n current.id !== id &&\n leafMap().has(current.id) &&\n leafMap().has(id) &&\n transfer?.types.includes(PANE_DRAG_TYPE)\n ? current\n : undefined\n }\n const dropLabel = createMemo(() => {\n const target = drop()\n const leaf = target ? leafMap().get(target.id) : undefined\n return target && leaf\n ? `Drop to place pane ${target.intent.placement} ${props.labelForLeaf(leaf)}`\n : ''\n })\n const branchMap = createMemo(() => new Map(branches().map((branch) => [branch.id, branch])))\n const schedule = (action: () => void) => {\n if (pendingFrame !== undefined) cancelAnimationFrame(pendingFrame)\n pendingFrame = requestAnimationFrame(() => {\n pendingFrame = undefined\n action()\n })\n }\n // Register before keyed children update: capture a focused editor before an\n // ordered DOM move can blur it. Never override a newer focus outside this root.\n createComputed(\n on(\n () => props.state.center,\n () => {\n const active = root?.ownerDocument.activeElement\n if (!root || !(active instanceof HTMLElement) || !root.contains(active)) return\n const field =\n active instanceof HTMLTextAreaElement || active instanceof HTMLInputElement\n ? active\n : undefined\n const selection = field\n ? {\n start: field.selectionStart,\n end: field.selectionEnd,\n direction: field.selectionDirection,\n }\n : undefined\n schedule(() => {\n if (!active.isConnected || !root?.contains(active)) return\n const current = active.ownerDocument.activeElement\n if (current !== active && current !== active.ownerDocument.body) return\n active.focus({ preventScroll: true })\n if (field && selection?.start !== null && selection?.end !== null && selection)\n field.setSelectionRange(\n selection.start,\n selection.end,\n selection.direction ?? undefined\n )\n })\n }\n )\n )\n onCleanup(() => {\n disposed = true\n focusAfterResizeLoad = false\n cancelPendingFocusRestore()\n if (pendingFrame !== undefined) cancelAnimationFrame(pendingFrame)\n clearDrag()\n refs.clear()\n domIds.clear()\n })\n const close = (id: string) => {\n const next = props.onClose?.(id)\n if (next) schedule(() => refs.get(next)?.focus({ preventScroll: true }))\n }\n return (\n <div\n ref={(el) => {\n root = el\n }}\n role=\"group\"\n aria-label={props.label}\n data-slot=\"split-layout\"\n data-dragging={drag() ? '' : undefined}\n class={cn('relative size-full min-h-0 min-w-0 data-[dragging]:cursor-grabbing', props.class)}\n >\n <For each={leaves().map((leaf) => leaf.id)}>\n {(id) => {\n const initial = leafMap().get(id)!\n const leaf = () => leafMap().get(id) ?? initial\n const content = props.renderLeaf(leaf)\n const paneLabel = props.renderPaneLabel?.(leaf)\n const actions = props.renderPaneActions?.(leaf)\n const intent = () => (drop()?.id === id ? drop()?.intent : undefined)\n onCleanup(() => {\n refs.delete(id)\n domIds.delete(id)\n })\n return (\n <section\n ref={(el) => refs.set(id, el)}\n id={domId(id)}\n role=\"region\"\n aria-label={props.labelForLeaf(leaf())}\n tabIndex={props.paneTabIndex ?? -1}\n data-pane-id={id}\n data-focused={props.state.focusedLeafId === id ? '' : undefined}\n data-drag-source={drag()?.id === id ? '' : undefined}\n data-drop-direction={intent()?.direction}\n data-drop-placement={intent()?.placement}\n onDragOver={(event) => {\n if (!allowedTarget(id, event.dataTransfer)) return\n const next = paneDropIntent(\n event.clientX,\n event.clientY,\n event.currentTarget.getBoundingClientRect()\n )\n if (!next) {\n setDrop(undefined)\n return\n }\n event.preventDefault()\n if (event.dataTransfer) event.dataTransfer.dropEffect = 'move'\n setDrop({ id, intent: next })\n }}\n onDragLeave={(event) => {\n if (\n event.relatedTarget instanceof Node &&\n event.currentTarget.contains(event.relatedTarget)\n )\n return\n if (drop()?.id === id) setDrop(undefined)\n }}\n onDrop={(event) => {\n const current = allowedTarget(id, event.dataTransfer)\n const next = paneDropIntent(\n event.clientX,\n event.clientY,\n event.currentTarget.getBoundingClientRect()\n )\n const accepted =\n current && next && event.dataTransfer?.getData(PANE_DRAG_TYPE) === current.token\n clearDrag()\n if (!accepted) return\n event.preventDefault()\n props.onMove?.(current.id, id, next)\n }}\n style={rectStyle(frames().get(id)?.rect ?? { x: 0, y: 0, width: 0, height: 0 })}\n class=\"absolute flex min-h-0 min-w-0 flex-col overflow-hidden border border-border transition-opacity motion-reduce:transition-none data-[drag-source]:opacity-40 data-[focused]:border-primary bg-background text-foreground focus-visible:outline focus-visible:outline-2 focus-visible:outline-ring\"\n onFocusIn={() => props.onFocus?.(id)}\n >\n <header class=\"flex min-w-0 shrink-0 items-center gap-2 bg-surface px-2\">\n <span\n data-pane-drag-handle=\"\"\n draggable={Boolean(props.onMove)}\n class={cn('flex min-w-0 flex-1 items-center gap-2 truncate text-sm', {\n 'cursor-grab': Boolean(props.onMove),\n 'cursor-grabbing': drag()?.id === id,\n })}\n title={props.onMove ? `Drag ${props.labelForLeaf(leaf())} to move` : undefined}\n onDragStart={(event) => {\n if (!props.onMove || !event.dataTransfer) {\n event.preventDefault()\n return\n }\n const token = `${prefix}-${++nextDragId}`\n setDrag({ id, token })\n event.dataTransfer.setData(PANE_DRAG_TYPE, token)\n event.dataTransfer.effectAllowed = 'move'\n // The native drag image carries this pane's actual content\n // in a bounded floating-window frame; the source recedes\n // independently as the browser follows the image pointer.\n const source = refs.get(id)\n const frame = source?.getBoundingClientRect()\n if (source && frame && typeof event.dataTransfer.setDragImage === 'function') {\n const preview = createDragPreview(source)\n const previewFrame = preview.getBoundingClientRect()\n const scaleX = previewFrame.width / frame.width\n const scaleY = previewFrame.height / frame.height\n event.dataTransfer.setDragImage(\n preview,\n Math.max(0, Math.round((event.clientX - frame.left) * scaleX)),\n Math.max(0, Math.round((event.clientY - frame.top) * scaleY))\n )\n preview.setAttribute('data-native-drag-image', '')\n }\n }}\n onDragEnd={clearDrag}\n >\n {props.onMove ? (\n <GripVertical class=\"size-3 shrink-0\" aria-hidden=\"true\" />\n ) : null}\n <span class=\"min-w-0 flex-1 truncate\">\n {paneLabel ?? props.labelForLeaf(leaf())}\n </span>\n </span>\n {actions}\n {props.onClose ? (\n <ActionButton\n variant=\"ghost\"\n size=\"icon-xs\"\n aria-label={`Close ${props.labelForLeaf(leaf())}`}\n tooltip={`Close ${props.labelForLeaf(leaf())}.`}\n onClick={() => close(id)}\n >\n <X />\n </ActionButton>\n ) : null}\n </header>\n <div class=\"min-h-0 min-w-0 flex-1 overflow-auto\">{content}</div>\n {intent() ? (\n <div\n aria-hidden=\"true\"\n class={cn('pointer-events-none absolute border-2 border-primary bg-primary/10', {\n 'inset-y-0 left-0 w-1/2':\n intent()?.direction === 'row' && intent()?.placement === 'before',\n 'inset-y-0 right-0 w-1/2':\n intent()?.direction === 'row' && intent()?.placement === 'after',\n 'inset-x-0 top-0 h-1/2':\n intent()?.direction === 'column' && intent()?.placement === 'before',\n 'inset-x-0 bottom-0 h-1/2':\n intent()?.direction === 'column' && intent()?.placement === 'after',\n })}\n />\n ) : null}\n </section>\n )\n }}\n </For>\n <span class=\"sr-only\" role=\"status\">\n {dropLabel() ||\n (resizeController() === 'error'\n ? reloadRequired()\n ? 'Resize controls didn’t load. Reloading may lose unsaved pane content.'\n : 'Resize controls did not load.'\n : '')}\n </span>\n <For each={branches().map((branch) => branch.id)}>\n {(id) => {\n const initial = branchMap().get(id)!\n const branch: Accessor<SplitLayoutBranch<L>> = () => branchMap().get(id) ?? initial\n const rect = () => frames().get(id)?.rect ?? { x: 0, y: 0, width: 0, height: 0 }\n return (\n <Show\n when={typeof resizeController() === 'function'}\n fallback={\n <div\n role=\"separator\"\n aria-label={\n props.labelForSeparator?.(branch()) ??\n (branch().direction === 'row' ? 'Resize pane columns' : 'Resize pane rows')\n }\n aria-orientation={branch().direction === 'row' ? 'vertical' : 'horizontal'}\n aria-controls={listLeaves(branch())\n .map((leaf) => domId(leaf.id))\n .join(' ')}\n aria-valuemin={Math.round(MIN_SPLIT_RATIO * 100)}\n aria-valuemax={Math.round(MAX_SPLIT_RATIO * 100)}\n aria-valuenow={Math.round(branch().ratio * 100)}\n aria-disabled=\"true\"\n tabIndex={-1}\n data-direction={branch().direction}\n style={separatorPlaceholderStyle(branch(), rect())}\n class=\"pointer-events-none absolute bg-border\"\n />\n }\n >\n <Dynamic\n component={resizeController() as ResizeController<L>}\n branch={branch}\n rect={() => rectStyle(rect())}\n domId={domId}\n root={() => root}\n labelForSeparator={props.labelForSeparator}\n class={cn(resizeSeparatorClass(), 'pointer-events-auto absolute cursor-pointer')}\n onResize={props.onResize}\n />\n </Show>\n )\n }}\n </For>\n {resizeController() === 'error' ? (\n <div class=\"absolute top-2 right-2 z-(--z-menu) flex max-w-sm flex-col items-end gap-2\">\n {reloadRequired() ? (\n <p\n id={resizeReloadWarningId}\n role=\"alert\"\n class=\"rounded-md border bg-background p-2 text-sm shadow-md\"\n >\n Reloading may discard unsaved pane content.\n </p>\n ) : null}\n <Button\n variant=\"outline\"\n size=\"sm\"\n data-resize-retry\n aria-describedby={reloadRequired() ? resizeReloadWarningId : undefined}\n onClick={(event) => {\n if (reloadRequired()) {\n window.location.reload()\n return\n }\n focusAfterResizeLoad = document.activeElement === event.currentTarget\n setResizeController(undefined)\n }}\n >\n {reloadRequired() ? 'Reload page to retry resizing'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|
|
|
1
|
-
{"version":3,"file":"status-bar.js","names":["
|
|
1
|
+
{"version":3,"file":"status-bar.js","names":["splitProps","cn","StatusBar","props","local","rest","_el$","_tmpl$","_$spread","_$mergeProps","class","StatusBarItem","tone","dot","_el$2","_tmpl$2","undefined","_$insert","_c$","_$memo","_el$3","_tmpl$3","_$effect","_$className","children","StatusBarSpacer","_tmpl$4"],"sources":["../../../../src/components/layout/status-bar/status-bar.tsx"],"sourcesContent":["import type { ComponentProps } from 'solid-js'\nimport { splitProps } from 'solid-js'\nimport { cn } from '#lib/utils'\n\n/**\n * StatusBar.\n *\n * The thin strip pinned to the bottom of the window. Its purpose is to hold\n * *ambient* facts the user checks without acting: connection state, branch,\n * counts, the current mode. Anything interactive belongs in the top bar or a\n * pane — a status bar is read, not operated, and a control here is one the user\n * will not find.\n *\n * Height comes from `--statusbar-height`, so a pane's bottom padding can\n * reserve it without a magic number.\n */\nexport function StatusBar(props: ComponentProps<'footer'>) {\n const [local, rest] = splitProps(props, ['class'])\n\n return (\n <footer\n data-slot=\"status-bar\"\n class={cn(\n 'text-muted-foreground flex h-statusbar shrink-0 items-center gap-3 border-t border-border px-3 text-2xs',\n local.class\n )}\n {...rest}\n />\n )\n}\n\n/** A single readout. `tone` carries meaning; it is not decoration. */\nexport function StatusBarItem(\n props: ComponentProps<'span'> & {\n tone?: 'default' | 'success' | 'warning' | 'destructive'\n /** Draw a leading state dot, e.g. for a connection. */\n dot?: boolean\n }\n) {\n const [local, rest] = splitProps(props, ['class', 'tone', 'dot', 'children'])\n\n return (\n <span\n data-slot=\"status-bar-item\"\n class={cn(\n 'inline-flex shrink-0 items-center gap-1.5 whitespace-nowrap [&_svg]:size-3 [&_svg]:shrink-0',\n {\n 'text-muted-foreground': local.tone === undefined || local.tone === 'default',\n 'text-success': local.tone === 'success',\n 'text-warning': local.tone === 'warning',\n 'text-destructive': local.tone === 'destructive',\n },\n local.class\n )}\n {...rest}\n >\n {local.dot ? (\n <span\n aria-hidden=\"true\"\n class={cn('size-1.5 shrink-0 rounded-full bg-current', {\n 'animate-pulse': local.tone === 'warning',\n })}\n />\n ) : null}\n {local.children}\n </span>\n )\n}\n\n/** Pushes everything after it to the trailing edge. */\nexport function StatusBarSpacer() {\n return <span aria-hidden=\"true\" class=\"flex-1\" />\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAgBA,SAAgBE,UAAUC,OAAiC;CACzD,MAAM,CAACC,OAAOC,QAAQL,WAAWG,OAAO,CAAC,OAAO,CAAC;CAEjD,cAAA;EAAA,IAAAG,OAAAC,OAAA;EAAAC,OAAAF,MAAAG,WAAA,EAAA,KAAA,WAAA;GAAA,OAGWR,GACL,2GACAG,MAAMM,KACR;EAAC,EAAA,GACGL,IAAI,GAAA,OAAA,KAAA;EAAA,OAAAC;CAAA,EAAA,CAAA;AAGd;;AAGA,SAAgBK,cACdR,OAKA;CACA,MAAM,CAACC,OAAOC,QAAQL,WAAWG,OAAO;EAAC;EAAS;EAAQ;EAAO;CAAU,CAAC;CAE5E,cAAA;EAAA,IAAAW,QAAAC,QAAA;EAAAP,OAAAM,OAAAL,WAAA,EAAA,KAAA,WAAA;GAAA,OAGWR,GACL,+FACA;IACE,yBAAyBG,MAAMQ,SAASI,KAAAA,KAAaZ,MAAMQ,SAAS;IACpE,gBAAgBR,MAAMQ,SAAS;IAC/B,gBAAgBR,MAAMQ,SAAS;IAC/B,oBAAoBR,MAAMQ,SAAS;GACrC,GACAR,MAAMM,KACR;EAAC,EAAA,GACGL,IAAI,GAAA,OAAA,IAAA;EAAAY,OAAAH,cAAA;GAAA,IAAAI,MAAAC,WAAA,CAAA,CAEPf,MAAMS,GAAG;GAAA,aAATK,IAAA,WAAA;IAAA,IAAAE,QAAAC,QAAA;IAAAC,aAAAC,UAAAH,OAGUnB,GAAG,6CAA6C,EACrD,iBAAiBG,MAAMQ,SAAS,UAClC,CAAC,CAAC,CAAA;IAAA,OAAAQ;GAAA,EAAA,CAAA,IAEF;EAAI,EAAA,CAAA,GAAA,IAAA;EAAAH,OAAAH,aACPV,MAAMoB,UAAQ,IAAA;EAAA,OAAAV;CAAA,EAAA,CAAA;AAGrB;;AAGA,SAAgBW,kBAAkB;CAChC,OAAAC,QAAA;AACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"top-bar.js","names":["ComponentProps","Show","splitProps","Search","callHandler","cn","windowChromeClass","WindowChromeProps","TopBarProps","centerWidth","TopBar","props","local","rest","_el$","_tmpl$","_$spread","_$mergeProps","class","TopBarSection","align","_el$2","_tmpl$2","$$focusin","event","target","HTMLElement","scrollIntoView","block","inline","onFocusIn","TopBarTitle","_el$3","_tmpl$3","TopBarBreadcrumb","_el$4","_tmpl$4","TopBarSearchProps","placeholder","shortcut","keyshortcuts","TopBarSearch","_el$5","_tmpl$6","_el$6","firstChild","aria-keyshortcuts","_$insert","_$createComponent","when","children","_el$7","_tmpl$5","TopBarPill","label","_el$8","_tmpl$7","_el$9","_$delegateEvents","_$mergeProps","_$createComponent","_$delegateEvents"],"sources":["../../../../src/components/layout/top-bar/top-bar.tsx"],"sourcesContent":["import type { ComponentProps } from 'solid-js'\nimport { Show, splitProps } from 'solid-js'\nimport { Search } from 'lucide-solid'\nimport { callHandler } from '#lib/events'\nimport { cn } from '#lib/utils'\nimport { windowChromeClass, type WindowChromeProps } from './window-chrome'\n\n/**\n * TopBar.\n *\n * The window's title row and primary toolbar. Three tracks: a leading group, a\n * centred search, and a trailing group. On wide screens the search is a fixed\n * function of the window width and the side groups are equal remainders. On\n * narrow screens the middle track yields space to the controls, and each side\n * group scrolls when necessary so keyboard focus can reveal every action.\n *\n * The centre track is sized for a lone search field. A bar whose centre holds\n * more than that, such as a search plus an action beside it, passes\n * `centerWidth=\"wide\"`: the centre then stays fluid below 1280px, with each\n * side group sized to its content but capped between 30% and 40% of the row\n * (a longer group scrolls instead): the cap is 30% on the narrowest rows and\n * grows to 40% as the row widens, so full side groups never squeeze the\n * centre's search out of it and enlarged text never pushes a short leading\n * control such as a navigation toggle out of the row. Above 1280px it takes a\n * wider fixed track.\n *\n * A wide bar also never squeezes its centre to nothing. When the row is\n * narrower than 19rem (measured in rem, so enlarged text reaches it at a wider\n * window) the centre moves to a second row of its own and the two side groups\n * share the first, the trailing group taking the remainder beside the leading\n * group's cap, so the leading and trailing controls and the whole centre each\n * keep a full row instead of fighting for one. The bar grows from one row\n * to two only then. The wide layout places the leading group, centre and\n * trailing group as its first, second and third children.\n *\n * On a frameless desktop window this row is also the drag region, so it carries\n * `window-drag` and the controls inside it opt back out. `macos-inset` and\n * `windows-inset` reserve the space the native window controls occupy, which is\n * why the row can look off-centre in a frameless window and be correct: it is\n * centred in the space the user can actually see.\n */\nexport type TopBarProps = ComponentProps<'header'> &\n WindowChromeProps & {\n /**\n * How wide the centre track is. `field` (default) suits a lone search field.\n * `wide` suits a centre that also holds an action: fluid below 1280px between\n * side groups sized to their content and capped between 30% and 40% of the\n * row (a longer group scrolls), then a clamp of 32vw up to 672px between equal\n * side tracks.\n * Below a 19rem row the centre drops to a second row of its own.\n */\n centerWidth?: 'field' | 'wide'\n }\n\nexport function TopBar(props: TopBarProps) {\n const [local, rest] = splitProps(props, [\n 'class',\n 'draggable',\n 'macosInset',\n 'windowsInset',\n 'glass',\n 'centerWidth',\n ])\n\n return (\n <header\n data-slot=\"top-bar\"\n class={cn(\n 'h-topbar relative z-(--z-sticky) grid shrink-0 grid-cols-[minmax(0,1fr)_auto_minmax(0,1fr)] items-center gap-3 border-b border-border bg-card text-card-foreground md:grid-cols-[minmax(0,1fr)_clamp(240px,22vw,480px)_minmax(0,1fr)]',\n /* The bar is its own container so its children can move to a second\n row by the row's width in rem, which enlarged text shrinks. The\n first row keeps the bar's height (less the 1px bottom border); the\n second only exists when the centre has dropped onto it. */\n local.centerWidth === 'wide' &&\n '@container/top-bar h-auto grid-cols-[fit-content(max(30%,min(40%,calc(50%-3.75rem))))_minmax(0,1fr)_fit-content(max(30%,min(40%,calc(50%-3.75rem))))] grid-rows-[minmax(calc(var(--topbar-height)-1px),auto)] gap-x-2 gap-y-0 md:grid-cols-[fit-content(max(30%,min(40%,calc(50%-3.75rem))))_minmax(0,1fr)_fit-content(max(30%,min(40%,calc(50%-3.75rem))))] xl:grid-cols-[minmax(0,1fr)_clamp(240px,32vw,672px)_minmax(0,1fr)] [&>:nth-child(2)]:@max-[19rem]/top-bar:col-span-full [&>:nth-child(2)]:@max-[19rem]/top-bar:row-start-2 [&>:nth-child(2)]:@max-[19rem]/top-bar:pb-2 [&>:nth-child(3)]:@max-[19rem]/top-bar:col-span-2 [&>:nth-child(3)]:@max-[19rem]/top-bar:col-start-2 [&>:nth-child(3)]:@max-[19rem]/top-bar:row-start-1',\n windowChromeClass(local),\n local.class\n )}\n {...rest}\n />\n )\n}\n\n/** A scrollable side group; equal wide-screen tracks centre the search. */\nexport function TopBarSection(props: ComponentProps<'div'> & { align?: 'start' | 'end' }) {\n const [local, rest] = splitProps(props, ['class', 'align', 'onFocusIn'])\n\n return (\n <div\n data-slot=\"top-bar-section\"\n class={cn(\n 'window-no-drag flex min-w-0 items-center gap-2 overflow-x-auto overflow-y-hidden',\n local.align === 'end' && 'md:justify-end-safe',\n local.align !== 'end' && 'justify-start',\n local.class\n )}\n onFocusIn={(event) => {\n if (event.target instanceof HTMLElement) {\n event.target.scrollIntoView({ block: 'nearest', inline: 'nearest' })\n }\n callHandler(local.onFocusIn, event)\n }}\n {...rest}\n />\n )\n}\n\nexport function TopBarTitle(\n props: ComponentProps<'div'> & {\n /** Aligns text within this slot; it does not position the slot. */\n align?: 'start' | 'center'\n }\n) {\n const [local, rest] = splitProps(props, ['class', 'align'])\n return (\n <div\n data-slot=\"top-bar-title\"\n class={cn(\n /* The title slot sits in the drag region; a link, button or field\n placed in it (a breadcrumb, a view's search) must stay pressable. */\n 'truncate text-sm font-medium [&_:is(a,button,input)]:window-no-drag',\n local.align === 'center' && 'text-center',\n local.class\n )}\n {...rest}\n />\n )\n}\n\n/** A breadcrumb or path readout that yields to the actions when space runs out. */\nexport function TopBarBreadcrumb(props: ComponentProps<'div'>) {\n const [local, rest] = splitProps(props, ['class'])\n return (\n <div\n data-slot=\"top-bar-breadcrumb\"\n class={cn(\n 'flex min-w-0 items-center gap-1.5 text-sm [&_:is(a,button,input)]:window-no-drag',\n local.class\n )}\n {...rest}\n />\n )\n}\n\nexport type TopBarSearchProps = ComponentProps<'button'> & {\n /** The hint shown inside the field, e.g. \"Search projects and files\". */\n placeholder?: string\n /** The shortcut chip drawn at the trailing edge, e.g. \"⌘K\". */\n shortcut?: string\n /**\n * The parseable chord behind `shortcut`, e.g. `Meta+K`. The chip is\n * `aria-hidden` — reading it out would pollute the button's accessible\n * name — so this is what assistive technology announces instead. Supply it\n * whenever `shortcut` is drawn.\n */\n keyshortcuts?: string\n}\n\n/**\n * The search affordance in the middle track.\n *\n * It is a button, not an input, and that is deliberate: clicking it opens the\n * command palette, which already owns the input, the ranking and the keyboard\n * handling. A second live input here would be a second source of truth for the\n * same query. It is styled to read as a field because that is what it behaves\n * like from the user's side.\n */\nexport function TopBarSearch(props: TopBarSearchProps) {\n const [local, rest] = splitProps(props, ['class', 'placeholder', 'shortcut', 'keyshortcuts'])\n\n return (\n <button\n type=\"button\"\n data-slot=\"top-bar-search\"\n class={cn(\n 'text-muted-foreground flex h-control-md w-full min-w-(--control-height-md) items-center justify-center gap-2 rounded-md border border-input px-3 text-sm sm:justify-start',\n 'transition-colors ease-out outline-none',\n 'hover:bg-surface-hover hover:text-foreground',\n 'focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-primary-subtle',\n 'window-no-drag',\n local.class\n )}\n aria-keyshortcuts={local.keyshortcuts}\n {...rest}\n >\n <Search aria-hidden=\"true\" class=\"size-4 shrink-0 sm:hidden\" />\n <span class=\"sr-only sm:not-sr-only sm:truncate\">{local.placeholder ?? 'Search'}</span>\n <Show when={local.shortcut}>\n <kbd\n aria-hidden=\"true\"\n class=\"bg-muted ms-auto hidden h-5 shrink-0 items-center rounded-sm border border-border px-1.5 font-code text-code sm:flex\"\n >\n {local.shortcut}\n </kbd>\n </Show>\n </button>\n )\n}\n\n/**\n * A labelled top-bar control — the readouts KiroCrew puts in the trailing\n * group. Container queries on the group decide which of these survive a narrow\n * window; a caller marks the cheap-to-drop ones and the group handles the rest.\n */\nexport function TopBarPill(props: ComponentProps<'button'> & { label: string }) {\n const [local, rest] = splitProps(props, ['class', 'label', 'children'])\n\n return (\n <button\n type=\"button\"\n data-slot=\"top-bar-pill\"\n class={cn(\n 'text-muted-foreground inline-flex h-control-sm shrink-0 items-center gap-1.5 rounded-md border border-border px-2.5 text-xs font-medium',\n 'transition-colors ease-out outline-none',\n 'hover:border-input hover:text-foreground',\n 'focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-primary-subtle',\n 'window-no-drag [&_svg]:size-3.5 [&_svg]:shrink-0',\n local.class\n )}\n {...rest}\n >\n {local.children}\n <span>{local.label}</span>\n </button>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;AAsDA,SAAgBU,OAAOC,OAAoB;CACzC,MAAM,CAACC,OAAOC,QAAQX,WAAWS,OAAO;EACtC;EACA;EACA;EACA;EACA;EACA;CAAa,CACd;CAED,cAAA;EAAA,IAAAG,OAAAC,OAAA;EAAAC,OAAAF,MAAAG,WAAA,EAAA,KAAA,WAAA;GAAA,OAGWZ,GACL,yOAKAO,MAAMH,gBAAgB,UACpB,+sBACFH,kBAAkBM,KAAK,GACvBA,MAAMM,KACR;EAAC,EAAA,GACGL,IAAI,GAAA,OAAA,KAAA;EAAA,OAAAC;CAAA,EAAA,CAAA;AAGd;;AAGA,SAAgBK,cAAcR,OAA4D;CACxF,MAAM,CAACC,OAAOC,QAAQX,WAAWS,OAAO;EAAC;EAAS;EAAS;CAAW,CAAC;CAEvE,cAAA;EAAA,IAAAU,QAAAC,QAAA;EAAAD,MAAAE,aASgBC,UAAU;GACpB,IAAIA,MAAMC,kBAAkBC,aAC1BF,MAAMC,OAAOE,eAAe;IAAEC,OAAO;IAAWC,QAAQ;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AAA,uBAAA;IAAA,OACkBN,MAAM4B;GAAY;EAAA,GACjC3B,IAAI,GAAA,OAAA,IAAA;EAAAkC,OAAAL,OAAAM,gBAEP7C,QAAM;GAAA,eAAA;GAAA,SAAA;EAAA,CAAA,GAAAyC,KAAA;EAAAG,OAAAH,aAC2ChC,MAAM0B,eAAe,QAAQ;EAAAS,OAAAL,OAAAM,gBAC9E/C,MAAI;GAAA,IAACgD,OAAI;IAAA,OAAErC,MAAM2B;GAAQ;GAAA,IAAAW,WAAA;IAAA,IAAAC,QAAAC,QAAA;IAAAL,OAAAI,aAKrBvC,MAAM2B,QAAQ;IAAA,OAAAY;GAAA;EAAA,CAAA,GAAA,IAAA;EAAA,OAAAT;CAAA,EAAA,CAAA;AAKzB;;;;;;AAOA,SAAgBW,WAAW1C,OAAqD;CAC9E,MAAM,CAACC,OAAOC,QAAQX,WAAWS,OAAO;EAAC;EAAS;EAAS;CAAU,CAAC;CAEtE,cAAA;EAAA,IAAA4C,QAAAC,QAAA,GAAAC,QAAAF,MAAAV;EAAA7B,OAAAuC,OAAAtC,WAAA,EAAA,KAAA,WAAA;GAAA,OAIWZ,GACL,2IACA,2CACA,4CACA,oFACA,oDACAO,MAAMM,KACR;EAAC,EAAA,GACGL,IAAI,GAAA,OAAA,IAAA;EAAAkC,OAAAQ,aAEP3C,MAAMsC,UAAQO,KAAA;EAAAV,OAAAU,aACR7C,MAAM0C,KAAK;EAAA,OAAAC;CAAA,EAAA,CAAA;AAGxB;AAACG,eAAA,CAAA,SAAA,CAAA"}
|
|
1
|
+
{"version":3,"file":"top-bar.js","names":["Show","splitProps","Search","callHandler","cn","windowChromeClass","centerWidth","TopBar","props","local","rest","_el$","_tmpl$","_$spread","_$mergeProps","class","TopBarSection","align","_el$2","_tmpl$2","$$focusin","event","target","HTMLElement","scrollIntoView","block","inline","onFocusIn","TopBarTitle","_el$3","_tmpl$3","TopBarBreadcrumb","_el$4","_tmpl$4","placeholder","shortcut","keyshortcuts","TopBarSearch","_el$5","_tmpl$6","_el$6","firstChild","_$insert","_$createComponent","when","children","_el$7","_tmpl$5","TopBarPill","label","_el$8","_tmpl$7","_el$9","_$delegateEvents"],"sources":["../../../../src/components/layout/top-bar/top-bar.tsx"],"sourcesContent":["import type { ComponentProps } from 'solid-js'\nimport { Show, splitProps } from 'solid-js'\nimport { Search } from 'lucide-solid'\nimport { callHandler } from '#lib/events'\nimport { cn } from '#lib/utils'\nimport { windowChromeClass, type WindowChromeProps } from './window-chrome'\n\n/**\n * TopBar.\n *\n * The window's title row and primary toolbar. Three tracks: a leading group, a\n * centred search, and a trailing group. On wide screens the search is a fixed\n * function of the window width and the side groups are equal remainders. On\n * narrow screens the middle track yields space to the controls, and each side\n * group scrolls when necessary so keyboard focus can reveal every action.\n *\n * The centre track is sized for a lone search field. A bar whose centre holds\n * more than that, such as a search plus an action beside it, passes\n * `centerWidth=\"wide\"`: the centre then stays fluid below 1280px, with each\n * side group sized to its content but capped between 30% and 40% of the row\n * (a longer group scrolls instead): the cap is 30% on the narrowest rows and\n * grows to 40% as the row widens, so full side groups never squeeze the\n * centre's search out of it and enlarged text never pushes a short leading\n * control such as a navigation toggle out of the row. Above 1280px it takes a\n * wider fixed track.\n *\n * A wide bar also never squeezes its centre to nothing. When the row is\n * narrower than 19rem (measured in rem, so enlarged text reaches it at a wider\n * window) the centre moves to a second row of its own and the two side groups\n * share the first, the trailing group taking the remainder beside the leading\n * group's cap, so the leading and trailing controls and the whole centre each\n * keep a full row instead of fighting for one. The bar grows from one row\n * to two only then. The wide layout places the leading group, centre and\n * trailing group as its first, second and third children.\n *\n * On a frameless desktop window this row is also the drag region, so it carries\n * `window-drag` and the controls inside it opt back out. `macos-inset` and\n * `windows-inset` reserve the space the native window controls occupy, which is\n * why the row can look off-centre in a frameless window and be correct: it is\n * centred in the space the user can actually see.\n */\nexport type TopBarProps = ComponentProps<'header'> &\n WindowChromeProps & {\n /**\n * How wide the centre track is. `field` (default) suits a lone search field.\n * `wide` suits a centre that also holds an action: fluid below 1280px between\n * side groups sized to their content and capped between 30% and 40% of the\n * row (a longer group scrolls), then a clamp of 32vw up to 672px between equal\n * side tracks.\n * Below a 19rem row the centre drops to a second row of its own.\n */\n centerWidth?: 'field' | 'wide'\n }\n\nexport function TopBar(props: TopBarProps) {\n const [local, rest] = splitProps(props, [\n 'class',\n 'draggable',\n 'macosInset',\n 'windowsInset',\n 'glass',\n 'centerWidth',\n ])\n\n return (\n <header\n data-slot=\"top-bar\"\n class={cn(\n 'h-topbar relative z-(--z-sticky) grid shrink-0 grid-cols-[minmax(0,1fr)_auto_minmax(0,1fr)] items-center gap-3 border-b border-border bg-card text-card-foreground md:grid-cols-[minmax(0,1fr)_clamp(240px,22vw,480px)_minmax(0,1fr)]',\n /* The bar is its own container so its children can move to a second\n row by the row's width in rem, which enlarged text shrinks. The\n first row keeps the bar's height (less the 1px bottom border); the\n second only exists when the centre has dropped onto it. */\n local.centerWidth === 'wide' &&\n '@container/top-bar h-auto grid-cols-[fit-content(max(30%,min(40%,calc(50%-3.75rem))))_minmax(0,1fr)_fit-content(max(30%,min(40%,calc(50%-3.75rem))))] grid-rows-[minmax(calc(var(--topbar-height)-1px),auto)] gap-x-2 gap-y-0 md:grid-cols-[fit-content(max(30%,min(40%,calc(50%-3.75rem))))_minmax(0,1fr)_fit-content(max(30%,min(40%,calc(50%-3.75rem))))] xl:grid-cols-[minmax(0,1fr)_clamp(240px,32vw,672px)_minmax(0,1fr)] [&>:nth-child(2)]:@max-[19rem]/top-bar:col-span-full [&>:nth-child(2)]:@max-[19rem]/top-bar:row-start-2 [&>:nth-child(2)]:@max-[19rem]/top-bar:pb-2 [&>:nth-child(3)]:@max-[19rem]/top-bar:col-span-2 [&>:nth-child(3)]:@max-[19rem]/top-bar:col-start-2 [&>:nth-child(3)]:@max-[19rem]/top-bar:row-start-1',\n windowChromeClass(local),\n local.class\n )}\n {...rest}\n />\n )\n}\n\n/** A scrollable side group; equal wide-screen tracks centre the search. */\nexport function TopBarSection(props: ComponentProps<'div'> & { align?: 'start' | 'end' }) {\n const [local, rest] = splitProps(props, ['class', 'align', 'onFocusIn'])\n\n return (\n <div\n data-slot=\"top-bar-section\"\n class={cn(\n 'window-no-drag flex min-w-0 items-center gap-2 overflow-x-auto overflow-y-hidden',\n local.align === 'end' && 'md:justify-end-safe',\n local.align !== 'end' && 'justify-start',\n local.class\n )}\n onFocusIn={(event) => {\n if (event.target instanceof HTMLElement) {\n event.target.scrollIntoView({ block: 'nearest', inline: 'nearest' })\n }\n callHandler(local.onFocusIn, event)\n }}\n {...rest}\n />\n )\n}\n\nexport function TopBarTitle(\n props: ComponentProps<'div'> & {\n /** Aligns text within this slot; it does not position the slot. */\n align?: 'start' | 'center'\n }\n) {\n const [local, rest] = splitProps(props, ['class', 'align'])\n return (\n <div\n data-slot=\"top-bar-title\"\n class={cn(\n /* The title slot sits in the drag region; a link, button or field\n placed in it (a breadcrumb, a view's search) must stay pressable. */\n 'truncate text-sm font-medium [&_:is(a,button,input)]:window-no-drag',\n local.align === 'center' && 'text-center',\n local.class\n )}\n {...rest}\n />\n )\n}\n\n/** A breadcrumb or path readout that yields to the actions when space runs out. */\nexport function TopBarBreadcrumb(props: ComponentProps<'div'>) {\n const [local, rest] = splitProps(props, ['class'])\n return (\n <div\n data-slot=\"top-bar-breadcrumb\"\n class={cn(\n 'flex min-w-0 items-center gap-1.5 text-sm [&_:is(a,button,input)]:window-no-drag',\n local.class\n )}\n {...rest}\n />\n )\n}\n\nexport type TopBarSearchProps = ComponentProps<'button'> & {\n /** The hint shown inside the field, e.g. \"Search projects and files\". */\n placeholder?: string\n /** The shortcut chip drawn at the trailing edge, e.g. \"⌘K\". */\n shortcut?: string\n /**\n * The parseable chord behind `shortcut`, e.g. `Meta+K`. The chip is\n * `aria-hidden` — reading it out would pollute the button's accessible\n * name — so this is what assistive technology announces instead. Supply it\n * whenever `shortcut` is drawn.\n */\n keyshortcuts?: string\n}\n\n/**\n * The search affordance in the middle track.\n *\n * It is a button, not an input, and that is deliberate: clicking it opens the\n * command palette, which already owns the input, the ranking and the keyboard\n * handling. A second live input here would be a second source of truth for the\n * same query. It is styled to read as a field because that is what it behaves\n * like from the user's side.\n */\nexport function TopBarSearch(props: TopBarSearchProps) {\n const [local, rest] = splitProps(props, ['class', 'placeholder', 'shortcut', 'keyshortcuts'])\n\n return (\n <button\n type=\"button\"\n data-slot=\"top-bar-search\"\n class={cn(\n 'text-muted-foreground flex h-control-md w-full min-w-(--control-height-md) items-center justify-center gap-2 rounded-md border border-input px-3 text-sm sm:justify-start',\n 'transition-colors ease-out outline-none',\n 'hover:bg-surface-hover hover:text-foreground',\n 'focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-primary-subtle',\n 'window-no-drag',\n local.class\n )}\n aria-keyshortcuts={local.keyshortcuts}\n {...rest}\n >\n <Search aria-hidden=\"true\" class=\"size-4 shrink-0 sm:hidden\" />\n <span class=\"sr-only sm:not-sr-only sm:truncate\">{local.placeholder ?? 'Search'}</span>\n <Show when={local.shortcut}>\n <kbd\n aria-hidden=\"true\"\n class=\"bg-muted ms-auto hidden h-5 shrink-0 items-center rounded-sm border border-border px-1.5 font-code text-code sm:flex\"\n >\n {local.shortcut}\n </kbd>\n </Show>\n </button>\n )\n}\n\n/**\n * A labelled top-bar control — the readouts KiroCrew puts in the trailing\n * group. Container queries on the group decide which of these survive a narrow\n * window; a caller marks the cheap-to-drop ones and the group handles the rest.\n */\nexport function TopBarPill(props: ComponentProps<'button'> & { label: string }) {\n const [local, rest] = splitProps(props, ['class', 'label', 'children'])\n\n return (\n <button\n type=\"button\"\n data-slot=\"top-bar-pill\"\n class={cn(\n 'text-muted-foreground inline-flex h-control-sm shrink-0 items-center gap-1.5 rounded-md border border-border px-2.5 text-xs font-medium',\n 'transition-colors ease-out outline-none',\n 'hover:border-input hover:text-foreground',\n 'focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-primary-subtle',\n 'window-no-drag [&_svg]:size-3.5 [&_svg]:shrink-0',\n local.class\n )}\n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C,QAAQT,WAAWO,OAAO;EAAC;EAAS;EAAS;CAAU,CAAC;CAEtE,cAAA;EAAA,IAAA0C,QAAAC,QAAA,GAAAC,QAAAF,MAAAT;EAAA5B,OAAAqC,OAAApC,WAAA,EAAA,KAAA,WAAA;GAAA,OAIWV,GACL,2IACA,2CACA,4CACA,oFACA,oDACAK,MAAMM,KACR;EAAC,EAAA,GACGL,IAAI,GAAA,OAAA,IAAA;EAAAgC,OAAAQ,aAEPzC,MAAMoC,UAAQO,KAAA;EAAAV,OAAAU,aACR3C,MAAMwC,KAAK;EAAA,OAAAC;CAAA,EAAA,CAAA;AAGxB;AAACG,eAAA,CAAA,SAAA,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"virtual-window.js","names":["
|
|
1
|
+
{"version":3,"file":"virtual-window.js","names":["splitProps","cn","style","totalSize","offset","contentClass","children","finitePixels","value","Number","isFinite","VirtualWindow","props","local","rest","_el$","_tmpl$","_el$2","firstChild","_$spread","_$mergeProps","class","height","Math","max","_$insert","_$effect","_p$","_v$","_v$2","e","_$className","t","_$setStyleProperty","undefined"],"sources":["../../../../src/components/layout/virtual-window/virtual-window.tsx"],"sourcesContent":["import type { ComponentProps, JSX } from 'solid-js'\nimport { splitProps } from 'solid-js'\nimport { cn } from '#lib/utils'\n\n/**\n * VirtualWindow.\n *\n * Supplies the two geometry wrappers a virtualized viewport needs: a full-height\n * scroll space and a translated window containing the mounted rows. The caller\n * owns the scroll region, its semantics, keyboard model, and range calculation;\n * this component only keeps those rows at their measured position.\n */\nexport type VirtualWindowProps = Omit<ComponentProps<'div'>, 'children' | 'style'> & {\n /** JSX style props are owned by this geometry primitive. */\n style?: never\n /** The full scrollable height, in pixels. */\n totalSize: number\n /** The mounted window's top offset from the start of the full list, in pixels. */\n offset?: number\n /** Optional layout classes for the translated row container. */\n contentClass?: string\n children?: JSX.Element\n}\n\nfunction finitePixels(value: number): string {\n return `${Number.isFinite(value) ? value : 0}px`\n}\n\nexport function VirtualWindow(props: VirtualWindowProps) {\n const [local, rest] = splitProps(props, [\n 'class',\n 'children',\n 'totalSize',\n 'offset',\n 'contentClass',\n 'style',\n ])\n\n return (\n <div\n {...rest}\n data-slot=\"virtual-window-space\"\n class={cn('relative', local.class)}\n style={{ height: finitePixels(Math.max(0, local.totalSize)) }}\n >\n <div\n data-slot=\"virtual-window-content\"\n class={local.contentClass}\n style={{ transform: `translateY(${finitePixels(local.offset ?? 0)})` }}\n >\n {local.children}\n </div>\n </div>\n )\n}\n"],"mappings":";;;;;AAwBA,SAASO,aAAaC,OAAuB;CAC3C,OAAO,GAAGC,OAAOC,SAASF,KAAK,IAAIA,QAAQ,EAAC;AAC9C;AAEA,SAAgBG,cAAcC,OAA2B;CACvD,MAAM,CAACC,OAAOC,QAAQd,WAAWY,OAAO;EACtC;EACA;EACA;EACA;EACA;EACA;CAAO,CACR;CAED,cAAA;EAAA,IAAAG,OAAAC,OAAA,GAAAC,QAAAF,KAAAG;EAAAC,OAAAJ,MAAAK,WAEQN,MAAI;GAAA,aACE;GAAsB,KAAA,WAAA;IAAA,OACzBb,GAAG,YAAYY,MAAMQ,KAAK;GAAC;GAAA,IAClCnB,QAAK;IAAA,OAAE,EAAEoB,QAAQf,aAAagB,KAAKC,IAAI,GAAGX,MAAMV,SAAS,CAAC,EAAE;GAAC;EAAA,CAAA,GAAA,OAAA,IAAA;EAAAsB,OAAAR,aAO1DJ,MAAMP,QAAQ;EAAAoB,QAAAC,QAAA;GAAA,IAAAC,MAHRf,MAAMR,cAAYwB,OACL,cAActB,aAAaM,MAAMT,UAAU,CAAC,EAAC;GAAGwB,QAAAD,IAAAG,KAAAC,UAAAd,OAAAU,IAAAG,IAAAF,GAAA;GAAAC,SAAAF,IAAAK,KAAAC,iBAAAhB,OAAA,aAAAU,IAAAK,IAAAH,IAAA;GAAA,OAAAF;EAAA,GAAA;GAAAG,GAAAI,KAAAA;GAAAF,GAAAE,KAAAA;EAAA,CAAA;EAAA,OAAAnB;CAAA,EAAA,CAAA;AAM5E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"presence.js","names":["
|
|
1
|
+
{"version":3,"file":"presence.js","names":["Presence","MotionPresence"],"sources":["../../../src/components/motion/presence.tsx"],"sourcesContent":["import type { ComponentProps, JSX } from 'solid-js'\nimport { Presence as MotionPresence } from 'solid-motionone'\n\n/**\n * Presence.\n *\n * Enter and exit animation with a guarantee the CSS approach cannot make: an exit\n * that is **interrupted** — a menu reopened while it is still closing — returns the\n * element to its shown state instead of finishing the close and then reopening,\n * which is what a class-based `animate-out` does and what makes a fast user's\n * interactions feel like the interface is lagging behind them.\n *\n * The design system uses CSS transitions for state changes (a hover, a press) and\n * this for mounting and unmounting, which is the split that keeps the common case\n * free of a runtime while making the rare case correct.\n *\n * <Presence exitBeforeEnter>\n * <Show when={open()}>\n * <Motion.div\n * initial={{ opacity: 0, scale: 0.96 }}\n * animate={{ opacity: 1, scale: 1 }}\n * exit={{ opacity: 0, scale: 0.96 }}\n * >\n * …\n * </Motion.div>\n * </Show>\n * </Presence>\n *\n * `Presence` goes *outside* the condition: it has to outlive the `<Show>`'s child\n * to keep that child mounted until its exit finishes. It takes only two booleans —\n * `initial={false}` skips the enter animation on first render, `exitBeforeEnter`\n * holds a replacement back until the outgoing element has left. The animation\n * itself lives on the `Motion.*` element, which must be the direct child of the\n * condition for its `exit` to run.\n */\nexport type PresenceProps = ComponentProps<typeof MotionPresence> & {\n children?: JSX.Element\n}\n\nexport const Presence: (props: PresenceProps) => JSX.Element = MotionPresence\n"],"mappings":";;AAuCA,IAAaA,aAAkDC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"appearance-panel.js","names":["ComponentProps","Show","onMount","splitProps","RadioGroup","Radio","accentPresets","isPresetAccentId","DEFAULT_APPEARANCE_EDITOR_FONT_SETTINGS","THEME_DEFAULT_ID","ThemeAppearance","ThemeVariant","cn","AccentSwatchGroups","AppearanceFontSettingsGroup","RadioGroupItem","ThemePicker","useTheme","Heading","AppearancePanelProps","AppearancePanel","props","local","rest","context","selection","setSelection","resolvedAppearance","themeAccents","loadCatalogue","themesFor","appearance","themes","filter","variant","selectedAccent","accent","some","option","id","_el$","_tmpl$","_el$2","firstChild","_el$3","_el$4","_el$5","nextSibling","_el$6","_el$7","_el$8","_el$9","_el$0","_$spread","_$mergeProps","class","_$insert","_$createComponent","as","size","children","value","onChange","label","description","when","ThemeSection","title","selectedId","lightThemeId","onThemeSelect","theme","darkThemeId","orientation","accentOptions","themeDefaultColor","settings","fonts","_el$1","_tmpl$2","_el$10","_el$11","_$mergeProps","_$createComponent","RadioGroup","Radio"],"sources":["../../../src/components/theme/appearance-panel.tsx"],"sourcesContent":["import type { ComponentProps } from 'solid-js'\nimport { Show, onMount, splitProps } from 'solid-js'\nimport { RadioGroup as Radio } from '@kobalte/core/radio-group'\nimport { accentPresets, isPresetAccentId } from '#lib/accent-presets'\nimport { DEFAULT_APPEARANCE_EDITOR_FONT_SETTINGS } from '#lib/appearance-font-settings'\nimport { THEME_DEFAULT_ID } from '#lib/theme-defaults'\nimport type { ThemeAppearance, ThemeVariant } from '#lib/theme-types'\nimport { cn } from '#lib/utils'\n// Direct modules, not the appearance-editor barrel, which would load the whole\n// editor, its sheet and its switch into every theme import (lint allows these two).\nimport { AccentSwatchGroups } from '../composites/appearance-editor/accent-swatch-groups'\nimport { AppearanceFontSettingsGroup } from '../composites/appearance-editor/font-settings-group'\nimport { RadioGroup, RadioGroupItem } from '../ui/radio-group'\nimport { ThemePicker } from './theme-picker'\nimport { useTheme } from './theme-context'\nimport { Heading } from '../ui/typography'\n\n/**\n * AppearancePanel.\n *\n * The appearance page, as a component rather than as a screen each application\n * draws for itself. Two applications that both let a user choose a theme should\n * offer the *same* choices in the *same* arrangement — otherwise \"Adea\" and\n * \"Cortana\" are two products that happen to share a component library, which is\n * the opposite of what this system is for.\n *\n * Four axes, in the order a user thinks about them:\n *\n * 1. **Appearance** — light, dark, or follow the system.\n * 2. **Themes** — one for each appearance. Both are shown at once, because the\n * choice is per-appearance and hiding the other half makes it feel like one\n * setting that keeps changing.\n * 3. **Accent** — adea's presets, then the accents the selected theme pair\n * carries itself, layered on whichever theme is active.\n * 4. **Fonts** — separate families and sizes for interface, content and code.\n *\n * The panel reads and writes the provider's preference and keeps no state of its\n * own, so it cannot disagree with what is applied. Its themes are the provider's, so\n * under the lazy provider it asks for the catalogue when it mounts and lists the rest\n * when it arrives.\n */\nexport type AppearancePanelProps = ComponentProps<'div'>\n\nexport function AppearancePanel(props: AppearancePanelProps) {\n const [local, rest] = splitProps(props, ['class'])\n const context = useTheme()\n const { selection, setSelection, resolvedAppearance, themeAccents } = context\n onMount(() => void context.loadCatalogue?.())\n const themesFor = (appearance: ThemeAppearance) =>\n context.themes.filter((variant) => variant.appearance === appearance)\n const selectedAccent = () => {\n const accent = selection().accent\n return accent === THEME_DEFAULT_ID ||\n isPresetAccentId(accent) ||\n themeAccents().some((option) => option.id === accent)\n ? accent\n : THEME_DEFAULT_ID\n }\n\n return (\n <div data-slot=\"appearance-panel\" class={cn('flex flex-col gap-8', local.class)} {...rest}>\n {/* --- 1. Appearance ------------------------------------------------- */}\n <section class=\"flex flex-col gap-3\">\n <header class=\"flex flex-col gap-0.5\">\n <Heading as=\"h2\" size=\"card\">\n Appearance\n </Heading>\n <p class=\"max-w-prose text-sm text-muted-foreground\">\n Follow the system, or pin one. Each appearance keeps its own theme.\n </p>\n </header>\n <RadioGroup\n value={selection().appearance}\n onChange={(value) => setSelection({ appearance: value as 'light' | 'dark' | 'system' })}\n aria-label=\"Appearance\"\n >\n <RadioGroupItem value=\"light\" label=\"Light\" description=\"Always the light theme.\" />\n <RadioGroupItem value=\"dark\" label=\"Dark\" description=\"Always the dark theme.\" />\n <RadioGroupItem\n value=\"system\"\n label=\"Match the system\"\n description={`Currently resolving to ${resolvedAppearance()}.`}\n />\n </RadioGroup>\n </section>\n\n {/* --- 2. Themes ------------------------------------------------------ */}\n <Show when={resolvedAppearance() === 'light'}>\n <ThemeSection\n title=\"Light theme\"\n description=\"Shown when the appearance resolves to light.\"\n themes={themesFor('light')}\n selectedId={selection().lightThemeId}\n onThemeSelect={(theme) => setSelection({ lightThemeId: theme.id })}\n />\n </Show>\n <Show when={resolvedAppearance() === 'dark'}>\n <ThemeSection\n title=\"Dark theme\"\n description=\"Shown when the appearance resolves to dark.\"\n themes={themesFor('dark')}\n selectedId={selection().darkThemeId}\n onThemeSelect={(theme) => setSelection({ darkThemeId: theme.id })}\n />\n </Show>\n\n {/* --- 3. Accent ------------------------------------------------------ */}\n <section class=\"flex flex-col gap-3\">\n <header class=\"flex flex-col gap-0.5\">\n <Heading as=\"h2\" size=\"card\">\n Accent\n </Heading>\n <p class=\"max-w-prose text-sm text-muted-foreground\">\n Colours the interactive roles — the primary button, the focus ring, a selected row — on\n top of the theme above — one of the presets, or a colour the theme carries itself. Every\n option is measured against the surface it lands on, so none of them can make a label\n unreadable.\n </p>\n </header>\n <Radio\n value={selectedAccent()}\n onChange={(accent) => setSelection({ accent })}\n orientation=\"horizontal\"\n aria-label=\"Accent\"\n class=\"flex flex-col items-start gap-3\"\n >\n <AccentSwatchGroups\n accentOptions={accentPresets}\n resolvedAppearance={resolvedAppearance()}\n themeDefaultColor=\"var(--primary)\"\n />\n </Radio>\n </section>\n\n {/* --- 4. Fonts ------------------------------------------------------- */}\n <section class=\"flex flex-col gap-3\">\n <header class=\"flex flex-col gap-0.5\">\n <Heading as=\"h2\" size=\"card\">\n Fonts\n </Heading>\n <p class=\"max-w-prose text-sm text-muted-foreground\">\n Interface, reading and code fonts.\n </p>\n </header>\n <AppearanceFontSettingsGroup\n settings={selection().fonts ?? DEFAULT_APPEARANCE_EDITOR_FONT_SETTINGS}\n onChange={(fonts) => setSelection({ fonts })}\n />\n </section>\n </div>\n )\n}\n\nfunction ThemeSection(props: {\n title: string\n description: string\n themes: readonly ThemeVariant[]\n selectedId: string\n onThemeSelect: (theme: ThemeVariant) => void\n}) {\n return (\n <section class=\"flex flex-col gap-3\">\n <header class=\"flex flex-col gap-0.5\">\n <Heading as=\"h2\" size=\"card\">\n {props.title}\n </Heading>\n <p class=\"max-w-prose text-sm text-muted-foreground\">{props.description}</p>\n </header>\n <ThemePicker\n themes={props.themes}\n selectedId={props.selectedId}\n onThemeSelect={props.onThemeSelect}\n />\n </section>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;AA2CA,SAAgBoB,gBAAgBC,OAA6B;CAC3D,MAAM,CAACC,OAAOC,QAAQpB,WAAWkB,OAAO,CAAC,OAAO,CAAC;CACjD,MAAMG,UAAUP,SAAS;CACzB,MAAM,EAAEQ,WAAWC,cAAcC,oBAAoBC,iBAAiBJ;CACtEtB,cAAc,KAAKsB,QAAQK,gBAAgB,CAAC;CAC5C,MAAMC,aAAaC,eACjBP,QAAQQ,OAAOC,QAAQC,YAAYA,QAAQH,eAAeA,UAAU;CACtE,MAAMI,uBAAuB;EAC3B,MAAMC,SAASX,UAAU,CAAC,CAACW;EAC3B,OAAOA,WAAAA,WACL7B,iBAAiB6B,MAAM,KACvBR,aAAa,CAAC,CAACS,MAAMC,WAAWA,OAAOC,OAAOH,MAAM,IAClDA,SACA3B;CACN;CAEA,cAAA;EAAA,IAAA+B,OAAAC,OAAA,GAAAC,QAAAF,KAAAG,YAAAC,QAAAF,MAAAC,YAAAE,QAAAD,MAAAD,YAAAG,QAAAJ,MAAAK,aAAAC,QAAAF,MAAAH,YAAAM,QAAAD,MAAAL,YAAAO,QAAAJ,MAAAC,aAAAI,QAAAD,MAAAP,YAAAS,QAAAD,MAAAR;EAAAU,OAAAb,MAAAc,WAAA,EAAA,KAAA,WAAA;GAAA,OAC2C1C,GAAG,uBAAuBU,MAAMiC,KAAK;EAAC,EAAA,GAAMhC,IAAI,GAAA,OAAA,IAAA;EAAAiC,OAAAZ,OAAAa,gBAIlFvC,SAAO;GAACwC,IAAE;GAAMC,MAAI;GAAAC,UAAA;EAAA,CAAA,GAAAf,KAAA;EAAAW,OAAAd,O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OAAE/C,MAAM+C;GAAU;GAAA,IAC5BE,gBAAa;IAAA,OAAEjD,MAAMiD;GAAa;EAAA,CAAA,GAAA,IAAA;EAAA,OAAAQ;CAAA,EAAA,CAAA;AAI1C"}
|
|
1
|
+
{"version":3,"file":"appearance-panel.js","names":["Show","onMount","splitProps","RadioGroup","Radio","accentPresets","isPresetAccentId","DEFAULT_APPEARANCE_EDITOR_FONT_SETTINGS","THEME_DEFAULT_ID","cn","AccentSwatchGroups","AppearanceFontSettingsGroup","RadioGroupItem","ThemePicker","useTheme","Heading","AppearancePanel","props","local","rest","context","selection","setSelection","resolvedAppearance","themeAccents","loadCatalogue","themesFor","appearance","themes","filter","variant","selectedAccent","accent","some","option","id","_el$","_tmpl$","_el$2","firstChild","_el$3","_el$4","_el$5","nextSibling","_el$6","_el$7","_el$8","_el$9","_el$0","_$spread","_$mergeProps","class","_$insert","_$createComponent","as","size","children","value","onChange","label","description","when","ThemeSection","title","selectedId","lightThemeId","onThemeSelect","theme","darkThemeId","orientation","accentOptions","themeDefaultColor","settings","fonts","_el$1","_tmpl$2","_el$10","_el$11"],"sources":["../../../src/components/theme/appearance-panel.tsx"],"sourcesContent":["import type { ComponentProps } from 'solid-js'\nimport { Show, onMount, splitProps } from 'solid-js'\nimport { RadioGroup as Radio } from '@kobalte/core/radio-group'\nimport { accentPresets, isPresetAccentId } from '#lib/accent-presets'\nimport { DEFAULT_APPEARANCE_EDITOR_FONT_SETTINGS } from '#lib/appearance-font-settings'\nimport { THEME_DEFAULT_ID } from '#lib/theme-defaults'\nimport type { ThemeAppearance, ThemeVariant } from '#lib/theme-types'\nimport { cn } from '#lib/utils'\n// Direct modules, not the appearance-editor barrel, which would load the whole\n// editor, its sheet and its switch into every theme import (lint allows these two).\nimport { AccentSwatchGroups } from '../composites/appearance-editor/accent-swatch-groups'\nimport { AppearanceFontSettingsGroup } from '../composites/appearance-editor/font-settings-group'\nimport { RadioGroup, RadioGroupItem } from '../ui/radio-group'\nimport { ThemePicker } from './theme-picker'\nimport { useTheme } from './theme-context'\nimport { Heading } from '../ui/typography'\n\n/**\n * AppearancePanel.\n *\n * The appearance page, as a component rather than as a screen each application\n * draws for itself. Two applications that both let a user choose a theme should\n * offer the *same* choices in the *same* arrangement — otherwise \"Adea\" and\n * \"Cortana\" are two products that happen to share a component library, which is\n * the opposite of what this system is for.\n *\n * Four axes, in the order a user thinks about them:\n *\n * 1. **Appearance** — light, dark, or follow the system.\n * 2. **Themes** — one for each appearance. Both are shown at once, because the\n * choice is per-appearance and hiding the other half makes it feel like one\n * setting that keeps changing.\n * 3. **Accent** — adea's presets, then the accents the selected theme pair\n * carries itself, layered on whichever theme is active.\n * 4. **Fonts** — separate families and sizes for interface, content and code.\n *\n * The panel reads and writes the provider's preference and keeps no state of its\n * own, so it cannot disagree with what is applied. Its themes are the provider's, so\n * under the lazy provider it asks for the catalogue when it mounts and lists the rest\n * when it arrives.\n */\nexport type AppearancePanelProps = ComponentProps<'div'>\n\nexport function AppearancePanel(props: AppearancePanelProps) {\n const [local, rest] = splitProps(props, ['class'])\n const context = useTheme()\n const { selection, setSelection, resolvedAppearance, themeAccents } = context\n onMount(() => void context.loadCatalogue?.())\n const themesFor = (appearance: ThemeAppearance) =>\n context.themes.filter((variant) => variant.appearance === appearance)\n const selectedAccent = () => {\n const accent = selection().accent\n return accent === THEME_DEFAULT_ID ||\n isPresetAccentId(accent) ||\n themeAccents().some((option) => option.id === accent)\n ? accent\n : THEME_DEFAULT_ID\n }\n\n return (\n <div data-slot=\"appearance-panel\" class={cn('flex flex-col gap-8', local.class)} {...rest}>\n {/* --- 1. Appearance ------------------------------------------------- */}\n <section class=\"flex flex-col gap-3\">\n <header class=\"flex flex-col gap-0.5\">\n <Heading as=\"h2\" size=\"card\">\n Appearance\n </Heading>\n <p class=\"max-w-prose text-sm text-muted-foreground\">\n Follow the system, or pin one. Each appearance keeps its own theme.\n </p>\n </header>\n <RadioGroup\n value={selection().appearance}\n onChange={(value) => setSelection({ appearance: value as 'light' | 'dark' | 'system' })}\n aria-label=\"Appearance\"\n >\n <RadioGroupItem value=\"light\" label=\"Light\" description=\"Always the light theme.\" />\n <RadioGroupItem value=\"dark\" label=\"Dark\" description=\"Always the dark theme.\" />\n <RadioGroupItem\n value=\"system\"\n label=\"Match the system\"\n description={`Currently resolving to ${resolvedAppearance()}.`}\n />\n </RadioGroup>\n </section>\n\n {/* --- 2. Themes ------------------------------------------------------ */}\n <Show when={resolvedAppearance() === 'light'}>\n <ThemeSection\n title=\"Light theme\"\n description=\"Shown when the appearance resolves to light.\"\n themes={themesFor('light')}\n selectedId={selection().lightThemeId}\n onThemeSelect={(theme) => setSelection({ lightThemeId: theme.id })}\n />\n </Show>\n <Show when={resolvedAppearance() === 'dark'}>\n <ThemeSection\n title=\"Dark theme\"\n description=\"Shown when the appearance resolves to dark.\"\n themes={themesFor('dark')}\n selectedId={selection().darkThemeId}\n onThemeSelect={(theme) => setSelection({ darkThemeId: theme.id })}\n />\n </Show>\n\n {/* --- 3. Accent ------------------------------------------------------ */}\n <section class=\"flex flex-col gap-3\">\n <header class=\"flex flex-col gap-0.5\">\n <Heading as=\"h2\" size=\"card\">\n Accent\n </Heading>\n <p class=\"max-w-prose text-sm text-muted-foreground\">\n Colours the interactive roles — the primary button, the focus ring, a selected row — on\n top of the theme above — one of the presets, or a colour the theme carries itself. Every\n option is measured against the surface it lands on, so none of them can make a label\n unreadable.\n </p>\n </header>\n <Radio\n value={selectedAccent()}\n onChange={(accent) => setSelection({ accent })}\n orientation=\"horizontal\"\n aria-label=\"Accent\"\n class=\"flex flex-col items-start gap-3\"\n >\n <AccentSwatchGroups\n accentOptions={accentPresets}\n resolvedAppearance={resolvedAppearance()}\n themeDefaultColor=\"var(--primary)\"\n />\n </Radio>\n </section>\n\n {/* --- 4. Fonts ------------------------------------------------------- */}\n <section class=\"flex flex-col gap-3\">\n <header class=\"flex flex-col gap-0.5\">\n <Heading as=\"h2\" size=\"card\">\n Fonts\n </Heading>\n <p class=\"max-w-prose text-sm text-muted-foreground\">\n Interface, reading and code fonts.\n </p>\n </header>\n <AppearanceFontSettingsGroup\n settings={selection().fonts ?? DEFAULT_APPEARANCE_EDITOR_FONT_SETTINGS}\n onChange={(fonts) => setSelection({ fonts })}\n />\n </section>\n </div>\n )\n}\n\nfunction ThemeSection(props: {\n title: string\n description: string\n themes: readonly ThemeVariant[]\n selectedId: string\n onThemeSelect: (theme: ThemeVariant) => void\n}) {\n return (\n <section class=\"flex flex-col gap-3\">\n <header class=\"flex flex-col gap-0.5\">\n <Heading as=\"h2\" size=\"card\">\n {props.title}\n </Heading>\n <p class=\"max-w-prose text-sm text-muted-foreground\">{props.description}</p>\n </header>\n <ThemePicker\n themes={props.themes}\n selectedId={props.selectedId}\n onThemeSelect={props.onThemeSelect}\n />\n </section>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;AA2CA,SAAgBgB,gBAAgBC,OAA6B;CAC3D,MAAM,CAACC,OAAOC,QAAQjB,WAAWe,OAAO,CAAC,OAAO,CAAC;CACjD,MAAMG,UAAUN,SAAS;CACzB,MAAM,EAAEO,WAAWC,cAAcC,oBAAoBC,iBAAiBJ;CACtEnB,cAAc,KAAKmB,QAAQK,gBAAgB,CAAC;CAC5C,MAAMC,aAAaC,eACjBP,QAAQQ,OAAOC,QAAQC,YAAYA,QAAQH,eAAeA,UAAU;CACtE,MAAMI,uBAAuB;EAC3B,MAAMC,SAASX,UAAU,CAAC,CAACW;EAC3B,OAAOA,WAAAA,WACL1B,iBAAiB0B,MAAM,KACvBR,aAAa,CAAC,CAACS,MAAMC,WAAWA,OAAOC,OAAOH,MAAM,IAClDA,SACAxB;CACN;CAEA,cAAA;EAAA,IAAA4B,OAAAC,OAAA,GAAAC,QAAAF,KAAAG,YAAAC,QAAAF,MAAAC,YAAAE,QAAAD,MAAAD,YAAAG,QAAAJ,MAAAK,aAAAC,QAAAF,MAAAH,YAAAM,QAAAD,MAAAL,YAAAO,QAAAJ,MAAAC,aAAAI,QAAAD,MAAAP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AAAwB,QAAAvB,gBAGOtC,SAAO;GAACuC,IAAE;GAAMC,MAAI;GAAA,IAAAC,WAAA;IAAA,OAClBvC,MAAM8C;GAAK;EAAA,CAAA,GAAAc,MAAA;EAAAzB,OAAAyB,cAEwC5D,MAAM2C,WAAW;EAAAR,OAAAsB,OAAArB,gBAExExC,aAAW;GAAA,IACVe,SAAM;IAAA,OAAEX,MAAMW;GAAM;GAAA,IACpBoC,aAAU;IAAA,OAAE/C,MAAM+C;GAAU;GAAA,IAC5BE,gBAAa;IAAA,OAAEjD,MAAMiD;GAAa;EAAA,CAAA,GAAA,IAAA;EAAA,OAAAQ;CAAA,EAAA,CAAA;AAI1C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme-mode-toggle.js","names":["Monitor","Moon","Sun","
|
|
1
|
+
{"version":3,"file":"theme-mode-toggle.js","names":["Monitor","Moon","Sun","For","splitProps","ToggleGroup","ToggleGroupItem","Tooltip","TooltipContent","TooltipTrigger","APPEARANCES","value","label","icon","mode","onModeChange","withLabels","ThemeModeToggle","props","local","rest","_$createComponent","_$mergeProps","attached","multiple","onChange","option","find","candidate","children","each","appearance","as","variant","size","_$memo","_el$","_tmpl$","_$insert","toLowerCase"],"sources":["../../../src/components/theme/theme-mode-toggle.tsx"],"sourcesContent":["import { Monitor, Moon, Sun } from 'lucide-solid'\nimport type { ComponentProps } from 'solid-js'\nimport { For, splitProps } from 'solid-js'\nimport { ToggleGroup, ToggleGroupItem } from '../ui/toggle-group'\nimport { Tooltip, TooltipContent, TooltipTrigger } from '../ui/tooltip'\n\nconst APPEARANCES = [\n { value: 'light', label: 'Light', icon: Sun },\n { value: 'dark', label: 'Dark', icon: Moon },\n { value: 'system', label: 'System', icon: Monitor },\n] as const\n\n/** Controlled appearance selection for hosts that own their preference storage. */\nexport type ThemeModeToggleProps = Omit<\n ComponentProps<typeof ToggleGroup>,\n 'children' | 'value' | 'onChange' | 'multiple'\n> & {\n mode: 'light' | 'dark' | 'system'\n onModeChange: (mode: 'light' | 'dark' | 'system') => void\n withLabels?: boolean\n}\n\nexport function ThemeModeToggle(props: ThemeModeToggleProps) {\n const [local, rest] = splitProps(props, ['mode', 'onModeChange', 'withLabels'])\n return (\n <ToggleGroup\n {...rest}\n attached\n multiple={false}\n value={local.mode}\n onChange={(value: string | null) => {\n const option = APPEARANCES.find((candidate) => candidate.value === value)\n if (option) local.onModeChange(option.value)\n }}\n aria-label={rest['aria-label'] ?? 'Appearance'}\n >\n <For each={APPEARANCES}>\n {(appearance) => (\n <Tooltip>\n <TooltipTrigger\n as={ToggleGroupItem}\n value={appearance.value}\n variant=\"outline\"\n size={local.withLabels ? 'sm' : 'icon-sm'}\n aria-label={appearance.label}\n >\n <appearance.icon aria-hidden=\"true\" />\n {local.withLabels ? <span>{appearance.label}</span> : null}\n </TooltipTrigger>\n <TooltipContent>Use {appearance.label.toLowerCase()} appearance</TooltipContent>\n </Tooltip>\n )}\n </For>\n </ToggleGroup>\n )\n}\n"],"mappings":";;;;;;;AAMA,IAAMU,cAAc;CAClB;EAAEC,OAAO;EAASC,OAAO;EAASC,MAAMX;CAAI;CAC5C;EAAES,OAAO;EAAQC,OAAO;EAAQC,MAAMZ;CAAK;CAC3C;EAAEU,OAAO;EAAUC,OAAO;EAAUC,MAAMb;CAAQ;AAAC;AAarD,SAAgBiB,gBAAgBC,OAA6B;CAC3D,MAAM,CAACC,OAAOC,QAAQhB,WAAWc,OAAO;EAAC;EAAQ;EAAgB;CAAY,CAAC;CAC9E,OAAAG,gBACGhB,aAAWiB,WACNF,MAAI;EACRG,UAAQ;EACRC,UAAU;EAAK,IACfb,QAAK;GAAA,OAAEQ,MAAML;EAAI;EACjBW,WAAWd,UAAyB;GAClC,MAAMe,SAAShB,YAAYiB,MAAMC,cAAcA,UAAUjB,UAAUA,KAAK;GACxE,IAAIe,QAAQP,MAAMJ,aAAaW,OAAOf,KAAK;EAC7C;EAAC,KAAA,gBAAA;GAAA,OACWS,KAAK,iBAAiB;EAAY;EAAA,IAAAS,WAAA;GAAA,OAAAR,gBAE7ClB,KAAG;IAAC2B,MAAMpB;IAAWmB,WAClBE,eAAUV,gBACTd,SAAO,EAAA,IAAAsB,WAAA;KAAA,OAAA,CAAAR,gBACLZ,gBAAc;MACbuB,IAAI1B;MAAe,IACnBK,QAAK;OAAA,OAAEoB,WAAWpB;MAAK;MACvBsB,SAAO;MAAA,IACPC,OAAI;OAAA,OAAEf,MAAMH,aAAa,OAAO;MAAS;MAAA,KAAA,gBAAA;OAAA,OAC7Be,WAAWnB;MAAK;MAAA,IAAAiB,WAAA;OAAA,OAAA,CAAAR,gBAE3BU,WAAWlB,MAAI,EAAA,eAAA,OAAA,CAAA,GAAAsB,WACfA,WAAA,CAAA,CAAAhB,MAAMH,UAAU,CAAA,CAAA,WAAA;QAAA,IAAAoB,OAAAC,OAAA;QAAAC,OAAAF,YAAUL,WAAWnB,KAAK;QAAA,OAAAwB;OAAA,EAAA,CAAA,IAAW,IAAI,CAAA;MAAA;KAAA,CAAA,GAAAf,gBAE3Db,gBAAc,EAAA,IAAAqB,WAAA;MAAA,OAAA;OAAA;OAAAM,WAAMJ,WAAWnB,MAAM2B,YAAY,CAAC;OAAA;MAAA;KAAA,EAAA,CAAA,CAAA;IAAA,EAAA,CAAA;GAEtD,CAAA;EAAA;CAAA,CAAA,CAAA;AAIT"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme-picker.js","names":["ComponentProps","For","Show","splitProps","cn","ThemeVariant","Button","ThemeSwatchProps","theme","size","swatchSizes","sm","md","lg","const","ThemeSwatch","props","local","rest","colors","_el$","_tmpl$","_$spread","_$mergeProps","class","_$insert","_$createComponent","each","background","card","primary","accent","destructiveAction","children","color","_el$2","_tmpl$2","_$setStyleProperty","_$effect","_$className","ThemePreviewProps","selected","ThemePreview","c","_el$3","_tmpl$3","_el$4","firstChild","_el$5","_el$6","_el$7","nextSibling","_el$8","_el$9","_el$0","_el$1","_el$10","_el$11","_el$12","_el$13","_el$14","style","_p$","_v$","sidebar","_v$2","sidebarBorder","_v$3","_v$4","sidebarAccent","_v$5","_v$6","foreground","_v$7","mutedForeground","_v$8","_v$9","_v$0","_v$1","secondary","e","t","a","o","i","n","s","h","r","d","l","undefined","ThemePickerProps","themes","selectedId","onThemeSelect","ThemePicker","_el$15","_tmpl$4","as","type","variant","role","aria-checked","id","aria-label","familyLabel","label","onClick","_el$16","_tmpl$6","_el$17","when","family","_el$18","_tmpl$5","_$mergeProps","_$createComponent","_$className","_$setStyleProperty"],"sources":["../../../src/components/theme/theme-picker.tsx"],"sourcesContent":["import type { ComponentProps } from 'solid-js'\nimport { For, Show, splitProps } from 'solid-js'\nimport { cn } from '#lib/utils'\nimport type { ThemeVariant } from '#lib/theme-types'\nimport { Button } from '../ui/button'\n\n/**\n * ThemeSwatch.\n *\n * The colours of a theme, as a small readable strip: the canvas, a card, the\n * primary, an accent and the destructive fill. Enough to tell two dark themes\n * apart at a glance and to recognise the one you want without applying it.\n *\n * A swatch is **read from the variant object**, not from a stylesheet, so a picker\n * can show a theme that is not currently applied — which is the whole point of a\n * picker. That is also why the catalogue is data rather than CSS.\n */\nexport type ThemeSwatchProps = ComponentProps<'span'> & {\n theme: ThemeVariant\n /** Draw the swatch at the given size. */\n size?: 'sm' | 'md' | 'lg'\n}\n\nconst swatchSizes = {\n sm: 'h-4 w-4',\n md: 'h-6 w-6',\n lg: 'h-8 w-8',\n} as const\n\nexport function ThemeSwatch(props: ThemeSwatchProps) {\n const [local, rest] = splitProps(props, ['class', 'theme', 'size'])\n const colors = () => local.theme.colors\n\n return (\n <span\n data-slot=\"theme-swatch\"\n aria-hidden=\"true\"\n class={cn(\n 'border-border inline-flex shrink-0 overflow-hidden rounded-md border',\n local.class\n )}\n {...rest}\n >\n <For\n each={[\n colors().background,\n colors().card,\n colors().primary,\n colors().accent,\n colors().destructiveAction,\n ]}\n >\n {(color) => (\n <span\n class={cn('block', swatchSizes[local.size ?? 'md'])}\n style={{ 'background-color': color }}\n />\n )}\n </For>\n </span>\n )\n}\n\n/**\n * ThemePreview.\n *\n * A miniature of the interface, painted in a theme's own colours: a rail, a panel,\n * a heading, body text, a primary button and a destructive one.\n *\n * The point is that a colour strip cannot answer the question a user actually has —\n * \"would I want to look at this all day?\" — and a real preview can. It is drawn\n * with inline colours from the variant rather than by applying the theme, so a list\n * of twenty previews costs one object read each instead of twenty theme swaps.\n */\nexport type ThemePreviewProps = ComponentProps<'div'> & {\n theme: ThemeVariant\n /** Highlight the preview as the current selection. */\n selected?: boolean\n}\n\nexport function ThemePreview(props: ThemePreviewProps) {\n const [local, rest] = splitProps(props, ['class', 'theme', 'selected'])\n const c = () => local.theme.colors\n\n return (\n <div\n data-slot=\"theme-preview\"\n class={cn(\n 'w-44 overflow-hidden rounded-lg border shadow-xs',\n local.selected ? 'border-primary ring-3 ring-primary-subtle' : 'border-border',\n local.class\n )}\n style={{ 'background-color': c().background }}\n {...rest}\n >\n <div class=\"flex h-24\">\n {/* A rail and a panel: the two surfaces a user spends the day looking at. */}\n <div\n class=\"theme-preview-edge flex w-6 flex-col items-center gap-1.5 border-e py-2\"\n style={{ 'background-color': c().sidebar, '--preview-edge': c().sidebarBorder }}\n >\n <span class=\"size-2.5 rounded-sm\" style={{ 'background-color': c().primary }} />\n <span class=\"size-2.5 rounded-sm\" style={{ 'background-color': c().sidebarAccent }} />\n <span class=\"size-2.5 rounded-sm\" style={{ 'background-color': c().sidebarAccent }} />\n </div>\n <div class=\"flex flex-1 flex-col gap-1.5 p-2\">\n <div class=\"h-1.5 w-14 rounded-full\" style={{ 'background-color': c().foreground }} />\n <div class=\"h-1 w-20 rounded-full\" style={{ 'background-color': c().mutedForeground }} />\n <div class=\"h-1 w-16 rounded-full\" style={{ 'background-color': c().mutedForeground }} />\n <div class=\"mt-auto flex items-center gap-1\">\n <span class=\"h-3 w-9 rounded-sm\" style={{ 'background-color': c().primary }} />\n <span\n class=\"h-3 w-6 rounded-sm\"\n style={{ 'background-color': c().destructiveAction }}\n />\n <span class=\"h-3 w-6 rounded-sm\" style={{ 'background-color': c().secondary }} />\n </div>\n </div>\n </div>\n </div>\n )\n}\n\n/**\n * ThemePicker.\n *\n * The catalogue as a selectable grid. One appearance at a time — a light picker\n * lists light themes and a dark picker lists dark ones — because choosing a dark\n * theme while looking at a light interface is a choice nobody can evaluate.\n *\n * `onSelect` rather than an internal signal: the selection belongs to the\n * preference the provider owns, and a picker that kept its own copy could disagree\n * with what is applied.\n */\nexport type ThemePickerProps = ComponentProps<'div'> & {\n themes: readonly ThemeVariant[]\n selectedId: string\n onThemeSelect: (theme: ThemeVariant) => void\n}\n\nexport function ThemePicker(props: ThemePickerProps) {\n const [local, rest] = splitProps(props, ['class', 'themes', 'selectedId', 'onThemeSelect'])\n\n return (\n <div\n data-slot=\"theme-picker\"\n role=\"radiogroup\"\n aria-label=\"Theme\"\n class={cn('flex flex-wrap gap-3', local.class)}\n {...rest}\n >\n <For each={local.themes}>\n {(theme) => (\n <Button\n as=\"button\"\n type=\"button\"\n variant=\"ghost\"\n size=\"sm\"\n role=\"radio\"\n aria-checked={local.selectedId === theme.id}\n aria-label={`${theme.familyLabel} ${theme.label}`}\n // `justify-start`: the options in a wrapped row stretch to its tallest\n // member, and an option whose label has a second line (the family)\n // is that member. Centred, every shorter option's preview dropped below\n // its neighbours'; pinned to the top, the previews share one line.\n class=\"h-auto flex-col justify-start gap-1.5 p-0 hover:bg-transparent\"\n onClick={() => local.onThemeSelect(theme)}\n >\n <ThemePreview theme={theme} selected={local.selectedId === theme.id} />\n <span class=\"flex flex-col items-center\">\n <span class=\"text-xs font-medium\">{theme.label}</span>\n <Show when={theme.family !== 'adea'}>\n <span class=\"text-muted-foreground text-2xs\">{theme.familyLabel}</span>\n </Show>\n </span>\n </Button>\n )}\n </For>\n </div>\n )\n}\n"],"mappings":";;;;;;;;;;;AAuBA,IAAMU,cAAc;CAClBC,IAAI;CACJC,IAAI;CACJC,IAAI;AACN;AAEA,SAAgBE,YAAYC,OAAyB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yB,WAAA;KAAA,OAAA,CAAAP,gBAExCgB,cAAY;MAAQlC;MAAK,IAAEiC,WAAQ;OAAA,OAAExB,MAAM6E,eAAetF,MAAMgG;MAAE;KAAA,CAAA,UAAA;MAAA,IAAAK,SAAAC,QAAA,GAAAC,SAAAF,OAAA9D;MAAAtB,OAAAsF,cAE9BvG,MAAMmG,KAAK;MAAAlF,OAAAoF,QAAAnF,gBAC7CxB,MAAI;OAAA,IAAC8G,OAAI;QAAA,OAAExG,MAAMyG,WAAW;OAAM;OAAA,IAAAhF,WAAA;QAAA,IAAAiF,SAAAC,QAAA;QAAA1F,OAAAyF,cACa1G,MAAMkG,WAAW;QAAA,OAAAQ;OAAA;MAAA,CAAA,GAAA,IAAA;MAAA,OAAAL;KAAA,EAAA,CAAA,CAAA;IAAA;GAAA,CAAA;EAItE,CAAA,CAAA;EAAA,OAAAZ;CAAA,EAAA,CAAA;AAIT"}
|
|
1
|
+
{"version":3,"file":"theme-picker.js","names":["For","Show","splitProps","cn","Button","theme","size","swatchSizes","sm","md","lg","ThemeSwatch","props","local","rest","colors","_el$","_tmpl$","_$spread","_$mergeProps","class","_$insert","_$createComponent","each","background","card","primary","accent","destructiveAction","children","color","_el$2","_tmpl$2","_$setStyleProperty","_$effect","_$className","selected","ThemePreview","c","_el$3","_tmpl$3","firstChild","_el$5","_el$6","_el$7","nextSibling","_el$8","_el$0","_el$1","_el$10","_el$12","_el$13","_el$14","style","_p$","_v$","sidebar","_v$2","sidebarBorder","_v$3","_v$4","sidebarAccent","_v$5","_v$6","foreground","_v$7","mutedForeground","_v$8","_v$9","_v$0","_v$1","secondary","e","t","a","o","i","n","s","h","r","d","l","undefined","themes","selectedId","onThemeSelect","ThemePicker","_el$15","_tmpl$4","as","type","variant","role","id","familyLabel","label","onClick","_el$16","_tmpl$6","_el$17","when","family","_el$18","_tmpl$5"],"sources":["../../../src/components/theme/theme-picker.tsx"],"sourcesContent":["import type { ComponentProps } from 'solid-js'\nimport { For, Show, splitProps } from 'solid-js'\nimport { cn } from '#lib/utils'\nimport type { ThemeVariant } from '#lib/theme-types'\nimport { Button } from '../ui/button'\n\n/**\n * ThemeSwatch.\n *\n * The colours of a theme, as a small readable strip: the canvas, a card, the\n * primary, an accent and the destructive fill. Enough to tell two dark themes\n * apart at a glance and to recognise the one you want without applying it.\n *\n * A swatch is **read from the variant object**, not from a stylesheet, so a picker\n * can show a theme that is not currently applied — which is the whole point of a\n * picker. That is also why the catalogue is data rather than CSS.\n */\nexport type ThemeSwatchProps = ComponentProps<'span'> & {\n theme: ThemeVariant\n /** Draw the swatch at the given size. */\n size?: 'sm' | 'md' | 'lg'\n}\n\nconst swatchSizes = {\n sm: 'h-4 w-4',\n md: 'h-6 w-6',\n lg: 'h-8 w-8',\n} as const\n\nexport function ThemeSwatch(props: ThemeSwatchProps) {\n const [local, rest] = splitProps(props, ['class', 'theme', 'size'])\n const colors = () => local.theme.colors\n\n return (\n <span\n data-slot=\"theme-swatch\"\n aria-hidden=\"true\"\n class={cn(\n 'border-border inline-flex shrink-0 overflow-hidden rounded-md border',\n local.class\n )}\n {...rest}\n >\n <For\n each={[\n colors().background,\n colors().card,\n colors().primary,\n colors().accent,\n colors().destructiveAction,\n ]}\n >\n {(color) => (\n <span\n class={cn('block', swatchSizes[local.size ?? 'md'])}\n style={{ 'background-color': color }}\n />\n )}\n </For>\n </span>\n )\n}\n\n/**\n * ThemePreview.\n *\n * A miniature of the interface, painted in a theme's own colours: a rail, a panel,\n * a heading, body text, a primary button and a destructive one.\n *\n * The point is that a colour strip cannot answer the question a user actually has —\n * \"would I want to look at this all day?\" — and a real preview can. It is drawn\n * with inline colours from the variant rather than by applying the theme, so a list\n * of twenty previews costs one object read each instead of twenty theme swaps.\n */\nexport type ThemePreviewProps = ComponentProps<'div'> & {\n theme: ThemeVariant\n /** Highlight the preview as the current selection. */\n selected?: boolean\n}\n\nexport function ThemePreview(props: ThemePreviewProps) {\n const [local, rest] = splitProps(props, ['class', 'theme', 'selected'])\n const c = () => local.theme.colors\n\n return (\n <div\n data-slot=\"theme-preview\"\n class={cn(\n 'w-44 overflow-hidden rounded-lg border shadow-xs',\n local.selected ? 'border-primary ring-3 ring-primary-subtle' : 'border-border',\n local.class\n )}\n style={{ 'background-color': c().background }}\n {...rest}\n >\n <div class=\"flex h-24\">\n {/* A rail and a panel: the two surfaces a user spends the day looking at. */}\n <div\n class=\"theme-preview-edge flex w-6 flex-col items-center gap-1.5 border-e py-2\"\n style={{ 'background-color': c().sidebar, '--preview-edge': c().sidebarBorder }}\n >\n <span class=\"size-2.5 rounded-sm\" style={{ 'background-color': c().primary }} />\n <span class=\"size-2.5 rounded-sm\" style={{ 'background-color': c().sidebarAccent }} />\n <span class=\"size-2.5 rounded-sm\" style={{ 'background-color': c().sidebarAccent }} />\n </div>\n <div class=\"flex flex-1 flex-col gap-1.5 p-2\">\n <div class=\"h-1.5 w-14 rounded-full\" style={{ 'background-color': c().foreground }} />\n <div class=\"h-1 w-20 rounded-full\" style={{ 'background-color': c().mutedForeground }} />\n <div class=\"h-1 w-16 rounded-full\" style={{ 'background-color': c().mutedForeground }} />\n <div class=\"mt-auto flex items-center gap-1\">\n <span class=\"h-3 w-9 rounded-sm\" style={{ 'background-color': c().primary }} />\n <span\n class=\"h-3 w-6 rounded-sm\"\n style={{ 'background-color': c().destructiveAction }}\n />\n <span class=\"h-3 w-6 rounded-sm\" style={{ 'background-color': c().secondary }} />\n </div>\n </div>\n </div>\n </div>\n )\n}\n\n/**\n * ThemePicker.\n *\n * The catalogue as a selectable grid. One appearance at a time — a light picker\n * lists light themes and a dark picker lists dark ones — because choosing a dark\n * theme while looking at a light interface is a choice nobody can evaluate.\n *\n * `onSelect` rather than an internal signal: the selection belongs to the\n * preference the provider owns, and a picker that kept its own copy could disagree\n * with what is applied.\n */\nexport type ThemePickerProps = ComponentProps<'div'> & {\n themes: readonly ThemeVariant[]\n selectedId: string\n onThemeSelect: (theme: ThemeVariant) => void\n}\n\nexport function ThemePicker(props: ThemePickerProps) {\n const [local, rest] = splitProps(props, ['class', 'themes', 'selectedId', 'onThemeSelect'])\n\n return (\n <div\n data-slot=\"theme-picker\"\n role=\"radiogroup\"\n aria-label=\"Theme\"\n class={cn('flex flex-wrap gap-3', local.class)}\n {...rest}\n >\n <For each={local.themes}>\n {(theme) => (\n <Button\n as=\"button\"\n type=\"button\"\n variant=\"ghost\"\n size=\"sm\"\n role=\"radio\"\n aria-checked={local.selectedId === theme.id}\n aria-label={`${theme.familyLabel} ${theme.label}`}\n // `justify-start`: the options in a wrapped row stretch to its tallest\n // member, and an option whose label has a second line (the family)\n // is that member. Centred, every shorter option's preview dropped below\n // its neighbours'; pinned to the top, the previews share one line.\n class=\"h-auto flex-col justify-start gap-1.5 p-0 hover:bg-transparent\"\n onClick={() => local.onThemeSelect(theme)}\n >\n <ThemePreview theme={theme} selected={local.selectedId === theme.id} />\n <span class=\"flex flex-col items-center\">\n <span class=\"text-xs font-medium\">{theme.label}</span>\n <Show when={theme.family !== 'adea'}>\n <span class=\"text-muted-foreground text-2xs\">{theme.familyLabel}</span>\n </Show>\n </span>\n </Button>\n )}\n </For>\n </div>\n )\n}\n"],"mappings":";;;;;;;;;;;AAuBA,IAAMO,cAAc;CAClBC,IAAI;CACJC,IAAI;CACJC,IAAI;AACN;AAEA,SAAgBC,YAAYC,OAAyB;CACnD,MAAM,CAACC,OAAOC,QAAQZ,WAAWU,OAAO;EAAC;EAAS;EAAS;CAAM,CAAC;CAClE,MAAMG,eAAeF,MAAMR,MAAMU;CAEjC,cAAA;EAAA,IAAAC,OAAAC,OAAA;EAAAC,OAAAF,MAAAG,WAAA,EAAA,KAAA,WAAA;GAAA,OAIWhB,GACL,wEACAU,MAAMO,KACR;EAAC,EAAA,GACGN,IAAI,GAAA,OAAA,IAAA;EAAAO,OAAAL,MAAAM,gBAEPtB,KAAG;GAAA,IACFuB,OAAI;IAAA,OAAE;KACJR,OAAO,CAAC,CAACS;KACTT,OAAO,CAAC,CAACU;KACTV,OAAO,CAAC,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;OAAA;MAAA,CAAA,GAAA,IAAA;MAAA,OAAAL;KAAA,EAAA,CAAA,CAAA;IAAA;GAAA,CAAA;EAItE,CAAA,CAAA;EAAA,OAAAV;CAAA,EAAA,CAAA;AAIT"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme-provider.js","names":["catalogueThemeEngine","ThemeProviderWith","
|
|
1
|
+
{"version":3,"file":"theme-provider.js","names":["catalogueThemeEngine","ThemeProviderWith","eagerCatalogue","engine","loaded","failed","load","Promise","resolve","ThemeProvider","props","_$createComponent","_$mergeProps","catalogue"],"sources":["../../../src/components/theme/theme-provider.tsx"],"sourcesContent":["import { catalogueThemeEngine } from '#lib/theme-catalogue'\nimport {\n ThemeProviderWith,\n type ThemeCatalogueSource,\n type ThemeProviderProps,\n} from './theme-provider-value'\n\nexport * from './theme-api'\n\n/** The whole catalogue, already imported: nothing to load, nothing to wait for. */\nconst eagerCatalogue: ThemeCatalogueSource = {\n engine: () => catalogueThemeEngine,\n loaded: () => true,\n failed: () => false,\n load: () => Promise.resolve(),\n}\n\n/**\n * ThemeProvider.\n *\n * Owns the appearance preference and applies it to the document. One provider near\n * the root; everything below reads it. See {@link ThemeProviderProps} for the\n * options.\n *\n * This provider imports the whole theme catalogue (about 129 KB raw, 34 KB gzipped)\n * so that `useTheme().themes` is a complete array on the first render. A host that\n * paints its theme from a stylesheet (`palette=\"stylesheet\"`), keeps the default\n * pair, and wants the catalogue out of its start-up chunk imports the lazy provider\n * from `@adea-ai/ui/components/theme/lazy` instead; the props are the same.\n */\nexport function ThemeProvider(props: ThemeProviderProps) {\n return <ThemeProviderWith {...props} catalogue={eagerCatalogue} />\n}\n"],"mappings":";;;;;;;;;;AAUA,IAAME,iBAAuC;CAC3CC,cAAcH;CACdI,cAAc;CACdC,cAAc;CACdC,YAAYC,QAAQC,QAAQ;AAC9B;;;;;;;;;;;;;;AAeA,SAAgBC,cAAcC,OAA2B;CACvD,OAAAC,gBAAQV,mBAAiBW,WAAKF,OAAK,EAAEG,WAAWX,eAAc,CAAA,CAAA;AAChE"}
|