@floegence/floe-webapp-core 0.15.2 → 0.15.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index31.js +147 -147
- package/package.json +1 -1
package/dist/index31.js
CHANGED
|
@@ -1,228 +1,228 @@
|
|
|
1
|
-
import { delegateEvents as Z, insert as d, createComponent as
|
|
2
|
-
import { createSignal as
|
|
3
|
-
import { cn as
|
|
1
|
+
import { delegateEvents as Z, insert as d, createComponent as c, effect as T, className as p, style as ee, memo as B, template as y, setAttribute as te, setStyleProperty as ne } from "solid-js/web";
|
|
2
|
+
import { createSignal as _, createMemo as L, createEffect as K, on as G, For as z, Show as E } from "solid-js";
|
|
3
|
+
import { cn as I } from "./index111.js";
|
|
4
4
|
import { deferAfterPaint as re } from "./index112.js";
|
|
5
5
|
import { Button as N } from "./index20.js";
|
|
6
6
|
import { Input as H } from "./index21.js";
|
|
7
7
|
import { ChevronRight as M, Check as oe, X as le, Plus as ae } from "./index40.js";
|
|
8
8
|
import { FolderOpenIcon as W, FolderIcon as ie } from "./index54.js";
|
|
9
9
|
var O = /* @__PURE__ */ y('<div class="flex items-center gap-1.5"><div class=flex-1>'), ce = /* @__PURE__ */ y('<p class="text-[11px] text-muted-foreground -mt-1">Creating in: '), se = /* @__PURE__ */ y("<button type=button><span>New Folder"), ue = /* @__PURE__ */ y('<nav class="flex items-center gap-0.5 min-w-0 overflow-x-auto py-0.5"aria-label="Selected path">'), V = /* @__PURE__ */ y("<button type=button>"), de = /* @__PURE__ */ y('<div class="flex items-center justify-center py-6 text-xs text-muted-foreground">'), he = /* @__PURE__ */ y("<div><button type=button><span>"), fe = /* @__PURE__ */ y("<div class=overflow-hidden>"), ge = /* @__PURE__ */ y('<div class="flex flex-col"><div><button type=button><span class="flex-shrink-0 w-4 h-4"></span><span class=truncate>'), me = /* @__PURE__ */ y('<span class="flex-shrink-0 w-4 h-4">');
|
|
10
|
-
function
|
|
10
|
+
function C(e) {
|
|
11
11
|
const l = (e ?? "").trim();
|
|
12
12
|
if (l === "" || l === "/") return "/";
|
|
13
|
-
const
|
|
14
|
-
return
|
|
13
|
+
const r = l.replace(/\/+$/, "");
|
|
14
|
+
return r.startsWith("/") ? r : "/" + r;
|
|
15
15
|
}
|
|
16
16
|
function j(e) {
|
|
17
|
-
const l = e.split("/").filter(Boolean),
|
|
18
|
-
let
|
|
19
|
-
for (let
|
|
20
|
-
|
|
21
|
-
return
|
|
17
|
+
const l = e.split("/").filter(Boolean), r = [];
|
|
18
|
+
let i = "";
|
|
19
|
+
for (let o = 0; o < l.length - 1; o++)
|
|
20
|
+
i += "/" + l[o], r.push(i);
|
|
21
|
+
return r;
|
|
22
22
|
}
|
|
23
23
|
function ve(e) {
|
|
24
|
-
return
|
|
25
|
-
const l = /* @__PURE__ */ new Map(),
|
|
26
|
-
for (const
|
|
27
|
-
|
|
24
|
+
return L(() => {
|
|
25
|
+
const l = /* @__PURE__ */ new Map(), r = (i) => {
|
|
26
|
+
for (const o of i)
|
|
27
|
+
o.type === "folder" && (l.set(C(o.path), o), o.children?.length && r(o.children));
|
|
28
28
|
};
|
|
29
|
-
return
|
|
29
|
+
return r(e()), l;
|
|
30
30
|
});
|
|
31
31
|
}
|
|
32
32
|
function _e(e) {
|
|
33
|
-
const l = e.initialPath ?? "/",
|
|
33
|
+
const l = e.initialPath ?? "/", r = () => (typeof e.homeLabel == "function" ? e.homeLabel() : e.homeLabel) ?? "Root", i = () => {
|
|
34
34
|
const t = typeof e.homePath == "function" ? e.homePath() : e.homePath;
|
|
35
|
-
return t ?
|
|
36
|
-
},
|
|
37
|
-
const
|
|
38
|
-
if (!
|
|
39
|
-
const h =
|
|
40
|
-
return h === "/" ?
|
|
35
|
+
return t ? C(t) : void 0;
|
|
36
|
+
}, o = (t) => {
|
|
37
|
+
const a = i();
|
|
38
|
+
if (!a) return t;
|
|
39
|
+
const h = C(t);
|
|
40
|
+
return h === "/" ? a : a === "/" ? h : a + h;
|
|
41
41
|
}, u = (t) => {
|
|
42
|
-
const
|
|
43
|
-
if (!
|
|
44
|
-
const h =
|
|
45
|
-
return h ===
|
|
46
|
-
}, [x, m] =
|
|
47
|
-
|
|
42
|
+
const a = i();
|
|
43
|
+
if (!a) return C(t);
|
|
44
|
+
const h = C(t);
|
|
45
|
+
return h === a ? "/" : a !== "/" && h.startsWith(a + "/") ? h.slice(a.length) || "/" : C(t);
|
|
46
|
+
}, [x, m] = _(l), [w, f] = _(/* @__PURE__ */ new Set(["/"])), [$, n] = _(o(l)), [v, b] = _(""), s = ve(e.files), g = L(() => e.files().filter((t) => t.type === "folder"));
|
|
47
|
+
K(G(e.open, (t) => {
|
|
48
48
|
if (t) {
|
|
49
|
-
const
|
|
50
|
-
m(
|
|
51
|
-
const h = j(
|
|
52
|
-
|
|
49
|
+
const a = e.initialPath ?? "/";
|
|
50
|
+
m(a), n(o(a)), b("");
|
|
51
|
+
const h = j(a);
|
|
52
|
+
f(/* @__PURE__ */ new Set(["/", ...h])), e.onReset?.(a);
|
|
53
53
|
}
|
|
54
|
-
})),
|
|
55
|
-
o(
|
|
54
|
+
})), K(G(x, (t) => {
|
|
55
|
+
n(o(t)), b("");
|
|
56
56
|
}));
|
|
57
57
|
const k = (t) => {
|
|
58
|
-
const
|
|
59
|
-
return
|
|
60
|
-
},
|
|
61
|
-
const
|
|
62
|
-
|
|
58
|
+
const a = C(t);
|
|
59
|
+
return a === "/" || s().has(a);
|
|
60
|
+
}, S = (t) => e.filter ? e.filter(t) : !0, F = (t) => {
|
|
61
|
+
const a = j(t);
|
|
62
|
+
f((h) => {
|
|
63
63
|
const P = new Set(h);
|
|
64
|
-
for (const
|
|
64
|
+
for (const D of a) P.add(D);
|
|
65
65
|
return P.add(t), P;
|
|
66
66
|
});
|
|
67
67
|
}, q = (t) => {
|
|
68
|
-
const
|
|
69
|
-
|
|
68
|
+
const a = w().has(t);
|
|
69
|
+
f((h) => {
|
|
70
70
|
const P = new Set(h);
|
|
71
71
|
return P.has(t) ? P.delete(t) : P.add(t), P;
|
|
72
|
-
}),
|
|
72
|
+
}), a || e.onExpand?.(t);
|
|
73
73
|
}, J = (t) => {
|
|
74
|
-
|
|
75
|
-
const h = new Set(
|
|
74
|
+
S(t) && (m(t.path), f((a) => {
|
|
75
|
+
const h = new Set(a);
|
|
76
76
|
return h.add(t.path), h;
|
|
77
77
|
}));
|
|
78
78
|
}, Q = () => {
|
|
79
79
|
m("/");
|
|
80
80
|
}, R = () => {
|
|
81
|
-
const t = u(
|
|
82
|
-
k(t) ? (m(t),
|
|
81
|
+
const t = u($().trim());
|
|
82
|
+
k(t) ? (m(t), b(""), F(t)) : b("Path not found");
|
|
83
83
|
}, U = (t) => {
|
|
84
84
|
t.key === "Enter" && (t.preventDefault(), R());
|
|
85
|
-
}, Y =
|
|
86
|
-
const t = x(),
|
|
85
|
+
}, Y = L(() => {
|
|
86
|
+
const t = x(), a = r();
|
|
87
87
|
if (t === "/" || t === "") return [{
|
|
88
|
-
name:
|
|
88
|
+
name: a,
|
|
89
89
|
path: "/"
|
|
90
90
|
}];
|
|
91
91
|
const h = t.split("/").filter(Boolean), P = [{
|
|
92
|
-
name:
|
|
92
|
+
name: a,
|
|
93
93
|
path: "/"
|
|
94
94
|
}];
|
|
95
|
-
let
|
|
96
|
-
for (const
|
|
97
|
-
|
|
98
|
-
name:
|
|
99
|
-
path:
|
|
95
|
+
let D = "";
|
|
96
|
+
for (const A of h)
|
|
97
|
+
D += "/" + A, P.push({
|
|
98
|
+
name: A,
|
|
99
|
+
path: D
|
|
100
100
|
});
|
|
101
101
|
return P;
|
|
102
102
|
});
|
|
103
103
|
return {
|
|
104
104
|
selectedPath: x,
|
|
105
105
|
setSelectedPath: m,
|
|
106
|
-
expandedPaths:
|
|
106
|
+
expandedPaths: w,
|
|
107
107
|
toggleExpand: q,
|
|
108
|
-
pathInput:
|
|
109
|
-
setPathInput:
|
|
110
|
-
pathInputError:
|
|
111
|
-
setPathInputError:
|
|
112
|
-
folderIndex:
|
|
113
|
-
rootFolders:
|
|
108
|
+
pathInput: $,
|
|
109
|
+
setPathInput: n,
|
|
110
|
+
pathInputError: v,
|
|
111
|
+
setPathInputError: b,
|
|
112
|
+
folderIndex: s,
|
|
113
|
+
rootFolders: g,
|
|
114
114
|
isValidPath: k,
|
|
115
|
-
isSelectable:
|
|
115
|
+
isSelectable: S,
|
|
116
116
|
handleSelectFolder: J,
|
|
117
117
|
handleSelectRoot: Q,
|
|
118
118
|
handlePathInputGo: R,
|
|
119
119
|
handlePathInputKeyDown: U,
|
|
120
|
-
expandToPath:
|
|
120
|
+
expandToPath: F,
|
|
121
121
|
breadcrumbSegments: Y,
|
|
122
122
|
handleBreadcrumbClick: (t) => {
|
|
123
|
-
m(t),
|
|
123
|
+
m(t), F(t);
|
|
124
124
|
},
|
|
125
|
-
homeLabel:
|
|
126
|
-
toDisplayPath:
|
|
125
|
+
homeLabel: r,
|
|
126
|
+
toDisplayPath: o
|
|
127
127
|
};
|
|
128
128
|
}
|
|
129
129
|
function pe(e) {
|
|
130
|
-
const [l,
|
|
131
|
-
|
|
130
|
+
const [l, r] = _(!1), [i, o] = _(""), [u, x] = _(!1), m = () => {
|
|
131
|
+
r(!0), o("");
|
|
132
|
+
}, w = () => {
|
|
133
|
+
r(!1), o("");
|
|
132
134
|
}, f = () => {
|
|
133
|
-
n(
|
|
134
|
-
|
|
135
|
-
const o = c().trim();
|
|
136
|
-
if (!o || u()) return;
|
|
135
|
+
const n = i().trim();
|
|
136
|
+
if (!n || u()) return;
|
|
137
137
|
x(!0);
|
|
138
|
-
const
|
|
138
|
+
const v = e.parentPath(), b = n, s = e.onCreateFolder;
|
|
139
139
|
re(() => {
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
}).catch((
|
|
143
|
-
console.error("Failed to create folder:",
|
|
140
|
+
s(v, b).then(() => {
|
|
141
|
+
r(!1), o("");
|
|
142
|
+
}).catch((g) => {
|
|
143
|
+
console.error("Failed to create folder:", g);
|
|
144
144
|
}).finally(() => {
|
|
145
145
|
x(!1);
|
|
146
146
|
});
|
|
147
147
|
});
|
|
148
|
-
},
|
|
149
|
-
|
|
148
|
+
}, $ = (n) => {
|
|
149
|
+
n.key === "Enter" ? (n.preventDefault(), f()) : n.key === "Escape" && (n.preventDefault(), w());
|
|
150
150
|
};
|
|
151
|
-
return
|
|
151
|
+
return c(E, {
|
|
152
152
|
get when() {
|
|
153
153
|
return l();
|
|
154
154
|
},
|
|
155
155
|
get fallback() {
|
|
156
156
|
return (() => {
|
|
157
|
-
var
|
|
158
|
-
return
|
|
157
|
+
var n = se(), v = n.firstChild;
|
|
158
|
+
return n.$$click = m, d(n, c(ae, {
|
|
159
159
|
class: "w-3.5 h-3.5"
|
|
160
|
-
}),
|
|
160
|
+
}), v), T(() => p(n, I("flex items-center gap-1 text-xs text-muted-foreground cursor-pointer", "hover:text-foreground transition-colors duration-100", "focus:outline-none focus-visible:ring-1 focus-visible:ring-ring rounded px-1 py-0.5"))), n;
|
|
161
161
|
})();
|
|
162
162
|
},
|
|
163
163
|
get children() {
|
|
164
164
|
return [(() => {
|
|
165
|
-
var
|
|
166
|
-
return d(
|
|
165
|
+
var n = O(), v = n.firstChild;
|
|
166
|
+
return d(v, c(H, {
|
|
167
167
|
size: "sm",
|
|
168
168
|
get value() {
|
|
169
|
-
return
|
|
169
|
+
return i();
|
|
170
170
|
},
|
|
171
|
-
onInput: (
|
|
172
|
-
onKeyDown:
|
|
171
|
+
onInput: (b) => o(b.currentTarget.value),
|
|
172
|
+
onKeyDown: $,
|
|
173
173
|
placeholder: "Folder name",
|
|
174
174
|
get disabled() {
|
|
175
175
|
return u();
|
|
176
176
|
},
|
|
177
177
|
autofocus: !0
|
|
178
|
-
})), d(
|
|
178
|
+
})), d(n, c(N, {
|
|
179
179
|
variant: "primary",
|
|
180
180
|
size: "sm",
|
|
181
|
-
onClick:
|
|
181
|
+
onClick: f,
|
|
182
182
|
get loading() {
|
|
183
183
|
return u();
|
|
184
184
|
},
|
|
185
185
|
get disabled() {
|
|
186
|
-
return !
|
|
186
|
+
return !i().trim();
|
|
187
187
|
},
|
|
188
188
|
get children() {
|
|
189
|
-
return
|
|
189
|
+
return c(oe, {
|
|
190
190
|
class: "w-3.5 h-3.5"
|
|
191
191
|
});
|
|
192
192
|
}
|
|
193
|
-
}), null), d(
|
|
193
|
+
}), null), d(n, c(N, {
|
|
194
194
|
variant: "ghost",
|
|
195
195
|
size: "sm",
|
|
196
196
|
class: "bg-transparent text-muted-foreground hover:bg-red-500 hover:text-white",
|
|
197
|
-
onClick:
|
|
197
|
+
onClick: w,
|
|
198
198
|
get disabled() {
|
|
199
199
|
return u();
|
|
200
200
|
},
|
|
201
201
|
get children() {
|
|
202
|
-
return
|
|
202
|
+
return c(le, {
|
|
203
203
|
class: "w-3.5 h-3.5"
|
|
204
204
|
});
|
|
205
205
|
}
|
|
206
|
-
}), null),
|
|
206
|
+
}), null), n;
|
|
207
207
|
})(), (() => {
|
|
208
|
-
var
|
|
209
|
-
return
|
|
210
|
-
var
|
|
211
|
-
return () =>
|
|
212
|
-
})(), null),
|
|
208
|
+
var n = ce();
|
|
209
|
+
return n.firstChild, d(n, (() => {
|
|
210
|
+
var v = B(() => !!e.toDisplayPath);
|
|
211
|
+
return () => v() ? e.toDisplayPath(e.parentPath()) : e.parentPath();
|
|
212
|
+
})(), null), n;
|
|
213
213
|
})()];
|
|
214
214
|
}
|
|
215
215
|
});
|
|
216
216
|
}
|
|
217
217
|
function Ie(e) {
|
|
218
218
|
return (() => {
|
|
219
|
-
var l = O(),
|
|
220
|
-
return d(
|
|
219
|
+
var l = O(), r = l.firstChild;
|
|
220
|
+
return d(r, c(H, {
|
|
221
221
|
size: "sm",
|
|
222
222
|
get value() {
|
|
223
223
|
return e.value();
|
|
224
224
|
},
|
|
225
|
-
onInput: (
|
|
225
|
+
onInput: (i) => e.onInput(i.currentTarget.value),
|
|
226
226
|
get onKeyDown() {
|
|
227
227
|
return e.onKeyDown;
|
|
228
228
|
},
|
|
@@ -232,7 +232,7 @@ function Ie(e) {
|
|
|
232
232
|
get error() {
|
|
233
233
|
return e.error();
|
|
234
234
|
}
|
|
235
|
-
})), d(l,
|
|
235
|
+
})), d(l, c(N, {
|
|
236
236
|
variant: "outline",
|
|
237
237
|
size: "sm",
|
|
238
238
|
get onClick() {
|
|
@@ -245,22 +245,22 @@ function Ie(e) {
|
|
|
245
245
|
function Fe(e) {
|
|
246
246
|
return (() => {
|
|
247
247
|
var l = ue();
|
|
248
|
-
return d(l,
|
|
248
|
+
return d(l, c(z, {
|
|
249
249
|
get each() {
|
|
250
250
|
return e.segments();
|
|
251
251
|
},
|
|
252
|
-
children: (
|
|
252
|
+
children: (r, i) => [c(E, {
|
|
253
253
|
get when() {
|
|
254
|
-
return
|
|
254
|
+
return i() > 0;
|
|
255
255
|
},
|
|
256
256
|
get children() {
|
|
257
|
-
return
|
|
257
|
+
return c(M, {
|
|
258
258
|
class: "w-3 h-3 text-muted-foreground/50 flex-shrink-0"
|
|
259
259
|
});
|
|
260
260
|
}
|
|
261
261
|
}), (() => {
|
|
262
|
-
var
|
|
263
|
-
return
|
|
262
|
+
var o = V();
|
|
263
|
+
return o.$$click = () => e.onClick(r.path), d(o, () => r.name), T(() => p(o, I("text-xs px-1 py-0.5 rounded cursor-pointer flex-shrink-0", "transition-colors duration-100", "focus:outline-none focus-visible:ring-1 focus-visible:ring-ring", i() === e.segments().length - 1 ? "font-medium text-foreground" : "text-muted-foreground hover:text-foreground hover:bg-muted/50"))), o;
|
|
264
264
|
})()]
|
|
265
265
|
})), l;
|
|
266
266
|
})();
|
|
@@ -268,14 +268,14 @@ function Fe(e) {
|
|
|
268
268
|
function Ee(e) {
|
|
269
269
|
const l = () => (typeof e.homeLabel == "function" ? e.homeLabel() : e.homeLabel) ?? "Root";
|
|
270
270
|
return (() => {
|
|
271
|
-
var
|
|
272
|
-
return
|
|
271
|
+
var r = he(), i = r.firstChild, o = i.firstChild;
|
|
272
|
+
return i.$$click = () => e.onSelectRoot(), d(i, c(W, {
|
|
273
273
|
class: "w-4 h-4 flex-shrink-0"
|
|
274
|
-
}),
|
|
274
|
+
}), o), d(o, l), d(r, c(z, {
|
|
275
275
|
get each() {
|
|
276
276
|
return e.rootFolders();
|
|
277
277
|
},
|
|
278
|
-
children: (u) =>
|
|
278
|
+
children: (u) => c(X, {
|
|
279
279
|
item: u,
|
|
280
280
|
depth: 1,
|
|
281
281
|
get selectedPath() {
|
|
@@ -294,7 +294,7 @@ function Ee(e) {
|
|
|
294
294
|
return e.isSelectable;
|
|
295
295
|
}
|
|
296
296
|
})
|
|
297
|
-
}), null), d(
|
|
297
|
+
}), null), d(r, c(E, {
|
|
298
298
|
get when() {
|
|
299
299
|
return e.rootFolders().length === 0;
|
|
300
300
|
},
|
|
@@ -302,68 +302,68 @@ function Ee(e) {
|
|
|
302
302
|
var u = de();
|
|
303
303
|
return d(u, () => e.emptyText ?? "No directories available"), u;
|
|
304
304
|
}
|
|
305
|
-
}), null),
|
|
306
|
-
var x =
|
|
307
|
-
return x !== u.e &&
|
|
305
|
+
}), null), T((u) => {
|
|
306
|
+
var x = I("border border-border rounded overflow-y-auto", e.class), m = e.style, w = I("flex items-center gap-1.5 w-full text-left text-xs py-1.5 px-2 cursor-pointer", "transition-colors duration-100", "hover:bg-accent/60", "focus:outline-none focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-ring", e.selectedPath() === "/" && "bg-accent text-accent-foreground font-medium");
|
|
307
|
+
return x !== u.e && p(r, u.e = x), u.t = ee(r, m, u.t), w !== u.a && p(i, u.a = w), u;
|
|
308
308
|
}, {
|
|
309
309
|
e: void 0,
|
|
310
310
|
t: void 0,
|
|
311
311
|
a: void 0
|
|
312
|
-
}),
|
|
312
|
+
}), r;
|
|
313
313
|
})();
|
|
314
314
|
}
|
|
315
315
|
function X(e) {
|
|
316
|
-
const l = () => e.expandedPaths().has(e.item.path),
|
|
316
|
+
const l = () => e.expandedPaths().has(e.item.path), r = () => e.selectedPath() === e.item.path, i = () => e.isSelectable(e.item), o = L(() => e.item.children?.filter((f) => f.type === "folder") ?? []), u = () => o().length > 0, x = () => e.item.type === "folder", m = (f) => {
|
|
317
317
|
f.stopPropagation(), e.onToggle(e.item.path);
|
|
318
|
-
},
|
|
318
|
+
}, w = () => {
|
|
319
319
|
e.onSelect(e.item);
|
|
320
320
|
};
|
|
321
321
|
return (() => {
|
|
322
|
-
var f = ge(),
|
|
323
|
-
return d(
|
|
322
|
+
var f = ge(), $ = f.firstChild, n = $.firstChild, v = n.firstChild, b = v.nextSibling;
|
|
323
|
+
return d($, c(E, {
|
|
324
324
|
get when() {
|
|
325
|
-
return
|
|
325
|
+
return x();
|
|
326
326
|
},
|
|
327
327
|
get fallback() {
|
|
328
328
|
return me();
|
|
329
329
|
},
|
|
330
330
|
get children() {
|
|
331
|
-
var
|
|
332
|
-
return
|
|
331
|
+
var s = V();
|
|
332
|
+
return s.$$click = m, d(s, c(M, {
|
|
333
333
|
class: "w-3 h-3 opacity-60"
|
|
334
|
-
})),
|
|
335
|
-
var
|
|
336
|
-
return
|
|
334
|
+
})), T((g) => {
|
|
335
|
+
var k = I("flex-shrink-0 w-4 h-4 flex items-center justify-center cursor-pointer", "transition-transform duration-150", l() && "rotate-90", "focus:outline-none focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-ring"), S = l() ? "Collapse folder" : "Expand folder";
|
|
336
|
+
return k !== g.e && p(s, g.e = k), S !== g.t && te(s, "aria-label", g.t = S), g;
|
|
337
337
|
}, {
|
|
338
338
|
e: void 0,
|
|
339
339
|
t: void 0
|
|
340
|
-
}),
|
|
340
|
+
}), s;
|
|
341
341
|
}
|
|
342
|
-
}),
|
|
342
|
+
}), n), n.$$click = w, d(v, c(E, {
|
|
343
343
|
get when() {
|
|
344
344
|
return B(() => !!u())() && l();
|
|
345
345
|
},
|
|
346
346
|
get fallback() {
|
|
347
|
-
return
|
|
347
|
+
return c(ie, {
|
|
348
348
|
class: "w-4 h-4"
|
|
349
349
|
});
|
|
350
350
|
},
|
|
351
351
|
get children() {
|
|
352
|
-
return
|
|
352
|
+
return c(W, {
|
|
353
353
|
class: "w-4 h-4"
|
|
354
354
|
});
|
|
355
355
|
}
|
|
356
|
-
})), d(b, () => e.item.name), d(f,
|
|
356
|
+
})), d(b, () => e.item.name), d(f, c(E, {
|
|
357
357
|
get when() {
|
|
358
358
|
return B(() => !!l())() && u();
|
|
359
359
|
},
|
|
360
360
|
get children() {
|
|
361
|
-
var
|
|
362
|
-
return d(
|
|
361
|
+
var s = fe();
|
|
362
|
+
return d(s, c(z, {
|
|
363
363
|
get each() {
|
|
364
|
-
return
|
|
364
|
+
return o();
|
|
365
365
|
},
|
|
366
|
-
children: (g) =>
|
|
366
|
+
children: (g) => c(X, {
|
|
367
367
|
item: g,
|
|
368
368
|
get depth() {
|
|
369
369
|
return e.depth + 1;
|
|
@@ -384,11 +384,11 @@ function X(e) {
|
|
|
384
384
|
return e.isSelectable;
|
|
385
385
|
}
|
|
386
386
|
})
|
|
387
|
-
})),
|
|
387
|
+
})), s;
|
|
388
388
|
}
|
|
389
|
-
}), null),
|
|
390
|
-
var g =
|
|
391
|
-
return g !==
|
|
389
|
+
}), null), T((s) => {
|
|
390
|
+
var g = I("group flex items-center w-full text-xs", "transition-colors duration-100", i() ? "hover:bg-accent/60" : "opacity-50", r() && i() && "bg-accent text-accent-foreground font-medium"), k = `${4 + e.depth * 14}px`, S = !i(), F = I("flex items-center gap-1 flex-1 min-w-0 text-left py-1.5 pl-0.5 pr-2", i() ? "cursor-pointer" : "cursor-not-allowed", "focus:outline-none focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-ring");
|
|
391
|
+
return g !== s.e && p($, s.e = g), k !== s.t && ne($, "padding-left", s.t = k), S !== s.a && (n.disabled = s.a = S), F !== s.o && p(n, s.o = F), s;
|
|
392
392
|
}, {
|
|
393
393
|
e: void 0,
|
|
394
394
|
t: void 0,
|
|
@@ -405,7 +405,7 @@ export {
|
|
|
405
405
|
Ee as PickerFolderTree,
|
|
406
406
|
X as PickerTreeNode,
|
|
407
407
|
j as getAncestorPaths,
|
|
408
|
-
|
|
408
|
+
C as normalizePath,
|
|
409
409
|
ve as useFolderIndex,
|
|
410
410
|
_e as usePickerTree
|
|
411
411
|
};
|