@adea-ai/ui 0.130.0 → 0.130.2

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.
Files changed (33) hide show
  1. package/dist/components/composites/settings/settings.js +1 -1
  2. package/dist/components/composites/settings/settings.js.map +1 -1
  3. package/dist/components/layout/pixel-resize-handle/pixel-resize-handle.d.ts +7 -6
  4. package/dist/components/layout/pixel-resize-handle/pixel-resize-handle.d.ts.map +1 -1
  5. package/dist/components/layout/pixel-resize-handle/pixel-resize-handle.js +130 -144
  6. package/dist/components/layout/pixel-resize-handle/pixel-resize-handle.js.map +1 -1
  7. package/dist/components/layout/split-layout/resize-controller-core-retry.d.ts +1 -1
  8. package/dist/components/layout/split-layout/resize-controller-core-retry.d.ts.map +1 -1
  9. package/dist/components/layout/split-layout/resize-controller-core-retry.js +91 -55
  10. package/dist/components/layout/split-layout/resize-controller-core-retry.js.map +1 -1
  11. package/dist/components/layout/split-layout/resize-controller-core.d.ts +1 -1
  12. package/dist/components/layout/split-layout/resize-controller-core.d.ts.map +1 -1
  13. package/dist/components/layout/split-layout/resize-controller-core.js +91 -55
  14. package/dist/components/layout/split-layout/resize-controller-core.js.map +1 -1
  15. package/dist/components/layout/split-layout/split-layout.d.ts +1 -1
  16. package/dist/components/layout/split-layout/split-layout.d.ts.map +1 -1
  17. package/dist/components/layout/split-layout/split-layout.js +2 -2
  18. package/dist/components/layout/split-layout/split-layout.js.map +1 -1
  19. package/dist/r/pixel-resize-handle.json +3 -2
  20. package/dist/r/registry.json +3 -3
  21. package/dist/r/split-layout.json +0 -1
  22. package/dist/r/src/components/composites/settings/settings.tsx +1 -1
  23. package/dist/r/src/components/layout/pixel-resize-handle/pixel-resize-handle.tsx +60 -61
  24. package/dist/r/src/components/layout/split-layout/resize-controller-core-retry.tsx +72 -31
  25. package/dist/r/src/components/layout/split-layout/resize-controller-core.tsx +72 -31
  26. package/dist/r/src/components/layout/split-layout/split-layout.tsx +2 -2
  27. package/package.json +1 -1
  28. package/registry.json +3 -3
  29. package/src/components/composites/settings/settings.tsx +1 -1
  30. package/src/components/layout/pixel-resize-handle/pixel-resize-handle.tsx +60 -61
  31. package/src/components/layout/split-layout/resize-controller-core-retry.tsx +72 -31
  32. package/src/components/layout/split-layout/resize-controller-core.tsx +72 -31
  33. package/src/components/layout/split-layout/split-layout.tsx +2 -2
