react-panel-layout 0.5.0 → 0.5.2

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.
Files changed (63) hide show
  1. package/dist/FloatingPanelFrame-D9Cp2al1.cjs +2 -0
  2. package/dist/FloatingPanelFrame-D9Cp2al1.cjs.map +1 -0
  3. package/dist/FloatingPanelFrame-lLg-Lpg7.js +95 -0
  4. package/dist/FloatingPanelFrame-lLg-Lpg7.js.map +1 -0
  5. package/dist/GridLayout-BQQ63eA1.cjs +2 -0
  6. package/dist/GridLayout-BQQ63eA1.cjs.map +1 -0
  7. package/dist/{GridLayout-tpSM0iM-.js → GridLayout-CJTKq7Mp.js} +465 -460
  8. package/dist/GridLayout-CJTKq7Mp.js.map +1 -0
  9. package/dist/PanelSystemContext.d.ts +9 -0
  10. package/dist/components/grid/GridLayerList.d.ts +3 -0
  11. package/dist/components/paneling/FloatingPanelFrame.d.ts +4 -0
  12. package/dist/config.cjs +1 -1
  13. package/dist/config.js +1 -1
  14. package/dist/constants/styles.d.ts +3 -1
  15. package/dist/floating.cjs +1 -1
  16. package/dist/floating.js +1 -1
  17. package/dist/hooks/ContentCacheContext.d.ts +59 -0
  18. package/dist/hooks/useContainerScroll.d.ts +23 -0
  19. package/dist/hooks/useContentCache.d.ts +67 -0
  20. package/dist/hooks/useDocumentScroll.d.ts +13 -0
  21. package/dist/hooks/useScrollContainer.d.ts +21 -0
  22. package/dist/index.cjs +2 -2
  23. package/dist/index.cjs.map +1 -1
  24. package/dist/index.js +442 -440
  25. package/dist/index.js.map +1 -1
  26. package/dist/modules/pivot/types.d.ts +6 -0
  27. package/dist/pivot.cjs +1 -1
  28. package/dist/pivot.js +1 -1
  29. package/dist/sticky-header/StickyHeader.d.ts +53 -0
  30. package/dist/sticky-header/index.d.ts +7 -0
  31. package/dist/sticky-header/types.d.ts +50 -0
  32. package/dist/sticky-header.cjs +2 -0
  33. package/dist/sticky-header.cjs.map +1 -0
  34. package/dist/sticky-header.js +198 -0
  35. package/dist/sticky-header.js.map +1 -0
  36. package/dist/styles-CA2_zLZt.js +52 -0
  37. package/dist/{styles-DcG3aIFx.cjs.map → styles-CA2_zLZt.js.map} +1 -1
  38. package/dist/styles-PsqGOEJP.cjs +2 -0
  39. package/dist/styles-PsqGOEJP.cjs.map +1 -0
  40. package/dist/types.d.ts +12 -0
  41. package/dist/useIsomorphicLayoutEffect-DGRNF4Lf.cjs +2 -0
  42. package/dist/useIsomorphicLayoutEffect-DGRNF4Lf.cjs.map +1 -0
  43. package/dist/useIsomorphicLayoutEffect-DhmEnmZ_.js +6 -0
  44. package/dist/useIsomorphicLayoutEffect-DhmEnmZ_.js.map +1 -0
  45. package/dist/usePivot-7ctin_P_.cjs +2 -0
  46. package/dist/usePivot-7ctin_P_.cjs.map +1 -0
  47. package/dist/usePivot-CgQxB8rc.js +124 -0
  48. package/dist/usePivot-CgQxB8rc.js.map +1 -0
  49. package/package.json +6 -1
  50. package/dist/FloatingPanelFrame-DDT6aING.js +0 -66
  51. package/dist/FloatingPanelFrame-DDT6aING.js.map +0 -1
  52. package/dist/FloatingPanelFrame-DrYwgI9f.cjs +0 -2
  53. package/dist/FloatingPanelFrame-DrYwgI9f.cjs.map +0 -1
  54. package/dist/GridLayout-DC7fCmcI.cjs +0 -2
  55. package/dist/GridLayout-DC7fCmcI.cjs.map +0 -1
  56. package/dist/GridLayout-tpSM0iM-.js.map +0 -1
  57. package/dist/styles-DcG3aIFx.cjs +0 -2
  58. package/dist/styles-w0ZixggV.js +0 -51
  59. package/dist/styles-w0ZixggV.js.map +0 -1
  60. package/dist/usePivot-C8q0pMgW.cjs +0 -2
  61. package/dist/usePivot-C8q0pMgW.cjs.map +0 -1
  62. package/dist/usePivot-z9gumDf-.js +0 -97
  63. package/dist/usePivot-z9gumDf-.js.map +0 -1
package/dist/index.js CHANGED
@@ -1,24 +1,25 @@
1
- import { u as kt, a as Mt, b as _t, c as J, d as Ot, e as M, t as Bt, R as ot, G as st } from "./GridLayout-tpSM0iM-.js";
2
- import { D as kn, f as Mn, F as _n, r as On, g as Bn } from "./GridLayout-tpSM0iM-.js";
1
+ import { u as kt, a as Mt, b as _t, c as J, d as Ot, e as M, t as Bt, R as ot, G as st } from "./GridLayout-CJTKq7Mp.js";
2
+ import { D as _n, f as On, F as Bn, r as Ln, g as Hn } from "./GridLayout-CJTKq7Mp.js";
3
3
  import { jsx as m, jsxs as H, Fragment as et } from "react/jsx-runtime";
4
- import * as l from "react";
5
- import { t as Lt, u as Ht, v as Nt, H as zt, y as $t, z as Ft, A as Xt, B as Yt, E as jt, I as Kt, T as Ut, J as Vt, K as Wt, L as qt, M as Zt, N as Jt, O as Qt, S as te } from "./styles-w0ZixggV.js";
6
- import { Q as Hn } from "./styles-w0ZixggV.js";
7
- import { a as nt } from "./usePivot-z9gumDf-.js";
4
+ import * as u from "react";
5
+ import { u as Lt, v as Ht, w as Nt, H as zt, z as $t, A as Ft, B as Xt, E as Yt, I as jt, J as Ut, T as Kt, K as Vt, L as Wt, M as qt, N as Zt, O as Jt, Q as Qt, S as te } from "./styles-CA2_zLZt.js";
6
+ import { U as zn } from "./styles-CA2_zLZt.js";
7
+ import { u as nt } from "./useIsomorphicLayoutEffect-DhmEnmZ_.js";
8
8
  import { createPortal as ee } from "react-dom";
