react-resizable-panels 4.0.9-alpha.0 → 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,85 +1,85 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
3
|
-
import { useId as
|
|
4
|
-
function
|
|
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
|
+
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
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(),
|
|
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
|
-
|
|
48
|
-
|
|
49
|
-
|
|
47
|
+
x.top,
|
|
48
|
+
x.left - d.right,
|
|
49
|
+
x.height
|
|
50
50
|
) : new DOMRect(
|
|
51
|
-
|
|
51
|
+
x.left,
|
|
52
52
|
d.bottom,
|
|
53
|
-
|
|
54
|
-
|
|
53
|
+
x.width,
|
|
54
|
+
x.top - d.bottom
|
|
55
55
|
)
|
|
56
56
|
});
|
|
57
57
|
}
|
|
58
|
-
i = c,
|
|
58
|
+
i = c, r = void 0;
|
|
59
59
|
} else {
|
|
60
|
-
const d =
|
|
61
|
-
(
|
|
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,46 +89,46 @@ function et(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
|
}
|
|
125
125
|
return o;
|
|
126
126
|
}
|
|
127
|
-
function
|
|
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
|
-
i =
|
|
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 tt {
|
|
|
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,13 +218,13 @@ class tt {
|
|
|
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
|
}
|
|
226
226
|
function P(e, t, n = 0) {
|
|
227
|
-
return Math.abs(
|
|
227
|
+
return Math.abs(I(e) - I(t)) <= n;
|
|
228
228
|
}
|
|
229
229
|
let R = {
|
|
230
230
|
cursorFlags: 0,
|
|
@@ -233,8 +233,8 @@ 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
240
|
function E(e) {
|
|
@@ -245,35 +245,35 @@ function E(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,42 +285,42 @@ function ot({
|
|
|
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
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
326
|
if (re === o)
|
|
@@ -334,7 +334,7 @@ function le() {
|
|
|
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 it(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
|
-
|
|
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 :
|
|
382
|
-
|
|
381
|
+
const f = e < 0 ? c : u, p = n[f];
|
|
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
|
|
393
|
-
if (
|
|
394
|
-
|
|
391
|
+
if (v) {
|
|
392
|
+
const S = l[f];
|
|
393
|
+
if (z(
|
|
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 ?
|
|
404
|
-
|
|
403
|
+
const f = e < 0 ? u : c, p = n[f];
|
|
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
|
|
415
|
-
if (
|
|
416
|
-
|
|
413
|
+
if (v) {
|
|
414
|
+
const S = l[f];
|
|
415
|
+
if (z(
|
|
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
|
|
430
|
-
|
|
431
|
-
|
|
429
|
+
const g = l[p];
|
|
430
|
+
z(
|
|
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),
|
|
448
|
-
|
|
449
|
-
|
|
447
|
+
const h = Math.abs(e) - Math.abs(d), v = l[p];
|
|
448
|
+
z(
|
|
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 :
|
|
467
|
-
|
|
466
|
+
const f = e < 0 ? c : u, p = l[f];
|
|
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
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
`Previous layout not found for panel index ${
|
|
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
|
+
z(
|
|
480
|
+
b != null,
|
|
481
|
+
`Previous layout not found for panel index ${y}`
|
|
482
482
|
);
|
|
483
|
-
const L =
|
|
484
|
-
panelConstraints: n[
|
|
483
|
+
const L = b + g, C = j({
|
|
484
|
+
panelConstraints: n[y],
|
|
485
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
|
|
493
|
+
const x = Object.values(r).reduce(
|
|
494
494
|
(f, p) => p + f,
|
|
495
495
|
0
|
|
496
496
|
);
|
|
497
|
-
if (!P(
|
|
498
|
-
return
|
|
499
|
-
const m = Object.keys(
|
|
500
|
-
return
|
|
497
|
+
if (!P(x, 100, 0.1))
|
|
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
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
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,
|
|
527
|
+
separatorToPanels: g
|
|
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
|
-
pivotIndices: i.panels.map((
|
|
534
|
-
prevLayout:
|
|
533
|
+
panelConstraints: h,
|
|
534
|
+
pivotIndices: i.panels.map((y) => x.indexOf(y)),
|
|
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
|
-
separatorToPanels:
|
|
555
|
+
separatorToPanels: g
|
|
554
556
|
});
|
|
555
|
-
const
|
|
556
|
-
i.group.inMemoryLayouts[
|
|
557
|
+
const y = i.group.panels.map(({ id: b }) => b).join(",");
|
|
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,10 +583,10 @@ function he(e) {
|
|
|
581
583
|
});
|
|
582
584
|
}
|
|
583
585
|
}
|
|
584
|
-
function
|
|
586
|
+
function oe(e) {
|
|
585
587
|
const t = e.parentElement;
|
|
586
|
-
|
|
587
|
-
const { mountedGroups: n } =
|
|
588
|
+
z(t, "Parent group element not found");
|
|
589
|
+
const { mountedGroups: n } = D();
|
|
588
590
|
for (const [o] of n)
|
|
589
591
|
if (o.element === t)
|
|
590
592
|
return o;
|
|
@@ -594,172 +596,175 @@ 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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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 } =
|
|
673
|
-
return
|
|
675
|
+
function Ne(e) {
|
|
676
|
+
const { mountedGroups: t } = D(), n = t.get(e);
|
|
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
|
-
|
|
680
|
-
const a = o.separatorToPanels.get(
|
|
681
|
-
|
|
682
|
-
const
|
|
683
|
+
z(s, "Matching separator not found");
|
|
684
|
+
const a = o.separatorToPanels.get(s);
|
|
685
|
+
z(a, "Matching panels not found");
|
|
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
693
|
}), c = A({
|
|
690
|
-
layout:
|
|
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
|
-
|
|
733
|
-
const
|
|
734
|
-
|
|
735
|
-
const
|
|
736
|
-
(d) => d.panelId ===
|
|
737
|
+
z(i, "Matching separator not found");
|
|
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
|
-
if (
|
|
739
|
-
const d = a[
|
|
740
|
-
|
|
743
|
+
if (z(c, "Panel metadata not found"), c.collapsible) {
|
|
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
|
-
|
|
752
|
-
const
|
|
753
|
-
|
|
756
|
+
z(a !== null, "Index not found");
|
|
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,156 +776,156 @@ function rt(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;
|
|
800
805
|
}
|
|
801
|
-
function
|
|
806
|
+
function dt(e, t) {
|
|
802
807
|
if (e === t) throw new Error("Cannot compare node with itself");
|
|
803
808
|
const n = {
|
|
804
|
-
a:
|
|
805
|
-
b:
|
|
809
|
+
a: we(e),
|
|
810
|
+
b: we(t)
|
|
806
811
|
};
|
|
807
812
|
let o;
|
|
808
813
|
for (; n.a.at(-1) === n.b.at(-1); )
|
|
809
814
|
e = n.a.pop(), t = n.b.pop(), o = e;
|
|
810
|
-
|
|
815
|
+
z(
|
|
811
816
|
o,
|
|
812
817
|
"Stacking order can only be calculated for elements with a common ancestor"
|
|
813
818
|
);
|
|
814
|
-
const
|
|
815
|
-
a:
|
|
816
|
-
b:
|
|
819
|
+
const s = {
|
|
820
|
+
a: ze(xe(n.a)),
|
|
821
|
+
b: ze(xe(n.b))
|
|
817
822
|
};
|
|
818
|
-
if (
|
|
819
|
-
const a = o.childNodes,
|
|
823
|
+
if (s.a === s.b) {
|
|
824
|
+
const a = o.childNodes, l = {
|
|
820
825
|
a: n.a.at(-1),
|
|
821
826
|
b: n.b.at(-1)
|
|
822
827
|
};
|
|
823
828
|
let i = a.length;
|
|
824
829
|
for (; i--; ) {
|
|
825
|
-
const
|
|
826
|
-
if (
|
|
827
|
-
if (
|
|
830
|
+
const r = a[i];
|
|
831
|
+
if (r === l.a) return 1;
|
|
832
|
+
if (r === l.b) return -1;
|
|
828
833
|
}
|
|
829
834
|
}
|
|
830
|
-
return Math.sign(
|
|
835
|
+
return Math.sign(s.a - s.b);
|
|
831
836
|
}
|
|
832
|
-
const
|
|
833
|
-
function
|
|
834
|
-
const t = getComputedStyle(
|
|
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;
|
|
835
840
|
return t === "flex" || t === "inline-flex";
|
|
836
841
|
}
|
|
837
|
-
function
|
|
842
|
+
function ht(e) {
|
|
838
843
|
const t = getComputedStyle(e);
|
|
839
|
-
return !!(t.position === "fixed" || t.zIndex !== "auto" && (t.position !== "static" ||
|
|
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");
|
|
840
845
|
}
|
|
841
|
-
function
|
|
846
|
+
function xe(e) {
|
|
842
847
|
let t = e.length;
|
|
843
848
|
for (; t--; ) {
|
|
844
849
|
const n = e[t];
|
|
845
|
-
if (
|
|
850
|
+
if (z(n, "Missing node"), ht(n)) return n;
|
|
846
851
|
}
|
|
847
852
|
return null;
|
|
848
853
|
}
|
|
849
|
-
function
|
|
854
|
+
function ze(e) {
|
|
850
855
|
return e && Number(getComputedStyle(e).zIndex) || 0;
|
|
851
856
|
}
|
|
852
|
-
function
|
|
857
|
+
function we(e) {
|
|
853
858
|
const t = [];
|
|
854
859
|
for (; e; )
|
|
855
|
-
t.push(e), e =
|
|
860
|
+
t.push(e), e = $e(e);
|
|
856
861
|
return t;
|
|
857
862
|
}
|
|
858
|
-
function
|
|
863
|
+
function $e(e) {
|
|
859
864
|
const { parentNode: t } = e;
|
|
860
865
|
return t && t instanceof ShadowRoot ? t.host : t;
|
|
861
866
|
}
|
|
862
|
-
function
|
|
867
|
+
function yt(e, t) {
|
|
863
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;
|
|
864
869
|
}
|
|
865
|
-
function
|
|
870
|
+
function gt({
|
|
866
871
|
groupElement: e,
|
|
867
872
|
hitRegion: t,
|
|
868
873
|
pointerEventTarget: n
|
|
869
874
|
}) {
|
|
870
875
|
if (!(n instanceof HTMLElement) || n.contains(e) || e.contains(n))
|
|
871
876
|
return !0;
|
|
872
|
-
if (
|
|
877
|
+
if (dt(n, e) > 0) {
|
|
873
878
|
let o = n;
|
|
874
879
|
for (; o; ) {
|
|
875
880
|
if (o.contains(e))
|
|
876
881
|
return !0;
|
|
877
|
-
if (
|
|
882
|
+
if (yt(o.getBoundingClientRect(), t))
|
|
878
883
|
return !1;
|
|
879
884
|
o = o.parentElement;
|
|
880
885
|
}
|
|
881
886
|
}
|
|
882
887
|
return !0;
|
|
883
888
|
}
|
|
884
|
-
function
|
|
889
|
+
function Fe(e, t) {
|
|
885
890
|
const n = [];
|
|
886
|
-
return t.forEach((o,
|
|
887
|
-
if (
|
|
891
|
+
return t.forEach((o, s) => {
|
|
892
|
+
if (s.disabled)
|
|
888
893
|
return;
|
|
889
|
-
const a =
|
|
894
|
+
const a = ft() ? ge.coarse : ge.precise, l = Ie(s), i = ct(s.orientation, l, {
|
|
890
895
|
x: e.clientX,
|
|
891
896
|
y: e.clientY
|
|
892
897
|
});
|
|
893
|
-
i && i.distance.x <= a && i.distance.y <= a &&
|
|
894
|
-
groupElement:
|
|
898
|
+
i && i.distance.x <= a && i.distance.y <= a && gt({
|
|
899
|
+
groupElement: s.element,
|
|
895
900
|
hitRegion: i.hitRegion.rect,
|
|
896
901
|
pointerEventTarget: e.target
|
|
897
902
|
}) && n.push(i.hitRegion);
|
|
898
903
|
}), n;
|
|
899
904
|
}
|
|
900
|
-
function
|
|
905
|
+
function be(e) {
|
|
901
906
|
if (e.defaultPrevented)
|
|
902
907
|
return;
|
|
903
|
-
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();
|
|
904
909
|
let i = !1;
|
|
905
|
-
n.forEach((
|
|
906
|
-
o.add(
|
|
907
|
-
|
|
908
|
-
}),
|
|
909
|
-
const
|
|
910
|
-
|
|
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);
|
|
911
916
|
}), E({
|
|
912
917
|
interactionState: {
|
|
913
918
|
hitRegions: n,
|
|
914
|
-
initialLayoutMap:
|
|
919
|
+
initialLayoutMap: l,
|
|
915
920
|
pointerDownAtPoint: { x: e.clientX, y: e.clientY },
|
|
916
921
|
state: "active"
|
|
917
922
|
}
|
|
918
923
|
}), n.length && e.preventDefault();
|
|
919
924
|
}
|
|
920
|
-
function
|
|
925
|
+
function Le(e) {
|
|
921
926
|
if (e.defaultPrevented)
|
|
922
927
|
return;
|
|
923
|
-
const { interactionState: t, mountedGroups: n } =
|
|
928
|
+
const { interactionState: t, mountedGroups: n } = D();
|
|
924
929
|
switch (t.state) {
|
|
925
930
|
case "active": {
|
|
926
931
|
if (
|
|
@@ -937,7 +942,7 @@ function ze(e) {
|
|
|
937
942
|
);
|
|
938
943
|
return;
|
|
939
944
|
}
|
|
940
|
-
|
|
945
|
+
_e({
|
|
941
946
|
event: e,
|
|
942
947
|
hitRegions: t.hitRegions,
|
|
943
948
|
initialLayoutMap: t.initialLayoutMap,
|
|
@@ -947,7 +952,7 @@ function ze(e) {
|
|
|
947
952
|
break;
|
|
948
953
|
}
|
|
949
954
|
default: {
|
|
950
|
-
const o =
|
|
955
|
+
const o = Fe(e, n);
|
|
951
956
|
o.length === 0 ? t.state !== "inactive" && E({
|
|
952
957
|
interactionState: { state: "inactive" }
|
|
953
958
|
}) : E({
|
|
@@ -960,11 +965,11 @@ function ze(e) {
|
|
|
960
965
|
}
|
|
961
966
|
}
|
|
962
967
|
}
|
|
963
|
-
function
|
|
968
|
+
function Pe(e) {
|
|
964
969
|
if (e.defaultPrevented)
|
|
965
970
|
return;
|
|
966
971
|
e.preventDefault();
|
|
967
|
-
const { interactionState: t } =
|
|
972
|
+
const { interactionState: t } = D();
|
|
968
973
|
switch (t.state) {
|
|
969
974
|
case "active":
|
|
970
975
|
E({
|
|
@@ -975,125 +980,126 @@ function be(e) {
|
|
|
975
980
|
}), le();
|
|
976
981
|
}
|
|
977
982
|
}
|
|
978
|
-
function
|
|
983
|
+
function Ce(e) {
|
|
979
984
|
let t = 0, n = 0;
|
|
980
985
|
const o = {};
|
|
981
986
|
for (const a of e)
|
|
982
987
|
if (a.defaultSize !== void 0) {
|
|
983
988
|
t++;
|
|
984
|
-
const
|
|
985
|
-
n +=
|
|
989
|
+
const l = I(a.defaultSize);
|
|
990
|
+
n += l, o[a.panelId] = l;
|
|
986
991
|
} else
|
|
987
992
|
o[a.panelId] = void 0;
|
|
988
|
-
const
|
|
989
|
-
if (
|
|
990
|
-
const a =
|
|
991
|
-
for (const
|
|
992
|
-
|
|
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);
|
|
993
998
|
}
|
|
994
999
|
return o;
|
|
995
1000
|
}
|
|
996
|
-
function
|
|
1001
|
+
function vt(e, t, n) {
|
|
997
1002
|
const o = n[0];
|
|
998
1003
|
if (!o)
|
|
999
1004
|
return;
|
|
1000
|
-
const
|
|
1001
|
-
if (!
|
|
1005
|
+
const s = e.panels.find((l) => l.element === t);
|
|
1006
|
+
if (!s || !s.onResize)
|
|
1002
1007
|
return;
|
|
1003
|
-
const a =
|
|
1004
|
-
|
|
1008
|
+
const a = B({ group: e });
|
|
1009
|
+
s.onResize(
|
|
1005
1010
|
{
|
|
1006
|
-
asPercentage:
|
|
1011
|
+
asPercentage: I(
|
|
1007
1012
|
o.inlineSize / a * 100
|
|
1008
1013
|
),
|
|
1009
1014
|
inPixels: o.inlineSize
|
|
1010
1015
|
},
|
|
1011
|
-
|
|
1016
|
+
s.id
|
|
1012
1017
|
);
|
|
1013
1018
|
}
|
|
1014
|
-
function
|
|
1019
|
+
function St(e) {
|
|
1015
1020
|
let t = !0;
|
|
1016
|
-
|
|
1021
|
+
z(
|
|
1017
1022
|
e.separators.length === 0 || e.separators.length < e.panels.length,
|
|
1018
1023
|
"Invalid Group configuration; too many Separator components"
|
|
1019
1024
|
);
|
|
1020
|
-
const n = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Set(),
|
|
1025
|
+
const n = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Set(), s = new ResizeObserver((m) => {
|
|
1021
1026
|
for (const f of m) {
|
|
1022
1027
|
const { borderBoxSize: p, target: h } = f;
|
|
1023
1028
|
if (h === e.element) {
|
|
1024
1029
|
if (t) {
|
|
1025
|
-
if (
|
|
1030
|
+
if (B({ group: e }) === 0)
|
|
1026
1031
|
return;
|
|
1027
|
-
E((
|
|
1028
|
-
const
|
|
1029
|
-
if (
|
|
1030
|
-
const
|
|
1031
|
-
layout:
|
|
1032
|
-
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
|
|
1033
1038
|
});
|
|
1034
|
-
return !
|
|
1035
|
-
mountedGroups: new Map(
|
|
1036
|
-
|
|
1039
|
+
return !S.defaultLayoutDeferred && U(b, L) ? g : {
|
|
1040
|
+
mountedGroups: new Map(g.mountedGroups).set(e, {
|
|
1041
|
+
defaultLayoutDeferred: !1,
|
|
1042
|
+
derivedPanelConstraints: y,
|
|
1037
1043
|
layout: L,
|
|
1038
|
-
separatorToPanels:
|
|
1044
|
+
separatorToPanels: S.separatorToPanels
|
|
1039
1045
|
})
|
|
1040
1046
|
};
|
|
1041
1047
|
}
|
|
1042
|
-
return
|
|
1048
|
+
return g;
|
|
1043
1049
|
});
|
|
1044
1050
|
}
|
|
1045
1051
|
} else
|
|
1046
|
-
|
|
1052
|
+
vt(e, h, p);
|
|
1047
1053
|
}
|
|
1048
1054
|
});
|
|
1049
|
-
|
|
1050
|
-
|
|
1055
|
+
s.observe(e.element), e.panels.forEach((m) => {
|
|
1056
|
+
z(
|
|
1051
1057
|
!n.has(m.id),
|
|
1052
1058
|
`Panel ids must be unique; id "${m.id}" was used more than once`
|
|
1053
|
-
), n.add(m.id), m.onResize &&
|
|
1059
|
+
), n.add(m.id), m.onResize && s.observe(m.element);
|
|
1054
1060
|
});
|
|
1055
|
-
const a =
|
|
1056
|
-
let
|
|
1057
|
-
|
|
1058
|
-
const
|
|
1059
|
-
layout:
|
|
1060
|
-
panelConstraints:
|
|
1061
|
-
}), 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) => ({
|
|
1062
1068
|
mountedGroups: new Map(m.mountedGroups).set(e, {
|
|
1063
1069
|
defaultLayoutDeferred: a === 0,
|
|
1064
|
-
derivedPanelConstraints:
|
|
1070
|
+
derivedPanelConstraints: l,
|
|
1065
1071
|
layout: c,
|
|
1066
1072
|
separatorToPanels: new Map(
|
|
1067
1073
|
d.filter((f) => f.separator).map((f) => [f.separator, f.panels])
|
|
1068
1074
|
)
|
|
1069
1075
|
})
|
|
1070
1076
|
}));
|
|
1071
|
-
return e.element.addEventListener("pointerleave",
|
|
1072
|
-
|
|
1077
|
+
return e.element.addEventListener("pointerleave", ve), e.separators.forEach((m) => {
|
|
1078
|
+
z(
|
|
1073
1079
|
!o.has(m.id),
|
|
1074
1080
|
`Separator ids must be unique; id "${m.id}" was used more than once`
|
|
1075
|
-
), o.add(m.id), m.element.addEventListener("keydown",
|
|
1076
|
-
}),
|
|
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() {
|
|
1077
1083
|
t = !1;
|
|
1078
1084
|
const f = E((p) => {
|
|
1079
1085
|
const h = new Map(p.mountedGroups);
|
|
1080
1086
|
return h.delete(e), { mountedGroups: h };
|
|
1081
1087
|
});
|
|
1082
|
-
e.element.removeEventListener("pointerleave",
|
|
1083
|
-
p.element.removeEventListener("keydown",
|
|
1084
|
-
}), 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();
|
|
1085
1091
|
};
|
|
1086
1092
|
}
|
|
1087
1093
|
function ue(e) {
|
|
1088
|
-
const t =
|
|
1094
|
+
const t = Ke();
|
|
1089
1095
|
return `${e ?? t}`;
|
|
1090
1096
|
}
|
|
1091
|
-
const
|
|
1097
|
+
const N = typeof window < "u" ? Xe : Re;
|
|
1092
1098
|
function ce(e) {
|
|
1093
|
-
const t =
|
|
1094
|
-
return
|
|
1099
|
+
const t = O(e);
|
|
1100
|
+
return N(() => {
|
|
1095
1101
|
t.current = e;
|
|
1096
|
-
}, [e]),
|
|
1102
|
+
}, [e]), Ee((n) => t.current?.(n), [t]);
|
|
1097
1103
|
}
|
|
1098
1104
|
function fe(...e) {
|
|
1099
1105
|
return ce((t) => {
|
|
@@ -1112,83 +1118,101 @@ function fe(...e) {
|
|
|
1112
1118
|
});
|
|
1113
1119
|
});
|
|
1114
1120
|
}
|
|
1115
|
-
|
|
1116
|
-
|
|
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) {
|
|
1117
1130
|
const n = e.replace(/[^a-zA-Z0-9\-_]/g, ""), o = t.replace(/[^a-zA-Z0-9\-_]/g, "");
|
|
1118
1131
|
return `--react-resizable-panels--${n}--${o}`;
|
|
1119
1132
|
}
|
|
1120
|
-
const
|
|
1121
|
-
function
|
|
1122
|
-
const n =
|
|
1133
|
+
const je = Ye(null);
|
|
1134
|
+
function zt(e, t) {
|
|
1135
|
+
const n = O({
|
|
1123
1136
|
getLayout: () => ({}),
|
|
1124
|
-
setLayout:
|
|
1137
|
+
setLayout: st
|
|
1125
1138
|
});
|
|
1126
|
-
|
|
1139
|
+
Me(t, () => n.current, []), N(() => {
|
|
1127
1140
|
Object.assign(
|
|
1128
1141
|
n.current,
|
|
1129
|
-
|
|
1142
|
+
Ae({ groupId: e })
|
|
1130
1143
|
);
|
|
1131
1144
|
});
|
|
1132
1145
|
}
|
|
1133
|
-
function
|
|
1146
|
+
function Gt({
|
|
1134
1147
|
children: e,
|
|
1135
1148
|
className: t,
|
|
1136
1149
|
defaultLayout: n,
|
|
1137
1150
|
disableCursor: o,
|
|
1138
|
-
disabled:
|
|
1151
|
+
disabled: s,
|
|
1139
1152
|
elementRef: a,
|
|
1140
|
-
groupRef:
|
|
1153
|
+
groupRef: l,
|
|
1141
1154
|
id: i,
|
|
1142
|
-
onLayoutChange:
|
|
1143
|
-
orientation:
|
|
1155
|
+
onLayoutChange: r,
|
|
1156
|
+
orientation: u = "horizontal",
|
|
1144
1157
|
style: c,
|
|
1145
1158
|
...d
|
|
1146
1159
|
}) {
|
|
1147
|
-
const
|
|
1148
|
-
|
|
1149
|
-
}), f = ue(i), [p, h] =
|
|
1150
|
-
|
|
1151
|
-
|
|
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(
|
|
1152
1168
|
() => ({
|
|
1153
1169
|
id: f,
|
|
1154
|
-
orientation:
|
|
1155
|
-
registerPanel: (
|
|
1156
|
-
L((M) => M.filter((
|
|
1170
|
+
orientation: u,
|
|
1171
|
+
registerPanel: (w) => (L((M) => se(u, [...M, w])), () => {
|
|
1172
|
+
L((M) => M.filter((F) => F !== w));
|
|
1157
1173
|
}),
|
|
1158
|
-
registerSeparator: (
|
|
1159
|
-
(M) => se(
|
|
1174
|
+
registerSeparator: (w) => (q(
|
|
1175
|
+
(M) => se(u, [...M, w])
|
|
1160
1176
|
), () => {
|
|
1161
|
-
|
|
1162
|
-
(M) => M.filter((
|
|
1177
|
+
q(
|
|
1178
|
+
(M) => M.filter((F) => F !== w)
|
|
1163
1179
|
);
|
|
1164
1180
|
})
|
|
1165
1181
|
}),
|
|
1166
|
-
[f,
|
|
1167
|
-
)
|
|
1168
|
-
|
|
1169
|
-
|
|
1182
|
+
[f, u]
|
|
1183
|
+
), $ = xt({
|
|
1184
|
+
defaultLayout: n,
|
|
1185
|
+
disableCursor: o
|
|
1186
|
+
}), V = O(null);
|
|
1187
|
+
N(() => {
|
|
1188
|
+
if (v === null)
|
|
1170
1189
|
return;
|
|
1171
|
-
const
|
|
1172
|
-
defaultLayout:
|
|
1173
|
-
disableCursor:
|
|
1174
|
-
disabled: !!
|
|
1175
|
-
element:
|
|
1190
|
+
const w = {
|
|
1191
|
+
defaultLayout: $.defaultLayout,
|
|
1192
|
+
disableCursor: !!$.disableCursor,
|
|
1193
|
+
disabled: !!s,
|
|
1194
|
+
element: v,
|
|
1176
1195
|
id: f,
|
|
1177
|
-
inMemoryLastExpandedPanelSizes:
|
|
1178
|
-
inMemoryLayouts:
|
|
1179
|
-
orientation:
|
|
1180
|
-
panels:
|
|
1196
|
+
inMemoryLastExpandedPanelSizes: Z.current.lastExpandedPanelSizes,
|
|
1197
|
+
inMemoryLayouts: Z.current.layouts,
|
|
1198
|
+
orientation: u,
|
|
1199
|
+
panels: b,
|
|
1181
1200
|
separators: C
|
|
1182
|
-
}
|
|
1183
|
-
|
|
1184
|
-
const
|
|
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(
|
|
1185
1209
|
"interactionStateChange",
|
|
1186
|
-
(
|
|
1187
|
-
switch (
|
|
1210
|
+
(H) => {
|
|
1211
|
+
switch (H.state) {
|
|
1188
1212
|
case "active": {
|
|
1189
1213
|
h(
|
|
1190
|
-
|
|
1191
|
-
(
|
|
1214
|
+
H.hitRegions.some(
|
|
1215
|
+
(W) => W.group === w
|
|
1192
1216
|
)
|
|
1193
1217
|
);
|
|
1194
1218
|
break;
|
|
@@ -1199,49 +1223,56 @@ function Pt({
|
|
|
1199
1223
|
}
|
|
1200
1224
|
}
|
|
1201
1225
|
}
|
|
1202
|
-
),
|
|
1226
|
+
), Ue = _.addListener(
|
|
1203
1227
|
"mountedGroupsChange",
|
|
1204
|
-
(
|
|
1205
|
-
const
|
|
1206
|
-
|
|
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
|
+
}
|
|
1207
1236
|
}
|
|
1208
1237
|
);
|
|
1209
1238
|
return () => {
|
|
1210
|
-
M(),
|
|
1239
|
+
V.current = null, M(), Be(), Ue();
|
|
1211
1240
|
};
|
|
1212
1241
|
}, [
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
r,
|
|
1216
|
-
y,
|
|
1242
|
+
s,
|
|
1243
|
+
v,
|
|
1217
1244
|
f,
|
|
1218
1245
|
m,
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
C
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
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
|
|
1225
1256
|
};
|
|
1226
|
-
for (const
|
|
1227
|
-
const M =
|
|
1228
|
-
|
|
1257
|
+
for (const w in S) {
|
|
1258
|
+
const M = We(f, w), F = S[w];
|
|
1259
|
+
pe[M] = F;
|
|
1229
1260
|
}
|
|
1230
|
-
return /* @__PURE__ */
|
|
1261
|
+
return /* @__PURE__ */ K(je.Provider, { value: Q, children: /* @__PURE__ */ K(
|
|
1231
1262
|
"div",
|
|
1232
1263
|
{
|
|
1233
1264
|
...d,
|
|
1234
|
-
"aria-orientation":
|
|
1265
|
+
"aria-orientation": u,
|
|
1235
1266
|
className: t,
|
|
1236
1267
|
"data-group": !0,
|
|
1237
1268
|
"data-testid": f,
|
|
1238
1269
|
id: f,
|
|
1239
|
-
ref:
|
|
1270
|
+
ref: J,
|
|
1240
1271
|
style: {
|
|
1241
1272
|
...c,
|
|
1242
|
-
...
|
|
1273
|
+
...pe,
|
|
1243
1274
|
display: "flex",
|
|
1244
|
-
flexDirection:
|
|
1275
|
+
flexDirection: u === "horizontal" ? "row" : "column",
|
|
1245
1276
|
flexWrap: "nowrap"
|
|
1246
1277
|
},
|
|
1247
1278
|
children: e
|
|
@@ -1251,7 +1282,7 @@ function Pt({
|
|
|
1251
1282
|
function ae(e) {
|
|
1252
1283
|
return `react-resizable-panels:${e}`;
|
|
1253
1284
|
}
|
|
1254
|
-
function
|
|
1285
|
+
function wt({
|
|
1255
1286
|
id: e,
|
|
1256
1287
|
layout: t,
|
|
1257
1288
|
storage: n
|
|
@@ -1263,19 +1294,19 @@ function yt({
|
|
|
1263
1294
|
console.error(o);
|
|
1264
1295
|
}
|
|
1265
1296
|
}
|
|
1266
|
-
function
|
|
1297
|
+
function It({
|
|
1267
1298
|
groupId: e,
|
|
1268
1299
|
storage: t
|
|
1269
1300
|
}) {
|
|
1270
|
-
const n =
|
|
1271
|
-
|
|
1301
|
+
const n = qe(
|
|
1302
|
+
bt,
|
|
1272
1303
|
() => t.getItem(ae(e)),
|
|
1273
1304
|
() => t.getItem(ae(e))
|
|
1274
|
-
), o =
|
|
1305
|
+
), o = Ge(
|
|
1275
1306
|
() => n ? JSON.parse(n) : void 0,
|
|
1276
1307
|
[n]
|
|
1277
|
-
),
|
|
1278
|
-
(a) =>
|
|
1308
|
+
), s = Ee(
|
|
1309
|
+
(a) => wt({
|
|
1279
1310
|
id: e,
|
|
1280
1311
|
layout: a,
|
|
1281
1312
|
storage: t
|
|
@@ -1284,48 +1315,59 @@ function Ct({
|
|
|
1284
1315
|
);
|
|
1285
1316
|
return {
|
|
1286
1317
|
defaultLayout: o,
|
|
1287
|
-
onLayoutChange:
|
|
1318
|
+
onLayoutChange: s
|
|
1288
1319
|
};
|
|
1289
1320
|
}
|
|
1290
|
-
function
|
|
1321
|
+
function bt() {
|
|
1291
1322
|
return function() {
|
|
1292
1323
|
};
|
|
1293
1324
|
}
|
|
1294
|
-
function
|
|
1295
|
-
return
|
|
1325
|
+
function kt() {
|
|
1326
|
+
return G(null);
|
|
1296
1327
|
}
|
|
1297
|
-
function
|
|
1298
|
-
return
|
|
1328
|
+
function Dt() {
|
|
1329
|
+
return O(null);
|
|
1299
1330
|
}
|
|
1300
1331
|
function de() {
|
|
1301
|
-
const e =
|
|
1302
|
-
return
|
|
1332
|
+
const e = Ze(je);
|
|
1333
|
+
return z(
|
|
1303
1334
|
e,
|
|
1304
1335
|
"Group Context not found; did you render a Panel or Separator outside of a Group?"
|
|
1305
1336
|
), e;
|
|
1306
1337
|
}
|
|
1307
|
-
function
|
|
1338
|
+
function Lt({
|
|
1308
1339
|
groupId: e,
|
|
1309
1340
|
panelId: t
|
|
1310
1341
|
}) {
|
|
1311
1342
|
const n = () => {
|
|
1312
|
-
const { mountedGroups: i } =
|
|
1343
|
+
const { mountedGroups: i } = D();
|
|
1313
1344
|
for (const [
|
|
1314
|
-
|
|
1315
|
-
{
|
|
1345
|
+
r,
|
|
1346
|
+
{
|
|
1347
|
+
defaultLayoutDeferred: u,
|
|
1348
|
+
derivedPanelConstraints: c,
|
|
1349
|
+
layout: d,
|
|
1350
|
+
separatorToPanels: x
|
|
1351
|
+
}
|
|
1316
1352
|
] of i)
|
|
1317
|
-
if (
|
|
1318
|
-
return {
|
|
1353
|
+
if (r.id === e)
|
|
1354
|
+
return {
|
|
1355
|
+
defaultLayoutDeferred: u,
|
|
1356
|
+
derivedPanelConstraints: c,
|
|
1357
|
+
group: r,
|
|
1358
|
+
layout: d,
|
|
1359
|
+
separatorToPanels: x
|
|
1360
|
+
};
|
|
1319
1361
|
throw Error(`Group ${e} not found`);
|
|
1320
1362
|
}, o = () => {
|
|
1321
1363
|
const i = n().derivedPanelConstraints.find(
|
|
1322
|
-
(
|
|
1364
|
+
(r) => r.panelId === t
|
|
1323
1365
|
);
|
|
1324
1366
|
if (i !== void 0)
|
|
1325
1367
|
return i;
|
|
1326
1368
|
throw Error(`Panel constraints not found for Panel ${t}`);
|
|
1327
|
-
},
|
|
1328
|
-
const i = n().group.panels.find((
|
|
1369
|
+
}, s = () => {
|
|
1370
|
+
const i = n().group.panels.find((r) => r.id === t);
|
|
1329
1371
|
if (i !== void 0)
|
|
1330
1372
|
return i;
|
|
1331
1373
|
throw Error(`Layout not found for Panel ${t}`);
|
|
@@ -1334,75 +1376,77 @@ function St({
|
|
|
1334
1376
|
if (i !== void 0)
|
|
1335
1377
|
return i;
|
|
1336
1378
|
throw Error(`Layout not found for Panel ${t}`);
|
|
1337
|
-
},
|
|
1338
|
-
const
|
|
1339
|
-
if (i ===
|
|
1379
|
+
}, l = (i) => {
|
|
1380
|
+
const r = a();
|
|
1381
|
+
if (i === r)
|
|
1340
1382
|
return;
|
|
1341
1383
|
const {
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
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,
|
|
1352
1395
|
trigger: "imperative-api"
|
|
1353
|
-
}),
|
|
1354
|
-
layout:
|
|
1355
|
-
panelConstraints:
|
|
1396
|
+
}), v = A({
|
|
1397
|
+
layout: h,
|
|
1398
|
+
panelConstraints: c
|
|
1356
1399
|
});
|
|
1357
|
-
|
|
1358
|
-
mountedGroups: new Map(
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
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
|
|
1362
1406
|
})
|
|
1363
1407
|
}));
|
|
1364
1408
|
};
|
|
1365
1409
|
return {
|
|
1366
1410
|
collapse: () => {
|
|
1367
|
-
const { collapsible: i, collapsedSize:
|
|
1368
|
-
i &&
|
|
1411
|
+
const { collapsible: i, collapsedSize: r } = o(), u = a();
|
|
1412
|
+
i && u !== r && l(r);
|
|
1369
1413
|
},
|
|
1370
1414
|
expand: () => {
|
|
1371
|
-
const { collapsible: i, collapsedSize:
|
|
1372
|
-
i && c ===
|
|
1415
|
+
const { collapsible: i, collapsedSize: r, minSize: u } = o(), c = a();
|
|
1416
|
+
i && c === r && l(u);
|
|
1373
1417
|
},
|
|
1374
1418
|
getSize: () => {
|
|
1375
|
-
const { group: i } = n(),
|
|
1419
|
+
const { group: i } = n(), r = a(), { element: u } = s(), c = i.orientation === "horizontal" ? u.offsetWidth : u.offsetHeight;
|
|
1376
1420
|
return {
|
|
1377
|
-
asPercentage:
|
|
1421
|
+
asPercentage: r,
|
|
1378
1422
|
inPixels: c
|
|
1379
1423
|
};
|
|
1380
1424
|
},
|
|
1381
1425
|
isCollapsed: () => {
|
|
1382
|
-
const { collapsible: i, collapsedSize:
|
|
1383
|
-
return i && P(
|
|
1426
|
+
const { collapsible: i, collapsedSize: r } = o(), u = a();
|
|
1427
|
+
return i && P(r, u);
|
|
1384
1428
|
},
|
|
1385
1429
|
resize: (i) => {
|
|
1386
1430
|
if (a() !== i) {
|
|
1387
|
-
let
|
|
1431
|
+
let u;
|
|
1388
1432
|
switch (typeof i) {
|
|
1389
1433
|
case "number": {
|
|
1390
|
-
const { group: c } = n(), d =
|
|
1391
|
-
|
|
1434
|
+
const { group: c } = n(), d = B({ group: c });
|
|
1435
|
+
u = I(i / d * 100);
|
|
1392
1436
|
break;
|
|
1393
1437
|
}
|
|
1394
1438
|
case "string": {
|
|
1395
|
-
|
|
1439
|
+
u = parseFloat(i);
|
|
1396
1440
|
break;
|
|
1397
1441
|
}
|
|
1398
1442
|
}
|
|
1399
|
-
u
|
|
1443
|
+
l(u);
|
|
1400
1444
|
}
|
|
1401
1445
|
}
|
|
1402
1446
|
};
|
|
1403
1447
|
}
|
|
1404
|
-
function
|
|
1405
|
-
const { id: n } = de(), o =
|
|
1448
|
+
function Pt(e, t) {
|
|
1449
|
+
const { id: n } = de(), o = O({
|
|
1406
1450
|
collapse: ie,
|
|
1407
1451
|
expand: ie,
|
|
1408
1452
|
getSize: () => ({
|
|
@@ -1412,70 +1456,70 @@ function xt(e, t) {
|
|
|
1412
1456
|
isCollapsed: () => !1,
|
|
1413
1457
|
resize: ie
|
|
1414
1458
|
});
|
|
1415
|
-
|
|
1459
|
+
Me(t, () => o.current, []), N(() => {
|
|
1416
1460
|
Object.assign(
|
|
1417
1461
|
o.current,
|
|
1418
|
-
|
|
1462
|
+
Lt({ groupId: n, panelId: e })
|
|
1419
1463
|
);
|
|
1420
1464
|
});
|
|
1421
1465
|
}
|
|
1422
|
-
function
|
|
1466
|
+
function Ot({
|
|
1423
1467
|
children: e,
|
|
1424
1468
|
className: t,
|
|
1425
1469
|
collapsedSize: n = "0%",
|
|
1426
1470
|
collapsible: o = !1,
|
|
1427
|
-
defaultSize:
|
|
1471
|
+
defaultSize: s,
|
|
1428
1472
|
elementRef: a,
|
|
1429
|
-
id:
|
|
1473
|
+
id: l,
|
|
1430
1474
|
maxSize: i = "100%",
|
|
1431
|
-
minSize:
|
|
1432
|
-
onResize:
|
|
1475
|
+
minSize: r = "0%",
|
|
1476
|
+
onResize: u,
|
|
1433
1477
|
panelRef: c,
|
|
1434
1478
|
style: d,
|
|
1435
|
-
...
|
|
1479
|
+
...x
|
|
1436
1480
|
}) {
|
|
1437
|
-
const m = !!
|
|
1438
|
-
|
|
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);
|
|
1439
1483
|
});
|
|
1440
|
-
|
|
1484
|
+
N(() => {
|
|
1441
1485
|
if (p !== null)
|
|
1442
|
-
return
|
|
1486
|
+
return S({
|
|
1443
1487
|
element: p,
|
|
1444
1488
|
id: f,
|
|
1445
1489
|
idIsStable: m,
|
|
1446
|
-
onResize:
|
|
1490
|
+
onResize: y ? b : void 0,
|
|
1447
1491
|
panelConstraints: {
|
|
1448
1492
|
collapsedSize: n,
|
|
1449
1493
|
collapsible: o,
|
|
1450
|
-
defaultSize:
|
|
1494
|
+
defaultSize: s,
|
|
1451
1495
|
maxSize: i,
|
|
1452
|
-
minSize:
|
|
1496
|
+
minSize: r
|
|
1453
1497
|
}
|
|
1454
1498
|
});
|
|
1455
1499
|
}, [
|
|
1456
1500
|
n,
|
|
1457
1501
|
o,
|
|
1458
|
-
|
|
1502
|
+
s,
|
|
1459
1503
|
p,
|
|
1460
|
-
|
|
1504
|
+
y,
|
|
1461
1505
|
f,
|
|
1462
1506
|
m,
|
|
1463
1507
|
i,
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
]),
|
|
1468
|
-
const L =
|
|
1469
|
-
return /* @__PURE__ */
|
|
1508
|
+
r,
|
|
1509
|
+
b,
|
|
1510
|
+
S
|
|
1511
|
+
]), Pt(f, c);
|
|
1512
|
+
const L = We(g, f);
|
|
1513
|
+
return /* @__PURE__ */ K(
|
|
1470
1514
|
"div",
|
|
1471
1515
|
{
|
|
1472
|
-
...
|
|
1516
|
+
...x,
|
|
1473
1517
|
"data-panel": !0,
|
|
1474
1518
|
"data-testid": f,
|
|
1475
1519
|
id: f,
|
|
1476
|
-
ref:
|
|
1520
|
+
ref: v,
|
|
1477
1521
|
style: {
|
|
1478
|
-
...
|
|
1522
|
+
...Ct,
|
|
1479
1523
|
flexBasis: 0,
|
|
1480
1524
|
flexGrow: `var(${L}, 1)`,
|
|
1481
1525
|
flexShrink: 1,
|
|
@@ -1483,9 +1527,9 @@ function Mt({
|
|
|
1483
1527
|
overflow: "hidden",
|
|
1484
1528
|
// Disable pointer events inside of a panel during resize
|
|
1485
1529
|
// This avoid edge cases like nested iframes
|
|
1486
|
-
pointerEvents: `var(${
|
|
1530
|
+
pointerEvents: `var(${He})`
|
|
1487
1531
|
},
|
|
1488
|
-
children: /* @__PURE__ */
|
|
1532
|
+
children: /* @__PURE__ */ K(
|
|
1489
1533
|
"div",
|
|
1490
1534
|
{
|
|
1491
1535
|
className: t,
|
|
@@ -1500,7 +1544,7 @@ function Mt({
|
|
|
1500
1544
|
}
|
|
1501
1545
|
);
|
|
1502
1546
|
}
|
|
1503
|
-
const
|
|
1547
|
+
const Ct = {
|
|
1504
1548
|
minHeight: "unset",
|
|
1505
1549
|
maxHeight: "unset",
|
|
1506
1550
|
height: "unset",
|
|
@@ -1516,27 +1560,27 @@ const zt = {
|
|
|
1516
1560
|
padding: "unset",
|
|
1517
1561
|
margin: "unset"
|
|
1518
1562
|
};
|
|
1519
|
-
function
|
|
1520
|
-
return
|
|
1563
|
+
function Tt() {
|
|
1564
|
+
return G(null);
|
|
1521
1565
|
}
|
|
1522
|
-
function
|
|
1523
|
-
return
|
|
1566
|
+
function _t() {
|
|
1567
|
+
return O(null);
|
|
1524
1568
|
}
|
|
1525
|
-
function
|
|
1569
|
+
function Rt({
|
|
1526
1570
|
layout: e,
|
|
1527
1571
|
panelConstraints: t,
|
|
1528
1572
|
panelId: n,
|
|
1529
1573
|
panelIndex: o
|
|
1530
1574
|
}) {
|
|
1531
|
-
let
|
|
1532
|
-
const
|
|
1533
|
-
(
|
|
1575
|
+
let s, a;
|
|
1576
|
+
const l = e[n], i = t.find(
|
|
1577
|
+
(r) => r.panelId === n
|
|
1534
1578
|
);
|
|
1535
1579
|
if (i) {
|
|
1536
|
-
const
|
|
1580
|
+
const r = i.maxSize, u = a = i.collapsible ? i.collapsedSize : i.minSize, c = [o, o + 1];
|
|
1537
1581
|
a = A({
|
|
1538
|
-
layout:
|
|
1539
|
-
delta:
|
|
1582
|
+
layout: Y({
|
|
1583
|
+
delta: u - l,
|
|
1540
1584
|
initialLayout: e,
|
|
1541
1585
|
panelConstraints: t,
|
|
1542
1586
|
pivotIndices: c,
|
|
@@ -1544,9 +1588,9 @@ function bt({
|
|
|
1544
1588
|
trigger: "keyboard"
|
|
1545
1589
|
}),
|
|
1546
1590
|
panelConstraints: t
|
|
1547
|
-
})[n],
|
|
1548
|
-
layout:
|
|
1549
|
-
delta:
|
|
1591
|
+
})[n], s = A({
|
|
1592
|
+
layout: Y({
|
|
1593
|
+
delta: r - l,
|
|
1550
1594
|
initialLayout: e,
|
|
1551
1595
|
panelConstraints: t,
|
|
1552
1596
|
pivotIndices: c,
|
|
@@ -1558,53 +1602,53 @@ function bt({
|
|
|
1558
1602
|
}
|
|
1559
1603
|
return {
|
|
1560
1604
|
valueControls: n,
|
|
1561
|
-
valueMax:
|
|
1605
|
+
valueMax: s,
|
|
1562
1606
|
valueMin: a,
|
|
1563
|
-
valueNow:
|
|
1607
|
+
valueNow: l
|
|
1564
1608
|
};
|
|
1565
1609
|
}
|
|
1566
|
-
function
|
|
1610
|
+
function At({
|
|
1567
1611
|
children: e,
|
|
1568
1612
|
className: t,
|
|
1569
1613
|
elementRef: n,
|
|
1570
1614
|
id: o,
|
|
1571
|
-
style:
|
|
1615
|
+
style: s,
|
|
1572
1616
|
...a
|
|
1573
1617
|
}) {
|
|
1574
|
-
const
|
|
1618
|
+
const l = ue(o), [i, r] = G({}), [u, c] = G("inactive"), [d, x] = G(null), m = fe(x, n), {
|
|
1575
1619
|
id: f,
|
|
1576
1620
|
orientation: p,
|
|
1577
1621
|
registerSeparator: h
|
|
1578
|
-
} = de(),
|
|
1579
|
-
return
|
|
1622
|
+
} = de(), v = p === "horizontal" ? "vertical" : "horizontal";
|
|
1623
|
+
return N(() => {
|
|
1580
1624
|
if (d !== null) {
|
|
1581
|
-
const
|
|
1625
|
+
const g = {
|
|
1582
1626
|
element: d,
|
|
1583
|
-
id:
|
|
1584
|
-
},
|
|
1627
|
+
id: l
|
|
1628
|
+
}, S = h(g), y = _.addListener(
|
|
1585
1629
|
"interactionStateChange",
|
|
1586
1630
|
(L) => {
|
|
1587
1631
|
c(
|
|
1588
1632
|
L.state !== "inactive" && L.hitRegions.some(
|
|
1589
|
-
(C) => C.separator ===
|
|
1633
|
+
(C) => C.separator === g
|
|
1590
1634
|
) ? L.state : "inactive"
|
|
1591
1635
|
);
|
|
1592
1636
|
}
|
|
1593
|
-
),
|
|
1637
|
+
), b = _.addListener(
|
|
1594
1638
|
"mountedGroupsChange",
|
|
1595
1639
|
(L) => {
|
|
1596
1640
|
L.forEach(
|
|
1597
|
-
({ derivedPanelConstraints: C, layout:
|
|
1598
|
-
if (
|
|
1599
|
-
const
|
|
1600
|
-
if (
|
|
1601
|
-
const
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
layout:
|
|
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,
|
|
1605
1649
|
panelConstraints: C,
|
|
1606
|
-
panelId:
|
|
1607
|
-
panelIndex:
|
|
1650
|
+
panelId: $.id,
|
|
1651
|
+
panelIndex: V
|
|
1608
1652
|
})
|
|
1609
1653
|
);
|
|
1610
1654
|
}
|
|
@@ -1614,28 +1658,28 @@ function kt({
|
|
|
1614
1658
|
}
|
|
1615
1659
|
);
|
|
1616
1660
|
return () => {
|
|
1617
|
-
|
|
1661
|
+
y(), b(), S();
|
|
1618
1662
|
};
|
|
1619
1663
|
}
|
|
1620
|
-
}, [d, f,
|
|
1664
|
+
}, [d, f, l, h]), /* @__PURE__ */ K(
|
|
1621
1665
|
"div",
|
|
1622
1666
|
{
|
|
1623
1667
|
...a,
|
|
1624
1668
|
"aria-controls": i.valueControls,
|
|
1625
|
-
"aria-orientation":
|
|
1669
|
+
"aria-orientation": v,
|
|
1626
1670
|
"aria-valuemax": i.valueMax,
|
|
1627
1671
|
"aria-valuemin": i.valueMin,
|
|
1628
1672
|
"aria-valuenow": i.valueNow,
|
|
1629
1673
|
children: e,
|
|
1630
1674
|
className: t,
|
|
1631
|
-
"data-separator":
|
|
1632
|
-
"data-testid":
|
|
1633
|
-
id:
|
|
1675
|
+
"data-separator": u,
|
|
1676
|
+
"data-testid": l,
|
|
1677
|
+
id: l,
|
|
1634
1678
|
ref: m,
|
|
1635
1679
|
role: "separator",
|
|
1636
1680
|
style: {
|
|
1637
1681
|
flexBasis: "auto",
|
|
1638
|
-
...
|
|
1682
|
+
...s,
|
|
1639
1683
|
flexGrow: 0,
|
|
1640
1684
|
flexShrink: 0
|
|
1641
1685
|
},
|
|
@@ -1644,13 +1688,13 @@ function kt({
|
|
|
1644
1688
|
);
|
|
1645
1689
|
}
|
|
1646
1690
|
export {
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
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
|
|
1655
1699
|
};
|
|
1656
1700
|
//# sourceMappingURL=react-resizable-panels.js.map
|