react-resizable-panels 4.0.5 → 4.0.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.
@@ -5,7 +5,7 @@ function z(e, t = "Assertion error") {
5
5
  if (!e)
6
6
  throw Error(t);
7
7
  }
8
- function se(e, t) {
8
+ function re(e, t) {
9
9
  return t.sort(
10
10
  e === "horizontal" ? je : Be
11
11
  );
@@ -18,8 +18,14 @@ function Be(e, t) {
18
18
  const n = e.element.offsetTop - t.element.offsetTop;
19
19
  return n !== 0 ? n : e.element.offsetHeight - t.element.offsetHeight;
20
20
  }
21
+ function te({
22
+ group: e
23
+ }) {
24
+ const { orientation: t, panels: n } = e;
25
+ return n.reduce((o, r) => (o += t === "horizontal" ? r.element.offsetWidth : r.element.offsetHeight, o), 0);
26
+ }
21
27
  function we(e) {
22
- const { element: t, orientation: n, panels: o, separators: r } = e, s = se(
28
+ const { element: t, orientation: n, panels: o, separators: r } = e, s = re(
23
29
  n,
24
30
  Array.from(t.children).filter((l) => l instanceof HTMLElement).map((l) => ({ element: l }))
25
31
  ).map(({ element: l }) => l), c = [];
@@ -33,6 +39,7 @@ function we(e) {
33
39
  const u = i.element.getBoundingClientRect(), m = l.getBoundingClientRect();
34
40
  c.push({
35
41
  group: e,
42
+ groupSize: te({ group: e }),
36
43
  panels: [i, f],
37
44
  separator: a,
38
45
  rect: n === "horizontal" ? new DOMRect(
@@ -120,14 +127,8 @@ function J({
120
127
  function I(e) {
121
128
  return parseFloat(e.toFixed(3));
122
129
  }
123
- function ae({
124
- group: e
125
- }) {
126
- const { orientation: t, panels: n } = e;
127
- return n.reduce((o, r) => (o += t === "horizontal" ? r.element.offsetWidth : r.element.offsetHeight, o), 0);
128
- }
129
130
  function pe(e) {
130
- const { panels: t } = e, n = ae({ group: e });
131
+ const { panels: t } = e, n = te({ group: e });
131
132
  return t.map((o) => {
132
133
  const { element: r, panelConstraints: s } = o;
133
134
  let c = 0;
@@ -255,7 +256,7 @@ function C(e) {
255
256
  });
256
257
  }), A.emit("mountedGroupsChange", R.mountedGroups)), R;
257
258
  }
258
- const Ze = (e) => e, oe = () => {
259
+ const Ze = (e) => e, ie = () => {
259
260
  }, Le = 1, Pe = 2, Ee = 4, Re = 8, me = {
260
261
  coarse: 10,
261
262
  precise: 5
@@ -303,7 +304,7 @@ function Je({
303
304
  }
304
305
  return o > 0 && r > 0 ? "move" : o > 0 ? "ew-resize" : "ns-resize";
305
306
  }
306
- let ie, k;
307
+ let se, k;
307
308
  function le() {
308
309
  k === void 0 && (k = new CSSStyleSheet(), document.adoptedStyleSheets = [k]);
309
310
  const { cursorFlags: e, interactionState: t } = O();
@@ -315,13 +316,13 @@ function le() {
315
316
  groups: t.hitRegions.map((r) => r.group),
316
317
  state: t.state
317
318
  }), o = `*{cursor: ${n} !important; ${t.state === "active" ? "touch-action: none;" : ""} }`;
318
- if (ie === o)
319
+ if (se === o)
319
320
  return;
320
- ie = o, n ? k.cssRules.length === 0 ? k.insertRule(o) : k.replaceSync(o) : k.cssRules.length === 1 && k.deleteRule(0);
321
+ se = o, n ? k.cssRules.length === 0 ? k.insertRule(o) : k.replaceSync(o) : k.cssRules.length === 1 && k.deleteRule(0);
321
322
  break;
322
323
  }
323
324
  case "inactive": {
324
- ie = void 0, k.cssRules.length === 1 && k.deleteRule(0);
325
+ se = void 0, k.cssRules.length === 1 && k.deleteRule(0);
325
326
  break;
326
327
  }
327
328
  }
@@ -376,17 +377,17 @@ function B({
376
377
  `Panel constraints not found for index ${d}`
377
378
  );
378
379
  const {
379
- collapsedSize: v = 0,
380
- collapsible: h,
381
- minSize: g = 0
380
+ collapsedSize: h = 0,
381
+ collapsible: v,
382
+ minSize: x = 0
382
383
  } = p;
383
- if (h) {
384
- const x = c[d];
384
+ if (v) {
385
+ const S = c[d];
385
386
  if (z(
386
- x != null,
387
+ S != null,
387
388
  `Previous layout not found for panel index ${d}`
388
- ), w(x, v)) {
389
- const y = g - x;
389
+ ), w(S, h)) {
390
+ const y = x - S;
390
391
  j(y, Math.abs(e)) > 0 && (e = e < 0 ? 0 - y : y);
391
392
  }
392
393
  }
@@ -398,17 +399,17 @@ function B({
398
399
  `No panel constraints found for index ${d}`
399
400
  );
400
401
  const {
401
- collapsedSize: v = 0,
402
- collapsible: h,
403
- minSize: g = 0
402
+ collapsedSize: h = 0,
403
+ collapsible: v,
404
+ minSize: x = 0
404
405
  } = p;
405
- if (h) {
406
- const x = c[d];
406
+ if (v) {
407
+ const S = c[d];
407
408
  if (z(
408
- x != null,
409
+ S != null,
409
410
  `Previous layout not found for panel index ${d}`
410
- ), w(x, g)) {
411
- const y = x - v;
411
+ ), w(S, x)) {
412
+ const y = S - h;
412
413
  j(y, Math.abs(e)) > 0 && (e = e < 0 ? 0 - y : y);
413
414
  }
414
415
  }
@@ -416,36 +417,36 @@ function B({
416
417
  }
417
418
  {
418
419
  const d = e < 0 ? 1 : -1;
419
- let p = e < 0 ? f : l, v = 0;
420
+ let p = e < 0 ? f : l, h = 0;
420
421
  for (; ; ) {
421
- const g = c[p];
422
+ const x = c[p];
422
423
  z(
423
- g != null,
424
+ x != null,
424
425
  `Previous layout not found for panel index ${p}`
425
426
  );
426
427
  const y = F({
427
428
  panelConstraints: n[p],
428
429
  size: 100
429
- }) - g;
430
- if (v += y, p += d, p < 0 || p >= n.length)
430
+ }) - x;
431
+ if (h += y, p += d, p < 0 || p >= n.length)
431
432
  break;
432
433
  }
433
- const h = Math.min(Math.abs(e), Math.abs(v));
434
- e = e < 0 ? 0 - h : h;
434
+ const v = Math.min(Math.abs(e), Math.abs(h));
435
+ e = e < 0 ? 0 - v : v;
435
436
  }
436
437
  {
437
438
  let p = e < 0 ? l : f;
438
439
  for (; p >= 0 && p < n.length; ) {
439
- const v = Math.abs(e) - Math.abs(u), h = c[p];
440
+ const h = Math.abs(e) - Math.abs(u), v = c[p];
440
441
  z(
441
- h != null,
442
+ v != null,
442
443
  `Previous layout not found for panel index ${p}`
443
444
  );
444
- const g = h - v, x = F({
445
+ const x = v - h, S = F({
445
446
  panelConstraints: n[p],
446
- size: g
447
+ size: x
447
448
  });
448
- if (!w(h, x) && (u += h - x, a[p] = x, u.toFixed(3).localeCompare(Math.abs(e).toFixed(3), void 0, {
449
+ if (!w(v, S) && (u += v - S, a[p] = S, u.toFixed(3).localeCompare(Math.abs(e).toFixed(3), void 0, {
449
450
  numeric: !0
450
451
  }) >= 0))
451
452
  break;
@@ -460,23 +461,23 @@ function B({
460
461
  p != null,
461
462
  `Previous layout not found for panel index ${d}`
462
463
  );
463
- const v = p + u, h = F({
464
+ const h = p + u, v = F({
464
465
  panelConstraints: n[d],
465
- size: v
466
+ size: h
466
467
  });
467
- if (a[d] = h, !w(h, v)) {
468
- let g = v - h, y = e < 0 ? f : l;
468
+ if (a[d] = v, !w(v, h)) {
469
+ let x = h - v, y = e < 0 ? f : l;
469
470
  for (; y >= 0 && y < n.length; ) {
470
471
  const L = a[y];
471
472
  z(
472
473
  L != null,
473
474
  `Previous layout not found for panel index ${y}`
474
475
  );
475
- const P = L + g, E = F({
476
+ const P = L + x, E = F({
476
477
  panelConstraints: n[y],
477
478
  size: P
478
479
  });
479
- if (w(L, E) || (g -= E - L, a[y] = E), w(g, 0))
480
+ if (w(L, E) || (x -= E - L, a[y] = E), w(x, 0))
480
481
  break;
481
482
  e > 0 ? y-- : y++;
482
483
  }
@@ -488,8 +489,8 @@ function B({
488
489
  );
489
490
  if (!w(m, 100, 0.1))
490
491
  return r;
491
- const S = Object.keys(r);
492
- return a.reduce((d, p, v) => (d[S[v]] = p, d), {});
492
+ const g = Object.keys(r);
493
+ return a.reduce((d, p, h) => (d[g[h]] = p, d), {});
493
494
  }
494
495
  function U(e, t) {
495
496
  if (Object.keys(e).length !== Object.keys(t).length)
@@ -509,43 +510,43 @@ function Ce({
509
510
  let s = 0;
510
511
  const c = new Map(o);
511
512
  t.forEach((i) => {
512
- const { disableCursor: a, element: l, orientation: f, panels: u } = i.group;
513
- let m = 0;
514
- r ? f === "horizontal" ? m = (e.clientX - r.x) / l.offsetWidth * 100 : m = (e.clientY - r.y) / l.offsetHeight * 100 : f === "horizontal" ? m = e.clientX < 0 ? -100 : 100 : m = e.clientY < 0 ? -100 : 100;
515
- const S = n.get(i.group), {
516
- derivedPanelConstraints: d,
517
- layout: p,
513
+ const { group: a, groupSize: l } = i, { disableCursor: f, orientation: u, panels: m } = a;
514
+ let g = 0;
515
+ r ? u === "horizontal" ? g = (e.clientX - r.x) / l * 100 : g = (e.clientY - r.y) / l * 100 : u === "horizontal" ? g = e.clientX < 0 ? -100 : 100 : g = e.clientY < 0 ? -100 : 100;
516
+ const d = n.get(a), {
517
+ derivedPanelConstraints: p,
518
+ layout: h,
518
519
  separatorToPanels: v
519
- } = o.get(i.group) ?? {};
520
- if (d && S && p && v) {
521
- const h = B({
522
- delta: m,
523
- initialLayout: S,
524
- panelConstraints: d,
525
- pivotIndices: i.panels.map((g) => u.indexOf(g)),
526
- prevLayout: p,
520
+ } = o.get(a) ?? {};
521
+ if (p && d && h && v) {
522
+ const x = B({
523
+ delta: g,
524
+ initialLayout: d,
525
+ panelConstraints: p,
526
+ pivotIndices: i.panels.map((S) => m.indexOf(S)),
527
+ prevLayout: h,
527
528
  trigger: "mouse-or-touch"
528
529
  });
529
- if (U(h, p)) {
530
- if (m !== 0 && !a)
531
- switch (f) {
530
+ if (U(x, h)) {
531
+ if (g !== 0 && !f)
532
+ switch (u) {
532
533
  case "horizontal": {
533
- s |= m < 0 ? Le : Pe;
534
+ s |= g < 0 ? Le : Pe;
534
535
  break;
535
536
  }
536
537
  case "vertical": {
537
- s |= m < 0 ? Ee : Re;
538
+ s |= g < 0 ? Ee : Re;
538
539
  break;
539
540
  }
540
541
  }
541
542
  } else {
542
543
  c.set(i.group, {
543
- derivedPanelConstraints: d,
544
- layout: h,
544
+ derivedPanelConstraints: p,
545
+ layout: x,
545
546
  separatorToPanels: v
546
547
  });
547
- const g = i.group.panels.map(({ id: x }) => x).join(",");
548
- i.group.inMemoryLayouts[g] = h;
548
+ const S = i.group.panels.map(({ id: y }) => y).join(",");
549
+ i.group.inMemoryLayouts[S] = x;
549
550
  }
550
551
  }
551
552
  }), C({
@@ -905,7 +906,7 @@ function it(e, t, n) {
905
906
  const r = e.panels.find((c) => c.element === t);
906
907
  if (!r || !r.onResize)
907
908
  return;
908
- const s = ae({ group: e });
909
+ const s = te({ group: e });
909
910
  r.onResize(
910
911
  {
911
912
  asPercentage: I(
@@ -924,24 +925,24 @@ function st(e) {
924
925
  );
925
926
  const n = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Set(), r = new ResizeObserver((u) => {
926
927
  for (const m of u) {
927
- const { borderBoxSize: S, target: d } = m;
928
+ const { borderBoxSize: g, target: d } = m;
928
929
  d === e.element ? t && C((p) => {
929
- const v = p.mountedGroups.get(e);
930
- if (v) {
931
- const h = pe(e), g = v.layout, x = $({
932
- layout: g,
933
- panelConstraints: h
930
+ const h = p.mountedGroups.get(e);
931
+ if (h) {
932
+ const v = pe(e), x = h.layout, S = $({
933
+ layout: x,
934
+ panelConstraints: v
934
935
  });
935
936
  return {
936
937
  mountedGroups: new Map(p.mountedGroups).set(e, {
937
- derivedPanelConstraints: h,
938
- layout: x,
939
- separatorToPanels: v.separatorToPanels
938
+ derivedPanelConstraints: v,
939
+ layout: S,
940
+ separatorToPanels: h.separatorToPanels
940
941
  })
941
942
  };
942
943
  }
943
944
  return p;
944
- }) : it(e, d, S);
945
+ }) : it(e, d, g);
945
946
  }
946
947
  });
947
948
  r.observe(e.element), e.panels.forEach((u) => {
@@ -969,12 +970,12 @@ function st(e) {
969
970
  ), o.add(u.id), u.element.addEventListener("keydown", ve);
970
971
  }), f.mountedGroups.size === 1 && (window.addEventListener("pointerdown", ge), window.addEventListener("pointermove", ye), window.addEventListener("pointerup", Se)), function() {
971
972
  t = !1;
972
- const m = C((S) => {
973
- const d = new Map(S.mountedGroups);
973
+ const m = C((g) => {
974
+ const d = new Map(g.mountedGroups);
974
975
  return d.delete(e), { mountedGroups: d };
975
976
  });
976
- e.element.removeEventListener("pointerleave", he), e.separators.forEach((S) => {
977
- S.element.removeEventListener("keydown", ve);
977
+ e.element.removeEventListener("pointerleave", he), e.separators.forEach((g) => {
978
+ g.element.removeEventListener("keydown", ve);
978
979
  }), m.mountedGroups.size === 0 && (window.removeEventListener("pointerdown", ge), window.removeEventListener("pointermove", ye), window.removeEventListener("pointerup", Se)), r.disconnect();
979
980
  };
980
981
  }
@@ -1038,19 +1039,19 @@ function ht({
1038
1039
  style: f,
1039
1040
  ...u
1040
1041
  }) {
1041
- const m = T({}), S = ue((b) => {
1042
+ const m = T({}), g = ue((b) => {
1042
1043
  U(m.current, b) || (m.current = b, a?.(b));
1043
- }), d = ce(i), [p, v] = G(!1), [h, g] = G(null), [x, y] = G(n ?? {}), [L, P] = G([]), [E, K] = G([]), te = T({}), V = T({}), X = fe(g, s);
1044
+ }), d = ce(i), [p, h] = G(!1), [v, x] = G(null), [S, y] = G(n ?? {}), [L, P] = G([]), [E, K] = G([]), ne = T({}), V = T({}), X = fe(x, s);
1044
1045
  rt(d, c);
1045
1046
  const Y = be(
1046
1047
  () => ({
1047
1048
  id: d,
1048
1049
  orientation: l,
1049
- registerPanel: (b) => (P((M) => se(l, [...M, b])), () => {
1050
+ registerPanel: (b) => (P((M) => re(l, [...M, b])), () => {
1050
1051
  P((M) => M.filter((N) => N !== b));
1051
1052
  }),
1052
1053
  registerSeparator: (b) => (K(
1053
- (M) => se(l, [...M, b])
1054
+ (M) => re(l, [...M, b])
1054
1055
  ), () => {
1055
1056
  K(
1056
1057
  (M) => M.filter((N) => N !== b)
@@ -1060,40 +1061,43 @@ function ht({
1060
1061
  [d, l]
1061
1062
  );
1062
1063
  H(() => {
1063
- if (h !== null && L.length > 0) {
1064
+ if (v !== null && L.length > 0) {
1064
1065
  const b = {
1065
1066
  defaultLayout: n,
1066
1067
  disableCursor: !!o,
1067
1068
  disabled: !!r,
1068
- element: h,
1069
+ element: v,
1069
1070
  id: d,
1070
- inMemoryLastExpandedPanelSizes: te.current,
1071
+ inMemoryLastExpandedPanelSizes: ne.current,
1071
1072
  inMemoryLayouts: V.current,
1072
1073
  orientation: l,
1073
1074
  panels: L,
1074
1075
  separators: E
1075
- }, M = st(b), ne = O().mountedGroups.get(b);
1076
- ne && (y(ne.layout), S?.(ne.layout));
1076
+ }, M = st(b), oe = O().mountedGroups.get(b);
1077
+ oe && (y(oe.layout), g?.(oe.layout));
1077
1078
  const De = A.addListener(
1078
1079
  "interactionStateChange",
1079
1080
  (Z) => {
1080
1081
  switch (Z.state) {
1081
- case "active":
1082
- case "hover": {
1083
- v(
1082
+ case "active": {
1083
+ h(
1084
1084
  Z.hitRegions.some(
1085
1085
  (_) => _.group === b
1086
1086
  )
1087
1087
  );
1088
1088
  break;
1089
1089
  }
1090
+ default: {
1091
+ h(!1);
1092
+ break;
1093
+ }
1090
1094
  }
1091
1095
  }
1092
1096
  ), Ae = A.addListener(
1093
1097
  "mountedGroupsChange",
1094
1098
  (Z) => {
1095
1099
  const _ = Z.get(b);
1096
- _ && _.derivedPanelConstraints.length > 0 && (y(_.layout), S?.(_.layout));
1100
+ _ && _.derivedPanelConstraints.length > 0 && (y(_.layout), g?.(_.layout));
1097
1101
  }
1098
1102
  );
1099
1103
  return () => {
@@ -1104,9 +1108,9 @@ function ht({
1104
1108
  n,
1105
1109
  o,
1106
1110
  r,
1107
- h,
1111
+ v,
1108
1112
  d,
1109
- S,
1113
+ g,
1110
1114
  l,
1111
1115
  L,
1112
1116
  E
@@ -1114,8 +1118,8 @@ function ht({
1114
1118
  const q = {
1115
1119
  [ke]: p ? "none" : void 0
1116
1120
  };
1117
- for (const b in x) {
1118
- const M = Oe(d, b), N = x[b];
1121
+ for (const b in S) {
1122
+ const M = Oe(d, b), N = S[b];
1119
1123
  q[M] = N;
1120
1124
  }
1121
1125
  return /* @__PURE__ */ W(Te.Provider, { value: Y, children: /* @__PURE__ */ W(
@@ -1139,7 +1143,7 @@ function ht({
1139
1143
  }
1140
1144
  ) });
1141
1145
  }
1142
- function re(e) {
1146
+ function ae(e) {
1143
1147
  return `react-resizable-panels:${e}`;
1144
1148
  }
1145
1149
  function at({
@@ -1148,7 +1152,7 @@ function at({
1148
1152
  storage: n
1149
1153
  }) {
1150
1154
  try {
1151
- const o = re(e);
1155
+ const o = ae(e);
1152
1156
  n.setItem(o, JSON.stringify(t));
1153
1157
  } catch (o) {
1154
1158
  console.error(o);
@@ -1160,8 +1164,8 @@ function vt({
1160
1164
  }) {
1161
1165
  const n = He(
1162
1166
  lt,
1163
- () => t.getItem(re(e)),
1164
- () => t.getItem(re(e))
1167
+ () => t.getItem(ae(e)),
1168
+ () => t.getItem(ae(e))
1165
1169
  ), o = be(
1166
1170
  () => n ? JSON.parse(n) : void 0,
1167
1171
  [n]
@@ -1234,21 +1238,21 @@ function ct({
1234
1238
  group: f,
1235
1239
  layout: u,
1236
1240
  separatorToPanels: m
1237
- } = n(), S = f.panels.findIndex((h) => h.id === t), d = S === f.panels.length - 1, p = B({
1241
+ } = n(), g = f.panels.findIndex((v) => v.id === t), d = g === f.panels.length - 1, p = B({
1238
1242
  delta: d ? a - i : i - a,
1239
1243
  initialLayout: u,
1240
1244
  panelConstraints: l,
1241
- pivotIndices: d ? [S - 1, S] : [S, S + 1],
1245
+ pivotIndices: d ? [g - 1, g] : [g, g + 1],
1242
1246
  prevLayout: u,
1243
1247
  trigger: "imperative-api"
1244
- }), v = $({
1248
+ }), h = $({
1245
1249
  layout: p,
1246
1250
  panelConstraints: l
1247
1251
  });
1248
- U(u, v) || C((h) => ({
1249
- mountedGroups: new Map(h.mountedGroups).set(f, {
1252
+ U(u, h) || C((v) => ({
1253
+ mountedGroups: new Map(v.mountedGroups).set(f, {
1250
1254
  derivedPanelConstraints: l,
1251
- layout: v,
1255
+ layout: h,
1252
1256
  separatorToPanels: m
1253
1257
  })
1254
1258
  }));
@@ -1278,7 +1282,7 @@ function ct({
1278
1282
  let l;
1279
1283
  switch (typeof i) {
1280
1284
  case "number": {
1281
- const { group: f } = n(), u = ae({ group: f });
1285
+ const { group: f } = n(), u = te({ group: f });
1282
1286
  l = I(i / u * 100);
1283
1287
  break;
1284
1288
  }
@@ -1294,14 +1298,14 @@ function ct({
1294
1298
  }
1295
1299
  function ut(e, t) {
1296
1300
  const { id: n } = de(), o = T({
1297
- collapse: oe,
1298
- expand: oe,
1301
+ collapse: ie,
1302
+ expand: ie,
1299
1303
  getSize: () => ({
1300
1304
  asPercentage: 0,
1301
1305
  inPixels: 0
1302
1306
  }),
1303
1307
  isCollapsed: () => !1,
1304
- resize: oe
1308
+ resize: ie
1305
1309
  });
1306
1310
  ze(t, () => o.current, []), H(() => {
1307
1311
  Object.assign(
@@ -1325,15 +1329,15 @@ function St({
1325
1329
  style: u,
1326
1330
  ...m
1327
1331
  }) {
1328
- const S = !!c, d = ce(c), [p, v] = G(null), h = fe(v, s), { id: g, registerPanel: x } = de(), y = l !== null, L = ue((E) => {
1332
+ const g = !!c, d = ce(c), [p, h] = G(null), v = fe(h, s), { id: x, registerPanel: S } = de(), y = l !== null, L = ue((E) => {
1329
1333
  l?.(E, c);
1330
1334
  });
1331
1335
  H(() => {
1332
1336
  if (p !== null)
1333
- return x({
1337
+ return S({
1334
1338
  element: p,
1335
1339
  id: d,
1336
- idIsStable: S,
1340
+ idIsStable: g,
1337
1341
  onResize: y ? L : void 0,
1338
1342
  panelConstraints: {
1339
1343
  collapsedSize: n,
@@ -1350,13 +1354,13 @@ function St({
1350
1354
  p,
1351
1355
  y,
1352
1356
  d,
1353
- S,
1357
+ g,
1354
1358
  i,
1355
1359
  a,
1356
1360
  L,
1357
- x
1361
+ S
1358
1362
  ]), ut(d, f);
1359
- const P = Oe(g, d);
1363
+ const P = Oe(x, d);
1360
1364
  return /* @__PURE__ */ W(
1361
1365
  "div",
1362
1366
  {
@@ -1364,7 +1368,7 @@ function St({
1364
1368
  "data-panel": !0,
1365
1369
  "data-testid": d,
1366
1370
  id: d,
1367
- ref: h,
1371
+ ref: v,
1368
1372
  style: {
1369
1373
  ...ft,
1370
1374
  flexBasis: 0,
@@ -1462,22 +1466,22 @@ function bt({
1462
1466
  style: r,
1463
1467
  ...s
1464
1468
  }) {
1465
- const c = ce(o), [i, a] = G({}), [l, f] = G("inactive"), [u, m] = G(null), S = fe(m, n), {
1469
+ const c = ce(o), [i, a] = G({}), [l, f] = G("inactive"), [u, m] = G(null), g = fe(m, n), {
1466
1470
  id: d,
1467
1471
  orientation: p,
1468
- registerSeparator: v
1469
- } = de(), h = p === "horizontal" ? "vertical" : "horizontal";
1472
+ registerSeparator: h
1473
+ } = de(), v = p === "horizontal" ? "vertical" : "horizontal";
1470
1474
  return H(() => {
1471
1475
  if (u !== null) {
1472
- const g = {
1476
+ const x = {
1473
1477
  element: u,
1474
1478
  id: c
1475
- }, x = v(g), y = A.addListener(
1479
+ }, S = h(x), y = A.addListener(
1476
1480
  "interactionStateChange",
1477
1481
  (P) => {
1478
1482
  f(
1479
1483
  P.state !== "inactive" && P.hitRegions.some(
1480
- (E) => E.separator === g
1484
+ (E) => E.separator === x
1481
1485
  ) ? P.state : "inactive"
1482
1486
  );
1483
1487
  }
@@ -1485,9 +1489,9 @@ function bt({
1485
1489
  "mountedGroupsChange",
1486
1490
  (P) => {
1487
1491
  P.forEach(
1488
- ({ derivedPanelConstraints: E, layout: K, separatorToPanels: te }, V) => {
1492
+ ({ derivedPanelConstraints: E, layout: K, separatorToPanels: ne }, V) => {
1489
1493
  if (V.id === d) {
1490
- const X = te.get(g);
1494
+ const X = ne.get(x);
1491
1495
  if (X) {
1492
1496
  const Y = X[0], q = V.panels.indexOf(Y);
1493
1497
  a(
@@ -1505,15 +1509,15 @@ function bt({
1505
1509
  }
1506
1510
  );
1507
1511
  return () => {
1508
- y(), L(), x();
1512
+ y(), L(), S();
1509
1513
  };
1510
1514
  }
1511
- }, [u, d, c, v]), /* @__PURE__ */ W(
1515
+ }, [u, d, c, h]), /* @__PURE__ */ W(
1512
1516
  "div",
1513
1517
  {
1514
1518
  ...s,
1515
1519
  "aria-controls": i.valueControls,
1516
- "aria-orientation": h,
1520
+ "aria-orientation": v,
1517
1521
  "aria-valuemax": i.valueMax,
1518
1522
  "aria-valuemin": i.valueMin,
1519
1523
  "aria-valuenow": i.valueNow,
@@ -1522,7 +1526,7 @@ function bt({
1522
1526
  "data-separator": l,
1523
1527
  "data-testid": c,
1524
1528
  id: c,
1525
- ref: S,
1529
+ ref: g,
1526
1530
  role: "separator",
1527
1531
  style: {
1528
1532
  flexBasis: "auto",