@adea-ai/ui 0.130.0 → 0.130.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/composites/settings/settings.js +1 -1
- package/dist/components/composites/settings/settings.js.map +1 -1
- package/dist/components/layout/pixel-resize-handle/pixel-resize-handle.d.ts +7 -6
- package/dist/components/layout/pixel-resize-handle/pixel-resize-handle.d.ts.map +1 -1
- package/dist/components/layout/pixel-resize-handle/pixel-resize-handle.js +130 -144
- package/dist/components/layout/pixel-resize-handle/pixel-resize-handle.js.map +1 -1
- package/dist/components/layout/split-layout/resize-controller-core-retry.d.ts +1 -1
- package/dist/components/layout/split-layout/resize-controller-core-retry.d.ts.map +1 -1
- package/dist/components/layout/split-layout/resize-controller-core-retry.js +91 -55
- package/dist/components/layout/split-layout/resize-controller-core-retry.js.map +1 -1
- package/dist/components/layout/split-layout/resize-controller-core.d.ts +1 -1
- package/dist/components/layout/split-layout/resize-controller-core.d.ts.map +1 -1
- package/dist/components/layout/split-layout/resize-controller-core.js +91 -55
- package/dist/components/layout/split-layout/resize-controller-core.js.map +1 -1
- package/dist/components/layout/split-layout/split-layout.d.ts +1 -1
- package/dist/components/layout/split-layout/split-layout.d.ts.map +1 -1
- package/dist/components/layout/split-layout/split-layout.js +2 -2
- package/dist/components/layout/split-layout/split-layout.js.map +1 -1
- package/dist/r/pixel-resize-handle.json +3 -2
- package/dist/r/registry.json +3 -3
- package/dist/r/split-layout.json +0 -1
- package/dist/r/src/components/composites/settings/settings.tsx +1 -1
- package/dist/r/src/components/layout/pixel-resize-handle/pixel-resize-handle.tsx +60 -61
- package/dist/r/src/components/layout/split-layout/resize-controller-core-retry.tsx +72 -31
- package/dist/r/src/components/layout/split-layout/resize-controller-core.tsx +72 -31
- package/dist/r/src/components/layout/split-layout/split-layout.tsx +2 -2
- package/package.json +1 -1
- package/registry.json +3 -3
- package/src/components/composites/settings/settings.tsx +1 -1
- package/src/components/layout/pixel-resize-handle/pixel-resize-handle.tsx +60 -61
- package/src/components/layout/split-layout/resize-controller-core-retry.tsx +72 -31
- package/src/components/layout/split-layout/resize-controller-core.tsx +72 -31
- package/src/components/layout/split-layout/split-layout.tsx +2 -2
|
@@ -1,62 +1,98 @@
|
|
|
1
1
|
import { MAX_SPLIT_RATIO, MIN_SPLIT_RATIO, listLeaves } from "./tree.js";
|
|
2
|
-
import {
|
|
3
|
-
import "solid-js";
|
|
4
|
-
import Resizable from "@corvu/resizable";
|
|
2
|
+
import { delegateEvents, effect, setAttribute, style, template, use } from "solid-js/web";
|
|
3
|
+
import { createSignal } from "solid-js";
|
|
5
4
|
//#region src/components/layout/split-layout/resize-controller-core-retry.tsx
|
|
6
|
-
|
|
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">`);
|
|
6
|
+
var KEYBOARD_DELTA = .05;
|
|
7
|
+
/** The divider stays behind the first real split while the pane owners remain mounted. */
|
|
7
8
|
function SplitLayoutResizeController(props) {
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
"
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
9
|
+
const [container, setContainer] = createSignal();
|
|
10
|
+
let activePointer;
|
|
11
|
+
const horizontal = () => props.branch().direction === "row";
|
|
12
|
+
const resizeTo = (ratio) => {
|
|
13
|
+
const root = props.root();
|
|
14
|
+
if (!root?.isConnected || root.getClientRects().length === 0) return;
|
|
15
|
+
const next = Math.min(MAX_SPLIT_RATIO, Math.max(MIN_SPLIT_RATIO, ratio));
|
|
16
|
+
if (Number.isFinite(next) && Math.abs(next - props.branch().ratio) > 1e-6) props.onResize(props.branch().id, next);
|
|
17
|
+
};
|
|
18
|
+
const stopDrag = (handle, event) => {
|
|
19
|
+
if (activePointer !== event.pointerId) return;
|
|
20
|
+
activePointer = void 0;
|
|
21
|
+
handle.removeAttribute("data-dragging");
|
|
22
|
+
if (handle.hasPointerCapture(event.pointerId)) handle.releasePointerCapture(event.pointerId);
|
|
23
|
+
};
|
|
24
|
+
return (() => {
|
|
25
|
+
var _el$ = _tmpl$(), _el$2 = _el$.firstChild;
|
|
26
|
+
use(setContainer, _el$);
|
|
27
|
+
_el$2.addEventListener("lostpointercapture", (event) => stopDrag(event.currentTarget, event));
|
|
28
|
+
_el$2.addEventListener("pointercancel", (event) => stopDrag(event.currentTarget, event));
|
|
29
|
+
_el$2.$$pointerup = (event) => stopDrag(event.currentTarget, event);
|
|
30
|
+
_el$2.$$pointermove = (event) => {
|
|
31
|
+
const element = container();
|
|
32
|
+
if (activePointer !== event.pointerId || !element) return;
|
|
33
|
+
const box = element.getBoundingClientRect();
|
|
34
|
+
const size = horizontal() ? box.width : box.height;
|
|
35
|
+
if (size <= 0) return;
|
|
36
|
+
resizeTo((horizontal() ? event.clientX - box.left : event.clientY - box.top) / size);
|
|
37
|
+
};
|
|
38
|
+
_el$2.$$pointerdown = (event) => {
|
|
39
|
+
if (event.button !== 0 || activePointer !== void 0) return;
|
|
40
|
+
activePointer = event.pointerId;
|
|
41
|
+
event.currentTarget.setPointerCapture(event.pointerId);
|
|
42
|
+
event.currentTarget.setAttribute("data-dragging", "");
|
|
43
|
+
event.preventDefault();
|
|
44
|
+
};
|
|
45
|
+
_el$2.$$keydown = (event) => {
|
|
46
|
+
const forward = horizontal() ? "ArrowRight" : "ArrowDown";
|
|
47
|
+
const backward = horizontal() ? "ArrowLeft" : "ArrowUp";
|
|
48
|
+
const current = props.branch().ratio;
|
|
49
|
+
let next;
|
|
50
|
+
if (event.key === forward) next = current + KEYBOARD_DELTA;
|
|
51
|
+
else if (event.key === backward) next = current - KEYBOARD_DELTA;
|
|
52
|
+
else if (event.key === "Home") next = MIN_SPLIT_RATIO;
|
|
53
|
+
else if (event.key === "End") next = MAX_SPLIT_RATIO;
|
|
54
|
+
else return;
|
|
55
|
+
event.preventDefault();
|
|
56
|
+
resizeTo(next);
|
|
57
|
+
};
|
|
58
|
+
effect((_p$) => {
|
|
59
|
+
var _v$ = props.rect(), _v$2 = horizontal() ? "horizontal" : "vertical", _v$3 = props.labelForSeparator?.(props.branch()) ?? (horizontal() ? "Resize pane columns" : "Resize pane rows"), _v$4 = horizontal() ? "vertical" : "horizontal", _v$5 = listLeaves(props.branch()).map((leaf) => props.domId(leaf.id)).join(" "), _v$6 = Math.round(props.branch().ratio * 100), _v$7 = horizontal() ? {
|
|
60
|
+
left: `${props.branch().ratio * 100}%`,
|
|
61
|
+
top: 0,
|
|
62
|
+
bottom: 0,
|
|
63
|
+
width: "1px"
|
|
64
|
+
} : {
|
|
65
|
+
top: `${props.branch().ratio * 100}%`,
|
|
66
|
+
left: 0,
|
|
67
|
+
right: 0,
|
|
68
|
+
height: "1px"
|
|
69
|
+
};
|
|
70
|
+
_p$.e = style(_el$, _v$, _p$.e);
|
|
71
|
+
_v$2 !== _p$.t && setAttribute(_el$2, "data-orientation", _p$.t = _v$2);
|
|
72
|
+
_v$3 !== _p$.a && setAttribute(_el$2, "aria-label", _p$.a = _v$3);
|
|
73
|
+
_v$4 !== _p$.o && setAttribute(_el$2, "aria-orientation", _p$.o = _v$4);
|
|
74
|
+
_v$5 !== _p$.i && setAttribute(_el$2, "aria-controls", _p$.i = _v$5);
|
|
75
|
+
_v$6 !== _p$.n && setAttribute(_el$2, "aria-valuenow", _p$.n = _v$6);
|
|
76
|
+
_p$.s = style(_el$2, _v$7, _p$.s);
|
|
77
|
+
return _p$;
|
|
78
|
+
}, {
|
|
79
|
+
e: void 0,
|
|
80
|
+
t: void 0,
|
|
81
|
+
a: void 0,
|
|
82
|
+
o: void 0,
|
|
83
|
+
i: void 0,
|
|
84
|
+
n: void 0,
|
|
85
|
+
s: void 0
|
|
86
|
+
});
|
|
87
|
+
return _el$;
|
|
88
|
+
})();
|
|
59
89
|
}
|
|
90
|
+
delegateEvents([
|
|
91
|
+
"keydown",
|
|
92
|
+
"pointerdown",
|
|
93
|
+
"pointermove",
|
|
94
|
+
"pointerup"
|
|
95
|
+
]);
|
|
60
96
|
//#endregion
|
|
61
97
|
export { SplitLayoutResizeController as default };
|
|
62
98
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resize-controller-core-retry.js","names":["
|
|
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: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,IAAIN,OAAOO,kBAAkBL,MAAME,SAAS,GAAGJ,OAAOQ,sBAAsBN,MAAME,SAAS;CAC7F;CAEA,cAAA;EAAA,IAAAK,OAAAC,OAAA,GAAAC,QAAAF,KAAAG;EAAAC,IAES7B,cAAYyB,IAAA;EAAAE,MAAAG,iBAAA,uBAuDQZ,UAAUH,SAASG,MAAMa,eAAeb,KA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GAAAvD,KAAAA;GAAAwD,GAAAxD,KAAAA;EAAA,CAAA;EAAA,OAAAI;CAAA,EAAA,CAAA;AAqCzF;AAACqD,eAAA;CAAA;CAAA;CAAA;CAAA;AAAA,CAAA"}
|
|
@@ -8,6 +8,6 @@ export type SplitLayoutResizeControllerProps<L extends SplitLayoutLeaf> = {
|
|
|
8
8
|
labelForSeparator?: (branch: SplitLayoutBranch<L>) => string;
|
|
9
9
|
onResize: (splitId: string, ratio: number) => void;
|
|
10
10
|
};
|
|
11
|
-
/**
|
|
11
|
+
/** The divider stays behind the first real split while the pane owners remain mounted. */
|
|
12
12
|
export default function SplitLayoutResizeController<L extends SplitLayoutLeaf>(props: SplitLayoutResizeControllerProps<L>): JSX.Element;
|
|
13
13
|
//# sourceMappingURL=resize-controller-core.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resize-controller-core.d.ts","sourceRoot":"","sources":["../../../../src/components/layout/split-layout/resize-controller-core.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"resize-controller-core.d.ts","sourceRoot":"","sources":["../../../../src/components/layout/split-layout/resize-controller-core.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAgB,KAAK,QAAQ,EAAE,KAAK,GAAG,EAAE,MAAM,UAAU,CAAA;AAChE,OAAO,EAIL,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACrB,MAAM,SAAS,CAAA;AAEhB,MAAM,MAAM,gCAAgC,CAAC,CAAC,SAAS,eAAe,IAAI;IACxE,MAAM,EAAE,QAAQ,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,CAAA;IACtC,IAAI,EAAE,QAAQ,CAAC,GAAG,CAAC,aAAa,CAAC,CAAA;IACjC,KAAK,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,MAAM,CAAA;IAC7B,IAAI,EAAE,MAAM,cAAc,GAAG,SAAS,CAAA;IACtC,iBAAiB,CAAC,EAAE,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAC,CAAC,KAAK,MAAM,CAAA;IAC5D,QAAQ,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;CACnD,CAAA;AAID,0FAA0F;AAC1F,MAAM,CAAC,OAAO,UAAU,2BAA2B,CAAC,CAAC,SAAS,eAAe,EAC3E,KAAK,EAAE,gCAAgC,CAAC,CAAC,CAAC,eAoF3C"}
|
|
@@ -1,62 +1,98 @@
|
|
|
1
1
|
import { MAX_SPLIT_RATIO, MIN_SPLIT_RATIO, listLeaves } from "./tree.js";
|
|
2
|
-
import {
|
|
3
|
-
import "solid-js";
|
|
4
|
-
import Resizable from "@corvu/resizable";
|
|
2
|
+
import { delegateEvents, effect, setAttribute, style, template, use } from "solid-js/web";
|
|
3
|
+
import { createSignal } from "solid-js";
|
|
5
4
|
//#region src/components/layout/split-layout/resize-controller-core.tsx
|
|
6
|
-
|
|
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">`);
|
|
6
|
+
var KEYBOARD_DELTA = .05;
|
|
7
|
+
/** The divider stays behind the first real split while the pane owners remain mounted. */
|
|
7
8
|
function SplitLayoutResizeController(props) {
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
"
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
9
|
+
const [container, setContainer] = createSignal();
|
|
10
|
+
let activePointer;
|
|
11
|
+
const horizontal = () => props.branch().direction === "row";
|
|
12
|
+
const resizeTo = (ratio) => {
|
|
13
|
+
const root = props.root();
|
|
14
|
+
if (!root?.isConnected || root.getClientRects().length === 0) return;
|
|
15
|
+
const next = Math.min(MAX_SPLIT_RATIO, Math.max(MIN_SPLIT_RATIO, ratio));
|
|
16
|
+
if (Number.isFinite(next) && Math.abs(next - props.branch().ratio) > 1e-6) props.onResize(props.branch().id, next);
|
|
17
|
+
};
|
|
18
|
+
const stopDrag = (handle, event) => {
|
|
19
|
+
if (activePointer !== event.pointerId) return;
|
|
20
|
+
activePointer = void 0;
|
|
21
|
+
handle.removeAttribute("data-dragging");
|
|
22
|
+
if (handle.hasPointerCapture(event.pointerId)) handle.releasePointerCapture(event.pointerId);
|
|
23
|
+
};
|
|
24
|
+
return (() => {
|
|
25
|
+
var _el$ = _tmpl$(), _el$2 = _el$.firstChild;
|
|
26
|
+
use(setContainer, _el$);
|
|
27
|
+
_el$2.addEventListener("lostpointercapture", (event) => stopDrag(event.currentTarget, event));
|
|
28
|
+
_el$2.addEventListener("pointercancel", (event) => stopDrag(event.currentTarget, event));
|
|
29
|
+
_el$2.$$pointerup = (event) => stopDrag(event.currentTarget, event);
|
|
30
|
+
_el$2.$$pointermove = (event) => {
|
|
31
|
+
const element = container();
|
|
32
|
+
if (activePointer !== event.pointerId || !element) return;
|
|
33
|
+
const box = element.getBoundingClientRect();
|
|
34
|
+
const size = horizontal() ? box.width : box.height;
|
|
35
|
+
if (size <= 0) return;
|
|
36
|
+
resizeTo((horizontal() ? event.clientX - box.left : event.clientY - box.top) / size);
|
|
37
|
+
};
|
|
38
|
+
_el$2.$$pointerdown = (event) => {
|
|
39
|
+
if (event.button !== 0 || activePointer !== void 0) return;
|
|
40
|
+
activePointer = event.pointerId;
|
|
41
|
+
event.currentTarget.setPointerCapture(event.pointerId);
|
|
42
|
+
event.currentTarget.setAttribute("data-dragging", "");
|
|
43
|
+
event.preventDefault();
|
|
44
|
+
};
|
|
45
|
+
_el$2.$$keydown = (event) => {
|
|
46
|
+
const forward = horizontal() ? "ArrowRight" : "ArrowDown";
|
|
47
|
+
const backward = horizontal() ? "ArrowLeft" : "ArrowUp";
|
|
48
|
+
const current = props.branch().ratio;
|
|
49
|
+
let next;
|
|
50
|
+
if (event.key === forward) next = current + KEYBOARD_DELTA;
|
|
51
|
+
else if (event.key === backward) next = current - KEYBOARD_DELTA;
|
|
52
|
+
else if (event.key === "Home") next = MIN_SPLIT_RATIO;
|
|
53
|
+
else if (event.key === "End") next = MAX_SPLIT_RATIO;
|
|
54
|
+
else return;
|
|
55
|
+
event.preventDefault();
|
|
56
|
+
resizeTo(next);
|
|
57
|
+
};
|
|
58
|
+
effect((_p$) => {
|
|
59
|
+
var _v$ = props.rect(), _v$2 = horizontal() ? "horizontal" : "vertical", _v$3 = props.labelForSeparator?.(props.branch()) ?? (horizontal() ? "Resize pane columns" : "Resize pane rows"), _v$4 = horizontal() ? "vertical" : "horizontal", _v$5 = listLeaves(props.branch()).map((leaf) => props.domId(leaf.id)).join(" "), _v$6 = Math.round(props.branch().ratio * 100), _v$7 = horizontal() ? {
|
|
60
|
+
left: `${props.branch().ratio * 100}%`,
|
|
61
|
+
top: 0,
|
|
62
|
+
bottom: 0,
|
|
63
|
+
width: "1px"
|
|
64
|
+
} : {
|
|
65
|
+
top: `${props.branch().ratio * 100}%`,
|
|
66
|
+
left: 0,
|
|
67
|
+
right: 0,
|
|
68
|
+
height: "1px"
|
|
69
|
+
};
|
|
70
|
+
_p$.e = style(_el$, _v$, _p$.e);
|
|
71
|
+
_v$2 !== _p$.t && setAttribute(_el$2, "data-orientation", _p$.t = _v$2);
|
|
72
|
+
_v$3 !== _p$.a && setAttribute(_el$2, "aria-label", _p$.a = _v$3);
|
|
73
|
+
_v$4 !== _p$.o && setAttribute(_el$2, "aria-orientation", _p$.o = _v$4);
|
|
74
|
+
_v$5 !== _p$.i && setAttribute(_el$2, "aria-controls", _p$.i = _v$5);
|
|
75
|
+
_v$6 !== _p$.n && setAttribute(_el$2, "aria-valuenow", _p$.n = _v$6);
|
|
76
|
+
_p$.s = style(_el$2, _v$7, _p$.s);
|
|
77
|
+
return _p$;
|
|
78
|
+
}, {
|
|
79
|
+
e: void 0,
|
|
80
|
+
t: void 0,
|
|
81
|
+
a: void 0,
|
|
82
|
+
o: void 0,
|
|
83
|
+
i: void 0,
|
|
84
|
+
n: void 0,
|
|
85
|
+
s: void 0
|
|
86
|
+
});
|
|
87
|
+
return _el$;
|
|
88
|
+
})();
|
|
59
89
|
}
|
|
90
|
+
delegateEvents([
|
|
91
|
+
"keydown",
|
|
92
|
+
"pointerdown",
|
|
93
|
+
"pointermove",
|
|
94
|
+
"pointerup"
|
|
95
|
+
]);
|
|
60
96
|
//#endregion
|
|
61
97
|
export { SplitLayoutResizeController as default };
|
|
62
98
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resize-controller-core.js","names":["
|
|
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,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,IAAIN,OAAOO,kBAAkBL,MAAME,SAAS,GAAGJ,OAAOQ,sBAAsBN,MAAME,SAAS;CAC7F;CAEA,cAAA;EAAA,IAAAK,OAAAC,OA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AAAhD,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"}
|
|
@@ -25,6 +25,6 @@ export type SplitLayoutProps<L extends SplitLayoutLeaf> = {
|
|
|
25
25
|
renderPaneActions?: (leaf: Accessor<L>) => JSX.Element;
|
|
26
26
|
class?: string;
|
|
27
27
|
};
|
|
28
|
-
/** Muxy frame geometry keeps leaf owners stable;
|
|
28
|
+
/** Muxy frame geometry keeps leaf owners stable; the lazy resize controller owns constrained separator interactions. */
|
|
29
29
|
export declare function SplitLayout<L extends SplitLayoutLeaf>(props: SplitLayoutProps<L>): JSX.Element;
|
|
30
30
|
//# sourceMappingURL=split-layout.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"split-layout.d.ts","sourceRoot":"","sources":["../../../../src/components/layout/split-layout/split-layout.tsx"],"names":[],"mappings":"AAAA,OAAO,EAWL,KAAK,QAAQ,EACb,KAAK,GAAG,EACT,MAAM,UAAU,CAAA;AAOjB,OAAO,EAAkB,KAAK,cAAc,EAAE,MAAM,QAAQ,CAAA;AAC5D,YAAY,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAA;AAI5C,OAAO,EAEL,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACtB,MAAM,SAAS,CAAA;AAQhB,MAAM,MAAM,gBAAgB,CAAC,CAAC,SAAS,eAAe,IAAI;IACxD,KAAK,EAAE,gBAAgB,CAAC,CAAC,CAAC,CAAA;IAC1B,KAAK,EAAE,MAAM,CAAA;IACb,8DAA8D;IAC9D,YAAY,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,MAAM,CAAA;IACj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H;AACxH,wBAAgB,WAAW,CAAC,CAAC,SAAS,eAAe,EAAE,KAAK,EAAE,gBAAgB,CAAC,CAAC,CAAC,eAwdhF"}
|
|
@@ -128,7 +128,7 @@ function cloneDragPreviewNode(source) {
|
|
|
128
128
|
}
|
|
129
129
|
return clone;
|
|
130
130
|
}
|
|
131
|
-
/** Muxy frame geometry keeps leaf owners stable;
|
|
131
|
+
/** Muxy frame geometry keeps leaf owners stable; the lazy resize controller owns constrained separator interactions. */
|
|
132
132
|
function SplitLayout(props) {
|
|
133
133
|
let root;
|
|
134
134
|
let pendingFrame;
|
|
@@ -229,7 +229,7 @@ function SplitLayout(props) {
|
|
|
229
229
|
if (disposed || generation !== resizeLoadGeneration || branches().length === 0 || focusEpoch !== focusRestoreEpoch) return;
|
|
230
230
|
const currentFocus = root?.ownerDocument.activeElement;
|
|
231
231
|
if (currentFocus && currentFocus !== root?.ownerDocument.body && currentFocus !== root) return;
|
|
232
|
-
root?.querySelector("[data-
|
|
232
|
+
root?.querySelector("[data-split-layout-handle]")?.focus({ preventScroll: true });
|
|
233
233
|
});
|
|
234
234
|
}, () => {
|
|
235
235
|
retryWithAlternateImport = true;
|