@floegence/floe-webapp-core 0.46.5 → 0.46.6

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.
@@ -1,90 +1,96 @@
1
- import { insert as f, createComponent as h, effect as z, className as N, use as J, style as ue, memo as Q, template as $, setAttribute as V, setStyleProperty as de, delegateEvents as he } from "solid-js/web";
2
- import { createSignal as C, createMemo as B, createEffect as q, on as p, For as K, Show as L, onCleanup as fe, untrack as ge } from "solid-js";
1
+ import { insert as f, createComponent as h, effect as z, className as N, use as J, style as ue, memo as Q, template as $, setAttribute as O, setStyleProperty as de, delegateEvents as he } from "solid-js/web";
2
+ import { createSignal as C, createMemo as B, createEffect as p, on as V, For as A, Show as L, onCleanup as fe, untrack as ge } from "solid-js";
3
3
  import { cn as R } from "../../../utils/cn.js";
4
4
  import { deferAfterPaint as me } from "../../../utils/defer.js";
5
- import { Button as A } from "../Button.js";
5
+ import { Button as q } from "../Button.js";
6
6
  import { Input as U } from "../Input.js";
7
7
  import { ChevronRight as Y, Check as ve, X as Pe, Plus as xe } from "../../icons/index.js";
8
8
  import { FolderOpenIcon as be, FileItemIcon as we } from "../../file-browser/FileIcons.js";
9
9
  var Z = /* @__PURE__ */ $('<div class="flex items-center gap-1.5"><div class=flex-1>'), ye = /* @__PURE__ */ $('<p class="text-[11px] text-muted-foreground -mt-1">Creating in: '), ke = /* @__PURE__ */ $("<button type=button><span>New Folder"), $e = /* @__PURE__ */ $('<nav class="flex items-center gap-0.5 min-w-0 overflow-x-auto py-0.5"aria-label="Selected path">'), ee = /* @__PURE__ */ $("<button type=button>"), Ce = /* @__PURE__ */ $('<div class="flex items-center justify-center py-6 text-xs text-muted-foreground">'), Se = /* @__PURE__ */ $("<div><button type=button><span>"), Ie = /* @__PURE__ */ $("<div class=overflow-hidden>"), _e = /* @__PURE__ */ $('<div class="flex flex-col"><div><button type=button><span class="flex-shrink-0 w-4 h-4"></span><span class=truncate>'), Ee = /* @__PURE__ */ $('<span class="flex-shrink-0 w-4 h-4">');
