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