9
- const ne = (t) => ({
9
+ import { a as ne } from "./usePivot-CgQxB8rc.js";
10
+ const re = (t) => ({
10
11
  width: zt,
11
12
  cursor: "col-resize",
12
13
  position: "relative",
13
14
  userSelect: "none",
14
15
  backgroundColor: t === "drag" ? Lt : t === "hover" ? Ht : Nt
15
- }), Gn = ({ onResize: t, component: e, element: n }) => {
16
+ }), En = ({ onResize: t, component: e, element: n }) => {
16
17
  const { ref: r, isDragging: o, onPointerDown: s } = kt({
17
18
  axis: "x",
18
19
  onResize: t
19
- }), [a, i] = l.useState(!1), c = {
20
+ }), [a, i] = u.useState(!1), c = {
20
21
  ref: r,
21
- style: ne(o ? "drag" : a ? "hover" : "idle"),
22
+ style: re(o ? "drag" : a ? "hover" : "idle"),
22
23
  role: "separator",
23
24
  "aria-orientation": "vertical",
24
25
  "data-dragging": o ? "true" : void 0,
@@ -26,67 +27,67 @@ const ne = (t) => ({
26
27
  onPointerEnter: () => i(!0),
27
28
  onPointerLeave: () => i(!1)
28
29
  };
29
- return n ? l.cloneElement(n, c) : e ? /* @__PURE__ */ m(e, { ...c }) : /* @__PURE__ */ m("div", { ...c });
30
- }, Cn = () => {
30
+ return n ? u.cloneElement(n, c) : e ? /* @__PURE__ */ m(e, { ...c }) : /* @__PURE__ */ m("div", { ...c });
31
+ }, Rn = () => {
31
32
  const { layerId: t } = Mt(), { getLayerHandleProps: e } = _t();
32
- return l.useMemo(() => e(t), [e, t]);
33
- }, it = { left: 0, top: 0 }, at = { width: 400, height: 300 }, En = (t) => {
34
- const [e, n] = l.useState(() => {
35
- const u = {};
33
+ return u.useMemo(() => e(t), [e, t]);
34
+ }, it = { left: 0, top: 0 }, at = { width: 400, height: 300 }, Pn = (t) => {
35
+ const [e, n] = u.useState(() => {
36
+ const l = {};
36
37
  return t.forEach((p) => {
37
38
  if (p.floating) {
38
39
  const g = p.floating;
39
- u[p.id] = {
40
+ l[p.id] = {
40
41
  position: g.defaultPosition ?? it,
41
42
  size: g.defaultSize ?? at
42
43
  };
43
44
  }
44
- }), u;
45
- }), r = l.useMemo(() => {
46
- const u = /* @__PURE__ */ new Map();
47
- return t.forEach((p) => u.set(p.id, p)), u;
48
- }, [t]), o = l.useCallback(
49
- (u) => {
50
- const p = r.get(u);
51
- return p?.floating?.position !== void 0 ? p.floating.position : e[u]?.position ?? it;
45
+ }), l;
46
+ }), r = u.useMemo(() => {
47
+ const l = /* @__PURE__ */ new Map();
48
+ return t.forEach((p) => l.set(p.id, p)), l;
49
+ }, [t]), o = u.useCallback(
50
+ (l) => {
51
+ const p = r.get(l);
52
+ return p?.floating?.position !== void 0 ? p.floating.position : e[l]?.position ?? it;
52
53
  },
53
54
  [r, e]
54
- ), s = l.useCallback(
55
- (u) => {
56
- const p = r.get(u);
57
- return p?.floating?.size !== void 0 ? p.floating.size : e[u]?.size ?? at;
55
+ ), s = u.useCallback(
56
+ (l) => {
57
+ const p = r.get(l);
58
+ return p?.floating?.size !== void 0 ? p.floating.size : e[l]?.size ?? at;
58
59
  },
59
60
  [r, e]
60
- ), a = l.useCallback(
61
- (u) => r.get(u)?.floating?.zIndex,
61
+ ), a = u.useCallback(
62
+ (l) => r.get(l)?.floating?.zIndex,
62
63
  [r]
63
- ), i = l.useCallback(
64
- (u, p) => {
65
- const g = r.get(u);
64
+ ), i = u.useCallback(
65
+ (l, p) => {
66
+ const g = r.get(l);
66
67
  g?.floating && (g.floating.position === void 0 && n((v) => {
67
- const h = v[u];
68
- return h ? {
68
+ const b = v[l];
69
+ return b ? {
69
70
  ...v,
70
- [u]: { ...h, position: p }
71
+ [l]: { ...b, position: p }
71
72
  } : v;
72
73
  }), g.floating.onMove?.(p));
73
74
  },
74
75
  [r]
75
- ), c = l.useCallback(
76
- (u, p) => {
77
- const g = r.get(u);
76
+ ), c = u.useCallback(
77
+ (l, p) => {
78
+ const g = r.get(l);
78
79
  g?.floating && (g.floating.size === void 0 && n((v) => {
79
- const h = v[u];
80
- return h ? {
80
+ const b = v[l];
81
+ return b ? {
81
82
  ...v,
82
- [u]: { ...h, size: p }
83
+ [l]: { ...b, size: p }
83
84
  } : v;
84
85
  }), g.floating.onResize?.(p));
85
86
  },
86
87
  [r]
87
- ), d = l.useCallback(
88
- (u) => {
89
- r.get(u)?.floating?.onClose?.();
88
+ ), d = u.useCallback(
89
+ (l) => {
90
+ r.get(l)?.floating?.onClose?.();
90
91
  },
91
92
  [r]
92
93
  );
@@ -98,37 +99,37 @@ const ne = (t) => ({
98
99
  updateSize: c,
99
100
  close: d
100
101
  };
101
- }, ft = l.createContext(null), re = () => {
102
- const t = l.useContext(ft);
102
+ }, ft = u.createContext(null), oe = () => {
103
+ const t = u.useContext(ft);
103
104
  if (!t)
104
105
  throw new Error("useKeybindings must be used within KeybindingsProvider");
105
106
  return t;
106
- }, oe = (t) => {
107
+ }, se = (t) => {
107
108
  const e = [];
108
109
  t.metaKey && e.push("Mod"), t.ctrlKey && e.push("Ctrl"), t.altKey && e.push("Alt"), t.shiftKey && e.push("Shift");
109
110
  const n = t.key.length === 1 ? t.key.toUpperCase() : t.key;
110
111
  return e.push(n), e.join("-");
111
- }, se = ({ children: t, configure: e }) => {
112
- const n = l.useRef({}), r = l.useCallback((a, i) => {
112
+ }, ie = ({ children: t, configure: e }) => {
113
+ const n = u.useRef({}), r = u.useCallback((a, i) => {
113
114
  n.current = { ...n.current, [a]: i };
114
- }, []), o = l.useCallback((a) => {
115
+ }, []), o = u.useCallback((a) => {
115
116
  const i = { ...n.current };
116
117
  delete i[a], n.current = i;
117
118
  }, []);
118
- l.useEffect(() => {
119
+ u.useEffect(() => {
119
120
  const a = (i) => {
120
- const c = oe(i), d = n.current[c];
121
+ const c = se(i), d = n.current[c];
121
122
  d && d(i);
122
123
  };
123
124
  return window.addEventListener("keydown", a), () => {
124
125
  window.removeEventListener("keydown", a);
125
126
  };
126
127
  }, []);
127
- const s = l.useMemo(() => ({ register: r, unregister: o }), [r, o]);
128
- return l.useEffect(() => {
128
+ const s = u.useMemo(() => ({ register: r, unregister: o }), [r, o]);
129
+ return u.useEffect(() => {
129
130
  e && e(s);
130
131
  }, [s, e]), /* @__PURE__ */ m(ft.Provider, { value: s, children: t });
131
- }, ie = (t, e) => {
132
+ }, ae = (t, e) => {
132
133
  t.register("Mod-\\", (n) => {
133
134
  n.preventDefault(), e.splitFocused("vertical");
134
135
  }), t.register("Mod-Shift-\\", (n) => {
@@ -143,9 +144,9 @@ const ne = (t) => ({
143
144
  }), t.register("Alt-ArrowLeft", (n) => {
144
145
  n.preventDefault(), e.focusPrevGroup();
145
146
  });
146
- }, ae = (t) => t.type === "group", gt = (t, e = { x: 0, y: 0, w: 100, h: 100 }) => {
147
+ }, ce = (t) => t.type === "group", gt = (t, e = { x: 0, y: 0, w: 100, h: 100 }) => {
147
148
  const n = /* @__PURE__ */ new Map(), r = (o, s) => {
148
- if (ae(o)) {
149
+ if (ce(o)) {
149
150
  n.set(o.groupId, s);
150
151
  return;
151
152
  }
@@ -158,7 +159,7 @@ const ne = (t) => ({
158
159
  r(o.a, { x: s.x, y: s.y, w: s.w, h: a }), r(o.b, { x: s.x, y: s.y + a, w: s.w, h: i });
159
160
  };
160
161
  return r(t, e), n;
161
- }, ce = (t, e) => {
162
+ }, ue = (t, e) => {
162
163
  const n = gt(t.tree), r = {
163
164
  areas: [["root"]],
164
165
  rows: [{ size: "1fr" }],
@@ -184,95 +185,95 @@ const ne = (t) => ({
184
185
  };
185
186
  });
186
187
  return { config: r, layers: o };
187
- }, ue = (t, e, n) => {
188
- const r = gt(t.tree), o = Array.from(new Set(Array.from(r.values()).flatMap((h) => [h.x, h.x + h.w]))).sort((h, y) => h - y), s = Array.from(new Set(Array.from(r.values()).flatMap((h) => [h.y, h.y + h.h]))).sort((h, y) => h - y), a = o.slice(1).map((h, y) => `${h - o[y]}fr`), i = s.slice(1).map((h, y) => `${h - s[y]}fr`), c = a.map((h) => ({ size: h, resizable: n })), d = i.map((h) => ({ size: h, resizable: n })), u = (h, y, w, T) => {
189
- for (const [b, I] of r.entries())
190
- if (h >= I.x && y <= I.x + I.w && w >= I.y && T <= I.y + I.h)
191
- return b;
188
+ }, le = (t, e, n) => {
189
+ const r = gt(t.tree), o = Array.from(new Set(Array.from(r.values()).flatMap((b) => [b.x, b.x + b.w]))).sort((b, I) => b - I), s = Array.from(new Set(Array.from(r.values()).flatMap((b) => [b.y, b.y + b.h]))).sort((b, I) => b - I), a = o.slice(1).map((b, I) => `${b - o[I]}fr`), i = s.slice(1).map((b, I) => `${b - s[I]}fr`), c = a.map((b) => ({ size: b, resizable: n })), d = i.map((b) => ({ size: b, resizable: n })), l = (b, I, w, T) => {
190
+ for (const [h, y] of r.entries())
191
+ if (b >= y.x && I <= y.x + y.w && w >= y.y && T <= y.y + y.h)
192
+ return h;
192
193
  return ".";
193
194
  }, p = [];
194
- for (let h = 0; h < s.length - 1; h += 1) {
195
- const y = [];
195
+ for (let b = 0; b < s.length - 1; b += 1) {
196
+ const I = [];
196
197
  for (let w = 0; w < o.length - 1; w += 1)
197
- y.push(u(o[w], o[w + 1], s[h], s[h + 1]));
198
- p.push(y);
198
+ I.push(l(o[w], o[w + 1], s[b], s[b + 1]));
199
+ p.push(I);
199
200
  }
200
201
  const g = {
201
202
  areas: p,
202
203
  rows: d,
203
204
  columns: c,
204
205
  gap: "0px"
205
- }, v = Array.from(r.keys()).map((h) => ({
206
- id: h,
207
- gridArea: h,
208
- component: e(h)
206
+ }, v = Array.from(r.keys()).map((b) => ({
207
+ id: b,
208
+ gridArea: b,
209
+ component: e(b)
209
210
  }));
210
211
  return { config: g, layers: v };
211
- }, bt = l.createContext(null), le = () => {
212
- const t = l.useContext(bt);
212
+ }, bt = u.createContext(null), de = () => {
213
+ const t = u.useContext(bt);
213
214
  if (!t)
214
215
  throw new Error("usePanelRenderContext must be used within PanelRenderProvider");
215
216
  return t;
216
- }, de = ({ value: t, children: e }) => /* @__PURE__ */ m(bt.Provider, { value: t, children: e }), ht = l.createContext(null), mt = () => {
217
- const t = l.useContext(ht);
217
+ }, pe = ({ value: t, children: e }) => /* @__PURE__ */ m(bt.Provider, { value: t, children: e }), ht = u.createContext(null), mt = () => {
218
+ const t = u.useContext(ht);
218
219
  if (!t)
219
220
  throw new Error("useDomRegistry must be used within DomRegistryProvider");
220
221
  return t;
221
- }, pe = ({ children: t }) => {
222
- const e = l.useRef(/* @__PURE__ */ new Map()), n = l.useCallback((c) => {
222
+ }, fe = ({ children: t }) => {
223
+ const e = u.useRef(/* @__PURE__ */ new Map()), n = u.useCallback((c) => {
223
224
  const d = e.current.get(c);
224
225
  if (d)
225
226
  return d;
226
- const u = { group: null, tabbar: null, content: null };
227
- return e.current.set(c, u), u;
228
- }, []), r = l.useCallback(
227
+ const l = { group: null, tabbar: null, content: null };
228
+ return e.current.set(c, l), l;
229
+ }, []), r = u.useCallback(
229
230
  (c, d) => {
230
- const u = n(c);
231
- if (u.group = d, d === null) {
231
+ const l = n(c);
232
+ if (l.group = d, d === null) {
232
233
  const p = e.current.get(c);
233
234
  (p ? p.tabbar === null && p.content === null : !1) && e.current.delete(c);
234
235
  }
235
236
  },
236
237
  [n]
237
- ), o = l.useCallback(
238
+ ), o = u.useCallback(
238
239
  (c, d) => {
239
- const u = n(c);
240
- if (u.tabbar = d, d === null) {
240
+ const l = n(c);
241
+ if (l.tabbar = d, d === null) {
241
242
  const p = e.current.get(c);
242
243
  (p ? p.group === null && p.content === null : !1) && e.current.delete(c);
243
244
  }
244
245
  },
245
246
  [n]
246
- ), s = l.useCallback(
247
+ ), s = u.useCallback(
247
248
  (c, d) => {
248
- const u = n(c);
249
- if (u.content = d, d === null) {
249
+ const l = n(c);
250
+ if (l.content = d, d === null) {
250
251
  const p = e.current.get(c);
251
252
  (p ? p.group === null && p.tabbar === null : !1) && e.current.delete(c);
252
253
  }
253
254
  },
254
255
  [n]
255
- ), a = l.useCallback(() => e.current, []), i = l.useMemo(() => ({ setGroupEl: r, setTabbarEl: o, setContentEl: s, getAll: a }), [r, o, s, a]);
256
+ ), a = u.useCallback(() => e.current, []), i = u.useMemo(() => ({ setGroupEl: r, setTabbarEl: o, setContentEl: s, getAll: a }), [r, o, s, a]);
256
257
  return /* @__PURE__ */ m(ht.Provider, { value: i, children: t });
257
- }, fe = {
258
+ }, ge = {
258
259
  display: "flex",
259
260
  flexDirection: "column",
260
261
  width: "100%",
261
262
  height: "100%"
262
- }, ge = {
263
+ }, be = {
263
264
  flex: "1 1 auto",
264
265
  minWidth: 0,
265
266
  minHeight: 0,
266
267
  position: "relative",
267
268
  overflow: "hidden"
268
269
  };
269
- function be(t, e, n, r) {
270
- return t ? l.cloneElement(t, n, r) : e ? /* @__PURE__ */ m(e, { ...n, children: r }) : /* @__PURE__ */ m("div", { ...n, children: r });
271
- }
272
270
  function he(t, e, n, r) {
273
- return t ? l.cloneElement(t, n, r) : e ? /* @__PURE__ */ m(e, { ...n, children: r }) : /* @__PURE__ */ m("div", { ...n, children: r });
271
+ return t ? u.cloneElement(t, n, r) : e ? /* @__PURE__ */ m(e, { ...n, children: r }) : /* @__PURE__ */ m("div", { ...n, children: r });
272
+ }
273
+ function me(t, e, n, r) {
274
+ return t ? u.cloneElement(t, n, r) : e ? /* @__PURE__ */ m(e, { ...n, children: r }) : /* @__PURE__ */ m("div", { ...n, children: r });
274
275
  }
275
- const me = ({
276
+ const ve = ({
276
277
  group: t,
277
278
  tabbar: e,
278
279
  content: n,
@@ -284,25 +285,25 @@ const me = ({
284
285
  contentComponent: c,
285
286
  contentElement: d
286
287
  }) => {
287
- const u = {
288
+ const l = {
288
289
  ref: o,
289
- style: fe,
290
+ style: ge,
290
291
  "data-group-id": t.id
291
- }, g = be(d, c, {
292
+ }, g = he(d, c, {
292
293
  ref: s,
293
- style: ge,
294
+ style: be,
294
295
  "data-dnd-zone": "content",
295
296
  onPointerDown: r
296
297
  }, n);
297
- return he(i, a, u, /* @__PURE__ */ H(et, { children: [
298
+ return me(i, a, l, /* @__PURE__ */ H(et, { children: [
298
299
  e,
299
300
  g
300
301
  ] }));
301
- }, vt = l.memo(me, (t, e) => t.group.id !== e.group.id || t.group.activeTabId !== e.group.activeTabId || t.group.tabs.length !== e.group.tabs.length ? !1 : t.group.tabs === e.group.tabs);
302
+ }, vt = u.memo(ve, (t, e) => t.group.id !== e.group.id || t.group.activeTabId !== e.group.activeTabId || t.group.tabs.length !== e.group.tabs.length ? !1 : t.group.tabs === e.group.tabs);
302
303
  vt.displayName = "PanelGroupView";
303
- const K = (t, e, n) => {
304
- const r = t.left, o = t.top, s = t.width, a = t.height, i = e - r, c = n - o, d = s / 3, u = a / 3;
305
- return i > d && i < s - d && c > u && c < a - u ? "center" : i < c && i < s - i && c < a - c ? "left" : s - i < c && s - i < i && c < a - c ? "right" : c < i && c < a - c && i < s - i ? "top" : "bottom";
304
+ const U = (t, e, n) => {
305
+ const r = t.left, o = t.top, s = t.width, a = t.height, i = e - r, c = n - o, d = s / 3, l = a / 3;
306
+ return i > d && i < s - d && c > l && c < a - l ? "center" : i < c && i < s - i && c < a - c ? "left" : s - i < c && s - i < i && c < a - c ? "right" : c < i && c < a - c && i < s - i ? "top" : "bottom";
306
307
  };
307
308
  function A(t, e) {
308
309
  if (!e) {
@@ -323,7 +324,7 @@ function A(t, e) {
323
324
  enumerable: !0
324
325
  }), n;
325
326
  }
326
- const ve = (t, e) => {
327
+ const Ie = (t, e) => {
327
328
  const n = {};
328
329
  return Object.keys(t).forEach((r) => {
329
330
  const o = t[r];
@@ -359,7 +360,7 @@ const ve = (t, e) => {
359
360
  (t) => t
360
361
  ),
361
362
  reset: A("RESET")
362
- }, Ie = It(D, {
363
+ }, we = It(D, {
363
364
  startContent: (t, e) => ({
364
365
  phase: {
365
366
  kind: "content",
@@ -392,15 +393,15 @@ const ve = (t, e) => {
392
393
  setPointer: (t, e) => ({ ...t, pointer: e.payload }),
393
394
  setTabbarHover: (t, e) => ({ ...t, tabbarHover: e.payload }),
394
395
  reset: () => wt
395
- }), we = (t, e) => {
396
- const n = Ie[e.type];
396
+ }), ye = (t, e) => {
397
+ const n = we[e.type];
397
398
  return n ? n(t, e, void 0) : t;
398
- }, yt = l.createContext(null), W = () => {
399
- const t = l.useContext(yt);
399
+ }, yt = u.createContext(null), W = () => {
400
+ const t = u.useContext(yt);
400
401
  if (!t)
401
402
  throw new Error("usePanelInteractions must be used within InteractionsProvider");
402
403
  return t;
403
- }, ye = ({
404
+ }, Te = ({
404
405
  containerRef: t,
405
406
  dragThresholdPx: e,
406
407
  onCommitContentDrop: n,
@@ -408,27 +409,27 @@ const ve = (t, e) => {
408
409
  isContentZoneAllowed: o,
409
410
  children: s
410
411
  }) => {
411
- const [a, i] = l.useReducer(we, wt), c = mt(), d = l.useCallback(() => {
412
- const w = Array.from(c.getAll().entries()), T = w.map(([f, S]) => ({ gid: f, el: S.content ?? S.group })).filter((f) => !!f.el).map((f) => ({ ...f, rect: f.el.getBoundingClientRect() })), b = w.map(([f, S]) => ({ gid: f, el: S.tabbar })).filter((f) => !!f.el).map((f) => ({ ...f, rect: f.el.getBoundingClientRect() })), I = w.map(([f, S]) => ({ gid: f, el: S.content ?? S.group })).filter((f) => !!f.el).map((f) => ({ ...f, rect: f.el.getBoundingClientRect() }));
413
- return { groups: T, tabbars: b, contents: I };
414
- }, [c]), u = J((w) => {
412
+ const [a, i] = u.useReducer(ye, wt), c = mt(), d = u.useCallback(() => {
413
+ const w = Array.from(c.getAll().entries()), T = w.map(([f, S]) => ({ gid: f, el: S.content ?? S.group })).filter((f) => !!f.el).map((f) => ({ ...f, rect: f.el.getBoundingClientRect() })), h = w.map(([f, S]) => ({ gid: f, el: S.tabbar })).filter((f) => !!f.el).map((f) => ({ ...f, rect: f.el.getBoundingClientRect() })), y = w.map(([f, S]) => ({ gid: f, el: S.content ?? S.group })).filter((f) => !!f.el).map((f) => ({ ...f, rect: f.el.getBoundingClientRect() }));
414
+ return { groups: T, tabbars: h, contents: y };
415
+ }, [c]), l = J((w) => {
415
416
  if (!t.current)
416
417
  return;
417
- const b = w.clientX, I = w.clientY, f = a.phase;
418
+ const h = w.clientX, y = w.clientY, f = a.phase;
418
419
  if (f.kind === "idle")
419
420
  return;
420
- const S = Math.abs(b - f.startX), C = Math.abs(I - f.startY);
421
+ const S = Math.abs(h - f.startX), C = Math.abs(y - f.startY);
421
422
  if (S < e && C < e) {
422
423
  a.phase.kind === "content" && i(D.setSuggest(null)), i(D.setPointer(null)), i(D.setTabbarHover(null));
423
424
  return;
424
425
  }
425
- if (i(D.setPointer({ x: b, y: I })), f.kind === "content") {
426
- const G = f.cache.groups.find(({ rect: x }) => b >= x.left && b <= x.right && I >= x.top && I <= x.bottom);
426
+ if (i(D.setPointer({ x: h, y })), f.kind === "content") {
427
+ const G = f.cache.groups.find(({ rect: x }) => h >= x.left && h <= x.right && y >= x.top && y <= x.bottom);
427
428
  if (!G) {
428
429
  i(D.setSuggest(null));
429
430
  return;
430
431
  }
431
- const R = K(G.rect, b, I);
432
+ const R = U(G.rect, h, y);
432
433
  if (o && !o({ targetGroupId: G.gid, zone: R })) {
433
434
  i(D.setSuggest(null));
434
435
  return;
@@ -437,18 +438,18 @@ const ve = (t, e) => {
437
438
  return;
438
439
  }
439
440
  if (f.kind === "tab") {
440
- const G = f.cache.tabbars.find(({ rect: E }) => b >= E.left && b <= E.right && I >= E.top && I <= E.bottom);
441
+ const G = f.cache.tabbars.find(({ rect: E }) => h >= E.left && h <= E.right && y >= E.top && y <= E.bottom);
441
442
  if (G) {
442
- const k = Array.from(G.el.querySelectorAll("[role='tab']")).map((z) => z.getBoundingClientRect()), P = k.map((z) => z.left + z.width / 2), O = P.findIndex((z) => b < z), B = O === -1 ? P.length : O, At = k.length === 0 ? G.rect.left + 8 : B === 0 ? k[0].left : B === k.length ? k[k.length - 1].right : (k[B - 1].right + k[B].left) / 2;
443
+ const k = Array.from(G.el.querySelectorAll("[role='tab']")).map((z) => z.getBoundingClientRect()), P = k.map((z) => z.left + z.width / 2), O = P.findIndex((z) => h < z), B = O === -1 ? P.length : O, At = k.length === 0 ? G.rect.left + 8 : B === 0 ? k[0].left : B === k.length ? k[k.length - 1].right : (k[B - 1].right + k[B].left) / 2;
443
444
  i(D.setTabbarHover({ groupId: G.gid, index: B, rect: G.rect, insertX: At }));
444
445
  } else
445
446
  i(D.setTabbarHover(null));
446
- const R = f.cache.contents.find(({ rect: E }) => b >= E.left && b <= E.right && I >= E.top && I <= E.bottom);
447
+ const R = f.cache.contents.find(({ rect: E }) => h >= E.left && h <= E.right && y >= E.top && y <= E.bottom);
447
448
  if (!R) {
448
449
  i(D.setSuggest(null));
449
450
  return;
450
451
  }
451
- const x = K(R.rect, b, I);
452
+ const x = U(R.rect, h, y);
452
453
  if (o && !o({ targetGroupId: R.gid, zone: x })) {
453
454
  i(D.setSuggest(null));
454
455
  return;
@@ -456,29 +457,29 @@ const ve = (t, e) => {
456
457
  i(D.setSuggest({ rect: R.rect, zone: x }));
457
458
  }
458
459
  }), p = J((w) => {
459
- const T = t.current, b = a;
460
+ const T = t.current, h = a;
460
461
  if (i(D.reset()), !T)
461
462
  return;
462
- const I = w.clientX, f = w.clientY;
463
- if (b.phase.kind === "idle")
463
+ const y = w.clientX, f = w.clientY;
464
+ if (h.phase.kind === "idle")
464
465
  return;
465
- const S = Math.abs(I - b.phase.startX), C = Math.abs(f - b.phase.startY);
466
+ const S = Math.abs(y - h.phase.startX), C = Math.abs(f - h.phase.startY);
466
467
  if (!(S < e && C < e)) {
467
- if (b.phase.kind === "content") {
468
- const G = b.phase.cache.groups.find(({ rect: E }) => I >= E.left && I <= E.right && f >= E.top && f <= E.bottom);
468
+ if (h.phase.kind === "content") {
469
+ const G = h.phase.cache.groups.find(({ rect: E }) => y >= E.left && y <= E.right && f >= E.top && f <= E.bottom);
469
470
  if (!G)
470
471
  return;
471
472
  const R = G.gid ?? null;
472
473
  if (!R)
473
474
  return;
474
- const x = K(G.rect, I, f);
475
+ const x = U(G.rect, y, f);
475
476
  if (o && !o({ targetGroupId: R, zone: x }))
476
477
  return;
477
- n({ fromGroupId: b.phase.fromGroupId, tabId: b.phase.tabId, targetGroupId: R, zone: x });
478
+ n({ fromGroupId: h.phase.fromGroupId, tabId: h.phase.tabId, targetGroupId: R, zone: x });
478
479
  return;
479
480
  }
480
- if (b.phase.kind === "tab") {
481
- const G = b.phase.cache.tabbars.find(({ rect: x }) => I >= x.left && I <= x.right && f >= x.top && f <= x.bottom);
481
+ if (h.phase.kind === "tab") {
482
+ const G = h.phase.cache.tabbars.find(({ rect: x }) => y >= x.left && y <= x.right && f >= x.top && f <= x.bottom);
482
483
  if (G) {
483
484
  const x = G.gid;
484
485
  if (!x)
@@ -486,45 +487,45 @@ const ve = (t, e) => {
486
487
  const k = Array.from(G.el.querySelectorAll("[role='tab']")).map((B) => {
487
488
  const Z = B.getBoundingClientRect();
488
489
  return Z.left + Z.width / 2;
489
- }), P = k.findIndex((B) => I < B), O = P === -1 ? k.length : P;
490
- r({ fromGroupId: b.phase.fromGroupId, tabId: b.phase.tabId, targetGroupId: x, targetIndex: O });
490
+ }), P = k.findIndex((B) => y < B), O = P === -1 ? k.length : P;
491
+ r({ fromGroupId: h.phase.fromGroupId, tabId: h.phase.tabId, targetGroupId: x, targetIndex: O });
491
492
  return;
492
493
  }
493
- const R = b.phase.cache.contents.find(({ rect: x }) => I >= x.left && I <= x.right && f >= x.top && f <= x.bottom);
494
+ const R = h.phase.cache.contents.find(({ rect: x }) => y >= x.left && y <= x.right && f >= x.top && f <= x.bottom);
494
495
  if (R) {
495
496
  const x = R.gid ?? null;
496
497
  if (!x)
497
498
  return;
498
- const E = K(R.rect, I, f);
499
+ const E = U(R.rect, y, f);
499
500
  if (o && !o({ targetGroupId: x, zone: E }))
500
501
  return;
501
- n({ fromGroupId: b.phase.fromGroupId, tabId: b.phase.tabId, targetGroupId: x, zone: E });
502
+ n({ fromGroupId: h.phase.fromGroupId, tabId: h.phase.tabId, targetGroupId: x, zone: E });
502
503
  }
503
504
  }
504
505
  }
505
506
  }), g = J(() => {
506
507
  i(D.reset());
507
508
  });
508
- l.useEffect(() => {
509
+ u.useEffect(() => {
509
510
  if (a.phase.kind !== "idle")
510
- return window.addEventListener("pointermove", u), window.addEventListener("pointerup", p, { once: !0 }), window.addEventListener("pointercancel", g, { once: !0 }), () => {
511
- window.removeEventListener("pointermove", u), window.removeEventListener("pointerup", p), window.removeEventListener("pointercancel", g);
511
+ return window.addEventListener("pointermove", l), window.addEventListener("pointerup", p, { once: !0 }), window.addEventListener("pointercancel", g, { once: !0 }), () => {
512
+ window.removeEventListener("pointermove", l), window.removeEventListener("pointerup", p), window.removeEventListener("pointercancel", g);
512
513
  };
513
514
  }, [a.phase.kind]);
514
- const v = l.useCallback((w, T, b) => {
515
- if (b.button !== 0)
515
+ const v = u.useCallback((w, T, h) => {
516
+ if (h.button !== 0)
516
517
  return;
517
- b.currentTarget.setPointerCapture(b.pointerId);
518
- const I = d();
519
- i(D.startContent({ x: b.clientX, y: b.clientY, groupId: w, tabId: T, cache: I }));
520
- }, [d]), h = l.useCallback((w, T, b) => {
521
- if (b.button !== 0)
518
+ h.currentTarget.setPointerCapture(h.pointerId);
519
+ const y = d();
520
+ i(D.startContent({ x: h.clientX, y: h.clientY, groupId: w, tabId: T, cache: y }));
521
+ }, [d]), b = u.useCallback((w, T, h) => {
522
+ if (h.button !== 0)
522
523
  return;
523
- const I = b.currentTarget;
524
- I && I.setPointerCapture(b.pointerId);
524
+ const y = h.currentTarget;
525
+ y && y.setPointerCapture(h.pointerId);
525
526
  const f = d();
526
- i(D.startTab({ x: b.clientX, y: b.clientY, groupId: T, tabId: w, cache: f, element: I }));
527
- }, [d]), y = l.useMemo(() => ({
527
+ i(D.startTab({ x: h.clientX, y: h.clientY, groupId: T, tabId: w, cache: f, element: y }));
528
+ }, [d]), I = u.useMemo(() => ({
528
529
  suggest: a.suggest,
529
530
  isTabDragging: a.phase.kind === "tab",
530
531
  draggingTabId: a.phase.kind === "tab" ? a.phase.tabId : null,
@@ -532,14 +533,14 @@ const ve = (t, e) => {
532
533
  tabbarHover: a.tabbarHover,
533
534
  draggingTabElement: a.draggingTabElement,
534
535
  onStartContentDrag: v,
535
- onStartTabDrag: h
536
- }), [a.suggest, a.pointer, a.tabbarHover, a.phase, a.draggingTabElement, v, h]);
537
- return /* @__PURE__ */ m(yt.Provider, { value: y, children: s });
536
+ onStartTabDrag: b
537
+ }), [a.suggest, a.pointer, a.tabbarHover, a.phase, a.draggingTabElement, v, b]);
538
+ return /* @__PURE__ */ m(yt.Provider, { value: I, children: s });
538
539
  }, ct = {
539
540
  display: "inline-flex",
540
541
  alignItems: "center",
541
542
  userSelect: "none"
542
- }, Te = ({
543
+ }, Se = ({
543
544
  groupId: t,
544
545
  tab: e,
545
546
  active: n,
@@ -551,13 +552,13 @@ const ve = (t, e) => {
551
552
  tabElement: c,
552
553
  onDoubleClick: d
553
554
  }) => {
554
- const u = l.useEffectEvent(() => {
555
+ const l = u.useEffectEvent(() => {
555
556
  o(e.id);
556
- }), p = l.useEffectEvent((y) => {
557
- s && y.button === 0 && s(e.id, t, y);
557
+ }), p = u.useEffectEvent((I) => {
558
+ s && I.button === 0 && s(e.id, t, I);
558
559
  }), g = () => {
559
- const y = !!a;
560
- return /* @__PURE__ */ m(l.Activity, { mode: y ? "visible" : "hidden", children: /* @__PURE__ */ m(
560
+ const I = !!a;
561
+ return /* @__PURE__ */ m(u.Activity, { mode: I ? "visible" : "hidden", children: /* @__PURE__ */ m(
561
562
  "button",
562
563
  {
563
564
  type: "button",
@@ -566,9 +567,9 @@ const ve = (t, e) => {
566
567
  a && (w.stopPropagation(), a(t, e.id));
567
568
  },
568
569
  style: { marginLeft: 6 },
569
- tabIndex: y ? void 0 : -1,
570
- disabled: !y,
571
- "aria-hidden": y ? void 0 : !0,
570
+ tabIndex: I ? void 0 : -1,
571
+ disabled: !I,
572
+ "aria-hidden": I ? void 0 : !0,
572
573
  children: "×"
573
574
  }
574
575
  ) });
@@ -577,7 +578,7 @@ const ve = (t, e) => {
577
578
  "aria-selected": n,
578
579
  tabIndex: n ? 0 : -1,
579
580
  style: ct,
580
- onClick: u,
581
+ onClick: l,
581
582
  onPointerDown: p,
582
583
  onDoubleClick: d,
583
584
  "data-tab-id": e.id,
@@ -587,7 +588,7 @@ const ve = (t, e) => {
587
588
  /* @__PURE__ */ m("span", { children: e.title }),
588
589
  g()
589
590
  ] })
590
- }, h = {
591
+ }, b = {
591
592
  type: "button",
592
593
  role: "tab",
593
594
  "aria-selected": n,
@@ -596,20 +597,20 @@ const ve = (t, e) => {
596
597
  onClick: () => {
597
598
  o(e.id);
598
599
  },
599
- onPointerDown: (y) => {
600
- s && y.button === 0 && s(e.id, t, y);
600
+ onPointerDown: (I) => {
601
+ s && I.button === 0 && s(e.id, t, I);
601
602
  },
602
603
  onDoubleClick: d,
603
604
  children: /* @__PURE__ */ m("span", { children: e.title })
604
605
  };
605
- return c ? c(h) : i ? /* @__PURE__ */ m(i, { ...h }) : /* @__PURE__ */ m("div", { ...v });
606
- }, Se = {
606
+ return c ? c(b) : i ? /* @__PURE__ */ m(i, { ...b }) : /* @__PURE__ */ m("div", { ...v });
607
+ }, xe = {
607
608
  display: "flex",
608
609
  alignItems: "center"
609
- }, xe = {
610
+ }, Ge = {
610
611
  flex: "1 1 auto",
611
612
  alignSelf: "stretch"
612
- }, Ge = ({
613
+ }, Ce = ({
613
614
  group: t,
614
615
  onClickTab: e,
615
616
  onStartDrag: n,
@@ -620,9 +621,9 @@ const ve = (t, e) => {
620
621
  tabElement: i,
621
622
  onAddTab: c,
622
623
  onCloseTab: d,
623
- doubleClickToAdd: u
624
+ doubleClickToAdd: l
624
625
  }) => {
625
- const { isTabDragging: p, draggingTabId: g } = W(), v = l.useRef(null), h = l.useCallback(
626
+ const { isTabDragging: p, draggingTabId: g } = W(), v = u.useRef(null), b = u.useCallback(
626
627
  (f) => {
627
628
  if (v.current = f, !!r) {
628
629
  if (typeof r == "function") {
@@ -636,7 +637,7 @@ const ve = (t, e) => {
636
637
  }
637
638
  },
638
639
  [r]
639
- ), y = l.useEffectEvent((f) => {
640
+ ), I = u.useEffectEvent((f) => {
640
641
  const S = v.current ?? f.currentTarget;
641
642
  if (!S)
642
643
  return;
@@ -687,7 +688,7 @@ const ve = (t, e) => {
687
688
  return;
688
689
  }
689
690
  });
690
- l.useEffect(() => {
691
+ u.useEffect(() => {
691
692
  const f = v.current;
692
693
  if (!f)
693
694
  return;
@@ -697,16 +698,16 @@ const ve = (t, e) => {
697
698
  !f.contains(document.activeElement) && S && S.focus();
698
699
  }, [t.activeTabId]);
699
700
  const w = {
700
- style: Se,
701
+ style: xe,
701
702
  role: "tablist",
702
703
  "data-tabbar": "true",
703
704
  "data-group-id": t.id,
704
705
  "data-dragging": p ? "true" : "false",
705
- onKeyDown: y
706
+ onKeyDown: I
706
707
  }, T = Ot({
707
708
  element: s,
708
709
  component: o
709
- }), b = () => c ? /* @__PURE__ */ m(
710
+ }), h = () => c ? /* @__PURE__ */ m(
710
711
  "button",
711
712
  {
712
713
  type: "button",
@@ -716,12 +717,12 @@ const ve = (t, e) => {
716
717
  },
717
718
  children: "+"
718
719
  }
719
- ) : null, I = l.useCallback(() => {
720
- u && c && c(t.id);
721
- }, [u, c, t.id]);
722
- return /* @__PURE__ */ H(T, { ...w, ref: h, onDoubleClick: I, children: [
720
+ ) : null, y = u.useCallback(() => {
721
+ l && c && c(t.id);
722
+ }, [l, c, t.id]);
723
+ return /* @__PURE__ */ H(T, { ...w, ref: b, onDoubleClick: y, children: [
723
724
  t.tabs.map((f, S) => /* @__PURE__ */ m(
724
- Te,
725
+ Se,
725
726
  {
726
727
  groupId: t.id,
727
728
  tab: f,
@@ -736,21 +737,21 @@ const ve = (t, e) => {
736
737
  },
737
738
  `${t.id}:${f.id}:${S}`
738
739
  )),
739
- /* @__PURE__ */ m("span", { style: xe }),
740
- b()
740
+ /* @__PURE__ */ m("span", { style: Ge }),
741
+ h()
741
742
  ] });
742
- }, Ce = ({ id: t, TabBarComponent: e, PanelGroupComponent: n }) => {
743
- const { getGroup: r, getGroupContent: o, onClickTab: s, onAddTab: a, onCloseTab: i, onStartTabDrag: c, doubleClickToAdd: d, registerContentContainer: u } = le(), { setGroupEl: p, setTabbarEl: g, setContentEl: v } = mt(), h = l.useCallback(
743
+ }, Ee = ({ id: t, TabBarComponent: e, PanelGroupComponent: n }) => {
744
+ const { getGroup: r, getGroupContent: o, onClickTab: s, onAddTab: a, onCloseTab: i, onStartTabDrag: c, doubleClickToAdd: d, registerContentContainer: l } = de(), { setGroupEl: p, setTabbarEl: g, setContentEl: v } = mt(), b = u.useCallback(
744
745
  (S) => {
745
746
  p(t, S);
746
747
  },
747
748
  [t, p]
748
- ), y = l.useCallback(
749
+ ), I = u.useCallback(
749
750
  (S) => {
750
- v(t, S), u(t, S);
751
+ v(t, S), l(t, S);
751
752
  },
752
- [t, v, u]
753
- ), w = l.useCallback(
753
+ [t, v, l]
754
+ ), w = u.useCallback(
754
755
  (S) => {
755
756
  g(t, S);
756
757
  },
@@ -758,13 +759,13 @@ const ve = (t, e) => {
758
759
  ), T = r(t);
759
760
  if (!T)
760
761
  return null;
761
- const b = o(t);
762
+ const h = o(t);
762
763
  return /* @__PURE__ */ m(
763
764
  n ?? ((S) => /* @__PURE__ */ m(vt, { ...S })),
764
765
  {
765
766
  group: T,
766
767
  tabbar: /* @__PURE__ */ m(
767
- e ?? Ge,
768
+ e ?? Ce,
768
769
  {
769
770
  rootRef: w,
770
771
  group: T,
@@ -775,23 +776,23 @@ const ve = (t, e) => {
775
776
  doubleClickToAdd: d
776
777
  }
777
778
  ),
778
- content: b,
779
- groupRef: h,
780
- contentRef: y
779
+ content: h,
780
+ groupRef: b,
781
+ contentRef: I
781
782
  }
782
783
  );
783
- }, Ee = (t, e) => {
784
+ }, Re = (t, e) => {
784
785
  const n = new Array(16);
785
786
  for (let r = 0; r < 4; r++)
786
787
  for (let o = 0; o < 4; o++)
787
788
  n[r * 4 + o] = t[0 + o] * e[r * 4 + 0] + t[4 + o] * e[r * 4 + 1] + t[8 + o] * e[r * 4 + 2] + t[12 + o] * e[r * 4 + 3];
788
789
  return n;
789
- }, U = (t) => {
790
+ }, K = (t) => {
790
791
  if (t.length !== 16)
791
792
  throw new Error("Matrix must have exactly 16 values");
792
793
  const e = Object.freeze([...t]), n = (r) => {
793
- const o = Ee(e, r);
794
- return U(o);
794
+ const o = Re(e, r);
795
+ return K(o);
795
796
  };
796
797
  return Object.freeze({
797
798
  translate: (r = 0, o = 0, s = 0) => n([
@@ -1040,21 +1041,21 @@ const ve = (t, e) => {
1040
1041
  rotate: (r, o, s, a) => {
1041
1042
  const i = Math.sqrt(o * o + s * s + a * a);
1042
1043
  if (i === 0)
1043
- return U(e);
1044
+ return K(e);
1044
1045
  o /= i, s /= i, a /= i;
1045
- const c = Math.cos(r), d = Math.sin(r), u = 1 - c;
1046
+ const c = Math.cos(r), d = Math.sin(r), l = 1 - c;
1046
1047
  return n([
1047
- u * o * o + c,
1048
- u * o * s + d * a,
1049
- u * o * a - d * s,
1048
+ l * o * o + c,
1049
+ l * o * s + d * a,
1050
+ l * o * a - d * s,
1050
1051
  0,
1051
- u * o * s - d * a,
1052
- u * s * s + c,
1053
- u * s * a + d * o,
1052
+ l * o * s - d * a,
1053
+ l * s * s + c,
1054
+ l * s * a + d * o,
1054
1055
  0,
1055
- u * o * a + d * s,
1056
- u * s * a - d * o,
1057
- u * a * a + c,
1056
+ l * o * a + d * s,
1057
+ l * s * a - d * o,
1058
+ l * a * a + c,
1058
1059
  0,
1059
1060
  0,
1060
1061
  0,
@@ -1065,21 +1066,21 @@ const ve = (t, e) => {
1065
1066
  rotate3d: (r, o, s, a) => {
1066
1067
  const i = Math.sqrt(r * r + o * o + s * s);
1067
1068
  if (i === 0)
1068
- return U(e);
1069
+ return K(e);
1069
1070
  r /= i, o /= i, s /= i;
1070
- const c = Math.cos(a), d = Math.sin(a), u = 1 - c;
1071
+ const c = Math.cos(a), d = Math.sin(a), l = 1 - c;
1071
1072
  return n([
1072
- u * r * r + c,
1073
- u * r * o + d * s,
1074
- u * r * s - d * o,
1073
+ l * r * r + c,
1074
+ l * r * o + d * s,
1075
+ l * r * s - d * o,
1075
1076
  0,
1076
- u * r * o - d * s,
1077
- u * o * o + c,
1078
- u * o * s + d * r,
1077
+ l * r * o - d * s,
1078
+ l * o * o + c,
1079
+ l * o * s + d * r,
1079
1080
  0,
1080
- u * r * s + d * o,
1081
- u * o * s - d * r,
1082
- u * s * s + c,
1081
+ l * r * s + d * o,
1082
+ l * o * s - d * r,
1083
+ l * s * s + c,
1083
1084
  0,
1084
1085
  0,
1085
1086
  0,
@@ -1182,7 +1183,7 @@ const ve = (t, e) => {
1182
1183
  ].join(`
1183
1184
  `)
1184
1185
  });
1185
- }, Re = () => U([
1186
+ }, Pe = () => K([
1186
1187
  1,
1187
1188
  0,
1188
1189
  0,
@@ -1199,18 +1200,18 @@ const ve = (t, e) => {
1199
1200
  0,
1200
1201
  0,
1201
1202
  1
1202
- ]), Pe = {
1203
+ ]), De = {
1203
1204
  position: "fixed",
1204
1205
  inset: 0,
1205
1206
  pointerEvents: "none",
1206
1207
  zIndex: $t
1207
- }, De = {
1208
+ }, Ae = {
1208
1209
  position: "absolute",
1209
1210
  border: `${Yt} dashed ${jt}`,
1210
1211
  background: Xt,
1211
1212
  borderRadius: Ft,
1212
1213
  transformOrigin: "top left"
1213
- }, L = (t, e) => e <= 0 ? 0 : M(t / e, 0), Ae = (t, e, n) => {
1214
+ }, L = (t, e) => e <= 0 ? 0 : M(t / e, 0), ke = (t, e, n) => {
1214
1215
  const { width: r, height: o } = t, s = n / 2, a = r > 0 ? r : 1, i = o > 0 ? o : 1, c = {
1215
1216
  translateX: n,
1216
1217
  translateY: n,
@@ -1221,7 +1222,7 @@ const ve = (t, e) => {
1221
1222
  translateY: n,
1222
1223
  scaleX: L(M(r / 2 - n * 1.5, 0), a),
1223
1224
  scaleY: L(M(o - n * 2, 0), i)
1224
- }, u = {
1225
+ }, l = {
1225
1226
  translateX: r / 2 + s,
1226
1227
  translateY: n,
1227
1228
  scaleX: L(M(r / 2 - n * 1.5, 0), a),
@@ -1239,78 +1240,78 @@ const ve = (t, e) => {
1239
1240
  }, v = {
1240
1241
  center: c,
1241
1242
  left: d,
1242
- right: u,
1243
+ right: l,
1243
1244
  top: p,
1244
1245
  bottom: g
1245
- }, { translateX: h, translateY: y, scaleX: w, scaleY: T } = v[e];
1246
- return Re().translate(h, y, 0).scale(w, T, 1).toCSS();
1247
- }, ke = (t, e) => {
1248
- const n = Kt;
1246
+ }, { translateX: b, translateY: I, scaleX: w, scaleY: T } = v[e];
1247
+ return Pe().translate(b, I, 0).scale(w, T, 1).toCSS();
1248
+ }, Me = (t, e) => {
1249
+ const n = Ut;
1249
1250
  return {
1250
- ...De,
1251
+ ...Ae,
1251
1252
  left: t.left,
1252
1253
  top: t.top,
1253
1254
  width: t.width,
1254
1255
  height: t.height,
1255
- transform: Ae(t, e, n)
1256
+ transform: ke(t, e, n)
1256
1257
  };
1257
- }, Me = ({ suggest: t }) => {
1258
+ }, _e = ({ suggest: t }) => {
1258
1259
  if (!t)
1259
1260
  return null;
1260
- const { rect: e, zone: n } = t, r = ke(e, n);
1261
- return /* @__PURE__ */ m("div", { style: Pe, children: /* @__PURE__ */ m("div", { style: r }) });
1262
- }, _e = typeof window < "u" && typeof document < "u", Oe = (t) => {
1263
- const [e, n] = l.useState(null), [r, o] = l.useState(null);
1261
+ const { rect: e, zone: n } = t, r = Me(e, n);
1262
+ return /* @__PURE__ */ m("div", { style: De, children: /* @__PURE__ */ m("div", { style: r }) });
1263
+ }, Oe = typeof window < "u" && typeof document < "u", Be = (t) => {
1264
+ const [e, n] = u.useState(null), [r, o] = u.useState(null);
1264
1265
  return nt(() => {
1265
- if (!_e || !t) {
1266
+ if (!Oe || !t) {
1266
1267
  n(null), o(null);
1267
1268
  return;
1268
1269
  }
1269
1270
  const s = t.getBoundingClientRect();
1270
1271
  n({ width: s.width, height: s.height }), o(t.outerHTML);
1271
1272
  }, [t]), { html: r, size: e };
1272
- }, Be = {
1273
+ }, Le = {
1273
1274
  position: "fixed",
1274
1275
  inset: 0,
1275
1276
  pointerEvents: "none",
1276
1277
  zIndex: Qt
1277
- }, Le = {
1278
+ }, He = {
1278
1279
  position: "absolute",
1279
1280
  width: Jt,
1280
1281
  borderRadius: Zt,
1281
1282
  background: qt,
1282
1283
  boxShadow: Wt
1283
- }, He = () => {
1284
- const { isTabDragging: t, draggingTabId: e, dragPointer: n, tabbarHover: r, draggingTabElement: o } = W(), { html: s, size: a } = Oe(o), i = n !== null && e !== null, c = l.useMemo(() => {
1284
+ }, Ne = () => {
1285
+ const { isTabDragging: t, draggingTabId: e, dragPointer: n, tabbarHover: r, draggingTabElement: o } = W(), { html: s, size: a } = Be(o), i = n !== null && e !== null, c = u.useMemo(() => {
1285
1286
  if (!(!i || !n))
1286
1287
  return {
1287
1288
  position: "absolute",
1288
1289
  left: n.x,
1289
1290
  top: n.y,
1290
- transform: `translate(${Ut}, ${Vt})`,
1291
+ transform: `translate(${Kt}, ${Vt})`,
1291
1292
  pointerEvents: "none"
1292
1293
  };
1293
- }, [i, n]), d = l.useMemo(() => {
1294
+ }, [i, n]), d = u.useMemo(() => {
1294
1295
  if (!(!c || !o))
1295
1296
  return a ? { ...c, width: a.width, height: a.height } : c;
1296
- }, [c, o, a]), u = l.useMemo(() => {
1297
+ }, [c, o, a]), l = u.useMemo(() => {
1297
1298
  if (r)
1298
1299
  return {
1299
- ...Le,
1300
+ ...He,
1300
1301
  left: r.insertX,
1301
1302
  top: r.rect.top + 4,
1302
1303
  height: Math.max(0, r.rect.height - 8)
1303
1304
  };
1304
1305
  }, [r]);
1305
- return t ? /* @__PURE__ */ H("div", { style: Be, children: [
1306
- /* @__PURE__ */ m(l.Activity, { mode: d ? "visible" : "hidden", children: /* @__PURE__ */ m("div", { style: d, children: /* @__PURE__ */ m(
1306
+ return t ? /* @__PURE__ */ H("div", { style: Le, children: [
1307
+ /* @__PURE__ */ m(u.Activity, { mode: d ? "visible" : "hidden", children: /* @__PURE__ */ m("div", { style: d, children: /* @__PURE__ */ m(
1307
1308
  "div",
1308
1309
  {
1309
1310
  style: { width: "100%", height: "100%", pointerEvents: "none" },
1310
1311
  dangerouslySetInnerHTML: { __html: s ?? "" }
1311
1312
  }
1312
1313
  ) }) }),
1313
- /* @__PURE__ */ m(l.Activity, { mode: u ? "visible" : "hidden", children: /* @__PURE__ */ m("div", { style: u }) })
1314
+ /* @__PURE__ */ m(u.Activity, { mode: l ? "visible" : "hidden", children: /* @__PURE__ */ m("div", { style: l }) })
1314
1315
  ] }) : null;
1315
1316
  }, _ = (t) => t.type === "group", Y = (t, e = []) => {
1316
1317
  if (_(t))
@@ -1346,7 +1347,7 @@ const ve = (t, e) => {
1346
1347
  return { tree: a, newGroupId: o };
1347
1348
  const d = s.side === "a" ? { ...c, a } : { ...c, b: a };
1348
1349
  return { tree: j(t, i, d), newGroupId: o };
1349
- }, Ne = (t, e) => {
1350
+ }, ze = (t, e) => {
1350
1351
  const n = V(t, e);
1351
1352
  if (!n || n.splitPath === null)
1352
1353
  return { tree: t, survivorGroupId: e };
@@ -1355,7 +1356,7 @@ const ve = (t, e) => {
1355
1356
  return { tree: t, survivorGroupId: e };
1356
1357
  const s = n.side === "a" ? o.b : o.a, a = j(t, r, s), i = _(s) ? s.groupId : Y(s)[0] ?? null;
1357
1358
  return { tree: a, survivorGroupId: i };
1358
- }, ze = (t, e, n) => {
1359
+ }, $e = (t, e, n) => {
1359
1360
  const r = q(t, e);
1360
1361
  if (_(r))
1361
1362
  return t;
@@ -1368,17 +1369,17 @@ const ve = (t, e) => {
1368
1369
  const a = o.groups[s];
1369
1370
  if (!a || a.tabs.length > 0 || Object.keys(o.groups).length <= 1)
1370
1371
  return o;
1371
- const { tree: c, survivorGroupId: d } = Ne(o.tree, s), { [s]: u, ...p } = o.groups, g = Y(c), v = o.focusedGroupId === s ? d ?? g[0] ?? null : o.focusedGroupId;
1372
+ const { tree: c, survivorGroupId: d } = ze(o.tree, s), { [s]: l, ...p } = o.groups, g = Y(c), v = o.focusedGroupId === s ? d ?? g[0] ?? null : o.focusedGroupId;
1372
1373
  return { ...o, tree: c, groups: p, groupOrder: g, focusedGroupId: v };
1373
1374
  };
1374
1375
  return t.groupOrder.reduce((o, s) => r(o, s), t);
1375
- }, $e = (t) => ({ id: t, tabIds: [], tabs: [], activeTabId: null }), ut = (t, e, n, r) => {
1376
+ }, Fe = (t) => ({ id: t, tabIds: [], tabs: [], activeTabId: null }), ut = (t, e, n, r) => {
1376
1377
  const o = { ...t.groups }, s = o[e];
1377
1378
  if (!s)
1378
1379
  throw new Error(`Group ${e} does not exist.`);
1379
- const a = { ...t.panels, [n.id]: n }, i = [...s.tabIds, n.id], c = r ? n.id : s.activeTabId ?? n.id, d = i.map((p) => a[p]), u = { ...s, tabIds: i, tabs: d, activeTabId: c };
1380
- return o[e] = u, { ...t, panels: a, groups: o };
1381
- }, Fe = (t, e, n) => {
1380
+ const a = { ...t.panels, [n.id]: n }, i = [...s.tabIds, n.id], c = r ? n.id : s.activeTabId ?? n.id, d = i.map((p) => a[p]), l = { ...s, tabIds: i, tabs: d, activeTabId: c };
1381
+ return o[e] = l, { ...t, panels: a, groups: o };
1382
+ }, Xe = (t, e, n) => {
1382
1383
  const r = { ...t.groups }, o = r[e];
1383
1384
  if (!o)
1384
1385
  throw new Error(`Group ${e} does not exist.`);
@@ -1388,8 +1389,8 @@ const ve = (t, e) => {
1388
1389
  const s = t.groups[e], a = t.groups[n];
1389
1390
  if (!s || !a)
1390
1391
  throw new Error("moveTab: source or target group is missing.");
1391
- const i = { ...t.groups }, c = s.tabIds.filter((p) => p !== r), d = [...a.tabIds.filter((p) => p !== r), r], u = s.activeTabId === r ? c[0] ?? null : s.activeTabId;
1392
- return i[e] = { ...s, tabIds: c, tabs: c.map((p) => t.panels[p]), activeTabId: u }, i[n] = { ...a, tabIds: d, tabs: d.map((p) => t.panels[p]), activeTabId: r }, { ...t, groups: i };
1392
+ const i = { ...t.groups }, c = s.tabIds.filter((p) => p !== r), d = [...a.tabIds.filter((p) => p !== r), r], l = s.activeTabId === r ? c[0] ?? null : s.activeTabId;
1393
+ return i[e] = { ...s, tabIds: c, tabs: c.map((p) => t.panels[p]), activeTabId: l }, i[n] = { ...a, tabIds: d, tabs: d.map((p) => t.panels[p]), activeTabId: r }, { ...t, groups: i };
1393
1394
  }, St = (t, e, n) => {
1394
1395
  const r = t.groups[e];
1395
1396
  if (!r)
@@ -1404,16 +1405,16 @@ const ve = (t, e) => {
1404
1405
  throw new Error(`addTabToGroupAtIndex: group ${e} not found.`);
1405
1406
  const a = { ...t.panels, [n.id]: n }, i = s.tabIds.slice(), c = Math.max(0, Math.min(r, i.length));
1406
1407
  i.splice(c, 0, n.id);
1407
- const d = i.map((g) => a[g]), u = o ? n.id : s.activeTabId ?? n.id, p = { ...t.groups, [e]: { ...s, tabIds: i, tabs: d, activeTabId: u } };
1408
+ const d = i.map((g) => a[g]), l = o ? n.id : s.activeTabId ?? n.id, p = { ...t.groups, [e]: { ...s, tabIds: i, tabs: d, activeTabId: l } };
1408
1409
  return { ...t, panels: a, groups: p };
1409
1410
  }, N = (t, e) => {
1410
1411
  if (!t.groups[e])
1411
1412
  throw new Error(`setFocusedGroup: group ${e} not found.`);
1412
1413
  return { ...t, focusedGroupId: e };
1413
- }, Xe = (t, e) => {
1414
+ }, Ye = (t, e) => {
1414
1415
  const n = e - 1, r = t.groupOrder[n];
1415
1416
  return r ? N(t, r) : t;
1416
- }, Ye = (t) => {
1417
+ }, je = (t) => {
1417
1418
  const e = t.groupOrder, n = t.focusedGroupId;
1418
1419
  if (!n) {
1419
1420
  const s = e[0];
@@ -1421,7 +1422,7 @@ const ve = (t, e) => {
1421
1422
  }
1422
1423
  const r = e.indexOf(n), o = e[(r + 1) % e.length];
1423
1424
  return N(t, o);
1424
- }, je = (t) => {
1425
+ }, Ue = (t) => {
1425
1426
  const e = t.groupOrder, n = t.focusedGroupId;
1426
1427
  if (!n) {
1427
1428
  const s = e[e.length - 1];
@@ -1430,20 +1431,20 @@ const ve = (t, e) => {
1430
1431
  const r = e.indexOf(n), o = e[(r - 1 + e.length) % e.length];
1431
1432
  return N(t, o);
1432
1433
  }, xt = (t, e, n, r) => {
1433
- const { tree: o, newGroupId: s } = Tt(t.tree, e, n, r), a = { ...t.groups, [s]: $e(s) }, i = Y(o);
1434
+ const { tree: o, newGroupId: s } = Tt(t.tree, e, n, r), a = { ...t.groups, [s]: Fe(s) }, i = Y(o);
1434
1435
  return { ...t, tree: o, groups: a, groupOrder: i, focusedGroupId: s };
1435
- }, Rn = (t) => {
1436
+ }, Dn = (t) => {
1436
1437
  const n = { type: "group", groupId: "g_1" }, r = Object.fromEntries(t.map((i) => [i.id, i])), s = { g_1: { id: "g_1", tabIds: t.map((i) => i.id), tabs: t, activeTabId: t[0]?.id ?? null } };
1437
1438
  return { tree: n, panels: r, groups: s, groupOrder: ["g_1"], focusedGroupId: "g_1" };
1438
- }, Ke = l.createContext(null), Ue = ({ value: t, children: e }) => /* @__PURE__ */ m(Ke.Provider, { value: t, children: e }), Gt = l.createContext(null), Ve = () => {
1439
- const t = l.useContext(Gt);
1439
+ }, Ke = u.createContext(null), Ve = ({ value: t, children: e }) => /* @__PURE__ */ m(Ke.Provider, { value: t, children: e }), Gt = u.createContext(null), We = () => {
1440
+ const t = u.useContext(Gt);
1440
1441
  if (!t)
1441
1442
  throw new Error("useTree must be used within TreeProvider");
1442
1443
  return t;
1443
- }, We = ({ value: t, children: e }) => /* @__PURE__ */ m(Gt.Provider, { value: t, children: e }), qe = l.createContext(null), Ze = ({ value: t, children: e }) => /* @__PURE__ */ m(qe.Provider, { value: t, children: e }), F = (t) => {
1444
+ }, qe = ({ value: t, children: e }) => /* @__PURE__ */ m(Gt.Provider, { value: t, children: e }), Ze = u.createContext(null), Je = ({ value: t, children: e }) => /* @__PURE__ */ m(Ze.Provider, { value: t, children: e }), F = (t) => {
1444
1445
  const e = Bt(t, Number.POSITIVE_INFINITY);
1445
1446
  return M(e, 1);
1446
- }, Je = (t) => typeof t == "object" && t !== null, Qe = (t) => Je(t) ? "rows" in t ? !0 : "cols" in t : !1, Ct = (t) => {
1447
+ }, Qe = (t) => typeof t == "object" && t !== null, tn = (t) => Qe(t) ? "rows" in t ? !0 : "cols" in t : !1, Ct = (t) => {
1447
1448
  if (!t)
1448
1449
  return {
1449
1450
  rows: Number.POSITIVE_INFINITY,
@@ -1453,7 +1454,7 @@ const ve = (t, e) => {
1453
1454
  const n = F(t);
1454
1455
  return { rows: n, cols: n };
1455
1456
  }
1456
- if (Qe(t))
1457
+ if (tn(t))
1457
1458
  return {
1458
1459
  rows: F(t.rows),
1459
1460
  cols: F(t.cols)
@@ -1468,13 +1469,13 @@ const ve = (t, e) => {
1468
1469
  return { horizontal: 1, vertical: 1 };
1469
1470
  const e = tt(t.a), n = tt(t.b);
1470
1471
  return t.direction === "horizontal" ? { horizontal: e.horizontal + n.horizontal, vertical: Math.max(e.vertical, n.vertical) } : { horizontal: Math.max(e.horizontal, n.horizontal), vertical: e.vertical + n.vertical };
1471
- }, tn = (t, e, n) => {
1472
+ }, en = (t, e, n) => {
1472
1473
  const { tree: r } = Tt(t, e, n, () => "__preview__");
1473
1474
  return r;
1474
1475
  }, rt = (t, e, n, r) => {
1475
1476
  if (!Number.isFinite(r.rows) && !Number.isFinite(r.cols))
1476
1477
  return !0;
1477
- const o = tn(t, e, n), s = tt(o);
1478
+ const o = en(t, e, n), s = tt(o);
1478
1479
  return !(s.horizontal > r.rows || s.vertical > r.cols);
1479
1480
  }, Et = {
1480
1481
  splitFocused: A("panelState/splitFocused", (t) => ({ direction: t })),
@@ -1500,7 +1501,7 @@ const ve = (t, e) => {
1500
1501
  (t) => t
1501
1502
  ),
1502
1503
  adjustSplitRatio: A("panelState/adjustSplitRatio", (t) => t)
1503
- }, en = (t, e, n) => {
1504
+ }, nn = (t, e, n) => {
1504
1505
  const r = t.groups[e.fromGroupId], o = t.groups[e.targetGroupId];
1505
1506
  if (!r || !o || !r.tabs.find((p) => p.id === e.tabId))
1506
1507
  return t;
@@ -1513,14 +1514,14 @@ const ve = (t, e) => {
1513
1514
  const a = e.zone === "left" || e.zone === "right" ? "vertical" : "horizontal";
1514
1515
  if (!rt(t.tree, e.targetGroupId, a, n.splitLimits))
1515
1516
  return t;
1516
- const i = n.createGroupId(), c = xt(t, e.targetGroupId, a, () => i), d = e.zone === "left" || e.zone === "top" ? e.targetGroupId : i, u = lt(c, e.fromGroupId, d, e.tabId);
1517
- return N(u, d);
1518
- }, nn = (t, e) => {
1517
+ const i = n.createGroupId(), c = xt(t, e.targetGroupId, a, () => i), d = e.zone === "left" || e.zone === "top" ? e.targetGroupId : i, l = lt(c, e.fromGroupId, d, e.tabId);
1518
+ return N(l, d);
1519
+ }, rn = (t, e) => {
1519
1520
  const n = t.groups[e.fromGroupId], r = t.groups[e.targetGroupId];
1520
1521
  if (!n || !r || !t.panels[e.tabId])
1521
1522
  return t;
1522
1523
  if (e.fromGroupId === e.targetGroupId) {
1523
- const g = n.tabIds.filter((T) => T !== e.tabId), v = Math.max(0, Math.min(e.targetIndex, g.length)), h = g.slice(0, v).concat([e.tabId], g.slice(v)), y = h.map((T) => t.panels[T]).filter(Boolean), w = { ...t.groups, [e.fromGroupId]: { ...n, tabIds: h, tabs: y } };
1524
+ const g = n.tabIds.filter((T) => T !== e.tabId), v = Math.max(0, Math.min(e.targetIndex, g.length)), b = g.slice(0, v).concat([e.tabId], g.slice(v)), I = b.map((T) => t.panels[T]).filter(Boolean), w = { ...t.groups, [e.fromGroupId]: { ...n, tabIds: b, tabs: I } };
1524
1525
  return { ...t, groups: w };
1525
1526
  }
1526
1527
  const s = { ...t.groups }, a = n.tabIds.filter((g) => g !== e.tabId), i = a.map((g) => t.panels[g]);
@@ -1530,16 +1531,16 @@ const ve = (t, e) => {
1530
1531
  tabs: i,
1531
1532
  activeTabId: n.activeTabId === e.tabId ? i[0]?.id ?? null : n.activeTabId
1532
1533
  };
1533
- const c = r.tabIds.filter((g) => g !== e.tabId), d = Math.max(0, Math.min(e.targetIndex, c.length)), u = c.slice(0, d).concat([e.tabId], c.slice(d)), p = u.map((g) => t.panels[g]).filter(Boolean);
1534
- return s[e.targetGroupId] = { ...r, tabIds: u, tabs: p, activeTabId: e.tabId }, { ...t, groups: s, focusedGroupId: e.targetGroupId };
1535
- }, rn = It(Et, {
1534
+ const c = r.tabIds.filter((g) => g !== e.tabId), d = Math.max(0, Math.min(e.targetIndex, c.length)), l = c.slice(0, d).concat([e.tabId], c.slice(d)), p = l.map((g) => t.panels[g]).filter(Boolean);
1535
+ return s[e.targetGroupId] = { ...r, tabIds: l, tabs: p, activeTabId: e.tabId }, { ...t, groups: s, focusedGroupId: e.targetGroupId };
1536
+ }, on = It(Et, {
1536
1537
  splitFocused: (t, e, n) => {
1537
1538
  const r = t.focusedGroupId ?? t.groupOrder[0] ?? null;
1538
1539
  return !r || !rt(t.tree, r, e.payload.direction, n.splitLimits) ? t : xt(t, r, e.payload.direction, n.createGroupId);
1539
1540
  },
1540
- focusGroupIndex: (t, e) => Xe(t, e.payload.index1Based),
1541
- focusNextGroup: (t) => Ye(t),
1542
- focusPrevGroup: (t) => je(t),
1541
+ focusGroupIndex: (t, e) => Ye(t, e.payload.index1Based),
1542
+ focusNextGroup: (t) => je(t),
1543
+ focusPrevGroup: (t) => Ue(t),
1543
1544
  setActiveTab: (t, e) => St(t, e.payload.groupId, e.payload.tabId),
1544
1545
  addTab: (t, e) => {
1545
1546
  const { groupId: n, tab: r, index: o, makeActive: s } = e.payload;
@@ -1551,28 +1552,28 @@ const ve = (t, e) => {
1551
1552
  const o = { id: n.createPanelId(), title: e.payload.title, render: () => e.payload.title }, { groupId: s, index: a, makeActive: i } = e.payload;
1552
1553
  return typeof a == "number" ? dt(t, s, o, a, i ?? !0) : ut(t, s, o, i ?? !0);
1553
1554
  },
1554
- removeTab: (t, e) => Fe(t, e.payload.groupId, e.payload.tabId),
1555
- contentDrop: (t, e, n) => en(t, e.payload, n),
1556
- tabDrop: (t, e) => nn(t, e.payload),
1555
+ removeTab: (t, e) => Xe(t, e.payload.groupId, e.payload.tabId),
1556
+ contentDrop: (t, e, n) => nn(t, e.payload, n),
1557
+ tabDrop: (t, e) => rn(t, e.payload),
1557
1558
  adjustSplitRatio: (t, e) => {
1558
1559
  const n = q(t.tree, e.payload.path);
1559
1560
  if (_(n))
1560
1561
  return t;
1561
- const r = ze(t.tree, e.payload.path, n.ratio + e.payload.deltaRatio);
1562
+ const r = $e(t.tree, e.payload.path, n.ratio + e.payload.deltaRatio);
1562
1563
  return { ...t, tree: r };
1563
1564
  }
1564
1565
  }), pt = (t, e, n) => {
1565
- const r = rn[e.type];
1566
+ const r = on[e.type];
1566
1567
  if (!r)
1567
1568
  return t;
1568
1569
  const o = r(t, e, n);
1569
1570
  return Q(o);
1570
- }, Rt = l.createContext(null), $ = () => {
1571
- const t = l.useContext(Rt);
1571
+ }, Rt = u.createContext(null), $ = () => {
1572
+ const t = u.useContext(Rt);
1572
1573
  if (!t)
1573
1574
  throw new Error("usePanelSystem must be used within PanelSystemProvider");
1574
1575
  return t;
1575
- }, on = ({
1576
+ }, sn = ({
1576
1577
  initialState: t,
1577
1578
  createGroupId: e,
1578
1579
  createPanelId: n,
@@ -1581,56 +1582,56 @@ const ve = (t, e) => {
1581
1582
  splitLimits: s,
1582
1583
  children: a
1583
1584
  }) => {
1584
- const i = l.useMemo(() => Q(t), [t]), c = l.useMemo(() => Ct(s), [s]), d = l.useRef({ createGroupId: e, splitLimits: c, createPanelId: n });
1585
+ const i = u.useMemo(() => Q(t), [t]), c = u.useMemo(() => Ct(s), [s]), d = u.useRef({ createGroupId: e, splitLimits: c, createPanelId: n });
1585
1586
  d.current.createGroupId = e, d.current.splitLimits = c, d.current.createPanelId = n;
1586
- const [u, p] = l.useReducer(
1587
+ const [l, p] = u.useReducer(
1587
1588
  (S, C) => pt(S, C, d.current),
1588
1589
  i
1589
- ), g = l.useMemo(
1590
- () => r ? Q(r) : u,
1591
- [r, u]
1592
- ), v = l.useRef(g);
1590
+ ), g = u.useMemo(
1591
+ () => r ? Q(r) : l,
1592
+ [r, l]
1593
+ ), v = u.useRef(g);
1593
1594
  v.current = g;
1594
- const h = r !== void 0, y = l.useCallback(
1595
+ const b = r !== void 0, I = u.useCallback(
1595
1596
  (S) => {
1596
- if (h) {
1597
+ if (b) {
1597
1598
  const C = pt(v.current, S, d.current);
1598
1599
  o?.(C);
1599
1600
  return;
1600
1601
  }
1601
1602
  p(S);
1602
1603
  },
1603
- [h, o, p]
1604
- ), w = l.useMemo(() => ve(Et, y), [y]), T = l.useMemo(
1604
+ [b, o, p]
1605
+ ), w = u.useMemo(() => Ie(Et, I), [I]), T = u.useMemo(
1605
1606
  () => ({
1606
1607
  setActiveTab: w.setActiveTab,
1607
1608
  tabDrop: w.tabDrop
1608
1609
  }),
1609
1610
  [w]
1610
- ), b = l.useMemo(
1611
+ ), h = u.useMemo(
1611
1612
  () => ({
1612
1613
  adjustSplitRatio: w.adjustSplitRatio
1613
1614
  }),
1614
1615
  [w]
1615
- ), I = l.useMemo(
1616
+ ), y = u.useMemo(
1616
1617
  () => ({
1617
1618
  focusGroupIndex: w.focusGroupIndex,
1618
1619
  focusNextGroup: w.focusNextGroup,
1619
1620
  focusPrevGroup: w.focusPrevGroup
1620
1621
  }),
1621
1622
  [w]
1622
- ), f = l.useMemo(
1623
+ ), f = u.useMemo(
1623
1624
  () => ({
1624
1625
  state: g,
1625
- dispatch: y,
1626
+ dispatch: I,
1626
1627
  actions: w
1627
1628
  }),
1628
- [g, y, w]
1629
+ [g, I, w]
1629
1630
  );
1630
- return /* @__PURE__ */ m(Rt.Provider, { value: f, children: /* @__PURE__ */ m(Ue, { value: T, children: /* @__PURE__ */ m(We, { value: b, children: /* @__PURE__ */ m(Ze, { value: I, children: a }) }) }) });
1631
- }, sn = () => {
1631
+ return /* @__PURE__ */ m(Rt.Provider, { value: f, children: /* @__PURE__ */ m(Ve, { value: T, children: /* @__PURE__ */ m(qe, { value: h, children: /* @__PURE__ */ m(Je, { value: y, children: a }) }) }) });
1632
+ }, an = () => {
1632
1633
  const { actions: t } = $();
1633
- return l.useMemo(
1634
+ return u.useMemo(
1634
1635
  () => ({
1635
1636
  splitFocused: (e) => {
1636
1637
  t.splitFocused(e);
@@ -1649,128 +1650,129 @@ const ve = (t, e) => {
1649
1650
  }),
1650
1651
  [t]
1651
1652
  );
1652
- }, an = () => {
1653
- const { actions: t } = $(), e = l.useCallback(
1653
+ }, cn = () => {
1654
+ const { actions: t } = $(), e = u.useCallback(
1654
1655
  ({ fromGroupId: r, tabId: o, targetGroupId: s, zone: a }) => {
1655
1656
  t.contentDrop({ fromGroupId: r, tabId: o, targetGroupId: s, zone: a });
1656
1657
  },
1657
1658
  [t]
1658
- ), n = l.useCallback(
1659
+ ), n = u.useCallback(
1659
1660
  ({ fromGroupId: r, tabId: o, targetGroupId: s, targetIndex: a }) => {
1660
1661
  t.tabDrop({ fromGroupId: r, tabId: o, targetGroupId: s, targetIndex: a });
1661
1662
  },
1662
1663
  [t]
1663
1664
  );
1664
1665
  return { onCommitContentDrop: e, onCommitTabDrop: n };
1665
- }, cn = () => {
1666
- const t = re(), e = sn();
1667
- return l.useEffect(() => {
1668
- ie(t, e);
1666
+ }, un = () => {
1667
+ const t = oe(), e = an();
1668
+ return u.useEffect(() => {
1669
+ ae(t, e);
1669
1670
  }, [t, e]), null;
1670
- }, Pt = l.createContext(null), un = () => {
1671
- const t = l.useContext(Pt);
1671
+ }, Pt = u.createContext(null), ln = () => {
1672
+ const t = u.useContext(Pt);
1672
1673
  if (!t)
1673
1674
  throw new Error("useContentRegistry must be used within ContentRegistryProvider");
1674
1675
  return t;
1675
- }, ln = (t) => {
1676
+ }, dn = (t) => {
1676
1677
  const e = document.createElement("div");
1677
1678
  return e.setAttribute("data-panel-wrapper", t), e.style.display = "contents", e;
1678
- }, dn = (t, e, n) => {
1679
- const [r] = l.useState(() => ln(t));
1679
+ }, pn = (t, e, n) => {
1680
+ const [r] = u.useState(() => dn(t));
1680
1681
  return nt(() => (r.style.display = n ? "contents" : "none", e && r.parentElement !== e && e.appendChild(r), () => {
1681
1682
  r.parentElement?.removeChild(r);
1682
1683
  }), [r, e, n]), r;
1683
- }, Dt = l.memo(
1684
+ }, Dt = u.memo(
1684
1685
  ({ panelId: t, content: e, placement: n, containerElement: r }) => {
1685
- const o = n?.isActive ?? !1, s = dn(t, r, o);
1686
+ const o = n?.isActive ?? !1, s = pn(t, r, o);
1686
1687
  return ee(
1687
- /* @__PURE__ */ m(l.Activity, { mode: o ? "visible" : "hidden", children: e }),
1688
+ /* @__PURE__ */ m(u.Activity, { mode: o ? "visible" : "hidden", children: e }),
1688
1689
  s
1689
1690
  );
1690
1691
  }
1691
1692
  );
1692
1693
  Dt.displayName = "PanelContentHost";
1693
- const pn = ({
1694
+ const fn = ({
1694
1695
  children: t,
1695
1696
  panels: e,
1696
1697
  placements: n
1697
1698
  }) => {
1698
- const [r, o] = l.useState(/* @__PURE__ */ new Map()), s = l.useRef(/* @__PURE__ */ new Map()), a = l.useCallback((u, p) => {
1699
- o((g) => {
1700
- const v = new Map(g);
1701
- return p ? v.set(u, p) : v.delete(u), v;
1699
+ const [r, o] = u.useState(/* @__PURE__ */ new Map()), s = u.useCallback((g, v) => {
1700
+ o((b) => {
1701
+ const I = new Map(b);
1702
+ return v ? I.set(g, v) : I.delete(g), I;
1702
1703
  });
1703
- }, []), i = l.useMemo(
1704
- () => ({ registerContentContainer: a }),
1705
- [a]
1706
- ), c = l.useCallback((u, p) => {
1707
- const g = s.current.get(u);
1708
- if (g)
1709
- return g;
1710
- const v = p.render(p.id);
1711
- return s.current.set(u, v), v;
1712
- }, []), d = Object.keys(e);
1713
- return /* @__PURE__ */ H(Pt.Provider, { value: i, children: [
1704
+ }, []), a = u.useMemo(
1705
+ () => ({ registerContentContainer: s }),
1706
+ [s]
1707
+ ), i = u.useRef(e);
1708
+ i.current = e;
1709
+ const c = u.useCallback((g) => {
1710
+ const v = i.current[g];
1711
+ return v ? v.render(v.id) : null;
1712
+ }, []), d = u.useMemo(() => Object.keys(e), [e]), { getCachedContent: l } = ne({
1713
+ resolveContent: c,
1714
+ validIds: d
1715
+ }), p = Object.keys(e);
1716
+ return /* @__PURE__ */ H(Pt.Provider, { value: a, children: [
1714
1717
  t,
1715
- d.map((u) => {
1716
- const p = e[u];
1717
- if (!p)
1718
+ p.map((g) => {
1719
+ if (!e[g])
1718
1720
  return null;
1719
- const g = n[u] ?? null, v = g ? r.get(g.groupId) ?? null : null, h = c(u, p);
1721
+ const b = n[g] ?? null, I = b ? r.get(b.groupId) ?? null : null, w = l(g);
1720
1722
  return /* @__PURE__ */ m(
1721
1723
  Dt,
1722
1724
  {
1723
- panelId: u,
1724
- content: h,
1725
- placement: g,
1726
- containerElement: v
1725
+ panelId: g,
1726
+ content: w,
1727
+ placement: b,
1728
+ containerElement: I
1727
1729
  },
1728
- u
1730
+ g
1729
1731
  );
1730
1732
  })
1731
1733
  ] });
1732
- }, fn = ({
1734
+ }, gn = ({
1733
1735
  children: t,
1734
1736
  emptyContentComponent: e,
1735
1737
  doubleClickToAdd: n
1736
1738
  }) => {
1737
- const r = W(), { state: o, actions: s } = $(), { registerContentContainer: a } = un(), i = l.useCallback(() => l.createElement("div", { style: { color: "#888", fontSize: 12, padding: 12 } }, "No tabs"), []), c = e ?? i, d = l.useCallback(
1739
+ const r = W(), { state: o, actions: s } = $(), { registerContentContainer: a } = ln(), i = u.useCallback(() => u.createElement("div", { style: { color: "#888", fontSize: 12, padding: 12 } }, "No tabs"), []), c = e ?? i, d = u.useCallback(
1738
1740
  (T) => {
1739
- const b = o.groups[T];
1740
- if (!b)
1741
+ const h = o.groups[T];
1742
+ if (!h)
1741
1743
  return null;
1742
- const I = b.tabIds.map((f) => o.panels[f]).filter(Boolean);
1743
- return { ...b, tabs: I };
1744
+ const y = h.tabIds.map((f) => o.panels[f]).filter(Boolean);
1745
+ return { ...h, tabs: y };
1744
1746
  },
1745
1747
  [o.groups, o.panels]
1746
- ), u = l.useCallback(
1748
+ ), l = u.useCallback(
1747
1749
  (T) => {
1748
- const b = o.groups[T];
1749
- return !b || b.tabIds.length === 0 ? /* @__PURE__ */ m(c, {}) : null;
1750
+ const h = o.groups[T];
1751
+ return !h || h.tabIds.length === 0 ? /* @__PURE__ */ m(c, {}) : null;
1750
1752
  },
1751
1753
  [o.groups, c]
1752
- ), p = l.useCallback((T, b) => {
1753
- s.setActiveTab(T, b);
1754
- }, [s]), g = l.useCallback((T) => {
1754
+ ), p = u.useCallback((T, h) => {
1755
+ s.setActiveTab(T, h);
1756
+ }, [s]), g = u.useCallback((T) => {
1755
1757
  s.addNewTab({ groupId: T, title: "New Tab", makeActive: !0 });
1756
- }, [s]), v = l.useCallback((T, b) => {
1757
- s.removeTab(T, b);
1758
- }, [s]), h = l.useCallback((T, b, I) => {
1759
- s.setActiveTab(b, T), r.onStartTabDrag(T, b, I);
1760
- }, [s, r]), y = l.useCallback((T, b) => {
1761
- const I = o.groups[T];
1762
- !I || !I.activeTabId || r.onStartContentDrag(T, I.activeTabId, b);
1763
- }, [o.groups, r]), w = l.useMemo(
1764
- () => ({ getGroup: d, getGroupContent: u, onClickTab: p, onAddTab: g, onCloseTab: v, onStartTabDrag: h, onStartContentDrag: y, doubleClickToAdd: n, registerContentContainer: a }),
1765
- [d, u, p, g, v, h, y, n, a]
1758
+ }, [s]), v = u.useCallback((T, h) => {
1759
+ s.removeTab(T, h);
1760
+ }, [s]), b = u.useCallback((T, h, y) => {
1761
+ s.setActiveTab(h, T), r.onStartTabDrag(T, h, y);
1762
+ }, [s, r]), I = u.useCallback((T, h) => {
1763
+ const y = o.groups[T];
1764
+ !y || !y.activeTabId || r.onStartContentDrag(T, y.activeTabId, h);
1765
+ }, [o.groups, r]), w = u.useMemo(
1766
+ () => ({ getGroup: d, getGroupContent: l, onClickTab: p, onAddTab: g, onCloseTab: v, onStartTabDrag: b, onStartContentDrag: I, doubleClickToAdd: n, registerContentContainer: a }),
1767
+ [d, l, p, g, v, b, I, n, a]
1766
1768
  );
1767
- return /* @__PURE__ */ m(de, { value: w, children: t });
1768
- }, gn = ({
1769
+ return /* @__PURE__ */ m(pe, { value: w, children: t });
1770
+ }, bn = ({
1769
1771
  children: t,
1770
1772
  emptyContentComponent: e,
1771
1773
  doubleClickToAdd: n
1772
1774
  }) => {
1773
- const { state: r } = $(), o = l.useMemo(() => {
1775
+ const { state: r } = $(), o = u.useMemo(() => {
1774
1776
  const s = {};
1775
1777
  for (const [a, i] of Object.entries(r.groups))
1776
1778
  for (const c of i.tabIds)
@@ -1780,7 +1782,7 @@ const pn = ({
1780
1782
  };
1781
1783
  return s;
1782
1784
  }, [r.groups]);
1783
- return /* @__PURE__ */ m(pn, { panels: r.panels, placements: o, children: /* @__PURE__ */ m(fn, { emptyContentComponent: e, doubleClickToAdd: n, children: t }) });
1785
+ return /* @__PURE__ */ m(fn, { panels: r.panels, placements: o, children: /* @__PURE__ */ m(gn, { emptyContentComponent: e, doubleClickToAdd: n, children: t }) });
1784
1786
  }, X = (t, e, n, r) => {
1785
1787
  if (_(t))
1786
1788
  return r;
@@ -1791,8 +1793,8 @@ const pn = ({
1791
1793
  }
1792
1794
  const a = n.h * t.ratio, i = n.h - a;
1793
1795
  return X(t.a, [...e, "a"], { x: n.x, y: n.y, w: n.w, h: a }, r), X(t.b, [...e, "b"], { x: n.x, y: n.y + a, w: n.w, h: i }, r), r;
1794
- }, bn = ({ containerRef: t }) => {
1795
- const { state: e } = $(), { adjustSplitRatio: n } = Ve(), r = l.useMemo(() => X(e.tree, [], { x: 0, y: 0, w: 100, h: 100 }, []), [e.tree]), [o, s] = l.useState(null);
1796
+ }, hn = ({ containerRef: t }) => {
1797
+ const { state: e } = $(), { adjustSplitRatio: n } = We(), r = u.useMemo(() => X(e.tree, [], { x: 0, y: 0, w: 100, h: 100 }, []), [e.tree]), [o, s] = u.useState(null);
1796
1798
  if (nt(() => {
1797
1799
  const i = t.current;
1798
1800
  if (!i)
@@ -1810,7 +1812,7 @@ const pn = ({
1810
1812
  return null;
1811
1813
  }
1812
1814
  }
1813
- const u = d(), p = u ? new u(() => c()) : null;
1815
+ const l = d(), p = l ? new l(() => c()) : null;
1814
1816
  p && p.observe(i);
1815
1817
  const g = () => c();
1816
1818
  return window.addEventListener("scroll", g, !0), () => {
@@ -1824,43 +1826,43 @@ const pn = ({
1824
1826
  top: o.top + o.height * i.parentRect.y / 100,
1825
1827
  width: o.width * i.parentRect.w / 100,
1826
1828
  height: o.height * i.parentRect.h / 100
1827
- }, u = te;
1829
+ }, l = te;
1828
1830
  if (i.direction === "vertical") {
1829
- const h = d.left + d.width * (i.linePos - i.parentRect.x) / i.parentRect.w, y = {
1831
+ const b = d.left + d.width * (i.linePos - i.parentRect.x) / i.parentRect.w, I = {
1830
1832
  position: "fixed",
1831
- left: `calc(${Math.round(h)}px - ${u} / 2)`,
1833
+ left: `calc(${Math.round(b)}px - ${l} / 2)`,
1832
1834
  top: Math.round(d.top),
1833
- width: u,
1835
+ width: l,
1834
1836
  height: Math.round(d.height),
1835
1837
  cursor: "col-resize",
1836
1838
  pointerEvents: "auto"
1837
1839
  };
1838
- return /* @__PURE__ */ m("div", { style: y, children: /* @__PURE__ */ m(ot, { direction: "vertical", onResize: (T) => {
1839
- const b = o.width * i.parentRect.w / 100, I = b === 0 ? 0 : T / b;
1840
- n({ path: i.path, deltaRatio: I });
1840
+ return /* @__PURE__ */ m("div", { style: I, children: /* @__PURE__ */ m(ot, { direction: "vertical", onResize: (T) => {
1841
+ const h = o.width * i.parentRect.w / 100, y = h === 0 ? 0 : T / h;
1842
+ n({ path: i.path, deltaRatio: y });
1841
1843
  } }) }, `split-${c}`);
1842
1844
  }
1843
1845
  const p = d.top + d.height * (i.linePos - i.parentRect.y) / i.parentRect.h, g = {
1844
1846
  position: "fixed",
1845
1847
  left: Math.round(d.left),
1846
- top: `calc(${Math.round(p)}px - ${u} / 2)`,
1848
+ top: `calc(${Math.round(p)}px - ${l} / 2)`,
1847
1849
  width: Math.round(d.width),
1848
- height: u,
1850
+ height: l,
1849
1851
  cursor: "row-resize",
1850
1852
  pointerEvents: "auto"
1851
1853
  };
1852
- return /* @__PURE__ */ m("div", { style: g, children: /* @__PURE__ */ m(ot, { direction: "horizontal", onResize: (h) => {
1853
- const y = o.height * i.parentRect.h / 100, w = y === 0 ? 0 : h / y;
1854
+ return /* @__PURE__ */ m("div", { style: g, children: /* @__PURE__ */ m(ot, { direction: "horizontal", onResize: (b) => {
1855
+ const I = o.height * i.parentRect.h / 100, w = I === 0 ? 0 : b / I;
1854
1856
  n({ path: i.path, deltaRatio: w });
1855
1857
  } }) }, `split-${c}`);
1856
1858
  };
1857
1859
  return /* @__PURE__ */ m("div", { style: { position: "fixed", inset: 0, pointerEvents: "none" }, children: r.map((i, c) => a(i, c)) });
1858
- }, hn = {
1860
+ }, mn = {
1859
1861
  position: "relative",
1860
1862
  display: "flex",
1861
1863
  width: "100%",
1862
1864
  height: "100%"
1863
- }, mn = ({
1865
+ }, vn = ({
1864
1866
  state: t,
1865
1867
  layoutMode: e,
1866
1868
  gridTracksInteractive: n,
@@ -1868,14 +1870,14 @@ const pn = ({
1868
1870
  tabBarComponent: o,
1869
1871
  panelGroupComponent: s
1870
1872
  }) => {
1871
- const a = (c) => r ? /* @__PURE__ */ m(r, { groupId: c }) : /* @__PURE__ */ m(Ce, { id: c, TabBarComponent: o, PanelGroupComponent: s });
1873
+ const a = (c) => r ? /* @__PURE__ */ m(r, { groupId: c }) : /* @__PURE__ */ m(Ee, { id: c, TabBarComponent: o, PanelGroupComponent: s });
1872
1874
  if (e === "grid") {
1873
- const c = ue(t, a, !!n);
1875
+ const c = le(t, a, !!n);
1874
1876
  return /* @__PURE__ */ m(st, { config: c.config, layers: c.layers });
1875
1877
  }
1876
- const i = ce(t, a);
1878
+ const i = ue(t, a);
1877
1879
  return /* @__PURE__ */ m(st, { config: i.config, layers: i.layers });
1878
- }, vn = ({
1880
+ }, In = ({
1879
1881
  containerRef: t,
1880
1882
  layoutMode: e,
1881
1883
  gridTracksInteractive: n,
@@ -1886,29 +1888,29 @@ const pn = ({
1886
1888
  tabBarComponent: i,
1887
1889
  panelGroupComponent: c,
1888
1890
  splitLimits: d,
1889
- emptyContentComponent: u,
1891
+ emptyContentComponent: l,
1890
1892
  doubleClickToAdd: p
1891
1893
  }) => {
1892
- const { state: g } = $(), { onCommitContentDrop: v, onCommitTabDrop: h } = an(), y = l.useMemo(() => ({ ...hn, ...s }), [s]), w = l.useCallback(
1893
- ({ targetGroupId: T, zone: b }) => {
1894
- if (b === "center")
1894
+ const { state: g } = $(), { onCommitContentDrop: v, onCommitTabDrop: b } = cn(), I = u.useMemo(() => ({ ...mn, ...s }), [s]), w = u.useCallback(
1895
+ ({ targetGroupId: T, zone: h }) => {
1896
+ if (h === "center")
1895
1897
  return !0;
1896
- const I = b === "left" || b === "right" ? "vertical" : "horizontal";
1897
- return rt(g.tree, T, I, d);
1898
+ const y = h === "left" || h === "right" ? "vertical" : "horizontal";
1899
+ return rt(g.tree, T, y, d);
1898
1900
  },
1899
1901
  [g.tree, d]
1900
1902
  );
1901
- return /* @__PURE__ */ m(pe, { children: /* @__PURE__ */ H(
1902
- ye,
1903
+ return /* @__PURE__ */ m(fe, { children: /* @__PURE__ */ H(
1904
+ Te,
1903
1905
  {
1904
1906
  containerRef: t,
1905
1907
  dragThresholdPx: r,
1906
1908
  onCommitContentDrop: v,
1907
- onCommitTabDrop: h,
1909
+ onCommitTabDrop: b,
1908
1910
  isContentZoneAllowed: w,
1909
1911
  children: [
1910
- /* @__PURE__ */ m(gn, { emptyContentComponent: u, doubleClickToAdd: p, children: /* @__PURE__ */ m("div", { ref: t, className: a, style: y, children: /* @__PURE__ */ m(
1911
- mn,
1912
+ /* @__PURE__ */ m(bn, { emptyContentComponent: l, doubleClickToAdd: p, children: /* @__PURE__ */ m("div", { ref: t, className: a, style: I, children: /* @__PURE__ */ m(
1913
+ vn,
1912
1914
  {
1913
1915
  state: g,
1914
1916
  layoutMode: e,
@@ -1918,18 +1920,18 @@ const pn = ({
1918
1920
  panelGroupComponent: c
1919
1921
  }
1920
1922
  ) }) }),
1921
- /* @__PURE__ */ m(bn, { containerRef: t }),
1922
- /* @__PURE__ */ m(In, {})
1923
+ /* @__PURE__ */ m(hn, { containerRef: t }),
1924
+ /* @__PURE__ */ m(wn, {})
1923
1925
  ]
1924
1926
  }
1925
1927
  ) });
1926
- }, In = () => {
1928
+ }, wn = () => {
1927
1929
  const t = W();
1928
1930
  return /* @__PURE__ */ H(et, { children: [
1929
- /* @__PURE__ */ m(Me, { suggest: t.suggest }),
1930
- /* @__PURE__ */ m(He, {})
1931
+ /* @__PURE__ */ m(_e, { suggest: t.suggest }),
1932
+ /* @__PURE__ */ m(Ne, {})
1931
1933
  ] });
1932
- }, Pn = ({
1934
+ }, An = ({
1933
1935
  initialState: t,
1934
1936
  createGroupId: e,
1935
1937
  createPanelId: n,
@@ -1940,12 +1942,12 @@ const pn = ({
1940
1942
  emptyContentComponent: i,
1941
1943
  state: c,
1942
1944
  onStateChange: d,
1943
- className: u,
1945
+ className: l,
1944
1946
  style: p,
1945
1947
  tabBarComponent: g,
1946
1948
  panelGroupComponent: v,
1947
- splitLimits: h,
1948
- doubleClickToAdd: y
1949
+ splitLimits: b,
1950
+ doubleClickToAdd: I
1949
1951
  }) => {
1950
1952
  if (!t)
1951
1953
  throw new Error("PanelSystem requires initialState.");
@@ -1957,20 +1959,20 @@ const pn = ({
1957
1959
  throw new Error("PanelSystem(layoutMode='grid') requires explicit 'gridTracksInteractive' flag.");
1958
1960
  if (s === void 0)
1959
1961
  throw new Error("PanelSystem requires explicit 'dragThresholdPx' value.");
1960
- const w = l.useRef(null), T = l.useMemo(() => Ct(h), [h]);
1962
+ const w = u.useRef(null), T = u.useMemo(() => Ct(b), [b]);
1961
1963
  return /* @__PURE__ */ m(
1962
- on,
1964
+ sn,
1963
1965
  {
1964
1966
  initialState: t,
1965
1967
  createGroupId: e,
1966
1968
  createPanelId: n,
1967
1969
  state: c,
1968
1970
  onStateChange: d,
1969
- splitLimits: h,
1970
- children: /* @__PURE__ */ H(se, { children: [
1971
- /* @__PURE__ */ m(cn, {}),
1971
+ splitLimits: b,
1972
+ children: /* @__PURE__ */ H(ie, { children: [
1973
+ /* @__PURE__ */ m(un, {}),
1972
1974
  /* @__PURE__ */ m(
1973
- vn,
1975
+ In,
1974
1976
  {
1975
1977
  containerRef: w,
1976
1978
  layoutMode: r,
@@ -1978,12 +1980,12 @@ const pn = ({
1978
1980
  dragThresholdPx: s,
1979
1981
  view: a,
1980
1982
  style: p,
1981
- className: u,
1983
+ className: l,
1982
1984
  tabBarComponent: g,
1983
1985
  panelGroupComponent: v,
1984
1986
  splitLimits: T,
1985
1987
  emptyContentComponent: i,
1986
- doubleClickToAdd: y
1988
+ doubleClickToAdd: I
1987
1989
  }
1988
1990
  )
1989
1991
  ] })
@@ -1991,18 +1993,18 @@ const pn = ({
1991
1993
  );
1992
1994
  };
1993
1995
  export {
1994
- Hn as CSS_VAR_PREFIX,
1995
- kn as Drawer,
1996
- Mn as DrawerLayers,
1997
- _n as FloatingWindow,
1996
+ zn as CSS_VAR_PREFIX,
1997
+ _n as Drawer,
1998
+ On as DrawerLayers,
1999
+ Bn as FloatingWindow,
1998
2000
  st as GridLayout,
1999
- Gn as HorizontalDivider,
2000
- Pn as PanelSystem,
2001
+ En as HorizontalDivider,
2002
+ An as PanelSystem,
2001
2003
  ot as ResizeHandle,
2002
- Rn as buildInitialState,
2003
- On as runTransition,
2004
- En as useFloatingState,
2005
- Cn as useLayerDragHandle,
2006
- Bn as useTransitionState
2004
+ Dn as buildInitialState,
2005
+ Ln as runTransition,
2006
+ Pn as useFloatingState,
2007
+ Rn as useLayerDragHandle,
2008
+ Hn as useTransitionState
2007
2009
  };
2008
2010
  //# sourceMappingURL=index.js.map