react-resizable-panels 4.14.5 → 4.14.7

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.
@@ -293,12 +293,12 @@ function On({
293
293
  const $ = M ? O(M) : void 0, C = k ? O(k) : void 0, I = $?.end ?? C.start, E = C?.start ?? $.end, q = Math.max(
294
294
  $?.crossStart ?? -1 / 0,
295
295
  C?.crossStart ?? -1 / 0
296
- ), Z = Math.min(
296
+ ), K = Math.min(
297
297
  $?.crossEnd ?? 1 / 0,
298
298
  C?.crossEnd ?? 1 / 0
299
299
  );
300
300
  P = {
301
- crossEnd: Math.max(q, Z),
301
+ crossEnd: Math.max(q, K),
302
302
  crossStart: q,
303
303
  end: Math.max(I, E),
304
304
  start: Math.min(I, E)
@@ -764,7 +764,7 @@ function Le({
764
764
  }
765
765
  return o;
766
766
  }
767
- function J(e) {
767
+ function Z(e) {
768
768
  return parseFloat(e.toFixed(3));
769
769
  }
770
770
  function ft(e) {
@@ -787,7 +787,7 @@ function ft(e) {
787
787
  itemElement: r,
788
788
  styleProp: i.collapsedSize
789
789
  });
790
- a = J(d / n * 100);
790
+ a = Z(d / n * 100);
791
791
  }
792
792
  let c;
793
793
  if (i.collapsedThreshold !== void 0) {
@@ -796,7 +796,7 @@ function ft(e) {
796
796
  itemElement: r,
797
797
  styleProp: i.collapsedThreshold
798
798
  });
799
- c = J(d / n * 100);
799
+ c = Z(d / n * 100);
800
800
  }
801
801
  let s;
802
802
  if (i.defaultSize !== void 0) {
@@ -805,7 +805,7 @@ function ft(e) {
805
805
  itemElement: r,
806
806
  styleProp: i.defaultSize
807
807
  });
808
- s = J(d / n * 100);
808
+ s = Z(d / n * 100);
809
809
  }
810
810
  let u = 0;
811
811
  if (i.minSize !== void 0) {
@@ -814,7 +814,7 @@ function ft(e) {
814
814
  itemElement: r,
815
815
  styleProp: i.minSize
816
816
  });
817
- u = J(d / n * 100);
817
+ u = Z(d / n * 100);
818
818
  }
819
819
  let l = 100;
820
820
  if (i.maxSize !== void 0) {
@@ -823,7 +823,7 @@ function ft(e) {
823
823
  itemElement: r,
824
824
  styleProp: i.maxSize
825
825
  });
826
- l = J(d / n * 100);
826
+ l = Z(d / n * 100);
827
827
  }