@@ -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","cn","computeLayoutFrames","LayoutRect","paneDropIntent","PaneDropIntent","PANE_DRAG_TYPE","DRAG_PREVIEW_MAX_WIDTH","DRAG_PREVIEW_MAX_HEIGHT","listLeaves","SplitLayoutBranch","SplitLayoutLeaf","SplitLayoutState","SplitLayoutResizeControllerProps","ResizeController","props","L","Element","ResizeControllerState","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","retryWithAlternateImport","alternateImportAttempts","focusHandleAfterRetry","focusRecoveryButtonAfterError","focusRestoreEpoch","focusEpoch","pendingFocusFrame","refs","Map","domIds","prefix","resizeReloadWarningId","nextDomId","nextDragId","dragPreview","drag","setDrag","id","token","drop","setDrop","resizeController","setResizeController","cancelPendingFocusRestore","cancelAnimationFrame","trackFocusChange","event","FocusEvent","target","body","addEventListener","removeEventListener","clearDrag","remove","createDragPreview","preview","inert","domId","existing","get","created","set","leaves","center","leafMap","map","frames","branches","values","flatMap","frame","node","kind","retry","generation","controllerImport","then","default","Controller","shouldFocusHandle","requestAnimationFrame","currentFocus","ownerDocument","activeElement","querySelector","focus","preventScroll","shouldFocusRetry","HTMLButtonElement","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","component","_c$","_el$0","_tmpl$5","_el$1","_tmpl$6","window","location","reload","ownsFocus","_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 { 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 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\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; Corvu 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 retryWithAlternateImport = false\n let alternateImportAttempts = 0\n let focusHandleAfterRetry = false\n let focusRecoveryButtonAfterError = false\n let focusRestoreEpoch = 0\n let focusEpoch = 0\n let pendingFocusFrame: 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 cancelPendingFocusRestore = () => {\n if (pendingFocusFrame !== undefined) cancelAnimationFrame(pendingFocusFrame)\n pendingFocusFrame = undefined\n }\n const trackFocusChange = (event: FocusEvent) => {\n if (event.target === document.body) return\n focusEpoch += 1\n focusHandleAfterRetry = false\n focusRecoveryButtonAfterError = 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 focusHandleAfterRetry = false\n focusRecoveryButtonAfterError = false\n cancelPendingFocusRestore()\n // Keep a loaded controller so a later split does not re-import a facade\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 retry = retryWithAlternateImport\n const generation = ++resizeLoadGeneration\n setResizeController(false)\n const controllerImport = retry\n ? alternateImportAttempts++ === 0\n ? import('./resize-controller-retry')\n : import('./resize-controller-retry-2')\n : import('./resize-controller')\n void controllerImport.then(\n ({ default: Controller }) => {\n if (disposed || generation !== resizeLoadGeneration || branches().length === 0) return\n const shouldFocusHandle = focusHandleAfterRetry && focusEpoch === focusRestoreEpoch\n focusHandleAfterRetry = false\n focusRecoveryButtonAfterError = false\n retryWithAlternateImport = false\n alternateImportAttempts = 0\n setResizeController(() => Controller)\n if (shouldFocusHandle)\n pendingFocusFrame = requestAnimationFrame(() => {\n pendingFocusFrame = undefined\n if (\n disposed ||\n generation !== resizeLoadGeneration ||\n branches().length === 0 ||\n focusEpoch !== focusRestoreEpoch\n )\n return\n const currentFocus = root?.ownerDocument.activeElement\n if (currentFocus && currentFocus !== root?.ownerDocument.body && currentFocus !== root)\n return\n root?.querySelector<HTMLElement>('[data-corvu-resizable-handle]')?.focus({\n preventScroll: true,\n })\n })\n },\n () => {\n // A rejected dynamic import can remain cached under its specifier.\n // The next split must start from the alternate module entry as well.\n retryWithAlternateImport = true\n if (!disposed && generation === resizeLoadGeneration && branches().length > 0) {\n setResizeController('error')\n const shouldFocusRetry = focusRecoveryButtonAfterError && focusEpoch === focusRestoreEpoch\n if (shouldFocusRetry)\n pendingFocusFrame = requestAnimationFrame(() => {\n pendingFocusFrame = undefined\n if (\n disposed ||\n generation !== resizeLoadGeneration ||\n branches().length === 0 ||\n focusEpoch !== focusRestoreEpoch\n )\n return\n root?.querySelector<HTMLButtonElement>('[data-resize-retry]')?.focus({\n preventScroll: true,\n })\n })\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 focusHandleAfterRetry = false\n focusRecoveryButtonAfterError = 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 ? alternateImportAttempts >= 2\n ? 'Resize controls did not load after repeated attempts. Reloading may discard 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={10}\n aria-valuemax={90}\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 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 {alternateImportAttempts >= 2 ? (\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={alternateImportAttempts >= 2 ? resizeReloadWarningId : undefined}\n onClick={(event) => {\n if (alternateImportAttempts >= 2) {\n window.location.reload()\n return\n }\n const ownsFocus = document.activeElement === event.currentTarget\n focusHandleAfterRetry = ownsFocus\n focusRecoveryButtonAfterError = ownsFocus\n focusRestoreEpoch = focusEpoch\n retryWithAlternateImport = true\n setResizeController(undefined)\n }}\n >\n {alternateImportAttempts >= 2 ? 'Reload page to retry resizing' : 'Retry pane resizing'}\n </Button>\n </div>\n ) : null}\n </div>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAsBA,IAAMsB,iBAAiB;AACvB,IA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AI,EAAA,CAAA,GAAA,IAAA;EAAAzC,QAAAE,QAAA;GAAA,IAAA+C,MAvOIpS,MAAMM,OAAK+R,OAERpL,KAAK,IAAI,KAAKhD,KAAAA,GAASqO,OAC/BpT,GAAG,sEAAsEc,MAAMwB,KAAK;GAAC4Q,QAAA/C,IAAAc,KAAAjC,aAAAhC,MAAA,cAAAmD,IAAAc,IAAAiC,GAAA;GAAAC,SAAAhD,IAAAe,KAAAlC,aAAAhC,MAAA,iBAAAmD,IAAAe,IAAAiC,IAAA;GAAAC,SAAAjD,IAAAgB,KAAAjB,UAAAlD,MAAAmD,IAAAgB,IAAAiC,IAAA;GAAA,OAAAjD;EAAA,GAAA;GAAAc,GAAAlM,KAAAA;GAAAmM,GAAAnM,KAAAA;GAAAoM,GAAApM,KAAAA;EAAA,CAAA;EAAA,OAAAiI;CAAA,EAAA,CAAA;AAuOlG;AAACqG,eAAA,CAAA,SAAA,CAAA"}
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","cn","computeLayoutFrames","LayoutRect","paneDropIntent","PaneDropIntent","PANE_DRAG_TYPE","DRAG_PREVIEW_MAX_WIDTH","DRAG_PREVIEW_MAX_HEIGHT","listLeaves","SplitLayoutBranch","SplitLayoutLeaf","SplitLayoutState","SplitLayoutResizeControllerProps","ResizeController","props","L","Element","ResizeControllerState","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","retryWithAlternateImport","alternateImportAttempts","focusHandleAfterRetry","focusRecoveryButtonAfterError","focusRestoreEpoch","focusEpoch","pendingFocusFrame","refs","Map","domIds","prefix","resizeReloadWarningId","nextDomId","nextDragId","dragPreview","drag","setDrag","id","token","drop","setDrop","resizeController","setResizeController","cancelPendingFocusRestore","cancelAnimationFrame","trackFocusChange","event","FocusEvent","target","body","addEventListener","removeEventListener","clearDrag","remove","createDragPreview","preview","inert","domId","existing","get","created","set","leaves","center","leafMap","map","frames","branches","values","flatMap","frame","node","kind","retry","generation","controllerImport","then","default","Controller","shouldFocusHandle","requestAnimationFrame","currentFocus","ownerDocument","activeElement","querySelector","focus","preventScroll","shouldFocusRetry","HTMLButtonElement","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","component","_c$","_el$0","_tmpl$5","_el$1","_tmpl$6","window","location","reload","ownsFocus","_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 { 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 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\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 retryWithAlternateImport = false\n let alternateImportAttempts = 0\n let focusHandleAfterRetry = false\n let focusRecoveryButtonAfterError = false\n let focusRestoreEpoch = 0\n let focusEpoch = 0\n let pendingFocusFrame: 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 cancelPendingFocusRestore = () => {\n if (pendingFocusFrame !== undefined) cancelAnimationFrame(pendingFocusFrame)\n pendingFocusFrame = undefined\n }\n const trackFocusChange = (event: FocusEvent) => {\n if (event.target === document.body) return\n focusEpoch += 1\n focusHandleAfterRetry = false\n focusRecoveryButtonAfterError = 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 focusHandleAfterRetry = false\n focusRecoveryButtonAfterError = false\n cancelPendingFocusRestore()\n // Keep a loaded controller so a later split does not re-import a facade\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 retry = retryWithAlternateImport\n const generation = ++resizeLoadGeneration\n setResizeController(false)\n const controllerImport = retry\n ? alternateImportAttempts++ === 0\n ? import('./resize-controller-retry')\n : import('./resize-controller-retry-2')\n : import('./resize-controller')\n void controllerImport.then(\n ({ default: Controller }) => {\n if (disposed || generation !== resizeLoadGeneration || branches().length === 0) return\n const shouldFocusHandle = focusHandleAfterRetry && focusEpoch === focusRestoreEpoch\n focusHandleAfterRetry = false\n focusRecoveryButtonAfterError = false\n retryWithAlternateImport = false\n alternateImportAttempts = 0\n setResizeController(() => Controller)\n if (shouldFocusHandle)\n pendingFocusFrame = requestAnimationFrame(() => {\n pendingFocusFrame = undefined\n if (\n disposed ||\n generation !== resizeLoadGeneration ||\n branches().length === 0 ||\n focusEpoch !== focusRestoreEpoch\n )\n return\n const currentFocus = root?.ownerDocument.activeElement\n if (currentFocus && currentFocus !== root?.ownerDocument.body && currentFocus !== root)\n return\n root?.querySelector<HTMLElement>('[data-split-layout-handle]')?.focus({\n preventScroll: true,\n })\n })\n },\n () => {\n // A rejected dynamic import can remain cached under its specifier.\n // The next split must start from the alternate module entry as well.\n retryWithAlternateImport = true\n if (!disposed && generation === resizeLoadGeneration && branches().length > 0) {\n setResizeController('error')\n const shouldFocusRetry = focusRecoveryButtonAfterError && focusEpoch === focusRestoreEpoch\n if (shouldFocusRetry)\n pendingFocusFrame = requestAnimationFrame(() => {\n pendingFocusFrame = undefined\n if (\n disposed ||\n generation !== resizeLoadGeneration ||\n branches().length === 0 ||\n focusEpoch !== focusRestoreEpoch\n )\n return\n root?.querySelector<HTMLButtonElement>('[data-resize-retry]')?.focus({\n preventScroll: true,\n })\n })\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 focusHandleAfterRetry = false\n focusRecoveryButtonAfterError = 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 ? alternateImportAttempts >= 2\n ? 'Resize controls did not load after repeated attempts. Reloading may discard 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={10}\n aria-valuemax={90}\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 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 {alternateImportAttempts >= 2 ? (\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={alternateImportAttempts >= 2 ? resizeReloadWarningId : undefined}\n onClick={(event) => {\n if (alternateImportAttempts >= 2) {\n window.location.reload()\n return\n }\n const ownsFocus = document.activeElement === event.currentTarget\n focusHandleAfterRetry = ownsFocus\n focusRecoveryButtonAfterError = ownsFocus\n focusRestoreEpoch = focusEpoch\n retryWithAlternateImport = true\n setResizeController(undefined)\n }}\n >\n {alternateImportAttempts >= 2 ? 'Reload page to retry resizing' : 'Retry pane resizing'}\n </Button>\n </div>\n ) : null}\n </div>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAsBA,IAAMsB,iBAAiB;AACvB,IAAMC,yBAAyB;AAC/B,IAAMC,0BAA0B;AAqChC,SAASgC,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,YAAY3D,GACtBqD,OAAOO,aAAa,OAAO,GAC3B,0GACF;CACAJ,YAAYK,aAAa,+BAA+BR,OAAOS,SAAS;CACxEN,YAAYO,cAAcR;CAC1B,OAAOC;AACT;AACA,SAASQ,oBAA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AAU;MAClB,IAAIzB,2BAA2B,GAAG;OAChC6L,OAAOC,SAASC,OAAO;OACvB;MACF;MACA,MAAMC,YAAYxP,SAASsH,kBAAkBrC,MAAM+F;MACnDvH,wBAAwB+L;MACxB9L,gCAAgC8L;MAChC7L,oBAAoBC;MACpBL,2BAA2B;MAC3BsB,oBAAoBvD,KAAAA,CAAS;KAC/B;KAACW,UAEAuB,2BAA2B,IAAI,kCAAkC;IAAqB,CAAA,GAAA,IAAA;IAAA,OAAAyL;GAAA,EAAA,CAAA,IAGzF;EAAI,EAAA,CAAA,GAAA,IAAA;EAAAzC,QAAAE,QAAA;GAAA,IAAA+C,MAvOIpS,MAAMM,OAAK+R,OAERpL,KAAK,IAAI,KAAKhD,KAAAA,GAASqO,OAC/BpT,GAAG,sEAAsEc,MAAMwB,KAAK;GAAC4Q,QAAA/C,IAAAc,KAAAjC,aAAAhC,MAAA,cAAAmD,IAAAc,IAAAiC,GAAA;GAAAC,SAAAhD,IAAAe,KAAAlC,aAAAhC,MAAA,iBAAAmD,IAAAe,IAAAiC,IAAA;GAAAC,SAAAjD,IAAAgB,KAAAjB,UAAAlD,MAAAmD,IAAAgB,IAAAiC,IAAA;GAAA,OAAAjD;EAAA,GAAA;GAAAc,GAAAlM,KAAAA;GAAAmM,GAAAnM,KAAAA;GAAAoM,GAAApM,KAAAA;EAAA,CAAA;EAAA,OAAAiI;CAAA,EAAA,CAAA;AAuOlG;AAACqG,eAAA,CAAA,SAAA,CAAA"}
@@ -3,9 +3,10 @@
3
3
  "type": "registry:ui",
4
4
  "title": "Pixel Resize Handle",
5
5
  "description": "",
6
- "dependencies": [],
6
+ "dependencies": [
7
+ "lucide-solid@^1.51.0"
8
+ ],
7
9
  "registryDependencies": [
8
- "@adea-ai/ui/resizable",
9
10
  "lib"
10
11
  ],
11
12
  "files": [
@@ -1722,9 +1722,10 @@
1722
1722
  "type": "registry:ui",
1723
1723
  "title": "Pixel Resize Handle",
1724
1724
  "description": "",
1725
- "dependencies": [],
1725
+ "dependencies": [
1726
+ "lucide-solid@^1.51.0"
1727
+ ],
1726
1728
  "registryDependencies": [
1727
- "@adea-ai/ui/resizable",
1728
1729
  "lib"
1729
1730
  ],
1730
1731
  "files": [
@@ -1806,7 +1807,6 @@
1806
1807
  "title": "Split Layout",
1807
1808
  "description": "Issue-backed binary layout with stable opaque leaf owners; scoped persistence belongs to the host.",
1808
1809
  "dependencies": [
1809
- "@corvu/resizable@^0.2.5",
1810
1810
  "lucide-solid@^1.51.0"
1811
1811
  ],
1812
1812
  "registryDependencies": [
@@ -4,7 +4,6 @@
4
4
  "title": "Split Layout",
5
5
  "description": "Issue-backed binary layout with stable opaque leaf owners; scoped persistence belongs to the host.",
6
6
  "dependencies": [
7
- "@corvu/resizable@^0.2.5",
8
7
  "lucide-solid@^1.51.0"
9
8
  ],
10
9
  "registryDependencies": [
@@ -61,7 +61,7 @@ export function SettingsSection(
61
61
  class={cn(
62
62
  local.bodyLayout === 'content'
63
63
  ? 'flex flex-col gap-4'
64
- : 'divide-y divide-border rounded-xl border border-border'
64
+ : 'divide-y divide-border rounded-xl border border-border [&>[data-slot=empty-description]]:p-4'
65
65
  )}
66
66
  >
67
67
  {local.children}
@@ -1,4 +1,4 @@
1
- import { ResizableHandle, ResizablePanel, ResizablePanelGroup } from '../../ui/resizable'
1
+ import { GripVertical } from 'lucide-solid'
2
2
  import { createSignal, onCleanup } from 'solid-js'
3
3
  import { cn } from '../../../lib/utils'
4
4
 
@@ -27,21 +27,21 @@ export type PixelResizeHandleProps = {
27
27
  *
28
28
  * A keyboard- and pointer-operable edge ruler for a host-owned pane. Keep the
29
29
  * pane's actual width and any persistence in its layout owner; this component
30
- * reports a bounded pixel value and places the shared resizable grip at the
31
- * matching left or right edge.
30
+ * reports a bounded pixel value and draws the grip at the matching left or
31
+ * right edge.
32
32
  *
33
- * Corvu 0.2.5 supplies geometry, keyboard resizing, ARIA and the shared grip,
34
- * but its global drag handler does not end on pointer cancellation. Prevent
35
- * that handler through its public start hook and use local pointer capture
36
- * for bounded pixel gestures, including cancellation and lost capture.
33
+ * The ruler is a single separator positioned inside a box as wide as the
34
+ * maximum, so it needs no panel-group geometry (and none of the split-layout
35
+ * code that comes with one): arrow keys move it by `step` along its visual
36
+ * edge, Home and End jump to the bounds, and a pointer drag is captured on the
37
+ * handle so cancellation and lost capture end the gesture.
37
38
  */
38
39
  export function PixelResizeHandle(props: PixelResizeHandleProps) {
39
40
  const maximum = () => Math.max(1, props.maximum)
40
41
  const minimum = () => Math.min(maximum(), Math.max(0, props.minimum))
41
42
  const value = () => Math.min(maximum(), Math.max(minimum(), Math.round(props.value)))
42
- const ratio = () => value() / maximum()
43
43
  const isRight = () => props.side === 'right'
44
- const rulerSizes = () => (isRight() ? [1 - ratio(), ratio()] : [ratio(), 1 - ratio()])
44
+ const bounded = (next: number) => Math.min(maximum(), Math.max(minimum(), Math.round(next)))
45
45
  const commit = () => props.onCommit?.(value())
46
46
  let interacting = false
47
47
  const [drag, setDrag] = createSignal<{
@@ -67,51 +67,48 @@ export function PixelResizeHandle(props: PixelResizeHandleProps) {
67
67
  endKeyboard()
68
68
  endPointer(false)
69
69
  })
70
+ const move = (next: number) => {
71
+ if (next !== value()) props.onChange(next)
72
+ }
73
+ // Arrow keys describe physical movement of the handle: on a right-edge pane
74
+ // moving the handle left widens the pane.
75
+ const KEY_DIRECTION: Record<string, number> = { ArrowLeft: -1, ArrowRight: 1 }
70
76
 
71
77
  return (
72
- <ResizablePanelGroup
73
- orientation="horizontal"
74
- dir="ltr"
75
- sizes={rulerSizes()}
76
- keyboardDelta={`${props.step ?? 16}px`}
77
- style={{ width: `${maximum()}px` }}
78
+ <div
78
79
  class={cn(
79
- 'pointer-events-none absolute inset-y-0 flex',
80
+ 'pointer-events-none absolute inset-y-0',
80
81
  {
81
82
  'left-0': props.side === 'left',
82
83
  'right-0': props.side === 'right',
83
84
  },
84
85
  props.class
85
86
  )}
86
- onSizesChange={(sizes) => {
87
- // Panel registration and teardown also emit sizes. Only user resizing
88
- // may update the host preference; collapsing must preserve its width.
89
- if (!interacting || sizes.length !== 2) return
90
- const next = Math.round((sizes[isRight() ? 1 : 0] ?? ratio()) * maximum())
91
- const bounded = Math.min(maximum(), Math.max(minimum(), next))
92
- if (bounded !== value()) props.onChange(bounded)
93
- }}
87
+ style={{ width: `${maximum()}px` }}
94
88
  >
95
- <ResizablePanel
96
- minSize={isRight() ? 0 : minimum() / maximum()}
97
- maxSize={1}
98
- aria-hidden="true"
99
- />
100
- <ResizableHandle
101
- withHandle={props.grip === 'chip' ? true : 'rung'}
102
- label={props.label ?? `Resize ${props.side} pane`}
89
+ <div
90
+ role="separator"
91
+ tabIndex={0}
92
+ aria-orientation="vertical"
93
+ aria-label={props.label ?? `Resize ${props.side} pane`}
103
94
  aria-controls={props.controls}
104
95
  aria-valuemin={minimum()}
105
96
  aria-valuemax={maximum()}
106
97
  aria-valuenow={value()}
107
98
  aria-valuetext={`${value()} pixels`}
108
99
  data-dragging={drag() ? '' : undefined}
109
- onHandleDragStart={(event) => {
110
- // Corvu checks defaultPrevented before starting its global handler.
111
- event.preventDefault()
100
+ style={{ left: `${isRight() ? maximum() - value() : value()}px` }}
101
+ class={cn(
102
+ 'group/resize bg-border pointer-events-auto absolute inset-y-0 flex w-px items-center justify-center',
103
+ /* Widen the hit target without moving the visual line: 24px on the
104
+ drag axis meets WCAG 2.5.8's minimum target. */
105
+ 'after:absolute after:inset-y-0 after:-inset-x-3 after:w-6',
106
+ 'transition-colors ease-out focus-visible:bg-primary focus-visible:outline-none',
107
+ props.grip === 'chip' ? 'hover:bg-primary' : 'hover:bg-primary/45'
108
+ )}
109
+ onPointerDown={(event) => {
112
110
  if (event.button !== 0 || !event.isPrimary) return
113
111
  const handle = event.currentTarget
114
- if (!(handle instanceof HTMLElement)) return
115
112
  endPointer(false)
116
113
  interacting = false
117
114
  handle.focus()
@@ -123,7 +120,7 @@ export function PixelResizeHandle(props: PixelResizeHandleProps) {
123
120
  handle,
124
121
  })
125
122
  }}
126
- onPointerMove={(event: PointerEvent) => {
123
+ onPointerMove={(event) => {
127
124
  const current = drag()
128
125
  if (!current || event.pointerId !== current.pointerId) return
129
126
  if (!current.handle.hasPointerCapture(current.pointerId)) {
@@ -131,19 +128,15 @@ export function PixelResizeHandle(props: PixelResizeHandleProps) {
131
128
  return
132
129
  }
133
130
  const delta = (event.clientX - current.startX) * (isRight() ? -1 : 1)
134
- const next = Math.min(
135
- maximum(),
136
- Math.max(minimum(), Math.round(current.startValue + delta))
137
- )
138
- if (next !== value()) props.onChange(next)
131
+ move(bounded(current.startValue + delta))
139
132
  }}
140
- onPointerUp={(event: PointerEvent) => {
133
+ onPointerUp={(event) => {
141
134
  if (event.pointerId === drag()?.pointerId) endPointer(true)
142
135
  }}
143
- onPointerCancel={(event: PointerEvent) => {
136
+ onPointerCancel={(event) => {
144
137
  if (event.pointerId === drag()?.pointerId) endPointer(false)
145
138
  }}
146
- onLostPointerCapture={(event: PointerEvent) => {
139
+ onLostPointerCapture={(event) => {
147
140
  if (event.pointerId === drag()?.pointerId) endPointer(false)
148
141
  }}
149
142
  onBlur={() => {
@@ -157,26 +150,32 @@ export function PixelResizeHandle(props: PixelResizeHandleProps) {
157
150
  event.preventDefault()
158
151
  return
159
152
  }
160
- if (['ArrowLeft', 'ArrowRight', 'Home', 'End'].includes(event.key)) interacting = true
161
- // Corvu operates on physical panel order. Home/End here describe
162
- // the controlled pane width, including a pane after the separator.
163
- if (event.key === 'Home' || event.key === 'End') {
153
+ const direction = KEY_DIRECTION[event.key]
154
+ if (direction !== undefined) {
164
155
  event.preventDefault()
165
- props.onChange(event.key === 'Home' ? minimum() : maximum())
156
+ interacting = true
157
+ move(bounded(value() + direction * (isRight() ? -1 : 1) * (props.step ?? 16)))
158
+ } else if (event.key === 'Home' || event.key === 'End') {
159
+ event.preventDefault()
160
+ interacting = true
161
+ move(event.key === 'Home' ? minimum() : maximum())
166
162
  }
167
163
  }}
168
164
  onKeyUp={(event) => {
169
- if (['ArrowLeft', 'ArrowRight', 'Home', 'End'].includes(event.key)) {
170
- endKeyboard()
171
- }
165
+ if (['ArrowLeft', 'ArrowRight', 'Home', 'End'].includes(event.key)) endKeyboard()
172
166
  }}
173
- class="pointer-events-auto"
174
- />
175
- <ResizablePanel
176
- minSize={isRight() ? minimum() / maximum() : 0}
177
- maxSize={1}
178
- aria-hidden="true"
179
- />
180
- </ResizablePanelGroup>
167
+ >
168
+ {props.grip === 'chip' ? (
169
+ <div class="bg-border z-(--z-docked) flex h-4 w-2.5 items-center justify-center rounded-sm border border-border">
170
+ <GripVertical class="size-2.5 text-muted-foreground" />
171
+ </div>
172
+ ) : (
173
+ <div
174
+ data-slot="resizable-grip"
175
+ class="z-(--z-docked) h-11 w-1.5 flex-none rounded-full bg-border/55"
176
+ />
177
+ )}
178
+ </div>
179
+ </div>
181
180
  )
182
181
  }
@@ -1,5 +1,4 @@
1
- import Resizable from '@corvu/resizable'
2
- import { type Accessor, type JSX } from 'solid-js'
1
+ import { createSignal, type Accessor, type JSX } from 'solid-js'
3
2
  import {
4
3
  listLeaves,
5
4
  MIN_SPLIT_RATIO,
@@ -17,50 +16,92 @@ export type SplitLayoutResizeControllerProps<L extends SplitLayoutLeaf> = {
17
16
  onResize: (splitId: string, ratio: number) => void
18
17
  }
19
18
 
20
- /** Corvu stays behind the first real split while the pane owners remain mounted. */
19
+ const KEYBOARD_DELTA = 0.05
20
+
21
+ /** The divider stays behind the first real split while the pane owners remain mounted. */
21
22
  export default function SplitLayoutResizeController<L extends SplitLayoutLeaf>(
22
23
  props: SplitLayoutResizeControllerProps<L>
23
24
  ) {
24
- const id = () => props.branch().id
25
+ const [container, setContainer] = createSignal<HTMLDivElement>()
26
+ let activePointer: number | undefined
27
+ const horizontal = () => props.branch().direction === 'row'
28
+
29
+ const resizeTo = (ratio: number) => {
30
+ // A hidden or detached host reports no usable geometry; that is not
31
+ // user resize intent.
32
+ const root = props.root()
33
+ if (!root?.isConnected || root.getClientRects().length === 0) return
34
+ const next = Math.min(MAX_SPLIT_RATIO, Math.max(MIN_SPLIT_RATIO, ratio))
35
+ if (Number.isFinite(next) && Math.abs(next - props.branch().ratio) > 0.000001)
36
+ props.onResize(props.branch().id, next)
37
+ }
38
+ const stopDrag = (handle: HTMLElement, event: PointerEvent) => {
39
+ if (activePointer !== event.pointerId) return
40
+ activePointer = undefined
41
+ handle.removeAttribute('data-dragging')
42
+ if (handle.hasPointerCapture(event.pointerId)) handle.releasePointerCapture(event.pointerId)
43
+ }
44
+
25
45
  return (
26
- <Resizable
27
- orientation={props.branch().direction === 'row' ? 'horizontal' : 'vertical'}
28
- sizes={[props.branch().ratio, 1 - props.branch().ratio]}
29
- keyboardDelta={0.05}
30
- onSizesChange={(sizes) => {
31
- // Corvu also reports panel registration/unregistration while
32
- // mounting or disposing a controller. Those incomplete or
33
- // hidden-host sizes are not user resize intent.
34
- const root = props.root()
35
- if (!root?.isConnected || root.getClientRects().length === 0) return
36
- if (
37
- sizes.length !== 2 ||
38
- sizes.some((size) => !Number.isFinite(size)) ||
39
- Math.abs(sizes[0]! + sizes[1]! - 1) > 0.000001
40
- )
41
- return
42
- if (sizes[0] !== undefined && Math.abs(sizes[0] - props.branch().ratio) > 0.000001)
43
- props.onResize(id(), sizes[0])
44
- }}
46
+ <div
47
+ ref={setContainer}
45
48
  style={props.rect()}
46
- class="pointer-events-none absolute flex min-h-0 min-w-0 data-[orientation=vertical]:flex-col"
49
+ class="pointer-events-none absolute min-h-0 min-w-0"
47
50
  >
48
- <Resizable.Panel minSize={MIN_SPLIT_RATIO} maxSize={MAX_SPLIT_RATIO} aria-hidden="true" />
49
- <Resizable.Handle
51
+ <div
52
+ role="separator"
53
+ tabIndex={0}
54
+ data-split-layout-handle=""
55
+ data-orientation={horizontal() ? 'horizontal' : 'vertical'}
50
56
  aria-label={
51
57
  props.labelForSeparator?.(props.branch()) ??
52
- (props.branch().direction === 'row' ? 'Resize pane columns' : 'Resize pane rows')
58
+ (horizontal() ? 'Resize pane columns' : 'Resize pane rows')
53
59
  }
54
- aria-orientation={props.branch().direction === 'row' ? 'vertical' : 'horizontal'}
60
+ aria-orientation={horizontal() ? 'vertical' : 'horizontal'}
55
61
  aria-controls={listLeaves(props.branch())
56
62
  .map((leaf) => props.domId(leaf.id))
57
63
  .join(' ')}
58
64
  aria-valuemin={10}
59
65
  aria-valuemax={90}
60
66
  aria-valuenow={Math.round(props.branch().ratio * 100)}
61
- class="pointer-events-auto relative w-px shrink-0 bg-border after:absolute after:inset-y-0 after:-inset-x-1 after:w-3 focus-visible:bg-primary focus-visible:outline-none hover:bg-primary data-[orientation=vertical]:h-px data-[orientation=vertical]:w-full data-[orientation=vertical]:after:inset-x-0 data-[orientation=vertical]:after:-inset-y-1 data-[orientation=vertical]:after:h-3 data-[orientation=vertical]:after:w-full"
67
+ style={
68
+ horizontal()
69
+ ? { left: `${props.branch().ratio * 100}%`, top: 0, bottom: 0, width: '1px' }
70
+ : { top: `${props.branch().ratio * 100}%`, left: 0, right: 0, height: '1px' }
71
+ }
72
+ onKeyDown={(event) => {
73
+ const forward = horizontal() ? 'ArrowRight' : 'ArrowDown'
74
+ const backward = horizontal() ? 'ArrowLeft' : 'ArrowUp'
75
+ const current = props.branch().ratio
76
+ let next: number
77
+ if (event.key === forward) next = current + KEYBOARD_DELTA
78
+ else if (event.key === backward) next = current - KEYBOARD_DELTA
79
+ else if (event.key === 'Home') next = MIN_SPLIT_RATIO
80
+ else if (event.key === 'End') next = MAX_SPLIT_RATIO
81
+ else return
82
+ event.preventDefault()
83
+ resizeTo(next)
84
+ }}
85
+ onPointerDown={(event) => {
86
+ if (event.button !== 0 || activePointer !== undefined) return
87
+ activePointer = event.pointerId
88
+ event.currentTarget.setPointerCapture(event.pointerId)
89
+ event.currentTarget.setAttribute('data-dragging', '')
90
+ event.preventDefault()
91
+ }}
92
+ onPointerMove={(event) => {
93
+ const element = container()
94
+ if (activePointer !== event.pointerId || !element) return
95
+ const box = element.getBoundingClientRect()
96
+ const size = horizontal() ? box.width : box.height
97
+ if (size <= 0) return
98
+ resizeTo((horizontal() ? event.clientX - box.left : event.clientY - box.top) / size)
99
+ }}
100
+ onPointerUp={(event) => stopDrag(event.currentTarget, event)}
101
+ onPointerCancel={(event) => stopDrag(event.currentTarget, event)}
102
+ onLostPointerCapture={(event) => stopDrag(event.currentTarget, event)}
103
+ class="pointer-events-auto absolute shrink-0 bg-border after:absolute after:inset-y-0 after:-inset-x-1 after:w-3 focus-visible:bg-primary focus-visible:outline-none hover:bg-primary data-[orientation=vertical]:after:inset-x-0 data-[orientation=vertical]:after:-inset-y-1 data-[orientation=vertical]:after:h-3 data-[orientation=vertical]:after:w-full"
62
104
  />
63
- <Resizable.Panel minSize={MIN_SPLIT_RATIO} maxSize={MAX_SPLIT_RATIO} aria-hidden="true" />
64
- </Resizable>
105
+ </div>
65
106
  )
66
107
  }