react-resizable-panels 4.7.3 → 4.7.5
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.
|
@@ -136,14 +136,14 @@ function L(e, t = "Assertion error") {
|
|
|
136
136
|
}
|
|
137
137
|
function Se(e, t) {
|
|
138
138
|
return Array.from(t).sort(
|
|
139
|
-
e === "horizontal" ?
|
|
139
|
+
e === "horizontal" ? xt : bt
|
|
140
140
|
);
|
|
141
141
|
}
|
|
142
|
-
function
|
|
142
|
+
function xt(e, t) {
|
|
143
143
|
const n = e.element.offsetLeft - t.element.offsetLeft;
|
|
144
144
|
return n !== 0 ? n : e.element.offsetWidth - t.element.offsetWidth;
|
|
145
145
|
}
|
|
146
|
-
function
|
|
146
|
+
function bt(e, t) {
|
|
147
147
|
const n = e.element.offsetTop - t.element.offsetTop;
|
|
148
148
|
return n !== 0 ? n : e.element.offsetHeight - t.element.offsetHeight;
|
|
149
149
|
}
|
|
@@ -185,19 +185,19 @@ function Pt() {
|
|
|
185
185
|
function Ye(e) {
|
|
186
186
|
const { element: t, orientation: n, panels: o, separators: i } = e, s = Se(
|
|
187
187
|
n,
|
|
188
|
-
Array.from(t.children).filter(Xe).map((
|
|
189
|
-
).map(({ element:
|
|
188
|
+
Array.from(t.children).filter(Xe).map((b) => ({ element: b }))
|
|
189
|
+
).map(({ element: b }) => b), l = [];
|
|
190
190
|
let r = !1, a = !1, u = -1, c = -1, m = 0, d, v = [];
|
|
191
191
|
{
|
|
192
|
-
let
|
|
192
|
+
let b = -1;
|
|
193
193
|
for (const f of s)
|
|
194
|
-
f.hasAttribute("data-panel") && (
|
|
194
|
+
f.hasAttribute("data-panel") && (b++, f.ariaDisabled === null && (m++, u === -1 && (u = b), c = b));
|
|
195
195
|
}
|
|
196
196
|
if (m > 1) {
|
|
197
|
-
let
|
|
197
|
+
let b = -1;
|
|
198
198
|
for (const f of s)
|
|
199
199
|
if (f.hasAttribute("data-panel")) {
|
|
200
|
-
|
|
200
|
+
b++;
|
|
201
201
|
const h = o.find(
|
|
202
202
|
(g) => g.element === f
|
|
203
203
|
);
|
|
@@ -226,14 +226,14 @@ function Ye(e) {
|
|
|
226
226
|
break;
|
|
227
227
|
}
|
|
228
228
|
case 1: {
|
|
229
|
-
const P = v[0],
|
|
229
|
+
const P = v[0], M = wt({
|
|
230
230
|
orientation: n,
|
|
231
231
|
rects: [g, y],
|
|
232
232
|
targetRect: P.element.getBoundingClientRect()
|
|
233
233
|
});
|
|
234
234
|
z = [
|
|
235
235
|
P,
|
|
236
|
-
|
|
236
|
+
M === g ? p : S
|
|
237
237
|
];
|
|
238
238
|
break;
|
|
239
239
|
}
|
|
@@ -277,8 +277,8 @@ function Ye(e) {
|
|
|
277
277
|
p.height + C
|
|
278
278
|
);
|
|
279
279
|
}
|
|
280
|
-
const
|
|
281
|
-
!r && !
|
|
280
|
+
const M = b <= u || b > c;
|
|
281
|
+
!r && !M && l.push({
|
|
282
282
|
group: e,
|
|
283
283
|
groupSize: Q({ group: e }),
|
|
284
284
|
panels: [d, h],
|
|
@@ -505,11 +505,11 @@ function Ot(e, t) {
|
|
|
505
505
|
return !1;
|
|
506
506
|
return !0;
|
|
507
507
|
}
|
|
508
|
-
function
|
|
508
|
+
function k(e, t, n = 0) {
|
|
509
509
|
return Math.abs(D(e) - D(t)) <= n;
|
|
510
510
|
}
|
|
511
511
|
function G(e, t) {
|
|
512
|
-
return
|
|
512
|
+
return k(e, t) ? 0 : e > t ? 1 : -1;
|
|
513
513
|
}
|
|
514
514
|
function Y({
|
|
515
515
|
overrideDisabledPanels: e,
|
|
@@ -542,7 +542,7 @@ function se({
|
|
|
542
542
|
prevLayout: i,
|
|
543
543
|
trigger: s
|
|
544
544
|
}) {
|
|
545
|
-
if (
|
|
545
|
+
if (k(e, 0))
|
|
546
546
|
return t;
|
|
547
547
|
const l = s === "imperative-api", r = Object.values(t), a = Object.values(i), u = [...r], [c, m] = o;
|
|
548
548
|
L(c != null, "Invalid first pivot index"), L(m != null, "Invalid second pivot index");
|
|
@@ -565,7 +565,7 @@ function se({
|
|
|
565
565
|
if (L(
|
|
566
566
|
S != null,
|
|
567
567
|
`Previous layout not found for panel index ${f}`
|
|
568
|
-
),
|
|
568
|
+
), k(S, g)) {
|
|
569
569
|
const p = z - S;
|
|
570
570
|
G(p, Math.abs(e)) > 0 && (e = e < 0 ? 0 - p : p);
|
|
571
571
|
}
|
|
@@ -587,7 +587,7 @@ function se({
|
|
|
587
587
|
if (L(
|
|
588
588
|
S != null,
|
|
589
589
|
`Previous layout not found for panel index ${f}`
|
|
590
|
-
),
|
|
590
|
+
), k(S, z)) {
|
|
591
591
|
const p = S - g;
|
|
592
592
|
G(p, Math.abs(e)) > 0 && (e = e < 0 ? 0 - p : p);
|
|
593
593
|
}
|
|
@@ -604,11 +604,11 @@ function se({
|
|
|
604
604
|
const g = r[f], { collapsible: y, collapsedSize: z, minSize: S } = h;
|
|
605
605
|
if (y && G(g, S) < 0)
|
|
606
606
|
if (e > 0) {
|
|
607
|
-
const p = S - z, P = p / 2,
|
|
608
|
-
G(
|
|
607
|
+
const p = S - z, P = p / 2, M = g + e;
|
|
608
|
+
G(M, S) < 0 && (e = G(e, P) <= 0 ? 0 : p);
|
|
609
609
|
} else {
|
|
610
|
-
const p = S - z, P = 100 - p / 2,
|
|
611
|
-
G(
|
|
610
|
+
const p = S - z, P = 100 - p / 2, M = g - e;
|
|
611
|
+
G(M, S) < 0 && (e = G(100 + e, P) > 0 ? 0 : -p);
|
|
612
612
|
}
|
|
613
613
|
break;
|
|
614
614
|
}
|
|
@@ -648,7 +648,7 @@ function se({
|
|
|
648
648
|
prevSize: y,
|
|
649
649
|
size: z
|
|
650
650
|
});
|
|
651
|
-
if (!
|
|
651
|
+
if (!k(y, S) && (d += y - S, u[h] = S, d.toFixed(3).localeCompare(Math.abs(e).toFixed(3), void 0, {
|
|
652
652
|
numeric: !0
|
|
653
653
|
}) >= 0))
|
|
654
654
|
break;
|
|
@@ -669,7 +669,7 @@ function se({
|
|
|
669
669
|
prevSize: h,
|
|
670
670
|
size: g
|
|
671
671
|
});
|
|
672
|
-
if (u[f] = y, !
|
|
672
|
+
if (u[f] = y, !k(y, g)) {
|
|
673
673
|
let z = g - y, p = e < 0 ? m : c;
|
|
674
674
|
for (; p >= 0 && p < n.length; ) {
|
|
675
675
|
const P = u[p];
|
|
@@ -677,13 +677,13 @@ function se({
|
|
|
677
677
|
P != null,
|
|
678
678
|
`Previous layout not found for panel index ${p}`
|
|
679
679
|
);
|
|
680
|
-
const
|
|
680
|
+
const M = P + z, C = Y({
|
|
681
681
|
overrideDisabledPanels: l,
|
|
682
682
|
panelConstraints: n[p],
|
|
683
683
|
prevSize: P,
|
|
684
|
-
size:
|
|
684
|
+
size: M
|
|
685
685
|
});
|
|
686
|
-
if (
|
|
686
|
+
if (k(P, C) || (z -= C - P, u[p] = C), k(z, 0))
|
|
687
687
|
break;
|
|
688
688
|
e > 0 ? p-- : p++;
|
|
689
689
|
}
|
|
@@ -693,10 +693,10 @@ function se({
|
|
|
693
693
|
(f, h) => h + f,
|
|
694
694
|
0
|
|
695
695
|
);
|
|
696
|
-
if (!
|
|
696
|
+
if (!k(v, 100, 0.1))
|
|
697
697
|
return i;
|
|
698
|
-
const
|
|
699
|
-
return u.reduce((f, h, g) => (f[
|
|
698
|
+
const b = Object.keys(i);
|
|
699
|
+
return u.reduce((f, h, g) => (f[b[g]] = h, f), {});
|
|
700
700
|
}
|
|
701
701
|
function j(e, t) {
|
|
702
702
|
if (Object.keys(e).length !== Object.keys(t).length)
|
|
@@ -718,7 +718,7 @@ function B({
|
|
|
718
718
|
throw Error(
|
|
719
719
|
`Invalid ${t.length} panel layout: ${o.map((r) => `${r}%`).join(", ")}`
|
|
720
720
|
);
|
|
721
|
-
if (!
|
|
721
|
+
if (!k(i, 100) && o.length > 0)
|
|
722
722
|
for (let r = 0; r < t.length; r++) {
|
|
723
723
|
const a = o[r];
|
|
724
724
|
L(a != null, `No layout data found for index ${r}`);
|
|
@@ -739,7 +739,7 @@ function B({
|
|
|
739
739
|
});
|
|
740
740
|
u != c && (s += u - c, o[r] = c);
|
|
741
741
|
}
|
|
742
|
-
if (!
|
|
742
|
+
if (!k(s, 0))
|
|
743
743
|
for (let r = 0; r < t.length; r++) {
|
|
744
744
|
const a = o[r];
|
|
745
745
|
L(a != null, `No layout data found for index ${r}`);
|
|
@@ -749,7 +749,7 @@ function B({
|
|
|
749
749
|
prevSize: a,
|
|
750
750
|
size: u
|
|
751
751
|
});
|
|
752
|
-
if (a !== c && (s -= c - a, o[r] = c,
|
|
752
|
+
if (a !== c && (s -= c - a, o[r] = c, k(s, 0)))
|
|
753
753
|
break;
|
|
754
754
|
}
|
|
755
755
|
const l = Object.keys(e);
|
|
@@ -808,7 +808,7 @@ function et({
|
|
|
808
808
|
group: m,
|
|
809
809
|
groupSize: d,
|
|
810
810
|
layout: v,
|
|
811
|
-
separatorToPanels:
|
|
811
|
+
separatorToPanels: b
|
|
812
812
|
} = n(), f = m.panels.findIndex((z) => z.id === t), h = f === m.panels.length - 1, g = se({
|
|
813
813
|
delta: h ? a - r : r - a,
|
|
814
814
|
initialLayout: v,
|
|
@@ -825,7 +825,7 @@ function et({
|
|
|
825
825
|
derivedPanelConstraints: c,
|
|
826
826
|
groupSize: d,
|
|
827
827
|
layout: y,
|
|
828
|
-
separatorToPanels:
|
|
828
|
+
separatorToPanels: b
|
|
829
829
|
});
|
|
830
830
|
};
|
|
831
831
|
return {
|
|
@@ -849,7 +849,7 @@ function et({
|
|
|
849
849
|
},
|
|
850
850
|
isCollapsed: () => {
|
|
851
851
|
const { collapsible: r, collapsedSize: a } = o(), u = s();
|
|
852
|
-
return r &&
|
|
852
|
+
return r && k(a, u);
|
|
853
853
|
},
|
|
854
854
|
resize: (r) => {
|
|
855
855
|
const { group: a } = n(), { element: u } = i(), c = Q({ group: a }), m = te({
|
|
@@ -1111,7 +1111,7 @@ function _t({
|
|
|
1111
1111
|
}
|
|
1112
1112
|
}
|
|
1113
1113
|
const _e = /* @__PURE__ */ new WeakMap();
|
|
1114
|
-
function
|
|
1114
|
+
function xe(e) {
|
|
1115
1115
|
if (e.defaultView === null || e.defaultView === void 0)
|
|
1116
1116
|
return;
|
|
1117
1117
|
let { prevStyle: t, styleSheet: n } = _e.get(e) ?? {};
|
|
@@ -1151,7 +1151,7 @@ function st({
|
|
|
1151
1151
|
}) {
|
|
1152
1152
|
let r = 0;
|
|
1153
1153
|
n.forEach((u) => {
|
|
1154
|
-
const { group: c, groupSize: m } = u, { orientation: d, panels: v } = c, { disableCursor:
|
|
1154
|
+
const { group: c, groupSize: m } = u, { orientation: d, panels: v } = c, { disableCursor: b } = c.mutableState;
|
|
1155
1155
|
let f = 0;
|
|
1156
1156
|
s ? d === "horizontal" ? f = (t.clientX - s.x) / m * 100 : f = (t.clientY - s.y) / m * 100 : d === "horizontal" ? f = t.clientX < 0 ? -100 : 100 : f = t.clientY < 0 ? -100 : 100;
|
|
1157
1157
|
const h = o.get(c), g = i.get(c);
|
|
@@ -1165,7 +1165,7 @@ function st({
|
|
|
1165
1165
|
separatorToPanels: P
|
|
1166
1166
|
} = g;
|
|
1167
1167
|
if (z && p && P) {
|
|
1168
|
-
const
|
|
1168
|
+
const M = se({
|
|
1169
1169
|
delta: f,
|
|
1170
1170
|
initialLayout: h,
|
|
1171
1171
|
panelConstraints: z,
|
|
@@ -1173,8 +1173,8 @@ function st({
|
|
|
1173
1173
|
prevLayout: p,
|
|
1174
1174
|
trigger: "mouse-or-touch"
|
|
1175
1175
|
});
|
|
1176
|
-
if (j(
|
|
1177
|
-
if (f !== 0 && !
|
|
1176
|
+
if (j(M, p)) {
|
|
1177
|
+
if (f !== 0 && !b)
|
|
1178
1178
|
switch (d) {
|
|
1179
1179
|
case "horizontal": {
|
|
1180
1180
|
r |= f < 0 ? nt : ot;
|
|
@@ -1190,13 +1190,13 @@ function st({
|
|
|
1190
1190
|
defaultLayoutDeferred: y,
|
|
1191
1191
|
derivedPanelConstraints: z,
|
|
1192
1192
|
groupSize: S,
|
|
1193
|
-
layout:
|
|
1193
|
+
layout: M,
|
|
1194
1194
|
separatorToPanels: P
|
|
1195
1195
|
});
|
|
1196
1196
|
}
|
|
1197
1197
|
});
|
|
1198
1198
|
let a = 0;
|
|
1199
|
-
t.movementX === 0 ? a |= l & Ge : a |= r & Ge, t.movementY === 0 ? a |= l & Ae : a |= r & Ae, At(a),
|
|
1199
|
+
t.movementX === 0 ? a |= l & Ge : a |= r & Ge, t.movementY === 0 ? a |= l & Ae : a |= r & Ae, At(a), xe(e);
|
|
1200
1200
|
}
|
|
1201
1201
|
function Fe(e) {
|
|
1202
1202
|
const t = U(), n = W();
|
|
@@ -1231,6 +1231,11 @@ function $e(e) {
|
|
|
1231
1231
|
});
|
|
1232
1232
|
return;
|
|
1233
1233
|
}
|
|
1234
|
+
for (const o of t.hitRegions)
|
|
1235
|
+
if (o.separator) {
|
|
1236
|
+
const { element: i } = o.separator;
|
|
1237
|
+
i.hasPointerCapture?.(e.pointerId) || i.setPointerCapture?.(e.pointerId);
|
|
1238
|
+
}
|
|
1234
1239
|
st({
|
|
1235
1240
|
document: e.currentTarget,
|
|
1236
1241
|
event: e,
|
|
@@ -1251,7 +1256,7 @@ function $e(e) {
|
|
|
1251
1256
|
cursorFlags: 0,
|
|
1252
1257
|
hitRegions: o,
|
|
1253
1258
|
state: "hover"
|
|
1254
|
-
}),
|
|
1259
|
+
}), xe(e.currentTarget);
|
|
1255
1260
|
break;
|
|
1256
1261
|
}
|
|
1257
1262
|
}
|
|
@@ -1277,7 +1282,7 @@ function Ve(e) {
|
|
|
1277
1282
|
Z({
|
|
1278
1283
|
cursorFlags: 0,
|
|
1279
1284
|
state: "inactive"
|
|
1280
|
-
}), t.hitRegions.length > 0 && (
|
|
1285
|
+
}), t.hitRegions.length > 0 && (xe(e.currentTarget), t.hitRegions.forEach((n) => {
|
|
1281
1286
|
const o = $(n.group.id, !0);
|
|
1282
1287
|
_(n.group, o);
|
|
1283
1288
|
}), e.preventDefault());
|
|
@@ -1336,10 +1341,10 @@ function Ht({
|
|
|
1336
1341
|
switch (m.panelConstraints.groupResizeBehavior) {
|
|
1337
1342
|
case "preserve-pixel-size": {
|
|
1338
1343
|
l = !0;
|
|
1339
|
-
const v = d / 100 * n,
|
|
1344
|
+
const v = d / 100 * n, b = D(
|
|
1340
1345
|
v / t * 100
|
|
1341
1346
|
);
|
|
1342
|
-
r.set(m.id,
|
|
1347
|
+
r.set(m.id, b), i += b;
|
|
1343
1348
|
break;
|
|
1344
1349
|
}
|
|
1345
1350
|
case "preserve-relative-size":
|
|
@@ -1397,13 +1402,13 @@ function jt(e) {
|
|
|
1397
1402
|
const S = $(e.id);
|
|
1398
1403
|
if (!S)
|
|
1399
1404
|
return;
|
|
1400
|
-
const p = ge(e), P = S.defaultLayoutDeferred ? je(p) : S.layout,
|
|
1405
|
+
const p = ge(e), P = S.defaultLayoutDeferred ? je(p) : S.layout, M = Ht({
|
|
1401
1406
|
group: e,
|
|
1402
1407
|
nextGroupSize: z,
|
|
1403
1408
|
prevGroupSize: S.groupSize,
|
|
1404
1409
|
prevLayout: P
|
|
1405
1410
|
}), C = B({
|
|
1406
|
-
layout:
|
|
1411
|
+
layout: M,
|
|
1407
1412
|
panelConstraints: p
|
|
1408
1413
|
});
|
|
1409
1414
|
if (!S.defaultLayoutDeferred && j(S.layout, C) && $t(
|
|
@@ -1475,7 +1480,7 @@ function Bt() {
|
|
|
1475
1480
|
const [e, t] = re({}), n = ne(() => t({}), []);
|
|
1476
1481
|
return [e, n];
|
|
1477
1482
|
}
|
|
1478
|
-
function
|
|
1483
|
+
function be(e) {
|
|
1479
1484
|
const t = pt();
|
|
1480
1485
|
return `${e ?? t}`;
|
|
1481
1486
|
}
|
|
@@ -1545,14 +1550,14 @@ function Ut({
|
|
|
1545
1550
|
style: d,
|
|
1546
1551
|
...v
|
|
1547
1552
|
}) {
|
|
1548
|
-
const
|
|
1553
|
+
const b = T({
|
|
1549
1554
|
onLayoutChange: {},
|
|
1550
1555
|
onLayoutChanged: {}
|
|
1551
|
-
}), f = oe((
|
|
1552
|
-
j(
|
|
1553
|
-
}), h = oe((
|
|
1554
|
-
j(
|
|
1555
|
-
}), g =
|
|
1556
|
+
}), f = oe((x) => {
|
|
1557
|
+
j(b.current.onLayoutChange, x) || (b.current.onLayoutChange = x, a?.(x));
|
|
1558
|
+
}), h = oe((x) => {
|
|
1559
|
+
j(b.current.onLayoutChanged, x) || (b.current.onLayoutChanged = x, u?.(x));
|
|
1560
|
+
}), g = be(r), y = T(null), [z, S] = Bt(), p = T({
|
|
1556
1561
|
lastExpandedPanelSizes: {},
|
|
1557
1562
|
layouts: {},
|
|
1558
1563
|
panels: [],
|
|
@@ -1560,27 +1565,28 @@ function Ut({
|
|
|
1560
1565
|
separators: []
|
|
1561
1566
|
}), P = we(y, s);
|
|
1562
1567
|
Wt(g, l);
|
|
1563
|
-
const
|
|
1564
|
-
(
|
|
1565
|
-
const E = W(),
|
|
1566
|
-
if (
|
|
1568
|
+
const M = oe(
|
|
1569
|
+
(x, w) => {
|
|
1570
|
+
const E = W(), R = Me(x), I = $(x);
|
|
1571
|
+
if (I) {
|
|
1567
1572
|
let O = !1;
|
|
1568
1573
|
switch (E.state) {
|
|
1569
1574
|
case "active": {
|
|
1570
1575
|
O = E.hitRegions.some(
|
|
1571
|
-
(H) => H.group ===
|
|
1576
|
+
(H) => H.group === R
|
|
1572
1577
|
);
|
|
1573
1578
|
break;
|
|
1574
1579
|
}
|
|
1575
1580
|
}
|
|
1576
1581
|
return {
|
|
1577
|
-
flexGrow:
|
|
1582
|
+
flexGrow: I.layout[w] ?? 1,
|
|
1578
1583
|
pointerEvents: O ? "none" : void 0
|
|
1579
1584
|
};
|
|
1580
1585
|
}
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1586
|
+
if (n?.[w])
|
|
1587
|
+
return {
|
|
1588
|
+
flexGrow: n?.[w]
|
|
1589
|
+
};
|
|
1584
1590
|
}
|
|
1585
1591
|
), C = Pe({
|
|
1586
1592
|
defaultLayout: n,
|
|
@@ -1590,54 +1596,54 @@ function Ut({
|
|
|
1590
1596
|
get disableCursor() {
|
|
1591
1597
|
return !!C.disableCursor;
|
|
1592
1598
|
},
|
|
1593
|
-
getPanelStyles:
|
|
1599
|
+
getPanelStyles: M,
|
|
1594
1600
|
id: g,
|
|
1595
1601
|
orientation: c,
|
|
1596
|
-
registerPanel: (
|
|
1602
|
+
registerPanel: (x) => {
|
|
1597
1603
|
const w = p.current;
|
|
1598
1604
|
return w.panels = Se(c, [
|
|
1599
1605
|
...w.panels,
|
|
1600
|
-
|
|
1606
|
+
x
|
|
1601
1607
|
]), S(), () => {
|
|
1602
1608
|
w.panels = w.panels.filter(
|
|
1603
|
-
(E) => E !==
|
|
1609
|
+
(E) => E !== x
|
|
1604
1610
|
), S();
|
|
1605
1611
|
};
|
|
1606
1612
|
},
|
|
1607
|
-
registerSeparator: (
|
|
1613
|
+
registerSeparator: (x) => {
|
|
1608
1614
|
const w = p.current;
|
|
1609
1615
|
return w.separators = Se(c, [
|
|
1610
1616
|
...w.separators,
|
|
1611
|
-
|
|
1617
|
+
x
|
|
1612
1618
|
]), S(), () => {
|
|
1613
1619
|
w.separators = w.separators.filter(
|
|
1614
|
-
(E) => E !==
|
|
1620
|
+
(E) => E !== x
|
|
1615
1621
|
), S();
|
|
1616
1622
|
};
|
|
1617
1623
|
},
|
|
1618
|
-
togglePanelDisabled: (
|
|
1619
|
-
const
|
|
1620
|
-
(H) => H.id ===
|
|
1624
|
+
togglePanelDisabled: (x, w) => {
|
|
1625
|
+
const R = p.current.panels.find(
|
|
1626
|
+
(H) => H.id === x
|
|
1621
1627
|
);
|
|
1622
|
-
|
|
1623
|
-
const
|
|
1624
|
-
|
|
1628
|
+
R && (R.panelConstraints.disabled = w);
|
|
1629
|
+
const I = Me(g), O = $(g);
|
|
1630
|
+
I && O && _(I, {
|
|
1625
1631
|
...O,
|
|
1626
|
-
derivedPanelConstraints: ge(
|
|
1632
|
+
derivedPanelConstraints: ge(I)
|
|
1627
1633
|
});
|
|
1628
1634
|
},
|
|
1629
|
-
toggleSeparatorDisabled: (
|
|
1630
|
-
const
|
|
1631
|
-
(
|
|
1635
|
+
toggleSeparatorDisabled: (x, w) => {
|
|
1636
|
+
const R = p.current.separators.find(
|
|
1637
|
+
(I) => I.id === x
|
|
1632
1638
|
);
|
|
1633
|
-
|
|
1639
|
+
R && (R.disabled = w);
|
|
1634
1640
|
}
|
|
1635
1641
|
}),
|
|
1636
|
-
[
|
|
1642
|
+
[M, g, S, c, C]
|
|
1637
1643
|
), F = T(null);
|
|
1638
1644
|
return K(() => {
|
|
1639
|
-
const
|
|
1640
|
-
if (
|
|
1645
|
+
const x = y.current;
|
|
1646
|
+
if (x === null)
|
|
1641
1647
|
return;
|
|
1642
1648
|
const w = p.current;
|
|
1643
1649
|
let E;
|
|
@@ -1648,9 +1654,9 @@ function Ut({
|
|
|
1648
1654
|
ae !== void 0 && (E[ee.id] = ae);
|
|
1649
1655
|
}
|
|
1650
1656
|
}
|
|
1651
|
-
const
|
|
1657
|
+
const R = {
|
|
1652
1658
|
disabled: !!i,
|
|
1653
|
-
element:
|
|
1659
|
+
element: x,
|
|
1654
1660
|
id: g,
|
|
1655
1661
|
mutableState: {
|
|
1656
1662
|
defaultLayout: E,
|
|
@@ -1663,26 +1669,26 @@ function Ut({
|
|
|
1663
1669
|
resizeTargetMinimumSize: w.resizeTargetMinimumSize,
|
|
1664
1670
|
separators: w.separators
|
|
1665
1671
|
};
|
|
1666
|
-
F.current =
|
|
1667
|
-
const
|
|
1672
|
+
F.current = R;
|
|
1673
|
+
const I = jt(R), { defaultLayoutDeferred: O, derivedPanelConstraints: H, layout: Ce } = $(R.id, !0);
|
|
1668
1674
|
!O && H.length > 0 && (f(Ce), h(Ce));
|
|
1669
1675
|
const lt = ye(g, (ee) => {
|
|
1670
1676
|
const { defaultLayoutDeferred: ae, derivedPanelConstraints: Re, layout: le } = ee.next;
|
|
1671
1677
|
if (ae || Re.length === 0)
|
|
1672
1678
|
return;
|
|
1673
|
-
const ut =
|
|
1674
|
-
|
|
1679
|
+
const ut = R.panels.map(({ id: N }) => N).join(",");
|
|
1680
|
+
R.mutableState.layouts[ut] = le, Re.forEach((N) => {
|
|
1675
1681
|
if (N.collapsible) {
|
|
1676
1682
|
const { layout: pe } = ee.prev ?? {};
|
|
1677
1683
|
if (pe) {
|
|
1678
|
-
const ft =
|
|
1684
|
+
const ft = k(
|
|
1679
1685
|
N.collapsedSize,
|
|
1680
1686
|
le[N.panelId]
|
|
1681
|
-
), dt =
|
|
1687
|
+
), dt = k(
|
|
1682
1688
|
N.collapsedSize,
|
|
1683
1689
|
pe[N.panelId]
|
|
1684
1690
|
);
|
|
1685
|
-
ft && !dt && (
|
|
1691
|
+
ft && !dt && (R.mutableState.expandedPanelSizes[N.panelId] = pe[N.panelId]);
|
|
1686
1692
|
}
|
|
1687
1693
|
}
|
|
1688
1694
|
});
|
|
@@ -1690,7 +1696,7 @@ function Ut({
|
|
|
1690
1696
|
f(le), ct && h(le);
|
|
1691
1697
|
});
|
|
1692
1698
|
return () => {
|
|
1693
|
-
F.current = null,
|
|
1699
|
+
F.current = null, I(), lt();
|
|
1694
1700
|
};
|
|
1695
1701
|
}, [
|
|
1696
1702
|
i,
|
|
@@ -1701,8 +1707,8 @@ function Ut({
|
|
|
1701
1707
|
z,
|
|
1702
1708
|
C
|
|
1703
1709
|
]), de(() => {
|
|
1704
|
-
const
|
|
1705
|
-
|
|
1710
|
+
const x = F.current;
|
|
1711
|
+
x && (x.mutableState.defaultLayout = n, x.mutableState.disableCursor = !!o);
|
|
1706
1712
|
}), /* @__PURE__ */ ie(at.Provider, { value: X, children: /* @__PURE__ */ ie(
|
|
1707
1713
|
"div",
|
|
1708
1714
|
{
|
|
@@ -1757,10 +1763,10 @@ function nn({
|
|
|
1757
1763
|
const m = ne(
|
|
1758
1764
|
(v) => {
|
|
1759
1765
|
c();
|
|
1760
|
-
let
|
|
1761
|
-
i ?
|
|
1766
|
+
let b;
|
|
1767
|
+
i ? b = me(s, Object.keys(v)) : b = me(s, []);
|
|
1762
1768
|
try {
|
|
1763
|
-
n.setItem(
|
|
1769
|
+
n.setItem(b, JSON.stringify(v));
|
|
1764
1770
|
} catch (f) {
|
|
1765
1771
|
console.error(f);
|
|
1766
1772
|
}
|
|
@@ -1841,26 +1847,26 @@ function qt({
|
|
|
1841
1847
|
onResize: m,
|
|
1842
1848
|
panelRef: d,
|
|
1843
1849
|
style: v,
|
|
1844
|
-
...
|
|
1850
|
+
...b
|
|
1845
1851
|
}) {
|
|
1846
|
-
const f = !!a, h =
|
|
1852
|
+
const f = !!a, h = be(a), g = Pe({
|
|
1847
1853
|
disabled: s
|
|
1848
1854
|
}), y = T(null), z = we(y, l), {
|
|
1849
1855
|
getPanelStyles: S,
|
|
1850
1856
|
id: p,
|
|
1851
1857
|
orientation: P,
|
|
1852
|
-
registerPanel:
|
|
1858
|
+
registerPanel: M,
|
|
1853
1859
|
togglePanelDisabled: C
|
|
1854
1860
|
} = Le(), X = m !== null, F = oe(
|
|
1855
|
-
(
|
|
1856
|
-
m?.(
|
|
1861
|
+
(R, I, O) => {
|
|
1862
|
+
m?.(R, a, O);
|
|
1857
1863
|
}
|
|
1858
1864
|
);
|
|
1859
1865
|
K(() => {
|
|
1860
|
-
const
|
|
1861
|
-
if (
|
|
1862
|
-
const
|
|
1863
|
-
element:
|
|
1866
|
+
const R = y.current;
|
|
1867
|
+
if (R !== null) {
|
|
1868
|
+
const I = {
|
|
1869
|
+
element: R,
|
|
1864
1870
|
id: h,
|
|
1865
1871
|
idIsStable: f,
|
|
1866
1872
|
mutableValues: {
|
|
@@ -1878,7 +1884,7 @@ function qt({
|
|
|
1878
1884
|
minSize: c
|
|
1879
1885
|
}
|
|
1880
1886
|
};
|
|
1881
|
-
return
|
|
1887
|
+
return M(I);
|
|
1882
1888
|
}
|
|
1883
1889
|
}, [
|
|
1884
1890
|
r,
|
|
@@ -1891,22 +1897,29 @@ function qt({
|
|
|
1891
1897
|
u,
|
|
1892
1898
|
c,
|
|
1893
1899
|
F,
|
|
1894
|
-
|
|
1900
|
+
M,
|
|
1895
1901
|
g
|
|
1896
1902
|
]), de(() => {
|
|
1897
1903
|
C(h, !!s);
|
|
1898
1904
|
}, [s, h, C]), Xt(h, d);
|
|
1899
|
-
const
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
() =>
|
|
1905
|
+
const x = () => {
|
|
1906
|
+
const R = S(p, h);
|
|
1907
|
+
if (R)
|
|
1908
|
+
return JSON.stringify(R);
|
|
1909
|
+
}, w = Ke(
|
|
1910
|
+
(R) => ye(p, R),
|
|
1911
|
+
x,
|
|
1912
|
+
x
|
|
1905
1913
|
);
|
|
1906
|
-
|
|
1914
|
+
let E;
|
|
1915
|
+
return w ? E = JSON.parse(w) : i ? E = {
|
|
1916
|
+
flexGrow: void 0,
|
|
1917
|
+
flexShrink: void 0,
|
|
1918
|
+
flexBasis: i
|
|
1919
|
+
} : E = { flexGrow: 1 }, /* @__PURE__ */ ie(
|
|
1907
1920
|
"div",
|
|
1908
1921
|
{
|
|
1909
|
-
...
|
|
1922
|
+
...b,
|
|
1910
1923
|
"aria-disabled": s || void 0,
|
|
1911
1924
|
"data-panel": !0,
|
|
1912
1925
|
"data-testid": h,
|
|
@@ -1918,7 +1931,7 @@ function qt({
|
|
|
1918
1931
|
flexBasis: 0,
|
|
1919
1932
|
flexShrink: 1,
|
|
1920
1933
|
overflow: "visible",
|
|
1921
|
-
...
|
|
1934
|
+
...E
|
|
1922
1935
|
},
|
|
1923
1936
|
children: /* @__PURE__ */ ie(
|
|
1924
1937
|
"div",
|
|
@@ -2009,9 +2022,9 @@ function Zt({
|
|
|
2009
2022
|
style: s,
|
|
2010
2023
|
...l
|
|
2011
2024
|
}) {
|
|
2012
|
-
const r =
|
|
2025
|
+
const r = be(i), a = Pe({
|
|
2013
2026
|
disabled: n
|
|
2014
|
-
}), [u, c] = re({}), [m, d] = re("inactive"), v = T(null),
|
|
2027
|
+
}), [u, c] = re({}), [m, d] = re("inactive"), v = T(null), b = we(v, o), {
|
|
2015
2028
|
disableCursor: f,
|
|
2016
2029
|
id: h,
|
|
2017
2030
|
orientation: g,
|
|
@@ -2021,24 +2034,24 @@ function Zt({
|
|
|
2021
2034
|
K(() => {
|
|
2022
2035
|
const P = v.current;
|
|
2023
2036
|
if (P !== null) {
|
|
2024
|
-
const
|
|
2037
|
+
const M = {
|
|
2025
2038
|
disabled: a.disabled,
|
|
2026
2039
|
element: P,
|
|
2027
2040
|
id: r
|
|
2028
|
-
}, C = y(
|
|
2029
|
-
(
|
|
2041
|
+
}, C = y(M), X = Gt(
|
|
2042
|
+
(x) => {
|
|
2030
2043
|
d(
|
|
2031
|
-
|
|
2032
|
-
(w) => w.separator ===
|
|
2033
|
-
) ?
|
|
2044
|
+
x.next.state !== "inactive" && x.next.hitRegions.some(
|
|
2045
|
+
(w) => w.separator === M
|
|
2046
|
+
) ? x.next.state : "inactive"
|
|
2034
2047
|
);
|
|
2035
2048
|
}
|
|
2036
2049
|
), F = ye(
|
|
2037
2050
|
h,
|
|
2038
|
-
(
|
|
2039
|
-
const { derivedPanelConstraints: w, layout: E, separatorToPanels:
|
|
2040
|
-
if (
|
|
2041
|
-
const O =
|
|
2051
|
+
(x) => {
|
|
2052
|
+
const { derivedPanelConstraints: w, layout: E, separatorToPanels: R } = x.next, I = R.get(M);
|
|
2053
|
+
if (I) {
|
|
2054
|
+
const O = I[0], H = I.indexOf(O);
|
|
2042
2055
|
c(
|
|
2043
2056
|
Jt({
|
|
2044
2057
|
layout: E,
|
|
@@ -2073,7 +2086,7 @@ function Zt({
|
|
|
2073
2086
|
"data-separator": n ? "disabled" : m,
|
|
2074
2087
|
"data-testid": r,
|
|
2075
2088
|
id: r,
|
|
2076
|
-
ref:
|
|
2089
|
+
ref: b,
|
|
2077
2090
|
role: "separator",
|
|
2078
2091
|
style: {
|
|
2079
2092
|
flexBasis: "auto",
|