react-resizable-panels 4.0.9-alpha.0 → 4.0.10
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.
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
3
|
-
import { useId as
|
|
4
|
-
function
|
|
2
|
+
import { jsx as K } from "react/jsx-runtime";
|
|
3
|
+
import { useId as Xe, useLayoutEffect as Ye, useEffect as Ce, useRef as O, useCallback as Ee, createContext as qe, useImperativeHandle as Me, useState as I, useMemo as Ie, useSyncExternalStore as Ze, useContext as Je } from "react";
|
|
4
|
+
function z(e, t = "Assertion error") {
|
|
5
5
|
if (!e)
|
|
6
6
|
throw Error(t);
|
|
7
7
|
}
|
|
8
|
-
function
|
|
8
|
+
function B({
|
|
9
9
|
group: e
|
|
10
10
|
}) {
|
|
11
11
|
const { orientation: t, panels: n } = e;
|
|
@@ -13,73 +13,141 @@ function H({
|
|
|
13
13
|
}
|
|
14
14
|
function se(e, t) {
|
|
15
15
|
return t.sort(
|
|
16
|
-
e === "horizontal" ?
|
|
16
|
+
e === "horizontal" ? Qe : et
|
|
17
17
|
);
|
|
18
18
|
}
|
|
19
|
-
function
|
|
19
|
+
function Qe(e, t) {
|
|
20
20
|
const n = e.element.offsetLeft - t.element.offsetLeft;
|
|
21
21
|
return n !== 0 ? n : e.element.offsetWidth - t.element.offsetWidth;
|
|
22
22
|
}
|
|
23
|
-
function
|
|
23
|
+
function et(e, t) {
|
|
24
24
|
const n = e.element.offsetTop - t.element.offsetTop;
|
|
25
25
|
return n !== 0 ? n : e.element.offsetHeight - t.element.offsetHeight;
|
|
26
26
|
}
|
|
27
|
-
function
|
|
27
|
+
function Ge(e, t) {
|
|
28
|
+
return {
|
|
29
|
+
x: e.x >= t.left && e.x <= t.right ? 0 : Math.min(
|
|
30
|
+
Math.abs(e.x - t.left),
|
|
31
|
+
Math.abs(e.x - t.right)
|
|
32
|
+
),
|
|
33
|
+
y: e.y >= t.top && e.y <= t.bottom ? 0 : Math.min(
|
|
34
|
+
Math.abs(e.y - t.top),
|
|
35
|
+
Math.abs(e.y - t.bottom)
|
|
36
|
+
)
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
function tt({
|
|
40
|
+
orientation: e,
|
|
41
|
+
rects: t,
|
|
42
|
+
targetRect: n
|
|
43
|
+
}) {
|
|
44
|
+
const o = {
|
|
45
|
+
x: n.x + n.width / 2,
|
|
46
|
+
y: n.y + n.height / 2
|
|
47
|
+
};
|
|
48
|
+
let r, a = Number.MAX_VALUE;
|
|
49
|
+
for (const l of t) {
|
|
50
|
+
const { x: i, y: s } = Ge(o, l), u = e === "horizontal" ? i : s;
|
|
51
|
+
u < a && (a = u, r = l);
|
|
52
|
+
}
|
|
53
|
+
return z(r, "No rect found"), r;
|
|
54
|
+
}
|
|
55
|
+
function ke(e) {
|
|
28
56
|
const { element: t, orientation: n, panels: o, separators: r } = e, a = se(
|
|
29
57
|
n,
|
|
30
|
-
Array.from(t.children).filter((
|
|
31
|
-
).map(({ element:
|
|
32
|
-
let i, s;
|
|
33
|
-
for (const
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
if (
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
58
|
+
Array.from(t.children).filter((c) => c instanceof HTMLElement).map((c) => ({ element: c }))
|
|
59
|
+
).map(({ element: c }) => c), l = [];
|
|
60
|
+
let i = !1, s, u = [];
|
|
61
|
+
for (const c of a)
|
|
62
|
+
if (c.hasAttribute("data-panel")) {
|
|
63
|
+
const h = o.find(
|
|
64
|
+
(m) => m.element === c
|
|
65
|
+
);
|
|
66
|
+
if (h) {
|
|
67
|
+
if (s) {
|
|
68
|
+
const m = s.element.getBoundingClientRect(), p = c.getBoundingClientRect();
|
|
69
|
+
let f;
|
|
70
|
+
if (i) {
|
|
71
|
+
const d = n === "horizontal" ? new DOMRect(m.right, m.top, 0, m.height) : new DOMRect(
|
|
72
|
+
m.left,
|
|
73
|
+
m.bottom,
|
|
74
|
+
m.width,
|
|
75
|
+
0
|
|
76
|
+
), y = n === "horizontal" ? new DOMRect(p.left, p.top, 0, p.height) : new DOMRect(p.left, p.top, p.width, 0);
|
|
77
|
+
switch (u.length) {
|
|
78
|
+
case 0: {
|
|
79
|
+
f = [
|
|
80
|
+
d,
|
|
81
|
+
y
|
|
82
|
+
];
|
|
83
|
+
break;
|
|
84
|
+
}
|
|
85
|
+
case 1: {
|
|
86
|
+
const g = u[0], v = tt({
|
|
87
|
+
orientation: n,
|
|
88
|
+
rects: [m, p],
|
|
89
|
+
targetRect: g.element.getBoundingClientRect()
|
|
90
|
+
});
|
|
91
|
+
f = [
|
|
92
|
+
g,
|
|
93
|
+
v === m ? y : d
|
|
94
|
+
];
|
|
95
|
+
break;
|
|
96
|
+
}
|
|
97
|
+
default: {
|
|
98
|
+
f = u;
|
|
99
|
+
break;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
} else
|
|
103
|
+
u.length ? f = u : f = [
|
|
104
|
+
n === "horizontal" ? new DOMRect(
|
|
105
|
+
m.right,
|
|
106
|
+
p.top,
|
|
107
|
+
p.left - m.right,
|
|
108
|
+
p.height
|
|
109
|
+
) : new DOMRect(
|
|
110
|
+
p.left,
|
|
111
|
+
m.bottom,
|
|
112
|
+
p.width,
|
|
113
|
+
p.top - m.bottom
|
|
114
|
+
)
|
|
115
|
+
];
|
|
116
|
+
for (const d of f)
|
|
117
|
+
l.push({
|
|
118
|
+
group: e,
|
|
119
|
+
groupSize: B({ group: e }),
|
|
120
|
+
panels: [s, h],
|
|
121
|
+
separator: "width" in d ? void 0 : d,
|
|
122
|
+
rect: "width" in d ? d : d.element.getBoundingClientRect()
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
i = !1, s = h, u = [];
|
|
57
126
|
}
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
(z) => z.element === l
|
|
127
|
+
} else if (c.hasAttribute("data-separator")) {
|
|
128
|
+
const h = r.find(
|
|
129
|
+
(m) => m.element === c
|
|
62
130
|
);
|
|
63
|
-
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
return
|
|
131
|
+
h ? u.push(h) : (s = void 0, u = []);
|
|
132
|
+
} else
|
|
133
|
+
i = !0;
|
|
134
|
+
return l;
|
|
67
135
|
}
|
|
68
|
-
function
|
|
136
|
+
function nt(e, t) {
|
|
69
137
|
const n = getComputedStyle(e), o = parseFloat(n.fontSize);
|
|
70
138
|
return t * o;
|
|
71
139
|
}
|
|
72
|
-
function
|
|
140
|
+
function ot(e, t) {
|
|
73
141
|
const n = getComputedStyle(e.ownerDocument.body), o = parseFloat(n.fontSize);
|
|
74
142
|
return t * o;
|
|
75
143
|
}
|
|
76
|
-
function
|
|
144
|
+
function it(e) {
|
|
77
145
|
return e / 100 * window.innerHeight;
|
|
78
146
|
}
|
|
79
|
-
function
|
|
147
|
+
function rt(e) {
|
|
80
148
|
return e / 100 * window.innerWidth;
|
|
81
149
|
}
|
|
82
|
-
function
|
|
150
|
+
function st(e) {
|
|
83
151
|
switch (typeof e) {
|
|
84
152
|
case "number":
|
|
85
153
|
return [e, "px"];
|
|
@@ -89,13 +157,13 @@ function et(e) {
|
|
|
89
157
|
}
|
|
90
158
|
}
|
|
91
159
|
}
|
|
92
|
-
function
|
|
160
|
+
function te({
|
|
93
161
|
groupSize: e,
|
|
94
162
|
panelElement: t,
|
|
95
163
|
styleProp: n
|
|
96
164
|
}) {
|
|
97
165
|
let o;
|
|
98
|
-
const [r, a] =
|
|
166
|
+
const [r, a] = st(n);
|
|
99
167
|
switch (a) {
|
|
100
168
|
case "%": {
|
|
101
169
|
o = r / 100 * e;
|
|
@@ -106,19 +174,19 @@ function Q({
|
|
|
106
174
|
break;
|
|
107
175
|
}
|
|
108
176
|
case "rem": {
|
|
109
|
-
o =
|
|
177
|
+
o = ot(t, r);
|
|
110
178
|
break;
|
|
111
179
|
}
|
|
112
180
|
case "em": {
|
|
113
|
-
o =
|
|
181
|
+
o = nt(t, r);
|
|
114
182
|
break;
|
|
115
183
|
}
|
|
116
184
|
case "vh": {
|
|
117
|
-
o =
|
|
185
|
+
o = it(r);
|
|
118
186
|
break;
|
|
119
187
|
}
|
|
120
188
|
case "vw": {
|
|
121
|
-
o =
|
|
189
|
+
o = rt(r);
|
|
122
190
|
break;
|
|
123
191
|
}
|
|
124
192
|
}
|
|
@@ -127,8 +195,8 @@ function Q({
|
|
|
127
195
|
function G(e) {
|
|
128
196
|
return parseFloat(e.toFixed(3));
|
|
129
197
|
}
|
|
130
|
-
function
|
|
131
|
-
const { panels: t } = e, n =
|
|
198
|
+
function ye(e) {
|
|
199
|
+
const { panels: t } = e, n = B({ group: e });
|
|
132
200
|
return n === 0 ? t.map((o) => ({
|
|
133
201
|
collapsedSize: 0,
|
|
134
202
|
collapsible: o.panelConstraints.collapsible === !0,
|
|
@@ -138,18 +206,18 @@ function pe(e) {
|
|
|
138
206
|
panelId: o.id
|
|
139
207
|
})) : t.map((o) => {
|
|
140
208
|
const { element: r, panelConstraints: a } = o;
|
|
141
|
-
let
|
|
209
|
+
let l = 0;
|
|
142
210
|
if (a.collapsedSize) {
|
|
143
|
-
const c =
|
|
211
|
+
const c = te({
|
|
144
212
|
groupSize: n,
|
|
145
213
|
panelElement: r,
|
|
146
214
|
styleProp: a.collapsedSize
|
|
147
215
|
});
|
|
148
|
-
|
|
216
|
+
l = G(c / n * 100);
|
|
149
217
|
}
|
|
150
218
|
let i;
|
|
151
219
|
if (a.defaultSize) {
|
|
152
|
-
const c =
|
|
220
|
+
const c = te({
|
|
153
221
|
groupSize: n,
|
|
154
222
|
panelElement: r,
|
|
155
223
|
styleProp: a.defaultSize
|
|
@@ -158,33 +226,33 @@ function pe(e) {
|
|
|
158
226
|
}
|
|
159
227
|
let s = 0;
|
|
160
228
|
if (a.minSize) {
|
|
161
|
-
const c =
|
|
229
|
+
const c = te({
|
|
162
230
|
groupSize: n,
|
|
163
231
|
panelElement: r,
|
|
164
232
|
styleProp: a.minSize
|
|
165
233
|
});
|
|
166
234
|
s = G(c / n * 100);
|
|
167
235
|
}
|
|
168
|
-
let
|
|
236
|
+
let u = 100;
|
|
169
237
|
if (a.maxSize) {
|
|
170
|
-
const c =
|
|
238
|
+
const c = te({
|
|
171
239
|
groupSize: n,
|
|
172
240
|
panelElement: r,
|
|
173
241
|
styleProp: a.maxSize
|
|
174
242
|
});
|
|
175
|
-
|
|
243
|
+
u = G(c / n * 100);
|
|
176
244
|
}
|
|
177
245
|
return {
|
|
178
|
-
collapsedSize:
|
|
246
|
+
collapsedSize: l,
|
|
179
247
|
collapsible: a.collapsible === !0,
|
|
180
248
|
defaultSize: i,
|
|
181
249
|
minSize: s,
|
|
182
|
-
maxSize:
|
|
250
|
+
maxSize: u,
|
|
183
251
|
panelId: o.id
|
|
184
252
|
};
|
|
185
253
|
});
|
|
186
254
|
}
|
|
187
|
-
class
|
|
255
|
+
class at {
|
|
188
256
|
#e = {};
|
|
189
257
|
addListener(t, n) {
|
|
190
258
|
const o = this.#e[t];
|
|
@@ -199,13 +267,13 @@ class tt {
|
|
|
199
267
|
o[0].call(null, n);
|
|
200
268
|
else {
|
|
201
269
|
let r = !1, a = null;
|
|
202
|
-
const
|
|
203
|
-
for (let i = 0; i <
|
|
204
|
-
const s =
|
|
270
|
+
const l = Array.from(o);
|
|
271
|
+
for (let i = 0; i < l.length; i++) {
|
|
272
|
+
const s = l[i];
|
|
205
273
|
try {
|
|
206
274
|
s.call(null, n);
|
|
207
|
-
} catch (
|
|
208
|
-
a === null && (r = !0, a =
|
|
275
|
+
} catch (u) {
|
|
276
|
+
a === null && (r = !0, a = u);
|
|
209
277
|
}
|
|
210
278
|
}
|
|
211
279
|
if (r)
|
|
@@ -226,49 +294,49 @@ class tt {
|
|
|
226
294
|
function P(e, t, n = 0) {
|
|
227
295
|
return Math.abs(G(e) - G(t)) <= n;
|
|
228
296
|
}
|
|
229
|
-
let
|
|
297
|
+
let C = {
|
|
230
298
|
cursorFlags: 0,
|
|
231
299
|
interactionState: {
|
|
232
300
|
state: "inactive"
|
|
233
301
|
},
|
|
234
302
|
mountedGroups: /* @__PURE__ */ new Map()
|
|
235
303
|
};
|
|
236
|
-
const
|
|
237
|
-
function
|
|
238
|
-
return
|
|
304
|
+
const _ = new at();
|
|
305
|
+
function D() {
|
|
306
|
+
return C;
|
|
239
307
|
}
|
|
240
308
|
function E(e) {
|
|
241
|
-
const t = typeof e == "function" ? e(
|
|
242
|
-
if (
|
|
243
|
-
return
|
|
244
|
-
const n =
|
|
245
|
-
return
|
|
246
|
-
...
|
|
309
|
+
const t = typeof e == "function" ? e(C) : e;
|
|
310
|
+
if (C === t)
|
|
311
|
+
return C;
|
|
312
|
+
const n = C;
|
|
313
|
+
return C = {
|
|
314
|
+
...C,
|
|
247
315
|
...t
|
|
248
|
-
}, t.cursorFlags !== void 0 &&
|
|
316
|
+
}, t.cursorFlags !== void 0 && _.emit("cursorFlagsChange", C.cursorFlags), t.interactionState !== void 0 && _.emit("interactionStateChange", C.interactionState), t.mountedGroups !== void 0 && (C.mountedGroups.forEach((o, r) => {
|
|
249
317
|
o.derivedPanelConstraints.forEach((a) => {
|
|
250
318
|
if (a.collapsible) {
|
|
251
|
-
const { layout:
|
|
252
|
-
if (
|
|
319
|
+
const { layout: l } = n.mountedGroups.get(r) ?? {};
|
|
320
|
+
if (l) {
|
|
253
321
|
const i = P(
|
|
254
322
|
a.collapsedSize,
|
|
255
323
|
o.layout[a.panelId]
|
|
256
324
|
), s = P(
|
|
257
325
|
a.collapsedSize,
|
|
258
|
-
|
|
326
|
+
l[a.panelId]
|
|
259
327
|
);
|
|
260
|
-
i && !s && (r.inMemoryLastExpandedPanelSizes[a.panelId] =
|
|
328
|
+
i && !s && (r.inMemoryLastExpandedPanelSizes[a.panelId] = l[a.panelId]);
|
|
261
329
|
}
|
|
262
330
|
}
|
|
263
331
|
});
|
|
264
|
-
}),
|
|
332
|
+
}), _.emit("mountedGroupsChange", C.mountedGroups)), C;
|
|
265
333
|
}
|
|
266
|
-
const
|
|
267
|
-
},
|
|
334
|
+
const lt = (e) => e, ie = () => {
|
|
335
|
+
}, De = 1, Oe = 2, Te = 4, _e = 8, ge = {
|
|
268
336
|
coarse: 10,
|
|
269
337
|
precise: 5
|
|
270
338
|
};
|
|
271
|
-
function
|
|
339
|
+
function ut({
|
|
272
340
|
cursorFlags: e,
|
|
273
341
|
groups: t,
|
|
274
342
|
state: n
|
|
@@ -295,11 +363,11 @@ function ot({
|
|
|
295
363
|
return null;
|
|
296
364
|
switch (n) {
|
|
297
365
|
case "active": {
|
|
298
|
-
const a = (e &
|
|
366
|
+
const a = (e & De) !== 0, l = (e & Oe) !== 0, i = (e & Te) !== 0, s = (e & _e) !== 0;
|
|
299
367
|
if (e) {
|
|
300
368
|
if (a)
|
|
301
369
|
return i ? "se-resize" : s ? "ne-resize" : "e-resize";
|
|
302
|
-
if (
|
|
370
|
+
if (l)
|
|
303
371
|
return i ? "sw-resize" : s ? "nw-resize" : "w-resize";
|
|
304
372
|
if (i)
|
|
305
373
|
return "s-resize";
|
|
@@ -314,11 +382,11 @@ function ot({
|
|
|
314
382
|
let re, k;
|
|
315
383
|
function le() {
|
|
316
384
|
k === void 0 && (k = new CSSStyleSheet(), document.adoptedStyleSheets = [k]);
|
|
317
|
-
const { cursorFlags: e, interactionState: t } =
|
|
385
|
+
const { cursorFlags: e, interactionState: t } = D();
|
|
318
386
|
switch (t.state) {
|
|
319
387
|
case "active":
|
|
320
388
|
case "hover": {
|
|
321
|
-
const n =
|
|
389
|
+
const n = ut({
|
|
322
390
|
cursorFlags: e,
|
|
323
391
|
groups: t.hitRegions.map((r) => r.group),
|
|
324
392
|
state: t.state
|
|
@@ -334,7 +402,7 @@ function le() {
|
|
|
334
402
|
}
|
|
335
403
|
}
|
|
336
404
|
}
|
|
337
|
-
function
|
|
405
|
+
function ct(e, t) {
|
|
338
406
|
if (e.length !== t.length)
|
|
339
407
|
return !1;
|
|
340
408
|
for (let n = 0; n < e.length; n++)
|
|
@@ -342,10 +410,10 @@ function it(e, t) {
|
|
|
342
410
|
return !1;
|
|
343
411
|
return !0;
|
|
344
412
|
}
|
|
345
|
-
function
|
|
413
|
+
function X(e, t) {
|
|
346
414
|
return P(e, t) ? 0 : e > t ? 1 : -1;
|
|
347
415
|
}
|
|
348
|
-
function
|
|
416
|
+
function j({
|
|
349
417
|
panelConstraints: e,
|
|
350
418
|
size: t
|
|
351
419
|
}) {
|
|
@@ -355,15 +423,15 @@ function F({
|
|
|
355
423
|
maxSize: r = 100,
|
|
356
424
|
minSize: a = 0
|
|
357
425
|
} = e;
|
|
358
|
-
if (
|
|
426
|
+
if (X(t, a) < 0)
|
|
359
427
|
if (o) {
|
|
360
|
-
const
|
|
361
|
-
|
|
428
|
+
const l = (n + a) / 2;
|
|
429
|
+
X(t, l) < 0 ? t = n : t = a;
|
|
362
430
|
} else
|
|
363
431
|
t = a;
|
|
364
432
|
return t = Math.min(r, t), t = G(t), t;
|
|
365
433
|
}
|
|
366
|
-
function
|
|
434
|
+
function Y({
|
|
367
435
|
delta: e,
|
|
368
436
|
initialLayout: t,
|
|
369
437
|
panelConstraints: n,
|
|
@@ -373,141 +441,141 @@ function V({
|
|
|
373
441
|
}) {
|
|
374
442
|
if (P(e, 0))
|
|
375
443
|
return t;
|
|
376
|
-
const
|
|
377
|
-
|
|
378
|
-
let
|
|
444
|
+
const l = Object.values(t), i = Object.values(r), s = [...l], [u, c] = o;
|
|
445
|
+
z(u != null, "Invalid first pivot index"), z(c != null, "Invalid second pivot index");
|
|
446
|
+
let h = 0;
|
|
379
447
|
if (a === "keyboard") {
|
|
380
448
|
{
|
|
381
|
-
const f = e < 0 ? c :
|
|
382
|
-
|
|
383
|
-
|
|
449
|
+
const f = e < 0 ? c : u, d = n[f];
|
|
450
|
+
z(
|
|
451
|
+
d,
|
|
384
452
|
`Panel constraints not found for index ${f}`
|
|
385
453
|
);
|
|
386
454
|
const {
|
|
387
|
-
collapsedSize:
|
|
388
|
-
collapsible:
|
|
389
|
-
minSize:
|
|
390
|
-
} =
|
|
391
|
-
if (
|
|
392
|
-
const
|
|
393
|
-
if (
|
|
394
|
-
|
|
455
|
+
collapsedSize: y = 0,
|
|
456
|
+
collapsible: g,
|
|
457
|
+
minSize: v = 0
|
|
458
|
+
} = d;
|
|
459
|
+
if (g) {
|
|
460
|
+
const x = l[f];
|
|
461
|
+
if (z(
|
|
462
|
+
x != null,
|
|
395
463
|
`Previous layout not found for panel index ${f}`
|
|
396
|
-
), P(
|
|
397
|
-
const
|
|
398
|
-
|
|
464
|
+
), P(x, y)) {
|
|
465
|
+
const S = v - x;
|
|
466
|
+
X(S, Math.abs(e)) > 0 && (e = e < 0 ? 0 - S : S);
|
|
399
467
|
}
|
|
400
468
|
}
|
|
401
469
|
}
|
|
402
470
|
{
|
|
403
|
-
const f = e < 0 ?
|
|
404
|
-
|
|
405
|
-
|
|
471
|
+
const f = e < 0 ? u : c, d = n[f];
|
|
472
|
+
z(
|
|
473
|
+
d,
|
|
406
474
|
`No panel constraints found for index ${f}`
|
|
407
475
|
);
|
|
408
476
|
const {
|
|
409
|
-
collapsedSize:
|
|
410
|
-
collapsible:
|
|
411
|
-
minSize:
|
|
412
|
-
} =
|
|
413
|
-
if (
|
|
414
|
-
const
|
|
415
|
-
if (
|
|
416
|
-
|
|
477
|
+
collapsedSize: y = 0,
|
|
478
|
+
collapsible: g,
|
|
479
|
+
minSize: v = 0
|
|
480
|
+
} = d;
|
|
481
|
+
if (g) {
|
|
482
|
+
const x = l[f];
|
|
483
|
+
if (z(
|
|
484
|
+
x != null,
|
|
417
485
|
`Previous layout not found for panel index ${f}`
|
|
418
|
-
), P(
|
|
419
|
-
const
|
|
420
|
-
|
|
486
|
+
), P(x, v)) {
|
|
487
|
+
const S = x - y;
|
|
488
|
+
X(S, Math.abs(e)) > 0 && (e = e < 0 ? 0 - S : S);
|
|
421
489
|
}
|
|
422
490
|
}
|
|
423
491
|
}
|
|
424
492
|
}
|
|
425
493
|
{
|
|
426
494
|
const f = e < 0 ? 1 : -1;
|
|
427
|
-
let
|
|
495
|
+
let d = e < 0 ? c : u, y = 0;
|
|
428
496
|
for (; ; ) {
|
|
429
|
-
const
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
`Previous layout not found for panel index ${
|
|
497
|
+
const v = l[d];
|
|
498
|
+
z(
|
|
499
|
+
v != null,
|
|
500
|
+
`Previous layout not found for panel index ${d}`
|
|
433
501
|
);
|
|
434
|
-
const
|
|
435
|
-
panelConstraints: n[
|
|
502
|
+
const S = j({
|
|
503
|
+
panelConstraints: n[d],
|
|
436
504
|
size: 100
|
|
437
|
-
}) -
|
|
438
|
-
if (
|
|
505
|
+
}) - v;
|
|
506
|
+
if (y += S, d += f, d < 0 || d >= n.length)
|
|
439
507
|
break;
|
|
440
508
|
}
|
|
441
|
-
const
|
|
442
|
-
e = e < 0 ? 0 -
|
|
509
|
+
const g = Math.min(Math.abs(e), Math.abs(y));
|
|
510
|
+
e = e < 0 ? 0 - g : g;
|
|
443
511
|
}
|
|
444
512
|
{
|
|
445
|
-
let
|
|
446
|
-
for (;
|
|
447
|
-
const
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
`Previous layout not found for panel index ${
|
|
513
|
+
let d = e < 0 ? u : c;
|
|
514
|
+
for (; d >= 0 && d < n.length; ) {
|
|
515
|
+
const y = Math.abs(e) - Math.abs(h), g = l[d];
|
|
516
|
+
z(
|
|
517
|
+
g != null,
|
|
518
|
+
`Previous layout not found for panel index ${d}`
|
|
451
519
|
);
|
|
452
|
-
const
|
|
453
|
-
panelConstraints: n[
|
|
454
|
-
size:
|
|
520
|
+
const v = g - y, x = j({
|
|
521
|
+
panelConstraints: n[d],
|
|
522
|
+
size: v
|
|
455
523
|
});
|
|
456
|
-
if (!P(
|
|
524
|
+
if (!P(g, x) && (h += g - x, s[d] = x, h.toFixed(3).localeCompare(Math.abs(e).toFixed(3), void 0, {
|
|
457
525
|
numeric: !0
|
|
458
526
|
}) >= 0))
|
|
459
527
|
break;
|
|
460
|
-
e < 0 ?
|
|
528
|
+
e < 0 ? d-- : d++;
|
|
461
529
|
}
|
|
462
530
|
}
|
|
463
|
-
if (
|
|
531
|
+
if (ct(i, s))
|
|
464
532
|
return r;
|
|
465
533
|
{
|
|
466
|
-
const f = e < 0 ? c :
|
|
467
|
-
|
|
468
|
-
|
|
534
|
+
const f = e < 0 ? c : u, d = l[f];
|
|
535
|
+
z(
|
|
536
|
+
d != null,
|
|
469
537
|
`Previous layout not found for panel index ${f}`
|
|
470
538
|
);
|
|
471
|
-
const
|
|
539
|
+
const y = d + h, g = j({
|
|
472
540
|
panelConstraints: n[f],
|
|
473
|
-
size:
|
|
541
|
+
size: y
|
|
474
542
|
});
|
|
475
|
-
if (s[f] =
|
|
476
|
-
let
|
|
477
|
-
for (;
|
|
478
|
-
const
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
`Previous layout not found for panel index ${
|
|
543
|
+
if (s[f] = g, !P(g, y)) {
|
|
544
|
+
let v = y - g, S = e < 0 ? c : u;
|
|
545
|
+
for (; S >= 0 && S < n.length; ) {
|
|
546
|
+
const b = s[S];
|
|
547
|
+
z(
|
|
548
|
+
b != null,
|
|
549
|
+
`Previous layout not found for panel index ${S}`
|
|
482
550
|
);
|
|
483
|
-
const L =
|
|
484
|
-
panelConstraints: n[
|
|
551
|
+
const L = b + v, R = j({
|
|
552
|
+
panelConstraints: n[S],
|
|
485
553
|
size: L
|
|
486
554
|
});
|
|
487
|
-
if (P(
|
|
555
|
+
if (P(b, R) || (v -= R - b, s[S] = R), P(v, 0))
|
|
488
556
|
break;
|
|
489
|
-
e > 0 ?
|
|
557
|
+
e > 0 ? S-- : S++;
|
|
490
558
|
}
|
|
491
559
|
}
|
|
492
560
|
}
|
|
493
|
-
const
|
|
494
|
-
(f,
|
|
561
|
+
const m = Object.values(s).reduce(
|
|
562
|
+
(f, d) => d + f,
|
|
495
563
|
0
|
|
496
564
|
);
|
|
497
|
-
if (!P(
|
|
565
|
+
if (!P(m, 100, 0.1))
|
|
498
566
|
return r;
|
|
499
|
-
const
|
|
500
|
-
return s.reduce((f,
|
|
567
|
+
const p = Object.keys(r);
|
|
568
|
+
return s.reduce((f, d, y) => (f[p[y]] = d, f), {});
|
|
501
569
|
}
|
|
502
|
-
function
|
|
570
|
+
function U(e, t) {
|
|
503
571
|
if (Object.keys(e).length !== Object.keys(t).length)
|
|
504
572
|
return !1;
|
|
505
573
|
for (const n in e)
|
|
506
|
-
if (
|
|
574
|
+
if (t[n] === void 0 || X(e[n], t[n]) !== 0)
|
|
507
575
|
return !1;
|
|
508
576
|
return !0;
|
|
509
577
|
}
|
|
510
|
-
function
|
|
578
|
+
function Ae({
|
|
511
579
|
event: e,
|
|
512
580
|
hitRegions: t,
|
|
513
581
|
initialLayoutMap: n,
|
|
@@ -515,64 +583,66 @@ function ke({
|
|
|
515
583
|
pointerDownAtPoint: r
|
|
516
584
|
}) {
|
|
517
585
|
let a = 0;
|
|
518
|
-
const
|
|
586
|
+
const l = new Map(o);
|
|
519
587
|
t.forEach((i) => {
|
|
520
|
-
const { group: s, groupSize:
|
|
521
|
-
let
|
|
522
|
-
r ?
|
|
588
|
+
const { group: s, groupSize: u } = i, { disableCursor: c, orientation: h, panels: m } = s;
|
|
589
|
+
let p = 0;
|
|
590
|
+
r ? h === "horizontal" ? p = (e.clientX - r.x) / u * 100 : p = (e.clientY - r.y) / u * 100 : h === "horizontal" ? p = e.clientX < 0 ? -100 : 100 : p = e.clientY < 0 ? -100 : 100;
|
|
523
591
|
const f = n.get(s), {
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
592
|
+
defaultLayoutDeferred: d,
|
|
593
|
+
derivedPanelConstraints: y,
|
|
594
|
+
layout: g,
|
|
595
|
+
separatorToPanels: v
|
|
596
|
+
} = o.get(s) ?? { defaultLayoutDeferred: !1 };
|
|
597
|
+
if (y && f && g && v) {
|
|
598
|
+
const x = Y({
|
|
599
|
+
delta: p,
|
|
531
600
|
initialLayout: f,
|
|
532
|
-
panelConstraints:
|
|
533
|
-
pivotIndices: i.panels.map((
|
|
534
|
-
prevLayout:
|
|
601
|
+
panelConstraints: y,
|
|
602
|
+
pivotIndices: i.panels.map((S) => m.indexOf(S)),
|
|
603
|
+
prevLayout: g,
|
|
535
604
|
trigger: "mouse-or-touch"
|
|
536
605
|
});
|
|
537
|
-
if (
|
|
538
|
-
if (
|
|
539
|
-
switch (
|
|
606
|
+
if (U(x, g)) {
|
|
607
|
+
if (p !== 0 && !c)
|
|
608
|
+
switch (h) {
|
|
540
609
|
case "horizontal": {
|
|
541
|
-
a |=
|
|
610
|
+
a |= p < 0 ? De : Oe;
|
|
542
611
|
break;
|
|
543
612
|
}
|
|
544
613
|
case "vertical": {
|
|
545
|
-
a |=
|
|
614
|
+
a |= p < 0 ? Te : _e;
|
|
546
615
|
break;
|
|
547
616
|
}
|
|
548
617
|
}
|
|
549
618
|
} else {
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
619
|
+
l.set(i.group, {
|
|
620
|
+
defaultLayoutDeferred: d,
|
|
621
|
+
derivedPanelConstraints: y,
|
|
622
|
+
layout: x,
|
|
623
|
+
separatorToPanels: v
|
|
554
624
|
});
|
|
555
|
-
const
|
|
556
|
-
i.group.inMemoryLayouts[
|
|
625
|
+
const S = i.group.panels.map(({ id: b }) => b).join(",");
|
|
626
|
+
i.group.inMemoryLayouts[S] = x;
|
|
557
627
|
}
|
|
558
628
|
}
|
|
559
629
|
}), E({
|
|
560
630
|
cursorFlags: a,
|
|
561
|
-
mountedGroups:
|
|
631
|
+
mountedGroups: l
|
|
562
632
|
}), le();
|
|
563
633
|
}
|
|
564
|
-
function
|
|
634
|
+
function ve(e) {
|
|
565
635
|
if (e.defaultPrevented)
|
|
566
636
|
return;
|
|
567
637
|
if (e.relatedTarget !== null)
|
|
568
638
|
return;
|
|
569
639
|
if (e.clientX === 0 && e.clientY === 0)
|
|
570
640
|
return;
|
|
571
|
-
const { interactionState: t, mountedGroups: n } =
|
|
641
|
+
const { interactionState: t, mountedGroups: n } = D();
|
|
572
642
|
switch (t.state) {
|
|
573
643
|
case "active":
|
|
574
644
|
t.hitRegions.forEach((o) => {
|
|
575
|
-
e.currentTarget === o.group.element &&
|
|
645
|
+
e.currentTarget === o.group.element && Ae({
|
|
576
646
|
event: e,
|
|
577
647
|
hitRegions: t.hitRegions,
|
|
578
648
|
initialLayoutMap: t.initialLayoutMap,
|
|
@@ -581,10 +651,10 @@ function he(e) {
|
|
|
581
651
|
});
|
|
582
652
|
}
|
|
583
653
|
}
|
|
584
|
-
function
|
|
654
|
+
function oe(e) {
|
|
585
655
|
const t = e.parentElement;
|
|
586
|
-
|
|
587
|
-
const { mountedGroups: n } =
|
|
656
|
+
z(t, "Parent group element not found");
|
|
657
|
+
const { mountedGroups: n } = D();
|
|
588
658
|
for (const [o] of n)
|
|
589
659
|
if (o.element === t)
|
|
590
660
|
return o;
|
|
@@ -605,186 +675,177 @@ function A({
|
|
|
605
675
|
if (!P(r, 100) && o.length > 0)
|
|
606
676
|
for (let i = 0; i < t.length; i++) {
|
|
607
677
|
const s = o[i];
|
|
608
|
-
|
|
609
|
-
const
|
|
610
|
-
o[i] =
|
|
678
|
+
z(s != null, `No layout data found for index ${i}`);
|
|
679
|
+
const u = 100 / r * s;
|
|
680
|
+
o[i] = u;
|
|
611
681
|
}
|
|
612
682
|
let a = 0;
|
|
613
683
|
for (let i = 0; i < t.length; i++) {
|
|
614
684
|
const s = o[i];
|
|
615
|
-
|
|
616
|
-
const
|
|
685
|
+
z(s != null, `No layout data found for index ${i}`);
|
|
686
|
+
const u = j({
|
|
617
687
|
panelConstraints: t[i],
|
|
618
688
|
size: s
|
|
619
689
|
});
|
|
620
|
-
s !=
|
|
690
|
+
s != u && (a += s - u, o[i] = u);
|
|
621
691
|
}
|
|
622
692
|
if (!P(a, 0))
|
|
623
693
|
for (let i = 0; i < t.length; i++) {
|
|
624
694
|
const s = o[i];
|
|
625
|
-
|
|
626
|
-
const
|
|
695
|
+
z(s != null, `No layout data found for index ${i}`);
|
|
696
|
+
const u = s + a, c = j({
|
|
627
697
|
panelConstraints: t[i],
|
|
628
|
-
size:
|
|
698
|
+
size: u
|
|
629
699
|
});
|
|
630
700
|
if (s !== c && (a -= c - s, o[i] = c, P(a, 0)))
|
|
631
701
|
break;
|
|
632
702
|
}
|
|
633
|
-
const
|
|
634
|
-
return o.reduce((i, s,
|
|
703
|
+
const l = Object.keys(e);
|
|
704
|
+
return o.reduce((i, s, u) => (i[l[u]] = s, i), {});
|
|
635
705
|
}
|
|
636
|
-
function
|
|
706
|
+
function Ne({
|
|
637
707
|
groupId: e
|
|
638
708
|
}) {
|
|
639
709
|
const t = () => {
|
|
640
|
-
const { mountedGroups: n } =
|
|
710
|
+
const { mountedGroups: n } = D();
|
|
641
711
|
for (const [o, r] of n)
|
|
642
712
|
if (o.id === e)
|
|
643
713
|
return { group: o, ...r };
|
|
644
|
-
throw Error(`Group ${e}
|
|
714
|
+
throw Error(`Could not find Group with id "${e}"`);
|
|
645
715
|
};
|
|
646
716
|
return {
|
|
647
717
|
getLayout() {
|
|
648
|
-
const {
|
|
649
|
-
return n;
|
|
718
|
+
const { defaultLayoutDeferred: n, layout: o } = t();
|
|
719
|
+
return n ? {} : o;
|
|
650
720
|
},
|
|
651
721
|
setLayout(n) {
|
|
652
722
|
const {
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
723
|
+
defaultLayoutDeferred: o,
|
|
724
|
+
derivedPanelConstraints: r,
|
|
725
|
+
group: a,
|
|
726
|
+
layout: l,
|
|
727
|
+
separatorToPanels: i
|
|
728
|
+
} = t(), s = A({
|
|
658
729
|
layout: n,
|
|
659
|
-
panelConstraints:
|
|
730
|
+
panelConstraints: r
|
|
660
731
|
});
|
|
661
|
-
return
|
|
662
|
-
mountedGroups: new Map(
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
732
|
+
return o ? l : (U(l, s) || E((u) => ({
|
|
733
|
+
mountedGroups: new Map(u.mountedGroups).set(a, {
|
|
734
|
+
defaultLayoutDeferred: o,
|
|
735
|
+
derivedPanelConstraints: r,
|
|
736
|
+
layout: s,
|
|
737
|
+
separatorToPanels: i
|
|
666
738
|
})
|
|
667
|
-
})),
|
|
739
|
+
})), s);
|
|
668
740
|
}
|
|
669
741
|
};
|
|
670
742
|
}
|
|
671
|
-
function
|
|
672
|
-
const { mountedGroups: t } =
|
|
673
|
-
return
|
|
743
|
+
function $e(e) {
|
|
744
|
+
const { mountedGroups: t } = D(), n = t.get(e);
|
|
745
|
+
return z(n, `Mounted Group ${e.id} not found`), n;
|
|
674
746
|
}
|
|
675
|
-
function
|
|
676
|
-
const n =
|
|
677
|
-
(
|
|
747
|
+
function T(e, t) {
|
|
748
|
+
const n = oe(e), o = $e(n), r = n.separators.find(
|
|
749
|
+
(h) => h.element === e
|
|
678
750
|
);
|
|
679
|
-
|
|
751
|
+
z(r, "Matching separator not found");
|
|
680
752
|
const a = o.separatorToPanels.get(r);
|
|
681
|
-
|
|
682
|
-
const
|
|
753
|
+
z(a, "Matching panels not found");
|
|
754
|
+
const l = a.map((h) => n.panels.indexOf(h)), s = Ne({ groupId: n.id }).getLayout(), u = Y({
|
|
683
755
|
delta: t,
|
|
684
756
|
initialLayout: s,
|
|
685
757
|
panelConstraints: o.derivedPanelConstraints,
|
|
686
|
-
pivotIndices:
|
|
758
|
+
pivotIndices: l,
|
|
687
759
|
prevLayout: s,
|
|
688
760
|
trigger: "keyboard"
|
|
689
761
|
}), c = A({
|
|
690
|
-
layout:
|
|
762
|
+
layout: u,
|
|
691
763
|
panelConstraints: o.derivedPanelConstraints
|
|
692
764
|
});
|
|
693
|
-
|
|
694
|
-
mountedGroups: new Map(
|
|
765
|
+
U(s, c) || E((h) => ({
|
|
766
|
+
mountedGroups: new Map(h.mountedGroups).set(n, {
|
|
767
|
+
defaultLayoutDeferred: o.defaultLayoutDeferred,
|
|
695
768
|
derivedPanelConstraints: o.derivedPanelConstraints,
|
|
696
769
|
layout: c,
|
|
697
770
|
separatorToPanels: o.separatorToPanels
|
|
698
771
|
})
|
|
699
772
|
}));
|
|
700
773
|
}
|
|
701
|
-
function
|
|
774
|
+
function Se(e) {
|
|
702
775
|
if (e.defaultPrevented)
|
|
703
776
|
return;
|
|
704
|
-
const t = e.currentTarget, n =
|
|
777
|
+
const t = e.currentTarget, n = oe(t);
|
|
705
778
|
if (!n.disabled)
|
|
706
779
|
switch (e.key) {
|
|
707
780
|
case "ArrowDown": {
|
|
708
|
-
e.preventDefault(), n.orientation === "vertical" &&
|
|
781
|
+
e.preventDefault(), n.orientation === "vertical" && T(t, 5);
|
|
709
782
|
break;
|
|
710
783
|
}
|
|
711
784
|
case "ArrowLeft": {
|
|
712
|
-
e.preventDefault(), n.orientation === "horizontal" &&
|
|
785
|
+
e.preventDefault(), n.orientation === "horizontal" && T(t, -5);
|
|
713
786
|
break;
|
|
714
787
|
}
|
|
715
788
|
case "ArrowRight": {
|
|
716
|
-
e.preventDefault(), n.orientation === "horizontal" &&
|
|
789
|
+
e.preventDefault(), n.orientation === "horizontal" && T(t, 5);
|
|
717
790
|
break;
|
|
718
791
|
}
|
|
719
792
|
case "ArrowUp": {
|
|
720
|
-
e.preventDefault(), n.orientation === "vertical" &&
|
|
793
|
+
e.preventDefault(), n.orientation === "vertical" && T(t, -5);
|
|
721
794
|
break;
|
|
722
795
|
}
|
|
723
796
|
case "End": {
|
|
724
|
-
e.preventDefault(),
|
|
797
|
+
e.preventDefault(), T(t, 100);
|
|
725
798
|
break;
|
|
726
799
|
}
|
|
727
800
|
case "Enter": {
|
|
728
801
|
e.preventDefault();
|
|
729
|
-
const o =
|
|
730
|
-
(
|
|
802
|
+
const o = oe(t), { derivedPanelConstraints: r, layout: a, separatorToPanels: l } = $e(o), i = o.separators.find(
|
|
803
|
+
(h) => h.element === t
|
|
731
804
|
);
|
|
732
|
-
|
|
733
|
-
const s =
|
|
734
|
-
|
|
735
|
-
const
|
|
736
|
-
(
|
|
805
|
+
z(i, "Matching separator not found");
|
|
806
|
+
const s = l.get(i);
|
|
807
|
+
z(s, "Matching panels not found");
|
|
808
|
+
const u = s[0], c = r.find(
|
|
809
|
+
(h) => h.panelId === u.id
|
|
737
810
|
);
|
|
738
|
-
if (
|
|
739
|
-
const
|
|
740
|
-
|
|
811
|
+
if (z(c, "Panel metadata not found"), c.collapsible) {
|
|
812
|
+
const h = a[u.id], m = c.collapsedSize === h ? o.inMemoryLastExpandedPanelSizes[u.id] ?? c.minSize : c.collapsedSize;
|
|
813
|
+
T(t, m - h);
|
|
741
814
|
}
|
|
742
815
|
break;
|
|
743
816
|
}
|
|
744
817
|
case "F6": {
|
|
745
818
|
e.preventDefault();
|
|
746
|
-
const r =
|
|
819
|
+
const r = oe(t).separators.map(
|
|
747
820
|
(s) => s.element
|
|
748
821
|
), a = Array.from(r).findIndex(
|
|
749
822
|
(s) => s === e.currentTarget
|
|
750
823
|
);
|
|
751
|
-
|
|
752
|
-
const
|
|
753
|
-
r[
|
|
824
|
+
z(a !== null, "Index not found");
|
|
825
|
+
const l = e.shiftKey ? a > 0 ? a - 1 : r.length - 1 : a + 1 < r.length ? a + 1 : 0;
|
|
826
|
+
r[l].focus();
|
|
754
827
|
break;
|
|
755
828
|
}
|
|
756
829
|
case "Home": {
|
|
757
|
-
e.preventDefault(),
|
|
830
|
+
e.preventDefault(), T(t, -100);
|
|
758
831
|
break;
|
|
759
832
|
}
|
|
760
833
|
}
|
|
761
834
|
}
|
|
762
|
-
function
|
|
763
|
-
return {
|
|
764
|
-
x: e.x >= t.left && e.x <= t.right ? 0 : Math.min(
|
|
765
|
-
Math.abs(e.x - t.left),
|
|
766
|
-
Math.abs(e.x - t.right)
|
|
767
|
-
),
|
|
768
|
-
y: e.y >= t.top && e.y <= t.bottom ? 0 : Math.min(
|
|
769
|
-
Math.abs(e.y - t.top),
|
|
770
|
-
Math.abs(e.y - t.bottom)
|
|
771
|
-
)
|
|
772
|
-
};
|
|
773
|
-
}
|
|
774
|
-
function st(e, t, n) {
|
|
835
|
+
function ft(e, t, n) {
|
|
775
836
|
let o, r = {
|
|
776
837
|
x: 1 / 0,
|
|
777
838
|
y: 1 / 0
|
|
778
839
|
};
|
|
779
840
|
for (const a of t) {
|
|
780
|
-
const
|
|
841
|
+
const l = Ge(n, a.rect);
|
|
781
842
|
switch (e) {
|
|
782
843
|
case "horizontal": {
|
|
783
|
-
|
|
844
|
+
l.x <= r.x && (o = a, r = l);
|
|
784
845
|
break;
|
|
785
846
|
}
|
|
786
847
|
case "vertical": {
|
|
787
|
-
|
|
848
|
+
l.y <= r.y && (o = a, r = l);
|
|
788
849
|
break;
|
|
789
850
|
}
|
|
790
851
|
}
|
|
@@ -794,133 +855,133 @@ function st(e, t, n) {
|
|
|
794
855
|
hitRegion: o
|
|
795
856
|
} : void 0;
|
|
796
857
|
}
|
|
797
|
-
let
|
|
798
|
-
function
|
|
799
|
-
return
|
|
858
|
+
let ne;
|
|
859
|
+
function dt() {
|
|
860
|
+
return ne === void 0 && (typeof matchMedia == "function" ? ne = !!matchMedia("(pointer:coarse)").matches : ne = !1), ne;
|
|
800
861
|
}
|
|
801
|
-
function
|
|
862
|
+
function pt(e, t) {
|
|
802
863
|
if (e === t) throw new Error("Cannot compare node with itself");
|
|
803
864
|
const n = {
|
|
804
|
-
a:
|
|
805
|
-
b:
|
|
865
|
+
a: we(e),
|
|
866
|
+
b: we(t)
|
|
806
867
|
};
|
|
807
868
|
let o;
|
|
808
869
|
for (; n.a.at(-1) === n.b.at(-1); )
|
|
809
870
|
e = n.a.pop(), t = n.b.pop(), o = e;
|
|
810
|
-
|
|
871
|
+
z(
|
|
811
872
|
o,
|
|
812
873
|
"Stacking order can only be calculated for elements with a common ancestor"
|
|
813
874
|
);
|
|
814
875
|
const r = {
|
|
815
|
-
a:
|
|
816
|
-
b:
|
|
876
|
+
a: ze(xe(n.a)),
|
|
877
|
+
b: ze(xe(n.b))
|
|
817
878
|
};
|
|
818
879
|
if (r.a === r.b) {
|
|
819
|
-
const a = o.childNodes,
|
|
880
|
+
const a = o.childNodes, l = {
|
|
820
881
|
a: n.a.at(-1),
|
|
821
882
|
b: n.b.at(-1)
|
|
822
883
|
};
|
|
823
884
|
let i = a.length;
|
|
824
885
|
for (; i--; ) {
|
|
825
886
|
const s = a[i];
|
|
826
|
-
if (s ===
|
|
827
|
-
if (s ===
|
|
887
|
+
if (s === l.a) return 1;
|
|
888
|
+
if (s === l.b) return -1;
|
|
828
889
|
}
|
|
829
890
|
}
|
|
830
891
|
return Math.sign(r.a - r.b);
|
|
831
892
|
}
|
|
832
|
-
const
|
|
833
|
-
function
|
|
834
|
-
const t = getComputedStyle(
|
|
893
|
+
const ht = /\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;
|
|
894
|
+
function mt(e) {
|
|
895
|
+
const t = getComputedStyle(Fe(e) ?? e).display;
|
|
835
896
|
return t === "flex" || t === "inline-flex";
|
|
836
897
|
}
|
|
837
|
-
function
|
|
898
|
+
function yt(e) {
|
|
838
899
|
const t = getComputedStyle(e);
|
|
839
|
-
return !!(t.position === "fixed" || t.zIndex !== "auto" && (t.position !== "static" ||
|
|
900
|
+
return !!(t.position === "fixed" || t.zIndex !== "auto" && (t.position !== "static" || mt(e)) || +t.opacity < 1 || "transform" in t && t.transform !== "none" || "webkitTransform" in t && t.webkitTransform !== "none" || "mixBlendMode" in t && t.mixBlendMode !== "normal" || "filter" in t && t.filter !== "none" || "webkitFilter" in t && t.webkitFilter !== "none" || "isolation" in t && t.isolation === "isolate" || ht.test(t.willChange) || t.webkitOverflowScrolling === "touch");
|
|
840
901
|
}
|
|
841
|
-
function
|
|
902
|
+
function xe(e) {
|
|
842
903
|
let t = e.length;
|
|
843
904
|
for (; t--; ) {
|
|
844
905
|
const n = e[t];
|
|
845
|
-
if (
|
|
906
|
+
if (z(n, "Missing node"), yt(n)) return n;
|
|
846
907
|
}
|
|
847
908
|
return null;
|
|
848
909
|
}
|
|
849
|
-
function
|
|
910
|
+
function ze(e) {
|
|
850
911
|
return e && Number(getComputedStyle(e).zIndex) || 0;
|
|
851
912
|
}
|
|
852
|
-
function
|
|
913
|
+
function we(e) {
|
|
853
914
|
const t = [];
|
|
854
915
|
for (; e; )
|
|
855
|
-
t.push(e), e =
|
|
916
|
+
t.push(e), e = Fe(e);
|
|
856
917
|
return t;
|
|
857
918
|
}
|
|
858
|
-
function
|
|
919
|
+
function Fe(e) {
|
|
859
920
|
const { parentNode: t } = e;
|
|
860
921
|
return t && t instanceof ShadowRoot ? t.host : t;
|
|
861
922
|
}
|
|
862
|
-
function
|
|
923
|
+
function gt(e, t) {
|
|
863
924
|
return e.x < t.x + t.width && e.x + e.width > t.x && e.y < t.y + t.height && e.y + e.height > t.y;
|
|
864
925
|
}
|
|
865
|
-
function
|
|
926
|
+
function vt({
|
|
866
927
|
groupElement: e,
|
|
867
928
|
hitRegion: t,
|
|
868
929
|
pointerEventTarget: n
|
|
869
930
|
}) {
|
|
870
931
|
if (!(n instanceof HTMLElement) || n.contains(e) || e.contains(n))
|
|
871
932
|
return !0;
|
|
872
|
-
if (
|
|
933
|
+
if (pt(n, e) > 0) {
|
|
873
934
|
let o = n;
|
|
874
935
|
for (; o; ) {
|
|
875
936
|
if (o.contains(e))
|
|
876
937
|
return !0;
|
|
877
|
-
if (
|
|
938
|
+
if (gt(o.getBoundingClientRect(), t))
|
|
878
939
|
return !1;
|
|
879
940
|
o = o.parentElement;
|
|
880
941
|
}
|
|
881
942
|
}
|
|
882
943
|
return !0;
|
|
883
944
|
}
|
|
884
|
-
function
|
|
945
|
+
function He(e, t) {
|
|
885
946
|
const n = [];
|
|
886
947
|
return t.forEach((o, r) => {
|
|
887
948
|
if (r.disabled)
|
|
888
949
|
return;
|
|
889
|
-
const a =
|
|
950
|
+
const a = dt() ? ge.coarse : ge.precise, l = ke(r), i = ft(r.orientation, l, {
|
|
890
951
|
x: e.clientX,
|
|
891
952
|
y: e.clientY
|
|
892
953
|
});
|
|
893
|
-
i && i.distance.x <= a && i.distance.y <= a &&
|
|
954
|
+
i && i.distance.x <= a && i.distance.y <= a && vt({
|
|
894
955
|
groupElement: r.element,
|
|
895
956
|
hitRegion: i.hitRegion.rect,
|
|
896
957
|
pointerEventTarget: e.target
|
|
897
958
|
}) && n.push(i.hitRegion);
|
|
898
959
|
}), n;
|
|
899
960
|
}
|
|
900
|
-
function
|
|
961
|
+
function be(e) {
|
|
901
962
|
if (e.defaultPrevented)
|
|
902
963
|
return;
|
|
903
|
-
const { mountedGroups: t } =
|
|
964
|
+
const { mountedGroups: t } = D(), n = He(e, t), o = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set(), a = /* @__PURE__ */ new Set(), l = /* @__PURE__ */ new Map();
|
|
904
965
|
let i = !1;
|
|
905
966
|
n.forEach((s) => {
|
|
906
967
|
o.add(s.group), s.panels.forEach((c) => {
|
|
907
968
|
r.add(c);
|
|
908
969
|
}), s.separator && (a.add(s.separator), i || (i = !0, s.separator.element.focus()));
|
|
909
|
-
const
|
|
910
|
-
|
|
970
|
+
const u = t.get(s.group);
|
|
971
|
+
u && l.set(s.group, u.layout);
|
|
911
972
|
}), E({
|
|
912
973
|
interactionState: {
|
|
913
974
|
hitRegions: n,
|
|
914
|
-
initialLayoutMap:
|
|
975
|
+
initialLayoutMap: l,
|
|
915
976
|
pointerDownAtPoint: { x: e.clientX, y: e.clientY },
|
|
916
977
|
state: "active"
|
|
917
978
|
}
|
|
918
979
|
}), n.length && e.preventDefault();
|
|
919
980
|
}
|
|
920
|
-
function
|
|
981
|
+
function Le(e) {
|
|
921
982
|
if (e.defaultPrevented)
|
|
922
983
|
return;
|
|
923
|
-
const { interactionState: t, mountedGroups: n } =
|
|
984
|
+
const { interactionState: t, mountedGroups: n } = D();
|
|
924
985
|
switch (t.state) {
|
|
925
986
|
case "active": {
|
|
926
987
|
if (
|
|
@@ -937,7 +998,7 @@ function ze(e) {
|
|
|
937
998
|
);
|
|
938
999
|
return;
|
|
939
1000
|
}
|
|
940
|
-
|
|
1001
|
+
Ae({
|
|
941
1002
|
event: e,
|
|
942
1003
|
hitRegions: t.hitRegions,
|
|
943
1004
|
initialLayoutMap: t.initialLayoutMap,
|
|
@@ -947,7 +1008,7 @@ function ze(e) {
|
|
|
947
1008
|
break;
|
|
948
1009
|
}
|
|
949
1010
|
default: {
|
|
950
|
-
const o =
|
|
1011
|
+
const o = He(e, n);
|
|
951
1012
|
o.length === 0 ? t.state !== "inactive" && E({
|
|
952
1013
|
interactionState: { state: "inactive" }
|
|
953
1014
|
}) : E({
|
|
@@ -960,11 +1021,11 @@ function ze(e) {
|
|
|
960
1021
|
}
|
|
961
1022
|
}
|
|
962
1023
|
}
|
|
963
|
-
function
|
|
1024
|
+
function Pe(e) {
|
|
964
1025
|
if (e.defaultPrevented)
|
|
965
1026
|
return;
|
|
966
1027
|
e.preventDefault();
|
|
967
|
-
const { interactionState: t } =
|
|
1028
|
+
const { interactionState: t } = D();
|
|
968
1029
|
switch (t.state) {
|
|
969
1030
|
case "active":
|
|
970
1031
|
E({
|
|
@@ -975,32 +1036,32 @@ function be(e) {
|
|
|
975
1036
|
}), le();
|
|
976
1037
|
}
|
|
977
1038
|
}
|
|
978
|
-
function
|
|
1039
|
+
function Re(e) {
|
|
979
1040
|
let t = 0, n = 0;
|
|
980
1041
|
const o = {};
|
|
981
1042
|
for (const a of e)
|
|
982
1043
|
if (a.defaultSize !== void 0) {
|
|
983
1044
|
t++;
|
|
984
|
-
const
|
|
985
|
-
n +=
|
|
1045
|
+
const l = G(a.defaultSize);
|
|
1046
|
+
n += l, o[a.panelId] = l;
|
|
986
1047
|
} else
|
|
987
1048
|
o[a.panelId] = void 0;
|
|
988
1049
|
const r = e.length - t;
|
|
989
1050
|
if (r !== 0) {
|
|
990
1051
|
const a = G((100 - n) / r);
|
|
991
|
-
for (const
|
|
992
|
-
|
|
1052
|
+
for (const l of e)
|
|
1053
|
+
l.defaultSize === void 0 && (o[l.panelId] = a);
|
|
993
1054
|
}
|
|
994
1055
|
return o;
|
|
995
1056
|
}
|
|
996
|
-
function
|
|
1057
|
+
function St(e, t, n) {
|
|
997
1058
|
const o = n[0];
|
|
998
1059
|
if (!o)
|
|
999
1060
|
return;
|
|
1000
|
-
const r = e.panels.find((
|
|
1061
|
+
const r = e.panels.find((l) => l.element === t);
|
|
1001
1062
|
if (!r || !r.onResize)
|
|
1002
1063
|
return;
|
|
1003
|
-
const a =
|
|
1064
|
+
const a = B({ group: e });
|
|
1004
1065
|
r.onResize(
|
|
1005
1066
|
{
|
|
1006
1067
|
asPercentage: G(
|
|
@@ -1011,89 +1072,89 @@ function mt(e, t, n) {
|
|
|
1011
1072
|
r.id
|
|
1012
1073
|
);
|
|
1013
1074
|
}
|
|
1014
|
-
function
|
|
1075
|
+
function xt(e) {
|
|
1015
1076
|
let t = !0;
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
const n = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Set(), r = new ResizeObserver((m) => {
|
|
1021
|
-
for (const f of m) {
|
|
1022
|
-
const { borderBoxSize: p, target: h } = f;
|
|
1023
|
-
if (h === e.element) {
|
|
1077
|
+
const n = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Set(), r = new ResizeObserver((p) => {
|
|
1078
|
+
for (const f of p) {
|
|
1079
|
+
const { borderBoxSize: d, target: y } = f;
|
|
1080
|
+
if (y === e.element) {
|
|
1024
1081
|
if (t) {
|
|
1025
|
-
if (
|
|
1082
|
+
if (B({ group: e }) === 0)
|
|
1026
1083
|
return;
|
|
1027
|
-
E((
|
|
1028
|
-
const
|
|
1029
|
-
if (
|
|
1030
|
-
const
|
|
1031
|
-
layout:
|
|
1032
|
-
panelConstraints:
|
|
1084
|
+
E((v) => {
|
|
1085
|
+
const x = v.mountedGroups.get(e);
|
|
1086
|
+
if (x) {
|
|
1087
|
+
const S = ye(e), b = x.defaultLayoutDeferred ? Re(S) : x.layout, L = A({
|
|
1088
|
+
layout: b,
|
|
1089
|
+
panelConstraints: S
|
|
1033
1090
|
});
|
|
1034
|
-
return !
|
|
1035
|
-
mountedGroups: new Map(
|
|
1036
|
-
|
|
1091
|
+
return !x.defaultLayoutDeferred && U(b, L) ? v : {
|
|
1092
|
+
mountedGroups: new Map(v.mountedGroups).set(e, {
|
|
1093
|
+
defaultLayoutDeferred: !1,
|
|
1094
|
+
derivedPanelConstraints: S,
|
|
1037
1095
|
layout: L,
|
|
1038
|
-
separatorToPanels:
|
|
1096
|
+
separatorToPanels: x.separatorToPanels
|
|
1039
1097
|
})
|
|
1040
1098
|
};
|
|
1041
1099
|
}
|
|
1042
|
-
return
|
|
1100
|
+
return v;
|
|
1043
1101
|
});
|
|
1044
1102
|
}
|
|
1045
1103
|
} else
|
|
1046
|
-
|
|
1104
|
+
St(e, y, d);
|
|
1047
1105
|
}
|
|
1048
1106
|
});
|
|
1049
|
-
r.observe(e.element), e.panels.forEach((
|
|
1050
|
-
|
|
1051
|
-
!n.has(
|
|
1052
|
-
`Panel ids must be unique; id "${
|
|
1053
|
-
), n.add(
|
|
1107
|
+
r.observe(e.element), e.panels.forEach((p) => {
|
|
1108
|
+
z(
|
|
1109
|
+
!n.has(p.id),
|
|
1110
|
+
`Panel ids must be unique; id "${p.id}" was used more than once`
|
|
1111
|
+
), n.add(p.id), p.onResize && r.observe(p.element);
|
|
1054
1112
|
});
|
|
1055
|
-
const a =
|
|
1113
|
+
const a = B({ group: e }), l = ye(e), i = e.panels.map(({ id: p }) => p).join(",");
|
|
1056
1114
|
let s = e.defaultLayout;
|
|
1057
1115
|
s && e.panels.length !== Object.keys(s).length && (s = void 0);
|
|
1058
|
-
const
|
|
1059
|
-
layout:
|
|
1060
|
-
panelConstraints:
|
|
1061
|
-
}),
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1116
|
+
const u = e.inMemoryLayouts[i] ?? s ?? Re(l), c = A({
|
|
1117
|
+
layout: u,
|
|
1118
|
+
panelConstraints: l
|
|
1119
|
+
}), h = ke(e), m = E((p) => {
|
|
1120
|
+
const f = /* @__PURE__ */ new Map();
|
|
1121
|
+
return h.forEach((d) => {
|
|
1122
|
+
d.separator && f.set(d.separator, d.panels);
|
|
1123
|
+
}), {
|
|
1124
|
+
mountedGroups: new Map(p.mountedGroups).set(e, {
|
|
1125
|
+
defaultLayoutDeferred: a === 0,
|
|
1126
|
+
derivedPanelConstraints: l,
|
|
1127
|
+
layout: c,
|
|
1128
|
+
separatorToPanels: f
|
|
1129
|
+
})
|
|
1130
|
+
};
|
|
1131
|
+
});
|
|
1132
|
+
return e.element.addEventListener("pointerleave", ve), e.separators.forEach((p) => {
|
|
1133
|
+
z(
|
|
1134
|
+
!o.has(p.id),
|
|
1135
|
+
`Separator ids must be unique; id "${p.id}" was used more than once`
|
|
1136
|
+
), o.add(p.id), p.element.addEventListener("keydown", Se);
|
|
1137
|
+
}), m.mountedGroups.size === 1 && (window.addEventListener("pointerdown", be), window.addEventListener("pointermove", Le), window.addEventListener("pointerup", Pe)), function() {
|
|
1077
1138
|
t = !1;
|
|
1078
|
-
const f = E((
|
|
1079
|
-
const
|
|
1080
|
-
return
|
|
1139
|
+
const f = E((d) => {
|
|
1140
|
+
const y = new Map(d.mountedGroups);
|
|
1141
|
+
return y.delete(e), { mountedGroups: y };
|
|
1081
1142
|
});
|
|
1082
|
-
e.element.removeEventListener("pointerleave",
|
|
1083
|
-
|
|
1084
|
-
}), f.mountedGroups.size === 0 && (window.removeEventListener("pointerdown",
|
|
1143
|
+
e.element.removeEventListener("pointerleave", ve), e.separators.forEach((d) => {
|
|
1144
|
+
d.element.removeEventListener("keydown", Se);
|
|
1145
|
+
}), f.mountedGroups.size === 0 && (window.removeEventListener("pointerdown", be), window.removeEventListener("pointermove", Le), window.removeEventListener("pointerup", Pe)), r.disconnect();
|
|
1085
1146
|
};
|
|
1086
1147
|
}
|
|
1087
1148
|
function ue(e) {
|
|
1088
|
-
const t =
|
|
1149
|
+
const t = Xe();
|
|
1089
1150
|
return `${e ?? t}`;
|
|
1090
1151
|
}
|
|
1091
|
-
const
|
|
1152
|
+
const N = typeof window < "u" ? Ye : Ce;
|
|
1092
1153
|
function ce(e) {
|
|
1093
|
-
const t =
|
|
1094
|
-
return
|
|
1154
|
+
const t = O(e);
|
|
1155
|
+
return N(() => {
|
|
1095
1156
|
t.current = e;
|
|
1096
|
-
}, [e]),
|
|
1157
|
+
}, [e]), Ee((n) => t.current?.(n), [t]);
|
|
1097
1158
|
}
|
|
1098
1159
|
function fe(...e) {
|
|
1099
1160
|
return ce((t) => {
|
|
@@ -1112,136 +1173,161 @@ function fe(...e) {
|
|
|
1112
1173
|
});
|
|
1113
1174
|
});
|
|
1114
1175
|
}
|
|
1115
|
-
|
|
1116
|
-
|
|
1176
|
+
function zt(e) {
|
|
1177
|
+
const t = O({ ...e });
|
|
1178
|
+
return N(() => {
|
|
1179
|
+
for (const n in e)
|
|
1180
|
+
t.current[n] = e[n];
|
|
1181
|
+
}, [e]), t.current;
|
|
1182
|
+
}
|
|
1183
|
+
const We = "--react-resizable-panels--panel--pointer-events";
|
|
1184
|
+
function je(e, t) {
|
|
1117
1185
|
const n = e.replace(/[^a-zA-Z0-9\-_]/g, ""), o = t.replace(/[^a-zA-Z0-9\-_]/g, "");
|
|
1118
1186
|
return `--react-resizable-panels--${n}--${o}`;
|
|
1119
1187
|
}
|
|
1120
|
-
const
|
|
1121
|
-
function
|
|
1122
|
-
const n =
|
|
1188
|
+
const Be = qe(null);
|
|
1189
|
+
function wt(e, t) {
|
|
1190
|
+
const n = O({
|
|
1123
1191
|
getLayout: () => ({}),
|
|
1124
|
-
setLayout:
|
|
1192
|
+
setLayout: lt
|
|
1125
1193
|
});
|
|
1126
|
-
|
|
1194
|
+
Me(t, () => n.current, []), N(() => {
|
|
1127
1195
|
Object.assign(
|
|
1128
1196
|
n.current,
|
|
1129
|
-
|
|
1197
|
+
Ne({ groupId: e })
|
|
1130
1198
|
);
|
|
1131
1199
|
});
|
|
1132
1200
|
}
|
|
1133
|
-
function
|
|
1201
|
+
function Gt({
|
|
1134
1202
|
children: e,
|
|
1135
1203
|
className: t,
|
|
1136
1204
|
defaultLayout: n,
|
|
1137
1205
|
disableCursor: o,
|
|
1138
1206
|
disabled: r,
|
|
1139
1207
|
elementRef: a,
|
|
1140
|
-
groupRef:
|
|
1208
|
+
groupRef: l,
|
|
1141
1209
|
id: i,
|
|
1142
1210
|
onLayoutChange: s,
|
|
1143
|
-
orientation:
|
|
1211
|
+
orientation: u = "horizontal",
|
|
1144
1212
|
style: c,
|
|
1145
|
-
...
|
|
1213
|
+
...h
|
|
1146
1214
|
}) {
|
|
1147
|
-
const
|
|
1148
|
-
|
|
1149
|
-
}), f = ue(i), [
|
|
1150
|
-
|
|
1151
|
-
|
|
1215
|
+
const m = O({}), p = ce((w) => {
|
|
1216
|
+
U(m.current, w) || (m.current = w, s?.(w));
|
|
1217
|
+
}), f = ue(i), [d, y] = I(!1), [g, v] = I(null), [x, S] = I(n ?? {}), [b, L] = I([]), [R, q] = I([]), Z = O({
|
|
1218
|
+
lastExpandedPanelSizes: {},
|
|
1219
|
+
layouts: {}
|
|
1220
|
+
}), J = fe(v, a);
|
|
1221
|
+
wt(f, l);
|
|
1222
|
+
const Q = Ie(
|
|
1152
1223
|
() => ({
|
|
1153
1224
|
id: f,
|
|
1154
|
-
orientation:
|
|
1155
|
-
registerPanel: (
|
|
1156
|
-
L((M) => M.filter((
|
|
1225
|
+
orientation: u,
|
|
1226
|
+
registerPanel: (w) => (L((M) => se(u, [...M, w])), () => {
|
|
1227
|
+
L((M) => M.filter((F) => F !== w));
|
|
1157
1228
|
}),
|
|
1158
|
-
registerSeparator: (
|
|
1159
|
-
(M) => se(
|
|
1229
|
+
registerSeparator: (w) => (q(
|
|
1230
|
+
(M) => se(u, [...M, w])
|
|
1160
1231
|
), () => {
|
|
1161
|
-
|
|
1162
|
-
(M) => M.filter((
|
|
1232
|
+
q(
|
|
1233
|
+
(M) => M.filter((F) => F !== w)
|
|
1163
1234
|
);
|
|
1164
1235
|
})
|
|
1165
1236
|
}),
|
|
1166
|
-
[f,
|
|
1167
|
-
)
|
|
1168
|
-
|
|
1169
|
-
|
|
1237
|
+
[f, u]
|
|
1238
|
+
), $ = zt({
|
|
1239
|
+
defaultLayout: n,
|
|
1240
|
+
disableCursor: o
|
|
1241
|
+
}), V = O(null);
|
|
1242
|
+
N(() => {
|
|
1243
|
+
if (g === null)
|
|
1170
1244
|
return;
|
|
1171
|
-
const
|
|
1172
|
-
defaultLayout:
|
|
1173
|
-
disableCursor:
|
|
1245
|
+
const w = {
|
|
1246
|
+
defaultLayout: $.defaultLayout,
|
|
1247
|
+
disableCursor: !!$.disableCursor,
|
|
1174
1248
|
disabled: !!r,
|
|
1175
|
-
element:
|
|
1249
|
+
element: g,
|
|
1176
1250
|
id: f,
|
|
1177
|
-
inMemoryLastExpandedPanelSizes:
|
|
1178
|
-
inMemoryLayouts:
|
|
1179
|
-
orientation:
|
|
1180
|
-
panels:
|
|
1181
|
-
separators:
|
|
1182
|
-
}
|
|
1183
|
-
|
|
1184
|
-
const
|
|
1251
|
+
inMemoryLastExpandedPanelSizes: Z.current.lastExpandedPanelSizes,
|
|
1252
|
+
inMemoryLayouts: Z.current.layouts,
|
|
1253
|
+
orientation: u,
|
|
1254
|
+
panels: b,
|
|
1255
|
+
separators: R
|
|
1256
|
+
};
|
|
1257
|
+
V.current = w;
|
|
1258
|
+
const M = xt(w), he = D().mountedGroups.get(w);
|
|
1259
|
+
if (he) {
|
|
1260
|
+
const { defaultLayoutDeferred: H, derivedPanelConstraints: W, layout: ee } = he;
|
|
1261
|
+
!H && W.length > 0 && (S(ee), p?.(ee));
|
|
1262
|
+
}
|
|
1263
|
+
const Ue = _.addListener(
|
|
1185
1264
|
"interactionStateChange",
|
|
1186
|
-
(
|
|
1187
|
-
switch (
|
|
1265
|
+
(H) => {
|
|
1266
|
+
switch (H.state) {
|
|
1188
1267
|
case "active": {
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
(
|
|
1268
|
+
y(
|
|
1269
|
+
H.hitRegions.some(
|
|
1270
|
+
(W) => W.group === w
|
|
1192
1271
|
)
|
|
1193
1272
|
);
|
|
1194
1273
|
break;
|
|
1195
1274
|
}
|
|
1196
1275
|
default: {
|
|
1197
|
-
|
|
1276
|
+
y(!1);
|
|
1198
1277
|
break;
|
|
1199
1278
|
}
|
|
1200
1279
|
}
|
|
1201
1280
|
}
|
|
1202
|
-
),
|
|
1281
|
+
), Ve = _.addListener(
|
|
1203
1282
|
"mountedGroupsChange",
|
|
1204
|
-
(
|
|
1205
|
-
const
|
|
1206
|
-
|
|
1283
|
+
(H) => {
|
|
1284
|
+
const W = H.get(w);
|
|
1285
|
+
if (W) {
|
|
1286
|
+
const { defaultLayoutDeferred: ee, derivedPanelConstraints: Ke, layout: me } = W;
|
|
1287
|
+
if (ee || Ke.length === 0)
|
|
1288
|
+
return;
|
|
1289
|
+
S(me), p?.(me);
|
|
1290
|
+
}
|
|
1207
1291
|
}
|
|
1208
1292
|
);
|
|
1209
1293
|
return () => {
|
|
1210
|
-
M(),
|
|
1294
|
+
V.current = null, M(), Ue(), Ve();
|
|
1211
1295
|
};
|
|
1212
1296
|
}, [
|
|
1213
|
-
n,
|
|
1214
|
-
o,
|
|
1215
1297
|
r,
|
|
1216
|
-
|
|
1298
|
+
g,
|
|
1217
1299
|
f,
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1300
|
+
p,
|
|
1301
|
+
u,
|
|
1302
|
+
b,
|
|
1303
|
+
R,
|
|
1304
|
+
$
|
|
1305
|
+
]), Ce(() => {
|
|
1306
|
+
const w = V.current;
|
|
1307
|
+
w && (w.defaultLayout = n, w.disableCursor = !!o);
|
|
1308
|
+
});
|
|
1309
|
+
const pe = {
|
|
1310
|
+
[We]: d ? "none" : void 0
|
|
1225
1311
|
};
|
|
1226
|
-
for (const
|
|
1227
|
-
const M =
|
|
1228
|
-
|
|
1312
|
+
for (const w in x) {
|
|
1313
|
+
const M = je(f, w), F = x[w];
|
|
1314
|
+
pe[M] = F;
|
|
1229
1315
|
}
|
|
1230
|
-
return /* @__PURE__ */
|
|
1316
|
+
return /* @__PURE__ */ K(Be.Provider, { value: Q, children: /* @__PURE__ */ K(
|
|
1231
1317
|
"div",
|
|
1232
1318
|
{
|
|
1233
|
-
...
|
|
1234
|
-
"aria-orientation":
|
|
1319
|
+
...h,
|
|
1320
|
+
"aria-orientation": u,
|
|
1235
1321
|
className: t,
|
|
1236
1322
|
"data-group": !0,
|
|
1237
1323
|
"data-testid": f,
|
|
1238
1324
|
id: f,
|
|
1239
|
-
ref:
|
|
1325
|
+
ref: J,
|
|
1240
1326
|
style: {
|
|
1241
1327
|
...c,
|
|
1242
|
-
...
|
|
1328
|
+
...pe,
|
|
1243
1329
|
display: "flex",
|
|
1244
|
-
flexDirection:
|
|
1330
|
+
flexDirection: u === "horizontal" ? "row" : "column",
|
|
1245
1331
|
flexWrap: "nowrap"
|
|
1246
1332
|
},
|
|
1247
1333
|
children: e
|
|
@@ -1251,7 +1337,7 @@ function Pt({
|
|
|
1251
1337
|
function ae(e) {
|
|
1252
1338
|
return `react-resizable-panels:${e}`;
|
|
1253
1339
|
}
|
|
1254
|
-
function
|
|
1340
|
+
function bt({
|
|
1255
1341
|
id: e,
|
|
1256
1342
|
layout: t,
|
|
1257
1343
|
storage: n
|
|
@@ -1263,19 +1349,19 @@ function yt({
|
|
|
1263
1349
|
console.error(o);
|
|
1264
1350
|
}
|
|
1265
1351
|
}
|
|
1266
|
-
function
|
|
1352
|
+
function kt({
|
|
1267
1353
|
groupId: e,
|
|
1268
1354
|
storage: t
|
|
1269
1355
|
}) {
|
|
1270
|
-
const n =
|
|
1271
|
-
|
|
1356
|
+
const n = Ze(
|
|
1357
|
+
Lt,
|
|
1272
1358
|
() => t.getItem(ae(e)),
|
|
1273
1359
|
() => t.getItem(ae(e))
|
|
1274
|
-
), o =
|
|
1360
|
+
), o = Ie(
|
|
1275
1361
|
() => n ? JSON.parse(n) : void 0,
|
|
1276
1362
|
[n]
|
|
1277
|
-
), r =
|
|
1278
|
-
(a) =>
|
|
1363
|
+
), r = Ee(
|
|
1364
|
+
(a) => bt({
|
|
1279
1365
|
id: e,
|
|
1280
1366
|
layout: a,
|
|
1281
1367
|
storage: t
|
|
@@ -1287,35 +1373,46 @@ function Ct({
|
|
|
1287
1373
|
onLayoutChange: r
|
|
1288
1374
|
};
|
|
1289
1375
|
}
|
|
1290
|
-
function
|
|
1376
|
+
function Lt() {
|
|
1291
1377
|
return function() {
|
|
1292
1378
|
};
|
|
1293
1379
|
}
|
|
1294
|
-
function
|
|
1380
|
+
function Dt() {
|
|
1295
1381
|
return I(null);
|
|
1296
1382
|
}
|
|
1297
|
-
function
|
|
1298
|
-
return
|
|
1383
|
+
function Ot() {
|
|
1384
|
+
return O(null);
|
|
1299
1385
|
}
|
|
1300
1386
|
function de() {
|
|
1301
|
-
const e =
|
|
1302
|
-
return
|
|
1387
|
+
const e = Je(Be);
|
|
1388
|
+
return z(
|
|
1303
1389
|
e,
|
|
1304
1390
|
"Group Context not found; did you render a Panel or Separator outside of a Group?"
|
|
1305
1391
|
), e;
|
|
1306
1392
|
}
|
|
1307
|
-
function
|
|
1393
|
+
function Pt({
|
|
1308
1394
|
groupId: e,
|
|
1309
1395
|
panelId: t
|
|
1310
1396
|
}) {
|
|
1311
1397
|
const n = () => {
|
|
1312
|
-
const { mountedGroups: i } =
|
|
1398
|
+
const { mountedGroups: i } = D();
|
|
1313
1399
|
for (const [
|
|
1314
1400
|
s,
|
|
1315
|
-
{
|
|
1401
|
+
{
|
|
1402
|
+
defaultLayoutDeferred: u,
|
|
1403
|
+
derivedPanelConstraints: c,
|
|
1404
|
+
layout: h,
|
|
1405
|
+
separatorToPanels: m
|
|
1406
|
+
}
|
|
1316
1407
|
] of i)
|
|
1317
1408
|
if (s.id === e)
|
|
1318
|
-
return {
|
|
1409
|
+
return {
|
|
1410
|
+
defaultLayoutDeferred: u,
|
|
1411
|
+
derivedPanelConstraints: c,
|
|
1412
|
+
group: s,
|
|
1413
|
+
layout: h,
|
|
1414
|
+
separatorToPanels: m
|
|
1415
|
+
};
|
|
1319
1416
|
throw Error(`Group ${e} not found`);
|
|
1320
1417
|
}, o = () => {
|
|
1321
1418
|
const i = n().derivedPanelConstraints.find(
|
|
@@ -1334,75 +1431,77 @@ function St({
|
|
|
1334
1431
|
if (i !== void 0)
|
|
1335
1432
|
return i;
|
|
1336
1433
|
throw Error(`Layout not found for Panel ${t}`);
|
|
1337
|
-
},
|
|
1434
|
+
}, l = (i) => {
|
|
1338
1435
|
const s = a();
|
|
1339
1436
|
if (i === s)
|
|
1340
1437
|
return;
|
|
1341
1438
|
const {
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1439
|
+
defaultLayoutDeferred: u,
|
|
1440
|
+
derivedPanelConstraints: c,
|
|
1441
|
+
group: h,
|
|
1442
|
+
layout: m,
|
|
1443
|
+
separatorToPanels: p
|
|
1444
|
+
} = n(), f = h.panels.findIndex((v) => v.id === t), d = f === h.panels.length - 1, y = Y({
|
|
1445
|
+
delta: d ? s - i : i - s,
|
|
1446
|
+
initialLayout: m,
|
|
1447
|
+
panelConstraints: c,
|
|
1448
|
+
pivotIndices: d ? [f - 1, f] : [f, f + 1],
|
|
1449
|
+
prevLayout: m,
|
|
1352
1450
|
trigger: "imperative-api"
|
|
1353
|
-
}),
|
|
1354
|
-
layout:
|
|
1355
|
-
panelConstraints:
|
|
1451
|
+
}), g = A({
|
|
1452
|
+
layout: y,
|
|
1453
|
+
panelConstraints: c
|
|
1356
1454
|
});
|
|
1357
|
-
|
|
1358
|
-
mountedGroups: new Map(
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1455
|
+
U(m, g) || E((v) => ({
|
|
1456
|
+
mountedGroups: new Map(v.mountedGroups).set(h, {
|
|
1457
|
+
defaultLayoutDeferred: u,
|
|
1458
|
+
derivedPanelConstraints: c,
|
|
1459
|
+
layout: g,
|
|
1460
|
+
separatorToPanels: p
|
|
1362
1461
|
})
|
|
1363
1462
|
}));
|
|
1364
1463
|
};
|
|
1365
1464
|
return {
|
|
1366
1465
|
collapse: () => {
|
|
1367
|
-
const { collapsible: i, collapsedSize: s } = o(),
|
|
1368
|
-
i &&
|
|
1466
|
+
const { collapsible: i, collapsedSize: s } = o(), u = a();
|
|
1467
|
+
i && u !== s && l(s);
|
|
1369
1468
|
},
|
|
1370
1469
|
expand: () => {
|
|
1371
|
-
const { collapsible: i, collapsedSize: s, minSize:
|
|
1372
|
-
i && c === s && u
|
|
1470
|
+
const { collapsible: i, collapsedSize: s, minSize: u } = o(), c = a();
|
|
1471
|
+
i && c === s && l(u);
|
|
1373
1472
|
},
|
|
1374
1473
|
getSize: () => {
|
|
1375
|
-
const { group: i } = n(), s = a(), { element:
|
|
1474
|
+
const { group: i } = n(), s = a(), { element: u } = r(), c = i.orientation === "horizontal" ? u.offsetWidth : u.offsetHeight;
|
|
1376
1475
|
return {
|
|
1377
1476
|
asPercentage: s,
|
|
1378
1477
|
inPixels: c
|
|
1379
1478
|
};
|
|
1380
1479
|
},
|
|
1381
1480
|
isCollapsed: () => {
|
|
1382
|
-
const { collapsible: i, collapsedSize: s } = o(),
|
|
1383
|
-
return i && P(s,
|
|
1481
|
+
const { collapsible: i, collapsedSize: s } = o(), u = a();
|
|
1482
|
+
return i && P(s, u);
|
|
1384
1483
|
},
|
|
1385
1484
|
resize: (i) => {
|
|
1386
1485
|
if (a() !== i) {
|
|
1387
|
-
let
|
|
1486
|
+
let u;
|
|
1388
1487
|
switch (typeof i) {
|
|
1389
1488
|
case "number": {
|
|
1390
|
-
const { group: c } = n(),
|
|
1391
|
-
|
|
1489
|
+
const { group: c } = n(), h = B({ group: c });
|
|
1490
|
+
u = G(i / h * 100);
|
|
1392
1491
|
break;
|
|
1393
1492
|
}
|
|
1394
1493
|
case "string": {
|
|
1395
|
-
|
|
1494
|
+
u = parseFloat(i);
|
|
1396
1495
|
break;
|
|
1397
1496
|
}
|
|
1398
1497
|
}
|
|
1399
|
-
u
|
|
1498
|
+
l(u);
|
|
1400
1499
|
}
|
|
1401
1500
|
}
|
|
1402
1501
|
};
|
|
1403
1502
|
}
|
|
1404
|
-
function
|
|
1405
|
-
const { id: n } = de(), o =
|
|
1503
|
+
function Rt(e, t) {
|
|
1504
|
+
const { id: n } = de(), o = O({
|
|
1406
1505
|
collapse: ie,
|
|
1407
1506
|
expand: ie,
|
|
1408
1507
|
getSize: () => ({
|
|
@@ -1412,38 +1511,38 @@ function xt(e, t) {
|
|
|
1412
1511
|
isCollapsed: () => !1,
|
|
1413
1512
|
resize: ie
|
|
1414
1513
|
});
|
|
1415
|
-
|
|
1514
|
+
Me(t, () => o.current, []), N(() => {
|
|
1416
1515
|
Object.assign(
|
|
1417
1516
|
o.current,
|
|
1418
|
-
|
|
1517
|
+
Pt({ groupId: n, panelId: e })
|
|
1419
1518
|
);
|
|
1420
1519
|
});
|
|
1421
1520
|
}
|
|
1422
|
-
function
|
|
1521
|
+
function Tt({
|
|
1423
1522
|
children: e,
|
|
1424
1523
|
className: t,
|
|
1425
1524
|
collapsedSize: n = "0%",
|
|
1426
1525
|
collapsible: o = !1,
|
|
1427
1526
|
defaultSize: r,
|
|
1428
1527
|
elementRef: a,
|
|
1429
|
-
id:
|
|
1528
|
+
id: l,
|
|
1430
1529
|
maxSize: i = "100%",
|
|
1431
1530
|
minSize: s = "0%",
|
|
1432
|
-
onResize:
|
|
1531
|
+
onResize: u,
|
|
1433
1532
|
panelRef: c,
|
|
1434
|
-
style:
|
|
1435
|
-
...
|
|
1533
|
+
style: h,
|
|
1534
|
+
...m
|
|
1436
1535
|
}) {
|
|
1437
|
-
const
|
|
1438
|
-
|
|
1536
|
+
const p = !!l, f = ue(l), [d, y] = I(null), g = fe(y, a), { id: v, registerPanel: x } = de(), S = u !== null, b = ce((R) => {
|
|
1537
|
+
u?.(R, l);
|
|
1439
1538
|
});
|
|
1440
|
-
|
|
1441
|
-
if (
|
|
1442
|
-
return
|
|
1443
|
-
element:
|
|
1539
|
+
N(() => {
|
|
1540
|
+
if (d !== null)
|
|
1541
|
+
return x({
|
|
1542
|
+
element: d,
|
|
1444
1543
|
id: f,
|
|
1445
|
-
idIsStable:
|
|
1446
|
-
onResize:
|
|
1544
|
+
idIsStable: p,
|
|
1545
|
+
onResize: S ? b : void 0,
|
|
1447
1546
|
panelConstraints: {
|
|
1448
1547
|
collapsedSize: n,
|
|
1449
1548
|
collapsible: o,
|
|
@@ -1456,26 +1555,26 @@ function Mt({
|
|
|
1456
1555
|
n,
|
|
1457
1556
|
o,
|
|
1458
1557
|
r,
|
|
1459
|
-
|
|
1460
|
-
|
|
1558
|
+
d,
|
|
1559
|
+
S,
|
|
1461
1560
|
f,
|
|
1462
|
-
|
|
1561
|
+
p,
|
|
1463
1562
|
i,
|
|
1464
1563
|
s,
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
]),
|
|
1468
|
-
const L =
|
|
1469
|
-
return /* @__PURE__ */
|
|
1564
|
+
b,
|
|
1565
|
+
x
|
|
1566
|
+
]), Rt(f, c);
|
|
1567
|
+
const L = je(v, f);
|
|
1568
|
+
return /* @__PURE__ */ K(
|
|
1470
1569
|
"div",
|
|
1471
1570
|
{
|
|
1472
|
-
...
|
|
1571
|
+
...m,
|
|
1473
1572
|
"data-panel": !0,
|
|
1474
1573
|
"data-testid": f,
|
|
1475
1574
|
id: f,
|
|
1476
|
-
ref:
|
|
1575
|
+
ref: g,
|
|
1477
1576
|
style: {
|
|
1478
|
-
...
|
|
1577
|
+
...Ct,
|
|
1479
1578
|
flexBasis: 0,
|
|
1480
1579
|
flexGrow: `var(${L}, 1)`,
|
|
1481
1580
|
flexShrink: 1,
|
|
@@ -1483,16 +1582,16 @@ function Mt({
|
|
|
1483
1582
|
overflow: "hidden",
|
|
1484
1583
|
// Disable pointer events inside of a panel during resize
|
|
1485
1584
|
// This avoid edge cases like nested iframes
|
|
1486
|
-
pointerEvents: `var(${
|
|
1585
|
+
pointerEvents: `var(${We})`
|
|
1487
1586
|
},
|
|
1488
|
-
children: /* @__PURE__ */
|
|
1587
|
+
children: /* @__PURE__ */ K(
|
|
1489
1588
|
"div",
|
|
1490
1589
|
{
|
|
1491
1590
|
className: t,
|
|
1492
1591
|
style: {
|
|
1493
1592
|
width: "100%",
|
|
1494
1593
|
height: "100%",
|
|
1495
|
-
...
|
|
1594
|
+
...h
|
|
1496
1595
|
},
|
|
1497
1596
|
children: e
|
|
1498
1597
|
}
|
|
@@ -1500,7 +1599,7 @@ function Mt({
|
|
|
1500
1599
|
}
|
|
1501
1600
|
);
|
|
1502
1601
|
}
|
|
1503
|
-
const
|
|
1602
|
+
const Ct = {
|
|
1504
1603
|
minHeight: "unset",
|
|
1505
1604
|
maxHeight: "unset",
|
|
1506
1605
|
height: "unset",
|
|
@@ -1516,27 +1615,27 @@ const zt = {
|
|
|
1516
1615
|
padding: "unset",
|
|
1517
1616
|
margin: "unset"
|
|
1518
1617
|
};
|
|
1519
|
-
function
|
|
1618
|
+
function _t() {
|
|
1520
1619
|
return I(null);
|
|
1521
1620
|
}
|
|
1522
|
-
function
|
|
1523
|
-
return
|
|
1621
|
+
function At() {
|
|
1622
|
+
return O(null);
|
|
1524
1623
|
}
|
|
1525
|
-
function
|
|
1624
|
+
function Et({
|
|
1526
1625
|
layout: e,
|
|
1527
1626
|
panelConstraints: t,
|
|
1528
1627
|
panelId: n,
|
|
1529
1628
|
panelIndex: o
|
|
1530
1629
|
}) {
|
|
1531
1630
|
let r, a;
|
|
1532
|
-
const
|
|
1631
|
+
const l = e[n], i = t.find(
|
|
1533
1632
|
(s) => s.panelId === n
|
|
1534
1633
|
);
|
|
1535
1634
|
if (i) {
|
|
1536
|
-
const s = i.maxSize,
|
|
1635
|
+
const s = i.maxSize, u = a = i.collapsible ? i.collapsedSize : i.minSize, c = [o, o + 1];
|
|
1537
1636
|
a = A({
|
|
1538
|
-
layout:
|
|
1539
|
-
delta:
|
|
1637
|
+
layout: Y({
|
|
1638
|
+
delta: u - l,
|
|
1540
1639
|
initialLayout: e,
|
|
1541
1640
|
panelConstraints: t,
|
|
1542
1641
|
pivotIndices: c,
|
|
@@ -1545,8 +1644,8 @@ function bt({
|
|
|
1545
1644
|
}),
|
|
1546
1645
|
panelConstraints: t
|
|
1547
1646
|
})[n], r = A({
|
|
1548
|
-
layout:
|
|
1549
|
-
delta: s -
|
|
1647
|
+
layout: Y({
|
|
1648
|
+
delta: s - l,
|
|
1550
1649
|
initialLayout: e,
|
|
1551
1650
|
panelConstraints: t,
|
|
1552
1651
|
pivotIndices: c,
|
|
@@ -1560,10 +1659,10 @@ function bt({
|
|
|
1560
1659
|
valueControls: n,
|
|
1561
1660
|
valueMax: r,
|
|
1562
1661
|
valueMin: a,
|
|
1563
|
-
valueNow:
|
|
1662
|
+
valueNow: l
|
|
1564
1663
|
};
|
|
1565
1664
|
}
|
|
1566
|
-
function
|
|
1665
|
+
function Nt({
|
|
1567
1666
|
children: e,
|
|
1568
1667
|
className: t,
|
|
1569
1668
|
elementRef: n,
|
|
@@ -1571,40 +1670,40 @@ function kt({
|
|
|
1571
1670
|
style: r,
|
|
1572
1671
|
...a
|
|
1573
1672
|
}) {
|
|
1574
|
-
const
|
|
1673
|
+
const l = ue(o), [i, s] = I({}), [u, c] = I("inactive"), [h, m] = I(null), p = fe(m, n), {
|
|
1575
1674
|
id: f,
|
|
1576
|
-
orientation:
|
|
1577
|
-
registerSeparator:
|
|
1578
|
-
} = de(),
|
|
1579
|
-
return
|
|
1580
|
-
if (
|
|
1581
|
-
const
|
|
1582
|
-
element:
|
|
1583
|
-
id:
|
|
1584
|
-
},
|
|
1675
|
+
orientation: d,
|
|
1676
|
+
registerSeparator: y
|
|
1677
|
+
} = de(), g = d === "horizontal" ? "vertical" : "horizontal";
|
|
1678
|
+
return N(() => {
|
|
1679
|
+
if (h !== null) {
|
|
1680
|
+
const v = {
|
|
1681
|
+
element: h,
|
|
1682
|
+
id: l
|
|
1683
|
+
}, x = y(v), S = _.addListener(
|
|
1585
1684
|
"interactionStateChange",
|
|
1586
1685
|
(L) => {
|
|
1587
1686
|
c(
|
|
1588
1687
|
L.state !== "inactive" && L.hitRegions.some(
|
|
1589
|
-
(
|
|
1688
|
+
(R) => R.separator === v
|
|
1590
1689
|
) ? L.state : "inactive"
|
|
1591
1690
|
);
|
|
1592
1691
|
}
|
|
1593
|
-
),
|
|
1692
|
+
), b = _.addListener(
|
|
1594
1693
|
"mountedGroupsChange",
|
|
1595
1694
|
(L) => {
|
|
1596
1695
|
L.forEach(
|
|
1597
|
-
({ derivedPanelConstraints:
|
|
1598
|
-
if (
|
|
1599
|
-
const
|
|
1600
|
-
if (
|
|
1601
|
-
const
|
|
1696
|
+
({ derivedPanelConstraints: R, layout: q, separatorToPanels: Z }, J) => {
|
|
1697
|
+
if (J.id === f) {
|
|
1698
|
+
const Q = Z.get(v);
|
|
1699
|
+
if (Q) {
|
|
1700
|
+
const $ = Q[0], V = J.panels.indexOf($);
|
|
1602
1701
|
s(
|
|
1603
|
-
|
|
1604
|
-
layout:
|
|
1605
|
-
panelConstraints:
|
|
1606
|
-
panelId:
|
|
1607
|
-
panelIndex:
|
|
1702
|
+
Et({
|
|
1703
|
+
layout: q,
|
|
1704
|
+
panelConstraints: R,
|
|
1705
|
+
panelId: $.id,
|
|
1706
|
+
panelIndex: V
|
|
1608
1707
|
})
|
|
1609
1708
|
);
|
|
1610
1709
|
}
|
|
@@ -1614,24 +1713,24 @@ function kt({
|
|
|
1614
1713
|
}
|
|
1615
1714
|
);
|
|
1616
1715
|
return () => {
|
|
1617
|
-
|
|
1716
|
+
S(), b(), x();
|
|
1618
1717
|
};
|
|
1619
1718
|
}
|
|
1620
|
-
}, [
|
|
1719
|
+
}, [h, f, l, y]), /* @__PURE__ */ K(
|
|
1621
1720
|
"div",
|
|
1622
1721
|
{
|
|
1623
1722
|
...a,
|
|
1624
1723
|
"aria-controls": i.valueControls,
|
|
1625
|
-
"aria-orientation":
|
|
1724
|
+
"aria-orientation": g,
|
|
1626
1725
|
"aria-valuemax": i.valueMax,
|
|
1627
1726
|
"aria-valuemin": i.valueMin,
|
|
1628
1727
|
"aria-valuenow": i.valueNow,
|
|
1629
1728
|
children: e,
|
|
1630
1729
|
className: t,
|
|
1631
|
-
"data-separator":
|
|
1632
|
-
"data-testid":
|
|
1633
|
-
id:
|
|
1634
|
-
ref:
|
|
1730
|
+
"data-separator": u,
|
|
1731
|
+
"data-testid": l,
|
|
1732
|
+
id: l,
|
|
1733
|
+
ref: p,
|
|
1635
1734
|
role: "separator",
|
|
1636
1735
|
style: {
|
|
1637
1736
|
flexBasis: "auto",
|
|
@@ -1644,13 +1743,13 @@ function kt({
|
|
|
1644
1743
|
);
|
|
1645
1744
|
}
|
|
1646
1745
|
export {
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1746
|
+
Gt as Group,
|
|
1747
|
+
Tt as Panel,
|
|
1748
|
+
Nt as Separator,
|
|
1749
|
+
kt as useDefaultLayout,
|
|
1750
|
+
Dt as useGroupCallbackRef,
|
|
1751
|
+
Ot as useGroupRef,
|
|
1752
|
+
_t as usePanelCallbackRef,
|
|
1753
|
+
At as usePanelRef
|
|
1655
1754
|
};
|
|
1656
1755
|
//# sourceMappingURL=react-resizable-panels.js.map
|