react-resizable-panels 4.14.1 → 4.14.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
3
|
-
import { useId as
|
|
4
|
-
function
|
|
5
|
-
const t =
|
|
2
|
+
import { jsx as K, jsxs as dn } from "react/jsx-runtime";
|
|
3
|
+
import { useId as fn, useLayoutEffect as Nt, useEffect as Be, useRef as q, useCallback as re, createContext as Gt, useContext as _t, useState as pe, useMemo as Pe, useImperativeHandle as it, useSyncExternalStore as Xe, Children as mn, isValidElement as Ft } from "react";
|
|
4
|
+
function $e(e) {
|
|
5
|
+
const t = fn();
|
|
6
6
|
return `${e ?? t}`;
|
|
7
7
|
}
|
|
8
|
-
const ne = typeof window < "u" ?
|
|
9
|
-
function
|
|
8
|
+
const ne = typeof window < "u" ? Nt : Be;
|
|
9
|
+
function he(e) {
|
|
10
10
|
const t = q(e);
|
|
11
11
|
return ne(() => {
|
|
12
12
|
t.current = e;
|
|
13
|
-
}, [e]),
|
|
13
|
+
}, [e]), re(
|
|
14
14
|
(...n) => t.current?.(...n),
|
|
15
15
|
[t]
|
|
16
16
|
);
|
|
17
17
|
}
|
|
18
|
-
function
|
|
19
|
-
return
|
|
18
|
+
function Ve(...e) {
|
|
19
|
+
return he((t) => {
|
|
20
20
|
e.forEach((n) => {
|
|
21
21
|
if (n)
|
|
22
22
|
switch (typeof n) {
|
|
@@ -32,20 +32,20 @@ function Be(...e) {
|
|
|
32
32
|
});
|
|
33
33
|
});
|
|
34
34
|
}
|
|
35
|
-
function
|
|
35
|
+
function tt(e, t) {
|
|
36
36
|
return t ? e * 2 + 1 : e + 1;
|
|
37
37
|
}
|
|
38
|
-
function
|
|
38
|
+
function pn(e, t) {
|
|
39
39
|
return t ? e * 2 - 1 : e;
|
|
40
40
|
}
|
|
41
|
-
function
|
|
42
|
-
const o =
|
|
43
|
-
return t === void 0 ? `${o} / -1` : `${o} / span ${
|
|
41
|
+
function pt(e, t, n) {
|
|
42
|
+
const o = tt(e, n);
|
|
43
|
+
return t === void 0 ? `${o} / -1` : `${o} / span ${pn(t, n)}`;
|
|
44
44
|
}
|
|
45
|
-
function
|
|
45
|
+
function hn(e) {
|
|
46
46
|
return `${e * 2} / span 1`;
|
|
47
47
|
}
|
|
48
|
-
function
|
|
48
|
+
function gn({
|
|
49
49
|
crossCount: e,
|
|
50
50
|
crossSpan: t,
|
|
51
51
|
crossStart: n,
|
|
@@ -54,25 +54,25 @@ function hn({
|
|
|
54
54
|
const r = t === void 0 ? e : n + t;
|
|
55
55
|
if (n === 0 && r === e)
|
|
56
56
|
return "1 / -1";
|
|
57
|
-
let i =
|
|
57
|
+
let i = tt(n, o), s = tt(r - 1, o) + 1;
|
|
58
58
|
return o && (n > 0 && i--, r < e && s++), `${i} / ${s}`;
|
|
59
59
|
}
|
|
60
60
|
function st(e, t) {
|
|
61
61
|
return Number.isInteger(e) && e >= 1 && e < t;
|
|
62
62
|
}
|
|
63
|
-
function
|
|
63
|
+
function T(e, t = "Assertion error") {
|
|
64
64
|
if (!e)
|
|
65
65
|
throw Error(t);
|
|
66
66
|
}
|
|
67
|
-
const
|
|
68
|
-
function
|
|
69
|
-
const e =
|
|
70
|
-
return
|
|
67
|
+
const qt = Gt(null);
|
|
68
|
+
function Bt() {
|
|
69
|
+
const e = _t(qt);
|
|
70
|
+
return T(
|
|
71
71
|
e,
|
|
72
72
|
"Grid Context not found; did you render a Cell or Gridline outside of a Grid?"
|
|
73
73
|
), e;
|
|
74
74
|
}
|
|
75
|
-
function
|
|
75
|
+
function yn({
|
|
76
76
|
children: e,
|
|
77
77
|
className: t,
|
|
78
78
|
column: n,
|
|
@@ -84,7 +84,7 @@ function gn({
|
|
|
84
84
|
style: a,
|
|
85
85
|
...c
|
|
86
86
|
}) {
|
|
87
|
-
const u =
|
|
87
|
+
const u = $e(i), { gutters: d, registerCell: g } = Bt(), m = q(null), y = Ve(m, r);
|
|
88
88
|
return ne(() => {
|
|
89
89
|
const f = m.current;
|
|
90
90
|
if (f !== null)
|
|
@@ -96,7 +96,7 @@ function gn({
|
|
|
96
96
|
row: s,
|
|
97
97
|
rowSpan: l
|
|
98
98
|
});
|
|
99
|
-
}, [n, o, u, g, s, l]), /* @__PURE__ */
|
|
99
|
+
}, [n, o, u, g, s, l]), /* @__PURE__ */ K(
|
|
100
100
|
"div",
|
|
101
101
|
{
|
|
102
102
|
...c,
|
|
@@ -111,24 +111,24 @@ function gn({
|
|
|
111
111
|
// Allow cells to shrink smaller than their content
|
|
112
112
|
minHeight: 0,
|
|
113
113
|
minWidth: 0,
|
|
114
|
-
gridColumn:
|
|
115
|
-
gridRow:
|
|
114
|
+
gridColumn: pt(n, o, d.column),
|
|
115
|
+
gridRow: pt(s, l, d.row)
|
|
116
116
|
},
|
|
117
117
|
children: e
|
|
118
118
|
}
|
|
119
119
|
);
|
|
120
120
|
}
|
|
121
|
-
|
|
122
|
-
let
|
|
123
|
-
function
|
|
124
|
-
return
|
|
121
|
+
yn.displayName = "Cell";
|
|
122
|
+
let We;
|
|
123
|
+
function Sn() {
|
|
124
|
+
return We === void 0 && (typeof matchMedia == "function" ? We = !!matchMedia("(pointer:coarse)").matches : We = !1), We;
|
|
125
125
|
}
|
|
126
|
-
function
|
|
126
|
+
function nt({
|
|
127
127
|
expandHitTargets: e,
|
|
128
128
|
axis: t,
|
|
129
129
|
rect: n
|
|
130
130
|
}) {
|
|
131
|
-
const o = e ?
|
|
131
|
+
const o = e ? Sn() ? t.resizeTargetMinimumSize.coarse : t.resizeTargetMinimumSize.fine : 0;
|
|
132
132
|
if (n.width < o) {
|
|
133
133
|
const r = o - n.width;
|
|
134
134
|
n = new DOMRect(
|
|
@@ -149,7 +149,7 @@ function tt({
|
|
|
149
149
|
}
|
|
150
150
|
return n;
|
|
151
151
|
}
|
|
152
|
-
function
|
|
152
|
+
function ht({
|
|
153
153
|
axis: e,
|
|
154
154
|
cells: t,
|
|
155
155
|
index: n,
|
|
@@ -175,7 +175,7 @@ function pt({
|
|
|
175
175
|
}
|
|
176
176
|
return r;
|
|
177
177
|
}
|
|
178
|
-
function
|
|
178
|
+
function vn({
|
|
179
179
|
axis: e,
|
|
180
180
|
cells: t,
|
|
181
181
|
crossTrackCount: n,
|
|
@@ -187,81 +187,81 @@ function Sn({
|
|
|
187
187
|
}) {
|
|
188
188
|
const { items: a, separators: c } = r, u = a.length;
|
|
189
189
|
let d = -1, g = -1, m = 0;
|
|
190
|
-
if (a.forEach((b,
|
|
191
|
-
b.constraintProps.disabled || (m++, d === -1 && (d =
|
|
190
|
+
if (a.forEach((b, w) => {
|
|
191
|
+
b.constraintProps.disabled || (m++, d === -1 && (d = w), g = w);
|
|
192
192
|
}), !s && m < 2)
|
|
193
193
|
return [];
|
|
194
|
-
const y = (b) => s || b > d && b <= g, f = [], S = (b,
|
|
194
|
+
const y = (b) => s || b > d && b <= g, f = [], S = (b, w, v) => ({
|
|
195
195
|
axis: r,
|
|
196
196
|
axisSize: i,
|
|
197
197
|
items: [a[b - 1], a[b]],
|
|
198
|
-
rect:
|
|
198
|
+
rect: w,
|
|
199
199
|
separator: v
|
|
200
|
-
}), p = (b,
|
|
200
|
+
}), p = (b, w) => {
|
|
201
201
|
let v;
|
|
202
|
-
for (const
|
|
203
|
-
const
|
|
204
|
-
if (
|
|
205
|
-
const
|
|
206
|
-
if (
|
|
207
|
-
const
|
|
208
|
-
v = v === void 0 ?
|
|
202
|
+
for (const $ of t) {
|
|
203
|
+
const O = e === "column" ? $.row : $.column, R = e === "column" ? $.rowSpan : $.columnSpan;
|
|
204
|
+
if (w === "start" ? O === b : O + R - 1 === b) {
|
|
205
|
+
const E = $.element.getBoundingClientRect();
|
|
206
|
+
if (w === "start") {
|
|
207
|
+
const P = e === "column" ? E.top : E.left;
|
|
208
|
+
v = v === void 0 ? P : Math.min(v, P);
|
|
209
209
|
} else {
|
|
210
|
-
const
|
|
211
|
-
v = v === void 0 ?
|
|
210
|
+
const P = e === "column" ? E.bottom : E.right;
|
|
211
|
+
v = v === void 0 ? P : Math.max(v, P);
|
|
212
212
|
}
|
|
213
213
|
}
|
|
214
214
|
}
|
|
215
215
|
return v;
|
|
216
216
|
}, h = /* @__PURE__ */ new Set();
|
|
217
217
|
for (const b of c) {
|
|
218
|
-
const
|
|
219
|
-
if (!
|
|
218
|
+
const w = l.get(b);
|
|
219
|
+
if (!w || w.index < 1 || w.index >= u || (h.add(w.index), !s && (b.disabled || b.element.hasAttribute("aria-disabled"))) || !y(w.index))
|
|
220
220
|
continue;
|
|
221
221
|
let v = b.element.getBoundingClientRect();
|
|
222
|
-
const { crossSpan:
|
|
223
|
-
let
|
|
224
|
-
if (
|
|
225
|
-
const
|
|
226
|
-
|
|
222
|
+
const { crossSpan: $, crossStart: O } = w, R = $ === void 0 ? n : O + $;
|
|
223
|
+
let E = e === "column" ? v.top : v.left, P = e === "column" ? v.bottom : v.right;
|
|
224
|
+
if (O > 0) {
|
|
225
|
+
const z = p(O - 1, "end");
|
|
226
|
+
z !== void 0 && z < E && (E = z);
|
|
227
227
|
}
|
|
228
|
-
if (
|
|
229
|
-
const
|
|
230
|
-
|
|
228
|
+
if (R < n) {
|
|
229
|
+
const z = p(R, "start");
|
|
230
|
+
z !== void 0 && z > P && (P = z);
|
|
231
231
|
}
|
|
232
|
-
v = e === "column" ? new DOMRect(v.x,
|
|
232
|
+
v = e === "column" ? new DOMRect(v.x, E, v.width, P - E) : new DOMRect(E, v.y, P - E, v.height), v = nt({ expandHitTargets: o, axis: r, rect: v }), s ? f.push(S(w.index, v, b)) : ht({
|
|
233
233
|
axis: e,
|
|
234
234
|
cells: t,
|
|
235
|
-
index:
|
|
235
|
+
index: w.index,
|
|
236
236
|
rect: v
|
|
237
|
-
}).forEach((
|
|
238
|
-
f.push(S(
|
|
237
|
+
}).forEach((z) => {
|
|
238
|
+
f.push(S(w.index, z, b));
|
|
239
239
|
});
|
|
240
240
|
}
|
|
241
|
-
const
|
|
242
|
-
|
|
241
|
+
const I = (b, w) => {
|
|
242
|
+
ht({
|
|
243
243
|
axis: e,
|
|
244
244
|
cells: t,
|
|
245
245
|
index: b,
|
|
246
|
-
rect:
|
|
246
|
+
rect: nt({ expandHitTargets: o, axis: r, rect: w })
|
|
247
247
|
}).forEach((v) => {
|
|
248
248
|
f.push(S(b, v));
|
|
249
249
|
});
|
|
250
|
-
},
|
|
250
|
+
}, x = Array.from(
|
|
251
251
|
{ length: n },
|
|
252
252
|
() => new Array(u)
|
|
253
253
|
);
|
|
254
254
|
for (const b of t) {
|
|
255
|
-
const [
|
|
256
|
-
for (let
|
|
257
|
-
for (let
|
|
258
|
-
|
|
255
|
+
const [w, v, $, O] = e === "column" ? [b.column, b.columnSpan, b.row, b.rowSpan] : [b.row, b.rowSpan, b.column, b.columnSpan];
|
|
256
|
+
for (let R = Math.max(0, $); R < Math.min(n, $ + O); R++)
|
|
257
|
+
for (let E = Math.max(0, w); E < Math.min(u, w + v); E++)
|
|
258
|
+
x[R][E] ??= b;
|
|
259
259
|
}
|
|
260
|
-
const C = /* @__PURE__ */ new Map(),
|
|
261
|
-
let
|
|
262
|
-
if (!
|
|
260
|
+
const C = /* @__PURE__ */ new Map(), N = (b) => {
|
|
261
|
+
let w = C.get(b);
|
|
262
|
+
if (!w) {
|
|
263
263
|
const v = b.element.getBoundingClientRect();
|
|
264
|
-
|
|
264
|
+
w = e === "column" ? {
|
|
265
265
|
crossEnd: v.bottom,
|
|
266
266
|
crossStart: v.top,
|
|
267
267
|
end: v.right,
|
|
@@ -271,48 +271,48 @@ function Sn({
|
|
|
271
271
|
crossStart: v.left,
|
|
272
272
|
end: v.bottom,
|
|
273
273
|
start: v.top
|
|
274
|
-
}, C.set(b,
|
|
274
|
+
}, C.set(b, w);
|
|
275
275
|
}
|
|
276
|
-
return
|
|
277
|
-
}, D = ({ crossEnd: b, crossStart:
|
|
276
|
+
return w;
|
|
277
|
+
}, D = ({ crossEnd: b, crossStart: w, end: v, start: $ }) => e === "column" ? new DOMRect($, w, v - $, b - w) : new DOMRect(w, $, b - w, v - $);
|
|
278
278
|
for (let b = 1; b < u; b++) {
|
|
279
279
|
if (h.has(b) || !y(b))
|
|
280
280
|
continue;
|
|
281
|
-
let
|
|
281
|
+
let w;
|
|
282
282
|
for (let v = 0; v < n; v++) {
|
|
283
|
-
const
|
|
284
|
-
let
|
|
285
|
-
if ((
|
|
286
|
-
const
|
|
287
|
-
|
|
288
|
-
|
|
283
|
+
const $ = x[v][b - 1], O = x[v][b];
|
|
284
|
+
let R;
|
|
285
|
+
if (($ || O) && $ !== O) {
|
|
286
|
+
const E = $ ? N($) : void 0, P = O ? N(O) : void 0, z = E?.end ?? P.start, M = P?.start ?? E.end, B = Math.max(
|
|
287
|
+
E?.crossStart ?? -1 / 0,
|
|
288
|
+
P?.crossStart ?? -1 / 0
|
|
289
289
|
), J = Math.min(
|
|
290
|
-
|
|
291
|
-
|
|
290
|
+
E?.crossEnd ?? 1 / 0,
|
|
291
|
+
P?.crossEnd ?? 1 / 0
|
|
292
292
|
);
|
|
293
|
-
|
|
294
|
-
crossEnd: Math.max(
|
|
295
|
-
crossStart:
|
|
296
|
-
end: Math.max(
|
|
297
|
-
start: Math.min(
|
|
293
|
+
R = {
|
|
294
|
+
crossEnd: Math.max(B, J),
|
|
295
|
+
crossStart: B,
|
|
296
|
+
end: Math.max(z, M),
|
|
297
|
+
start: Math.min(z, M)
|
|
298
298
|
};
|
|
299
299
|
}
|
|
300
|
-
|
|
301
|
-
crossEnd: Math.max(
|
|
302
|
-
crossStart: Math.min(
|
|
303
|
-
end: Math.max(
|
|
304
|
-
start: Math.min(
|
|
305
|
-
} :
|
|
306
|
-
}
|
|
307
|
-
|
|
300
|
+
R ? w = w ? {
|
|
301
|
+
crossEnd: Math.max(w.crossEnd, R.crossEnd),
|
|
302
|
+
crossStart: Math.min(w.crossStart, R.crossStart),
|
|
303
|
+
end: Math.max(w.end, R.end),
|
|
304
|
+
start: Math.min(w.start, R.start)
|
|
305
|
+
} : R : w && (I(b, D(w)), w = void 0);
|
|
306
|
+
}
|
|
307
|
+
w && I(b, D(w));
|
|
308
308
|
}
|
|
309
309
|
return f;
|
|
310
310
|
}
|
|
311
|
-
function
|
|
311
|
+
function ae(e) {
|
|
312
312
|
const t = parseFloat(e ?? "");
|
|
313
313
|
return Number.isFinite(t) ? t : 0;
|
|
314
314
|
}
|
|
315
|
-
function
|
|
315
|
+
function bn({
|
|
316
316
|
axis: e,
|
|
317
317
|
element: t,
|
|
318
318
|
gutterSizes: n,
|
|
@@ -325,7 +325,7 @@ function vn({
|
|
|
325
325
|
const f = c.trim().split(/\s+/);
|
|
326
326
|
if (f.length === l && f.every((S) => /^-?[\d.]+px$/.test(S))) {
|
|
327
327
|
const S = i.map(
|
|
328
|
-
(p, h) =>
|
|
328
|
+
(p, h) => ae(f[o ? h * 2 : h])
|
|
329
329
|
);
|
|
330
330
|
return {
|
|
331
331
|
availableSize: S.reduce((p, h) => p + h, 0),
|
|
@@ -333,7 +333,7 @@ function vn({
|
|
|
333
333
|
};
|
|
334
334
|
}
|
|
335
335
|
}
|
|
336
|
-
const u = e === "column" ? t.offsetWidth : t.offsetHeight, d = e === "column" ?
|
|
336
|
+
const u = e === "column" ? t.offsetWidth : t.offsetHeight, d = e === "column" ? ae(a?.paddingLeft) + ae(a?.paddingRight) + ae(a?.borderLeftWidth) + ae(a?.borderRightWidth) : ae(a?.paddingTop) + ae(a?.paddingBottom) + ae(a?.borderTopWidth) + ae(a?.borderBottomWidth), g = ae(e === "column" ? a?.columnGap : a?.rowGap), m = n.reduce((f, S) => f + S, 0), y = Math.max(
|
|
337
337
|
0,
|
|
338
338
|
u - d - g * Math.max(0, l - 1) - m
|
|
339
339
|
);
|
|
@@ -344,7 +344,7 @@ function vn({
|
|
|
344
344
|
)
|
|
345
345
|
};
|
|
346
346
|
}
|
|
347
|
-
function
|
|
347
|
+
function Vt(e) {
|
|
348
348
|
switch (typeof e) {
|
|
349
349
|
case "number":
|
|
350
350
|
return [e, "px"];
|
|
@@ -354,7 +354,7 @@ function Bt(e) {
|
|
|
354
354
|
}
|
|
355
355
|
}
|
|
356
356
|
}
|
|
357
|
-
class
|
|
357
|
+
class Ht {
|
|
358
358
|
#e = {};
|
|
359
359
|
addListener(t, n) {
|
|
360
360
|
const o = this.#e[t];
|
|
@@ -393,70 +393,70 @@ class Vt {
|
|
|
393
393
|
}
|
|
394
394
|
}
|
|
395
395
|
}
|
|
396
|
-
let
|
|
396
|
+
let V = {
|
|
397
397
|
cursorFlags: 0,
|
|
398
398
|
state: "inactive"
|
|
399
399
|
};
|
|
400
|
-
const at = new
|
|
401
|
-
function
|
|
402
|
-
return
|
|
400
|
+
const at = new Ht();
|
|
401
|
+
function de() {
|
|
402
|
+
return V;
|
|
403
403
|
}
|
|
404
|
-
function
|
|
404
|
+
function jt(e) {
|
|
405
405
|
return at.addListener("change", e);
|
|
406
406
|
}
|
|
407
|
-
function
|
|
408
|
-
const r =
|
|
409
|
-
i.cursorFlags = e, i.state === "active" && (i.didPointerMove ||= o, i.previews = t, n && (i.previewLayoutMap = n)),
|
|
407
|
+
function xn(e, t = [], n, o = !1) {
|
|
408
|
+
const r = V, i = { ...V };
|
|
409
|
+
i.cursorFlags = e, i.state === "active" && (i.didPointerMove ||= o, i.previews = t, n && (i.previewLayoutMap = n)), V = i, at.emit("change", {
|
|
410
410
|
prev: r,
|
|
411
411
|
next: i
|
|
412
412
|
});
|
|
413
413
|
}
|
|
414
|
-
function
|
|
415
|
-
const t =
|
|
416
|
-
|
|
414
|
+
function ue(e) {
|
|
415
|
+
const t = V;
|
|
416
|
+
V = e, t.state === "active" && e.state !== "active" && t.didPointerMove && t.hitRegions.forEach(({ separator: n }) => {
|
|
417
417
|
n && n.element.ownerDocument.activeElement === n.element && n.element.blur();
|
|
418
418
|
}), at.emit("change", {
|
|
419
419
|
prev: t,
|
|
420
420
|
next: e
|
|
421
421
|
});
|
|
422
422
|
}
|
|
423
|
-
function
|
|
424
|
-
|
|
425
|
-
...
|
|
426
|
-
previews:
|
|
423
|
+
function wn(e) {
|
|
424
|
+
V.state !== "active" || !V.previews.some((t) => t.separator === e) || ue({
|
|
425
|
+
...V,
|
|
426
|
+
previews: V.previews.map(
|
|
427
427
|
(t) => t.separator === e ? { ...t } : t
|
|
428
428
|
)
|
|
429
429
|
});
|
|
430
430
|
}
|
|
431
|
-
function
|
|
432
|
-
if (
|
|
431
|
+
function zn(e) {
|
|
432
|
+
if (V.state === "inactive")
|
|
433
433
|
return !1;
|
|
434
|
-
const t =
|
|
435
|
-
if (t.length ===
|
|
434
|
+
const t = V.hitRegions.filter((o) => o.axis !== e), n = V.state === "active" && V.previews.some((o) => o.axis === e);
|
|
435
|
+
if (t.length === V.hitRegions.length && !n)
|
|
436
436
|
return !1;
|
|
437
437
|
if (t.length === 0)
|
|
438
|
-
|
|
439
|
-
else if (
|
|
440
|
-
const o = new Map(
|
|
441
|
-
o.delete(e), r.delete(e),
|
|
442
|
-
...
|
|
438
|
+
ue({ cursorFlags: 0, state: "inactive" });
|
|
439
|
+
else if (V.state === "active") {
|
|
440
|
+
const o = new Map(V.initialLayoutMap), r = new Map(V.previewLayoutMap);
|
|
441
|
+
o.delete(e), r.delete(e), ue({
|
|
442
|
+
...V,
|
|
443
443
|
cursorFlags: 0,
|
|
444
444
|
hitRegions: t,
|
|
445
445
|
initialLayoutMap: o,
|
|
446
446
|
previewLayoutMap: r,
|
|
447
|
-
previews:
|
|
447
|
+
previews: V.previews.filter((i) => i.axis !== e)
|
|
448
448
|
});
|
|
449
449
|
} else
|
|
450
|
-
|
|
450
|
+
ue({ ...V, hitRegions: t });
|
|
451
451
|
return !0;
|
|
452
452
|
}
|
|
453
|
-
const
|
|
454
|
-
},
|
|
455
|
-
let
|
|
456
|
-
function
|
|
457
|
-
return
|
|
453
|
+
const In = (e) => e, et = () => {
|
|
454
|
+
}, Ut = 1, Wt = 2, Yt = 4, Kt = 8, gt = 3, yt = 12;
|
|
455
|
+
let Ye;
|
|
456
|
+
function St() {
|
|
457
|
+
return Ye === void 0 && (Ye = !1, typeof window < "u" && (window.navigator.userAgent.includes("Chrome") || window.navigator.userAgent.includes("Firefox")) && (Ye = !0)), Ye;
|
|
458
458
|
}
|
|
459
|
-
function
|
|
459
|
+
function Ln({
|
|
460
460
|
cursorFlags: e,
|
|
461
461
|
axes: t,
|
|
462
462
|
state: n
|
|
@@ -482,8 +482,8 @@ function In({
|
|
|
482
482
|
if (!(o === 0 && r === 0)) {
|
|
483
483
|
switch (n) {
|
|
484
484
|
case "active": {
|
|
485
|
-
if (e &&
|
|
486
|
-
const i = (e &
|
|
485
|
+
if (e && St()) {
|
|
486
|
+
const i = (e & Ut) !== 0, s = (e & Wt) !== 0, l = (e & Yt) !== 0, a = (e & Kt) !== 0;
|
|
487
487
|
if (i)
|
|
488
488
|
return l ? "se-resize" : a ? "ne-resize" : "e-resize";
|
|
489
489
|
if (s)
|
|
@@ -496,23 +496,23 @@ function In({
|
|
|
496
496
|
break;
|
|
497
497
|
}
|
|
498
498
|
}
|
|
499
|
-
return
|
|
499
|
+
return St() ? o > 0 && r > 0 ? "move" : o > 0 ? "ew-resize" : "ns-resize" : o > 0 && r > 0 ? "grab" : o > 0 ? "col-resize" : "row-resize";
|
|
500
500
|
}
|
|
501
501
|
}
|
|
502
|
-
const
|
|
503
|
-
function
|
|
502
|
+
const vt = /* @__PURE__ */ new WeakMap();
|
|
503
|
+
function _e(e) {
|
|
504
504
|
if (!e.defaultView || !e.adoptedStyleSheets)
|
|
505
505
|
return;
|
|
506
|
-
let { prevStyle: t, styleSheet: n } =
|
|
506
|
+
let { prevStyle: t, styleSheet: n } = vt.get(e) ?? {};
|
|
507
507
|
n === void 0 && (n = new e.defaultView.CSSStyleSheet(), e.adoptedStyleSheets && (Object.isExtensible(e.adoptedStyleSheets) ? e.adoptedStyleSheets.push(n) : e.adoptedStyleSheets = [
|
|
508
508
|
...e.adoptedStyleSheets,
|
|
509
509
|
n
|
|
510
510
|
]));
|
|
511
|
-
const o =
|
|
511
|
+
const o = de();
|
|
512
512
|
switch (o.state) {
|
|
513
513
|
case "active":
|
|
514
514
|
case "hover": {
|
|
515
|
-
const r =
|
|
515
|
+
const r = Ln({
|
|
516
516
|
cursorFlags: o.cursorFlags,
|
|
517
517
|
axes: o.hitRegions.map((s) => s.axis),
|
|
518
518
|
state: o.state
|
|
@@ -527,38 +527,39 @@ function Ge(e) {
|
|
|
527
527
|
break;
|
|
528
528
|
}
|
|
529
529
|
}
|
|
530
|
-
|
|
530
|
+
vt.set(e, {
|
|
531
531
|
prevStyle: t,
|
|
532
532
|
styleSheet: n
|
|
533
533
|
});
|
|
534
534
|
}
|
|
535
|
-
function
|
|
535
|
+
function ke({
|
|
536
536
|
axis: e
|
|
537
537
|
}) {
|
|
538
538
|
const { layoutStrategy: t, orientation: n, items: o } = e;
|
|
539
539
|
return t ? t.calculateAvailableSize() : o.reduce((r, i) => (r += n === "horizontal" ? i.element.offsetWidth : i.element.offsetHeight, r), 0);
|
|
540
540
|
}
|
|
541
|
-
function
|
|
541
|
+
function lt(e, t) {
|
|
542
|
+
const n = e.compareDocumentPosition(t);
|
|
543
|
+
return n & Node.DOCUMENT_POSITION_DISCONNECTED ? 0 : n & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : n & Node.DOCUMENT_POSITION_PRECEDING ? 1 : 0;
|
|
544
|
+
}
|
|
545
|
+
function Ne(e, t) {
|
|
542
546
|
return Array.from(t).sort((n, o) => {
|
|
543
|
-
const r = e === "horizontal" ?
|
|
544
|
-
|
|
545
|
-
return r;
|
|
546
|
-
const i = n.element.compareDocumentPosition(o.element);
|
|
547
|
-
return i & Node.DOCUMENT_POSITION_DISCONNECTED ? 0 : i & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : i & Node.DOCUMENT_POSITION_PRECEDING ? 1 : 0;
|
|
547
|
+
const r = e === "horizontal" ? Cn(n, o) : Rn(n, o);
|
|
548
|
+
return r !== 0 ? r : lt(n.element, o.element);
|
|
548
549
|
});
|
|
549
550
|
}
|
|
550
|
-
function
|
|
551
|
+
function Cn(e, t) {
|
|
551
552
|
const n = e.element.offsetLeft - t.element.offsetLeft;
|
|
552
553
|
return n !== 0 ? n : e.element.offsetWidth - t.element.offsetWidth;
|
|
553
554
|
}
|
|
554
|
-
function
|
|
555
|
+
function Rn(e, t) {
|
|
555
556
|
const n = e.element.offsetTop - t.element.offsetTop;
|
|
556
557
|
return n !== 0 ? n : e.element.offsetHeight - t.element.offsetHeight;
|
|
557
558
|
}
|
|
558
559
|
function ot(e) {
|
|
559
560
|
return e !== null && typeof e == "object" && "nodeType" in e && e.nodeType === Node.ELEMENT_NODE;
|
|
560
561
|
}
|
|
561
|
-
function
|
|
562
|
+
function Xt(e, t) {
|
|
562
563
|
return {
|
|
563
564
|
x: e.x >= t.left && e.x <= t.right ? 0 : Math.min(
|
|
564
565
|
Math.abs(e.x - t.left),
|
|
@@ -570,7 +571,7 @@ function Kt(e, t) {
|
|
|
570
571
|
)
|
|
571
572
|
};
|
|
572
573
|
}
|
|
573
|
-
function
|
|
574
|
+
function Mn({
|
|
574
575
|
orientation: e,
|
|
575
576
|
rects: t,
|
|
576
577
|
targetRect: n
|
|
@@ -581,12 +582,12 @@ function Rn({
|
|
|
581
582
|
};
|
|
582
583
|
let r, i = Number.MAX_VALUE;
|
|
583
584
|
for (const s of t) {
|
|
584
|
-
const { x: l, y: a } =
|
|
585
|
+
const { x: l, y: a } = Xt(o, s), c = e === "horizontal" ? l : a;
|
|
585
586
|
c < i && (i = c, r = s);
|
|
586
587
|
}
|
|
587
|
-
return
|
|
588
|
+
return T(r, "No rect found"), r;
|
|
588
589
|
}
|
|
589
|
-
function
|
|
590
|
+
function ct({
|
|
590
591
|
expandHitTargets: e = !0,
|
|
591
592
|
axis: t,
|
|
592
593
|
includeDisabled: n = !1
|
|
@@ -597,7 +598,7 @@ function lt({
|
|
|
597
598
|
axis: t,
|
|
598
599
|
includeDisabled: n
|
|
599
600
|
});
|
|
600
|
-
const { element: o, orientation: r, items: i, separators: s } = t, l =
|
|
601
|
+
const { element: o, orientation: r, items: i, separators: s } = t, l = Ne(
|
|
601
602
|
r,
|
|
602
603
|
Array.from(o.children).filter(ot).filter((p) => !p.hasAttribute("data-resize-preview")).map((p) => ({ element: p }))
|
|
603
604
|
).map(({ element: p }) => p), a = [];
|
|
@@ -612,113 +613,113 @@ function lt({
|
|
|
612
613
|
for (const h of l)
|
|
613
614
|
if (h.hasAttribute("data-panel")) {
|
|
614
615
|
p++;
|
|
615
|
-
const
|
|
616
|
-
(
|
|
616
|
+
const I = i.find(
|
|
617
|
+
(x) => x.element === h
|
|
617
618
|
);
|
|
618
|
-
if (
|
|
619
|
+
if (I) {
|
|
619
620
|
if (f) {
|
|
620
|
-
const
|
|
621
|
-
let
|
|
621
|
+
const x = f.element.getBoundingClientRect(), C = h.getBoundingClientRect();
|
|
622
|
+
let N;
|
|
622
623
|
if (u) {
|
|
623
624
|
const D = r === "horizontal" ? new DOMRect(
|
|
624
|
-
|
|
625
|
-
|
|
625
|
+
x.right,
|
|
626
|
+
x.top,
|
|
626
627
|
0,
|
|
627
|
-
|
|
628
|
+
x.height
|
|
628
629
|
) : new DOMRect(
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
630
|
+
x.left,
|
|
631
|
+
x.bottom,
|
|
632
|
+
x.width,
|
|
632
633
|
0
|
|
633
634
|
), b = r === "horizontal" ? new DOMRect(C.left, C.top, 0, C.height) : new DOMRect(C.left, C.top, C.width, 0);
|
|
634
635
|
switch (S.length) {
|
|
635
636
|
case 0: {
|
|
636
|
-
|
|
637
|
+
N = [
|
|
637
638
|
D,
|
|
638
639
|
b
|
|
639
640
|
];
|
|
640
641
|
break;
|
|
641
642
|
}
|
|
642
643
|
case 1: {
|
|
643
|
-
const
|
|
644
|
+
const w = S[0], v = Mn({
|
|
644
645
|
orientation: r,
|
|
645
|
-
rects: [
|
|
646
|
-
targetRect:
|
|
646
|
+
rects: [x, C],
|
|
647
|
+
targetRect: w.element.getBoundingClientRect()
|
|
647
648
|
});
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
v ===
|
|
649
|
+
N = [
|
|
650
|
+
w,
|
|
651
|
+
v === x ? b : D
|
|
651
652
|
];
|
|
652
653
|
break;
|
|
653
654
|
}
|
|
654
655
|
default: {
|
|
655
|
-
|
|
656
|
+
N = S;
|
|
656
657
|
break;
|
|
657
658
|
}
|
|
658
659
|
}
|
|
659
660
|
} else
|
|
660
|
-
S.length ?
|
|
661
|
+
S.length ? N = S : N = [
|
|
661
662
|
r === "horizontal" ? new DOMRect(
|
|
662
|
-
|
|
663
|
+
x.right,
|
|
663
664
|
C.top,
|
|
664
|
-
C.left -
|
|
665
|
+
C.left - x.right,
|
|
665
666
|
C.height
|
|
666
667
|
) : new DOMRect(
|
|
667
668
|
C.left,
|
|
668
|
-
|
|
669
|
+
x.bottom,
|
|
669
670
|
C.width,
|
|
670
|
-
C.top -
|
|
671
|
+
C.top - x.bottom
|
|
671
672
|
)
|
|
672
673
|
];
|
|
673
|
-
for (const D of
|
|
674
|
-
const b =
|
|
674
|
+
for (const D of N) {
|
|
675
|
+
const b = nt({
|
|
675
676
|
expandHitTargets: e,
|
|
676
677
|
axis: t,
|
|
677
678
|
rect: "width" in D ? D : D.element.getBoundingClientRect()
|
|
678
|
-
}),
|
|
679
|
-
(n || !c && !
|
|
679
|
+
}), w = p <= d || p > m;
|
|
680
|
+
(n || !c && !w) && (g ??= ke({ axis: t }), a.push({
|
|
680
681
|
axis: t,
|
|
681
682
|
axisSize: g,
|
|
682
|
-
items: [f,
|
|
683
|
+
items: [f, I],
|
|
683
684
|
separator: "width" in D ? void 0 : D,
|
|
684
685
|
rect: b
|
|
685
686
|
})), c = !1;
|
|
686
687
|
}
|
|
687
688
|
}
|
|
688
|
-
u = !1, f =
|
|
689
|
+
u = !1, f = I, S = [];
|
|
689
690
|
}
|
|
690
691
|
} else if (h.hasAttribute("data-separator")) {
|
|
691
692
|
h.ariaDisabled !== null && (c = !0);
|
|
692
|
-
const
|
|
693
|
-
(
|
|
693
|
+
const I = s.find(
|
|
694
|
+
(x) => x.element === h
|
|
694
695
|
);
|
|
695
|
-
|
|
696
|
+
I ? S.push(I) : (f = void 0, S = []);
|
|
696
697
|
} else
|
|
697
698
|
u = !0;
|
|
698
699
|
}
|
|
699
700
|
return a;
|
|
700
701
|
}
|
|
701
|
-
function
|
|
702
|
+
function En(e, t) {
|
|
702
703
|
const n = getComputedStyle(e), o = parseFloat(n.fontSize);
|
|
703
704
|
return t * o;
|
|
704
705
|
}
|
|
705
|
-
function
|
|
706
|
+
function Pn(e, t) {
|
|
706
707
|
const n = getComputedStyle(e.ownerDocument.documentElement), o = parseFloat(n.fontSize);
|
|
707
708
|
return t * o;
|
|
708
709
|
}
|
|
709
|
-
function
|
|
710
|
+
function kn(e) {
|
|
710
711
|
return e / 100 * window.innerHeight;
|
|
711
712
|
}
|
|
712
|
-
function
|
|
713
|
+
function $n(e) {
|
|
713
714
|
return e / 100 * window.innerWidth;
|
|
714
715
|
}
|
|
715
|
-
function
|
|
716
|
+
function Ce({
|
|
716
717
|
axisSize: e,
|
|
717
718
|
itemElement: t,
|
|
718
719
|
styleProp: n
|
|
719
720
|
}) {
|
|
720
721
|
let o;
|
|
721
|
-
const [r, i] =
|
|
722
|
+
const [r, i] = Vt(n);
|
|
722
723
|
switch (i) {
|
|
723
724
|
case "%": {
|
|
724
725
|
o = r / 100 * e;
|
|
@@ -729,19 +730,19 @@ function Le({
|
|
|
729
730
|
break;
|
|
730
731
|
}
|
|
731
732
|
case "rem": {
|
|
732
|
-
o =
|
|
733
|
+
o = Pn(t, r);
|
|
733
734
|
break;
|
|
734
735
|
}
|
|
735
736
|
case "em": {
|
|
736
|
-
o =
|
|
737
|
+
o = En(t, r);
|
|
737
738
|
break;
|
|
738
739
|
}
|
|
739
740
|
case "vh": {
|
|
740
|
-
o =
|
|
741
|
+
o = kn(r);
|
|
741
742
|
break;
|
|
742
743
|
}
|
|
743
744
|
case "vw": {
|
|
744
|
-
o =
|
|
745
|
+
o = $n(r);
|
|
745
746
|
break;
|
|
746
747
|
}
|
|
747
748
|
}
|
|
@@ -751,7 +752,7 @@ function X(e) {
|
|
|
751
752
|
return parseFloat(e.toFixed(3));
|
|
752
753
|
}
|
|
753
754
|
function rt(e) {
|
|
754
|
-
const { items: t } = e, n =
|
|
755
|
+
const { items: t } = e, n = ke({ axis: e });
|
|
755
756
|
return n === 0 ? t.map((o) => ({
|
|
756
757
|
groupResizeBehavior: o.constraintProps.groupResizeBehavior,
|
|
757
758
|
collapsedSize: 0,
|
|
@@ -765,7 +766,7 @@ function rt(e) {
|
|
|
765
766
|
const { element: r, constraintProps: i } = o;
|
|
766
767
|
let s = 0;
|
|
767
768
|
if (i.collapsedSize !== void 0) {
|
|
768
|
-
const d =
|
|
769
|
+
const d = Ce({
|
|
769
770
|
axisSize: n,
|
|
770
771
|
itemElement: r,
|
|
771
772
|
styleProp: i.collapsedSize
|
|
@@ -774,7 +775,7 @@ function rt(e) {
|
|
|
774
775
|
}
|
|
775
776
|
let l;
|
|
776
777
|
if (i.collapsedThreshold !== void 0) {
|
|
777
|
-
const d =
|
|
778
|
+
const d = Ce({
|
|
778
779
|
axisSize: n,
|
|
779
780
|
itemElement: r,
|
|
780
781
|
styleProp: i.collapsedThreshold
|
|
@@ -783,7 +784,7 @@ function rt(e) {
|
|
|
783
784
|
}
|
|
784
785
|
let a;
|
|
785
786
|
if (i.defaultSize !== void 0) {
|
|
786
|
-
const d =
|
|
787
|
+
const d = Ce({
|
|
787
788
|
axisSize: n,
|
|
788
789
|
itemElement: r,
|
|
789
790
|
styleProp: i.defaultSize
|
|
@@ -792,7 +793,7 @@ function rt(e) {
|
|
|
792
793
|
}
|
|
793
794
|
let c = 0;
|
|
794
795
|
if (i.minSize !== void 0) {
|
|
795
|
-
const d =
|
|
796
|
+
const d = Ce({
|
|
796
797
|
axisSize: n,
|
|
797
798
|
itemElement: r,
|
|
798
799
|
styleProp: i.minSize
|
|
@@ -801,7 +802,7 @@ function rt(e) {
|
|
|
801
802
|
}
|
|
802
803
|
let u = 100;
|
|
803
804
|
if (i.maxSize !== void 0) {
|
|
804
|
-
const d =
|
|
805
|
+
const d = Ce({
|
|
805
806
|
axisSize: n,
|
|
806
807
|
itemElement: r,
|
|
807
808
|
styleProp: i.maxSize
|
|
@@ -821,34 +822,34 @@ function rt(e) {
|
|
|
821
822
|
};
|
|
822
823
|
});
|
|
823
824
|
}
|
|
824
|
-
let
|
|
825
|
-
const
|
|
826
|
-
function
|
|
827
|
-
|
|
825
|
+
let ce = /* @__PURE__ */ new Map();
|
|
826
|
+
const Jt = new Ht();
|
|
827
|
+
function An(e) {
|
|
828
|
+
ce = new Map(ce), ce.delete(e);
|
|
828
829
|
}
|
|
829
|
-
function
|
|
830
|
-
for (const [n] of
|
|
830
|
+
function Me(e, t) {
|
|
831
|
+
for (const [n] of ce)
|
|
831
832
|
if (n.id === e)
|
|
832
833
|
return n;
|
|
833
834
|
}
|
|
834
|
-
function
|
|
835
|
-
for (const [n, o] of
|
|
835
|
+
function se(e, t) {
|
|
836
|
+
for (const [n, o] of ce)
|
|
836
837
|
if (n.id === e)
|
|
837
838
|
return o;
|
|
838
839
|
if (t)
|
|
839
840
|
throw Error(`Could not find data for Group with id ${e}`);
|
|
840
841
|
}
|
|
841
|
-
function
|
|
842
|
-
return
|
|
842
|
+
function ye() {
|
|
843
|
+
return ce;
|
|
843
844
|
}
|
|
844
|
-
function
|
|
845
|
-
return
|
|
845
|
+
function Fe(e, t) {
|
|
846
|
+
return Jt.addListener("axisChange", (n) => {
|
|
846
847
|
n.axis.id === e && t(n);
|
|
847
848
|
});
|
|
848
849
|
}
|
|
849
|
-
function
|
|
850
|
-
const o =
|
|
851
|
-
|
|
850
|
+
function fe(e, t, n) {
|
|
851
|
+
const o = ce.get(e);
|
|
852
|
+
ce = new Map(ce), ce.set(e, t), Jt.emit("axisChange", {
|
|
852
853
|
axis: e,
|
|
853
854
|
isUserInteraction: n?.isUserInteraction === !0,
|
|
854
855
|
prev: o,
|
|
@@ -863,13 +864,13 @@ function Tn(e, t) {
|
|
|
863
864
|
return !1;
|
|
864
865
|
return !0;
|
|
865
866
|
}
|
|
866
|
-
function
|
|
867
|
+
function Y(e, t, n = 0) {
|
|
867
868
|
return Math.abs(X(e) - X(t)) <= n;
|
|
868
869
|
}
|
|
869
|
-
function
|
|
870
|
-
return
|
|
870
|
+
function le(e, t) {
|
|
871
|
+
return Y(e, t) ? 0 : e > t ? 1 : -1;
|
|
871
872
|
}
|
|
872
|
-
function
|
|
873
|
+
function Ee({
|
|
873
874
|
overrideDisabledItems: e,
|
|
874
875
|
itemConstraints: t,
|
|
875
876
|
prevSize: n,
|
|
@@ -885,15 +886,15 @@ function Me({
|
|
|
885
886
|
} = t;
|
|
886
887
|
if (l && !e)
|
|
887
888
|
return n;
|
|
888
|
-
if (
|
|
889
|
+
if (le(o, c) < 0)
|
|
889
890
|
if (s) {
|
|
890
|
-
const u = i ?? (c - r) / 2, d =
|
|
891
|
-
|
|
891
|
+
const u = i ?? (c - r) / 2, d = le(n, r) <= 0, g = d ? r + u : c - u, m = le(o, g);
|
|
892
|
+
le(o, r) <= 0 || m < 0 || i !== void 0 && d && m === 0 ? o = r : o = c;
|
|
892
893
|
} else
|
|
893
894
|
o = c;
|
|
894
895
|
return o = Math.min(a, o), o = X(o), o;
|
|
895
896
|
}
|
|
896
|
-
function
|
|
897
|
+
function qe({
|
|
897
898
|
delta: e,
|
|
898
899
|
initialLayout: t,
|
|
899
900
|
itemConstraints: n,
|
|
@@ -901,20 +902,20 @@ function Fe({
|
|
|
901
902
|
prevLayout: r,
|
|
902
903
|
trigger: i
|
|
903
904
|
}) {
|
|
904
|
-
if (
|
|
905
|
+
if (Y(e, 0))
|
|
905
906
|
return t;
|
|
906
907
|
const s = i === "imperative-api", l = n.map(
|
|
907
908
|
({ itemId: y }) => t[y]
|
|
908
909
|
), a = n.map(
|
|
909
910
|
({ itemId: y }) => r[y]
|
|
910
911
|
), c = [...l], [u, d] = o;
|
|
911
|
-
|
|
912
|
+
T(u != null, "Invalid first pivot index"), T(d != null, "Invalid second pivot index");
|
|
912
913
|
let g = 0;
|
|
913
914
|
switch (i) {
|
|
914
915
|
case "keyboard": {
|
|
915
916
|
{
|
|
916
917
|
const y = e < 0 ? d : u, f = n[y];
|
|
917
|
-
|
|
918
|
+
T(
|
|
918
919
|
f,
|
|
919
920
|
`Panel constraints not found for index ${y}`
|
|
920
921
|
);
|
|
@@ -924,19 +925,19 @@ function Fe({
|
|
|
924
925
|
minSize: h = 0
|
|
925
926
|
} = f;
|
|
926
927
|
if (p) {
|
|
927
|
-
const
|
|
928
|
-
if (
|
|
929
|
-
|
|
928
|
+
const I = l[y];
|
|
929
|
+
if (T(
|
|
930
|
+
I != null,
|
|
930
931
|
`Previous layout not found for panel index ${y}`
|
|
931
|
-
),
|
|
932
|
-
const
|
|
933
|
-
|
|
932
|
+
), Y(I, S)) {
|
|
933
|
+
const x = h - I;
|
|
934
|
+
le(x, Math.abs(e)) > 0 && (e = e < 0 ? 0 - x : x);
|
|
934
935
|
}
|
|
935
936
|
}
|
|
936
937
|
}
|
|
937
938
|
{
|
|
938
939
|
const y = e < 0 ? u : d, f = n[y];
|
|
939
|
-
|
|
940
|
+
T(
|
|
940
941
|
f,
|
|
941
942
|
`No panel constraints found for index ${y}`
|
|
942
943
|
);
|
|
@@ -946,13 +947,13 @@ function Fe({
|
|
|
946
947
|
minSize: h = 0
|
|
947
948
|
} = f;
|
|
948
949
|
if (p) {
|
|
949
|
-
const
|
|
950
|
-
if (
|
|
951
|
-
|
|
950
|
+
const I = l[y];
|
|
951
|
+
if (T(
|
|
952
|
+
I != null,
|
|
952
953
|
`Previous layout not found for panel index ${y}`
|
|
953
|
-
),
|
|
954
|
-
const
|
|
955
|
-
|
|
954
|
+
), Y(I, h)) {
|
|
955
|
+
const x = I - S;
|
|
956
|
+
le(x, Math.abs(e)) > 0 && (e = e < 0 ? 0 - x : x);
|
|
956
957
|
}
|
|
957
958
|
}
|
|
958
959
|
}
|
|
@@ -960,16 +961,16 @@ function Fe({
|
|
|
960
961
|
}
|
|
961
962
|
default: {
|
|
962
963
|
const y = e < 0 ? d : u, f = n[y];
|
|
963
|
-
|
|
964
|
+
T(
|
|
964
965
|
f,
|
|
965
966
|
`Panel constraints not found for index ${y}`
|
|
966
967
|
);
|
|
967
|
-
const S = l[y], { collapsedSize: p, collapsedThreshold: h, collapsible:
|
|
968
|
-
if (
|
|
969
|
-
const C =
|
|
970
|
-
if (
|
|
971
|
-
const b =
|
|
972
|
-
b > 0 || b === 0 &&
|
|
968
|
+
const S = l[y], { collapsedSize: p, collapsedThreshold: h, collapsible: I, minSize: x } = f;
|
|
969
|
+
if (I && le(S, x) < 0) {
|
|
970
|
+
const C = x - p, N = h ?? C / 2, D = S + Math.abs(e);
|
|
971
|
+
if (le(D, x) < 0) {
|
|
972
|
+
const b = le(Math.abs(e), N), w = h === void 0 && e < 0;
|
|
973
|
+
b > 0 || b === 0 && w ? e = e < 0 ? -C : C : e = 0;
|
|
973
974
|
}
|
|
974
975
|
}
|
|
975
976
|
break;
|
|
@@ -980,17 +981,17 @@ function Fe({
|
|
|
980
981
|
let f = e < 0 ? d : u, S = 0;
|
|
981
982
|
for (; ; ) {
|
|
982
983
|
const h = l[f];
|
|
983
|
-
|
|
984
|
+
T(
|
|
984
985
|
h != null,
|
|
985
986
|
`Previous layout not found for panel index ${f}`
|
|
986
987
|
);
|
|
987
|
-
const
|
|
988
|
+
const x = Ee({
|
|
988
989
|
overrideDisabledItems: s,
|
|
989
990
|
itemConstraints: n[f],
|
|
990
991
|
prevSize: h,
|
|
991
992
|
size: 100
|
|
992
993
|
}) - h;
|
|
993
|
-
if (S +=
|
|
994
|
+
if (S += x, f += y, f < 0 || f >= n.length)
|
|
994
995
|
break;
|
|
995
996
|
}
|
|
996
997
|
const p = Math.min(Math.abs(e), Math.abs(S));
|
|
@@ -1000,17 +1001,17 @@ function Fe({
|
|
|
1000
1001
|
let f = e < 0 ? u : d;
|
|
1001
1002
|
for (; f >= 0 && f < n.length; ) {
|
|
1002
1003
|
const S = Math.abs(e) - Math.abs(g), p = l[f];
|
|
1003
|
-
|
|
1004
|
+
T(
|
|
1004
1005
|
p != null,
|
|
1005
1006
|
`Previous layout not found for panel index ${f}`
|
|
1006
1007
|
);
|
|
1007
|
-
const h = p - S,
|
|
1008
|
+
const h = p - S, I = Ee({
|
|
1008
1009
|
overrideDisabledItems: s,
|
|
1009
1010
|
itemConstraints: n[f],
|
|
1010
1011
|
prevSize: p,
|
|
1011
1012
|
size: h
|
|
1012
1013
|
});
|
|
1013
|
-
if (!
|
|
1014
|
+
if (!Y(p, I) && (g += p - I, c[f] = I, g.toFixed(3).localeCompare(Math.abs(e).toFixed(3), void 0, {
|
|
1014
1015
|
numeric: !0
|
|
1015
1016
|
}) >= 0))
|
|
1016
1017
|
break;
|
|
@@ -1021,33 +1022,33 @@ function Fe({
|
|
|
1021
1022
|
return r;
|
|
1022
1023
|
{
|
|
1023
1024
|
const y = e < 0 ? d : u, f = l[y];
|
|
1024
|
-
|
|
1025
|
+
T(
|
|
1025
1026
|
f != null,
|
|
1026
1027
|
`Previous layout not found for panel index ${y}`
|
|
1027
1028
|
);
|
|
1028
|
-
const S = f + g, p =
|
|
1029
|
+
const S = f + g, p = Ee({
|
|
1029
1030
|
overrideDisabledItems: s,
|
|
1030
1031
|
itemConstraints: n[y],
|
|
1031
1032
|
prevSize: f,
|
|
1032
1033
|
size: S
|
|
1033
1034
|
});
|
|
1034
|
-
if (c[y] = p, !
|
|
1035
|
-
let h = S - p,
|
|
1036
|
-
for (;
|
|
1037
|
-
const C = c[
|
|
1038
|
-
|
|
1035
|
+
if (c[y] = p, !Y(p, S)) {
|
|
1036
|
+
let h = S - p, x = e < 0 ? d : u;
|
|
1037
|
+
for (; x >= 0 && x < n.length; ) {
|
|
1038
|
+
const C = c[x];
|
|
1039
|
+
T(
|
|
1039
1040
|
C != null,
|
|
1040
|
-
`Previous layout not found for panel index ${
|
|
1041
|
+
`Previous layout not found for panel index ${x}`
|
|
1041
1042
|
);
|
|
1042
|
-
const
|
|
1043
|
+
const N = C + h, D = Ee({
|
|
1043
1044
|
overrideDisabledItems: s,
|
|
1044
|
-
itemConstraints: n[
|
|
1045
|
+
itemConstraints: n[x],
|
|
1045
1046
|
prevSize: C,
|
|
1046
|
-
size:
|
|
1047
|
+
size: N
|
|
1047
1048
|
});
|
|
1048
|
-
if (
|
|
1049
|
+
if (Y(C, D) || (h -= D - C, c[x] = D), Y(h, 0))
|
|
1049
1050
|
break;
|
|
1050
|
-
e > 0 ?
|
|
1051
|
+
e > 0 ? x-- : x++;
|
|
1051
1052
|
}
|
|
1052
1053
|
}
|
|
1053
1054
|
}
|
|
@@ -1055,17 +1056,17 @@ function Fe({
|
|
|
1055
1056
|
(y, f) => f + y,
|
|
1056
1057
|
0
|
|
1057
1058
|
);
|
|
1058
|
-
return
|
|
1059
|
+
return Y(m, 100, 0.1) ? c.reduce((y, f, S) => (y[n[S].itemId] = f, y), {}) : r;
|
|
1059
1060
|
}
|
|
1060
|
-
function
|
|
1061
|
+
function ie(e, t) {
|
|
1061
1062
|
if (Object.keys(e).length !== Object.keys(t).length)
|
|
1062
1063
|
return !1;
|
|
1063
1064
|
for (const n in e)
|
|
1064
|
-
if (t[n] === void 0 ||
|
|
1065
|
+
if (t[n] === void 0 || le(e[n], t[n]) !== 0)
|
|
1065
1066
|
return !1;
|
|
1066
1067
|
return !0;
|
|
1067
1068
|
}
|
|
1068
|
-
function
|
|
1069
|
+
function ut({
|
|
1069
1070
|
commit: e,
|
|
1070
1071
|
document: t,
|
|
1071
1072
|
event: n,
|
|
@@ -1076,7 +1077,7 @@ function ct({
|
|
|
1076
1077
|
prevCursorFlags: l
|
|
1077
1078
|
}) {
|
|
1078
1079
|
let a = 0;
|
|
1079
|
-
const c =
|
|
1080
|
+
const c = de();
|
|
1080
1081
|
let u = c.state === "active" ? c.previews : [];
|
|
1081
1082
|
const d = new Map(
|
|
1082
1083
|
c.state === "active" ? c.previewLayoutMap : void 0
|
|
@@ -1085,72 +1086,72 @@ function ct({
|
|
|
1085
1086
|
const { axis: f, axisSize: S } = y, { orientation: p, items: h } = f;
|
|
1086
1087
|
if (e && f.resizePreviewMode !== "separator")
|
|
1087
1088
|
return;
|
|
1088
|
-
const { disableCursor:
|
|
1089
|
-
let
|
|
1090
|
-
s ? p === "horizontal" ?
|
|
1091
|
-
const C = r.get(f),
|
|
1092
|
-
if (!C || !
|
|
1089
|
+
const { disableCursor: I } = f.mutableState;
|
|
1090
|
+
let x = 0;
|
|
1091
|
+
s ? p === "horizontal" ? x = (n.clientX - s.x) / S * 100 : x = (n.clientY - s.y) / S * 100 : p === "horizontal" ? x = n.clientX < 0 ? -100 : 100 : x = n.clientY < 0 ? -100 : 100;
|
|
1092
|
+
const C = r.get(f), N = i.get(f);
|
|
1093
|
+
if (!C || !N)
|
|
1093
1094
|
return;
|
|
1094
1095
|
const {
|
|
1095
1096
|
defaultLayoutDeferred: D,
|
|
1096
1097
|
derivedItemConstraints: b,
|
|
1097
|
-
axisSize:
|
|
1098
|
+
axisSize: w,
|
|
1098
1099
|
layout: v,
|
|
1099
|
-
separatorToItems:
|
|
1100
|
-
} =
|
|
1101
|
-
if (b && v &&
|
|
1102
|
-
const
|
|
1103
|
-
delta:
|
|
1100
|
+
separatorToItems: $
|
|
1101
|
+
} = N;
|
|
1102
|
+
if (b && v && $) {
|
|
1103
|
+
const O = f.resizePreviewMode === "separator" ? d.get(f) ?? v : v, R = qe({
|
|
1104
|
+
delta: x,
|
|
1104
1105
|
initialLayout: C,
|
|
1105
1106
|
itemConstraints: b,
|
|
1106
|
-
pivotIndices: y.items.map((
|
|
1107
|
-
prevLayout:
|
|
1107
|
+
pivotIndices: y.items.map((E) => h.indexOf(E)),
|
|
1108
|
+
prevLayout: O,
|
|
1108
1109
|
trigger: "mouse-or-touch"
|
|
1109
1110
|
});
|
|
1110
|
-
if (f.resizePreviewMode === "separator" && !e && !
|
|
1111
|
-
d.set(f,
|
|
1112
|
-
let
|
|
1113
|
-
const
|
|
1114
|
-
u = u.map((
|
|
1115
|
-
if (
|
|
1116
|
-
return
|
|
1117
|
-
const
|
|
1118
|
-
return
|
|
1111
|
+
if (f.resizePreviewMode === "separator" && !e && !ie(R, O)) {
|
|
1112
|
+
d.set(f, R);
|
|
1113
|
+
let E = 0;
|
|
1114
|
+
const P = h.map((z) => (E += R[z.id] - C[z.id], E * (S / 100)));
|
|
1115
|
+
u = u.map((z) => {
|
|
1116
|
+
if (z.axis !== f)
|
|
1117
|
+
return z;
|
|
1118
|
+
const M = P[z.itemIndex];
|
|
1119
|
+
return M === z.offset ? z : { ...z, offset: M };
|
|
1119
1120
|
});
|
|
1120
1121
|
}
|
|
1121
|
-
if (
|
|
1122
|
+
if (ie(R, O) && x !== 0 && !I)
|
|
1122
1123
|
switch (p) {
|
|
1123
1124
|
case "horizontal": {
|
|
1124
|
-
a |=
|
|
1125
|
+
a |= x < 0 ? Ut : Wt;
|
|
1125
1126
|
break;
|
|
1126
1127
|
}
|
|
1127
1128
|
case "vertical": {
|
|
1128
|
-
a |=
|
|
1129
|
+
a |= x < 0 ? Yt : Kt;
|
|
1129
1130
|
break;
|
|
1130
1131
|
}
|
|
1131
1132
|
}
|
|
1132
|
-
(f.resizePreviewMode !== "separator" || e) && !
|
|
1133
|
+
(f.resizePreviewMode !== "separator" || e) && !ie(R, v) && fe(y.axis, {
|
|
1133
1134
|
defaultLayoutDeferred: D,
|
|
1134
1135
|
derivedItemConstraints: b,
|
|
1135
|
-
axisSize:
|
|
1136
|
-
layout:
|
|
1137
|
-
requestedAxisSize:
|
|
1138
|
-
requestedLayout:
|
|
1139
|
-
separatorToItems:
|
|
1136
|
+
axisSize: w,
|
|
1137
|
+
layout: R,
|
|
1138
|
+
requestedAxisSize: w,
|
|
1139
|
+
requestedLayout: R,
|
|
1140
|
+
separatorToItems: $
|
|
1140
1141
|
});
|
|
1141
1142
|
}
|
|
1142
1143
|
});
|
|
1143
1144
|
let g = 0;
|
|
1144
|
-
n.movementX === 0 ? g |= l &
|
|
1145
|
+
n.movementX === 0 ? g |= l & gt : g |= a & gt, n.movementY === 0 ? g |= l & yt : g |= a & yt;
|
|
1145
1146
|
const m = c.state === "active" && (n.clientX !== c.pointerDownAtPoint.x || n.clientY !== c.pointerDownAtPoint.y);
|
|
1146
|
-
|
|
1147
|
+
xn(g, u, d, m), _e(t);
|
|
1147
1148
|
}
|
|
1148
|
-
function
|
|
1149
|
-
const n =
|
|
1149
|
+
function Zt(e, t) {
|
|
1150
|
+
const n = de(), o = ye();
|
|
1150
1151
|
let r = !1;
|
|
1151
1152
|
switch (n.state) {
|
|
1152
1153
|
case "active":
|
|
1153
|
-
|
|
1154
|
+
ut({
|
|
1154
1155
|
commit: !0,
|
|
1155
1156
|
document: e,
|
|
1156
1157
|
event: t,
|
|
@@ -1159,30 +1160,30 @@ function Jt(e, t) {
|
|
|
1159
1160
|
mountedAxes: o,
|
|
1160
1161
|
pointerDownAtPoint: n.pointerDownAtPoint,
|
|
1161
1162
|
prevCursorFlags: n.cursorFlags
|
|
1162
|
-
}),
|
|
1163
|
+
}), ue({
|
|
1163
1164
|
cursorFlags: 0,
|
|
1164
1165
|
state: "inactive"
|
|
1165
|
-
}), n.hitRegions.length > 0 && (
|
|
1166
|
+
}), n.hitRegions.length > 0 && (_e(e), r = !0, n.hitRegions.forEach((i) => {
|
|
1166
1167
|
if (!o.has(i.axis))
|
|
1167
1168
|
return;
|
|
1168
|
-
const s =
|
|
1169
|
-
|
|
1169
|
+
const s = se(i.axis.id, !0);
|
|
1170
|
+
fe(i.axis, s, {
|
|
1170
1171
|
isUserInteraction: !0
|
|
1171
1172
|
});
|
|
1172
1173
|
}));
|
|
1173
1174
|
}
|
|
1174
1175
|
return r;
|
|
1175
1176
|
}
|
|
1176
|
-
function
|
|
1177
|
-
e.defaultPrevented ||
|
|
1177
|
+
function bt(e) {
|
|
1178
|
+
e.defaultPrevented || Zt(e.currentTarget, e);
|
|
1178
1179
|
}
|
|
1179
|
-
function
|
|
1180
|
+
function Dn(e, t, n) {
|
|
1180
1181
|
let o, r = {
|
|
1181
1182
|
x: 1 / 0,
|
|
1182
1183
|
y: 1 / 0
|
|
1183
1184
|
};
|
|
1184
1185
|
for (const i of t) {
|
|
1185
|
-
const s =
|
|
1186
|
+
const s = Xt(n, i.rect);
|
|
1186
1187
|
switch (e) {
|
|
1187
1188
|
case "horizontal": {
|
|
1188
1189
|
(s.x < r.x || s.x === r.x && s.y <= r.y) && (o = i, r = s);
|
|
@@ -1199,25 +1200,25 @@ function An(e, t, n) {
|
|
|
1199
1200
|
hitRegion: o
|
|
1200
1201
|
} : void 0;
|
|
1201
1202
|
}
|
|
1202
|
-
function
|
|
1203
|
+
function On(e) {
|
|
1203
1204
|
return e !== null && typeof e == "object" && "nodeType" in e && e.nodeType === Node.DOCUMENT_FRAGMENT_NODE;
|
|
1204
1205
|
}
|
|
1205
|
-
function
|
|
1206
|
+
function Nn(e, t) {
|
|
1206
1207
|
if (e === t) throw new Error("Cannot compare node with itself");
|
|
1207
1208
|
const n = {
|
|
1208
|
-
a:
|
|
1209
|
-
b:
|
|
1209
|
+
a: zt(e),
|
|
1210
|
+
b: zt(t)
|
|
1210
1211
|
};
|
|
1211
1212
|
let o;
|
|
1212
1213
|
for (; n.a.at(-1) === n.b.at(-1); )
|
|
1213
1214
|
o = n.a.pop(), n.b.pop();
|
|
1214
|
-
|
|
1215
|
+
T(
|
|
1215
1216
|
o,
|
|
1216
1217
|
"Stacking order can only be calculated for elements with a common ancestor"
|
|
1217
1218
|
);
|
|
1218
1219
|
const r = {
|
|
1219
|
-
a: xt(
|
|
1220
|
-
b: xt(
|
|
1220
|
+
a: wt(xt(n.a)),
|
|
1221
|
+
b: wt(xt(n.b))
|
|
1221
1222
|
};
|
|
1222
1223
|
if (r.a === r.b) {
|
|
1223
1224
|
const i = o.childNodes, s = {
|
|
@@ -1233,87 +1234,87 @@ function On(e, t) {
|
|
|
1233
1234
|
}
|
|
1234
1235
|
return Math.sign(r.a - r.b);
|
|
1235
1236
|
}
|
|
1236
|
-
const
|
|
1237
|
-
function
|
|
1238
|
-
const t = getComputedStyle(
|
|
1237
|
+
const Gn = /\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;
|
|
1238
|
+
function _n(e) {
|
|
1239
|
+
const t = getComputedStyle(Qt(e) ?? e).display;
|
|
1239
1240
|
return t === "flex" || t === "inline-flex";
|
|
1240
1241
|
}
|
|
1241
|
-
function
|
|
1242
|
+
function Fn(e) {
|
|
1242
1243
|
const t = getComputedStyle(e);
|
|
1243
|
-
return !!(t.position === "fixed" || t.zIndex !== "auto" && (t.position !== "static" ||
|
|
1244
|
+
return !!(t.position === "fixed" || t.zIndex !== "auto" && (t.position !== "static" || _n(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" || Gn.test(t.willChange) || t.webkitOverflowScrolling === "touch");
|
|
1244
1245
|
}
|
|
1245
|
-
function
|
|
1246
|
+
function xt(e) {
|
|
1246
1247
|
let t = e.length;
|
|
1247
1248
|
for (; t--; ) {
|
|
1248
1249
|
const n = e[t];
|
|
1249
|
-
if (
|
|
1250
|
+
if (T(n, "Missing node"), Fn(n)) return n;
|
|
1250
1251
|
}
|
|
1251
1252
|
return null;
|
|
1252
1253
|
}
|
|
1253
|
-
function
|
|
1254
|
+
function wt(e) {
|
|
1254
1255
|
return e && Number(getComputedStyle(e).zIndex) || 0;
|
|
1255
1256
|
}
|
|
1256
|
-
function
|
|
1257
|
+
function zt(e) {
|
|
1257
1258
|
const t = [];
|
|
1258
1259
|
for (; e; )
|
|
1259
|
-
t.push(e), e =
|
|
1260
|
+
t.push(e), e = Qt(e);
|
|
1260
1261
|
return t;
|
|
1261
1262
|
}
|
|
1262
|
-
function
|
|
1263
|
+
function Qt(e) {
|
|
1263
1264
|
const { parentNode: t } = e;
|
|
1264
|
-
return
|
|
1265
|
+
return On(t) ? t.host : t;
|
|
1265
1266
|
}
|
|
1266
|
-
function
|
|
1267
|
+
function qn(e, t) {
|
|
1267
1268
|
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;
|
|
1268
1269
|
}
|
|
1269
|
-
function
|
|
1270
|
+
function Bn(e) {
|
|
1270
1271
|
try {
|
|
1271
1272
|
return e.matches(":modal");
|
|
1272
1273
|
} catch {
|
|
1273
1274
|
return !1;
|
|
1274
1275
|
}
|
|
1275
1276
|
}
|
|
1276
|
-
function
|
|
1277
|
+
function Vn({
|
|
1277
1278
|
axisElement: e,
|
|
1278
1279
|
hitRegion: t,
|
|
1279
1280
|
pointerEventTarget: n
|
|
1280
1281
|
}) {
|
|
1281
1282
|
if (ot(n)) {
|
|
1282
1283
|
const o = n.closest("dialog");
|
|
1283
|
-
if (o && !o.contains(e) &&
|
|
1284
|
+
if (o && !o.contains(e) && Bn(o))
|
|
1284
1285
|
return !1;
|
|
1285
1286
|
}
|
|
1286
1287
|
if (!ot(n) || n.contains(e) || e.contains(n))
|
|
1287
1288
|
return !0;
|
|
1288
|
-
if (
|
|
1289
|
+
if (Nn(n, e) > 0) {
|
|
1289
1290
|
let o = n;
|
|
1290
1291
|
for (; o; ) {
|
|
1291
1292
|
if (o.contains(e))
|
|
1292
1293
|
return !0;
|
|
1293
|
-
if (
|
|
1294
|
+
if (qn(o.getBoundingClientRect(), t))
|
|
1294
1295
|
return !1;
|
|
1295
1296
|
o = o.parentElement;
|
|
1296
1297
|
}
|
|
1297
1298
|
}
|
|
1298
1299
|
return !0;
|
|
1299
1300
|
}
|
|
1300
|
-
function
|
|
1301
|
+
function dt(e, t) {
|
|
1301
1302
|
const n = [];
|
|
1302
1303
|
return t.forEach((o, r) => {
|
|
1303
1304
|
if (r.disabled)
|
|
1304
1305
|
return;
|
|
1305
|
-
const i =
|
|
1306
|
+
const i = ct({ axis: r }), s = Dn(r.orientation, i, {
|
|
1306
1307
|
x: e.clientX,
|
|
1307
1308
|
y: e.clientY
|
|
1308
1309
|
});
|
|
1309
|
-
s && s.distance.x <= 0 && s.distance.y <= 0 &&
|
|
1310
|
+
s && s.distance.x <= 0 && s.distance.y <= 0 && Vn({
|
|
1310
1311
|
axisElement: r.element,
|
|
1311
1312
|
hitRegion: s.hitRegion.rect,
|
|
1312
1313
|
pointerEventTarget: e.target
|
|
1313
1314
|
}) && n.push(s.hitRegion);
|
|
1314
1315
|
}), n;
|
|
1315
1316
|
}
|
|
1316
|
-
function
|
|
1317
|
+
function ge({
|
|
1317
1318
|
layout: e,
|
|
1318
1319
|
itemConstraints: t
|
|
1319
1320
|
}) {
|
|
@@ -1325,20 +1326,20 @@ function ye({
|
|
|
1325
1326
|
throw Error(
|
|
1326
1327
|
`Invalid ${t.length} panel layout: ${Object.values(e).map((s) => `${s}%`).join(", ")}`
|
|
1327
1328
|
);
|
|
1328
|
-
if (!
|
|
1329
|
+
if (!Y(r, 100) && o.length > 0)
|
|
1329
1330
|
for (let s = 0; s < t.length; s++) {
|
|
1330
1331
|
const l = o[s];
|
|
1331
|
-
|
|
1332
|
+
T(l != null, `No layout data found for index ${s}`);
|
|
1332
1333
|
const a = 100 / r * l;
|
|
1333
1334
|
o[s] = a;
|
|
1334
1335
|
}
|
|
1335
1336
|
let i = 0;
|
|
1336
1337
|
for (let s = 0; s < t.length; s++) {
|
|
1337
1338
|
const l = n[s];
|
|
1338
|
-
|
|
1339
|
+
T(l != null, `No layout data found for index ${s}`);
|
|
1339
1340
|
const a = o[s];
|
|
1340
|
-
|
|
1341
|
-
const c =
|
|
1341
|
+
T(a != null, `No layout data found for index ${s}`);
|
|
1342
|
+
const c = Ee({
|
|
1342
1343
|
overrideDisabledItems: !0,
|
|
1343
1344
|
itemConstraints: t[s],
|
|
1344
1345
|
prevSize: l,
|
|
@@ -1346,27 +1347,27 @@ function ye({
|
|
|
1346
1347
|
});
|
|
1347
1348
|
a != c && (i += a - c, o[s] = c);
|
|
1348
1349
|
}
|
|
1349
|
-
if (!
|
|
1350
|
+
if (!Y(i, 0))
|
|
1350
1351
|
for (let s = 0; s < t.length; s++) {
|
|
1351
1352
|
const l = o[s];
|
|
1352
|
-
|
|
1353
|
-
const a = l + i, c =
|
|
1353
|
+
T(l != null, `No layout data found for index ${s}`);
|
|
1354
|
+
const a = l + i, c = Ee({
|
|
1354
1355
|
overrideDisabledItems: !0,
|
|
1355
1356
|
itemConstraints: t[s],
|
|
1356
1357
|
prevSize: l,
|
|
1357
1358
|
size: a
|
|
1358
1359
|
});
|
|
1359
|
-
if (l !== c && (i -= c - l, o[s] = c,
|
|
1360
|
+
if (l !== c && (i -= c - l, o[s] = c, Y(i, 0)))
|
|
1360
1361
|
break;
|
|
1361
1362
|
}
|
|
1362
1363
|
return o.reduce((s, l, a) => (s[t[a].itemId] = l, s), {});
|
|
1363
1364
|
}
|
|
1364
|
-
function
|
|
1365
|
+
function ft({
|
|
1365
1366
|
axisId: e,
|
|
1366
1367
|
itemId: t
|
|
1367
1368
|
}) {
|
|
1368
1369
|
const n = () => {
|
|
1369
|
-
const a =
|
|
1370
|
+
const a = ye();
|
|
1370
1371
|
for (const [
|
|
1371
1372
|
c,
|
|
1372
1373
|
{
|
|
@@ -1412,16 +1413,16 @@ function dt({
|
|
|
1412
1413
|
}) => {
|
|
1413
1414
|
const g = i(), m = c.findIndex((p) => p.id === t), y = m === 0, f = m === c.length - 1;
|
|
1414
1415
|
if (f && a < g && (y || c.slice(0, m).every((p, h) => {
|
|
1415
|
-
const
|
|
1416
|
-
return
|
|
1416
|
+
const I = d[h];
|
|
1417
|
+
return I?.collapsible && Y(I.collapsedSize, u[I.itemId]);
|
|
1417
1418
|
}))) {
|
|
1418
|
-
const p = c.slice(0, m).reduce((h,
|
|
1419
|
+
const p = c.slice(0, m).reduce((h, I) => h + u[I.id], 0);
|
|
1419
1420
|
return {
|
|
1420
1421
|
...u,
|
|
1421
1422
|
[t]: X(100 - p)
|
|
1422
1423
|
};
|
|
1423
1424
|
}
|
|
1424
|
-
return
|
|
1425
|
+
return qe({
|
|
1425
1426
|
delta: f ? g - a : a - g,
|
|
1426
1427
|
initialLayout: u,
|
|
1427
1428
|
itemConstraints: d,
|
|
@@ -1445,11 +1446,11 @@ function dt({
|
|
|
1445
1446
|
items: g.items,
|
|
1446
1447
|
prevLayout: y,
|
|
1447
1448
|
derivedItemConstraints: d
|
|
1448
|
-
}), p =
|
|
1449
|
+
}), p = ge({
|
|
1449
1450
|
layout: S,
|
|
1450
1451
|
itemConstraints: d
|
|
1451
1452
|
});
|
|
1452
|
-
|
|
1453
|
+
ie(y, p) || fe(g, {
|
|
1453
1454
|
defaultLayoutDeferred: u,
|
|
1454
1455
|
derivedItemConstraints: d,
|
|
1455
1456
|
axisSize: m,
|
|
@@ -1480,10 +1481,10 @@ function dt({
|
|
|
1480
1481
|
},
|
|
1481
1482
|
isCollapsed: () => {
|
|
1482
1483
|
const { collapsible: a, collapsedSize: c } = o(), u = i();
|
|
1483
|
-
return a &&
|
|
1484
|
+
return a && Y(c, u);
|
|
1484
1485
|
},
|
|
1485
1486
|
resize: (a) => {
|
|
1486
|
-
const { axis: c } = n(), { element: u } = r(), d =
|
|
1487
|
+
const { axis: c } = n(), { element: u } = r(), d = ke({ axis: c }), g = Ce({
|
|
1487
1488
|
axisSize: d,
|
|
1488
1489
|
itemElement: u,
|
|
1489
1490
|
styleProp: a
|
|
@@ -1492,17 +1493,17 @@ function dt({
|
|
|
1492
1493
|
}
|
|
1493
1494
|
};
|
|
1494
1495
|
}
|
|
1495
|
-
function
|
|
1496
|
+
function It(e) {
|
|
1496
1497
|
if (e.defaultPrevented)
|
|
1497
1498
|
return;
|
|
1498
|
-
const t =
|
|
1499
|
-
|
|
1499
|
+
const t = ye();
|
|
1500
|
+
dt(e, t).forEach((o) => {
|
|
1500
1501
|
if (o.separator && !o.separator.disableDoubleClick) {
|
|
1501
1502
|
const r = o.items.find(
|
|
1502
1503
|
(i) => i.constraintProps.defaultSize !== void 0
|
|
1503
1504
|
);
|
|
1504
1505
|
if (r) {
|
|
1505
|
-
const i = r.constraintProps.defaultSize, s =
|
|
1506
|
+
const i = r.constraintProps.defaultSize, s = ft({
|
|
1506
1507
|
axisId: o.axis.id,
|
|
1507
1508
|
itemId: r.id
|
|
1508
1509
|
});
|
|
@@ -1511,8 +1512,8 @@ function zt(e) {
|
|
|
1511
1512
|
}
|
|
1512
1513
|
});
|
|
1513
1514
|
}
|
|
1514
|
-
function
|
|
1515
|
-
const t =
|
|
1515
|
+
function en(e) {
|
|
1516
|
+
const t = ye();
|
|
1516
1517
|
for (const [n] of t)
|
|
1517
1518
|
if (n.separators.some(
|
|
1518
1519
|
(o) => o.element === e
|
|
@@ -1520,11 +1521,11 @@ function Qt(e) {
|
|
|
1520
1521
|
return n;
|
|
1521
1522
|
throw Error("Could not find parent Group for separator element");
|
|
1522
1523
|
}
|
|
1523
|
-
function
|
|
1524
|
+
function Ge({
|
|
1524
1525
|
axisId: e
|
|
1525
1526
|
}) {
|
|
1526
1527
|
const t = () => {
|
|
1527
|
-
const n =
|
|
1528
|
+
const n = ye();
|
|
1528
1529
|
for (const [o, r] of n)
|
|
1529
1530
|
if (o.id === e)
|
|
1530
1531
|
return { axis: o, ...r };
|
|
@@ -1543,11 +1544,11 @@ function Ne({
|
|
|
1543
1544
|
axisSize: s,
|
|
1544
1545
|
layout: l,
|
|
1545
1546
|
separatorToItems: a
|
|
1546
|
-
} = t(), c =
|
|
1547
|
+
} = t(), c = ge({
|
|
1547
1548
|
layout: n,
|
|
1548
1549
|
itemConstraints: r
|
|
1549
1550
|
});
|
|
1550
|
-
return o ? l : (
|
|
1551
|
+
return o ? l : (ie(l, c) || fe(i, {
|
|
1551
1552
|
defaultLayoutDeferred: o,
|
|
1552
1553
|
derivedItemConstraints: r,
|
|
1553
1554
|
axisSize: s,
|
|
@@ -1559,25 +1560,25 @@ function Ne({
|
|
|
1559
1560
|
}
|
|
1560
1561
|
};
|
|
1561
1562
|
}
|
|
1562
|
-
function
|
|
1563
|
-
const n =
|
|
1563
|
+
function we(e, t) {
|
|
1564
|
+
const n = en(e), o = se(n.id, !0), r = n.separators.find(
|
|
1564
1565
|
(d) => d.element === e
|
|
1565
1566
|
);
|
|
1566
|
-
|
|
1567
|
+
T(r, "Matching separator not found");
|
|
1567
1568
|
const i = o.separatorToItems.get(r);
|
|
1568
|
-
|
|
1569
|
-
const s = i.map((d) => n.items.indexOf(d)), a =
|
|
1569
|
+
T(i, "Matching panels not found");
|
|
1570
|
+
const s = i.map((d) => n.items.indexOf(d)), a = Ge({ axisId: n.id }).getLayout(), c = qe({
|
|
1570
1571
|
delta: t,
|
|
1571
1572
|
initialLayout: a,
|
|
1572
1573
|
itemConstraints: o.derivedItemConstraints,
|
|
1573
1574
|
pivotIndices: s,
|
|
1574
1575
|
prevLayout: a,
|
|
1575
1576
|
trigger: "keyboard"
|
|
1576
|
-
}), u =
|
|
1577
|
+
}), u = ge({
|
|
1577
1578
|
layout: c,
|
|
1578
1579
|
itemConstraints: o.derivedItemConstraints
|
|
1579
1580
|
});
|
|
1580
|
-
|
|
1581
|
+
ie(a, u) || fe(
|
|
1581
1582
|
n,
|
|
1582
1583
|
{
|
|
1583
1584
|
defaultLayoutDeferred: o.defaultLayoutDeferred,
|
|
@@ -1595,48 +1596,48 @@ function xe(e, t) {
|
|
|
1595
1596
|
{ isUserInteraction: !0 }
|
|
1596
1597
|
);
|
|
1597
1598
|
}
|
|
1598
|
-
function
|
|
1599
|
+
function Lt(e) {
|
|
1599
1600
|
if (e.defaultPrevented)
|
|
1600
1601
|
return;
|
|
1601
|
-
const t = e.currentTarget, n =
|
|
1602
|
+
const t = e.currentTarget, n = en(t);
|
|
1602
1603
|
if (!(n.disabled || n.separators.find(
|
|
1603
1604
|
(r) => r.element === t
|
|
1604
1605
|
)?.disabled))
|
|
1605
1606
|
switch (e.key) {
|
|
1606
1607
|
case "ArrowDown": {
|
|
1607
|
-
e.preventDefault(), n.orientation === "vertical" &&
|
|
1608
|
+
e.preventDefault(), n.orientation === "vertical" && we(t, 5);
|
|
1608
1609
|
break;
|
|
1609
1610
|
}
|
|
1610
1611
|
case "ArrowLeft": {
|
|
1611
|
-
e.preventDefault(), n.orientation === "horizontal" &&
|
|
1612
|
+
e.preventDefault(), n.orientation === "horizontal" && we(t, -5);
|
|
1612
1613
|
break;
|
|
1613
1614
|
}
|
|
1614
1615
|
case "ArrowRight": {
|
|
1615
|
-
e.preventDefault(), n.orientation === "horizontal" &&
|
|
1616
|
+
e.preventDefault(), n.orientation === "horizontal" && we(t, 5);
|
|
1616
1617
|
break;
|
|
1617
1618
|
}
|
|
1618
1619
|
case "ArrowUp": {
|
|
1619
|
-
e.preventDefault(), n.orientation === "vertical" &&
|
|
1620
|
+
e.preventDefault(), n.orientation === "vertical" && we(t, -5);
|
|
1620
1621
|
break;
|
|
1621
1622
|
}
|
|
1622
1623
|
case "End": {
|
|
1623
|
-
e.preventDefault(),
|
|
1624
|
+
e.preventDefault(), we(t, 100);
|
|
1624
1625
|
break;
|
|
1625
1626
|
}
|
|
1626
1627
|
case "Enter": {
|
|
1627
1628
|
e.preventDefault();
|
|
1628
|
-
const r =
|
|
1629
|
+
const r = se(n.id, !0), { derivedItemConstraints: i, layout: s, separatorToItems: l } = r, a = n.separators.find(
|
|
1629
1630
|
(g) => g.element === t
|
|
1630
1631
|
);
|
|
1631
|
-
|
|
1632
|
+
T(a, "Matching separator not found");
|
|
1632
1633
|
const c = l.get(a);
|
|
1633
|
-
|
|
1634
|
+
T(c, "Matching panels not found");
|
|
1634
1635
|
const u = c[0], d = i.find(
|
|
1635
1636
|
(g) => g.itemId === u.id
|
|
1636
1637
|
);
|
|
1637
|
-
if (
|
|
1638
|
+
if (T(d, "Panel metadata not found"), d.collapsible) {
|
|
1638
1639
|
const g = s[u.id], m = d.collapsedSize === g ? n.mutableState.expandedItemSizes[u.id] ?? d.minSize : d.collapsedSize;
|
|
1639
|
-
|
|
1640
|
+
we(t, m - g);
|
|
1640
1641
|
}
|
|
1641
1642
|
break;
|
|
1642
1643
|
}
|
|
@@ -1647,7 +1648,7 @@ function It(e) {
|
|
|
1647
1648
|
), i = Array.from(r).findIndex(
|
|
1648
1649
|
(a) => a === e.currentTarget
|
|
1649
1650
|
);
|
|
1650
|
-
|
|
1651
|
+
T(i !== null, "Index not found");
|
|
1651
1652
|
const s = e.shiftKey ? i > 0 ? i - 1 : r.length - 1 : i + 1 < r.length ? i + 1 : 0;
|
|
1652
1653
|
r[s].focus({
|
|
1653
1654
|
preventScroll: !0
|
|
@@ -1655,14 +1656,14 @@ function It(e) {
|
|
|
1655
1656
|
break;
|
|
1656
1657
|
}
|
|
1657
1658
|
case "Home": {
|
|
1658
|
-
e.preventDefault(),
|
|
1659
|
+
e.preventDefault(), we(t, -100);
|
|
1659
1660
|
break;
|
|
1660
1661
|
}
|
|
1661
1662
|
}
|
|
1662
1663
|
}
|
|
1663
|
-
function
|
|
1664
|
+
function Hn(e, t) {
|
|
1664
1665
|
const { element: n, orientation: o, items: r } = e, i = n.getBoundingClientRect(), s = o === "horizontal";
|
|
1665
|
-
return
|
|
1666
|
+
return ct({
|
|
1666
1667
|
expandHitTargets: !1,
|
|
1667
1668
|
axis: e,
|
|
1668
1669
|
includeDisabled: !0
|
|
@@ -1675,7 +1676,7 @@ function Vn(e, t) {
|
|
|
1675
1676
|
if (u || f.separator)
|
|
1676
1677
|
return f.separator === u;
|
|
1677
1678
|
const S = s ? f.rect.left + f.rect.width / 2 : f.rect.top + f.rect.height / 2;
|
|
1678
|
-
return
|
|
1679
|
+
return Y(m, S);
|
|
1679
1680
|
}),
|
|
1680
1681
|
axis: e,
|
|
1681
1682
|
key: u ? `separator-${u.id}` : `panel-${a[0].id}-${d}`,
|
|
@@ -1691,12 +1692,12 @@ function Vn(e, t) {
|
|
|
1691
1692
|
};
|
|
1692
1693
|
});
|
|
1693
1694
|
}
|
|
1694
|
-
function
|
|
1695
|
+
function Ct(e) {
|
|
1695
1696
|
if (e.defaultPrevented)
|
|
1696
1697
|
return;
|
|
1697
1698
|
if (e.pointerType === "mouse" && e.button > 0)
|
|
1698
1699
|
return;
|
|
1699
|
-
const t =
|
|
1700
|
+
const t = ye(), n = dt(e, t);
|
|
1700
1701
|
if (n.length === 0)
|
|
1701
1702
|
return;
|
|
1702
1703
|
const o = /* @__PURE__ */ new Map();
|
|
@@ -1711,9 +1712,9 @@ function Lt(e) {
|
|
|
1711
1712
|
l && o.set(s.axis, l.layout);
|
|
1712
1713
|
});
|
|
1713
1714
|
const i = Array.from(o.keys()).flatMap(
|
|
1714
|
-
(s) => s.resizePreviewMode === "separator" ?
|
|
1715
|
+
(s) => s.resizePreviewMode === "separator" ? Hn(s, n) : []
|
|
1715
1716
|
);
|
|
1716
|
-
|
|
1717
|
+
ue({
|
|
1717
1718
|
cursorFlags: 0,
|
|
1718
1719
|
didPointerMove: !1,
|
|
1719
1720
|
hitRegions: n,
|
|
@@ -1724,11 +1725,11 @@ function Lt(e) {
|
|
|
1724
1725
|
state: "active"
|
|
1725
1726
|
}), e.preventDefault();
|
|
1726
1727
|
}
|
|
1727
|
-
function
|
|
1728
|
-
const t =
|
|
1728
|
+
function Rt(e) {
|
|
1729
|
+
const t = ye(), n = de();
|
|
1729
1730
|
switch (n.state) {
|
|
1730
1731
|
case "active":
|
|
1731
|
-
|
|
1732
|
+
ut({
|
|
1732
1733
|
commit: !1,
|
|
1733
1734
|
document: e.currentTarget,
|
|
1734
1735
|
event: e,
|
|
@@ -1739,10 +1740,10 @@ function Ct(e) {
|
|
|
1739
1740
|
});
|
|
1740
1741
|
}
|
|
1741
1742
|
}
|
|
1742
|
-
function
|
|
1743
|
+
function Mt(e) {
|
|
1743
1744
|
if (e.defaultPrevented)
|
|
1744
1745
|
return;
|
|
1745
|
-
const t =
|
|
1746
|
+
const t = de(), n = ye();
|
|
1746
1747
|
switch (t.state) {
|
|
1747
1748
|
case "active": {
|
|
1748
1749
|
if (
|
|
@@ -1751,23 +1752,23 @@ function Rt(e) {
|
|
|
1751
1752
|
) {
|
|
1752
1753
|
t.previewLayoutMap.forEach((o, r) => {
|
|
1753
1754
|
const i = n.get(r);
|
|
1754
|
-
r.resizePreviewMode === "separator" && i && !
|
|
1755
|
+
r.resizePreviewMode === "separator" && i && !ie(o, i.layout) && fe(r, {
|
|
1755
1756
|
...i,
|
|
1756
1757
|
layout: o,
|
|
1757
1758
|
requestedAxisSize: i.axisSize,
|
|
1758
1759
|
requestedLayout: o
|
|
1759
1760
|
});
|
|
1760
|
-
}),
|
|
1761
|
+
}), ue({
|
|
1761
1762
|
cursorFlags: 0,
|
|
1762
1763
|
state: "inactive"
|
|
1763
1764
|
}), t.hitRegions.forEach((o) => {
|
|
1764
1765
|
if (!n.has(o.axis))
|
|
1765
1766
|
return;
|
|
1766
|
-
const r =
|
|
1767
|
-
|
|
1767
|
+
const r = se(o.axis.id, !0);
|
|
1768
|
+
fe(o.axis, r, {
|
|
1768
1769
|
isUserInteraction: !0
|
|
1769
1770
|
});
|
|
1770
|
-
}),
|
|
1771
|
+
}), _e(e.currentTarget);
|
|
1771
1772
|
return;
|
|
1772
1773
|
}
|
|
1773
1774
|
for (const o of t.hitRegions)
|
|
@@ -1775,7 +1776,7 @@ function Rt(e) {
|
|
|
1775
1776
|
const { element: r } = o.separator;
|
|
1776
1777
|
r.isConnected && !r.hasPointerCapture?.(e.pointerId) && r.setPointerCapture?.(e.pointerId);
|
|
1777
1778
|
}
|
|
1778
|
-
|
|
1779
|
+
ut({
|
|
1779
1780
|
commit: !1,
|
|
1780
1781
|
document: e.currentTarget,
|
|
1781
1782
|
event: e,
|
|
@@ -1788,40 +1789,40 @@ function Rt(e) {
|
|
|
1788
1789
|
break;
|
|
1789
1790
|
}
|
|
1790
1791
|
default: {
|
|
1791
|
-
const o =
|
|
1792
|
-
o.length === 0 ? t.state !== "inactive" &&
|
|
1792
|
+
const o = dt(e, n);
|
|
1793
|
+
o.length === 0 ? t.state !== "inactive" && ue({
|
|
1793
1794
|
cursorFlags: 0,
|
|
1794
1795
|
state: "inactive"
|
|
1795
|
-
}) :
|
|
1796
|
+
}) : ue({
|
|
1796
1797
|
cursorFlags: 0,
|
|
1797
1798
|
hitRegions: o,
|
|
1798
1799
|
state: "hover"
|
|
1799
|
-
}),
|
|
1800
|
+
}), _e(e.currentTarget);
|
|
1800
1801
|
break;
|
|
1801
1802
|
}
|
|
1802
1803
|
}
|
|
1803
1804
|
}
|
|
1804
|
-
function
|
|
1805
|
+
function Et(e) {
|
|
1805
1806
|
if (e.relatedTarget instanceof HTMLIFrameElement)
|
|
1806
|
-
switch (
|
|
1807
|
+
switch (de().state) {
|
|
1807
1808
|
case "hover":
|
|
1808
|
-
|
|
1809
|
+
ue({
|
|
1809
1810
|
cursorFlags: 0,
|
|
1810
1811
|
state: "inactive"
|
|
1811
1812
|
});
|
|
1812
1813
|
}
|
|
1813
1814
|
}
|
|
1814
|
-
function
|
|
1815
|
+
function Pt(e) {
|
|
1815
1816
|
if (e.defaultPrevented)
|
|
1816
1817
|
return;
|
|
1817
1818
|
if (e.pointerType === "mouse" && e.button > 0)
|
|
1818
1819
|
return;
|
|
1819
|
-
|
|
1820
|
+
Zt(
|
|
1820
1821
|
e.currentTarget,
|
|
1821
1822
|
e
|
|
1822
1823
|
) && e.preventDefault();
|
|
1823
1824
|
}
|
|
1824
|
-
function
|
|
1825
|
+
function jn(e) {
|
|
1825
1826
|
let t = 0, n = 0;
|
|
1826
1827
|
const o = {};
|
|
1827
1828
|
for (const i of e)
|
|
@@ -1839,7 +1840,7 @@ function Hn(e) {
|
|
|
1839
1840
|
}
|
|
1840
1841
|
return o;
|
|
1841
1842
|
}
|
|
1842
|
-
function
|
|
1843
|
+
function Un(e, t) {
|
|
1843
1844
|
const n = e.map((r) => r.id), o = Object.keys(t);
|
|
1844
1845
|
if (n.length !== o.length)
|
|
1845
1846
|
return !1;
|
|
@@ -1848,18 +1849,18 @@ function jn(e, t) {
|
|
|
1848
1849
|
return !1;
|
|
1849
1850
|
return !0;
|
|
1850
1851
|
}
|
|
1851
|
-
function
|
|
1852
|
+
function kt({
|
|
1852
1853
|
axis: e,
|
|
1853
1854
|
itemConstraints: t
|
|
1854
1855
|
}) {
|
|
1855
1856
|
const n = e.items.map(({ id: r }) => r).join(","), o = e.mutableState.defaultLayout;
|
|
1856
|
-
return e.mutableState.layouts[n] ?? (o &&
|
|
1857
|
+
return e.mutableState.layouts[n] ?? (o && Un(e.items, o) ? o : jn(t));
|
|
1857
1858
|
}
|
|
1858
|
-
function
|
|
1859
|
+
function $t({
|
|
1859
1860
|
itemIds: e,
|
|
1860
1861
|
layout: t
|
|
1861
1862
|
}) {
|
|
1862
|
-
return
|
|
1863
|
+
return ge({
|
|
1863
1864
|
layout: t,
|
|
1864
1865
|
itemConstraints: e.map((n) => ({
|
|
1865
1866
|
collapsedSize: 0,
|
|
@@ -1872,19 +1873,19 @@ function kt({
|
|
|
1872
1873
|
}))
|
|
1873
1874
|
});
|
|
1874
1875
|
}
|
|
1875
|
-
function
|
|
1876
|
+
function Wn(e, t, n) {
|
|
1876
1877
|
if (!n[0])
|
|
1877
1878
|
return;
|
|
1878
1879
|
const r = e.items.find((c) => c.element === t);
|
|
1879
1880
|
if (!r || !r.onResize)
|
|
1880
1881
|
return;
|
|
1881
|
-
const i =
|
|
1882
|
+
const i = ke({ axis: e }), s = e.orientation === "horizontal" ? r.element.offsetWidth : r.element.offsetHeight, l = r.mutableValues.prevSize, a = {
|
|
1882
1883
|
asPercentage: X(s / i * 100),
|
|
1883
1884
|
inPixels: s
|
|
1884
1885
|
};
|
|
1885
1886
|
r.mutableValues.prevSize = a, r.onResize(a, r.id, l);
|
|
1886
1887
|
}
|
|
1887
|
-
function
|
|
1888
|
+
function tn(e, t) {
|
|
1888
1889
|
if (Object.keys(e).length !== Object.keys(t).length)
|
|
1889
1890
|
return !1;
|
|
1890
1891
|
for (const o in e)
|
|
@@ -1892,10 +1893,10 @@ function en(e, t) {
|
|
|
1892
1893
|
return !1;
|
|
1893
1894
|
return !0;
|
|
1894
1895
|
}
|
|
1895
|
-
function
|
|
1896
|
-
return e.length !== t.length ? !1 : e.every((n, o) =>
|
|
1896
|
+
function Yn(e, t) {
|
|
1897
|
+
return e.length !== t.length ? !1 : e.every((n, o) => tn(n, t[o]));
|
|
1897
1898
|
}
|
|
1898
|
-
function
|
|
1899
|
+
function Kn({
|
|
1899
1900
|
axis: e,
|
|
1900
1901
|
nextAxisSize: t,
|
|
1901
1902
|
prevAxisSize: n,
|
|
@@ -1942,10 +1943,10 @@ function Yn({
|
|
|
1942
1943
|
}
|
|
1943
1944
|
return u;
|
|
1944
1945
|
}
|
|
1945
|
-
const
|
|
1946
|
-
function
|
|
1946
|
+
const Le = /* @__PURE__ */ new Map();
|
|
1947
|
+
function nn(e) {
|
|
1947
1948
|
let t = !0;
|
|
1948
|
-
|
|
1949
|
+
T(
|
|
1949
1950
|
e.element.ownerDocument.defaultView,
|
|
1950
1951
|
"Cannot register an unmounted Group"
|
|
1951
1952
|
);
|
|
@@ -1954,107 +1955,107 @@ function tn(e) {
|
|
|
1954
1955
|
const { borderBoxSize: f, target: S } = y;
|
|
1955
1956
|
if (S === e.element) {
|
|
1956
1957
|
if (t) {
|
|
1957
|
-
const p =
|
|
1958
|
+
const p = ke({ axis: e });
|
|
1958
1959
|
if (p === 0)
|
|
1959
1960
|
return;
|
|
1960
|
-
const h =
|
|
1961
|
+
const h = se(e.id);
|
|
1961
1962
|
if (!h)
|
|
1962
1963
|
return;
|
|
1963
|
-
const
|
|
1964
|
-
let
|
|
1965
|
-
h.defaultLayoutDeferred && (
|
|
1964
|
+
const I = rt(e);
|
|
1965
|
+
let x = h.requestedAxisSize, C = h.requestedLayout;
|
|
1966
|
+
h.defaultLayoutDeferred && (x = p, C = $t({
|
|
1966
1967
|
itemIds: e.items.map(({ id: b }) => b),
|
|
1967
|
-
layout:
|
|
1968
|
+
layout: kt({
|
|
1968
1969
|
axis: e,
|
|
1969
|
-
itemConstraints:
|
|
1970
|
+
itemConstraints: I
|
|
1970
1971
|
})
|
|
1971
1972
|
}));
|
|
1972
|
-
const
|
|
1973
|
+
const N = Kn({
|
|
1973
1974
|
axis: e,
|
|
1974
1975
|
nextAxisSize: p,
|
|
1975
|
-
prevAxisSize:
|
|
1976
|
+
prevAxisSize: x,
|
|
1976
1977
|
prevLayout: C
|
|
1977
|
-
}), D =
|
|
1978
|
-
layout:
|
|
1979
|
-
itemConstraints:
|
|
1978
|
+
}), D = ge({
|
|
1979
|
+
layout: N,
|
|
1980
|
+
itemConstraints: I
|
|
1980
1981
|
});
|
|
1981
|
-
if (!h.defaultLayoutDeferred &&
|
|
1982
|
+
if (!h.defaultLayoutDeferred && ie(h.layout, D) && Yn(
|
|
1982
1983
|
h.derivedItemConstraints,
|
|
1983
|
-
|
|
1984
|
+
I
|
|
1984
1985
|
) && h.axisSize === p)
|
|
1985
1986
|
continue;
|
|
1986
|
-
|
|
1987
|
+
fe(e, {
|
|
1987
1988
|
defaultLayoutDeferred: !1,
|
|
1988
|
-
derivedItemConstraints:
|
|
1989
|
+
derivedItemConstraints: I,
|
|
1989
1990
|
axisSize: p,
|
|
1990
1991
|
layout: D,
|
|
1991
|
-
requestedAxisSize:
|
|
1992
|
+
requestedAxisSize: x,
|
|
1992
1993
|
requestedLayout: C,
|
|
1993
1994
|
separatorToItems: h.separatorToItems
|
|
1994
1995
|
});
|
|
1995
1996
|
}
|
|
1996
1997
|
} else
|
|
1997
|
-
|
|
1998
|
+
Wn(e, S, f);
|
|
1998
1999
|
}
|
|
1999
2000
|
});
|
|
2000
2001
|
i.observe(e.element), e.items.forEach((m) => {
|
|
2001
|
-
|
|
2002
|
+
T(
|
|
2002
2003
|
!o.has(m.id),
|
|
2003
2004
|
`Panel ids must be unique; id "${m.id}" was used more than once`
|
|
2004
2005
|
), o.add(m.id), m.onResize && i.observe(m.element);
|
|
2005
2006
|
});
|
|
2006
|
-
const s =
|
|
2007
|
+
const s = ke({ axis: e }), l = rt(e), a = kt({
|
|
2007
2008
|
axis: e,
|
|
2008
2009
|
itemConstraints: l
|
|
2009
|
-
}), c =
|
|
2010
|
+
}), c = ge({
|
|
2010
2011
|
layout: a,
|
|
2011
2012
|
itemConstraints: l
|
|
2012
2013
|
}), u = e.element.ownerDocument;
|
|
2013
|
-
|
|
2014
|
+
Le.set(
|
|
2014
2015
|
u,
|
|
2015
|
-
(
|
|
2016
|
+
(Le.get(u) ?? 0) + 1
|
|
2016
2017
|
);
|
|
2017
2018
|
const d = /* @__PURE__ */ new Map();
|
|
2018
|
-
return
|
|
2019
|
+
return ct({ axis: e, includeDisabled: !0 }).forEach((m) => {
|
|
2019
2020
|
m.separator && d.set(m.separator, m.items);
|
|
2020
|
-
}),
|
|
2021
|
+
}), fe(e, {
|
|
2021
2022
|
defaultLayoutDeferred: s === 0,
|
|
2022
2023
|
derivedItemConstraints: l,
|
|
2023
2024
|
axisSize: s,
|
|
2024
2025
|
layout: c,
|
|
2025
2026
|
requestedAxisSize: s,
|
|
2026
|
-
requestedLayout:
|
|
2027
|
+
requestedLayout: $t({
|
|
2027
2028
|
itemIds: e.items.map(({ id: m }) => m),
|
|
2028
2029
|
layout: a
|
|
2029
2030
|
}),
|
|
2030
2031
|
separatorToItems: d
|
|
2031
2032
|
}), e.separators.forEach((m) => {
|
|
2032
|
-
|
|
2033
|
+
T(
|
|
2033
2034
|
!r.has(m.id),
|
|
2034
2035
|
`Separator ids must be unique; id "${m.id}" was used more than once`
|
|
2035
|
-
), r.add(m.id), m.element.addEventListener("keydown",
|
|
2036
|
-
}),
|
|
2037
|
-
t = !1,
|
|
2036
|
+
), r.add(m.id), m.element.addEventListener("keydown", Lt);
|
|
2037
|
+
}), Le.get(u) === 1 && (u.addEventListener("contextmenu", bt, !0), u.addEventListener("dblclick", It, !0), u.addEventListener("pointerdown", Ct, !0), u.addEventListener("pointerleave", Rt), u.addEventListener("pointermove", Mt), u.addEventListener("pointerout", Et), u.addEventListener("pointerup", Pt, !0)), function() {
|
|
2038
|
+
t = !1, Le.set(
|
|
2038
2039
|
u,
|
|
2039
|
-
Math.max(0, (
|
|
2040
|
-
),
|
|
2041
|
-
y.element.removeEventListener("keydown",
|
|
2042
|
-
}),
|
|
2040
|
+
Math.max(0, (Le.get(u) ?? 0) - 1)
|
|
2041
|
+
), An(e), zn(e) && _e(u), e.separators.forEach((y) => {
|
|
2042
|
+
y.element.removeEventListener("keydown", Lt);
|
|
2043
|
+
}), Le.get(u) || (u.removeEventListener(
|
|
2043
2044
|
"contextmenu",
|
|
2044
|
-
|
|
2045
|
+
bt,
|
|
2045
2046
|
!0
|
|
2046
2047
|
), u.removeEventListener(
|
|
2047
2048
|
"dblclick",
|
|
2048
|
-
|
|
2049
|
+
It,
|
|
2049
2050
|
!0
|
|
2050
2051
|
), u.removeEventListener(
|
|
2051
2052
|
"pointerdown",
|
|
2052
|
-
|
|
2053
|
+
Ct,
|
|
2053
2054
|
!0
|
|
2054
|
-
), u.removeEventListener("pointerleave",
|
|
2055
|
+
), u.removeEventListener("pointerleave", Rt), u.removeEventListener("pointermove", Mt), u.removeEventListener("pointerout", Et), u.removeEventListener("pointerup", Pt, !0)), i.disconnect();
|
|
2055
2056
|
};
|
|
2056
2057
|
}
|
|
2057
|
-
function
|
|
2058
|
+
function on({
|
|
2058
2059
|
derivedItemConstraints: e,
|
|
2059
2060
|
axis: t,
|
|
2060
2061
|
layout: n,
|
|
@@ -2064,10 +2065,10 @@ function nn({
|
|
|
2064
2065
|
const i = t.items.map(({ id: s }) => s).join(",");
|
|
2065
2066
|
t.mutableState.layouts[i] = r, o && e.forEach((s) => {
|
|
2066
2067
|
if (s.collapsible) {
|
|
2067
|
-
const l =
|
|
2068
|
+
const l = Y(
|
|
2068
2069
|
s.collapsedSize,
|
|
2069
2070
|
n[s.itemId]
|
|
2070
|
-
), a =
|
|
2071
|
+
), a = Y(
|
|
2071
2072
|
s.collapsedSize,
|
|
2072
2073
|
o[s.itemId]
|
|
2073
2074
|
);
|
|
@@ -2075,19 +2076,19 @@ function nn({
|
|
|
2075
2076
|
}
|
|
2076
2077
|
});
|
|
2077
2078
|
}
|
|
2078
|
-
function
|
|
2079
|
-
const [e, t] =
|
|
2079
|
+
function rn() {
|
|
2080
|
+
const [e, t] = pe({}), n = re(() => t({}), []);
|
|
2080
2081
|
return [e, n];
|
|
2081
2082
|
}
|
|
2082
|
-
function
|
|
2083
|
+
function Je(e) {
|
|
2083
2084
|
const t = q({ ...e });
|
|
2084
2085
|
return ne(() => {
|
|
2085
2086
|
for (const n in e)
|
|
2086
2087
|
t.current[n] = e[n];
|
|
2087
2088
|
}, [e]), t.current;
|
|
2088
2089
|
}
|
|
2089
|
-
const
|
|
2090
|
-
function
|
|
2090
|
+
const mt = Gt(null);
|
|
2091
|
+
function Xn({
|
|
2091
2092
|
layout: e,
|
|
2092
2093
|
itemConstraints: t,
|
|
2093
2094
|
itemId: n,
|
|
@@ -2099,8 +2100,8 @@ function Kn({
|
|
|
2099
2100
|
);
|
|
2100
2101
|
if (l) {
|
|
2101
2102
|
const a = l.maxSize, c = l.collapsible ? l.collapsedSize : l.minSize, u = [o, o + 1];
|
|
2102
|
-
i =
|
|
2103
|
-
layout:
|
|
2103
|
+
i = ge({
|
|
2104
|
+
layout: qe({
|
|
2104
2105
|
delta: c - s,
|
|
2105
2106
|
initialLayout: e,
|
|
2106
2107
|
itemConstraints: t,
|
|
@@ -2108,8 +2109,8 @@ function Kn({
|
|
|
2108
2109
|
prevLayout: e
|
|
2109
2110
|
}),
|
|
2110
2111
|
itemConstraints: t
|
|
2111
|
-
})[n], r =
|
|
2112
|
-
layout:
|
|
2112
|
+
})[n], r = ge({
|
|
2113
|
+
layout: qe({
|
|
2113
2114
|
delta: a - s,
|
|
2114
2115
|
initialLayout: e,
|
|
2115
2116
|
itemConstraints: t,
|
|
@@ -2126,7 +2127,7 @@ function Kn({
|
|
|
2126
2127
|
valueNow: s
|
|
2127
2128
|
};
|
|
2128
2129
|
}
|
|
2129
|
-
function
|
|
2130
|
+
function sn({
|
|
2130
2131
|
attributes: e,
|
|
2131
2132
|
axisId: t,
|
|
2132
2133
|
axisOrientation: n,
|
|
@@ -2146,21 +2147,21 @@ function rn({
|
|
|
2146
2147
|
tabIndex: S = 0,
|
|
2147
2148
|
updateSeparatorProps: p
|
|
2148
2149
|
}) {
|
|
2149
|
-
const h =
|
|
2150
|
+
const h = Je({
|
|
2150
2151
|
disabled: s,
|
|
2151
2152
|
disableDoubleClick: l,
|
|
2152
2153
|
children: o,
|
|
2153
2154
|
className: r,
|
|
2154
2155
|
preview: d,
|
|
2155
2156
|
style: y
|
|
2156
|
-
}), [
|
|
2157
|
+
}), [I, x] = pe({}), [C, N] = pe("inactive"), [D, b] = pe(!1), w = q(null), v = q(null), $ = Ve(w, a), O = n === "horizontal" ? "vertical" : "horizontal";
|
|
2157
2158
|
ne(() => {
|
|
2158
|
-
const
|
|
2159
|
-
if (
|
|
2160
|
-
const
|
|
2159
|
+
const P = w.current;
|
|
2160
|
+
if (P !== null) {
|
|
2161
|
+
const z = {
|
|
2161
2162
|
disabled: h.disabled,
|
|
2162
2163
|
disableDoubleClick: h.disableDoubleClick,
|
|
2163
|
-
element:
|
|
2164
|
+
element: P,
|
|
2164
2165
|
id: c,
|
|
2165
2166
|
get children() {
|
|
2166
2167
|
return h.children;
|
|
@@ -2175,34 +2176,34 @@ function rn({
|
|
|
2175
2176
|
return h.style;
|
|
2176
2177
|
}
|
|
2177
2178
|
};
|
|
2178
|
-
v.current =
|
|
2179
|
-
const
|
|
2180
|
-
(
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
(
|
|
2184
|
-
) ?
|
|
2179
|
+
v.current = z;
|
|
2180
|
+
const M = g(z), B = jt(
|
|
2181
|
+
(H) => {
|
|
2182
|
+
N(
|
|
2183
|
+
H.next.state !== "inactive" && H.next.hitRegions.some(
|
|
2184
|
+
(Z) => Z.separator === z || (u?.(Z) ?? !1)
|
|
2185
|
+
) ? H.next.state : "inactive"
|
|
2185
2186
|
);
|
|
2186
2187
|
}
|
|
2187
|
-
), J =
|
|
2188
|
+
), J = Fe(
|
|
2188
2189
|
t,
|
|
2189
|
-
(
|
|
2190
|
-
const { derivedItemConstraints:
|
|
2191
|
-
if (
|
|
2192
|
-
const
|
|
2193
|
-
(
|
|
2194
|
-
), { layoutStrategy:
|
|
2195
|
-
|
|
2196
|
-
...
|
|
2197
|
-
layout:
|
|
2198
|
-
itemConstraints:
|
|
2199
|
-
itemId:
|
|
2200
|
-
itemIndex:
|
|
2190
|
+
(H) => {
|
|
2191
|
+
const { derivedItemConstraints: Z, layout: Se, separatorToItems: ze } = H.next, Ie = ze.get(z);
|
|
2192
|
+
if (Ie) {
|
|
2193
|
+
const ve = Ie[0], L = Z.findIndex(
|
|
2194
|
+
(_) => _.itemId === ve.id
|
|
2195
|
+
), { layoutStrategy: k } = H.axis;
|
|
2196
|
+
x({
|
|
2197
|
+
...Xn({
|
|
2198
|
+
layout: Se,
|
|
2199
|
+
itemConstraints: Z,
|
|
2200
|
+
itemId: ve.id,
|
|
2201
|
+
itemIndex: L
|
|
2201
2202
|
}),
|
|
2202
2203
|
// Items without DOM elements of their own (e.g. Grid tracks) control other elements
|
|
2203
|
-
|
|
2204
|
-
valueControls:
|
|
2205
|
-
|
|
2204
|
+
...k?.getItemAriaControls && {
|
|
2205
|
+
valueControls: k.getItemAriaControls(
|
|
2206
|
+
ve.id
|
|
2206
2207
|
)
|
|
2207
2208
|
}
|
|
2208
2209
|
});
|
|
@@ -2210,51 +2211,51 @@ function rn({
|
|
|
2210
2211
|
}
|
|
2211
2212
|
);
|
|
2212
2213
|
return () => {
|
|
2213
|
-
v.current = null,
|
|
2214
|
+
v.current = null, B(), J(), M();
|
|
2214
2215
|
};
|
|
2215
2216
|
}
|
|
2216
2217
|
}, [t, c, u, g, h]), ne(() => {
|
|
2217
|
-
const
|
|
2218
|
-
|
|
2219
|
-
}, [d]),
|
|
2218
|
+
const P = v.current;
|
|
2219
|
+
P && wn(P);
|
|
2220
|
+
}, [d]), Be(() => {
|
|
2220
2221
|
p(c, { disabled: s, disableDoubleClick: l });
|
|
2221
2222
|
}, [s, l, c, p]);
|
|
2222
|
-
let
|
|
2223
|
-
s && !i && (
|
|
2224
|
-
let
|
|
2223
|
+
let R;
|
|
2224
|
+
s && !i && (R = "not-allowed");
|
|
2225
|
+
let E;
|
|
2225
2226
|
if (s)
|
|
2226
|
-
|
|
2227
|
+
E = "disabled";
|
|
2227
2228
|
else
|
|
2228
2229
|
switch (C) {
|
|
2229
2230
|
case "active": {
|
|
2230
|
-
|
|
2231
|
+
E = "active";
|
|
2231
2232
|
break;
|
|
2232
2233
|
}
|
|
2233
2234
|
default:
|
|
2234
|
-
D ?
|
|
2235
|
+
D ? E = "focus" : E = C;
|
|
2235
2236
|
}
|
|
2236
|
-
return /* @__PURE__ */
|
|
2237
|
+
return /* @__PURE__ */ K(
|
|
2237
2238
|
"div",
|
|
2238
2239
|
{
|
|
2239
2240
|
...e,
|
|
2240
|
-
"aria-controls":
|
|
2241
|
+
"aria-controls": I.valueControls,
|
|
2241
2242
|
"aria-disabled": s || void 0,
|
|
2242
|
-
"aria-orientation":
|
|
2243
|
-
"aria-valuemax":
|
|
2244
|
-
"aria-valuemin":
|
|
2245
|
-
"aria-valuenow":
|
|
2243
|
+
"aria-orientation": O,
|
|
2244
|
+
"aria-valuemax": I.valueMax,
|
|
2245
|
+
"aria-valuemin": I.valueMin,
|
|
2246
|
+
"aria-valuenow": I.valueNow,
|
|
2246
2247
|
children: o,
|
|
2247
2248
|
className: r,
|
|
2248
|
-
"data-separator":
|
|
2249
|
+
"data-separator": E,
|
|
2249
2250
|
"data-testid": c,
|
|
2250
2251
|
id: c,
|
|
2251
2252
|
onBlur: () => b(!1),
|
|
2252
2253
|
onFocus: () => b(!0),
|
|
2253
|
-
ref:
|
|
2254
|
+
ref: $,
|
|
2254
2255
|
role: "separator",
|
|
2255
2256
|
style: {
|
|
2256
2257
|
...f,
|
|
2257
|
-
cursor:
|
|
2258
|
+
cursor: R,
|
|
2258
2259
|
...y,
|
|
2259
2260
|
...m,
|
|
2260
2261
|
// Inform the browser that the library is handling touch events for this element
|
|
@@ -2265,7 +2266,7 @@ function rn({
|
|
|
2265
2266
|
}
|
|
2266
2267
|
);
|
|
2267
2268
|
}
|
|
2268
|
-
function
|
|
2269
|
+
function At({
|
|
2269
2270
|
axis: e,
|
|
2270
2271
|
children: t,
|
|
2271
2272
|
className: n,
|
|
@@ -2276,7 +2277,7 @@ function $t({
|
|
|
2276
2277
|
index: l,
|
|
2277
2278
|
style: a
|
|
2278
2279
|
}) {
|
|
2279
|
-
const c =
|
|
2280
|
+
const c = $e(void 0), {
|
|
2280
2281
|
getDisableCursor: u,
|
|
2281
2282
|
getResizeAxisId: d,
|
|
2282
2283
|
gutters: g,
|
|
@@ -2284,17 +2285,17 @@ function $t({
|
|
|
2284
2285
|
separatorPlacements: y,
|
|
2285
2286
|
trackCounts: f,
|
|
2286
2287
|
updateSeparatorProps: S
|
|
2287
|
-
} =
|
|
2288
|
+
} = Bt(), p = d(e), h = e === "column" ? "row" : "column", I = f[h], x = !!i || !st(l, f[e]);
|
|
2288
2289
|
let C = !0;
|
|
2289
2290
|
for (const v of y.values())
|
|
2290
2291
|
if (v.axis === e && v.index === l && !v.disabled && v.crossStart < r) {
|
|
2291
2292
|
C = !1;
|
|
2292
2293
|
break;
|
|
2293
2294
|
}
|
|
2294
|
-
const
|
|
2295
|
+
const N = re(
|
|
2295
2296
|
(v) => v.axis.id === p && v.axis.items.indexOf(v.items[1]) === l,
|
|
2296
2297
|
[p, l]
|
|
2297
|
-
), D =
|
|
2298
|
+
), D = re(
|
|
2298
2299
|
(v) => m(
|
|
2299
2300
|
{
|
|
2300
2301
|
axis: e,
|
|
@@ -2306,28 +2307,28 @@ function $t({
|
|
|
2306
2307
|
v
|
|
2307
2308
|
),
|
|
2308
2309
|
[e, o, r, i, l, m]
|
|
2309
|
-
), b =
|
|
2310
|
-
crossCount:
|
|
2310
|
+
), b = hn(l), w = gn({
|
|
2311
|
+
crossCount: I,
|
|
2311
2312
|
crossSpan: o,
|
|
2312
2313
|
crossStart: r,
|
|
2313
2314
|
hasGutters: g[h]
|
|
2314
2315
|
});
|
|
2315
|
-
return /* @__PURE__ */
|
|
2316
|
-
|
|
2316
|
+
return /* @__PURE__ */ K(
|
|
2317
|
+
sn,
|
|
2317
2318
|
{
|
|
2318
2319
|
axisId: p,
|
|
2319
2320
|
axisOrientation: e === "column" ? "horizontal" : "vertical",
|
|
2320
2321
|
className: n,
|
|
2321
2322
|
disableCursor: u(),
|
|
2322
|
-
disabled:
|
|
2323
|
+
disabled: x,
|
|
2323
2324
|
disableDoubleClick: void 0,
|
|
2324
2325
|
elementRef: s,
|
|
2325
2326
|
id: c,
|
|
2326
|
-
isSharedHitRegion:
|
|
2327
|
+
isSharedHitRegion: N,
|
|
2327
2328
|
registerSeparator: D,
|
|
2328
2329
|
requiredStyle: {
|
|
2329
|
-
gridColumn: e === "column" ? b :
|
|
2330
|
-
gridRow: e === "row" ? b :
|
|
2330
|
+
gridColumn: e === "column" ? b : w,
|
|
2331
|
+
gridRow: e === "row" ? b : w
|
|
2331
2332
|
},
|
|
2332
2333
|
style: a,
|
|
2333
2334
|
tabIndex: C ? 0 : -1,
|
|
@@ -2336,10 +2337,10 @@ function $t({
|
|
|
2336
2337
|
}
|
|
2337
2338
|
);
|
|
2338
2339
|
}
|
|
2339
|
-
function
|
|
2340
|
+
function an(e) {
|
|
2340
2341
|
const { children: t, className: n, disabled: o, elementRef: r, style: i } = e;
|
|
2341
|
-
return e.type === "column" ? /* @__PURE__ */
|
|
2342
|
-
|
|
2342
|
+
return e.type === "column" ? /* @__PURE__ */ K(
|
|
2343
|
+
At,
|
|
2343
2344
|
{
|
|
2344
2345
|
axis: "column",
|
|
2345
2346
|
className: n,
|
|
@@ -2351,8 +2352,8 @@ function sn(e) {
|
|
|
2351
2352
|
style: i,
|
|
2352
2353
|
children: t
|
|
2353
2354
|
}
|
|
2354
|
-
) : /* @__PURE__ */
|
|
2355
|
-
|
|
2355
|
+
) : /* @__PURE__ */ K(
|
|
2356
|
+
At,
|
|
2356
2357
|
{
|
|
2357
2358
|
axis: "row",
|
|
2358
2359
|
className: n,
|
|
@@ -2366,9 +2367,9 @@ function sn(e) {
|
|
|
2366
2367
|
}
|
|
2367
2368
|
);
|
|
2368
2369
|
}
|
|
2369
|
-
|
|
2370
|
-
const
|
|
2371
|
-
function
|
|
2370
|
+
an.displayName = "Gridline";
|
|
2371
|
+
const Re = ["column", "row"], Tt = { columns: {}, rows: {} };
|
|
2372
|
+
function Jn({
|
|
2372
2373
|
children: e,
|
|
2373
2374
|
className: t,
|
|
2374
2375
|
columns: n,
|
|
@@ -2388,324 +2389,324 @@ function Xn({
|
|
|
2388
2389
|
style: m,
|
|
2389
2390
|
...y
|
|
2390
2391
|
}) {
|
|
2391
|
-
const f =
|
|
2392
|
-
(
|
|
2392
|
+
const f = $e(a), S = re(
|
|
2393
|
+
(L) => L === "column" ? `${f}:columns` : `${f}:rows`,
|
|
2393
2394
|
[f]
|
|
2394
|
-
), p =
|
|
2395
|
+
), p = Dt(n, "columns"), h = Dt(g, "rows"), I = (L) => L === "column" ? p : h, x = q({
|
|
2395
2396
|
onLayoutChange: Tt,
|
|
2396
2397
|
onLayoutChanged: Tt
|
|
2397
|
-
}), C =
|
|
2398
|
-
|
|
2399
|
-
}),
|
|
2400
|
-
(
|
|
2401
|
-
|
|
2398
|
+
}), C = he((L) => {
|
|
2399
|
+
Ot(x.current.onLayoutChange, L) || (x.current.onLayoutChange = L, c?.(L));
|
|
2400
|
+
}), N = he(
|
|
2401
|
+
(L, k, _) => {
|
|
2402
|
+
Ot(x.current.onLayoutChanged, L) || (x.current.onLayoutChanged = L, u?.(L, { isUserInteraction: k, requestedLayout: _ }));
|
|
2402
2403
|
}
|
|
2403
|
-
), D = q(null), b =
|
|
2404
|
+
), D = q(null), b = Ve(D, s), [w, v] = rn(), $ = q({
|
|
2404
2405
|
cells: [],
|
|
2405
2406
|
column: { expandedItemSizes: {}, layouts: {} },
|
|
2406
2407
|
loggedErrors: /* @__PURE__ */ new Set(),
|
|
2407
2408
|
row: { expandedItemSizes: {}, layouts: {} },
|
|
2408
2409
|
separators: /* @__PURE__ */ new Map()
|
|
2409
|
-
}),
|
|
2410
|
-
for (const
|
|
2411
|
-
|
|
2412
|
-
|
|
2413
|
-
const
|
|
2410
|
+
}), O = { column: !1, row: !1 };
|
|
2411
|
+
for (const L of $.current.separators.values())
|
|
2412
|
+
O[L.axis] = !0;
|
|
2413
|
+
ln(e, O);
|
|
2414
|
+
const R = Je({
|
|
2414
2415
|
defaultLayout: o,
|
|
2415
2416
|
disableCursor: r,
|
|
2416
2417
|
resizeTargetMinimumSize: d
|
|
2417
|
-
}),
|
|
2418
|
-
(
|
|
2419
|
-
const
|
|
2420
|
-
return
|
|
2421
|
-
|
|
2422
|
-
(
|
|
2418
|
+
}), E = he(() => !!R.disableCursor), P = re(
|
|
2419
|
+
(L) => {
|
|
2420
|
+
const k = $.current;
|
|
2421
|
+
return k.cells = [...k.cells, L], v(), () => {
|
|
2422
|
+
k.cells = k.cells.filter(
|
|
2423
|
+
(_) => _ !== L
|
|
2423
2424
|
), v();
|
|
2424
2425
|
};
|
|
2425
2426
|
},
|
|
2426
2427
|
[v]
|
|
2427
|
-
),
|
|
2428
|
-
(
|
|
2429
|
-
const
|
|
2430
|
-
return
|
|
2431
|
-
|
|
2428
|
+
), z = re(
|
|
2429
|
+
(L, k) => {
|
|
2430
|
+
const _ = $.current;
|
|
2431
|
+
return _.separators = new Map(_.separators), _.separators.set(k, L), v(), () => {
|
|
2432
|
+
_.separators = new Map(_.separators), _.separators.delete(k), v();
|
|
2432
2433
|
};
|
|
2433
2434
|
},
|
|
2434
2435
|
[v]
|
|
2435
|
-
),
|
|
2436
|
-
(
|
|
2437
|
-
disabled:
|
|
2438
|
-
disableDoubleClick:
|
|
2436
|
+
), M = re(
|
|
2437
|
+
(L, {
|
|
2438
|
+
disabled: k,
|
|
2439
|
+
disableDoubleClick: _
|
|
2439
2440
|
}) => {
|
|
2440
|
-
for (const G of
|
|
2441
|
-
G.id ===
|
|
2441
|
+
for (const G of $.current.separators.keys())
|
|
2442
|
+
G.id === L && (G.disabled = k, G.disableDoubleClick = _);
|
|
2442
2443
|
},
|
|
2443
2444
|
[]
|
|
2444
|
-
),
|
|
2445
|
+
), B = $.current.separators, J = Pe(
|
|
2445
2446
|
() => ({
|
|
2446
|
-
getDisableCursor:
|
|
2447
|
+
getDisableCursor: E,
|
|
2447
2448
|
getResizeAxisId: S,
|
|
2448
2449
|
gutters: {
|
|
2449
|
-
column:
|
|
2450
|
-
row:
|
|
2450
|
+
column: O.column,
|
|
2451
|
+
row: O.row
|
|
2451
2452
|
},
|
|
2452
2453
|
id: f,
|
|
2453
|
-
registerCell:
|
|
2454
|
-
registerSeparator:
|
|
2455
|
-
separatorPlacements:
|
|
2454
|
+
registerCell: P,
|
|
2455
|
+
registerSeparator: z,
|
|
2456
|
+
separatorPlacements: B,
|
|
2456
2457
|
trackCounts: {
|
|
2457
2458
|
column: p.length,
|
|
2458
2459
|
row: h.length
|
|
2459
2460
|
},
|
|
2460
|
-
updateSeparatorProps:
|
|
2461
|
+
updateSeparatorProps: M
|
|
2461
2462
|
}),
|
|
2462
2463
|
[
|
|
2463
2464
|
p.length,
|
|
2464
|
-
|
|
2465
|
+
E,
|
|
2465
2466
|
S,
|
|
2466
|
-
|
|
2467
|
-
|
|
2467
|
+
O.column,
|
|
2468
|
+
O.row,
|
|
2468
2469
|
f,
|
|
2470
|
+
P,
|
|
2469
2471
|
z,
|
|
2470
|
-
I,
|
|
2471
2472
|
h.length,
|
|
2472
|
-
|
|
2473
|
-
|
|
2473
|
+
B,
|
|
2474
|
+
M
|
|
2474
2475
|
]
|
|
2475
|
-
),
|
|
2476
|
+
), H = q([]);
|
|
2476
2477
|
ne(() => {
|
|
2477
|
-
const
|
|
2478
|
-
if (
|
|
2478
|
+
const L = D.current;
|
|
2479
|
+
if (L === null)
|
|
2479
2480
|
return;
|
|
2480
|
-
const
|
|
2481
|
-
cells:
|
|
2482
|
-
separatorPlacements:
|
|
2481
|
+
const k = $.current, _ = Qn({
|
|
2482
|
+
cells: k.cells,
|
|
2483
|
+
separatorPlacements: k.separators,
|
|
2483
2484
|
trackCounts: { column: p.length, row: h.length }
|
|
2484
2485
|
});
|
|
2485
|
-
|
|
2486
|
-
|
|
2487
|
-
}),
|
|
2488
|
-
const G = (
|
|
2489
|
-
const
|
|
2490
|
-
({ id:
|
|
2486
|
+
_.forEach((A) => {
|
|
2487
|
+
k.loggedErrors.has(A) || console.error(A);
|
|
2488
|
+
}), k.loggedErrors = new Set(_);
|
|
2489
|
+
const G = (A) => Array.from(k.separators.entries()).filter(([, W]) => W.axis === A).sort(([, W], [, be]) => W.index - be.index).map(([W]) => W), F = (A) => {
|
|
2490
|
+
const W = A === "column" ? p : h, be = A === "column" ? h : p, me = W.map((Q) => Q.id), He = S(A), je = G(A), xe = je.length > 0, Ue = W.map(
|
|
2491
|
+
({ id: Q, ...oe }, ee) => ({
|
|
2491
2492
|
// Tracks don't have DOM elements of their own;
|
|
2492
2493
|
// the Grid element is used to resolve relative size constraints (e.g. "em")
|
|
2493
|
-
element:
|
|
2494
|
-
id:
|
|
2494
|
+
element: L,
|
|
2495
|
+
id: me[ee],
|
|
2495
2496
|
idIsStable: !0,
|
|
2496
2497
|
mutableValues: {
|
|
2497
2498
|
expandToSize: void 0,
|
|
2498
2499
|
prevSize: void 0
|
|
2499
2500
|
},
|
|
2500
2501
|
onResize: void 0,
|
|
2501
|
-
constraintProps:
|
|
2502
|
+
constraintProps: oe
|
|
2502
2503
|
})
|
|
2503
|
-
),
|
|
2504
|
-
const
|
|
2505
|
-
if (
|
|
2506
|
-
for (const [
|
|
2507
|
-
if (
|
|
2508
|
-
const Oe =
|
|
2509
|
-
|
|
2510
|
-
|
|
2511
|
-
|
|
2504
|
+
), Te = () => {
|
|
2505
|
+
const Q = [];
|
|
2506
|
+
if (xe) {
|
|
2507
|
+
for (const [oe, ee] of k.separators)
|
|
2508
|
+
if (ee.axis === A && st(ee.index, W.length)) {
|
|
2509
|
+
const Oe = oe.element.getBoundingClientRect();
|
|
2510
|
+
Q[ee.index] = Math.max(
|
|
2511
|
+
Q[ee.index] ?? 0,
|
|
2512
|
+
A === "column" ? Oe.width : Oe.height
|
|
2512
2513
|
);
|
|
2513
2514
|
}
|
|
2514
2515
|
}
|
|
2515
|
-
return
|
|
2516
|
-
axis:
|
|
2517
|
-
element:
|
|
2518
|
-
gutterSizes:
|
|
2519
|
-
hasGutters:
|
|
2520
|
-
layout:
|
|
2521
|
-
trackIds:
|
|
2516
|
+
return bn({
|
|
2517
|
+
axis: A,
|
|
2518
|
+
element: L,
|
|
2519
|
+
gutterSizes: Q.filter((oe) => oe !== void 0),
|
|
2520
|
+
hasGutters: xe,
|
|
2521
|
+
layout: se(He)?.layout,
|
|
2522
|
+
trackIds: me
|
|
2522
2523
|
});
|
|
2523
2524
|
};
|
|
2524
2525
|
let De;
|
|
2525
|
-
const
|
|
2526
|
-
if (
|
|
2526
|
+
const Qe = R.defaultLayout?.[A === "column" ? "columns" : "rows"];
|
|
2527
|
+
if (Qe !== void 0 && Object.keys(Qe).length === me.length) {
|
|
2527
2528
|
De = {};
|
|
2528
|
-
for (const
|
|
2529
|
-
const
|
|
2530
|
-
|
|
2529
|
+
for (const Q of me) {
|
|
2530
|
+
const oe = Qe[Q];
|
|
2531
|
+
oe !== void 0 && (De[Q] = oe);
|
|
2531
2532
|
}
|
|
2532
2533
|
}
|
|
2533
2534
|
return {
|
|
2534
2535
|
disabled: !!i,
|
|
2535
|
-
element:
|
|
2536
|
-
id:
|
|
2536
|
+
element: L,
|
|
2537
|
+
id: He,
|
|
2537
2538
|
layoutStrategy: {
|
|
2538
|
-
getItemAriaControls: (
|
|
2539
|
-
const
|
|
2540
|
-
return
|
|
2541
|
-
const Oe =
|
|
2542
|
-
return Oe <=
|
|
2543
|
-
}).map((
|
|
2539
|
+
getItemAriaControls: (Q) => {
|
|
2540
|
+
const oe = me.indexOf(Q);
|
|
2541
|
+
return k.cells.filter((ee) => {
|
|
2542
|
+
const Oe = A === "column" ? ee.column : ee.row, un = A === "column" ? ee.columnSpan : ee.rowSpan;
|
|
2543
|
+
return Oe <= oe && oe < Oe + un;
|
|
2544
|
+
}).map((ee) => ee.element.id).filter(Boolean).join(" ") || void 0;
|
|
2544
2545
|
},
|
|
2545
|
-
calculateAvailableSize: () =>
|
|
2546
|
+
calculateAvailableSize: () => Te().availableSize,
|
|
2546
2547
|
calculateHitRegions: ({
|
|
2547
|
-
expandHitTargets:
|
|
2548
|
-
axis:
|
|
2549
|
-
includeDisabled:
|
|
2550
|
-
}) =>
|
|
2551
|
-
axis:
|
|
2552
|
-
cells:
|
|
2553
|
-
crossTrackCount:
|
|
2554
|
-
expandHitTargets:
|
|
2555
|
-
resizeAxis:
|
|
2556
|
-
axisSize:
|
|
2557
|
-
includeDisabled:
|
|
2558
|
-
separatorPlacements:
|
|
2548
|
+
expandHitTargets: Q,
|
|
2549
|
+
axis: oe,
|
|
2550
|
+
includeDisabled: ee
|
|
2551
|
+
}) => vn({
|
|
2552
|
+
axis: A,
|
|
2553
|
+
cells: k.cells,
|
|
2554
|
+
crossTrackCount: be.length,
|
|
2555
|
+
expandHitTargets: Q,
|
|
2556
|
+
resizeAxis: oe,
|
|
2557
|
+
axisSize: Te().availableSize,
|
|
2558
|
+
includeDisabled: ee,
|
|
2559
|
+
separatorPlacements: k.separators
|
|
2559
2560
|
}),
|
|
2560
|
-
getItemSizeInPixels: (
|
|
2561
|
+
getItemSizeInPixels: (Q) => Te().trackSizes[me.indexOf(Q)] ?? 0
|
|
2561
2562
|
},
|
|
2562
2563
|
mutableState: {
|
|
2563
2564
|
defaultLayout: De,
|
|
2564
|
-
disableCursor: !!
|
|
2565
|
-
expandedItemSizes:
|
|
2566
|
-
layouts:
|
|
2565
|
+
disableCursor: !!R.disableCursor,
|
|
2566
|
+
expandedItemSizes: k[A].expandedItemSizes,
|
|
2567
|
+
layouts: k[A].layouts
|
|
2567
2568
|
},
|
|
2568
|
-
orientation:
|
|
2569
|
-
items:
|
|
2569
|
+
orientation: A === "column" ? "horizontal" : "vertical",
|
|
2570
|
+
items: Ue,
|
|
2570
2571
|
resizePreviewMode: "panel",
|
|
2571
2572
|
get resizeTargetMinimumSize() {
|
|
2572
|
-
return
|
|
2573
|
+
return R.resizeTargetMinimumSize;
|
|
2573
2574
|
},
|
|
2574
|
-
separators:
|
|
2575
|
+
separators: je
|
|
2575
2576
|
};
|
|
2576
|
-
},
|
|
2577
|
-
|
|
2578
|
-
const
|
|
2579
|
-
const [
|
|
2580
|
-
(
|
|
2577
|
+
}, j = Re.map(F);
|
|
2578
|
+
H.current = j;
|
|
2579
|
+
const U = j.map((A) => nn(A)), te = () => {
|
|
2580
|
+
const [A, W] = j.map(
|
|
2581
|
+
(be) => se(be.id)
|
|
2581
2582
|
);
|
|
2582
|
-
if (!(!
|
|
2583
|
+
if (!(!A || !W || A.defaultLayoutDeferred || W.defaultLayoutDeferred))
|
|
2583
2584
|
return {
|
|
2584
|
-
layout: { columns:
|
|
2585
|
+
layout: { columns: A.layout, rows: W.layout },
|
|
2585
2586
|
requestedLayout: {
|
|
2586
|
-
columns:
|
|
2587
|
-
rows:
|
|
2587
|
+
columns: A.requestedLayout,
|
|
2588
|
+
rows: W.requestedLayout
|
|
2588
2589
|
}
|
|
2589
2590
|
};
|
|
2590
2591
|
};
|
|
2591
2592
|
{
|
|
2592
|
-
const
|
|
2593
|
-
|
|
2593
|
+
const A = te();
|
|
2594
|
+
A && (C(A.layout), N(A.layout, !1, A.requestedLayout));
|
|
2594
2595
|
}
|
|
2595
|
-
const
|
|
2596
|
-
(
|
|
2596
|
+
const Ae = j.map(
|
|
2597
|
+
(A) => Fe(A.id, (W) => {
|
|
2597
2598
|
const {
|
|
2598
|
-
defaultLayoutDeferred:
|
|
2599
|
-
derivedItemConstraints:
|
|
2600
|
-
layout:
|
|
2601
|
-
requestedLayout:
|
|
2602
|
-
} =
|
|
2603
|
-
if (
|
|
2599
|
+
defaultLayoutDeferred: be,
|
|
2600
|
+
derivedItemConstraints: me,
|
|
2601
|
+
layout: He,
|
|
2602
|
+
requestedLayout: je
|
|
2603
|
+
} = W.next;
|
|
2604
|
+
if (be || me.length === 0)
|
|
2604
2605
|
return;
|
|
2605
|
-
|
|
2606
|
-
derivedItemConstraints:
|
|
2607
|
-
axis:
|
|
2608
|
-
layout:
|
|
2609
|
-
prevLayout:
|
|
2610
|
-
requestedLayout:
|
|
2606
|
+
on({
|
|
2607
|
+
derivedItemConstraints: me,
|
|
2608
|
+
axis: A,
|
|
2609
|
+
layout: He,
|
|
2610
|
+
prevLayout: W.prev?.layout,
|
|
2611
|
+
requestedLayout: je
|
|
2611
2612
|
});
|
|
2612
|
-
const
|
|
2613
|
-
if (
|
|
2614
|
-
const
|
|
2615
|
-
(De) =>
|
|
2613
|
+
const xe = te();
|
|
2614
|
+
if (xe) {
|
|
2615
|
+
const Ue = de(), Te = Ue.state !== "active" || !Ue.hitRegions.some(
|
|
2616
|
+
(De) => j.includes(De.axis)
|
|
2616
2617
|
);
|
|
2617
|
-
C(
|
|
2618
|
-
|
|
2619
|
-
|
|
2620
|
-
|
|
2618
|
+
C(xe.layout), Te && N(
|
|
2619
|
+
xe.layout,
|
|
2620
|
+
W.isUserInteraction,
|
|
2621
|
+
xe.requestedLayout
|
|
2621
2622
|
);
|
|
2622
2623
|
}
|
|
2623
2624
|
})
|
|
2624
2625
|
);
|
|
2625
2626
|
return () => {
|
|
2626
|
-
|
|
2627
|
+
H.current = [], U.forEach((A) => A()), Ae.forEach((A) => A());
|
|
2627
2628
|
};
|
|
2628
2629
|
}, [
|
|
2629
2630
|
p,
|
|
2630
2631
|
i,
|
|
2631
2632
|
S,
|
|
2632
2633
|
f,
|
|
2633
|
-
|
|
2634
|
+
N,
|
|
2634
2635
|
C,
|
|
2635
2636
|
h,
|
|
2636
|
-
|
|
2637
|
-
|
|
2638
|
-
]),
|
|
2639
|
-
|
|
2640
|
-
|
|
2637
|
+
w,
|
|
2638
|
+
R
|
|
2639
|
+
]), Be(() => {
|
|
2640
|
+
H.current.forEach((L) => {
|
|
2641
|
+
L.mutableState.defaultLayout = o?.[L.orientation === "horizontal" ? "columns" : "rows"], L.mutableState.disableCursor = !!r;
|
|
2641
2642
|
});
|
|
2642
2643
|
}), it(l, () => {
|
|
2643
|
-
const
|
|
2644
|
-
const [G, F] =
|
|
2645
|
-
return !
|
|
2646
|
-
columns:
|
|
2644
|
+
const L = () => {
|
|
2645
|
+
const [G, F] = Re.map(S);
|
|
2646
|
+
return !Me(G) || !Me(F) ? { columns: {}, rows: {} } : {
|
|
2647
|
+
columns: Ge({
|
|
2647
2648
|
axisId: G
|
|
2648
2649
|
}).getLayout(),
|
|
2649
|
-
rows:
|
|
2650
|
+
rows: Ge({ axisId: F }).getLayout()
|
|
2650
2651
|
};
|
|
2651
|
-
},
|
|
2652
|
-
const
|
|
2653
|
-
const
|
|
2654
|
-
return
|
|
2655
|
-
|
|
2656
|
-
`Grid "${f}" no longer contains a ${G} with id "${F}"; ${G} ids are ${
|
|
2657
|
-
),
|
|
2652
|
+
}, k = (G) => G.map((F) => `"${F}"`).join(", "), _ = (G, F) => {
|
|
2653
|
+
const j = S(G), U = () => {
|
|
2654
|
+
const te = Me(j);
|
|
2655
|
+
return T(te, `Grid "${f}" has not been mounted`), T(
|
|
2656
|
+
te.items.some((Ae) => Ae.id === F),
|
|
2657
|
+
`Grid "${f}" no longer contains a ${G} with id "${F}"; ${G} ids are ${k(te.items.map((Ae) => Ae.id))}`
|
|
2658
|
+
), ft({ axisId: j, itemId: F });
|
|
2658
2659
|
};
|
|
2659
2660
|
return {
|
|
2660
|
-
collapse: () =>
|
|
2661
|
-
expand: () =>
|
|
2662
|
-
getSize: () =>
|
|
2663
|
-
isCollapsed: () =>
|
|
2664
|
-
resize: (
|
|
2661
|
+
collapse: () => U().collapse(),
|
|
2662
|
+
expand: () => U().expand(),
|
|
2663
|
+
getSize: () => U().getSize(),
|
|
2664
|
+
isCollapsed: () => U().isCollapsed(),
|
|
2665
|
+
resize: (te) => U().resize(te)
|
|
2665
2666
|
};
|
|
2666
2667
|
};
|
|
2667
2668
|
return {
|
|
2668
|
-
getLayout:
|
|
2669
|
+
getLayout: L,
|
|
2669
2670
|
getTrackById: (G, F) => {
|
|
2670
|
-
const
|
|
2671
|
-
return
|
|
2672
|
-
|
|
2673
|
-
`Grid "${f}" does not contain a ${G} with id "${
|
|
2674
|
-
),
|
|
2671
|
+
const j = G === "column" ? p : h, U = `${F}`;
|
|
2672
|
+
return T(
|
|
2673
|
+
j.some((te) => te.id === U),
|
|
2674
|
+
`Grid "${f}" does not contain a ${G} with id "${U}"; ${G} ids are ${k(j.map((te) => te.id))}`
|
|
2675
|
+
), _(G, U);
|
|
2675
2676
|
},
|
|
2676
2677
|
getTrackByIndex: (G, F) => {
|
|
2677
|
-
const
|
|
2678
|
-
return
|
|
2679
|
-
|
|
2680
|
-
`Grid "${f}" does not contain a ${G} at index ${F}; it has ${
|
|
2681
|
-
),
|
|
2678
|
+
const j = G === "column" ? p : h, U = Number.isInteger(F) ? j[F] : void 0;
|
|
2679
|
+
return T(
|
|
2680
|
+
U,
|
|
2681
|
+
`Grid "${f}" does not contain a ${G} at index ${F}; it has ${j.length} ${G}s`
|
|
2682
|
+
), _(G, U.id);
|
|
2682
2683
|
},
|
|
2683
|
-
setLayout: (G) => (
|
|
2684
|
-
const
|
|
2685
|
-
|
|
2686
|
-
}),
|
|
2684
|
+
setLayout: (G) => (Re.forEach((F) => {
|
|
2685
|
+
const j = G[F === "column" ? "columns" : "rows"], U = S(F);
|
|
2686
|
+
j && Me(U) && Ge({ axisId: U }).setLayout(j);
|
|
2687
|
+
}), L())
|
|
2687
2688
|
};
|
|
2688
2689
|
}, [p, S, f, h]);
|
|
2689
|
-
const
|
|
2690
|
-
const
|
|
2691
|
-
return (
|
|
2692
|
-
|
|
2693
|
-
o?.[
|
|
2694
|
-
)).join(
|
|
2695
|
-
}).join("|"),
|
|
2696
|
-
(
|
|
2697
|
-
const
|
|
2698
|
-
(
|
|
2690
|
+
const Z = () => Re.map((L) => {
|
|
2691
|
+
const k = se(S(L)), _ = I(L);
|
|
2692
|
+
return (k && !k.defaultLayoutDeferred ? _.map((F) => `minmax(0, ${k.layout[F.id] ?? 1}fr)`) : Zn(
|
|
2693
|
+
_,
|
|
2694
|
+
o?.[L === "column" ? "columns" : "rows"]
|
|
2695
|
+
)).join(O[L] ? " auto " : " ");
|
|
2696
|
+
}).join("|"), Se = re(
|
|
2697
|
+
(L) => {
|
|
2698
|
+
const k = Re.map(
|
|
2699
|
+
(_) => Fe(S(_), L)
|
|
2699
2700
|
);
|
|
2700
|
-
return () =>
|
|
2701
|
+
return () => k.forEach((_) => _());
|
|
2701
2702
|
},
|
|
2702
2703
|
[S]
|
|
2703
|
-
),
|
|
2704
|
-
|
|
2705
|
-
|
|
2706
|
-
|
|
2707
|
-
), [
|
|
2708
|
-
return /* @__PURE__ */
|
|
2704
|
+
), ze = Xe(
|
|
2705
|
+
Se,
|
|
2706
|
+
Z,
|
|
2707
|
+
Z
|
|
2708
|
+
), [Ie, ve] = ze.split("|");
|
|
2709
|
+
return /* @__PURE__ */ K(qt.Provider, { value: J, children: /* @__PURE__ */ K(
|
|
2709
2710
|
"div",
|
|
2710
2711
|
{
|
|
2711
2712
|
...y,
|
|
@@ -2720,47 +2721,47 @@ function Xn({
|
|
|
2720
2721
|
overflow: "hidden",
|
|
2721
2722
|
...m,
|
|
2722
2723
|
display: "grid",
|
|
2723
|
-
gridTemplateColumns:
|
|
2724
|
-
gridTemplateRows:
|
|
2724
|
+
gridTemplateColumns: Ie,
|
|
2725
|
+
gridTemplateRows: ve,
|
|
2725
2726
|
// Inform the browser that the library is handling touch events for this element
|
|
2726
2727
|
// NOTE This is not an inherited style
|
|
2727
2728
|
touchAction: "none"
|
|
2728
2729
|
},
|
|
2729
|
-
children: /* @__PURE__ */
|
|
2730
|
+
children: /* @__PURE__ */ K(mt.Provider, { value: null, children: e })
|
|
2730
2731
|
}
|
|
2731
2732
|
) });
|
|
2732
2733
|
}
|
|
2733
|
-
|
|
2734
|
-
function
|
|
2734
|
+
Jn.displayName = "Grid";
|
|
2735
|
+
function Dt(e, t) {
|
|
2735
2736
|
const n = JSON.stringify(e);
|
|
2736
|
-
return
|
|
2737
|
+
return Pe(() => {
|
|
2737
2738
|
const o = typeof e == "number" ? Array.from({ length: e }, (r, i) => ({ id: `${i}` })) : e.map((r, i) => ({
|
|
2738
2739
|
...r,
|
|
2739
2740
|
id: `${r.id ?? i}`
|
|
2740
2741
|
}));
|
|
2741
|
-
return
|
|
2742
|
+
return T(
|
|
2742
2743
|
o.length > 0,
|
|
2743
2744
|
`Grid must have at least one track; "${t}" is ${n}`
|
|
2744
2745
|
), o;
|
|
2745
2746
|
}, [n]);
|
|
2746
2747
|
}
|
|
2747
|
-
function
|
|
2748
|
-
|
|
2749
|
-
if (
|
|
2750
|
-
if (n.type ===
|
|
2748
|
+
function ln(e, t) {
|
|
2749
|
+
mn.forEach(e, (n) => {
|
|
2750
|
+
if (Ft(n))
|
|
2751
|
+
if (n.type === an) {
|
|
2751
2752
|
const { type: o } = n.props;
|
|
2752
2753
|
o === "column" ? t.column = !0 : o === "row" && (t.row = !0);
|
|
2753
2754
|
} else // Fragments
|
|
2754
|
-
typeof n.type == "symbol" && n.props !== null && typeof n.props == "object" && "children" in n.props &&
|
|
2755
|
+
typeof n.type == "symbol" && n.props !== null && typeof n.props == "object" && "children" in n.props && ln(n.props.children, t);
|
|
2755
2756
|
});
|
|
2756
2757
|
}
|
|
2757
|
-
function
|
|
2758
|
+
function Zn(e, t) {
|
|
2758
2759
|
if (t)
|
|
2759
2760
|
return e.map(
|
|
2760
2761
|
(i) => `minmax(0, ${t[i.id] ?? 1}fr)`
|
|
2761
2762
|
);
|
|
2762
2763
|
const n = e.map(
|
|
2763
|
-
(i) => i.defaultSize === void 0 ? void 0 :
|
|
2764
|
+
(i) => i.defaultSize === void 0 ? void 0 : Vt(i.defaultSize)
|
|
2764
2765
|
);
|
|
2765
2766
|
let o = 100, r = 0;
|
|
2766
2767
|
return n.forEach((i) => {
|
|
@@ -2772,14 +2773,14 @@ function Jn(e, t) {
|
|
|
2772
2773
|
return l === "%" ? `minmax(0, ${s}fr)` : `${s}${l}`;
|
|
2773
2774
|
});
|
|
2774
2775
|
}
|
|
2775
|
-
function
|
|
2776
|
+
function Qn({
|
|
2776
2777
|
cells: e,
|
|
2777
2778
|
separatorPlacements: t,
|
|
2778
2779
|
trackCounts: n
|
|
2779
2780
|
}) {
|
|
2780
2781
|
const o = [];
|
|
2781
2782
|
for (const l of e)
|
|
2782
|
-
|
|
2783
|
+
Re.forEach((a) => {
|
|
2783
2784
|
const [c, u] = a === "column" ? [l.column, l.columnSpan] : [l.row, l.rowSpan], d = n[a];
|
|
2784
2785
|
(!Number.isInteger(c) || !Number.isInteger(u) || c < 0 || u < 1 || c + u > d) && o.push(
|
|
2785
2786
|
`Invalid Cell ${a} placement (${a}: ${c}, ${a}Span: ${u}); Grid has ${d} ${a}s`
|
|
@@ -2832,19 +2833,19 @@ function Zn({
|
|
|
2832
2833
|
}
|
|
2833
2834
|
}), o;
|
|
2834
2835
|
}
|
|
2835
|
-
function
|
|
2836
|
-
return
|
|
2836
|
+
function Ot(e, t) {
|
|
2837
|
+
return ie(e.columns, t.columns) && ie(e.rows, t.rows);
|
|
2837
2838
|
}
|
|
2838
|
-
function
|
|
2839
|
+
function bo({
|
|
2839
2840
|
id: e,
|
|
2840
2841
|
onlySaveAfterUserInteractions: t,
|
|
2841
2842
|
storage: n = localStorage
|
|
2842
2843
|
}) {
|
|
2843
|
-
const o = `react-resizable-panels:grid:${e}`, r =
|
|
2844
|
-
|
|
2844
|
+
const o = `react-resizable-panels:grid:${e}`, r = Xe(
|
|
2845
|
+
eo,
|
|
2845
2846
|
() => n.getItem(o),
|
|
2846
2847
|
() => n.getItem(o)
|
|
2847
|
-
), i =
|
|
2848
|
+
), i = Pe(() => {
|
|
2848
2849
|
if (r)
|
|
2849
2850
|
try {
|
|
2850
2851
|
const l = JSON.parse(r);
|
|
@@ -2852,7 +2853,7 @@ function yo({
|
|
|
2852
2853
|
return l;
|
|
2853
2854
|
} catch {
|
|
2854
2855
|
}
|
|
2855
|
-
}, [r]), s =
|
|
2856
|
+
}, [r]), s = re(
|
|
2856
2857
|
(l, a) => {
|
|
2857
2858
|
if (!(t && !a.isUserInteraction))
|
|
2858
2859
|
try {
|
|
@@ -2877,17 +2878,23 @@ function yo({
|
|
|
2877
2878
|
onLayoutChanged: s
|
|
2878
2879
|
};
|
|
2879
2880
|
}
|
|
2880
|
-
function
|
|
2881
|
+
function eo() {
|
|
2881
2882
|
return function() {
|
|
2882
2883
|
};
|
|
2883
2884
|
}
|
|
2884
|
-
function
|
|
2885
|
-
return
|
|
2885
|
+
function xo() {
|
|
2886
|
+
return pe(null);
|
|
2886
2887
|
}
|
|
2887
|
-
function
|
|
2888
|
+
function wo() {
|
|
2888
2889
|
return q(null);
|
|
2889
2890
|
}
|
|
2890
|
-
function
|
|
2891
|
+
function to(e) {
|
|
2892
|
+
for (let t = 1; t < e.length; t++)
|
|
2893
|
+
if (lt(e[t - 1], e[t]) > 0)
|
|
2894
|
+
return !1;
|
|
2895
|
+
return !0;
|
|
2896
|
+
}
|
|
2897
|
+
function no({
|
|
2891
2898
|
separator: e
|
|
2892
2899
|
}) {
|
|
2893
2900
|
const { element: t } = e, n = q(null);
|
|
@@ -2914,7 +2921,7 @@ function eo({
|
|
|
2914
2921
|
transform: "none",
|
|
2915
2922
|
width: "100%"
|
|
2916
2923
|
}), n.current.appendChild(o), () => o.remove();
|
|
2917
|
-
}, [t]), /* @__PURE__ */
|
|
2924
|
+
}, [t]), /* @__PURE__ */ K(
|
|
2918
2925
|
"div",
|
|
2919
2926
|
{
|
|
2920
2927
|
ref: n,
|
|
@@ -2927,24 +2934,24 @@ function eo({
|
|
|
2927
2934
|
}
|
|
2928
2935
|
);
|
|
2929
2936
|
}
|
|
2930
|
-
function
|
|
2931
|
-
const e =
|
|
2932
|
-
return
|
|
2937
|
+
function Ze() {
|
|
2938
|
+
const e = _t(mt);
|
|
2939
|
+
return T(
|
|
2933
2940
|
e,
|
|
2934
2941
|
"Group Context not found; did you render a Panel or Separator outside of a Group?"
|
|
2935
2942
|
), e;
|
|
2936
2943
|
}
|
|
2937
|
-
function
|
|
2938
|
-
const { registerOverlay: t } =
|
|
2939
|
-
|
|
2944
|
+
function cn(e) {
|
|
2945
|
+
const { registerOverlay: t } = Ze(), n = q(e);
|
|
2946
|
+
tn(n.current, e) || (n.current = e);
|
|
2940
2947
|
const o = n.current;
|
|
2941
2948
|
return ne(
|
|
2942
2949
|
() => t(o),
|
|
2943
2950
|
[t, o]
|
|
2944
2951
|
), null;
|
|
2945
2952
|
}
|
|
2946
|
-
|
|
2947
|
-
function
|
|
2953
|
+
cn.displayName = "SeparatorOverlay";
|
|
2954
|
+
function oo({
|
|
2948
2955
|
active: e,
|
|
2949
2956
|
orientation: t,
|
|
2950
2957
|
style: n,
|
|
@@ -2967,7 +2974,7 @@ function to({
|
|
|
2967
2974
|
break;
|
|
2968
2975
|
}
|
|
2969
2976
|
}
|
|
2970
|
-
return /* @__PURE__ */
|
|
2977
|
+
return /* @__PURE__ */ K(
|
|
2971
2978
|
"div",
|
|
2972
2979
|
{
|
|
2973
2980
|
...o,
|
|
@@ -2981,20 +2988,20 @@ function to({
|
|
|
2981
2988
|
}
|
|
2982
2989
|
);
|
|
2983
2990
|
}
|
|
2984
|
-
function
|
|
2991
|
+
function ro({
|
|
2985
2992
|
overlay: e,
|
|
2986
2993
|
preview: t
|
|
2987
2994
|
}) {
|
|
2988
2995
|
const { axis: n, offset: o, rect: r, separator: i } = t, s = n.orientation === "horizontal";
|
|
2989
2996
|
let l = i?.preview, a = e;
|
|
2990
|
-
return
|
|
2991
|
-
|
|
2997
|
+
return Ft(l) && l.type === cn && (a = l.props, l = void 0), l == null && (a ? l = /* @__PURE__ */ K(
|
|
2998
|
+
oo,
|
|
2992
2999
|
{
|
|
2993
3000
|
...a,
|
|
2994
3001
|
active: t.active,
|
|
2995
3002
|
orientation: n.orientation
|
|
2996
3003
|
}
|
|
2997
|
-
) : i && (l = /* @__PURE__ */
|
|
3004
|
+
) : i && (l = /* @__PURE__ */ K(no, { separator: i }))), /* @__PURE__ */ K(
|
|
2998
3005
|
"div",
|
|
2999
3006
|
{
|
|
3000
3007
|
"aria-hidden": "true",
|
|
@@ -3013,43 +3020,46 @@ function no({
|
|
|
3013
3020
|
}
|
|
3014
3021
|
);
|
|
3015
3022
|
}
|
|
3016
|
-
function
|
|
3023
|
+
function io(e) {
|
|
3024
|
+
return Array.from(e).sort(lt);
|
|
3025
|
+
}
|
|
3026
|
+
function so(e, t) {
|
|
3017
3027
|
const n = q({
|
|
3018
3028
|
getLayout: () => ({}),
|
|
3019
|
-
setLayout:
|
|
3029
|
+
setLayout: In
|
|
3020
3030
|
});
|
|
3021
3031
|
it(t, () => n.current, []), ne(() => {
|
|
3022
3032
|
Object.assign(
|
|
3023
3033
|
n.current,
|
|
3024
|
-
|
|
3034
|
+
Ge({ axisId: e })
|
|
3025
3035
|
);
|
|
3026
3036
|
});
|
|
3027
3037
|
}
|
|
3028
|
-
function
|
|
3038
|
+
function ao({
|
|
3029
3039
|
groupId: e,
|
|
3030
3040
|
resizePreviewMode: t
|
|
3031
3041
|
}) {
|
|
3032
|
-
const [n, o] =
|
|
3042
|
+
const [n, o] = pe([]), r = q(n);
|
|
3033
3043
|
return ne(() => {
|
|
3034
3044
|
const i = (l) => {
|
|
3035
|
-
const a =
|
|
3036
|
-
(d) => d.axis === a && (d.active || !
|
|
3045
|
+
const a = Me(e), c = t === "separator" && l.state === "active" ? l.previews.filter(
|
|
3046
|
+
(d) => d.axis === a && (d.active || !Y(d.offset, 0))
|
|
3037
3047
|
) : [], u = r.current;
|
|
3038
3048
|
u.length === c.length && c.every(
|
|
3039
3049
|
(d, g) => d === u[g]
|
|
3040
3050
|
) || (r.current = c, o(c));
|
|
3041
3051
|
};
|
|
3042
3052
|
if (t !== "separator") {
|
|
3043
|
-
i(
|
|
3053
|
+
i(de());
|
|
3044
3054
|
return;
|
|
3045
3055
|
}
|
|
3046
|
-
const s =
|
|
3056
|
+
const s = jt(
|
|
3047
3057
|
({ next: l }) => i(l)
|
|
3048
3058
|
);
|
|
3049
|
-
return i(
|
|
3059
|
+
return i(de()), s;
|
|
3050
3060
|
}, [e, t]), n;
|
|
3051
3061
|
}
|
|
3052
|
-
function
|
|
3062
|
+
function lo({
|
|
3053
3063
|
children: e,
|
|
3054
3064
|
className: t,
|
|
3055
3065
|
defaultLayout: n,
|
|
@@ -3072,154 +3082,164 @@ function io({
|
|
|
3072
3082
|
const f = q({
|
|
3073
3083
|
onLayoutChange: {},
|
|
3074
3084
|
onLayoutChanged: {}
|
|
3075
|
-
}), S =
|
|
3076
|
-
|
|
3077
|
-
}), p =
|
|
3078
|
-
(z,
|
|
3079
|
-
|
|
3085
|
+
}), S = he((z) => {
|
|
3086
|
+
ie(f.current.onLayoutChange, z) || (f.current.onLayoutChange = z, a?.(z));
|
|
3087
|
+
}), p = he(
|
|
3088
|
+
(z, M, B) => {
|
|
3089
|
+
ie(f.current.onLayoutChanged, z) || (f.current.onLayoutChanged = z, c?.(z, { isUserInteraction: M, requestedLayout: B }));
|
|
3080
3090
|
}
|
|
3081
|
-
), h =
|
|
3091
|
+
), h = $e(l), [I, x] = pe(), C = ao({
|
|
3082
3092
|
groupId: h,
|
|
3083
3093
|
resizePreviewMode: d
|
|
3084
|
-
}),
|
|
3094
|
+
}), N = q(null), [D, b] = rn(), w = q([]), v = q({
|
|
3085
3095
|
lastExpandedPanelSizes: {},
|
|
3086
3096
|
layouts: {},
|
|
3087
3097
|
panels: [],
|
|
3088
3098
|
separators: []
|
|
3089
|
-
}),
|
|
3090
|
-
|
|
3091
|
-
const
|
|
3092
|
-
(z,
|
|
3093
|
-
const
|
|
3094
|
-
if (
|
|
3099
|
+
}), $ = Ve(N, i);
|
|
3100
|
+
so(h, s);
|
|
3101
|
+
const O = he(
|
|
3102
|
+
(z, M) => {
|
|
3103
|
+
const B = se(z);
|
|
3104
|
+
if (B)
|
|
3095
3105
|
return {
|
|
3096
|
-
flexGrow:
|
|
3106
|
+
flexGrow: B.layout[M] ?? 1
|
|
3097
3107
|
};
|
|
3098
|
-
if (n?.[
|
|
3108
|
+
if (n?.[M])
|
|
3099
3109
|
return {
|
|
3100
|
-
flexGrow: n?.[
|
|
3110
|
+
flexGrow: n?.[M]
|
|
3101
3111
|
};
|
|
3102
3112
|
}
|
|
3103
|
-
),
|
|
3113
|
+
), R = Je({
|
|
3104
3114
|
defaultLayout: n,
|
|
3105
3115
|
disableCursor: o,
|
|
3106
3116
|
resizeTargetMinimumSize: g
|
|
3107
|
-
}),
|
|
3117
|
+
}), E = Pe(
|
|
3108
3118
|
() => ({
|
|
3109
3119
|
get disableCursor() {
|
|
3110
|
-
return !!
|
|
3120
|
+
return !!R.disableCursor;
|
|
3111
3121
|
},
|
|
3112
|
-
getPanelStyles:
|
|
3122
|
+
getPanelStyles: O,
|
|
3113
3123
|
id: h,
|
|
3114
3124
|
orientation: u,
|
|
3115
3125
|
registerPanel: (z) => {
|
|
3116
|
-
const
|
|
3117
|
-
return
|
|
3118
|
-
...
|
|
3126
|
+
const M = v.current;
|
|
3127
|
+
return M.panels = Ne(u, [
|
|
3128
|
+
...M.panels,
|
|
3119
3129
|
z
|
|
3120
3130
|
]), b(), () => {
|
|
3121
|
-
|
|
3122
|
-
(
|
|
3131
|
+
M.panels = M.panels.filter(
|
|
3132
|
+
(B) => B !== z
|
|
3123
3133
|
), b();
|
|
3124
3134
|
};
|
|
3125
3135
|
},
|
|
3126
|
-
registerOverlay: (z) => (
|
|
3127
|
-
|
|
3136
|
+
registerOverlay: (z) => (x(z), () => {
|
|
3137
|
+
x(void 0);
|
|
3128
3138
|
}),
|
|
3129
3139
|
registerSeparator: (z) => {
|
|
3130
|
-
const
|
|
3131
|
-
return
|
|
3132
|
-
...
|
|
3140
|
+
const M = v.current;
|
|
3141
|
+
return M.separators = Ne(u, [
|
|
3142
|
+
...M.separators,
|
|
3133
3143
|
z
|
|
3134
3144
|
]), b(), () => {
|
|
3135
|
-
|
|
3136
|
-
(
|
|
3145
|
+
M.separators = M.separators.filter(
|
|
3146
|
+
(B) => B !== z
|
|
3137
3147
|
), b();
|
|
3138
3148
|
};
|
|
3139
3149
|
},
|
|
3140
|
-
updatePanelProps: (z, { disabled:
|
|
3141
|
-
const
|
|
3142
|
-
(
|
|
3150
|
+
updatePanelProps: (z, { disabled: M }) => {
|
|
3151
|
+
const J = v.current.panels.find(
|
|
3152
|
+
(Se) => Se.id === z
|
|
3143
3153
|
);
|
|
3144
|
-
|
|
3145
|
-
const
|
|
3146
|
-
|
|
3147
|
-
...
|
|
3148
|
-
derivedItemConstraints: rt(
|
|
3154
|
+
J && (J.constraintProps.disabled = M);
|
|
3155
|
+
const H = Me(h), Z = se(h);
|
|
3156
|
+
H && Z && fe(H, {
|
|
3157
|
+
...Z,
|
|
3158
|
+
derivedItemConstraints: rt(H)
|
|
3149
3159
|
});
|
|
3150
3160
|
},
|
|
3151
3161
|
updateSeparatorProps: (z, {
|
|
3152
|
-
disabled:
|
|
3153
|
-
disableDoubleClick:
|
|
3162
|
+
disabled: M,
|
|
3163
|
+
disableDoubleClick: B
|
|
3154
3164
|
}) => {
|
|
3155
|
-
const
|
|
3156
|
-
(
|
|
3165
|
+
const H = v.current.separators.find(
|
|
3166
|
+
(Z) => Z.id === z
|
|
3157
3167
|
);
|
|
3158
|
-
|
|
3168
|
+
H && (H.disabled = M, H.disableDoubleClick = B);
|
|
3159
3169
|
}
|
|
3160
3170
|
}),
|
|
3161
|
-
[
|
|
3162
|
-
),
|
|
3171
|
+
[O, h, b, u, R]
|
|
3172
|
+
), P = q(null);
|
|
3163
3173
|
return ne(() => {
|
|
3164
|
-
const z =
|
|
3174
|
+
const z = N.current;
|
|
3165
3175
|
if (z === null)
|
|
3166
3176
|
return;
|
|
3167
|
-
const
|
|
3168
|
-
|
|
3169
|
-
|
|
3170
|
-
|
|
3171
|
-
|
|
3172
|
-
|
|
3173
|
-
|
|
3177
|
+
const M = v.current;
|
|
3178
|
+
M.panels = Ne(
|
|
3179
|
+
u,
|
|
3180
|
+
M.panels
|
|
3181
|
+
), M.separators = Ne(
|
|
3182
|
+
u,
|
|
3183
|
+
M.separators
|
|
3184
|
+
), w.current = io([
|
|
3185
|
+
...M.panels.map(({ element: L }) => L),
|
|
3186
|
+
...M.separators.map(({ element: L }) => L)
|
|
3187
|
+
]);
|
|
3188
|
+
let B;
|
|
3189
|
+
if (R.defaultLayout !== void 0 && Object.keys(R.defaultLayout).length === M.panels.length) {
|
|
3190
|
+
B = {};
|
|
3191
|
+
for (const L of M.panels) {
|
|
3192
|
+
const k = R.defaultLayout[L.id];
|
|
3193
|
+
k !== void 0 && (B[L.id] = k);
|
|
3174
3194
|
}
|
|
3175
3195
|
}
|
|
3176
|
-
const
|
|
3196
|
+
const J = {
|
|
3177
3197
|
disabled: !!r,
|
|
3178
3198
|
element: z,
|
|
3179
3199
|
id: h,
|
|
3180
3200
|
mutableState: {
|
|
3181
|
-
defaultLayout:
|
|
3182
|
-
disableCursor: !!
|
|
3183
|
-
expandedItemSizes:
|
|
3184
|
-
layouts:
|
|
3201
|
+
defaultLayout: B,
|
|
3202
|
+
disableCursor: !!R.disableCursor,
|
|
3203
|
+
expandedItemSizes: v.current.lastExpandedPanelSizes,
|
|
3204
|
+
layouts: v.current.layouts
|
|
3185
3205
|
},
|
|
3186
3206
|
orientation: u,
|
|
3187
|
-
items:
|
|
3207
|
+
items: M.panels,
|
|
3188
3208
|
resizePreviewMode: d,
|
|
3189
3209
|
get resizeTargetMinimumSize() {
|
|
3190
|
-
return
|
|
3210
|
+
return R.resizeTargetMinimumSize;
|
|
3191
3211
|
},
|
|
3192
|
-
separators:
|
|
3212
|
+
separators: M.separators
|
|
3193
3213
|
};
|
|
3194
|
-
|
|
3195
|
-
const
|
|
3196
|
-
defaultLayoutDeferred:
|
|
3197
|
-
derivedItemConstraints:
|
|
3198
|
-
layout:
|
|
3199
|
-
requestedLayout:
|
|
3200
|
-
} =
|
|
3201
|
-
!
|
|
3202
|
-
const
|
|
3214
|
+
P.current = J;
|
|
3215
|
+
const H = nn(J), {
|
|
3216
|
+
defaultLayoutDeferred: Z,
|
|
3217
|
+
derivedItemConstraints: Se,
|
|
3218
|
+
layout: ze,
|
|
3219
|
+
requestedLayout: Ie
|
|
3220
|
+
} = se(J.id, !0);
|
|
3221
|
+
!Z && Se.length > 0 && (S(ze), p(ze, !1, Ie));
|
|
3222
|
+
const ve = Fe(h, (L) => {
|
|
3203
3223
|
const {
|
|
3204
|
-
defaultLayoutDeferred:
|
|
3205
|
-
derivedItemConstraints:
|
|
3206
|
-
layout:
|
|
3207
|
-
requestedLayout:
|
|
3208
|
-
} =
|
|
3209
|
-
if (
|
|
3224
|
+
defaultLayoutDeferred: k,
|
|
3225
|
+
derivedItemConstraints: _,
|
|
3226
|
+
layout: G,
|
|
3227
|
+
requestedLayout: F
|
|
3228
|
+
} = L.next;
|
|
3229
|
+
if (k || _.length === 0)
|
|
3210
3230
|
return;
|
|
3211
|
-
|
|
3212
|
-
derivedItemConstraints:
|
|
3213
|
-
axis:
|
|
3214
|
-
layout:
|
|
3215
|
-
prevLayout:
|
|
3216
|
-
requestedLayout:
|
|
3231
|
+
on({
|
|
3232
|
+
derivedItemConstraints: _,
|
|
3233
|
+
axis: J,
|
|
3234
|
+
layout: G,
|
|
3235
|
+
prevLayout: L.prev?.layout,
|
|
3236
|
+
requestedLayout: F
|
|
3217
3237
|
});
|
|
3218
|
-
const
|
|
3219
|
-
S(
|
|
3238
|
+
const j = de(), U = j.state !== "active" || !j.hitRegions.some((te) => te.axis === J);
|
|
3239
|
+
S(G), U && p(G, L.isUserInteraction, F);
|
|
3220
3240
|
});
|
|
3221
3241
|
return () => {
|
|
3222
|
-
|
|
3242
|
+
P.current = null, H(), ve();
|
|
3223
3243
|
};
|
|
3224
3244
|
}, [
|
|
3225
3245
|
r,
|
|
@@ -3229,11 +3249,13 @@ function io({
|
|
|
3229
3249
|
u,
|
|
3230
3250
|
D,
|
|
3231
3251
|
d,
|
|
3232
|
-
|
|
3233
|
-
]),
|
|
3234
|
-
|
|
3252
|
+
R
|
|
3253
|
+
]), ne(() => {
|
|
3254
|
+
to(w.current) || b();
|
|
3255
|
+
}), Be(() => {
|
|
3256
|
+
const z = P.current;
|
|
3235
3257
|
z && (z.mutableState.defaultLayout = n, z.mutableState.disableCursor = !!o);
|
|
3236
|
-
}), /* @__PURE__ */
|
|
3258
|
+
}), /* @__PURE__ */ K(mt.Provider, { value: E, children: /* @__PURE__ */ dn(
|
|
3237
3259
|
"div",
|
|
3238
3260
|
{
|
|
3239
3261
|
...y,
|
|
@@ -3241,7 +3263,7 @@ function io({
|
|
|
3241
3263
|
"data-group": !0,
|
|
3242
3264
|
"data-testid": h,
|
|
3243
3265
|
id: h,
|
|
3244
|
-
ref:
|
|
3266
|
+
ref: $,
|
|
3245
3267
|
style: {
|
|
3246
3268
|
height: "100%",
|
|
3247
3269
|
width: "100%",
|
|
@@ -3259,10 +3281,10 @@ function io({
|
|
|
3259
3281
|
},
|
|
3260
3282
|
children: [
|
|
3261
3283
|
e,
|
|
3262
|
-
C.map((z) => /* @__PURE__ */
|
|
3263
|
-
|
|
3284
|
+
C.map((z) => /* @__PURE__ */ K(
|
|
3285
|
+
ro,
|
|
3264
3286
|
{
|
|
3265
|
-
overlay:
|
|
3287
|
+
overlay: I,
|
|
3266
3288
|
preview: z
|
|
3267
3289
|
},
|
|
3268
3290
|
z.key
|
|
@@ -3271,16 +3293,16 @@ function io({
|
|
|
3271
3293
|
}
|
|
3272
3294
|
) });
|
|
3273
3295
|
}
|
|
3274
|
-
|
|
3275
|
-
function
|
|
3296
|
+
lo.displayName = "Group";
|
|
3297
|
+
function Ke(e, t) {
|
|
3276
3298
|
return `react-resizable-panels:${[e, ...t].join(":")}`;
|
|
3277
3299
|
}
|
|
3278
|
-
function
|
|
3300
|
+
function co({
|
|
3279
3301
|
id: e,
|
|
3280
3302
|
panelIds: t,
|
|
3281
3303
|
storage: n
|
|
3282
3304
|
}) {
|
|
3283
|
-
const o =
|
|
3305
|
+
const o = Ke(e, []), r = n.getItem(o);
|
|
3284
3306
|
if (r)
|
|
3285
3307
|
try {
|
|
3286
3308
|
const i = JSON.parse(r);
|
|
@@ -3310,38 +3332,38 @@ function so({
|
|
|
3310
3332
|
} catch {
|
|
3311
3333
|
}
|
|
3312
3334
|
}
|
|
3313
|
-
function
|
|
3335
|
+
function zo({
|
|
3314
3336
|
debounceSaveMs: e = 100,
|
|
3315
3337
|
onlySaveAfterUserInteractions: t,
|
|
3316
3338
|
panelIds: n,
|
|
3317
3339
|
storage: o = localStorage,
|
|
3318
3340
|
...r
|
|
3319
3341
|
}) {
|
|
3320
|
-
const i = n !== void 0, s = "id" in r ? r.id : r.groupId, l =
|
|
3321
|
-
|
|
3342
|
+
const i = n !== void 0, s = "id" in r ? r.id : r.groupId, l = Ke(s, n ?? []), a = Xe(
|
|
3343
|
+
uo,
|
|
3322
3344
|
() => o.getItem(l),
|
|
3323
3345
|
() => o.getItem(l)
|
|
3324
|
-
), c =
|
|
3346
|
+
), c = Pe(() => {
|
|
3325
3347
|
if (a) {
|
|
3326
3348
|
const S = JSON.parse(a), p = Object.values(S);
|
|
3327
3349
|
if (Array.from(p).every((h) => typeof h == "number"))
|
|
3328
3350
|
return S;
|
|
3329
3351
|
}
|
|
3330
|
-
}, [a]), u =
|
|
3352
|
+
}, [a]), u = Pe(() => {
|
|
3331
3353
|
if (!c)
|
|
3332
|
-
return
|
|
3354
|
+
return co({
|
|
3333
3355
|
id: s,
|
|
3334
3356
|
panelIds: n,
|
|
3335
3357
|
storage: o
|
|
3336
3358
|
});
|
|
3337
|
-
}, [c, s, n, o]), d = c ?? u, g = q(null), m =
|
|
3359
|
+
}, [c, s, n, o]), d = c ?? u, g = q(null), m = re(() => {
|
|
3338
3360
|
const S = g.current;
|
|
3339
3361
|
S && (g.current = null, clearTimeout(S));
|
|
3340
3362
|
}, []);
|
|
3341
|
-
|
|
3363
|
+
Nt(() => () => {
|
|
3342
3364
|
m();
|
|
3343
3365
|
}, [m]);
|
|
3344
|
-
const y =
|
|
3366
|
+
const y = re(
|
|
3345
3367
|
// The hook persists every layout commit -- including library-driven ones --
|
|
3346
3368
|
// because it owns its own storage and the goal is to remember whatever
|
|
3347
3369
|
// layout the user is currently looking at. Consumers that only want to
|
|
@@ -3352,12 +3374,12 @@ function bo({
|
|
|
3352
3374
|
return;
|
|
3353
3375
|
m();
|
|
3354
3376
|
const h = p.requestedLayout ?? S;
|
|
3355
|
-
let
|
|
3356
|
-
i ?
|
|
3377
|
+
let I;
|
|
3378
|
+
i ? I = Ke(s, Object.keys(h)) : I = Ke(s, []);
|
|
3357
3379
|
try {
|
|
3358
|
-
o.setItem(
|
|
3359
|
-
} catch (
|
|
3360
|
-
console.error(
|
|
3380
|
+
o.setItem(I, JSON.stringify(h));
|
|
3381
|
+
} catch (x) {
|
|
3382
|
+
console.error(x);
|
|
3361
3383
|
}
|
|
3362
3384
|
},
|
|
3363
3385
|
[
|
|
@@ -3367,7 +3389,7 @@ function bo({
|
|
|
3367
3389
|
t,
|
|
3368
3390
|
o
|
|
3369
3391
|
]
|
|
3370
|
-
), f =
|
|
3392
|
+
), f = re(
|
|
3371
3393
|
(S) => {
|
|
3372
3394
|
m(), e === 0 ? y(S, { isUserInteraction: !1 }) : g.current = setTimeout(() => {
|
|
3373
3395
|
y(S, { isUserInteraction: !1 });
|
|
@@ -3392,35 +3414,35 @@ function bo({
|
|
|
3392
3414
|
onLayoutChanged: y
|
|
3393
3415
|
};
|
|
3394
3416
|
}
|
|
3395
|
-
function
|
|
3417
|
+
function uo() {
|
|
3396
3418
|
return function() {
|
|
3397
3419
|
};
|
|
3398
3420
|
}
|
|
3399
|
-
function
|
|
3400
|
-
return
|
|
3421
|
+
function Io() {
|
|
3422
|
+
return pe(null);
|
|
3401
3423
|
}
|
|
3402
|
-
function
|
|
3424
|
+
function Lo() {
|
|
3403
3425
|
return q(null);
|
|
3404
3426
|
}
|
|
3405
|
-
function
|
|
3406
|
-
const { id: n } =
|
|
3407
|
-
collapse:
|
|
3408
|
-
expand:
|
|
3427
|
+
function fo(e, t) {
|
|
3428
|
+
const { id: n } = Ze(), o = q({
|
|
3429
|
+
collapse: et,
|
|
3430
|
+
expand: et,
|
|
3409
3431
|
getSize: () => ({
|
|
3410
3432
|
asPercentage: 0,
|
|
3411
3433
|
inPixels: 0
|
|
3412
3434
|
}),
|
|
3413
3435
|
isCollapsed: () => !1,
|
|
3414
|
-
resize:
|
|
3436
|
+
resize: et
|
|
3415
3437
|
});
|
|
3416
3438
|
it(t, () => o.current, []), ne(() => {
|
|
3417
3439
|
Object.assign(
|
|
3418
3440
|
o.current,
|
|
3419
|
-
|
|
3441
|
+
ft({ axisId: n, itemId: e })
|
|
3420
3442
|
);
|
|
3421
3443
|
});
|
|
3422
3444
|
}
|
|
3423
|
-
function
|
|
3445
|
+
function mo({
|
|
3424
3446
|
children: e,
|
|
3425
3447
|
className: t,
|
|
3426
3448
|
collapsedSize: n = "0%",
|
|
@@ -3438,31 +3460,31 @@ function co({
|
|
|
3438
3460
|
style: y,
|
|
3439
3461
|
...f
|
|
3440
3462
|
}) {
|
|
3441
|
-
const S = !!c, p =
|
|
3463
|
+
const S = !!c, p = $e(c), h = Je({
|
|
3442
3464
|
disabled: s
|
|
3443
|
-
}),
|
|
3465
|
+
}), I = q(null), x = Ve(I, l), {
|
|
3444
3466
|
getPanelStyles: C,
|
|
3445
|
-
id:
|
|
3467
|
+
id: N,
|
|
3446
3468
|
orientation: D,
|
|
3447
3469
|
registerPanel: b,
|
|
3448
|
-
updatePanelProps:
|
|
3449
|
-
} =
|
|
3450
|
-
(
|
|
3451
|
-
g?.(
|
|
3470
|
+
updatePanelProps: w
|
|
3471
|
+
} = Ze(), v = g !== null, $ = he(
|
|
3472
|
+
(P, z, M) => {
|
|
3473
|
+
g?.(P, c, M);
|
|
3452
3474
|
}
|
|
3453
3475
|
);
|
|
3454
3476
|
ne(() => {
|
|
3455
|
-
const
|
|
3456
|
-
if (
|
|
3457
|
-
const
|
|
3458
|
-
element:
|
|
3477
|
+
const P = I.current;
|
|
3478
|
+
if (P !== null) {
|
|
3479
|
+
const z = {
|
|
3480
|
+
element: P,
|
|
3459
3481
|
id: p,
|
|
3460
3482
|
idIsStable: S,
|
|
3461
3483
|
mutableValues: {
|
|
3462
3484
|
expandToSize: void 0,
|
|
3463
3485
|
prevSize: void 0
|
|
3464
3486
|
},
|
|
3465
|
-
onResize: v ?
|
|
3487
|
+
onResize: v ? $ : void 0,
|
|
3466
3488
|
constraintProps: {
|
|
3467
3489
|
groupResizeBehavior: a,
|
|
3468
3490
|
collapsedSize: n,
|
|
@@ -3474,7 +3496,7 @@ function co({
|
|
|
3474
3496
|
minSize: d
|
|
3475
3497
|
}
|
|
3476
3498
|
};
|
|
3477
|
-
return b(
|
|
3499
|
+
return b(z);
|
|
3478
3500
|
}
|
|
3479
3501
|
}, [
|
|
3480
3502
|
a,
|
|
@@ -3487,27 +3509,27 @@ function co({
|
|
|
3487
3509
|
S,
|
|
3488
3510
|
u,
|
|
3489
3511
|
d,
|
|
3490
|
-
|
|
3512
|
+
$,
|
|
3491
3513
|
b,
|
|
3492
3514
|
h
|
|
3493
|
-
]),
|
|
3494
|
-
|
|
3495
|
-
}, [s, p,
|
|
3496
|
-
const
|
|
3497
|
-
const
|
|
3498
|
-
if (
|
|
3499
|
-
return JSON.stringify(
|
|
3500
|
-
},
|
|
3501
|
-
(
|
|
3502
|
-
|
|
3503
|
-
|
|
3515
|
+
]), Be(() => {
|
|
3516
|
+
w(p, { disabled: s });
|
|
3517
|
+
}, [s, p, w]), fo(p, m);
|
|
3518
|
+
const O = () => {
|
|
3519
|
+
const P = C(N, p);
|
|
3520
|
+
if (P)
|
|
3521
|
+
return JSON.stringify(P);
|
|
3522
|
+
}, R = Xe(
|
|
3523
|
+
(P) => Fe(N, P),
|
|
3524
|
+
O,
|
|
3525
|
+
O
|
|
3504
3526
|
);
|
|
3505
|
-
let
|
|
3506
|
-
return
|
|
3527
|
+
let E;
|
|
3528
|
+
return R ? E = JSON.parse(R) : i !== void 0 ? E = {
|
|
3507
3529
|
flexGrow: void 0,
|
|
3508
3530
|
flexShrink: void 0,
|
|
3509
3531
|
flexBasis: i
|
|
3510
|
-
} :
|
|
3532
|
+
} : E = { flexGrow: 1 }, /* @__PURE__ */ K(
|
|
3511
3533
|
"div",
|
|
3512
3534
|
{
|
|
3513
3535
|
...f,
|
|
@@ -3515,16 +3537,16 @@ function co({
|
|
|
3515
3537
|
"data-panel": !0,
|
|
3516
3538
|
"data-testid": p,
|
|
3517
3539
|
id: p,
|
|
3518
|
-
ref:
|
|
3540
|
+
ref: x,
|
|
3519
3541
|
style: {
|
|
3520
|
-
...
|
|
3542
|
+
...po,
|
|
3521
3543
|
display: "flex",
|
|
3522
3544
|
flexBasis: 0,
|
|
3523
3545
|
flexShrink: 1,
|
|
3524
3546
|
overflow: "visible",
|
|
3525
|
-
...
|
|
3547
|
+
...E
|
|
3526
3548
|
},
|
|
3527
|
-
children: /* @__PURE__ */
|
|
3549
|
+
children: /* @__PURE__ */ K(
|
|
3528
3550
|
"div",
|
|
3529
3551
|
{
|
|
3530
3552
|
className: t,
|
|
@@ -3546,8 +3568,8 @@ function co({
|
|
|
3546
3568
|
}
|
|
3547
3569
|
);
|
|
3548
3570
|
}
|
|
3549
|
-
|
|
3550
|
-
const
|
|
3571
|
+
mo.displayName = "Panel";
|
|
3572
|
+
const po = {
|
|
3551
3573
|
minHeight: 0,
|
|
3552
3574
|
maxHeight: "100%",
|
|
3553
3575
|
height: "auto",
|
|
@@ -3559,14 +3581,14 @@ const uo = {
|
|
|
3559
3581
|
padding: 0,
|
|
3560
3582
|
margin: 0
|
|
3561
3583
|
};
|
|
3562
|
-
function
|
|
3563
|
-
return
|
|
3584
|
+
function Co() {
|
|
3585
|
+
return pe(null);
|
|
3564
3586
|
}
|
|
3565
|
-
function
|
|
3587
|
+
function Ro() {
|
|
3566
3588
|
return q(null);
|
|
3567
3589
|
}
|
|
3568
|
-
const
|
|
3569
|
-
function
|
|
3590
|
+
const ho = { flexBasis: "auto" }, go = { flexGrow: 0, flexShrink: 0 };
|
|
3591
|
+
function yo({
|
|
3570
3592
|
children: e,
|
|
3571
3593
|
className: t,
|
|
3572
3594
|
disabled: n,
|
|
@@ -3577,15 +3599,15 @@ function po({
|
|
|
3577
3599
|
style: l,
|
|
3578
3600
|
...a
|
|
3579
3601
|
}) {
|
|
3580
|
-
const c =
|
|
3602
|
+
const c = $e(i), {
|
|
3581
3603
|
disableCursor: u,
|
|
3582
3604
|
id: d,
|
|
3583
3605
|
orientation: g,
|
|
3584
3606
|
registerSeparator: m,
|
|
3585
3607
|
updateSeparatorProps: y
|
|
3586
|
-
} =
|
|
3587
|
-
return /* @__PURE__ */
|
|
3588
|
-
|
|
3608
|
+
} = Ze();
|
|
3609
|
+
return /* @__PURE__ */ K(
|
|
3610
|
+
sn,
|
|
3589
3611
|
{
|
|
3590
3612
|
attributes: a,
|
|
3591
3613
|
axisId: d,
|
|
@@ -3598,31 +3620,31 @@ function po({
|
|
|
3598
3620
|
id: c,
|
|
3599
3621
|
preview: s,
|
|
3600
3622
|
registerSeparator: m,
|
|
3601
|
-
requiredStyle:
|
|
3623
|
+
requiredStyle: go,
|
|
3602
3624
|
style: l,
|
|
3603
|
-
styleDefaults:
|
|
3625
|
+
styleDefaults: ho,
|
|
3604
3626
|
updateSeparatorProps: y,
|
|
3605
3627
|
children: e
|
|
3606
3628
|
}
|
|
3607
3629
|
);
|
|
3608
3630
|
}
|
|
3609
|
-
|
|
3631
|
+
yo.displayName = "Separator";
|
|
3610
3632
|
export {
|
|
3611
|
-
|
|
3612
|
-
|
|
3613
|
-
|
|
3614
|
-
|
|
3615
|
-
|
|
3616
|
-
|
|
3617
|
-
|
|
3618
|
-
|
|
3619
|
-
|
|
3620
|
-
|
|
3621
|
-
|
|
3622
|
-
|
|
3623
|
-
|
|
3624
|
-
|
|
3625
|
-
|
|
3626
|
-
|
|
3633
|
+
yn as Cell,
|
|
3634
|
+
Jn as Grid,
|
|
3635
|
+
an as Gridline,
|
|
3636
|
+
lo as Group,
|
|
3637
|
+
mo as Panel,
|
|
3638
|
+
yo as Separator,
|
|
3639
|
+
cn as SeparatorOverlay,
|
|
3640
|
+
Sn as isCoarsePointer,
|
|
3641
|
+
bo as useDefaultGridLayout,
|
|
3642
|
+
zo as useDefaultLayout,
|
|
3643
|
+
xo as useGridCallbackRef,
|
|
3644
|
+
wo as useGridRef,
|
|
3645
|
+
Io as useGroupCallbackRef,
|
|
3646
|
+
Lo as useGroupRef,
|
|
3647
|
+
Co as usePanelCallbackRef,
|
|
3648
|
+
Ro as usePanelRef
|
|
3627
3649
|
};
|
|
3628
3650
|
//# sourceMappingURL=react-resizable-panels.js.map
|