@pstdio/ui 0.23.0 → 0.24.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{MermaidComponent-BTgLnpLA.js → MermaidComponent-DSvPk-J8.js} +2 -2
- package/dist/{MermaidComponent-BTgLnpLA.js.map → MermaidComponent-DSvPk-J8.js.map} +1 -1
- package/dist/chat-ui.js +1308 -1391
- package/dist/chat-ui.js.map +1 -1
- package/dist/components/chat-ui/components/chat-input-actions.d.ts +2 -0
- package/dist/components/chat-ui/components/chat-input-question-prompt.d.ts +3 -0
- package/dist/components/chat-ui/components/chat-input.d.ts +3 -1
- package/dist/components/chat-ui/components/chat-panel.d.ts +3 -1
- package/dist/components/chat-ui/components/timeline-title.d.ts +6 -0
- package/dist/components/layout/index.d.ts +1 -0
- package/dist/components/layout/resizable-split-layout.d.ts +4 -3
- package/dist/components/layout/resizable-split-layout.handle.d.ts +6 -2
- package/dist/components/layout/resizable-split-layout.panels.d.ts +6 -2
- package/dist/components/layout/resizable-split-layout.root-size.d.ts +3 -0
- package/dist/components/primitives/index.d.ts +2 -0
- package/dist/components/tab-strip/window-tabs.d.ts +1 -0
- package/dist/data-table.js +5 -5
- package/dist/{diff-editor-BnfV8cYB.js → diff-bubble-DvUPRnfB.js} +49 -48
- package/dist/diff-bubble-DvUPRnfB.js.map +1 -0
- package/dist/diff.js +112 -112
- package/dist/diff.js.map +1 -1
- package/dist/{edit-mode-data-table-BrydKuMM.js → edit-mode-data-table-2E4GSOou.js} +4 -4
- package/dist/{edit-mode-data-table-BrydKuMM.js.map → edit-mode-data-table-2E4GSOou.js.map} +1 -1
- package/dist/index.js +1232 -1152
- package/dist/index.js.map +1 -1
- package/dist/{kanban-renderer-toolbar-ebqlG13w.js → kanban-renderer-toolbar-Dcbxujbk.js} +3 -3
- package/dist/{kanban-renderer-toolbar-ebqlG13w.js.map → kanban-renderer-toolbar-Dcbxujbk.js.map} +1 -1
- package/dist/kanban-renderer.js +8 -8
- package/dist/kanban-renderer.js.map +1 -1
- package/dist/{lazy-markdown-editor-Obb0M8xc.js → lazy-markdown-editor-DSlelhHV.js} +2 -2
- package/dist/{lazy-markdown-editor-Obb0M8xc.js.map → lazy-markdown-editor-DSlelhHV.js.map} +1 -1
- package/dist/{list-row-CRi3Luog.js → list-row-BDoV_iMV.js} +3 -3
- package/dist/list-row-BDoV_iMV.js.map +1 -0
- package/dist/{markdown-kuU19Oh3.js → markdown-Cli3KGu9.js} +4 -4
- package/dist/{markdown-kuU19Oh3.js.map → markdown-Cli3KGu9.js.map} +1 -1
- package/dist/{markdown-editor-Bj_QX4oN.js → markdown-editor-BHoRATej.js} +2 -2
- package/dist/{markdown-editor-Bj_QX4oN.js.map → markdown-editor-BHoRATej.js.map} +1 -1
- package/dist/{param-editor-DgzVeyJ0.js → param-editor-CaRflJ3e.js} +2 -2
- package/dist/{param-editor-DgzVeyJ0.js.map → param-editor-CaRflJ3e.js.map} +1 -1
- package/dist/{param-editor-field-BMvuSAP5.js → param-editor-field-DVQlXbid.js} +45 -44
- package/dist/param-editor-field-DVQlXbid.js.map +1 -0
- package/dist/{rich-message-dNYvLDd4.js → rich-message-gWYlm8Ji.js} +2 -2
- package/dist/{rich-message-dNYvLDd4.js.map → rich-message-gWYlm8Ji.js.map} +1 -1
- package/dist/rich-text.js +5 -5
- package/dist/theme/primitives/colors.d.ts +34 -0
- package/dist/theme/primitives/sizes.d.ts +9 -0
- package/dist/theme/recipes/landing-story.d.ts +10 -0
- package/dist/theme/recipes/landing-tool-demo.d.ts +1 -0
- package/dist/theme/recipes/landing.d.ts +23 -0
- package/dist/theme/recipes/resizable-split-layout.d.ts +106 -0
- package/dist/theme/recipes/window-title-bar.d.ts +3 -0
- package/dist/theme/tokens/colors-background.d.ts +260 -0
- package/dist/theme/tokens/colors-visualization.d.ts +162 -0
- package/dist/theme/tokens/colors.d.ts +2 -422
- package/dist/{theme-C0empEin.js → theme-B5OVwYEU.js} +1413 -563
- package/dist/theme-B5OVwYEU.js.map +1 -0
- package/dist/theme.js +1 -1
- package/dist/tree-list-CZvcg3_6.js +1348 -0
- package/dist/tree-list-CZvcg3_6.js.map +1 -0
- package/package.json +2 -2
- package/dist/diff-editor-BnfV8cYB.js.map +0 -1
- package/dist/list-row-CRi3Luog.js.map +0 -1
- package/dist/param-editor-field-BMvuSAP5.js.map +0 -1
- package/dist/theme-C0empEin.js.map +0 -1
- package/dist/tree-list-BHFSyvIZ.js +0 -1262
- package/dist/tree-list-BHFSyvIZ.js.map +0 -1
|
@@ -1,1262 +0,0 @@
|
|
|
1
|
-
import { jsx as S, jsxs as de, Fragment as We } from "react/jsx-runtime";
|
|
2
|
-
import { c as K } from "react/compiler-runtime";
|
|
3
|
-
import { Box as X, Flex as ke, Input as Pt, Stack as ve, Text as Et, Menu as he, IconButton as Ye, HStack as He } from "@chakra-ui/react";
|
|
4
|
-
import { useId as Lt, useRef as se, useState as ae, useEffect as pe, createContext as At, useContext as Mt } from "react";
|
|
5
|
-
import { useVirtualizer as Ot } from "@tanstack/react-virtual";
|
|
6
|
-
import { R as Ft, L as Ue, a as $t } from "./list-row-CRi3Luog.js";
|
|
7
|
-
import { ChevronRight as _t } from "lucide-react";
|
|
8
|
-
import { useSensors as tt, useSensor as nt, PointerSensor as ot, closestCenter as it, DndContext as rt } from "@dnd-kit/core";
|
|
9
|
-
import { SortableContext as st, verticalListSortingStrategy as lt, useSortable as Wt } from "@dnd-kit/sortable";
|
|
10
|
-
import { CSS as Ht } from "@dnd-kit/utilities";
|
|
11
|
-
const Vt = 72, Kt = 160, Gt = 72, dt = (t, e, o) => Math.min(Math.max(t, e), o), Bt = {
|
|
12
|
-
left: {
|
|
13
|
-
rootDirection: "row",
|
|
14
|
-
dimension: "width",
|
|
15
|
-
separatorOrientation: "vertical",
|
|
16
|
-
cursor: "col-resize",
|
|
17
|
-
pointerCoordinate: "clientX",
|
|
18
|
-
deltaDirection: 1,
|
|
19
|
-
panelFirst: !0
|
|
20
|
-
},
|
|
21
|
-
right: {
|
|
22
|
-
rootDirection: "row",
|
|
23
|
-
dimension: "width",
|
|
24
|
-
separatorOrientation: "vertical",
|
|
25
|
-
cursor: "col-resize",
|
|
26
|
-
pointerCoordinate: "clientX",
|
|
27
|
-
deltaDirection: -1,
|
|
28
|
-
panelFirst: !1
|
|
29
|
-
},
|
|
30
|
-
top: {
|
|
31
|
-
rootDirection: "column",
|
|
32
|
-
dimension: "height",
|
|
33
|
-
separatorOrientation: "horizontal",
|
|
34
|
-
cursor: "row-resize",
|
|
35
|
-
pointerCoordinate: "clientY",
|
|
36
|
-
deltaDirection: 1,
|
|
37
|
-
panelFirst: !0
|
|
38
|
-
},
|
|
39
|
-
bottom: {
|
|
40
|
-
rootDirection: "column",
|
|
41
|
-
dimension: "height",
|
|
42
|
-
separatorOrientation: "horizontal",
|
|
43
|
-
cursor: "row-resize",
|
|
44
|
-
pointerCoordinate: "clientY",
|
|
45
|
-
deltaDirection: -1,
|
|
46
|
-
panelFirst: !1
|
|
47
|
-
}
|
|
48
|
-
}, ct = (t) => Bt[t], Oe = (t) => {
|
|
49
|
-
const e = t.rootSize > 0 ? t.rootSize : t.fallbackRootSize, o = Math.max(0, e - t.contentMinSize), n = t.maxSize ?? o, i = Math.max(0, Math.min(n, o));
|
|
50
|
-
return {
|
|
51
|
-
minSize: Math.min(t.minSize, i),
|
|
52
|
-
maxSize: i
|
|
53
|
-
};
|
|
54
|
-
}, Xt = (t, e) => t === "top" || t === "bottom" ? Gt : dt(e / 2, Vt, Kt), jt = (t) => {
|
|
55
|
-
const e = ct(t.side), o = t.startSize + t.pointerDelta * e.deltaDirection, n = t.collapsible && o <= Xt(t.side, t.minSize);
|
|
56
|
-
return {
|
|
57
|
-
rawSize: o,
|
|
58
|
-
size: n ? 0 : dt(o, t.minSize, t.maxSize),
|
|
59
|
-
collapsed: n
|
|
60
|
-
};
|
|
61
|
-
}, Yt = {
|
|
62
|
-
_before: {
|
|
63
|
-
bg: "border.inverted"
|
|
64
|
-
}
|
|
65
|
-
}, Ut = (t) => {
|
|
66
|
-
const e = K(34), {
|
|
67
|
-
axis: o,
|
|
68
|
-
bounds: n,
|
|
69
|
-
collapsed: i,
|
|
70
|
-
collapsible: s,
|
|
71
|
-
contentPanelId: r,
|
|
72
|
-
resizablePanelId: l,
|
|
73
|
-
resizeHandleSizePx: c,
|
|
74
|
-
resizeLabel: d,
|
|
75
|
-
resolvedPanelSize: m,
|
|
76
|
-
showResizeSeparator: f,
|
|
77
|
-
onResizeKeyDown: x,
|
|
78
|
-
onResizeStart: h
|
|
79
|
-
} = t, u = o.separatorOrientation === "vertical", p = `${c}px`, g = `${c / -2}px`;
|
|
80
|
-
let b;
|
|
81
|
-
e[0] !== f || e[1] !== u ? (b = u ? {
|
|
82
|
-
content: '""',
|
|
83
|
-
position: "absolute",
|
|
84
|
-
top: 0,
|
|
85
|
-
bottom: 0,
|
|
86
|
-
insetInlineStart: "50%",
|
|
87
|
-
w: "1px",
|
|
88
|
-
bg: f ? "border" : "transparent",
|
|
89
|
-
transform: "translateX(-50%)"
|
|
90
|
-
} : {
|
|
91
|
-
content: '""',
|
|
92
|
-
position: "absolute",
|
|
93
|
-
insetInline: 0,
|
|
94
|
-
top: "50%",
|
|
95
|
-
h: "1px",
|
|
96
|
-
bg: f ? "border" : "transparent",
|
|
97
|
-
transform: "translateY(-50%)"
|
|
98
|
-
}, e[0] = f, e[1] = u, e[2] = b) : b = e[2];
|
|
99
|
-
const v = b, R = o.separatorOrientation, I = `${l} ${r}`;
|
|
100
|
-
let w;
|
|
101
|
-
e[3] !== n.minSize || e[4] !== s ? (w = s ? 0 : Math.round(n.minSize), e[3] = n.minSize, e[4] = s, e[5] = w) : w = e[5];
|
|
102
|
-
let N;
|
|
103
|
-
e[6] !== n.maxSize ? (N = Math.round(n.maxSize), e[6] = n.maxSize, e[7] = N) : N = e[7];
|
|
104
|
-
let y;
|
|
105
|
-
e[8] !== m ? (y = Math.round(m), e[8] = m, e[9] = y) : y = e[9];
|
|
106
|
-
const C = i ? !0 : void 0, k = i ? -1 : 0, a = i ? "none" : void 0, z = `0 0 ${p}`, D = u ? "full" : p, P = u ? p : "full", F = u ? g : void 0, O = u ? void 0 : g, G = f ? Yt : void 0, $ = u ? void 0 : "2px", H = u ? "2px" : void 0;
|
|
107
|
-
let _;
|
|
108
|
-
e[10] !== $ || e[11] !== H ? (_ = {
|
|
109
|
-
_before: {
|
|
110
|
-
bg: "colorPalette.focusRing",
|
|
111
|
-
h: $,
|
|
112
|
-
w: H
|
|
113
|
-
}
|
|
114
|
-
}, e[10] = $, e[11] = H, e[12] = _) : _ = e[12];
|
|
115
|
-
let j;
|
|
116
|
-
return e[13] !== o.cursor || e[14] !== o.separatorOrientation || e[15] !== x || e[16] !== h || e[17] !== d || e[18] !== v || e[19] !== D || e[20] !== P || e[21] !== F || e[22] !== O || e[23] !== G || e[24] !== _ || e[25] !== I || e[26] !== w || e[27] !== N || e[28] !== y || e[29] !== C || e[30] !== k || e[31] !== a || e[32] !== z ? (j = /* @__PURE__ */ S(X, { role: "separator", "aria-label": d, "aria-orientation": R, "aria-controls": I, "aria-valuemin": w, "aria-valuemax": N, "aria-valuenow": y, "aria-hidden": C, tabIndex: k, display: a, position: "relative", zIndex: "docked", flex: z, h: D, w: P, mx: F, my: O, cursor: o.cursor, touchAction: "none", outline: "none", onPointerDown: h, onKeyDown: x, _before: v, _hover: G, _focusVisible: _ }), e[13] = o.cursor, e[14] = o.separatorOrientation, e[15] = x, e[16] = h, e[17] = d, e[18] = v, e[19] = D, e[20] = P, e[21] = F, e[22] = O, e[23] = G, e[24] = _, e[25] = I, e[26] = w, e[27] = N, e[28] = y, e[29] = C, e[30] = k, e[31] = a, e[32] = z, e[33] = j) : j = e[33], j;
|
|
117
|
-
}, qt = (t) => {
|
|
118
|
-
const e = K(34), {
|
|
119
|
-
axis: o,
|
|
120
|
-
bounds: n,
|
|
121
|
-
collapsed: i,
|
|
122
|
-
collapsible: s,
|
|
123
|
-
contentPanel: r,
|
|
124
|
-
contentPanelId: l,
|
|
125
|
-
contentPanelRef: c,
|
|
126
|
-
resizablePanel: d,
|
|
127
|
-
resizablePanelId: m,
|
|
128
|
-
resizablePanelRef: f,
|
|
129
|
-
resizeHandleSizePx: x,
|
|
130
|
-
resizeLabel: h,
|
|
131
|
-
resolvedPanelSize: u,
|
|
132
|
-
showResizeSeparator: p,
|
|
133
|
-
onResizeKeyDown: g,
|
|
134
|
-
onResizeStart: b
|
|
135
|
-
} = t, v = i ? "none" : "flex", R = o.dimension === "height" ? `${u}px` : "full", I = `0 0 ${u}px`, w = o.dimension === "width" ? `${u}px` : "full", N = i ? !0 : void 0;
|
|
136
|
-
let y;
|
|
137
|
-
e[0] !== d || e[1] !== m || e[2] !== f || e[3] !== v || e[4] !== R || e[5] !== I || e[6] !== w || e[7] !== N ? (y = /* @__PURE__ */ S(ke, { id: m, ref: f, display: v, h: R, minW: "0", minH: "0", overflow: "hidden", flex: I, w, "aria-hidden": N, children: d }, "resizable-panel"), e[0] = d, e[1] = m, e[2] = f, e[3] = v, e[4] = R, e[5] = I, e[6] = w, e[7] = N, e[8] = y) : y = e[8];
|
|
138
|
-
const C = y;
|
|
139
|
-
let k;
|
|
140
|
-
e[9] !== r || e[10] !== l || e[11] !== c ? (k = /* @__PURE__ */ S(ke, { id: l, ref: c, display: "flex", h: "full", minW: "0", minH: "0", overflow: "hidden", flex: "1", children: r }, "content-panel"), e[9] = r, e[10] = l, e[11] = c, e[12] = k) : k = e[12];
|
|
141
|
-
const a = k;
|
|
142
|
-
let z;
|
|
143
|
-
e[13] !== o || e[14] !== n || e[15] !== i || e[16] !== s || e[17] !== l || e[18] !== g || e[19] !== b || e[20] !== m || e[21] !== x || e[22] !== h || e[23] !== u || e[24] !== p ? (z = /* @__PURE__ */ S(Ut, { axis: o, bounds: n, collapsed: i, collapsible: s, contentPanelId: l, resizablePanelId: m, resizeHandleSizePx: x, resizeLabel: h, resolvedPanelSize: u, showResizeSeparator: p, onResizeKeyDown: g, onResizeStart: b }, "resize-handle"), e[13] = o, e[14] = n, e[15] = i, e[16] = s, e[17] = l, e[18] = g, e[19] = b, e[20] = m, e[21] = x, e[22] = h, e[23] = u, e[24] = p, e[25] = z) : z = e[25];
|
|
144
|
-
const D = z;
|
|
145
|
-
if (o.panelFirst) {
|
|
146
|
-
let F;
|
|
147
|
-
return e[26] !== a || e[27] !== C || e[28] !== D ? (F = /* @__PURE__ */ de(We, { children: [
|
|
148
|
-
C,
|
|
149
|
-
D,
|
|
150
|
-
a
|
|
151
|
-
] }), e[26] = a, e[27] = C, e[28] = D, e[29] = F) : F = e[29], F;
|
|
152
|
-
}
|
|
153
|
-
let P;
|
|
154
|
-
return e[30] !== a || e[31] !== C || e[32] !== D ? (P = /* @__PURE__ */ de(We, { children: [
|
|
155
|
-
a,
|
|
156
|
-
D,
|
|
157
|
-
C
|
|
158
|
-
] }), e[30] = a, e[31] = C, e[32] = D, e[33] = P) : P = e[33], P;
|
|
159
|
-
}, Fe = {
|
|
160
|
-
width: 1200,
|
|
161
|
-
height: 720
|
|
162
|
-
}, qe = 24, $e = (t, e, o) => Math.min(Math.max(t, e), o), _e = (t, e) => t?.getBoundingClientRect()[e] ?? 0, Ze = (t, e, o) => {
|
|
163
|
-
t && (t.style[o] = `${e}px`, t.style.flexBasis = `${e}px`, t.style.flexGrow = "0", t.style.flexShrink = "0", t.style.display = e > 0 ? "flex" : "none");
|
|
164
|
-
}, Je = (t) => {
|
|
165
|
-
t && (t.style.width = "", t.style.height = "", t.style.flexBasis = "", t.style.flexGrow = "", t.style.flexShrink = "", t.style.display = "");
|
|
166
|
-
}, Hn = (t) => {
|
|
167
|
-
const e = K(91);
|
|
168
|
-
let o, n, i, s, r, l, c, d, m, f, x, h, u, p, g;
|
|
169
|
-
e[0] !== t ? ({
|
|
170
|
-
resizablePanel: l,
|
|
171
|
-
contentPanel: o,
|
|
172
|
-
resizableSide: d,
|
|
173
|
-
defaultSizePx: m,
|
|
174
|
-
minSizePx: f,
|
|
175
|
-
maxSizePx: i,
|
|
176
|
-
contentMinSizePx: x,
|
|
177
|
-
collapsed: n,
|
|
178
|
-
collapsible: h,
|
|
179
|
-
resizeLabel: u,
|
|
180
|
-
resizeHandleSizePx: p,
|
|
181
|
-
showResizeSeparator: g,
|
|
182
|
-
onSizeChange: r,
|
|
183
|
-
onCollapsedChange: s,
|
|
184
|
-
...c
|
|
185
|
-
} = t, e[0] = t, e[1] = o, e[2] = n, e[3] = i, e[4] = s, e[5] = r, e[6] = l, e[7] = c, e[8] = d, e[9] = m, e[10] = f, e[11] = x, e[12] = h, e[13] = u, e[14] = p, e[15] = g) : (o = e[1], n = e[2], i = e[3], s = e[4], r = e[5], l = e[6], c = e[7], d = e[8], m = e[9], f = e[10], x = e[11], h = e[12], u = e[13], p = e[14], g = e[15]);
|
|
186
|
-
const b = d === void 0 ? "left" : d, v = m === void 0 ? 240 : m, R = f === void 0 ? 200 : f, I = x === void 0 ? 0 : x, w = h === void 0 ? !0 : h, N = u === void 0 ? "Resize panel" : u, y = p === void 0 ? 12 : p, C = g === void 0 ? !0 : g;
|
|
187
|
-
let k;
|
|
188
|
-
e[16] !== b ? (k = ct(b), e[16] = b, e[17] = k) : k = e[17];
|
|
189
|
-
const a = k, z = Lt(), D = se(null), P = se(null), F = se(null), O = se(Zt), G = se(v), [$, H] = ae(v), [_, j] = ae(0), [Q, Y] = ae(!1), E = n ?? Q;
|
|
190
|
-
let M, B;
|
|
191
|
-
e[18] !== a.dimension || e[19] !== E || e[20] !== I || e[21] !== i || e[22] !== R || e[23] !== $ || e[24] !== _ ? (M = Oe({
|
|
192
|
-
rootSize: _,
|
|
193
|
-
fallbackRootSize: Fe[a.dimension],
|
|
194
|
-
minSize: R,
|
|
195
|
-
maxSize: i,
|
|
196
|
-
contentMinSize: I
|
|
197
|
-
}), B = E ? 0 : $e($, M.minSize, M.maxSize), e[18] = a.dimension, e[19] = E, e[20] = I, e[21] = i, e[22] = R, e[23] = $, e[24] = _, e[25] = M, e[26] = B) : (M = e[25], B = e[26]);
|
|
198
|
-
const A = B, W = `${z}-content`, ee = `${z}-resizable`;
|
|
199
|
-
let Z, oe;
|
|
200
|
-
e[27] !== a.dimension ? (Z = () => {
|
|
201
|
-
const T = D.current;
|
|
202
|
-
if (!T)
|
|
203
|
-
return;
|
|
204
|
-
const U = () => {
|
|
205
|
-
j(T.getBoundingClientRect()[a.dimension]);
|
|
206
|
-
};
|
|
207
|
-
if (U(), typeof ResizeObserver > "u")
|
|
208
|
-
return;
|
|
209
|
-
const V = new ResizeObserver(U);
|
|
210
|
-
return V.observe(T), () => {
|
|
211
|
-
V.disconnect();
|
|
212
|
-
};
|
|
213
|
-
}, oe = [a.dimension], e[27] = a.dimension, e[28] = Z, e[29] = oe) : (Z = e[28], oe = e[29]), pe(Z, oe);
|
|
214
|
-
let ie, te;
|
|
215
|
-
e[30] !== v ? (ie = () => {
|
|
216
|
-
G.current = v, H(v);
|
|
217
|
-
}, te = [v], e[30] = v, e[31] = ie, e[32] = te) : (ie = e[31], te = e[32]), pe(ie, te);
|
|
218
|
-
let L, q;
|
|
219
|
-
e[33] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (L = () => () => O.current(), q = [], e[33] = L, e[34] = q) : (L = e[33], q = e[34]), pe(L, q);
|
|
220
|
-
let ue;
|
|
221
|
-
e[35] !== a.dimension ? (ue = (T) => {
|
|
222
|
-
Ze(P.current, T, a.dimension);
|
|
223
|
-
}, e[35] = a.dimension, e[36] = ue) : ue = e[36];
|
|
224
|
-
const ne = ue;
|
|
225
|
-
let Ie, we;
|
|
226
|
-
e[37] !== a.dimension || e[38] !== A ? (Ie = () => {
|
|
227
|
-
Je(F.current), Je(P.current), Ze(P.current, A, a.dimension);
|
|
228
|
-
}, we = [a.dimension, A], e[37] = a.dimension, e[38] = A, e[39] = Ie, e[40] = we) : (Ie = e[39], we = e[40]), pe(Ie, we);
|
|
229
|
-
let be;
|
|
230
|
-
e[41] !== ne || e[42] !== a.dimension || e[43] !== I || e[44] !== i || e[45] !== R || e[46] !== r ? (be = (T) => {
|
|
231
|
-
const U = Oe({
|
|
232
|
-
rootSize: _e(D.current, a.dimension),
|
|
233
|
-
fallbackRootSize: Fe[a.dimension],
|
|
234
|
-
minSize: R,
|
|
235
|
-
maxSize: i,
|
|
236
|
-
contentMinSize: I
|
|
237
|
-
}), V = $e(T, U.minSize, U.maxSize);
|
|
238
|
-
G.current = V, H(V), ne(V), r?.(V);
|
|
239
|
-
}, e[41] = ne, e[42] = a.dimension, e[43] = I, e[44] = i, e[45] = R, e[46] = r, e[47] = be) : be = e[47];
|
|
240
|
-
const J = be;
|
|
241
|
-
let Re;
|
|
242
|
-
e[48] !== n || e[49] !== s ? (Re = (T) => {
|
|
243
|
-
n === void 0 && Y(T), s?.(T);
|
|
244
|
-
}, e[48] = n, e[49] = s, e[50] = Re) : Re = e[50];
|
|
245
|
-
const re = Re;
|
|
246
|
-
let ze;
|
|
247
|
-
e[51] !== ne || e[52] !== a.cursor || e[53] !== a.dimension || e[54] !== a.pointerCoordinate || e[55] !== E || e[56] !== w || e[57] !== J || e[58] !== I || e[59] !== i || e[60] !== R || e[61] !== b || e[62] !== re ? (ze = (T) => {
|
|
248
|
-
if (T.button !== 0 || E && !w)
|
|
249
|
-
return;
|
|
250
|
-
T.preventDefault(), O.current();
|
|
251
|
-
const U = T.currentTarget, V = Oe({
|
|
252
|
-
rootSize: _e(D.current, a.dimension),
|
|
253
|
-
fallbackRootSize: Fe[a.dimension],
|
|
254
|
-
minSize: R,
|
|
255
|
-
maxSize: i,
|
|
256
|
-
contentMinSize: I
|
|
257
|
-
}), xe = T[a.pointerCoordinate], Ae = E ? 0 : _e(P.current, a.dimension) || G.current, kt = document.body.style.cursor, Ct = document.body.style.userSelect;
|
|
258
|
-
let Me = Ae === 0 ? 0 : $e(Ae, V.minSize, V.maxSize), Ge = E, me = 0;
|
|
259
|
-
const Be = (De) => {
|
|
260
|
-
P.current && (P.current.style.pointerEvents = De), F.current && (F.current.style.pointerEvents = De);
|
|
261
|
-
}, Tt = () => {
|
|
262
|
-
me || (me = window.requestAnimationFrame(() => {
|
|
263
|
-
me = 0, ne(Me);
|
|
264
|
-
}));
|
|
265
|
-
}, Xe = (De) => {
|
|
266
|
-
const je = jt({
|
|
267
|
-
side: b,
|
|
268
|
-
startSize: Ae,
|
|
269
|
-
pointerDelta: De[a.pointerCoordinate] - xe,
|
|
270
|
-
minSize: V.minSize,
|
|
271
|
-
maxSize: V.maxSize,
|
|
272
|
-
collapsible: w
|
|
273
|
-
});
|
|
274
|
-
Ge = je.collapsed, Me = je.size, Tt();
|
|
275
|
-
}, ce = () => {
|
|
276
|
-
window.removeEventListener("pointermove", Xe), window.removeEventListener("pointerup", ce), window.removeEventListener("pointercancel", ce), window.removeEventListener("blur", ce), document.body.style.cursor = kt, document.body.style.userSelect = Ct, U.hasPointerCapture(T.pointerId) && U.releasePointerCapture(T.pointerId), Be(""), me && (window.cancelAnimationFrame(me), me = 0), O.current = Jt, Ge ? (ne(0), re(!0)) : (re(!1), J(Me));
|
|
277
|
-
};
|
|
278
|
-
O.current = ce, U.setPointerCapture(T.pointerId), document.body.style.cursor = a.cursor, document.body.style.userSelect = "none", Be("none"), window.addEventListener("pointermove", Xe), window.addEventListener("pointerup", ce, {
|
|
279
|
-
once: !0
|
|
280
|
-
}), window.addEventListener("pointercancel", ce, {
|
|
281
|
-
once: !0
|
|
282
|
-
}), window.addEventListener("blur", ce, {
|
|
283
|
-
once: !0
|
|
284
|
-
});
|
|
285
|
-
}, e[51] = ne, e[52] = a.cursor, e[53] = a.dimension, e[54] = a.pointerCoordinate, e[55] = E, e[56] = w, e[57] = J, e[58] = I, e[59] = i, e[60] = R, e[61] = b, e[62] = re, e[63] = ze) : ze = e[63];
|
|
286
|
-
const Ee = ze;
|
|
287
|
-
let ye;
|
|
288
|
-
e[64] !== a.deltaDirection || e[65] !== a.dimension || e[66] !== M || e[67] !== E || e[68] !== w || e[69] !== J || e[70] !== re ? (ye = (T) => {
|
|
289
|
-
const U = a.dimension === "width" ? "ArrowLeft" : "ArrowUp", V = a.dimension === "width" ? "ArrowRight" : "ArrowDown", xe = G.current;
|
|
290
|
-
E && (T.key === U || T.key === V || T.key === "End") ? (T.preventDefault(), re(!1), J(xe)) : T.key === U ? (T.preventDefault(), J(xe - qe * a.deltaDirection)) : T.key === V ? (T.preventDefault(), J(xe + qe * a.deltaDirection)) : T.key === "Home" ? (T.preventDefault(), w ? re(!0) : J(M.minSize)) : T.key === "End" && (T.preventDefault(), J(M.maxSize));
|
|
291
|
-
}, e[64] = a.deltaDirection, e[65] = a.dimension, e[66] = M, e[67] = E, e[68] = w, e[69] = J, e[70] = re, e[71] = ye) : ye = e[71];
|
|
292
|
-
const Le = ye;
|
|
293
|
-
let fe;
|
|
294
|
-
e[72] !== a || e[73] !== M || e[74] !== E || e[75] !== w || e[76] !== o || e[77] !== W || e[78] !== Le || e[79] !== Ee || e[80] !== l || e[81] !== ee || e[82] !== y || e[83] !== N || e[84] !== A || e[85] !== C ? (fe = /* @__PURE__ */ S(qt, { axis: a, bounds: M, collapsed: E, collapsible: w, contentPanel: o, contentPanelId: W, contentPanelRef: F, resizablePanel: l, resizablePanelId: ee, resizablePanelRef: P, resizeHandleSizePx: y, resizeLabel: N, resolvedPanelSize: A, showResizeSeparator: C, onResizeKeyDown: Le, onResizeStart: Ee }), e[72] = a, e[73] = M, e[74] = E, e[75] = w, e[76] = o, e[77] = W, e[78] = Le, e[79] = Ee, e[80] = l, e[81] = ee, e[82] = y, e[83] = N, e[84] = A, e[85] = C, e[86] = fe) : fe = e[86];
|
|
295
|
-
let Ne;
|
|
296
|
-
return e[87] !== a.rootDirection || e[88] !== c || e[89] !== fe ? (Ne = /* @__PURE__ */ S(ke, { ref: D, direction: a.rootDirection, h: "full", w: "full", overflow: "hidden", ...c, children: fe }), e[87] = a.rootDirection, e[88] = c, e[89] = fe, e[90] = Ne) : Ne = e[90], Ne;
|
|
297
|
-
};
|
|
298
|
-
function Zt() {
|
|
299
|
-
}
|
|
300
|
-
function Jt() {
|
|
301
|
-
}
|
|
302
|
-
const Qt = (t) => {
|
|
303
|
-
const e = K(8), {
|
|
304
|
-
actions: o,
|
|
305
|
-
children: n
|
|
306
|
-
} = t;
|
|
307
|
-
let i;
|
|
308
|
-
e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (i = /* @__PURE__ */ S(X, { position: "absolute", inset: "0", zIndex: 0, "aria-hidden": !0, "data-tree-list-background": "true" }), e[0] = i) : i = e[0];
|
|
309
|
-
let s;
|
|
310
|
-
e[1] !== o ? (s = /* @__PURE__ */ S(Ft, { actions: o, closeOnSelect: !1, children: i }), e[1] = o, e[2] = s) : s = e[2];
|
|
311
|
-
let r;
|
|
312
|
-
e[3] !== n ? (r = /* @__PURE__ */ S(X, { position: "relative", zIndex: 1, w: "full", minW: "0", maxW: "full", children: n }), e[3] = n, e[4] = r) : r = e[4];
|
|
313
|
-
let l;
|
|
314
|
-
return e[5] !== s || e[6] !== r ? (l = /* @__PURE__ */ de(X, { position: "relative", flex: "1 0 auto", minH: "full", w: "full", minW: "0", maxW: "full", children: [
|
|
315
|
-
s,
|
|
316
|
-
r
|
|
317
|
-
] }), e[5] = s, e[6] = r, e[7] = l) : l = e[7], l;
|
|
318
|
-
}, Pe = (t, e) => e.includes(t), en = (t, e) => Array.isArray(e) ? e.includes(t) : e === t, tn = (t) => t.isNavigable || t.navigationIntent !== void 0, at = (t) => t.children ?? [], ut = (t) => at(t).length > 0 || t.isContainer === !0, ft = (t) => {
|
|
319
|
-
const {
|
|
320
|
-
rows: e,
|
|
321
|
-
sectionId: o,
|
|
322
|
-
nodes: n,
|
|
323
|
-
expandedNodeIds: i,
|
|
324
|
-
level: s,
|
|
325
|
-
parentNodeId: r
|
|
326
|
-
} = t;
|
|
327
|
-
for (const l of n) {
|
|
328
|
-
e.push({
|
|
329
|
-
kind: "node",
|
|
330
|
-
key: `${o}:${l.id}`,
|
|
331
|
-
sectionId: o,
|
|
332
|
-
node: l,
|
|
333
|
-
level: s,
|
|
334
|
-
parentNodeId: r
|
|
335
|
-
});
|
|
336
|
-
const c = at(l);
|
|
337
|
-
c.length === 0 || !Pe(l.id, i) || ft({
|
|
338
|
-
rows: e,
|
|
339
|
-
sectionId: o,
|
|
340
|
-
nodes: c,
|
|
341
|
-
expandedNodeIds: i,
|
|
342
|
-
level: s + 1,
|
|
343
|
-
parentNodeId: l.id
|
|
344
|
-
});
|
|
345
|
-
}
|
|
346
|
-
}, mt = (t, e, o) => {
|
|
347
|
-
const n = [];
|
|
348
|
-
for (const i of t) {
|
|
349
|
-
const s = i.collapsible !== !1 && i.label !== void 0, r = s ? Pe(i.id, e) : !0;
|
|
350
|
-
if (i.label && n.push({
|
|
351
|
-
kind: "section-header",
|
|
352
|
-
key: `header:${i.id}`,
|
|
353
|
-
sectionId: i.id,
|
|
354
|
-
section: i,
|
|
355
|
-
collapsible: s,
|
|
356
|
-
expanded: r
|
|
357
|
-
}), !!r) {
|
|
358
|
-
if (i.nodes.length === 0) {
|
|
359
|
-
i.emptyState && n.push({
|
|
360
|
-
kind: "section-empty",
|
|
361
|
-
key: `empty:${i.id}`,
|
|
362
|
-
sectionId: i.id,
|
|
363
|
-
emptyState: i.emptyState
|
|
364
|
-
});
|
|
365
|
-
continue;
|
|
366
|
-
}
|
|
367
|
-
ft({
|
|
368
|
-
rows: n,
|
|
369
|
-
sectionId: i.id,
|
|
370
|
-
nodes: i.nodes,
|
|
371
|
-
expandedNodeIds: o,
|
|
372
|
-
level: 0
|
|
373
|
-
});
|
|
374
|
-
}
|
|
375
|
-
}
|
|
376
|
-
return n;
|
|
377
|
-
}, Se = (t) => t.kind === "node" ? t.node.id : t.key, pt = (t) => t.kind === "node" ? t.node.disabled !== !0 : t.kind === "section-header" && t.collapsible, Ve = (t) => t.filter(pt), gt = (t, e, o) => {
|
|
378
|
-
const n = Ve(o), i = new Set(n.map(Se));
|
|
379
|
-
if (t && i.has(t)) return t;
|
|
380
|
-
const r = (Array.isArray(e) ? e : e ? [e] : []).find((c) => i.has(c));
|
|
381
|
-
if (r) return r;
|
|
382
|
-
const l = n[0];
|
|
383
|
-
return l ? Se(l) : void 0;
|
|
384
|
-
}, nn = (t) => {
|
|
385
|
-
const {
|
|
386
|
-
row: e,
|
|
387
|
-
focusableRows: o,
|
|
388
|
-
currentIndex: n,
|
|
389
|
-
key: i
|
|
390
|
-
} = t;
|
|
391
|
-
if (i === "Enter" || i === " ") return {
|
|
392
|
-
type: "toggle-section",
|
|
393
|
-
sectionId: e.sectionId
|
|
394
|
-
};
|
|
395
|
-
if (i === "ArrowRight") {
|
|
396
|
-
if (!e.expanded) return {
|
|
397
|
-
type: "toggle-section",
|
|
398
|
-
sectionId: e.sectionId
|
|
399
|
-
};
|
|
400
|
-
const s = o[n + 1];
|
|
401
|
-
return s?.kind === "node" && s.sectionId === e.sectionId ? {
|
|
402
|
-
type: "focus",
|
|
403
|
-
rowId: s.node.id
|
|
404
|
-
} : null;
|
|
405
|
-
}
|
|
406
|
-
return i === "ArrowLeft" && e.expanded ? {
|
|
407
|
-
type: "toggle-section",
|
|
408
|
-
sectionId: e.sectionId
|
|
409
|
-
} : null;
|
|
410
|
-
}, on = (t) => {
|
|
411
|
-
const {
|
|
412
|
-
row: e,
|
|
413
|
-
focusableRows: o,
|
|
414
|
-
currentIndex: n,
|
|
415
|
-
expandedNodeIds: i,
|
|
416
|
-
key: s
|
|
417
|
-
} = t, r = Pe(e.node.id, i), l = ut(e.node);
|
|
418
|
-
if (s === "ArrowRight") {
|
|
419
|
-
if (!l) return null;
|
|
420
|
-
if (!r) return {
|
|
421
|
-
type: "toggle-node",
|
|
422
|
-
nodeId: e.node.id
|
|
423
|
-
};
|
|
424
|
-
const c = o[n + 1];
|
|
425
|
-
return c?.kind === "node" && c.parentNodeId === e.node.id ? {
|
|
426
|
-
type: "focus",
|
|
427
|
-
rowId: c.node.id
|
|
428
|
-
} : null;
|
|
429
|
-
}
|
|
430
|
-
if (s === "ArrowLeft") {
|
|
431
|
-
if (l && r) return {
|
|
432
|
-
type: "toggle-node",
|
|
433
|
-
nodeId: e.node.id
|
|
434
|
-
};
|
|
435
|
-
if (e.parentNodeId) return {
|
|
436
|
-
type: "focus",
|
|
437
|
-
rowId: e.parentNodeId
|
|
438
|
-
};
|
|
439
|
-
}
|
|
440
|
-
return null;
|
|
441
|
-
}, rn = (t) => {
|
|
442
|
-
const {
|
|
443
|
-
rows: e,
|
|
444
|
-
focusedRowId: o,
|
|
445
|
-
activeNodeId: n,
|
|
446
|
-
expandedNodeIds: i,
|
|
447
|
-
key: s
|
|
448
|
-
} = t, r = Ve(e);
|
|
449
|
-
if (r.length === 0) return null;
|
|
450
|
-
const l = gt(o, n, e), c = Math.max(0, r.findIndex((f) => Se(f) === l)), d = r[c];
|
|
451
|
-
if (!d) return null;
|
|
452
|
-
const m = (f) => {
|
|
453
|
-
const x = Math.min(Math.max(f, 0), r.length - 1);
|
|
454
|
-
return {
|
|
455
|
-
type: "focus",
|
|
456
|
-
rowId: Se(r[x])
|
|
457
|
-
};
|
|
458
|
-
};
|
|
459
|
-
return s === "ArrowDown" ? m(c + 1) : s === "ArrowUp" ? m(c - 1) : s === "Home" ? m(0) : s === "End" ? m(r.length - 1) : d.kind === "section-header" ? nn({
|
|
460
|
-
row: d,
|
|
461
|
-
focusableRows: r,
|
|
462
|
-
currentIndex: c,
|
|
463
|
-
key: s
|
|
464
|
-
}) : on({
|
|
465
|
-
row: d,
|
|
466
|
-
focusableRows: r,
|
|
467
|
-
currentIndex: c,
|
|
468
|
-
expandedNodeIds: i,
|
|
469
|
-
key: s
|
|
470
|
-
});
|
|
471
|
-
}, St = "application/x-pstdio-tree-node", sn = (t, e) => {
|
|
472
|
-
t.setData(St, e);
|
|
473
|
-
}, xt = (t) => t.getData(St) || void 0, ln = (t) => {
|
|
474
|
-
const e = K(8), {
|
|
475
|
-
children: o,
|
|
476
|
-
onMoveNode: n
|
|
477
|
-
} = t;
|
|
478
|
-
let i;
|
|
479
|
-
e[0] !== n ? (i = (d) => {
|
|
480
|
-
n && (d.preventDefault(), d.dataTransfer.dropEffect = "move");
|
|
481
|
-
}, e[0] = n, e[1] = i) : i = e[1];
|
|
482
|
-
const s = i;
|
|
483
|
-
let r;
|
|
484
|
-
e[2] !== n ? (r = (d) => {
|
|
485
|
-
if (!n)
|
|
486
|
-
return;
|
|
487
|
-
d.preventDefault();
|
|
488
|
-
const m = xt(d.dataTransfer);
|
|
489
|
-
m && n(m);
|
|
490
|
-
}, e[2] = n, e[3] = r) : r = e[3];
|
|
491
|
-
const l = r;
|
|
492
|
-
let c;
|
|
493
|
-
return e[4] !== o || e[5] !== s || e[6] !== l ? (c = /* @__PURE__ */ S(X, { p: "xs", w: "full", minW: "0", maxW: "full", minH: "full", flex: "1 0 auto", onDragOver: s, onDrop: l, children: o }), e[4] = o, e[5] = s, e[6] = l, e[7] = c) : c = e[7], c;
|
|
494
|
-
}, dn = (t) => t <= 0 ? "sm" : `calc(var(--chakra-spacing-1) + ${t} * 12px)`, cn = (t) => {
|
|
495
|
-
const {
|
|
496
|
-
input: e,
|
|
497
|
-
icon: o,
|
|
498
|
-
level: n
|
|
499
|
-
} = t, [i, s] = ae(e.defaultValue ?? ""), [r, l] = ae(), c = se(null), d = se(!1), m = async () => {
|
|
500
|
-
if (!d.current) {
|
|
501
|
-
d.current = !0, l(void 0);
|
|
502
|
-
try {
|
|
503
|
-
await e.onCommit(i.trim());
|
|
504
|
-
} catch (f) {
|
|
505
|
-
l(f instanceof Error ? f.message : "Could not create file."), queueMicrotask(() => c.current?.focus());
|
|
506
|
-
} finally {
|
|
507
|
-
d.current = !1;
|
|
508
|
-
}
|
|
509
|
-
}
|
|
510
|
-
};
|
|
511
|
-
return /* @__PURE__ */ de(ke, { h: "1.75rem", w: "full", minW: "0", alignItems: "center", gap: "1", pr: "sm", pl: dn(n), onMouseDown: (f) => f.stopPropagation(), children: [
|
|
512
|
-
o ? /* @__PURE__ */ S(X, { boxSize: "16px", color: "fg.muted", flexShrink: 0, display: "inline-flex", alignItems: "center", justifyContent: "center", css: {
|
|
513
|
-
"& > svg": {
|
|
514
|
-
width: "16px",
|
|
515
|
-
height: "16px"
|
|
516
|
-
}
|
|
517
|
-
}, children: o }) : null,
|
|
518
|
-
/* @__PURE__ */ S(Pt, { ref: c, autoFocus: !0, size: "xs", value: i, "aria-label": e.ariaLabel, "aria-invalid": !!r || void 0, placeholder: e.placeholder, title: r, onChange: (f) => s(f.currentTarget.value), onBlur: () => {
|
|
519
|
-
d.current || e.onCancel?.();
|
|
520
|
-
}, onKeyDown: (f) => {
|
|
521
|
-
f.stopPropagation(), f.key === "Enter" && (f.preventDefault(), m()), f.key === "Escape" && !d.current && (f.preventDefault(), e.onCancel?.());
|
|
522
|
-
} })
|
|
523
|
-
] });
|
|
524
|
-
}, ht = (t) => {
|
|
525
|
-
const e = K(69), {
|
|
526
|
-
sectionId: o,
|
|
527
|
-
node: n,
|
|
528
|
-
level: i,
|
|
529
|
-
expandedNodeIds: s,
|
|
530
|
-
activeNodeId: r,
|
|
531
|
-
rowVariant: l,
|
|
532
|
-
nodeGap: c,
|
|
533
|
-
linkComponent: d,
|
|
534
|
-
tabIndex: m,
|
|
535
|
-
onFocus: f,
|
|
536
|
-
onNavigate: x,
|
|
537
|
-
onToggleNode: h,
|
|
538
|
-
onMoveNode: u
|
|
539
|
-
} = t;
|
|
540
|
-
if (n.inlineInput) {
|
|
541
|
-
let L;
|
|
542
|
-
return e[0] !== i || e[1] !== n.icon || e[2] !== n.inlineInput ? (L = /* @__PURE__ */ S(cn, { input: n.inlineInput, icon: n.icon, level: i }), e[0] = i, e[1] = n.icon, e[2] = n.inlineInput, e[3] = L) : L = e[3], L;
|
|
543
|
-
}
|
|
544
|
-
let p;
|
|
545
|
-
e[4] !== n ? (p = ut(n), e[4] = n, e[5] = p) : p = e[5];
|
|
546
|
-
const g = p;
|
|
547
|
-
let b;
|
|
548
|
-
e[6] !== s || e[7] !== g || e[8] !== n.id ? (b = g && Pe(n.id, s), e[6] = s, e[7] = g, e[8] = n.id, e[9] = b) : b = e[9];
|
|
549
|
-
const v = b;
|
|
550
|
-
let R;
|
|
551
|
-
e[10] !== r || e[11] !== n.id ? (R = en(n.id, r), e[10] = r, e[11] = n.id, e[12] = R) : R = e[12];
|
|
552
|
-
const I = R, w = n.disabled === !0;
|
|
553
|
-
let N;
|
|
554
|
-
e[13] !== n ? (N = tn(n), e[13] = n, e[14] = N) : N = e[14];
|
|
555
|
-
const y = N, C = !!(d && n.href && y && !g && !w);
|
|
556
|
-
let k;
|
|
557
|
-
e[15] !== g || e[16] !== w || e[17] !== y || e[18] !== n || e[19] !== x || e[20] !== h || e[21] !== o ? (k = () => {
|
|
558
|
-
if (!w) {
|
|
559
|
-
if (g) {
|
|
560
|
-
h?.(n.id);
|
|
561
|
-
return;
|
|
562
|
-
}
|
|
563
|
-
if (y && x) {
|
|
564
|
-
x({
|
|
565
|
-
sectionId: o,
|
|
566
|
-
nodeId: n.id,
|
|
567
|
-
node: n,
|
|
568
|
-
intent: n.navigationIntent
|
|
569
|
-
});
|
|
570
|
-
return;
|
|
571
|
-
}
|
|
572
|
-
n.onActivate?.();
|
|
573
|
-
}
|
|
574
|
-
}, e[15] = g, e[16] = w, e[17] = y, e[18] = n, e[19] = x, e[20] = h, e[21] = o, e[22] = k) : k = e[22];
|
|
575
|
-
const a = k;
|
|
576
|
-
let z;
|
|
577
|
-
e[23] !== n.id ? (z = (L) => {
|
|
578
|
-
sn(L.dataTransfer, n.id), L.dataTransfer.effectAllowed = "move";
|
|
579
|
-
}, e[23] = n.id, e[24] = z) : z = e[24];
|
|
580
|
-
const D = z;
|
|
581
|
-
let P;
|
|
582
|
-
e[25] !== n.canDrop || e[26] !== u ? (P = (L) => {
|
|
583
|
-
u && (L.stopPropagation(), n.canDrop && (L.preventDefault(), L.dataTransfer.dropEffect = "move"));
|
|
584
|
-
}, e[25] = n.canDrop, e[26] = u, e[27] = P) : P = e[27];
|
|
585
|
-
const F = P;
|
|
586
|
-
let O;
|
|
587
|
-
e[28] !== n.canDrop || e[29] !== n.id || e[30] !== u ? (O = (L) => {
|
|
588
|
-
if (!u || (L.stopPropagation(), !n.canDrop))
|
|
589
|
-
return;
|
|
590
|
-
L.preventDefault();
|
|
591
|
-
const q = xt(L.dataTransfer);
|
|
592
|
-
q && q !== n.id && u(q, n.id);
|
|
593
|
-
}, e[28] = n.canDrop, e[29] = n.id, e[30] = u, e[31] = O) : O = e[31];
|
|
594
|
-
const G = O;
|
|
595
|
-
let $;
|
|
596
|
-
e[32] !== n.actions || e[33] !== n.id || e[34] !== o ? ($ = n.actions?.map((L) => ({
|
|
597
|
-
...L,
|
|
598
|
-
onAction: L.onAction ? (q) => L.onAction?.({
|
|
599
|
-
sectionId: o,
|
|
600
|
-
nodeId: n.id,
|
|
601
|
-
...q
|
|
602
|
-
}) : void 0
|
|
603
|
-
})), e[32] = n.actions, e[33] = n.id, e[34] = o, e[35] = $) : $ = e[35];
|
|
604
|
-
let H, _;
|
|
605
|
-
if (e[36] !== n || e[37] !== $) {
|
|
606
|
-
const L = {
|
|
607
|
-
...n,
|
|
608
|
-
actions: $
|
|
609
|
-
}, {
|
|
610
|
-
inlineInput: q,
|
|
611
|
-
rowVariant: ue,
|
|
612
|
-
...ne
|
|
613
|
-
} = L;
|
|
614
|
-
_ = ue, H = ne, e[36] = n, e[37] = $, e[38] = H, e[39] = _;
|
|
615
|
-
} else
|
|
616
|
-
H = e[38], _ = e[39];
|
|
617
|
-
const j = _ ?? l, Q = i + 1, Y = g ? v : void 0;
|
|
618
|
-
let E;
|
|
619
|
-
e[40] !== n.id || e[41] !== h ? (E = () => h?.(n.id), e[40] = n.id, e[41] = h, e[42] = E) : E = e[42];
|
|
620
|
-
let M;
|
|
621
|
-
e[43] !== v || e[44] !== a || e[45] !== g || e[46] !== I || e[47] !== i || e[48] !== H || e[49] !== n.id || e[50] !== f || e[51] !== Q || e[52] !== Y || e[53] !== E || e[54] !== j || e[55] !== m ? (M = {
|
|
622
|
-
...H,
|
|
623
|
-
depth: i,
|
|
624
|
-
variant: j,
|
|
625
|
-
isSelected: I,
|
|
626
|
-
isExpanded: v,
|
|
627
|
-
showExpandToggle: g,
|
|
628
|
-
tabIndex: m,
|
|
629
|
-
"data-tree-list-focus-id": n.id,
|
|
630
|
-
"aria-level": Q,
|
|
631
|
-
"aria-expanded": Y,
|
|
632
|
-
"data-tree-list-node-id": n.id,
|
|
633
|
-
onFocus: f,
|
|
634
|
-
onActivate: a,
|
|
635
|
-
onToggleExpand: E
|
|
636
|
-
}, e[43] = v, e[44] = a, e[45] = g, e[46] = I, e[47] = i, e[48] = H, e[49] = n.id, e[50] = f, e[51] = Q, e[52] = Y, e[53] = E, e[54] = j, e[55] = m, e[56] = M) : M = e[56];
|
|
637
|
-
const B = M;
|
|
638
|
-
let A;
|
|
639
|
-
e[57] !== d || e[58] !== C || e[59] !== n.href || e[60] !== B ? (A = C && d && n.href ? /* @__PURE__ */ S(d, { to: n.href, children: /* @__PURE__ */ S(Ue, { ...B, asChild: !0 }) }) : /* @__PURE__ */ S(Ue, { ...B }), e[57] = d, e[58] = C, e[59] = n.href, e[60] = B, e[61] = A) : A = e[61];
|
|
640
|
-
const W = A, ee = !!(u && n.canDrag), Z = n.canDrag ? D : void 0, oe = u ? F : void 0, ie = u ? G : void 0;
|
|
641
|
-
let te;
|
|
642
|
-
return e[62] !== c || e[63] !== W || e[64] !== ee || e[65] !== Z || e[66] !== oe || e[67] !== ie ? (te = /* @__PURE__ */ S(ve, { gap: c, w: "full", minW: "0", maxW: "full", draggable: ee, onDragStart: Z, onDragOver: oe, onDrop: ie, children: W }), e[62] = c, e[63] = W, e[64] = ee, e[65] = Z, e[66] = oe, e[67] = ie, e[68] = te) : te = e[68], te;
|
|
643
|
-
}, an = (t) => {
|
|
644
|
-
const e = K(9), {
|
|
645
|
-
sectionId: o,
|
|
646
|
-
actions: n
|
|
647
|
-
} = t;
|
|
648
|
-
if (n.length === 0)
|
|
649
|
-
return null;
|
|
650
|
-
let i, s;
|
|
651
|
-
e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (i = {
|
|
652
|
-
opacity: "1",
|
|
653
|
-
pointerEvents: "auto"
|
|
654
|
-
}, s = {
|
|
655
|
-
opacity: "1",
|
|
656
|
-
pointerEvents: "auto"
|
|
657
|
-
}, e[0] = i, e[1] = s) : (i = e[0], s = e[1]);
|
|
658
|
-
let r;
|
|
659
|
-
if (e[2] !== n || e[3] !== o) {
|
|
660
|
-
let c;
|
|
661
|
-
e[5] !== o ? (c = (d) => d.menuItems && d.menuItems.length >= 8 ? /* @__PURE__ */ S($t, { action: d }, d.id) : d.menuItems && d.menuItems.length > 0 ? /* @__PURE__ */ de(he.Root, { children: [
|
|
662
|
-
/* @__PURE__ */ S(he.Trigger, { asChild: !0, children: /* @__PURE__ */ S(Ye, { variant: "ghost", size: "2xs", "aria-label": d.label, children: d.icon }) }),
|
|
663
|
-
/* @__PURE__ */ S(he.Positioner, { children: /* @__PURE__ */ S(he.Content, { minW: "160px", bg: "bg", children: d.menuItems.map(fn) }) })
|
|
664
|
-
] }, d.id) : /* @__PURE__ */ S(Ye, { variant: "ghost", size: "2xs", "aria-label": d.label, onClick: (m) => {
|
|
665
|
-
m.stopPropagation(), d.onAction?.({
|
|
666
|
-
sectionId: o
|
|
667
|
-
});
|
|
668
|
-
}, children: d.icon }, d.id), e[5] = o, e[6] = c) : c = e[6], r = n.map(c), e[2] = n, e[3] = o, e[4] = r;
|
|
669
|
-
} else
|
|
670
|
-
r = e[4];
|
|
671
|
-
let l;
|
|
672
|
-
return e[7] !== r ? (l = /* @__PURE__ */ S(He, { gap: "0", opacity: "0", pointerEvents: "none", _groupHover: i, _groupFocusWithin: s, transition: "opacity 120ms ease", onClick: un, children: r }), e[7] = r, e[8] = l) : l = e[8], l;
|
|
673
|
-
}, vt = (t) => {
|
|
674
|
-
const e = K(32), {
|
|
675
|
-
section: o,
|
|
676
|
-
collapsible: n,
|
|
677
|
-
expanded: i,
|
|
678
|
-
focusId: s,
|
|
679
|
-
tabIndex: r,
|
|
680
|
-
onFocus: l,
|
|
681
|
-
onToggle: c,
|
|
682
|
-
onContextMenu: d
|
|
683
|
-
} = t, m = n ? "pointer" : "default", f = n ? r : void 0, x = n ? s : void 0, h = n ? i : void 0;
|
|
684
|
-
let u;
|
|
685
|
-
e[0] !== n ? (u = n ? {
|
|
686
|
-
bg: "bg.hover"
|
|
687
|
-
} : void 0, e[0] = n, e[1] = u) : u = e[1];
|
|
688
|
-
let p;
|
|
689
|
-
e[2] !== n ? (p = n ? {
|
|
690
|
-
bg: "bg.hover"
|
|
691
|
-
} : void 0, e[2] = n, e[3] = p) : p = e[3];
|
|
692
|
-
const g = n ? l : void 0, b = n ? c : void 0;
|
|
693
|
-
let v;
|
|
694
|
-
e[4] !== d || e[5] !== o.id ? (v = d ? (k) => {
|
|
695
|
-
k.preventDefault(), d(k, o.id);
|
|
696
|
-
} : void 0, e[4] = d, e[5] = o.id, e[6] = v) : v = e[6];
|
|
697
|
-
let R;
|
|
698
|
-
e[7] !== o.label ? (R = /* @__PURE__ */ S(Et, { textStyle: "label/XS", textTransform: "uppercase", color: "fg.muted", letterSpacing: "0.08em", truncate: !0, children: o.label }), e[7] = o.label, e[8] = R) : R = e[8];
|
|
699
|
-
let I;
|
|
700
|
-
e[9] !== n || e[10] !== i ? (I = n ? /* @__PURE__ */ S(X, { color: "fg.muted", flexShrink: 0, children: /* @__PURE__ */ S(_t, { size: 14, style: {
|
|
701
|
-
transform: i ? "rotate(90deg)" : "rotate(0deg)",
|
|
702
|
-
transition: "120ms"
|
|
703
|
-
} }) }) : null, e[9] = n, e[10] = i, e[11] = I) : I = e[11];
|
|
704
|
-
let w;
|
|
705
|
-
e[12] !== I || e[13] !== R ? (w = /* @__PURE__ */ de(He, { gap: "1", flex: "1", minW: "0", children: [
|
|
706
|
-
R,
|
|
707
|
-
I
|
|
708
|
-
] }), e[12] = I, e[13] = R, e[14] = w) : w = e[14];
|
|
709
|
-
let N;
|
|
710
|
-
e[15] !== o.actions ? (N = o.actions ?? [], e[15] = o.actions, e[16] = N) : N = e[16];
|
|
711
|
-
let y;
|
|
712
|
-
e[17] !== o.id || e[18] !== N ? (y = /* @__PURE__ */ S(an, { sectionId: o.id, actions: N }), e[17] = o.id, e[18] = N, e[19] = y) : y = e[19];
|
|
713
|
-
let C;
|
|
714
|
-
return e[20] !== m || e[21] !== f || e[22] !== w || e[23] !== y || e[24] !== x || e[25] !== h || e[26] !== u || e[27] !== p || e[28] !== g || e[29] !== b || e[30] !== v ? (C = /* @__PURE__ */ de(He, { className: "group", justify: "space-between", align: "center", w: "full", minW: "0", maxW: "full", px: "sm", py: "2xs", height: "7", cursor: m, tabIndex: f, "data-tree-list-focus-id": x, "aria-expanded": h, _hover: u, _focusVisible: p, onFocus: g, onClick: b, onContextMenu: v, children: [
|
|
715
|
-
w,
|
|
716
|
-
y
|
|
717
|
-
] }), e[20] = m, e[21] = f, e[22] = w, e[23] = y, e[24] = x, e[25] = h, e[26] = u, e[27] = p, e[28] = g, e[29] = b, e[30] = v, e[31] = C) : C = e[31], C;
|
|
718
|
-
};
|
|
719
|
-
function un(t) {
|
|
720
|
-
return t.stopPropagation();
|
|
721
|
-
}
|
|
722
|
-
function fn(t) {
|
|
723
|
-
return /* @__PURE__ */ S(he.Item, { value: t.id, disabled: t.disabled, onClick: () => t.onAction?.(), children: t.label }, t.id);
|
|
724
|
-
}
|
|
725
|
-
const Ke = "section:", It = (t) => `${Ke}${t}`, ge = (t) => t.startsWith(Ke), le = (t) => t.slice(Ke.length), wt = (t, e, o) => {
|
|
726
|
-
const n = t.slice(), [i] = n.splice(e, 1);
|
|
727
|
-
return n.splice(o, 0, i), n;
|
|
728
|
-
}, Ce = (t, e) => {
|
|
729
|
-
for (const o of t) {
|
|
730
|
-
const n = o.nodes.findIndex((i) => i.id === e);
|
|
731
|
-
if (n >= 0) return {
|
|
732
|
-
section: o,
|
|
733
|
-
index: n,
|
|
734
|
-
node: o.nodes[n]
|
|
735
|
-
};
|
|
736
|
-
}
|
|
737
|
-
}, Te = (t, e) => e?.(t) ?? !0, bt = (t, e, o, n) => {
|
|
738
|
-
if (e === o) return !0;
|
|
739
|
-
if (ge(e)) {
|
|
740
|
-
if (!ge(o)) return !1;
|
|
741
|
-
const c = t.find((m) => m.id === le(e)), d = t.find((m) => m.id === le(o));
|
|
742
|
-
return !c || !d || c.canReorder === !1 || d.canReorder === !1 ? !1 : Te({
|
|
743
|
-
source: {
|
|
744
|
-
kind: "section",
|
|
745
|
-
sectionId: c.id,
|
|
746
|
-
id: c.id,
|
|
747
|
-
moveScope: c.moveScope
|
|
748
|
-
},
|
|
749
|
-
destination: {
|
|
750
|
-
kind: "section",
|
|
751
|
-
sectionId: d.id,
|
|
752
|
-
id: d.id,
|
|
753
|
-
moveScope: d.moveScope
|
|
754
|
-
}
|
|
755
|
-
}, n);
|
|
756
|
-
}
|
|
757
|
-
const i = Ce(t, e);
|
|
758
|
-
if (!i || i.node.canReorder === !1) return !1;
|
|
759
|
-
const s = ge(o) ? t.find((c) => c.id === le(o)) : void 0, r = s ? void 0 : Ce(t, o), l = s ?? r?.section;
|
|
760
|
-
return !l || l.canReorder === !1 || r?.node.canReorder === !1 ? !1 : Te({
|
|
761
|
-
source: {
|
|
762
|
-
kind: "node",
|
|
763
|
-
sectionId: i.section.id,
|
|
764
|
-
id: i.node.id,
|
|
765
|
-
moveScope: i.node.moveScope ?? i.section.moveScope
|
|
766
|
-
},
|
|
767
|
-
destination: r ? {
|
|
768
|
-
kind: "node",
|
|
769
|
-
sectionId: l.id,
|
|
770
|
-
id: r.node.id,
|
|
771
|
-
moveScope: r.node.moveScope ?? l.moveScope
|
|
772
|
-
} : {
|
|
773
|
-
kind: "section",
|
|
774
|
-
sectionId: l.id,
|
|
775
|
-
id: l.id,
|
|
776
|
-
moveScope: l.moveScope
|
|
777
|
-
}
|
|
778
|
-
}, n);
|
|
779
|
-
}, mn = (t, e, o, n) => {
|
|
780
|
-
const i = t.find((d) => d.id === le(e)), s = t.find((d) => d.id === le(o));
|
|
781
|
-
if (!i || !s || i.canReorder === !1 || s.canReorder === !1 || !Te({
|
|
782
|
-
source: {
|
|
783
|
-
kind: "section",
|
|
784
|
-
sectionId: i.id,
|
|
785
|
-
id: i.id,
|
|
786
|
-
moveScope: i.moveScope
|
|
787
|
-
},
|
|
788
|
-
destination: {
|
|
789
|
-
kind: "section",
|
|
790
|
-
sectionId: s.id,
|
|
791
|
-
id: s.id,
|
|
792
|
-
moveScope: s.moveScope
|
|
793
|
-
}
|
|
794
|
-
}, n))
|
|
795
|
-
return null;
|
|
796
|
-
const r = t.map((d) => d.id), l = r.indexOf(i.id), c = r.indexOf(s.id);
|
|
797
|
-
return l === c ? null : {
|
|
798
|
-
kind: "section",
|
|
799
|
-
nextSectionIds: wt(r, l, c)
|
|
800
|
-
};
|
|
801
|
-
}, pn = (t, e, o, n) => {
|
|
802
|
-
const i = Ce(t, e);
|
|
803
|
-
if (!i || i.node.canReorder === !1) return null;
|
|
804
|
-
const s = ge(o) ? t.find((x) => x.id === le(o)) : void 0, r = s ? void 0 : Ce(t, o), l = s ?? r?.section;
|
|
805
|
-
if (!l || l.canReorder === !1 || r?.node.canReorder === !1) return null;
|
|
806
|
-
const c = r ? {
|
|
807
|
-
kind: "node",
|
|
808
|
-
sectionId: l.id,
|
|
809
|
-
id: r.node.id,
|
|
810
|
-
moveScope: r.node.moveScope ?? l.moveScope
|
|
811
|
-
} : {
|
|
812
|
-
kind: "section",
|
|
813
|
-
sectionId: l.id,
|
|
814
|
-
id: l.id,
|
|
815
|
-
moveScope: l.moveScope
|
|
816
|
-
};
|
|
817
|
-
if (!Te({
|
|
818
|
-
source: {
|
|
819
|
-
kind: "node",
|
|
820
|
-
sectionId: i.section.id,
|
|
821
|
-
id: i.node.id,
|
|
822
|
-
moveScope: i.node.moveScope ?? i.section.moveScope
|
|
823
|
-
},
|
|
824
|
-
destination: c
|
|
825
|
-
}, n))
|
|
826
|
-
return null;
|
|
827
|
-
const d = i.section.nodes.map((x) => x.id);
|
|
828
|
-
if (i.section.id === l.id) {
|
|
829
|
-
const x = r ? r.index : d.length - 1;
|
|
830
|
-
return i.index === x ? null : {
|
|
831
|
-
kind: "node",
|
|
832
|
-
orders: {
|
|
833
|
-
[i.section.id]: wt(d, i.index, x)
|
|
834
|
-
}
|
|
835
|
-
};
|
|
836
|
-
}
|
|
837
|
-
const m = l.nodes.map((x) => x.id), f = r ? r.index : m.length;
|
|
838
|
-
return m.splice(f, 0, i.node.id), {
|
|
839
|
-
kind: "node",
|
|
840
|
-
orders: {
|
|
841
|
-
[i.section.id]: d.filter((x) => x !== i.node.id),
|
|
842
|
-
[l.id]: m
|
|
843
|
-
}
|
|
844
|
-
};
|
|
845
|
-
}, Rt = (t, e, o, n) => e === o ? null : ge(e) ? ge(o) ? mn(t, e, o, n) : null : pn(t, e, o, n), zt = At(!1), Vn = (t) => {
|
|
846
|
-
const e = K(16), {
|
|
847
|
-
sections: o,
|
|
848
|
-
canMove: n,
|
|
849
|
-
onReorderSections: i,
|
|
850
|
-
onReorderNodes: s,
|
|
851
|
-
children: r
|
|
852
|
-
} = t;
|
|
853
|
-
let l;
|
|
854
|
-
e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (l = {
|
|
855
|
-
activationConstraint: {
|
|
856
|
-
distance: 4
|
|
857
|
-
}
|
|
858
|
-
}, e[0] = l) : l = e[0];
|
|
859
|
-
const c = tt(nt(ot, l));
|
|
860
|
-
let d;
|
|
861
|
-
e[1] !== n || e[2] !== o ? (d = (p) => it(p).filter((g) => bt(o, String(p.active.id), String(g.id), n)), e[1] = n, e[2] = o, e[3] = d) : d = e[3];
|
|
862
|
-
const m = d;
|
|
863
|
-
let f;
|
|
864
|
-
e[4] !== n || e[5] !== s || e[6] !== i || e[7] !== o ? (f = (p) => {
|
|
865
|
-
if (!p.over)
|
|
866
|
-
return;
|
|
867
|
-
const g = String(p.active.id), b = String(p.over.id), v = Rt(o, g, b, n);
|
|
868
|
-
if (v) {
|
|
869
|
-
if (v.kind === "section") {
|
|
870
|
-
i?.(v.nextSectionIds, le(g), le(b));
|
|
871
|
-
return;
|
|
872
|
-
}
|
|
873
|
-
for (const [R, I] of Object.entries(v.orders))
|
|
874
|
-
s?.(R, I);
|
|
875
|
-
}
|
|
876
|
-
}, e[4] = n, e[5] = s, e[6] = i, e[7] = o, e[8] = f) : f = e[8];
|
|
877
|
-
const x = f;
|
|
878
|
-
let h;
|
|
879
|
-
e[9] !== r ? (h = /* @__PURE__ */ S(zt.Provider, { value: !0, children: r }), e[9] = r, e[10] = h) : h = e[10];
|
|
880
|
-
let u;
|
|
881
|
-
return e[11] !== m || e[12] !== x || e[13] !== c || e[14] !== h ? (u = /* @__PURE__ */ S(rt, { sensors: c, collisionDetection: m, onDragEnd: x, children: h }), e[11] = m, e[12] = x, e[13] = c, e[14] = h, e[15] = u) : u = e[15], u;
|
|
882
|
-
}, yt = (t) => {
|
|
883
|
-
const e = K(12);
|
|
884
|
-
let o;
|
|
885
|
-
e[0] !== t.disabled || e[1] !== t.id ? (o = {
|
|
886
|
-
id: t.id,
|
|
887
|
-
disabled: t.disabled
|
|
888
|
-
}, e[0] = t.disabled, e[1] = t.id, e[2] = o) : o = e[2];
|
|
889
|
-
const n = Wt(o);
|
|
890
|
-
let i;
|
|
891
|
-
if (e[3] !== t.children || e[4] !== n.isDragging || e[5] !== n.listeners || e[6] !== n.setNodeRef || e[7] !== n.transform || e[8] !== n.transition) {
|
|
892
|
-
const r = {
|
|
893
|
-
transform: Ht.Transform.toString(n.transform),
|
|
894
|
-
transition: n.transition,
|
|
895
|
-
opacity: n.isDragging ? 0.5 : 1
|
|
896
|
-
};
|
|
897
|
-
i = t.children({
|
|
898
|
-
setNodeRef: n.setNodeRef,
|
|
899
|
-
listeners: n.listeners,
|
|
900
|
-
style: r
|
|
901
|
-
}), e[3] = t.children, e[4] = n.isDragging, e[5] = n.listeners, e[6] = n.setNodeRef, e[7] = n.transform, e[8] = n.transition, e[9] = i;
|
|
902
|
-
} else
|
|
903
|
-
i = e[9];
|
|
904
|
-
let s;
|
|
905
|
-
return e[10] !== i ? (s = /* @__PURE__ */ S(We, { children: i }), e[10] = i, e[11] = s) : s = e[11], s;
|
|
906
|
-
}, gn = (t) => {
|
|
907
|
-
const e = K(24), {
|
|
908
|
-
section: o,
|
|
909
|
-
sectionRows: n,
|
|
910
|
-
expandedNodeIds: i,
|
|
911
|
-
activeNodeId: s,
|
|
912
|
-
rowVariant: r,
|
|
913
|
-
nodeGap: l,
|
|
914
|
-
linkComponent: c,
|
|
915
|
-
onNavigate: d,
|
|
916
|
-
onToggleSection: m,
|
|
917
|
-
onToggleNode: f,
|
|
918
|
-
onSectionContextMenu: x
|
|
919
|
-
} = t;
|
|
920
|
-
let h;
|
|
921
|
-
e[0] !== n ? (h = n.find(hn), e[0] = n, e[1] = h) : h = e[1];
|
|
922
|
-
const u = h;
|
|
923
|
-
let p, g;
|
|
924
|
-
e[2] !== n ? (p = n.filter(vn), g = p.filter(In).map(wn), e[2] = n, e[3] = p, e[4] = g) : (p = e[3], g = e[4]);
|
|
925
|
-
const b = g;
|
|
926
|
-
let v;
|
|
927
|
-
e[5] !== o.id ? (v = It(o.id), e[5] = o.id, e[6] = v) : v = e[6];
|
|
928
|
-
const R = o.canReorder === !1;
|
|
929
|
-
let I;
|
|
930
|
-
e[7] !== s || e[8] !== i || e[9] !== u || e[10] !== c || e[11] !== l || e[12] !== p || e[13] !== d || e[14] !== x || e[15] !== f || e[16] !== m || e[17] !== r || e[18] !== b ? (I = (N) => {
|
|
931
|
-
const {
|
|
932
|
-
setNodeRef: y,
|
|
933
|
-
listeners: C,
|
|
934
|
-
style: k
|
|
935
|
-
} = N;
|
|
936
|
-
return /* @__PURE__ */ de(X, { ref: y, style: k, w: "full", minW: "0", children: [
|
|
937
|
-
u && u.kind === "section-header" ? /* @__PURE__ */ S(X, { onPointerDownCapture: (a) => C?.onPointerDown?.(a), children: /* @__PURE__ */ S(vt, { section: u.section, collapsible: u.collapsible, expanded: u.expanded, focusId: u.key, tabIndex: -1, onFocus: bn, onToggle: () => m?.(u.sectionId), onContextMenu: x }) }) : null,
|
|
938
|
-
/* @__PURE__ */ S(st, { items: b, strategy: lt, children: /* @__PURE__ */ S(ve, { gap: l, w: "full", minW: "0", children: p.map((a) => a.kind === "node" ? /* @__PURE__ */ S(Sn, { row: a, expandedNodeIds: i, activeNodeId: s, rowVariant: r, nodeGap: l, linkComponent: c, onNavigate: d, onToggleNode: f }, a.key) : null) }) })
|
|
939
|
-
] });
|
|
940
|
-
}, e[7] = s, e[8] = i, e[9] = u, e[10] = c, e[11] = l, e[12] = p, e[13] = d, e[14] = x, e[15] = f, e[16] = m, e[17] = r, e[18] = b, e[19] = I) : I = e[19];
|
|
941
|
-
let w;
|
|
942
|
-
return e[20] !== v || e[21] !== R || e[22] !== I ? (w = /* @__PURE__ */ S(yt, { id: v, disabled: R, children: I }), e[20] = v, e[21] = R, e[22] = I, e[23] = w) : w = e[23], w;
|
|
943
|
-
}, Qe = (t) => /* @__PURE__ */ S(ht, { sectionId: t.sectionId, node: t.node, level: t.level, expandedNodeIds: t.expandedNodeIds, activeNodeId: t.activeNodeId, rowVariant: t.rowVariant, nodeGap: t.nodeGap, linkComponent: t.linkComponent, onNavigate: t.onNavigate, onToggleNode: t.onToggleNode }), Sn = (t) => {
|
|
944
|
-
const e = K(13);
|
|
945
|
-
let o, n, i;
|
|
946
|
-
if (e[0] !== t) {
|
|
947
|
-
i = /* @__PURE__ */ Symbol.for("react.early_return_sentinel");
|
|
948
|
-
e:
|
|
949
|
-
if ({
|
|
950
|
-
row: n,
|
|
951
|
-
...o
|
|
952
|
-
} = t, n.level > 0) {
|
|
953
|
-
i = Qe({
|
|
954
|
-
node: n.node,
|
|
955
|
-
sectionId: n.sectionId,
|
|
956
|
-
level: n.level,
|
|
957
|
-
...o
|
|
958
|
-
});
|
|
959
|
-
break e;
|
|
960
|
-
}
|
|
961
|
-
e[0] = t, e[1] = o, e[2] = n, e[3] = i;
|
|
962
|
-
} else
|
|
963
|
-
o = e[1], n = e[2], i = e[3];
|
|
964
|
-
if (i !== /* @__PURE__ */ Symbol.for("react.early_return_sentinel"))
|
|
965
|
-
return i;
|
|
966
|
-
const s = n.node.canReorder === !1;
|
|
967
|
-
let r;
|
|
968
|
-
e[4] !== o || e[5] !== n.level || e[6] !== n.node || e[7] !== n.sectionId ? (r = (c) => {
|
|
969
|
-
const {
|
|
970
|
-
setNodeRef: d,
|
|
971
|
-
listeners: m,
|
|
972
|
-
style: f
|
|
973
|
-
} = c;
|
|
974
|
-
return /* @__PURE__ */ S(X, { ref: d, style: f, w: "full", minW: "0", onPointerDownCapture: (x) => m?.onPointerDown?.(x), children: Qe({
|
|
975
|
-
node: n.node,
|
|
976
|
-
sectionId: n.sectionId,
|
|
977
|
-
level: n.level,
|
|
978
|
-
...o
|
|
979
|
-
}) });
|
|
980
|
-
}, e[4] = o, e[5] = n.level, e[6] = n.node, e[7] = n.sectionId, e[8] = r) : r = e[8];
|
|
981
|
-
let l;
|
|
982
|
-
return e[9] !== n.node.id || e[10] !== s || e[11] !== r ? (l = /* @__PURE__ */ S(yt, { id: n.node.id, disabled: s, children: r }), e[9] = n.node.id, e[10] = s, e[11] = r, e[12] = l) : l = e[12], l;
|
|
983
|
-
}, xn = (t) => {
|
|
984
|
-
const e = K(25), {
|
|
985
|
-
sections: o,
|
|
986
|
-
expandedSectionIds: n,
|
|
987
|
-
expandedNodeIds: i,
|
|
988
|
-
activeNodeId: s,
|
|
989
|
-
rowVariant: r,
|
|
990
|
-
sectionGap: l,
|
|
991
|
-
nodeGap: c,
|
|
992
|
-
linkComponent: d,
|
|
993
|
-
onNavigate: m,
|
|
994
|
-
onToggleSection: f,
|
|
995
|
-
onToggleNode: x,
|
|
996
|
-
onSectionContextMenu: h,
|
|
997
|
-
onReorderSections: u,
|
|
998
|
-
onReorderNodes: p,
|
|
999
|
-
canMove: g
|
|
1000
|
-
} = t, b = n === void 0 ? [] : n, v = i === void 0 ? [] : i, R = r === void 0 ? "tree" : r, I = l === void 0 ? "0" : l, w = c === void 0 ? "0" : c;
|
|
1001
|
-
let N;
|
|
1002
|
-
e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (N = {
|
|
1003
|
-
activationConstraint: {
|
|
1004
|
-
distance: 4
|
|
1005
|
-
}
|
|
1006
|
-
}, e[0] = N) : N = e[0];
|
|
1007
|
-
const y = tt(nt(ot, N)), C = Mt(zt);
|
|
1008
|
-
let k;
|
|
1009
|
-
e[1] !== g || e[2] !== o ? (k = (A) => it(A).filter((W) => bt(o, String(A.active.id), String(W.id), g)), e[1] = g, e[2] = o, e[3] = k) : k = e[3];
|
|
1010
|
-
const a = k;
|
|
1011
|
-
let z;
|
|
1012
|
-
e[4] !== g || e[5] !== p || e[6] !== u || e[7] !== o ? (z = (A) => {
|
|
1013
|
-
if (!A.over)
|
|
1014
|
-
return;
|
|
1015
|
-
const W = Rt(o, String(A.active.id), String(A.over.id), g);
|
|
1016
|
-
if (W)
|
|
1017
|
-
if (W.kind === "section")
|
|
1018
|
-
u?.(W.nextSectionIds);
|
|
1019
|
-
else
|
|
1020
|
-
for (const [ee, Z] of Object.entries(W.orders))
|
|
1021
|
-
p?.(ee, Z);
|
|
1022
|
-
}, e[4] = g, e[5] = p, e[6] = u, e[7] = o, e[8] = z) : z = e[8];
|
|
1023
|
-
const D = z, P = mt(o, b, v), F = st;
|
|
1024
|
-
let O;
|
|
1025
|
-
e[9] !== o ? (O = o.map(Rn), e[9] = o, e[10] = O) : O = e[10];
|
|
1026
|
-
const G = lt, $ = ve, H = "full", _ = "0", j = "full", Q = o.map((A) => /* @__PURE__ */ S(gn, { section: A, sectionRows: P.filter((W) => W.sectionId === A.id), expandedNodeIds: v, activeNodeId: s, rowVariant: R, nodeGap: w, linkComponent: d, onNavigate: m, onToggleSection: f, onToggleNode: x, onSectionContextMenu: h }, A.id));
|
|
1027
|
-
let Y;
|
|
1028
|
-
e[11] !== $ || e[12] !== I || e[13] !== Q ? (Y = /* @__PURE__ */ S($, { gap: I, w: H, minW: _, maxW: j, children: Q }), e[11] = $, e[12] = I, e[13] = Q, e[14] = Y) : Y = e[14];
|
|
1029
|
-
let E;
|
|
1030
|
-
e[15] !== F || e[16] !== Y || e[17] !== O || e[18] !== G ? (E = /* @__PURE__ */ S(F, { items: O, strategy: G, children: Y }), e[15] = F, e[16] = Y, e[17] = O, e[18] = G, e[19] = E) : E = e[19];
|
|
1031
|
-
const M = E;
|
|
1032
|
-
if (C)
|
|
1033
|
-
return M;
|
|
1034
|
-
let B;
|
|
1035
|
-
return e[20] !== a || e[21] !== M || e[22] !== D || e[23] !== y ? (B = /* @__PURE__ */ S(rt, { sensors: y, collisionDetection: a, onDragEnd: D, children: M }), e[20] = a, e[21] = M, e[22] = D, e[23] = y, e[24] = B) : B = e[24], B;
|
|
1036
|
-
};
|
|
1037
|
-
function hn(t) {
|
|
1038
|
-
return t.kind === "section-header";
|
|
1039
|
-
}
|
|
1040
|
-
function vn(t) {
|
|
1041
|
-
return t.kind === "node";
|
|
1042
|
-
}
|
|
1043
|
-
function In(t) {
|
|
1044
|
-
return t.kind === "node" && t.level === 0;
|
|
1045
|
-
}
|
|
1046
|
-
function wn(t) {
|
|
1047
|
-
return t.kind === "node" ? t.node.id : "";
|
|
1048
|
-
}
|
|
1049
|
-
function bn() {
|
|
1050
|
-
}
|
|
1051
|
-
function Rn(t) {
|
|
1052
|
-
return It(t.id);
|
|
1053
|
-
}
|
|
1054
|
-
const et = (t, e) => t ? [...t.querySelectorAll("[data-tree-list-focus-id]")].find((n) => n.dataset.treeListFocusId === e) ?? null : null, zn = (t, e) => {
|
|
1055
|
-
if (!(!t || !(e instanceof HTMLElement) || !t.contains(e)))
|
|
1056
|
-
return e.closest("[data-tree-list-focus-id]")?.dataset.treeListFocusId;
|
|
1057
|
-
}, yn = (t) => t instanceof HTMLElement ? t.isContentEditable ? !0 : ["INPUT", "TEXTAREA", "SELECT"].includes(t.tagName) : !1, Nn = (t, e) => t.findIndex((o) => pt(o) && Se(o) === e), Nt = (t) => {
|
|
1058
|
-
const e = K(28), {
|
|
1059
|
-
rows: o,
|
|
1060
|
-
activeNodeId: n,
|
|
1061
|
-
expandedNodeIds: i,
|
|
1062
|
-
onToggleNode: s,
|
|
1063
|
-
onToggleSection: r,
|
|
1064
|
-
scrollToRow: l
|
|
1065
|
-
} = t, c = se(null), [d, m] = ae(), [f, x] = ae();
|
|
1066
|
-
let h;
|
|
1067
|
-
e[0] !== n || e[1] !== d || e[2] !== o ? (h = gt(d, n, o), e[0] = n, e[1] = d, e[2] = o, e[3] = h) : h = e[3];
|
|
1068
|
-
const u = h;
|
|
1069
|
-
let p;
|
|
1070
|
-
e[4] !== o ? (p = Ve(o).map(Se).join("\0"), e[4] = o, e[5] = p) : p = e[5];
|
|
1071
|
-
const g = p;
|
|
1072
|
-
let b, v;
|
|
1073
|
-
e[6] !== g || e[7] !== d ? (b = () => {
|
|
1074
|
-
d && (g.split("\0").includes(d) || m(void 0));
|
|
1075
|
-
}, v = [d, g], e[6] = g, e[7] = d, e[8] = b, e[9] = v) : (b = e[8], v = e[9]), pe(b, v);
|
|
1076
|
-
let R, I;
|
|
1077
|
-
e[10] !== f ? (R = () => {
|
|
1078
|
-
if (!f)
|
|
1079
|
-
return;
|
|
1080
|
-
const z = requestAnimationFrame(() => {
|
|
1081
|
-
requestAnimationFrame(() => {
|
|
1082
|
-
const D = et(c.current, f);
|
|
1083
|
-
D && (D.focus(), x(void 0));
|
|
1084
|
-
});
|
|
1085
|
-
});
|
|
1086
|
-
return () => cancelAnimationFrame(z);
|
|
1087
|
-
}, I = [f], e[10] = f, e[11] = R, e[12] = I) : (R = e[11], I = e[12]), pe(R, I);
|
|
1088
|
-
let w;
|
|
1089
|
-
e[13] !== o || e[14] !== l ? (w = (z) => {
|
|
1090
|
-
m(z);
|
|
1091
|
-
const D = et(c.current, z);
|
|
1092
|
-
if (D) {
|
|
1093
|
-
D.focus();
|
|
1094
|
-
return;
|
|
1095
|
-
}
|
|
1096
|
-
const P = Nn(o, z);
|
|
1097
|
-
P !== -1 && (l?.(P), x(z));
|
|
1098
|
-
}, e[13] = o, e[14] = l, e[15] = w) : w = e[15];
|
|
1099
|
-
const N = w;
|
|
1100
|
-
let y;
|
|
1101
|
-
e[16] !== n || e[17] !== i || e[18] !== N || e[19] !== u || e[20] !== s || e[21] !== r || e[22] !== o ? (y = (z) => {
|
|
1102
|
-
if (z.altKey || z.ctrlKey || z.metaKey || z.shiftKey || yn(z.target))
|
|
1103
|
-
return;
|
|
1104
|
-
const D = rn({
|
|
1105
|
-
rows: o,
|
|
1106
|
-
focusedRowId: zn(c.current, z.target) ?? u,
|
|
1107
|
-
activeNodeId: n,
|
|
1108
|
-
expandedNodeIds: i,
|
|
1109
|
-
key: z.key
|
|
1110
|
-
});
|
|
1111
|
-
if (D) {
|
|
1112
|
-
if (z.preventDefault(), D.type === "toggle-node") {
|
|
1113
|
-
s?.(D.nodeId);
|
|
1114
|
-
return;
|
|
1115
|
-
}
|
|
1116
|
-
if (D.type === "toggle-section") {
|
|
1117
|
-
r?.(D.sectionId);
|
|
1118
|
-
return;
|
|
1119
|
-
}
|
|
1120
|
-
N(D.rowId);
|
|
1121
|
-
}
|
|
1122
|
-
}, e[16] = n, e[17] = i, e[18] = N, e[19] = u, e[20] = s, e[21] = r, e[22] = o, e[23] = y) : y = e[23];
|
|
1123
|
-
const C = y;
|
|
1124
|
-
let k;
|
|
1125
|
-
e[24] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (k = (z) => m(z), e[24] = k) : k = e[24];
|
|
1126
|
-
let a;
|
|
1127
|
-
return e[25] !== u || e[26] !== C ? (a = {
|
|
1128
|
-
focusRowId: u,
|
|
1129
|
-
rootRef: c,
|
|
1130
|
-
handleKeyDown: C,
|
|
1131
|
-
onRowFocus: k
|
|
1132
|
-
}, e[25] = u, e[26] = C, e[27] = a) : a = e[27], a;
|
|
1133
|
-
}, Dn = 32, kn = 4, Dt = (t) => {
|
|
1134
|
-
const {
|
|
1135
|
-
row: e,
|
|
1136
|
-
expandedNodeIds: o,
|
|
1137
|
-
activeNodeId: n,
|
|
1138
|
-
focusRowId: i,
|
|
1139
|
-
rowVariant: s,
|
|
1140
|
-
nodeGap: r,
|
|
1141
|
-
linkComponent: l,
|
|
1142
|
-
onRowFocus: c,
|
|
1143
|
-
onNavigate: d,
|
|
1144
|
-
onToggleSection: m,
|
|
1145
|
-
onToggleNode: f,
|
|
1146
|
-
onSectionContextMenu: x,
|
|
1147
|
-
onMoveNode: h
|
|
1148
|
-
} = t;
|
|
1149
|
-
return e.kind === "section-header" ? /* @__PURE__ */ S(vt, { section: e.section, collapsible: e.collapsible, expanded: e.expanded, focusId: e.key, tabIndex: e.key === i ? 0 : -1, onFocus: () => c(e.key), onToggle: () => m?.(e.sectionId), onContextMenu: x }) : e.kind === "section-empty" ? e.emptyState ?? null : /* @__PURE__ */ S(ht, { sectionId: e.sectionId, node: e.node, level: e.level, expandedNodeIds: o, activeNodeId: n, rowVariant: s, nodeGap: r, linkComponent: l, tabIndex: e.node.id === i ? 0 : -1, onFocus: () => c(e.node.id), onNavigate: d, onToggleNode: f, onMoveNode: h });
|
|
1150
|
-
}, Cn = (t) => {
|
|
1151
|
-
const {
|
|
1152
|
-
rows: e,
|
|
1153
|
-
expandedNodeIds: o = [],
|
|
1154
|
-
activeNodeId: n,
|
|
1155
|
-
rowVariant: i = "tree",
|
|
1156
|
-
nodeGap: s = "0",
|
|
1157
|
-
linkComponent: r,
|
|
1158
|
-
onNavigate: l,
|
|
1159
|
-
onToggleSection: c,
|
|
1160
|
-
onToggleNode: d,
|
|
1161
|
-
onSectionContextMenu: m,
|
|
1162
|
-
onMoveNode: f,
|
|
1163
|
-
scrollRef: x
|
|
1164
|
-
} = t, h = Ot({
|
|
1165
|
-
count: e.length,
|
|
1166
|
-
getScrollElement: () => x.current,
|
|
1167
|
-
estimateSize: () => Dn,
|
|
1168
|
-
overscan: kn,
|
|
1169
|
-
getItemKey: (p) => e[p]?.key ?? p
|
|
1170
|
-
}), u = Nt({
|
|
1171
|
-
rows: e,
|
|
1172
|
-
activeNodeId: n,
|
|
1173
|
-
expandedNodeIds: o,
|
|
1174
|
-
onToggleNode: d,
|
|
1175
|
-
onToggleSection: c,
|
|
1176
|
-
scrollToRow: (p) => h.scrollToIndex(p, {
|
|
1177
|
-
align: "auto"
|
|
1178
|
-
})
|
|
1179
|
-
});
|
|
1180
|
-
return /* @__PURE__ */ S(X, { ref: u.rootRef, role: "listbox", w: "full", minW: "0", maxW: "full", position: "relative", style: {
|
|
1181
|
-
height: h.getTotalSize()
|
|
1182
|
-
}, onKeyDown: u.handleKeyDown, children: h.getVirtualItems().map((p) => {
|
|
1183
|
-
const g = e[p.index];
|
|
1184
|
-
return g ? /* @__PURE__ */ S(X, { ref: h.measureElement, "data-index": p.index, "data-tree-list-row": g.kind, position: "absolute", top: "0", left: "0", w: "full", pb: p.index === e.length - 1 ? "0" : s, style: {
|
|
1185
|
-
transform: `translateY(${p.start}px)`
|
|
1186
|
-
}, children: Dt({
|
|
1187
|
-
row: g,
|
|
1188
|
-
expandedNodeIds: o,
|
|
1189
|
-
activeNodeId: n,
|
|
1190
|
-
focusRowId: u.focusRowId,
|
|
1191
|
-
rowVariant: i,
|
|
1192
|
-
nodeGap: s,
|
|
1193
|
-
linkComponent: r,
|
|
1194
|
-
onRowFocus: u.onRowFocus,
|
|
1195
|
-
onNavigate: l,
|
|
1196
|
-
onToggleSection: c,
|
|
1197
|
-
onToggleNode: d,
|
|
1198
|
-
onSectionContextMenu: m,
|
|
1199
|
-
onMoveNode: f
|
|
1200
|
-
}) }, p.key) : null;
|
|
1201
|
-
}) });
|
|
1202
|
-
}, Tn = (t) => {
|
|
1203
|
-
const {
|
|
1204
|
-
sections: e,
|
|
1205
|
-
expandedSectionIds: o = [],
|
|
1206
|
-
expandedNodeIds: n = [],
|
|
1207
|
-
activeNodeId: i,
|
|
1208
|
-
rowVariant: s = "tree",
|
|
1209
|
-
sectionGap: r = "0",
|
|
1210
|
-
nodeGap: l = "0",
|
|
1211
|
-
linkComponent: c,
|
|
1212
|
-
onNavigate: d,
|
|
1213
|
-
onToggleSection: m,
|
|
1214
|
-
onToggleNode: f,
|
|
1215
|
-
onSectionContextMenu: x,
|
|
1216
|
-
onMoveNode: h,
|
|
1217
|
-
virtualize: u,
|
|
1218
|
-
scrollRef: p
|
|
1219
|
-
} = t, g = mt(e, o, n), b = Nt({
|
|
1220
|
-
rows: g,
|
|
1221
|
-
activeNodeId: i,
|
|
1222
|
-
expandedNodeIds: n,
|
|
1223
|
-
onToggleNode: f,
|
|
1224
|
-
onToggleSection: m
|
|
1225
|
-
});
|
|
1226
|
-
return u && p ? /* @__PURE__ */ S(Cn, { ...t, rows: g, scrollRef: p }) : /* @__PURE__ */ S(ve, { ref: b.rootRef, role: "listbox", gap: r, w: "full", minW: "0", maxW: "full", overflowX: "hidden", onKeyDown: b.handleKeyDown, children: e.map((v) => {
|
|
1227
|
-
const R = g.filter((I) => I.sectionId === v.id);
|
|
1228
|
-
return /* @__PURE__ */ S(ve, { gap: l, w: "full", minW: "0", maxW: "full", "data-testid": `tree-list-section-${v.id}`, children: R.map((I) => /* @__PURE__ */ S(X, { w: "full", minW: "0", children: Dt({
|
|
1229
|
-
row: I,
|
|
1230
|
-
expandedNodeIds: n,
|
|
1231
|
-
activeNodeId: i,
|
|
1232
|
-
focusRowId: b.focusRowId,
|
|
1233
|
-
rowVariant: s,
|
|
1234
|
-
nodeGap: l,
|
|
1235
|
-
linkComponent: c,
|
|
1236
|
-
onRowFocus: b.onRowFocus,
|
|
1237
|
-
onNavigate: d,
|
|
1238
|
-
onToggleSection: m,
|
|
1239
|
-
onToggleNode: f,
|
|
1240
|
-
onSectionContextMenu: x,
|
|
1241
|
-
onMoveNode: h
|
|
1242
|
-
}) }, I.key)) }, v.id);
|
|
1243
|
-
}) });
|
|
1244
|
-
}, Kn = (t) => {
|
|
1245
|
-
const e = K(8);
|
|
1246
|
-
let o;
|
|
1247
|
-
e[0] !== t ? (o = t.draggable ? /* @__PURE__ */ S(xn, { sections: t.sections, expandedSectionIds: t.expandedSectionIds, expandedNodeIds: t.expandedNodeIds, activeNodeId: t.activeNodeId, rowVariant: t.rowVariant, sectionGap: t.sectionGap, nodeGap: t.nodeGap, linkComponent: t.linkComponent, onNavigate: t.onNavigate, onToggleSection: t.onToggleSection, onToggleNode: t.onToggleNode, onSectionContextMenu: t.onSectionContextMenu, onReorderSections: t.onReorderSections, onReorderNodes: t.onReorderNodes, canMove: t.canMove }) : /* @__PURE__ */ S(Tn, { ...t }), e[0] = t, e[1] = o) : o = e[1];
|
|
1248
|
-
const n = o;
|
|
1249
|
-
let i;
|
|
1250
|
-
e[2] !== n || e[3] !== t.onMoveNode ? (i = /* @__PURE__ */ S(ln, { onMoveNode: t.onMoveNode, children: n }), e[2] = n, e[3] = t.onMoveNode, e[4] = i) : i = e[4];
|
|
1251
|
-
const s = i;
|
|
1252
|
-
if (!t.backgroundContextActions || t.backgroundContextActions.length === 0)
|
|
1253
|
-
return s;
|
|
1254
|
-
let r;
|
|
1255
|
-
return e[5] !== s || e[6] !== t.backgroundContextActions ? (r = /* @__PURE__ */ S(Qt, { actions: t.backgroundContextActions, children: s }), e[5] = s, e[6] = t.backgroundContextActions, e[7] = r) : r = e[7], r;
|
|
1256
|
-
};
|
|
1257
|
-
export {
|
|
1258
|
-
Hn as R,
|
|
1259
|
-
Kn as T,
|
|
1260
|
-
Vn as a
|
|
1261
|
-
};
|
|
1262
|
-
//# sourceMappingURL=tree-list-BHFSyvIZ.js.map
|