@window-splitter/vue 1.1.3 → 1.1.4

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.
package/dist/index.mjs CHANGED
@@ -84,8 +84,8 @@ I.div = function(e) {
84
84
  throw Error(Ne);
85
85
  if (!r[0])
86
86
  return e.s = n, e.c = [e.e = 0], e;
87
- var u, d, c, s, m, o = l.slice(), f = u = l.length, g = r.length, p = r.slice(0, u), v = p.length, h = e, z = h.c = [], y = 0, x = i + (h.e = t.e - e.e) + 1;
88
- for (h.s = n, n = x < 0 ? 0 : x, o.unshift(0); v++ < u; ) p.push(0);
87
+ var u, d, c, s, m, o = l.slice(), f = u = l.length, h = r.length, p = r.slice(0, u), v = p.length, g = e, z = g.c = [], y = 0, x = i + (g.e = t.e - e.e) + 1;
88
+ for (g.s = n, n = x < 0 ? 0 : x, o.unshift(0); v++ < u; ) p.push(0);
89
89
  do {
90
90
  for (c = 0; c < 10; c++) {
91
91
  if (u != (v = p.length))
@@ -109,8 +109,8 @@ I.div = function(e) {
109
109
  break;
110
110
  }
111
111
  z[y++] = s ? c : ++c, p[0] && s ? p[v] = r[f] || 0 : p = [r[f]];
112
- } while ((f++ < g || p[0] !== N) && n--);
113
- return !z[0] && y != 1 && (z.shift(), h.e--, x--), y > x && U(h, x, a.RM, p[0] !== N), h;
112
+ } while ((f++ < h || p[0] !== N) && n--);
113
+ return !z[0] && y != 1 && (z.shift(), g.e--, x--), y > x && U(g, x, a.RM, p[0] !== N), g;
114
114
  };
