@humain/ui 2.2.2 → 2.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/templates/AppShell/AppShell.d.ts +4 -2
- package/dist/components/templates/AppShell/index.d.ts +1 -1
- package/dist/components/templates/AppSidebar/AppSidebar.constants.d.ts +4 -0
- package/dist/components/templates/AppSidebar/AppSidebar.d.ts +1 -0
- package/dist/index.js +19 -18
- package/dist/index217.js +6 -24
- package/dist/index217.js.map +1 -1
- package/dist/index218.js +20 -23
- package/dist/index218.js.map +1 -1
- package/dist/index219.js +20 -95
- package/dist/index219.js.map +1 -1
- package/dist/index220.js +92 -88
- package/dist/index220.js.map +1 -1
- package/dist/index221.js +97 -29
- package/dist/index221.js.map +1 -1
- package/dist/index222.js +24 -470
- package/dist/index222.js.map +1 -1
- package/dist/index223.js +450 -196
- package/dist/index223.js.map +1 -1
- package/dist/index224.js +199 -754
- package/dist/index224.js.map +1 -1
- package/dist/index225.js +777 -61
- package/dist/index225.js.map +1 -1
- package/dist/index226.js +58 -181
- package/dist/index226.js.map +1 -1
- package/dist/index227.js +175 -259
- package/dist/index227.js.map +1 -1
- package/dist/index228.js +246 -172
- package/dist/index228.js.map +1 -1
- package/dist/index229.js +195 -32
- package/dist/index229.js.map +1 -1
- package/dist/index230.js +12 -40
- package/dist/index230.js.map +1 -1
- package/dist/index231.js +23 -26
- package/dist/index231.js.map +1 -1
- package/dist/index232.js +45 -22
- package/dist/index232.js.map +1 -1
- package/dist/index233.js +27 -48
- package/dist/index233.js.map +1 -1
- package/dist/index234.js +52 -26
- package/dist/index234.js.map +1 -1
- package/dist/index235.js +40 -225
- package/dist/index235.js.map +1 -1
- package/dist/index236.js +217 -39
- package/dist/index236.js.map +1 -1
- package/dist/index237.js +50 -0
- package/dist/index237.js.map +1 -0
- package/dist/styles.css +1 -1
- package/dist/wc/{sidebar.js → AppSidebar.constants.js} +80 -78
- package/dist/wc/AppSidebar.constants.js.map +1 -0
- package/dist/wc/hf-app-shell.js +346 -343
- package/dist/wc/hf-app-shell.js.map +1 -1
- package/dist/wc/hf-app-sidebar.js +65 -62
- package/dist/wc/hf-app-sidebar.js.map +1 -1
- package/dist/wc-react/{sidebar.js → AppSidebar.constants.js} +89 -87
- package/dist/wc-react/AppSidebar.constants.js.map +1 -0
- package/dist/wc-react/hf-app-shell.js +383 -380
- package/dist/wc-react/hf-app-shell.js.map +1 -1
- package/dist/wc-react/hf-app-sidebar.js +69 -66
- package/dist/wc-react/hf-app-sidebar.js.map +1 -1
- package/package.json +1 -1
- package/skills/humain-ui/SKILL.md +1 -1
- package/skills/humain-ui-wc/SKILL.md +1 -1
- package/skills/humain-ui-wc.skill +0 -0
- package/skills/humain-ui.skill +0 -0
- package/dist/wc/sidebar.js.map +0 -1
- package/dist/wc-react/sidebar.js.map +0 -1
package/dist/wc/hf-app-shell.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { a as
|
|
2
|
-
import { i as
|
|
3
|
-
import { n as
|
|
4
|
-
import { i as
|
|
1
|
+
import { a as Sn } from "./rolldown-runtime.js";
|
|
2
|
+
import { i as zn, t as wn } from "./vendor/react.js";
|
|
3
|
+
import { n as Y } from "./utils.js";
|
|
4
|
+
import { i as Cn, l as dt, o as Pn, t as Ln, u as Rn } from "./_shared.js";
|
|
5
5
|
import { t as jt } from "./createLucideIcon.js";
|
|
6
|
-
import {
|
|
7
|
-
import { a as
|
|
8
|
-
var
|
|
6
|
+
import { b as En, n as kn, o as Mn, t as ct, x as Dn, y as In } from "./AppSidebar.constants.js";
|
|
7
|
+
import { a as Tt, i as An, n as pt, r as Nn, t as jn } from "./AppShellContent.js";
|
|
8
|
+
var Tn = [["path", {
|
|
9
9
|
d: "m9 7-5 5 5 5",
|
|
10
10
|
key: "j5w590"
|
|
11
11
|
}], ["path", {
|
|
12
12
|
d: "m15 7 5 5-5 5",
|
|
13
13
|
key: "1bl6da"
|
|
14
|
-
}]],
|
|
14
|
+
}]], On = jt("chevrons-left-right", Tn), Fn = [
|
|
15
15
|
["path", {
|
|
16
16
|
d: "M4 5h16",
|
|
17
17
|
key: "1tepv9"
|
|
@@ -24,22 +24,22 @@ var jn = [["path", {
|
|
|
24
24
|
d: "M4 19h16",
|
|
25
25
|
key: "1djgab"
|
|
26
26
|
}]
|
|
27
|
-
],
|
|
28
|
-
function
|
|
27
|
+
], _n = jt("menu", Fn), C = wn(), v = /* @__PURE__ */ Sn(zn(), 1);
|
|
28
|
+
function $n(e, t) {
|
|
29
29
|
const n = getComputedStyle(e);
|
|
30
30
|
return t * parseFloat(n.fontSize);
|
|
31
31
|
}
|
|
32
|
-
function
|
|
32
|
+
function Bn(e, t) {
|
|
33
33
|
const n = getComputedStyle(e.ownerDocument.documentElement);
|
|
34
34
|
return t * parseFloat(n.fontSize);
|
|
35
35
|
}
|
|
36
|
-
function
|
|
36
|
+
function Wn(e) {
|
|
37
37
|
return e / 100 * window.innerHeight;
|
|
38
38
|
}
|
|
39
|
-
function
|
|
39
|
+
function Gn(e) {
|
|
40
40
|
return e / 100 * window.innerWidth;
|
|
41
41
|
}
|
|
42
|
-
function
|
|
42
|
+
function Hn(e) {
|
|
43
43
|
switch (typeof e) {
|
|
44
44
|
case "number":
|
|
45
45
|
return [e, "px"];
|
|
@@ -51,7 +51,7 @@ function Gn(e) {
|
|
|
51
51
|
}
|
|
52
52
|
function Se({ groupSize: e, panelElement: t, styleProp: n }) {
|
|
53
53
|
let r;
|
|
54
|
-
const [a, o] =
|
|
54
|
+
const [a, o] = Hn(n);
|
|
55
55
|
switch (o) {
|
|
56
56
|
case "%":
|
|
57
57
|
r = a / 100 * e;
|
|
@@ -60,16 +60,16 @@ function Se({ groupSize: e, panelElement: t, styleProp: n }) {
|
|
|
60
60
|
r = a;
|
|
61
61
|
break;
|
|
62
62
|
case "rem":
|
|
63
|
-
r =
|
|
63
|
+
r = Bn(t, a);
|
|
64
64
|
break;
|
|
65
65
|
case "em":
|
|
66
|
-
r =
|
|
66
|
+
r = $n(t, a);
|
|
67
67
|
break;
|
|
68
68
|
case "vh":
|
|
69
|
-
r =
|
|
69
|
+
r = Wn(a);
|
|
70
70
|
break;
|
|
71
71
|
case "vw":
|
|
72
|
-
r =
|
|
72
|
+
r = Gn(a);
|
|
73
73
|
break;
|
|
74
74
|
}
|
|
75
75
|
return r;
|
|
@@ -133,43 +133,43 @@ function D(e, t = "Assertion error") {
|
|
|
133
133
|
if (!e) throw Error(t);
|
|
134
134
|
}
|
|
135
135
|
function Oe(e, t) {
|
|
136
|
-
return Array.from(t).sort(e === "horizontal" ?
|
|
136
|
+
return Array.from(t).sort(e === "horizontal" ? Vn : Un);
|
|
137
137
|
}
|
|
138
|
-
function
|
|
138
|
+
function Vn(e, t) {
|
|
139
139
|
const n = e.element.offsetLeft - t.element.offsetLeft;
|
|
140
140
|
return n !== 0 ? n : e.element.offsetWidth - t.element.offsetWidth;
|
|
141
141
|
}
|
|
142
|
-
function
|
|
142
|
+
function Un(e, t) {
|
|
143
143
|
const n = e.element.offsetTop - t.element.offsetTop;
|
|
144
144
|
return n !== 0 ? n : e.element.offsetHeight - t.element.offsetHeight;
|
|
145
145
|
}
|
|
146
|
-
function
|
|
146
|
+
function Ot(e) {
|
|
147
147
|
return e !== null && typeof e == "object" && "nodeType" in e && e.nodeType === Node.ELEMENT_NODE;
|
|
148
148
|
}
|
|
149
|
-
function
|
|
149
|
+
function Ft(e, t) {
|
|
150
150
|
return {
|
|
151
151
|
x: e.x >= t.left && e.x <= t.right ? 0 : Math.min(Math.abs(e.x - t.left), Math.abs(e.x - t.right)),
|
|
152
152
|
y: e.y >= t.top && e.y <= t.bottom ? 0 : Math.min(Math.abs(e.y - t.top), Math.abs(e.y - t.bottom))
|
|
153
153
|
};
|
|
154
154
|
}
|
|
155
|
-
function
|
|
155
|
+
function qn({ orientation: e, rects: t, targetRect: n }) {
|
|
156
156
|
const r = {
|
|
157
157
|
x: n.x + n.width / 2,
|
|
158
158
|
y: n.y + n.height / 2
|
|
159
159
|
};
|
|
160
160
|
let a, o = Number.MAX_VALUE;
|
|
161
161
|
for (const c of t) {
|
|
162
|
-
const { x: i, y: s } =
|
|
162
|
+
const { x: i, y: s } = Ft(r, c), d = e === "horizontal" ? i : s;
|
|
163
163
|
d < o && (o = d, a = c);
|
|
164
164
|
}
|
|
165
165
|
return D(a, "No rect found"), a;
|
|
166
166
|
}
|
|
167
167
|
var ke;
|
|
168
|
-
function
|
|
168
|
+
function Xn() {
|
|
169
169
|
return ke === void 0 && (typeof matchMedia == "function" ? ke = !!matchMedia("(pointer:coarse)").matches : ke = !1), ke;
|
|
170
170
|
}
|
|
171
|
-
function
|
|
172
|
-
const { element: t, orientation: n, panels: r, separators: a } = e, o = Oe(n, Array.from(t.children).filter(
|
|
171
|
+
function _t(e) {
|
|
172
|
+
const { element: t, orientation: n, panels: r, separators: a } = e, o = Oe(n, Array.from(t.children).filter(Ot).map((h) => ({ element: h }))).map(({ element: h }) => h), c = [];
|
|
173
173
|
let i = !1, s = !1, d = -1, l = -1, u = 0, m, f = [];
|
|
174
174
|
{
|
|
175
175
|
let h = -1;
|
|
@@ -192,7 +192,7 @@ function Ft(e) {
|
|
|
192
192
|
break;
|
|
193
193
|
case 1: {
|
|
194
194
|
const k = f[0];
|
|
195
|
-
z = [k,
|
|
195
|
+
z = [k, qn({
|
|
196
196
|
orientation: n,
|
|
197
197
|
rects: [g, y],
|
|
198
198
|
targetRect: k.element.getBoundingClientRect()
|
|
@@ -206,14 +206,14 @@ function Ft(e) {
|
|
|
206
206
|
} else f.length ? z = f : z = [n === "horizontal" ? new DOMRect(g.right, y.top, y.left - g.right, y.height) : new DOMRect(y.left, g.bottom, y.width, y.top - g.bottom)];
|
|
207
207
|
for (const w of z) {
|
|
208
208
|
let S = "width" in w ? w : w.element.getBoundingClientRect();
|
|
209
|
-
const k =
|
|
209
|
+
const k = Xn() ? e.resizeTargetMinimumSize.coarse : e.resizeTargetMinimumSize.fine;
|
|
210
210
|
if (S.width < k) {
|
|
211
|
-
const
|
|
212
|
-
S = new DOMRect(S.x -
|
|
211
|
+
const N = k - S.width;
|
|
212
|
+
S = new DOMRect(S.x - N / 2, S.y, S.width + N, S.height);
|
|
213
213
|
}
|
|
214
214
|
if (S.height < k) {
|
|
215
|
-
const
|
|
216
|
-
S = new DOMRect(S.x, S.y -
|
|
215
|
+
const N = k - S.height;
|
|
216
|
+
S = new DOMRect(S.x, S.y - N / 2, S.width, S.height + N);
|
|
217
217
|
}
|
|
218
218
|
!i && !(h <= d || h > l) && c.push({
|
|
219
219
|
group: e,
|
|
@@ -272,33 +272,33 @@ var $t = class {
|
|
|
272
272
|
}, ve = {
|
|
273
273
|
cursorFlags: 0,
|
|
274
274
|
state: "inactive"
|
|
275
|
-
},
|
|
275
|
+
}, Ge = new $t();
|
|
276
276
|
function se() {
|
|
277
277
|
return ve;
|
|
278
278
|
}
|
|
279
|
-
function qn(e) {
|
|
280
|
-
return We.addListener("change", e);
|
|
281
|
-
}
|
|
282
279
|
function Yn(e) {
|
|
280
|
+
return Ge.addListener("change", e);
|
|
281
|
+
}
|
|
282
|
+
function Kn(e) {
|
|
283
283
|
const t = ve, n = { ...ve };
|
|
284
|
-
n.cursorFlags = e, ve = n,
|
|
284
|
+
n.cursorFlags = e, ve = n, Ge.emit("change", {
|
|
285
285
|
prev: t,
|
|
286
286
|
next: n
|
|
287
287
|
});
|
|
288
288
|
}
|
|
289
289
|
function be(e) {
|
|
290
290
|
const t = ve;
|
|
291
|
-
ve = e,
|
|
291
|
+
ve = e, Ge.emit("change", {
|
|
292
292
|
prev: t,
|
|
293
293
|
next: e
|
|
294
294
|
});
|
|
295
295
|
}
|
|
296
|
-
var
|
|
297
|
-
},
|
|
298
|
-
function
|
|
296
|
+
var Jn = (e) => e, Ne = () => {
|
|
297
|
+
}, Bt = 1, Wt = 2, Gt = 4, Ht = 8, ft = 3, ht = 12, Me;
|
|
298
|
+
function vt() {
|
|
299
299
|
return Me === void 0 && (Me = !1, typeof window < "u" && (window.navigator.userAgent.includes("Chrome") || window.navigator.userAgent.includes("Firefox")) && (Me = !0)), Me;
|
|
300
300
|
}
|
|
301
|
-
function
|
|
301
|
+
function Zn({ cursorFlags: e, groups: t, state: n }) {
|
|
302
302
|
let r = 0, a = 0;
|
|
303
303
|
switch (n) {
|
|
304
304
|
case "active":
|
|
@@ -317,8 +317,8 @@ function Kn({ cursorFlags: e, groups: t, state: n }) {
|
|
|
317
317
|
if (!(r === 0 && a === 0)) {
|
|
318
318
|
switch (n) {
|
|
319
319
|
case "active":
|
|
320
|
-
if (e &&
|
|
321
|
-
const o = (e &
|
|
320
|
+
if (e && vt()) {
|
|
321
|
+
const o = (e & Bt) !== 0, c = (e & Wt) !== 0, i = (e & Gt) !== 0, s = (e & Ht) !== 0;
|
|
322
322
|
if (o) return i ? "se-resize" : s ? "ne-resize" : "e-resize";
|
|
323
323
|
if (c) return i ? "sw-resize" : s ? "nw-resize" : "w-resize";
|
|
324
324
|
if (i) return "s-resize";
|
|
@@ -326,19 +326,19 @@ function Kn({ cursorFlags: e, groups: t, state: n }) {
|
|
|
326
326
|
}
|
|
327
327
|
break;
|
|
328
328
|
}
|
|
329
|
-
return
|
|
329
|
+
return vt() ? r > 0 && a > 0 ? "move" : r > 0 ? "ew-resize" : "ns-resize" : r > 0 && a > 0 ? "grab" : r > 0 ? "col-resize" : "row-resize";
|
|
330
330
|
}
|
|
331
331
|
}
|
|
332
|
-
var
|
|
332
|
+
var bt = /* @__PURE__ */ new WeakMap();
|
|
333
333
|
function He(e) {
|
|
334
334
|
if (e.defaultView === null || e.defaultView === void 0) return;
|
|
335
|
-
let { prevStyle: t, styleSheet: n } =
|
|
335
|
+
let { prevStyle: t, styleSheet: n } = bt.get(e) ?? {};
|
|
336
336
|
n === void 0 && (n = new e.defaultView.CSSStyleSheet(), e.adoptedStyleSheets && (Object.isExtensible(e.adoptedStyleSheets) ? e.adoptedStyleSheets.push(n) : e.adoptedStyleSheets = [...e.adoptedStyleSheets, n]));
|
|
337
337
|
const r = se();
|
|
338
338
|
switch (r.state) {
|
|
339
339
|
case "active":
|
|
340
340
|
case "hover": {
|
|
341
|
-
const a =
|
|
341
|
+
const a = Zn({
|
|
342
342
|
cursorFlags: r.cursorFlags,
|
|
343
343
|
groups: r.hitRegions.map((c) => c.group),
|
|
344
344
|
state: r.state
|
|
@@ -351,16 +351,16 @@ function He(e) {
|
|
|
351
351
|
t = void 0, n.cssRules.length === 1 && n.deleteRule(0);
|
|
352
352
|
break;
|
|
353
353
|
}
|
|
354
|
-
|
|
354
|
+
bt.set(e, {
|
|
355
355
|
prevStyle: t,
|
|
356
356
|
styleSheet: n
|
|
357
357
|
});
|
|
358
358
|
}
|
|
359
|
-
var Z = /* @__PURE__ */ new Map(),
|
|
360
|
-
function
|
|
359
|
+
var Z = /* @__PURE__ */ new Map(), Vt = new $t();
|
|
360
|
+
function Qn(e) {
|
|
361
361
|
Z = new Map(Z), Z.delete(e);
|
|
362
362
|
}
|
|
363
|
-
function
|
|
363
|
+
function gt(e, t) {
|
|
364
364
|
for (const [n] of Z) if (n.id === e) return n;
|
|
365
365
|
}
|
|
366
366
|
function ae(e, t) {
|
|
@@ -371,20 +371,20 @@ function de() {
|
|
|
371
371
|
return Z;
|
|
372
372
|
}
|
|
373
373
|
function Ve(e, t) {
|
|
374
|
-
return
|
|
374
|
+
return Vt.addListener("groupChange", (n) => {
|
|
375
375
|
n.group.id === e && t(n);
|
|
376
376
|
});
|
|
377
377
|
}
|
|
378
378
|
function ne(e, t, n) {
|
|
379
379
|
const r = Z.get(e);
|
|
380
|
-
Z = new Map(Z), Z.set(e, t),
|
|
380
|
+
Z = new Map(Z), Z.set(e, t), Vt.emit("groupChange", {
|
|
381
381
|
group: e,
|
|
382
382
|
isUserInteraction: n?.isUserInteraction === !0,
|
|
383
383
|
prev: r,
|
|
384
384
|
next: t
|
|
385
385
|
});
|
|
386
386
|
}
|
|
387
|
-
function
|
|
387
|
+
function Ut(e) {
|
|
388
388
|
const t = se();
|
|
389
389
|
let n = !1;
|
|
390
390
|
return t.state === "active" && (be({
|
|
@@ -395,16 +395,16 @@ function Vt(e) {
|
|
|
395
395
|
ne(r.group, a, { isUserInteraction: !0 });
|
|
396
396
|
}))), n;
|
|
397
397
|
}
|
|
398
|
-
function
|
|
399
|
-
e.defaultPrevented ||
|
|
398
|
+
function mt(e) {
|
|
399
|
+
e.defaultPrevented || Ut(e.currentTarget);
|
|
400
400
|
}
|
|
401
|
-
function
|
|
401
|
+
function er(e, t, n) {
|
|
402
402
|
let r, a = {
|
|
403
403
|
x: 1 / 0,
|
|
404
404
|
y: 1 / 0
|
|
405
405
|
};
|
|
406
406
|
for (const o of t) {
|
|
407
|
-
const c =
|
|
407
|
+
const c = Ft(n, o.rect);
|
|
408
408
|
switch (e) {
|
|
409
409
|
case "horizontal":
|
|
410
410
|
c.x <= a.x && (r = o, a = c);
|
|
@@ -419,21 +419,21 @@ function Zn(e, t, n) {
|
|
|
419
419
|
hitRegion: r
|
|
420
420
|
} : void 0;
|
|
421
421
|
}
|
|
422
|
-
function
|
|
422
|
+
function tr(e) {
|
|
423
423
|
return e !== null && typeof e == "object" && "nodeType" in e && e.nodeType === Node.DOCUMENT_FRAGMENT_NODE;
|
|
424
424
|
}
|
|
425
|
-
function
|
|
425
|
+
function nr(e, t) {
|
|
426
426
|
if (e === t) throw new Error("Cannot compare node with itself");
|
|
427
427
|
const n = {
|
|
428
|
-
a:
|
|
429
|
-
b:
|
|
428
|
+
a: St(e),
|
|
429
|
+
b: St(t)
|
|
430
430
|
};
|
|
431
431
|
let r;
|
|
432
432
|
for (; n.a.at(-1) === n.b.at(-1); ) r = n.a.pop(), n.b.pop();
|
|
433
433
|
D(r, "Stacking order can only be calculated for elements with a common ancestor");
|
|
434
434
|
const a = {
|
|
435
|
-
a: yt(
|
|
436
|
-
b: yt(
|
|
435
|
+
a: xt(yt(n.a)),
|
|
436
|
+
b: xt(yt(n.b))
|
|
437
437
|
};
|
|
438
438
|
if (a.a === a.b) {
|
|
439
439
|
const o = r.childNodes, c = {
|
|
@@ -449,45 +449,45 @@ function er(e, t) {
|
|
|
449
449
|
}
|
|
450
450
|
return Math.sign(a.a - a.b);
|
|
451
451
|
}
|
|
452
|
-
var
|
|
453
|
-
function
|
|
454
|
-
const t = getComputedStyle(
|
|
452
|
+
var rr = /\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;
|
|
453
|
+
function ar(e) {
|
|
454
|
+
const t = getComputedStyle(qt(e) ?? e).display;
|
|
455
455
|
return t === "flex" || t === "inline-flex";
|
|
456
456
|
}
|
|
457
|
-
function
|
|
457
|
+
function or(e) {
|
|
458
458
|
const t = getComputedStyle(e);
|
|
459
|
-
return !!(t.position === "fixed" || t.zIndex !== "auto" && (t.position !== "static" ||
|
|
459
|
+
return !!(t.position === "fixed" || t.zIndex !== "auto" && (t.position !== "static" || ar(e)) || +t.opacity < 1 || "transform" in t && t.transform !== "none" || "webkitTransform" in t && t.webkitTransform !== "none" || "mixBlendMode" in t && t.mixBlendMode !== "normal" || "filter" in t && t.filter !== "none" || "webkitFilter" in t && t.webkitFilter !== "none" || "isolation" in t && t.isolation === "isolate" || rr.test(t.willChange) || t.webkitOverflowScrolling === "touch");
|
|
460
460
|
}
|
|
461
|
-
function
|
|
461
|
+
function yt(e) {
|
|
462
462
|
let t = e.length;
|
|
463
463
|
for (; t--; ) {
|
|
464
464
|
const n = e[t];
|
|
465
|
-
if (D(n, "Missing node"),
|
|
465
|
+
if (D(n, "Missing node"), or(n)) return n;
|
|
466
466
|
}
|
|
467
467
|
return null;
|
|
468
468
|
}
|
|
469
|
-
function
|
|
469
|
+
function xt(e) {
|
|
470
470
|
return e && Number(getComputedStyle(e).zIndex) || 0;
|
|
471
471
|
}
|
|
472
|
-
function
|
|
472
|
+
function St(e) {
|
|
473
473
|
const t = [];
|
|
474
|
-
for (; e; ) t.push(e), e =
|
|
474
|
+
for (; e; ) t.push(e), e = qt(e);
|
|
475
475
|
return t;
|
|
476
476
|
}
|
|
477
|
-
function
|
|
477
|
+
function qt(e) {
|
|
478
478
|
const { parentNode: t } = e;
|
|
479
|
-
return
|
|
479
|
+
return tr(t) ? t.host : t;
|
|
480
480
|
}
|
|
481
|
-
function
|
|
481
|
+
function ir(e, t) {
|
|
482
482
|
return e.x < t.x + t.width && e.x + e.width > t.x && e.y < t.y + t.height && e.y + e.height > t.y;
|
|
483
483
|
}
|
|
484
|
-
function
|
|
485
|
-
if (!
|
|
486
|
-
if (
|
|
484
|
+
function sr({ groupElement: e, hitRegion: t, pointerEventTarget: n }) {
|
|
485
|
+
if (!Ot(n) || n.contains(e) || e.contains(n)) return !0;
|
|
486
|
+
if (nr(n, e) > 0) {
|
|
487
487
|
let r = n;
|
|
488
488
|
for (; r; ) {
|
|
489
489
|
if (r.contains(e)) return !0;
|
|
490
|
-
if (
|
|
490
|
+
if (ir(r.getBoundingClientRect(), t)) return !1;
|
|
491
491
|
r = r.parentElement;
|
|
492
492
|
}
|
|
493
493
|
}
|
|
@@ -497,18 +497,18 @@ function Ue(e, t) {
|
|
|
497
497
|
const n = [];
|
|
498
498
|
return t.forEach((r, a) => {
|
|
499
499
|
if (a.disabled) return;
|
|
500
|
-
const o =
|
|
500
|
+
const o = _t(a), c = er(a.orientation, o, {
|
|
501
501
|
x: e.clientX,
|
|
502
502
|
y: e.clientY
|
|
503
503
|
});
|
|
504
|
-
c && c.distance.x <= 0 && c.distance.y <= 0 &&
|
|
504
|
+
c && c.distance.x <= 0 && c.distance.y <= 0 && sr({
|
|
505
505
|
groupElement: a.element,
|
|
506
506
|
hitRegion: c.hitRegion.rect,
|
|
507
507
|
pointerEventTarget: e.target
|
|
508
508
|
}) && n.push(c.hitRegion);
|
|
509
509
|
}), n;
|
|
510
510
|
}
|
|
511
|
-
function
|
|
511
|
+
function lr(e, t) {
|
|
512
512
|
if (e.length !== t.length) return !1;
|
|
513
513
|
for (let n = 0; n < e.length; n++) if (e[n] != t[n]) return !1;
|
|
514
514
|
return !0;
|
|
@@ -606,7 +606,7 @@ function we({ delta: e, initialLayout: t, panelConstraints: n, pivotIndices: r,
|
|
|
606
606
|
e < 0 ? h-- : h++;
|
|
607
607
|
}
|
|
608
608
|
}
|
|
609
|
-
if (
|
|
609
|
+
if (lr(s, d)) return a;
|
|
610
610
|
{
|
|
611
611
|
const h = e < 0 ? u : l, p = i[h];
|
|
612
612
|
D(p != null, `Previous layout not found for panel index ${h}`);
|
|
@@ -676,7 +676,7 @@ function ue({ layout: e, panelConstraints: t }) {
|
|
|
676
676
|
const c = Object.keys(e);
|
|
677
677
|
return r.reduce((i, s, d) => (i[c[d]] = s, i), {});
|
|
678
678
|
}
|
|
679
|
-
function
|
|
679
|
+
function Xt({ groupId: e, panelId: t }) {
|
|
680
680
|
const n = () => {
|
|
681
681
|
const s = de();
|
|
682
682
|
for (const [d, { defaultLayoutDeferred: l, derivedPanelConstraints: u, layout: m, groupSize: f, separatorToPanels: h }] of s) if (d.id === e) return {
|
|
@@ -772,12 +772,12 @@ function qt({ groupId: e, panelId: t }) {
|
|
|
772
772
|
}
|
|
773
773
|
};
|
|
774
774
|
}
|
|
775
|
-
function
|
|
775
|
+
function zt(e) {
|
|
776
776
|
e.defaultPrevented || Ue(e, de()).forEach((t) => {
|
|
777
777
|
if (t.separator && !t.separator.disableDoubleClick) {
|
|
778
778
|
const n = t.panels.find((r) => r.panelConstraints.defaultSize !== void 0);
|
|
779
779
|
if (n) {
|
|
780
|
-
const r = n.panelConstraints.defaultSize, a =
|
|
780
|
+
const r = n.panelConstraints.defaultSize, a = Xt({
|
|
781
781
|
groupId: t.group.id,
|
|
782
782
|
panelId: n.id
|
|
783
783
|
});
|
|
@@ -844,7 +844,7 @@ function ie(e, t) {
|
|
|
844
844
|
separatorToPanels: r.separatorToPanels
|
|
845
845
|
}, { isUserInteraction: !0 });
|
|
846
846
|
}
|
|
847
|
-
function
|
|
847
|
+
function wt(e) {
|
|
848
848
|
if (e.defaultPrevented) return;
|
|
849
849
|
const t = e.currentTarget, n = De(t);
|
|
850
850
|
if (!n.disabled) switch (e.key) {
|
|
@@ -887,7 +887,7 @@ function zt(e) {
|
|
|
887
887
|
break;
|
|
888
888
|
}
|
|
889
889
|
}
|
|
890
|
-
function
|
|
890
|
+
function Ct(e) {
|
|
891
891
|
if (e.defaultPrevented || e.pointerType === "mouse" && e.button > 0) return;
|
|
892
892
|
const t = de(), n = Ue(e, t), r = /* @__PURE__ */ new Map();
|
|
893
893
|
let a = !1;
|
|
@@ -909,7 +909,7 @@ function wt(e) {
|
|
|
909
909
|
state: "active"
|
|
910
910
|
}), n.length && e.preventDefault();
|
|
911
911
|
}
|
|
912
|
-
function
|
|
912
|
+
function Kt({ document: e, event: t, hitRegions: n, initialLayoutMap: r, mountedGroups: a, pointerDownAtPoint: o, prevCursorFlags: c }) {
|
|
913
913
|
let i = 0;
|
|
914
914
|
n.forEach((d) => {
|
|
915
915
|
const { group: l, groupSize: u } = d, { orientation: m, panels: f } = l, { disableCursor: h } = l.mutableState;
|
|
@@ -919,38 +919,38 @@ function Xt({ document: e, event: t, hitRegions: n, initialLayoutMap: r, mounted
|
|
|
919
919
|
if (!b || !g) return;
|
|
920
920
|
const { defaultLayoutDeferred: y, derivedPanelConstraints: z, groupSize: w, layout: S, separatorToPanels: k } = g;
|
|
921
921
|
if (z && S && k) {
|
|
922
|
-
const
|
|
922
|
+
const N = we({
|
|
923
923
|
delta: p,
|
|
924
924
|
initialLayout: b,
|
|
925
925
|
panelConstraints: z,
|
|
926
|
-
pivotIndices: d.panels.map((
|
|
926
|
+
pivotIndices: d.panels.map((j) => f.indexOf(j)),
|
|
927
927
|
prevLayout: S,
|
|
928
928
|
trigger: "mouse-or-touch"
|
|
929
929
|
});
|
|
930
|
-
if (le(
|
|
930
|
+
if (le(N, S)) {
|
|
931
931
|
if (p !== 0 && !h) switch (m) {
|
|
932
932
|
case "horizontal":
|
|
933
|
-
i |= p < 0 ?
|
|
933
|
+
i |= p < 0 ? Bt : Wt;
|
|
934
934
|
break;
|
|
935
935
|
case "vertical":
|
|
936
|
-
i |= p < 0 ? Gt :
|
|
936
|
+
i |= p < 0 ? Gt : Ht;
|
|
937
937
|
break;
|
|
938
938
|
}
|
|
939
939
|
} else ne(d.group, {
|
|
940
940
|
defaultLayoutDeferred: y,
|
|
941
941
|
derivedPanelConstraints: z,
|
|
942
942
|
groupSize: w,
|
|
943
|
-
layout:
|
|
943
|
+
layout: N,
|
|
944
944
|
separatorToPanels: k
|
|
945
945
|
});
|
|
946
946
|
}
|
|
947
947
|
});
|
|
948
948
|
let s = 0;
|
|
949
|
-
t.movementX === 0 ? s |= c &
|
|
949
|
+
t.movementX === 0 ? s |= c & ft : s |= i & ft, t.movementY === 0 ? s |= c & ht : s |= i & ht, Kn(s), He(e);
|
|
950
950
|
}
|
|
951
|
-
function
|
|
951
|
+
function Pt(e) {
|
|
952
952
|
const t = de(), n = se();
|
|
953
|
-
n.state === "active" &&
|
|
953
|
+
n.state === "active" && Kt({
|
|
954
954
|
document: e.currentTarget,
|
|
955
955
|
event: e,
|
|
956
956
|
hitRegions: n.hitRegions,
|
|
@@ -959,7 +959,7 @@ function Ct(e) {
|
|
|
959
959
|
prevCursorFlags: n.cursorFlags
|
|
960
960
|
});
|
|
961
961
|
}
|
|
962
|
-
function
|
|
962
|
+
function Lt(e) {
|
|
963
963
|
if (e.defaultPrevented) return;
|
|
964
964
|
const t = se(), n = de();
|
|
965
965
|
switch (t.state) {
|
|
@@ -978,7 +978,7 @@ function Pt(e) {
|
|
|
978
978
|
const { element: a } = r.separator;
|
|
979
979
|
a.hasPointerCapture?.(e.pointerId) || a.setPointerCapture?.(e.pointerId);
|
|
980
980
|
}
|
|
981
|
-
|
|
981
|
+
Kt({
|
|
982
982
|
document: e.currentTarget,
|
|
983
983
|
event: e,
|
|
984
984
|
hitRegions: t.hitRegions,
|
|
@@ -1002,16 +1002,16 @@ function Pt(e) {
|
|
|
1002
1002
|
}
|
|
1003
1003
|
}
|
|
1004
1004
|
}
|
|
1005
|
-
function
|
|
1005
|
+
function Rt(e) {
|
|
1006
1006
|
e.relatedTarget instanceof HTMLIFrameElement && se().state === "hover" && be({
|
|
1007
1007
|
cursorFlags: 0,
|
|
1008
1008
|
state: "inactive"
|
|
1009
1009
|
});
|
|
1010
1010
|
}
|
|
1011
|
-
function Rt(e) {
|
|
1012
|
-
e.defaultPrevented || e.pointerType === "mouse" && e.button > 0 || Vt(e.currentTarget) && e.preventDefault();
|
|
1013
|
-
}
|
|
1014
1011
|
function Et(e) {
|
|
1012
|
+
e.defaultPrevented || e.pointerType === "mouse" && e.button > 0 || Ut(e.currentTarget) && e.preventDefault();
|
|
1013
|
+
}
|
|
1014
|
+
function kt(e) {
|
|
1015
1015
|
let t = 0, n = 0;
|
|
1016
1016
|
const r = {};
|
|
1017
1017
|
for (const o of e) if (o.defaultSize !== void 0) {
|
|
@@ -1026,7 +1026,7 @@ function Et(e) {
|
|
|
1026
1026
|
}
|
|
1027
1027
|
return r;
|
|
1028
1028
|
}
|
|
1029
|
-
function
|
|
1029
|
+
function ur(e, t, n) {
|
|
1030
1030
|
if (!n[0]) return;
|
|
1031
1031
|
const r = e.panels.find((s) => s.element === t);
|
|
1032
1032
|
if (!r || !r.onResize) return;
|
|
@@ -1036,12 +1036,12 @@ function sr(e, t, n) {
|
|
|
1036
1036
|
};
|
|
1037
1037
|
r.mutableValues.prevSize = i, r.onResize(i, r.id, c);
|
|
1038
1038
|
}
|
|
1039
|
-
function
|
|
1039
|
+
function dr(e, t) {
|
|
1040
1040
|
if (Object.keys(e).length !== Object.keys(t).length) return !1;
|
|
1041
1041
|
for (const n in e) if (e[n] !== t[n]) return !1;
|
|
1042
1042
|
return !0;
|
|
1043
1043
|
}
|
|
1044
|
-
function
|
|
1044
|
+
function cr({ group: e, nextGroupSize: t, prevGroupSize: n, prevLayout: r }) {
|
|
1045
1045
|
if (n <= 0 || t <= 0 || n === t) return r;
|
|
1046
1046
|
let a = 0, o = 0, c = !1;
|
|
1047
1047
|
const i = /* @__PURE__ */ new Map(), s = [];
|
|
@@ -1065,14 +1065,14 @@ function ur({ group: e, nextGroupSize: t, prevGroupSize: n, prevLayout: r }) {
|
|
|
1065
1065
|
}
|
|
1066
1066
|
return l;
|
|
1067
1067
|
}
|
|
1068
|
-
function
|
|
1068
|
+
function pr(e, t) {
|
|
1069
1069
|
const n = e.map((a) => a.id), r = Object.keys(t);
|
|
1070
1070
|
if (n.length !== r.length) return !1;
|
|
1071
1071
|
for (const a of n) if (!r.includes(a)) return !1;
|
|
1072
1072
|
return !0;
|
|
1073
1073
|
}
|
|
1074
1074
|
var fe = /* @__PURE__ */ new Map();
|
|
1075
|
-
function
|
|
1075
|
+
function fr(e) {
|
|
1076
1076
|
let t = !0;
|
|
1077
1077
|
D(e.element.ownerDocument.defaultView, "Cannot register an unmounted Group");
|
|
1078
1078
|
const n = e.element.ownerDocument.defaultView.ResizeObserver, r = /* @__PURE__ */ new Set(), a = /* @__PURE__ */ new Set(), o = new n((f) => {
|
|
@@ -1084,8 +1084,8 @@ function cr(e) {
|
|
|
1084
1084
|
if (g === 0) return;
|
|
1085
1085
|
const y = ae(e.id);
|
|
1086
1086
|
if (!y) return;
|
|
1087
|
-
const z = Te(e), w = y.defaultLayoutDeferred ?
|
|
1088
|
-
layout:
|
|
1087
|
+
const z = Te(e), w = y.defaultLayoutDeferred ? kt(z) : y.layout, S = ue({
|
|
1088
|
+
layout: cr({
|
|
1089
1089
|
group: e,
|
|
1090
1090
|
nextGroupSize: g,
|
|
1091
1091
|
prevGroupSize: y.groupSize,
|
|
@@ -1093,7 +1093,7 @@ function cr(e) {
|
|
|
1093
1093
|
}),
|
|
1094
1094
|
panelConstraints: z
|
|
1095
1095
|
});
|
|
1096
|
-
if (!y.defaultLayoutDeferred && le(y.layout, S) &&
|
|
1096
|
+
if (!y.defaultLayoutDeferred && le(y.layout, S) && dr(y.derivedPanelConstraints, z) && y.groupSize === g) return;
|
|
1097
1097
|
ne(e, {
|
|
1098
1098
|
defaultLayoutDeferred: !1,
|
|
1099
1099
|
derivedPanelConstraints: z,
|
|
@@ -1102,7 +1102,7 @@ function cr(e) {
|
|
|
1102
1102
|
separatorToPanels: y.separatorToPanels
|
|
1103
1103
|
});
|
|
1104
1104
|
}
|
|
1105
|
-
} else
|
|
1105
|
+
} else ur(e, b, p);
|
|
1106
1106
|
}
|
|
1107
1107
|
});
|
|
1108
1108
|
o.observe(e.element), e.panels.forEach((f) => {
|
|
@@ -1110,14 +1110,14 @@ function cr(e) {
|
|
|
1110
1110
|
});
|
|
1111
1111
|
const c = ge({ group: e }), i = Te(e), s = e.panels.map(({ id: f }) => f).join(",");
|
|
1112
1112
|
let d = e.mutableState.defaultLayout;
|
|
1113
|
-
d && (
|
|
1113
|
+
d && (pr(e.panels, d) || (d = void 0));
|
|
1114
1114
|
const l = ue({
|
|
1115
|
-
layout: e.mutableState.layouts[s] ?? d ??
|
|
1115
|
+
layout: e.mutableState.layouts[s] ?? d ?? kt(i),
|
|
1116
1116
|
panelConstraints: i
|
|
1117
1117
|
}), u = e.element.ownerDocument;
|
|
1118
1118
|
fe.set(u, (fe.get(u) ?? 0) + 1);
|
|
1119
1119
|
const m = /* @__PURE__ */ new Map();
|
|
1120
|
-
return
|
|
1120
|
+
return _t(e).forEach((f) => {
|
|
1121
1121
|
f.separator && m.set(f.separator, f.panels);
|
|
1122
1122
|
}), ne(e, {
|
|
1123
1123
|
defaultLayoutDeferred: c === 0,
|
|
@@ -1126,14 +1126,14 @@ function cr(e) {
|
|
|
1126
1126
|
layout: l,
|
|
1127
1127
|
separatorToPanels: m
|
|
1128
1128
|
}), e.separators.forEach((f) => {
|
|
1129
|
-
D(!a.has(f.id), `Separator ids must be unique; id "${f.id}" was used more than once`), a.add(f.id), f.element.addEventListener("keydown",
|
|
1130
|
-
}), fe.get(u) === 1 && (u.addEventListener("contextmenu",
|
|
1131
|
-
t = !1, fe.set(u, Math.max(0, (fe.get(u) ?? 0) - 1)),
|
|
1132
|
-
f.element.removeEventListener("keydown",
|
|
1133
|
-
}), fe.get(u) || (u.removeEventListener("contextmenu",
|
|
1129
|
+
D(!a.has(f.id), `Separator ids must be unique; id "${f.id}" was used more than once`), a.add(f.id), f.element.addEventListener("keydown", wt);
|
|
1130
|
+
}), fe.get(u) === 1 && (u.addEventListener("contextmenu", mt, !0), u.addEventListener("dblclick", zt, !0), u.addEventListener("pointerdown", Ct, !0), u.addEventListener("pointerleave", Pt), u.addEventListener("pointermove", Lt), u.addEventListener("pointerout", Rt), u.addEventListener("pointerup", Et, !0)), function() {
|
|
1131
|
+
t = !1, fe.set(u, Math.max(0, (fe.get(u) ?? 0) - 1)), Qn(e), e.separators.forEach((f) => {
|
|
1132
|
+
f.element.removeEventListener("keydown", wt);
|
|
1133
|
+
}), fe.get(u) || (u.removeEventListener("contextmenu", mt, !0), u.removeEventListener("dblclick", zt, !0), u.removeEventListener("pointerdown", Ct, !0), u.removeEventListener("pointerleave", Pt), u.removeEventListener("pointermove", Lt), u.removeEventListener("pointerout", Rt), u.removeEventListener("pointerup", Et, !0)), o.disconnect();
|
|
1134
1134
|
};
|
|
1135
1135
|
}
|
|
1136
|
-
function
|
|
1136
|
+
function hr() {
|
|
1137
1137
|
const [e, t] = (0, v.useState)({});
|
|
1138
1138
|
return [e, (0, v.useCallback)(() => t({}), [])];
|
|
1139
1139
|
}
|
|
@@ -1148,7 +1148,7 @@ function ze(e) {
|
|
|
1148
1148
|
t.current = e;
|
|
1149
1149
|
}, [e]), (0, v.useCallback)((...n) => t.current?.(...n), [t]);
|
|
1150
1150
|
}
|
|
1151
|
-
function
|
|
1151
|
+
function Xe(...e) {
|
|
1152
1152
|
return ze((t) => {
|
|
1153
1153
|
e.forEach((n) => {
|
|
1154
1154
|
if (n) switch (typeof n) {
|
|
@@ -1162,23 +1162,23 @@ function Ye(...e) {
|
|
|
1162
1162
|
});
|
|
1163
1163
|
});
|
|
1164
1164
|
}
|
|
1165
|
-
function
|
|
1165
|
+
function Ye(e) {
|
|
1166
1166
|
const t = (0, v.useRef)({ ...e });
|
|
1167
1167
|
return ce(() => {
|
|
1168
1168
|
for (const n in e) t.current[n] = e[n];
|
|
1169
1169
|
}, [e]), t.current;
|
|
1170
1170
|
}
|
|
1171
|
-
var
|
|
1172
|
-
function
|
|
1171
|
+
var Jt = (0, v.createContext)(null);
|
|
1172
|
+
function vr(e, t) {
|
|
1173
1173
|
const n = (0, v.useRef)({
|
|
1174
1174
|
getLayout: () => ({}),
|
|
1175
|
-
setLayout:
|
|
1175
|
+
setLayout: Jn
|
|
1176
1176
|
});
|
|
1177
1177
|
(0, v.useImperativeHandle)(t, () => n.current, []), ce(() => {
|
|
1178
1178
|
Object.assign(n.current, Yt({ groupId: e }));
|
|
1179
1179
|
});
|
|
1180
1180
|
}
|
|
1181
|
-
function
|
|
1181
|
+
function Zt({ children: e, className: t, defaultLayout: n, disableCursor: r, disabled: a, elementRef: o, groupRef: c, id: i, onLayoutChange: s, onLayoutChanged: d, orientation: l = "horizontal", resizeTargetMinimumSize: u = {
|
|
1182
1182
|
coarse: 20,
|
|
1183
1183
|
fine: 10
|
|
1184
1184
|
}, style: m, ...f }) {
|
|
@@ -1189,32 +1189,32 @@ function Jt({ children: e, className: t, defaultLayout: n, disableCursor: r, dis
|
|
|
1189
1189
|
le(h.current.onLayoutChange, P) || (h.current.onLayoutChange = P, s?.(P));
|
|
1190
1190
|
}), b = ze((P, L) => {
|
|
1191
1191
|
le(h.current.onLayoutChanged, P) || (h.current.onLayoutChanged = P, d?.(P, { isUserInteraction: L }));
|
|
1192
|
-
}), g = qe(i), y = (0, v.useRef)(null), [z, w] =
|
|
1192
|
+
}), g = qe(i), y = (0, v.useRef)(null), [z, w] = hr(), S = (0, v.useRef)({
|
|
1193
1193
|
lastExpandedPanelSizes: {},
|
|
1194
1194
|
layouts: {},
|
|
1195
1195
|
panels: [],
|
|
1196
1196
|
resizeTargetMinimumSize: u,
|
|
1197
1197
|
separators: []
|
|
1198
|
-
}), k =
|
|
1199
|
-
|
|
1200
|
-
const
|
|
1201
|
-
const I = se(), R =
|
|
1202
|
-
if (
|
|
1203
|
-
let
|
|
1204
|
-
return I.state === "active" && (
|
|
1205
|
-
flexGrow:
|
|
1206
|
-
pointerEvents:
|
|
1198
|
+
}), k = Xe(y, o);
|
|
1199
|
+
vr(g, c);
|
|
1200
|
+
const N = ze((P, L) => {
|
|
1201
|
+
const I = se(), R = gt(P), A = ae(P);
|
|
1202
|
+
if (A) {
|
|
1203
|
+
let _ = !1;
|
|
1204
|
+
return I.state === "active" && (_ = I.hitRegions.some((oe) => oe.group === R)), {
|
|
1205
|
+
flexGrow: A.layout[L] ?? 1,
|
|
1206
|
+
pointerEvents: _ ? "none" : void 0
|
|
1207
1207
|
};
|
|
1208
1208
|
}
|
|
1209
1209
|
if (n?.[L]) return { flexGrow: n?.[L] };
|
|
1210
|
-
}),
|
|
1210
|
+
}), j = Ye({
|
|
1211
1211
|
defaultLayout: n,
|
|
1212
1212
|
disableCursor: r
|
|
1213
|
-
}),
|
|
1213
|
+
}), W = (0, v.useMemo)(() => ({
|
|
1214
1214
|
get disableCursor() {
|
|
1215
|
-
return !!
|
|
1215
|
+
return !!j.disableCursor;
|
|
1216
1216
|
},
|
|
1217
|
-
getPanelStyles:
|
|
1217
|
+
getPanelStyles: N,
|
|
1218
1218
|
id: g,
|
|
1219
1219
|
orientation: l,
|
|
1220
1220
|
registerPanel: (P) => {
|
|
@@ -1230,34 +1230,34 @@ function Jt({ children: e, className: t, defaultLayout: n, disableCursor: r, dis
|
|
|
1230
1230
|
};
|
|
1231
1231
|
},
|
|
1232
1232
|
updatePanelProps: (P, { disabled: L }) => {
|
|
1233
|
-
const I = S.current.panels.find((
|
|
1233
|
+
const I = S.current.panels.find((_) => _.id === P);
|
|
1234
1234
|
I && (I.panelConstraints.disabled = L);
|
|
1235
|
-
const R =
|
|
1236
|
-
R &&
|
|
1237
|
-
...
|
|
1235
|
+
const R = gt(g), A = ae(g);
|
|
1236
|
+
R && A && ne(R, {
|
|
1237
|
+
...A,
|
|
1238
1238
|
derivedPanelConstraints: Te(R)
|
|
1239
1239
|
});
|
|
1240
1240
|
},
|
|
1241
1241
|
updateSeparatorProps: (P, { disabled: L, disableDoubleClick: I }) => {
|
|
1242
|
-
const R = S.current.separators.find((
|
|
1242
|
+
const R = S.current.separators.find((A) => A.id === P);
|
|
1243
1243
|
R && (R.disabled = L, R.disableDoubleClick = I);
|
|
1244
1244
|
}
|
|
1245
1245
|
}), [
|
|
1246
|
-
|
|
1246
|
+
N,
|
|
1247
1247
|
g,
|
|
1248
1248
|
w,
|
|
1249
1249
|
l,
|
|
1250
|
-
|
|
1250
|
+
j
|
|
1251
1251
|
]), H = (0, v.useRef)(null);
|
|
1252
1252
|
return ce(() => {
|
|
1253
1253
|
const P = y.current;
|
|
1254
1254
|
if (P === null) return;
|
|
1255
1255
|
const L = S.current;
|
|
1256
1256
|
let I;
|
|
1257
|
-
if (
|
|
1257
|
+
if (j.defaultLayout !== void 0 && Object.keys(j.defaultLayout).length === L.panels.length) {
|
|
1258
1258
|
I = {};
|
|
1259
1259
|
for (const T of L.panels) {
|
|
1260
|
-
const V =
|
|
1260
|
+
const V = j.defaultLayout[T.id];
|
|
1261
1261
|
V !== void 0 && (I[T.id] = V);
|
|
1262
1262
|
}
|
|
1263
1263
|
}
|
|
@@ -1267,7 +1267,7 @@ function Jt({ children: e, className: t, defaultLayout: n, disableCursor: r, dis
|
|
|
1267
1267
|
id: g,
|
|
1268
1268
|
mutableState: {
|
|
1269
1269
|
defaultLayout: I,
|
|
1270
|
-
disableCursor: !!
|
|
1270
|
+
disableCursor: !!j.disableCursor,
|
|
1271
1271
|
expandedPanelSizes: S.current.lastExpandedPanelSizes,
|
|
1272
1272
|
layouts: S.current.layouts
|
|
1273
1273
|
},
|
|
@@ -1277,8 +1277,8 @@ function Jt({ children: e, className: t, defaultLayout: n, disableCursor: r, dis
|
|
|
1277
1277
|
separators: L.separators
|
|
1278
1278
|
};
|
|
1279
1279
|
H.current = R;
|
|
1280
|
-
const
|
|
1281
|
-
|
|
1280
|
+
const A = fr(R), { defaultLayoutDeferred: _, derivedPanelConstraints: oe, layout: pe } = ae(R.id, !0);
|
|
1281
|
+
!_ && oe.length > 0 && (p(pe), b(pe, !1));
|
|
1282
1282
|
const Q = Ve(g, (T) => {
|
|
1283
1283
|
const { defaultLayoutDeferred: V, derivedPanelConstraints: U, layout: ee } = T.next;
|
|
1284
1284
|
if (V || U.length === 0) return;
|
|
@@ -1287,8 +1287,8 @@ function Jt({ children: e, className: t, defaultLayout: n, disableCursor: r, dis
|
|
|
1287
1287
|
if (q.collapsible) {
|
|
1288
1288
|
const { layout: te } = T.prev ?? {};
|
|
1289
1289
|
if (te) {
|
|
1290
|
-
const re = F(q.collapsedSize, ee[q.panelId]),
|
|
1291
|
-
re &&
|
|
1290
|
+
const re = F(q.collapsedSize, ee[q.panelId]), $ = F(q.collapsedSize, te[q.panelId]);
|
|
1291
|
+
re && !$ && (R.mutableState.expandedPanelSizes[q.panelId] = te[q.panelId]);
|
|
1292
1292
|
}
|
|
1293
1293
|
}
|
|
1294
1294
|
});
|
|
@@ -1296,7 +1296,7 @@ function Jt({ children: e, className: t, defaultLayout: n, disableCursor: r, dis
|
|
|
1296
1296
|
p(ee), Ie && b(ee, T.isUserInteraction);
|
|
1297
1297
|
});
|
|
1298
1298
|
return () => {
|
|
1299
|
-
H.current = null,
|
|
1299
|
+
H.current = null, A(), Q();
|
|
1300
1300
|
};
|
|
1301
1301
|
}, [
|
|
1302
1302
|
a,
|
|
@@ -1305,12 +1305,12 @@ function Jt({ children: e, className: t, defaultLayout: n, disableCursor: r, dis
|
|
|
1305
1305
|
p,
|
|
1306
1306
|
l,
|
|
1307
1307
|
z,
|
|
1308
|
-
|
|
1308
|
+
j
|
|
1309
1309
|
]), (0, v.useEffect)(() => {
|
|
1310
1310
|
const P = H.current;
|
|
1311
1311
|
P && (P.mutableState.defaultLayout = n, P.mutableState.disableCursor = !!r);
|
|
1312
|
-
}), /* @__PURE__ */ (0, C.jsx)(
|
|
1313
|
-
value:
|
|
1312
|
+
}), /* @__PURE__ */ (0, C.jsx)(Jt.Provider, {
|
|
1313
|
+
value: W,
|
|
1314
1314
|
children: /* @__PURE__ */ (0, C.jsx)("div", {
|
|
1315
1315
|
...f,
|
|
1316
1316
|
className: t,
|
|
@@ -1332,37 +1332,37 @@ function Jt({ children: e, className: t, defaultLayout: n, disableCursor: r, dis
|
|
|
1332
1332
|
})
|
|
1333
1333
|
});
|
|
1334
1334
|
}
|
|
1335
|
-
|
|
1335
|
+
Zt.displayName = "Group";
|
|
1336
1336
|
function Ke() {
|
|
1337
|
-
const e = (0, v.useContext)(
|
|
1337
|
+
const e = (0, v.useContext)(Jt);
|
|
1338
1338
|
return D(e, "Group Context not found; did you render a Panel or Separator outside of a Group?"), e;
|
|
1339
1339
|
}
|
|
1340
|
-
function
|
|
1340
|
+
function br(e, t) {
|
|
1341
1341
|
const { id: n } = Ke(), r = (0, v.useRef)({
|
|
1342
|
-
collapse:
|
|
1343
|
-
expand:
|
|
1342
|
+
collapse: Ne,
|
|
1343
|
+
expand: Ne,
|
|
1344
1344
|
getSize: () => ({
|
|
1345
1345
|
asPercentage: 0,
|
|
1346
1346
|
inPixels: 0
|
|
1347
1347
|
}),
|
|
1348
1348
|
isCollapsed: () => !1,
|
|
1349
|
-
resize:
|
|
1349
|
+
resize: Ne
|
|
1350
1350
|
});
|
|
1351
1351
|
(0, v.useImperativeHandle)(t, () => r.current, []), ce(() => {
|
|
1352
|
-
Object.assign(r.current,
|
|
1352
|
+
Object.assign(r.current, Xt({
|
|
1353
1353
|
groupId: n,
|
|
1354
1354
|
panelId: e
|
|
1355
1355
|
}));
|
|
1356
1356
|
});
|
|
1357
1357
|
}
|
|
1358
|
-
function
|
|
1359
|
-
const p = !!s, b = qe(s), g =
|
|
1360
|
-
u?.(R, s,
|
|
1358
|
+
function Qt({ children: e, className: t, collapsedSize: n = "0%", collapsible: r = !1, defaultSize: a, disabled: o, elementRef: c, groupResizeBehavior: i = "preserve-relative-size", id: s, maxSize: d = "100%", minSize: l = "0%", onResize: u, panelRef: m, style: f, ...h }) {
|
|
1359
|
+
const p = !!s, b = qe(s), g = Ye({ disabled: o }), y = (0, v.useRef)(null), z = Xe(y, c), { getPanelStyles: w, id: S, orientation: k, registerPanel: N, updatePanelProps: j } = Ke(), W = u !== null, H = ze((R, A, _) => {
|
|
1360
|
+
u?.(R, s, _);
|
|
1361
1361
|
});
|
|
1362
1362
|
ce(() => {
|
|
1363
1363
|
const R = y.current;
|
|
1364
1364
|
if (R !== null) {
|
|
1365
|
-
const
|
|
1365
|
+
const A = {
|
|
1366
1366
|
element: R,
|
|
1367
1367
|
id: b,
|
|
1368
1368
|
idIsStable: p,
|
|
@@ -1370,7 +1370,7 @@ function Zt({ children: e, className: t, collapsedSize: n = "0%", collapsible: r
|
|
|
1370
1370
|
expandToSize: void 0,
|
|
1371
1371
|
prevSize: void 0
|
|
1372
1372
|
},
|
|
1373
|
-
onResize:
|
|
1373
|
+
onResize: W ? H : void 0,
|
|
1374
1374
|
panelConstraints: {
|
|
1375
1375
|
groupResizeBehavior: i,
|
|
1376
1376
|
collapsedSize: n,
|
|
@@ -1381,28 +1381,28 @@ function Zt({ children: e, className: t, collapsedSize: n = "0%", collapsible: r
|
|
|
1381
1381
|
minSize: l
|
|
1382
1382
|
}
|
|
1383
1383
|
};
|
|
1384
|
-
return
|
|
1384
|
+
return N(A);
|
|
1385
1385
|
}
|
|
1386
1386
|
}, [
|
|
1387
1387
|
i,
|
|
1388
1388
|
n,
|
|
1389
1389
|
r,
|
|
1390
1390
|
a,
|
|
1391
|
-
|
|
1391
|
+
W,
|
|
1392
1392
|
b,
|
|
1393
1393
|
p,
|
|
1394
1394
|
d,
|
|
1395
1395
|
l,
|
|
1396
1396
|
H,
|
|
1397
|
-
|
|
1397
|
+
N,
|
|
1398
1398
|
g
|
|
1399
1399
|
]), (0, v.useEffect)(() => {
|
|
1400
|
-
|
|
1400
|
+
j(b, { disabled: o });
|
|
1401
1401
|
}, [
|
|
1402
1402
|
o,
|
|
1403
1403
|
b,
|
|
1404
|
-
|
|
1405
|
-
]),
|
|
1404
|
+
j
|
|
1405
|
+
]), br(b, m);
|
|
1406
1406
|
const P = () => {
|
|
1407
1407
|
const R = w(S, b);
|
|
1408
1408
|
if (R) return JSON.stringify(R);
|
|
@@ -1420,7 +1420,7 @@ function Zt({ children: e, className: t, collapsedSize: n = "0%", collapsible: r
|
|
|
1420
1420
|
id: b,
|
|
1421
1421
|
ref: z,
|
|
1422
1422
|
style: {
|
|
1423
|
-
...
|
|
1423
|
+
...gr,
|
|
1424
1424
|
display: "flex",
|
|
1425
1425
|
flexBasis: 0,
|
|
1426
1426
|
flexShrink: 1,
|
|
@@ -1441,8 +1441,8 @@ function Zt({ children: e, className: t, collapsedSize: n = "0%", collapsible: r
|
|
|
1441
1441
|
})
|
|
1442
1442
|
});
|
|
1443
1443
|
}
|
|
1444
|
-
|
|
1445
|
-
var
|
|
1444
|
+
Qt.displayName = "Panel";
|
|
1445
|
+
var gr = {
|
|
1446
1446
|
minHeight: 0,
|
|
1447
1447
|
maxHeight: "100%",
|
|
1448
1448
|
height: "auto",
|
|
@@ -1454,7 +1454,7 @@ var vr = {
|
|
|
1454
1454
|
padding: 0,
|
|
1455
1455
|
margin: 0
|
|
1456
1456
|
};
|
|
1457
|
-
function
|
|
1457
|
+
function mr({ layout: e, panelConstraints: t, panelId: n, panelIndex: r }) {
|
|
1458
1458
|
let a, o;
|
|
1459
1459
|
const c = e[n], i = t.find((s) => s.panelId === n);
|
|
1460
1460
|
if (i) {
|
|
@@ -1486,11 +1486,11 @@ function br({ layout: e, panelConstraints: t, panelId: n, panelIndex: r }) {
|
|
|
1486
1486
|
valueNow: c
|
|
1487
1487
|
};
|
|
1488
1488
|
}
|
|
1489
|
-
function
|
|
1490
|
-
const s = qe(o), d =
|
|
1489
|
+
function en({ children: e, className: t, disabled: n, disableDoubleClick: r, elementRef: a, id: o, style: c, ...i }) {
|
|
1490
|
+
const s = qe(o), d = Ye({
|
|
1491
1491
|
disabled: n,
|
|
1492
1492
|
disableDoubleClick: r
|
|
1493
|
-
}), [l, u] = (0, v.useState)({}), [m, f] = (0, v.useState)("inactive"), [h, p] = (0, v.useState)(!1), b = (0, v.useRef)(null), g =
|
|
1493
|
+
}), [l, u] = (0, v.useState)({}), [m, f] = (0, v.useState)("inactive"), [h, p] = (0, v.useState)(!1), b = (0, v.useRef)(null), g = Xe(b, a), { disableCursor: y, id: z, orientation: w, registerSeparator: S, updateSeparatorProps: k } = Ke(), N = w === "horizontal" ? "vertical" : "horizontal";
|
|
1494
1494
|
ce(() => {
|
|
1495
1495
|
const H = b.current;
|
|
1496
1496
|
if (H !== null) {
|
|
@@ -1499,15 +1499,15 @@ function Qt({ children: e, className: t, disabled: n, disableDoubleClick: r, ele
|
|
|
1499
1499
|
disableDoubleClick: d.disableDoubleClick,
|
|
1500
1500
|
element: H,
|
|
1501
1501
|
id: s
|
|
1502
|
-
}, L = S(P), I =
|
|
1503
|
-
f(
|
|
1504
|
-
}), R = Ve(z, (
|
|
1505
|
-
const { derivedPanelConstraints:
|
|
1502
|
+
}, L = S(P), I = Yn((A) => {
|
|
1503
|
+
f(A.next.state !== "inactive" && A.next.hitRegions.some((_) => _.separator === P) ? A.next.state : "inactive");
|
|
1504
|
+
}), R = Ve(z, (A) => {
|
|
1505
|
+
const { derivedPanelConstraints: _, layout: oe, separatorToPanels: pe } = A.next, Q = pe.get(P);
|
|
1506
1506
|
if (Q) {
|
|
1507
1507
|
const T = Q[0], V = Q.indexOf(T);
|
|
1508
|
-
u(
|
|
1508
|
+
u(mr({
|
|
1509
1509
|
layout: oe,
|
|
1510
|
-
panelConstraints:
|
|
1510
|
+
panelConstraints: _,
|
|
1511
1511
|
panelId: T.id,
|
|
1512
1512
|
panelIndex: V
|
|
1513
1513
|
}));
|
|
@@ -1533,20 +1533,20 @@ function Qt({ children: e, className: t, disabled: n, disableDoubleClick: r, ele
|
|
|
1533
1533
|
s,
|
|
1534
1534
|
k
|
|
1535
1535
|
]);
|
|
1536
|
-
let
|
|
1537
|
-
n && !y && (
|
|
1538
|
-
let
|
|
1539
|
-
return n ?
|
|
1536
|
+
let j;
|
|
1537
|
+
n && !y && (j = "not-allowed");
|
|
1538
|
+
let W;
|
|
1539
|
+
return n ? W = "disabled" : m === "active" ? W = "active" : h ? W = "focus" : W = m, /* @__PURE__ */ (0, C.jsx)("div", {
|
|
1540
1540
|
...i,
|
|
1541
1541
|
"aria-controls": l.valueControls,
|
|
1542
1542
|
"aria-disabled": n || void 0,
|
|
1543
|
-
"aria-orientation":
|
|
1543
|
+
"aria-orientation": N,
|
|
1544
1544
|
"aria-valuemax": l.valueMax,
|
|
1545
1545
|
"aria-valuemin": l.valueMin,
|
|
1546
1546
|
"aria-valuenow": l.valueNow,
|
|
1547
1547
|
children: e,
|
|
1548
1548
|
className: t,
|
|
1549
|
-
"data-separator":
|
|
1549
|
+
"data-separator": W,
|
|
1550
1550
|
"data-testid": s,
|
|
1551
1551
|
id: s,
|
|
1552
1552
|
onBlur: () => p(!1),
|
|
@@ -1555,7 +1555,7 @@ function Qt({ children: e, className: t, disabled: n, disableDoubleClick: r, ele
|
|
|
1555
1555
|
role: "separator",
|
|
1556
1556
|
style: {
|
|
1557
1557
|
flexBasis: "auto",
|
|
1558
|
-
cursor:
|
|
1558
|
+
cursor: j,
|
|
1559
1559
|
...c,
|
|
1560
1560
|
flexGrow: 0,
|
|
1561
1561
|
flexShrink: 0,
|
|
@@ -1564,39 +1564,39 @@ function Qt({ children: e, className: t, disabled: n, disableDoubleClick: r, ele
|
|
|
1564
1564
|
tabIndex: n ? void 0 : 0
|
|
1565
1565
|
});
|
|
1566
1566
|
}
|
|
1567
|
-
|
|
1568
|
-
function
|
|
1569
|
-
return /* @__PURE__ */ (0, C.jsx)(
|
|
1567
|
+
en.displayName = "Separator";
|
|
1568
|
+
function tn({ className: e, ...t }) {
|
|
1569
|
+
return /* @__PURE__ */ (0, C.jsx)(Zt, {
|
|
1570
1570
|
"data-slot": "resizable-panel-group",
|
|
1571
|
-
className:
|
|
1571
|
+
className: Y("flex h-full w-full data-[panel-group-direction=vertical]:flex-col", e),
|
|
1572
1572
|
...t
|
|
1573
1573
|
});
|
|
1574
1574
|
}
|
|
1575
1575
|
function Fe({ ...e }) {
|
|
1576
|
-
return /* @__PURE__ */ (0, C.jsx)(
|
|
1576
|
+
return /* @__PURE__ */ (0, C.jsx)(Qt, {
|
|
1577
1577
|
"data-slot": "resizable-panel",
|
|
1578
1578
|
...e
|
|
1579
1579
|
});
|
|
1580
1580
|
}
|
|
1581
|
-
function
|
|
1582
|
-
return /* @__PURE__ */ (0, C.jsx)(
|
|
1581
|
+
function nn({ withHandle: e, className: t, ...n }) {
|
|
1582
|
+
return /* @__PURE__ */ (0, C.jsx)(en, {
|
|
1583
1583
|
"data-slot": "resizable-handle",
|
|
1584
1584
|
"aria-label": "Resize panels",
|
|
1585
|
-
className:
|
|
1585
|
+
className: Y("bg-border focus-visible:ring-ring relative flex w-px items-center justify-center after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-offset-1 focus-visible:outline-hidden motion-reduce:after:transition-none data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:translate-x-0 data-[panel-group-direction=vertical]:after:-translate-y-1/2 [&[data-panel-group-direction=vertical]>div]:rotate-90 hover:bg-border/80 transition-colors motion-reduce:transition-none", t),
|
|
1586
1586
|
...n,
|
|
1587
1587
|
children: e && /* @__PURE__ */ (0, C.jsx)("div", {
|
|
1588
1588
|
className: "z-10 flex shrink-0 items-center justify-center rounded-3xl border border-border bg-muted px-0.5 py-5 transition-all motion-reduce:transition-none hover:bg-accent hover:border-accent-foreground/20",
|
|
1589
|
-
children: /* @__PURE__ */ (0, C.jsx)(
|
|
1589
|
+
children: /* @__PURE__ */ (0, C.jsx)(On, {
|
|
1590
1590
|
size: 20,
|
|
1591
1591
|
className: "text-secondary-foreground transition-colors motion-reduce:transition-none hover:text-accent-foreground"
|
|
1592
1592
|
})
|
|
1593
1593
|
})
|
|
1594
1594
|
});
|
|
1595
1595
|
}
|
|
1596
|
-
|
|
1596
|
+
tn.displayName = "ResizablePanelGroup";
|
|
1597
1597
|
Fe.displayName = "ResizablePanel";
|
|
1598
|
-
|
|
1599
|
-
var
|
|
1598
|
+
nn.displayName = "ResizableHandle";
|
|
1599
|
+
var _e = v.forwardRef(({ background: e, height: t, padding: n, mobilePadding: r, gap: a, connected: o, className: c, style: i, children: s, ...d }, l) => {
|
|
1600
1600
|
const u = {};
|
|
1601
1601
|
return e !== void 0 && (u["--app-shell-background"] = e), t !== void 0 && (u["--app-shell-height"] = t), n !== void 0 && (u["--app-shell-padding"] = typeof n == "number" ? `${n}px` : n), r !== void 0 && (u["--app-shell-mobile-padding"] = typeof r == "number" ? `${r}px` : r), a !== void 0 && (u["--app-shell-gap"] = typeof a == "number" ? `${a}px` : a), /* @__PURE__ */ (0, C.jsx)("div", {
|
|
1602
1602
|
ref: l,
|
|
@@ -1606,16 +1606,16 @@ var $e = v.forwardRef(({ background: e, height: t, padding: n, mobilePadding: r,
|
|
|
1606
1606
|
...u,
|
|
1607
1607
|
...i
|
|
1608
1608
|
},
|
|
1609
|
-
className:
|
|
1609
|
+
className: Y("flex h-[var(--app-shell-height,100dvh)] w-full", "gap-[var(--app-shell-gap,0px)]", "p-[var(--app-shell-mobile-padding,0.5rem)] md:p-[var(--app-shell-padding,1rem)]", "bg-app-shell", "transition-[gap] duration-300 ease-[cubic-bezier(0.16,1,0.3,1)] motion-reduce:transition-none", c),
|
|
1610
1610
|
...d,
|
|
1611
1611
|
children: s
|
|
1612
1612
|
});
|
|
1613
1613
|
});
|
|
1614
|
-
|
|
1615
|
-
function
|
|
1614
|
+
_e.displayName = "AppShell";
|
|
1615
|
+
function yr(e, t) {
|
|
1616
1616
|
return e.key ?? e.label ?? t;
|
|
1617
1617
|
}
|
|
1618
|
-
function
|
|
1618
|
+
function rn({ panels: e, activeIndex: t, onActiveChange: n, onSidebarOpen: r, baseId: a }) {
|
|
1619
1619
|
const o = v.useRef(null), c = v.useCallback((l) => {
|
|
1620
1620
|
let u = null;
|
|
1621
1621
|
switch (l.key) {
|
|
@@ -1656,9 +1656,9 @@ function nn({ panels: e, activeIndex: t, onActiveChange: n, onSidebarOpen: r, ba
|
|
|
1656
1656
|
const d = r ? /* @__PURE__ */ (0, C.jsx)("button", {
|
|
1657
1657
|
type: "button",
|
|
1658
1658
|
onClick: r,
|
|
1659
|
-
className:
|
|
1659
|
+
className: Y("flex min-h-11 min-w-11 items-center justify-center rounded-lg", "text-secondary-foreground hover:bg-accent", "active:scale-[0.95]", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring", "transition-colors motion-reduce:transition-none"),
|
|
1660
1660
|
"aria-label": "Open sidebar",
|
|
1661
|
-
children: /* @__PURE__ */ (0, C.jsx)(
|
|
1661
|
+
children: /* @__PURE__ */ (0, C.jsx)(_n, { className: "size-5" })
|
|
1662
1662
|
}) : null;
|
|
1663
1663
|
return e.length <= 1 ? d ? /* @__PURE__ */ (0, C.jsx)("div", {
|
|
1664
1664
|
"data-slot": "app-shell-mobile-tab-bar",
|
|
@@ -1673,7 +1673,7 @@ function nn({ panels: e, activeIndex: t, onActiveChange: n, onSidebarOpen: r, ba
|
|
|
1673
1673
|
className: "relative flex gap-1",
|
|
1674
1674
|
onKeyDown: c,
|
|
1675
1675
|
children: [i && /* @__PURE__ */ (0, C.jsx)("div", {
|
|
1676
|
-
className:
|
|
1676
|
+
className: Y("absolute top-1/2 -translate-y-1/2 h-9 rounded-lg bg-accent", "transition-[left,width] duration-200 ease-[cubic-bezier(0.16,1,0.3,1)]", "motion-reduce:transition-none"),
|
|
1677
1677
|
style: {
|
|
1678
1678
|
left: i.left,
|
|
1679
1679
|
width: i.width
|
|
@@ -1689,17 +1689,17 @@ function nn({ panels: e, activeIndex: t, onActiveChange: n, onSidebarOpen: r, ba
|
|
|
1689
1689
|
"aria-controls": a ? `${a}-tabpanel-${u}` : void 0,
|
|
1690
1690
|
tabIndex: f ? 0 : -1,
|
|
1691
1691
|
onClick: () => n(u),
|
|
1692
|
-
className:
|
|
1692
|
+
className: Y("relative z-10 rounded-lg px-3 min-h-9 text-sm font-medium", "transition-colors duration-150 motion-reduce:transition-none", "active:scale-[0.97]", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring", f ? "text-foreground" : "text-secondary-foreground hover:text-foreground"),
|
|
1693
1693
|
children: m
|
|
1694
|
-
},
|
|
1694
|
+
}, yr(l, m));
|
|
1695
1695
|
})]
|
|
1696
1696
|
})]
|
|
1697
1697
|
});
|
|
1698
1698
|
}
|
|
1699
|
-
|
|
1700
|
-
var
|
|
1701
|
-
function
|
|
1702
|
-
const l = v.useContext(
|
|
1699
|
+
rn.displayName = "AppShellMobileTabBar";
|
|
1700
|
+
var xr = "AppShell.Panel";
|
|
1701
|
+
function Sr({ width: e, flex: t, minWidth: n, expanded: r = !1, onExpandedChange: a, label: o, className: c, style: i, children: s, ...d }) {
|
|
1702
|
+
const l = v.useContext(Tt), u = l.expanded ?? r, m = l.onExpandedChange ?? a, f = v.useMemo(() => ({
|
|
1703
1703
|
expanded: u,
|
|
1704
1704
|
onExpandedChange: m
|
|
1705
1705
|
}), [u, m]), h = v.useMemo(() => {
|
|
@@ -1743,7 +1743,7 @@ function yr({ width: e, flex: t, minWidth: n, expanded: r = !1, onExpandedChange
|
|
|
1743
1743
|
n,
|
|
1744
1744
|
i
|
|
1745
1745
|
]), p = !l.visible && !l.isMobile;
|
|
1746
|
-
return /* @__PURE__ */ (0, C.jsx)(
|
|
1746
|
+
return /* @__PURE__ */ (0, C.jsx)(Nn.Provider, {
|
|
1747
1747
|
value: f,
|
|
1748
1748
|
children: /* @__PURE__ */ (0, C.jsx)("div", {
|
|
1749
1749
|
"data-slot": "app-shell-panel",
|
|
@@ -1755,52 +1755,52 @@ function yr({ width: e, flex: t, minWidth: n, expanded: r = !1, onExpandedChange
|
|
|
1755
1755
|
id: l.panelId,
|
|
1756
1756
|
"aria-labelledby": l.tabId
|
|
1757
1757
|
} : {},
|
|
1758
|
-
className:
|
|
1758
|
+
className: Y("flex h-full min-w-0 flex-col", p && "overflow-clip", e !== void 0 && !u && !p && !l.isMobile && !l.sizeManagedByRoot && "shrink-0", l.isMobile && "animate-[delight-fade-in_150ms_ease-out_both]", l.isMobile && "motion-reduce:animate-none", "transition-[flex,width,opacity] duration-300 ease-[cubic-bezier(0.16,1,0.3,1)]", "motion-reduce:transition-none", c),
|
|
1759
1759
|
style: h,
|
|
1760
1760
|
...d,
|
|
1761
1761
|
children: s
|
|
1762
1762
|
})
|
|
1763
1763
|
});
|
|
1764
1764
|
}
|
|
1765
|
-
var
|
|
1765
|
+
var zr = Object.assign(Sr, {
|
|
1766
1766
|
displayName: "AppShell.Panel",
|
|
1767
|
-
__appShellType:
|
|
1768
|
-
}),
|
|
1769
|
-
function
|
|
1767
|
+
__appShellType: xr
|
|
1768
|
+
}), Mt = [35, 65];
|
|
1769
|
+
function Dt(e) {
|
|
1770
1770
|
return Number.isFinite(e) && e > 0;
|
|
1771
1771
|
}
|
|
1772
|
-
function
|
|
1773
|
-
if (!e) return
|
|
1772
|
+
function $e(e) {
|
|
1773
|
+
if (!e) return Mt;
|
|
1774
1774
|
const [t, n] = e;
|
|
1775
|
-
if (!
|
|
1775
|
+
if (!Dt(t) || !Dt(n)) return Mt;
|
|
1776
1776
|
const r = t + n;
|
|
1777
1777
|
return [Number((t / r * 100).toFixed(4)), Number((n / r * 100).toFixed(4))];
|
|
1778
1778
|
}
|
|
1779
|
-
function
|
|
1779
|
+
function It(e) {
|
|
1780
1780
|
return String(e);
|
|
1781
1781
|
}
|
|
1782
|
-
function
|
|
1782
|
+
function At(e) {
|
|
1783
1783
|
if (e !== void 0)
|
|
1784
1784
|
return typeof e == "number" ? `${e}px` : e;
|
|
1785
1785
|
}
|
|
1786
1786
|
function Nt(e) {
|
|
1787
|
-
return
|
|
1787
|
+
return $e([e.panel0, e.panel1]);
|
|
1788
1788
|
}
|
|
1789
|
-
function
|
|
1789
|
+
function wr(e, t = 85) {
|
|
1790
1790
|
const n = e.panel0, r = e.panel1;
|
|
1791
1791
|
return n >= t ? 0 : r >= t ? 1 : null;
|
|
1792
1792
|
}
|
|
1793
|
-
var
|
|
1794
|
-
function
|
|
1793
|
+
var an = "var(--app-background)";
|
|
1794
|
+
function Cr(e) {
|
|
1795
1795
|
return typeof e == "function" && e.__appShellType === "AppShell.Panel";
|
|
1796
1796
|
}
|
|
1797
|
-
function
|
|
1798
|
-
return v.isValidElement(e) &&
|
|
1797
|
+
function Pr(e) {
|
|
1798
|
+
return v.isValidElement(e) && Cr(e.type);
|
|
1799
1799
|
}
|
|
1800
|
-
function
|
|
1800
|
+
function Lr(e, t, n) {
|
|
1801
1801
|
return e.key ?? e.props.label ?? `${t}-panel-${n}`;
|
|
1802
1802
|
}
|
|
1803
|
-
function
|
|
1803
|
+
function je({ panel: e, visible: t, index: n, overrides: r = {}, isMobile: a, activePanel: o, hasExpanded: c, hasTabBar: i, ariaBaseId: s, rootExpansionActive: d, firstExpandedIndex: l, onExpandedPanelChange: u }) {
|
|
1804
1804
|
if (a && n !== o) return null;
|
|
1805
1805
|
const m = {
|
|
1806
1806
|
visible: a ? !0 : t,
|
|
@@ -1812,53 +1812,53 @@ function Ae({ panel: e, visible: t, index: n, overrides: r = {}, isMobile: a, ac
|
|
|
1812
1812
|
onExpandedChange: d ? (f) => u(f ? n : null) : void 0,
|
|
1813
1813
|
...r
|
|
1814
1814
|
};
|
|
1815
|
-
return /* @__PURE__ */ (0, C.jsx)(
|
|
1815
|
+
return /* @__PURE__ */ (0, C.jsx)(An.Provider, {
|
|
1816
1816
|
value: n,
|
|
1817
|
-
children: /* @__PURE__ */ (0, C.jsx)(
|
|
1817
|
+
children: /* @__PURE__ */ (0, C.jsx)(Tt.Provider, {
|
|
1818
1818
|
value: m,
|
|
1819
1819
|
children: e
|
|
1820
1820
|
})
|
|
1821
1821
|
});
|
|
1822
1822
|
}
|
|
1823
|
-
function Be({ background: e =
|
|
1824
|
-
const S =
|
|
1825
|
-
i === void 0 &&
|
|
1826
|
-
}, [i, s]), q = l !== void 0 || u !== void 0 || m !== void 0, te = l !== void 0 ? l :
|
|
1823
|
+
function Be({ background: e = an, height: t = "100dvh", padding: n = 16, mobilePadding: r, gap: a = 12, connected: o = !1, skipToId: c, activePanel: i, onActivePanelChange: s, defaultActivePanel: d = 0, expandedPanel: l, defaultExpandedPanel: u, onExpandedPanelChange: m, resizablePanels: f, defaultPanelSizes: h, panelSizes: p, onPanelSizesChange: b, expandThreshold: g = 85, className: y, children: z, ...w }) {
|
|
1824
|
+
const S = In(), k = v.useId(), [N, j] = v.useState(d), [W, H] = v.useState(u ?? null), [P, L] = v.useState(() => $e(h)), [I, R] = v.useState(!1), [A, _] = v.useState(!1), [oe, pe] = v.useState(!1), Q = v.useRef(null), T = v.useRef(null), V = v.useRef(!1), U = v.useRef(!1), ee = v.useRef(!1), K = i ?? N, Ie = v.useCallback((x) => {
|
|
1825
|
+
i === void 0 && j((E) => E === x ? E : x), s?.(x);
|
|
1826
|
+
}, [i, s]), q = l !== void 0 || u !== void 0 || m !== void 0, te = l !== void 0 ? l : W, re = v.useCallback((x) => {
|
|
1827
1827
|
l === void 0 && H(x), m?.(x);
|
|
1828
|
-
}, [l, m]), { panels:
|
|
1828
|
+
}, [l, m]), { panels: $, panelInfos: Ae, sidebarChild: Ce, otherChildren: Ze } = v.useMemo(() => {
|
|
1829
1829
|
const x = [], E = [];
|
|
1830
|
-
let
|
|
1830
|
+
let G = null;
|
|
1831
1831
|
const Ee = [];
|
|
1832
|
-
return v.Children.forEach(z, (
|
|
1833
|
-
if (
|
|
1832
|
+
return v.Children.forEach(z, (X) => {
|
|
1833
|
+
if (Pr(X)) {
|
|
1834
1834
|
E.push({
|
|
1835
|
-
key:
|
|
1836
|
-
label:
|
|
1837
|
-
}), x.push(
|
|
1835
|
+
key: X.key ?? X.props.label,
|
|
1836
|
+
label: X.props.label
|
|
1837
|
+
}), x.push(X);
|
|
1838
1838
|
return;
|
|
1839
1839
|
}
|
|
1840
|
-
v.isValidElement(
|
|
1840
|
+
v.isValidElement(X) && (X.type === Je ? G = X : Ee.push(X));
|
|
1841
1841
|
}), {
|
|
1842
1842
|
panels: x,
|
|
1843
1843
|
panelInfos: E,
|
|
1844
|
-
sidebarChild:
|
|
1844
|
+
sidebarChild: G,
|
|
1845
1845
|
otherChildren: Ee
|
|
1846
1846
|
};
|
|
1847
|
-
}, [z]),
|
|
1848
|
-
let O =
|
|
1849
|
-
me && (O =
|
|
1850
|
-
const M = O !== -1 && O !== null, Pe = M ? 1 : Math.min(
|
|
1847
|
+
}, [z]), ln = f ?? !0, un = $.findIndex((x) => x.props.expanded), dn = $.some((x) => x.props.expanded !== void 0 || x.props.onExpandedChange !== void 0), Qe = ln && !o && !S && $.length === 2 && (f !== void 0 || !dn), me = q || Qe, cn = typeof te == "number" && Number.isInteger(te) && te >= 0 && te < $.length ? te : null;
|
|
1848
|
+
let O = un;
|
|
1849
|
+
me && (O = cn);
|
|
1850
|
+
const M = O !== -1 && O !== null, Pe = M ? 1 : Math.min($.length, 2), ye = Qe, et = v.useMemo(() => $e(p ?? P), [p, P]), Le = v.useMemo(() => M && O === 0 ? [100, 0] : M && O === 1 ? [0, 100] : et, [
|
|
1851
1851
|
O,
|
|
1852
1852
|
M,
|
|
1853
1853
|
et
|
|
1854
|
-
]), tt = M ||
|
|
1854
|
+
]), tt = M || A || !M && ee.current, pn = v.useCallback((x) => {
|
|
1855
1855
|
M || U.current || p === void 0 && L(Nt(x));
|
|
1856
|
-
}, [M, p]),
|
|
1856
|
+
}, [M, p]), fn = v.useCallback((x) => {
|
|
1857
1857
|
if (M || !V.current || U.current) return;
|
|
1858
1858
|
const E = Nt(x);
|
|
1859
1859
|
p === void 0 && L(E), b?.(E);
|
|
1860
|
-
const
|
|
1861
|
-
|
|
1860
|
+
const G = wr(x, g);
|
|
1861
|
+
G !== null && re(G);
|
|
1862
1862
|
}, [
|
|
1863
1863
|
g,
|
|
1864
1864
|
re,
|
|
@@ -1878,23 +1878,23 @@ function Be({ background: e = rn, height: t = "100dvh", padding: n = 16, mobileP
|
|
|
1878
1878
|
U.current = !1;
|
|
1879
1879
|
return;
|
|
1880
1880
|
}
|
|
1881
|
-
let
|
|
1882
|
-
const [Ee,
|
|
1883
|
-
E && !M && (
|
|
1884
|
-
|
|
1881
|
+
let G;
|
|
1882
|
+
const [Ee, X] = Le;
|
|
1883
|
+
E && !M && (G = x.requestAnimationFrame(() => {
|
|
1884
|
+
_(!0);
|
|
1885
1885
|
})), U.current = !0;
|
|
1886
1886
|
const ut = {
|
|
1887
1887
|
panel0: Ee,
|
|
1888
|
-
panel1:
|
|
1888
|
+
panel1: X
|
|
1889
1889
|
};
|
|
1890
1890
|
Q.current?.setLayout(ut);
|
|
1891
|
-
const
|
|
1891
|
+
const yn = x.requestAnimationFrame(() => {
|
|
1892
1892
|
Q.current?.setLayout(ut);
|
|
1893
|
-
}),
|
|
1893
|
+
}), xn = x.setTimeout(() => {
|
|
1894
1894
|
U.current = !1;
|
|
1895
1895
|
}, 350);
|
|
1896
1896
|
return () => {
|
|
1897
|
-
|
|
1897
|
+
G !== void 0 && x.cancelAnimationFrame(G), x.cancelAnimationFrame(yn), x.clearTimeout(xn), U.current = !1;
|
|
1898
1898
|
};
|
|
1899
1899
|
}, [
|
|
1900
1900
|
ye,
|
|
@@ -1902,14 +1902,14 @@ function Be({ background: e = rn, height: t = "100dvh", padding: n = 16, mobileP
|
|
|
1902
1902
|
p,
|
|
1903
1903
|
Le
|
|
1904
1904
|
]), v.useEffect(() => {
|
|
1905
|
-
if (!
|
|
1905
|
+
if (!A) return;
|
|
1906
1906
|
const x = T.current?.ownerDocument.defaultView;
|
|
1907
1907
|
if (!x) return;
|
|
1908
1908
|
const E = x.setTimeout(() => {
|
|
1909
|
-
|
|
1909
|
+
_(!1);
|
|
1910
1910
|
}, 350);
|
|
1911
1911
|
return () => x.clearTimeout(E);
|
|
1912
|
-
}, [
|
|
1912
|
+
}, [A]), v.useEffect(() => {
|
|
1913
1913
|
if (!ye) {
|
|
1914
1914
|
V.current = !1, U.current = !1;
|
|
1915
1915
|
return;
|
|
@@ -1931,22 +1931,22 @@ function Be({ background: e = rn, height: t = "100dvh", padding: n = 16, mobileP
|
|
|
1931
1931
|
x.removeEventListener("pointerup", E), x.removeEventListener("pointercancel", E);
|
|
1932
1932
|
};
|
|
1933
1933
|
}, [I]);
|
|
1934
|
-
const
|
|
1934
|
+
const hn = v.useCallback((x) => {
|
|
1935
1935
|
const E = x.target;
|
|
1936
1936
|
E instanceof Element && E.closest('[data-slot="resizable-handle"]') && R(!0);
|
|
1937
|
-
}, []), nt = v.useMemo(() => M ?
|
|
1937
|
+
}, []), nt = v.useMemo(() => M ? $.map((x, E) => ({
|
|
1938
1938
|
panel: x,
|
|
1939
1939
|
visible: E === O,
|
|
1940
1940
|
index: E
|
|
1941
|
-
})) :
|
|
1941
|
+
})) : $.map((x, E) => ({
|
|
1942
1942
|
panel: x,
|
|
1943
1943
|
visible: E < 2,
|
|
1944
1944
|
index: E
|
|
1945
1945
|
})), [
|
|
1946
|
-
|
|
1946
|
+
$,
|
|
1947
1947
|
M,
|
|
1948
1948
|
O
|
|
1949
|
-
]), xe = S &&
|
|
1949
|
+
]), xe = S && $.length > 1, rt = v.useCallback((x) => Pe === 1 ? "only" : M ? x === O ? "only" : "last" : x === 0 ? "first" : "last", [
|
|
1950
1950
|
Pe,
|
|
1951
1951
|
M,
|
|
1952
1952
|
O
|
|
@@ -1958,18 +1958,18 @@ function Be({ background: e = rn, height: t = "100dvh", padding: n = 16, mobileP
|
|
|
1958
1958
|
o,
|
|
1959
1959
|
Pe,
|
|
1960
1960
|
rt
|
|
1961
|
-
]), ot = v.useContext(
|
|
1961
|
+
]), ot = v.useContext(Mn), vn = ot?.openMobile ?? oe, Re = ot?.setOpenMobile ?? pe, bn = v.useCallback(() => {
|
|
1962
1962
|
Re(!0);
|
|
1963
|
-
}, [Re]),
|
|
1963
|
+
}, [Re]), gn = v.useCallback((x) => {
|
|
1964
1964
|
Re(x);
|
|
1965
1965
|
}, [Re]), it = c ? /* @__PURE__ */ (0, C.jsx)("a", {
|
|
1966
1966
|
href: `#${c}`,
|
|
1967
1967
|
className: "sr-only focus:not-sr-only focus:fixed focus:left-4 focus:top-4 focus:z-50 focus:rounded-md focus:bg-background focus:px-4 focus:py-2 focus:text-sm focus:font-medium focus:text-foreground focus:shadow-sm focus:ring-2 focus:ring-ring",
|
|
1968
1968
|
children: "Skip to content"
|
|
1969
|
-
}) : null, st = v.useMemo(() => nt.map(({ panel: x, visible: E, index:
|
|
1969
|
+
}) : null, st = v.useMemo(() => nt.map(({ panel: x, visible: E, index: G }) => /* @__PURE__ */ (0, C.jsx)(je, {
|
|
1970
1970
|
panel: x,
|
|
1971
1971
|
visible: E,
|
|
1972
|
-
index:
|
|
1972
|
+
index: G,
|
|
1973
1973
|
isMobile: S,
|
|
1974
1974
|
activePanel: K,
|
|
1975
1975
|
hasExpanded: M,
|
|
@@ -1978,7 +1978,7 @@ function Be({ background: e = rn, height: t = "100dvh", padding: n = 16, mobileP
|
|
|
1978
1978
|
rootExpansionActive: me,
|
|
1979
1979
|
firstExpandedIndex: O,
|
|
1980
1980
|
onExpandedPanelChange: re
|
|
1981
|
-
},
|
|
1981
|
+
}, Lr(x, k, G))), [
|
|
1982
1982
|
nt,
|
|
1983
1983
|
k,
|
|
1984
1984
|
S,
|
|
@@ -1988,21 +1988,21 @@ function Be({ background: e = rn, height: t = "100dvh", padding: n = 16, mobileP
|
|
|
1988
1988
|
me,
|
|
1989
1989
|
O,
|
|
1990
1990
|
re
|
|
1991
|
-
]),
|
|
1991
|
+
]), mn = ye ? /* @__PURE__ */ (0, C.jsxs)(tn, {
|
|
1992
1992
|
orientation: "horizontal",
|
|
1993
1993
|
disabled: M,
|
|
1994
1994
|
groupRef: Q,
|
|
1995
|
-
onLayoutChange:
|
|
1996
|
-
onLayoutChanged:
|
|
1997
|
-
onPointerDownCapture:
|
|
1998
|
-
className:
|
|
1995
|
+
onLayoutChange: pn,
|
|
1996
|
+
onLayoutChanged: fn,
|
|
1997
|
+
onPointerDownCapture: hn,
|
|
1998
|
+
className: Y("min-h-0 min-w-0 flex-1", !I && "[&>[data-slot=resizable-panel]]:transition-[flex-grow] [&>[data-slot=resizable-panel]]:duration-300 [&>[data-slot=resizable-panel]]:ease-[cubic-bezier(0.16,1,0.3,1)] motion-reduce:[&>[data-slot=resizable-panel]]:transition-none"),
|
|
1999
1999
|
children: [
|
|
2000
2000
|
/* @__PURE__ */ (0, C.jsx)(Fe, {
|
|
2001
2001
|
id: "panel0",
|
|
2002
|
-
defaultSize:
|
|
2003
|
-
minSize: tt ? 0 :
|
|
2004
|
-
children: /* @__PURE__ */ (0, C.jsx)(
|
|
2005
|
-
panel:
|
|
2002
|
+
defaultSize: It(Le[0]),
|
|
2003
|
+
minSize: tt ? 0 : At($[0].props.minWidth),
|
|
2004
|
+
children: /* @__PURE__ */ (0, C.jsx)(je, {
|
|
2005
|
+
panel: $[0],
|
|
2006
2006
|
visible: !M || O === 0,
|
|
2007
2007
|
index: 0,
|
|
2008
2008
|
overrides: { sizeManagedByRoot: !0 },
|
|
@@ -2016,16 +2016,16 @@ function Be({ background: e = rn, height: t = "100dvh", padding: n = 16, mobileP
|
|
|
2016
2016
|
onExpandedPanelChange: re
|
|
2017
2017
|
})
|
|
2018
2018
|
}),
|
|
2019
|
-
/* @__PURE__ */ (0, C.jsx)(
|
|
2019
|
+
/* @__PURE__ */ (0, C.jsx)(nn, {
|
|
2020
2020
|
disabled: M,
|
|
2021
|
-
className:
|
|
2021
|
+
className: Y("z-10 min-w-2 shrink-0 cursor-col-resize w-[var(--app-shell-gap,0px)] bg-transparent after:w-2 hover:bg-transparent", "transition-[width,min-width,opacity,background-color] duration-300 ease-[cubic-bezier(0.16,1,0.3,1)] motion-reduce:transition-none", M && "min-w-0 w-0 opacity-0 after:w-0 pointer-events-none")
|
|
2022
2022
|
}),
|
|
2023
2023
|
/* @__PURE__ */ (0, C.jsx)(Fe, {
|
|
2024
2024
|
id: "panel1",
|
|
2025
|
-
defaultSize:
|
|
2026
|
-
minSize: tt ? 0 :
|
|
2027
|
-
children: /* @__PURE__ */ (0, C.jsx)(
|
|
2028
|
-
panel:
|
|
2025
|
+
defaultSize: It(Le[1]),
|
|
2026
|
+
minSize: tt ? 0 : At($[1].props.minWidth),
|
|
2027
|
+
children: /* @__PURE__ */ (0, C.jsx)(je, {
|
|
2028
|
+
panel: $[1],
|
|
2029
2029
|
visible: !M || O === 1,
|
|
2030
2030
|
index: 1,
|
|
2031
2031
|
overrides: { sizeManagedByRoot: !0 },
|
|
@@ -2040,10 +2040,10 @@ function Be({ background: e = rn, height: t = "100dvh", padding: n = 16, mobileP
|
|
|
2040
2040
|
})
|
|
2041
2041
|
})
|
|
2042
2042
|
]
|
|
2043
|
-
}) : null, lt = xe &&
|
|
2044
|
-
return S ? /* @__PURE__ */ (0, C.jsx)(
|
|
2043
|
+
}) : null, lt = xe && Ae[K] ? Ae[K].label || `Panel ${K + 1}` : null;
|
|
2044
|
+
return S ? /* @__PURE__ */ (0, C.jsx)(pt, {
|
|
2045
2045
|
value: at,
|
|
2046
|
-
children: /* @__PURE__ */ (0, C.jsxs)(
|
|
2046
|
+
children: /* @__PURE__ */ (0, C.jsxs)(_e, {
|
|
2047
2047
|
ref: T,
|
|
2048
2048
|
background: e,
|
|
2049
2049
|
height: t,
|
|
@@ -2055,10 +2055,10 @@ function Be({ background: e = rn, height: t = "100dvh", padding: n = 16, mobileP
|
|
|
2055
2055
|
...w,
|
|
2056
2056
|
children: [
|
|
2057
2057
|
it,
|
|
2058
|
-
Ce && /* @__PURE__ */ (0, C.jsx)(
|
|
2059
|
-
open:
|
|
2060
|
-
onOpenChange:
|
|
2061
|
-
children: /* @__PURE__ */ (0, C.jsx)(
|
|
2058
|
+
Ce && /* @__PURE__ */ (0, C.jsx)(Dn, {
|
|
2059
|
+
open: vn,
|
|
2060
|
+
onOpenChange: gn,
|
|
2061
|
+
children: /* @__PURE__ */ (0, C.jsx)(En, {
|
|
2062
2062
|
side: "left",
|
|
2063
2063
|
showCloseButton: !1,
|
|
2064
2064
|
className: "w-[280px] p-0",
|
|
@@ -2068,11 +2068,11 @@ function Be({ background: e = rn, height: t = "100dvh", padding: n = 16, mobileP
|
|
|
2068
2068
|
}),
|
|
2069
2069
|
/* @__PURE__ */ (0, C.jsxs)("div", {
|
|
2070
2070
|
className: "flex h-full min-w-0 flex-1 flex-col overflow-clip",
|
|
2071
|
-
children: [/* @__PURE__ */ (0, C.jsx)(
|
|
2072
|
-
panels:
|
|
2071
|
+
children: [/* @__PURE__ */ (0, C.jsx)(rn, {
|
|
2072
|
+
panels: Ae,
|
|
2073
2073
|
activeIndex: K,
|
|
2074
2074
|
onActiveChange: Ie,
|
|
2075
|
-
onSidebarOpen: Ce ?
|
|
2075
|
+
onSidebarOpen: Ce ? bn : void 0,
|
|
2076
2076
|
baseId: k
|
|
2077
2077
|
}), /* @__PURE__ */ (0, C.jsx)("div", {
|
|
2078
2078
|
className: "flex min-h-0 flex-1",
|
|
@@ -2088,9 +2088,9 @@ function Be({ background: e = rn, height: t = "100dvh", padding: n = 16, mobileP
|
|
|
2088
2088
|
Ze
|
|
2089
2089
|
]
|
|
2090
2090
|
})
|
|
2091
|
-
}) : /* @__PURE__ */ (0, C.jsx)(
|
|
2091
|
+
}) : /* @__PURE__ */ (0, C.jsx)(pt, {
|
|
2092
2092
|
value: at,
|
|
2093
|
-
children: /* @__PURE__ */ (0, C.jsxs)(
|
|
2093
|
+
children: /* @__PURE__ */ (0, C.jsxs)(_e, {
|
|
2094
2094
|
ref: T,
|
|
2095
2095
|
background: e,
|
|
2096
2096
|
height: t,
|
|
@@ -2103,67 +2103,70 @@ function Be({ background: e = rn, height: t = "100dvh", padding: n = 16, mobileP
|
|
|
2103
2103
|
children: [
|
|
2104
2104
|
it,
|
|
2105
2105
|
Ce,
|
|
2106
|
-
|
|
2106
|
+
mn ?? st,
|
|
2107
2107
|
Ze
|
|
2108
2108
|
]
|
|
2109
2109
|
})
|
|
2110
2110
|
});
|
|
2111
2111
|
}
|
|
2112
2112
|
Be.displayName = "AppShell";
|
|
2113
|
-
function Je({ width: e, expandedWidth: t =
|
|
2114
|
-
const i =
|
|
2113
|
+
function Je({ width: e, expandedWidth: t = kn, collapsedWidth: n = ct, className: r, style: a, children: o, ...c }) {
|
|
2114
|
+
const i = e === void 0;
|
|
2115
2115
|
return /* @__PURE__ */ (0, C.jsx)("div", {
|
|
2116
2116
|
"data-slot": "app-shell-sidebar",
|
|
2117
2117
|
style: {
|
|
2118
2118
|
...i ? {
|
|
2119
2119
|
"--app-shell-sidebar-collapsed": n,
|
|
2120
2120
|
"--app-shell-sidebar-expanded": t
|
|
2121
|
-
} : {
|
|
2121
|
+
} : {
|
|
2122
|
+
"--app-shell-sidebar-width": e,
|
|
2123
|
+
minWidth: ct
|
|
2124
|
+
},
|
|
2122
2125
|
...a
|
|
2123
2126
|
},
|
|
2124
|
-
className:
|
|
2127
|
+
className: Y("flex h-full shrink-0 flex-col overflow-clip", "transition-[width] duration-300 ease-[cubic-bezier(0.16,1,0.3,1)]", "motion-reduce:transition-none", i ? ["w-[var(--app-shell-sidebar-collapsed)]", "[&:has([data-state=expanded])]:w-[var(--app-shell-sidebar-expanded)]"] : "w-[var(--app-shell-sidebar-width)]", r),
|
|
2125
2128
|
...c,
|
|
2126
2129
|
children: o
|
|
2127
2130
|
});
|
|
2128
2131
|
}
|
|
2129
2132
|
Je.displayName = "AppShell.Sidebar";
|
|
2130
|
-
function
|
|
2133
|
+
function on({ className: e, children: t, ...n }) {
|
|
2131
2134
|
return /* @__PURE__ */ (0, C.jsx)("div", {
|
|
2132
2135
|
"data-slot": "app-shell-header",
|
|
2133
|
-
className:
|
|
2136
|
+
className: Y("shrink-0", e),
|
|
2134
2137
|
...n,
|
|
2135
2138
|
children: t
|
|
2136
2139
|
});
|
|
2137
2140
|
}
|
|
2138
|
-
|
|
2139
|
-
var
|
|
2141
|
+
on.displayName = "AppShell.Header";
|
|
2142
|
+
var Rr = {
|
|
2140
2143
|
transparent: "transparent",
|
|
2141
|
-
appBg:
|
|
2144
|
+
appBg: an,
|
|
2142
2145
|
neutral: "var(--muted)",
|
|
2143
2146
|
brandSubtle: "linear-gradient(135deg, var(--air-50) 0%, var(--air-100) 100%)",
|
|
2144
2147
|
brand: "linear-gradient(135deg, var(--air-400) 0%, var(--primary) 100%)",
|
|
2145
2148
|
brandDeep: "linear-gradient(135deg, var(--primary) 0%, var(--air-900) 100%)",
|
|
2146
2149
|
desertMidnight: "linear-gradient(135deg, var(--slate-500) 0%, var(--slate-700) 100%)",
|
|
2147
2150
|
aqua: "linear-gradient(135deg, var(--air-400) 0%, var(--air-600) 100%)"
|
|
2148
|
-
},
|
|
2151
|
+
}, Er = Object.assign(Be, {
|
|
2149
2152
|
Root: Be,
|
|
2150
2153
|
Sidebar: Je,
|
|
2151
|
-
Header:
|
|
2152
|
-
Panel:
|
|
2153
|
-
Content:
|
|
2154
|
-
}),
|
|
2154
|
+
Header: on,
|
|
2155
|
+
Panel: zr,
|
|
2156
|
+
Content: jn
|
|
2157
|
+
}), We = {
|
|
2155
2158
|
background: "string",
|
|
2156
2159
|
height: "string",
|
|
2157
2160
|
padding: "string",
|
|
2158
2161
|
mobilePadding: "string",
|
|
2159
2162
|
gap: "string",
|
|
2160
2163
|
connected: "boolean"
|
|
2161
|
-
},
|
|
2164
|
+
}, sn = class extends Ln {
|
|
2162
2165
|
get propDefs() {
|
|
2163
|
-
return
|
|
2166
|
+
return We;
|
|
2164
2167
|
}
|
|
2165
2168
|
static get observedAttributes() {
|
|
2166
|
-
return Object.keys(
|
|
2169
|
+
return Object.keys(We).map(Cn);
|
|
2167
2170
|
}
|
|
2168
2171
|
_renderReact() {
|
|
2169
2172
|
const e = this._readAllProps(), t = this._getSlot("sidebar"), n = this._getSlot("content") || this._getDefaultSlot(), r = [];
|
|
@@ -2177,8 +2180,8 @@ var Pr = {
|
|
|
2177
2180
|
}
|
|
2178
2181
|
}
|
|
2179
2182
|
};
|
|
2180
|
-
return v.createElement(
|
|
2181
|
-
background: e.background ||
|
|
2183
|
+
return v.createElement(Er, {
|
|
2184
|
+
background: e.background || Rr.appBg,
|
|
2182
2185
|
height: e.height || "100vh",
|
|
2183
2186
|
padding: a(e.padding) ?? 16,
|
|
2184
2187
|
mobilePadding: a(e.mobilePadding),
|
|
@@ -2187,11 +2190,11 @@ var Pr = {
|
|
|
2187
2190
|
}, ...r);
|
|
2188
2191
|
}
|
|
2189
2192
|
};
|
|
2190
|
-
|
|
2191
|
-
|
|
2193
|
+
Pn(sn, We);
|
|
2194
|
+
Rn("hf-app-shell", sn);
|
|
2192
2195
|
export {
|
|
2193
|
-
|
|
2194
|
-
|
|
2196
|
+
sn as AppShellWC,
|
|
2197
|
+
sn as default
|
|
2195
2198
|
};
|
|
2196
2199
|
|
|
2197
2200
|
//# sourceMappingURL=hf-app-shell.js.map
|