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