react-resizable-panels 4.6.3 → 4.6.5
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,21 +1,21 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as te } from "react/jsx-runtime";
|
|
3
|
-
import { useState as ne, useCallback as Q, useId as
|
|
4
|
-
function
|
|
3
|
+
import { useState as ne, useCallback as Q, useId as rt, useLayoutEffect as Ae, useEffect as ue, useRef as O, createContext as st, useImperativeHandle as Ne, useMemo as _e, useSyncExternalStore as Fe, useContext as at } from "react";
|
|
4
|
+
function lt(e, t) {
|
|
5
5
|
const n = getComputedStyle(e), o = parseFloat(n.fontSize);
|
|
6
6
|
return t * o;
|
|
7
7
|
}
|
|
8
|
-
function
|
|
8
|
+
function ut(e, t) {
|
|
9
9
|
const n = getComputedStyle(e.ownerDocument.body), o = parseFloat(n.fontSize);
|
|
10
10
|
return t * o;
|
|
11
11
|
}
|
|
12
|
-
function
|
|
12
|
+
function ct(e) {
|
|
13
13
|
return e / 100 * window.innerHeight;
|
|
14
14
|
}
|
|
15
|
-
function
|
|
15
|
+
function ft(e) {
|
|
16
16
|
return e / 100 * window.innerWidth;
|
|
17
17
|
}
|
|
18
|
-
function
|
|
18
|
+
function dt(e) {
|
|
19
19
|
switch (typeof e) {
|
|
20
20
|
case "number":
|
|
21
21
|
return [e, "px"];
|
|
@@ -31,7 +31,7 @@ function re({
|
|
|
31
31
|
styleProp: n
|
|
32
32
|
}) {
|
|
33
33
|
let o;
|
|
34
|
-
const [i, s] =
|
|
34
|
+
const [i, s] = dt(n);
|
|
35
35
|
switch (s) {
|
|
36
36
|
case "%": {
|
|
37
37
|
o = i / 100 * e;
|
|
@@ -42,35 +42,35 @@ function re({
|
|
|
42
42
|
break;
|
|
43
43
|
}
|
|
44
44
|
case "rem": {
|
|
45
|
-
o =
|
|
45
|
+
o = ut(t, i);
|
|
46
46
|
break;
|
|
47
47
|
}
|
|
48
48
|
case "em": {
|
|
49
|
-
o =
|
|
49
|
+
o = lt(t, i);
|
|
50
50
|
break;
|
|
51
51
|
}
|
|
52
52
|
case "vh": {
|
|
53
|
-
o =
|
|
53
|
+
o = ct(i);
|
|
54
54
|
break;
|
|
55
55
|
}
|
|
56
56
|
case "vw": {
|
|
57
|
-
o =
|
|
57
|
+
o = ft(i);
|
|
58
58
|
break;
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
61
|
return o;
|
|
62
62
|
}
|
|
63
|
-
function
|
|
63
|
+
function _(e) {
|
|
64
64
|
return parseFloat(e.toFixed(3));
|
|
65
65
|
}
|
|
66
|
-
function
|
|
66
|
+
function J({
|
|
67
67
|
group: e
|
|
68
68
|
}) {
|
|
69
69
|
const { orientation: t, panels: n } = e;
|
|
70
70
|
return n.reduce((o, i) => (o += t === "horizontal" ? i.element.offsetWidth : i.element.offsetHeight, o), 0);
|
|
71
71
|
}
|
|
72
|
-
function
|
|
73
|
-
const { panels: t } = e, n =
|
|
72
|
+
function pe(e) {
|
|
73
|
+
const { panels: t } = e, n = J({ group: e });
|
|
74
74
|
return n === 0 ? t.map((o) => ({
|
|
75
75
|
collapsedSize: 0,
|
|
76
76
|
collapsible: o.panelConstraints.collapsible === !0,
|
|
@@ -88,7 +88,7 @@ function de(e) {
|
|
|
88
88
|
panelElement: i,
|
|
89
89
|
styleProp: s.collapsedSize
|
|
90
90
|
});
|
|
91
|
-
l =
|
|
91
|
+
l = _(c / n * 100);
|
|
92
92
|
}
|
|
93
93
|
let r;
|
|
94
94
|
if (s.defaultSize !== void 0) {
|
|
@@ -97,7 +97,7 @@ function de(e) {
|
|
|
97
97
|
panelElement: i,
|
|
98
98
|
styleProp: s.defaultSize
|
|
99
99
|
});
|
|
100
|
-
r =
|
|
100
|
+
r = _(c / n * 100);
|
|
101
101
|
}
|
|
102
102
|
let a = 0;
|
|
103
103
|
if (s.minSize !== void 0) {
|
|
@@ -106,7 +106,7 @@ function de(e) {
|
|
|
106
106
|
panelElement: i,
|
|
107
107
|
styleProp: s.minSize
|
|
108
108
|
});
|
|
109
|
-
a =
|
|
109
|
+
a = _(c / n * 100);
|
|
110
110
|
}
|
|
111
111
|
let u = 100;
|
|
112
112
|
if (s.maxSize !== void 0) {
|
|
@@ -115,7 +115,7 @@ function de(e) {
|
|
|
115
115
|
panelElement: i,
|
|
116
116
|
styleProp: s.maxSize
|
|
117
117
|
});
|
|
118
|
-
u =
|
|
118
|
+
u = _(c / n * 100);
|
|
119
119
|
}
|
|
120
120
|
return {
|
|
121
121
|
collapsedSize: l,
|
|
@@ -128,20 +128,20 @@ function de(e) {
|
|
|
128
128
|
};
|
|
129
129
|
});
|
|
130
130
|
}
|
|
131
|
-
function
|
|
131
|
+
function P(e, t = "Assertion error") {
|
|
132
132
|
if (!e)
|
|
133
133
|
throw Error(t);
|
|
134
134
|
}
|
|
135
|
-
function
|
|
135
|
+
function he(e, t) {
|
|
136
136
|
return Array.from(t).sort(
|
|
137
|
-
e === "horizontal" ?
|
|
137
|
+
e === "horizontal" ? pt : ht
|
|
138
138
|
);
|
|
139
139
|
}
|
|
140
|
-
function
|
|
140
|
+
function pt(e, t) {
|
|
141
141
|
const n = e.element.offsetLeft - t.element.offsetLeft;
|
|
142
142
|
return n !== 0 ? n : e.element.offsetWidth - t.element.offsetWidth;
|
|
143
143
|
}
|
|
144
|
-
function
|
|
144
|
+
function ht(e, t) {
|
|
145
145
|
const n = e.element.offsetTop - t.element.offsetTop;
|
|
146
146
|
return n !== 0 ? n : e.element.offsetHeight - t.element.offsetHeight;
|
|
147
147
|
}
|
|
@@ -160,7 +160,7 @@ function He(e, t) {
|
|
|
160
160
|
)
|
|
161
161
|
};
|
|
162
162
|
}
|
|
163
|
-
function
|
|
163
|
+
function mt({
|
|
164
164
|
orientation: e,
|
|
165
165
|
rects: t,
|
|
166
166
|
targetRect: n
|
|
@@ -174,45 +174,45 @@ function pt({
|
|
|
174
174
|
const { x: r, y: a } = He(o, l), u = e === "horizontal" ? r : a;
|
|
175
175
|
u < s && (s = u, i = l);
|
|
176
176
|
}
|
|
177
|
-
return
|
|
177
|
+
return P(i, "No rect found"), i;
|
|
178
178
|
}
|
|
179
179
|
let se;
|
|
180
|
-
function
|
|
180
|
+
function gt() {
|
|
181
181
|
return se === void 0 && (typeof matchMedia == "function" ? se = !!matchMedia("(pointer:coarse)").matches : se = !1), se;
|
|
182
182
|
}
|
|
183
183
|
function Ve(e) {
|
|
184
|
-
const { element: t, orientation: n, panels: o, separators: i } = e, s =
|
|
184
|
+
const { element: t, orientation: n, panels: o, separators: i } = e, s = he(
|
|
185
185
|
n,
|
|
186
|
-
Array.from(t.children).filter($e).map((
|
|
187
|
-
).map(({ element:
|
|
188
|
-
let r = !1, a = !1, u = -1, c = -1, g = 0,
|
|
186
|
+
Array.from(t.children).filter($e).map((m) => ({ element: m }))
|
|
187
|
+
).map(({ element: m }) => m), l = [];
|
|
188
|
+
let r = !1, a = !1, u = -1, c = -1, g = 0, b, S = [];
|
|
189
189
|
{
|
|
190
|
-
let
|
|
190
|
+
let m = -1;
|
|
191
191
|
for (const d of s)
|
|
192
|
-
d.hasAttribute("data-panel") && (
|
|
192
|
+
d.hasAttribute("data-panel") && (m++, d.ariaDisabled === null && (g++, u === -1 && (u = m), c = m));
|
|
193
193
|
}
|
|
194
194
|
if (g > 1) {
|
|
195
|
-
let
|
|
195
|
+
let m = -1;
|
|
196
196
|
for (const d of s)
|
|
197
197
|
if (d.hasAttribute("data-panel")) {
|
|
198
|
-
|
|
198
|
+
m++;
|
|
199
199
|
const f = o.find(
|
|
200
|
-
(
|
|
200
|
+
(h) => h.element === d
|
|
201
201
|
);
|
|
202
202
|
if (f) {
|
|
203
|
-
if (
|
|
204
|
-
const
|
|
203
|
+
if (b) {
|
|
204
|
+
const h = b.element.getBoundingClientRect(), v = d.getBoundingClientRect();
|
|
205
205
|
let x;
|
|
206
206
|
if (a) {
|
|
207
207
|
const y = n === "horizontal" ? new DOMRect(
|
|
208
|
-
|
|
209
|
-
|
|
208
|
+
h.right,
|
|
209
|
+
h.top,
|
|
210
210
|
0,
|
|
211
|
-
|
|
211
|
+
h.height
|
|
212
212
|
) : new DOMRect(
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
213
|
+
h.left,
|
|
214
|
+
h.bottom,
|
|
215
|
+
h.width,
|
|
216
216
|
0
|
|
217
217
|
), p = n === "horizontal" ? new DOMRect(v.left, v.top, 0, v.height) : new DOMRect(v.left, v.top, v.width, 0);
|
|
218
218
|
switch (S.length) {
|
|
@@ -224,14 +224,14 @@ function Ve(e) {
|
|
|
224
224
|
break;
|
|
225
225
|
}
|
|
226
226
|
case 1: {
|
|
227
|
-
const w = S[0], C =
|
|
227
|
+
const w = S[0], C = mt({
|
|
228
228
|
orientation: n,
|
|
229
|
-
rects: [
|
|
229
|
+
rects: [h, v],
|
|
230
230
|
targetRect: w.element.getBoundingClientRect()
|
|
231
231
|
});
|
|
232
232
|
x = [
|
|
233
233
|
w,
|
|
234
|
-
C ===
|
|
234
|
+
C === h ? p : y
|
|
235
235
|
];
|
|
236
236
|
break;
|
|
237
237
|
}
|
|
@@ -243,20 +243,20 @@ function Ve(e) {
|
|
|
243
243
|
} else
|
|
244
244
|
S.length ? x = S : x = [
|
|
245
245
|
n === "horizontal" ? new DOMRect(
|
|
246
|
-
|
|
246
|
+
h.right,
|
|
247
247
|
v.top,
|
|
248
|
-
v.left -
|
|
248
|
+
v.left - h.right,
|
|
249
249
|
v.height
|
|
250
250
|
) : new DOMRect(
|
|
251
251
|
v.left,
|
|
252
|
-
|
|
252
|
+
h.bottom,
|
|
253
253
|
v.width,
|
|
254
|
-
v.top -
|
|
254
|
+
v.top - h.bottom
|
|
255
255
|
)
|
|
256
256
|
];
|
|
257
257
|
for (const y of x) {
|
|
258
258
|
let p = "width" in y ? y : y.element.getBoundingClientRect();
|
|
259
|
-
const w =
|
|
259
|
+
const w = gt() ? e.resizeTargetMinimumSize.coarse : e.resizeTargetMinimumSize.fine;
|
|
260
260
|
if (p.width < w) {
|
|
261
261
|
const R = w - p.width;
|
|
262
262
|
p = new DOMRect(
|
|
@@ -275,30 +275,30 @@ function Ve(e) {
|
|
|
275
275
|
p.height + R
|
|
276
276
|
);
|
|
277
277
|
}
|
|
278
|
-
const C =
|
|
278
|
+
const C = m <= u || m > c;
|
|
279
279
|
!r && !C && l.push({
|
|
280
280
|
group: e,
|
|
281
|
-
groupSize:
|
|
282
|
-
panels: [
|
|
281
|
+
groupSize: J({ group: e }),
|
|
282
|
+
panels: [b, f],
|
|
283
283
|
separator: "width" in y ? void 0 : y,
|
|
284
284
|
rect: p
|
|
285
285
|
}), r = !1;
|
|
286
286
|
}
|
|
287
287
|
}
|
|
288
|
-
a = !1,
|
|
288
|
+
a = !1, b = f, S = [];
|
|
289
289
|
}
|
|
290
290
|
} else if (d.hasAttribute("data-separator")) {
|
|
291
291
|
d.ariaDisabled !== null && (r = !0);
|
|
292
292
|
const f = i.find(
|
|
293
|
-
(
|
|
293
|
+
(h) => h.element === d
|
|
294
294
|
);
|
|
295
|
-
f ? S.push(f) : (
|
|
295
|
+
f ? S.push(f) : (b = void 0, S = []);
|
|
296
296
|
} else
|
|
297
297
|
a = !0;
|
|
298
298
|
}
|
|
299
299
|
return l;
|
|
300
300
|
}
|
|
301
|
-
class
|
|
301
|
+
class yt {
|
|
302
302
|
#e = {};
|
|
303
303
|
addListener(t, n) {
|
|
304
304
|
const o = this.#e[t];
|
|
@@ -337,8 +337,8 @@ class ht {
|
|
|
337
337
|
}
|
|
338
338
|
}
|
|
339
339
|
}
|
|
340
|
-
function
|
|
341
|
-
return Math.abs(
|
|
340
|
+
function k(e, t, n = 0) {
|
|
341
|
+
return Math.abs(_(e) - _(t)) <= n;
|
|
342
342
|
}
|
|
343
343
|
let A = {
|
|
344
344
|
cursorFlags: 0,
|
|
@@ -347,11 +347,11 @@ let A = {
|
|
|
347
347
|
},
|
|
348
348
|
mountedGroups: /* @__PURE__ */ new Map()
|
|
349
349
|
};
|
|
350
|
-
const
|
|
351
|
-
function
|
|
350
|
+
const $ = new yt();
|
|
351
|
+
function G() {
|
|
352
352
|
return A;
|
|
353
353
|
}
|
|
354
|
-
function
|
|
354
|
+
function I(e) {
|
|
355
355
|
const t = typeof e == "function" ? e(A) : e;
|
|
356
356
|
if (A === t)
|
|
357
357
|
return A;
|
|
@@ -359,15 +359,15 @@ function G(e) {
|
|
|
359
359
|
return A = {
|
|
360
360
|
...A,
|
|
361
361
|
...t
|
|
362
|
-
}, t.cursorFlags !== void 0 &&
|
|
362
|
+
}, t.cursorFlags !== void 0 && $.emit("cursorFlagsChange", A.cursorFlags), t.interactionState !== void 0 && $.emit("interactionStateChange", A.interactionState), t.mountedGroups !== void 0 && (A.mountedGroups.forEach((o, i) => {
|
|
363
363
|
o.derivedPanelConstraints.forEach((s) => {
|
|
364
364
|
if (s.collapsible) {
|
|
365
365
|
const { layout: l } = n.mountedGroups.get(i) ?? {};
|
|
366
366
|
if (l) {
|
|
367
|
-
const r =
|
|
367
|
+
const r = k(
|
|
368
368
|
s.collapsedSize,
|
|
369
369
|
o.layout[s.panelId]
|
|
370
|
-
), a =
|
|
370
|
+
), a = k(
|
|
371
371
|
s.collapsedSize,
|
|
372
372
|
l[s.panelId]
|
|
373
373
|
);
|
|
@@ -375,9 +375,9 @@ function G(e) {
|
|
|
375
375
|
}
|
|
376
376
|
}
|
|
377
377
|
});
|
|
378
|
-
}),
|
|
378
|
+
}), $.emit("mountedGroupsChange", A.mountedGroups)), A;
|
|
379
379
|
}
|
|
380
|
-
function
|
|
380
|
+
function St(e, t, n) {
|
|
381
381
|
let o, i = {
|
|
382
382
|
x: 1 / 0,
|
|
383
383
|
y: 1 / 0
|
|
@@ -400,10 +400,10 @@ function gt(e, t, n) {
|
|
|
400
400
|
hitRegion: o
|
|
401
401
|
} : void 0;
|
|
402
402
|
}
|
|
403
|
-
function
|
|
403
|
+
function vt(e) {
|
|
404
404
|
return e !== null && typeof e == "object" && "nodeType" in e && e.nodeType === Node.DOCUMENT_FRAGMENT_NODE;
|
|
405
405
|
}
|
|
406
|
-
function
|
|
406
|
+
function xt(e, t) {
|
|
407
407
|
if (e === t) throw new Error("Cannot compare node with itself");
|
|
408
408
|
const n = {
|
|
409
409
|
a: we(e),
|
|
@@ -412,7 +412,7 @@ function St(e, t) {
|
|
|
412
412
|
let o;
|
|
413
413
|
for (; n.a.at(-1) === n.b.at(-1); )
|
|
414
414
|
o = n.a.pop(), n.b.pop();
|
|
415
|
-
|
|
415
|
+
P(
|
|
416
416
|
o,
|
|
417
417
|
"Stacking order can only be calculated for elements with a common ancestor"
|
|
418
418
|
);
|
|
@@ -434,20 +434,20 @@ function St(e, t) {
|
|
|
434
434
|
}
|
|
435
435
|
return Math.sign(i.a - i.b);
|
|
436
436
|
}
|
|
437
|
-
const
|
|
438
|
-
function
|
|
437
|
+
const zt = /\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;
|
|
438
|
+
function bt(e) {
|
|
439
439
|
const t = getComputedStyle(je(e) ?? e).display;
|
|
440
440
|
return t === "flex" || t === "inline-flex";
|
|
441
441
|
}
|
|
442
|
-
function
|
|
442
|
+
function wt(e) {
|
|
443
443
|
const t = getComputedStyle(e);
|
|
444
|
-
return !!(t.position === "fixed" || t.zIndex !== "auto" && (t.position !== "static" ||
|
|
444
|
+
return !!(t.position === "fixed" || t.zIndex !== "auto" && (t.position !== "static" || bt(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" || zt.test(t.willChange) || t.webkitOverflowScrolling === "touch");
|
|
445
445
|
}
|
|
446
446
|
function ze(e) {
|
|
447
447
|
let t = e.length;
|
|
448
448
|
for (; t--; ) {
|
|
449
449
|
const n = e[t];
|
|
450
|
-
if (
|
|
450
|
+
if (P(n, "Missing node"), wt(n)) return n;
|
|
451
451
|
}
|
|
452
452
|
return null;
|
|
453
453
|
}
|
|
@@ -462,24 +462,24 @@ function we(e) {
|
|
|
462
462
|
}
|
|
463
463
|
function je(e) {
|
|
464
464
|
const { parentNode: t } = e;
|
|
465
|
-
return
|
|
465
|
+
return vt(t) ? t.host : t;
|
|
466
466
|
}
|
|
467
|
-
function
|
|
467
|
+
function Lt(e, t) {
|
|
468
468
|
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;
|
|
469
469
|
}
|
|
470
|
-
function
|
|
470
|
+
function Pt({
|
|
471
471
|
groupElement: e,
|
|
472
472
|
hitRegion: t,
|
|
473
473
|
pointerEventTarget: n
|
|
474
474
|
}) {
|
|
475
475
|
if (!$e(n) || n.contains(e) || e.contains(n))
|
|
476
476
|
return !0;
|
|
477
|
-
if (
|
|
477
|
+
if (xt(n, e) > 0) {
|
|
478
478
|
let o = n;
|
|
479
479
|
for (; o; ) {
|
|
480
480
|
if (o.contains(e))
|
|
481
481
|
return !0;
|
|
482
|
-
if (
|
|
482
|
+
if (Lt(o.getBoundingClientRect(), t))
|
|
483
483
|
return !1;
|
|
484
484
|
o = o.parentElement;
|
|
485
485
|
}
|
|
@@ -491,18 +491,18 @@ function me(e, t) {
|
|
|
491
491
|
return t.forEach((o, i) => {
|
|
492
492
|
if (i.disabled)
|
|
493
493
|
return;
|
|
494
|
-
const s = Ve(i), l =
|
|
494
|
+
const s = Ve(i), l = St(i.orientation, s, {
|
|
495
495
|
x: e.clientX,
|
|
496
496
|
y: e.clientY
|
|
497
497
|
});
|
|
498
|
-
l && l.distance.x <= 0 && l.distance.y <= 0 &&
|
|
498
|
+
l && l.distance.x <= 0 && l.distance.y <= 0 && Pt({
|
|
499
499
|
groupElement: i.element,
|
|
500
500
|
hitRegion: l.hitRegion.rect,
|
|
501
501
|
pointerEventTarget: e.target
|
|
502
502
|
}) && n.push(l.hitRegion);
|
|
503
503
|
}), n;
|
|
504
504
|
}
|
|
505
|
-
function
|
|
505
|
+
function Ct(e, t) {
|
|
506
506
|
if (e.length !== t.length)
|
|
507
507
|
return !1;
|
|
508
508
|
for (let n = 0; n < e.length; n++)
|
|
@@ -510,10 +510,10 @@ function Lt(e, t) {
|
|
|
510
510
|
return !1;
|
|
511
511
|
return !0;
|
|
512
512
|
}
|
|
513
|
-
function
|
|
514
|
-
return
|
|
513
|
+
function F(e, t) {
|
|
514
|
+
return k(e, t) ? 0 : e > t ? 1 : -1;
|
|
515
515
|
}
|
|
516
|
-
function
|
|
516
|
+
function Y({
|
|
517
517
|
overrideDisabledPanels: e,
|
|
518
518
|
panelConstraints: t,
|
|
519
519
|
prevSize: n,
|
|
@@ -528,13 +528,13 @@ function q({
|
|
|
528
528
|
} = t;
|
|
529
529
|
if (l && !e)
|
|
530
530
|
return n;
|
|
531
|
-
if (
|
|
531
|
+
if (F(o, a) < 0)
|
|
532
532
|
if (s) {
|
|
533
533
|
const u = (i + a) / 2;
|
|
534
|
-
|
|
534
|
+
F(o, u) < 0 ? o = i : o = a;
|
|
535
535
|
} else
|
|
536
536
|
o = a;
|
|
537
|
-
return o = Math.min(r, o), o =
|
|
537
|
+
return o = Math.min(r, o), o = _(o), o;
|
|
538
538
|
}
|
|
539
539
|
function oe({
|
|
540
540
|
delta: e,
|
|
@@ -544,54 +544,54 @@ function oe({
|
|
|
544
544
|
prevLayout: i,
|
|
545
545
|
trigger: s
|
|
546
546
|
}) {
|
|
547
|
-
if (
|
|
547
|
+
if (k(e, 0))
|
|
548
548
|
return t;
|
|
549
549
|
const l = s === "imperative-api", r = Object.values(t), a = Object.values(i), u = [...r], [c, g] = o;
|
|
550
|
-
|
|
551
|
-
let
|
|
550
|
+
P(c != null, "Invalid first pivot index"), P(g != null, "Invalid second pivot index");
|
|
551
|
+
let b = 0;
|
|
552
552
|
switch (s) {
|
|
553
553
|
case "keyboard": {
|
|
554
554
|
{
|
|
555
555
|
const d = e < 0 ? g : c, f = n[d];
|
|
556
|
-
|
|
556
|
+
P(
|
|
557
557
|
f,
|
|
558
558
|
`Panel constraints not found for index ${d}`
|
|
559
559
|
);
|
|
560
560
|
const {
|
|
561
|
-
collapsedSize:
|
|
561
|
+
collapsedSize: h = 0,
|
|
562
562
|
collapsible: v,
|
|
563
563
|
minSize: x = 0
|
|
564
564
|
} = f;
|
|
565
565
|
if (v) {
|
|
566
566
|
const y = r[d];
|
|
567
|
-
if (
|
|
567
|
+
if (P(
|
|
568
568
|
y != null,
|
|
569
569
|
`Previous layout not found for panel index ${d}`
|
|
570
|
-
),
|
|
570
|
+
), k(y, h)) {
|
|
571
571
|
const p = x - y;
|
|
572
|
-
|
|
572
|
+
F(p, Math.abs(e)) > 0 && (e = e < 0 ? 0 - p : p);
|
|
573
573
|
}
|
|
574
574
|
}
|
|
575
575
|
}
|
|
576
576
|
{
|
|
577
577
|
const d = e < 0 ? c : g, f = n[d];
|
|
578
|
-
|
|
578
|
+
P(
|
|
579
579
|
f,
|
|
580
580
|
`No panel constraints found for index ${d}`
|
|
581
581
|
);
|
|
582
582
|
const {
|
|
583
|
-
collapsedSize:
|
|
583
|
+
collapsedSize: h = 0,
|
|
584
584
|
collapsible: v,
|
|
585
585
|
minSize: x = 0
|
|
586
586
|
} = f;
|
|
587
587
|
if (v) {
|
|
588
588
|
const y = r[d];
|
|
589
|
-
if (
|
|
589
|
+
if (P(
|
|
590
590
|
y != null,
|
|
591
591
|
`Previous layout not found for panel index ${d}`
|
|
592
|
-
),
|
|
593
|
-
const p = y -
|
|
594
|
-
|
|
592
|
+
), k(y, x)) {
|
|
593
|
+
const p = y - h;
|
|
594
|
+
F(p, Math.abs(e)) > 0 && (e = e < 0 ? 0 - p : p);
|
|
595
595
|
}
|
|
596
596
|
}
|
|
597
597
|
}
|
|
@@ -599,93 +599,93 @@ function oe({
|
|
|
599
599
|
}
|
|
600
600
|
default: {
|
|
601
601
|
const d = e < 0 ? g : c, f = n[d];
|
|
602
|
-
|
|
602
|
+
P(
|
|
603
603
|
f,
|
|
604
604
|
`Panel constraints not found for index ${d}`
|
|
605
605
|
);
|
|
606
|
-
const
|
|
607
|
-
if (v &&
|
|
606
|
+
const h = r[d], { collapsible: v, collapsedSize: x, minSize: y } = f;
|
|
607
|
+
if (v && F(h, y) < 0)
|
|
608
608
|
if (e > 0) {
|
|
609
|
-
const p = y - x, w = p / 2, C =
|
|
610
|
-
|
|
609
|
+
const p = y - x, w = p / 2, C = h + e;
|
|
610
|
+
F(C, y) < 0 && (e = F(e, w) <= 0 ? 0 : p);
|
|
611
611
|
} else {
|
|
612
|
-
const p = y - x, w = 100 - p / 2, C =
|
|
613
|
-
|
|
612
|
+
const p = y - x, w = 100 - p / 2, C = h - e;
|
|
613
|
+
F(C, y) < 0 && (e = F(100 + e, w) > 0 ? 0 : -p);
|
|
614
614
|
}
|
|
615
615
|
break;
|
|
616
616
|
}
|
|
617
617
|
}
|
|
618
618
|
{
|
|
619
619
|
const d = e < 0 ? 1 : -1;
|
|
620
|
-
let f = e < 0 ? g : c,
|
|
620
|
+
let f = e < 0 ? g : c, h = 0;
|
|
621
621
|
for (; ; ) {
|
|
622
622
|
const x = r[f];
|
|
623
|
-
|
|
623
|
+
P(
|
|
624
624
|
x != null,
|
|
625
625
|
`Previous layout not found for panel index ${f}`
|
|
626
626
|
);
|
|
627
|
-
const p =
|
|
627
|
+
const p = Y({
|
|
628
628
|
overrideDisabledPanels: l,
|
|
629
629
|
panelConstraints: n[f],
|
|
630
630
|
prevSize: x,
|
|
631
631
|
size: 100
|
|
632
632
|
}) - x;
|
|
633
|
-
if (
|
|
633
|
+
if (h += p, f += d, f < 0 || f >= n.length)
|
|
634
634
|
break;
|
|
635
635
|
}
|
|
636
|
-
const v = Math.min(Math.abs(e), Math.abs(
|
|
636
|
+
const v = Math.min(Math.abs(e), Math.abs(h));
|
|
637
637
|
e = e < 0 ? 0 - v : v;
|
|
638
638
|
}
|
|
639
639
|
{
|
|
640
640
|
let f = e < 0 ? c : g;
|
|
641
641
|
for (; f >= 0 && f < n.length; ) {
|
|
642
|
-
const
|
|
643
|
-
|
|
642
|
+
const h = Math.abs(e) - Math.abs(b), v = r[f];
|
|
643
|
+
P(
|
|
644
644
|
v != null,
|
|
645
645
|
`Previous layout not found for panel index ${f}`
|
|
646
646
|
);
|
|
647
|
-
const x = v -
|
|
647
|
+
const x = v - h, y = Y({
|
|
648
648
|
overrideDisabledPanels: l,
|
|
649
649
|
panelConstraints: n[f],
|
|
650
650
|
prevSize: v,
|
|
651
651
|
size: x
|
|
652
652
|
});
|
|
653
|
-
if (!
|
|
653
|
+
if (!k(v, y) && (b += v - y, u[f] = y, b.toFixed(3).localeCompare(Math.abs(e).toFixed(3), void 0, {
|
|
654
654
|
numeric: !0
|
|
655
655
|
}) >= 0))
|
|
656
656
|
break;
|
|
657
657
|
e < 0 ? f-- : f++;
|
|
658
658
|
}
|
|
659
659
|
}
|
|
660
|
-
if (
|
|
660
|
+
if (Ct(a, u))
|
|
661
661
|
return i;
|
|
662
662
|
{
|
|
663
663
|
const d = e < 0 ? g : c, f = r[d];
|
|
664
|
-
|
|
664
|
+
P(
|
|
665
665
|
f != null,
|
|
666
666
|
`Previous layout not found for panel index ${d}`
|
|
667
667
|
);
|
|
668
|
-
const
|
|
668
|
+
const h = f + b, v = Y({
|
|
669
669
|
overrideDisabledPanels: l,
|
|
670
670
|
panelConstraints: n[d],
|
|
671
671
|
prevSize: f,
|
|
672
|
-
size:
|
|
672
|
+
size: h
|
|
673
673
|
});
|
|
674
|
-
if (u[d] = v, !
|
|
675
|
-
let x =
|
|
674
|
+
if (u[d] = v, !k(v, h)) {
|
|
675
|
+
let x = h - v, p = e < 0 ? g : c;
|
|
676
676
|
for (; p >= 0 && p < n.length; ) {
|
|
677
677
|
const w = u[p];
|
|
678
|
-
|
|
678
|
+
P(
|
|
679
679
|
w != null,
|
|
680
680
|
`Previous layout not found for panel index ${p}`
|
|
681
681
|
);
|
|
682
|
-
const C = w + x, R =
|
|
682
|
+
const C = w + x, R = Y({
|
|
683
683
|
overrideDisabledPanels: l,
|
|
684
684
|
panelConstraints: n[p],
|
|
685
685
|
prevSize: w,
|
|
686
686
|
size: C
|
|
687
687
|
});
|
|
688
|
-
if (
|
|
688
|
+
if (k(w, R) || (x -= R - w, u[p] = R), k(x, 0))
|
|
689
689
|
break;
|
|
690
690
|
e > 0 ? p-- : p++;
|
|
691
691
|
}
|
|
@@ -695,16 +695,16 @@ function oe({
|
|
|
695
695
|
(d, f) => f + d,
|
|
696
696
|
0
|
|
697
697
|
);
|
|
698
|
-
if (!
|
|
698
|
+
if (!k(S, 100, 0.1))
|
|
699
699
|
return i;
|
|
700
|
-
const
|
|
701
|
-
return u.reduce((d, f,
|
|
700
|
+
const m = Object.keys(i);
|
|
701
|
+
return u.reduce((d, f, h) => (d[m[h]] = f, d), {});
|
|
702
702
|
}
|
|
703
703
|
function U(e, t) {
|
|
704
704
|
if (Object.keys(e).length !== Object.keys(t).length)
|
|
705
705
|
return !1;
|
|
706
706
|
for (const n in e)
|
|
707
|
-
if (t[n] === void 0 ||
|
|
707
|
+
if (t[n] === void 0 || F(e[n], t[n]) !== 0)
|
|
708
708
|
return !1;
|
|
709
709
|
return !0;
|
|
710
710
|
}
|
|
@@ -720,20 +720,20 @@ function B({
|
|
|
720
720
|
throw Error(
|
|
721
721
|
`Invalid ${t.length} panel layout: ${o.map((r) => `${r}%`).join(", ")}`
|
|
722
722
|
);
|
|
723
|
-
if (!
|
|
723
|
+
if (!k(i, 100) && o.length > 0)
|
|
724
724
|
for (let r = 0; r < t.length; r++) {
|
|
725
725
|
const a = o[r];
|
|
726
|
-
|
|
726
|
+
P(a != null, `No layout data found for index ${r}`);
|
|
727
727
|
const u = 100 / i * a;
|
|
728
728
|
o[r] = u;
|
|
729
729
|
}
|
|
730
730
|
let s = 0;
|
|
731
731
|
for (let r = 0; r < t.length; r++) {
|
|
732
732
|
const a = n[r];
|
|
733
|
-
|
|
733
|
+
P(a != null, `No layout data found for index ${r}`);
|
|
734
734
|
const u = o[r];
|
|
735
|
-
|
|
736
|
-
const c =
|
|
735
|
+
P(u != null, `No layout data found for index ${r}`);
|
|
736
|
+
const c = Y({
|
|
737
737
|
overrideDisabledPanels: !0,
|
|
738
738
|
panelConstraints: t[r],
|
|
739
739
|
prevSize: a,
|
|
@@ -741,17 +741,17 @@ function B({
|
|
|
741
741
|
});
|
|
742
742
|
u != c && (s += u - c, o[r] = c);
|
|
743
743
|
}
|
|
744
|
-
if (!
|
|
744
|
+
if (!k(s, 0))
|
|
745
745
|
for (let r = 0; r < t.length; r++) {
|
|
746
746
|
const a = o[r];
|
|
747
|
-
|
|
748
|
-
const u = a + s, c =
|
|
747
|
+
P(a != null, `No layout data found for index ${r}`);
|
|
748
|
+
const u = a + s, c = Y({
|
|
749
749
|
overrideDisabledPanels: !0,
|
|
750
750
|
panelConstraints: t[r],
|
|
751
751
|
prevSize: a,
|
|
752
752
|
size: u
|
|
753
753
|
});
|
|
754
|
-
if (a !== c && (s -= c - a, o[r] = c,
|
|
754
|
+
if (a !== c && (s -= c - a, o[r] = c, k(s, 0)))
|
|
755
755
|
break;
|
|
756
756
|
}
|
|
757
757
|
const l = Object.keys(e);
|
|
@@ -762,14 +762,14 @@ function We({
|
|
|
762
762
|
panelId: t
|
|
763
763
|
}) {
|
|
764
764
|
const n = () => {
|
|
765
|
-
const { mountedGroups: r } =
|
|
765
|
+
const { mountedGroups: r } = G();
|
|
766
766
|
for (const [
|
|
767
767
|
a,
|
|
768
768
|
{
|
|
769
769
|
defaultLayoutDeferred: u,
|
|
770
770
|
derivedPanelConstraints: c,
|
|
771
771
|
layout: g,
|
|
772
|
-
separatorToPanels:
|
|
772
|
+
separatorToPanels: b
|
|
773
773
|
}
|
|
774
774
|
] of r)
|
|
775
775
|
if (a.id === e)
|
|
@@ -778,7 +778,7 @@ function We({
|
|
|
778
778
|
derivedPanelConstraints: c,
|
|
779
779
|
group: a,
|
|
780
780
|
layout: g,
|
|
781
|
-
separatorToPanels:
|
|
781
|
+
separatorToPanels: b
|
|
782
782
|
};
|
|
783
783
|
throw Error(`Group ${e} not found`);
|
|
784
784
|
}, o = () => {
|
|
@@ -806,24 +806,24 @@ function We({
|
|
|
806
806
|
defaultLayoutDeferred: u,
|
|
807
807
|
derivedPanelConstraints: c,
|
|
808
808
|
group: g,
|
|
809
|
-
layout:
|
|
809
|
+
layout: b,
|
|
810
810
|
separatorToPanels: S
|
|
811
|
-
} = n(),
|
|
811
|
+
} = n(), m = g.panels.findIndex((v) => v.id === t), d = m === g.panels.length - 1, f = oe({
|
|
812
812
|
delta: d ? a - r : r - a,
|
|
813
|
-
initialLayout:
|
|
813
|
+
initialLayout: b,
|
|
814
814
|
panelConstraints: c,
|
|
815
|
-
pivotIndices: d ? [
|
|
816
|
-
prevLayout:
|
|
815
|
+
pivotIndices: d ? [m - 1, m] : [m, m + 1],
|
|
816
|
+
prevLayout: b,
|
|
817
817
|
trigger: "imperative-api"
|
|
818
|
-
}),
|
|
818
|
+
}), h = B({
|
|
819
819
|
layout: f,
|
|
820
820
|
panelConstraints: c
|
|
821
821
|
});
|
|
822
|
-
U(
|
|
822
|
+
U(b, h) || I((v) => ({
|
|
823
823
|
mountedGroups: new Map(v.mountedGroups).set(g, {
|
|
824
824
|
defaultLayoutDeferred: u,
|
|
825
825
|
derivedPanelConstraints: c,
|
|
826
|
-
layout:
|
|
826
|
+
layout: h,
|
|
827
827
|
separatorToPanels: S
|
|
828
828
|
})
|
|
829
829
|
}));
|
|
@@ -836,8 +836,8 @@ function We({
|
|
|
836
836
|
expand: () => {
|
|
837
837
|
const { collapsible: r, collapsedSize: a, minSize: u } = o(), { mutableValues: c } = i(), g = s();
|
|
838
838
|
if (r && g === a) {
|
|
839
|
-
let
|
|
840
|
-
|
|
839
|
+
let b = c.expandToSize ?? u;
|
|
840
|
+
b === 0 && (b = 1), l(b);
|
|
841
841
|
}
|
|
842
842
|
},
|
|
843
843
|
getSize: () => {
|
|
@@ -849,15 +849,15 @@ function We({
|
|
|
849
849
|
},
|
|
850
850
|
isCollapsed: () => {
|
|
851
851
|
const { collapsible: r, collapsedSize: a } = o(), u = s();
|
|
852
|
-
return r &&
|
|
852
|
+
return r && k(a, u);
|
|
853
853
|
},
|
|
854
854
|
resize: (r) => {
|
|
855
855
|
if (s() !== r) {
|
|
856
856
|
let u;
|
|
857
857
|
switch (typeof r) {
|
|
858
858
|
case "number": {
|
|
859
|
-
const { group: c } = n(), g =
|
|
860
|
-
u =
|
|
859
|
+
const { group: c } = n(), g = J({ group: c });
|
|
860
|
+
u = _(r / g * 100);
|
|
861
861
|
break;
|
|
862
862
|
}
|
|
863
863
|
case "string": {
|
|
@@ -873,7 +873,7 @@ function We({
|
|
|
873
873
|
function Le(e) {
|
|
874
874
|
if (e.defaultPrevented)
|
|
875
875
|
return;
|
|
876
|
-
const { mountedGroups: t } =
|
|
876
|
+
const { mountedGroups: t } = G();
|
|
877
877
|
me(e, t).forEach((o) => {
|
|
878
878
|
if (o.separator) {
|
|
879
879
|
const i = o.panels.find(
|
|
@@ -890,7 +890,7 @@ function Le(e) {
|
|
|
890
890
|
});
|
|
891
891
|
}
|
|
892
892
|
function le(e) {
|
|
893
|
-
const { mountedGroups: t } =
|
|
893
|
+
const { mountedGroups: t } = G();
|
|
894
894
|
for (const [n] of t)
|
|
895
895
|
if (n.separators.some(
|
|
896
896
|
(o) => o.element === e
|
|
@@ -902,7 +902,7 @@ function Ue({
|
|
|
902
902
|
groupId: e
|
|
903
903
|
}) {
|
|
904
904
|
const t = () => {
|
|
905
|
-
const { mountedGroups: n } =
|
|
905
|
+
const { mountedGroups: n } = G();
|
|
906
906
|
for (const [o, i] of n)
|
|
907
907
|
if (o.id === e)
|
|
908
908
|
return { group: o, ...i };
|
|
@@ -924,35 +924,28 @@ function Ue({
|
|
|
924
924
|
layout: n,
|
|
925
925
|
panelConstraints: i
|
|
926
926
|
});
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
separatorToPanels: r
|
|
936
|
-
})
|
|
937
|
-
}));
|
|
938
|
-
const u = s.panels.map(({ id: c }) => c).join(",");
|
|
939
|
-
s.inMemoryLayouts[u] = a;
|
|
940
|
-
}
|
|
941
|
-
return a;
|
|
927
|
+
return o ? l : (U(l, a) || I((u) => ({
|
|
928
|
+
mountedGroups: new Map(u.mountedGroups).set(s, {
|
|
929
|
+
defaultLayoutDeferred: o,
|
|
930
|
+
derivedPanelConstraints: i,
|
|
931
|
+
layout: a,
|
|
932
|
+
separatorToPanels: r
|
|
933
|
+
})
|
|
934
|
+
})), a);
|
|
942
935
|
}
|
|
943
936
|
};
|
|
944
937
|
}
|
|
945
938
|
function Be(e) {
|
|
946
|
-
const { mountedGroups: t } =
|
|
947
|
-
return
|
|
939
|
+
const { mountedGroups: t } = G(), n = t.get(e);
|
|
940
|
+
return P(n, `Mounted Group ${e.id} not found`), n;
|
|
948
941
|
}
|
|
949
942
|
function W(e, t) {
|
|
950
943
|
const n = le(e), o = Be(n), i = n.separators.find(
|
|
951
944
|
(g) => g.element === e
|
|
952
945
|
);
|
|
953
|
-
|
|
946
|
+
P(i, "Matching separator not found");
|
|
954
947
|
const s = o.separatorToPanels.get(i);
|
|
955
|
-
|
|
948
|
+
P(s, "Matching panels not found");
|
|
956
949
|
const l = s.map((g) => n.panels.indexOf(g)), a = Ue({ groupId: n.id }).getLayout(), u = oe({
|
|
957
950
|
delta: t,
|
|
958
951
|
initialLayout: a,
|
|
@@ -964,7 +957,7 @@ function W(e, t) {
|
|
|
964
957
|
layout: u,
|
|
965
958
|
panelConstraints: o.derivedPanelConstraints
|
|
966
959
|
});
|
|
967
|
-
U(a, c) ||
|
|
960
|
+
U(a, c) || I((g) => ({
|
|
968
961
|
mountedGroups: new Map(g.mountedGroups).set(n, {
|
|
969
962
|
defaultLayoutDeferred: o.defaultLayoutDeferred,
|
|
970
963
|
derivedPanelConstraints: o.derivedPanelConstraints,
|
|
@@ -1004,15 +997,15 @@ function Pe(e) {
|
|
|
1004
997
|
const o = le(t), { derivedPanelConstraints: i, layout: s, separatorToPanels: l } = Be(o), r = o.separators.find(
|
|
1005
998
|
(g) => g.element === t
|
|
1006
999
|
);
|
|
1007
|
-
|
|
1000
|
+
P(r, "Matching separator not found");
|
|
1008
1001
|
const a = l.get(r);
|
|
1009
|
-
|
|
1002
|
+
P(a, "Matching panels not found");
|
|
1010
1003
|
const u = a[0], c = i.find(
|
|
1011
1004
|
(g) => g.panelId === u.id
|
|
1012
1005
|
);
|
|
1013
|
-
if (
|
|
1014
|
-
const g = s[u.id],
|
|
1015
|
-
W(t,
|
|
1006
|
+
if (P(c, "Panel metadata not found"), c.collapsible) {
|
|
1007
|
+
const g = s[u.id], b = c.collapsedSize === g ? o.inMemoryLastExpandedPanelSizes[u.id] ?? c.minSize : c.collapsedSize;
|
|
1008
|
+
W(t, b - g);
|
|
1016
1009
|
}
|
|
1017
1010
|
break;
|
|
1018
1011
|
}
|
|
@@ -1023,7 +1016,7 @@ function Pe(e) {
|
|
|
1023
1016
|
), s = Array.from(i).findIndex(
|
|
1024
1017
|
(a) => a === e.currentTarget
|
|
1025
1018
|
);
|
|
1026
|
-
|
|
1019
|
+
P(s !== null, "Index not found");
|
|
1027
1020
|
const l = e.shiftKey ? s > 0 ? s - 1 : i.length - 1 : s + 1 < i.length ? s + 1 : 0;
|
|
1028
1021
|
i[l].focus();
|
|
1029
1022
|
break;
|
|
@@ -1039,13 +1032,13 @@ function Ce(e) {
|
|
|
1039
1032
|
return;
|
|
1040
1033
|
if (e.pointerType === "mouse" && e.button > 0)
|
|
1041
1034
|
return;
|
|
1042
|
-
const { mountedGroups: t } =
|
|
1035
|
+
const { mountedGroups: t } = G(), n = me(e, t), o = /* @__PURE__ */ new Map();
|
|
1043
1036
|
let i = !1;
|
|
1044
1037
|
n.forEach((s) => {
|
|
1045
1038
|
s.separator && (i || (i = !0, s.separator.element.focus()));
|
|
1046
1039
|
const l = t.get(s.group);
|
|
1047
1040
|
l && o.set(s.group, l.layout);
|
|
1048
|
-
}),
|
|
1041
|
+
}), I({
|
|
1049
1042
|
interactionState: {
|
|
1050
1043
|
hitRegions: n,
|
|
1051
1044
|
initialLayoutMap: o,
|
|
@@ -1054,13 +1047,13 @@ function Ce(e) {
|
|
|
1054
1047
|
}
|
|
1055
1048
|
}), n.length && e.preventDefault();
|
|
1056
1049
|
}
|
|
1057
|
-
const
|
|
1050
|
+
const Rt = (e) => e, fe = () => {
|
|
1058
1051
|
}, Ke = 1, Xe = 2, qe = 4, Ye = 8, Re = 3, Me = 12;
|
|
1059
1052
|
let ae;
|
|
1060
1053
|
function Ee() {
|
|
1061
1054
|
return ae === void 0 && (ae = !1, typeof window < "u" && (window.navigator.userAgent.includes("Chrome") || window.navigator.userAgent.includes("Firefox")) && (ae = !0)), ae;
|
|
1062
1055
|
}
|
|
1063
|
-
function
|
|
1056
|
+
function Mt({
|
|
1064
1057
|
cursorFlags: e,
|
|
1065
1058
|
groups: t,
|
|
1066
1059
|
state: n
|
|
@@ -1104,20 +1097,20 @@ function Ct({
|
|
|
1104
1097
|
}
|
|
1105
1098
|
}
|
|
1106
1099
|
const ke = /* @__PURE__ */ new WeakMap();
|
|
1107
|
-
function
|
|
1100
|
+
function ge(e) {
|
|
1108
1101
|
if (e.defaultView === null || e.defaultView === void 0)
|
|
1109
1102
|
return;
|
|
1110
1103
|
let { prevStyle: t, styleSheet: n } = ke.get(e) ?? {};
|
|
1111
|
-
n === void 0 && (n = new e.defaultView.CSSStyleSheet(), e.adoptedStyleSheets.push(n));
|
|
1112
|
-
const { cursorFlags: o, interactionState: i } =
|
|
1104
|
+
n === void 0 && (n = new e.defaultView.CSSStyleSheet(), e.adoptedStyleSheets && e.adoptedStyleSheets.push(n));
|
|
1105
|
+
const { cursorFlags: o, interactionState: i } = G();
|
|
1113
1106
|
switch (i.state) {
|
|
1114
1107
|
case "active":
|
|
1115
1108
|
case "hover": {
|
|
1116
|
-
const s =
|
|
1109
|
+
const s = Mt({
|
|
1117
1110
|
cursorFlags: o,
|
|
1118
1111
|
groups: i.hitRegions.map((r) => r.group),
|
|
1119
1112
|
state: i.state
|
|
1120
|
-
}), l = `*, *:hover {cursor: ${s} !important;
|
|
1113
|
+
}), l = `*, *:hover {cursor: ${s} !important; }`;
|
|
1121
1114
|
if (t === l)
|
|
1122
1115
|
return;
|
|
1123
1116
|
t = l, s ? n.cssRules.length === 0 ? n.insertRule(l) : n.replaceSync(l) : n.cssRules.length === 1 && n.deleteRule(0);
|
|
@@ -1145,19 +1138,19 @@ function Je({
|
|
|
1145
1138
|
let r = 0;
|
|
1146
1139
|
const a = new Map(i);
|
|
1147
1140
|
n.forEach((c) => {
|
|
1148
|
-
const { group: g, groupSize:
|
|
1141
|
+
const { group: g, groupSize: b } = c, { disableCursor: S, orientation: m, panels: d } = g;
|
|
1149
1142
|
let f = 0;
|
|
1150
|
-
s ?
|
|
1151
|
-
const
|
|
1143
|
+
s ? m === "horizontal" ? f = (t.clientX - s.x) / b * 100 : f = (t.clientY - s.y) / b * 100 : m === "horizontal" ? f = t.clientX < 0 ? -100 : 100 : f = t.clientY < 0 ? -100 : 100;
|
|
1144
|
+
const h = o.get(g), {
|
|
1152
1145
|
defaultLayoutDeferred: v,
|
|
1153
1146
|
derivedPanelConstraints: x,
|
|
1154
1147
|
layout: y,
|
|
1155
1148
|
separatorToPanels: p
|
|
1156
1149
|
} = i.get(g) ?? { defaultLayoutDeferred: !1 };
|
|
1157
|
-
if (x &&
|
|
1150
|
+
if (x && h && y && p) {
|
|
1158
1151
|
const w = oe({
|
|
1159
1152
|
delta: f,
|
|
1160
|
-
initialLayout:
|
|
1153
|
+
initialLayout: h,
|
|
1161
1154
|
panelConstraints: x,
|
|
1162
1155
|
pivotIndices: c.panels.map((C) => d.indexOf(C)),
|
|
1163
1156
|
prevLayout: y,
|
|
@@ -1165,7 +1158,7 @@ function Je({
|
|
|
1165
1158
|
});
|
|
1166
1159
|
if (U(w, y)) {
|
|
1167
1160
|
if (f !== 0 && !S)
|
|
1168
|
-
switch (
|
|
1161
|
+
switch (m) {
|
|
1169
1162
|
case "horizontal": {
|
|
1170
1163
|
r |= f < 0 ? Ke : Xe;
|
|
1171
1164
|
break;
|
|
@@ -1175,26 +1168,23 @@ function Je({
|
|
|
1175
1168
|
break;
|
|
1176
1169
|
}
|
|
1177
1170
|
}
|
|
1178
|
-
} else
|
|
1171
|
+
} else
|
|
1179
1172
|
a.set(c.group, {
|
|
1180
1173
|
defaultLayoutDeferred: v,
|
|
1181
1174
|
derivedPanelConstraints: x,
|
|
1182
1175
|
layout: w,
|
|
1183
1176
|
separatorToPanels: p
|
|
1184
1177
|
});
|
|
1185
|
-
const C = c.group.panels.map(({ id: R }) => R).join(",");
|
|
1186
|
-
c.group.inMemoryLayouts[C] = w;
|
|
1187
|
-
}
|
|
1188
1178
|
}
|
|
1189
1179
|
});
|
|
1190
1180
|
let u = 0;
|
|
1191
|
-
t.movementX === 0 ? u |= l & Re : u |= r & Re, t.movementY === 0 ? u |= l & Me : u |= r & Me,
|
|
1181
|
+
t.movementX === 0 ? u |= l & Re : u |= r & Re, t.movementY === 0 ? u |= l & Me : u |= r & Me, I({
|
|
1192
1182
|
cursorFlags: u,
|
|
1193
1183
|
mountedGroups: a
|
|
1194
|
-
}),
|
|
1184
|
+
}), ge(e);
|
|
1195
1185
|
}
|
|
1196
1186
|
function Ge(e) {
|
|
1197
|
-
const { cursorFlags: t, interactionState: n, mountedGroups: o } =
|
|
1187
|
+
const { cursorFlags: t, interactionState: n, mountedGroups: o } = G();
|
|
1198
1188
|
switch (n.state) {
|
|
1199
1189
|
case "active":
|
|
1200
1190
|
Je({
|
|
@@ -1210,19 +1200,19 @@ function Ge(e) {
|
|
|
1210
1200
|
function Ie(e) {
|
|
1211
1201
|
if (e.defaultPrevented)
|
|
1212
1202
|
return;
|
|
1213
|
-
const { cursorFlags: t, interactionState: n, mountedGroups: o } =
|
|
1203
|
+
const { cursorFlags: t, interactionState: n, mountedGroups: o } = G();
|
|
1214
1204
|
switch (n.state) {
|
|
1215
1205
|
case "active": {
|
|
1216
1206
|
if (
|
|
1217
1207
|
// Skip this check for "pointerleave" events, else Firefox triggers a false positive (see #514)
|
|
1218
1208
|
e.buttons === 0
|
|
1219
1209
|
) {
|
|
1220
|
-
|
|
1210
|
+
I(
|
|
1221
1211
|
(i) => i.interactionState.state === "inactive" ? i : {
|
|
1222
1212
|
cursorFlags: 0,
|
|
1223
1213
|
interactionState: { state: "inactive" }
|
|
1224
1214
|
}
|
|
1225
|
-
),
|
|
1215
|
+
), I((i) => ({
|
|
1226
1216
|
mountedGroups: new Map(i.mountedGroups)
|
|
1227
1217
|
}));
|
|
1228
1218
|
return;
|
|
@@ -1240,26 +1230,26 @@ function Ie(e) {
|
|
|
1240
1230
|
}
|
|
1241
1231
|
default: {
|
|
1242
1232
|
const i = me(e, o);
|
|
1243
|
-
i.length === 0 ? n.state !== "inactive" &&
|
|
1233
|
+
i.length === 0 ? n.state !== "inactive" && I({
|
|
1244
1234
|
interactionState: {
|
|
1245
1235
|
state: "inactive"
|
|
1246
1236
|
}
|
|
1247
|
-
}) :
|
|
1237
|
+
}) : I({
|
|
1248
1238
|
interactionState: {
|
|
1249
1239
|
hitRegions: i,
|
|
1250
1240
|
state: "hover"
|
|
1251
1241
|
}
|
|
1252
|
-
}),
|
|
1242
|
+
}), ge(e.currentTarget);
|
|
1253
1243
|
break;
|
|
1254
1244
|
}
|
|
1255
1245
|
}
|
|
1256
1246
|
}
|
|
1257
1247
|
function De(e) {
|
|
1258
1248
|
if (e.relatedTarget instanceof HTMLIFrameElement) {
|
|
1259
|
-
const { interactionState: t } =
|
|
1249
|
+
const { interactionState: t } = G();
|
|
1260
1250
|
switch (t.state) {
|
|
1261
1251
|
case "hover":
|
|
1262
|
-
|
|
1252
|
+
I({
|
|
1263
1253
|
interactionState: {
|
|
1264
1254
|
state: "inactive"
|
|
1265
1255
|
}
|
|
@@ -1272,15 +1262,15 @@ function Oe(e) {
|
|
|
1272
1262
|
return;
|
|
1273
1263
|
if (e.pointerType === "mouse" && e.button > 0)
|
|
1274
1264
|
return;
|
|
1275
|
-
const { interactionState: t } =
|
|
1265
|
+
const { interactionState: t } = G();
|
|
1276
1266
|
switch (t.state) {
|
|
1277
1267
|
case "active":
|
|
1278
|
-
|
|
1268
|
+
I({
|
|
1279
1269
|
cursorFlags: 0,
|
|
1280
1270
|
interactionState: {
|
|
1281
1271
|
state: "inactive"
|
|
1282
1272
|
}
|
|
1283
|
-
}), t.hitRegions.length > 0 && (
|
|
1273
|
+
}), t.hitRegions.length > 0 && (ge(e.currentTarget), I((n) => ({
|
|
1284
1274
|
mountedGroups: new Map(n.mountedGroups)
|
|
1285
1275
|
})), e.preventDefault());
|
|
1286
1276
|
}
|
|
@@ -1291,31 +1281,31 @@ function Te(e) {
|
|
|
1291
1281
|
for (const s of e)
|
|
1292
1282
|
if (s.defaultSize !== void 0) {
|
|
1293
1283
|
t++;
|
|
1294
|
-
const l =
|
|
1284
|
+
const l = _(s.defaultSize);
|
|
1295
1285
|
n += l, o[s.panelId] = l;
|
|
1296
1286
|
} else
|
|
1297
1287
|
o[s.panelId] = void 0;
|
|
1298
1288
|
const i = e.length - t;
|
|
1299
1289
|
if (i !== 0) {
|
|
1300
|
-
const s =
|
|
1290
|
+
const s = _((100 - n) / i);
|
|
1301
1291
|
for (const l of e)
|
|
1302
1292
|
l.defaultSize === void 0 && (o[l.panelId] = s);
|
|
1303
1293
|
}
|
|
1304
1294
|
return o;
|
|
1305
1295
|
}
|
|
1306
|
-
function
|
|
1296
|
+
function Et(e, t, n) {
|
|
1307
1297
|
if (!n[0])
|
|
1308
1298
|
return;
|
|
1309
1299
|
const i = e.panels.find((u) => u.element === t);
|
|
1310
1300
|
if (!i || !i.onResize)
|
|
1311
1301
|
return;
|
|
1312
|
-
const s =
|
|
1313
|
-
asPercentage:
|
|
1302
|
+
const s = J({ group: e }), l = e.orientation === "horizontal" ? i.element.offsetWidth : i.element.offsetHeight, r = i.mutableValues.prevSize, a = {
|
|
1303
|
+
asPercentage: _(l / s * 100),
|
|
1314
1304
|
inPixels: l
|
|
1315
1305
|
};
|
|
1316
1306
|
i.mutableValues.prevSize = a, i.onResize(a, i.id, r);
|
|
1317
1307
|
}
|
|
1318
|
-
function
|
|
1308
|
+
function kt(e, t) {
|
|
1319
1309
|
if (Object.keys(e).length !== Object.keys(t).length)
|
|
1320
1310
|
return !1;
|
|
1321
1311
|
for (const o in e)
|
|
@@ -1323,7 +1313,7 @@ function Mt(e, t) {
|
|
|
1323
1313
|
return !1;
|
|
1324
1314
|
return !0;
|
|
1325
1315
|
}
|
|
1326
|
-
function
|
|
1316
|
+
function Gt(e, t) {
|
|
1327
1317
|
const n = e.map((i) => i.id), o = Object.keys(t);
|
|
1328
1318
|
if (n.length !== o.length)
|
|
1329
1319
|
return !1;
|
|
@@ -1332,28 +1322,28 @@ function Et(e, t) {
|
|
|
1332
1322
|
return !1;
|
|
1333
1323
|
return !0;
|
|
1334
1324
|
}
|
|
1335
|
-
const
|
|
1336
|
-
function
|
|
1325
|
+
const q = /* @__PURE__ */ new Map();
|
|
1326
|
+
function It(e) {
|
|
1337
1327
|
let t = !0;
|
|
1338
|
-
|
|
1328
|
+
P(
|
|
1339
1329
|
e.element.ownerDocument.defaultView,
|
|
1340
1330
|
"Cannot register an unmounted Group"
|
|
1341
1331
|
);
|
|
1342
|
-
const n = e.element.ownerDocument.defaultView.ResizeObserver, o = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Set(), s = new n((
|
|
1343
|
-
for (const d of
|
|
1344
|
-
const { borderBoxSize: f, target:
|
|
1345
|
-
if (
|
|
1332
|
+
const n = e.element.ownerDocument.defaultView.ResizeObserver, o = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Set(), s = new n((m) => {
|
|
1333
|
+
for (const d of m) {
|
|
1334
|
+
const { borderBoxSize: f, target: h } = d;
|
|
1335
|
+
if (h === e.element) {
|
|
1346
1336
|
if (t) {
|
|
1347
|
-
if (
|
|
1337
|
+
if (J({ group: e }) === 0)
|
|
1348
1338
|
return;
|
|
1349
|
-
|
|
1339
|
+
I((x) => {
|
|
1350
1340
|
const y = x.mountedGroups.get(e);
|
|
1351
1341
|
if (y) {
|
|
1352
|
-
const p =
|
|
1342
|
+
const p = pe(e), w = y.defaultLayoutDeferred ? Te(p) : y.layout, C = B({
|
|
1353
1343
|
layout: w,
|
|
1354
1344
|
panelConstraints: p
|
|
1355
1345
|
});
|
|
1356
|
-
return !y.defaultLayoutDeferred && U(w, C) &&
|
|
1346
|
+
return !y.defaultLayoutDeferred && U(w, C) && kt(
|
|
1357
1347
|
y.derivedPanelConstraints,
|
|
1358
1348
|
p
|
|
1359
1349
|
) ? x : {
|
|
@@ -1369,52 +1359,52 @@ function kt(e) {
|
|
|
1369
1359
|
});
|
|
1370
1360
|
}
|
|
1371
1361
|
} else
|
|
1372
|
-
|
|
1362
|
+
Et(e, h, f);
|
|
1373
1363
|
}
|
|
1374
1364
|
});
|
|
1375
|
-
s.observe(e.element), e.panels.forEach((
|
|
1376
|
-
|
|
1377
|
-
!o.has(
|
|
1378
|
-
`Panel ids must be unique; id "${
|
|
1379
|
-
), o.add(
|
|
1365
|
+
s.observe(e.element), e.panels.forEach((m) => {
|
|
1366
|
+
P(
|
|
1367
|
+
!o.has(m.id),
|
|
1368
|
+
`Panel ids must be unique; id "${m.id}" was used more than once`
|
|
1369
|
+
), o.add(m.id), m.onResize && s.observe(m.element);
|
|
1380
1370
|
});
|
|
1381
|
-
const l =
|
|
1371
|
+
const l = J({ group: e }), r = pe(e), a = e.panels.map(({ id: m }) => m).join(",");
|
|
1382
1372
|
let u = e.defaultLayout;
|
|
1383
|
-
u && (
|
|
1373
|
+
u && (Gt(e.panels, u) || (u = void 0));
|
|
1384
1374
|
const c = e.inMemoryLayouts[a] ?? u ?? Te(r), g = B({
|
|
1385
1375
|
layout: c,
|
|
1386
1376
|
panelConstraints: r
|
|
1387
|
-
}),
|
|
1388
|
-
return
|
|
1377
|
+
}), b = Ve(e), S = e.element.ownerDocument;
|
|
1378
|
+
return I((m) => {
|
|
1389
1379
|
const d = /* @__PURE__ */ new Map();
|
|
1390
|
-
return
|
|
1380
|
+
return q.set(
|
|
1391
1381
|
S,
|
|
1392
|
-
(
|
|
1393
|
-
),
|
|
1382
|
+
(q.get(S) ?? 0) + 1
|
|
1383
|
+
), b.forEach((f) => {
|
|
1394
1384
|
f.separator && d.set(f.separator, f.panels);
|
|
1395
1385
|
}), {
|
|
1396
|
-
mountedGroups: new Map(
|
|
1386
|
+
mountedGroups: new Map(m.mountedGroups).set(e, {
|
|
1397
1387
|
defaultLayoutDeferred: l === 0,
|
|
1398
1388
|
derivedPanelConstraints: r,
|
|
1399
1389
|
layout: g,
|
|
1400
1390
|
separatorToPanels: d
|
|
1401
1391
|
})
|
|
1402
1392
|
};
|
|
1403
|
-
}), e.separators.forEach((
|
|
1404
|
-
|
|
1405
|
-
!i.has(
|
|
1406
|
-
`Separator ids must be unique; id "${
|
|
1407
|
-
), i.add(
|
|
1408
|
-
}),
|
|
1409
|
-
t = !1,
|
|
1393
|
+
}), e.separators.forEach((m) => {
|
|
1394
|
+
P(
|
|
1395
|
+
!i.has(m.id),
|
|
1396
|
+
`Separator ids must be unique; id "${m.id}" was used more than once`
|
|
1397
|
+
), i.add(m.id), m.element.addEventListener("keydown", Pe);
|
|
1398
|
+
}), q.get(S) === 1 && (S.addEventListener("dblclick", Le, !0), S.addEventListener("pointerdown", Ce, !0), S.addEventListener("pointerleave", Ge), S.addEventListener("pointermove", Ie), S.addEventListener("pointerout", De), S.addEventListener("pointerup", Oe, !0)), function() {
|
|
1399
|
+
t = !1, q.set(
|
|
1410
1400
|
S,
|
|
1411
|
-
Math.max(0, (
|
|
1412
|
-
),
|
|
1401
|
+
Math.max(0, (q.get(S) ?? 0) - 1)
|
|
1402
|
+
), I((d) => {
|
|
1413
1403
|
const f = new Map(d.mountedGroups);
|
|
1414
1404
|
return f.delete(e), { mountedGroups: f };
|
|
1415
1405
|
}), e.separators.forEach((d) => {
|
|
1416
1406
|
d.element.removeEventListener("keydown", Pe);
|
|
1417
|
-
}),
|
|
1407
|
+
}), q.get(S) || (S.removeEventListener(
|
|
1418
1408
|
"dblclick",
|
|
1419
1409
|
Le,
|
|
1420
1410
|
!0
|
|
@@ -1425,17 +1415,17 @@ function kt(e) {
|
|
|
1425
1415
|
), S.removeEventListener("pointerleave", Ge), S.removeEventListener("pointermove", Ie), S.removeEventListener("pointerout", De), S.removeEventListener("pointerup", Oe, !0)), s.disconnect();
|
|
1426
1416
|
};
|
|
1427
1417
|
}
|
|
1428
|
-
function
|
|
1418
|
+
function Dt() {
|
|
1429
1419
|
const [e, t] = ne({}), n = Q(() => t({}), []);
|
|
1430
1420
|
return [e, n];
|
|
1431
1421
|
}
|
|
1432
|
-
function
|
|
1433
|
-
const t =
|
|
1422
|
+
function ye(e) {
|
|
1423
|
+
const t = rt();
|
|
1434
1424
|
return `${e ?? t}`;
|
|
1435
1425
|
}
|
|
1436
|
-
const K = typeof window < "u" ?
|
|
1426
|
+
const K = typeof window < "u" ? Ae : ue;
|
|
1437
1427
|
function ee(e) {
|
|
1438
|
-
const t =
|
|
1428
|
+
const t = O(e);
|
|
1439
1429
|
return K(() => {
|
|
1440
1430
|
t.current = e;
|
|
1441
1431
|
}, [e]), Q(
|
|
@@ -1443,7 +1433,7 @@ function ee(e) {
|
|
|
1443
1433
|
[t]
|
|
1444
1434
|
);
|
|
1445
1435
|
}
|
|
1446
|
-
function
|
|
1436
|
+
function Se(...e) {
|
|
1447
1437
|
return ee((t) => {
|
|
1448
1438
|
e.forEach((n) => {
|
|
1449
1439
|
if (n)
|
|
@@ -1460,27 +1450,27 @@ function ye(...e) {
|
|
|
1460
1450
|
});
|
|
1461
1451
|
});
|
|
1462
1452
|
}
|
|
1463
|
-
function
|
|
1464
|
-
const t =
|
|
1453
|
+
function ve(e) {
|
|
1454
|
+
const t = O({ ...e });
|
|
1465
1455
|
return K(() => {
|
|
1466
1456
|
for (const n in e)
|
|
1467
1457
|
t.current[n] = e[n];
|
|
1468
1458
|
}, [e]), t.current;
|
|
1469
1459
|
}
|
|
1470
|
-
const Ze =
|
|
1471
|
-
function
|
|
1472
|
-
const n =
|
|
1460
|
+
const Ze = st(null);
|
|
1461
|
+
function Ot(e, t) {
|
|
1462
|
+
const n = O({
|
|
1473
1463
|
getLayout: () => ({}),
|
|
1474
|
-
setLayout:
|
|
1464
|
+
setLayout: Rt
|
|
1475
1465
|
});
|
|
1476
|
-
|
|
1466
|
+
Ne(t, () => n.current, []), K(() => {
|
|
1477
1467
|
Object.assign(
|
|
1478
1468
|
n.current,
|
|
1479
1469
|
Ue({ groupId: e })
|
|
1480
1470
|
);
|
|
1481
1471
|
});
|
|
1482
1472
|
}
|
|
1483
|
-
function
|
|
1473
|
+
function Tt({
|
|
1484
1474
|
children: e,
|
|
1485
1475
|
className: t,
|
|
1486
1476
|
defaultLayout: n,
|
|
@@ -1496,227 +1486,234 @@ function Dt({
|
|
|
1496
1486
|
coarse: 20,
|
|
1497
1487
|
fine: 10
|
|
1498
1488
|
},
|
|
1499
|
-
style:
|
|
1489
|
+
style: b,
|
|
1500
1490
|
...S
|
|
1501
1491
|
}) {
|
|
1502
|
-
const
|
|
1492
|
+
const m = O({
|
|
1503
1493
|
onLayoutChange: {},
|
|
1504
1494
|
onLayoutChanged: {}
|
|
1505
|
-
}), d = ee((
|
|
1506
|
-
U(
|
|
1507
|
-
}), f = ee((
|
|
1508
|
-
U(
|
|
1509
|
-
}),
|
|
1495
|
+
}), d = ee((z) => {
|
|
1496
|
+
U(m.current.onLayoutChange, z) || (m.current.onLayoutChange = z, a?.(z));
|
|
1497
|
+
}), f = ee((z) => {
|
|
1498
|
+
U(m.current.onLayoutChanged, z) || (m.current.onLayoutChanged = z, u?.(z));
|
|
1499
|
+
}), h = ye(r), v = O(null), [x, y] = Dt(), p = O({
|
|
1510
1500
|
lastExpandedPanelSizes: {},
|
|
1511
1501
|
layouts: {},
|
|
1512
1502
|
panels: [],
|
|
1513
1503
|
resizeTargetMinimumSize: g,
|
|
1514
1504
|
separators: []
|
|
1515
|
-
}), w =
|
|
1516
|
-
|
|
1505
|
+
}), w = Se(v, s);
|
|
1506
|
+
Ot(h, l);
|
|
1517
1507
|
const C = ee(
|
|
1518
|
-
(
|
|
1519
|
-
const { interactionState:
|
|
1520
|
-
for (const
|
|
1521
|
-
if (
|
|
1522
|
-
const
|
|
1523
|
-
if (
|
|
1524
|
-
let
|
|
1525
|
-
switch (
|
|
1508
|
+
(z, L) => {
|
|
1509
|
+
const { interactionState: E, mountedGroups: M } = G();
|
|
1510
|
+
for (const D of M.keys())
|
|
1511
|
+
if (D.id === z) {
|
|
1512
|
+
const T = M.get(D);
|
|
1513
|
+
if (T) {
|
|
1514
|
+
let N = !1;
|
|
1515
|
+
switch (E.state) {
|
|
1526
1516
|
case "active": {
|
|
1527
|
-
|
|
1528
|
-
(Z) => Z.group ===
|
|
1517
|
+
N = E.hitRegions.some(
|
|
1518
|
+
(Z) => Z.group === D
|
|
1529
1519
|
);
|
|
1530
1520
|
break;
|
|
1531
1521
|
}
|
|
1532
1522
|
}
|
|
1533
1523
|
return {
|
|
1534
|
-
flexGrow:
|
|
1535
|
-
pointerEvents:
|
|
1524
|
+
flexGrow: T.layout[L] ?? 1,
|
|
1525
|
+
pointerEvents: N ? "none" : void 0
|
|
1536
1526
|
};
|
|
1537
1527
|
}
|
|
1538
1528
|
}
|
|
1539
1529
|
return {
|
|
1540
|
-
flexGrow: n?.[
|
|
1530
|
+
flexGrow: n?.[L] ?? 1
|
|
1541
1531
|
};
|
|
1542
1532
|
}
|
|
1543
|
-
), R =
|
|
1533
|
+
), R = ve({
|
|
1544
1534
|
defaultLayout: n,
|
|
1545
1535
|
disableCursor: o
|
|
1546
|
-
}),
|
|
1536
|
+
}), X = _e(
|
|
1547
1537
|
() => ({
|
|
1548
1538
|
get disableCursor() {
|
|
1549
1539
|
return !!R.disableCursor;
|
|
1550
1540
|
},
|
|
1551
1541
|
getPanelStyles: C,
|
|
1552
|
-
id:
|
|
1542
|
+
id: h,
|
|
1553
1543
|
orientation: c,
|
|
1554
|
-
registerPanel: (
|
|
1555
|
-
const
|
|
1556
|
-
return
|
|
1557
|
-
...
|
|
1558
|
-
|
|
1544
|
+
registerPanel: (z) => {
|
|
1545
|
+
const L = p.current;
|
|
1546
|
+
return L.panels = he(c, [
|
|
1547
|
+
...L.panels,
|
|
1548
|
+
z
|
|
1559
1549
|
]), y(), () => {
|
|
1560
|
-
|
|
1561
|
-
(
|
|
1550
|
+
L.panels = L.panels.filter(
|
|
1551
|
+
(E) => E !== z
|
|
1562
1552
|
), y();
|
|
1563
1553
|
};
|
|
1564
1554
|
},
|
|
1565
|
-
registerSeparator: (
|
|
1566
|
-
const
|
|
1567
|
-
return
|
|
1568
|
-
...
|
|
1569
|
-
|
|
1555
|
+
registerSeparator: (z) => {
|
|
1556
|
+
const L = p.current;
|
|
1557
|
+
return L.separators = he(c, [
|
|
1558
|
+
...L.separators,
|
|
1559
|
+
z
|
|
1570
1560
|
]), y(), () => {
|
|
1571
|
-
|
|
1572
|
-
(
|
|
1561
|
+
L.separators = L.separators.filter(
|
|
1562
|
+
(E) => E !== z
|
|
1573
1563
|
), y();
|
|
1574
1564
|
};
|
|
1575
1565
|
},
|
|
1576
|
-
togglePanelDisabled: (
|
|
1566
|
+
togglePanelDisabled: (z, L) => {
|
|
1577
1567
|
const M = p.current.panels.find(
|
|
1578
|
-
(
|
|
1568
|
+
(T) => T.id === z
|
|
1579
1569
|
);
|
|
1580
|
-
M && (M.panelConstraints.disabled =
|
|
1581
|
-
const { mountedGroups:
|
|
1582
|
-
for (const
|
|
1583
|
-
if (
|
|
1584
|
-
const
|
|
1585
|
-
|
|
1570
|
+
M && (M.panelConstraints.disabled = L);
|
|
1571
|
+
const { mountedGroups: D } = G();
|
|
1572
|
+
for (const T of D.keys())
|
|
1573
|
+
if (T.id === h) {
|
|
1574
|
+
const N = D.get(T);
|
|
1575
|
+
N && (N.derivedPanelConstraints = pe(T));
|
|
1586
1576
|
}
|
|
1587
1577
|
},
|
|
1588
|
-
toggleSeparatorDisabled: (
|
|
1578
|
+
toggleSeparatorDisabled: (z, L) => {
|
|
1589
1579
|
const M = p.current.separators.find(
|
|
1590
|
-
(
|
|
1580
|
+
(D) => D.id === z
|
|
1591
1581
|
);
|
|
1592
|
-
M && (M.disabled =
|
|
1582
|
+
M && (M.disabled = L);
|
|
1593
1583
|
}
|
|
1594
1584
|
}),
|
|
1595
|
-
[C,
|
|
1596
|
-
),
|
|
1585
|
+
[C, h, y, c, R]
|
|
1586
|
+
), V = O(null);
|
|
1597
1587
|
return K(() => {
|
|
1598
|
-
const
|
|
1599
|
-
if (
|
|
1588
|
+
const z = v.current;
|
|
1589
|
+
if (z === null)
|
|
1600
1590
|
return;
|
|
1601
|
-
const
|
|
1602
|
-
let
|
|
1603
|
-
if (R.defaultLayout !== void 0 && Object.keys(R.defaultLayout).length ===
|
|
1604
|
-
|
|
1605
|
-
for (const
|
|
1606
|
-
const j = R.defaultLayout[
|
|
1607
|
-
j !== void 0 && (
|
|
1591
|
+
const L = p.current;
|
|
1592
|
+
let E;
|
|
1593
|
+
if (R.defaultLayout !== void 0 && Object.keys(R.defaultLayout).length === L.panels.length) {
|
|
1594
|
+
E = {};
|
|
1595
|
+
for (const H of L.panels) {
|
|
1596
|
+
const j = R.defaultLayout[H.id];
|
|
1597
|
+
j !== void 0 && (E[H.id] = j);
|
|
1608
1598
|
}
|
|
1609
1599
|
}
|
|
1610
1600
|
const M = {
|
|
1611
|
-
defaultLayout:
|
|
1601
|
+
defaultLayout: E,
|
|
1612
1602
|
disableCursor: !!R.disableCursor,
|
|
1613
1603
|
disabled: !!i,
|
|
1614
|
-
element:
|
|
1615
|
-
id:
|
|
1604
|
+
element: z,
|
|
1605
|
+
id: h,
|
|
1616
1606
|
inMemoryLastExpandedPanelSizes: p.current.lastExpandedPanelSizes,
|
|
1617
1607
|
inMemoryLayouts: p.current.layouts,
|
|
1618
1608
|
orientation: c,
|
|
1619
|
-
panels:
|
|
1620
|
-
resizeTargetMinimumSize:
|
|
1621
|
-
separators:
|
|
1609
|
+
panels: L.panels,
|
|
1610
|
+
resizeTargetMinimumSize: L.resizeTargetMinimumSize,
|
|
1611
|
+
separators: L.separators
|
|
1622
1612
|
};
|
|
1623
|
-
|
|
1624
|
-
const
|
|
1625
|
-
if (
|
|
1626
|
-
const { defaultLayoutDeferred:
|
|
1627
|
-
!
|
|
1613
|
+
V.current = M;
|
|
1614
|
+
const D = It(M), N = G().mountedGroups.get(M);
|
|
1615
|
+
if (N) {
|
|
1616
|
+
const { defaultLayoutDeferred: H, derivedPanelConstraints: j, layout: ie } = N;
|
|
1617
|
+
!H && j.length > 0 && (d(ie), f(ie));
|
|
1628
1618
|
}
|
|
1629
|
-
const Z =
|
|
1619
|
+
const Z = $.addListener(
|
|
1630
1620
|
"interactionStateChange",
|
|
1631
|
-
(
|
|
1632
|
-
|
|
1621
|
+
(H) => {
|
|
1622
|
+
H.state;
|
|
1633
1623
|
}
|
|
1634
|
-
), Qe =
|
|
1624
|
+
), Qe = $.addListener(
|
|
1635
1625
|
"mountedGroupsChange",
|
|
1636
|
-
(
|
|
1637
|
-
const j =
|
|
1626
|
+
(H) => {
|
|
1627
|
+
const j = H.get(M);
|
|
1638
1628
|
if (j) {
|
|
1639
|
-
const { defaultLayoutDeferred: ie, derivedPanelConstraints: et, layout:
|
|
1629
|
+
const { defaultLayoutDeferred: ie, derivedPanelConstraints: et, layout: ce } = j;
|
|
1640
1630
|
if (ie || et.length === 0)
|
|
1641
1631
|
return;
|
|
1642
|
-
const {
|
|
1643
|
-
|
|
1632
|
+
const tt = M.panels.map(({ id: it }) => it).join(",");
|
|
1633
|
+
M.inMemoryLayouts[tt] = ce;
|
|
1634
|
+
const { interactionState: nt } = G(), ot = nt.state !== "active";
|
|
1635
|
+
d(ce), ot && f(ce);
|
|
1644
1636
|
}
|
|
1645
1637
|
}
|
|
1646
1638
|
);
|
|
1647
1639
|
return () => {
|
|
1648
|
-
|
|
1640
|
+
V.current = null, D(), Z(), Qe();
|
|
1649
1641
|
};
|
|
1650
1642
|
}, [
|
|
1651
1643
|
i,
|
|
1652
|
-
|
|
1644
|
+
h,
|
|
1653
1645
|
f,
|
|
1654
1646
|
d,
|
|
1655
1647
|
c,
|
|
1656
1648
|
x,
|
|
1657
1649
|
R
|
|
1658
1650
|
]), ue(() => {
|
|
1659
|
-
const
|
|
1660
|
-
|
|
1661
|
-
}), /* @__PURE__ */ te(Ze.Provider, { value:
|
|
1651
|
+
const z = V.current;
|
|
1652
|
+
z && (z.defaultLayout = n, z.disableCursor = !!o);
|
|
1653
|
+
}), /* @__PURE__ */ te(Ze.Provider, { value: X, children: /* @__PURE__ */ te(
|
|
1662
1654
|
"div",
|
|
1663
1655
|
{
|
|
1664
1656
|
...S,
|
|
1665
1657
|
className: t,
|
|
1666
1658
|
"data-group": !0,
|
|
1667
|
-
"data-testid":
|
|
1668
|
-
id:
|
|
1659
|
+
"data-testid": h,
|
|
1660
|
+
id: h,
|
|
1669
1661
|
ref: w,
|
|
1670
1662
|
style: {
|
|
1671
1663
|
height: "100%",
|
|
1672
1664
|
width: "100%",
|
|
1673
1665
|
overflow: "hidden",
|
|
1674
|
-
...
|
|
1666
|
+
...b,
|
|
1675
1667
|
display: "flex",
|
|
1676
1668
|
flexDirection: c === "horizontal" ? "row" : "column",
|
|
1677
|
-
flexWrap: "nowrap"
|
|
1669
|
+
flexWrap: "nowrap",
|
|
1670
|
+
// Inform the browser that the library is handling touch events for this element
|
|
1671
|
+
// but still allow users to scroll content within panels in the non-resizing direction
|
|
1672
|
+
// NOTE This is not an inherited style
|
|
1673
|
+
// See github.com/bvaughn/react-resizable-panels/issues/662
|
|
1674
|
+
touchAction: c === "horizontal" ? "pan-y" : "pan-x"
|
|
1678
1675
|
},
|
|
1679
1676
|
children: e
|
|
1680
1677
|
}
|
|
1681
1678
|
) });
|
|
1682
1679
|
}
|
|
1683
|
-
|
|
1684
|
-
function
|
|
1680
|
+
Tt.displayName = "Group";
|
|
1681
|
+
function de(e, t) {
|
|
1685
1682
|
return `react-resizable-panels:${[e, ...t].join(":")}`;
|
|
1686
1683
|
}
|
|
1687
|
-
function
|
|
1684
|
+
function Wt({
|
|
1688
1685
|
debounceSaveMs: e = 100,
|
|
1689
1686
|
panelIds: t,
|
|
1690
1687
|
storage: n = localStorage,
|
|
1691
1688
|
...o
|
|
1692
1689
|
}) {
|
|
1693
|
-
const i = t !== void 0, s = "id" in o ? o.id : o.groupId, l =
|
|
1694
|
-
|
|
1690
|
+
const i = t !== void 0, s = "id" in o ? o.id : o.groupId, l = de(s, t ?? []), r = Fe(
|
|
1691
|
+
At,
|
|
1695
1692
|
() => n.getItem(l),
|
|
1696
1693
|
() => n.getItem(l)
|
|
1697
1694
|
), a = _e(
|
|
1698
1695
|
() => r ? JSON.parse(r) : void 0,
|
|
1699
1696
|
[r]
|
|
1700
|
-
), u =
|
|
1697
|
+
), u = O(null), c = Q(() => {
|
|
1701
1698
|
const S = u.current;
|
|
1702
1699
|
S && (u.current = null, clearTimeout(S));
|
|
1703
1700
|
}, []);
|
|
1704
|
-
|
|
1701
|
+
Ae(() => () => {
|
|
1705
1702
|
c();
|
|
1706
1703
|
}, [c]);
|
|
1707
1704
|
const g = Q(
|
|
1708
1705
|
(S) => {
|
|
1709
1706
|
c();
|
|
1710
|
-
let
|
|
1711
|
-
i ?
|
|
1707
|
+
let m;
|
|
1708
|
+
i ? m = de(s, Object.keys(S)) : m = de(s, []);
|
|
1712
1709
|
try {
|
|
1713
|
-
n.setItem(
|
|
1710
|
+
n.setItem(m, JSON.stringify(S));
|
|
1714
1711
|
} catch (d) {
|
|
1715
1712
|
console.error(d);
|
|
1716
1713
|
}
|
|
1717
1714
|
},
|
|
1718
1715
|
[c, i, s, n]
|
|
1719
|
-
),
|
|
1716
|
+
), b = Q(
|
|
1720
1717
|
(S) => {
|
|
1721
1718
|
c(), e === 0 ? g(S) : u.current = setTimeout(() => {
|
|
1722
1719
|
g(S);
|
|
@@ -1734,49 +1731,49 @@ function Vt({
|
|
|
1734
1731
|
*
|
|
1735
1732
|
* @deprecated Use the {@link onLayoutChanged} prop instead.
|
|
1736
1733
|
*/
|
|
1737
|
-
onLayoutChange:
|
|
1734
|
+
onLayoutChange: b,
|
|
1738
1735
|
/**
|
|
1739
1736
|
* Attach this callback on the `Group` as the `onLayoutChanged` prop.
|
|
1740
1737
|
*/
|
|
1741
1738
|
onLayoutChanged: g
|
|
1742
1739
|
};
|
|
1743
1740
|
}
|
|
1744
|
-
function
|
|
1741
|
+
function At() {
|
|
1745
1742
|
return function() {
|
|
1746
1743
|
};
|
|
1747
1744
|
}
|
|
1748
|
-
function
|
|
1745
|
+
function Ut() {
|
|
1749
1746
|
return ne(null);
|
|
1750
1747
|
}
|
|
1751
|
-
function
|
|
1752
|
-
return
|
|
1748
|
+
function Bt() {
|
|
1749
|
+
return O(null);
|
|
1753
1750
|
}
|
|
1754
|
-
function
|
|
1755
|
-
const e =
|
|
1756
|
-
return
|
|
1751
|
+
function xe() {
|
|
1752
|
+
const e = at(Ze);
|
|
1753
|
+
return P(
|
|
1757
1754
|
e,
|
|
1758
1755
|
"Group Context not found; did you render a Panel or Separator outside of a Group?"
|
|
1759
1756
|
), e;
|
|
1760
1757
|
}
|
|
1761
|
-
function
|
|
1762
|
-
const { id: n } =
|
|
1763
|
-
collapse:
|
|
1764
|
-
expand:
|
|
1758
|
+
function Nt(e, t) {
|
|
1759
|
+
const { id: n } = xe(), o = O({
|
|
1760
|
+
collapse: fe,
|
|
1761
|
+
expand: fe,
|
|
1765
1762
|
getSize: () => ({
|
|
1766
1763
|
asPercentage: 0,
|
|
1767
1764
|
inPixels: 0
|
|
1768
1765
|
}),
|
|
1769
1766
|
isCollapsed: () => !1,
|
|
1770
|
-
resize:
|
|
1767
|
+
resize: fe
|
|
1771
1768
|
});
|
|
1772
|
-
|
|
1769
|
+
Ne(t, () => o.current, []), K(() => {
|
|
1773
1770
|
Object.assign(
|
|
1774
1771
|
o.current,
|
|
1775
1772
|
We({ groupId: n, panelId: e })
|
|
1776
1773
|
);
|
|
1777
1774
|
});
|
|
1778
1775
|
}
|
|
1779
|
-
function
|
|
1776
|
+
function _t({
|
|
1780
1777
|
children: e,
|
|
1781
1778
|
className: t,
|
|
1782
1779
|
collapsedSize: n = "0%",
|
|
@@ -1789,33 +1786,34 @@ function Nt({
|
|
|
1789
1786
|
minSize: u = "0%",
|
|
1790
1787
|
onResize: c,
|
|
1791
1788
|
panelRef: g,
|
|
1792
|
-
style:
|
|
1789
|
+
style: b,
|
|
1793
1790
|
...S
|
|
1794
1791
|
}) {
|
|
1795
|
-
const
|
|
1792
|
+
const m = !!r, d = ye(r), f = ve({
|
|
1796
1793
|
disabled: s
|
|
1797
|
-
}),
|
|
1794
|
+
}), h = O(null), v = Se(h, l), {
|
|
1798
1795
|
getPanelStyles: x,
|
|
1799
1796
|
id: y,
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1797
|
+
orientation: p,
|
|
1798
|
+
registerPanel: w,
|
|
1799
|
+
togglePanelDisabled: C
|
|
1800
|
+
} = xe(), R = c !== null, X = ee(
|
|
1801
|
+
(z, L, E) => {
|
|
1802
|
+
c?.(z, r, E);
|
|
1805
1803
|
}
|
|
1806
1804
|
);
|
|
1807
1805
|
K(() => {
|
|
1808
|
-
const
|
|
1809
|
-
if (
|
|
1810
|
-
const
|
|
1811
|
-
element:
|
|
1806
|
+
const z = h.current;
|
|
1807
|
+
if (z !== null) {
|
|
1808
|
+
const L = {
|
|
1809
|
+
element: z,
|
|
1812
1810
|
id: d,
|
|
1813
|
-
idIsStable:
|
|
1811
|
+
idIsStable: m,
|
|
1814
1812
|
mutableValues: {
|
|
1815
1813
|
expandToSize: void 0,
|
|
1816
1814
|
prevSize: void 0
|
|
1817
1815
|
},
|
|
1818
|
-
onResize:
|
|
1816
|
+
onResize: R ? X : void 0,
|
|
1819
1817
|
panelConstraints: {
|
|
1820
1818
|
collapsedSize: n,
|
|
1821
1819
|
collapsible: o,
|
|
@@ -1825,26 +1823,26 @@ function Nt({
|
|
|
1825
1823
|
minSize: u
|
|
1826
1824
|
}
|
|
1827
1825
|
};
|
|
1828
|
-
return
|
|
1826
|
+
return w(L);
|
|
1829
1827
|
}
|
|
1830
1828
|
}, [
|
|
1831
1829
|
n,
|
|
1832
1830
|
o,
|
|
1833
1831
|
i,
|
|
1834
|
-
|
|
1832
|
+
R,
|
|
1835
1833
|
d,
|
|
1836
|
-
|
|
1834
|
+
m,
|
|
1837
1835
|
a,
|
|
1838
1836
|
u,
|
|
1839
|
-
|
|
1840
|
-
|
|
1837
|
+
X,
|
|
1838
|
+
w,
|
|
1841
1839
|
f
|
|
1842
1840
|
]), ue(() => {
|
|
1843
|
-
|
|
1844
|
-
}, [s, d,
|
|
1845
|
-
const
|
|
1846
|
-
(
|
|
1847
|
-
|
|
1841
|
+
C(d, !!s);
|
|
1842
|
+
}, [s, d, C]), Nt(d, g);
|
|
1843
|
+
const V = Fe(
|
|
1844
|
+
(z) => ($.addListener("mountedGroupsChange", z), () => {
|
|
1845
|
+
$.removeListener("mountedGroupsChange", z);
|
|
1848
1846
|
}),
|
|
1849
1847
|
// useSyncExternalStore does not support a custom equality check
|
|
1850
1848
|
// stringify avoids re-rendering when the style value hasn't changed
|
|
@@ -1861,13 +1859,13 @@ function Nt({
|
|
|
1861
1859
|
id: d,
|
|
1862
1860
|
ref: v,
|
|
1863
1861
|
style: {
|
|
1864
|
-
...
|
|
1862
|
+
...Ft,
|
|
1865
1863
|
display: "flex",
|
|
1866
1864
|
flexBasis: 0,
|
|
1867
1865
|
flexShrink: 1,
|
|
1868
1866
|
// Prevent Panel content from interfering with panel size
|
|
1869
1867
|
overflow: "hidden",
|
|
1870
|
-
...JSON.parse(
|
|
1868
|
+
...JSON.parse(V)
|
|
1871
1869
|
},
|
|
1872
1870
|
children: /* @__PURE__ */ te(
|
|
1873
1871
|
"div",
|
|
@@ -1877,7 +1875,12 @@ function Nt({
|
|
|
1877
1875
|
maxHeight: "100%",
|
|
1878
1876
|
maxWidth: "100%",
|
|
1879
1877
|
flexGrow: 1,
|
|
1880
|
-
...
|
|
1878
|
+
...b,
|
|
1879
|
+
// Inform the browser that the library is handling touch events for this element
|
|
1880
|
+
// but still allow users to scroll content within panels in the non-resizing direction
|
|
1881
|
+
// NOTE This is not an inherited style
|
|
1882
|
+
// See github.com/bvaughn/react-resizable-panels/issues/662
|
|
1883
|
+
touchAction: p === "horizontal" ? "pan-y" : "pan-x"
|
|
1881
1884
|
},
|
|
1882
1885
|
children: e
|
|
1883
1886
|
}
|
|
@@ -1885,8 +1888,8 @@ function Nt({
|
|
|
1885
1888
|
}
|
|
1886
1889
|
);
|
|
1887
1890
|
}
|
|
1888
|
-
|
|
1889
|
-
const
|
|
1891
|
+
_t.displayName = "Panel";
|
|
1892
|
+
const Ft = {
|
|
1890
1893
|
minHeight: 0,
|
|
1891
1894
|
maxHeight: "100%",
|
|
1892
1895
|
height: "auto",
|
|
@@ -1898,13 +1901,13 @@ const At = {
|
|
|
1898
1901
|
padding: 0,
|
|
1899
1902
|
margin: 0
|
|
1900
1903
|
};
|
|
1901
|
-
function
|
|
1904
|
+
function Kt() {
|
|
1902
1905
|
return ne(null);
|
|
1903
1906
|
}
|
|
1904
|
-
function
|
|
1905
|
-
return
|
|
1907
|
+
function Xt() {
|
|
1908
|
+
return O(null);
|
|
1906
1909
|
}
|
|
1907
|
-
function
|
|
1910
|
+
function $t({
|
|
1908
1911
|
layout: e,
|
|
1909
1912
|
panelConstraints: t,
|
|
1910
1913
|
panelId: n,
|
|
@@ -1943,7 +1946,7 @@ function _t({
|
|
|
1943
1946
|
valueNow: l
|
|
1944
1947
|
};
|
|
1945
1948
|
}
|
|
1946
|
-
function
|
|
1949
|
+
function Ht({
|
|
1947
1950
|
children: e,
|
|
1948
1951
|
className: t,
|
|
1949
1952
|
disabled: n,
|
|
@@ -1952,15 +1955,15 @@ function Ft({
|
|
|
1952
1955
|
style: s,
|
|
1953
1956
|
...l
|
|
1954
1957
|
}) {
|
|
1955
|
-
const r =
|
|
1958
|
+
const r = ye(i), a = ve({
|
|
1956
1959
|
disabled: n
|
|
1957
|
-
}), [u, c] = ne({}), [g,
|
|
1960
|
+
}), [u, c] = ne({}), [g, b] = ne("inactive"), S = O(null), m = Se(S, o), {
|
|
1958
1961
|
disableCursor: d,
|
|
1959
1962
|
id: f,
|
|
1960
|
-
orientation:
|
|
1963
|
+
orientation: h,
|
|
1961
1964
|
registerSeparator: v,
|
|
1962
1965
|
toggleSeparatorDisabled: x
|
|
1963
|
-
} =
|
|
1966
|
+
} = xe(), y = h === "horizontal" ? "vertical" : "horizontal";
|
|
1964
1967
|
K(() => {
|
|
1965
1968
|
const w = S.current;
|
|
1966
1969
|
if (w !== null) {
|
|
@@ -1968,29 +1971,29 @@ function Ft({
|
|
|
1968
1971
|
disabled: a.disabled,
|
|
1969
1972
|
element: w,
|
|
1970
1973
|
id: r
|
|
1971
|
-
}, R = v(C),
|
|
1974
|
+
}, R = v(C), X = $.addListener(
|
|
1972
1975
|
"interactionStateChange",
|
|
1973
|
-
(
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
(
|
|
1977
|
-
) ?
|
|
1976
|
+
(z) => {
|
|
1977
|
+
b(
|
|
1978
|
+
z.state !== "inactive" && z.hitRegions.some(
|
|
1979
|
+
(L) => L.separator === C
|
|
1980
|
+
) ? z.state : "inactive"
|
|
1978
1981
|
);
|
|
1979
1982
|
}
|
|
1980
|
-
),
|
|
1983
|
+
), V = $.addListener(
|
|
1981
1984
|
"mountedGroupsChange",
|
|
1982
|
-
(
|
|
1983
|
-
|
|
1984
|
-
({ derivedPanelConstraints:
|
|
1985
|
-
if (
|
|
1986
|
-
const
|
|
1987
|
-
if (
|
|
1988
|
-
const
|
|
1985
|
+
(z) => {
|
|
1986
|
+
z.forEach(
|
|
1987
|
+
({ derivedPanelConstraints: L, layout: E, separatorToPanels: M }, D) => {
|
|
1988
|
+
if (D.id === f) {
|
|
1989
|
+
const T = M.get(C);
|
|
1990
|
+
if (T) {
|
|
1991
|
+
const N = T[0], Z = D.panels.indexOf(N);
|
|
1989
1992
|
c(
|
|
1990
|
-
|
|
1991
|
-
layout:
|
|
1992
|
-
panelConstraints:
|
|
1993
|
-
panelId:
|
|
1993
|
+
$t({
|
|
1994
|
+
layout: E,
|
|
1995
|
+
panelConstraints: L,
|
|
1996
|
+
panelId: N.id,
|
|
1994
1997
|
panelIndex: Z
|
|
1995
1998
|
})
|
|
1996
1999
|
);
|
|
@@ -2001,7 +2004,7 @@ function Ft({
|
|
|
2001
2004
|
}
|
|
2002
2005
|
);
|
|
2003
2006
|
return () => {
|
|
2004
|
-
|
|
2007
|
+
X(), V(), R();
|
|
2005
2008
|
};
|
|
2006
2009
|
}
|
|
2007
2010
|
}, [f, r, v, a]), ue(() => {
|
|
@@ -2023,29 +2026,32 @@ function Ft({
|
|
|
2023
2026
|
"data-separator": n ? "disabled" : g,
|
|
2024
2027
|
"data-testid": r,
|
|
2025
2028
|
id: r,
|
|
2026
|
-
ref:
|
|
2029
|
+
ref: m,
|
|
2027
2030
|
role: "separator",
|
|
2028
2031
|
style: {
|
|
2029
2032
|
flexBasis: "auto",
|
|
2030
2033
|
cursor: p,
|
|
2031
2034
|
...s,
|
|
2032
2035
|
flexGrow: 0,
|
|
2033
|
-
flexShrink: 0
|
|
2036
|
+
flexShrink: 0,
|
|
2037
|
+
// Inform the browser that the library is handling touch events for this element
|
|
2038
|
+
// See github.com/bvaughn/react-resizable-panels/issues/662
|
|
2039
|
+
touchAction: "none"
|
|
2034
2040
|
},
|
|
2035
2041
|
tabIndex: n ? void 0 : 0
|
|
2036
2042
|
}
|
|
2037
2043
|
);
|
|
2038
2044
|
}
|
|
2039
|
-
|
|
2045
|
+
Ht.displayName = "Separator";
|
|
2040
2046
|
export {
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2047
|
+
Tt as Group,
|
|
2048
|
+
_t as Panel,
|
|
2049
|
+
Ht as Separator,
|
|
2050
|
+
gt as isCoarsePointer,
|
|
2051
|
+
Wt as useDefaultLayout,
|
|
2052
|
+
Ut as useGroupCallbackRef,
|
|
2053
|
+
Bt as useGroupRef,
|
|
2054
|
+
Kt as usePanelCallbackRef,
|
|
2055
|
+
Xt as usePanelRef
|
|
2050
2056
|
};
|
|
2051
2057
|
//# sourceMappingURL=react-resizable-panels.js.map
|