@pasquelin/panels 0.1.0
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/LICENSE +21 -0
- package/README.md +165 -0
- package/dist/components/Band.d.ts +13 -0
- package/dist/components/Center.d.ts +18 -0
- package/dist/components/IconButton.d.ts +20 -0
- package/dist/components/Panel.d.ts +31 -0
- package/dist/components/PanelFrame.d.ts +23 -0
- package/dist/components/PanelHeader.d.ts +15 -0
- package/dist/components/Panels.d.ts +30 -0
- package/dist/components/Rail.d.ts +23 -0
- package/dist/components/ResizeHandle.d.ts +37 -0
- package/dist/components/Separator.d.ts +6 -0
- package/dist/components/Surface.d.ts +9 -0
- package/dist/components/ZoneEdge.d.ts +17 -0
- package/dist/components/content.d.ts +9 -0
- package/dist/components/labels.d.ts +12 -0
- package/dist/core/clamps.d.ts +55 -0
- package/dist/core/context.d.ts +39 -0
- package/dist/core/cx.d.ts +5 -0
- package/dist/core/hooks/useArrangement.d.ts +36 -0
- package/dist/core/hooks/useContainerFit.d.ts +9 -0
- package/dist/core/hooks/usePanels.d.ts +26 -0
- package/dist/core/hooks/usePointerDrag.d.ts +21 -0
- package/dist/core/hooks/useZone.d.ts +28 -0
- package/dist/core/layoutEffect.d.ts +10 -0
- package/dist/core/persistence.d.ts +30 -0
- package/dist/core/store.d.ts +86 -0
- package/dist/core/types.d.ts +88 -0
- package/dist/cx-CcykAxZN.js +6 -0
- package/dist/cx-YyuC5RtB.cjs +1 -0
- package/dist/dockview/DockviewCenter.d.ts +37 -0
- package/dist/dockview/index.d.ts +3 -0
- package/dist/dockview.cjs +1 -0
- package/dist/dockview.js +39 -0
- package/dist/index.cjs +1 -0
- package/dist/index.d.ts +26 -0
- package/dist/index.js +935 -0
- package/dist/styles.css +1 -0
- package/llms-full.txt +1242 -0
- package/llms.txt +150 -0
- package/package.json +99 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,935 @@
|
|
|
1
|
+
import { jsx as d, jsxs as m, Fragment as B } from "react/jsx-runtime";
|
|
2
|
+
import k, { useEffect as K, useLayoutEffect as Mn, useState as tn, useMemo as w, useContext as fn, createContext as pn, useRef as j, useCallback as z, memo as hn, Fragment as Rn, Children as Cn, isValidElement as En } from "react";
|
|
3
|
+
import { c as v } from "./cx-CcykAxZN.js";
|
|
4
|
+
const en = (n) => {
|
|
5
|
+
let t;
|
|
6
|
+
const e = /* @__PURE__ */ new Set(), o = (u, a) => {
|
|
7
|
+
const f = typeof u == "function" ? u(t) : u;
|
|
8
|
+
if (!Object.is(f, t)) {
|
|
9
|
+
const p = t;
|
|
10
|
+
t = a ?? (typeof f != "object" || f === null) ? f : Object.assign({}, t, f), e.forEach((g) => g(t, p));
|
|
11
|
+
}
|
|
12
|
+
}, s = () => t, c = { setState: o, getState: s, getInitialState: () => l, subscribe: (u) => (e.add(u), () => e.delete(u)) }, l = t = n(o, s, c);
|
|
13
|
+
return c;
|
|
14
|
+
}, Ln = ((n) => n ? en(n) : en), On = (n) => n;
|
|
15
|
+
function Tn(n, t = On) {
|
|
16
|
+
const e = k.useSyncExternalStore(
|
|
17
|
+
n.subscribe,
|
|
18
|
+
k.useCallback(() => t(n.getState()), [n, t]),
|
|
19
|
+
k.useCallback(() => t(n.getInitialState()), [n, t])
|
|
20
|
+
);
|
|
21
|
+
return k.useDebugValue(e), e;
|
|
22
|
+
}
|
|
23
|
+
const C = ["left", "right", "top", "bottomLeft", "bottomRight"], $ = ["primary", "secondary"], kn = ["bottomLeft", "bottomRight"];
|
|
24
|
+
function U(n) {
|
|
25
|
+
return n === "bottomLeft" || n === "bottomRight";
|
|
26
|
+
}
|
|
27
|
+
function E(n) {
|
|
28
|
+
return n === "top" || U(n);
|
|
29
|
+
}
|
|
30
|
+
const V = {
|
|
31
|
+
left: { column: ["left", "top"], band: "bottomLeft" },
|
|
32
|
+
right: { column: ["right"], band: "bottomRight" }
|
|
33
|
+
};
|
|
34
|
+
function on(n) {
|
|
35
|
+
return n === "left" || n === "top";
|
|
36
|
+
}
|
|
37
|
+
const F = 140, gn = 240, R = 100, Bn = {
|
|
38
|
+
left: 320,
|
|
39
|
+
right: 260,
|
|
40
|
+
top: 180,
|
|
41
|
+
bottomLeft: 240,
|
|
42
|
+
bottomRight: 240
|
|
43
|
+
}, mn = "bottomRight";
|
|
44
|
+
function A(n) {
|
|
45
|
+
return U(n) ? mn : n;
|
|
46
|
+
}
|
|
47
|
+
const M = {
|
|
48
|
+
left: "right",
|
|
49
|
+
right: "left",
|
|
50
|
+
// The band as a whole faces the top strip: either half of it takes the same height off.
|
|
51
|
+
top: mn,
|
|
52
|
+
bottomLeft: "top",
|
|
53
|
+
bottomRight: "top"
|
|
54
|
+
};
|
|
55
|
+
function bn(n, t, e) {
|
|
56
|
+
return Math.min(Math.max(n, t), e);
|
|
57
|
+
}
|
|
58
|
+
function yn(n, t, e) {
|
|
59
|
+
const o = Math.max(F, Math.round(t - e - gn));
|
|
60
|
+
return bn(Math.round(n), F, o);
|
|
61
|
+
}
|
|
62
|
+
function D(n, t) {
|
|
63
|
+
const e = Math.max(R, Math.round(t - R));
|
|
64
|
+
return bn(Math.round(n), R, e);
|
|
65
|
+
}
|
|
66
|
+
function H(n, t) {
|
|
67
|
+
const e = n[t];
|
|
68
|
+
return e !== void 0 && (e.primary !== void 0 || e.secondary !== void 0);
|
|
69
|
+
}
|
|
70
|
+
function Fn(n) {
|
|
71
|
+
return H(n, "bottomLeft") || H(n, "bottomRight");
|
|
72
|
+
}
|
|
73
|
+
function vn(n, t, e, o) {
|
|
74
|
+
return (U(e) ? Fn(t) : H(t, e)) ? n.sizes[A(e)] ?? o(e) : 0;
|
|
75
|
+
}
|
|
76
|
+
function An(n, t, e, o, s) {
|
|
77
|
+
const r = { ...n.sizes }, i = { ...n.splits };
|
|
78
|
+
for (const l of C) {
|
|
79
|
+
const u = r[l];
|
|
80
|
+
if (u === void 0) continue;
|
|
81
|
+
const a = E(l) ? o : e;
|
|
82
|
+
r[l] = yn(u, a, vn(n, t, M[l], s));
|
|
83
|
+
const f = i[l];
|
|
84
|
+
f !== void 0 && (i[l] = D(f, E(l) ? e : o));
|
|
85
|
+
}
|
|
86
|
+
const c = n.bandSplit === void 0 ? void 0 : D(n.bandSplit, e);
|
|
87
|
+
return { sizes: r, splits: i, bandSplit: c };
|
|
88
|
+
}
|
|
89
|
+
function Dn(n, t, e) {
|
|
90
|
+
const o = e - gn, s = n + t;
|
|
91
|
+
if (s <= o) return [n, t];
|
|
92
|
+
const r = (u) => u === 0 ? 0 : F, i = r(n) + r(t);
|
|
93
|
+
if (o <= i)
|
|
94
|
+
return [Math.min(n, r(n)), Math.min(t, r(t))];
|
|
95
|
+
const c = o / s, l = Math.max(r(n), Math.round(n * c));
|
|
96
|
+
return [l, Math.max(r(t), Math.round(o - l))];
|
|
97
|
+
}
|
|
98
|
+
function Hn(n, t, e) {
|
|
99
|
+
return n.find((o) => o.zone === t && o.slot === e)?.id;
|
|
100
|
+
}
|
|
101
|
+
function N(n, t) {
|
|
102
|
+
return t === void 0 ? void 0 : n.find((e) => e.id === t);
|
|
103
|
+
}
|
|
104
|
+
function Z(n, t) {
|
|
105
|
+
const e = n.open[t], o = e?.primary;
|
|
106
|
+
return o !== void 0 && N(n.registry, o)?.solo === !0 ? { primary: o } : { primary: o, secondary: e?.secondary };
|
|
107
|
+
}
|
|
108
|
+
function jn(n, t) {
|
|
109
|
+
return U(t) ? kn.some((e) => W(n, e)) : W(n, t);
|
|
110
|
+
}
|
|
111
|
+
function W(n, t) {
|
|
112
|
+
const e = Z(n, t);
|
|
113
|
+
return e.primary !== void 0 || e.secondary !== void 0;
|
|
114
|
+
}
|
|
115
|
+
function G(n, t, e) {
|
|
116
|
+
return Math.max(Bn[t], N(n, e)?.opens ?? 0);
|
|
117
|
+
}
|
|
118
|
+
function Un(n, t, e, o) {
|
|
119
|
+
const s = n.open[t] ?? {}, r = { ...n.stashed };
|
|
120
|
+
if (N(n.registry, o)?.solo === !0)
|
|
121
|
+
return r[t] = s, [{ [e]: o }, r];
|
|
122
|
+
const i = s.primary;
|
|
123
|
+
if (!(i !== void 0 && N(n.registry, i)?.solo === !0)) return [{ ...s, [e]: o }, n.stashed];
|
|
124
|
+
const l = r[t] ?? {};
|
|
125
|
+
return delete r[t], [{ ...l, [e]: o }, r];
|
|
126
|
+
}
|
|
127
|
+
function Yn(n, t, e) {
|
|
128
|
+
const o = n.open[t] ?? {}, s = o[e], r = n.stashed[t];
|
|
129
|
+
if (r && s !== void 0 && N(n.registry, s)?.solo === !0) {
|
|
130
|
+
const c = { ...n.stashed };
|
|
131
|
+
return delete c[t], [r, c];
|
|
132
|
+
}
|
|
133
|
+
const i = { ...o };
|
|
134
|
+
return delete i[e], [i, n.stashed];
|
|
135
|
+
}
|
|
136
|
+
const rn = { sizes: {}, splits: {} };
|
|
137
|
+
function $n(n = {}) {
|
|
138
|
+
const t = n.initial;
|
|
139
|
+
return Ln()((e, o) => ({
|
|
140
|
+
registry: [],
|
|
141
|
+
open: t?.open ?? {},
|
|
142
|
+
lengths: t?.lengths ?? rn,
|
|
143
|
+
focusedZone: null,
|
|
144
|
+
stashed: {},
|
|
145
|
+
settled: t?.open !== void 0,
|
|
146
|
+
available: { width: 0, height: 0 },
|
|
147
|
+
register: (s) => e((r) => ({ registry: [...r.registry.filter((c) => c.id !== s.id), s] })),
|
|
148
|
+
unregister: (s) => e((r) => {
|
|
149
|
+
const i = { ...r.open };
|
|
150
|
+
for (const c of C) {
|
|
151
|
+
const l = i[c];
|
|
152
|
+
if (l)
|
|
153
|
+
for (const u of $) {
|
|
154
|
+
if (l[u] !== s) continue;
|
|
155
|
+
const a = { ...l };
|
|
156
|
+
delete a[u], i[c] = a;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
return { registry: r.registry.filter((c) => c.id !== s), open: i };
|
|
160
|
+
}),
|
|
161
|
+
settle: (s) => e((r) => {
|
|
162
|
+
if (r.settled) return r;
|
|
163
|
+
const i = { ...s ?? {} };
|
|
164
|
+
for (const c of C)
|
|
165
|
+
for (const l of $) {
|
|
166
|
+
if (i[c]?.[l] !== void 0) continue;
|
|
167
|
+
const u = Hn(r.registry, c, l);
|
|
168
|
+
u !== void 0 && (i[c] = { ...i[c] ?? {}, [l]: u });
|
|
169
|
+
}
|
|
170
|
+
return { open: i, settled: !0 };
|
|
171
|
+
}),
|
|
172
|
+
show: (s) => e((r) => {
|
|
173
|
+
const i = N(r.registry, s);
|
|
174
|
+
if (!i) return r;
|
|
175
|
+
const { zone: c, slot: l } = i;
|
|
176
|
+
if (r.open[c]?.[l] === s) return { focusedZone: c };
|
|
177
|
+
const [u, a] = Un(r, c, l, s);
|
|
178
|
+
return { open: { ...r.open, [c]: u }, stashed: a, focusedZone: c };
|
|
179
|
+
}),
|
|
180
|
+
close: (s, r) => e((i) => {
|
|
181
|
+
const [c, l] = Yn(i, s, r), u = { ...i.open, [s]: c };
|
|
182
|
+
return {
|
|
183
|
+
open: u,
|
|
184
|
+
stashed: l,
|
|
185
|
+
focusedZone: !H(u, s) && i.focusedZone === s ? null : i.focusedZone
|
|
186
|
+
};
|
|
187
|
+
}),
|
|
188
|
+
toggle: (s) => {
|
|
189
|
+
const r = o(), i = N(r.registry, s);
|
|
190
|
+
if (!i) return;
|
|
191
|
+
Z(r, i.zone)[i.slot] === s ? r.close(i.zone, i.slot) : r.show(s);
|
|
192
|
+
},
|
|
193
|
+
focus: (s) => e((r) => r.focusedZone === s ? r : { focusedZone: s }),
|
|
194
|
+
// Guarded: a drag past the ceiling clamps to the same number for as long as the pointer
|
|
195
|
+
// keeps going, and every write notifies every subscriber.
|
|
196
|
+
resize: (s, r, i) => e((c) => {
|
|
197
|
+
const l = vn(
|
|
198
|
+
c.lengths,
|
|
199
|
+
c.open,
|
|
200
|
+
M[s],
|
|
201
|
+
(f) => G(c.registry, f, Z(c, f).primary)
|
|
202
|
+
), u = yn(r, i, l), a = A(s);
|
|
203
|
+
return u === c.lengths.sizes[a] ? c : { lengths: { ...c.lengths, sizes: { ...c.lengths.sizes, [a]: u } } };
|
|
204
|
+
}),
|
|
205
|
+
resplit: (s, r, i) => e((c) => {
|
|
206
|
+
const l = D(r, i);
|
|
207
|
+
return l === c.lengths.splits[s] ? c : { lengths: { ...c.lengths, splits: { ...c.lengths.splits, [s]: l } } };
|
|
208
|
+
}),
|
|
209
|
+
resplitBand: (s, r) => e((i) => {
|
|
210
|
+
const c = D(s, r);
|
|
211
|
+
return c === i.lengths.bandSplit ? i : { lengths: { ...i.lengths, bandSplit: c } };
|
|
212
|
+
}),
|
|
213
|
+
fit: (s, r) => e((i) => ({
|
|
214
|
+
available: { width: s, height: r },
|
|
215
|
+
lengths: An(
|
|
216
|
+
i.lengths,
|
|
217
|
+
i.open,
|
|
218
|
+
s,
|
|
219
|
+
r,
|
|
220
|
+
(c) => G(i.registry, c, Z(i, c).primary)
|
|
221
|
+
)
|
|
222
|
+
})),
|
|
223
|
+
reset: () => e((s) => ({
|
|
224
|
+
open: {},
|
|
225
|
+
lengths: rn,
|
|
226
|
+
focusedZone: null,
|
|
227
|
+
// Left behind, a solo panel closed after a reset would give back the zone the reset
|
|
228
|
+
// had just cleared.
|
|
229
|
+
stashed: {},
|
|
230
|
+
settled: !1,
|
|
231
|
+
registry: s.registry
|
|
232
|
+
}))
|
|
233
|
+
}));
|
|
234
|
+
}
|
|
235
|
+
const mt = () => {
|
|
236
|
+
const n = /* @__PURE__ */ new Map();
|
|
237
|
+
return {
|
|
238
|
+
read: (t) => n.get(t) ?? null,
|
|
239
|
+
write: (t, e) => {
|
|
240
|
+
n.set(t, e);
|
|
241
|
+
}
|
|
242
|
+
};
|
|
243
|
+
}, Vn = () => ({
|
|
244
|
+
read: (n) => {
|
|
245
|
+
try {
|
|
246
|
+
return globalThis.localStorage?.getItem(n) ?? null;
|
|
247
|
+
} catch {
|
|
248
|
+
return null;
|
|
249
|
+
}
|
|
250
|
+
},
|
|
251
|
+
write: (n, t) => {
|
|
252
|
+
try {
|
|
253
|
+
globalThis.localStorage?.setItem(n, t);
|
|
254
|
+
} catch {
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
}), Sn = 1;
|
|
258
|
+
function I(n) {
|
|
259
|
+
return typeof n == "object" && n !== null && !Array.isArray(n);
|
|
260
|
+
}
|
|
261
|
+
function Wn(n) {
|
|
262
|
+
const t = {};
|
|
263
|
+
for (const e of C) {
|
|
264
|
+
const o = n[e];
|
|
265
|
+
if (I(o))
|
|
266
|
+
for (const s of $) {
|
|
267
|
+
const r = o[s];
|
|
268
|
+
typeof r == "string" && (t[e] = { ...t[e], [s]: r });
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
return t;
|
|
272
|
+
}
|
|
273
|
+
function sn(n) {
|
|
274
|
+
const t = {};
|
|
275
|
+
for (const e of C) {
|
|
276
|
+
const o = n[e];
|
|
277
|
+
typeof o == "number" && Number.isFinite(o) && (t[e] = o);
|
|
278
|
+
}
|
|
279
|
+
return t;
|
|
280
|
+
}
|
|
281
|
+
function Gn(n, t) {
|
|
282
|
+
const e = n.read(t);
|
|
283
|
+
if (e === null) return;
|
|
284
|
+
let o;
|
|
285
|
+
try {
|
|
286
|
+
o = JSON.parse(e);
|
|
287
|
+
} catch {
|
|
288
|
+
return;
|
|
289
|
+
}
|
|
290
|
+
if (!I(o) || o.version !== Sn || !I(o.open) || !I(o.lengths)) return;
|
|
291
|
+
const s = o.lengths;
|
|
292
|
+
if (!I(s.sizes) || !I(s.splits)) return;
|
|
293
|
+
const r = s.bandSplit;
|
|
294
|
+
return {
|
|
295
|
+
open: Wn(o.open),
|
|
296
|
+
lengths: {
|
|
297
|
+
sizes: sn(s.sizes),
|
|
298
|
+
splits: sn(s.splits),
|
|
299
|
+
bandSplit: typeof r == "number" && Number.isFinite(r) ? r : void 0
|
|
300
|
+
}
|
|
301
|
+
};
|
|
302
|
+
}
|
|
303
|
+
function Jn(n, t, e) {
|
|
304
|
+
const o = { version: Sn, ...e };
|
|
305
|
+
n.write(t, JSON.stringify(o));
|
|
306
|
+
}
|
|
307
|
+
const wn = typeof globalThis.document > "u" ? K : Mn, Nn = pn(null);
|
|
308
|
+
function Xn({
|
|
309
|
+
store: n,
|
|
310
|
+
storageKey: t = "panels:layout",
|
|
311
|
+
storage: e,
|
|
312
|
+
defaultOpen: o,
|
|
313
|
+
children: s
|
|
314
|
+
}) {
|
|
315
|
+
const [r] = tn(
|
|
316
|
+
() => e === null ? null : e ?? Vn()
|
|
317
|
+
), [i] = tn(
|
|
318
|
+
() => n ?? $n({
|
|
319
|
+
initial: r ? Gn(r, t) : void 0
|
|
320
|
+
})
|
|
321
|
+
);
|
|
322
|
+
return wn(() => {
|
|
323
|
+
i.getState().settle(o);
|
|
324
|
+
}, [i, o]), K(() => {
|
|
325
|
+
if (r)
|
|
326
|
+
return i.subscribe((c) => {
|
|
327
|
+
c.settled && Jn(r, t, { open: c.open, lengths: c.lengths });
|
|
328
|
+
});
|
|
329
|
+
}, [r, i, t]), /* @__PURE__ */ d(Nn.Provider, { value: i, children: s });
|
|
330
|
+
}
|
|
331
|
+
function L() {
|
|
332
|
+
const n = fn(Nn);
|
|
333
|
+
if (!n) throw new Error("usePanelsStore must be used inside a <Panels> or <PanelsProvider>");
|
|
334
|
+
return n;
|
|
335
|
+
}
|
|
336
|
+
function S(n) {
|
|
337
|
+
const t = L();
|
|
338
|
+
return Tn(t, n);
|
|
339
|
+
}
|
|
340
|
+
function O() {
|
|
341
|
+
const n = L();
|
|
342
|
+
return w(() => {
|
|
343
|
+
const { show: t, close: e, toggle: o, focus: s, resize: r, resplit: i, resplitBand: c, fit: l, reset: u } = n.getState();
|
|
344
|
+
return { show: t, close: e, toggle: o, focus: s, resize: r, resplit: i, resplitBand: c, fit: l, reset: u };
|
|
345
|
+
}, [n]);
|
|
346
|
+
}
|
|
347
|
+
function Kn(n) {
|
|
348
|
+
const t = L();
|
|
349
|
+
K(() => {
|
|
350
|
+
const e = n.current;
|
|
351
|
+
if (!e) return;
|
|
352
|
+
const o = () => {
|
|
353
|
+
const { clientWidth: r, clientHeight: i } = e;
|
|
354
|
+
r === 0 || i === 0 || t.getState().fit(r, i);
|
|
355
|
+
};
|
|
356
|
+
if (o(), typeof ResizeObserver > "u") return;
|
|
357
|
+
const s = new ResizeObserver(o);
|
|
358
|
+
return s.observe(e), () => s.disconnect();
|
|
359
|
+
}, [n, t]);
|
|
360
|
+
}
|
|
361
|
+
function T() {
|
|
362
|
+
const n = S((e) => e.registry), t = S((e) => e.open);
|
|
363
|
+
return w(() => ({ registry: n, open: t }), [n, t]);
|
|
364
|
+
}
|
|
365
|
+
function J(n) {
|
|
366
|
+
const t = T();
|
|
367
|
+
return w(() => Z(t, n), [t, n]);
|
|
368
|
+
}
|
|
369
|
+
function cn(n) {
|
|
370
|
+
const t = T();
|
|
371
|
+
return w(() => W(t, n), [t, n]);
|
|
372
|
+
}
|
|
373
|
+
function qn(n) {
|
|
374
|
+
const t = T();
|
|
375
|
+
return w(() => jn(t, n), [t, n]);
|
|
376
|
+
}
|
|
377
|
+
function Qn() {
|
|
378
|
+
return {
|
|
379
|
+
left: cn(V.left.band),
|
|
380
|
+
right: cn(V.right.band)
|
|
381
|
+
};
|
|
382
|
+
}
|
|
383
|
+
function nt() {
|
|
384
|
+
const n = j(null);
|
|
385
|
+
return w(() => ({
|
|
386
|
+
start: (e, o) => {
|
|
387
|
+
e.currentTarget.setPointerCapture(e.pointerId), n.current = { ...o, pointerId: e.pointerId };
|
|
388
|
+
},
|
|
389
|
+
matching: (e) => n.current?.pointerId === e.pointerId ? n.current : null,
|
|
390
|
+
cancel: () => {
|
|
391
|
+
n.current = null;
|
|
392
|
+
}
|
|
393
|
+
}), []);
|
|
394
|
+
}
|
|
395
|
+
function X({
|
|
396
|
+
axis: n,
|
|
397
|
+
invert: t = !1,
|
|
398
|
+
size: e,
|
|
399
|
+
onSize: o,
|
|
400
|
+
measure: s,
|
|
401
|
+
label: r,
|
|
402
|
+
min: i,
|
|
403
|
+
max: c,
|
|
404
|
+
step: l = 16,
|
|
405
|
+
className: u
|
|
406
|
+
}) {
|
|
407
|
+
const a = nt(), f = j(null), p = n === "vertical", g = z(
|
|
408
|
+
(h) => (p ? h?.clientHeight : h?.clientWidth) ?? 0,
|
|
409
|
+
[p]
|
|
410
|
+
), b = z(
|
|
411
|
+
(h) => {
|
|
412
|
+
const y = a.matching(h);
|
|
413
|
+
if (!y) return;
|
|
414
|
+
const Y = (p ? h.clientY : h.clientX) - y.position;
|
|
415
|
+
o(y.size + Y * (t ? -1 : 1), y.available);
|
|
416
|
+
},
|
|
417
|
+
[a, t, p, o]
|
|
418
|
+
), P = z(
|
|
419
|
+
(h) => {
|
|
420
|
+
const y = p ? "ArrowUp" : "ArrowLeft", _ = p ? "ArrowDown" : "ArrowRight";
|
|
421
|
+
if (h.key !== y && h.key !== _) return;
|
|
422
|
+
const Y = g(f.current?.parentElement), Zn = e ?? s?.() ?? 0, In = h.key === _ ? 1 : -1;
|
|
423
|
+
h.preventDefault(), o(Zn + l * In * (t ? -1 : 1), Y);
|
|
424
|
+
},
|
|
425
|
+
[t, p, s, o, g, e, l]
|
|
426
|
+
);
|
|
427
|
+
return /* @__PURE__ */ d(
|
|
428
|
+
"div",
|
|
429
|
+
{
|
|
430
|
+
ref: f,
|
|
431
|
+
role: "separator",
|
|
432
|
+
tabIndex: 0,
|
|
433
|
+
"aria-label": r,
|
|
434
|
+
"aria-orientation": p ? "horizontal" : "vertical",
|
|
435
|
+
"aria-valuenow": e === void 0 ? void 0 : Math.round(e),
|
|
436
|
+
"aria-valuemin": i,
|
|
437
|
+
"aria-valuemax": c,
|
|
438
|
+
onPointerDown: (h) => {
|
|
439
|
+
a.start(h, {
|
|
440
|
+
position: p ? h.clientY : h.clientX,
|
|
441
|
+
size: e ?? s?.() ?? 0,
|
|
442
|
+
available: g(h.currentTarget.parentElement)
|
|
443
|
+
});
|
|
444
|
+
},
|
|
445
|
+
onPointerMove: b,
|
|
446
|
+
onPointerUp: a.cancel,
|
|
447
|
+
onPointerCancel: a.cancel,
|
|
448
|
+
onLostPointerCapture: a.cancel,
|
|
449
|
+
onKeyDown: P,
|
|
450
|
+
className: v("pnl-handle", p ? "pnl-handle--row" : "pnl-handle--col", u)
|
|
451
|
+
}
|
|
452
|
+
);
|
|
453
|
+
}
|
|
454
|
+
function ln(n, t, e, o, s) {
|
|
455
|
+
return s ? e ?? G(n, o, t) : 0;
|
|
456
|
+
}
|
|
457
|
+
function tt(n) {
|
|
458
|
+
const t = T(), e = J(n), o = J(M[n]), s = qn(M[n]), r = S(
|
|
459
|
+
(a) => a.lengths.sizes[A(n)]
|
|
460
|
+
), i = S(
|
|
461
|
+
(a) => a.lengths.sizes[A(M[n])]
|
|
462
|
+
), c = S((a) => a.lengths.splits[n]), l = S(
|
|
463
|
+
(a) => E(n) ? a.available.height : a.available.width
|
|
464
|
+
), u = S((a) => a.focusedZone === n);
|
|
465
|
+
return w(() => {
|
|
466
|
+
const { registry: a } = t, f = N(a, e.primary), p = N(a, e.secondary), g = f !== void 0 || p !== void 0, b = ln(a, e.primary, r, n, g), P = ln(
|
|
467
|
+
a,
|
|
468
|
+
o.primary,
|
|
469
|
+
i,
|
|
470
|
+
M[n],
|
|
471
|
+
s
|
|
472
|
+
);
|
|
473
|
+
return {
|
|
474
|
+
primary: f,
|
|
475
|
+
secondary: p,
|
|
476
|
+
draws: g,
|
|
477
|
+
// Zero until the container has been measured: bounding against nothing would collapse
|
|
478
|
+
// every zone to its floor on the very first paint.
|
|
479
|
+
size: l === 0 ? b : Dn(b, P, l)[0],
|
|
480
|
+
split: c,
|
|
481
|
+
focused: u
|
|
482
|
+
};
|
|
483
|
+
}, [
|
|
484
|
+
t,
|
|
485
|
+
e,
|
|
486
|
+
o,
|
|
487
|
+
s,
|
|
488
|
+
r,
|
|
489
|
+
i,
|
|
490
|
+
l,
|
|
491
|
+
c,
|
|
492
|
+
u,
|
|
493
|
+
n
|
|
494
|
+
]);
|
|
495
|
+
}
|
|
496
|
+
function et(n) {
|
|
497
|
+
const t = S((e) => e.registry);
|
|
498
|
+
return w(() => [
|
|
499
|
+
["primary", t.filter((o) => o.zone === n && o.slot === "primary")],
|
|
500
|
+
["secondary", t.filter((o) => o.zone === n && o.slot === "secondary")]
|
|
501
|
+
].filter(([, o]) => o.length > 0), [t, n]);
|
|
502
|
+
}
|
|
503
|
+
const Pn = pn(/* @__PURE__ */ new Map()), ot = Pn.Provider;
|
|
504
|
+
function rt(n) {
|
|
505
|
+
return fn(Pn).get(n);
|
|
506
|
+
}
|
|
507
|
+
function st({
|
|
508
|
+
title: n,
|
|
509
|
+
children: t,
|
|
510
|
+
fillActions: e,
|
|
511
|
+
trailing: o,
|
|
512
|
+
className: s
|
|
513
|
+
}) {
|
|
514
|
+
return /* @__PURE__ */ m("header", { className: v("pnl-header", s), children: [
|
|
515
|
+
/* @__PURE__ */ d("span", { className: v("pnl-header__title", e && "pnl-header__title--fixed"), children: n }),
|
|
516
|
+
/* @__PURE__ */ d("span", { className: v("pnl-header__actions", e && "pnl-header__actions--fill"), children: t }),
|
|
517
|
+
/* @__PURE__ */ d("span", { className: "pnl-header__trailing", children: o })
|
|
518
|
+
] });
|
|
519
|
+
}
|
|
520
|
+
function q({ orientation: n = "vertical", className: t }) {
|
|
521
|
+
return /* @__PURE__ */ d(
|
|
522
|
+
"span",
|
|
523
|
+
{
|
|
524
|
+
"aria-hidden": "true",
|
|
525
|
+
className: v("pnl-separator", `pnl-separator--${n}`, t)
|
|
526
|
+
}
|
|
527
|
+
);
|
|
528
|
+
}
|
|
529
|
+
function _n({ children: n, className: t, ...e }) {
|
|
530
|
+
return /* @__PURE__ */ d("section", { className: v("pnl-surface", t), ...e, children: n });
|
|
531
|
+
}
|
|
532
|
+
function xn({
|
|
533
|
+
icon: n,
|
|
534
|
+
label: t,
|
|
535
|
+
active: e,
|
|
536
|
+
accented: o,
|
|
537
|
+
acts: s,
|
|
538
|
+
className: r,
|
|
539
|
+
children: i,
|
|
540
|
+
ref: c,
|
|
541
|
+
...l
|
|
542
|
+
}) {
|
|
543
|
+
return /* @__PURE__ */ m(
|
|
544
|
+
"button",
|
|
545
|
+
{
|
|
546
|
+
type: "button",
|
|
547
|
+
ref: c,
|
|
548
|
+
"aria-label": t,
|
|
549
|
+
"aria-pressed": s ? void 0 : e,
|
|
550
|
+
className: v(
|
|
551
|
+
"pnl-icon-button",
|
|
552
|
+
e && "pnl-icon-button--active",
|
|
553
|
+
o && "pnl-icon-button--accented",
|
|
554
|
+
r
|
|
555
|
+
),
|
|
556
|
+
...l,
|
|
557
|
+
children: [
|
|
558
|
+
n !== void 0 && /* @__PURE__ */ d("span", { className: "pnl-icon-button__glyph", children: n }),
|
|
559
|
+
i
|
|
560
|
+
]
|
|
561
|
+
}
|
|
562
|
+
);
|
|
563
|
+
}
|
|
564
|
+
function it({
|
|
565
|
+
panel: n,
|
|
566
|
+
length: t,
|
|
567
|
+
closeLabel: e,
|
|
568
|
+
onFocus: o
|
|
569
|
+
}) {
|
|
570
|
+
const { close: s } = O(), r = rt(n.id);
|
|
571
|
+
return (
|
|
572
|
+
// The zone owns its length: a half given one keeps it, the other takes what is left. Both
|
|
573
|
+
// sized here would make the pair overflow the zone the user dragged.
|
|
574
|
+
/* @__PURE__ */ m(
|
|
575
|
+
_n,
|
|
576
|
+
{
|
|
577
|
+
"aria-label": n.title,
|
|
578
|
+
onPointerDownCapture: o,
|
|
579
|
+
className: t === void 0 ? "pnl-surface--fill" : "pnl-surface--give",
|
|
580
|
+
style: t === void 0 ? void 0 : { flexBasis: t },
|
|
581
|
+
children: [
|
|
582
|
+
/* @__PURE__ */ d(
|
|
583
|
+
st,
|
|
584
|
+
{
|
|
585
|
+
title: n.title,
|
|
586
|
+
fillActions: r?.actions !== void 0 && E(n.zone),
|
|
587
|
+
trailing: /* @__PURE__ */ m(B, { children: [
|
|
588
|
+
r?.actions !== void 0 && /* @__PURE__ */ d(q, {}),
|
|
589
|
+
/* @__PURE__ */ d(
|
|
590
|
+
xn,
|
|
591
|
+
{
|
|
592
|
+
label: e,
|
|
593
|
+
acts: !0,
|
|
594
|
+
onClick: () => s(n.zone, n.slot),
|
|
595
|
+
className: "pnl-icon-button--header",
|
|
596
|
+
icon: /* @__PURE__ */ d(ct, {})
|
|
597
|
+
}
|
|
598
|
+
)
|
|
599
|
+
] }),
|
|
600
|
+
children: r?.actions
|
|
601
|
+
}
|
|
602
|
+
),
|
|
603
|
+
/* @__PURE__ */ d("div", { className: v("pnl-body"), children: r?.content })
|
|
604
|
+
]
|
|
605
|
+
}
|
|
606
|
+
)
|
|
607
|
+
);
|
|
608
|
+
}
|
|
609
|
+
const an = hn(it);
|
|
610
|
+
function ct() {
|
|
611
|
+
return /* @__PURE__ */ d("svg", { viewBox: "0 0 24 24", width: "14", height: "14", "aria-hidden": "true", focusable: "false", children: /* @__PURE__ */ d(
|
|
612
|
+
"path",
|
|
613
|
+
{
|
|
614
|
+
fill: "currentColor",
|
|
615
|
+
d: "M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"
|
|
616
|
+
}
|
|
617
|
+
) });
|
|
618
|
+
}
|
|
619
|
+
function lt({ zone: n, labels: t }) {
|
|
620
|
+
const e = tt(n), { focus: o, resize: s, resplit: r } = O(), i = j(null), c = z(() => o(n), [o, n]), l = E(n), u = z(
|
|
621
|
+
() => l ? i.current?.clientHeight ?? 0 : i.current?.clientWidth ?? 0,
|
|
622
|
+
[l]
|
|
623
|
+
);
|
|
624
|
+
if (!e.draws) return null;
|
|
625
|
+
const { primary: a, secondary: f, size: p, split: g } = e, b = /* @__PURE__ */ m(
|
|
626
|
+
"div",
|
|
627
|
+
{
|
|
628
|
+
ref: i,
|
|
629
|
+
className: v("pnl-zone", l ? "pnl-zone--row" : "pnl-zone--col"),
|
|
630
|
+
style: { [l ? "height" : "width"]: p },
|
|
631
|
+
children: [
|
|
632
|
+
a && /* @__PURE__ */ d(an, { panel: a, closeLabel: t.closePanel, onFocus: c }),
|
|
633
|
+
a && f && /* @__PURE__ */ d(
|
|
634
|
+
X,
|
|
635
|
+
{
|
|
636
|
+
axis: l ? "horizontal" : "vertical",
|
|
637
|
+
invert: !0,
|
|
638
|
+
size: g,
|
|
639
|
+
min: R,
|
|
640
|
+
label: t.resizeSplit,
|
|
641
|
+
onSize: (h, y) => r(n, h, y)
|
|
642
|
+
}
|
|
643
|
+
),
|
|
644
|
+
f && /* @__PURE__ */ d(
|
|
645
|
+
an,
|
|
646
|
+
{
|
|
647
|
+
panel: f,
|
|
648
|
+
length: a && g !== void 0 ? g : void 0,
|
|
649
|
+
closeLabel: t.closePanel,
|
|
650
|
+
onFocus: c
|
|
651
|
+
}
|
|
652
|
+
)
|
|
653
|
+
]
|
|
654
|
+
}
|
|
655
|
+
), P = /* @__PURE__ */ d(
|
|
656
|
+
X,
|
|
657
|
+
{
|
|
658
|
+
axis: l ? "vertical" : "horizontal",
|
|
659
|
+
invert: !on(n),
|
|
660
|
+
size: p,
|
|
661
|
+
min: F,
|
|
662
|
+
measure: u,
|
|
663
|
+
label: t.resizeZone,
|
|
664
|
+
onSize: (h, y) => s(n, h, y)
|
|
665
|
+
}
|
|
666
|
+
);
|
|
667
|
+
return on(n) ? /* @__PURE__ */ m(B, { children: [
|
|
668
|
+
b,
|
|
669
|
+
P
|
|
670
|
+
] }) : /* @__PURE__ */ m(B, { children: [
|
|
671
|
+
P,
|
|
672
|
+
b
|
|
673
|
+
] });
|
|
674
|
+
}
|
|
675
|
+
const x = hn(lt);
|
|
676
|
+
function at({ left: n, right: t, labels: e }) {
|
|
677
|
+
const o = S((i) => i.lengths.bandSplit), { resplitBand: s } = O(), r = z(
|
|
678
|
+
(i, c) => s(i, c),
|
|
679
|
+
[s]
|
|
680
|
+
);
|
|
681
|
+
return !n && !t ? null : !n || !t ? /* @__PURE__ */ d(x, { zone: n ? "bottomLeft" : "bottomRight", labels: e }) : /* @__PURE__ */ m("div", { className: "pnl-band", children: [
|
|
682
|
+
/* @__PURE__ */ d(
|
|
683
|
+
"div",
|
|
684
|
+
{
|
|
685
|
+
className: v("pnl-band__half", o === void 0 && "pnl-band__half--even"),
|
|
686
|
+
style: o === void 0 ? void 0 : { width: o },
|
|
687
|
+
children: /* @__PURE__ */ d(x, { zone: "bottomLeft", labels: e })
|
|
688
|
+
}
|
|
689
|
+
),
|
|
690
|
+
/* @__PURE__ */ d(
|
|
691
|
+
X,
|
|
692
|
+
{
|
|
693
|
+
axis: "horizontal",
|
|
694
|
+
size: o,
|
|
695
|
+
min: R,
|
|
696
|
+
label: e.resizeBand,
|
|
697
|
+
onSize: r
|
|
698
|
+
}
|
|
699
|
+
),
|
|
700
|
+
/* @__PURE__ */ d("div", { className: "pnl-band__half pnl-band__half--rest", children: /* @__PURE__ */ d(x, { zone: "bottomRight", labels: e }) })
|
|
701
|
+
] });
|
|
702
|
+
}
|
|
703
|
+
function Q(n) {
|
|
704
|
+
return null;
|
|
705
|
+
}
|
|
706
|
+
Q.displayName = "Panels.Center";
|
|
707
|
+
const ut = {
|
|
708
|
+
closePanel: "Close panel",
|
|
709
|
+
resizeZone: "Resize panel area",
|
|
710
|
+
resizeSplit: "Resize the two panels",
|
|
711
|
+
resizeBand: "Resize the bottom panels"
|
|
712
|
+
};
|
|
713
|
+
function nn(n) {
|
|
714
|
+
return null;
|
|
715
|
+
}
|
|
716
|
+
nn.displayName = "Panels.Panel";
|
|
717
|
+
function un({ side: n, header: t, className: e }) {
|
|
718
|
+
const { column: o, band: s } = V[n];
|
|
719
|
+
return /* @__PURE__ */ m(
|
|
720
|
+
"div",
|
|
721
|
+
{
|
|
722
|
+
role: "toolbar",
|
|
723
|
+
"aria-orientation": "vertical",
|
|
724
|
+
className: v("pnl-rail", `pnl-rail--${n}`, e),
|
|
725
|
+
children: [
|
|
726
|
+
/* @__PURE__ */ m("div", { className: "pnl-rail__group", children: [
|
|
727
|
+
t !== void 0 && /* @__PURE__ */ m(B, { children: [
|
|
728
|
+
t,
|
|
729
|
+
/* @__PURE__ */ d(q, { orientation: "horizontal" })
|
|
730
|
+
] }),
|
|
731
|
+
o.map((r) => /* @__PURE__ */ d(dn, { zone: r }, r))
|
|
732
|
+
] }),
|
|
733
|
+
/* @__PURE__ */ d(dn, { zone: s })
|
|
734
|
+
]
|
|
735
|
+
}
|
|
736
|
+
);
|
|
737
|
+
}
|
|
738
|
+
function dn({ zone: n }) {
|
|
739
|
+
const t = et(n), e = J(n), o = S((r) => r.focusedZone === n), { toggle: s } = O();
|
|
740
|
+
return t.length === 0 ? null : /* @__PURE__ */ d("div", { className: "pnl-rail__group", children: t.map(([r, i], c) => /* @__PURE__ */ m(Rn, { children: [
|
|
741
|
+
c > 0 && /* @__PURE__ */ d(q, { orientation: "horizontal" }),
|
|
742
|
+
i.map((l) => {
|
|
743
|
+
const u = e[r] === l.id;
|
|
744
|
+
return /* @__PURE__ */ d(
|
|
745
|
+
xn,
|
|
746
|
+
{
|
|
747
|
+
icon: l.icon,
|
|
748
|
+
label: l.title,
|
|
749
|
+
active: u,
|
|
750
|
+
accented: u && o,
|
|
751
|
+
onClick: () => s(l.id),
|
|
752
|
+
className: "pnl-rail__button"
|
|
753
|
+
},
|
|
754
|
+
l.id
|
|
755
|
+
);
|
|
756
|
+
})
|
|
757
|
+
] }, `${n}:${r}`)) });
|
|
758
|
+
}
|
|
759
|
+
function dt(n) {
|
|
760
|
+
const t = [], e = /* @__PURE__ */ new Map(), o = [];
|
|
761
|
+
let s = null;
|
|
762
|
+
for (const r of Cn.toArray(n)) {
|
|
763
|
+
if (!En(r)) {
|
|
764
|
+
o.push(r);
|
|
765
|
+
continue;
|
|
766
|
+
}
|
|
767
|
+
if (r.type === Q) {
|
|
768
|
+
s = r;
|
|
769
|
+
continue;
|
|
770
|
+
}
|
|
771
|
+
if (r.type !== nn) {
|
|
772
|
+
o.push(r);
|
|
773
|
+
continue;
|
|
774
|
+
}
|
|
775
|
+
const i = r.props, { id: c, zone: l, slot: u = "primary", title: a, icon: f, opens: p, solo: g, actions: b, children: P } = i;
|
|
776
|
+
t.push({ id: c, zone: l, slot: u, title: a, icon: f, opens: p, solo: g }), e.set(c, { content: P, actions: b });
|
|
777
|
+
}
|
|
778
|
+
return { specs: t, content: e, centre: s, loose: o };
|
|
779
|
+
}
|
|
780
|
+
function zn({
|
|
781
|
+
header: n,
|
|
782
|
+
footer: t,
|
|
783
|
+
railHeader: e,
|
|
784
|
+
labels: o,
|
|
785
|
+
theme: s,
|
|
786
|
+
className: r,
|
|
787
|
+
children: i,
|
|
788
|
+
...c
|
|
789
|
+
}) {
|
|
790
|
+
return /* @__PURE__ */ d(Xn, { ...c, children: /* @__PURE__ */ d(
|
|
791
|
+
ft,
|
|
792
|
+
{
|
|
793
|
+
header: n,
|
|
794
|
+
footer: t,
|
|
795
|
+
railHeader: e,
|
|
796
|
+
labels: o,
|
|
797
|
+
theme: s,
|
|
798
|
+
className: r,
|
|
799
|
+
children: i
|
|
800
|
+
}
|
|
801
|
+
) });
|
|
802
|
+
}
|
|
803
|
+
function ft({
|
|
804
|
+
header: n,
|
|
805
|
+
footer: t,
|
|
806
|
+
railHeader: e,
|
|
807
|
+
labels: o,
|
|
808
|
+
theme: s,
|
|
809
|
+
className: r,
|
|
810
|
+
children: i
|
|
811
|
+
}) {
|
|
812
|
+
const c = L(), l = j(null);
|
|
813
|
+
Kn(l);
|
|
814
|
+
const { specs: u, content: a, centre: f, loose: p } = w(() => dt(i), [i]), g = w(() => ({ ...ut, ...o }), [o]);
|
|
815
|
+
wn(() => {
|
|
816
|
+
const { register: P, unregister: h } = c.getState();
|
|
817
|
+
for (const _ of u) P(_);
|
|
818
|
+
const y = new Set(u.map((_) => _.id));
|
|
819
|
+
for (const _ of c.getState().registry)
|
|
820
|
+
y.has(_.id) || h(_.id);
|
|
821
|
+
}, [c, u]);
|
|
822
|
+
const b = Qn();
|
|
823
|
+
return /* @__PURE__ */ d(ot, { value: a, children: /* @__PURE__ */ m("div", { "data-pnl-theme": s, className: v("pnl-root", r), children: [
|
|
824
|
+
n,
|
|
825
|
+
/* @__PURE__ */ m("div", { className: "pnl-middle", children: [
|
|
826
|
+
/* @__PURE__ */ d(un, { side: "left", header: e }),
|
|
827
|
+
/* @__PURE__ */ m("div", { ref: l, className: "pnl-columns", children: [
|
|
828
|
+
/* @__PURE__ */ d(x, { zone: "top", labels: g }),
|
|
829
|
+
/* @__PURE__ */ m("div", { className: "pnl-row", children: [
|
|
830
|
+
!b.left && /* @__PURE__ */ d(x, { zone: "left", labels: g }),
|
|
831
|
+
/* @__PURE__ */ m("div", { className: "pnl-stack", children: [
|
|
832
|
+
/* @__PURE__ */ m("div", { className: "pnl-row", children: [
|
|
833
|
+
b.left && /* @__PURE__ */ d(x, { zone: "left", labels: g }),
|
|
834
|
+
/* @__PURE__ */ d(_n, { className: "pnl-centre", children: f?.props.children }),
|
|
835
|
+
b.right && /* @__PURE__ */ d(x, { zone: "right", labels: g })
|
|
836
|
+
] }),
|
|
837
|
+
/* @__PURE__ */ d(at, { left: b.left, right: b.right, labels: g })
|
|
838
|
+
] }),
|
|
839
|
+
!b.right && /* @__PURE__ */ d(x, { zone: "right", labels: g })
|
|
840
|
+
] })
|
|
841
|
+
] }),
|
|
842
|
+
/* @__PURE__ */ d(un, { side: "right" })
|
|
843
|
+
] }),
|
|
844
|
+
t,
|
|
845
|
+
p
|
|
846
|
+
] }) });
|
|
847
|
+
}
|
|
848
|
+
zn.Panel = nn;
|
|
849
|
+
zn.Center = Q;
|
|
850
|
+
function bt() {
|
|
851
|
+
const n = L(), t = T(), e = S((i) => i.focusedZone), o = O(), s = z(
|
|
852
|
+
(i) => {
|
|
853
|
+
const c = N(t.registry, i);
|
|
854
|
+
return c !== void 0 && Z(t, c.zone)[c.slot] === i;
|
|
855
|
+
},
|
|
856
|
+
[t]
|
|
857
|
+
), r = z(
|
|
858
|
+
(i) => {
|
|
859
|
+
const c = N(t.registry, i);
|
|
860
|
+
!c || Z(t, c.zone)[c.slot] !== i || n.getState().close(c.zone, c.slot);
|
|
861
|
+
},
|
|
862
|
+
[t, n]
|
|
863
|
+
);
|
|
864
|
+
return w(
|
|
865
|
+
() => ({
|
|
866
|
+
panels: t.registry,
|
|
867
|
+
reveal: o.show,
|
|
868
|
+
close: r,
|
|
869
|
+
toggle: o.toggle,
|
|
870
|
+
isShown: s,
|
|
871
|
+
focusedZone: e,
|
|
872
|
+
reset: o.reset
|
|
873
|
+
}),
|
|
874
|
+
[t, o.show, o.toggle, o.reset, r, s, e]
|
|
875
|
+
);
|
|
876
|
+
}
|
|
877
|
+
export {
|
|
878
|
+
kn as BOTTOM_ZONES,
|
|
879
|
+
at as Band,
|
|
880
|
+
Q as Center,
|
|
881
|
+
ot as ContentProvider,
|
|
882
|
+
ut as DEFAULT_LABELS,
|
|
883
|
+
Bn as DEFAULT_SIZES,
|
|
884
|
+
xn as IconButton,
|
|
885
|
+
Sn as LAYOUT_VERSION,
|
|
886
|
+
gn as MIN_CENTER,
|
|
887
|
+
F as MIN_SIZE,
|
|
888
|
+
R as MIN_SPLIT,
|
|
889
|
+
nn as Panel,
|
|
890
|
+
an as PanelFrame,
|
|
891
|
+
st as PanelHeader,
|
|
892
|
+
zn as Panels,
|
|
893
|
+
Xn as PanelsProvider,
|
|
894
|
+
un as Rail,
|
|
895
|
+
dn as RailZone,
|
|
896
|
+
X as ResizeHandle,
|
|
897
|
+
$ as SLOTS,
|
|
898
|
+
q as Separator,
|
|
899
|
+
_n as Surface,
|
|
900
|
+
C as ZONES,
|
|
901
|
+
V as ZONES_BY_SIDE,
|
|
902
|
+
x as ZoneEdge,
|
|
903
|
+
Vn as browserStorage,
|
|
904
|
+
$n as createPanelsStore,
|
|
905
|
+
v as cx,
|
|
906
|
+
D as fitSplit,
|
|
907
|
+
yn as fitZoneSize,
|
|
908
|
+
U as isBottom,
|
|
909
|
+
E as isHorizontal,
|
|
910
|
+
on as isLeading,
|
|
911
|
+
mt as memoryStorage,
|
|
912
|
+
Gn as readLayout,
|
|
913
|
+
Dn as sharedSizes,
|
|
914
|
+
Z as shownIn,
|
|
915
|
+
A as sizeKeyOf,
|
|
916
|
+
N as specOf,
|
|
917
|
+
G as undraggedSizeOf,
|
|
918
|
+
T as useArrangement,
|
|
919
|
+
Qn as useBandHalves,
|
|
920
|
+
Kn as useContainerFit,
|
|
921
|
+
rt as usePanelContent,
|
|
922
|
+
bt as usePanels,
|
|
923
|
+
O as usePanelsActions,
|
|
924
|
+
S as usePanelsState,
|
|
925
|
+
L as usePanelsStore,
|
|
926
|
+
nt as usePointerDrag,
|
|
927
|
+
J as useShownIn,
|
|
928
|
+
tt as useZone,
|
|
929
|
+
cn as useZoneDraws,
|
|
930
|
+
et as useZonePanels,
|
|
931
|
+
qn as useZoneTakesRoom,
|
|
932
|
+
Jn as writeLayout,
|
|
933
|
+
W as zoneDraws,
|
|
934
|
+
jn as zoneTakesRoom
|
|
935
|
+
};
|