10
- function x(e) {
11
- const s = (e ?? "").trim();
12
- if (s === "" || s === "/") return "/";
13
- const o = s.replace(/\/+$/, "");
14
- return o.startsWith("/") ? o : "/" + o;
10
+ function P(e) {
11
+ const a = (e ?? "").trim();
12
+ if (a === "" || a === "/") return "/";
13
+ const n = a.replace(/\/+$/, "");
14
+ return n.startsWith("/") ? n : "/" + n;
15
15
  }
16
16
  function X(e) {
17
- const s = e.split("/").filter(Boolean), o = [];
18
- let a = "";
19
- for (let l = 0; l < s.length - 1; l++)
20
- a += "/" + s[l], o.push(a);
21
- return o;
17
+ const a = e.split("/").filter(Boolean), n = [];
18
+ let l = "";
19
+ for (let i = 0; i < a.length - 1; i++)
20
+ l += "/" + a[i], n.push(l);
21
+ return n;
22
+ }
23
+ function Ae(e) {
24
+ const a = P(e);
25
+ if (a === "/") return "/";
26
+ const n = a.split("/").filter(Boolean);
27
+ return n.pop(), n.length ? "/" + n.join("/") : "/";
22
28
  }
23
29
  function Ne(e) {
24
30
  return B(() => {
25
- const s = /* @__PURE__ */ new Map(), o = (a) => {
26
- for (const l of a)
27
- l.type === "folder" && (s.set(x(l.path), l), l.children?.length && o(l.children));
31
+ const a = /* @__PURE__ */ new Map(), n = (l) => {
32
+ for (const i of l)
33
+ i.type === "folder" && (a.set(P(i.path), i), i.children?.length && n(i.children));
28
34
  };
29
- return o(e()), s;
35
+ return n(e()), a;
30
36
  });
31
37
  }
32
- function Re(e, s) {
33
- const o = x(e ?? "/"), a = s ? x(s) : void 0;
34
- return !a || a === "/" ? o : o === a ? "/" : o.startsWith(a + "/") ? x(o.slice(a.length)) : o;
38
+ function Re(e, a) {
39
+ const n = P(e ?? "/"), l = a ? P(a) : void 0;
40
+ return !l || l === "/" ? n : n === l ? "/" : n.startsWith(l + "/") ? P(n.slice(l.length)) : n;
35
41
  }
36
42
  function Ke(e) {
37
- const s = () => (typeof e.homeLabel == "function" ? e.homeLabel() : e.homeLabel) ?? "Root", o = () => {
43
+ const a = () => (typeof e.homeLabel == "function" ? e.homeLabel() : e.homeLabel) ?? "Root", n = () => {
38
44
  const t = typeof e.homePath == "function" ? e.homePath() : e.homePath;
39
- return t ? x(t) : void 0;
40
- }, a = () => {
45
+ return t ? P(t) : void 0;
46
+ }, l = () => {
41
47
  const t = typeof e.initialPath == "function" ? e.initialPath() : e.initialPath;
42
- return Re(t, o());
43
- }, l = (t) => {
44
- const r = o();
45
- if (!r) return t;
46
- const c = x(t);
47
- return c === "/" ? r : r === "/" ? c : r + c;
48
+ return Re(t, n());
49
+ }, i = (t) => {
50
+ const o = n();
51
+ if (!o) return t;
52
+ const c = P(t);
53
+ return c === "/" ? o : o === "/" ? c : o + c;
48
54
  }, k = (t) => {
49
- const r = o();
50
- if (!r) return x(t);
51
- const c = x(t);
52
- return c === r ? "/" : r !== "/" && c.startsWith(r + "/") ? c.slice(r.length) || "/" : x(t);
53
- }, [u, m] = C(a()), [b, i] = C(/* @__PURE__ */ new Set(["/"])), [w, n] = C(l(a())), [P, S] = C(!1), [d, g] = C(""), [I, _] = C(0);
55
+ const o = n();
56
+ if (!o) return P(t);
57
+ const c = P(t);
58
+ return c === o ? "/" : o !== "/" && c.startsWith(o + "/") ? c.slice(o.length) || "/" : P(t);
59
+ }, [u, m] = C(l()), [b, s] = C(/* @__PURE__ */ new Set(["/"])), [w, r] = C(i(l())), [x, S] = C(!1), [d, g] = C(""), [I, _] = C(0);
54
60
  let E = 0;
55
61
  const T = Ne(e.files), ne = B(() => e.files().filter((t) => t.type === "folder"));
56
- q(p(u, (t) => {
57
- n(l(t)), g("");
62
+ p(V(u, (t) => {
63
+ r(i(t)), g("");
58
64
  }));
59
- const M = (t) => {
60
- const r = x(t);
61
- return r === "/" || T().has(r);
62
- }, G = (t) => e.filter ? e.filter(t) : !0, H = (t) => {
63
- const r = X(t);
64
- i((c) => {
65
+ const K = (t) => {
66
+ const o = P(t);
67
+ return o === "/" || T().has(o);
68
+ }, M = (t) => e.filter ? e.filter(t) : !0, j = (t) => {
69
+ const o = X(t);
70
+ s((c) => {
65
71
  const v = new Set(c);
66
- for (const y of r) v.add(y);
72
+ for (const y of o) v.add(y);
67
73
  return v.add(t), v;
68
74
  });
69
- }, W = () => {
75
+ }, G = () => {
70
76
  _((t) => t + 1);
71
- }, j = (t) => {
77
+ }, H = (t) => {
72
78
  if (e.onExpand)
73
79
  try {
74
- const r = e.onExpand(t);
75
- Promise.resolve(r).catch(() => {
80
+ const o = e.onExpand(t);
81
+ Promise.resolve(o).catch(() => {
76
82
  });
77
83
  } catch {
78
84
  }
79
- }, re = async (t, r) => {
80
- const c = x(t);
85
+ }, re = async (t, o) => {
86
+ const c = P(t);
81
87
  if (c === "/")
82
88
  return {
83
89
  status: "ready",
84
90
  resolvedPath: "/"
85
91
  };
86
92
  if (!e.ensurePath)
87
- return M(c) ? {
93
+ return K(c) ? {
88
94
  status: "ready",
89
95
  resolvedPath: c
90
96
  } : {
@@ -93,10 +99,10 @@ function Ke(e) {
93
99
  message: "Path not found"
94
100
  };
95
101
  try {
96
- const v = await e.ensurePath(c, r);
102
+ const v = await e.ensurePath(c, o);
97
103
  return {
98
104
  status: v.status,
99
- resolvedPath: x(v.resolvedPath || c),
105
+ resolvedPath: P(v.resolvedPath || c),
100
106
  message: v.message?.trim() || void 0
101
107
  };
102
108
  } catch {
@@ -106,55 +112,55 @@ function Ke(e) {
106
112
  message: "Could not load path"
107
113
  };
108
114
  }
109
- }, F = async (t, r) => {
110
- const c = x(t);
115
+ }, F = async (t, o) => {
116
+ const c = P(t);
111
117
  E += 1;
112
118
  const v = E;
113
- S(!0), r.reason !== "open" && g("");
119
+ S(!0), o.reason !== "open" && g("");
114
120
  try {
115
- const y = await re(c, r);
121
+ const y = await re(c, o);
116
122
  if (v !== E) return y;
117
123
  if (y.status === "ready") {
118
- const D = x(y.resolvedPath);
119
- m(D), H(D), g(""), W();
120
- } else r.reason !== "open" && g(y.message || (y.status === "missing" ? "Path not found" : "Could not load path"));
124
+ const D = P(y.resolvedPath);
125
+ m(D), j(D), g(""), G();
126
+ } else o.reason !== "open" && g(y.message || (y.status === "missing" ? "Path not found" : "Could not load path"));
121
127
  return y;
122
128
  } finally {
123
129
  v === E && S(!1);
124
130
  }
125
131
  }, oe = (t) => {
126
- const r = b().has(t);
127
- i((c) => {
132
+ const o = b().has(t);
133
+ s((c) => {
128
134
  const v = new Set(c);
129
135
  return v.has(t) ? v.delete(t) : v.add(t), v;
130
- }), r || j(t);
136
+ }), o || H(t);
131
137
  }, ae = (t) => {
132
- if (!G(t)) return;
133
- const r = b().has(t.path);
138
+ if (!M(t)) return;
139
+ const o = b().has(t.path);
134
140
  F(t.path, {
135
141
  reason: "tree-select"
136
142
  }).then((c) => {
137
- c.status !== "ready" || r || j(x(c.resolvedPath));
143
+ c.status !== "ready" || o || H(P(c.resolvedPath));
138
144
  });
139
145
  }, le = () => {
140
146
  F("/", {
141
147
  reason: "tree-select"
142
148
  });
143
- }, O = () => {
149
+ }, W = () => {
144
150
  const t = k(w().trim());
145
151
  F(t, {
146
152
  reason: "path-input"
147
153
  });
148
154
  }, ie = (t) => {
149
- t.key === "Enter" && (t.preventDefault(), O());
155
+ t.key === "Enter" && (t.preventDefault(), W());
150
156
  }, se = B(() => {
151
- const t = u(), r = s();
157
+ const t = u(), o = a();
152
158
  if (t === "/" || t === "") return [{
153
- name: r,
159
+ name: o,
154
160
  path: "/"
155
161
  }];
156
162
  const c = t.split("/").filter(Boolean), v = [{
157
- name: r,
163
+ name: o,
158
164
  path: "/"
159
165
  }];
160
166
  let y = "";
@@ -169,12 +175,12 @@ function Ke(e) {
169
175
  reason: "breadcrumb"
170
176
  });
171
177
  };
172
- return q(p(e.open, (t) => {
178
+ return p(V(e.open, (t) => {
173
179
  if (t) {
174
- const r = a();
175
- m(r), n(l(r)), g("");
176
- const c = X(r);
177
- i(/* @__PURE__ */ new Set(["/", ...c])), W(), e.onReset?.(r), F(r, {
180
+ const o = l();
181
+ m(o), r(i(o)), g("");
182
+ const c = X(o);
183
+ s(/* @__PURE__ */ new Set(["/", ...c])), G(), e.onReset?.(o), F(o, {
178
184
  reason: "open"
179
185
  });
180
186
  }
@@ -184,92 +190,92 @@ function Ke(e) {
184
190
  expandedPaths: b,
185
191
  toggleExpand: oe,
186
192
  pathInput: w,
187
- setPathInput: n,
188
- pathPending: P,
193
+ setPathInput: r,
194
+ pathPending: x,
189
195
  pathInputError: d,
190
196
  setPathInputError: g,
191
197
  folderIndex: T,
192
198
  rootFolders: ne,
193
- isValidPath: M,
194
- isSelectable: G,
199
+ isValidPath: K,
200
+ isSelectable: M,
195
201
  handleSelectFolder: ae,
196
202
  handleSelectRoot: le,
197
- handlePathInputGo: O,
203
+ handlePathInputGo: W,
198
204
  handlePathInputKeyDown: ie,
199
- expandToPath: H,
205
+ expandToPath: j,
200
206
  navigateToPath: F,
201
207
  breadcrumbSegments: se,
202
208
  handleBreadcrumbClick: ce,
203
- homeLabel: s,
204
- toDisplayPath: l,
209
+ homeLabel: a,
210
+ toDisplayPath: i,
205
211
  revealNonce: I
206
212
  };
207
213
  }
208
214
  function Me(e) {
209
- const [s, o] = C(!1), [a, l] = C(""), [k, u] = C(!1), m = () => {
210
- o(!0), l("");
215
+ const [a, n] = C(!1), [l, i] = C(""), [k, u] = C(!1), m = () => {
216
+ n(!0), i("");
211
217
  }, b = () => {
212
- o(!1), l("");
213
- }, i = () => {
214
- const n = a().trim();
215
- if (!n || k()) return;
218
+ n(!1), i("");
219
+ }, s = () => {
220
+ const r = l().trim();
221
+ if (!r || k()) return;
216
222
  u(!0);
217
- const P = e.parentPath(), S = n, d = e.onCreateFolder;
223
+ const x = e.parentPath(), S = r, d = e.onCreateFolder;
218
224
  me(() => {
219
- d(P, S).then(() => {
220
- o(!1), l("");
225
+ d(x, S).then(() => {
226
+ n(!1), i("");
221
227
  }).catch((g) => {
222
228
  console.error("Failed to create folder:", g);
223
229
  }).finally(() => {
224
230
  u(!1);
225
231
  });
226
232
  });
227
- }, w = (n) => {
228
- n.key === "Enter" ? (n.preventDefault(), i()) : n.key === "Escape" && (n.preventDefault(), b());
233
+ }, w = (r) => {
234
+ r.key === "Enter" ? (r.preventDefault(), s()) : r.key === "Escape" && (r.preventDefault(), b());
229
235
  };
230
236
  return h(L, {
231
237
  get when() {
232
- return s();
238
+ return a();
233
239
  },
234
240
  get fallback() {
235
241
  return (() => {
236
- var n = ke(), P = n.firstChild;
237
- return n.$$click = m, f(n, h(xe, {
242
+ var r = ke(), x = r.firstChild;
243
+ return r.$$click = m, f(r, h(xe, {
238
244
  class: "w-3.5 h-3.5"
239
- }), P), z(() => N(n, R("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;
245
+ }), x), z(() => N(r, R("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"))), r;
240
246
  })();
241
247
  },
242
248
  get children() {
243
249
  return [(() => {
244
- var n = Z(), P = n.firstChild;
245
- return f(P, h(U, {
250
+ var r = Z(), x = r.firstChild;
251
+ return f(x, h(U, {
246
252
  size: "sm",
247
253
  get value() {
248
- return a();
254
+ return l();
249
255
  },
250
- onInput: (S) => l(S.currentTarget.value),
256
+ onInput: (S) => i(S.currentTarget.value),
251
257
  onKeyDown: w,
252
258
  placeholder: "Folder name",
253
259
  get disabled() {
254
260
  return k();
255
261
  },
256
262
  autofocus: !0
257
- })), f(n, h(A, {
263
+ })), f(r, h(q, {
258
264
  variant: "primary",
259
265
  size: "sm",
260
- onClick: i,
266
+ onClick: s,
261
267
  get loading() {
262
268
  return k();
263
269
  },
264
270
  get disabled() {
265
- return !a().trim();
271
+ return !l().trim();
266
272
  },
267
273
  get children() {
268
274
  return h(ve, {
269
275
  class: "w-3.5 h-3.5"
270
276
  });
271
277
  }
272
- }), null), f(n, h(A, {
278
+ }), null), f(r, h(q, {
273
279
  variant: "ghost-destructive",
274
280
  size: "sm",
275
281
  onClick: b,
@@ -281,26 +287,26 @@ function Me(e) {
281
287
  class: "w-3.5 h-3.5"
282
288
  });
283
289
  }
284
- }), null), n;
290
+ }), null), r;
285
291
  })(), (() => {
286
- var n = ye();
287
- return n.firstChild, f(n, (() => {
288
- var P = Q(() => !!e.toDisplayPath);
289
- return () => P() ? e.toDisplayPath(e.parentPath()) : e.parentPath();
290
- })(), null), n;
292
+ var r = ye();
293
+ return r.firstChild, f(r, (() => {
294
+ var x = Q(() => !!e.toDisplayPath);
295
+ return () => x() ? e.toDisplayPath(e.parentPath()) : e.parentPath();
296
+ })(), null), r;
291
297
  })()];
292
298
  }
293
299
  });
294
300
  }
295
- function Ge(e) {
301
+ function je(e) {
296
302
  return (() => {
297
- var s = Z(), o = s.firstChild;
298
- return f(o, h(U, {
303
+ var a = Z(), n = a.firstChild;
304
+ return f(n, h(U, {
299
305
  size: "sm",
300
306
  get value() {
301
307
  return e.value();
302
308
  },
303
- onInput: (a) => e.onInput(a.currentTarget.value),
309
+ onInput: (l) => e.onInput(l.currentTarget.value),
304
310
  get onKeyDown() {
305
311
  return e.onKeyDown;
306
312
  },
@@ -313,7 +319,7 @@ function Ge(e) {
313
319
  get error() {
314
320
  return e.error();
315
321
  }
316
- })), f(s, h(A, {
322
+ })), f(a, h(q, {
317
323
  variant: "outline",
318
324
  size: "sm",
319
325
  get onClick() {
@@ -325,19 +331,19 @@ function Ge(e) {
325
331
  get children() {
326
332
  return e.pending?.() === !0 ? "Opening…" : "Go";
327
333
  }
328
- }), null), s;
334
+ }), null), a;
329
335
  })();
330
336
  }
331
- function He(e) {
337
+ function Ge(e) {
332
338
  return (() => {
333
- var s = $e();
334
- return f(s, h(K, {
339
+ var a = $e();
340
+ return f(a, h(A, {
335
341
  get each() {
336
342
  return e.segments();
337
343
  },
338
- children: (o, a) => [h(L, {
344
+ children: (n, l) => [h(L, {
339
345
  get when() {
340
- return a() > 0;
346
+ return l() > 0;
341
347
  },
342
348
  get children() {
343
349
  return h(Y, {
@@ -345,51 +351,51 @@ function He(e) {
345
351
  });
346
352
  }
347
353
  }), (() => {
348
- var l = ee();
349
- return l.$$click = () => e.onClick(o.path), f(l, () => o.name), z(() => N(l, R("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", a() === e.segments().length - 1 ? "font-medium text-foreground" : "text-muted-foreground hover:text-foreground hover:bg-muted/50"))), l;
354
+ var i = ee();
355
+ return i.$$click = () => e.onClick(n.path), f(i, () => n.name), z(() => N(i, R("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", l() === e.segments().length - 1 ? "font-medium text-foreground" : "text-muted-foreground hover:text-foreground hover:bg-muted/50"))), i;
350
356
  })()]
351
- })), s;
357
+ })), a;
352
358
  })();
353
359
  }
354
- function We(e) {
355
- const s = () => (typeof e.homeLabel == "function" ? e.homeLabel() : e.homeLabel) ?? "Root";
356
- let o;
357
- const a = /* @__PURE__ */ new Map();
358
- let l = -1;
360
+ function He(e) {
361
+ const a = () => (typeof e.homeLabel == "function" ? e.homeLabel() : e.homeLabel) ?? "Root";
362
+ let n;
363
+ const l = /* @__PURE__ */ new Map();
364
+ let i = -1;
359
365
  const k = (u, m) => {
360
366
  if (m) {
361
- a.set(u, m);
367
+ l.set(u, m);
362
368
  return;
363
369
  }
364
- a.delete(u);
370
+ l.delete(u);
365
371
  };
366
- return q(() => {
372
+ return p(() => {
367
373
  const u = e.revealNonce?.() ?? 0, m = e.selectedPath();
368
- e.expandedPaths(), e.rootFolders(), !(u <= l) && queueMicrotask(() => {
369
- if (!o || !ge(() => (e.revealNonce?.() ?? 0) === u && u > l))
374
+ e.expandedPaths(), e.rootFolders(), !(u <= i) && queueMicrotask(() => {
375
+ if (!n || !ge(() => (e.revealNonce?.() ?? 0) === u && u > i))
370
376
  return;
371
377
  if (m === "/") {
372
- o.scrollTop = 0, l = u;
378
+ n.scrollTop = 0, i = u;
373
379
  return;
374
380
  }
375
- const i = a.get(m);
376
- i && (i.scrollIntoView({
381
+ const s = l.get(m);
382
+ s && (s.scrollIntoView({
377
383
  block: "nearest",
378
384
  inline: "nearest"
379
- }), l = u);
385
+ }), i = u);
380
386
  });
381
387
  }), (() => {
382
388
  var u = Se(), m = u.firstChild, b = m.firstChild;
383
- return J((i) => {
384
- o = i;
389
+ return J((s) => {
390
+ n = s;
385
391
  }, u), m.$$click = () => e.onSelectRoot(), f(m, h(be, {
386
392
  class: "w-4 h-4 flex-shrink-0"
387
- }), b), f(b, s), f(u, h(K, {
393
+ }), b), f(b, a), f(u, h(A, {
388
394
  get each() {
389
395
  return e.rootFolders();
390
396
  },
391
- children: (i) => h(te, {
392
- item: i,
397
+ children: (s) => h(te, {
398
+ item: s,
393
399
  depth: 1,
394
400
  get selectedPath() {
395
401
  return e.selectedPath;
@@ -416,12 +422,12 @@ function We(e) {
416
422
  return e.rootFolders().length === 0;
417
423
  },
418
424
  get children() {
419
- var i = Ce();
420
- return f(i, () => e.emptyText ?? "No directories available"), i;
425
+ var s = Ce();
426
+ return f(s, () => e.emptyText ?? "No directories available"), s;
421
427
  }
422
- }), null), z((i) => {
423
- var w = R("border border-border rounded overflow-y-auto", e.class), n = e.style, P = R("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");
424
- return w !== i.e && N(u, i.e = w), i.t = ue(u, n, i.t), P !== i.a && N(m, i.a = P), i;
428
+ }), null), z((s) => {
429
+ var w = R("border border-border rounded overflow-y-auto", e.class), r = e.style, x = R("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");
430
+ return w !== s.e && N(u, s.e = w), s.t = ue(u, r, s.t), x !== s.a && N(m, s.a = x), s;
425
431
  }, {
426
432
  e: void 0,
427
433
  t: void 0,
@@ -430,15 +436,15 @@ function We(e) {
430
436
  })();
431
437
  }
432
438
  function te(e) {
433
- const s = () => e.expandedPaths().has(e.item.path), o = () => e.selectedPath() === e.item.path, a = () => e.isSelectable(e.item), l = B(() => e.item.children?.filter((i) => i.type === "folder") ?? []), k = () => l().length > 0, u = () => e.item.type === "folder", m = (i) => {
434
- i.stopPropagation(), e.onToggle(e.item.path);
439
+ const a = () => e.expandedPaths().has(e.item.path), n = () => e.selectedPath() === e.item.path, l = () => e.isSelectable(e.item), i = B(() => e.item.children?.filter((s) => s.type === "folder") ?? []), k = () => i().length > 0, u = () => e.item.type === "folder", m = (s) => {
440
+ s.stopPropagation(), e.onToggle(e.item.path);
435
441
  }, b = () => {
436
442
  e.onSelect(e.item);
437
443
  };
438
444
  return fe(() => {
439
445
  e.registerRow(e.item.path, null);
440
446
  }), (() => {
441
- var i = _e(), w = i.firstChild, n = w.firstChild, P = n.firstChild, S = P.nextSibling;
447
+ var s = _e(), w = s.firstChild, r = w.firstChild, x = r.firstChild, S = x.nextSibling;
442
448
  return f(w, h(L, {
443
449
  get when() {
444
450
  return u();
@@ -451,32 +457,32 @@ function te(e) {
451
457
  return d.$$click = m, f(d, h(Y, {
452
458
  class: "w-3 h-3 opacity-60"
453
459
  })), z((g) => {
454
- var I = R("flex-shrink-0 w-4 h-4 flex items-center justify-center cursor-pointer", "transition-transform duration-150", s() && "rotate-90", "focus:outline-none focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-ring"), _ = s() ? "Collapse folder" : "Expand folder";
455
- return I !== g.e && N(d, g.e = I), _ !== g.t && V(d, "aria-label", g.t = _), g;
460
+ var I = R("flex-shrink-0 w-4 h-4 flex items-center justify-center cursor-pointer", "transition-transform duration-150", a() && "rotate-90", "focus:outline-none focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-ring"), _ = a() ? "Collapse folder" : "Expand folder";
461
+ return I !== g.e && N(d, g.e = I), _ !== g.t && O(d, "aria-label", g.t = _), g;
456
462
  }, {
457
463
  e: void 0,
458
464
  t: void 0
459
465
  }), d;
460
466
  }
461
- }), n), n.$$click = b, J((d) => {
467
+ }), r), r.$$click = b, J((d) => {
462
468
  e.registerRow(e.item.path, d);
463
- }, n), f(P, h(we, {
469
+ }, r), f(x, h(we, {
464
470
  get item() {
465
471
  return e.item;
466
472
  },
467
473
  get open() {
468
- return s();
474
+ return a();
469
475
  },
470
476
  class: "w-4 h-4"
471
- })), f(S, () => e.item.name), f(i, h(L, {
477
+ })), f(S, () => e.item.name), f(s, h(L, {
472
478
  get when() {
473
- return Q(() => !!s())() && k();
479
+ return Q(() => !!a())() && k();
474
480
  },
475
481
  get children() {
476
482
  var d = Ie();
477
- return f(d, h(K, {
483
+ return f(d, h(A, {
478
484
  get each() {
479
- return l();
485
+ return i();
480
486
  },
481
487
  children: (g) => h(te, {
482
488
  item: g,
@@ -508,26 +514,27 @@ function te(e) {
508
514
  })), d;
509
515
  }
510
516
  }), null), z((d) => {
511
- var g = R("group flex items-center w-full text-xs", "transition-colors duration-100", a() ? "hover:bg-accent/60" : "opacity-50", o() && a() && "bg-accent text-accent-foreground font-medium"), I = `${4 + e.depth * 14}px`, _ = e.item.path, E = !a(), T = R("flex items-center gap-1 flex-1 min-w-0 text-left py-1.5 pl-0.5 pr-2", a() ? "cursor-pointer" : "cursor-not-allowed", "focus:outline-none focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-ring");
512
- return g !== d.e && N(w, d.e = g), I !== d.t && de(w, "padding-left", d.t = I), _ !== d.a && V(n, "data-picker-row-path", d.a = _), E !== d.o && (n.disabled = d.o = E), T !== d.i && N(n, d.i = T), d;
517
+ var g = R("group flex items-center w-full text-xs", "transition-colors duration-100", l() ? "hover:bg-accent/60" : "opacity-50", n() && l() && "bg-accent text-accent-foreground font-medium"), I = `${4 + e.depth * 14}px`, _ = e.item.path, E = !l(), T = R("flex items-center gap-1 flex-1 min-w-0 text-left py-1.5 pl-0.5 pr-2", l() ? "cursor-pointer" : "cursor-not-allowed", "focus:outline-none focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-ring");
518
+ return g !== d.e && N(w, d.e = g), I !== d.t && de(w, "padding-left", d.t = I), _ !== d.a && O(r, "data-picker-row-path", d.a = _), E !== d.o && (r.disabled = d.o = E), T !== d.i && N(r, d.i = T), d;
513
519
  }, {
514
520
  e: void 0,
515
521
  t: void 0,
516
522
  a: void 0,
517
523
  o: void 0,
518
524
  i: void 0
519
- }), i;
525
+ }), s;
520
526
  })();
521
527
  }
522
528
  he(["click"]);
523
529
  export {
524
530
  Me as NewFolderSection,
525
- Ge as PathInputBar,
526
- He as PickerBreadcrumb,
527
- We as PickerFolderTree,
531
+ je as PathInputBar,
532
+ Ge as PickerBreadcrumb,
533
+ He as PickerFolderTree,
528
534
  te as PickerTreeNode,
529
535
  X as getAncestorPaths,
530
- x as normalizePath,
536
+ Ae as getParentPath,
537
+ P as normalizePath,
531
538
  Re as resolvePickerInitialPath,
532
539
  Ne as useFolderIndex,
533
540
  Ke as usePickerTree