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