@adea-ai/ui 0.130.2 → 0.130.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/layout/pixel-resize-handle/pixel-resize-handle.js +1 -1
- package/dist/components/layout/pixel-resize-handle/pixel-resize-handle.js.map +1 -1
- package/dist/components/layout/split-layout/resize-controller-core-retry.js +1 -1
- package/dist/components/layout/split-layout/resize-controller-core-retry.js.map +1 -1
- package/dist/components/layout/split-layout/resize-controller-core.js +1 -1
- package/dist/components/layout/split-layout/resize-controller-core.js.map +1 -1
- package/dist/r/src/components/layout/pixel-resize-handle/pixel-resize-handle.tsx +1 -1
- package/dist/r/src/components/layout/split-layout/resize-controller-core-retry.tsx +1 -1
- package/dist/r/src/components/layout/split-layout/resize-controller-core.tsx +1 -1
- package/package.json +1 -1
- package/src/components/layout/pixel-resize-handle/pixel-resize-handle.tsx +1 -1
- package/src/components/layout/split-layout/resize-controller-core-retry.tsx +1 -1
- package/src/components/layout/split-layout/resize-controller-core.tsx +1 -1
|
@@ -129,7 +129,7 @@ function PixelResizeHandle(props) {
|
|
|
129
129
|
var _v$ = cn("pointer-events-none absolute inset-y-0", {
|
|
130
130
|
"left-0": props.side === "left",
|
|
131
131
|
"right-0": props.side === "right"
|
|
132
|
-
}, props.class), _v$2 = `${maximum()}px`, _v$3 = props.label ?? `Resize ${props.side} pane`, _v$4 = props.controls, _v$5 = minimum(), _v$6 = maximum(), _v$7 = value(), _v$8 = `${value()} pixels`, _v$9 = drag() ? "" : void 0, _v$0 = `${isRight() ? maximum() - value() : value()}px`, _v$1 = cn("group/resize bg-border pointer-events-auto absolute inset-y-0 flex w-px items-center justify-center", "after:absolute after:inset-y-0 after:-inset-x-3 after:w-6", "transition-colors ease-out focus-visible:bg-primary focus-visible:outline-none", props.grip === "chip" ? "hover:bg-primary" : "hover:bg-primary/45");
|
|
132
|
+
}, props.class), _v$2 = `${maximum()}px`, _v$3 = props.label ?? `Resize ${props.side} pane`, _v$4 = props.controls, _v$5 = minimum(), _v$6 = maximum(), _v$7 = value(), _v$8 = `${value()} pixels`, _v$9 = drag() ? "" : void 0, _v$0 = `${isRight() ? maximum() - value() : value()}px`, _v$1 = cn("group/resize bg-border pointer-events-auto absolute inset-y-0 flex w-px cursor-pointer items-center justify-center", "after:absolute after:inset-y-0 after:-inset-x-3 after:w-6", "transition-colors ease-out focus-visible:bg-primary focus-visible:outline-none", props.grip === "chip" ? "hover:bg-primary" : "hover:bg-primary/45");
|
|
133
133
|
_v$ !== _p$.e && className(_el$, _p$.e = _v$);
|
|
134
134
|
_v$2 !== _p$.t && setStyleProperty(_el$, "width", _p$.t = _v$2);
|
|
135
135
|
_v$3 !== _p$.a && setAttribute(_el$2, "aria-label", _p$.a = _v$3);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pixel-resize-handle.js","names":["GripVertical","createSignal","onCleanup","cn","PixelResizeHandleProps","side","value","minimum","maximum","step","label","controls","class","grip","onChange","onCommit","PixelResizeHandle","props","Math","max","min","round","isRight","bounded","next","commit","interacting","drag","setDrag","pointerId","startX","startValue","handle","HTMLElement","endPointer","shouldCommit","current","undefined","hasPointerCapture","releasePointerCapture","endKeyboard","wasInteracting","move","KEY_DIRECTION","Record","ArrowLeft","ArrowRight","_el$","_tmpl$","_el$2","firstChild","$$keyup","event","includes","key","$$keydown","preventDefault","direction","addEventListener","$$pointerup","$$pointermove","delta","clientX","$$pointerdown","button","isPrimary","currentTarget","focus","setPointerCapture","_$insert","_c$","_$memo","_el$3","_tmpl$2","_$createComponent","_tmpl$3","_$effect","_p$","_v$","_v$2","_v$3","_v$4","_v$5","_v$6","_v$7","_v$8","_v$9","_v$0","_v$1","e","_$className","t","_$setStyleProperty","a","_$setAttribute","o","i","n","s","h","r","d","l","_$delegateEvents","_$memo","_$createComponent","_$className","_$setStyleProperty","_$setAttribute","_$delegateEvents"],"sources":["../../../../src/components/layout/pixel-resize-handle/pixel-resize-handle.tsx"],"sourcesContent":["import { GripVertical } from 'lucide-solid'\nimport { createSignal, onCleanup } from 'solid-js'\nimport { cn } from '#lib/utils'\n\nexport type PixelResizeHandleProps = {\n /** Which physical edge of the ruler the resizable surface is attached to. */\n side: 'left' | 'right'\n /** Current width in CSS pixels. */\n value: number\n minimum: number\n maximum: number\n step?: number\n label?: string\n controls?: string\n class?: string\n /**\n * The grip drawn on the edge: the quieter rung by default, or the bordered\n * chip for hosts that want the heavier affordance.\n */\n grip?: 'chip' | 'rung'\n onChange(value: number): void\n onCommit?(value: number): void\n}\n\n/**\n * PixelResizeHandle.\n *\n * A keyboard- and pointer-operable edge ruler for a host-owned pane. Keep the\n * pane's actual width and any persistence in its layout owner; this component\n * reports a bounded pixel value and draws the grip at the matching left or\n * right edge.\n *\n * The ruler is a single separator positioned inside a box as wide as the\n * maximum, so it needs no panel-group geometry (and none of the split-layout\n * code that comes with one): arrow keys move it by `step` along its visual\n * edge, Home and End jump to the bounds, and a pointer drag is captured on the\n * handle so cancellation and lost capture end the gesture.\n */\nexport function PixelResizeHandle(props: PixelResizeHandleProps) {\n const maximum = () => Math.max(1, props.maximum)\n const minimum = () => Math.min(maximum(), Math.max(0, props.minimum))\n const value = () => Math.min(maximum(), Math.max(minimum(), Math.round(props.value)))\n const isRight = () => props.side === 'right'\n const bounded = (next: number) => Math.min(maximum(), Math.max(minimum(), Math.round(next)))\n const commit = () => props.onCommit?.(value())\n let interacting = false\n const [drag, setDrag] = createSignal<{\n pointerId: number\n startX: number\n startValue: number\n handle: HTMLElement\n }>()\n const endPointer = (shouldCommit: boolean) => {\n const current = drag()\n if (!current) return\n setDrag(undefined)\n if (current.handle.hasPointerCapture(current.pointerId))\n current.handle.releasePointerCapture(current.pointerId)\n if (shouldCommit) commit()\n }\n const endKeyboard = () => {\n const wasInteracting = interacting\n interacting = false\n if (wasInteracting) commit()\n }\n onCleanup(() => {\n endKeyboard()\n endPointer(false)\n })\n const move = (next: number) => {\n if (next !== value()) props.onChange(next)\n }\n // Arrow keys describe physical movement of the handle: on a right-edge pane\n // moving the handle left widens the pane.\n const KEY_DIRECTION: Record<string, number> = { ArrowLeft: -1, ArrowRight: 1 }\n\n return (\n <div\n class={cn(\n 'pointer-events-none absolute inset-y-0',\n {\n 'left-0': props.side === 'left',\n 'right-0': props.side === 'right',\n },\n props.class\n )}\n style={{ width: `${maximum()}px` }}\n >\n <div\n role=\"separator\"\n tabIndex={0}\n aria-orientation=\"vertical\"\n aria-label={props.label ?? `Resize ${props.side} pane`}\n aria-controls={props.controls}\n aria-valuemin={minimum()}\n aria-valuemax={maximum()}\n aria-valuenow={value()}\n aria-valuetext={`${value()} pixels`}\n data-dragging={drag() ? '' : undefined}\n style={{ left: `${isRight() ? maximum() - value() : value()}px` }}\n class={cn(\n 'group/resize bg-border pointer-events-auto absolute inset-y-0 flex w-px items-center justify-center',\n /* Widen the hit target without moving the visual line: 24px on the\n drag axis meets WCAG 2.5.8's minimum target. */\n 'after:absolute after:inset-y-0 after:-inset-x-3 after:w-6',\n 'transition-colors ease-out focus-visible:bg-primary focus-visible:outline-none',\n props.grip === 'chip' ? 'hover:bg-primary' : 'hover:bg-primary/45'\n )}\n onPointerDown={(event) => {\n if (event.button !== 0 || !event.isPrimary) return\n const handle = event.currentTarget\n endPointer(false)\n interacting = false\n handle.focus()\n handle.setPointerCapture(event.pointerId)\n setDrag({\n pointerId: event.pointerId,\n startX: event.clientX,\n startValue: value(),\n handle,\n })\n }}\n onPointerMove={(event) => {\n const current = drag()\n if (!current || event.pointerId !== current.pointerId) return\n if (!current.handle.hasPointerCapture(current.pointerId)) {\n endPointer(false)\n return\n }\n const delta = (event.clientX - current.startX) * (isRight() ? -1 : 1)\n move(bounded(current.startValue + delta))\n }}\n onPointerUp={(event) => {\n if (event.pointerId === drag()?.pointerId) endPointer(true)\n }}\n onPointerCancel={(event) => {\n if (event.pointerId === drag()?.pointerId) endPointer(false)\n }}\n onLostPointerCapture={(event) => {\n if (event.pointerId === drag()?.pointerId) endPointer(false)\n }}\n onBlur={() => {\n endKeyboard()\n endPointer(false)\n }}\n onKeyDown={(event) => {\n const current = drag()\n if (current && !current.handle.hasPointerCapture(current.pointerId)) endPointer(false)\n if (drag()) {\n event.preventDefault()\n return\n }\n const direction = KEY_DIRECTION[event.key]\n if (direction !== undefined) {\n event.preventDefault()\n interacting = true\n move(bounded(value() + direction * (isRight() ? -1 : 1) * (props.step ?? 16)))\n } else if (event.key === 'Home' || event.key === 'End') {\n event.preventDefault()\n interacting = true\n move(event.key === 'Home' ? minimum() : maximum())\n }\n }}\n onKeyUp={(event) => {\n if (['ArrowLeft', 'ArrowRight', 'Home', 'End'].includes(event.key)) endKeyboard()\n }}\n >\n {props.grip === 'chip' ? (\n <div class=\"bg-border z-(--z-docked) flex h-4 w-2.5 items-center justify-center rounded-sm border border-border\">\n <GripVertical class=\"size-2.5 text-muted-foreground\" />\n </div>\n ) : (\n <div\n data-slot=\"resizable-grip\"\n class=\"z-(--z-docked) h-11 w-1.5 flex-none rounded-full bg-border/55\"\n />\n )}\n </div>\n </div>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAsCA,SAAgBgB,kBAAkBC,OAA+B;CAC/D,MAAMT,gBAAgBU,KAAKC,IAAI,GAAGF,MAAMT,OAAO;CAC/C,MAAMD,gBAAgBW,KAAKE,IAAIZ,QAAQ,GAAGU,KAAKC,IAAI,GAAGF,MAAMV,OAAO,CAAC;CACpE,MAAMD,cAAcY,KAAKE,IAAIZ,QAAQ,GAAGU,KAAKC,IAAIZ,QAAQ,GAAGW,KAAKG,MAAMJ,MAAMX,KAAK,CAAC,CAAC;CACpF,MAAMgB,gBAAgBL,MAAMZ,SAAS;CACrC,MAAMkB,WAAWC,SAAiBN,KAAKE,IAAIZ,QAAQ,GAAGU,KAAKC,IAAIZ,QAAQ,GAAGW,KAAKG,MAAMG,IAAI,CAAC,CAAC;CAC3F,MAAMC,eAAeR,MAAMF,WAAWT,MAAM,CAAC;CAC7C,IAAIoB,cAAc;CA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A;GAAAC,SAAAR,IAAAsB,KAAAL,aAAA7C,OAAA,kBAAA4B,IAAAsB,IAAAd,IAAA;GAAAC,SAAAT,IAAAuB,KAAAN,aAAA7C,OAAA,iBAAA4B,IAAAuB,IAAAd,IAAA;GAAAC,SAAAV,IAAAwB,KAAAT,iBAAA3C,OAAA,QAAA4B,IAAAwB,IAAAd,IAAA;GAAAC,SAAAX,IAAAyB,KAAAZ,UAAAzC,OAAA4B,IAAAyB,IAAAd,IAAA;GAAA,OAAAX;EAAA,GAAA;GAAAY,GAAApD,KAAAA;GAAAsD,GAAAtD,KAAAA;GAAAwD,GAAAxD,KAAAA;GAAA0D,GAAA1D,KAAAA;GAAA2D,GAAA3D,KAAAA;GAAA4D,GAAA5D,KAAAA;GAAA6D,GAAA7D,KAAAA;GAAA8D,GAAA9D,KAAAA;GAAA+D,GAAA/D,KAAAA;GAAAgE,GAAAhE,KAAAA;GAAAiE,GAAAjE,KAAAA;EAAA,CAAA;EAAA,OAAAU;CAAA,EAAA,CAAA;AAyET;AAACwD,eAAA;CAAA;CAAA;CAAA;CAAA;CAAA;AAAA,CAAA"}
|
|
1
|
+
{"version":3,"file":"pixel-resize-handle.js","names":["GripVertical","createSignal","onCleanup","cn","PixelResizeHandleProps","side","value","minimum","maximum","step","label","controls","class","grip","onChange","onCommit","PixelResizeHandle","props","Math","max","min","round","isRight","bounded","next","commit","interacting","drag","setDrag","pointerId","startX","startValue","handle","HTMLElement","endPointer","shouldCommit","current","undefined","hasPointerCapture","releasePointerCapture","endKeyboard","wasInteracting","move","KEY_DIRECTION","Record","ArrowLeft","ArrowRight","_el$","_tmpl$","_el$2","firstChild","$$keyup","event","includes","key","$$keydown","preventDefault","direction","addEventListener","$$pointerup","$$pointermove","delta","clientX","$$pointerdown","button","isPrimary","currentTarget","focus","setPointerCapture","_$insert","_c$","_$memo","_el$3","_tmpl$2","_$createComponent","_tmpl$3","_$effect","_p$","_v$","_v$2","_v$3","_v$4","_v$5","_v$6","_v$7","_v$8","_v$9","_v$0","_v$1","e","_$className","t","_$setStyleProperty","a","_$setAttribute","o","i","n","s","h","r","d","l","_$delegateEvents","_$memo","_$createComponent","_$className","_$setStyleProperty","_$setAttribute","_$delegateEvents"],"sources":["../../../../src/components/layout/pixel-resize-handle/pixel-resize-handle.tsx"],"sourcesContent":["import { GripVertical } from 'lucide-solid'\nimport { createSignal, onCleanup } from 'solid-js'\nimport { cn } from '#lib/utils'\n\nexport type PixelResizeHandleProps = {\n /** Which physical edge of the ruler the resizable surface is attached to. */\n side: 'left' | 'right'\n /** Current width in CSS pixels. */\n value: number\n minimum: number\n maximum: number\n step?: number\n label?: string\n controls?: string\n class?: string\n /**\n * The grip drawn on the edge: the quieter rung by default, or the bordered\n * chip for hosts that want the heavier affordance.\n */\n grip?: 'chip' | 'rung'\n onChange(value: number): void\n onCommit?(value: number): void\n}\n\n/**\n * PixelResizeHandle.\n *\n * A keyboard- and pointer-operable edge ruler for a host-owned pane. Keep the\n * pane's actual width and any persistence in its layout owner; this component\n * reports a bounded pixel value and draws the grip at the matching left or\n * right edge.\n *\n * The ruler is a single separator positioned inside a box as wide as the\n * maximum, so it needs no panel-group geometry (and none of the split-layout\n * code that comes with one): arrow keys move it by `step` along its visual\n * edge, Home and End jump to the bounds, and a pointer drag is captured on the\n * handle so cancellation and lost capture end the gesture.\n */\nexport function PixelResizeHandle(props: PixelResizeHandleProps) {\n const maximum = () => Math.max(1, props.maximum)\n const minimum = () => Math.min(maximum(), Math.max(0, props.minimum))\n const value = () => Math.min(maximum(), Math.max(minimum(), Math.round(props.value)))\n const isRight = () => props.side === 'right'\n const bounded = (next: number) => Math.min(maximum(), Math.max(minimum(), Math.round(next)))\n const commit = () => props.onCommit?.(value())\n let interacting = false\n const [drag, setDrag] = createSignal<{\n pointerId: number\n startX: number\n startValue: number\n handle: HTMLElement\n }>()\n const endPointer = (shouldCommit: boolean) => {\n const current = drag()\n if (!current) return\n setDrag(undefined)\n if (current.handle.hasPointerCapture(current.pointerId))\n current.handle.releasePointerCapture(current.pointerId)\n if (shouldCommit) commit()\n }\n const endKeyboard = () => {\n const wasInteracting = interacting\n interacting = false\n if (wasInteracting) commit()\n }\n onCleanup(() => {\n endKeyboard()\n endPointer(false)\n })\n const move = (next: number) => {\n if (next !== value()) props.onChange(next)\n }\n // Arrow keys describe physical movement of the handle: on a right-edge pane\n // moving the handle left widens the pane.\n const KEY_DIRECTION: Record<string, number> = { ArrowLeft: -1, ArrowRight: 1 }\n\n return (\n <div\n class={cn(\n 'pointer-events-none absolute inset-y-0',\n {\n 'left-0': props.side === 'left',\n 'right-0': props.side === 'right',\n },\n props.class\n )}\n style={{ width: `${maximum()}px` }}\n >\n <div\n role=\"separator\"\n tabIndex={0}\n aria-orientation=\"vertical\"\n aria-label={props.label ?? `Resize ${props.side} pane`}\n aria-controls={props.controls}\n aria-valuemin={minimum()}\n aria-valuemax={maximum()}\n aria-valuenow={value()}\n aria-valuetext={`${value()} pixels`}\n data-dragging={drag() ? '' : undefined}\n style={{ left: `${isRight() ? maximum() - value() : value()}px` }}\n class={cn(\n 'group/resize bg-border pointer-events-auto absolute inset-y-0 flex w-px cursor-pointer items-center justify-center',\n /* Widen the hit target without moving the visual line: 24px on the\n drag axis meets WCAG 2.5.8's minimum target. */\n 'after:absolute after:inset-y-0 after:-inset-x-3 after:w-6',\n 'transition-colors ease-out focus-visible:bg-primary focus-visible:outline-none',\n props.grip === 'chip' ? 'hover:bg-primary' : 'hover:bg-primary/45'\n )}\n onPointerDown={(event) => {\n if (event.button !== 0 || !event.isPrimary) return\n const handle = event.currentTarget\n endPointer(false)\n interacting = false\n handle.focus()\n handle.setPointerCapture(event.pointerId)\n setDrag({\n pointerId: event.pointerId,\n startX: event.clientX,\n startValue: value(),\n handle,\n })\n }}\n onPointerMove={(event) => {\n const current = drag()\n if (!current || event.pointerId !== current.pointerId) return\n if (!current.handle.hasPointerCapture(current.pointerId)) {\n endPointer(false)\n return\n }\n const delta = (event.clientX - current.startX) * (isRight() ? -1 : 1)\n move(bounded(current.startValue + delta))\n }}\n onPointerUp={(event) => {\n if (event.pointerId === drag()?.pointerId) endPointer(true)\n }}\n onPointerCancel={(event) => {\n if (event.pointerId === drag()?.pointerId) endPointer(false)\n }}\n onLostPointerCapture={(event) => {\n if (event.pointerId === drag()?.pointerId) endPointer(false)\n }}\n onBlur={() => {\n endKeyboard()\n endPointer(false)\n }}\n onKeyDown={(event) => {\n const current = drag()\n if (current && !current.handle.hasPointerCapture(current.pointerId)) endPointer(false)\n if (drag()) {\n event.preventDefault()\n return\n }\n const direction = KEY_DIRECTION[event.key]\n if (direction !== undefined) {\n event.preventDefault()\n interacting = true\n move(bounded(value() + direction * (isRight() ? -1 : 1) * (props.step ?? 16)))\n } else if (event.key === 'Home' || event.key === 'End') {\n event.preventDefault()\n interacting = true\n move(event.key === 'Home' ? minimum() : maximum())\n }\n }}\n onKeyUp={(event) => {\n if (['ArrowLeft', 'ArrowRight', 'Home', 'End'].includes(event.key)) endKeyboard()\n }}\n >\n {props.grip === 'chip' ? (\n <div class=\"bg-border z-(--z-docked) flex h-4 w-2.5 items-center justify-center rounded-sm border border-border\">\n <GripVertical class=\"size-2.5 text-muted-foreground\" />\n </div>\n ) : (\n <div\n data-slot=\"resizable-grip\"\n class=\"z-(--z-docked) h-11 w-1.5 flex-none rounded-full bg-border/55\"\n />\n )}\n </div>\n </div>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAsCA,SAAgBgB,kBAAkBC,OAA+B;CAC/D,MAAMT,gBAAgBU,KAAKC,IAAI,GAAGF,MAAMT,OAAO;CAC/C,MAAMD,gBAAgBW,KAAKE,IAAIZ,QAAQ,GAAGU,KAAKC,IAAI,GAAGF,MAAMV,OAAO,CAAC;CACpE,MAAMD,cAAcY,KAAKE,IAAIZ,QAAQ,GAAGU,KAAKC,IAAIZ,QAAQ,GAAGW,KAAKG,MAAMJ,MAAMX,KAAK,CAAC,CAAC;CACpF,MAAMgB,gBAAgBL,MAAMZ,SAAS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aAAA7C,OAAA,iBAAA4B,IAAAmB,IAAAd,IAAA;GAAAC,SAAAN,IAAAoB,KAAAH,aAAA7C,OAAA,iBAAA4B,IAAAoB,IAAAd,IAAA;GAAAC,SAAAP,IAAAqB,KAAAJ,aAAA7C,OAAA,iBAAA4B,IAAAqB,IAAAd,IAAA;GAAAC,SAAAR,IAAAsB,KAAAL,aAAA7C,OAAA,kBAAA4B,IAAAsB,IAAAd,IAAA;GAAAC,SAAAT,IAAAuB,KAAAN,aAAA7C,OAAA,iBAAA4B,IAAAuB,IAAAd,IAAA;GAAAC,SAAAV,IAAAwB,KAAAT,iBAAA3C,OAAA,QAAA4B,IAAAwB,IAAAd,IAAA;GAAAC,SAAAX,IAAAyB,KAAAZ,UAAAzC,OAAA4B,IAAAyB,IAAAd,IAAA;GAAA,OAAAX;EAAA,GAAA;GAAAY,GAAApD,KAAAA;GAAAsD,GAAAtD,KAAAA;GAAAwD,GAAAxD,KAAAA;GAAA0D,GAAA1D,KAAAA;GAAA2D,GAAA3D,KAAAA;GAAA4D,GAAA5D,KAAAA;GAAA6D,GAAA7D,KAAAA;GAAA8D,GAAA9D,KAAAA;GAAA+D,GAAA/D,KAAAA;GAAAgE,GAAAhE,KAAAA;GAAAiE,GAAAjE,KAAAA;EAAA,CAAA;EAAA,OAAAU;CAAA,EAAA,CAAA;AAyET;AAACwD,eAAA;CAAA;CAAA;CAAA;CAAA;CAAA;AAAA,CAAA"}
|
|
@@ -2,7 +2,7 @@ import { MAX_SPLIT_RATIO, MIN_SPLIT_RATIO, listLeaves } from "./tree.js";
|
|
|
2
2
|
import { delegateEvents, effect, setAttribute, style, template, use } from "solid-js/web";
|
|
3
3
|
import { createSignal } from "solid-js";
|
|
4
4
|
//#region src/components/layout/split-layout/resize-controller-core-retry.tsx
|
|
5
|
-
var _tmpl$ = /*#__PURE__*/ template(`<div class="pointer-events-none absolute min-h-0 min-w-0"><div role=separator tabindex=0 data-split-layout-handle aria-valuemin=10 aria-valuemax=90 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">`);
|
|
5
|
+
var _tmpl$ = /*#__PURE__*/ template(`<div class="pointer-events-none absolute min-h-0 min-w-0"><div role=separator tabindex=0 data-split-layout-handle aria-valuemin=10 aria-valuemax=90 class="pointer-events-auto absolute shrink-0 cursor-pointer 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">`);
|
|
6
6
|
var KEYBOARD_DELTA = .05;
|
|
7
7
|
/** The divider stays behind the first real split while the pane owners remain mounted. */
|
|
8
8
|
function SplitLayoutResizeController(props) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resize-controller-core-retry.js","names":["createSignal","Accessor","JSX","listLeaves","MIN_SPLIT_RATIO","MAX_SPLIT_RATIO","SplitLayoutBranch","SplitLayoutLeaf","SplitLayoutResizeControllerProps","branch","L","rect","CSSProperties","domId","id","root","HTMLDivElement","labelForSeparator","onResize","splitId","ratio","KEYBOARD_DELTA","SplitLayoutResizeController","props","container","setContainer","activePointer","horizontal","direction","resizeTo","isConnected","getClientRects","length","next","Math","min","max","Number","isFinite","abs","stopDrag","handle","HTMLElement","event","PointerEvent","pointerId","undefined","removeAttribute","hasPointerCapture","releasePointerCapture","_el$","_tmpl$","_el$2","firstChild","_$use","addEventListener","currentTarget","$$pointerup","$$pointermove","element","box","getBoundingClientRect","size","width","height","clientX","left","clientY","top","$$pointerdown","button","setPointerCapture","setAttribute","preventDefault","$$keydown","forward","backward","current","key","_$effect","_p$","_v$","_v$2","_v$3","_v$4","_v$5","map","leaf","join","_v$6","round","_v$7","bottom","right","e","_$style","t","_$setAttribute","a","o","i","n","s","_$delegateEvents","_$style","_$setAttribute","_$delegateEvents"],"sources":["../../../../src/components/layout/split-layout/resize-controller-core-retry.tsx"],"sourcesContent":["import { createSignal, type Accessor, type JSX } from 'solid-js'\nimport {\n listLeaves,\n MIN_SPLIT_RATIO,\n MAX_SPLIT_RATIO,\n type SplitLayoutBranch,\n type SplitLayoutLeaf,\n} from './model'\n\nexport type SplitLayoutResizeControllerProps<L extends SplitLayoutLeaf> = {\n branch: Accessor<SplitLayoutBranch<L>>\n rect: Accessor<JSX.CSSProperties>\n domId: (id: string) => string\n root: () => HTMLDivElement | undefined\n labelForSeparator?: (branch: SplitLayoutBranch<L>) => string\n onResize: (splitId: string, ratio: number) => void\n}\n\nconst KEYBOARD_DELTA = 0.05\n\n/** The divider stays behind the first real split while the pane owners remain mounted. */\nexport default function SplitLayoutResizeController<L extends SplitLayoutLeaf>(\n props: SplitLayoutResizeControllerProps<L>\n) {\n const [container, setContainer] = createSignal<HTMLDivElement>()\n let activePointer: number | undefined\n const horizontal = () => props.branch().direction === 'row'\n\n const resizeTo = (ratio: number) => {\n // A hidden or detached host reports no usable geometry; that is not\n // user resize intent.\n const root = props.root()\n if (!root?.isConnected || root.getClientRects().length === 0) return\n const next = Math.min(MAX_SPLIT_RATIO, Math.max(MIN_SPLIT_RATIO, ratio))\n if (Number.isFinite(next) && Math.abs(next - props.branch().ratio) > 0.000001)\n props.onResize(props.branch().id, next)\n }\n const stopDrag = (handle: HTMLElement, event: PointerEvent) => {\n if (activePointer !== event.pointerId) return\n activePointer = undefined\n handle.removeAttribute('data-dragging')\n if (handle.hasPointerCapture(event.pointerId)) handle.releasePointerCapture(event.pointerId)\n }\n\n return (\n <div\n ref={setContainer}\n style={props.rect()}\n class=\"pointer-events-none absolute min-h-0 min-w-0\"\n >\n <div\n role=\"separator\"\n tabIndex={0}\n data-split-layout-handle=\"\"\n data-orientation={horizontal() ? 'horizontal' : 'vertical'}\n aria-label={\n props.labelForSeparator?.(props.branch()) ??\n (horizontal() ? 'Resize pane columns' : 'Resize pane rows')\n }\n aria-orientation={horizontal() ? 'vertical' : 'horizontal'}\n aria-controls={listLeaves(props.branch())\n .map((leaf) => props.domId(leaf.id))\n .join(' ')}\n aria-valuemin={10}\n aria-valuemax={90}\n aria-valuenow={Math.round(props.branch().ratio * 100)}\n style={\n horizontal()\n ? { left: `${props.branch().ratio * 100}%`, top: 0, bottom: 0, width: '1px' }\n : { top: `${props.branch().ratio * 100}%`, left: 0, right: 0, height: '1px' }\n }\n onKeyDown={(event) => {\n const forward = horizontal() ? 'ArrowRight' : 'ArrowDown'\n const backward = horizontal() ? 'ArrowLeft' : 'ArrowUp'\n const current = props.branch().ratio\n let next: number\n if (event.key === forward) next = current + KEYBOARD_DELTA\n else if (event.key === backward) next = current - KEYBOARD_DELTA\n else if (event.key === 'Home') next = MIN_SPLIT_RATIO\n else if (event.key === 'End') next = MAX_SPLIT_RATIO\n else return\n event.preventDefault()\n resizeTo(next)\n }}\n onPointerDown={(event) => {\n if (event.button !== 0 || activePointer !== undefined) return\n activePointer = event.pointerId\n event.currentTarget.setPointerCapture(event.pointerId)\n event.currentTarget.setAttribute('data-dragging', '')\n event.preventDefault()\n }}\n onPointerMove={(event) => {\n const element = container()\n if (activePointer !== event.pointerId || !element) return\n const box = element.getBoundingClientRect()\n const size = horizontal() ? box.width : box.height\n if (size <= 0) return\n resizeTo((horizontal() ? event.clientX - box.left : event.clientY - box.top) / size)\n }}\n onPointerUp={(event) => stopDrag(event.currentTarget, event)}\n onPointerCancel={(event) => stopDrag(event.currentTarget, event)}\n onLostPointerCapture={(event) => stopDrag(event.currentTarget, event)}\n 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: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itLayoutBranch","SplitLayoutLeaf","SplitLayoutResizeControllerProps","branch","L","rect","CSSProperties","domId","id","root","HTMLDivElement","labelForSeparator","onResize","splitId","ratio","KEYBOARD_DELTA","SplitLayoutResizeController","props","container","setContainer","activePointer","horizontal","direction","resizeTo","isConnected","getClientRects","length","next","Math","min","max","Number","isFinite","abs","stopDrag","handle","HTMLElement","event","PointerEvent","pointerId","undefined","removeAttribute","hasPointerCapture","releasePointerCapture","_el$","_tmpl$","_el$2","firstChild","_$use","addEventListener","currentTarget","$$pointerup","$$pointermove","element","box","getBoundingClientRect","size","width","height","clientX","left","clientY","top","$$pointerdown","button","setPointerCapture","setAttribute","preventDefault","$$keydown","forward","backward","current","key","_$effect","_p$","_v$","_v$2","_v$3","_v$4","_v$5","map","leaf","join","_v$6","round","_v$7","bottom","right","e","_$style","t","_$setAttribute","a","o","i","n","s","_$delegateEvents","_$style","_$setAttribute","_$delegateEvents"],"sources":["../../../../src/components/layout/split-layout/resize-controller-core-retry.tsx"],"sourcesContent":["import { createSignal, type Accessor, type JSX } from 'solid-js'\nimport {\n listLeaves,\n MIN_SPLIT_RATIO,\n MAX_SPLIT_RATIO,\n type SplitLayoutBranch,\n type SplitLayoutLeaf,\n} from './model'\n\nexport type SplitLayoutResizeControllerProps<L extends SplitLayoutLeaf> = {\n branch: Accessor<SplitLayoutBranch<L>>\n rect: Accessor<JSX.CSSProperties>\n domId: (id: string) => string\n root: () => HTMLDivElement | undefined\n labelForSeparator?: (branch: SplitLayoutBranch<L>) => string\n onResize: (splitId: string, ratio: number) => void\n}\n\nconst KEYBOARD_DELTA = 0.05\n\n/** The divider stays behind the first real split while the pane owners remain mounted. */\nexport default function SplitLayoutResizeController<L extends SplitLayoutLeaf>(\n props: SplitLayoutResizeControllerProps<L>\n) {\n const [container, setContainer] = createSignal<HTMLDivElement>()\n let activePointer: number | undefined\n const horizontal = () => props.branch().direction === 'row'\n\n const resizeTo = (ratio: number) => {\n // A hidden or detached host reports no usable geometry; that is not\n // user resize intent.\n const root = props.root()\n if (!root?.isConnected || root.getClientRects().length === 0) return\n const next = Math.min(MAX_SPLIT_RATIO, Math.max(MIN_SPLIT_RATIO, ratio))\n if (Number.isFinite(next) && Math.abs(next - props.branch().ratio) > 0.000001)\n props.onResize(props.branch().id, next)\n }\n const stopDrag = (handle: HTMLElement, event: PointerEvent) => {\n if (activePointer !== event.pointerId) return\n activePointer = undefined\n handle.removeAttribute('data-dragging')\n if (handle.hasPointerCapture(event.pointerId)) handle.releasePointerCapture(event.pointerId)\n }\n\n return (\n <div\n ref={setContainer}\n style={props.rect()}\n class=\"pointer-events-none absolute min-h-0 min-w-0\"\n >\n <div\n role=\"separator\"\n tabIndex={0}\n data-split-layout-handle=\"\"\n data-orientation={horizontal() ? 'horizontal' : 'vertical'}\n aria-label={\n props.labelForSeparator?.(props.branch()) ??\n (horizontal() ? 'Resize pane columns' : 'Resize pane rows')\n }\n aria-orientation={horizontal() ? 'vertical' : 'horizontal'}\n aria-controls={listLeaves(props.branch())\n .map((leaf) => props.domId(leaf.id))\n .join(' ')}\n aria-valuemin={10}\n aria-valuemax={90}\n aria-valuenow={Math.round(props.branch().ratio * 100)}\n style={\n horizontal()\n ? { left: `${props.branch().ratio * 100}%`, top: 0, bottom: 0, width: '1px' }\n : { top: `${props.branch().ratio * 100}%`, left: 0, right: 0, height: '1px' }\n }\n onKeyDown={(event) => {\n const forward = horizontal() ? 'ArrowRight' : 'ArrowDown'\n const backward = horizontal() ? 'ArrowLeft' : 'ArrowUp'\n const current = props.branch().ratio\n let next: number\n if (event.key === forward) next = current + KEYBOARD_DELTA\n else if (event.key === backward) next = current - KEYBOARD_DELTA\n else if (event.key === 'Home') next = MIN_SPLIT_RATIO\n else if (event.key === 'End') next = MAX_SPLIT_RATIO\n else return\n event.preventDefault()\n resizeTo(next)\n }}\n onPointerDown={(event) => {\n if (event.button !== 0 || activePointer !== undefined) return\n activePointer = event.pointerId\n event.currentTarget.setPointerCapture(event.pointerId)\n event.currentTarget.setAttribute('data-dragging', '')\n event.preventDefault()\n }}\n onPointerMove={(event) => {\n const element = container()\n if (activePointer !== event.pointerId || !element) return\n const box = element.getBoundingClientRect()\n const size = horizontal() ? box.width : box.height\n if (size <= 0) return\n resizeTo((horizontal() ? event.clientX - box.left : event.clientY - box.top) / size)\n }}\n onPointerUp={(event) => stopDrag(event.currentTarget, event)}\n onPointerCancel={(event) => stopDrag(event.currentTarget, event)}\n onLostPointerCapture={(event) => stopDrag(event.currentTarget, event)}\n class=\"pointer-events-auto absolute shrink-0 cursor-pointer 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\"\n />\n </div>\n )\n}\n"],"mappings":";;;;;AAkBA,IAAMqB,iBAAiB;;AAGvB,SAAwBC,4BACtBC,OACA;CACA,MAAM,CAACC,WAAWC,gBAAgBzB,aAA6B;CAC/D,IAAI0B;CACJ,MAAMC,mBAAmBJ,MAAMd,OAAO,CAAC,CAACmB,cAAc;CAEtD,MAAMC,YAAYT,UAAkB;EAGlC,MAAML,OAAOQ,MAAMR,KAAK;EACxB,IAAI,CAACA,MAAMe,eAAef,KAAKgB,eAAe,CAAC,CAACC,WAAW,GAAG;EAC9D,MAAMC,OAAOC,KAAKC,IAAI9B,iBAAiB6B,KAAKE,IAAIhC,iBAAiBgB,KAAK,CAAC;EACvE,IAAIiB,OAAOC,SAASL,IAAI,KAAKC,KAAKK,IAAIN,OAAOV,MAAMd,OAAO,CAAC,CAACW,KAAK,IAAI,MACnEG,MAAML,SAASK,MAAMd,OAAO,CAAC,CAACK,IAAImB,IAAI;CAC1C;CACA,MAAMO,YAAYC,QAAqBE,UAAwB;EAC7D,IAAIjB,kBAAkBiB,MAAME,WAAW;EACvCnB,gBAAgBoB,KAAAA;EAChBL,OAAOM,gBAAgB,eAAe;EACtC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AAAqB,IAAAZ,IAAA;GAAAT,IAAAsB,IAAAP,MAAA3C,OAAAuC,MAAAX,IAAAsB,CAAA;GAAA,OAAAtB;EAAA,GAAA;GAAAc,GAAAhD,KAAAA;GAAAkD,GAAAlD,KAAAA;GAAAoD,GAAApD,KAAAA;GAAAqD,GAAArD,KAAAA;GAAAsD,GAAAtD,KAAAA;GAAAuD,GAAAvD,KAAAA;GAAAwD,GAAAxD,KAAAA;EAAA,CAAA;EAAA,OAAAI;CAAA,EAAA,CAAA;AAqCzF;AAACqD,eAAA;CAAA;CAAA;CAAA;CAAA;AAAA,CAAA"}
|
|
@@ -2,7 +2,7 @@ import { MAX_SPLIT_RATIO, MIN_SPLIT_RATIO, listLeaves } from "./tree.js";
|
|
|
2
2
|
import { delegateEvents, effect, setAttribute, style, template, use } from "solid-js/web";
|
|
3
3
|
import { createSignal } from "solid-js";
|
|
4
4
|
//#region src/components/layout/split-layout/resize-controller-core.tsx
|
|
5
|
-
var _tmpl$ = /*#__PURE__*/ template(`<div class="pointer-events-none absolute min-h-0 min-w-0"><div role=separator tabindex=0 data-split-layout-handle aria-valuemin=10 aria-valuemax=90 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">`);
|
|
5
|
+
var _tmpl$ = /*#__PURE__*/ template(`<div class="pointer-events-none absolute min-h-0 min-w-0"><div role=separator tabindex=0 data-split-layout-handle aria-valuemin=10 aria-valuemax=90 class="pointer-events-auto absolute shrink-0 cursor-pointer 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">`);
|
|
6
6
|
var KEYBOARD_DELTA = .05;
|
|
7
7
|
/** The divider stays behind the first real split while the pane owners remain mounted. */
|
|
8
8
|
function SplitLayoutResizeController(props) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resize-controller-core.js","names":["createSignal","Accessor","JSX","listLeaves","MIN_SPLIT_RATIO","MAX_SPLIT_RATIO","SplitLayoutBranch","SplitLayoutLeaf","SplitLayoutResizeControllerProps","branch","L","rect","CSSProperties","domId","id","root","HTMLDivElement","labelForSeparator","onResize","splitId","ratio","KEYBOARD_DELTA","SplitLayoutResizeController","props","container","setContainer","activePointer","horizontal","direction","resizeTo","isConnected","getClientRects","length","next","Math","min","max","Number","isFinite","abs","stopDrag","handle","HTMLElement","event","PointerEvent","pointerId","undefined","removeAttribute","hasPointerCapture","releasePointerCapture","_el$","_tmpl$","_el$2","firstChild","_$use","addEventListener","currentTarget","$$pointerup","$$pointermove","element","box","getBoundingClientRect","size","width","height","clientX","left","clientY","top","$$pointerdown","button","setPointerCapture","setAttribute","preventDefault","$$keydown","forward","backward","current","key","_$effect","_p$","_v$","_v$2","_v$3","_v$4","_v$5","map","leaf","join","_v$6","round","_v$7","bottom","right","e","_$style","t","_$setAttribute","a","o","i","n","s","_$delegateEvents","_$style","_$setAttribute","_$delegateEvents"],"sources":["../../../../src/components/layout/split-layout/resize-controller-core.tsx"],"sourcesContent":["import { createSignal, type Accessor, type JSX } from 'solid-js'\nimport {\n listLeaves,\n MIN_SPLIT_RATIO,\n MAX_SPLIT_RATIO,\n type SplitLayoutBranch,\n type SplitLayoutLeaf,\n} from './model'\n\nexport type SplitLayoutResizeControllerProps<L extends SplitLayoutLeaf> = {\n branch: Accessor<SplitLayoutBranch<L>>\n rect: Accessor<JSX.CSSProperties>\n domId: (id: string) => string\n root: () => HTMLDivElement | undefined\n labelForSeparator?: (branch: SplitLayoutBranch<L>) => string\n onResize: (splitId: string, ratio: number) => void\n}\n\nconst KEYBOARD_DELTA = 0.05\n\n/** The divider stays behind the first real split while the pane owners remain mounted. */\nexport default function SplitLayoutResizeController<L extends SplitLayoutLeaf>(\n props: SplitLayoutResizeControllerProps<L>\n) {\n const [container, setContainer] = createSignal<HTMLDivElement>()\n let activePointer: number | undefined\n const horizontal = () => props.branch().direction === 'row'\n\n const resizeTo = (ratio: number) => {\n // A hidden or detached host reports no usable geometry; that is not\n // user resize intent.\n const root = props.root()\n if (!root?.isConnected || root.getClientRects().length === 0) return\n const next = Math.min(MAX_SPLIT_RATIO, Math.max(MIN_SPLIT_RATIO, ratio))\n if (Number.isFinite(next) && Math.abs(next - props.branch().ratio) > 0.000001)\n props.onResize(props.branch().id, next)\n }\n const stopDrag = (handle: HTMLElement, event: PointerEvent) => {\n if (activePointer !== event.pointerId) return\n activePointer = undefined\n handle.removeAttribute('data-dragging')\n if (handle.hasPointerCapture(event.pointerId)) handle.releasePointerCapture(event.pointerId)\n }\n\n return (\n <div\n ref={setContainer}\n style={props.rect()}\n class=\"pointer-events-none absolute min-h-0 min-w-0\"\n >\n <div\n role=\"separator\"\n tabIndex={0}\n data-split-layout-handle=\"\"\n data-orientation={horizontal() ? 'horizontal' : 'vertical'}\n aria-label={\n props.labelForSeparator?.(props.branch()) ??\n (horizontal() ? 'Resize pane columns' : 'Resize pane rows')\n }\n aria-orientation={horizontal() ? 'vertical' : 'horizontal'}\n aria-controls={listLeaves(props.branch())\n .map((leaf) => props.domId(leaf.id))\n .join(' ')}\n aria-valuemin={10}\n aria-valuemax={90}\n aria-valuenow={Math.round(props.branch().ratio * 100)}\n style={\n horizontal()\n ? { left: `${props.branch().ratio * 100}%`, top: 0, bottom: 0, width: '1px' }\n : { top: `${props.branch().ratio * 100}%`, left: 0, right: 0, height: '1px' }\n }\n onKeyDown={(event) => {\n const forward = horizontal() ? 'ArrowRight' : 'ArrowDown'\n const backward = horizontal() ? 'ArrowLeft' : 'ArrowUp'\n const current = props.branch().ratio\n let next: number\n if (event.key === forward) next = current + KEYBOARD_DELTA\n else if (event.key === backward) next = current - KEYBOARD_DELTA\n else if (event.key === 'Home') next = MIN_SPLIT_RATIO\n else if (event.key === 'End') next = MAX_SPLIT_RATIO\n else return\n event.preventDefault()\n resizeTo(next)\n }}\n onPointerDown={(event) => {\n if (event.button !== 0 || activePointer !== undefined) return\n activePointer = event.pointerId\n event.currentTarget.setPointerCapture(event.pointerId)\n event.currentTarget.setAttribute('data-dragging', '')\n event.preventDefault()\n }}\n onPointerMove={(event) => {\n const element = container()\n if (activePointer !== event.pointerId || !element) return\n const box = element.getBoundingClientRect()\n const size = horizontal() ? box.width : box.height\n if (size <= 0) return\n resizeTo((horizontal() ? event.clientX - box.left : event.clientY - box.top) / size)\n }}\n onPointerUp={(event) => stopDrag(event.currentTarget, event)}\n onPointerCancel={(event) => stopDrag(event.currentTarget, event)}\n onLostPointerCapture={(event) => stopDrag(event.currentTarget, event)}\n 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\"\n />\n </div>\n )\n}\n"],"mappings":";;;;;AAkBA,IAAMqB,iBAAiB;;AAGvB,SAAwBC,4BACtBC,OACA;CACA,MAAM,CAACC,WAAWC,gBAAgBzB,aAA6B;CAC/D,IAAI0B;CACJ,MAAMC,mBAAmBJ,MAAMd,OAAO,CAAC,CAACmB,cAAc;CAEtD,MAAMC,YAAYT,UAAkB;EAGlC,MAAML,OAAOQ,MAAMR,KAAK;EACxB,IAAI,CAACA,MAAMe,eAAef,KAAKgB,eAAe,CAAC,CAACC,WAAW,GAAG;EAC9D,MAAMC,OAAOC,KAAKC,IAAI9B,iBAAiB6B,KAAKE,IAAIhC,iBAAiBgB,KAAK,CAAC;EACvE,IAAIiB,OAAOC,SAASL,IAAI,KAAKC,KAAKK,IAAIN,OAAOV,MAAMd,OAA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B,IAAAf,IAAA;GAAAC,SAAAJ,IAAAmB,KAAAF,aAAA7C,OAAA,oBAAA4B,IAAAmB,IAAAf,IAAA;GAAAC,SAAAL,IAAAoB,KAAAH,aAAA7C,OAAA,iBAAA4B,IAAAoB,IAAAf,IAAA;GAAAI,SAAAT,IAAAqB,KAAAJ,aAAA7C,OAAA,iBAAA4B,IAAAqB,IAAAZ,IAAA;GAAAT,IAAAsB,IAAAP,MAAA3C,OAAAuC,MAAAX,IAAAsB,CAAA;GAAA,OAAAtB;EAAA,GAAA;GAAAc,GAAAhD,KAAAA;GAAAkD,GAAAlD,KAAAA;GAAAoD,GAAApD,KAAAA;GAAAqD,GAAArD,KAAAA;GAAAsD,GAAAtD,KAAAA;GAAAuD,GAAAvD,KAAAA;GAAAwD,GAAAxD,KAAAA;EAAA,CAAA;EAAA,OAAAI;CAAA,EAAA,CAAA;AAqCzF;AAACqD,eAAA;CAAA;CAAA;CAAA;CAAA;AAAA,CAAA"}
|
|
1
|
+
{"version":3,"file":"resize-controller-core.js","names":["createSignal","Accessor","JSX","listLeaves","MIN_SPLIT_RATIO","MAX_SPLIT_RATIO","SplitLayoutBranch","SplitLayoutLeaf","SplitLayoutResizeControllerProps","branch","L","rect","CSSProperties","domId","id","root","HTMLDivElement","labelForSeparator","onResize","splitId","ratio","KEYBOARD_DELTA","SplitLayoutResizeController","props","container","setContainer","activePointer","horizontal","direction","resizeTo","isConnected","getClientRects","length","next","Math","min","max","Number","isFinite","abs","stopDrag","handle","HTMLElement","event","PointerEvent","pointerId","undefined","removeAttribute","hasPointerCapture","releasePointerCapture","_el$","_tmpl$","_el$2","firstChild","_$use","addEventListener","currentTarget","$$pointerup","$$pointermove","element","box","getBoundingClientRect","size","width","height","clientX","left","clientY","top","$$pointerdown","button","setPointerCapture","setAttribute","preventDefault","$$keydown","forward","backward","current","key","_$effect","_p$","_v$","_v$2","_v$3","_v$4","_v$5","map","leaf","join","_v$6","round","_v$7","bottom","right","e","_$style","t","_$setAttribute","a","o","i","n","s","_$delegateEvents","_$style","_$setAttribute","_$delegateEvents"],"sources":["../../../../src/components/layout/split-layout/resize-controller-core.tsx"],"sourcesContent":["import { createSignal, type Accessor, type JSX } from 'solid-js'\nimport {\n listLeaves,\n MIN_SPLIT_RATIO,\n MAX_SPLIT_RATIO,\n type SplitLayoutBranch,\n type SplitLayoutLeaf,\n} from './model'\n\nexport type SplitLayoutResizeControllerProps<L extends SplitLayoutLeaf> = {\n branch: Accessor<SplitLayoutBranch<L>>\n rect: Accessor<JSX.CSSProperties>\n domId: (id: string) => string\n root: () => HTMLDivElement | undefined\n labelForSeparator?: (branch: SplitLayoutBranch<L>) => string\n onResize: (splitId: string, ratio: number) => void\n}\n\nconst KEYBOARD_DELTA = 0.05\n\n/** The divider stays behind the first real split while the pane owners remain mounted. */\nexport default function SplitLayoutResizeController<L extends SplitLayoutLeaf>(\n props: SplitLayoutResizeControllerProps<L>\n) {\n const [container, setContainer] = createSignal<HTMLDivElement>()\n let activePointer: number | undefined\n const horizontal = () => props.branch().direction === 'row'\n\n const resizeTo = (ratio: number) => {\n // A hidden or detached host reports no usable geometry; that is not\n // user resize intent.\n const root = props.root()\n if (!root?.isConnected || root.getClientRects().length === 0) return\n const next = Math.min(MAX_SPLIT_RATIO, Math.max(MIN_SPLIT_RATIO, ratio))\n if (Number.isFinite(next) && Math.abs(next - props.branch().ratio) > 0.000001)\n props.onResize(props.branch().id, next)\n }\n const stopDrag = (handle: HTMLElement, event: PointerEvent) => {\n if (activePointer !== event.pointerId) return\n activePointer = undefined\n handle.removeAttribute('data-dragging')\n if (handle.hasPointerCapture(event.pointerId)) handle.releasePointerCapture(event.pointerId)\n }\n\n return (\n <div\n ref={setContainer}\n style={props.rect()}\n class=\"pointer-events-none absolute min-h-0 min-w-0\"\n >\n <div\n role=\"separator\"\n tabIndex={0}\n data-split-layout-handle=\"\"\n data-orientation={horizontal() ? 'horizontal' : 'vertical'}\n aria-label={\n props.labelForSeparator?.(props.branch()) ??\n (horizontal() ? 'Resize pane columns' : 'Resize pane rows')\n }\n aria-orientation={horizontal() ? 'vertical' : 'horizontal'}\n aria-controls={listLeaves(props.branch())\n .map((leaf) => props.domId(leaf.id))\n .join(' ')}\n aria-valuemin={10}\n aria-valuemax={90}\n aria-valuenow={Math.round(props.branch().ratio * 100)}\n style={\n horizontal()\n ? { left: `${props.branch().ratio * 100}%`, top: 0, bottom: 0, width: '1px' }\n : { top: `${props.branch().ratio * 100}%`, left: 0, right: 0, height: '1px' }\n }\n onKeyDown={(event) => {\n const forward = horizontal() ? 'ArrowRight' : 'ArrowDown'\n const backward = horizontal() ? 'ArrowLeft' : 'ArrowUp'\n const current = props.branch().ratio\n let next: number\n if (event.key === forward) next = current + KEYBOARD_DELTA\n else if (event.key === backward) next = current - KEYBOARD_DELTA\n else if (event.key === 'Home') next = MIN_SPLIT_RATIO\n else if (event.key === 'End') next = MAX_SPLIT_RATIO\n else return\n event.preventDefault()\n resizeTo(next)\n }}\n onPointerDown={(event) => {\n if (event.button !== 0 || activePointer !== undefined) return\n activePointer = event.pointerId\n event.currentTarget.setPointerCapture(event.pointerId)\n event.currentTarget.setAttribute('data-dragging', '')\n event.preventDefault()\n }}\n onPointerMove={(event) => {\n const element = container()\n if (activePointer !== event.pointerId || !element) return\n const box = element.getBoundingClientRect()\n const size = horizontal() ? box.width : box.height\n if (size <= 0) return\n resizeTo((horizontal() ? event.clientX - box.left : event.clientY - box.top) / size)\n }}\n onPointerUp={(event) => stopDrag(event.currentTarget, event)}\n onPointerCancel={(event) => stopDrag(event.currentTarget, event)}\n onLostPointerCapture={(event) => stopDrag(event.currentTarget, event)}\n class=\"pointer-events-auto absolute shrink-0 cursor-pointer 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\"\n />\n </div>\n )\n}\n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AAC,CAACW,QAAQ,GAAG,GAACuE,OAEnDhE,WAAW,IACP;IAAEuC,MAAM,GAAG3C,MAAMd,OAAO,CAAC,CAACW,QAAQ,IAAG;IAAKgD,KAAK;IAAGwB,QAAQ;IAAG7B,OAAO;GAAM,IAC1E;IAAEK,KAAK,GAAG7C,MAAMd,OAAO,CAAC,CAACW,QAAQ,IAAG;IAAK8C,MAAM;IAAG2B,OAAO;IAAG7B,QAAQ;GAAM;GAACgB,IAAAc,IAAAC,MAAA7C,MAAA+B,KAAAD,IAAAc,CAAA;GAAAZ,SAAAF,IAAAgB,KAAAC,aAAA7C,OAAA,oBAAA4B,IAAAgB,IAAAd,IAAA;GAAAC,SAAAH,IAAAkB,KAAAD,aAAA7C,OAAA,cAAA4B,IAAAkB,IAAAf,IAAA;GAAAC,SAAAJ,IAAAmB,KAAAF,aAAA7C,OAAA,oBAAA4B,IAAAmB,IAAAf,IAAA;GAAAC,SAAAL,IAAAoB,KAAAH,aAAA7C,OAAA,iBAAA4B,IAAAoB,IAAAf,IAAA;GAAAI,SAAAT,IAAAqB,KAAAJ,aAAA7C,OAAA,iBAAA4B,IAAAqB,IAAAZ,IAAA;GAAAT,IAAAsB,IAAAP,MAAA3C,OAAAuC,MAAAX,IAAAsB,CAAA;GAAA,OAAAtB;EAAA,GAAA;GAAAc,GAAAhD,KAAAA;GAAAkD,GAAAlD,KAAAA;GAAAoD,GAAApD,KAAAA;GAAAqD,GAAArD,KAAAA;GAAAsD,GAAAtD,KAAAA;GAAAuD,GAAAvD,KAAAA;GAAAwD,GAAAxD,KAAAA;EAAA,CAAA;EAAA,OAAAI;CAAA,EAAA,CAAA;AAqCzF;AAACqD,eAAA;CAAA;CAAA;CAAA;CAAA;AAAA,CAAA"}
|
|
@@ -99,7 +99,7 @@ export function PixelResizeHandle(props: PixelResizeHandleProps) {
|
|
|
99
99
|
data-dragging={drag() ? '' : undefined}
|
|
100
100
|
style={{ left: `${isRight() ? maximum() - value() : value()}px` }}
|
|
101
101
|
class={cn(
|
|
102
|
-
'group/resize bg-border pointer-events-auto absolute inset-y-0 flex w-px items-center justify-center',
|
|
102
|
+
'group/resize bg-border pointer-events-auto absolute inset-y-0 flex w-px cursor-pointer items-center justify-center',
|
|
103
103
|
/* Widen the hit target without moving the visual line: 24px on the
|
|
104
104
|
drag axis meets WCAG 2.5.8's minimum target. */
|
|
105
105
|
'after:absolute after:inset-y-0 after:-inset-x-3 after:w-6',
|
|
@@ -100,7 +100,7 @@ export default function SplitLayoutResizeController<L extends SplitLayoutLeaf>(
|
|
|
100
100
|
onPointerUp={(event) => stopDrag(event.currentTarget, event)}
|
|
101
101
|
onPointerCancel={(event) => stopDrag(event.currentTarget, event)}
|
|
102
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"
|
|
103
|
+
class="pointer-events-auto absolute shrink-0 cursor-pointer 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"
|
|
104
104
|
/>
|
|
105
105
|
</div>
|
|
106
106
|
)
|
|
@@ -100,7 +100,7 @@ export default function SplitLayoutResizeController<L extends SplitLayoutLeaf>(
|
|
|
100
100
|
onPointerUp={(event) => stopDrag(event.currentTarget, event)}
|
|
101
101
|
onPointerCancel={(event) => stopDrag(event.currentTarget, event)}
|
|
102
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"
|
|
103
|
+
class="pointer-events-auto absolute shrink-0 cursor-pointer 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"
|
|
104
104
|
/>
|
|
105
105
|
</div>
|
|
106
106
|
)
|
package/package.json
CHANGED
|
@@ -99,7 +99,7 @@ export function PixelResizeHandle(props: PixelResizeHandleProps) {
|
|
|
99
99
|
data-dragging={drag() ? '' : undefined}
|
|
100
100
|
style={{ left: `${isRight() ? maximum() - value() : value()}px` }}
|
|
101
101
|
class={cn(
|
|
102
|
-
'group/resize bg-border pointer-events-auto absolute inset-y-0 flex w-px items-center justify-center',
|
|
102
|
+
'group/resize bg-border pointer-events-auto absolute inset-y-0 flex w-px cursor-pointer items-center justify-center',
|
|
103
103
|
/* Widen the hit target without moving the visual line: 24px on the
|
|
104
104
|
drag axis meets WCAG 2.5.8's minimum target. */
|
|
105
105
|
'after:absolute after:inset-y-0 after:-inset-x-3 after:w-6',
|
|
@@ -100,7 +100,7 @@ export default function SplitLayoutResizeController<L extends SplitLayoutLeaf>(
|
|
|
100
100
|
onPointerUp={(event) => stopDrag(event.currentTarget, event)}
|
|
101
101
|
onPointerCancel={(event) => stopDrag(event.currentTarget, event)}
|
|
102
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"
|
|
103
|
+
class="pointer-events-auto absolute shrink-0 cursor-pointer 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"
|
|
104
104
|
/>
|
|
105
105
|
</div>
|
|
106
106
|
)
|
|
@@ -100,7 +100,7 @@ export default function SplitLayoutResizeController<L extends SplitLayoutLeaf>(
|
|
|
100
100
|
onPointerUp={(event) => stopDrag(event.currentTarget, event)}
|
|
101
101
|
onPointerCancel={(event) => stopDrag(event.currentTarget, event)}
|
|
102
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"
|
|
103
|
+
class="pointer-events-auto absolute shrink-0 cursor-pointer 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"
|
|
104
104
|
/>
|
|
105
105
|
</div>
|
|
106
106
|
)
|