react-resizable-panels 4.7.2 → 4.7.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
3
|
-
import { useState as
|
|
2
|
+
import { jsx as ie } from "react/jsx-runtime";
|
|
3
|
+
import { useState as re, useCallback as ne, useId as pt, useLayoutEffect as Be, useEffect as de, useRef as T, createContext as ht, useImperativeHandle as We, useMemo as Ue, useSyncExternalStore as Ke, useContext as mt } from "react";
|
|
4
4
|
function gt(e, t) {
|
|
5
5
|
const n = getComputedStyle(e), o = parseFloat(n.fontSize);
|
|
6
6
|
return t * o;
|
|
@@ -25,36 +25,36 @@ function zt(e) {
|
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
|
-
function
|
|
28
|
+
function te({
|
|
29
29
|
groupSize: e,
|
|
30
30
|
panelElement: t,
|
|
31
31
|
styleProp: n
|
|
32
32
|
}) {
|
|
33
33
|
let o;
|
|
34
|
-
const [
|
|
35
|
-
switch (
|
|
34
|
+
const [i, s] = zt(n);
|
|
35
|
+
switch (s) {
|
|
36
36
|
case "%": {
|
|
37
|
-
o =
|
|
37
|
+
o = i / 100 * e;
|
|
38
38
|
break;
|
|
39
39
|
}
|
|
40
40
|
case "px": {
|
|
41
|
-
o =
|
|
41
|
+
o = i;
|
|
42
42
|
break;
|
|
43
43
|
}
|
|
44
44
|
case "rem": {
|
|
45
|
-
o = St(t,
|
|
45
|
+
o = St(t, i);
|
|
46
46
|
break;
|
|
47
47
|
}
|
|
48
48
|
case "em": {
|
|
49
|
-
o = gt(t,
|
|
49
|
+
o = gt(t, i);
|
|
50
50
|
break;
|
|
51
51
|
}
|
|
52
52
|
case "vh": {
|
|
53
|
-
o = yt(
|
|
53
|
+
o = yt(i);
|
|
54
54
|
break;
|
|
55
55
|
}
|
|
56
56
|
case "vw": {
|
|
57
|
-
o = vt(
|
|
57
|
+
o = vt(i);
|
|
58
58
|
break;
|
|
59
59
|
}
|
|
60
60
|
}
|
|
@@ -67,7 +67,7 @@ function Q({
|
|
|
67
67
|
group: e
|
|
68
68
|
}) {
|
|
69
69
|
const { orientation: t, panels: n } = e;
|
|
70
|
-
return n.reduce((o,
|
|
70
|
+
return n.reduce((o, i) => (o += t === "horizontal" ? i.element.offsetWidth : i.element.offsetHeight, o), 0);
|
|
71
71
|
}
|
|
72
72
|
function ge(e) {
|
|
73
73
|
const { panels: t } = e, n = Q({ group: e });
|
|
@@ -81,51 +81,51 @@ function ge(e) {
|
|
|
81
81
|
maxSize: 100,
|
|
82
82
|
panelId: o.id
|
|
83
83
|
})) : t.map((o) => {
|
|
84
|
-
const { element:
|
|
85
|
-
let
|
|
86
|
-
if (
|
|
87
|
-
const c =
|
|
84
|
+
const { element: i, panelConstraints: s } = o;
|
|
85
|
+
let l = 0;
|
|
86
|
+
if (s.collapsedSize !== void 0) {
|
|
87
|
+
const c = te({
|
|
88
88
|
groupSize: n,
|
|
89
|
-
panelElement:
|
|
90
|
-
styleProp:
|
|
89
|
+
panelElement: i,
|
|
90
|
+
styleProp: s.collapsedSize
|
|
91
91
|
});
|
|
92
|
-
|
|
92
|
+
l = D(c / n * 100);
|
|
93
93
|
}
|
|
94
|
-
let
|
|
95
|
-
if (
|
|
96
|
-
const c =
|
|
94
|
+
let r;
|
|
95
|
+
if (s.defaultSize !== void 0) {
|
|
96
|
+
const c = te({
|
|
97
97
|
groupSize: n,
|
|
98
|
-
panelElement:
|
|
99
|
-
styleProp:
|
|
98
|
+
panelElement: i,
|
|
99
|
+
styleProp: s.defaultSize
|
|
100
100
|
});
|
|
101
|
-
|
|
101
|
+
r = D(c / n * 100);
|
|
102
102
|
}
|
|
103
|
-
let
|
|
104
|
-
if (
|
|
105
|
-
const c =
|
|
103
|
+
let a = 0;
|
|
104
|
+
if (s.minSize !== void 0) {
|
|
105
|
+
const c = te({
|
|
106
106
|
groupSize: n,
|
|
107
|
-
panelElement:
|
|
108
|
-
styleProp:
|
|
107
|
+
panelElement: i,
|
|
108
|
+
styleProp: s.minSize
|
|
109
109
|
});
|
|
110
|
-
|
|
110
|
+
a = D(c / n * 100);
|
|
111
111
|
}
|
|
112
|
-
let
|
|
113
|
-
if (
|
|
114
|
-
const c =
|
|
112
|
+
let u = 100;
|
|
113
|
+
if (s.maxSize !== void 0) {
|
|
114
|
+
const c = te({
|
|
115
115
|
groupSize: n,
|
|
116
|
-
panelElement:
|
|
117
|
-
styleProp:
|
|
116
|
+
panelElement: i,
|
|
117
|
+
styleProp: s.maxSize
|
|
118
118
|
});
|
|
119
|
-
|
|
119
|
+
u = D(c / n * 100);
|
|
120
120
|
}
|
|
121
121
|
return {
|
|
122
|
-
groupResizeBehavior:
|
|
123
|
-
collapsedSize:
|
|
124
|
-
collapsible:
|
|
125
|
-
defaultSize:
|
|
126
|
-
disabled:
|
|
127
|
-
minSize:
|
|
128
|
-
maxSize:
|
|
122
|
+
groupResizeBehavior: s.groupResizeBehavior,
|
|
123
|
+
collapsedSize: l,
|
|
124
|
+
collapsible: s.collapsible === !0,
|
|
125
|
+
defaultSize: r,
|
|
126
|
+
disabled: s.disabled,
|
|
127
|
+
minSize: a,
|
|
128
|
+
maxSize: u,
|
|
129
129
|
panelId: o.id
|
|
130
130
|
};
|
|
131
131
|
});
|
|
@@ -171,41 +171,41 @@ function wt({
|
|
|
171
171
|
x: n.x + n.width / 2,
|
|
172
172
|
y: n.y + n.height / 2
|
|
173
173
|
};
|
|
174
|
-
let
|
|
175
|
-
for (const
|
|
176
|
-
const { x:
|
|
177
|
-
|
|
174
|
+
let i, s = Number.MAX_VALUE;
|
|
175
|
+
for (const l of t) {
|
|
176
|
+
const { x: r, y: a } = qe(o, l), u = e === "horizontal" ? r : a;
|
|
177
|
+
u < s && (s = u, i = l);
|
|
178
178
|
}
|
|
179
|
-
return L(
|
|
179
|
+
return L(i, "No rect found"), i;
|
|
180
180
|
}
|
|
181
181
|
let ue;
|
|
182
182
|
function Pt() {
|
|
183
183
|
return ue === void 0 && (typeof matchMedia == "function" ? ue = !!matchMedia("(pointer:coarse)").matches : ue = !1), ue;
|
|
184
184
|
}
|
|
185
185
|
function Ye(e) {
|
|
186
|
-
const { element: t, orientation: n, panels: o, separators:
|
|
186
|
+
const { element: t, orientation: n, panels: o, separators: i } = e, s = Se(
|
|
187
187
|
n,
|
|
188
188
|
Array.from(t.children).filter(Xe).map((x) => ({ element: x }))
|
|
189
|
-
).map(({ element: x }) => x),
|
|
190
|
-
let
|
|
189
|
+
).map(({ element: x }) => x), l = [];
|
|
190
|
+
let r = !1, a = !1, u = -1, c = -1, m = 0, d, v = [];
|
|
191
191
|
{
|
|
192
192
|
let x = -1;
|
|
193
|
-
for (const f of
|
|
194
|
-
f.hasAttribute("data-panel") && (x++, f.ariaDisabled === null && (m++,
|
|
193
|
+
for (const f of s)
|
|
194
|
+
f.hasAttribute("data-panel") && (x++, f.ariaDisabled === null && (m++, u === -1 && (u = x), c = x));
|
|
195
195
|
}
|
|
196
196
|
if (m > 1) {
|
|
197
197
|
let x = -1;
|
|
198
|
-
for (const f of
|
|
198
|
+
for (const f of s)
|
|
199
199
|
if (f.hasAttribute("data-panel")) {
|
|
200
200
|
x++;
|
|
201
201
|
const h = o.find(
|
|
202
202
|
(g) => g.element === f
|
|
203
203
|
);
|
|
204
204
|
if (h) {
|
|
205
|
-
if (
|
|
206
|
-
const g =
|
|
205
|
+
if (d) {
|
|
206
|
+
const g = d.element.getBoundingClientRect(), y = f.getBoundingClientRect();
|
|
207
207
|
let z;
|
|
208
|
-
if (
|
|
208
|
+
if (a) {
|
|
209
209
|
const S = n === "horizontal" ? new DOMRect(
|
|
210
210
|
g.right,
|
|
211
211
|
g.top,
|
|
@@ -216,12 +216,12 @@ function Ye(e) {
|
|
|
216
216
|
g.bottom,
|
|
217
217
|
g.width,
|
|
218
218
|
0
|
|
219
|
-
),
|
|
219
|
+
), p = n === "horizontal" ? new DOMRect(y.left, y.top, 0, y.height) : new DOMRect(y.left, y.top, y.width, 0);
|
|
220
220
|
switch (v.length) {
|
|
221
221
|
case 0: {
|
|
222
222
|
z = [
|
|
223
223
|
S,
|
|
224
|
-
|
|
224
|
+
p
|
|
225
225
|
];
|
|
226
226
|
break;
|
|
227
227
|
}
|
|
@@ -233,7 +233,7 @@ function Ye(e) {
|
|
|
233
233
|
});
|
|
234
234
|
z = [
|
|
235
235
|
P,
|
|
236
|
-
R === g ?
|
|
236
|
+
R === g ? p : S
|
|
237
237
|
];
|
|
238
238
|
break;
|
|
239
239
|
}
|
|
@@ -257,48 +257,48 @@ function Ye(e) {
|
|
|
257
257
|
)
|
|
258
258
|
];
|
|
259
259
|
for (const S of z) {
|
|
260
|
-
let
|
|
260
|
+
let p = "width" in S ? S : S.element.getBoundingClientRect();
|
|
261
261
|
const P = Pt() ? e.resizeTargetMinimumSize.coarse : e.resizeTargetMinimumSize.fine;
|
|
262
|
-
if (
|
|
263
|
-
const C = P -
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
262
|
+
if (p.width < P) {
|
|
263
|
+
const C = P - p.width;
|
|
264
|
+
p = new DOMRect(
|
|
265
|
+
p.x - C / 2,
|
|
266
|
+
p.y,
|
|
267
|
+
p.width + C,
|
|
268
|
+
p.height
|
|
269
269
|
);
|
|
270
270
|
}
|
|
271
|
-
if (
|
|
272
|
-
const C = P -
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
271
|
+
if (p.height < P) {
|
|
272
|
+
const C = P - p.height;
|
|
273
|
+
p = new DOMRect(
|
|
274
|
+
p.x,
|
|
275
|
+
p.y - C / 2,
|
|
276
|
+
p.width,
|
|
277
|
+
p.height + C
|
|
278
278
|
);
|
|
279
279
|
}
|
|
280
|
-
const R = x <=
|
|
281
|
-
!
|
|
280
|
+
const R = x <= u || x > c;
|
|
281
|
+
!r && !R && l.push({
|
|
282
282
|
group: e,
|
|
283
283
|
groupSize: Q({ group: e }),
|
|
284
|
-
panels: [
|
|
284
|
+
panels: [d, h],
|
|
285
285
|
separator: "width" in S ? void 0 : S,
|
|
286
|
-
rect:
|
|
287
|
-
}),
|
|
286
|
+
rect: p
|
|
287
|
+
}), r = !1;
|
|
288
288
|
}
|
|
289
289
|
}
|
|
290
|
-
|
|
290
|
+
a = !1, d = h, v = [];
|
|
291
291
|
}
|
|
292
292
|
} else if (f.hasAttribute("data-separator")) {
|
|
293
|
-
f.ariaDisabled !== null && (
|
|
294
|
-
const h =
|
|
293
|
+
f.ariaDisabled !== null && (r = !0);
|
|
294
|
+
const h = i.find(
|
|
295
295
|
(g) => g.element === f
|
|
296
296
|
);
|
|
297
|
-
h ? v.push(h) : (
|
|
297
|
+
h ? v.push(h) : (d = void 0, v = []);
|
|
298
298
|
} else
|
|
299
|
-
|
|
299
|
+
a = !0;
|
|
300
300
|
}
|
|
301
|
-
return
|
|
301
|
+
return l;
|
|
302
302
|
}
|
|
303
303
|
class Je {
|
|
304
304
|
#e = {};
|
|
@@ -314,18 +314,18 @@ class Je {
|
|
|
314
314
|
if (o.length === 1)
|
|
315
315
|
o[0].call(null, n);
|
|
316
316
|
else {
|
|
317
|
-
let
|
|
318
|
-
const
|
|
319
|
-
for (let
|
|
320
|
-
const
|
|
317
|
+
let i = !1, s = null;
|
|
318
|
+
const l = Array.from(o);
|
|
319
|
+
for (let r = 0; r < l.length; r++) {
|
|
320
|
+
const a = l[r];
|
|
321
321
|
try {
|
|
322
|
-
|
|
323
|
-
} catch (
|
|
324
|
-
|
|
322
|
+
a.call(null, n);
|
|
323
|
+
} catch (u) {
|
|
324
|
+
s === null && (i = !0, s = u);
|
|
325
325
|
}
|
|
326
326
|
}
|
|
327
|
-
if (
|
|
328
|
-
throw
|
|
327
|
+
if (i)
|
|
328
|
+
throw s;
|
|
329
329
|
}
|
|
330
330
|
}
|
|
331
331
|
removeAllListeners() {
|
|
@@ -334,8 +334,8 @@ class Je {
|
|
|
334
334
|
removeListener(t, n) {
|
|
335
335
|
const o = this.#e[t];
|
|
336
336
|
if (o !== void 0) {
|
|
337
|
-
const
|
|
338
|
-
|
|
337
|
+
const i = o.indexOf(n);
|
|
338
|
+
i >= 0 && o.splice(i, 1);
|
|
339
339
|
}
|
|
340
340
|
}
|
|
341
341
|
}
|
|
@@ -364,7 +364,7 @@ function ye(e, t) {
|
|
|
364
364
|
n.group.id === e && t(n);
|
|
365
365
|
});
|
|
366
366
|
}
|
|
367
|
-
function
|
|
367
|
+
function _(e, t) {
|
|
368
368
|
const n = A.get(e);
|
|
369
369
|
A = new Map(A), A.set(e, t), Ze.emit("groupChange", {
|
|
370
370
|
group: e,
|
|
@@ -373,25 +373,25 @@ function F(e, t) {
|
|
|
373
373
|
});
|
|
374
374
|
}
|
|
375
375
|
function Ct(e, t, n) {
|
|
376
|
-
let o,
|
|
376
|
+
let o, i = {
|
|
377
377
|
x: 1 / 0,
|
|
378
378
|
y: 1 / 0
|
|
379
379
|
};
|
|
380
|
-
for (const
|
|
381
|
-
const
|
|
380
|
+
for (const s of t) {
|
|
381
|
+
const l = qe(n, s.rect);
|
|
382
382
|
switch (e) {
|
|
383
383
|
case "horizontal": {
|
|
384
|
-
|
|
384
|
+
l.x <= i.x && (o = s, i = l);
|
|
385
385
|
break;
|
|
386
386
|
}
|
|
387
387
|
case "vertical": {
|
|
388
|
-
|
|
388
|
+
l.y <= i.y && (o = s, i = l);
|
|
389
389
|
break;
|
|
390
390
|
}
|
|
391
391
|
}
|
|
392
392
|
}
|
|
393
393
|
return o ? {
|
|
394
|
-
distance:
|
|
394
|
+
distance: i,
|
|
395
395
|
hitRegion: o
|
|
396
396
|
} : void 0;
|
|
397
397
|
}
|
|
@@ -411,23 +411,23 @@ function Mt(e, t) {
|
|
|
411
411
|
o,
|
|
412
412
|
"Stacking order can only be calculated for elements with a common ancestor"
|
|
413
413
|
);
|
|
414
|
-
const
|
|
414
|
+
const i = {
|
|
415
415
|
a: Ie(Ee(n.a)),
|
|
416
416
|
b: Ie(Ee(n.b))
|
|
417
417
|
};
|
|
418
|
-
if (
|
|
419
|
-
const
|
|
418
|
+
if (i.a === i.b) {
|
|
419
|
+
const s = o.childNodes, l = {
|
|
420
420
|
a: n.a.at(-1),
|
|
421
421
|
b: n.b.at(-1)
|
|
422
422
|
};
|
|
423
|
-
let
|
|
424
|
-
for (;
|
|
425
|
-
const
|
|
426
|
-
if (
|
|
427
|
-
if (
|
|
423
|
+
let r = s.length;
|
|
424
|
+
for (; r--; ) {
|
|
425
|
+
const a = s[r];
|
|
426
|
+
if (a === l.a) return 1;
|
|
427
|
+
if (a === l.b) return -1;
|
|
428
428
|
}
|
|
429
429
|
}
|
|
430
|
-
return Math.sign(
|
|
430
|
+
return Math.sign(i.a - i.b);
|
|
431
431
|
}
|
|
432
432
|
const Et = /\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;
|
|
433
433
|
function It(e) {
|
|
@@ -483,18 +483,18 @@ function Tt({
|
|
|
483
483
|
}
|
|
484
484
|
function ve(e, t) {
|
|
485
485
|
const n = [];
|
|
486
|
-
return t.forEach((o,
|
|
487
|
-
if (
|
|
486
|
+
return t.forEach((o, i) => {
|
|
487
|
+
if (i.disabled)
|
|
488
488
|
return;
|
|
489
|
-
const
|
|
489
|
+
const s = Ye(i), l = Ct(i.orientation, s, {
|
|
490
490
|
x: e.clientX,
|
|
491
491
|
y: e.clientY
|
|
492
492
|
});
|
|
493
|
-
|
|
494
|
-
groupElement:
|
|
495
|
-
hitRegion:
|
|
493
|
+
l && l.distance.x <= 0 && l.distance.y <= 0 && Tt({
|
|
494
|
+
groupElement: i.element,
|
|
495
|
+
hitRegion: l.hitRegion.rect,
|
|
496
496
|
pointerEventTarget: e.target
|
|
497
|
-
}) && n.push(
|
|
497
|
+
}) && n.push(l.hitRegion);
|
|
498
498
|
}), n;
|
|
499
499
|
}
|
|
500
500
|
function Ot(e, t) {
|
|
@@ -518,36 +518,36 @@ function Y({
|
|
|
518
518
|
size: o
|
|
519
519
|
}) {
|
|
520
520
|
const {
|
|
521
|
-
collapsedSize:
|
|
522
|
-
collapsible:
|
|
523
|
-
disabled:
|
|
524
|
-
maxSize:
|
|
525
|
-
minSize:
|
|
521
|
+
collapsedSize: i = 0,
|
|
522
|
+
collapsible: s,
|
|
523
|
+
disabled: l,
|
|
524
|
+
maxSize: r = 100,
|
|
525
|
+
minSize: a = 0
|
|
526
526
|
} = t;
|
|
527
|
-
if (
|
|
527
|
+
if (l && !e)
|
|
528
528
|
return n;
|
|
529
|
-
if (G(o,
|
|
530
|
-
if (
|
|
531
|
-
const
|
|
532
|
-
G(o,
|
|
529
|
+
if (G(o, a) < 0)
|
|
530
|
+
if (s) {
|
|
531
|
+
const u = (i + a) / 2;
|
|
532
|
+
G(o, u) < 0 ? o = i : o = a;
|
|
533
533
|
} else
|
|
534
|
-
o =
|
|
535
|
-
return o = Math.min(
|
|
534
|
+
o = a;
|
|
535
|
+
return o = Math.min(r, o), o = D(o), o;
|
|
536
536
|
}
|
|
537
|
-
function
|
|
537
|
+
function se({
|
|
538
538
|
delta: e,
|
|
539
539
|
initialLayout: t,
|
|
540
540
|
panelConstraints: n,
|
|
541
541
|
pivotIndices: o,
|
|
542
|
-
prevLayout:
|
|
543
|
-
trigger:
|
|
542
|
+
prevLayout: i,
|
|
543
|
+
trigger: s
|
|
544
544
|
}) {
|
|
545
545
|
if (I(e, 0))
|
|
546
546
|
return t;
|
|
547
|
-
const
|
|
547
|
+
const l = s === "imperative-api", r = Object.values(t), a = Object.values(i), u = [...r], [c, m] = o;
|
|
548
548
|
L(c != null, "Invalid first pivot index"), L(m != null, "Invalid second pivot index");
|
|
549
|
-
let
|
|
550
|
-
switch (
|
|
549
|
+
let d = 0;
|
|
550
|
+
switch (s) {
|
|
551
551
|
case "keyboard": {
|
|
552
552
|
{
|
|
553
553
|
const f = e < 0 ? m : c, h = n[f];
|
|
@@ -561,13 +561,13 @@ function re({
|
|
|
561
561
|
minSize: z = 0
|
|
562
562
|
} = h;
|
|
563
563
|
if (y) {
|
|
564
|
-
const S =
|
|
564
|
+
const S = r[f];
|
|
565
565
|
if (L(
|
|
566
566
|
S != null,
|
|
567
567
|
`Previous layout not found for panel index ${f}`
|
|
568
568
|
), I(S, g)) {
|
|
569
|
-
const
|
|
570
|
-
G(
|
|
569
|
+
const p = z - S;
|
|
570
|
+
G(p, Math.abs(e)) > 0 && (e = e < 0 ? 0 - p : p);
|
|
571
571
|
}
|
|
572
572
|
}
|
|
573
573
|
}
|
|
@@ -583,13 +583,13 @@ function re({
|
|
|
583
583
|
minSize: z = 0
|
|
584
584
|
} = h;
|
|
585
585
|
if (y) {
|
|
586
|
-
const S =
|
|
586
|
+
const S = r[f];
|
|
587
587
|
if (L(
|
|
588
588
|
S != null,
|
|
589
589
|
`Previous layout not found for panel index ${f}`
|
|
590
590
|
), I(S, z)) {
|
|
591
|
-
const
|
|
592
|
-
G(
|
|
591
|
+
const p = S - g;
|
|
592
|
+
G(p, Math.abs(e)) > 0 && (e = e < 0 ? 0 - p : p);
|
|
593
593
|
}
|
|
594
594
|
}
|
|
595
595
|
}
|
|
@@ -601,14 +601,14 @@ function re({
|
|
|
601
601
|
h,
|
|
602
602
|
`Panel constraints not found for index ${f}`
|
|
603
603
|
);
|
|
604
|
-
const g =
|
|
604
|
+
const g = r[f], { collapsible: y, collapsedSize: z, minSize: S } = h;
|
|
605
605
|
if (y && G(g, S) < 0)
|
|
606
606
|
if (e > 0) {
|
|
607
|
-
const
|
|
608
|
-
G(R, S) < 0 && (e = G(e, P) <= 0 ? 0 :
|
|
607
|
+
const p = S - z, P = p / 2, R = g + e;
|
|
608
|
+
G(R, S) < 0 && (e = G(e, P) <= 0 ? 0 : p);
|
|
609
609
|
} else {
|
|
610
|
-
const
|
|
611
|
-
G(R, S) < 0 && (e = G(100 + e, P) > 0 ? 0 : -
|
|
610
|
+
const p = S - z, P = 100 - p / 2, R = g - e;
|
|
611
|
+
G(R, S) < 0 && (e = G(100 + e, P) > 0 ? 0 : -p);
|
|
612
612
|
}
|
|
613
613
|
break;
|
|
614
614
|
}
|
|
@@ -617,18 +617,18 @@ function re({
|
|
|
617
617
|
const f = e < 0 ? 1 : -1;
|
|
618
618
|
let h = e < 0 ? m : c, g = 0;
|
|
619
619
|
for (; ; ) {
|
|
620
|
-
const z =
|
|
620
|
+
const z = r[h];
|
|
621
621
|
L(
|
|
622
622
|
z != null,
|
|
623
623
|
`Previous layout not found for panel index ${h}`
|
|
624
624
|
);
|
|
625
|
-
const
|
|
626
|
-
overrideDisabledPanels:
|
|
625
|
+
const p = Y({
|
|
626
|
+
overrideDisabledPanels: l,
|
|
627
627
|
panelConstraints: n[h],
|
|
628
628
|
prevSize: z,
|
|
629
629
|
size: 100
|
|
630
630
|
}) - z;
|
|
631
|
-
if (g +=
|
|
631
|
+
if (g += p, h += f, h < 0 || h >= n.length)
|
|
632
632
|
break;
|
|
633
633
|
}
|
|
634
634
|
const y = Math.min(Math.abs(e), Math.abs(g));
|
|
@@ -637,66 +637,66 @@ function re({
|
|
|
637
637
|
{
|
|
638
638
|
let h = e < 0 ? c : m;
|
|
639
639
|
for (; h >= 0 && h < n.length; ) {
|
|
640
|
-
const g = Math.abs(e) - Math.abs(
|
|
640
|
+
const g = Math.abs(e) - Math.abs(d), y = r[h];
|
|
641
641
|
L(
|
|
642
642
|
y != null,
|
|
643
643
|
`Previous layout not found for panel index ${h}`
|
|
644
644
|
);
|
|
645
645
|
const z = y - g, S = Y({
|
|
646
|
-
overrideDisabledPanels:
|
|
646
|
+
overrideDisabledPanels: l,
|
|
647
647
|
panelConstraints: n[h],
|
|
648
648
|
prevSize: y,
|
|
649
649
|
size: z
|
|
650
650
|
});
|
|
651
|
-
if (!I(y, S) && (
|
|
651
|
+
if (!I(y, S) && (d += y - S, u[h] = S, d.toFixed(3).localeCompare(Math.abs(e).toFixed(3), void 0, {
|
|
652
652
|
numeric: !0
|
|
653
653
|
}) >= 0))
|
|
654
654
|
break;
|
|
655
655
|
e < 0 ? h-- : h++;
|
|
656
656
|
}
|
|
657
657
|
}
|
|
658
|
-
if (Ot(
|
|
659
|
-
return
|
|
658
|
+
if (Ot(a, u))
|
|
659
|
+
return i;
|
|
660
660
|
{
|
|
661
|
-
const f = e < 0 ? m : c, h =
|
|
661
|
+
const f = e < 0 ? m : c, h = r[f];
|
|
662
662
|
L(
|
|
663
663
|
h != null,
|
|
664
664
|
`Previous layout not found for panel index ${f}`
|
|
665
665
|
);
|
|
666
|
-
const g = h +
|
|
667
|
-
overrideDisabledPanels:
|
|
666
|
+
const g = h + d, y = Y({
|
|
667
|
+
overrideDisabledPanels: l,
|
|
668
668
|
panelConstraints: n[f],
|
|
669
669
|
prevSize: h,
|
|
670
670
|
size: g
|
|
671
671
|
});
|
|
672
|
-
if (
|
|
673
|
-
let z = g - y,
|
|
674
|
-
for (;
|
|
675
|
-
const P =
|
|
672
|
+
if (u[f] = y, !I(y, g)) {
|
|
673
|
+
let z = g - y, p = e < 0 ? m : c;
|
|
674
|
+
for (; p >= 0 && p < n.length; ) {
|
|
675
|
+
const P = u[p];
|
|
676
676
|
L(
|
|
677
677
|
P != null,
|
|
678
|
-
`Previous layout not found for panel index ${
|
|
678
|
+
`Previous layout not found for panel index ${p}`
|
|
679
679
|
);
|
|
680
680
|
const R = P + z, C = Y({
|
|
681
|
-
overrideDisabledPanels:
|
|
682
|
-
panelConstraints: n[
|
|
681
|
+
overrideDisabledPanels: l,
|
|
682
|
+
panelConstraints: n[p],
|
|
683
683
|
prevSize: P,
|
|
684
684
|
size: R
|
|
685
685
|
});
|
|
686
|
-
if (I(P, C) || (z -= C - P,
|
|
686
|
+
if (I(P, C) || (z -= C - P, u[p] = C), I(z, 0))
|
|
687
687
|
break;
|
|
688
|
-
e > 0 ?
|
|
688
|
+
e > 0 ? p-- : p++;
|
|
689
689
|
}
|
|
690
690
|
}
|
|
691
691
|
}
|
|
692
|
-
const v = Object.values(
|
|
692
|
+
const v = Object.values(u).reduce(
|
|
693
693
|
(f, h) => h + f,
|
|
694
694
|
0
|
|
695
695
|
);
|
|
696
696
|
if (!I(v, 100, 0.1))
|
|
697
|
-
return
|
|
698
|
-
const x = Object.keys(
|
|
699
|
-
return
|
|
697
|
+
return i;
|
|
698
|
+
const x = Object.keys(i);
|
|
699
|
+
return u.reduce((f, h, g) => (f[x[g]] = h, f), {});
|
|
700
700
|
}
|
|
701
701
|
function j(e, t) {
|
|
702
702
|
if (Object.keys(e).length !== Object.keys(t).length)
|
|
@@ -710,107 +710,107 @@ function B({
|
|
|
710
710
|
layout: e,
|
|
711
711
|
panelConstraints: t
|
|
712
712
|
}) {
|
|
713
|
-
const n = Object.values(e), o = [...n],
|
|
714
|
-
(
|
|
713
|
+
const n = Object.values(e), o = [...n], i = o.reduce(
|
|
714
|
+
(r, a) => r + a,
|
|
715
715
|
0
|
|
716
716
|
);
|
|
717
717
|
if (o.length !== t.length)
|
|
718
718
|
throw Error(
|
|
719
|
-
`Invalid ${t.length} panel layout: ${o.map((
|
|
719
|
+
`Invalid ${t.length} panel layout: ${o.map((r) => `${r}%`).join(", ")}`
|
|
720
720
|
);
|
|
721
|
-
if (!I(
|
|
722
|
-
for (let
|
|
723
|
-
const
|
|
724
|
-
L(
|
|
725
|
-
const
|
|
726
|
-
o[
|
|
721
|
+
if (!I(i, 100) && o.length > 0)
|
|
722
|
+
for (let r = 0; r < t.length; r++) {
|
|
723
|
+
const a = o[r];
|
|
724
|
+
L(a != null, `No layout data found for index ${r}`);
|
|
725
|
+
const u = 100 / i * a;
|
|
726
|
+
o[r] = u;
|
|
727
727
|
}
|
|
728
|
-
let
|
|
729
|
-
for (let
|
|
730
|
-
const
|
|
731
|
-
L(
|
|
732
|
-
const
|
|
733
|
-
L(
|
|
728
|
+
let s = 0;
|
|
729
|
+
for (let r = 0; r < t.length; r++) {
|
|
730
|
+
const a = n[r];
|
|
731
|
+
L(a != null, `No layout data found for index ${r}`);
|
|
732
|
+
const u = o[r];
|
|
733
|
+
L(u != null, `No layout data found for index ${r}`);
|
|
734
734
|
const c = Y({
|
|
735
735
|
overrideDisabledPanels: !0,
|
|
736
|
-
panelConstraints: t[
|
|
737
|
-
prevSize:
|
|
738
|
-
size:
|
|
736
|
+
panelConstraints: t[r],
|
|
737
|
+
prevSize: a,
|
|
738
|
+
size: u
|
|
739
739
|
});
|
|
740
|
-
|
|
740
|
+
u != c && (s += u - c, o[r] = c);
|
|
741
741
|
}
|
|
742
|
-
if (!I(
|
|
743
|
-
for (let
|
|
744
|
-
const
|
|
745
|
-
L(
|
|
746
|
-
const
|
|
742
|
+
if (!I(s, 0))
|
|
743
|
+
for (let r = 0; r < t.length; r++) {
|
|
744
|
+
const a = o[r];
|
|
745
|
+
L(a != null, `No layout data found for index ${r}`);
|
|
746
|
+
const u = a + s, c = Y({
|
|
747
747
|
overrideDisabledPanels: !0,
|
|
748
|
-
panelConstraints: t[
|
|
749
|
-
prevSize:
|
|
750
|
-
size:
|
|
748
|
+
panelConstraints: t[r],
|
|
749
|
+
prevSize: a,
|
|
750
|
+
size: u
|
|
751
751
|
});
|
|
752
|
-
if (
|
|
752
|
+
if (a !== c && (s -= c - a, o[r] = c, I(s, 0)))
|
|
753
753
|
break;
|
|
754
754
|
}
|
|
755
|
-
const
|
|
756
|
-
return o.reduce((
|
|
755
|
+
const l = Object.keys(e);
|
|
756
|
+
return o.reduce((r, a, u) => (r[l[u]] = a, r), {});
|
|
757
757
|
}
|
|
758
758
|
function et({
|
|
759
759
|
groupId: e,
|
|
760
760
|
panelId: t
|
|
761
761
|
}) {
|
|
762
762
|
const n = () => {
|
|
763
|
-
const
|
|
763
|
+
const r = U();
|
|
764
764
|
for (const [
|
|
765
|
-
|
|
765
|
+
a,
|
|
766
766
|
{
|
|
767
|
-
defaultLayoutDeferred:
|
|
767
|
+
defaultLayoutDeferred: u,
|
|
768
768
|
derivedPanelConstraints: c,
|
|
769
769
|
layout: m,
|
|
770
|
-
groupSize:
|
|
770
|
+
groupSize: d,
|
|
771
771
|
separatorToPanels: v
|
|
772
772
|
}
|
|
773
|
-
] of
|
|
774
|
-
if (
|
|
773
|
+
] of r)
|
|
774
|
+
if (a.id === e)
|
|
775
775
|
return {
|
|
776
|
-
defaultLayoutDeferred:
|
|
776
|
+
defaultLayoutDeferred: u,
|
|
777
777
|
derivedPanelConstraints: c,
|
|
778
|
-
group:
|
|
779
|
-
groupSize:
|
|
778
|
+
group: a,
|
|
779
|
+
groupSize: d,
|
|
780
780
|
layout: m,
|
|
781
781
|
separatorToPanels: v
|
|
782
782
|
};
|
|
783
783
|
throw Error(`Group ${e} not found`);
|
|
784
784
|
}, o = () => {
|
|
785
|
-
const
|
|
786
|
-
(
|
|
785
|
+
const r = n().derivedPanelConstraints.find(
|
|
786
|
+
(a) => a.panelId === t
|
|
787
787
|
);
|
|
788
|
-
if (
|
|
789
|
-
return
|
|
788
|
+
if (r !== void 0)
|
|
789
|
+
return r;
|
|
790
790
|
throw Error(`Panel constraints not found for Panel ${t}`);
|
|
791
|
-
},
|
|
792
|
-
const
|
|
793
|
-
if (
|
|
794
|
-
return
|
|
791
|
+
}, i = () => {
|
|
792
|
+
const r = n().group.panels.find((a) => a.id === t);
|
|
793
|
+
if (r !== void 0)
|
|
794
|
+
return r;
|
|
795
795
|
throw Error(`Layout not found for Panel ${t}`);
|
|
796
|
-
},
|
|
797
|
-
const
|
|
798
|
-
if (
|
|
799
|
-
return
|
|
796
|
+
}, s = () => {
|
|
797
|
+
const r = n().layout[t];
|
|
798
|
+
if (r !== void 0)
|
|
799
|
+
return r;
|
|
800
800
|
throw Error(`Layout not found for Panel ${t}`);
|
|
801
|
-
},
|
|
802
|
-
const
|
|
803
|
-
if (
|
|
801
|
+
}, l = (r) => {
|
|
802
|
+
const a = s();
|
|
803
|
+
if (r === a)
|
|
804
804
|
return;
|
|
805
805
|
const {
|
|
806
|
-
defaultLayoutDeferred:
|
|
806
|
+
defaultLayoutDeferred: u,
|
|
807
807
|
derivedPanelConstraints: c,
|
|
808
808
|
group: m,
|
|
809
|
-
groupSize:
|
|
809
|
+
groupSize: d,
|
|
810
810
|
layout: v,
|
|
811
811
|
separatorToPanels: x
|
|
812
|
-
} = n(), f = m.panels.findIndex((z) => z.id === t), h = f === m.panels.length - 1, g =
|
|
813
|
-
delta: h ?
|
|
812
|
+
} = n(), f = m.panels.findIndex((z) => z.id === t), h = f === m.panels.length - 1, g = se({
|
|
813
|
+
delta: h ? a - r : r - a,
|
|
814
814
|
initialLayout: v,
|
|
815
815
|
panelConstraints: c,
|
|
816
816
|
pivotIndices: h ? [f - 1, f] : [f, f + 1],
|
|
@@ -820,53 +820,44 @@ function et({
|
|
|
820
820
|
layout: g,
|
|
821
821
|
panelConstraints: c
|
|
822
822
|
});
|
|
823
|
-
j(v, y) ||
|
|
824
|
-
defaultLayoutDeferred:
|
|
823
|
+
j(v, y) || _(m, {
|
|
824
|
+
defaultLayoutDeferred: u,
|
|
825
825
|
derivedPanelConstraints: c,
|
|
826
|
-
groupSize:
|
|
826
|
+
groupSize: d,
|
|
827
827
|
layout: y,
|
|
828
828
|
separatorToPanels: x
|
|
829
829
|
});
|
|
830
830
|
};
|
|
831
831
|
return {
|
|
832
832
|
collapse: () => {
|
|
833
|
-
const { collapsible:
|
|
834
|
-
|
|
833
|
+
const { collapsible: r, collapsedSize: a } = o(), { mutableValues: u } = i(), c = s();
|
|
834
|
+
r && c !== a && (u.expandToSize = c, l(a));
|
|
835
835
|
},
|
|
836
836
|
expand: () => {
|
|
837
|
-
const { collapsible:
|
|
838
|
-
if (
|
|
839
|
-
let
|
|
840
|
-
|
|
837
|
+
const { collapsible: r, collapsedSize: a, minSize: u } = o(), { mutableValues: c } = i(), m = s();
|
|
838
|
+
if (r && m === a) {
|
|
839
|
+
let d = c.expandToSize ?? u;
|
|
840
|
+
d === 0 && (d = 1), l(d);
|
|
841
841
|
}
|
|
842
842
|
},
|
|
843
843
|
getSize: () => {
|
|
844
|
-
const { group:
|
|
844
|
+
const { group: r } = n(), a = s(), { element: u } = i(), c = r.orientation === "horizontal" ? u.offsetWidth : u.offsetHeight;
|
|
845
845
|
return {
|
|
846
|
-
asPercentage:
|
|
846
|
+
asPercentage: a,
|
|
847
847
|
inPixels: c
|
|
848
848
|
};
|
|
849
849
|
},
|
|
850
850
|
isCollapsed: () => {
|
|
851
|
-
const { collapsible:
|
|
852
|
-
return
|
|
851
|
+
const { collapsible: r, collapsedSize: a } = o(), u = s();
|
|
852
|
+
return r && I(a, u);
|
|
853
853
|
},
|
|
854
|
-
resize: (
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
break;
|
|
862
|
-
}
|
|
863
|
-
case "string": {
|
|
864
|
-
l = parseFloat(i);
|
|
865
|
-
break;
|
|
866
|
-
}
|
|
867
|
-
}
|
|
868
|
-
u(l);
|
|
869
|
-
}
|
|
854
|
+
resize: (r) => {
|
|
855
|
+
const { group: a } = n(), { element: u } = i(), c = Q({ group: a }), m = te({
|
|
856
|
+
groupSize: c,
|
|
857
|
+
panelElement: u,
|
|
858
|
+
styleProp: r
|
|
859
|
+
}), d = D(m / c * 100);
|
|
860
|
+
l(d);
|
|
870
861
|
}
|
|
871
862
|
};
|
|
872
863
|
}
|
|
@@ -876,15 +867,15 @@ function De(e) {
|
|
|
876
867
|
const t = U();
|
|
877
868
|
ve(e, t).forEach((o) => {
|
|
878
869
|
if (o.separator) {
|
|
879
|
-
const
|
|
880
|
-
(
|
|
870
|
+
const i = o.panels.find(
|
|
871
|
+
(s) => s.panelConstraints.defaultSize !== void 0
|
|
881
872
|
);
|
|
882
|
-
if (
|
|
883
|
-
const
|
|
873
|
+
if (i) {
|
|
874
|
+
const s = i.panelConstraints.defaultSize, l = et({
|
|
884
875
|
groupId: o.group.id,
|
|
885
|
-
panelId:
|
|
876
|
+
panelId: i.id
|
|
886
877
|
});
|
|
887
|
-
|
|
878
|
+
l && s !== void 0 && (l.resize(s), e.preventDefault());
|
|
888
879
|
}
|
|
889
880
|
}
|
|
890
881
|
});
|
|
@@ -903,9 +894,9 @@ function tt({
|
|
|
903
894
|
}) {
|
|
904
895
|
const t = () => {
|
|
905
896
|
const n = U();
|
|
906
|
-
for (const [o,
|
|
897
|
+
for (const [o, i] of n)
|
|
907
898
|
if (o.id === e)
|
|
908
|
-
return { group: o, ...
|
|
899
|
+
return { group: o, ...i };
|
|
909
900
|
throw Error(`Could not find Group with id "${e}"`);
|
|
910
901
|
};
|
|
911
902
|
return {
|
|
@@ -916,44 +907,44 @@ function tt({
|
|
|
916
907
|
setLayout(n) {
|
|
917
908
|
const {
|
|
918
909
|
defaultLayoutDeferred: o,
|
|
919
|
-
derivedPanelConstraints:
|
|
920
|
-
group:
|
|
921
|
-
groupSize:
|
|
922
|
-
layout:
|
|
923
|
-
separatorToPanels:
|
|
924
|
-
} = t(),
|
|
910
|
+
derivedPanelConstraints: i,
|
|
911
|
+
group: s,
|
|
912
|
+
groupSize: l,
|
|
913
|
+
layout: r,
|
|
914
|
+
separatorToPanels: a
|
|
915
|
+
} = t(), u = B({
|
|
925
916
|
layout: n,
|
|
926
|
-
panelConstraints:
|
|
917
|
+
panelConstraints: i
|
|
927
918
|
});
|
|
928
|
-
return o ?
|
|
919
|
+
return o ? r : (j(r, u) || _(s, {
|
|
929
920
|
defaultLayoutDeferred: o,
|
|
930
|
-
derivedPanelConstraints:
|
|
931
|
-
groupSize:
|
|
932
|
-
layout:
|
|
933
|
-
separatorToPanels:
|
|
934
|
-
}),
|
|
921
|
+
derivedPanelConstraints: i,
|
|
922
|
+
groupSize: l,
|
|
923
|
+
layout: u,
|
|
924
|
+
separatorToPanels: a
|
|
925
|
+
}), u);
|
|
935
926
|
}
|
|
936
927
|
};
|
|
937
928
|
}
|
|
938
929
|
function V(e, t) {
|
|
939
|
-
const n = fe(e), o = $(n.id, !0),
|
|
930
|
+
const n = fe(e), o = $(n.id, !0), i = n.separators.find(
|
|
940
931
|
(m) => m.element === e
|
|
941
932
|
);
|
|
942
|
-
L(
|
|
943
|
-
const
|
|
944
|
-
L(
|
|
945
|
-
const
|
|
933
|
+
L(i, "Matching separator not found");
|
|
934
|
+
const s = o.separatorToPanels.get(i);
|
|
935
|
+
L(s, "Matching panels not found");
|
|
936
|
+
const l = s.map((m) => n.panels.indexOf(m)), a = tt({ groupId: n.id }).getLayout(), u = se({
|
|
946
937
|
delta: t,
|
|
947
|
-
initialLayout:
|
|
938
|
+
initialLayout: a,
|
|
948
939
|
panelConstraints: o.derivedPanelConstraints,
|
|
949
|
-
pivotIndices:
|
|
950
|
-
prevLayout:
|
|
940
|
+
pivotIndices: l,
|
|
941
|
+
prevLayout: a,
|
|
951
942
|
trigger: "keyboard"
|
|
952
943
|
}), c = B({
|
|
953
|
-
layout:
|
|
944
|
+
layout: u,
|
|
954
945
|
panelConstraints: o.derivedPanelConstraints
|
|
955
946
|
});
|
|
956
|
-
j(
|
|
947
|
+
j(a, c) || _(n, {
|
|
957
948
|
defaultLayoutDeferred: o.defaultLayoutDeferred,
|
|
958
949
|
derivedPanelConstraints: o.derivedPanelConstraints,
|
|
959
950
|
groupSize: o.groupSize,
|
|
@@ -989,31 +980,31 @@ function Te(e) {
|
|
|
989
980
|
}
|
|
990
981
|
case "Enter": {
|
|
991
982
|
e.preventDefault();
|
|
992
|
-
const o = fe(t),
|
|
993
|
-
(
|
|
983
|
+
const o = fe(t), i = $(o.id, !0), { derivedPanelConstraints: s, layout: l, separatorToPanels: r } = i, a = o.separators.find(
|
|
984
|
+
(d) => d.element === t
|
|
994
985
|
);
|
|
995
|
-
L(
|
|
996
|
-
const
|
|
997
|
-
L(
|
|
998
|
-
const c =
|
|
999
|
-
(
|
|
986
|
+
L(a, "Matching separator not found");
|
|
987
|
+
const u = r.get(a);
|
|
988
|
+
L(u, "Matching panels not found");
|
|
989
|
+
const c = u[0], m = s.find(
|
|
990
|
+
(d) => d.panelId === c.id
|
|
1000
991
|
);
|
|
1001
992
|
if (L(m, "Panel metadata not found"), m.collapsible) {
|
|
1002
|
-
const
|
|
1003
|
-
V(t, v -
|
|
993
|
+
const d = l[c.id], v = m.collapsedSize === d ? o.mutableState.expandedPanelSizes[c.id] ?? m.minSize : m.collapsedSize;
|
|
994
|
+
V(t, v - d);
|
|
1004
995
|
}
|
|
1005
996
|
break;
|
|
1006
997
|
}
|
|
1007
998
|
case "F6": {
|
|
1008
999
|
e.preventDefault();
|
|
1009
|
-
const
|
|
1010
|
-
(
|
|
1011
|
-
),
|
|
1012
|
-
(
|
|
1000
|
+
const i = fe(t).separators.map(
|
|
1001
|
+
(a) => a.element
|
|
1002
|
+
), s = Array.from(i).findIndex(
|
|
1003
|
+
(a) => a === e.currentTarget
|
|
1013
1004
|
);
|
|
1014
|
-
L(
|
|
1015
|
-
const
|
|
1016
|
-
|
|
1005
|
+
L(s !== null, "Index not found");
|
|
1006
|
+
const l = e.shiftKey ? s > 0 ? s - 1 : i.length - 1 : s + 1 < i.length ? s + 1 : 0;
|
|
1007
|
+
i[l].focus({
|
|
1017
1008
|
preventScroll: !0
|
|
1018
1009
|
});
|
|
1019
1010
|
break;
|
|
@@ -1055,13 +1046,13 @@ function Oe(e) {
|
|
|
1055
1046
|
if (e.pointerType === "mouse" && e.button > 0)
|
|
1056
1047
|
return;
|
|
1057
1048
|
const t = U(), n = ve(e, t), o = /* @__PURE__ */ new Map();
|
|
1058
|
-
let
|
|
1059
|
-
n.forEach((
|
|
1060
|
-
|
|
1049
|
+
let i = !1;
|
|
1050
|
+
n.forEach((s) => {
|
|
1051
|
+
s.separator && (i || (i = !0, s.separator.element.focus({
|
|
1061
1052
|
preventScroll: !0
|
|
1062
1053
|
})));
|
|
1063
|
-
const
|
|
1064
|
-
|
|
1054
|
+
const l = t.get(s.group);
|
|
1055
|
+
l && o.set(s.group, l.layout);
|
|
1065
1056
|
}), Z({
|
|
1066
1057
|
cursorFlags: 0,
|
|
1067
1058
|
hitRegions: n,
|
|
@@ -1076,67 +1067,67 @@ let ce;
|
|
|
1076
1067
|
function Ne() {
|
|
1077
1068
|
return ce === void 0 && (ce = !1, typeof window < "u" && (window.navigator.userAgent.includes("Chrome") || window.navigator.userAgent.includes("Firefox")) && (ce = !0)), ce;
|
|
1078
1069
|
}
|
|
1079
|
-
function
|
|
1070
|
+
function _t({
|
|
1080
1071
|
cursorFlags: e,
|
|
1081
1072
|
groups: t,
|
|
1082
1073
|
state: n
|
|
1083
1074
|
}) {
|
|
1084
|
-
let o = 0,
|
|
1075
|
+
let o = 0, i = 0;
|
|
1085
1076
|
switch (n) {
|
|
1086
1077
|
case "active":
|
|
1087
1078
|
case "hover":
|
|
1088
|
-
t.forEach((
|
|
1089
|
-
if (!
|
|
1090
|
-
switch (
|
|
1079
|
+
t.forEach((s) => {
|
|
1080
|
+
if (!s.mutableState.disableCursor)
|
|
1081
|
+
switch (s.orientation) {
|
|
1091
1082
|
case "horizontal": {
|
|
1092
1083
|
o++;
|
|
1093
1084
|
break;
|
|
1094
1085
|
}
|
|
1095
1086
|
case "vertical": {
|
|
1096
|
-
|
|
1087
|
+
i++;
|
|
1097
1088
|
break;
|
|
1098
1089
|
}
|
|
1099
1090
|
}
|
|
1100
1091
|
});
|
|
1101
1092
|
}
|
|
1102
|
-
if (!(o === 0 &&
|
|
1093
|
+
if (!(o === 0 && i === 0)) {
|
|
1103
1094
|
switch (n) {
|
|
1104
1095
|
case "active": {
|
|
1105
1096
|
if (e && Ne()) {
|
|
1106
|
-
const
|
|
1107
|
-
if (a)
|
|
1108
|
-
return i ? "se-resize" : s ? "ne-resize" : "e-resize";
|
|
1109
|
-
if (u)
|
|
1110
|
-
return i ? "sw-resize" : s ? "nw-resize" : "w-resize";
|
|
1111
|
-
if (i)
|
|
1112
|
-
return "s-resize";
|
|
1097
|
+
const s = (e & nt) !== 0, l = (e & ot) !== 0, r = (e & it) !== 0, a = (e & rt) !== 0;
|
|
1113
1098
|
if (s)
|
|
1099
|
+
return r ? "se-resize" : a ? "ne-resize" : "e-resize";
|
|
1100
|
+
if (l)
|
|
1101
|
+
return r ? "sw-resize" : a ? "nw-resize" : "w-resize";
|
|
1102
|
+
if (r)
|
|
1103
|
+
return "s-resize";
|
|
1104
|
+
if (a)
|
|
1114
1105
|
return "n-resize";
|
|
1115
1106
|
}
|
|
1116
1107
|
break;
|
|
1117
1108
|
}
|
|
1118
1109
|
}
|
|
1119
|
-
return Ne() ? o > 0 &&
|
|
1110
|
+
return Ne() ? o > 0 && i > 0 ? "move" : o > 0 ? "ew-resize" : "ns-resize" : o > 0 && i > 0 ? "grab" : o > 0 ? "col-resize" : "row-resize";
|
|
1120
1111
|
}
|
|
1121
1112
|
}
|
|
1122
|
-
const
|
|
1113
|
+
const _e = /* @__PURE__ */ new WeakMap();
|
|
1123
1114
|
function be(e) {
|
|
1124
1115
|
if (e.defaultView === null || e.defaultView === void 0)
|
|
1125
1116
|
return;
|
|
1126
|
-
let { prevStyle: t, styleSheet: n } =
|
|
1117
|
+
let { prevStyle: t, styleSheet: n } = _e.get(e) ?? {};
|
|
1127
1118
|
n === void 0 && (n = new e.defaultView.CSSStyleSheet(), e.adoptedStyleSheets && e.adoptedStyleSheets.push(n));
|
|
1128
1119
|
const o = W();
|
|
1129
1120
|
switch (o.state) {
|
|
1130
1121
|
case "active":
|
|
1131
1122
|
case "hover": {
|
|
1132
|
-
const
|
|
1123
|
+
const i = _t({
|
|
1133
1124
|
cursorFlags: o.cursorFlags,
|
|
1134
|
-
groups: o.hitRegions.map((
|
|
1125
|
+
groups: o.hitRegions.map((l) => l.group),
|
|
1135
1126
|
state: o.state
|
|
1136
|
-
}),
|
|
1137
|
-
if (t ===
|
|
1127
|
+
}), s = `*, *:hover {cursor: ${i} !important; }`;
|
|
1128
|
+
if (t === s)
|
|
1138
1129
|
return;
|
|
1139
|
-
t =
|
|
1130
|
+
t = s, i ? n.cssRules.length === 0 ? n.insertRule(s) : n.replaceSync(s) : n.cssRules.length === 1 && n.deleteRule(0);
|
|
1140
1131
|
break;
|
|
1141
1132
|
}
|
|
1142
1133
|
case "inactive": {
|
|
@@ -1144,58 +1135,58 @@ function be(e) {
|
|
|
1144
1135
|
break;
|
|
1145
1136
|
}
|
|
1146
1137
|
}
|
|
1147
|
-
|
|
1138
|
+
_e.set(e, {
|
|
1148
1139
|
prevStyle: t,
|
|
1149
1140
|
styleSheet: n
|
|
1150
1141
|
});
|
|
1151
1142
|
}
|
|
1152
|
-
function
|
|
1143
|
+
function st({
|
|
1153
1144
|
document: e,
|
|
1154
1145
|
event: t,
|
|
1155
1146
|
hitRegions: n,
|
|
1156
1147
|
initialLayoutMap: o,
|
|
1157
|
-
mountedGroups:
|
|
1158
|
-
pointerDownAtPoint:
|
|
1159
|
-
prevCursorFlags:
|
|
1148
|
+
mountedGroups: i,
|
|
1149
|
+
pointerDownAtPoint: s,
|
|
1150
|
+
prevCursorFlags: l
|
|
1160
1151
|
}) {
|
|
1161
|
-
let
|
|
1162
|
-
n.forEach((
|
|
1163
|
-
const { group: c, groupSize: m } =
|
|
1152
|
+
let r = 0;
|
|
1153
|
+
n.forEach((u) => {
|
|
1154
|
+
const { group: c, groupSize: m } = u, { orientation: d, panels: v } = c, { disableCursor: x } = c.mutableState;
|
|
1164
1155
|
let f = 0;
|
|
1165
|
-
|
|
1166
|
-
const h = o.get(c), g =
|
|
1156
|
+
s ? d === "horizontal" ? f = (t.clientX - s.x) / m * 100 : f = (t.clientY - s.y) / m * 100 : d === "horizontal" ? f = t.clientX < 0 ? -100 : 100 : f = t.clientY < 0 ? -100 : 100;
|
|
1157
|
+
const h = o.get(c), g = i.get(c);
|
|
1167
1158
|
if (!h || !g)
|
|
1168
1159
|
return;
|
|
1169
1160
|
const {
|
|
1170
1161
|
defaultLayoutDeferred: y,
|
|
1171
1162
|
derivedPanelConstraints: z,
|
|
1172
1163
|
groupSize: S,
|
|
1173
|
-
layout:
|
|
1164
|
+
layout: p,
|
|
1174
1165
|
separatorToPanels: P
|
|
1175
1166
|
} = g;
|
|
1176
|
-
if (z &&
|
|
1177
|
-
const R =
|
|
1167
|
+
if (z && p && P) {
|
|
1168
|
+
const R = se({
|
|
1178
1169
|
delta: f,
|
|
1179
1170
|
initialLayout: h,
|
|
1180
1171
|
panelConstraints: z,
|
|
1181
|
-
pivotIndices:
|
|
1182
|
-
prevLayout:
|
|
1172
|
+
pivotIndices: u.panels.map((C) => v.indexOf(C)),
|
|
1173
|
+
prevLayout: p,
|
|
1183
1174
|
trigger: "mouse-or-touch"
|
|
1184
1175
|
});
|
|
1185
|
-
if (j(R,
|
|
1176
|
+
if (j(R, p)) {
|
|
1186
1177
|
if (f !== 0 && !x)
|
|
1187
|
-
switch (
|
|
1178
|
+
switch (d) {
|
|
1188
1179
|
case "horizontal": {
|
|
1189
|
-
|
|
1180
|
+
r |= f < 0 ? nt : ot;
|
|
1190
1181
|
break;
|
|
1191
1182
|
}
|
|
1192
1183
|
case "vertical": {
|
|
1193
|
-
|
|
1184
|
+
r |= f < 0 ? it : rt;
|
|
1194
1185
|
break;
|
|
1195
1186
|
}
|
|
1196
1187
|
}
|
|
1197
1188
|
} else
|
|
1198
|
-
|
|
1189
|
+
_(u.group, {
|
|
1199
1190
|
defaultLayoutDeferred: y,
|
|
1200
1191
|
derivedPanelConstraints: z,
|
|
1201
1192
|
groupSize: S,
|
|
@@ -1204,14 +1195,14 @@ function at({
|
|
|
1204
1195
|
});
|
|
1205
1196
|
}
|
|
1206
1197
|
});
|
|
1207
|
-
let
|
|
1208
|
-
t.movementX === 0 ?
|
|
1198
|
+
let a = 0;
|
|
1199
|
+
t.movementX === 0 ? a |= l & Ge : a |= r & Ge, t.movementY === 0 ? a |= l & Ae : a |= r & Ae, At(a), be(e);
|
|
1209
1200
|
}
|
|
1210
|
-
function
|
|
1201
|
+
function Fe(e) {
|
|
1211
1202
|
const t = U(), n = W();
|
|
1212
1203
|
switch (n.state) {
|
|
1213
1204
|
case "active":
|
|
1214
|
-
|
|
1205
|
+
st({
|
|
1215
1206
|
document: e.currentTarget,
|
|
1216
1207
|
event: e,
|
|
1217
1208
|
hitRegions: n.hitRegions,
|
|
@@ -1235,12 +1226,12 @@ function $e(e) {
|
|
|
1235
1226
|
cursorFlags: 0,
|
|
1236
1227
|
state: "inactive"
|
|
1237
1228
|
}), t.hitRegions.forEach((o) => {
|
|
1238
|
-
const
|
|
1239
|
-
|
|
1229
|
+
const i = $(o.group.id, !0);
|
|
1230
|
+
_(o.group, i);
|
|
1240
1231
|
});
|
|
1241
1232
|
return;
|
|
1242
1233
|
}
|
|
1243
|
-
|
|
1234
|
+
st({
|
|
1244
1235
|
document: e.currentTarget,
|
|
1245
1236
|
event: e,
|
|
1246
1237
|
hitRegions: t.hitRegions,
|
|
@@ -1288,39 +1279,39 @@ function Ve(e) {
|
|
|
1288
1279
|
state: "inactive"
|
|
1289
1280
|
}), t.hitRegions.length > 0 && (be(e.currentTarget), t.hitRegions.forEach((n) => {
|
|
1290
1281
|
const o = $(n.group.id, !0);
|
|
1291
|
-
|
|
1282
|
+
_(n.group, o);
|
|
1292
1283
|
}), e.preventDefault());
|
|
1293
1284
|
}
|
|
1294
1285
|
}
|
|
1295
1286
|
function je(e) {
|
|
1296
1287
|
let t = 0, n = 0;
|
|
1297
1288
|
const o = {};
|
|
1298
|
-
for (const
|
|
1299
|
-
if (
|
|
1289
|
+
for (const s of e)
|
|
1290
|
+
if (s.defaultSize !== void 0) {
|
|
1300
1291
|
t++;
|
|
1301
|
-
const
|
|
1302
|
-
n +=
|
|
1292
|
+
const l = D(s.defaultSize);
|
|
1293
|
+
n += l, o[s.panelId] = l;
|
|
1303
1294
|
} else
|
|
1304
|
-
o[
|
|
1305
|
-
const
|
|
1306
|
-
if (
|
|
1307
|
-
const
|
|
1308
|
-
for (const
|
|
1309
|
-
|
|
1295
|
+
o[s.panelId] = void 0;
|
|
1296
|
+
const i = e.length - t;
|
|
1297
|
+
if (i !== 0) {
|
|
1298
|
+
const s = D((100 - n) / i);
|
|
1299
|
+
for (const l of e)
|
|
1300
|
+
l.defaultSize === void 0 && (o[l.panelId] = s);
|
|
1310
1301
|
}
|
|
1311
1302
|
return o;
|
|
1312
1303
|
}
|
|
1313
|
-
function
|
|
1304
|
+
function Ft(e, t, n) {
|
|
1314
1305
|
if (!n[0])
|
|
1315
1306
|
return;
|
|
1316
|
-
const
|
|
1317
|
-
if (!
|
|
1307
|
+
const i = e.panels.find((u) => u.element === t);
|
|
1308
|
+
if (!i || !i.onResize)
|
|
1318
1309
|
return;
|
|
1319
|
-
const
|
|
1320
|
-
asPercentage: D(
|
|
1321
|
-
inPixels:
|
|
1310
|
+
const s = Q({ group: e }), l = e.orientation === "horizontal" ? i.element.offsetWidth : i.element.offsetHeight, r = i.mutableValues.prevSize, a = {
|
|
1311
|
+
asPercentage: D(l / s * 100),
|
|
1312
|
+
inPixels: l
|
|
1322
1313
|
};
|
|
1323
|
-
|
|
1314
|
+
i.mutableValues.prevSize = a, i.onResize(a, i.id, r);
|
|
1324
1315
|
}
|
|
1325
1316
|
function $t(e, t) {
|
|
1326
1317
|
if (Object.keys(e).length !== Object.keys(t).length)
|
|
@@ -1338,53 +1329,53 @@ function Ht({
|
|
|
1338
1329
|
}) {
|
|
1339
1330
|
if (n <= 0 || t <= 0 || n === t)
|
|
1340
1331
|
return o;
|
|
1341
|
-
let
|
|
1342
|
-
const
|
|
1332
|
+
let i = 0, s = 0, l = !1;
|
|
1333
|
+
const r = /* @__PURE__ */ new Map(), a = [];
|
|
1343
1334
|
for (const m of e.panels) {
|
|
1344
|
-
const
|
|
1335
|
+
const d = o[m.id] ?? 0;
|
|
1345
1336
|
switch (m.panelConstraints.groupResizeBehavior) {
|
|
1346
1337
|
case "preserve-pixel-size": {
|
|
1347
|
-
|
|
1348
|
-
const v =
|
|
1338
|
+
l = !0;
|
|
1339
|
+
const v = d / 100 * n, x = D(
|
|
1349
1340
|
v / t * 100
|
|
1350
1341
|
);
|
|
1351
|
-
|
|
1342
|
+
r.set(m.id, x), i += x;
|
|
1352
1343
|
break;
|
|
1353
1344
|
}
|
|
1354
1345
|
case "preserve-relative-size":
|
|
1355
1346
|
default: {
|
|
1356
|
-
|
|
1347
|
+
a.push(m.id), s += d;
|
|
1357
1348
|
break;
|
|
1358
1349
|
}
|
|
1359
1350
|
}
|
|
1360
1351
|
}
|
|
1361
|
-
if (!
|
|
1352
|
+
if (!l || a.length === 0)
|
|
1362
1353
|
return o;
|
|
1363
|
-
const
|
|
1364
|
-
if (
|
|
1365
|
-
c[
|
|
1366
|
-
}),
|
|
1367
|
-
for (const m of
|
|
1368
|
-
const
|
|
1354
|
+
const u = 100 - i, c = { ...o };
|
|
1355
|
+
if (r.forEach((m, d) => {
|
|
1356
|
+
c[d] = m;
|
|
1357
|
+
}), s > 0)
|
|
1358
|
+
for (const m of a) {
|
|
1359
|
+
const d = o[m] ?? 0;
|
|
1369
1360
|
c[m] = D(
|
|
1370
|
-
|
|
1361
|
+
d / s * u
|
|
1371
1362
|
);
|
|
1372
1363
|
}
|
|
1373
1364
|
else {
|
|
1374
1365
|
const m = D(
|
|
1375
|
-
|
|
1366
|
+
u / a.length
|
|
1376
1367
|
);
|
|
1377
|
-
for (const
|
|
1378
|
-
c[
|
|
1368
|
+
for (const d of a)
|
|
1369
|
+
c[d] = m;
|
|
1379
1370
|
}
|
|
1380
1371
|
return c;
|
|
1381
1372
|
}
|
|
1382
1373
|
function Vt(e, t) {
|
|
1383
|
-
const n = e.map((
|
|
1374
|
+
const n = e.map((i) => i.id), o = Object.keys(t);
|
|
1384
1375
|
if (n.length !== o.length)
|
|
1385
1376
|
return !1;
|
|
1386
|
-
for (const
|
|
1387
|
-
if (!o.includes(
|
|
1377
|
+
for (const i of n)
|
|
1378
|
+
if (!o.includes(i))
|
|
1388
1379
|
return !1;
|
|
1389
1380
|
return !0;
|
|
1390
1381
|
}
|
|
@@ -1395,7 +1386,7 @@ function jt(e) {
|
|
|
1395
1386
|
e.element.ownerDocument.defaultView,
|
|
1396
1387
|
"Cannot register an unmounted Group"
|
|
1397
1388
|
);
|
|
1398
|
-
const n = e.element.ownerDocument.defaultView.ResizeObserver, o = /* @__PURE__ */ new Set(),
|
|
1389
|
+
const n = e.element.ownerDocument.defaultView.ResizeObserver, o = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Set(), s = new n((f) => {
|
|
1399
1390
|
for (const h of f) {
|
|
1400
1391
|
const { borderBoxSize: g, target: y } = h;
|
|
1401
1392
|
if (y === e.element) {
|
|
@@ -1406,82 +1397,82 @@ function jt(e) {
|
|
|
1406
1397
|
const S = $(e.id);
|
|
1407
1398
|
if (!S)
|
|
1408
1399
|
return;
|
|
1409
|
-
const
|
|
1400
|
+
const p = ge(e), P = S.defaultLayoutDeferred ? je(p) : S.layout, R = Ht({
|
|
1410
1401
|
group: e,
|
|
1411
1402
|
nextGroupSize: z,
|
|
1412
1403
|
prevGroupSize: S.groupSize,
|
|
1413
1404
|
prevLayout: P
|
|
1414
1405
|
}), C = B({
|
|
1415
1406
|
layout: R,
|
|
1416
|
-
panelConstraints:
|
|
1407
|
+
panelConstraints: p
|
|
1417
1408
|
});
|
|
1418
1409
|
if (!S.defaultLayoutDeferred && j(S.layout, C) && $t(
|
|
1419
1410
|
S.derivedPanelConstraints,
|
|
1420
|
-
|
|
1411
|
+
p
|
|
1421
1412
|
) && S.groupSize === z)
|
|
1422
1413
|
return;
|
|
1423
|
-
|
|
1414
|
+
_(e, {
|
|
1424
1415
|
defaultLayoutDeferred: !1,
|
|
1425
|
-
derivedPanelConstraints:
|
|
1416
|
+
derivedPanelConstraints: p,
|
|
1426
1417
|
groupSize: z,
|
|
1427
1418
|
layout: C,
|
|
1428
1419
|
separatorToPanels: S.separatorToPanels
|
|
1429
1420
|
});
|
|
1430
1421
|
}
|
|
1431
1422
|
} else
|
|
1432
|
-
|
|
1423
|
+
Ft(e, y, g);
|
|
1433
1424
|
}
|
|
1434
1425
|
});
|
|
1435
|
-
|
|
1426
|
+
s.observe(e.element), e.panels.forEach((f) => {
|
|
1436
1427
|
L(
|
|
1437
1428
|
!o.has(f.id),
|
|
1438
1429
|
`Panel ids must be unique; id "${f.id}" was used more than once`
|
|
1439
|
-
), o.add(f.id), f.onResize &&
|
|
1430
|
+
), o.add(f.id), f.onResize && s.observe(f.element);
|
|
1440
1431
|
});
|
|
1441
|
-
const
|
|
1442
|
-
let
|
|
1443
|
-
|
|
1444
|
-
const c = e.mutableState.layouts[
|
|
1432
|
+
const l = Q({ group: e }), r = ge(e), a = e.panels.map(({ id: f }) => f).join(",");
|
|
1433
|
+
let u = e.mutableState.defaultLayout;
|
|
1434
|
+
u && (Vt(e.panels, u) || (u = void 0));
|
|
1435
|
+
const c = e.mutableState.layouts[a] ?? u ?? je(r), m = B({
|
|
1445
1436
|
layout: c,
|
|
1446
|
-
panelConstraints:
|
|
1447
|
-
}),
|
|
1437
|
+
panelConstraints: r
|
|
1438
|
+
}), d = e.element.ownerDocument;
|
|
1448
1439
|
q.set(
|
|
1449
|
-
|
|
1450
|
-
(q.get(
|
|
1440
|
+
d,
|
|
1441
|
+
(q.get(d) ?? 0) + 1
|
|
1451
1442
|
);
|
|
1452
1443
|
const v = /* @__PURE__ */ new Map();
|
|
1453
1444
|
return Ye(e).forEach((f) => {
|
|
1454
1445
|
f.separator && v.set(f.separator, f.panels);
|
|
1455
|
-
}),
|
|
1456
|
-
defaultLayoutDeferred:
|
|
1457
|
-
derivedPanelConstraints:
|
|
1458
|
-
groupSize:
|
|
1446
|
+
}), _(e, {
|
|
1447
|
+
defaultLayoutDeferred: l === 0,
|
|
1448
|
+
derivedPanelConstraints: r,
|
|
1449
|
+
groupSize: l,
|
|
1459
1450
|
layout: m,
|
|
1460
1451
|
separatorToPanels: v
|
|
1461
1452
|
}), e.separators.forEach((f) => {
|
|
1462
1453
|
L(
|
|
1463
|
-
!
|
|
1454
|
+
!i.has(f.id),
|
|
1464
1455
|
`Separator ids must be unique; id "${f.id}" was used more than once`
|
|
1465
|
-
),
|
|
1466
|
-
}), q.get(
|
|
1456
|
+
), i.add(f.id), f.element.addEventListener("keydown", Te);
|
|
1457
|
+
}), q.get(d) === 1 && (d.addEventListener("dblclick", De, !0), d.addEventListener("pointerdown", Oe, !0), d.addEventListener("pointerleave", Fe), d.addEventListener("pointermove", $e), d.addEventListener("pointerout", He), d.addEventListener("pointerup", Ve, !0)), function() {
|
|
1467
1458
|
t = !1, q.set(
|
|
1468
|
-
|
|
1469
|
-
Math.max(0, (q.get(
|
|
1459
|
+
d,
|
|
1460
|
+
Math.max(0, (q.get(d) ?? 0) - 1)
|
|
1470
1461
|
), Lt(e), e.separators.forEach((h) => {
|
|
1471
1462
|
h.element.removeEventListener("keydown", Te);
|
|
1472
|
-
}), q.get(
|
|
1463
|
+
}), q.get(d) || (d.removeEventListener(
|
|
1473
1464
|
"dblclick",
|
|
1474
1465
|
De,
|
|
1475
1466
|
!0
|
|
1476
|
-
),
|
|
1467
|
+
), d.removeEventListener(
|
|
1477
1468
|
"pointerdown",
|
|
1478
1469
|
Oe,
|
|
1479
1470
|
!0
|
|
1480
|
-
),
|
|
1471
|
+
), d.removeEventListener("pointerleave", Fe), d.removeEventListener("pointermove", $e), d.removeEventListener("pointerout", He), d.removeEventListener("pointerup", Ve, !0)), s.disconnect();
|
|
1481
1472
|
};
|
|
1482
1473
|
}
|
|
1483
1474
|
function Bt() {
|
|
1484
|
-
const [e, t] =
|
|
1475
|
+
const [e, t] = re({}), n = ne(() => t({}), []);
|
|
1485
1476
|
return [e, n];
|
|
1486
1477
|
}
|
|
1487
1478
|
function xe(e) {
|
|
@@ -1489,17 +1480,17 @@ function xe(e) {
|
|
|
1489
1480
|
return `${e ?? t}`;
|
|
1490
1481
|
}
|
|
1491
1482
|
const K = typeof window < "u" ? Be : de;
|
|
1492
|
-
function
|
|
1483
|
+
function oe(e) {
|
|
1493
1484
|
const t = T(e);
|
|
1494
1485
|
return K(() => {
|
|
1495
1486
|
t.current = e;
|
|
1496
|
-
}, [e]),
|
|
1487
|
+
}, [e]), ne(
|
|
1497
1488
|
(...n) => t.current?.(...n),
|
|
1498
1489
|
[t]
|
|
1499
1490
|
);
|
|
1500
1491
|
}
|
|
1501
1492
|
function we(...e) {
|
|
1502
|
-
return
|
|
1493
|
+
return oe((t) => {
|
|
1503
1494
|
e.forEach((n) => {
|
|
1504
1495
|
if (n)
|
|
1505
1496
|
switch (typeof n) {
|
|
@@ -1522,7 +1513,7 @@ function Pe(e) {
|
|
|
1522
1513
|
t.current[n] = e[n];
|
|
1523
1514
|
}, [e]), t.current;
|
|
1524
1515
|
}
|
|
1525
|
-
const
|
|
1516
|
+
const at = ht(null);
|
|
1526
1517
|
function Wt(e, t) {
|
|
1527
1518
|
const n = T({
|
|
1528
1519
|
getLayout: () => ({}),
|
|
@@ -1540,36 +1531,36 @@ function Ut({
|
|
|
1540
1531
|
className: t,
|
|
1541
1532
|
defaultLayout: n,
|
|
1542
1533
|
disableCursor: o,
|
|
1543
|
-
disabled:
|
|
1544
|
-
elementRef:
|
|
1545
|
-
groupRef:
|
|
1546
|
-
id:
|
|
1547
|
-
onLayoutChange:
|
|
1548
|
-
onLayoutChanged:
|
|
1534
|
+
disabled: i,
|
|
1535
|
+
elementRef: s,
|
|
1536
|
+
groupRef: l,
|
|
1537
|
+
id: r,
|
|
1538
|
+
onLayoutChange: a,
|
|
1539
|
+
onLayoutChanged: u,
|
|
1549
1540
|
orientation: c = "horizontal",
|
|
1550
1541
|
resizeTargetMinimumSize: m = {
|
|
1551
1542
|
coarse: 20,
|
|
1552
1543
|
fine: 10
|
|
1553
1544
|
},
|
|
1554
|
-
style:
|
|
1545
|
+
style: d,
|
|
1555
1546
|
...v
|
|
1556
1547
|
}) {
|
|
1557
1548
|
const x = T({
|
|
1558
1549
|
onLayoutChange: {},
|
|
1559
1550
|
onLayoutChanged: {}
|
|
1560
|
-
}), f =
|
|
1561
|
-
j(x.current.onLayoutChange, b) || (x.current.onLayoutChange = b,
|
|
1562
|
-
}), h =
|
|
1563
|
-
j(x.current.onLayoutChanged, b) || (x.current.onLayoutChanged = b,
|
|
1564
|
-
}), g = xe(
|
|
1551
|
+
}), f = oe((b) => {
|
|
1552
|
+
j(x.current.onLayoutChange, b) || (x.current.onLayoutChange = b, a?.(b));
|
|
1553
|
+
}), h = oe((b) => {
|
|
1554
|
+
j(x.current.onLayoutChanged, b) || (x.current.onLayoutChanged = b, u?.(b));
|
|
1555
|
+
}), g = xe(r), y = T(null), [z, S] = Bt(), p = T({
|
|
1565
1556
|
lastExpandedPanelSizes: {},
|
|
1566
1557
|
layouts: {},
|
|
1567
1558
|
panels: [],
|
|
1568
1559
|
resizeTargetMinimumSize: m,
|
|
1569
1560
|
separators: []
|
|
1570
|
-
}), P = we(y,
|
|
1571
|
-
Wt(g,
|
|
1572
|
-
const R =
|
|
1561
|
+
}), P = we(y, s);
|
|
1562
|
+
Wt(g, l);
|
|
1563
|
+
const R = oe(
|
|
1573
1564
|
(b, w) => {
|
|
1574
1565
|
const E = W(), M = Me(b), k = $(b);
|
|
1575
1566
|
if (k) {
|
|
@@ -1603,7 +1594,7 @@ function Ut({
|
|
|
1603
1594
|
id: g,
|
|
1604
1595
|
orientation: c,
|
|
1605
1596
|
registerPanel: (b) => {
|
|
1606
|
-
const w =
|
|
1597
|
+
const w = p.current;
|
|
1607
1598
|
return w.panels = Se(c, [
|
|
1608
1599
|
...w.panels,
|
|
1609
1600
|
b
|
|
@@ -1614,7 +1605,7 @@ function Ut({
|
|
|
1614
1605
|
};
|
|
1615
1606
|
},
|
|
1616
1607
|
registerSeparator: (b) => {
|
|
1617
|
-
const w =
|
|
1608
|
+
const w = p.current;
|
|
1618
1609
|
return w.separators = Se(c, [
|
|
1619
1610
|
...w.separators,
|
|
1620
1611
|
b
|
|
@@ -1625,30 +1616,30 @@ function Ut({
|
|
|
1625
1616
|
};
|
|
1626
1617
|
},
|
|
1627
1618
|
togglePanelDisabled: (b, w) => {
|
|
1628
|
-
const M =
|
|
1619
|
+
const M = p.current.panels.find(
|
|
1629
1620
|
(H) => H.id === b
|
|
1630
1621
|
);
|
|
1631
1622
|
M && (M.panelConstraints.disabled = w);
|
|
1632
1623
|
const k = Me(g), O = $(g);
|
|
1633
|
-
k && O &&
|
|
1624
|
+
k && O && _(k, {
|
|
1634
1625
|
...O,
|
|
1635
1626
|
derivedPanelConstraints: ge(k)
|
|
1636
1627
|
});
|
|
1637
1628
|
},
|
|
1638
1629
|
toggleSeparatorDisabled: (b, w) => {
|
|
1639
|
-
const M =
|
|
1630
|
+
const M = p.current.separators.find(
|
|
1640
1631
|
(k) => k.id === b
|
|
1641
1632
|
);
|
|
1642
1633
|
M && (M.disabled = w);
|
|
1643
1634
|
}
|
|
1644
1635
|
}),
|
|
1645
1636
|
[R, g, S, c, C]
|
|
1646
|
-
),
|
|
1637
|
+
), F = T(null);
|
|
1647
1638
|
return K(() => {
|
|
1648
1639
|
const b = y.current;
|
|
1649
1640
|
if (b === null)
|
|
1650
1641
|
return;
|
|
1651
|
-
const w =
|
|
1642
|
+
const w = p.current;
|
|
1652
1643
|
let E;
|
|
1653
1644
|
if (C.defaultLayout !== void 0 && Object.keys(C.defaultLayout).length === w.panels.length) {
|
|
1654
1645
|
E = {};
|
|
@@ -1658,35 +1649,35 @@ function Ut({
|
|
|
1658
1649
|
}
|
|
1659
1650
|
}
|
|
1660
1651
|
const M = {
|
|
1661
|
-
disabled: !!
|
|
1652
|
+
disabled: !!i,
|
|
1662
1653
|
element: b,
|
|
1663
1654
|
id: g,
|
|
1664
1655
|
mutableState: {
|
|
1665
1656
|
defaultLayout: E,
|
|
1666
1657
|
disableCursor: !!C.disableCursor,
|
|
1667
|
-
expandedPanelSizes:
|
|
1668
|
-
layouts:
|
|
1658
|
+
expandedPanelSizes: p.current.lastExpandedPanelSizes,
|
|
1659
|
+
layouts: p.current.layouts
|
|
1669
1660
|
},
|
|
1670
1661
|
orientation: c,
|
|
1671
1662
|
panels: w.panels,
|
|
1672
1663
|
resizeTargetMinimumSize: w.resizeTargetMinimumSize,
|
|
1673
1664
|
separators: w.separators
|
|
1674
1665
|
};
|
|
1675
|
-
|
|
1666
|
+
F.current = M;
|
|
1676
1667
|
const k = jt(M), { defaultLayoutDeferred: O, derivedPanelConstraints: H, layout: Ce } = $(M.id, !0);
|
|
1677
1668
|
!O && H.length > 0 && (f(Ce), h(Ce));
|
|
1678
1669
|
const lt = ye(g, (ee) => {
|
|
1679
|
-
const { defaultLayoutDeferred: ae, derivedPanelConstraints: Re, layout:
|
|
1670
|
+
const { defaultLayoutDeferred: ae, derivedPanelConstraints: Re, layout: le } = ee.next;
|
|
1680
1671
|
if (ae || Re.length === 0)
|
|
1681
1672
|
return;
|
|
1682
1673
|
const ut = M.panels.map(({ id: N }) => N).join(",");
|
|
1683
|
-
M.mutableState.layouts[ut] =
|
|
1674
|
+
M.mutableState.layouts[ut] = le, Re.forEach((N) => {
|
|
1684
1675
|
if (N.collapsible) {
|
|
1685
1676
|
const { layout: pe } = ee.prev ?? {};
|
|
1686
1677
|
if (pe) {
|
|
1687
1678
|
const ft = I(
|
|
1688
1679
|
N.collapsedSize,
|
|
1689
|
-
|
|
1680
|
+
le[N.panelId]
|
|
1690
1681
|
), dt = I(
|
|
1691
1682
|
N.collapsedSize,
|
|
1692
1683
|
pe[N.panelId]
|
|
@@ -1696,13 +1687,13 @@ function Ut({
|
|
|
1696
1687
|
}
|
|
1697
1688
|
});
|
|
1698
1689
|
const ct = W().state !== "active";
|
|
1699
|
-
f(
|
|
1690
|
+
f(le), ct && h(le);
|
|
1700
1691
|
});
|
|
1701
1692
|
return () => {
|
|
1702
|
-
|
|
1693
|
+
F.current = null, k(), lt();
|
|
1703
1694
|
};
|
|
1704
1695
|
}, [
|
|
1705
|
-
|
|
1696
|
+
i,
|
|
1706
1697
|
g,
|
|
1707
1698
|
h,
|
|
1708
1699
|
f,
|
|
@@ -1710,9 +1701,9 @@ function Ut({
|
|
|
1710
1701
|
z,
|
|
1711
1702
|
C
|
|
1712
1703
|
]), de(() => {
|
|
1713
|
-
const b =
|
|
1704
|
+
const b = F.current;
|
|
1714
1705
|
b && (b.mutableState.defaultLayout = n, b.mutableState.disableCursor = !!o);
|
|
1715
|
-
}), /* @__PURE__ */
|
|
1706
|
+
}), /* @__PURE__ */ ie(at.Provider, { value: X, children: /* @__PURE__ */ ie(
|
|
1716
1707
|
"div",
|
|
1717
1708
|
{
|
|
1718
1709
|
...v,
|
|
@@ -1725,7 +1716,7 @@ function Ut({
|
|
|
1725
1716
|
height: "100%",
|
|
1726
1717
|
width: "100%",
|
|
1727
1718
|
overflow: "hidden",
|
|
1728
|
-
...
|
|
1719
|
+
...d,
|
|
1729
1720
|
display: "flex",
|
|
1730
1721
|
flexDirection: c === "horizontal" ? "row" : "column",
|
|
1731
1722
|
flexWrap: "nowrap",
|
|
@@ -1749,35 +1740,35 @@ function nn({
|
|
|
1749
1740
|
storage: n = localStorage,
|
|
1750
1741
|
...o
|
|
1751
1742
|
}) {
|
|
1752
|
-
const
|
|
1743
|
+
const i = t !== void 0, s = "id" in o ? o.id : o.groupId, l = me(s, t ?? []), r = Ke(
|
|
1753
1744
|
Kt,
|
|
1754
|
-
() => n.getItem(
|
|
1755
|
-
() => n.getItem(
|
|
1756
|
-
),
|
|
1757
|
-
() =>
|
|
1758
|
-
[
|
|
1759
|
-
),
|
|
1760
|
-
const v =
|
|
1761
|
-
v && (
|
|
1745
|
+
() => n.getItem(l),
|
|
1746
|
+
() => n.getItem(l)
|
|
1747
|
+
), a = Ue(
|
|
1748
|
+
() => r ? JSON.parse(r) : void 0,
|
|
1749
|
+
[r]
|
|
1750
|
+
), u = T(null), c = ne(() => {
|
|
1751
|
+
const v = u.current;
|
|
1752
|
+
v && (u.current = null, clearTimeout(v));
|
|
1762
1753
|
}, []);
|
|
1763
1754
|
Be(() => () => {
|
|
1764
1755
|
c();
|
|
1765
1756
|
}, [c]);
|
|
1766
|
-
const m =
|
|
1757
|
+
const m = ne(
|
|
1767
1758
|
(v) => {
|
|
1768
1759
|
c();
|
|
1769
1760
|
let x;
|
|
1770
|
-
|
|
1761
|
+
i ? x = me(s, Object.keys(v)) : x = me(s, []);
|
|
1771
1762
|
try {
|
|
1772
1763
|
n.setItem(x, JSON.stringify(v));
|
|
1773
1764
|
} catch (f) {
|
|
1774
1765
|
console.error(f);
|
|
1775
1766
|
}
|
|
1776
1767
|
},
|
|
1777
|
-
[c,
|
|
1778
|
-
),
|
|
1768
|
+
[c, i, s, n]
|
|
1769
|
+
), d = ne(
|
|
1779
1770
|
(v) => {
|
|
1780
|
-
c(), e === 0 ? m(v) :
|
|
1771
|
+
c(), e === 0 ? m(v) : u.current = setTimeout(() => {
|
|
1781
1772
|
m(v);
|
|
1782
1773
|
}, e);
|
|
1783
1774
|
},
|
|
@@ -1787,13 +1778,13 @@ function nn({
|
|
|
1787
1778
|
/**
|
|
1788
1779
|
* Pass this value to `Group` as the `defaultLayout` prop.
|
|
1789
1780
|
*/
|
|
1790
|
-
defaultLayout:
|
|
1781
|
+
defaultLayout: a,
|
|
1791
1782
|
/**
|
|
1792
1783
|
* Attach this callback on the `Group` as the `onLayoutChange` prop.
|
|
1793
1784
|
*
|
|
1794
1785
|
* @deprecated Use the {@link onLayoutChanged} prop instead.
|
|
1795
1786
|
*/
|
|
1796
|
-
onLayoutChange:
|
|
1787
|
+
onLayoutChange: d,
|
|
1797
1788
|
/**
|
|
1798
1789
|
* Attach this callback on the `Group` as the `onLayoutChanged` prop.
|
|
1799
1790
|
*/
|
|
@@ -1805,13 +1796,13 @@ function Kt() {
|
|
|
1805
1796
|
};
|
|
1806
1797
|
}
|
|
1807
1798
|
function on() {
|
|
1808
|
-
return
|
|
1799
|
+
return re(null);
|
|
1809
1800
|
}
|
|
1810
1801
|
function rn() {
|
|
1811
1802
|
return T(null);
|
|
1812
1803
|
}
|
|
1813
1804
|
function Le() {
|
|
1814
|
-
const e = mt(
|
|
1805
|
+
const e = mt(at);
|
|
1815
1806
|
return L(
|
|
1816
1807
|
e,
|
|
1817
1808
|
"Group Context not found; did you render a Panel or Separator outside of a Group?"
|
|
@@ -1840,29 +1831,29 @@ function qt({
|
|
|
1840
1831
|
className: t,
|
|
1841
1832
|
collapsedSize: n = "0%",
|
|
1842
1833
|
collapsible: o = !1,
|
|
1843
|
-
defaultSize:
|
|
1844
|
-
disabled:
|
|
1845
|
-
elementRef:
|
|
1846
|
-
groupResizeBehavior:
|
|
1847
|
-
id:
|
|
1848
|
-
maxSize:
|
|
1834
|
+
defaultSize: i,
|
|
1835
|
+
disabled: s,
|
|
1836
|
+
elementRef: l,
|
|
1837
|
+
groupResizeBehavior: r = "preserve-relative-size",
|
|
1838
|
+
id: a,
|
|
1839
|
+
maxSize: u = "100%",
|
|
1849
1840
|
minSize: c = "0%",
|
|
1850
1841
|
onResize: m,
|
|
1851
|
-
panelRef:
|
|
1842
|
+
panelRef: d,
|
|
1852
1843
|
style: v,
|
|
1853
1844
|
...x
|
|
1854
1845
|
}) {
|
|
1855
|
-
const f = !!
|
|
1856
|
-
disabled:
|
|
1857
|
-
}), y = T(null), z = we(y,
|
|
1846
|
+
const f = !!a, h = xe(a), g = Pe({
|
|
1847
|
+
disabled: s
|
|
1848
|
+
}), y = T(null), z = we(y, l), {
|
|
1858
1849
|
getPanelStyles: S,
|
|
1859
|
-
id:
|
|
1850
|
+
id: p,
|
|
1860
1851
|
orientation: P,
|
|
1861
1852
|
registerPanel: R,
|
|
1862
1853
|
togglePanelDisabled: C
|
|
1863
|
-
} = Le(), X = m !== null,
|
|
1854
|
+
} = Le(), X = m !== null, F = oe(
|
|
1864
1855
|
(w, E, M) => {
|
|
1865
|
-
m?.(w,
|
|
1856
|
+
m?.(w, a, M);
|
|
1866
1857
|
}
|
|
1867
1858
|
);
|
|
1868
1859
|
K(() => {
|
|
@@ -1876,47 +1867,47 @@ function qt({
|
|
|
1876
1867
|
expandToSize: void 0,
|
|
1877
1868
|
prevSize: void 0
|
|
1878
1869
|
},
|
|
1879
|
-
onResize: X ?
|
|
1870
|
+
onResize: X ? F : void 0,
|
|
1880
1871
|
panelConstraints: {
|
|
1881
|
-
groupResizeBehavior:
|
|
1872
|
+
groupResizeBehavior: r,
|
|
1882
1873
|
collapsedSize: n,
|
|
1883
1874
|
collapsible: o,
|
|
1884
|
-
defaultSize:
|
|
1875
|
+
defaultSize: i,
|
|
1885
1876
|
disabled: g.disabled,
|
|
1886
|
-
maxSize:
|
|
1877
|
+
maxSize: u,
|
|
1887
1878
|
minSize: c
|
|
1888
1879
|
}
|
|
1889
1880
|
};
|
|
1890
1881
|
return R(E);
|
|
1891
1882
|
}
|
|
1892
1883
|
}, [
|
|
1893
|
-
|
|
1884
|
+
r,
|
|
1894
1885
|
n,
|
|
1895
1886
|
o,
|
|
1896
|
-
|
|
1887
|
+
i,
|
|
1897
1888
|
X,
|
|
1898
1889
|
h,
|
|
1899
1890
|
f,
|
|
1900
|
-
|
|
1891
|
+
u,
|
|
1901
1892
|
c,
|
|
1902
|
-
|
|
1893
|
+
F,
|
|
1903
1894
|
R,
|
|
1904
1895
|
g
|
|
1905
1896
|
]), de(() => {
|
|
1906
|
-
C(h, !!
|
|
1907
|
-
}, [
|
|
1897
|
+
C(h, !!s);
|
|
1898
|
+
}, [s, h, C]), Xt(h, d);
|
|
1908
1899
|
const b = Ke(
|
|
1909
|
-
(w) => ye(
|
|
1900
|
+
(w) => ye(p, w),
|
|
1910
1901
|
// useSyncExternalStore does not support a custom equality check
|
|
1911
1902
|
// stringify avoids re-rendering when the style value hasn't changed
|
|
1912
|
-
() => JSON.stringify(S(
|
|
1913
|
-
() => JSON.stringify(S(
|
|
1903
|
+
() => JSON.stringify(S(p, h)),
|
|
1904
|
+
() => JSON.stringify(S(p, h))
|
|
1914
1905
|
);
|
|
1915
|
-
return /* @__PURE__ */
|
|
1906
|
+
return /* @__PURE__ */ ie(
|
|
1916
1907
|
"div",
|
|
1917
1908
|
{
|
|
1918
1909
|
...x,
|
|
1919
|
-
"aria-disabled":
|
|
1910
|
+
"aria-disabled": s || void 0,
|
|
1920
1911
|
"data-panel": !0,
|
|
1921
1912
|
"data-testid": h,
|
|
1922
1913
|
id: h,
|
|
@@ -1929,7 +1920,7 @@ function qt({
|
|
|
1929
1920
|
overflow: "visible",
|
|
1930
1921
|
...JSON.parse(b)
|
|
1931
1922
|
},
|
|
1932
|
-
children: /* @__PURE__ */
|
|
1923
|
+
children: /* @__PURE__ */ ie(
|
|
1933
1924
|
"div",
|
|
1934
1925
|
{
|
|
1935
1926
|
className: t,
|
|
@@ -1964,10 +1955,10 @@ const Yt = {
|
|
|
1964
1955
|
padding: 0,
|
|
1965
1956
|
margin: 0
|
|
1966
1957
|
};
|
|
1967
|
-
function an() {
|
|
1968
|
-
return ie(null);
|
|
1969
|
-
}
|
|
1970
1958
|
function sn() {
|
|
1959
|
+
return re(null);
|
|
1960
|
+
}
|
|
1961
|
+
function an() {
|
|
1971
1962
|
return T(null);
|
|
1972
1963
|
}
|
|
1973
1964
|
function Jt({
|
|
@@ -1976,24 +1967,24 @@ function Jt({
|
|
|
1976
1967
|
panelId: n,
|
|
1977
1968
|
panelIndex: o
|
|
1978
1969
|
}) {
|
|
1979
|
-
let
|
|
1980
|
-
const
|
|
1981
|
-
(
|
|
1970
|
+
let i, s;
|
|
1971
|
+
const l = e[n], r = t.find(
|
|
1972
|
+
(a) => a.panelId === n
|
|
1982
1973
|
);
|
|
1983
|
-
if (
|
|
1984
|
-
const
|
|
1985
|
-
|
|
1986
|
-
layout:
|
|
1987
|
-
delta:
|
|
1974
|
+
if (r) {
|
|
1975
|
+
const a = r.maxSize, u = r.collapsible ? r.collapsedSize : r.minSize, c = [o, o + 1];
|
|
1976
|
+
s = B({
|
|
1977
|
+
layout: se({
|
|
1978
|
+
delta: u - l,
|
|
1988
1979
|
initialLayout: e,
|
|
1989
1980
|
panelConstraints: t,
|
|
1990
1981
|
pivotIndices: c,
|
|
1991
1982
|
prevLayout: e
|
|
1992
1983
|
}),
|
|
1993
1984
|
panelConstraints: t
|
|
1994
|
-
})[n],
|
|
1995
|
-
layout:
|
|
1996
|
-
delta:
|
|
1985
|
+
})[n], i = B({
|
|
1986
|
+
layout: se({
|
|
1987
|
+
delta: a - l,
|
|
1997
1988
|
initialLayout: e,
|
|
1998
1989
|
panelConstraints: t,
|
|
1999
1990
|
pivotIndices: c,
|
|
@@ -2004,9 +1995,9 @@ function Jt({
|
|
|
2004
1995
|
}
|
|
2005
1996
|
return {
|
|
2006
1997
|
valueControls: n,
|
|
2007
|
-
valueMax:
|
|
2008
|
-
valueMin:
|
|
2009
|
-
valueNow:
|
|
1998
|
+
valueMax: i,
|
|
1999
|
+
valueMin: s,
|
|
2000
|
+
valueNow: l
|
|
2010
2001
|
};
|
|
2011
2002
|
}
|
|
2012
2003
|
function Zt({
|
|
@@ -2014,13 +2005,13 @@ function Zt({
|
|
|
2014
2005
|
className: t,
|
|
2015
2006
|
disabled: n,
|
|
2016
2007
|
elementRef: o,
|
|
2017
|
-
id:
|
|
2018
|
-
style:
|
|
2019
|
-
...
|
|
2008
|
+
id: i,
|
|
2009
|
+
style: s,
|
|
2010
|
+
...l
|
|
2020
2011
|
}) {
|
|
2021
|
-
const
|
|
2012
|
+
const r = xe(i), a = Pe({
|
|
2022
2013
|
disabled: n
|
|
2023
|
-
}), [
|
|
2014
|
+
}), [u, c] = re({}), [m, d] = re("inactive"), v = T(null), x = we(v, o), {
|
|
2024
2015
|
disableCursor: f,
|
|
2025
2016
|
id: h,
|
|
2026
2017
|
orientation: g,
|
|
@@ -2031,18 +2022,18 @@ function Zt({
|
|
|
2031
2022
|
const P = v.current;
|
|
2032
2023
|
if (P !== null) {
|
|
2033
2024
|
const R = {
|
|
2034
|
-
disabled:
|
|
2025
|
+
disabled: a.disabled,
|
|
2035
2026
|
element: P,
|
|
2036
|
-
id:
|
|
2027
|
+
id: r
|
|
2037
2028
|
}, C = y(R), X = Gt(
|
|
2038
2029
|
(b) => {
|
|
2039
|
-
|
|
2030
|
+
d(
|
|
2040
2031
|
b.next.state !== "inactive" && b.next.hitRegions.some(
|
|
2041
2032
|
(w) => w.separator === R
|
|
2042
2033
|
) ? b.next.state : "inactive"
|
|
2043
2034
|
);
|
|
2044
2035
|
}
|
|
2045
|
-
),
|
|
2036
|
+
), F = ye(
|
|
2046
2037
|
h,
|
|
2047
2038
|
(b) => {
|
|
2048
2039
|
const { derivedPanelConstraints: w, layout: E, separatorToPanels: M } = b.next, k = M.get(R);
|
|
@@ -2060,34 +2051,34 @@ function Zt({
|
|
|
2060
2051
|
}
|
|
2061
2052
|
);
|
|
2062
2053
|
return () => {
|
|
2063
|
-
X(),
|
|
2054
|
+
X(), F(), C();
|
|
2064
2055
|
};
|
|
2065
2056
|
}
|
|
2066
|
-
}, [h,
|
|
2067
|
-
z(
|
|
2068
|
-
}, [n,
|
|
2069
|
-
let
|
|
2070
|
-
return n && !f && (
|
|
2057
|
+
}, [h, r, y, a]), de(() => {
|
|
2058
|
+
z(r, !!n);
|
|
2059
|
+
}, [n, r, z]);
|
|
2060
|
+
let p;
|
|
2061
|
+
return n && !f && (p = "not-allowed"), /* @__PURE__ */ ie(
|
|
2071
2062
|
"div",
|
|
2072
2063
|
{
|
|
2073
|
-
...
|
|
2074
|
-
"aria-controls":
|
|
2064
|
+
...l,
|
|
2065
|
+
"aria-controls": u.valueControls,
|
|
2075
2066
|
"aria-disabled": n || void 0,
|
|
2076
2067
|
"aria-orientation": S,
|
|
2077
|
-
"aria-valuemax":
|
|
2078
|
-
"aria-valuemin":
|
|
2079
|
-
"aria-valuenow":
|
|
2068
|
+
"aria-valuemax": u.valueMax,
|
|
2069
|
+
"aria-valuemin": u.valueMin,
|
|
2070
|
+
"aria-valuenow": u.valueNow,
|
|
2080
2071
|
children: e,
|
|
2081
2072
|
className: t,
|
|
2082
2073
|
"data-separator": n ? "disabled" : m,
|
|
2083
|
-
"data-testid":
|
|
2084
|
-
id:
|
|
2074
|
+
"data-testid": r,
|
|
2075
|
+
id: r,
|
|
2085
2076
|
ref: x,
|
|
2086
2077
|
role: "separator",
|
|
2087
2078
|
style: {
|
|
2088
2079
|
flexBasis: "auto",
|
|
2089
|
-
cursor:
|
|
2090
|
-
...
|
|
2080
|
+
cursor: p,
|
|
2081
|
+
...s,
|
|
2091
2082
|
flexGrow: 0,
|
|
2092
2083
|
flexShrink: 0,
|
|
2093
2084
|
// Inform the browser that the library is handling touch events for this element
|
|
@@ -2107,7 +2098,7 @@ export {
|
|
|
2107
2098
|
nn as useDefaultLayout,
|
|
2108
2099
|
on as useGroupCallbackRef,
|
|
2109
2100
|
rn as useGroupRef,
|
|
2110
|
-
|
|
2111
|
-
|
|
2101
|
+
sn as usePanelCallbackRef,
|
|
2102
|
+
an as usePanelRef
|
|
2112
2103
|
};
|
|
2113
2104
|
//# sourceMappingURL=react-resizable-panels.js.map
|