react-resizable-panels 4.12.2 → 4.12.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -226,14 +226,14 @@ function Ze(e) {
226
226
  break;
227
227
  }
228
228
  case 1: {
229
- const w = S[0], M = Lt({
229
+ const w = S[0], E = Lt({
230
230
  orientation: n,
231
231
  rects: [h, y],
232
232
  targetRect: w.element.getBoundingClientRect()
233
233
  });
234
234
  b = [
235
235
  w,
236
- M === h ? g : v
236
+ E === h ? g : v
237
237
  ];
238
238
  break;
239
239
  }
@@ -277,8 +277,8 @@ function Ze(e) {
277
277
  g.height + L
278
278
  );
279
279
  }
280
- const M = z <= l || z > c;
281
- !a && !M && u.push({
280
+ const E = z <= l || z > c;
281
+ !a && !E && u.push({
282
282
  group: e,
283
283
  groupSize: ne({ group: e }),
284
284
  panels: [p, d],
@@ -344,13 +344,13 @@ let ee = {
344
344
  state: "inactive"
345
345
  };
346
346
  const ze = new Qe();
347
- function B() {
347
+ function W() {
348
348
  return ee;
349
349
  }
350
350
  function Rt(e) {
351
351
  return ze.addListener("change", e);
352
352
  }
353
- function Mt(e) {
353
+ function Et(e) {
354
354
  const t = ee, n = { ...ee };
355
355
  n.cursorFlags = e, ee = n, ze.emit("change", {
356
356
  prev: t,
@@ -364,7 +364,7 @@ function te(e) {
364
364
  next: e
365
365
  });
366
366
  }
367
- const Et = (e) => e, ye = () => {
367
+ const Mt = (e) => e, ye = () => {
368
368
  }, et = 1, tt = 2, nt = 4, ot = 8, Ie = 3, ke = 12;
369
369
  let de;
370
370
  function De() {
@@ -415,14 +415,14 @@ function It({
415
415
  }
416
416
  const Te = /* @__PURE__ */ new WeakMap();
417
417
  function xe(e) {
418
- if (e.defaultView === null || e.defaultView === void 0)
418
+ if (!e.defaultView || !e.adoptedStyleSheets)
419
419
  return;
420
420
  let { prevStyle: t, styleSheet: n } = Te.get(e) ?? {};
421
421
  n === void 0 && (n = new e.defaultView.CSSStyleSheet(), e.adoptedStyleSheets && (Object.isExtensible(e.adoptedStyleSheets) ? e.adoptedStyleSheets.push(n) : e.adoptedStyleSheets = [
422
422
  ...e.adoptedStyleSheets,
423
423
  n
424
424
  ]));
425
- const o = B();
425
+ const o = W();
426
426
  switch (o.state) {
427
427
  case "active":
428
428
  case "hover": {
@@ -463,7 +463,7 @@ function H(e, t) {
463
463
  if (t)
464
464
  throw Error(`Could not find data for Group with id ${e}`);
465
465
  }
466
- function X() {
466
+ function V() {
467
467
  return F;
468
468
  }
469
469
  function Pe(e, t) {
@@ -481,21 +481,23 @@ function j(e, t, n) {
481
481
  });
482
482
  }
483
483
  function rt(e) {
484
- const t = B();
485
- let n = !1;
484
+ const t = W(), n = V();
485
+ let o = !1;
486
486
  switch (t.state) {
487
487
  case "active":
488
488
  te({
489
489
  cursorFlags: 0,
490
490
  state: "inactive"
491
- }), t.hitRegions.length > 0 && (xe(e), n = !0, t.hitRegions.forEach((o) => {
492
- const i = H(o.group.id, !0);
493
- j(o.group, i, {
491
+ }), t.hitRegions.length > 0 && (xe(e), o = !0, t.hitRegions.forEach((i) => {
492
+ if (!n.has(i.group))
493
+ return;
494
+ const s = H(i.group.id, !0);
495
+ j(i.group, s, {
494
496
  isUserInteraction: !0
495
497
  });
496
498
  }));
497
499
  }
498
- return n;
500
+ return o;
499
501
  }
500
502
  function Ge(e) {
501
503
  e.defaultPrevented || rt(e.currentTarget);
@@ -732,11 +734,11 @@ function le({
732
734
  const h = a[f], { collapsible: y, collapsedSize: b, minSize: v } = d;
733
735
  if (y && A(h, v) < 0)
734
736
  if (e > 0) {
735
- const g = v - b, w = g / 2, M = h + e;
736
- A(M, v) < 0 && (e = A(e, w) <= 0 ? 0 : g);
737
+ const g = v - b, w = g / 2, E = h + e;
738
+ A(E, v) < 0 && (e = A(e, w) <= 0 ? 0 : g);
737
739
  } else {
738
- const g = v - b, w = 100 - g / 2, M = h - e;
739
- A(M, v) < 0 && (e = A(100 + e, w) > 0 ? 0 : -g);
740
+ const g = v - b, w = 100 - g / 2, E = h - e;
741
+ A(E, v) < 0 && (e = A(100 + e, w) > 0 ? 0 : -g);
740
742
  }
741
743
  break;
742
744
  }
@@ -805,11 +807,11 @@ function le({
805
807
  w != null,
806
808
  `Previous layout not found for panel index ${g}`
807
809
  );
808
- const M = w + b, L = Z({
810
+ const E = w + b, L = Z({
809
811
  overrideDisabledPanels: u,
810
812
  panelConstraints: n[g],
811
813
  prevSize: w,
812
- size: M
814
+ size: E
813
815
  });
814
816
  if (k(w, L) || (b -= L - w, l[g] = L), k(b, 0))
815
817
  break;
@@ -826,7 +828,7 @@ function le({
826
828
  const z = Object.keys(i);
827
829
  return l.reduce((f, d, h) => (f[z[h]] = d, f), {});
828
830
  }
829
- function W(e, t) {
831
+ function K(e, t) {
830
832
  if (Object.keys(e).length !== Object.keys(t).length)
831
833
  return !1;
832
834
  for (const n in e)
@@ -834,7 +836,7 @@ function W(e, t) {
834
836
  return !1;
835
837
  return !0;
836
838
  }
837
- function K({
839
+ function X({
838
840
  layout: e,
839
841
  panelConstraints: t
840
842
  }) {
@@ -888,7 +890,7 @@ function at({
888
890
  panelId: t
889
891
  }) {
890
892
  const n = () => {
891
- const r = X();
893
+ const r = V();
892
894
  for (const [
893
895
  l,
894
896
  {
@@ -967,11 +969,11 @@ function at({
967
969
  panels: p.panels,
968
970
  prevLayout: z,
969
971
  derivedPanelConstraints: m
970
- }), h = K({
972
+ }), h = X({
971
973
  layout: d,
972
974
  panelConstraints: m
973
975
  });
974
- W(z, h) || j(p, {
976
+ K(z, h) || j(p, {
975
977
  defaultLayoutDeferred: c,
976
978
  derivedPanelConstraints: m,
977
979
  groupSize: S,
@@ -1015,7 +1017,7 @@ function at({
1015
1017
  function _e(e) {
1016
1018
  if (e.defaultPrevented)
1017
1019
  return;
1018
- const t = X();
1020
+ const t = V();
1019
1021
  we(e, t).forEach((o) => {
1020
1022
  if (o.separator && !o.separator.disableDoubleClick) {
1021
1023
  const i = o.panels.find(
@@ -1032,7 +1034,7 @@ function _e(e) {
1032
1034
  });
1033
1035
  }
1034
1036
  function pe(e) {
1035
- const t = X();
1037
+ const t = V();
1036
1038
  for (const [n] of t)
1037
1039
  if (n.separators.some(
1038
1040
  (o) => o.element === e
@@ -1044,7 +1046,7 @@ function lt({
1044
1046
  groupId: e
1045
1047
  }) {
1046
1048
  const t = () => {
1047
- const n = X();
1049
+ const n = V();
1048
1050
  for (const [o, i] of n)
1049
1051
  if (o.id === e)
1050
1052
  return { group: o, ...i };
@@ -1063,11 +1065,11 @@ function lt({
1063
1065
  groupSize: u,
1064
1066
  layout: a,
1065
1067
  separatorToPanels: r
1066
- } = t(), l = K({
1068
+ } = t(), l = X({
1067
1069
  layout: n,
1068
1070
  panelConstraints: i
1069
1071
  });
1070
- return o ? a : (W(a, l) || j(s, {
1072
+ return o ? a : (K(a, l) || j(s, {
1071
1073
  defaultLayoutDeferred: o,
1072
1074
  derivedPanelConstraints: i,
1073
1075
  groupSize: u,
@@ -1077,7 +1079,7 @@ function lt({
1077
1079
  }
1078
1080
  };
1079
1081
  }
1080
- function U(e, t) {
1082
+ function B(e, t) {
1081
1083
  const n = pe(e), o = H(n.id, !0), i = n.separators.find(
1082
1084
  (m) => m.element === e
1083
1085
  );
@@ -1091,11 +1093,11 @@ function U(e, t) {
1091
1093
  pivotIndices: u,
1092
1094
  prevLayout: r,
1093
1095
  trigger: "keyboard"
1094
- }), c = K({
1096
+ }), c = X({
1095
1097
  layout: l,
1096
1098
  panelConstraints: o.derivedPanelConstraints
1097
1099
  });
1098
- W(r, c) || j(
1100
+ K(r, c) || j(
1099
1101
  n,
1100
1102
  {
1101
1103
  defaultLayoutDeferred: o.defaultLayoutDeferred,
@@ -1118,23 +1120,23 @@ function $e(e) {
1118
1120
  if (!n.disabled)
1119
1121
  switch (e.key) {
1120
1122
  case "ArrowDown": {
1121
- e.preventDefault(), n.orientation === "vertical" && U(t, 5);
1123
+ e.preventDefault(), n.orientation === "vertical" && B(t, 5);
1122
1124
  break;
1123
1125
  }
1124
1126
  case "ArrowLeft": {
1125
- e.preventDefault(), n.orientation === "horizontal" && U(t, -5);
1127
+ e.preventDefault(), n.orientation === "horizontal" && B(t, -5);
1126
1128
  break;
1127
1129
  }
1128
1130
  case "ArrowRight": {
1129
- e.preventDefault(), n.orientation === "horizontal" && U(t, 5);
1131
+ e.preventDefault(), n.orientation === "horizontal" && B(t, 5);
1130
1132
  break;
1131
1133
  }
1132
1134
  case "ArrowUp": {
1133
- e.preventDefault(), n.orientation === "vertical" && U(t, -5);
1135
+ e.preventDefault(), n.orientation === "vertical" && B(t, -5);
1134
1136
  break;
1135
1137
  }
1136
1138
  case "End": {
1137
- e.preventDefault(), U(t, 100);
1139
+ e.preventDefault(), B(t, 100);
1138
1140
  break;
1139
1141
  }
1140
1142
  case "Enter": {
@@ -1150,7 +1152,7 @@ function $e(e) {
1150
1152
  );
1151
1153
  if (C(m, "Panel metadata not found"), m.collapsible) {
1152
1154
  const p = u[c.id], S = m.collapsedSize === p ? o.mutableState.expandedPanelSizes[c.id] ?? m.minSize : m.collapsedSize;
1153
- U(t, S - p);
1155
+ B(t, S - p);
1154
1156
  }
1155
1157
  break;
1156
1158
  }
@@ -1169,7 +1171,7 @@ function $e(e) {
1169
1171
  break;
1170
1172
  }
1171
1173
  case "Home": {
1172
- e.preventDefault(), U(t, -100);
1174
+ e.preventDefault(), B(t, -100);
1173
1175
  break;
1174
1176
  }
1175
1177
  }
@@ -1179,7 +1181,7 @@ function je(e) {
1179
1181
  return;
1180
1182
  if (e.pointerType === "mouse" && e.button > 0)
1181
1183
  return;
1182
- const t = X(), n = we(e, t), o = /* @__PURE__ */ new Map();
1184
+ const t = V(), n = we(e, t), o = /* @__PURE__ */ new Map();
1183
1185
  let i = !1;
1184
1186
  n.forEach((s) => {
1185
1187
  s.separator && (i || (i = !0, s.separator.element.focus({
@@ -1222,7 +1224,7 @@ function ut({
1222
1224
  separatorToPanels: w
1223
1225
  } = h;
1224
1226
  if (b && g && w) {
1225
- const M = le({
1227
+ const E = le({
1226
1228
  delta: f,
1227
1229
  initialLayout: d,
1228
1230
  panelConstraints: b,
@@ -1230,7 +1232,7 @@ function ut({
1230
1232
  prevLayout: g,
1231
1233
  trigger: "mouse-or-touch"
1232
1234
  });
1233
- if (W(M, g)) {
1235
+ if (K(E, g)) {
1234
1236
  if (f !== 0 && !z)
1235
1237
  switch (p) {
1236
1238
  case "horizontal": {
@@ -1247,16 +1249,16 @@ function ut({
1247
1249
  defaultLayoutDeferred: y,
1248
1250
  derivedPanelConstraints: b,
1249
1251
  groupSize: v,
1250
- layout: M,
1252
+ layout: E,
1251
1253
  separatorToPanels: w
1252
1254
  });
1253
1255
  }
1254
1256
  });
1255
1257
  let r = 0;
1256
- t.movementX === 0 ? r |= u & Ie : r |= a & Ie, t.movementY === 0 ? r |= u & ke : r |= a & ke, Mt(r), xe(e);
1258
+ t.movementX === 0 ? r |= u & Ie : r |= a & Ie, t.movementY === 0 ? r |= u & ke : r |= a & ke, Et(r), xe(e);
1257
1259
  }
1258
1260
  function He(e) {
1259
- const t = X(), n = B();
1261
+ const t = V(), n = W();
1260
1262
  switch (n.state) {
1261
1263
  case "active":
1262
1264
  ut({
@@ -1272,7 +1274,7 @@ function He(e) {
1272
1274
  function Ve(e) {
1273
1275
  if (e.defaultPrevented)
1274
1276
  return;
1275
- const t = B(), n = X();
1277
+ const t = W(), n = V();
1276
1278
  switch (t.state) {
1277
1279
  case "active": {
1278
1280
  if (
@@ -1283,6 +1285,8 @@ function Ve(e) {
1283
1285
  cursorFlags: 0,
1284
1286
  state: "inactive"
1285
1287
  }), t.hitRegions.forEach((o) => {
1288
+ if (!n.has(o.group))
1289
+ return;
1286
1290
  const i = H(o.group.id, !0);
1287
1291
  j(o.group, i, {
1288
1292
  isUserInteraction: !0
@@ -1322,7 +1326,7 @@ function Ve(e) {
1322
1326
  }
1323
1327
  function Ue(e) {
1324
1328
  if (e.relatedTarget instanceof HTMLIFrameElement)
1325
- switch (B().state) {
1329
+ switch (W().state) {
1326
1330
  case "hover":
1327
1331
  te({
1328
1332
  cursorFlags: 0,
@@ -1375,7 +1379,10 @@ function Ht(e, t) {
1375
1379
  return !1;
1376
1380
  return !0;
1377
1381
  }
1378
- function Vt({
1382
+ function Vt(e, t) {
1383
+ return e.length !== t.length ? !1 : e.every((n, o) => Ht(n, t[o]));
1384
+ }
1385
+ function Ut({
1379
1386
  group: e,
1380
1387
  nextGroupSize: t,
1381
1388
  prevGroupSize: n,
@@ -1424,7 +1431,7 @@ function Vt({
1424
1431
  }
1425
1432
  return c;
1426
1433
  }
1427
- function Ut(e, t) {
1434
+ function Bt(e, t) {
1428
1435
  const n = e.map((i) => i.id), o = Object.keys(t);
1429
1436
  if (n.length !== o.length)
1430
1437
  return !1;
@@ -1434,7 +1441,7 @@ function Ut(e, t) {
1434
1441
  return !0;
1435
1442
  }
1436
1443
  const J = /* @__PURE__ */ new Map();
1437
- function Bt(e) {
1444
+ function Wt(e) {
1438
1445
  let t = !0;
1439
1446
  C(
1440
1447
  e.element.ownerDocument.defaultView,
@@ -1451,20 +1458,20 @@ function Bt(e) {
1451
1458
  const v = H(e.id);
1452
1459
  if (!v)
1453
1460
  return;
1454
- const g = ve(e), w = v.defaultLayoutDeferred ? We(g) : v.layout, M = Vt({
1461
+ const g = ve(e), w = v.defaultLayoutDeferred ? We(g) : v.layout, E = Ut({
1455
1462
  group: e,
1456
1463
  nextGroupSize: b,
1457
1464
  prevGroupSize: v.groupSize,
1458
1465
  prevLayout: w
1459
- }), L = K({
1460
- layout: M,
1466
+ }), L = X({
1467
+ layout: E,
1461
1468
  panelConstraints: g
1462
1469
  });
1463
- if (!v.defaultLayoutDeferred && W(v.layout, L) && Ht(
1470
+ if (!v.defaultLayoutDeferred && K(v.layout, L) && Vt(
1464
1471
  v.derivedPanelConstraints,
1465
1472
  g
1466
1473
  ) && v.groupSize === b)
1467
- return;
1474
+ continue;
1468
1475
  j(e, {
1469
1476
  defaultLayoutDeferred: !1,
1470
1477
  derivedPanelConstraints: g,
@@ -1485,8 +1492,8 @@ function Bt(e) {
1485
1492
  });
1486
1493
  const u = ne({ group: e }), a = ve(e), r = e.panels.map(({ id: f }) => f).join(",");
1487
1494
  let l = e.mutableState.defaultLayout;
1488
- l && (Ut(e.panels, l) || (l = void 0));
1489
- const c = e.mutableState.layouts[r] ?? l ?? We(a), m = K({
1495
+ l && (Bt(e.panels, l) || (l = void 0));
1496
+ const c = e.mutableState.layouts[r] ?? l ?? We(a), m = X({
1490
1497
  layout: c,
1491
1498
  panelConstraints: a
1492
1499
  }), p = e.element.ownerDocument;
@@ -1529,7 +1536,7 @@ function Bt(e) {
1529
1536
  ), p.removeEventListener("pointerleave", He), p.removeEventListener("pointermove", Ve), p.removeEventListener("pointerout", Ue), p.removeEventListener("pointerup", Be, !0)), s.disconnect();
1530
1537
  };
1531
1538
  }
1532
- function Wt() {
1539
+ function Kt() {
1533
1540
  const [e, t] = Q({}), n = re(() => t({}), []);
1534
1541
  return [e, n];
1535
1542
  }
@@ -1572,10 +1579,10 @@ function Re(e) {
1572
1579
  }, [e]), t.current;
1573
1580
  }
1574
1581
  const ct = gt(null);
1575
- function Kt(e, t) {
1582
+ function Xt(e, t) {
1576
1583
  const n = O({
1577
1584
  getLayout: () => ({}),
1578
- setLayout: Et
1585
+ setLayout: Mt
1579
1586
  });
1580
1587
  Xe(t, () => n.current, []), q(() => {
1581
1588
  Object.assign(
@@ -1584,7 +1591,7 @@ function Kt(e, t) {
1584
1591
  );
1585
1592
  });
1586
1593
  }
1587
- function Xt({
1594
+ function qt({
1588
1595
  children: e,
1589
1596
  className: t,
1590
1597
  defaultLayout: n,
@@ -1607,34 +1614,34 @@ function Xt({
1607
1614
  onLayoutChange: {},
1608
1615
  onLayoutChanged: {}
1609
1616
  }), f = se((x) => {
1610
- W(z.current.onLayoutChange, x) || (z.current.onLayoutChange = x, r?.(x));
1617
+ K(z.current.onLayoutChange, x) || (z.current.onLayoutChange = x, r?.(x));
1611
1618
  }), d = se(
1612
1619
  (x, P) => {
1613
- W(z.current.onLayoutChanged, x) || (z.current.onLayoutChanged = x, l?.(x, { isUserInteraction: P }));
1620
+ K(z.current.onLayoutChanged, x) || (z.current.onLayoutChanged = x, l?.(x, { isUserInteraction: P }));
1614
1621
  }
1615
- ), h = Le(a), y = O(null), [b, v] = Wt(), g = O({
1622
+ ), h = Le(a), y = O(null), [b, v] = Kt(), g = O({
1616
1623
  lastExpandedPanelSizes: {},
1617
1624
  layouts: {},
1618
1625
  panels: [],
1619
1626
  resizeTargetMinimumSize: m,
1620
1627
  separators: []
1621
1628
  }), w = Ce(y, s);
1622
- Kt(h, u);
1623
- const M = se(
1629
+ Xt(h, u);
1630
+ const E = se(
1624
1631
  (x, P) => {
1625
- const I = B(), R = Oe(x), E = H(x);
1626
- if (E) {
1632
+ const I = W(), R = Oe(x), M = H(x);
1633
+ if (M) {
1627
1634
  let D = !1;
1628
1635
  switch (I.state) {
1629
1636
  case "active": {
1630
1637
  D = I.hitRegions.some(
1631
- (V) => V.group === R
1638
+ (U) => U.group === R
1632
1639
  );
1633
1640
  break;
1634
1641
  }
1635
1642
  }
1636
1643
  return {
1637
- flexGrow: E.layout[P] ?? 1,
1644
+ flexGrow: M.layout[P] ?? 1,
1638
1645
  pointerEvents: D ? "none" : void 0
1639
1646
  };
1640
1647
  }
@@ -1651,7 +1658,7 @@ function Xt({
1651
1658
  get disableCursor() {
1652
1659
  return !!L.disableCursor;
1653
1660
  },
1654
- getPanelStyles: M,
1661
+ getPanelStyles: E,
1655
1662
  id: h,
1656
1663
  orientation: c,
1657
1664
  registerPanel: (x) => {
@@ -1678,26 +1685,26 @@ function Xt({
1678
1685
  },
1679
1686
  updatePanelProps: (x, { disabled: P }) => {
1680
1687
  const R = g.current.panels.find(
1681
- (V) => V.id === x
1688
+ (U) => U.id === x
1682
1689
  );
1683
1690
  R && (R.panelConstraints.disabled = P);
1684
- const E = Oe(h), D = H(h);
1685
- E && D && j(E, {
1691
+ const M = Oe(h), D = H(h);
1692
+ M && D && j(M, {
1686
1693
  ...D,
1687
- derivedPanelConstraints: ve(E)
1694
+ derivedPanelConstraints: ve(M)
1688
1695
  });
1689
1696
  },
1690
1697
  updateSeparatorProps: (x, {
1691
1698
  disabled: P,
1692
1699
  disableDoubleClick: I
1693
1700
  }) => {
1694
- const E = g.current.separators.find(
1701
+ const M = g.current.separators.find(
1695
1702
  (D) => D.id === x
1696
1703
  );
1697
- E && (E.disabled = P, E.disableDoubleClick = I);
1704
+ M && (M.disabled = P, M.disableDoubleClick = I);
1698
1705
  }
1699
1706
  }),
1700
- [M, h, v, c, L]
1707
+ [E, h, v, c, L]
1701
1708
  ), N = O(null);
1702
1709
  return q(() => {
1703
1710
  const x = y.current;
@@ -1728,14 +1735,14 @@ function Xt({
1728
1735
  separators: P.separators
1729
1736
  };
1730
1737
  N.current = R;
1731
- const E = Bt(R), { defaultLayoutDeferred: D, derivedPanelConstraints: V, layout: ue } = H(R.id, !0);
1732
- !D && V.length > 0 && (f(ue), d(ue, !1));
1738
+ const M = Wt(R), { defaultLayoutDeferred: D, derivedPanelConstraints: U, layout: ue } = H(R.id, !0);
1739
+ !D && U.length > 0 && (f(ue), d(ue, !1));
1733
1740
  const oe = Pe(h, (_) => {
1734
- const { defaultLayoutDeferred: Y, derivedPanelConstraints: Ee, layout: ce } = _.next;
1735
- if (Y || Ee.length === 0)
1741
+ const { defaultLayoutDeferred: Y, derivedPanelConstraints: Me, layout: ce } = _.next;
1742
+ if (Y || Me.length === 0)
1736
1743
  return;
1737
1744
  const ft = R.panels.map(({ id: $ }) => $).join(",");
1738
- R.mutableState.layouts[ft] = ce, Ee.forEach(($) => {
1745
+ R.mutableState.layouts[ft] = ce, Me.forEach(($) => {
1739
1746
  if ($.collapsible) {
1740
1747
  const { layout: ge } = _.prev ?? {};
1741
1748
  if (ge) {
@@ -1750,11 +1757,11 @@ function Xt({
1750
1757
  }
1751
1758
  }
1752
1759
  });
1753
- const dt = B().state !== "active";
1760
+ const dt = W().state !== "active";
1754
1761
  f(ce), dt && d(ce, _.isUserInteraction);
1755
1762
  });
1756
1763
  return () => {
1757
- N.current = null, E(), oe();
1764
+ N.current = null, M(), oe();
1758
1765
  };
1759
1766
  }, [
1760
1767
  i,
@@ -1794,11 +1801,11 @@ function Xt({
1794
1801
  }
1795
1802
  ) });
1796
1803
  }
1797
- Xt.displayName = "Group";
1804
+ qt.displayName = "Group";
1798
1805
  function he(e, t) {
1799
1806
  return `react-resizable-panels:${[e, ...t].join(":")}`;
1800
1807
  }
1801
- function qt({
1808
+ function Yt({
1802
1809
  id: e,
1803
1810
  panelIds: t,
1804
1811
  storage: n
@@ -1833,7 +1840,7 @@ function qt({
1833
1840
  } catch {
1834
1841
  }
1835
1842
  }
1836
- function sn({
1843
+ function an({
1837
1844
  debounceSaveMs: e = 100,
1838
1845
  onlySaveAfterUserInteractions: t,
1839
1846
  panelIds: n,
@@ -1841,7 +1848,7 @@ function sn({
1841
1848
  ...i
1842
1849
  }) {
1843
1850
  const s = n !== void 0, u = "id" in i ? i.id : i.groupId, a = he(u, n ?? []), r = qe(
1844
- Yt,
1851
+ Jt,
1845
1852
  () => o.getItem(a),
1846
1853
  () => o.getItem(a)
1847
1854
  ), l = Se(() => {
@@ -1852,7 +1859,7 @@ function sn({
1852
1859
  }
1853
1860
  }, [r]), c = Se(() => {
1854
1861
  if (!l)
1855
- return qt({
1862
+ return Yt({
1856
1863
  id: u,
1857
1864
  panelIds: n,
1858
1865
  storage: o
@@ -1914,25 +1921,25 @@ function sn({
1914
1921
  onLayoutChanged: z
1915
1922
  };
1916
1923
  }
1917
- function Yt() {
1924
+ function Jt() {
1918
1925
  return function() {
1919
1926
  };
1920
1927
  }
1921
- function an() {
1928
+ function ln() {
1922
1929
  return Q(null);
1923
1930
  }
1924
- function ln() {
1931
+ function un() {
1925
1932
  return O(null);
1926
1933
  }
1927
- function Me() {
1934
+ function Ee() {
1928
1935
  const e = yt(ct);
1929
1936
  return C(
1930
1937
  e,
1931
1938
  "Group Context not found; did you render a Panel or Separator outside of a Group?"
1932
1939
  ), e;
1933
1940
  }
1934
- function Jt(e, t) {
1935
- const { id: n } = Me(), o = O({
1941
+ function Zt(e, t) {
1942
+ const { id: n } = Ee(), o = O({
1936
1943
  collapse: ye,
1937
1944
  expand: ye,
1938
1945
  getSize: () => ({
@@ -1949,7 +1956,7 @@ function Jt(e, t) {
1949
1956
  );
1950
1957
  });
1951
1958
  }
1952
- function Zt({
1959
+ function Qt({
1953
1960
  children: e,
1954
1961
  className: t,
1955
1962
  collapsedSize: n = "0%",
@@ -1972,17 +1979,17 @@ function Zt({
1972
1979
  getPanelStyles: v,
1973
1980
  id: g,
1974
1981
  orientation: w,
1975
- registerPanel: M,
1982
+ registerPanel: E,
1976
1983
  updatePanelProps: L
1977
- } = Me(), G = m !== null, N = se(
1978
- (R, E, D) => {
1984
+ } = Ee(), G = m !== null, N = se(
1985
+ (R, M, D) => {
1979
1986
  m?.(R, r, D);
1980
1987
  }
1981
1988
  );
1982
1989
  q(() => {
1983
1990
  const R = y.current;
1984
1991
  if (R !== null) {
1985
- const E = {
1992
+ const M = {
1986
1993
  element: R,
1987
1994
  id: d,
1988
1995
  idIsStable: f,
@@ -2001,7 +2008,7 @@ function Zt({
2001
2008
  minSize: c
2002
2009
  }
2003
2010
  };
2004
- return M(E);
2011
+ return E(M);
2005
2012
  }
2006
2013
  }, [
2007
2014
  a,
@@ -2014,11 +2021,11 @@ function Zt({
2014
2021
  l,
2015
2022
  c,
2016
2023
  N,
2017
- M,
2024
+ E,
2018
2025
  h
2019
2026
  ]), me(() => {
2020
2027
  L(d, { disabled: s });
2021
- }, [s, d, L]), Jt(d, p);
2028
+ }, [s, d, L]), Zt(d, p);
2022
2029
  const x = () => {
2023
2030
  const R = v(g, d);
2024
2031
  if (R)
@@ -2043,7 +2050,7 @@ function Zt({
2043
2050
  id: d,
2044
2051
  ref: b,
2045
2052
  style: {
2046
- ...Qt,
2053
+ ...en,
2047
2054
  display: "flex",
2048
2055
  flexBasis: 0,
2049
2056
  flexShrink: 1,
@@ -2072,8 +2079,8 @@ function Zt({
2072
2079
  }
2073
2080
  );
2074
2081
  }
2075
- Zt.displayName = "Panel";
2076
- const Qt = {
2082
+ Qt.displayName = "Panel";
2083
+ const en = {
2077
2084
  minHeight: 0,
2078
2085
  maxHeight: "100%",
2079
2086
  height: "auto",
@@ -2085,13 +2092,13 @@ const Qt = {
2085
2092
  padding: 0,
2086
2093
  margin: 0
2087
2094
  };
2088
- function un() {
2095
+ function cn() {
2089
2096
  return Q(null);
2090
2097
  }
2091
- function cn() {
2098
+ function fn() {
2092
2099
  return O(null);
2093
2100
  }
2094
- function en({
2101
+ function tn({
2095
2102
  layout: e,
2096
2103
  panelConstraints: t,
2097
2104
  panelId: n,
@@ -2103,7 +2110,7 @@ function en({
2103
2110
  );
2104
2111
  if (a) {
2105
2112
  const r = a.maxSize, l = a.collapsible ? a.collapsedSize : a.minSize, c = [o, o + 1];
2106
- s = K({
2113
+ s = X({
2107
2114
  layout: le({
2108
2115
  delta: l - u,
2109
2116
  initialLayout: e,
@@ -2112,7 +2119,7 @@ function en({
2112
2119
  prevLayout: e
2113
2120
  }),
2114
2121
  panelConstraints: t
2115
- })[n], i = K({
2122
+ })[n], i = X({
2116
2123
  layout: le({
2117
2124
  delta: r - u,
2118
2125
  initialLayout: e,
@@ -2130,7 +2137,7 @@ function en({
2130
2137
  valueNow: u
2131
2138
  };
2132
2139
  }
2133
- function tn({
2140
+ function nn({
2134
2141
  children: e,
2135
2142
  className: t,
2136
2143
  disabled: n,
@@ -2149,7 +2156,7 @@ function tn({
2149
2156
  orientation: v,
2150
2157
  registerSeparator: g,
2151
2158
  updateSeparatorProps: w
2152
- } = Me(), M = v === "horizontal" ? "vertical" : "horizontal";
2159
+ } = Ee(), E = v === "horizontal" ? "vertical" : "horizontal";
2153
2160
  q(() => {
2154
2161
  const N = d.current;
2155
2162
  if (N !== null) {
@@ -2159,22 +2166,22 @@ function tn({
2159
2166
  element: N,
2160
2167
  id: r
2161
2168
  }, P = g(x), I = Rt(
2162
- (E) => {
2169
+ (M) => {
2163
2170
  S(
2164
- E.next.state !== "inactive" && E.next.hitRegions.some(
2171
+ M.next.state !== "inactive" && M.next.hitRegions.some(
2165
2172
  (D) => D.separator === x
2166
- ) ? E.next.state : "inactive"
2173
+ ) ? M.next.state : "inactive"
2167
2174
  );
2168
2175
  }
2169
2176
  ), R = Pe(
2170
2177
  b,
2171
- (E) => {
2172
- const { derivedPanelConstraints: D, layout: V, separatorToPanels: ue } = E.next, oe = ue.get(x);
2178
+ (M) => {
2179
+ const { derivedPanelConstraints: D, layout: U, separatorToPanels: ue } = M.next, oe = ue.get(x);
2173
2180
  if (oe) {
2174
2181
  const _ = oe[0], Y = oe.indexOf(_);
2175
2182
  m(
2176
- en({
2177
- layout: V,
2183
+ tn({
2184
+ layout: U,
2178
2185
  panelConstraints: D,
2179
2186
  panelId: _.id,
2180
2187
  panelIndex: Y
@@ -2210,7 +2217,7 @@ function tn({
2210
2217
  ...a,
2211
2218
  "aria-controls": c.valueControls,
2212
2219
  "aria-disabled": n || void 0,
2213
- "aria-orientation": M,
2220
+ "aria-orientation": E,
2214
2221
  "aria-valuemax": c.valueMax,
2215
2222
  "aria-valuemin": c.valueMin,
2216
2223
  "aria-valuenow": c.valueNow,
@@ -2237,16 +2244,16 @@ function tn({
2237
2244
  }
2238
2245
  );
2239
2246
  }
2240
- tn.displayName = "Separator";
2247
+ nn.displayName = "Separator";
2241
2248
  export {
2242
- Xt as Group,
2243
- Zt as Panel,
2244
- tn as Separator,
2249
+ qt as Group,
2250
+ Qt as Panel,
2251
+ nn as Separator,
2245
2252
  Ct as isCoarsePointer,
2246
- sn as useDefaultLayout,
2247
- an as useGroupCallbackRef,
2248
- ln as useGroupRef,
2249
- un as usePanelCallbackRef,
2250
- cn as usePanelRef
2253
+ an as useDefaultLayout,
2254
+ ln as useGroupCallbackRef,
2255
+ un as useGroupRef,
2256
+ cn as usePanelCallbackRef,
2257
+ fn as usePanelRef
2251
2258
  };
2252
2259
  //# sourceMappingURL=react-resizable-panels.js.map