react-resizable-panels 4.13.1 → 4.13.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
3
|
-
import { useState as Z, useCallback as ce, useId as Pt, useLayoutEffect as
|
|
2
|
+
import { jsx as B, jsxs as wt } from "react/jsx-runtime";
|
|
3
|
+
import { useState as Z, useCallback as ce, useId as Pt, useLayoutEffect as et, useEffect as Se, useRef as T, createContext as Lt, useContext as Ct, isValidElement as Rt, useImperativeHandle as tt, useMemo as Pe, useSyncExternalStore as nt } from "react";
|
|
4
4
|
function Mt(e, t) {
|
|
5
5
|
const n = getComputedStyle(e), o = parseFloat(n.fontSize);
|
|
6
6
|
return t * o;
|
|
@@ -15,7 +15,7 @@ function It(e) {
|
|
|
15
15
|
function kt(e) {
|
|
16
16
|
return e / 100 * window.innerWidth;
|
|
17
17
|
}
|
|
18
|
-
function
|
|
18
|
+
function Ot(e) {
|
|
19
19
|
switch (typeof e) {
|
|
20
20
|
case "number":
|
|
21
21
|
return [e, "px"];
|
|
@@ -31,8 +31,8 @@ function ie({
|
|
|
31
31
|
styleProp: n
|
|
32
32
|
}) {
|
|
33
33
|
let o;
|
|
34
|
-
const [r,
|
|
35
|
-
switch (
|
|
34
|
+
const [r, i] = Ot(n);
|
|
35
|
+
switch (i) {
|
|
36
36
|
case "%": {
|
|
37
37
|
o = r / 100 * e;
|
|
38
38
|
break;
|
|
@@ -60,7 +60,7 @@ function ie({
|
|
|
60
60
|
}
|
|
61
61
|
return o;
|
|
62
62
|
}
|
|
63
|
-
function
|
|
63
|
+
function F(e) {
|
|
64
64
|
return parseFloat(e.toFixed(3));
|
|
65
65
|
}
|
|
66
66
|
function ae({
|
|
@@ -81,66 +81,66 @@ function Le(e) {
|
|
|
81
81
|
maxSize: 100,
|
|
82
82
|
panelId: o.id
|
|
83
83
|
})) : t.map((o) => {
|
|
84
|
-
const { element: r, panelConstraints:
|
|
85
|
-
let
|
|
86
|
-
if (
|
|
84
|
+
const { element: r, panelConstraints: i } = o;
|
|
85
|
+
let s = 0;
|
|
86
|
+
if (i.collapsedSize !== void 0) {
|
|
87
87
|
const f = ie({
|
|
88
88
|
groupSize: n,
|
|
89
89
|
panelElement: r,
|
|
90
|
-
styleProp:
|
|
90
|
+
styleProp: i.collapsedSize
|
|
91
91
|
});
|
|
92
|
-
|
|
92
|
+
s = F(f / n * 100);
|
|
93
93
|
}
|
|
94
94
|
let u;
|
|
95
|
-
if (
|
|
95
|
+
if (i.collapsedThreshold !== void 0) {
|
|
96
96
|
const f = ie({
|
|
97
97
|
groupSize: n,
|
|
98
98
|
panelElement: r,
|
|
99
|
-
styleProp:
|
|
99
|
+
styleProp: i.collapsedThreshold
|
|
100
100
|
});
|
|
101
|
-
u =
|
|
101
|
+
u = F(f / n * 100);
|
|
102
102
|
}
|
|
103
103
|
let c;
|
|
104
|
-
if (
|
|
104
|
+
if (i.defaultSize !== void 0) {
|
|
105
105
|
const f = ie({
|
|
106
106
|
groupSize: n,
|
|
107
107
|
panelElement: r,
|
|
108
|
-
styleProp:
|
|
108
|
+
styleProp: i.defaultSize
|
|
109
109
|
});
|
|
110
|
-
c =
|
|
110
|
+
c = F(f / n * 100);
|
|
111
111
|
}
|
|
112
112
|
let a = 0;
|
|
113
|
-
if (
|
|
113
|
+
if (i.minSize !== void 0) {
|
|
114
114
|
const f = ie({
|
|
115
115
|
groupSize: n,
|
|
116
116
|
panelElement: r,
|
|
117
|
-
styleProp:
|
|
117
|
+
styleProp: i.minSize
|
|
118
118
|
});
|
|
119
|
-
a =
|
|
119
|
+
a = F(f / n * 100);
|
|
120
120
|
}
|
|
121
121
|
let l = 100;
|
|
122
|
-
if (
|
|
122
|
+
if (i.maxSize !== void 0) {
|
|
123
123
|
const f = ie({
|
|
124
124
|
groupSize: n,
|
|
125
125
|
panelElement: r,
|
|
126
|
-
styleProp:
|
|
126
|
+
styleProp: i.maxSize
|
|
127
127
|
});
|
|
128
|
-
l =
|
|
128
|
+
l = F(f / n * 100);
|
|
129
129
|
}
|
|
130
130
|
return {
|
|
131
|
-
groupResizeBehavior:
|
|
132
|
-
collapsedSize:
|
|
131
|
+
groupResizeBehavior: i.groupResizeBehavior,
|
|
132
|
+
collapsedSize: s,
|
|
133
133
|
collapsedThreshold: u,
|
|
134
|
-
collapsible:
|
|
134
|
+
collapsible: i.collapsible === !0,
|
|
135
135
|
defaultSize: c,
|
|
136
|
-
disabled:
|
|
136
|
+
disabled: i.disabled,
|
|
137
137
|
minSize: a,
|
|
138
138
|
maxSize: l,
|
|
139
139
|
panelId: o.id
|
|
140
140
|
};
|
|
141
141
|
});
|
|
142
142
|
}
|
|
143
|
-
class
|
|
143
|
+
class ot {
|
|
144
144
|
#e = {};
|
|
145
145
|
addListener(t, n) {
|
|
146
146
|
const o = this.#e[t];
|
|
@@ -154,18 +154,18 @@ class nt {
|
|
|
154
154
|
if (o.length === 1)
|
|
155
155
|
o[0].call(null, n);
|
|
156
156
|
else {
|
|
157
|
-
let r = !1,
|
|
158
|
-
const
|
|
159
|
-
for (let u = 0; u <
|
|
160
|
-
const c =
|
|
157
|
+
let r = !1, i = null;
|
|
158
|
+
const s = Array.from(o);
|
|
159
|
+
for (let u = 0; u < s.length; u++) {
|
|
160
|
+
const c = s[u];
|
|
161
161
|
try {
|
|
162
162
|
c.call(null, n);
|
|
163
163
|
} catch (a) {
|
|
164
|
-
|
|
164
|
+
i === null && (r = !0, i = a);
|
|
165
165
|
}
|
|
166
166
|
}
|
|
167
167
|
if (r)
|
|
168
|
-
throw
|
|
168
|
+
throw i;
|
|
169
169
|
}
|
|
170
170
|
}
|
|
171
171
|
removeAllListeners() {
|
|
@@ -179,70 +179,72 @@ class nt {
|
|
|
179
179
|
}
|
|
180
180
|
}
|
|
181
181
|
}
|
|
182
|
-
let
|
|
182
|
+
let k = {
|
|
183
183
|
cursorFlags: 0,
|
|
184
184
|
state: "inactive"
|
|
185
185
|
};
|
|
186
|
-
const
|
|
187
|
-
function
|
|
188
|
-
return
|
|
189
|
-
}
|
|
190
|
-
function
|
|
191
|
-
return
|
|
192
|
-
}
|
|
193
|
-
function Dt(e, t = [], n) {
|
|
194
|
-
const
|
|
195
|
-
|
|
196
|
-
prev:
|
|
197
|
-
next:
|
|
186
|
+
const Me = new ot();
|
|
187
|
+
function q() {
|
|
188
|
+
return k;
|
|
189
|
+
}
|
|
190
|
+
function rt(e) {
|
|
191
|
+
return Me.addListener("change", e);
|
|
192
|
+
}
|
|
193
|
+
function Dt(e, t = [], n, o = !1) {
|
|
194
|
+
const r = k, i = { ...k };
|
|
195
|
+
i.cursorFlags = e, i.state === "active" && (i.didPointerMove ||= o, i.previews = t, n && (i.previewLayoutMap = n)), k = i, Me.emit("change", {
|
|
196
|
+
prev: r,
|
|
197
|
+
next: i
|
|
198
198
|
});
|
|
199
199
|
}
|
|
200
200
|
function W(e) {
|
|
201
|
-
const t =
|
|
202
|
-
|
|
201
|
+
const t = k;
|
|
202
|
+
k = e, t.state === "active" && e.state !== "active" && t.didPointerMove && t.hitRegions.forEach(({ separator: n }) => {
|
|
203
|
+
n && n.element.ownerDocument.activeElement === n.element && n.element.blur();
|
|
204
|
+
}), Me.emit("change", {
|
|
203
205
|
prev: t,
|
|
204
206
|
next: e
|
|
205
207
|
});
|
|
206
208
|
}
|
|
207
|
-
function
|
|
208
|
-
|
|
209
|
-
...
|
|
210
|
-
previews:
|
|
209
|
+
function Tt(e) {
|
|
210
|
+
k.state !== "active" || !k.previews.some((t) => t.separator === e) || W({
|
|
211
|
+
...k,
|
|
212
|
+
previews: k.previews.map(
|
|
211
213
|
(t) => t.separator === e ? { ...t } : t
|
|
212
214
|
)
|
|
213
215
|
});
|
|
214
216
|
}
|
|
215
|
-
function
|
|
216
|
-
if (
|
|
217
|
+
function Nt(e) {
|
|
218
|
+
if (k.state === "inactive")
|
|
217
219
|
return !1;
|
|
218
|
-
const t =
|
|
220
|
+
const t = k.hitRegions.filter(
|
|
219
221
|
(o) => o.group !== e
|
|
220
|
-
), n =
|
|
221
|
-
if (t.length ===
|
|
222
|
+
), n = k.state === "active" && k.previews.some((o) => o.group === e);
|
|
223
|
+
if (t.length === k.hitRegions.length && !n)
|
|
222
224
|
return !1;
|
|
223
225
|
if (t.length === 0)
|
|
224
226
|
W({ cursorFlags: 0, state: "inactive" });
|
|
225
|
-
else if (
|
|
226
|
-
const o = new Map(
|
|
227
|
+
else if (k.state === "active") {
|
|
228
|
+
const o = new Map(k.initialLayoutMap), r = new Map(k.previewLayoutMap);
|
|
227
229
|
o.delete(e), r.delete(e), W({
|
|
228
|
-
...
|
|
230
|
+
...k,
|
|
229
231
|
cursorFlags: 0,
|
|
230
232
|
hitRegions: t,
|
|
231
233
|
initialLayoutMap: o,
|
|
232
234
|
previewLayoutMap: r,
|
|
233
|
-
previews:
|
|
235
|
+
previews: k.previews.filter((i) => i.group !== e)
|
|
234
236
|
});
|
|
235
237
|
} else
|
|
236
|
-
W({ ...
|
|
238
|
+
W({ ...k, hitRegions: t });
|
|
237
239
|
return !0;
|
|
238
240
|
}
|
|
239
|
-
const
|
|
240
|
-
},
|
|
241
|
+
const Gt = (e) => e, we = () => {
|
|
242
|
+
}, it = 1, st = 2, at = 4, lt = 8, Fe = 3, _e = 12;
|
|
241
243
|
let me;
|
|
242
|
-
function
|
|
244
|
+
function $e() {
|
|
243
245
|
return me === void 0 && (me = !1, typeof window < "u" && (window.navigator.userAgent.includes("Chrome") || window.navigator.userAgent.includes("Firefox")) && (me = !0)), me;
|
|
244
246
|
}
|
|
245
|
-
function
|
|
247
|
+
function At({
|
|
246
248
|
cursorFlags: e,
|
|
247
249
|
groups: t,
|
|
248
250
|
state: n
|
|
@@ -251,9 +253,9 @@ function Ft({
|
|
|
251
253
|
switch (n) {
|
|
252
254
|
case "active":
|
|
253
255
|
case "hover":
|
|
254
|
-
t.forEach((
|
|
255
|
-
if (!
|
|
256
|
-
switch (
|
|
256
|
+
t.forEach((i) => {
|
|
257
|
+
if (!i.mutableState.disableCursor)
|
|
258
|
+
switch (i.orientation) {
|
|
257
259
|
case "horizontal": {
|
|
258
260
|
o++;
|
|
259
261
|
break;
|
|
@@ -268,11 +270,11 @@ function Ft({
|
|
|
268
270
|
if (!(o === 0 && r === 0)) {
|
|
269
271
|
switch (n) {
|
|
270
272
|
case "active": {
|
|
271
|
-
if (e &&
|
|
272
|
-
const
|
|
273
|
-
if (s)
|
|
274
|
-
return u ? "se-resize" : c ? "ne-resize" : "e-resize";
|
|
273
|
+
if (e && $e()) {
|
|
274
|
+
const i = (e & it) !== 0, s = (e & st) !== 0, u = (e & at) !== 0, c = (e & lt) !== 0;
|
|
275
275
|
if (i)
|
|
276
|
+
return u ? "se-resize" : c ? "ne-resize" : "e-resize";
|
|
277
|
+
if (s)
|
|
276
278
|
return u ? "sw-resize" : c ? "nw-resize" : "w-resize";
|
|
277
279
|
if (u)
|
|
278
280
|
return "s-resize";
|
|
@@ -282,30 +284,30 @@ function Ft({
|
|
|
282
284
|
break;
|
|
283
285
|
}
|
|
284
286
|
}
|
|
285
|
-
return
|
|
287
|
+
return $e() ? o > 0 && r > 0 ? "move" : o > 0 ? "ew-resize" : "ns-resize" : o > 0 && r > 0 ? "grab" : o > 0 ? "col-resize" : "row-resize";
|
|
286
288
|
}
|
|
287
289
|
}
|
|
288
|
-
const
|
|
290
|
+
const He = /* @__PURE__ */ new WeakMap();
|
|
289
291
|
function fe(e) {
|
|
290
292
|
if (!e.defaultView || !e.adoptedStyleSheets)
|
|
291
293
|
return;
|
|
292
|
-
let { prevStyle: t, styleSheet: n } =
|
|
294
|
+
let { prevStyle: t, styleSheet: n } = He.get(e) ?? {};
|
|
293
295
|
n === void 0 && (n = new e.defaultView.CSSStyleSheet(), e.adoptedStyleSheets && (Object.isExtensible(e.adoptedStyleSheets) ? e.adoptedStyleSheets.push(n) : e.adoptedStyleSheets = [
|
|
294
296
|
...e.adoptedStyleSheets,
|
|
295
297
|
n
|
|
296
298
|
]));
|
|
297
|
-
const o =
|
|
299
|
+
const o = q();
|
|
298
300
|
switch (o.state) {
|
|
299
301
|
case "active":
|
|
300
302
|
case "hover": {
|
|
301
|
-
const r =
|
|
303
|
+
const r = At({
|
|
302
304
|
cursorFlags: o.cursorFlags,
|
|
303
|
-
groups: o.hitRegions.map((
|
|
305
|
+
groups: o.hitRegions.map((s) => s.group),
|
|
304
306
|
state: o.state
|
|
305
|
-
}),
|
|
306
|
-
if (t ===
|
|
307
|
+
}), i = `*, *:hover {cursor: ${r} !important; }`;
|
|
308
|
+
if (t === i)
|
|
307
309
|
return;
|
|
308
|
-
t =
|
|
310
|
+
t = i, r ? n.cssRules.length === 0 ? n.insertRule(i) : n.replaceSync(i) : n.cssRules.length === 1 && n.deleteRule(0);
|
|
309
311
|
break;
|
|
310
312
|
}
|
|
311
313
|
case "inactive": {
|
|
@@ -313,7 +315,7 @@ function fe(e) {
|
|
|
313
315
|
break;
|
|
314
316
|
}
|
|
315
317
|
}
|
|
316
|
-
|
|
318
|
+
He.set(e, {
|
|
317
319
|
prevStyle: t,
|
|
318
320
|
styleSheet: n
|
|
319
321
|
});
|
|
@@ -323,11 +325,15 @@ function L(e, t = "Assertion error") {
|
|
|
323
325
|
throw Error(t);
|
|
324
326
|
}
|
|
325
327
|
function Ce(e, t) {
|
|
326
|
-
return Array.from(t).sort(
|
|
327
|
-
e === "horizontal" ?
|
|
328
|
-
|
|
328
|
+
return Array.from(t).sort((n, o) => {
|
|
329
|
+
const r = e === "horizontal" ? Ft(n, o) : _t(n, o);
|
|
330
|
+
if (r !== 0)
|
|
331
|
+
return r;
|
|
332
|
+
const i = n.element.compareDocumentPosition(o.element);
|
|
333
|
+
return i & Node.DOCUMENT_POSITION_DISCONNECTED ? 0 : i & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : i & Node.DOCUMENT_POSITION_PRECEDING ? 1 : 0;
|
|
334
|
+
});
|
|
329
335
|
}
|
|
330
|
-
function
|
|
336
|
+
function Ft(e, t) {
|
|
331
337
|
const n = e.element.offsetLeft - t.element.offsetLeft;
|
|
332
338
|
return n !== 0 ? n : e.element.offsetWidth - t.element.offsetWidth;
|
|
333
339
|
}
|
|
@@ -335,7 +341,7 @@ function _t(e, t) {
|
|
|
335
341
|
const n = e.element.offsetTop - t.element.offsetTop;
|
|
336
342
|
return n !== 0 ? n : e.element.offsetHeight - t.element.offsetHeight;
|
|
337
343
|
}
|
|
338
|
-
function
|
|
344
|
+
function Re(e) {
|
|
339
345
|
return e !== null && typeof e == "object" && "nodeType" in e && e.nodeType === Node.ELEMENT_NODE;
|
|
340
346
|
}
|
|
341
347
|
function ct(e, t) {
|
|
@@ -359,10 +365,10 @@ function $t({
|
|
|
359
365
|
x: n.x + n.width / 2,
|
|
360
366
|
y: n.y + n.height / 2
|
|
361
367
|
};
|
|
362
|
-
let r,
|
|
363
|
-
for (const
|
|
364
|
-
const { x: u, y: c } = ct(o,
|
|
365
|
-
a <
|
|
368
|
+
let r, i = Number.MAX_VALUE;
|
|
369
|
+
for (const s of t) {
|
|
370
|
+
const { x: u, y: c } = ct(o, s), a = e === "horizontal" ? u : c;
|
|
371
|
+
a < i && (i = a, r = s);
|
|
366
372
|
}
|
|
367
373
|
return L(r, "No rect found"), r;
|
|
368
374
|
}
|
|
@@ -370,156 +376,156 @@ let ge;
|
|
|
370
376
|
function Ht() {
|
|
371
377
|
return ge === void 0 && (typeof matchMedia == "function" ? ge = !!matchMedia("(pointer:coarse)").matches : ge = !1), ge;
|
|
372
378
|
}
|
|
373
|
-
function
|
|
379
|
+
function Ee({
|
|
374
380
|
expandHitTargets: e = !0,
|
|
375
381
|
group: t,
|
|
376
382
|
includeDisabled: n = !1
|
|
377
383
|
}) {
|
|
378
|
-
const { element: o, orientation: r, panels:
|
|
384
|
+
const { element: o, orientation: r, panels: i, separators: s } = t, u = Ce(
|
|
379
385
|
r,
|
|
380
|
-
Array.from(o.children).filter(
|
|
381
|
-
).map(({ element:
|
|
382
|
-
let a = !1, l = !1, f = -1, y,
|
|
386
|
+
Array.from(o.children).filter(Re).filter((h) => !h.hasAttribute("data-resize-preview")).map((h) => ({ element: h }))
|
|
387
|
+
).map(({ element: h }) => h), c = [];
|
|
388
|
+
let a = !1, l = !1, f = -1, y, p = -1, g = 0, d, v = [];
|
|
383
389
|
{
|
|
384
|
-
let
|
|
385
|
-
for (const
|
|
386
|
-
|
|
390
|
+
let h = -1;
|
|
391
|
+
for (const m of u)
|
|
392
|
+
m.hasAttribute("data-panel") && (h++, m.hasAttribute("data-disabled") || (g++, f === -1 && (f = h), p = h));
|
|
387
393
|
}
|
|
388
|
-
if (n ||
|
|
389
|
-
let
|
|
390
|
-
for (const
|
|
391
|
-
if (
|
|
392
|
-
|
|
393
|
-
const x =
|
|
394
|
-
(
|
|
394
|
+
if (n || g > 1) {
|
|
395
|
+
let h = -1;
|
|
396
|
+
for (const m of u)
|
|
397
|
+
if (m.hasAttribute("data-panel")) {
|
|
398
|
+
h++;
|
|
399
|
+
const x = i.find(
|
|
400
|
+
(S) => S.element === m
|
|
395
401
|
);
|
|
396
402
|
if (x) {
|
|
397
|
-
if (
|
|
398
|
-
const
|
|
399
|
-
let
|
|
403
|
+
if (d) {
|
|
404
|
+
const S = d.element.getBoundingClientRect(), P = m.getBoundingClientRect();
|
|
405
|
+
let C;
|
|
400
406
|
if (l) {
|
|
401
|
-
const
|
|
402
|
-
|
|
403
|
-
|
|
407
|
+
const E = r === "horizontal" ? new DOMRect(
|
|
408
|
+
S.right,
|
|
409
|
+
S.top,
|
|
404
410
|
0,
|
|
405
|
-
|
|
411
|
+
S.height
|
|
406
412
|
) : new DOMRect(
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
413
|
+
S.left,
|
|
414
|
+
S.bottom,
|
|
415
|
+
S.width,
|
|
410
416
|
0
|
|
411
|
-
), w = r === "horizontal" ? new DOMRect(
|
|
417
|
+
), w = r === "horizontal" ? new DOMRect(P.left, P.top, 0, P.height) : new DOMRect(P.left, P.top, P.width, 0);
|
|
412
418
|
switch (v.length) {
|
|
413
419
|
case 0: {
|
|
414
|
-
|
|
415
|
-
|
|
420
|
+
C = [
|
|
421
|
+
E,
|
|
416
422
|
w
|
|
417
423
|
];
|
|
418
424
|
break;
|
|
419
425
|
}
|
|
420
426
|
case 1: {
|
|
421
|
-
const
|
|
427
|
+
const R = v[0], N = $t({
|
|
422
428
|
orientation: r,
|
|
423
|
-
rects: [
|
|
424
|
-
targetRect:
|
|
429
|
+
rects: [S, P],
|
|
430
|
+
targetRect: R.element.getBoundingClientRect()
|
|
425
431
|
});
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
432
|
+
C = [
|
|
433
|
+
R,
|
|
434
|
+
N === S ? w : E
|
|
429
435
|
];
|
|
430
436
|
break;
|
|
431
437
|
}
|
|
432
438
|
default: {
|
|
433
|
-
|
|
439
|
+
C = v;
|
|
434
440
|
break;
|
|
435
441
|
}
|
|
436
442
|
}
|
|
437
443
|
} else
|
|
438
|
-
v.length ?
|
|
444
|
+
v.length ? C = v : C = [
|
|
439
445
|
r === "horizontal" ? new DOMRect(
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
446
|
+
S.right,
|
|
447
|
+
P.top,
|
|
448
|
+
P.left - S.right,
|
|
449
|
+
P.height
|
|
444
450
|
) : new DOMRect(
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
451
|
+
P.left,
|
|
452
|
+
S.bottom,
|
|
453
|
+
P.width,
|
|
454
|
+
P.top - S.bottom
|
|
449
455
|
)
|
|
450
456
|
];
|
|
451
|
-
for (const
|
|
452
|
-
let w = "width" in
|
|
453
|
-
const
|
|
454
|
-
if (w.width <
|
|
455
|
-
const
|
|
457
|
+
for (const E of C) {
|
|
458
|
+
let w = "width" in E ? E : E.element.getBoundingClientRect();
|
|
459
|
+
const R = e ? Ht() ? t.resizeTargetMinimumSize.coarse : t.resizeTargetMinimumSize.fine : 0;
|
|
460
|
+
if (w.width < R) {
|
|
461
|
+
const O = R - w.width;
|
|
456
462
|
w = new DOMRect(
|
|
457
|
-
w.x -
|
|
463
|
+
w.x - O / 2,
|
|
458
464
|
w.y,
|
|
459
|
-
w.width +
|
|
465
|
+
w.width + O,
|
|
460
466
|
w.height
|
|
461
467
|
);
|
|
462
468
|
}
|
|
463
|
-
if (w.height <
|
|
464
|
-
const
|
|
469
|
+
if (w.height < R) {
|
|
470
|
+
const O = R - w.height;
|
|
465
471
|
w = new DOMRect(
|
|
466
472
|
w.x,
|
|
467
|
-
w.y -
|
|
473
|
+
w.y - O / 2,
|
|
468
474
|
w.width,
|
|
469
|
-
w.height +
|
|
475
|
+
w.height + O
|
|
470
476
|
);
|
|
471
477
|
}
|
|
472
|
-
const
|
|
473
|
-
(n || !a && !
|
|
478
|
+
const N = h <= f || h > p;
|
|
479
|
+
(n || !a && !N) && (y ??= ae({ group: t }), c.push({
|
|
474
480
|
group: t,
|
|
475
481
|
groupSize: y,
|
|
476
|
-
panels: [
|
|
477
|
-
separator: "width" in
|
|
482
|
+
panels: [d, x],
|
|
483
|
+
separator: "width" in E ? void 0 : E,
|
|
478
484
|
rect: w
|
|
479
485
|
})), a = !1;
|
|
480
486
|
}
|
|
481
487
|
}
|
|
482
|
-
l = !1,
|
|
488
|
+
l = !1, d = x, v = [];
|
|
483
489
|
}
|
|
484
|
-
} else if (
|
|
485
|
-
|
|
486
|
-
const x =
|
|
487
|
-
(
|
|
490
|
+
} else if (m.hasAttribute("data-separator")) {
|
|
491
|
+
m.ariaDisabled !== null && (a = !0);
|
|
492
|
+
const x = s.find(
|
|
493
|
+
(S) => S.element === m
|
|
488
494
|
);
|
|
489
|
-
x ? v.push(x) : (
|
|
495
|
+
x ? v.push(x) : (d = void 0, v = []);
|
|
490
496
|
} else
|
|
491
497
|
l = !0;
|
|
492
498
|
}
|
|
493
499
|
return c;
|
|
494
500
|
}
|
|
495
|
-
let
|
|
496
|
-
const ut = new
|
|
501
|
+
let U = /* @__PURE__ */ new Map();
|
|
502
|
+
const ut = new ot();
|
|
497
503
|
function Vt(e) {
|
|
498
|
-
|
|
504
|
+
U = new Map(U), U.delete(e);
|
|
499
505
|
}
|
|
500
506
|
function ft(e, t) {
|
|
501
|
-
for (const [n] of
|
|
507
|
+
for (const [n] of U)
|
|
502
508
|
if (n.id === e)
|
|
503
509
|
return n;
|
|
504
510
|
}
|
|
505
511
|
function Q(e, t) {
|
|
506
|
-
for (const [n, o] of
|
|
512
|
+
for (const [n, o] of U)
|
|
507
513
|
if (n.id === e)
|
|
508
514
|
return o;
|
|
509
515
|
if (t)
|
|
510
516
|
throw Error(`Could not find data for Group with id ${e}`);
|
|
511
517
|
}
|
|
512
518
|
function ee() {
|
|
513
|
-
return
|
|
519
|
+
return U;
|
|
514
520
|
}
|
|
515
|
-
function
|
|
521
|
+
function Ie(e, t) {
|
|
516
522
|
return ut.addListener("groupChange", (n) => {
|
|
517
523
|
n.group.id === e && t(n);
|
|
518
524
|
});
|
|
519
525
|
}
|
|
520
|
-
function
|
|
521
|
-
const o =
|
|
522
|
-
|
|
526
|
+
function X(e, t, n) {
|
|
527
|
+
const o = U.get(e);
|
|
528
|
+
U = new Map(U), U.set(e, t), ut.emit("groupChange", {
|
|
523
529
|
group: e,
|
|
524
530
|
isUserInteraction: n?.isUserInteraction === !0,
|
|
525
531
|
prev: o,
|
|
@@ -535,7 +541,7 @@ function jt(e, t) {
|
|
|
535
541
|
return !0;
|
|
536
542
|
}
|
|
537
543
|
function D(e, t, n = 0) {
|
|
538
|
-
return Math.abs(
|
|
544
|
+
return Math.abs(F(e) - F(t)) <= n;
|
|
539
545
|
}
|
|
540
546
|
function j(e, t) {
|
|
541
547
|
return D(e, t) ? 0 : e > t ? 1 : -1;
|
|
@@ -548,8 +554,8 @@ function se({
|
|
|
548
554
|
}) {
|
|
549
555
|
const {
|
|
550
556
|
collapsedSize: r = 0,
|
|
551
|
-
collapsedThreshold:
|
|
552
|
-
collapsible:
|
|
557
|
+
collapsedThreshold: i,
|
|
558
|
+
collapsible: s,
|
|
553
559
|
disabled: u,
|
|
554
560
|
maxSize: c = 100,
|
|
555
561
|
minSize: a = 0
|
|
@@ -557,12 +563,12 @@ function se({
|
|
|
557
563
|
if (u && !e)
|
|
558
564
|
return n;
|
|
559
565
|
if (j(o, a) < 0)
|
|
560
|
-
if (
|
|
561
|
-
const l =
|
|
562
|
-
j(o, r) <= 0 ||
|
|
566
|
+
if (s) {
|
|
567
|
+
const l = i ?? (a - r) / 2, f = j(n, r) <= 0, y = f ? r + l : a - l, p = j(o, y);
|
|
568
|
+
j(o, r) <= 0 || p < 0 || i !== void 0 && f && p === 0 ? o = r : o = a;
|
|
563
569
|
} else
|
|
564
570
|
o = a;
|
|
565
|
-
return o = Math.min(c, o), o =
|
|
571
|
+
return o = Math.min(c, o), o = F(o), o;
|
|
566
572
|
}
|
|
567
573
|
function de({
|
|
568
574
|
delta: e,
|
|
@@ -570,163 +576,163 @@ function de({
|
|
|
570
576
|
panelConstraints: n,
|
|
571
577
|
pivotIndices: o,
|
|
572
578
|
prevLayout: r,
|
|
573
|
-
trigger:
|
|
579
|
+
trigger: i
|
|
574
580
|
}) {
|
|
575
581
|
if (D(e, 0))
|
|
576
582
|
return t;
|
|
577
|
-
const
|
|
578
|
-
({ panelId:
|
|
583
|
+
const s = i === "imperative-api", u = n.map(
|
|
584
|
+
({ panelId: g }) => t[g]
|
|
579
585
|
), c = n.map(
|
|
580
|
-
({ panelId:
|
|
586
|
+
({ panelId: g }) => r[g]
|
|
581
587
|
), a = [...u], [l, f] = o;
|
|
582
588
|
L(l != null, "Invalid first pivot index"), L(f != null, "Invalid second pivot index");
|
|
583
589
|
let y = 0;
|
|
584
|
-
switch (
|
|
590
|
+
switch (i) {
|
|
585
591
|
case "keyboard": {
|
|
586
592
|
{
|
|
587
|
-
const
|
|
593
|
+
const g = e < 0 ? f : l, d = n[g];
|
|
588
594
|
L(
|
|
589
|
-
|
|
590
|
-
`Panel constraints not found for index ${
|
|
595
|
+
d,
|
|
596
|
+
`Panel constraints not found for index ${g}`
|
|
591
597
|
);
|
|
592
598
|
const {
|
|
593
599
|
collapsedSize: v = 0,
|
|
594
|
-
collapsible:
|
|
595
|
-
minSize:
|
|
596
|
-
} =
|
|
597
|
-
if (
|
|
598
|
-
const x = u[
|
|
600
|
+
collapsible: h,
|
|
601
|
+
minSize: m = 0
|
|
602
|
+
} = d;
|
|
603
|
+
if (h) {
|
|
604
|
+
const x = u[g];
|
|
599
605
|
if (L(
|
|
600
606
|
x != null,
|
|
601
|
-
`Previous layout not found for panel index ${
|
|
607
|
+
`Previous layout not found for panel index ${g}`
|
|
602
608
|
), D(x, v)) {
|
|
603
|
-
const
|
|
604
|
-
j(
|
|
609
|
+
const S = m - x;
|
|
610
|
+
j(S, Math.abs(e)) > 0 && (e = e < 0 ? 0 - S : S);
|
|
605
611
|
}
|
|
606
612
|
}
|
|
607
613
|
}
|
|
608
614
|
{
|
|
609
|
-
const
|
|
615
|
+
const g = e < 0 ? l : f, d = n[g];
|
|
610
616
|
L(
|
|
611
|
-
|
|
612
|
-
`No panel constraints found for index ${
|
|
617
|
+
d,
|
|
618
|
+
`No panel constraints found for index ${g}`
|
|
613
619
|
);
|
|
614
620
|
const {
|
|
615
621
|
collapsedSize: v = 0,
|
|
616
|
-
collapsible:
|
|
617
|
-
minSize:
|
|
618
|
-
} =
|
|
619
|
-
if (
|
|
620
|
-
const x = u[
|
|
622
|
+
collapsible: h,
|
|
623
|
+
minSize: m = 0
|
|
624
|
+
} = d;
|
|
625
|
+
if (h) {
|
|
626
|
+
const x = u[g];
|
|
621
627
|
if (L(
|
|
622
628
|
x != null,
|
|
623
|
-
`Previous layout not found for panel index ${
|
|
624
|
-
), D(x,
|
|
625
|
-
const
|
|
626
|
-
j(
|
|
629
|
+
`Previous layout not found for panel index ${g}`
|
|
630
|
+
), D(x, m)) {
|
|
631
|
+
const S = x - v;
|
|
632
|
+
j(S, Math.abs(e)) > 0 && (e = e < 0 ? 0 - S : S);
|
|
627
633
|
}
|
|
628
634
|
}
|
|
629
635
|
}
|
|
630
636
|
break;
|
|
631
637
|
}
|
|
632
638
|
default: {
|
|
633
|
-
const
|
|
639
|
+
const g = e < 0 ? f : l, d = n[g];
|
|
634
640
|
L(
|
|
635
|
-
|
|
636
|
-
`Panel constraints not found for index ${
|
|
641
|
+
d,
|
|
642
|
+
`Panel constraints not found for index ${g}`
|
|
637
643
|
);
|
|
638
|
-
const v = u[
|
|
639
|
-
if (x && j(v,
|
|
640
|
-
const
|
|
641
|
-
if (j(
|
|
642
|
-
const w = j(Math.abs(e),
|
|
643
|
-
w > 0 || w === 0 &&
|
|
644
|
+
const v = u[g], { collapsedSize: h, collapsedThreshold: m, collapsible: x, minSize: S } = d;
|
|
645
|
+
if (x && j(v, S) < 0) {
|
|
646
|
+
const P = S - h, C = m ?? P / 2, E = v + Math.abs(e);
|
|
647
|
+
if (j(E, S) < 0) {
|
|
648
|
+
const w = j(Math.abs(e), C), R = m === void 0 && e < 0;
|
|
649
|
+
w > 0 || w === 0 && R ? e = e < 0 ? -P : P : e = 0;
|
|
644
650
|
}
|
|
645
651
|
}
|
|
646
652
|
break;
|
|
647
653
|
}
|
|
648
654
|
}
|
|
649
655
|
{
|
|
650
|
-
const
|
|
651
|
-
let
|
|
656
|
+
const g = e < 0 ? 1 : -1;
|
|
657
|
+
let d = e < 0 ? f : l, v = 0;
|
|
652
658
|
for (; ; ) {
|
|
653
|
-
const
|
|
659
|
+
const m = u[d];
|
|
654
660
|
L(
|
|
655
|
-
|
|
656
|
-
`Previous layout not found for panel index ${
|
|
661
|
+
m != null,
|
|
662
|
+
`Previous layout not found for panel index ${d}`
|
|
657
663
|
);
|
|
658
|
-
const
|
|
659
|
-
overrideDisabledPanels:
|
|
660
|
-
panelConstraints: n[
|
|
661
|
-
prevSize:
|
|
664
|
+
const S = se({
|
|
665
|
+
overrideDisabledPanels: s,
|
|
666
|
+
panelConstraints: n[d],
|
|
667
|
+
prevSize: m,
|
|
662
668
|
size: 100
|
|
663
|
-
}) -
|
|
664
|
-
if (v +=
|
|
669
|
+
}) - m;
|
|
670
|
+
if (v += S, d += g, d < 0 || d >= n.length)
|
|
665
671
|
break;
|
|
666
672
|
}
|
|
667
|
-
const
|
|
668
|
-
e = e < 0 ? 0 -
|
|
673
|
+
const h = Math.min(Math.abs(e), Math.abs(v));
|
|
674
|
+
e = e < 0 ? 0 - h : h;
|
|
669
675
|
}
|
|
670
676
|
{
|
|
671
|
-
let
|
|
672
|
-
for (;
|
|
673
|
-
const v = Math.abs(e) - Math.abs(y),
|
|
677
|
+
let d = e < 0 ? l : f;
|
|
678
|
+
for (; d >= 0 && d < n.length; ) {
|
|
679
|
+
const v = Math.abs(e) - Math.abs(y), h = u[d];
|
|
674
680
|
L(
|
|
675
|
-
|
|
676
|
-
`Previous layout not found for panel index ${
|
|
681
|
+
h != null,
|
|
682
|
+
`Previous layout not found for panel index ${d}`
|
|
677
683
|
);
|
|
678
|
-
const
|
|
679
|
-
overrideDisabledPanels:
|
|
680
|
-
panelConstraints: n[
|
|
681
|
-
prevSize:
|
|
682
|
-
size:
|
|
684
|
+
const m = h - v, x = se({
|
|
685
|
+
overrideDisabledPanels: s,
|
|
686
|
+
panelConstraints: n[d],
|
|
687
|
+
prevSize: h,
|
|
688
|
+
size: m
|
|
683
689
|
});
|
|
684
|
-
if (!D(
|
|
690
|
+
if (!D(h, x) && (y += h - x, a[d] = x, y.toFixed(3).localeCompare(Math.abs(e).toFixed(3), void 0, {
|
|
685
691
|
numeric: !0
|
|
686
692
|
}) >= 0))
|
|
687
693
|
break;
|
|
688
|
-
e < 0 ?
|
|
694
|
+
e < 0 ? d-- : d++;
|
|
689
695
|
}
|
|
690
696
|
}
|
|
691
697
|
if (jt(c, a))
|
|
692
698
|
return r;
|
|
693
699
|
{
|
|
694
|
-
const
|
|
700
|
+
const g = e < 0 ? f : l, d = u[g];
|
|
695
701
|
L(
|
|
696
|
-
|
|
697
|
-
`Previous layout not found for panel index ${
|
|
702
|
+
d != null,
|
|
703
|
+
`Previous layout not found for panel index ${g}`
|
|
698
704
|
);
|
|
699
|
-
const v =
|
|
700
|
-
overrideDisabledPanels:
|
|
701
|
-
panelConstraints: n[
|
|
702
|
-
prevSize:
|
|
705
|
+
const v = d + y, h = se({
|
|
706
|
+
overrideDisabledPanels: s,
|
|
707
|
+
panelConstraints: n[g],
|
|
708
|
+
prevSize: d,
|
|
703
709
|
size: v
|
|
704
710
|
});
|
|
705
|
-
if (a[
|
|
706
|
-
let
|
|
707
|
-
for (;
|
|
708
|
-
const
|
|
711
|
+
if (a[g] = h, !D(h, v)) {
|
|
712
|
+
let m = v - h, S = e < 0 ? f : l;
|
|
713
|
+
for (; S >= 0 && S < n.length; ) {
|
|
714
|
+
const P = a[S];
|
|
709
715
|
L(
|
|
710
|
-
|
|
711
|
-
`Previous layout not found for panel index ${
|
|
716
|
+
P != null,
|
|
717
|
+
`Previous layout not found for panel index ${S}`
|
|
712
718
|
);
|
|
713
|
-
const
|
|
714
|
-
overrideDisabledPanels:
|
|
715
|
-
panelConstraints: n[
|
|
716
|
-
prevSize:
|
|
717
|
-
size:
|
|
719
|
+
const C = P + m, E = se({
|
|
720
|
+
overrideDisabledPanels: s,
|
|
721
|
+
panelConstraints: n[S],
|
|
722
|
+
prevSize: P,
|
|
723
|
+
size: C
|
|
718
724
|
});
|
|
719
|
-
if (D(
|
|
725
|
+
if (D(P, E) || (m -= E - P, a[S] = E), D(m, 0))
|
|
720
726
|
break;
|
|
721
|
-
e > 0 ?
|
|
727
|
+
e > 0 ? S-- : S++;
|
|
722
728
|
}
|
|
723
729
|
}
|
|
724
730
|
}
|
|
725
|
-
const
|
|
726
|
-
(
|
|
731
|
+
const p = Object.values(a).reduce(
|
|
732
|
+
(g, d) => d + g,
|
|
727
733
|
0
|
|
728
734
|
);
|
|
729
|
-
return D(
|
|
735
|
+
return D(p, 100, 0.1) ? a.reduce((g, d, v) => (g[n[v].panelId] = d, g), {}) : r;
|
|
730
736
|
}
|
|
731
737
|
function K(e, t) {
|
|
732
738
|
if (Object.keys(e).length !== Object.keys(t).length)
|
|
@@ -736,88 +742,90 @@ function K(e, t) {
|
|
|
736
742
|
return !1;
|
|
737
743
|
return !0;
|
|
738
744
|
}
|
|
739
|
-
function
|
|
745
|
+
function ke({
|
|
740
746
|
commit: e,
|
|
741
747
|
document: t,
|
|
742
748
|
event: n,
|
|
743
749
|
hitRegions: o,
|
|
744
750
|
initialLayoutMap: r,
|
|
745
|
-
mountedGroups:
|
|
746
|
-
pointerDownAtPoint:
|
|
751
|
+
mountedGroups: i,
|
|
752
|
+
pointerDownAtPoint: s,
|
|
747
753
|
prevCursorFlags: u
|
|
748
754
|
}) {
|
|
749
755
|
let c = 0;
|
|
750
|
-
const a =
|
|
756
|
+
const a = q();
|
|
751
757
|
let l = a.state === "active" ? a.previews : [];
|
|
752
758
|
const f = new Map(
|
|
753
759
|
a.state === "active" ? a.previewLayoutMap : void 0
|
|
754
760
|
);
|
|
755
|
-
o.forEach((
|
|
756
|
-
const { group:
|
|
757
|
-
if (e &&
|
|
761
|
+
o.forEach((g) => {
|
|
762
|
+
const { group: d, groupSize: v } = g, { orientation: h, panels: m } = d;
|
|
763
|
+
if (e && d.resizePreviewMode !== "separator")
|
|
758
764
|
return;
|
|
759
|
-
const { disableCursor:
|
|
760
|
-
let
|
|
761
|
-
|
|
762
|
-
const
|
|
763
|
-
if (!
|
|
765
|
+
const { disableCursor: x } = d.mutableState;
|
|
766
|
+
let S = 0;
|
|
767
|
+
s ? h === "horizontal" ? S = (n.clientX - s.x) / v * 100 : S = (n.clientY - s.y) / v * 100 : h === "horizontal" ? S = n.clientX < 0 ? -100 : 100 : S = n.clientY < 0 ? -100 : 100;
|
|
768
|
+
const P = r.get(d), C = i.get(d);
|
|
769
|
+
if (!P || !C)
|
|
764
770
|
return;
|
|
765
771
|
const {
|
|
766
772
|
defaultLayoutDeferred: E,
|
|
767
|
-
derivedPanelConstraints:
|
|
768
|
-
groupSize:
|
|
769
|
-
layout:
|
|
770
|
-
separatorToPanels:
|
|
771
|
-
} =
|
|
772
|
-
if (
|
|
773
|
-
const I =
|
|
774
|
-
delta:
|
|
775
|
-
initialLayout:
|
|
776
|
-
panelConstraints:
|
|
777
|
-
pivotIndices:
|
|
773
|
+
derivedPanelConstraints: w,
|
|
774
|
+
groupSize: R,
|
|
775
|
+
layout: N,
|
|
776
|
+
separatorToPanels: O
|
|
777
|
+
} = C;
|
|
778
|
+
if (w && N && O) {
|
|
779
|
+
const I = d.resizePreviewMode === "separator" ? f.get(d) ?? N : N, G = de({
|
|
780
|
+
delta: S,
|
|
781
|
+
initialLayout: P,
|
|
782
|
+
panelConstraints: w,
|
|
783
|
+
pivotIndices: g.panels.map((_) => m.indexOf(_)),
|
|
778
784
|
prevLayout: I,
|
|
779
785
|
trigger: "mouse-or-touch"
|
|
780
786
|
});
|
|
781
|
-
if (
|
|
782
|
-
f.set(
|
|
783
|
-
let
|
|
784
|
-
const
|
|
785
|
-
l = l.map((
|
|
786
|
-
if (
|
|
787
|
-
return
|
|
788
|
-
const
|
|
789
|
-
return
|
|
787
|
+
if (d.resizePreviewMode === "separator" && !e && !K(G, I)) {
|
|
788
|
+
f.set(d, G);
|
|
789
|
+
let _ = 0;
|
|
790
|
+
const b = m.map((z) => (_ += G[z.id] - P[z.id], _ * (v / 100)));
|
|
791
|
+
l = l.map((z) => {
|
|
792
|
+
if (z.group !== d)
|
|
793
|
+
return z;
|
|
794
|
+
const M = b[z.panelIndex];
|
|
795
|
+
return M === z.offset ? z : { ...z, offset: M };
|
|
790
796
|
});
|
|
791
797
|
}
|
|
792
|
-
if (K(
|
|
793
|
-
switch (
|
|
798
|
+
if (K(G, I) && S !== 0 && !x)
|
|
799
|
+
switch (h) {
|
|
794
800
|
case "horizontal": {
|
|
795
|
-
c |=
|
|
801
|
+
c |= S < 0 ? it : st;
|
|
796
802
|
break;
|
|
797
803
|
}
|
|
798
804
|
case "vertical": {
|
|
799
|
-
c |=
|
|
805
|
+
c |= S < 0 ? at : lt;
|
|
800
806
|
break;
|
|
801
807
|
}
|
|
802
808
|
}
|
|
803
|
-
(
|
|
809
|
+
(d.resizePreviewMode !== "separator" || e) && !K(G, N) && X(g.group, {
|
|
804
810
|
defaultLayoutDeferred: E,
|
|
805
|
-
derivedPanelConstraints:
|
|
806
|
-
groupSize:
|
|
807
|
-
layout:
|
|
808
|
-
separatorToPanels:
|
|
811
|
+
derivedPanelConstraints: w,
|
|
812
|
+
groupSize: R,
|
|
813
|
+
layout: G,
|
|
814
|
+
separatorToPanels: O
|
|
809
815
|
});
|
|
810
816
|
}
|
|
811
817
|
});
|
|
812
818
|
let y = 0;
|
|
813
|
-
n.movementX === 0 ? y |= u & Fe : y |= c & Fe, n.movementY === 0 ? y |= u &
|
|
819
|
+
n.movementX === 0 ? y |= u & Fe : y |= c & Fe, n.movementY === 0 ? y |= u & _e : y |= c & _e;
|
|
820
|
+
const p = a.state === "active" && (n.clientX !== a.pointerDownAtPoint.x || n.clientY !== a.pointerDownAtPoint.y);
|
|
821
|
+
Dt(y, l, f, p), fe(t);
|
|
814
822
|
}
|
|
815
823
|
function dt(e, t) {
|
|
816
|
-
const n =
|
|
824
|
+
const n = q(), o = ee();
|
|
817
825
|
let r = !1;
|
|
818
826
|
switch (n.state) {
|
|
819
827
|
case "active":
|
|
820
|
-
|
|
828
|
+
ke({
|
|
821
829
|
commit: !0,
|
|
822
830
|
document: e,
|
|
823
831
|
event: t,
|
|
@@ -829,34 +837,34 @@ function dt(e, t) {
|
|
|
829
837
|
}), W({
|
|
830
838
|
cursorFlags: 0,
|
|
831
839
|
state: "inactive"
|
|
832
|
-
}), n.hitRegions.length > 0 && (fe(e), r = !0, n.hitRegions.forEach((
|
|
833
|
-
if (!o.has(
|
|
840
|
+
}), n.hitRegions.length > 0 && (fe(e), r = !0, n.hitRegions.forEach((i) => {
|
|
841
|
+
if (!o.has(i.group))
|
|
834
842
|
return;
|
|
835
|
-
const
|
|
836
|
-
|
|
843
|
+
const s = Q(i.group.id, !0);
|
|
844
|
+
X(i.group, s, {
|
|
837
845
|
isUserInteraction: !0
|
|
838
846
|
});
|
|
839
847
|
}));
|
|
840
848
|
}
|
|
841
849
|
return r;
|
|
842
850
|
}
|
|
843
|
-
function
|
|
851
|
+
function Ve(e) {
|
|
844
852
|
e.defaultPrevented || dt(e.currentTarget, e);
|
|
845
853
|
}
|
|
846
|
-
function
|
|
854
|
+
function Ut(e, t, n) {
|
|
847
855
|
let o, r = {
|
|
848
856
|
x: 1 / 0,
|
|
849
857
|
y: 1 / 0
|
|
850
858
|
};
|
|
851
|
-
for (const
|
|
852
|
-
const
|
|
859
|
+
for (const i of t) {
|
|
860
|
+
const s = ct(n, i.rect);
|
|
853
861
|
switch (e) {
|
|
854
862
|
case "horizontal": {
|
|
855
|
-
|
|
863
|
+
s.x <= r.x && (o = i, r = s);
|
|
856
864
|
break;
|
|
857
865
|
}
|
|
858
866
|
case "vertical": {
|
|
859
|
-
|
|
867
|
+
s.y <= r.y && (o = i, r = s);
|
|
860
868
|
break;
|
|
861
869
|
}
|
|
862
870
|
}
|
|
@@ -866,7 +874,7 @@ function Bt(e, t, n) {
|
|
|
866
874
|
hitRegion: o
|
|
867
875
|
} : void 0;
|
|
868
876
|
}
|
|
869
|
-
function
|
|
877
|
+
function Bt(e) {
|
|
870
878
|
return e !== null && typeof e == "object" && "nodeType" in e && e.nodeType === Node.DOCUMENT_FRAGMENT_NODE;
|
|
871
879
|
}
|
|
872
880
|
function Wt(e, t) {
|
|
@@ -883,41 +891,41 @@ function Wt(e, t) {
|
|
|
883
891
|
"Stacking order can only be calculated for elements with a common ancestor"
|
|
884
892
|
);
|
|
885
893
|
const r = {
|
|
886
|
-
a: je(
|
|
887
|
-
b: je(
|
|
894
|
+
a: Ue(je(n.a)),
|
|
895
|
+
b: Ue(je(n.b))
|
|
888
896
|
};
|
|
889
897
|
if (r.a === r.b) {
|
|
890
|
-
const
|
|
898
|
+
const i = o.childNodes, s = {
|
|
891
899
|
a: n.a.at(-1),
|
|
892
900
|
b: n.b.at(-1)
|
|
893
901
|
};
|
|
894
|
-
let u =
|
|
902
|
+
let u = i.length;
|
|
895
903
|
for (; u--; ) {
|
|
896
|
-
const c =
|
|
897
|
-
if (c ===
|
|
898
|
-
if (c ===
|
|
904
|
+
const c = i[u];
|
|
905
|
+
if (c === s.a) return 1;
|
|
906
|
+
if (c === s.b) return -1;
|
|
899
907
|
}
|
|
900
908
|
}
|
|
901
909
|
return Math.sign(r.a - r.b);
|
|
902
910
|
}
|
|
903
911
|
const Kt = /\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;
|
|
904
|
-
function
|
|
912
|
+
function Xt(e) {
|
|
905
913
|
const t = getComputedStyle(pt(e) ?? e).display;
|
|
906
914
|
return t === "flex" || t === "inline-flex";
|
|
907
915
|
}
|
|
908
|
-
function
|
|
916
|
+
function qt(e) {
|
|
909
917
|
const t = getComputedStyle(e);
|
|
910
|
-
return !!(t.position === "fixed" || t.zIndex !== "auto" && (t.position !== "static" ||
|
|
918
|
+
return !!(t.position === "fixed" || t.zIndex !== "auto" && (t.position !== "static" || Xt(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" || Kt.test(t.willChange) || t.webkitOverflowScrolling === "touch");
|
|
911
919
|
}
|
|
912
|
-
function
|
|
920
|
+
function je(e) {
|
|
913
921
|
let t = e.length;
|
|
914
922
|
for (; t--; ) {
|
|
915
923
|
const n = e[t];
|
|
916
|
-
if (L(n, "Missing node"),
|
|
924
|
+
if (L(n, "Missing node"), qt(n)) return n;
|
|
917
925
|
}
|
|
918
926
|
return null;
|
|
919
927
|
}
|
|
920
|
-
function
|
|
928
|
+
function Ue(e) {
|
|
921
929
|
return e && Number(getComputedStyle(e).zIndex) || 0;
|
|
922
930
|
}
|
|
923
931
|
function Be(e) {
|
|
@@ -928,17 +936,29 @@ function Be(e) {
|
|
|
928
936
|
}
|
|
929
937
|
function pt(e) {
|
|
930
938
|
const { parentNode: t } = e;
|
|
931
|
-
return
|
|
939
|
+
return Bt(t) ? t.host : t;
|
|
932
940
|
}
|
|
933
941
|
function Yt(e, t) {
|
|
934
942
|
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;
|
|
935
943
|
}
|
|
936
|
-
function Jt({
|
|
944
|
+
function Jt(e) {
|
|
945
|
+
try {
|
|
946
|
+
return e.matches(":modal");
|
|
947
|
+
} catch {
|
|
948
|
+
return !1;
|
|
949
|
+
}
|
|
950
|
+
}
|
|
951
|
+
function Zt({
|
|
937
952
|
groupElement: e,
|
|
938
953
|
hitRegion: t,
|
|
939
954
|
pointerEventTarget: n
|
|
940
955
|
}) {
|
|
941
|
-
if (
|
|
956
|
+
if (Re(n)) {
|
|
957
|
+
const o = n.closest("dialog");
|
|
958
|
+
if (o && !o.contains(e) && Jt(o))
|
|
959
|
+
return !1;
|
|
960
|
+
}
|
|
961
|
+
if (!Re(n) || n.contains(e) || e.contains(n))
|
|
942
962
|
return !0;
|
|
943
963
|
if (Wt(n, e) > 0) {
|
|
944
964
|
let o = n;
|
|
@@ -952,69 +972,69 @@ function Jt({
|
|
|
952
972
|
}
|
|
953
973
|
return !0;
|
|
954
974
|
}
|
|
955
|
-
function
|
|
975
|
+
function Oe(e, t) {
|
|
956
976
|
const n = [];
|
|
957
977
|
return t.forEach((o, r) => {
|
|
958
978
|
if (r.disabled)
|
|
959
979
|
return;
|
|
960
|
-
const
|
|
980
|
+
const i = Ee({ group: r }), s = Ut(r.orientation, i, {
|
|
961
981
|
x: e.clientX,
|
|
962
982
|
y: e.clientY
|
|
963
983
|
});
|
|
964
|
-
|
|
984
|
+
s && s.distance.x <= 0 && s.distance.y <= 0 && Zt({
|
|
965
985
|
groupElement: r.element,
|
|
966
|
-
hitRegion:
|
|
986
|
+
hitRegion: s.hitRegion.rect,
|
|
967
987
|
pointerEventTarget: e.target
|
|
968
|
-
}) && n.push(
|
|
988
|
+
}) && n.push(s.hitRegion);
|
|
969
989
|
}), n;
|
|
970
990
|
}
|
|
971
991
|
function ne({
|
|
972
992
|
layout: e,
|
|
973
993
|
panelConstraints: t
|
|
974
994
|
}) {
|
|
975
|
-
const n = t.map(({ panelId:
|
|
976
|
-
(
|
|
995
|
+
const n = t.map(({ panelId: s }) => e[s]), o = [...n], r = o.reduce(
|
|
996
|
+
(s, u) => s + u,
|
|
977
997
|
0
|
|
978
998
|
);
|
|
979
999
|
if (Object.keys(e).length !== t.length)
|
|
980
1000
|
throw Error(
|
|
981
|
-
`Invalid ${t.length} panel layout: ${Object.values(e).map((
|
|
1001
|
+
`Invalid ${t.length} panel layout: ${Object.values(e).map((s) => `${s}%`).join(", ")}`
|
|
982
1002
|
);
|
|
983
1003
|
if (!D(r, 100) && o.length > 0)
|
|
984
|
-
for (let
|
|
985
|
-
const u = o[
|
|
986
|
-
L(u != null, `No layout data found for index ${
|
|
1004
|
+
for (let s = 0; s < t.length; s++) {
|
|
1005
|
+
const u = o[s];
|
|
1006
|
+
L(u != null, `No layout data found for index ${s}`);
|
|
987
1007
|
const c = 100 / r * u;
|
|
988
|
-
o[
|
|
1008
|
+
o[s] = c;
|
|
989
1009
|
}
|
|
990
|
-
let
|
|
991
|
-
for (let
|
|
992
|
-
const u = n[
|
|
993
|
-
L(u != null, `No layout data found for index ${
|
|
994
|
-
const c = o[
|
|
995
|
-
L(c != null, `No layout data found for index ${
|
|
1010
|
+
let i = 0;
|
|
1011
|
+
for (let s = 0; s < t.length; s++) {
|
|
1012
|
+
const u = n[s];
|
|
1013
|
+
L(u != null, `No layout data found for index ${s}`);
|
|
1014
|
+
const c = o[s];
|
|
1015
|
+
L(c != null, `No layout data found for index ${s}`);
|
|
996
1016
|
const a = se({
|
|
997
1017
|
overrideDisabledPanels: !0,
|
|
998
|
-
panelConstraints: t[
|
|
1018
|
+
panelConstraints: t[s],
|
|
999
1019
|
prevSize: u,
|
|
1000
1020
|
size: c
|
|
1001
1021
|
});
|
|
1002
|
-
c != a && (
|
|
1022
|
+
c != a && (i += c - a, o[s] = a);
|
|
1003
1023
|
}
|
|
1004
|
-
if (!D(
|
|
1005
|
-
for (let
|
|
1006
|
-
const u = o[
|
|
1007
|
-
L(u != null, `No layout data found for index ${
|
|
1008
|
-
const c = u +
|
|
1024
|
+
if (!D(i, 0))
|
|
1025
|
+
for (let s = 0; s < t.length; s++) {
|
|
1026
|
+
const u = o[s];
|
|
1027
|
+
L(u != null, `No layout data found for index ${s}`);
|
|
1028
|
+
const c = u + i, a = se({
|
|
1009
1029
|
overrideDisabledPanels: !0,
|
|
1010
|
-
panelConstraints: t[
|
|
1030
|
+
panelConstraints: t[s],
|
|
1011
1031
|
prevSize: u,
|
|
1012
1032
|
size: c
|
|
1013
1033
|
});
|
|
1014
|
-
if (u !== a && (
|
|
1034
|
+
if (u !== a && (i -= a - u, o[s] = a, D(i, 0)))
|
|
1015
1035
|
break;
|
|
1016
1036
|
}
|
|
1017
|
-
return o.reduce((
|
|
1037
|
+
return o.reduce((s, u, c) => (s[t[c].panelId] = u, s), {});
|
|
1018
1038
|
}
|
|
1019
1039
|
function ht({
|
|
1020
1040
|
groupId: e,
|
|
@@ -1028,8 +1048,8 @@ function ht({
|
|
|
1028
1048
|
defaultLayoutDeferred: l,
|
|
1029
1049
|
derivedPanelConstraints: f,
|
|
1030
1050
|
layout: y,
|
|
1031
|
-
groupSize:
|
|
1032
|
-
separatorToPanels:
|
|
1051
|
+
groupSize: p,
|
|
1052
|
+
separatorToPanels: g
|
|
1033
1053
|
}
|
|
1034
1054
|
] of c)
|
|
1035
1055
|
if (a.id === e)
|
|
@@ -1037,9 +1057,9 @@ function ht({
|
|
|
1037
1057
|
defaultLayoutDeferred: l,
|
|
1038
1058
|
derivedPanelConstraints: f,
|
|
1039
1059
|
group: a,
|
|
1040
|
-
groupSize:
|
|
1060
|
+
groupSize: p,
|
|
1041
1061
|
layout: y,
|
|
1042
|
-
separatorToPanels:
|
|
1062
|
+
separatorToPanels: g
|
|
1043
1063
|
};
|
|
1044
1064
|
throw Error(`Group ${e} not found`);
|
|
1045
1065
|
}, o = () => {
|
|
@@ -1054,85 +1074,85 @@ function ht({
|
|
|
1054
1074
|
if (c !== void 0)
|
|
1055
1075
|
return c;
|
|
1056
1076
|
throw Error(`Layout not found for Panel ${t}`);
|
|
1057
|
-
},
|
|
1077
|
+
}, i = () => {
|
|
1058
1078
|
const c = n().layout[t];
|
|
1059
1079
|
if (c !== void 0)
|
|
1060
1080
|
return c;
|
|
1061
1081
|
throw Error(`Layout not found for Panel ${t}`);
|
|
1062
|
-
},
|
|
1082
|
+
}, s = ({
|
|
1063
1083
|
nextSize: c,
|
|
1064
1084
|
panels: a,
|
|
1065
1085
|
prevLayout: l,
|
|
1066
1086
|
derivedPanelConstraints: f
|
|
1067
1087
|
}) => {
|
|
1068
|
-
const y =
|
|
1069
|
-
if (
|
|
1070
|
-
const x = f[
|
|
1088
|
+
const y = i(), p = a.findIndex((h) => h.id === t), g = p === 0, d = p === a.length - 1;
|
|
1089
|
+
if (d && c < y && (g || a.slice(0, p).every((h, m) => {
|
|
1090
|
+
const x = f[m];
|
|
1071
1091
|
return x?.collapsible && D(x.collapsedSize, l[x.panelId]);
|
|
1072
1092
|
}))) {
|
|
1073
|
-
const
|
|
1093
|
+
const h = a.slice(0, p).reduce((m, x) => m + l[x.id], 0);
|
|
1074
1094
|
return {
|
|
1075
1095
|
...l,
|
|
1076
|
-
[t]:
|
|
1096
|
+
[t]: F(100 - h)
|
|
1077
1097
|
};
|
|
1078
1098
|
}
|
|
1079
1099
|
return de({
|
|
1080
|
-
delta:
|
|
1100
|
+
delta: d ? y - c : c - y,
|
|
1081
1101
|
initialLayout: l,
|
|
1082
1102
|
panelConstraints: f,
|
|
1083
|
-
pivotIndices:
|
|
1103
|
+
pivotIndices: d ? [p - 1, p] : [p, p + 1],
|
|
1084
1104
|
prevLayout: l,
|
|
1085
1105
|
trigger: "imperative-api"
|
|
1086
1106
|
});
|
|
1087
1107
|
}, u = (c) => {
|
|
1088
|
-
const a =
|
|
1108
|
+
const a = i();
|
|
1089
1109
|
if (c === a)
|
|
1090
1110
|
return;
|
|
1091
1111
|
const {
|
|
1092
1112
|
defaultLayoutDeferred: l,
|
|
1093
1113
|
derivedPanelConstraints: f,
|
|
1094
1114
|
group: y,
|
|
1095
|
-
groupSize:
|
|
1096
|
-
layout:
|
|
1097
|
-
separatorToPanels:
|
|
1098
|
-
} = n(), v =
|
|
1115
|
+
groupSize: p,
|
|
1116
|
+
layout: g,
|
|
1117
|
+
separatorToPanels: d
|
|
1118
|
+
} = n(), v = s({
|
|
1099
1119
|
nextSize: c,
|
|
1100
1120
|
panels: y.panels,
|
|
1101
|
-
prevLayout:
|
|
1121
|
+
prevLayout: g,
|
|
1102
1122
|
derivedPanelConstraints: f
|
|
1103
|
-
}),
|
|
1123
|
+
}), h = ne({
|
|
1104
1124
|
layout: v,
|
|
1105
1125
|
panelConstraints: f
|
|
1106
1126
|
});
|
|
1107
|
-
K(
|
|
1127
|
+
K(g, h) || X(y, {
|
|
1108
1128
|
defaultLayoutDeferred: l,
|
|
1109
1129
|
derivedPanelConstraints: f,
|
|
1110
|
-
groupSize:
|
|
1111
|
-
layout:
|
|
1112
|
-
separatorToPanels:
|
|
1130
|
+
groupSize: p,
|
|
1131
|
+
layout: h,
|
|
1132
|
+
separatorToPanels: d
|
|
1113
1133
|
});
|
|
1114
1134
|
};
|
|
1115
1135
|
return {
|
|
1116
1136
|
collapse: () => {
|
|
1117
|
-
const { collapsible: c, collapsedSize: a } = o(), { mutableValues: l } = r(), f =
|
|
1137
|
+
const { collapsible: c, collapsedSize: a } = o(), { mutableValues: l } = r(), f = i();
|
|
1118
1138
|
c && f !== a && (l.expandToSize = f, u(a));
|
|
1119
1139
|
},
|
|
1120
1140
|
expand: () => {
|
|
1121
|
-
const { collapsible: c, collapsedSize: a, minSize: l } = o(), { mutableValues: f } = r(), y =
|
|
1141
|
+
const { collapsible: c, collapsedSize: a, minSize: l } = o(), { mutableValues: f } = r(), y = i();
|
|
1122
1142
|
if (c && y === a) {
|
|
1123
|
-
let
|
|
1124
|
-
|
|
1143
|
+
let p = f.expandToSize ?? l;
|
|
1144
|
+
p === 0 && (p = 1), u(p);
|
|
1125
1145
|
}
|
|
1126
1146
|
},
|
|
1127
1147
|
getSize: () => {
|
|
1128
|
-
const { group: c } = n(), a =
|
|
1148
|
+
const { group: c } = n(), a = i(), { element: l } = r(), f = c.orientation === "horizontal" ? l.offsetWidth : l.offsetHeight;
|
|
1129
1149
|
return {
|
|
1130
1150
|
asPercentage: a,
|
|
1131
1151
|
inPixels: f
|
|
1132
1152
|
};
|
|
1133
1153
|
},
|
|
1134
1154
|
isCollapsed: () => {
|
|
1135
|
-
const { collapsible: c, collapsedSize: a } = o(), l =
|
|
1155
|
+
const { collapsible: c, collapsedSize: a } = o(), l = i();
|
|
1136
1156
|
return c && D(a, l);
|
|
1137
1157
|
},
|
|
1138
1158
|
resize: (c) => {
|
|
@@ -1140,26 +1160,26 @@ function ht({
|
|
|
1140
1160
|
groupSize: f,
|
|
1141
1161
|
panelElement: l,
|
|
1142
1162
|
styleProp: c
|
|
1143
|
-
}),
|
|
1144
|
-
u(
|
|
1163
|
+
}), p = F(y / f * 100);
|
|
1164
|
+
u(p);
|
|
1145
1165
|
}
|
|
1146
1166
|
};
|
|
1147
1167
|
}
|
|
1148
|
-
function
|
|
1168
|
+
function We(e) {
|
|
1149
1169
|
if (e.defaultPrevented)
|
|
1150
1170
|
return;
|
|
1151
1171
|
const t = ee();
|
|
1152
|
-
|
|
1172
|
+
Oe(e, t).forEach((o) => {
|
|
1153
1173
|
if (o.separator && !o.separator.disableDoubleClick) {
|
|
1154
1174
|
const r = o.panels.find(
|
|
1155
|
-
(
|
|
1175
|
+
(i) => i.panelConstraints.defaultSize !== void 0
|
|
1156
1176
|
);
|
|
1157
1177
|
if (r) {
|
|
1158
|
-
const
|
|
1178
|
+
const i = r.panelConstraints.defaultSize, s = ht({
|
|
1159
1179
|
groupId: o.group.id,
|
|
1160
1180
|
panelId: r.id
|
|
1161
1181
|
});
|
|
1162
|
-
|
|
1182
|
+
s && i !== void 0 && (s.resize(i), e.preventDefault());
|
|
1163
1183
|
}
|
|
1164
1184
|
}
|
|
1165
1185
|
});
|
|
@@ -1192,18 +1212,18 @@ function mt({
|
|
|
1192
1212
|
const {
|
|
1193
1213
|
defaultLayoutDeferred: o,
|
|
1194
1214
|
derivedPanelConstraints: r,
|
|
1195
|
-
group:
|
|
1196
|
-
groupSize:
|
|
1215
|
+
group: i,
|
|
1216
|
+
groupSize: s,
|
|
1197
1217
|
layout: u,
|
|
1198
1218
|
separatorToPanels: c
|
|
1199
1219
|
} = t(), a = ne({
|
|
1200
1220
|
layout: n,
|
|
1201
1221
|
panelConstraints: r
|
|
1202
1222
|
});
|
|
1203
|
-
return o ? u : (K(u, a) ||
|
|
1223
|
+
return o ? u : (K(u, a) || X(i, {
|
|
1204
1224
|
defaultLayoutDeferred: o,
|
|
1205
1225
|
derivedPanelConstraints: r,
|
|
1206
|
-
groupSize:
|
|
1226
|
+
groupSize: s,
|
|
1207
1227
|
layout: a,
|
|
1208
1228
|
separatorToPanels: c
|
|
1209
1229
|
}), a);
|
|
@@ -1215,20 +1235,20 @@ function te(e, t) {
|
|
|
1215
1235
|
(f) => f.element === e
|
|
1216
1236
|
);
|
|
1217
1237
|
L(r, "Matching separator not found");
|
|
1218
|
-
const
|
|
1219
|
-
L(
|
|
1220
|
-
const
|
|
1238
|
+
const i = o.separatorToPanels.get(r);
|
|
1239
|
+
L(i, "Matching panels not found");
|
|
1240
|
+
const s = i.map((f) => n.panels.indexOf(f)), c = mt({ groupId: n.id }).getLayout(), a = de({
|
|
1221
1241
|
delta: t,
|
|
1222
1242
|
initialLayout: c,
|
|
1223
1243
|
panelConstraints: o.derivedPanelConstraints,
|
|
1224
|
-
pivotIndices:
|
|
1244
|
+
pivotIndices: s,
|
|
1225
1245
|
prevLayout: c,
|
|
1226
1246
|
trigger: "keyboard"
|
|
1227
1247
|
}), l = ne({
|
|
1228
1248
|
layout: a,
|
|
1229
1249
|
panelConstraints: o.derivedPanelConstraints
|
|
1230
1250
|
});
|
|
1231
|
-
K(c, l) ||
|
|
1251
|
+
K(c, l) || X(
|
|
1232
1252
|
n,
|
|
1233
1253
|
{
|
|
1234
1254
|
defaultLayoutDeferred: o.defaultLayoutDeferred,
|
|
@@ -1244,7 +1264,7 @@ function te(e, t) {
|
|
|
1244
1264
|
{ isUserInteraction: !0 }
|
|
1245
1265
|
);
|
|
1246
1266
|
}
|
|
1247
|
-
function
|
|
1267
|
+
function Ke(e) {
|
|
1248
1268
|
if (e.defaultPrevented)
|
|
1249
1269
|
return;
|
|
1250
1270
|
const t = e.currentTarget, n = ye(t);
|
|
@@ -1274,31 +1294,31 @@ function We(e) {
|
|
|
1274
1294
|
}
|
|
1275
1295
|
case "Enter": {
|
|
1276
1296
|
e.preventDefault();
|
|
1277
|
-
const r = ye(t),
|
|
1278
|
-
(
|
|
1297
|
+
const r = ye(t), i = Q(r.id, !0), { derivedPanelConstraints: s, layout: u, separatorToPanels: c } = i, a = r.separators.find(
|
|
1298
|
+
(p) => p.element === t
|
|
1279
1299
|
);
|
|
1280
1300
|
L(a, "Matching separator not found");
|
|
1281
1301
|
const l = c.get(a);
|
|
1282
1302
|
L(l, "Matching panels not found");
|
|
1283
|
-
const f = l[0], y =
|
|
1284
|
-
(
|
|
1303
|
+
const f = l[0], y = s.find(
|
|
1304
|
+
(p) => p.panelId === f.id
|
|
1285
1305
|
);
|
|
1286
1306
|
if (L(y, "Panel metadata not found"), y.collapsible) {
|
|
1287
|
-
const
|
|
1288
|
-
te(t,
|
|
1307
|
+
const p = u[f.id], g = y.collapsedSize === p ? r.mutableState.expandedPanelSizes[f.id] ?? y.minSize : y.collapsedSize;
|
|
1308
|
+
te(t, g - p);
|
|
1289
1309
|
}
|
|
1290
1310
|
break;
|
|
1291
1311
|
}
|
|
1292
1312
|
case "F6": {
|
|
1293
1313
|
e.preventDefault();
|
|
1294
|
-
const
|
|
1314
|
+
const i = ye(t).separators.map(
|
|
1295
1315
|
(a) => a.element
|
|
1296
|
-
),
|
|
1316
|
+
), s = Array.from(i).findIndex(
|
|
1297
1317
|
(a) => a === e.currentTarget
|
|
1298
1318
|
);
|
|
1299
|
-
L(
|
|
1300
|
-
const u = e.shiftKey ?
|
|
1301
|
-
|
|
1319
|
+
L(s !== null, "Index not found");
|
|
1320
|
+
const u = e.shiftKey ? s > 0 ? s - 1 : i.length - 1 : s + 1 < i.length ? s + 1 : 0;
|
|
1321
|
+
i[u].focus({
|
|
1302
1322
|
preventScroll: !0
|
|
1303
1323
|
});
|
|
1304
1324
|
break;
|
|
@@ -1309,76 +1329,77 @@ function We(e) {
|
|
|
1309
1329
|
}
|
|
1310
1330
|
}
|
|
1311
1331
|
}
|
|
1312
|
-
function
|
|
1313
|
-
const { element: n, orientation: o, panels: r } = e,
|
|
1314
|
-
return
|
|
1332
|
+
function Qt(e, t) {
|
|
1333
|
+
const { element: n, orientation: o, panels: r } = e, i = n.getBoundingClientRect(), s = o === "horizontal";
|
|
1334
|
+
return Ee({
|
|
1315
1335
|
expandHitTargets: !1,
|
|
1316
1336
|
group: e,
|
|
1317
1337
|
includeDisabled: !0
|
|
1318
1338
|
}).map(
|
|
1319
1339
|
({ panels: c, rect: a, separator: l }, f) => {
|
|
1320
|
-
const y = r.indexOf(c[0]),
|
|
1340
|
+
const y = r.indexOf(c[0]), p = s ? a.left + a.width / 2 : a.top + a.height / 2;
|
|
1321
1341
|
return {
|
|
1322
|
-
active: t.some((
|
|
1323
|
-
if (
|
|
1342
|
+
active: t.some((d) => {
|
|
1343
|
+
if (d.group !== e || d.panels[0] !== c[0])
|
|
1324
1344
|
return !1;
|
|
1325
|
-
if (l ||
|
|
1326
|
-
return
|
|
1327
|
-
const v =
|
|
1328
|
-
return D(
|
|
1345
|
+
if (l || d.separator)
|
|
1346
|
+
return d.separator === l;
|
|
1347
|
+
const v = s ? d.rect.left + d.rect.width / 2 : d.rect.top + d.rect.height / 2;
|
|
1348
|
+
return D(p, v);
|
|
1329
1349
|
}),
|
|
1330
1350
|
group: e,
|
|
1331
1351
|
key: l ? `separator-${l.id}` : `panel-${c[0].id}-${f}`,
|
|
1332
1352
|
offset: 0,
|
|
1333
1353
|
panelIndex: y,
|
|
1334
1354
|
rect: new DOMRect(
|
|
1335
|
-
(
|
|
1336
|
-
(!
|
|
1337
|
-
|
|
1338
|
-
!
|
|
1355
|
+
(s && !l ? p : a.left) - i.left - n.clientLeft + n.scrollLeft,
|
|
1356
|
+
(!s && !l ? p : a.top) - i.top - n.clientTop + n.scrollTop,
|
|
1357
|
+
s && !l ? 0 : a.width,
|
|
1358
|
+
!s && !l ? 0 : a.height
|
|
1339
1359
|
),
|
|
1340
1360
|
separator: l
|
|
1341
1361
|
};
|
|
1342
1362
|
}
|
|
1343
1363
|
);
|
|
1344
1364
|
}
|
|
1345
|
-
function
|
|
1365
|
+
function Xe(e) {
|
|
1346
1366
|
if (e.defaultPrevented)
|
|
1347
1367
|
return;
|
|
1348
1368
|
if (e.pointerType === "mouse" && e.button > 0)
|
|
1349
1369
|
return;
|
|
1350
|
-
const t = ee(), n =
|
|
1370
|
+
const t = ee(), n = Oe(e, t);
|
|
1351
1371
|
if (n.length === 0)
|
|
1352
1372
|
return;
|
|
1353
1373
|
const o = /* @__PURE__ */ new Map();
|
|
1354
1374
|
let r = !1;
|
|
1355
|
-
n.forEach((
|
|
1356
|
-
|
|
1375
|
+
n.forEach((s) => {
|
|
1376
|
+
s.separator && (r || (r = !0, s.separator.element.focus({
|
|
1357
1377
|
// @ts-expect-error https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus#browser_compatibility
|
|
1358
1378
|
focusVisible: !1,
|
|
1359
1379
|
preventScroll: !0
|
|
1360
1380
|
})));
|
|
1361
|
-
const u = t.get(
|
|
1362
|
-
u && o.set(
|
|
1381
|
+
const u = t.get(s.group);
|
|
1382
|
+
u && o.set(s.group, u.layout);
|
|
1363
1383
|
});
|
|
1364
|
-
const
|
|
1365
|
-
(
|
|
1384
|
+
const i = Array.from(o.keys()).flatMap(
|
|
1385
|
+
(s) => s.resizePreviewMode === "separator" ? Qt(s, n) : []
|
|
1366
1386
|
);
|
|
1367
1387
|
W({
|
|
1368
1388
|
cursorFlags: 0,
|
|
1389
|
+
didPointerMove: !1,
|
|
1369
1390
|
hitRegions: n,
|
|
1370
1391
|
initialLayoutMap: o,
|
|
1371
1392
|
pointerDownAtPoint: { x: e.clientX, y: e.clientY },
|
|
1372
1393
|
previewLayoutMap: new Map(o),
|
|
1373
|
-
previews:
|
|
1394
|
+
previews: i,
|
|
1374
1395
|
state: "active"
|
|
1375
1396
|
}), e.preventDefault();
|
|
1376
1397
|
}
|
|
1377
1398
|
function qe(e) {
|
|
1378
|
-
const t = ee(), n =
|
|
1399
|
+
const t = ee(), n = q();
|
|
1379
1400
|
switch (n.state) {
|
|
1380
1401
|
case "active":
|
|
1381
|
-
|
|
1402
|
+
ke({
|
|
1382
1403
|
commit: !1,
|
|
1383
1404
|
document: e.currentTarget,
|
|
1384
1405
|
event: e,
|
|
@@ -1389,10 +1410,10 @@ function qe(e) {
|
|
|
1389
1410
|
});
|
|
1390
1411
|
}
|
|
1391
1412
|
}
|
|
1392
|
-
function
|
|
1413
|
+
function Ye(e) {
|
|
1393
1414
|
if (e.defaultPrevented)
|
|
1394
1415
|
return;
|
|
1395
|
-
const t =
|
|
1416
|
+
const t = q(), n = ee();
|
|
1396
1417
|
switch (t.state) {
|
|
1397
1418
|
case "active": {
|
|
1398
1419
|
if (
|
|
@@ -1400,8 +1421,8 @@ function Xe(e) {
|
|
|
1400
1421
|
e.buttons === 0
|
|
1401
1422
|
) {
|
|
1402
1423
|
t.previewLayoutMap.forEach((o, r) => {
|
|
1403
|
-
const
|
|
1404
|
-
r.resizePreviewMode === "separator" &&
|
|
1424
|
+
const i = n.get(r);
|
|
1425
|
+
r.resizePreviewMode === "separator" && i && !K(o, i.layout) && X(r, { ...i, layout: o });
|
|
1405
1426
|
}), W({
|
|
1406
1427
|
cursorFlags: 0,
|
|
1407
1428
|
state: "inactive"
|
|
@@ -1409,7 +1430,7 @@ function Xe(e) {
|
|
|
1409
1430
|
if (!n.has(o.group))
|
|
1410
1431
|
return;
|
|
1411
1432
|
const r = Q(o.group.id, !0);
|
|
1412
|
-
|
|
1433
|
+
X(o.group, r, {
|
|
1413
1434
|
isUserInteraction: !0
|
|
1414
1435
|
});
|
|
1415
1436
|
}), fe(e.currentTarget);
|
|
@@ -1420,7 +1441,7 @@ function Xe(e) {
|
|
|
1420
1441
|
const { element: r } = o.separator;
|
|
1421
1442
|
r.isConnected && !r.hasPointerCapture?.(e.pointerId) && r.setPointerCapture?.(e.pointerId);
|
|
1422
1443
|
}
|
|
1423
|
-
|
|
1444
|
+
ke({
|
|
1424
1445
|
commit: !1,
|
|
1425
1446
|
document: e.currentTarget,
|
|
1426
1447
|
event: e,
|
|
@@ -1433,7 +1454,7 @@ function Xe(e) {
|
|
|
1433
1454
|
break;
|
|
1434
1455
|
}
|
|
1435
1456
|
default: {
|
|
1436
|
-
const o =
|
|
1457
|
+
const o = Oe(e, n);
|
|
1437
1458
|
o.length === 0 ? t.state !== "inactive" && W({
|
|
1438
1459
|
cursorFlags: 0,
|
|
1439
1460
|
state: "inactive"
|
|
@@ -1446,9 +1467,9 @@ function Xe(e) {
|
|
|
1446
1467
|
}
|
|
1447
1468
|
}
|
|
1448
1469
|
}
|
|
1449
|
-
function
|
|
1470
|
+
function Je(e) {
|
|
1450
1471
|
if (e.relatedTarget instanceof HTMLIFrameElement)
|
|
1451
|
-
switch (
|
|
1472
|
+
switch (q().state) {
|
|
1452
1473
|
case "hover":
|
|
1453
1474
|
W({
|
|
1454
1475
|
cursorFlags: 0,
|
|
@@ -1456,7 +1477,7 @@ function Ye(e) {
|
|
|
1456
1477
|
});
|
|
1457
1478
|
}
|
|
1458
1479
|
}
|
|
1459
|
-
function
|
|
1480
|
+
function Ze(e) {
|
|
1460
1481
|
if (e.defaultPrevented)
|
|
1461
1482
|
return;
|
|
1462
1483
|
if (e.pointerType === "mouse" && e.button > 0)
|
|
@@ -1466,25 +1487,25 @@ function Je(e) {
|
|
|
1466
1487
|
e
|
|
1467
1488
|
) && e.preventDefault();
|
|
1468
1489
|
}
|
|
1469
|
-
function
|
|
1490
|
+
function en(e) {
|
|
1470
1491
|
let t = 0, n = 0;
|
|
1471
1492
|
const o = {};
|
|
1472
|
-
for (const
|
|
1473
|
-
if (
|
|
1493
|
+
for (const i of e)
|
|
1494
|
+
if (i.defaultSize !== void 0) {
|
|
1474
1495
|
t++;
|
|
1475
|
-
const
|
|
1476
|
-
n +=
|
|
1496
|
+
const s = F(i.defaultSize);
|
|
1497
|
+
n += s, o[i.panelId] = s;
|
|
1477
1498
|
} else
|
|
1478
|
-
o[
|
|
1499
|
+
o[i.panelId] = void 0;
|
|
1479
1500
|
const r = e.length - t;
|
|
1480
1501
|
if (r !== 0) {
|
|
1481
|
-
const
|
|
1482
|
-
for (const
|
|
1483
|
-
|
|
1502
|
+
const i = F((100 - n) / r);
|
|
1503
|
+
for (const s of e)
|
|
1504
|
+
s.defaultSize === void 0 && (o[s.panelId] = i);
|
|
1484
1505
|
}
|
|
1485
1506
|
return o;
|
|
1486
1507
|
}
|
|
1487
|
-
function
|
|
1508
|
+
function tn(e, t) {
|
|
1488
1509
|
const n = e.map((r) => r.id), o = Object.keys(t);
|
|
1489
1510
|
if (n.length !== o.length)
|
|
1490
1511
|
return !1;
|
|
@@ -1493,22 +1514,22 @@ function en(e, t) {
|
|
|
1493
1514
|
return !1;
|
|
1494
1515
|
return !0;
|
|
1495
1516
|
}
|
|
1496
|
-
function
|
|
1517
|
+
function Qe({
|
|
1497
1518
|
group: e,
|
|
1498
1519
|
panelConstraints: t
|
|
1499
1520
|
}) {
|
|
1500
1521
|
const n = e.panels.map(({ id: r }) => r).join(","), o = e.mutableState.defaultLayout;
|
|
1501
|
-
return e.mutableState.layouts[n] ?? (o &&
|
|
1522
|
+
return e.mutableState.layouts[n] ?? (o && tn(e.panels, o) ? o : en(t));
|
|
1502
1523
|
}
|
|
1503
|
-
function
|
|
1524
|
+
function nn(e, t, n) {
|
|
1504
1525
|
if (!n[0])
|
|
1505
1526
|
return;
|
|
1506
1527
|
const r = e.panels.find((a) => a.element === t);
|
|
1507
1528
|
if (!r || !r.onResize)
|
|
1508
1529
|
return;
|
|
1509
|
-
const
|
|
1510
|
-
asPercentage:
|
|
1511
|
-
inPixels:
|
|
1530
|
+
const i = ae({ group: e }), s = e.orientation === "horizontal" ? r.element.offsetWidth : r.element.offsetHeight, u = r.mutableValues.prevSize, c = {
|
|
1531
|
+
asPercentage: F(s / i * 100),
|
|
1532
|
+
inPixels: s
|
|
1512
1533
|
};
|
|
1513
1534
|
r.mutableValues.prevSize = c, r.onResize(c, r.id, u);
|
|
1514
1535
|
}
|
|
@@ -1520,10 +1541,10 @@ function gt(e, t) {
|
|
|
1520
1541
|
return !1;
|
|
1521
1542
|
return !0;
|
|
1522
1543
|
}
|
|
1523
|
-
function
|
|
1544
|
+
function on(e, t) {
|
|
1524
1545
|
return e.length !== t.length ? !1 : e.every((n, o) => gt(n, t[o]));
|
|
1525
1546
|
}
|
|
1526
|
-
function
|
|
1547
|
+
function rn({
|
|
1527
1548
|
group: e,
|
|
1528
1549
|
nextGroupSize: t,
|
|
1529
1550
|
prevGroupSize: n,
|
|
@@ -1531,40 +1552,40 @@ function on({
|
|
|
1531
1552
|
}) {
|
|
1532
1553
|
if (n <= 0 || t <= 0 || n === t)
|
|
1533
1554
|
return o;
|
|
1534
|
-
let r = 0,
|
|
1555
|
+
let r = 0, i = 0, s = !1;
|
|
1535
1556
|
const u = /* @__PURE__ */ new Map(), c = [];
|
|
1536
1557
|
for (const f of e.panels) {
|
|
1537
1558
|
const y = o[f.id] ?? 0;
|
|
1538
1559
|
switch (f.panelConstraints.groupResizeBehavior) {
|
|
1539
1560
|
case "preserve-pixel-size": {
|
|
1540
|
-
|
|
1541
|
-
const
|
|
1542
|
-
|
|
1561
|
+
s = !0;
|
|
1562
|
+
const p = y / 100 * n, g = F(
|
|
1563
|
+
p / t * 100
|
|
1543
1564
|
);
|
|
1544
|
-
u.set(f.id,
|
|
1565
|
+
u.set(f.id, g), r += g;
|
|
1545
1566
|
break;
|
|
1546
1567
|
}
|
|
1547
1568
|
case "preserve-relative-size":
|
|
1548
1569
|
default: {
|
|
1549
|
-
c.push(f.id),
|
|
1570
|
+
c.push(f.id), i += y;
|
|
1550
1571
|
break;
|
|
1551
1572
|
}
|
|
1552
1573
|
}
|
|
1553
1574
|
}
|
|
1554
|
-
if (!
|
|
1575
|
+
if (!s || c.length === 0)
|
|
1555
1576
|
return o;
|
|
1556
1577
|
const a = 100 - r, l = { ...o };
|
|
1557
1578
|
if (u.forEach((f, y) => {
|
|
1558
1579
|
l[y] = f;
|
|
1559
|
-
}),
|
|
1580
|
+
}), i > 0)
|
|
1560
1581
|
for (const f of c) {
|
|
1561
1582
|
const y = o[f] ?? 0;
|
|
1562
|
-
l[f] =
|
|
1563
|
-
y /
|
|
1583
|
+
l[f] = F(
|
|
1584
|
+
y / i * a
|
|
1564
1585
|
);
|
|
1565
1586
|
}
|
|
1566
1587
|
else {
|
|
1567
|
-
const f =
|
|
1588
|
+
const f = F(
|
|
1568
1589
|
a / c.length
|
|
1569
1590
|
);
|
|
1570
1591
|
for (const y of c)
|
|
@@ -1573,59 +1594,59 @@ function on({
|
|
|
1573
1594
|
return l;
|
|
1574
1595
|
}
|
|
1575
1596
|
const re = /* @__PURE__ */ new Map();
|
|
1576
|
-
function
|
|
1597
|
+
function sn(e) {
|
|
1577
1598
|
let t = !0;
|
|
1578
1599
|
L(
|
|
1579
1600
|
e.element.ownerDocument.defaultView,
|
|
1580
1601
|
"Cannot register an unmounted Group"
|
|
1581
1602
|
);
|
|
1582
|
-
const n = e.element.ownerDocument.defaultView.ResizeObserver, o = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set(),
|
|
1583
|
-
for (const
|
|
1584
|
-
const { borderBoxSize:
|
|
1603
|
+
const n = e.element.ownerDocument.defaultView.ResizeObserver, o = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set(), i = new n((p) => {
|
|
1604
|
+
for (const g of p) {
|
|
1605
|
+
const { borderBoxSize: d, target: v } = g;
|
|
1585
1606
|
if (v === e.element) {
|
|
1586
1607
|
if (t) {
|
|
1587
|
-
const
|
|
1588
|
-
if (
|
|
1608
|
+
const h = ae({ group: e });
|
|
1609
|
+
if (h === 0)
|
|
1589
1610
|
return;
|
|
1590
|
-
const
|
|
1591
|
-
if (!
|
|
1611
|
+
const m = Q(e.id);
|
|
1612
|
+
if (!m)
|
|
1592
1613
|
return;
|
|
1593
|
-
const x = Le(e),
|
|
1614
|
+
const x = Le(e), S = m.defaultLayoutDeferred ? Qe({
|
|
1594
1615
|
group: e,
|
|
1595
1616
|
panelConstraints: x
|
|
1596
|
-
}) :
|
|
1617
|
+
}) : m.layout, P = rn({
|
|
1597
1618
|
group: e,
|
|
1598
|
-
nextGroupSize:
|
|
1599
|
-
prevGroupSize:
|
|
1600
|
-
prevLayout:
|
|
1601
|
-
}),
|
|
1602
|
-
layout:
|
|
1619
|
+
nextGroupSize: h,
|
|
1620
|
+
prevGroupSize: m.groupSize,
|
|
1621
|
+
prevLayout: S
|
|
1622
|
+
}), C = ne({
|
|
1623
|
+
layout: P,
|
|
1603
1624
|
panelConstraints: x
|
|
1604
1625
|
});
|
|
1605
|
-
if (!
|
|
1606
|
-
|
|
1626
|
+
if (!m.defaultLayoutDeferred && K(m.layout, C) && on(
|
|
1627
|
+
m.derivedPanelConstraints,
|
|
1607
1628
|
x
|
|
1608
|
-
) &&
|
|
1629
|
+
) && m.groupSize === h)
|
|
1609
1630
|
continue;
|
|
1610
|
-
|
|
1631
|
+
X(e, {
|
|
1611
1632
|
defaultLayoutDeferred: !1,
|
|
1612
1633
|
derivedPanelConstraints: x,
|
|
1613
|
-
groupSize:
|
|
1614
|
-
layout:
|
|
1615
|
-
separatorToPanels:
|
|
1634
|
+
groupSize: h,
|
|
1635
|
+
layout: C,
|
|
1636
|
+
separatorToPanels: m.separatorToPanels
|
|
1616
1637
|
});
|
|
1617
1638
|
}
|
|
1618
1639
|
} else
|
|
1619
|
-
|
|
1640
|
+
nn(e, v, d);
|
|
1620
1641
|
}
|
|
1621
1642
|
});
|
|
1622
|
-
|
|
1643
|
+
i.observe(e.element), e.panels.forEach((p) => {
|
|
1623
1644
|
L(
|
|
1624
|
-
!o.has(
|
|
1625
|
-
`Panel ids must be unique; id "${
|
|
1626
|
-
), o.add(
|
|
1645
|
+
!o.has(p.id),
|
|
1646
|
+
`Panel ids must be unique; id "${p.id}" was used more than once`
|
|
1647
|
+
), o.add(p.id), p.onResize && i.observe(p.element);
|
|
1627
1648
|
});
|
|
1628
|
-
const
|
|
1649
|
+
const s = ae({ group: e }), u = Le(e), c = Qe({
|
|
1629
1650
|
group: e,
|
|
1630
1651
|
panelConstraints: u
|
|
1631
1652
|
}), a = ne({
|
|
@@ -1637,51 +1658,51 @@ function rn(e) {
|
|
|
1637
1658
|
(re.get(l) ?? 0) + 1
|
|
1638
1659
|
);
|
|
1639
1660
|
const f = /* @__PURE__ */ new Map();
|
|
1640
|
-
return
|
|
1641
|
-
|
|
1642
|
-
}),
|
|
1643
|
-
defaultLayoutDeferred:
|
|
1661
|
+
return Ee({ group: e, includeDisabled: !0 }).forEach((p) => {
|
|
1662
|
+
p.separator && f.set(p.separator, p.panels);
|
|
1663
|
+
}), X(e, {
|
|
1664
|
+
defaultLayoutDeferred: s === 0,
|
|
1644
1665
|
derivedPanelConstraints: u,
|
|
1645
|
-
groupSize:
|
|
1666
|
+
groupSize: s,
|
|
1646
1667
|
layout: a,
|
|
1647
1668
|
separatorToPanels: f
|
|
1648
|
-
}), e.separators.forEach((
|
|
1669
|
+
}), e.separators.forEach((p) => {
|
|
1649
1670
|
L(
|
|
1650
|
-
!r.has(
|
|
1651
|
-
`Separator ids must be unique; id "${
|
|
1652
|
-
), r.add(
|
|
1653
|
-
}), re.get(l) === 1 && (l.addEventListener("contextmenu",
|
|
1671
|
+
!r.has(p.id),
|
|
1672
|
+
`Separator ids must be unique; id "${p.id}" was used more than once`
|
|
1673
|
+
), r.add(p.id), p.element.addEventListener("keydown", Ke);
|
|
1674
|
+
}), re.get(l) === 1 && (l.addEventListener("contextmenu", Ve, !0), l.addEventListener("dblclick", We, !0), l.addEventListener("pointerdown", Xe, !0), l.addEventListener("pointerleave", qe), l.addEventListener("pointermove", Ye), l.addEventListener("pointerout", Je), l.addEventListener("pointerup", Ze, !0)), function() {
|
|
1654
1675
|
t = !1, re.set(
|
|
1655
1676
|
l,
|
|
1656
1677
|
Math.max(0, (re.get(l) ?? 0) - 1)
|
|
1657
|
-
), Vt(e),
|
|
1658
|
-
|
|
1678
|
+
), Vt(e), Nt(e) && fe(l), e.separators.forEach((g) => {
|
|
1679
|
+
g.element.removeEventListener("keydown", Ke);
|
|
1659
1680
|
}), re.get(l) || (l.removeEventListener(
|
|
1660
1681
|
"contextmenu",
|
|
1661
|
-
|
|
1682
|
+
Ve,
|
|
1662
1683
|
!0
|
|
1663
1684
|
), l.removeEventListener(
|
|
1664
1685
|
"dblclick",
|
|
1665
|
-
|
|
1686
|
+
We,
|
|
1666
1687
|
!0
|
|
1667
1688
|
), l.removeEventListener(
|
|
1668
1689
|
"pointerdown",
|
|
1669
|
-
|
|
1690
|
+
Xe,
|
|
1670
1691
|
!0
|
|
1671
|
-
), l.removeEventListener("pointerleave", qe), l.removeEventListener("pointermove",
|
|
1692
|
+
), l.removeEventListener("pointerleave", qe), l.removeEventListener("pointermove", Ye), l.removeEventListener("pointerout", Je), l.removeEventListener("pointerup", Ze, !0)), i.disconnect();
|
|
1672
1693
|
};
|
|
1673
1694
|
}
|
|
1674
|
-
function
|
|
1695
|
+
function an() {
|
|
1675
1696
|
const [e, t] = Z({}), n = ce(() => t({}), []);
|
|
1676
1697
|
return [e, n];
|
|
1677
1698
|
}
|
|
1678
|
-
function
|
|
1699
|
+
function De(e) {
|
|
1679
1700
|
const t = Pt();
|
|
1680
1701
|
return `${e ?? t}`;
|
|
1681
1702
|
}
|
|
1682
|
-
const V = typeof window < "u" ?
|
|
1703
|
+
const V = typeof window < "u" ? et : Se;
|
|
1683
1704
|
function ue(e) {
|
|
1684
|
-
const t =
|
|
1705
|
+
const t = T(e);
|
|
1685
1706
|
return V(() => {
|
|
1686
1707
|
t.current = e;
|
|
1687
1708
|
}, [e]), ce(
|
|
@@ -1689,7 +1710,7 @@ function ue(e) {
|
|
|
1689
1710
|
[t]
|
|
1690
1711
|
);
|
|
1691
1712
|
}
|
|
1692
|
-
function
|
|
1713
|
+
function Te(...e) {
|
|
1693
1714
|
return ue((t) => {
|
|
1694
1715
|
e.forEach((n) => {
|
|
1695
1716
|
if (n)
|
|
@@ -1706,24 +1727,24 @@ function De(...e) {
|
|
|
1706
1727
|
});
|
|
1707
1728
|
});
|
|
1708
1729
|
}
|
|
1709
|
-
function
|
|
1710
|
-
const t =
|
|
1730
|
+
function Ne(e) {
|
|
1731
|
+
const t = T({ ...e });
|
|
1711
1732
|
return V(() => {
|
|
1712
1733
|
for (const n in e)
|
|
1713
1734
|
t.current[n] = e[n];
|
|
1714
1735
|
}, [e]), t.current;
|
|
1715
1736
|
}
|
|
1716
1737
|
const yt = Lt(null);
|
|
1717
|
-
function
|
|
1738
|
+
function ln({
|
|
1718
1739
|
separator: e
|
|
1719
1740
|
}) {
|
|
1720
|
-
const { element: t } = e, n =
|
|
1741
|
+
const { element: t } = e, n = T(null);
|
|
1721
1742
|
return V(() => {
|
|
1722
|
-
const o = t.cloneNode(!0), r = [t, ...t.querySelectorAll("*")],
|
|
1743
|
+
const o = t.cloneNode(!0), r = [t, ...t.querySelectorAll("*")], i = [o, ...o.querySelectorAll("*")], s = t.ownerDocument.defaultView;
|
|
1723
1744
|
return r.forEach((u, c) => {
|
|
1724
|
-
const a =
|
|
1725
|
-
if (a instanceof
|
|
1726
|
-
const l =
|
|
1745
|
+
const a = i[c];
|
|
1746
|
+
if (a instanceof s.HTMLElement || a instanceof s.SVGElement) {
|
|
1747
|
+
const l = s.getComputedStyle(u);
|
|
1727
1748
|
for (let f = 0; f < l.length; f++) {
|
|
1728
1749
|
const y = l.item(f);
|
|
1729
1750
|
a.style.setProperty(
|
|
@@ -1741,7 +1762,7 @@ function an({
|
|
|
1741
1762
|
transform: "none",
|
|
1742
1763
|
width: "100%"
|
|
1743
1764
|
}), n.current.appendChild(o), () => o.remove();
|
|
1744
|
-
}, [t]), /* @__PURE__ */
|
|
1765
|
+
}, [t]), /* @__PURE__ */ B(
|
|
1745
1766
|
"div",
|
|
1746
1767
|
{
|
|
1747
1768
|
ref: n,
|
|
@@ -1762,7 +1783,7 @@ function be() {
|
|
|
1762
1783
|
), e;
|
|
1763
1784
|
}
|
|
1764
1785
|
function vt(e) {
|
|
1765
|
-
const { registerOverlay: t } = be(), n =
|
|
1786
|
+
const { registerOverlay: t } = be(), n = T(e);
|
|
1766
1787
|
gt(n.current, e) || (n.current = e);
|
|
1767
1788
|
const o = n.current;
|
|
1768
1789
|
return V(
|
|
@@ -1771,7 +1792,7 @@ function vt(e) {
|
|
|
1771
1792
|
), null;
|
|
1772
1793
|
}
|
|
1773
1794
|
vt.displayName = "SeparatorOverlay";
|
|
1774
|
-
function
|
|
1795
|
+
function cn({
|
|
1775
1796
|
active: e,
|
|
1776
1797
|
orientation: t,
|
|
1777
1798
|
style: n,
|
|
@@ -1794,7 +1815,7 @@ function ln({
|
|
|
1794
1815
|
break;
|
|
1795
1816
|
}
|
|
1796
1817
|
}
|
|
1797
|
-
return /* @__PURE__ */
|
|
1818
|
+
return /* @__PURE__ */ B(
|
|
1798
1819
|
"div",
|
|
1799
1820
|
{
|
|
1800
1821
|
...o,
|
|
@@ -1808,20 +1829,20 @@ function ln({
|
|
|
1808
1829
|
}
|
|
1809
1830
|
);
|
|
1810
1831
|
}
|
|
1811
|
-
function
|
|
1832
|
+
function un({
|
|
1812
1833
|
overlay: e,
|
|
1813
1834
|
preview: t
|
|
1814
1835
|
}) {
|
|
1815
|
-
const { group: n, offset: o, rect: r, separator:
|
|
1816
|
-
let u =
|
|
1817
|
-
return Rt(u) && u.type === vt && (c = u.props, u = void 0), u == null && (c ? u = /* @__PURE__ */
|
|
1818
|
-
|
|
1836
|
+
const { group: n, offset: o, rect: r, separator: i } = t, s = n.orientation === "horizontal";
|
|
1837
|
+
let u = i?.preview, c = e;
|
|
1838
|
+
return Rt(u) && u.type === vt && (c = u.props, u = void 0), u == null && (c ? u = /* @__PURE__ */ B(
|
|
1839
|
+
cn,
|
|
1819
1840
|
{
|
|
1820
1841
|
...c,
|
|
1821
1842
|
active: t.active,
|
|
1822
1843
|
orientation: n.orientation
|
|
1823
1844
|
}
|
|
1824
|
-
) :
|
|
1845
|
+
) : i && (u = /* @__PURE__ */ B(ln, { separator: i }))), /* @__PURE__ */ B(
|
|
1825
1846
|
"div",
|
|
1826
1847
|
{
|
|
1827
1848
|
"aria-hidden": "true",
|
|
@@ -1833,32 +1854,32 @@ function cn({
|
|
|
1833
1854
|
pointerEvents: "none",
|
|
1834
1855
|
position: "absolute",
|
|
1835
1856
|
top: r.top,
|
|
1836
|
-
transform:
|
|
1857
|
+
transform: s ? `translateX(${o}px)` : `translateY(${o}px)`,
|
|
1837
1858
|
width: r.width
|
|
1838
1859
|
},
|
|
1839
1860
|
children: u
|
|
1840
1861
|
}
|
|
1841
1862
|
);
|
|
1842
1863
|
}
|
|
1843
|
-
function
|
|
1844
|
-
const n =
|
|
1864
|
+
function fn(e, t) {
|
|
1865
|
+
const n = T({
|
|
1845
1866
|
getLayout: () => ({}),
|
|
1846
|
-
setLayout:
|
|
1867
|
+
setLayout: Gt
|
|
1847
1868
|
});
|
|
1848
|
-
|
|
1869
|
+
tt(t, () => n.current, []), V(() => {
|
|
1849
1870
|
Object.assign(
|
|
1850
1871
|
n.current,
|
|
1851
1872
|
mt({ groupId: e })
|
|
1852
1873
|
);
|
|
1853
1874
|
});
|
|
1854
1875
|
}
|
|
1855
|
-
function
|
|
1876
|
+
function dn({
|
|
1856
1877
|
groupId: e,
|
|
1857
1878
|
resizePreviewMode: t
|
|
1858
1879
|
}) {
|
|
1859
|
-
const [n, o] = Z([]), r =
|
|
1880
|
+
const [n, o] = Z([]), r = T(n);
|
|
1860
1881
|
return V(() => {
|
|
1861
|
-
const
|
|
1882
|
+
const i = (u) => {
|
|
1862
1883
|
const c = ft(e), a = t === "separator" && u.state === "active" ? u.previews.filter(
|
|
1863
1884
|
(f) => f.group === c && (f.active || !D(f.offset, 0))
|
|
1864
1885
|
) : [], l = r.current;
|
|
@@ -1867,23 +1888,23 @@ function fn({
|
|
|
1867
1888
|
) || (r.current = a, o(a));
|
|
1868
1889
|
};
|
|
1869
1890
|
if (t !== "separator") {
|
|
1870
|
-
|
|
1891
|
+
i(q());
|
|
1871
1892
|
return;
|
|
1872
1893
|
}
|
|
1873
|
-
const
|
|
1874
|
-
({ next: u }) =>
|
|
1894
|
+
const s = rt(
|
|
1895
|
+
({ next: u }) => i(u)
|
|
1875
1896
|
);
|
|
1876
|
-
return
|
|
1897
|
+
return i(q()), s;
|
|
1877
1898
|
}, [e, t]), n;
|
|
1878
1899
|
}
|
|
1879
|
-
function
|
|
1900
|
+
function pn({
|
|
1880
1901
|
children: e,
|
|
1881
1902
|
className: t,
|
|
1882
1903
|
defaultLayout: n,
|
|
1883
1904
|
disableCursor: o,
|
|
1884
1905
|
disabled: r,
|
|
1885
|
-
elementRef:
|
|
1886
|
-
groupRef:
|
|
1906
|
+
elementRef: i,
|
|
1907
|
+
groupRef: s,
|
|
1887
1908
|
id: u,
|
|
1888
1909
|
onLayoutChange: c,
|
|
1889
1910
|
onLayoutChanged: a,
|
|
@@ -1893,140 +1914,140 @@ function dn({
|
|
|
1893
1914
|
coarse: 20,
|
|
1894
1915
|
fine: 10
|
|
1895
1916
|
},
|
|
1896
|
-
style:
|
|
1897
|
-
...
|
|
1917
|
+
style: p,
|
|
1918
|
+
...g
|
|
1898
1919
|
}) {
|
|
1899
|
-
const
|
|
1920
|
+
const d = T({
|
|
1900
1921
|
onLayoutChange: {},
|
|
1901
1922
|
onLayoutChanged: {}
|
|
1902
|
-
}), v = ue((
|
|
1903
|
-
K(
|
|
1904
|
-
}),
|
|
1905
|
-
(
|
|
1906
|
-
K(
|
|
1923
|
+
}), v = ue((b) => {
|
|
1924
|
+
K(d.current.onLayoutChange, b) || (d.current.onLayoutChange = b, c?.(b));
|
|
1925
|
+
}), h = ue(
|
|
1926
|
+
(b, z) => {
|
|
1927
|
+
K(d.current.onLayoutChanged, b) || (d.current.onLayoutChanged = b, a?.(b, { isUserInteraction: z }));
|
|
1907
1928
|
}
|
|
1908
|
-
),
|
|
1909
|
-
groupId:
|
|
1929
|
+
), m = De(u), [x, S] = Z(), P = dn({
|
|
1930
|
+
groupId: m,
|
|
1910
1931
|
resizePreviewMode: f
|
|
1911
|
-
}),
|
|
1932
|
+
}), C = T(null), [E, w] = an(), R = T({
|
|
1912
1933
|
lastExpandedPanelSizes: {},
|
|
1913
1934
|
layouts: {},
|
|
1914
1935
|
panels: [],
|
|
1915
1936
|
separators: []
|
|
1916
|
-
}),
|
|
1917
|
-
|
|
1918
|
-
const
|
|
1919
|
-
(
|
|
1920
|
-
const
|
|
1921
|
-
if (
|
|
1937
|
+
}), N = Te(C, i);
|
|
1938
|
+
fn(m, s);
|
|
1939
|
+
const O = ue(
|
|
1940
|
+
(b, z) => {
|
|
1941
|
+
const M = Q(b);
|
|
1942
|
+
if (M)
|
|
1922
1943
|
return {
|
|
1923
|
-
flexGrow:
|
|
1944
|
+
flexGrow: M.layout[z] ?? 1
|
|
1924
1945
|
};
|
|
1925
|
-
if (n?.[
|
|
1946
|
+
if (n?.[z])
|
|
1926
1947
|
return {
|
|
1927
|
-
flexGrow: n?.[
|
|
1948
|
+
flexGrow: n?.[z]
|
|
1928
1949
|
};
|
|
1929
1950
|
}
|
|
1930
|
-
),
|
|
1951
|
+
), I = Ne({
|
|
1931
1952
|
defaultLayout: n,
|
|
1932
1953
|
disableCursor: o,
|
|
1933
1954
|
resizeTargetMinimumSize: y
|
|
1934
|
-
}),
|
|
1955
|
+
}), G = Pe(
|
|
1935
1956
|
() => ({
|
|
1936
1957
|
get disableCursor() {
|
|
1937
|
-
return !!
|
|
1958
|
+
return !!I.disableCursor;
|
|
1938
1959
|
},
|
|
1939
|
-
getPanelStyles:
|
|
1940
|
-
id:
|
|
1960
|
+
getPanelStyles: O,
|
|
1961
|
+
id: m,
|
|
1941
1962
|
orientation: l,
|
|
1942
|
-
registerPanel: (
|
|
1943
|
-
const
|
|
1944
|
-
return
|
|
1945
|
-
...
|
|
1946
|
-
|
|
1963
|
+
registerPanel: (b) => {
|
|
1964
|
+
const z = R.current;
|
|
1965
|
+
return z.panels = Ce(l, [
|
|
1966
|
+
...z.panels,
|
|
1967
|
+
b
|
|
1947
1968
|
]), w(), () => {
|
|
1948
|
-
|
|
1949
|
-
(
|
|
1969
|
+
z.panels = z.panels.filter(
|
|
1970
|
+
(M) => M !== b
|
|
1950
1971
|
), w();
|
|
1951
1972
|
};
|
|
1952
1973
|
},
|
|
1953
|
-
registerOverlay: (
|
|
1954
|
-
|
|
1974
|
+
registerOverlay: (b) => (S(b), () => {
|
|
1975
|
+
S(void 0);
|
|
1955
1976
|
}),
|
|
1956
|
-
registerSeparator: (
|
|
1957
|
-
const
|
|
1958
|
-
return
|
|
1959
|
-
...
|
|
1960
|
-
|
|
1977
|
+
registerSeparator: (b) => {
|
|
1978
|
+
const z = R.current;
|
|
1979
|
+
return z.separators = Ce(l, [
|
|
1980
|
+
...z.separators,
|
|
1981
|
+
b
|
|
1961
1982
|
]), w(), () => {
|
|
1962
|
-
|
|
1963
|
-
(
|
|
1983
|
+
z.separators = z.separators.filter(
|
|
1984
|
+
(M) => M !== b
|
|
1964
1985
|
), w();
|
|
1965
1986
|
};
|
|
1966
1987
|
},
|
|
1967
|
-
updatePanelProps: (
|
|
1968
|
-
const
|
|
1969
|
-
(oe) => oe.id ===
|
|
1988
|
+
updatePanelProps: (b, { disabled: z }) => {
|
|
1989
|
+
const A = R.current.panels.find(
|
|
1990
|
+
(oe) => oe.id === b
|
|
1970
1991
|
);
|
|
1971
|
-
|
|
1972
|
-
const $ = ft(
|
|
1973
|
-
$ && Y &&
|
|
1992
|
+
A && (A.panelConstraints.disabled = z);
|
|
1993
|
+
const $ = ft(m), Y = Q(m);
|
|
1994
|
+
$ && Y && X($, {
|
|
1974
1995
|
...Y,
|
|
1975
1996
|
derivedPanelConstraints: Le($)
|
|
1976
1997
|
});
|
|
1977
1998
|
},
|
|
1978
|
-
updateSeparatorProps: (
|
|
1979
|
-
disabled:
|
|
1980
|
-
disableDoubleClick:
|
|
1999
|
+
updateSeparatorProps: (b, {
|
|
2000
|
+
disabled: z,
|
|
2001
|
+
disableDoubleClick: M
|
|
1981
2002
|
}) => {
|
|
1982
|
-
const $ =
|
|
1983
|
-
(Y) => Y.id ===
|
|
2003
|
+
const $ = R.current.separators.find(
|
|
2004
|
+
(Y) => Y.id === b
|
|
1984
2005
|
);
|
|
1985
|
-
$ && ($.disabled =
|
|
2006
|
+
$ && ($.disabled = z, $.disableDoubleClick = M);
|
|
1986
2007
|
}
|
|
1987
2008
|
}),
|
|
1988
|
-
[
|
|
1989
|
-
), _ =
|
|
2009
|
+
[O, m, w, l, I]
|
|
2010
|
+
), _ = T(null);
|
|
1990
2011
|
return V(() => {
|
|
1991
|
-
const
|
|
1992
|
-
if (
|
|
2012
|
+
const b = C.current;
|
|
2013
|
+
if (b === null)
|
|
1993
2014
|
return;
|
|
1994
|
-
const
|
|
1995
|
-
let
|
|
1996
|
-
if (
|
|
1997
|
-
|
|
1998
|
-
for (const J of
|
|
1999
|
-
const pe =
|
|
2000
|
-
pe !== void 0 && (
|
|
2015
|
+
const z = R.current;
|
|
2016
|
+
let M;
|
|
2017
|
+
if (I.defaultLayout !== void 0 && Object.keys(I.defaultLayout).length === z.panels.length) {
|
|
2018
|
+
M = {};
|
|
2019
|
+
for (const J of z.panels) {
|
|
2020
|
+
const pe = I.defaultLayout[J.id];
|
|
2021
|
+
pe !== void 0 && (M[J.id] = pe);
|
|
2001
2022
|
}
|
|
2002
2023
|
}
|
|
2003
|
-
const
|
|
2024
|
+
const A = {
|
|
2004
2025
|
disabled: !!r,
|
|
2005
|
-
element:
|
|
2006
|
-
id:
|
|
2026
|
+
element: b,
|
|
2027
|
+
id: m,
|
|
2007
2028
|
mutableState: {
|
|
2008
|
-
defaultLayout:
|
|
2009
|
-
disableCursor: !!
|
|
2010
|
-
expandedPanelSizes:
|
|
2011
|
-
layouts:
|
|
2029
|
+
defaultLayout: M,
|
|
2030
|
+
disableCursor: !!I.disableCursor,
|
|
2031
|
+
expandedPanelSizes: R.current.lastExpandedPanelSizes,
|
|
2032
|
+
layouts: R.current.layouts
|
|
2012
2033
|
},
|
|
2013
2034
|
orientation: l,
|
|
2014
|
-
panels:
|
|
2035
|
+
panels: z.panels,
|
|
2015
2036
|
resizePreviewMode: f,
|
|
2016
2037
|
get resizeTargetMinimumSize() {
|
|
2017
|
-
return
|
|
2038
|
+
return I.resizeTargetMinimumSize;
|
|
2018
2039
|
},
|
|
2019
|
-
separators:
|
|
2040
|
+
separators: z.separators
|
|
2020
2041
|
};
|
|
2021
|
-
_.current =
|
|
2022
|
-
const $ =
|
|
2023
|
-
!Y && oe.length > 0 && (v(le),
|
|
2024
|
-
const xe =
|
|
2042
|
+
_.current = A;
|
|
2043
|
+
const $ = sn(A), { defaultLayoutDeferred: Y, derivedPanelConstraints: oe, layout: le } = Q(A.id, !0);
|
|
2044
|
+
!Y && oe.length > 0 && (v(le), h(le, !1));
|
|
2045
|
+
const xe = Ie(m, (J) => {
|
|
2025
2046
|
const { defaultLayoutDeferred: pe, derivedPanelConstraints: Ge, layout: he } = J.next;
|
|
2026
2047
|
if (pe || Ge.length === 0)
|
|
2027
2048
|
return;
|
|
2028
|
-
const St =
|
|
2029
|
-
|
|
2049
|
+
const St = A.panels.map(({ id: H }) => H).join(",");
|
|
2050
|
+
A.mutableState.layouts[St] = he, Ge.forEach((H) => {
|
|
2030
2051
|
if (H.collapsible) {
|
|
2031
2052
|
const { layout: ze } = J.prev ?? {};
|
|
2032
2053
|
if (ze) {
|
|
@@ -2037,43 +2058,43 @@ function dn({
|
|
|
2037
2058
|
H.collapsedSize,
|
|
2038
2059
|
ze[H.panelId]
|
|
2039
2060
|
);
|
|
2040
|
-
xt && !zt && (
|
|
2061
|
+
xt && !zt && (A.mutableState.expandedPanelSizes[H.panelId] = ze[H.panelId]);
|
|
2041
2062
|
}
|
|
2042
2063
|
}
|
|
2043
2064
|
});
|
|
2044
|
-
const Ae =
|
|
2045
|
-
v(he), bt &&
|
|
2065
|
+
const Ae = q(), bt = Ae.state !== "active" || !Ae.hitRegions.some((H) => H.group === A);
|
|
2066
|
+
v(he), bt && h(he, J.isUserInteraction);
|
|
2046
2067
|
});
|
|
2047
2068
|
return () => {
|
|
2048
2069
|
_.current = null, $(), xe();
|
|
2049
2070
|
};
|
|
2050
2071
|
}, [
|
|
2051
2072
|
r,
|
|
2052
|
-
g,
|
|
2053
2073
|
m,
|
|
2074
|
+
h,
|
|
2054
2075
|
v,
|
|
2055
2076
|
l,
|
|
2056
|
-
|
|
2077
|
+
E,
|
|
2057
2078
|
f,
|
|
2058
|
-
|
|
2079
|
+
I
|
|
2059
2080
|
]), Se(() => {
|
|
2060
|
-
const
|
|
2061
|
-
|
|
2062
|
-
}), /* @__PURE__ */
|
|
2081
|
+
const b = _.current;
|
|
2082
|
+
b && (b.mutableState.defaultLayout = n, b.mutableState.disableCursor = !!o);
|
|
2083
|
+
}), /* @__PURE__ */ B(yt.Provider, { value: G, children: /* @__PURE__ */ wt(
|
|
2063
2084
|
"div",
|
|
2064
2085
|
{
|
|
2065
|
-
...
|
|
2086
|
+
...g,
|
|
2066
2087
|
className: t,
|
|
2067
2088
|
"data-group": !0,
|
|
2068
|
-
"data-testid":
|
|
2069
|
-
id:
|
|
2070
|
-
ref:
|
|
2089
|
+
"data-testid": m,
|
|
2090
|
+
id: m,
|
|
2091
|
+
ref: N,
|
|
2071
2092
|
style: {
|
|
2072
2093
|
height: "100%",
|
|
2073
2094
|
width: "100%",
|
|
2074
2095
|
overflow: "hidden",
|
|
2075
2096
|
position: f === "separator" ? "relative" : void 0,
|
|
2076
|
-
...
|
|
2097
|
+
...p,
|
|
2077
2098
|
display: "flex",
|
|
2078
2099
|
flexDirection: l === "horizontal" ? "row" : "column",
|
|
2079
2100
|
flexWrap: "nowrap",
|
|
@@ -2085,23 +2106,23 @@ function dn({
|
|
|
2085
2106
|
},
|
|
2086
2107
|
children: [
|
|
2087
2108
|
e,
|
|
2088
|
-
|
|
2089
|
-
|
|
2109
|
+
P.map((b) => /* @__PURE__ */ B(
|
|
2110
|
+
un,
|
|
2090
2111
|
{
|
|
2091
2112
|
overlay: x,
|
|
2092
|
-
preview:
|
|
2113
|
+
preview: b
|
|
2093
2114
|
},
|
|
2094
|
-
|
|
2115
|
+
b.key
|
|
2095
2116
|
))
|
|
2096
2117
|
]
|
|
2097
2118
|
}
|
|
2098
2119
|
) });
|
|
2099
2120
|
}
|
|
2100
|
-
|
|
2121
|
+
pn.displayName = "Group";
|
|
2101
2122
|
function ve(e, t) {
|
|
2102
2123
|
return `react-resizable-panels:${[e, ...t].join(":")}`;
|
|
2103
2124
|
}
|
|
2104
|
-
function
|
|
2125
|
+
function hn({
|
|
2105
2126
|
id: e,
|
|
2106
2127
|
panelIds: t,
|
|
2107
2128
|
storage: n
|
|
@@ -2109,9 +2130,9 @@ function pn({
|
|
|
2109
2130
|
const o = ve(e, []), r = n.getItem(o);
|
|
2110
2131
|
if (r)
|
|
2111
2132
|
try {
|
|
2112
|
-
const
|
|
2133
|
+
const i = JSON.parse(r);
|
|
2113
2134
|
if (t) {
|
|
2114
|
-
const
|
|
2135
|
+
const s = t.join(","), u = i[s];
|
|
2115
2136
|
if (u && Array.isArray(u.layout) && t.length === u.layout.length) {
|
|
2116
2137
|
const c = {};
|
|
2117
2138
|
for (let a = 0; a < t.length; a++)
|
|
@@ -2119,11 +2140,11 @@ function pn({
|
|
|
2119
2140
|
return c;
|
|
2120
2141
|
}
|
|
2121
2142
|
} else {
|
|
2122
|
-
const
|
|
2123
|
-
if (
|
|
2124
|
-
const u = s[
|
|
2143
|
+
const s = Object.keys(i);
|
|
2144
|
+
if (s.length === 1) {
|
|
2145
|
+
const u = i[s[0]];
|
|
2125
2146
|
if (u && Array.isArray(u.layout)) {
|
|
2126
|
-
const c =
|
|
2147
|
+
const c = s[0].split(",");
|
|
2127
2148
|
if (c.length === u.layout.length) {
|
|
2128
2149
|
const a = {};
|
|
2129
2150
|
for (let l = 0; l < c.length; l++)
|
|
@@ -2136,69 +2157,69 @@ function pn({
|
|
|
2136
2157
|
} catch {
|
|
2137
2158
|
}
|
|
2138
2159
|
}
|
|
2139
|
-
function
|
|
2160
|
+
function wn({
|
|
2140
2161
|
debounceSaveMs: e = 100,
|
|
2141
2162
|
onlySaveAfterUserInteractions: t,
|
|
2142
2163
|
panelIds: n,
|
|
2143
2164
|
storage: o = localStorage,
|
|
2144
2165
|
...r
|
|
2145
2166
|
}) {
|
|
2146
|
-
const
|
|
2147
|
-
|
|
2167
|
+
const i = n !== void 0, s = "id" in r ? r.id : r.groupId, u = ve(s, n ?? []), c = nt(
|
|
2168
|
+
mn,
|
|
2148
2169
|
() => o.getItem(u),
|
|
2149
2170
|
() => o.getItem(u)
|
|
2150
2171
|
), a = Pe(() => {
|
|
2151
2172
|
if (c) {
|
|
2152
|
-
const v = JSON.parse(c),
|
|
2153
|
-
if (Array.from(
|
|
2173
|
+
const v = JSON.parse(c), h = Object.values(v);
|
|
2174
|
+
if (Array.from(h).every((m) => typeof m == "number"))
|
|
2154
2175
|
return v;
|
|
2155
2176
|
}
|
|
2156
2177
|
}, [c]), l = Pe(() => {
|
|
2157
2178
|
if (!a)
|
|
2158
|
-
return
|
|
2159
|
-
id:
|
|
2179
|
+
return hn({
|
|
2180
|
+
id: s,
|
|
2160
2181
|
panelIds: n,
|
|
2161
2182
|
storage: o
|
|
2162
2183
|
});
|
|
2163
|
-
}, [a,
|
|
2184
|
+
}, [a, s, n, o]), f = a ?? l, y = T(null), p = ce(() => {
|
|
2164
2185
|
const v = y.current;
|
|
2165
2186
|
v && (y.current = null, clearTimeout(v));
|
|
2166
2187
|
}, []);
|
|
2167
|
-
|
|
2168
|
-
|
|
2169
|
-
}, [
|
|
2170
|
-
const
|
|
2188
|
+
et(() => () => {
|
|
2189
|
+
p();
|
|
2190
|
+
}, [p]);
|
|
2191
|
+
const g = ce(
|
|
2171
2192
|
// The hook persists every layout commit -- including library-driven ones --
|
|
2172
2193
|
// because it owns its own storage and the goal is to remember whatever
|
|
2173
2194
|
// layout the user is currently looking at. Consumers that only want to
|
|
2174
2195
|
// persist on user interaction should branch on `isUserInteraction` in
|
|
2175
2196
|
// their own callback (see #716) rather than via this hook.
|
|
2176
|
-
(v,
|
|
2177
|
-
if (t && !
|
|
2197
|
+
(v, h) => {
|
|
2198
|
+
if (t && !h.isUserInteraction)
|
|
2178
2199
|
return;
|
|
2179
|
-
|
|
2180
|
-
let
|
|
2181
|
-
|
|
2200
|
+
p();
|
|
2201
|
+
let m;
|
|
2202
|
+
i ? m = ve(s, Object.keys(v)) : m = ve(s, []);
|
|
2182
2203
|
try {
|
|
2183
|
-
o.setItem(
|
|
2204
|
+
o.setItem(m, JSON.stringify(v));
|
|
2184
2205
|
} catch (x) {
|
|
2185
2206
|
console.error(x);
|
|
2186
2207
|
}
|
|
2187
2208
|
},
|
|
2188
2209
|
[
|
|
2189
|
-
|
|
2190
|
-
s,
|
|
2210
|
+
p,
|
|
2191
2211
|
i,
|
|
2212
|
+
s,
|
|
2192
2213
|
t,
|
|
2193
2214
|
o
|
|
2194
2215
|
]
|
|
2195
|
-
),
|
|
2216
|
+
), d = ce(
|
|
2196
2217
|
(v) => {
|
|
2197
|
-
|
|
2198
|
-
|
|
2218
|
+
p(), e === 0 ? g(v, { isUserInteraction: !1 }) : y.current = setTimeout(() => {
|
|
2219
|
+
g(v, { isUserInteraction: !1 });
|
|
2199
2220
|
}, e);
|
|
2200
2221
|
},
|
|
2201
|
-
[
|
|
2222
|
+
[p, e, g]
|
|
2202
2223
|
);
|
|
2203
2224
|
return {
|
|
2204
2225
|
/**
|
|
@@ -2210,25 +2231,25 @@ function zn({
|
|
|
2210
2231
|
*
|
|
2211
2232
|
* @deprecated Use the {@link onLayoutChanged} prop instead.
|
|
2212
2233
|
*/
|
|
2213
|
-
onLayoutChange:
|
|
2234
|
+
onLayoutChange: d,
|
|
2214
2235
|
/**
|
|
2215
2236
|
* Attach this callback on the `Group` as the `onLayoutChanged` prop.
|
|
2216
2237
|
*/
|
|
2217
|
-
onLayoutChanged:
|
|
2238
|
+
onLayoutChanged: g
|
|
2218
2239
|
};
|
|
2219
2240
|
}
|
|
2220
|
-
function
|
|
2241
|
+
function mn() {
|
|
2221
2242
|
return function() {
|
|
2222
2243
|
};
|
|
2223
2244
|
}
|
|
2224
|
-
function
|
|
2245
|
+
function Pn() {
|
|
2225
2246
|
return Z(null);
|
|
2226
2247
|
}
|
|
2227
|
-
function
|
|
2228
|
-
return
|
|
2248
|
+
function Ln() {
|
|
2249
|
+
return T(null);
|
|
2229
2250
|
}
|
|
2230
|
-
function
|
|
2231
|
-
const { id: n } = be(), o =
|
|
2251
|
+
function gn(e, t) {
|
|
2252
|
+
const { id: n } = be(), o = T({
|
|
2232
2253
|
collapse: we,
|
|
2233
2254
|
expand: we,
|
|
2234
2255
|
getSize: () => ({
|
|
@@ -2238,118 +2259,118 @@ function mn(e, t) {
|
|
|
2238
2259
|
isCollapsed: () => !1,
|
|
2239
2260
|
resize: we
|
|
2240
2261
|
});
|
|
2241
|
-
|
|
2262
|
+
tt(t, () => o.current, []), V(() => {
|
|
2242
2263
|
Object.assign(
|
|
2243
2264
|
o.current,
|
|
2244
2265
|
ht({ groupId: n, panelId: e })
|
|
2245
2266
|
);
|
|
2246
2267
|
});
|
|
2247
2268
|
}
|
|
2248
|
-
function
|
|
2269
|
+
function yn({
|
|
2249
2270
|
children: e,
|
|
2250
2271
|
className: t,
|
|
2251
2272
|
collapsedSize: n = "0%",
|
|
2252
2273
|
collapsedThreshold: o,
|
|
2253
2274
|
collapsible: r = !1,
|
|
2254
|
-
defaultSize:
|
|
2255
|
-
disabled:
|
|
2275
|
+
defaultSize: i,
|
|
2276
|
+
disabled: s,
|
|
2256
2277
|
elementRef: u,
|
|
2257
2278
|
groupResizeBehavior: c = "preserve-relative-size",
|
|
2258
2279
|
id: a,
|
|
2259
2280
|
maxSize: l = "100%",
|
|
2260
2281
|
minSize: f = "0%",
|
|
2261
2282
|
onResize: y,
|
|
2262
|
-
panelRef:
|
|
2263
|
-
style:
|
|
2264
|
-
...
|
|
2283
|
+
panelRef: p,
|
|
2284
|
+
style: g,
|
|
2285
|
+
...d
|
|
2265
2286
|
}) {
|
|
2266
|
-
const v = !!a,
|
|
2267
|
-
disabled:
|
|
2268
|
-
}), x =
|
|
2269
|
-
getPanelStyles:
|
|
2270
|
-
id:
|
|
2271
|
-
orientation:
|
|
2287
|
+
const v = !!a, h = De(a), m = Ne({
|
|
2288
|
+
disabled: s
|
|
2289
|
+
}), x = T(null), S = Te(x, u), {
|
|
2290
|
+
getPanelStyles: P,
|
|
2291
|
+
id: C,
|
|
2292
|
+
orientation: E,
|
|
2272
2293
|
registerPanel: w,
|
|
2273
|
-
updatePanelProps:
|
|
2274
|
-
} = be(),
|
|
2275
|
-
(
|
|
2276
|
-
y?.(
|
|
2294
|
+
updatePanelProps: R
|
|
2295
|
+
} = be(), N = y !== null, O = ue(
|
|
2296
|
+
(b, z, M) => {
|
|
2297
|
+
y?.(b, a, M);
|
|
2277
2298
|
}
|
|
2278
2299
|
);
|
|
2279
2300
|
V(() => {
|
|
2280
|
-
const
|
|
2281
|
-
if (
|
|
2282
|
-
const
|
|
2283
|
-
element:
|
|
2284
|
-
id:
|
|
2301
|
+
const b = x.current;
|
|
2302
|
+
if (b !== null) {
|
|
2303
|
+
const z = {
|
|
2304
|
+
element: b,
|
|
2305
|
+
id: h,
|
|
2285
2306
|
idIsStable: v,
|
|
2286
2307
|
mutableValues: {
|
|
2287
2308
|
expandToSize: void 0,
|
|
2288
2309
|
prevSize: void 0
|
|
2289
2310
|
},
|
|
2290
|
-
onResize:
|
|
2311
|
+
onResize: N ? O : void 0,
|
|
2291
2312
|
panelConstraints: {
|
|
2292
2313
|
groupResizeBehavior: c,
|
|
2293
2314
|
collapsedSize: n,
|
|
2294
2315
|
collapsedThreshold: o,
|
|
2295
2316
|
collapsible: r,
|
|
2296
|
-
defaultSize:
|
|
2297
|
-
disabled:
|
|
2317
|
+
defaultSize: i,
|
|
2318
|
+
disabled: m.disabled,
|
|
2298
2319
|
maxSize: l,
|
|
2299
2320
|
minSize: f
|
|
2300
2321
|
}
|
|
2301
2322
|
};
|
|
2302
|
-
return w(
|
|
2323
|
+
return w(z);
|
|
2303
2324
|
}
|
|
2304
2325
|
}, [
|
|
2305
2326
|
c,
|
|
2306
2327
|
n,
|
|
2307
2328
|
o,
|
|
2308
2329
|
r,
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2330
|
+
i,
|
|
2331
|
+
N,
|
|
2332
|
+
h,
|
|
2312
2333
|
v,
|
|
2313
2334
|
l,
|
|
2314
2335
|
f,
|
|
2315
|
-
|
|
2336
|
+
O,
|
|
2316
2337
|
w,
|
|
2317
|
-
|
|
2338
|
+
m
|
|
2318
2339
|
]), Se(() => {
|
|
2319
|
-
|
|
2320
|
-
}, [
|
|
2321
|
-
const
|
|
2322
|
-
const
|
|
2323
|
-
if (
|
|
2324
|
-
return JSON.stringify(
|
|
2325
|
-
},
|
|
2326
|
-
(
|
|
2327
|
-
|
|
2328
|
-
|
|
2340
|
+
R(h, { disabled: s });
|
|
2341
|
+
}, [s, h, R]), gn(h, p);
|
|
2342
|
+
const I = () => {
|
|
2343
|
+
const b = P(C, h);
|
|
2344
|
+
if (b)
|
|
2345
|
+
return JSON.stringify(b);
|
|
2346
|
+
}, G = nt(
|
|
2347
|
+
(b) => Ie(C, b),
|
|
2348
|
+
I,
|
|
2349
|
+
I
|
|
2329
2350
|
);
|
|
2330
2351
|
let _;
|
|
2331
|
-
return
|
|
2352
|
+
return G ? _ = JSON.parse(G) : i !== void 0 ? _ = {
|
|
2332
2353
|
flexGrow: void 0,
|
|
2333
2354
|
flexShrink: void 0,
|
|
2334
|
-
flexBasis:
|
|
2335
|
-
} : _ = { flexGrow: 1 }, /* @__PURE__ */
|
|
2355
|
+
flexBasis: i
|
|
2356
|
+
} : _ = { flexGrow: 1 }, /* @__PURE__ */ B(
|
|
2336
2357
|
"div",
|
|
2337
2358
|
{
|
|
2338
|
-
...
|
|
2339
|
-
"data-disabled":
|
|
2359
|
+
...d,
|
|
2360
|
+
"data-disabled": s || void 0,
|
|
2340
2361
|
"data-panel": !0,
|
|
2341
|
-
"data-testid":
|
|
2342
|
-
id:
|
|
2343
|
-
ref:
|
|
2362
|
+
"data-testid": h,
|
|
2363
|
+
id: h,
|
|
2364
|
+
ref: S,
|
|
2344
2365
|
style: {
|
|
2345
|
-
...
|
|
2366
|
+
...vn,
|
|
2346
2367
|
display: "flex",
|
|
2347
2368
|
flexBasis: 0,
|
|
2348
2369
|
flexShrink: 1,
|
|
2349
2370
|
overflow: "visible",
|
|
2350
2371
|
..._
|
|
2351
2372
|
},
|
|
2352
|
-
children: /* @__PURE__ */
|
|
2373
|
+
children: /* @__PURE__ */ B(
|
|
2353
2374
|
"div",
|
|
2354
2375
|
{
|
|
2355
2376
|
className: t,
|
|
@@ -2358,12 +2379,12 @@ function gn({
|
|
|
2358
2379
|
maxWidth: "100%",
|
|
2359
2380
|
flexGrow: 1,
|
|
2360
2381
|
overflow: "auto",
|
|
2361
|
-
...
|
|
2382
|
+
...g,
|
|
2362
2383
|
// Inform the browser that the library is handling touch events for this element
|
|
2363
2384
|
// but still allow users to scroll content within panels in the non-resizing direction
|
|
2364
2385
|
// NOTE This is not an inherited style
|
|
2365
2386
|
// See github.com/bvaughn/react-resizable-panels/issues/662
|
|
2366
|
-
touchAction:
|
|
2387
|
+
touchAction: E === "horizontal" ? "pan-y" : "pan-x"
|
|
2367
2388
|
},
|
|
2368
2389
|
children: e
|
|
2369
2390
|
}
|
|
@@ -2371,8 +2392,8 @@ function gn({
|
|
|
2371
2392
|
}
|
|
2372
2393
|
);
|
|
2373
2394
|
}
|
|
2374
|
-
|
|
2375
|
-
const
|
|
2395
|
+
yn.displayName = "Panel";
|
|
2396
|
+
const vn = {
|
|
2376
2397
|
minHeight: 0,
|
|
2377
2398
|
maxHeight: "100%",
|
|
2378
2399
|
height: "auto",
|
|
@@ -2384,27 +2405,27 @@ const yn = {
|
|
|
2384
2405
|
padding: 0,
|
|
2385
2406
|
margin: 0
|
|
2386
2407
|
};
|
|
2387
|
-
function
|
|
2408
|
+
function Cn() {
|
|
2388
2409
|
return Z(null);
|
|
2389
2410
|
}
|
|
2390
|
-
function
|
|
2391
|
-
return
|
|
2411
|
+
function Rn() {
|
|
2412
|
+
return T(null);
|
|
2392
2413
|
}
|
|
2393
|
-
function
|
|
2414
|
+
function Sn({
|
|
2394
2415
|
layout: e,
|
|
2395
2416
|
panelConstraints: t,
|
|
2396
2417
|
panelId: n,
|
|
2397
2418
|
panelIndex: o
|
|
2398
2419
|
}) {
|
|
2399
|
-
let r,
|
|
2400
|
-
const
|
|
2420
|
+
let r, i;
|
|
2421
|
+
const s = e[n], u = t.find(
|
|
2401
2422
|
(c) => c.panelId === n
|
|
2402
2423
|
);
|
|
2403
2424
|
if (u) {
|
|
2404
2425
|
const c = u.maxSize, a = u.collapsible ? u.collapsedSize : u.minSize, l = [o, o + 1];
|
|
2405
|
-
|
|
2426
|
+
i = ne({
|
|
2406
2427
|
layout: de({
|
|
2407
|
-
delta: a -
|
|
2428
|
+
delta: a - s,
|
|
2408
2429
|
initialLayout: e,
|
|
2409
2430
|
panelConstraints: t,
|
|
2410
2431
|
pivotIndices: l,
|
|
@@ -2413,7 +2434,7 @@ function vn({
|
|
|
2413
2434
|
panelConstraints: t
|
|
2414
2435
|
})[n], r = ne({
|
|
2415
2436
|
layout: de({
|
|
2416
|
-
delta: c -
|
|
2437
|
+
delta: c - s,
|
|
2417
2438
|
initialLayout: e,
|
|
2418
2439
|
panelConstraints: t,
|
|
2419
2440
|
pivotIndices: l,
|
|
@@ -2425,42 +2446,42 @@ function vn({
|
|
|
2425
2446
|
return {
|
|
2426
2447
|
valueControls: n,
|
|
2427
2448
|
valueMax: r,
|
|
2428
|
-
valueMin:
|
|
2429
|
-
valueNow:
|
|
2449
|
+
valueMin: i,
|
|
2450
|
+
valueNow: s
|
|
2430
2451
|
};
|
|
2431
2452
|
}
|
|
2432
|
-
function
|
|
2453
|
+
function bn({
|
|
2433
2454
|
children: e,
|
|
2434
2455
|
className: t,
|
|
2435
2456
|
disabled: n,
|
|
2436
2457
|
disableDoubleClick: o,
|
|
2437
2458
|
elementRef: r,
|
|
2438
|
-
id:
|
|
2439
|
-
preview:
|
|
2459
|
+
id: i,
|
|
2460
|
+
preview: s,
|
|
2440
2461
|
style: u,
|
|
2441
2462
|
...c
|
|
2442
2463
|
}) {
|
|
2443
|
-
const a =
|
|
2464
|
+
const a = De(i), l = Ne({
|
|
2444
2465
|
disabled: n,
|
|
2445
2466
|
disableDoubleClick: o,
|
|
2446
2467
|
children: e,
|
|
2447
2468
|
className: t,
|
|
2448
|
-
preview:
|
|
2469
|
+
preview: s,
|
|
2449
2470
|
style: u
|
|
2450
|
-
}), [f, y] = Z({}), [
|
|
2451
|
-
disableCursor:
|
|
2452
|
-
id:
|
|
2453
|
-
orientation:
|
|
2454
|
-
registerSeparator:
|
|
2471
|
+
}), [f, y] = Z({}), [p, g] = Z("inactive"), [d, v] = Z(!1), h = T(null), m = T(null), x = Te(h, r), {
|
|
2472
|
+
disableCursor: S,
|
|
2473
|
+
id: P,
|
|
2474
|
+
orientation: C,
|
|
2475
|
+
registerSeparator: E,
|
|
2455
2476
|
updateSeparatorProps: w
|
|
2456
|
-
} = be(),
|
|
2477
|
+
} = be(), R = C === "horizontal" ? "vertical" : "horizontal";
|
|
2457
2478
|
V(() => {
|
|
2458
|
-
const
|
|
2459
|
-
if (
|
|
2460
|
-
const
|
|
2479
|
+
const I = h.current;
|
|
2480
|
+
if (I !== null) {
|
|
2481
|
+
const G = {
|
|
2461
2482
|
disabled: l.disabled,
|
|
2462
2483
|
disableDoubleClick: l.disableDoubleClick,
|
|
2463
|
-
element:
|
|
2484
|
+
element: I,
|
|
2464
2485
|
id: a,
|
|
2465
2486
|
get children() {
|
|
2466
2487
|
return l.children;
|
|
@@ -2475,27 +2496,27 @@ function Sn({
|
|
|
2475
2496
|
return l.style;
|
|
2476
2497
|
}
|
|
2477
2498
|
};
|
|
2478
|
-
|
|
2479
|
-
const _ =
|
|
2480
|
-
(
|
|
2481
|
-
|
|
2482
|
-
|
|
2483
|
-
(
|
|
2484
|
-
) ?
|
|
2499
|
+
m.current = G;
|
|
2500
|
+
const _ = E(G), b = rt(
|
|
2501
|
+
(M) => {
|
|
2502
|
+
g(
|
|
2503
|
+
M.next.state !== "inactive" && M.next.hitRegions.some(
|
|
2504
|
+
(A) => A.separator === G
|
|
2505
|
+
) ? M.next.state : "inactive"
|
|
2485
2506
|
);
|
|
2486
2507
|
}
|
|
2487
|
-
),
|
|
2488
|
-
|
|
2489
|
-
(
|
|
2490
|
-
const { derivedPanelConstraints:
|
|
2508
|
+
), z = Ie(
|
|
2509
|
+
P,
|
|
2510
|
+
(M) => {
|
|
2511
|
+
const { derivedPanelConstraints: A, layout: $, separatorToPanels: Y } = M.next, oe = Y.get(G);
|
|
2491
2512
|
if (oe) {
|
|
2492
|
-
const le = oe[0], xe =
|
|
2513
|
+
const le = oe[0], xe = A.findIndex(
|
|
2493
2514
|
(J) => J.panelId === le.id
|
|
2494
2515
|
);
|
|
2495
2516
|
y(
|
|
2496
|
-
|
|
2517
|
+
Sn({
|
|
2497
2518
|
layout: $,
|
|
2498
|
-
panelConstraints:
|
|
2519
|
+
panelConstraints: A,
|
|
2499
2520
|
panelId: le.id,
|
|
2500
2521
|
panelIndex: xe
|
|
2501
2522
|
})
|
|
@@ -2504,42 +2525,42 @@ function Sn({
|
|
|
2504
2525
|
}
|
|
2505
2526
|
);
|
|
2506
2527
|
return () => {
|
|
2507
|
-
|
|
2528
|
+
m.current = null, b(), z(), _();
|
|
2508
2529
|
};
|
|
2509
2530
|
}
|
|
2510
|
-
}, [
|
|
2511
|
-
const
|
|
2512
|
-
|
|
2513
|
-
}, [
|
|
2531
|
+
}, [P, a, E, l]), V(() => {
|
|
2532
|
+
const I = m.current;
|
|
2533
|
+
I && Tt(I);
|
|
2534
|
+
}, [s]), Se(() => {
|
|
2514
2535
|
w(a, { disabled: n, disableDoubleClick: o });
|
|
2515
2536
|
}, [n, o, a, w]);
|
|
2516
|
-
let
|
|
2517
|
-
n && !
|
|
2518
|
-
let
|
|
2537
|
+
let N;
|
|
2538
|
+
n && !S && (N = "not-allowed");
|
|
2539
|
+
let O;
|
|
2519
2540
|
if (n)
|
|
2520
|
-
|
|
2541
|
+
O = "disabled";
|
|
2521
2542
|
else
|
|
2522
|
-
switch (
|
|
2543
|
+
switch (p) {
|
|
2523
2544
|
case "active": {
|
|
2524
|
-
|
|
2545
|
+
O = "active";
|
|
2525
2546
|
break;
|
|
2526
2547
|
}
|
|
2527
2548
|
default:
|
|
2528
|
-
|
|
2549
|
+
d ? O = "focus" : O = p;
|
|
2529
2550
|
}
|
|
2530
|
-
return /* @__PURE__ */
|
|
2551
|
+
return /* @__PURE__ */ B(
|
|
2531
2552
|
"div",
|
|
2532
2553
|
{
|
|
2533
2554
|
...c,
|
|
2534
2555
|
"aria-controls": f.valueControls,
|
|
2535
2556
|
"aria-disabled": n || void 0,
|
|
2536
|
-
"aria-orientation":
|
|
2557
|
+
"aria-orientation": R,
|
|
2537
2558
|
"aria-valuemax": f.valueMax,
|
|
2538
2559
|
"aria-valuemin": f.valueMin,
|
|
2539
2560
|
"aria-valuenow": f.valueNow,
|
|
2540
2561
|
children: e,
|
|
2541
2562
|
className: t,
|
|
2542
|
-
"data-separator":
|
|
2563
|
+
"data-separator": O,
|
|
2543
2564
|
"data-testid": a,
|
|
2544
2565
|
id: a,
|
|
2545
2566
|
onBlur: () => v(!1),
|
|
@@ -2548,7 +2569,7 @@ function Sn({
|
|
|
2548
2569
|
role: "separator",
|
|
2549
2570
|
style: {
|
|
2550
2571
|
flexBasis: "auto",
|
|
2551
|
-
cursor:
|
|
2572
|
+
cursor: N,
|
|
2552
2573
|
...u,
|
|
2553
2574
|
flexGrow: 0,
|
|
2554
2575
|
flexShrink: 0,
|
|
@@ -2560,17 +2581,17 @@ function Sn({
|
|
|
2560
2581
|
}
|
|
2561
2582
|
);
|
|
2562
2583
|
}
|
|
2563
|
-
|
|
2584
|
+
bn.displayName = "Separator";
|
|
2564
2585
|
export {
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
|
|
2586
|
+
pn as Group,
|
|
2587
|
+
yn as Panel,
|
|
2588
|
+
bn as Separator,
|
|
2568
2589
|
vt as SeparatorOverlay,
|
|
2569
2590
|
Ht as isCoarsePointer,
|
|
2570
|
-
|
|
2571
|
-
|
|
2572
|
-
|
|
2573
|
-
|
|
2574
|
-
|
|
2591
|
+
wn as useDefaultLayout,
|
|
2592
|
+
Pn as useGroupCallbackRef,
|
|
2593
|
+
Ln as useGroupRef,
|
|
2594
|
+
Cn as usePanelCallbackRef,
|
|
2595
|
+
Rn as usePanelRef
|
|
2575
2596
|
};
|
|
2576
2597
|
//# sourceMappingURL=react-resizable-panels.js.map
|