react-resizable-panels 4.7.4 → 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" ? bt : xt
139
+ e === "horizontal" ? xt : bt
140
140
  );
141
141
  }
142
- function bt(e, t) {
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 xt(e, t) {
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((x) => ({ element: x }))
189
- ).map(({ element: x }) => x), l = [];
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 x = -1;
192
+ let b = -1;
193
193
  for (const f of s)
194
- f.hasAttribute("data-panel") && (x++, f.ariaDisabled === null && (m++, u === -1 && (u = x), c = x));
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 x = -1;
197
+ let b = -1;
198
198
  for (const f of s)
199
199
  if (f.hasAttribute("data-panel")) {
200
- x++;
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], R = wt({
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
- R === g ? p : S
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 R = x <= u || x > c;
281
- !r && !R && l.push({
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 I(e, t, n = 0) {
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 I(e, t) ? 0 : e > t ? 1 : -1;
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 (I(e, 0))
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
- ), I(S, g)) {
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
- ), I(S, z)) {
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, R = g + e;
608
- G(R, S) < 0 && (e = G(e, P) <= 0 ? 0 : p);
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, R = g - e;
611
- G(R, S) < 0 && (e = G(100 + e, P) > 0 ? 0 : -p);
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 (!I(y, S) && (d += y - S, u[h] = S, d.toFixed(3).localeCompare(Math.abs(e).toFixed(3), void 0, {
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, !I(y, g)) {
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 R = P + z, C = Y({
680
+ const M = P + z, C = Y({
681
681
  overrideDisabledPanels: l,
682
682
  panelConstraints: n[p],
683
683
  prevSize: P,
684
- size: R
684
+ size: M
685
685
  });
686
- if (I(P, C) || (z -= C - P, u[p] = C), I(z, 0))
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 (!I(v, 100, 0.1))
696
+ if (!k(v, 100, 0.1))
697
697
  return i;
698
- const x = Object.keys(i);
699
- return u.reduce((f, h, g) => (f[x[g]] = h, 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 (!I(i, 100) && o.length > 0)
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 (!I(s, 0))
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, I(s, 0)))
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: x
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: x
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 && I(a, u);
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 be(e) {
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: x } = c.mutableState;
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 R = se({
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(R, p)) {
1177
- if (f !== 0 && !x)
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: R,
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), be(e);
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();
@@ -1256,7 +1256,7 @@ function $e(e) {
1256
1256
  cursorFlags: 0,
1257
1257
  hitRegions: o,
1258
1258
  state: "hover"
1259
- }), be(e.currentTarget);
1259
+ }), xe(e.currentTarget);
1260
1260
  break;
1261
1261
  }
1262
1262
  }
@@ -1282,7 +1282,7 @@ function Ve(e) {
1282
1282
  Z({
1283
1283
  cursorFlags: 0,
1284
1284
  state: "inactive"
1285
- }), t.hitRegions.length > 0 && (be(e.currentTarget), t.hitRegions.forEach((n) => {
1285
+ }), t.hitRegions.length > 0 && (xe(e.currentTarget), t.hitRegions.forEach((n) => {
1286
1286
  const o = $(n.group.id, !0);
1287
1287
  _(n.group, o);
1288
1288
  }), e.preventDefault());
@@ -1341,10 +1341,10 @@ function Ht({
1341
1341
  switch (m.panelConstraints.groupResizeBehavior) {
1342
1342
  case "preserve-pixel-size": {
1343
1343
  l = !0;
1344
- const v = d / 100 * n, x = D(
1344
+ const v = d / 100 * n, b = D(
1345
1345
  v / t * 100
1346
1346
  );
1347
- r.set(m.id, x), i += x;
1347
+ r.set(m.id, b), i += b;
1348
1348
  break;
1349
1349
  }
1350
1350
  case "preserve-relative-size":
@@ -1402,13 +1402,13 @@ function jt(e) {
1402
1402
  const S = $(e.id);
1403
1403
  if (!S)
1404
1404
  return;
1405
- const p = ge(e), P = S.defaultLayoutDeferred ? je(p) : S.layout, R = Ht({
1405
+ const p = ge(e), P = S.defaultLayoutDeferred ? je(p) : S.layout, M = Ht({
1406
1406
  group: e,
1407
1407
  nextGroupSize: z,
1408
1408
  prevGroupSize: S.groupSize,
1409
1409
  prevLayout: P
1410
1410
  }), C = B({
1411
- layout: R,
1411
+ layout: M,
1412
1412
  panelConstraints: p
1413
1413
  });
1414
1414
  if (!S.defaultLayoutDeferred && j(S.layout, C) && $t(
@@ -1480,7 +1480,7 @@ function Bt() {
1480
1480
  const [e, t] = re({}), n = ne(() => t({}), []);
1481
1481
  return [e, n];
1482
1482
  }
1483
- function xe(e) {
1483
+ function be(e) {
1484
1484
  const t = pt();
1485
1485
  return `${e ?? t}`;
1486
1486
  }
@@ -1550,14 +1550,14 @@ function Ut({
1550
1550
  style: d,
1551
1551
  ...v
1552
1552
  }) {
1553
- const x = T({
1553
+ const b = T({
1554
1554
  onLayoutChange: {},
1555
1555
  onLayoutChanged: {}
1556
- }), f = oe((b) => {
1557
- j(x.current.onLayoutChange, b) || (x.current.onLayoutChange = b, a?.(b));
1558
- }), h = oe((b) => {
1559
- j(x.current.onLayoutChanged, b) || (x.current.onLayoutChanged = b, u?.(b));
1560
- }), g = xe(r), y = T(null), [z, S] = Bt(), p = T({
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({
1561
1561
  lastExpandedPanelSizes: {},
1562
1562
  layouts: {},
1563
1563
  panels: [],
@@ -1565,27 +1565,28 @@ function Ut({
1565
1565
  separators: []
1566
1566
  }), P = we(y, s);
1567
1567
  Wt(g, l);
1568
- const R = oe(
1569
- (b, w) => {
1570
- const E = W(), M = Me(b), k = $(b);
1571
- if (k) {
1568
+ const M = oe(
1569
+ (x, w) => {
1570
+ const E = W(), R = Me(x), I = $(x);
1571
+ if (I) {
1572
1572
  let O = !1;
1573
1573
  switch (E.state) {
1574
1574
  case "active": {
1575
1575
  O = E.hitRegions.some(
1576
- (H) => H.group === M
1576
+ (H) => H.group === R
1577
1577
  );
1578
1578
  break;
1579
1579
  }
1580
1580
  }
1581
1581
  return {
1582
- flexGrow: k.layout[w] ?? 1,
1582
+ flexGrow: I.layout[w] ?? 1,
1583
1583
  pointerEvents: O ? "none" : void 0
1584
1584
  };
1585
1585
  }
1586
- return {
1587
- flexGrow: n?.[w] ?? 1
1588
- };
1586
+ if (n?.[w])
1587
+ return {
1588
+ flexGrow: n?.[w]
1589
+ };
1589
1590
  }
1590
1591
  ), C = Pe({
1591
1592
  defaultLayout: n,
@@ -1595,54 +1596,54 @@ function Ut({
1595
1596
  get disableCursor() {
1596
1597
  return !!C.disableCursor;
1597
1598
  },
1598
- getPanelStyles: R,
1599
+ getPanelStyles: M,
1599
1600
  id: g,
1600
1601
  orientation: c,
1601
- registerPanel: (b) => {
1602
+ registerPanel: (x) => {
1602
1603
  const w = p.current;
1603
1604
  return w.panels = Se(c, [
1604
1605
  ...w.panels,
1605
- b
1606
+ x
1606
1607
  ]), S(), () => {
1607
1608
  w.panels = w.panels.filter(
1608
- (E) => E !== b
1609
+ (E) => E !== x
1609
1610
  ), S();
1610
1611
  };
1611
1612
  },
1612
- registerSeparator: (b) => {
1613
+ registerSeparator: (x) => {
1613
1614
  const w = p.current;
1614
1615
  return w.separators = Se(c, [
1615
1616
  ...w.separators,
1616
- b
1617
+ x
1617
1618
  ]), S(), () => {
1618
1619
  w.separators = w.separators.filter(
1619
- (E) => E !== b
1620
+ (E) => E !== x
1620
1621
  ), S();
1621
1622
  };
1622
1623
  },
1623
- togglePanelDisabled: (b, w) => {
1624
- const M = p.current.panels.find(
1625
- (H) => H.id === b
1624
+ togglePanelDisabled: (x, w) => {
1625
+ const R = p.current.panels.find(
1626
+ (H) => H.id === x
1626
1627
  );
1627
- M && (M.panelConstraints.disabled = w);
1628
- const k = Me(g), O = $(g);
1629
- k && O && _(k, {
1628
+ R && (R.panelConstraints.disabled = w);
1629
+ const I = Me(g), O = $(g);
1630
+ I && O && _(I, {
1630
1631
  ...O,
1631
- derivedPanelConstraints: ge(k)
1632
+ derivedPanelConstraints: ge(I)
1632
1633
  });
1633
1634
  },
1634
- toggleSeparatorDisabled: (b, w) => {
1635
- const M = p.current.separators.find(
1636
- (k) => k.id === b
1635
+ toggleSeparatorDisabled: (x, w) => {
1636
+ const R = p.current.separators.find(
1637
+ (I) => I.id === x
1637
1638
  );
1638
- M && (M.disabled = w);
1639
+ R && (R.disabled = w);
1639
1640
  }
1640
1641
  }),
1641
- [R, g, S, c, C]
1642
+ [M, g, S, c, C]
1642
1643
  ), F = T(null);
1643
1644
  return K(() => {
1644
- const b = y.current;
1645
- if (b === null)
1645
+ const x = y.current;
1646
+ if (x === null)
1646
1647
  return;
1647
1648
  const w = p.current;
1648
1649
  let E;
@@ -1653,9 +1654,9 @@ function Ut({
1653
1654
  ae !== void 0 && (E[ee.id] = ae);
1654
1655
  }
1655
1656
  }
1656
- const M = {
1657
+ const R = {
1657
1658
  disabled: !!i,
1658
- element: b,
1659
+ element: x,
1659
1660
  id: g,
1660
1661
  mutableState: {
1661
1662
  defaultLayout: E,
@@ -1668,26 +1669,26 @@ function Ut({
1668
1669
  resizeTargetMinimumSize: w.resizeTargetMinimumSize,
1669
1670
  separators: w.separators
1670
1671
  };
1671
- F.current = M;
1672
- const k = jt(M), { defaultLayoutDeferred: O, derivedPanelConstraints: H, layout: Ce } = $(M.id, !0);
1672
+ F.current = R;
1673
+ const I = jt(R), { defaultLayoutDeferred: O, derivedPanelConstraints: H, layout: Ce } = $(R.id, !0);
1673
1674
  !O && H.length > 0 && (f(Ce), h(Ce));
1674
1675
  const lt = ye(g, (ee) => {
1675
1676
  const { defaultLayoutDeferred: ae, derivedPanelConstraints: Re, layout: le } = ee.next;
1676
1677
  if (ae || Re.length === 0)
1677
1678
  return;
1678
- const ut = M.panels.map(({ id: N }) => N).join(",");
1679
- M.mutableState.layouts[ut] = le, Re.forEach((N) => {
1679
+ const ut = R.panels.map(({ id: N }) => N).join(",");
1680
+ R.mutableState.layouts[ut] = le, Re.forEach((N) => {
1680
1681
  if (N.collapsible) {
1681
1682
  const { layout: pe } = ee.prev ?? {};
1682
1683
  if (pe) {
1683
- const ft = I(
1684
+ const ft = k(
1684
1685
  N.collapsedSize,
1685
1686
  le[N.panelId]
1686
- ), dt = I(
1687
+ ), dt = k(
1687
1688
  N.collapsedSize,
1688
1689
  pe[N.panelId]
1689
1690
  );
1690
- ft && !dt && (M.mutableState.expandedPanelSizes[N.panelId] = pe[N.panelId]);
1691
+ ft && !dt && (R.mutableState.expandedPanelSizes[N.panelId] = pe[N.panelId]);
1691
1692
  }
1692
1693
  }
1693
1694
  });
@@ -1695,7 +1696,7 @@ function Ut({
1695
1696
  f(le), ct && h(le);
1696
1697
  });
1697
1698
  return () => {
1698
- F.current = null, k(), lt();
1699
+ F.current = null, I(), lt();
1699
1700
  };
1700
1701
  }, [
1701
1702
  i,
@@ -1706,8 +1707,8 @@ function Ut({
1706
1707
  z,
1707
1708
  C
1708
1709
  ]), de(() => {
1709
- const b = F.current;
1710
- b && (b.mutableState.defaultLayout = n, b.mutableState.disableCursor = !!o);
1710
+ const x = F.current;
1711
+ x && (x.mutableState.defaultLayout = n, x.mutableState.disableCursor = !!o);
1711
1712
  }), /* @__PURE__ */ ie(at.Provider, { value: X, children: /* @__PURE__ */ ie(
1712
1713
  "div",
1713
1714
  {
@@ -1762,10 +1763,10 @@ function nn({
1762
1763
  const m = ne(
1763
1764
  (v) => {
1764
1765
  c();
1765
- let x;
1766
- i ? x = me(s, Object.keys(v)) : x = me(s, []);
1766
+ let b;
1767
+ i ? b = me(s, Object.keys(v)) : b = me(s, []);
1767
1768
  try {
1768
- n.setItem(x, JSON.stringify(v));
1769
+ n.setItem(b, JSON.stringify(v));
1769
1770
  } catch (f) {
1770
1771
  console.error(f);
1771
1772
  }
@@ -1846,26 +1847,26 @@ function qt({
1846
1847
  onResize: m,
1847
1848
  panelRef: d,
1848
1849
  style: v,
1849
- ...x
1850
+ ...b
1850
1851
  }) {
1851
- const f = !!a, h = xe(a), g = Pe({
1852
+ const f = !!a, h = be(a), g = Pe({
1852
1853
  disabled: s
1853
1854
  }), y = T(null), z = we(y, l), {
1854
1855
  getPanelStyles: S,
1855
1856
  id: p,
1856
1857
  orientation: P,
1857
- registerPanel: R,
1858
+ registerPanel: M,
1858
1859
  togglePanelDisabled: C
1859
1860
  } = Le(), X = m !== null, F = oe(
1860
- (w, E, M) => {
1861
- m?.(w, a, M);
1861
+ (R, I, O) => {
1862
+ m?.(R, a, O);
1862
1863
  }
1863
1864
  );
1864
1865
  K(() => {
1865
- const w = y.current;
1866
- if (w !== null) {
1867
- const E = {
1868
- element: w,
1866
+ const R = y.current;
1867
+ if (R !== null) {
1868
+ const I = {
1869
+ element: R,
1869
1870
  id: h,
1870
1871
  idIsStable: f,
1871
1872
  mutableValues: {
@@ -1883,7 +1884,7 @@ function qt({
1883
1884
  minSize: c
1884
1885
  }
1885
1886
  };
1886
- return R(E);
1887
+ return M(I);
1887
1888
  }
1888
1889
  }, [
1889
1890
  r,
@@ -1896,22 +1897,29 @@ function qt({
1896
1897
  u,
1897
1898
  c,
1898
1899
  F,
1899
- R,
1900
+ M,
1900
1901
  g
1901
1902
  ]), de(() => {
1902
1903
  C(h, !!s);
1903
1904
  }, [s, h, C]), Xt(h, d);
1904
- const b = Ke(
1905
- (w) => ye(p, w),
1906
- // useSyncExternalStore does not support a custom equality check
1907
- // stringify avoids re-rendering when the style value hasn't changed
1908
- () => JSON.stringify(S(p, h)),
1909
- () => JSON.stringify(S(p, h))
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
1910
1913
  );
1911
- return /* @__PURE__ */ ie(
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(
1912
1920
  "div",
1913
1921
  {
1914
- ...x,
1922
+ ...b,
1915
1923
  "aria-disabled": s || void 0,
1916
1924
  "data-panel": !0,
1917
1925
  "data-testid": h,
@@ -1923,7 +1931,7 @@ function qt({
1923
1931
  flexBasis: 0,
1924
1932
  flexShrink: 1,
1925
1933
  overflow: "visible",
1926
- ...JSON.parse(b)
1934
+ ...E
1927
1935
  },
1928
1936
  children: /* @__PURE__ */ ie(
1929
1937
  "div",
@@ -2014,9 +2022,9 @@ function Zt({
2014
2022
  style: s,
2015
2023
  ...l
2016
2024
  }) {
2017
- const r = xe(i), a = Pe({
2025
+ const r = be(i), a = Pe({
2018
2026
  disabled: n
2019
- }), [u, c] = re({}), [m, d] = re("inactive"), v = T(null), x = we(v, o), {
2027
+ }), [u, c] = re({}), [m, d] = re("inactive"), v = T(null), b = we(v, o), {
2020
2028
  disableCursor: f,
2021
2029
  id: h,
2022
2030
  orientation: g,
@@ -2026,24 +2034,24 @@ function Zt({
2026
2034
  K(() => {
2027
2035
  const P = v.current;
2028
2036
  if (P !== null) {
2029
- const R = {
2037
+ const M = {
2030
2038
  disabled: a.disabled,
2031
2039
  element: P,
2032
2040
  id: r
2033
- }, C = y(R), X = Gt(
2034
- (b) => {
2041
+ }, C = y(M), X = Gt(
2042
+ (x) => {
2035
2043
  d(
2036
- b.next.state !== "inactive" && b.next.hitRegions.some(
2037
- (w) => w.separator === R
2038
- ) ? b.next.state : "inactive"
2044
+ x.next.state !== "inactive" && x.next.hitRegions.some(
2045
+ (w) => w.separator === M
2046
+ ) ? x.next.state : "inactive"
2039
2047
  );
2040
2048
  }
2041
2049
  ), F = ye(
2042
2050
  h,
2043
- (b) => {
2044
- const { derivedPanelConstraints: w, layout: E, separatorToPanels: M } = b.next, k = M.get(R);
2045
- if (k) {
2046
- const O = k[0], H = k.indexOf(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);
2047
2055
  c(
2048
2056
  Jt({
2049
2057
  layout: E,
@@ -2078,7 +2086,7 @@ function Zt({
2078
2086
  "data-separator": n ? "disabled" : m,
2079
2087
  "data-testid": r,
2080
2088
  id: r,
2081
- ref: x,
2089
+ ref: b,
2082
2090
  role: "separator",
2083
2091
  style: {
2084
2092
  flexBasis: "auto",