@adea-ai/ui 0.123.0 → 0.123.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/layout/split-layout/resize-controller-core-retry.d.ts +13 -0
- package/dist/components/layout/split-layout/resize-controller-core-retry.d.ts.map +1 -0
- package/dist/components/layout/split-layout/resize-controller-core-retry.js +63 -0
- package/dist/components/layout/split-layout/resize-controller-core-retry.js.map +1 -0
- package/dist/components/layout/split-layout/resize-controller-core.d.ts +13 -0
- package/dist/components/layout/split-layout/resize-controller-core.d.ts.map +1 -0
- package/dist/components/layout/split-layout/resize-controller-core.js +63 -0
- package/dist/components/layout/split-layout/resize-controller-core.js.map +1 -0
- package/dist/components/layout/split-layout/resize-controller-retry-2.d.ts +3 -0
- package/dist/components/layout/split-layout/resize-controller-retry-2.d.ts.map +1 -0
- package/dist/components/layout/split-layout/resize-controller-retry-2.js +2 -0
- package/dist/components/layout/split-layout/resize-controller-retry.d.ts +2 -0
- package/dist/components/layout/split-layout/resize-controller-retry.d.ts.map +1 -0
- package/dist/components/layout/split-layout/resize-controller-retry.js +2 -0
- package/dist/components/layout/split-layout/resize-controller.d.ts +2 -0
- package/dist/components/layout/split-layout/resize-controller.d.ts.map +1 -0
- package/dist/components/layout/split-layout/resize-controller.js +2 -0
- package/dist/components/layout/split-layout/split-layout.d.ts.map +1 -1
- package/dist/components/layout/split-layout/split-layout.js +171 -60
- package/dist/components/layout/split-layout/split-layout.js.map +1 -1
- package/dist/r/registry.json +26 -0
- package/dist/r/split-layout.json +26 -0
- package/dist/r/src/components/layout/split-layout/resize-controller-core-retry.tsx +66 -0
- package/dist/r/src/components/layout/split-layout/resize-controller-core.tsx +66 -0
- package/dist/r/src/components/layout/split-layout/resize-controller-retry-2.tsx +2 -0
- package/dist/r/src/components/layout/split-layout/resize-controller-retry.tsx +1 -0
- package/dist/r/src/components/layout/split-layout/resize-controller.tsx +1 -0
- package/dist/r/src/components/layout/split-layout/split-layout.tsx +197 -49
- package/package.json +1 -1
- package/registry.json +26 -0
- package/src/components/layout/split-layout/resize-controller-core-retry.tsx +66 -0
- package/src/components/layout/split-layout/resize-controller-core.tsx +66 -0
- package/src/components/layout/split-layout/resize-controller-retry-2.tsx +2 -0
- package/src/components/layout/split-layout/resize-controller-retry.tsx +1 -0
- package/src/components/layout/split-layout/resize-controller.tsx +1 -0
- package/src/components/layout/split-layout/split-layout.tsx +197 -49
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"split-layout.js","names":["Resizable","For","createMemo","createComputed","createUniqueId","createSignal","onCleanup","on","Accessor","JSX","X","GripVertical","ActionButton","cn","computeLayoutFrames","LayoutRect","paneDropIntent","PaneDropIntent","PANE_DRAG_TYPE","DRAG_PREVIEW_MAX_WIDTH","DRAG_PREVIEW_MAX_HEIGHT","listLeaves","MIN_SPLIT_RATIO","MAX_SPLIT_RATIO","SplitLayoutBranch","SplitLayoutLeaf","SplitLayoutState","SplitLayoutProps","state","L","label","labelForLeaf","leaf","renderLeaf","Element","renderPaneLabel","paneTabIndex","labelForSeparator","branch","onResize","splitId","ratio","onFocus","leafId","onClose","onMove","targetId","intent","renderPaneActions","class","rectStyle","rect","CSSProperties","left","x","top","y","width","height","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","props","root","HTMLDivElement","pendingFrame","refs","Map","domIds","prefix","nextDomId","nextDragId","dragPreview","drag","setDrag","id","token","drop","setDrop","clearDrag","remove","createDragPreview","preview","inert","body","domId","existing","get","created","set","leaves","center","leafMap","map","frames","branches","values","flatMap","frame","node","kind","current","has","target","allowedTarget","transfer","DataTransfer","types","dropLabel","placement","branchMap","schedule","action","cancelAnimationFrame","requestAnimationFrame","active","ownerDocument","activeElement","contains","field","HTMLTextAreaElement","HTMLInputElement","selection","start","selectionStart","end","selectionEnd","direction","selectionDirection","isConnected","focus","preventScroll","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","addEventListener","event","dataTransfer","clientX","clientY","currentTarget","getBoundingClientRect","accepted","getData","preventDefault","relatedTarget","dropEffect","_$setAttribute","setData","effectAllowed","setDragImage","previewFrame","scaleX","scaleY","_c$","_$memo","_c$2","variant","aria-label","tooltip","onClick","_c$3","_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","orientation","sizes","keyboardDelta","onSizesChange","getClientRects","some","Number","isFinite","abs","style","Panel","minSize","maxSize","Handle","aria-orientation","aria-controls","join","aria-valuenow","_v$","_v$2","_v$3","_$delegateEvents","_$createComponent","_$memo","_$className","_$setAttribute","_$style","_$delegateEvents"],"sources":["../../../../src/components/layout/split-layout/split-layout.tsx"],"sourcesContent":["import Resizable from '@corvu/resizable'\nimport {\n For,\n createMemo,\n createComputed,\n createUniqueId,\n createSignal,\n onCleanup,\n on,\n type Accessor,\n type JSX,\n} from 'solid-js'\nimport { X, GripVertical } from 'lucide-solid'\nimport { ActionButton } from '../../composites/action-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 MIN_SPLIT_RATIO,\n MAX_SPLIT_RATIO,\n type SplitLayoutBranch,\n type SplitLayoutLeaf,\n type SplitLayoutState,\n} from './model'\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 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 const refs = new Map<string, HTMLElement>()\n const domIds = new Map<string, string>()\n const prefix = createUniqueId()\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 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 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 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 </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 return (\n <Resizable\n orientation={branch().direction === 'row' ? 'horizontal' : 'vertical'}\n sizes={[branch().ratio, 1 - branch().ratio]}\n keyboardDelta={0.05}\n onSizesChange={(sizes) => {\n // Corvu also reports panel registration/unregistration while\n // mounting or disposing a controller. Those incomplete or\n // hidden-host sizes are not user resize intent.\n if (!root?.isConnected || root.getClientRects().length === 0) return\n if (\n sizes.length !== 2 ||\n sizes.some((size) => !Number.isFinite(size)) ||\n Math.abs(sizes[0]! + sizes[1]! - 1) > 0.000001\n )\n return\n if (sizes[0] !== undefined && Math.abs(sizes[0] - branch().ratio) > 0.000001)\n props.onResize(id, sizes[0])\n }}\n style={rectStyle(frames().get(id)?.rect ?? { x: 0, y: 0, width: 0, height: 0 })}\n class=\"pointer-events-none absolute flex min-h-0 min-w-0 data-[orientation=vertical]:flex-col\"\n >\n <Resizable.Panel\n minSize={MIN_SPLIT_RATIO}\n maxSize={MAX_SPLIT_RATIO}\n aria-hidden=\"true\"\n />\n <Resizable.Handle\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 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\"\n />\n <Resizable.Panel\n minSize={MIN_SPLIT_RATIO}\n maxSize={MAX_SPLIT_RATIO}\n aria-hidden=\"true\"\n />\n </Resizable>\n )\n }}\n </For>\n </div>\n )\n}\n"],"mappings":";;;;;;;;;;;;;AAkBA,IAAMkB,iBAAiB;AACvB,IAAMC,yBAAyB;AAC/B,IAAMC,0BAA0B;AAiChC,SAAS8B,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,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AK,IAAI,KAAKvC,KAAAA,GAASyM,OAC/BlR,GAAG,sEAAsEqG,MAAMjE,KAAK;GAAC4O,QAAA5C,IAAAc,KAAAjC,aAAAlC,MAAA,cAAAqD,IAAAc,IAAA8B,GAAA;GAAAC,SAAA7C,IAAAe,KAAAlC,aAAAlC,MAAA,iBAAAqD,IAAAe,IAAA8B,IAAA;GAAAC,SAAA9C,IAAAgB,KAAAjB,UAAApD,MAAAqD,IAAAgB,IAAA8B,IAAA;GAAA,OAAA9C;EAAA,GAAA;GAAAc,GAAAzK,KAAAA;GAAA0K,GAAA1K,KAAAA;GAAA2K,GAAA3K,KAAAA;EAAA,CAAA;EAAA,OAAAsG;CAAA,EAAA,CAAA;AA4MlG;AAACoG,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; 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,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,oBAAoBlB,OAAeC,QAAgB;CAC1D,MAAMkB,cAAcC,KAAKC,IAAI,GAAGrB,KAAK;CACrC,MAAMsB,eAAeF,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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"}
|
package/dist/r/registry.json
CHANGED
|
@@ -1811,6 +1811,7 @@
|
|
|
1811
1811
|
],
|
|
1812
1812
|
"registryDependencies": [
|
|
1813
1813
|
"@adea-ai/ui/action-button",
|
|
1814
|
+
"@adea-ai/ui/button",
|
|
1814
1815
|
"lib"
|
|
1815
1816
|
],
|
|
1816
1817
|
"files": [
|
|
@@ -1834,6 +1835,31 @@
|
|
|
1834
1835
|
"type": "registry:ui",
|
|
1835
1836
|
"target": "components/layout/split-layout/model.ts"
|
|
1836
1837
|
},
|
|
1838
|
+
{
|
|
1839
|
+
"path": "src/components/layout/split-layout/resize-controller-core-retry.tsx",
|
|
1840
|
+
"type": "registry:ui",
|
|
1841
|
+
"target": "components/layout/split-layout/resize-controller-core-retry.tsx"
|
|
1842
|
+
},
|
|
1843
|
+
{
|
|
1844
|
+
"path": "src/components/layout/split-layout/resize-controller-core.tsx",
|
|
1845
|
+
"type": "registry:ui",
|
|
1846
|
+
"target": "components/layout/split-layout/resize-controller-core.tsx"
|
|
1847
|
+
},
|
|
1848
|
+
{
|
|
1849
|
+
"path": "src/components/layout/split-layout/resize-controller-retry-2.tsx",
|
|
1850
|
+
"type": "registry:ui",
|
|
1851
|
+
"target": "components/layout/split-layout/resize-controller-retry-2.tsx"
|
|
1852
|
+
},
|
|
1853
|
+
{
|
|
1854
|
+
"path": "src/components/layout/split-layout/resize-controller-retry.tsx",
|
|
1855
|
+
"type": "registry:ui",
|
|
1856
|
+
"target": "components/layout/split-layout/resize-controller-retry.tsx"
|
|
1857
|
+
},
|
|
1858
|
+
{
|
|
1859
|
+
"path": "src/components/layout/split-layout/resize-controller.tsx",
|
|
1860
|
+
"type": "registry:ui",
|
|
1861
|
+
"target": "components/layout/split-layout/resize-controller.tsx"
|
|
1862
|
+
},
|
|
1837
1863
|
{
|
|
1838
1864
|
"path": "src/components/layout/split-layout/split-layout.tsx",
|
|
1839
1865
|
"type": "registry:ui",
|
package/dist/r/split-layout.json
CHANGED
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
],
|
|
10
10
|
"registryDependencies": [
|
|
11
11
|
"@adea-ai/ui/action-button",
|
|
12
|
+
"@adea-ai/ui/button",
|
|
12
13
|
"lib"
|
|
13
14
|
],
|
|
14
15
|
"files": [
|
|
@@ -32,6 +33,31 @@
|
|
|
32
33
|
"type": "registry:ui",
|
|
33
34
|
"target": "components/layout/split-layout/model.ts"
|
|
34
35
|
},
|
|
36
|
+
{
|
|
37
|
+
"path": "src/components/layout/split-layout/resize-controller-core-retry.tsx",
|
|
38
|
+
"type": "registry:ui",
|
|
39
|
+
"target": "components/layout/split-layout/resize-controller-core-retry.tsx"
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"path": "src/components/layout/split-layout/resize-controller-core.tsx",
|
|
43
|
+
"type": "registry:ui",
|
|
44
|
+
"target": "components/layout/split-layout/resize-controller-core.tsx"
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"path": "src/components/layout/split-layout/resize-controller-retry-2.tsx",
|
|
48
|
+
"type": "registry:ui",
|
|
49
|
+
"target": "components/layout/split-layout/resize-controller-retry-2.tsx"
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"path": "src/components/layout/split-layout/resize-controller-retry.tsx",
|
|
53
|
+
"type": "registry:ui",
|
|
54
|
+
"target": "components/layout/split-layout/resize-controller-retry.tsx"
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"path": "src/components/layout/split-layout/resize-controller.tsx",
|
|
58
|
+
"type": "registry:ui",
|
|
59
|
+
"target": "components/layout/split-layout/resize-controller.tsx"
|
|
60
|
+
},
|
|
35
61
|
{
|
|
36
62
|
"path": "src/components/layout/split-layout/split-layout.tsx",
|
|
37
63
|
"type": "registry:ui",
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import Resizable from '@corvu/resizable'
|
|
2
|
+
import { type Accessor, type JSX } from 'solid-js'
|
|
3
|
+
import {
|
|
4
|
+
listLeaves,
|
|
5
|
+
MIN_SPLIT_RATIO,
|
|
6
|
+
MAX_SPLIT_RATIO,
|
|
7
|
+
type SplitLayoutBranch,
|
|
8
|
+
type SplitLayoutLeaf,
|
|
9
|
+
} from './model'
|
|
10
|
+
|
|
11
|
+
export type SplitLayoutResizeControllerProps<L extends SplitLayoutLeaf> = {
|
|
12
|
+
branch: Accessor<SplitLayoutBranch<L>>
|
|
13
|
+
rect: Accessor<JSX.CSSProperties>
|
|
14
|
+
domId: (id: string) => string
|
|
15
|
+
root: () => HTMLDivElement | undefined
|
|
16
|
+
labelForSeparator?: (branch: SplitLayoutBranch<L>) => string
|
|
17
|
+
onResize: (splitId: string, ratio: number) => void
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/** Corvu stays behind the first real split while the pane owners remain mounted. */
|
|
21
|
+
export default function SplitLayoutResizeController<L extends SplitLayoutLeaf>(
|
|
22
|
+
props: SplitLayoutResizeControllerProps<L>
|
|
23
|
+
) {
|
|
24
|
+
const id = () => props.branch().id
|
|
25
|
+
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
|
+
}}
|
|
45
|
+
style={props.rect()}
|
|
46
|
+
class="pointer-events-none absolute flex min-h-0 min-w-0 data-[orientation=vertical]:flex-col"
|
|
47
|
+
>
|
|
48
|
+
<Resizable.Panel minSize={MIN_SPLIT_RATIO} maxSize={MAX_SPLIT_RATIO} aria-hidden="true" />
|
|
49
|
+
<Resizable.Handle
|
|
50
|
+
aria-label={
|
|
51
|
+
props.labelForSeparator?.(props.branch()) ??
|
|
52
|
+
(props.branch().direction === 'row' ? 'Resize pane columns' : 'Resize pane rows')
|
|
53
|
+
}
|
|
54
|
+
aria-orientation={props.branch().direction === 'row' ? 'vertical' : 'horizontal'}
|
|
55
|
+
aria-controls={listLeaves(props.branch())
|
|
56
|
+
.map((leaf) => props.domId(leaf.id))
|
|
57
|
+
.join(' ')}
|
|
58
|
+
aria-valuemin={10}
|
|
59
|
+
aria-valuemax={90}
|
|
60
|
+
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"
|
|
62
|
+
/>
|
|
63
|
+
<Resizable.Panel minSize={MIN_SPLIT_RATIO} maxSize={MAX_SPLIT_RATIO} aria-hidden="true" />
|
|
64
|
+
</Resizable>
|
|
65
|
+
)
|
|
66
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import Resizable from '@corvu/resizable'
|
|
2
|
+
import { type Accessor, type JSX } from 'solid-js'
|
|
3
|
+
import {
|
|
4
|
+
listLeaves,
|
|
5
|
+
MIN_SPLIT_RATIO,
|
|
6
|
+
MAX_SPLIT_RATIO,
|
|
7
|
+
type SplitLayoutBranch,
|
|
8
|
+
type SplitLayoutLeaf,
|
|
9
|
+
} from './model'
|
|
10
|
+
|
|
11
|
+
export type SplitLayoutResizeControllerProps<L extends SplitLayoutLeaf> = {
|
|
12
|
+
branch: Accessor<SplitLayoutBranch<L>>
|
|
13
|
+
rect: Accessor<JSX.CSSProperties>
|
|
14
|
+
domId: (id: string) => string
|
|
15
|
+
root: () => HTMLDivElement | undefined
|
|
16
|
+
labelForSeparator?: (branch: SplitLayoutBranch<L>) => string
|
|
17
|
+
onResize: (splitId: string, ratio: number) => void
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/** Corvu stays behind the first real split while the pane owners remain mounted. */
|
|
21
|
+
export default function SplitLayoutResizeController<L extends SplitLayoutLeaf>(
|
|
22
|
+
props: SplitLayoutResizeControllerProps<L>
|
|
23
|
+
) {
|
|
24
|
+
const id = () => props.branch().id
|
|
25
|
+
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
|
+
}}
|
|
45
|
+
style={props.rect()}
|
|
46
|
+
class="pointer-events-none absolute flex min-h-0 min-w-0 data-[orientation=vertical]:flex-col"
|
|
47
|
+
>
|
|
48
|
+
<Resizable.Panel minSize={MIN_SPLIT_RATIO} maxSize={MAX_SPLIT_RATIO} aria-hidden="true" />
|
|
49
|
+
<Resizable.Handle
|
|
50
|
+
aria-label={
|
|
51
|
+
props.labelForSeparator?.(props.branch()) ??
|
|
52
|
+
(props.branch().direction === 'row' ? 'Resize pane columns' : 'Resize pane rows')
|
|
53
|
+
}
|
|
54
|
+
aria-orientation={props.branch().direction === 'row' ? 'vertical' : 'horizontal'}
|
|
55
|
+
aria-controls={listLeaves(props.branch())
|
|
56
|
+
.map((leaf) => props.domId(leaf.id))
|
|
57
|
+
.join(' ')}
|
|
58
|
+
aria-valuemin={10}
|
|
59
|
+
aria-valuemax={90}
|
|
60
|
+
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"
|
|
62
|
+
/>
|
|
63
|
+
<Resizable.Panel minSize={MIN_SPLIT_RATIO} maxSize={MAX_SPLIT_RATIO} aria-hidden="true" />
|
|
64
|
+
</Resizable>
|
|
65
|
+
)
|
|
66
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './resize-controller-core'
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './resize-controller-core'
|