828
828
  return {
829
829
  groupResizeBehavior: i.groupResizeBehavior,
@@ -911,7 +911,7 @@ function Zn(e, t) {
911
911
  return !0;
912
912
  }
913
913
  function W(e, t, n = 0) {
914
- return Math.abs(J(e) - J(t)) <= n;
914
+ return Math.abs(Z(e) - Z(t)) <= n;
915
915
  }
916
916
  function ue(e, t) {
917
917
  return W(e, t) ? 0 : e > t ? 1 : -1;
@@ -938,7 +938,7 @@ function Ee({
938
938
  ue(o, r) <= 0 || p < 0 || i !== void 0 && d && p === 0 ? o = r : o = u;
939
939
  } else
940
940
  o = u;
941
- return o = Math.min(s, o), o = J(o), o;
941
+ return o = Math.min(s, o), o = Z(o), o;
942
942
  }
943
943
  function qe({
944
944
  delta: e,
@@ -1482,7 +1482,7 @@ function zt({
1482
1482
  const g = u.slice(0, p).reduce((S, z) => S + l[z.id], 0);
1483
1483
  return {
1484
1484
  ...l,
1485
- [t]: J(100 - g)
1485
+ [t]: Z(100 - g)
1486
1486
  };
1487
1487
  }
1488
1488
  return qe({
@@ -1551,7 +1551,7 @@ function zt({
1551
1551
  axisSize: d,
1552
1552
  itemElement: l,
1553
1553
  styleProp: s
1554
- }), p = J(h / d * 100);
1554
+ }), p = Z(h / d * 100);
1555
1555
  c(p);
1556
1556
  }
1557
1557
  };
@@ -1663,6 +1663,9 @@ function xe(e, t) {
1663
1663
  { isUserInteraction: !0 }
1664
1664
  );
1665
1665
  }
1666
+ function lo(e) {
1667
+ return e.separators.filter((t) => !t.disabled);
1668
+ }
1666
1669
  function Gt(e) {
1667
1670
  if (e.defaultPrevented)
1668
1671
  return;
@@ -1710,12 +1713,12 @@ function Gt(e) {
1710
1713
  }
1711
1714
  case "F6": {
1712
1715
  e.preventDefault();
1713
- const r = n.separators.map(
1716
+ const r = lo(n).map(
1714
1717
  (s) => s.element
1715
- ), i = Array.from(r).findIndex(
1718
+ ), i = r.findIndex(
1716
1719
  (s) => s === e.currentTarget
1717
1720
  );
1718
- N(i !== null, "Index not found");
1721
+ N(i !== -1, "Index not found");
1719
1722
  const a = e.shiftKey ? i > 0 ? i - 1 : r.length - 1 : i + 1 < r.length ? i + 1 : 0;
1720
1723
  r[a].focus({
1721
1724
  preventScroll: !0
@@ -1773,7 +1776,7 @@ function Ft(e) {
1773
1776
  function _t(e) {
1774
1777
  De(e.currentTarget, e);
1775
1778
  }
1776
- function lo(e, t) {
1779
+ function uo(e, t) {
1777
1780
  const { element: n, orientation: o, items: r } = e, i = n.getBoundingClientRect(), a = o === "horizontal";
1778
1781
  return St({
1779
1782
  expandHitTargets: !1,
@@ -1836,7 +1839,7 @@ function Bt(e) {
1836
1839
  s && r.set(c.axis, s.layout);
1837
1840
  });
1838
1841
  const a = Array.from(r.keys()).flatMap(
1839
- (c) => c.resizePreviewMode === "separator" ? lo(c, o) : []
1842
+ (c) => c.resizePreviewMode === "separator" ? uo(c, o) : []
1840
1843
  );
1841
1844
  fe({
1842
1845
  cursorFlags: 0,
@@ -1940,25 +1943,25 @@ function Ut(e) {
1940
1943
  function Wt(e) {
1941
1944
  De(e.currentTarget.document);
1942
1945
  }
1943
- function uo(e) {
1946
+ function fo(e) {
1944
1947
  let t = 0, n = 0;
1945
1948
  const o = {};
1946
1949
  for (const i of e)
1947
1950
  if (i.defaultSize !== void 0) {
1948
1951
  t++;
1949
- const a = J(i.defaultSize);
1952
+ const a = Z(i.defaultSize);
1950
1953
  n += a, o[i.itemId] = a;
1951
1954
  } else
1952
1955
  o[i.itemId] = void 0;
1953
1956
  const r = e.length - t;
1954
1957
  if (r !== 0) {
1955
- const i = J((100 - n) / r);
1958
+ const i = Z((100 - n) / r);
1956
1959
  for (const a of e)
1957
1960
  a.defaultSize === void 0 && (o[a.itemId] = i);
1958
1961
  }
1959
1962
  return o;
1960
1963
  }
1961
- function fo(e, t) {
1964
+ function mo(e, t) {
1962
1965
  const n = e.map((r) => r.id), o = Object.keys(t);
1963
1966
  if (n.length !== o.length)
1964
1967
  return !1;
@@ -1972,7 +1975,7 @@ function Yt({
1972
1975
  itemConstraints: t
1973
1976
  }) {
1974
1977
  const n = e.items.map(({ id: r }) => r).join(","), o = e.mutableState.defaultLayout;
1975
- return e.mutableState.layouts[n] ?? (o && fo(e.items, o) ? o : uo(t));
1978
+ return e.mutableState.layouts[n] ?? (o && mo(e.items, o) ? o : fo(t));
1976
1979
  }
1977
1980
  function Xt({
1978
1981
  itemIds: e,
@@ -1991,14 +1994,14 @@ function Xt({
1991
1994
  }))
1992
1995
  });
1993
1996
  }
1994
- function mo(e, t, n) {
1997
+ function po(e, t, n) {
1995
1998
  if (!n[0])
1996
1999
  return;
1997
2000
  const r = e.items.find((u) => u.element === t);
1998
2001
  if (!r || !r.onResize)
1999
2002
  return;
2000
2003
  const i = Pe({ axis: e }), a = e.orientation === "horizontal" ? r.element.offsetWidth : r.element.offsetHeight, c = r.mutableValues.prevSize, s = {
2001
- asPercentage: J(a / i * 100),
2004
+ asPercentage: Z(a / i * 100),
2002
2005
  inPixels: a
2003
2006
  };
2004
2007
  r.mutableValues.prevSize = s, r.onResize(s, r.id, c);
@@ -2011,10 +2014,10 @@ function vn(e, t) {
2011
2014
  return !1;
2012
2015
  return !0;
2013
2016
  }
2014
- function po(e, t) {
2017
+ function ho(e, t) {
2015
2018
  return e.length !== t.length ? !1 : e.every((n, o) => vn(n, t[o]));
2016
2019
  }
2017
- function ho({
2020
+ function go({
2018
2021
  axis: e,
2019
2022
  nextAxisSize: t,
2020
2023
  prevAxisSize: n,
@@ -2029,7 +2032,7 @@ function ho({
2029
2032
  switch (d.constraintProps.groupResizeBehavior) {
2030
2033
  case "preserve-pixel-size": {
2031
2034
  a = !0;
2032
- const p = h / 100 * n, m = J(
2035
+ const p = h / 100 * n, m = Z(
2033
2036
  p / t * 100
2034
2037
  );
2035
2038
  c.set(d.id, m), r += m;
@@ -2050,12 +2053,12 @@ function ho({
2050
2053
  }), i > 0)
2051
2054
  for (const d of s) {
2052
2055
  const h = o[d] ?? 0;
2053
- l[d] = J(
2056
+ l[d] = Z(
2054
2057
  h / i * u
2055
2058
  );
2056
2059
  }
2057
2060
  else {
2058
- const d = J(u / s.length);
2061
+ const d = Z(u / s.length);
2059
2062
  for (const h of s)
2060
2063
  l[h] = d;
2061
2064
  }
@@ -2092,7 +2095,7 @@ function bn(e) {
2092
2095
  itemConstraints: R
2093
2096
  })
2094
2097
  }));
2095
- const x = ho({
2098
+ const x = go({
2096
2099
  axis: e,
2097
2100
  nextAxisSize: z,
2098
2101
  prevAxisSize: O,
@@ -2101,7 +2104,7 @@ function bn(e) {
2101
2104
  layout: x,
2102
2105
  itemConstraints: R
2103
2106
  });
2104
- if (!b.defaultLayoutDeferred && se(b.layout, w) && po(
2107
+ if (!b.defaultLayoutDeferred && se(b.layout, w) && ho(
2105
2108
  b.derivedItemConstraints,
2106
2109
  R
2107
2110
  ) && b.axisSize === z)
@@ -2118,7 +2121,7 @@ function bn(e) {
2118
2121
  }
2119
2122
  } else
2120
2123
  try {
2121
- mo(e, S, g);
2124
+ po(e, S, g);
2122
2125
  } catch (z) {
2123
2126
  f ??= { error: z };
2124
2127
  }
@@ -2235,7 +2238,7 @@ function it(e) {
2235
2238
  }, [e]), t.current;
2236
2239
  }
2237
2240
  const It = nn(null);
2238
- function go({
2241
+ function yo({
2239
2242
  layout: e,
2240
2243
  itemConstraints: t,
2241
2244
  itemId: n,
@@ -2325,24 +2328,24 @@ function zn({
2325
2328
  }
2326
2329
  };
2327
2330
  M.current = E;
2328
- const q = p(E), Z = gt(
2329
- (K) => {
2331
+ const q = p(E), K = gt(
2332
+ (J) => {
2330
2333
  A(
2331
- K.next.state !== "inactive" && K.next.hitRegions.some(
2334
+ J.next.state !== "inactive" && J.next.hitRegions.some(
2332
2335
  (ae) => ae.separator === E || (d?.(ae) ?? !1)
2333
- ) ? K.next.state : "inactive"
2336
+ ) ? J.next.state : "inactive"
2334
2337
  );
2335
2338
  }
2336
2339
  ), X = Be(
2337
2340
  t,
2338
- (K) => {
2339
- const { derivedItemConstraints: ae, layout: we, separatorToItems: ke } = K.next, ze = ke.get(E);
2341
+ (J) => {
2342
+ const { derivedItemConstraints: ae, layout: we, separatorToItems: ke } = J.next, ze = ke.get(E);
2340
2343
  if (ze) {
2341
2344
  const L = ze[0], T = ae.findIndex(
2342
2345
  (G) => G.itemId === L.id
2343
- ), { layoutStrategy: F } = K.axis;
2346
+ ), { layoutStrategy: F } = J.axis;
2344
2347
  R({
2345
- ...go({
2348
+ ...yo({
2346
2349
  layout: we,
2347
2350
  itemConstraints: ae,
2348
2351
  itemId: L.id,
@@ -2359,7 +2362,7 @@ function zn({
2359
2362
  }
2360
2363
  );
2361
2364
  return () => {
2362
- M.current = null, Z(), X(), q();
2365
+ M.current = null, K(), X(), q();
2363
2366
  };
2364
2367
  }
2365
2368
  }, [t, l, d, p, z]), ne(() => {
@@ -2517,7 +2520,7 @@ function In(e) {
2517
2520
  }
2518
2521
  In.displayName = "Gridline";
2519
2522
  const Ce = ["column", "row"], Zt = { columns: {}, rows: {} };
2520
- function yo({
2523
+ function So({
2521
2524
  children: e,
2522
2525
  className: t,
2523
2526
  columns: n,
@@ -2590,7 +2593,7 @@ function yo({
2590
2593
  G.id === L && (G.disabled = T, G.disableDoubleClick = F);
2591
2594
  },
2592
2595
  []
2593
- ), q = M.current.separators, Z = Me(
2596
+ ), q = M.current.separators, K = Me(
2594
2597
  () => ({
2595
2598
  getDisableCursor: $,
2596
2599
  getResizeAxisId: y,
@@ -2626,7 +2629,7 @@ function yo({
2626
2629
  const L = A.current;
2627
2630
  if (L === null)
2628
2631
  return;
2629
- const T = M.current, F = vo({
2632
+ const T = M.current, F = bo({
2630
2633
  cells: T.cells,
2631
2634
  separatorPlacements: T.separators,
2632
2635
  trackCounts: { column: g.length, row: S.length }
@@ -2852,9 +2855,9 @@ function yo({
2852
2855
  }), L())
2853
2856
  };
2854
2857
  }, [g, y, f, S]);
2855
- const K = () => Ce.map((L) => {
2858
+ const J = () => Ce.map((L) => {
2856
2859
  const T = ce(y(L)), F = z(L);
2857
- return (T && !T.defaultLayoutDeferred ? F.map((_) => `minmax(0, ${T.layout[_.id] ?? 1}fr)`) : So(
2860
+ return (T && !T.defaultLayoutDeferred ? F.map((_) => `minmax(0, ${T.layout[_.id] ?? 1}fr)`) : vo(
2858
2861
  F,
2859
2862
  o?.[L === "column" ? "columns" : "rows"]
2860
2863
  )).join(k[L] ? " auto " : " ");
@@ -2868,10 +2871,10 @@ function yo({
2868
2871
  [y]
2869
2872
  ), we = tt(
2870
2873
  ae,
2871
- K,
2872
- K
2874
+ J,
2875
+ J
2873
2876
  ), [ke, ze] = we.split("|");
2874
- return /* @__PURE__ */ Y(sn.Provider, { value: Z, children: /* @__PURE__ */ Y(
2877
+ return /* @__PURE__ */ Y(sn.Provider, { value: K, children: /* @__PURE__ */ Y(
2875
2878
  "div",
2876
2879
  {
2877
2880
  ...m,
@@ -2896,7 +2899,7 @@ function yo({
2896
2899
  }
2897
2900
  ) });
2898
2901
  }
2899
- yo.displayName = "Grid";
2902
+ So.displayName = "Grid";
2900
2903
  function Qt(e, t) {
2901
2904
  const n = JSON.stringify(e);
2902
2905
  return Me(() => {
@@ -2920,7 +2923,7 @@ function Ln(e, t) {
2920
2923
  typeof n.type == "symbol" && n.props !== null && typeof n.props == "object" && "children" in n.props && Ln(n.props.children, t);
2921
2924
  });
2922
2925
  }
2923
- function So(e, t) {
2926
+ function vo(e, t) {
2924
2927
  if (t)
2925
2928
  return e.map(
2926
2929
  (i) => `minmax(0, ${t[i.id] ?? 1}fr)`
@@ -2938,7 +2941,7 @@ function So(e, t) {
2938
2941
  return c === "%" ? `minmax(0, ${a}fr)` : `${a}${c}`;
2939
2942
  });
2940
2943
  }
2941
- function vo({
2944
+ function bo({
2942
2945
  cells: e,
2943
2946
  separatorPlacements: t,
2944
2947
  trackCounts: n
@@ -3001,13 +3004,13 @@ function vo({
3001
3004
  function en(e, t) {
3002
3005
  return se(e.columns, t.columns) && se(e.rows, t.rows);
3003
3006
  }
3004
- function Fo({
3007
+ function _o({
3005
3008
  id: e,
3006
3009
  onlySaveAfterUserInteractions: t,
3007
3010
  storage: n = localStorage
3008
3011
  }) {
3009
3012
  const o = `react-resizable-panels:grid:${e}`, r = tt(
3010
- bo,
3013
+ xo,
3011
3014
  () => n.getItem(o),
3012
3015
  () => n.getItem(o)
3013
3016
  ), i = Me(() => {
@@ -3043,23 +3046,23 @@ function Fo({
3043
3046
  onLayoutChanged: a
3044
3047
  };
3045
3048
  }
3046
- function bo() {
3049
+ function xo() {
3047
3050
  return function() {
3048
3051
  };
3049
3052
  }
3050
- function _o() {
3053
+ function Bo() {
3051
3054
  return ge(null);
3052
3055
  }
3053
- function Bo() {
3056
+ function qo() {
3054
3057
  return B(null);
3055
3058
  }
3056
- function xo(e) {
3059
+ function wo(e) {
3057
3060
  for (let t = 1; t < e.length; t++)
3058
3061
  if (yt(e[t - 1], e[t]) > 0)
3059
3062
  return !1;
3060
3063
  return !0;
3061
3064
  }
3062
- function wo({
3065
+ function zo({
3063
3066
  separator: e
3064
3067
  }) {
3065
3068
  const { element: t } = e, n = B(null);
@@ -3116,7 +3119,7 @@ function Cn(e) {
3116
3119
  ), null;
3117
3120
  }
3118
3121
  Cn.displayName = "SeparatorOverlay";
3119
- function zo({
3122
+ function Io({
3120
3123
  active: e,
3121
3124
  orientation: t,
3122
3125
  style: n,
@@ -3153,20 +3156,20 @@ function zo({
3153
3156
  }
3154
3157
  );
3155
3158
  }
3156
- function Io({
3159
+ function Lo({
3157
3160
  overlay: e,
3158
3161
  preview: t
3159
3162
  }) {
3160
3163
  const { axis: n, offset: o, rect: r, separator: i } = t, a = n.orientation === "horizontal";
3161
3164
  let c = i?.preview, s = e;
3162
3165
  return rn(c) && c.type === Cn && (s = c.props, c = void 0), c == null && (s ? c = /* @__PURE__ */ Y(
3163
- zo,
3166
+ Io,
3164
3167
  {
3165
3168
  ...s,
3166
3169
  active: t.active,
3167
3170
  orientation: n.orientation
3168
3171
  }
3169
- ) : i && (c = /* @__PURE__ */ Y(wo, { separator: i }))), /* @__PURE__ */ Y(
3172
+ ) : i && (c = /* @__PURE__ */ Y(zo, { separator: i }))), /* @__PURE__ */ Y(
3170
3173
  "div",
3171
3174
  {
3172
3175
  "aria-hidden": "true",
@@ -3185,10 +3188,10 @@ function Io({
3185
3188
  }
3186
3189
  );
3187
3190
  }
3188
- function Lo(e) {
3191
+ function Co(e) {
3189
3192
  return Array.from(e).sort(yt);
3190
3193
  }
3191
- function Co(e, t) {
3194
+ function Ro(e, t) {
3192
3195
  const n = B({
3193
3196
  getLayout: () => ({}),
3194
3197
  setLayout: Bn
@@ -3200,7 +3203,7 @@ function Co(e, t) {
3200
3203
  );
3201
3204
  });
3202
3205
  }
3203
- function Ro({
3206
+ function Eo({
3204
3207
  groupId: e,
3205
3208
  resizePreviewMode: t
3206
3209
  }) {
@@ -3224,7 +3227,7 @@ function Ro({
3224
3227
  return i(ie()), a;
3225
3228
  }, [e, t]), n;
3226
3229
  }
3227
- function Eo({
3230
+ function Mo({
3228
3231
  children: e,
3229
3232
  className: t,
3230
3233
  defaultLayout: n,
@@ -3253,7 +3256,7 @@ function Eo({
3253
3256
  (I, E, q) => {
3254
3257
  se(f.current.onLayoutChanged, I) || (f.current.onLayoutChanged = I, u?.(I, { isUserInteraction: E, requestedLayout: q }));
3255
3258
  }
3256
- ), S = Te(c), [z, b] = ge(), R = Ro({
3259
+ ), S = Te(c), [z, b] = ge(), R = Eo({
3257
3260
  groupId: S,
3258
3261
  resizePreviewMode: d
3259
3262
  }), O = B(null), [A, x] = wn(), w = B([]), v = B({
@@ -3262,7 +3265,7 @@ function Eo({
3262
3265
  panels: [],
3263
3266
  separators: []
3264
3267
  }), M = Ve(O, i);
3265
- Co(S, a);
3268
+ Ro(S, a);
3266
3269
  const k = Se(
3267
3270
  (I, E) => {
3268
3271
  const q = ce(I);
@@ -3313,13 +3316,15 @@ function Eo({
3313
3316
  };
3314
3317
  },
3315
3318
  updatePanelProps: (I, { disabled: E }) => {
3316
- const Z = v.current.panels.find(
3319
+ const K = v.current.panels.find(
3317
3320
  (ae) => ae.id === I
3318
3321
  );
3319
- Z && (Z.constraintProps.disabled = E);
3320
- const X = Re(S), K = ce(S);
3321
- X && K && me(X, {
3322
- ...K,
3322
+ if (!K || K.constraintProps.disabled === E)
3323
+ return;
3324
+ K.constraintProps.disabled = E;
3325
+ const X = Re(S), J = ce(S);
3326
+ X && J && me(X, {
3327
+ ...J,
3323
3328
  derivedItemConstraints: ft(X)
3324
3329
  });
3325
3330
  },
@@ -3328,7 +3333,7 @@ function Eo({
3328
3333
  disableDoubleClick: q
3329
3334
  }) => {
3330
3335
  const X = v.current.separators.find(
3331
- (K) => K.id === I
3336
+ (J) => J.id === I
3332
3337
  );
3333
3338
  X && (X.disabled = E, X.disableDoubleClick = q);
3334
3339
  }
@@ -3346,7 +3351,7 @@ function Eo({
3346
3351
  ), E.separators = Ge(
3347
3352
  l,
3348
3353
  E.separators
3349
- ), w.current = Lo([
3354
+ ), w.current = Co([
3350
3355
  ...E.panels.map(({ element: L }) => L),
3351
3356
  ...E.separators.map(({ element: L }) => L)
3352
3357
  ]);
@@ -3358,7 +3363,7 @@ function Eo({
3358
3363
  T !== void 0 && (q[L.id] = T);
3359
3364
  }
3360
3365
  }
3361
- const Z = {
3366
+ const K = {
3362
3367
  disabled: !!r,
3363
3368
  element: I,
3364
3369
  id: S,
@@ -3376,14 +3381,14 @@ function Eo({
3376
3381
  },
3377
3382
  separators: E.separators
3378
3383
  };
3379
- C.current = Z;
3380
- const X = bn(Z), {
3381
- defaultLayoutDeferred: K,
3384
+ C.current = K;
3385
+ const X = bn(K), {
3386
+ defaultLayoutDeferred: J,
3382
3387
  derivedItemConstraints: ae,
3383
3388
  layout: we,
3384
3389
  requestedLayout: ke
3385
- } = ce(Z.id, !0);
3386
- if (!K && ae.length > 0)
3390
+ } = ce(K.id, !0);
3391
+ if (!J && ae.length > 0)
3387
3392
  try {
3388
3393
  try {
3389
3394
  y(we);
@@ -3404,12 +3409,12 @@ function Eo({
3404
3409
  return;
3405
3410
  xn({
3406
3411
  derivedItemConstraints: F,
3407
- axis: Z,
3412
+ axis: K,
3408
3413
  layout: G,
3409
3414
  prevLayout: L.prev?.layout,
3410
3415
  requestedLayout: _
3411
3416
  });
3412
- const V = ie(), j = V.state !== "active" || !V.hitRegions.some((te) => te.axis === Z);
3417
+ const V = ie(), j = V.state !== "active" || !V.hitRegions.some((te) => te.axis === K);
3413
3418
  try {
3414
3419
  y(G);
3415
3420
  } finally {
@@ -3433,7 +3438,7 @@ function Eo({
3433
3438
  d,
3434
3439
  P
3435
3440
  ]), ne(() => {
3436
- xo(w.current) || x();
3441
+ wo(w.current) || x();
3437
3442
  }), He(() => {
3438
3443
  const I = C.current;
3439
3444
  I && (I.mutableState.defaultLayout = n, I.mutableState.disableCursor = !!o);
@@ -3464,7 +3469,7 @@ function Eo({
3464
3469
  children: [
3465
3470
  e,
3466
3471
  R.map((I) => /* @__PURE__ */ Y(
3467
- Io,
3472
+ Lo,
3468
3473
  {
3469
3474
  overlay: z,
3470
3475
  preview: I
@@ -3475,11 +3480,11 @@ function Eo({
3475
3480
  }
3476
3481
  ) });
3477
3482
  }
3478
- Eo.displayName = "Group";
3483
+ Mo.displayName = "Group";
3479
3484
  function Qe(e, t) {
3480
3485
  return `react-resizable-panels:${[e, ...t].join(":")}`;
3481
3486
  }
3482
- function Mo({
3487
+ function Po({
3483
3488
  id: e,
3484
3489
  panelIds: t,
3485
3490
  storage: n
@@ -3514,7 +3519,7 @@ function Mo({
3514
3519
  } catch {
3515
3520
  }
3516
3521
  }
3517
- function qo({
3522
+ function Ho({
3518
3523
  debounceSaveMs: e = 100,
3519
3524
  onlySaveAfterUserInteractions: t,
3520
3525
  panelIds: n,
@@ -3522,7 +3527,7 @@ function qo({
3522
3527
  ...r
3523
3528
  }) {
3524
3529
  const i = n !== void 0, a = "id" in r ? r.id : r.groupId, c = Qe(a, n ?? []), s = tt(
3525
- Po,
3530
+ To,
3526
3531
  () => o.getItem(c),
3527
3532
  () => o.getItem(c)
3528
3533
  ), u = Me(() => {
@@ -3533,7 +3538,7 @@ function qo({
3533
3538
  }
3534
3539
  }, [s]), l = Me(() => {
3535
3540
  if (!u)
3536
- return Mo({
3541
+ return Po({
3537
3542
  id: a,
3538
3543
  panelIds: n,
3539
3544
  storage: o
@@ -3596,17 +3601,17 @@ function qo({
3596
3601
  onLayoutChanged: m
3597
3602
  };
3598
3603
  }
3599
- function Po() {
3604
+ function To() {
3600
3605
  return function() {
3601
3606
  };
3602
3607
  }
3603
- function Ho() {
3608
+ function Vo() {
3604
3609
  return ge(null);
3605
3610
  }
3606
- function Vo() {
3611
+ function jo() {
3607
3612
  return B(null);
3608
3613
  }
3609
- function To(e, t) {
3614
+ function Do(e, t) {
3610
3615
  const { id: n } = st(), o = B({
3611
3616
  collapse: ct,
3612
3617
  expand: ct,
@@ -3624,7 +3629,7 @@ function To(e, t) {
3624
3629
  );
3625
3630
  });
3626
3631
  }
3627
- function Do({
3632
+ function ko({
3628
3633
  children: e,
3629
3634
  className: t,
3630
3635
  collapsedSize: n = "0%",
@@ -3696,7 +3701,7 @@ function Do({
3696
3701
  S
3697
3702
  ]), He(() => {
3698
3703
  w(g, { disabled: a });
3699
- }, [a, g, w]), To(g, p);
3704
+ }, [a, g, w]), Do(g, p);
3700
3705
  const k = () => {
3701
3706
  const C = R(O, g);
3702
3707
  if (C)
@@ -3721,7 +3726,7 @@ function Do({
3721
3726
  id: g,
3722
3727
  ref: b,
3723
3728
  style: {
3724
- ...ko,
3729
+ ...Ao,
3725
3730
  display: "flex",
3726
3731
  flexBasis: 0,
3727
3732
  flexShrink: 1,
@@ -3750,8 +3755,8 @@ function Do({
3750
3755
  }
3751
3756
  );
3752
3757
  }
3753
- Do.displayName = "Panel";
3754
- const ko = {
3758
+ ko.displayName = "Panel";
3759
+ const Ao = {
3755
3760
  minHeight: 0,
3756
3761
  maxHeight: "100%",
3757
3762
  height: "auto",
@@ -3763,14 +3768,14 @@ const ko = {
3763
3768
  padding: 0,
3764
3769
  margin: 0
3765
3770
  };
3766
- function jo() {
3771
+ function Uo() {
3767
3772
  return ge(null);
3768
3773
  }
3769
- function Uo() {
3774
+ function Wo() {
3770
3775
  return B(null);
3771
3776
  }
3772
- const Ao = { flexBasis: "auto" }, $o = { flexGrow: 0, flexShrink: 0 };
3773
- function Oo({
3777
+ const $o = { flexBasis: "auto" }, Oo = { flexGrow: 0, flexShrink: 0 };
3778
+ function No({
3774
3779
  children: e,
3775
3780
  className: t,
3776
3781
  disabled: n,
@@ -3803,31 +3808,31 @@ function Oo({
3803
3808
  id: u,
3804
3809
  preview: a,
3805
3810
  registerSeparator: p,
3806
- requiredStyle: $o,
3811
+ requiredStyle: Oo,
3807
3812
  style: c,
3808
- styleDefaults: Ao,
3813
+ styleDefaults: $o,
3809
3814
  updateSeparatorProps: m,
3810
3815
  children: e
3811
3816
  }
3812
3817
  );
3813
3818
  }
3814
- Oo.displayName = "Separator";
3819
+ No.displayName = "Separator";
3815
3820
  export {
3816
3821
  An as Cell,
3817
- yo as Grid,
3822
+ So as Grid,
3818
3823
  In as Gridline,
3819
- Eo as Group,
3820
- Do as Panel,
3821
- Oo as Separator,
3824
+ Mo as Group,
3825
+ ko as Panel,
3826
+ No as Separator,
3822
3827
  Cn as SeparatorOverlay,
3823
3828
  $n as isCoarsePointer,
3824
- Fo as useDefaultGridLayout,
3825
- qo as useDefaultLayout,
3826
- _o as useGridCallbackRef,
3827
- Bo as useGridRef,
3828
- Ho as useGroupCallbackRef,
3829
- Vo as useGroupRef,
3830
- jo as usePanelCallbackRef,
3831
- Uo as usePanelRef
3829
+ _o as useDefaultGridLayout,
3830
+ Ho as useDefaultLayout,
3831
+ Bo as useGridCallbackRef,
3832
+ qo as useGridRef,
3833
+ Vo as useGroupCallbackRef,
3834
+ jo as useGroupRef,
3835
+ Uo as usePanelCallbackRef,
3836
+ Wo as usePanelRef
3832
3837
  };
3833
3838
  //# sourceMappingURL=react-resizable-panels.js.map