115
115
  I.eq = function(e) {
116
116
  return this.cmp(e) === 0;
@@ -325,10 +325,10 @@ function $(e) {
325
325
  return { type: "pixel", value: new b(e) };
326
326
  }
327
327
  function dt(e) {
328
- let t = ge.linear, a = 300;
329
- return e.collapseAnimation && (typeof e.collapseAnimation == "string" ? t = ge[e.collapseAnimation] : (a = e.collapseAnimation.duration, t = typeof e.collapseAnimation.easing == "function" ? e.collapseAnimation.easing : ge[e.collapseAnimation.easing])), { ease: t, duration: a };
328
+ let t = he.linear, a = 300;
329
+ return e.collapseAnimation && (typeof e.collapseAnimation == "string" ? t = he[e.collapseAnimation] : (a = e.collapseAnimation.duration, t = typeof e.collapseAnimation.easing == "function" ? e.collapseAnimation.easing : he[e.collapseAnimation.easing])), { ease: t, duration: a };
330
330
  }
331
- const ge = {
331
+ const he = {
332
332
  "ease-in-out": function(t) {
333
333
  return ((t *= 2) <= 1 ? t * t : --t * (2 - t) + 1) / 2;
334
334
  },
@@ -398,10 +398,10 @@ function ee(e, t) {
398
398
  function mt(e, t) {
399
399
  return !!(!t || !ee(e.min, t.min) || e.max === "1fr" && t.max !== "1fr" || e.max !== "1fr" && t.max === "1fr" || e.max !== "1fr" && t.max !== "1fr" && !ee(e.max, t.max) || e.default && !t.default || !e.default && t.default || e.default && t.default && !ee(e.default, t.default) || !ee(e.collapsedSize, t.collapsedSize) || e.isStaticAtRest !== t.isStaticAtRest || e.collapseAnimation && !t.collapseAnimation || !e.collapseAnimation && t.collapseAnimation || typeof e.collapseAnimation == "string" && typeof t.collapseAnimation == "string" && e.collapseAnimation !== t.collapseAnimation || typeof e.collapseAnimation == "object" && typeof t.collapseAnimation == "object" && (e.collapseAnimation.duration !== t.collapseAnimation.duration || e.collapseAnimation.easing !== t.collapseAnimation.easing) || e.collapsible !== t.collapsible);
400
400
  }
401
- function gt(e, t) {
401
+ function ht(e, t) {
402
402
  return !t || !ee(e.size, t.size);
403
403
  }
404
- function ht(e) {
404
+ function gt(e) {
405
405
  return {
406
406
  type: "handle",
407
407
  ...e,
@@ -561,7 +561,7 @@ function De(e) {
561
561
  return k(r.size);
562
562
  }).join(" ");
563
563
  }
564
- function he(e, t) {
564
+ function ge(e, t) {
565
565
  const a = e.findIndex((l) => l.id === t.id || typeof l.order == "number" && l.order === t.order);
566
566
  let r = e;
567
567
  return a !== -1 && (r = e.filter((l, n) => n !== a)), qe([...r, t]);
@@ -629,8 +629,8 @@ function oe(e, t) {
629
629
  return { dragOvershoot: s };
630
630
  }
631
631
  const m = ve(e, d), o = d.currentValue.value, f = d.currentValue.value.minus(new b(i).mul(u));
632
- let g = t.disregardCollapseBuffer ? O(e, m, f) : O(e, d, f);
633
- const p = ve(e, c), v = c.currentValue.value, h = o.minus(g), z = c.currentValue.value.add(h);
632
+ let h = t.disregardCollapseBuffer ? O(e, m, f) : O(e, d, f);
633
+ const p = ve(e, c), v = c.currentValue.value, g = o.minus(h), z = c.currentValue.value.add(g);
634
634
  let y = t.disregardCollapseBuffer ? O(e, p, z) : O(e, c, z);
635
635
  if (t.disregardCollapseBuffer)
636
636
  c.collapsible && c.collapsed && (c.collapsed = !1);
@@ -641,7 +641,7 @@ function oe(e, t) {
641
641
  // Take the size it was at
642
642
  C(e, c.collapsedSize).add(e.dragOvershoot.abs()).sub(y.add(Math.abs(i)))
643
643
  );
644
- if (w.gt(0) && (y = y.add(w)), g = g.minus(y.minus(v).minus(Math.abs(i))), g.lt(d.min.value) && !d.collapsible)
644
+ if (w.gt(0) && (y = y.add(w)), h = h.minus(y.minus(v).minus(Math.abs(i))), h.lt(d.min.value) && !d.collapsible)
645
645
  return { dragOvershoot: s };
646
646
  c.collapsed = !1, (K = c.onCollapseChange) != null && K.current && !c.collapseIsControlled && !t.controlled && !t.isVirtual && c.onCollapseChange.current(!1);
647
647
  }
@@ -649,9 +649,9 @@ function oe(e, t) {
649
649
  if (!t.disregardCollapseBuffer && d.collapsible && x) {
650
650
  if ((L = d.onCollapseChange) != null && L.current && d.collapseIsControlled && !t.controlled && !t.isVirtual)
651
651
  return d.onCollapseChange.current(!0), { dragOvershoot: s };
652
- d.collapsed = !0, g = C(e, d.collapsedSize), y = c.currentValue.value.add(o.minus(g)), (M = d.onCollapseChange) != null && M.current && !d.collapseIsControlled && !t.controlled && !t.isVirtual && d.onCollapseChange.current(!0);
652
+ d.collapsed = !0, h = C(e, d.collapsedSize), y = c.currentValue.value.add(o.minus(h)), (M = d.onCollapseChange) != null && M.current && !d.collapseIsControlled && !t.controlled && !t.isVirtual && d.onCollapseChange.current(!0);
653
653
  }
654
- d.currentValue = { type: "pixel", value: g }, c.currentValue = { type: "pixel", value: y };
654
+ d.currentValue = { type: "pixel", value: h }, c.currentValue = { type: "pixel", value: y };
655
655
  const A = new b(V(e)).minus(n.reduce((w, S) => w.add(P(S) ? S.currentValue.value : S.size.value), new b(0)));
656
656
  return A.eq(0) || (d.currentValue.value = O(e, d, d.currentValue.value.add(A))), { items: n };
657
657
  }
@@ -731,7 +731,7 @@ function Pt(e) {
731
731
  const c = d.currentValue.type === "pixel" && d.currentValue.value || d.currentValue.value.mul(a);
732
732
  return O(e, d, c);
733
733
  }).reduce((d, c) => d.add(c), new b(0)), n = l.abs().sub(t);
734
- if (n.eq(0) || t.eq(0))
734
+ if (n.abs().lt(1) || t.eq(0))
735
735
  return e;
736
736
  let i = { ...e, items: E(e) };
737
737
  const u = i.items.find((d) => !!(P(d) && d.collapsible));
@@ -782,16 +782,16 @@ function ke(e, t, a, r) {
782
782
  r.signal.addEventListener("abort", () => {
783
783
  m(new Error("Operation was canceled"));
784
784
  }), t.type === "collapsePanel" && (l.sizeBeforeCollapse = l.currentValue.value.toNumber(), i = i.mul(new b(-1)));
785
- const o = 60, { duration: f, ease: g } = dt(l), p = Math.ceil(l.collapseAnimation ? f / (1e3 / o) : 1);
786
- let v = 0, h = new b(0);
785
+ const o = 60, { duration: f, ease: h } = dt(l), p = Math.ceil(l.collapseAnimation ? f / (1e3 / o) : 1);
786
+ let v = 0, g = new b(0);
787
787
  function z() {
788
- const y = ++v / p, x = new b(l.collapseAnimation ? g(y) : 1), A = x.mul(u).sub(h).mul(i);
788
+ const y = ++v / p, x = new b(l.collapseAnimation ? h(y) : 1), A = x.mul(u).sub(g).mul(i);
789
789
  if (a({
790
790
  type: "applyDelta",
791
791
  handleId: n.item.id,
792
792
  delta: A.toNumber(),
793
793
  panelId: l.id
794
- }), h = h.add(A.abs().mul(A.gt(0) && i.lt(0) || A.lt(0) && i.gt(0) ? -1 : 1)), x.eq(1)) {
794
+ }), g = g.add(A.abs().mul(A.gt(0) && i.lt(0) || A.lt(0) && i.gt(0) ? -1 : 1)), x.eq(1)) {
795
795
  e.items.find((K) => P(K) && K.currentValue.value.round(void 0, b.roundHalfEven).lt(0)) && se(e, c);
796
796
  const D = t.type === "expandPanel" ? "expand" : "collapse";
797
797
  return s({ panelId: l.id, action: D, resolve: t.resolve }), !1;
@@ -833,10 +833,10 @@ function At(e, t) {
833
833
  var s, m;
834
834
  for (const o of n.items)
835
835
  if (P(o)) {
836
- const f = o.lastKnownSize ? new b(n.orientation === "horizontal" ? o.lastKnownSize.width : o.lastKnownSize.height) : O(n, o, C(n, o.currentValue)), g = V(n);
836
+ const f = o.lastKnownSize ? new b(n.orientation === "horizontal" ? o.lastKnownSize.width : o.lastKnownSize.height) : O(n, o, C(n, o.currentValue)), h = V(n);
837
837
  (m = (s = o.onResize) == null ? void 0 : s.current) == null || m.call(s, {
838
838
  pixel: f.toNumber(),
839
- percentage: g > 0 ? f.div(V(n)).toNumber() : -1
839
+ percentage: h > 0 ? f.div(V(n)).toNumber() : -1
840
840
  });
841
841
  }
842
842
  },
@@ -852,8 +852,8 @@ function At(e, t) {
852
852
  const m = n.items.findIndex((p) => p.id === s), o = n.items[m];
853
853
  if (!o)
854
854
  return;
855
- const f = n.items.filter((p) => p.id !== s), g = P(o) ? o.currentValue.value : o.size.value;
856
- ze(n, f, m, g), n.items = f;
855
+ const f = n.items.filter((p) => p.id !== s), h = P(o) ? o.currentValue.value : o.size.value;
856
+ ze(n, f, m, h), n.items = f;
857
857
  },
858
858
  notifyCollapseToggle: (s) => {
859
859
  var o, f;
@@ -894,21 +894,21 @@ function At(e, t) {
894
894
  Z(s, ["expandPanel"]);
895
895
  const m = E(n);
896
896
  let o = { ...n, items: m };
897
- const f = Fe(n, s), g = Me(o, s.panelId);
897
+ const f = Fe(n, s), h = Me(o, s.panelId);
898
898
  o = {
899
899
  ...o,
900
900
  ...de({
901
901
  context: o,
902
902
  panelId: s.panelId,
903
- handleId: g.item.id,
903
+ handleId: h.item.id,
904
904
  controlled: s.controlled,
905
905
  delta: f,
906
- direction: g.direction,
906
+ direction: h.direction,
907
907
  isVirtual: !0
908
908
  })
909
909
  };
910
- const p = o.items.find((z) => z.id === s.panelId), v = o.items.reduce((z, y) => z.add(P(y) ? y.currentValue.value : y.size.value), new b(0)), h = p && P(p) && !p.currentValue.value.eq(p.collapsedSize.value);
911
- return v.gt(V(n)) || !h;
910
+ const p = o.items.find((z) => z.id === s.panelId), v = o.items.reduce((z, y) => z.add(P(y) ? y.currentValue.value : y.size.value), new b(0)), g = p && P(p) && !p.currentValue.value.eq(p.collapsedSize.value);
911
+ return v.gt(V(n)) || !g;
912
912
  }
913
913
  };
914
914
  function d(s) {
@@ -946,7 +946,7 @@ function At(e, t) {
946
946
  n.items = qe(n.items.map((o) => o.id === s.itemId ? { ...o, order: s.index } : o));
947
947
  break;
948
948
  case "registerPanel":
949
- n.items = he(n.items, {
949
+ n.items = ge(n.items, {
950
950
  type: "panel",
951
951
  currentValue: $(-1),
952
952
  ...s.data
@@ -956,7 +956,7 @@ function At(e, t) {
956
956
  i.prepare(), i.removeItem(s.id), i.clearLastKnownSize(), i.commit(), i.onResize(), i.onAutosave();
957
957
  break;
958
958
  case "registerPanelHandle": {
959
- n.items = he(n.items, s.data);
959
+ n.items = ge(n.items, s.data);
960
960
  break;
961
961
  }
962
962
  case "unregisterPanelHandle":
@@ -975,12 +975,12 @@ function At(e, t) {
975
975
  type: "pixel",
976
976
  value: C(n, s.data.min)
977
977
  };
978
- const f = he(n.items, {
978
+ const f = ge(n.items, {
979
979
  type: "panel",
980
980
  ...s.data,
981
981
  currentValue: o
982
- }), g = f.findIndex((h) => h.id === s.data.id), p = { ...n }, v = n.items.reduce((h, z) => R(z) ? h.add(C(n, z.size)) : h.add(z.currentValue.value), new b(0)).minus(V(n));
983
- ze(p, f, g, o.value.add(v).neg()), n.items = f, i.clearLastKnownSize(), i.commit(), i.onResize(), i.onAutosave();
982
+ }), h = f.findIndex((g) => g.id === s.data.id), p = { ...n }, v = n.items.reduce((g, z) => R(z) ? g.add(C(n, z.size)) : g.add(z.currentValue.value), new b(0)).minus(V(n));
983
+ ze(p, f, h, o.value.add(v).neg()), n.items = f, i.clearLastKnownSize(), i.commit(), i.onResize(), i.onAutosave();
984
984
  break;
985
985
  }
986
986
  case "rebindPanelCallbacks":
@@ -1006,18 +1006,18 @@ function At(e, t) {
1006
1006
  const v = s.childrenSizes[p.id] || p.lastKnownSize;
1007
1007
  return { ...p, lastKnownSize: v };
1008
1008
  });
1009
- let f = 0, g = !1;
1009
+ let f = 0, h = !1;
1010
1010
  for (const p of o)
1011
1011
  if (P(p)) {
1012
1012
  const v = (m = p.lastKnownSize) == null ? void 0 : m[n.orientation === "horizontal" ? "width" : "height"];
1013
1013
  if (!v) {
1014
- n.items = o, g = !0;
1014
+ n.items = o, h = !0;
1015
1015
  break;
1016
1016
  }
1017
1017
  f += v;
1018
1018
  } else
1019
1019
  f += p.size.value.toNumber();
1020
- g ? n.items = o : f > V(n) && r.current !== "dragging" ? n.items = Pt({
1020
+ h ? n.items = o : f > V(n) && r.current === "idle" ? n.items = Pt({
1021
1021
  ...n,
1022
1022
  items: E({ ...n, items: o })
1023
1023
  }).items : n.items = o, i.onResize();
@@ -1038,13 +1038,13 @@ function At(e, t) {
1038
1038
  break;
1039
1039
  case "setPanelPixelSize": {
1040
1040
  i.prepare(), i.clearLastKnownSize();
1041
- const o = B(n, s.panelId), f = ce(n, s.panelId), g = o.currentValue.value, p = O(n, o, C(n, F(s.size))), v = p.gt(g), h = v ? p.minus(g) : g.minus(p);
1041
+ const o = B(n, s.panelId), f = ce(n, s.panelId), h = o.currentValue.value, p = O(n, o, C(n, F(s.size))), v = p.gt(h), g = v ? p.minus(h) : h.minus(p);
1042
1042
  o.sizeBeforeCollapse = p.toNumber(), Object.assign(n, de({
1043
1043
  context: n,
1044
1044
  panelId: s.panelId,
1045
1045
  direction: f.direction * (v ? 1 : -1),
1046
1046
  handleId: f.item.id,
1047
- delta: h
1047
+ delta: g
1048
1048
  })), i.commit(), i.onResize(), i.onAutosave();
1049
1049
  break;
1050
1050
  }
@@ -1139,8 +1139,8 @@ function Dt(e, t) {
1139
1139
  };
1140
1140
  }
1141
1141
  function Rt(e) {
1142
- const { onMoveStart: t, onMove: a, onMoveEnd: r } = e, l = { didMove: !1, lastPosition: null, id: null }, n = (o, f, g, p) => {
1143
- g === 0 && p === 0 || (l.didMove || (l.didMove = !0, t == null || t({
1142
+ const { onMoveStart: t, onMove: a, onMoveEnd: r } = e, l = { didMove: !1, lastPosition: null, id: null }, n = (o, f, h, p) => {
1143
+ h === 0 && p === 0 || (l.didMove || (l.didMove = !0, t == null || t({
1144
1144
  type: "movestart",
1145
1145
  pointerType: f,
1146
1146
  shiftKey: o.shiftKey,
@@ -1150,7 +1150,7 @@ function Rt(e) {
1150
1150
  })), a == null || a({
1151
1151
  type: "move",
1152
1152
  pointerType: f,
1153
- deltaX: g,
1153
+ deltaX: h,
1154
1154
  deltaY: p,
1155
1155
  shiftKey: o.shiftKey,
1156
1156
  metaKey: o.metaKey,
@@ -1169,10 +1169,10 @@ function Rt(e) {
1169
1169
  }, u = {}, d = () => {
1170
1170
  l.didMove = !1;
1171
1171
  }, c = (o) => {
1172
- var f, g;
1172
+ var f, h;
1173
1173
  if (o.pointerId === l.id) {
1174
1174
  const p = o.pointerType || "mouse";
1175
- n(o, p, o.pageX - (((f = l.lastPosition) == null ? void 0 : f.pageX) ?? 0), o.pageY - (((g = l.lastPosition) == null ? void 0 : g.pageY) ?? 0)), l.lastPosition = { pageX: o.pageX, pageY: o.pageY };
1175
+ n(o, p, o.pageX - (((f = l.lastPosition) == null ? void 0 : f.pageX) ?? 0), o.pageY - (((h = l.lastPosition) == null ? void 0 : h.pageY) ?? 0)), l.lastPosition = { pageX: o.pageX, pageY: o.pageY };
1176
1176
  }
1177
1177
  }, s = (o) => {
1178
1178
  if (o.pointerId === l.id) {
@@ -1183,8 +1183,8 @@ function Rt(e) {
1183
1183
  u.onPointerDown = (o) => {
1184
1184
  o.button === 0 && l.id == null && (d(), o.stopPropagation(), o.preventDefault(), l.lastPosition = { pageX: o.pageX, pageY: o.pageY }, l.id = o.pointerId, window.addEventListener("pointermove", c, !1), window.addEventListener("pointerup", s, !1), window.addEventListener("pointercancel", s, !1));
1185
1185
  };
1186
- const m = (o, f, g) => {
1187
- d(), n(o, "keyboard", f, g), i(o, "keyboard");
1186
+ const m = (o, f, h) => {
1187
+ d(), n(o, "keyboard", f, h), i(o, "keyboard");
1188
1188
  };
1189
1189
  return u.onKeyDown = (o) => {
1190
1190
  switch (o.key) {
@@ -1236,9 +1236,9 @@ const Kt = /* @__PURE__ */ be({
1236
1236
  defaultCollapsed: m,
1237
1237
  default: o,
1238
1238
  isStaticAtRest: f,
1239
- collapsed: g,
1239
+ collapsed: h,
1240
1240
  ...p
1241
- } = a, v = n || Ie(), h = X("send"), z = X("state"), y = X("isPrerender"), x = () => pt({
1241
+ } = a, v = n || Ie(), g = X("send"), z = X("state"), y = X("isPrerender"), x = () => pt({
1242
1242
  id: v,
1243
1243
  min: a.min,
1244
1244
  max: a.max,
@@ -1258,14 +1258,14 @@ const Kt = /* @__PURE__ */ be({
1258
1258
  return w;
1259
1259
  });
1260
1260
  let D = !1;
1261
- A.value ? h == null || h({
1261
+ A.value ? g == null || g({
1262
1262
  type: "rebindPanelCallbacks",
1263
1263
  data: {
1264
1264
  id: v,
1265
1265
  onCollapseChange: a.onCollapseChange ? { current: a.onCollapseChange } : void 0,
1266
1266
  onResize: a.onResize ? { current: a.onResize } : void 0
1267
1267
  }
1268
- }) : y != null && y.value ? h == null || h({ type: "registerPanel", data: x() }) : D = !0, G(() => {
1268
+ }) : y != null && y.value ? g == null || g({ type: "registerPanel", data: x() }) : D = !0, G(() => {
1269
1269
  var le;
1270
1270
  const w = (le = z == null ? void 0 : z.value) == null ? void 0 : le.groupId;
1271
1271
  if (!w || !D) return;
@@ -1274,7 +1274,7 @@ const Kt = /* @__PURE__ */ be({
1274
1274
  const q = document.getElementById(v);
1275
1275
  if (!q) return;
1276
1276
  const re = Array.from(S.children).indexOf(q);
1277
- typeof re == "number" && (h == null || h({
1277
+ typeof re == "number" && (g == null || g({
1278
1278
  type: "registerDynamicPanel",
1279
1279
  data: { ...x(), order: re }
1280
1280
  }), D = !1);
@@ -1283,16 +1283,16 @@ const Kt = /* @__PURE__ */ be({
1283
1283
  () => !D && mt(x(), A.value)
1284
1284
  );
1285
1285
  ue(() => {
1286
- K.value && (h == null || h({ type: "updateConstraints", data: x() }));
1286
+ K.value && (g == null || g({ type: "updateConstraints", data: x() }));
1287
1287
  }), Be(() => {
1288
- requestAnimationFrame(() => h == null ? void 0 : h({ type: "unregisterPanel", id: v }));
1288
+ requestAnimationFrame(() => g == null ? void 0 : g({ type: "unregisterPanel", id: v }));
1289
1289
  }), t({
1290
1290
  getId: () => v,
1291
1291
  collapse: async () => {
1292
1292
  var w;
1293
1293
  if ((w = A.value) != null && w.collapsible)
1294
1294
  return await new Promise((S) => {
1295
- h == null || h({ type: "collapsePanel", panelId: v, controlled: !0, resolve: S });
1295
+ g == null || g({ type: "collapsePanel", panelId: v, controlled: !0, resolve: S });
1296
1296
  });
1297
1297
  },
1298
1298
  isCollapsed: () => {
@@ -1303,7 +1303,7 @@ const Kt = /* @__PURE__ */ be({
1303
1303
  var w;
1304
1304
  if ((w = A.value) != null && w.collapsible)
1305
1305
  return await new Promise((S) => {
1306
- h == null || h({ type: "expandPanel", panelId: v, controlled: !0, resolve: S });
1306
+ g == null || g({ type: "expandPanel", panelId: v, controlled: !0, resolve: S });
1307
1307
  });
1308
1308
  },
1309
1309
  isExpanded: () => {
@@ -1312,7 +1312,7 @@ const Kt = /* @__PURE__ */ be({
1312
1312
  },
1313
1313
  getPixelSize: () => bt(z.value, v),
1314
1314
  getPercentageSize: () => yt(z.value, v),
1315
- setSize: (w) => h == null ? void 0 : h({ type: "setPanelPixelSize", panelId: v, size: w })
1315
+ setSize: (w) => g == null ? void 0 : g({ type: "setPanelPixelSize", panelId: v, size: w })
1316
1316
  });
1317
1317
  const L = H(
1318
1318
  () => {
@@ -1322,7 +1322,7 @@ const Kt = /* @__PURE__ */ be({
1322
1322
  );
1323
1323
  ue(() => {
1324
1324
  a.collapsed, requestAnimationFrame(() => {
1325
- L.value && (a.collapsed ? h == null || h({ type: "collapsePanel", panelId: v, controlled: !0 }) : h == null || h({ type: "expandPanel", panelId: v, controlled: !0 }));
1325
+ L.value && (a.collapsed ? g == null || g({ type: "collapsePanel", panelId: v, controlled: !0 }) : g == null || g({ type: "expandPanel", panelId: v, controlled: !0 }));
1326
1326
  });
1327
1327
  });
1328
1328
  const M = H(() => {
@@ -1393,22 +1393,22 @@ const Kt = /* @__PURE__ */ be({
1393
1393
  ie("send", u), ie("state", c), ie("id", d);
1394
1394
  const m = me(null);
1395
1395
  G(() => {
1396
- const f = new ResizeObserver(([g]) => {
1397
- g && g.contentRect.width > 0 && g.contentRect.height > 0 && (u == null || u({ type: "setSize", size: g.contentRect }));
1396
+ const f = new ResizeObserver(([h]) => {
1397
+ h && h.contentRect.width > 0 && h.contentRect.height > 0 && (u == null || u({ type: "setSize", size: h.contentRect }));
1398
1398
  });
1399
1399
  return m.value && f.observe(m.value), () => f.disconnect();
1400
1400
  });
1401
1401
  const o = H(
1402
1402
  () => {
1403
1403
  var f;
1404
- return (f = c.value) == null ? void 0 : f.items.map((g) => g.id).join(",");
1404
+ return (f = c.value) == null ? void 0 : f.items.map((h) => h.id).join(",");
1405
1405
  }
1406
1406
  );
1407
1407
  return G(() => {
1408
1408
  ue(() => {
1409
1409
  o.value;
1410
- const f = Dt(n, (g) => {
1411
- u({ type: "setActualItemsSize", childrenSizes: g });
1410
+ const f = Dt(n, (h) => {
1411
+ u({ type: "setActualItemsSize", childrenSizes: h });
1412
1412
  });
1413
1413
  Ge(f);
1414
1414
  });
@@ -1422,17 +1422,17 @@ const Kt = /* @__PURE__ */ be({
1422
1422
  }),
1423
1423
  getState: () => d.current === "idle" ? "idle" : "dragging",
1424
1424
  setSizes: (f) => {
1425
- var g;
1425
+ var h;
1426
1426
  for (let p = 0; p < f.length; p++) {
1427
- const v = (g = c.value) == null ? void 0 : g.items[p], h = f[p];
1428
- v && P(v) && h && u({
1427
+ const v = (h = c.value) == null ? void 0 : h.items[p], g = f[p];
1428
+ v && P(v) && g && u({
1429
1429
  type: "setPanelPixelSize",
1430
1430
  panelId: v.id,
1431
- size: h
1431
+ size: g
1432
1432
  });
1433
1433
  }
1434
1434
  }
1435
- }), (f, g) => (Pe(), ye("div", Ke(a, {
1435
+ }), (f, h) => (Pe(), ye("div", Ke(a, {
1436
1436
  id: Xe(n),
1437
1437
  ref_key: "elementRef",
1438
1438
  ref: m,
@@ -1454,11 +1454,11 @@ const Kt = /* @__PURE__ */ be({
1454
1454
  id: {}
1455
1455
  },
1456
1456
  setup(e) {
1457
- const t = Ee(e, ["size", "id", "onDragStart", "onDrag", "onDragEnd", "disabled"]), r = e.id || Ie(), l = X("send"), n = X("state"), i = X("isPrerender"), u = () => ht({ size: e.size, id: r }), d = H(() => {
1457
+ const t = Ee(e, ["size", "id", "onDragStart", "onDrag", "onDragEnd", "disabled"]), r = e.id || Ie(), l = X("send"), n = X("state"), i = X("isPrerender"), u = () => gt({ size: e.size, id: r }), d = H(() => {
1458
1458
  var p;
1459
- const g = (p = n == null ? void 0 : n.value) == null ? void 0 : p.items.find((v) => v.id === r);
1460
- if (!(!g || !R(g)))
1461
- return g;
1459
+ const h = (p = n == null ? void 0 : n.value) == null ? void 0 : p.items.find((v) => v.id === r);
1460
+ if (!(!h || !R(h)))
1461
+ return h;
1462
1462
  });
1463
1463
  let c = !1;
1464
1464
  d.value || (i != null && i.value ? l == null || l({ type: "registerPanelHandle", data: u() }) : c = !0), G(() => {
@@ -1468,14 +1468,14 @@ const Kt = /* @__PURE__ */ be({
1468
1468
  if (!p) return;
1469
1469
  const v = document.getElementById(r);
1470
1470
  if (!v) return;
1471
- const h = Array.from(p.children).indexOf(v);
1472
- typeof h == "number" && (l == null || l({
1471
+ const g = Array.from(p.children).indexOf(v);
1472
+ typeof g == "number" && (l == null || l({
1473
1473
  type: "registerPanelHandle",
1474
- data: { ...u(), order: h }
1474
+ data: { ...u(), order: g }
1475
1475
  }), c = !1);
1476
1476
  });
1477
1477
  const s = H(
1478
- () => !c && gt(u(), d.value)
1478
+ () => !c && ht(u(), d.value)
1479
1479
  );
1480
1480
  ue(() => {
1481
1481
  s.value && (l == null || l({ type: "updateConstraints", data: u() }));
@@ -1484,29 +1484,29 @@ const Kt = /* @__PURE__ */ be({
1484
1484
  });
1485
1485
  const { moveProps: m } = Rt({
1486
1486
  onMoveStart: () => {
1487
- var g;
1488
- l == null || l({ type: "dragHandleStart", handleId: r }), (g = e.onDragStart) == null || g.call(e), n != null && n.value && (document.body.style.cursor = Ve(n == null ? void 0 : n.value) || "auto");
1487
+ var h;
1488
+ l == null || l({ type: "dragHandleStart", handleId: r }), (h = e.onDragStart) == null || h.call(e), n != null && n.value && (document.body.style.cursor = Ve(n == null ? void 0 : n.value) || "auto");
1489
1489
  },
1490
- onMove: (g) => {
1490
+ onMove: (h) => {
1491
1491
  var p;
1492
- l == null || l({ type: "dragHandle", handleId: r, value: g }), (p = e.onDrag) == null || p.call(e);
1492
+ l == null || l({ type: "dragHandle", handleId: r, value: h }), (p = e.onDrag) == null || p.call(e);
1493
1493
  },
1494
1494
  onMoveEnd: () => {
1495
- var g;
1496
- l == null || l({ type: "dragHandleEnd", handleId: r }), (g = e.onDragEnd) == null || g.call(e), document.body.style.cursor = "auto";
1495
+ var h;
1496
+ l == null || l({ type: "dragHandleEnd", handleId: r }), (h = e.onDragEnd) == null || h.call(e), document.body.style.cursor = "auto";
1497
1497
  }
1498
- }), o = (g) => {
1498
+ }), o = (h) => {
1499
1499
  if (n != null && n.value)
1500
1500
  try {
1501
1501
  const p = vt(n == null ? void 0 : n.value, r);
1502
- g.key === "Enter" && p && (p.collapsed ? l == null || l({ type: "expandPanel", panelId: p.id }) : l == null || l({ type: "collapsePanel", panelId: p.id }));
1502
+ h.key === "Enter" && p && (p.collapsed ? l == null || l({ type: "expandPanel", panelId: p.id }) : l == null || l({ type: "collapsePanel", panelId: p.id }));
1503
1503
  } catch {
1504
1504
  }
1505
1505
  }, f = H(() => {
1506
- var h, z, y, x, A, D, K, L, M;
1507
- const g = (h = n == null ? void 0 : n.value) == null ? void 0 : h.items.findIndex((w) => w.id === r);
1508
- if (!g) return { id: r };
1509
- const p = (z = n == null ? void 0 : n.value) == null ? void 0 : z.items[g], v = (y = n == null ? void 0 : n.value) == null ? void 0 : y.items[g - 1];
1506
+ var g, z, y, x, A, D, K, L, M;
1507
+ const h = (g = n == null ? void 0 : n.value) == null ? void 0 : g.items.findIndex((w) => w.id === r);
1508
+ if (!h) return { id: r };
1509
+ const p = (z = n == null ? void 0 : n.value) == null ? void 0 : z.items[h], v = (y = n == null ? void 0 : n.value) == null ? void 0 : y.items[h - 1];
1510
1510
  return !v || !P(v) ? { id: r } : {
1511
1511
  ...t,
1512
1512
  ...Vt({
@@ -1533,10 +1533,10 @@ const Kt = /* @__PURE__ */ be({
1533
1533
  }
1534
1534
  };
1535
1535
  });
1536
- return (g, p) => (Pe(), ye("div", Ke(f.value, {
1537
- tabindex: g.disabled ? -1 : 0
1536
+ return (h, p) => (Pe(), ye("div", Ke(f.value, {
1537
+ tabindex: h.disabled ? -1 : 0
1538
1538
  }), [
1539
- Se(g.$slots, "default")
1539
+ Se(h.$slots, "default")
1540
1540
  ], 16, Bt));
1541
1541
  }
1542
1542
  });