@floegence/floe-webapp-core 0.35.28 → 0.35.30

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/chat.css CHANGED
@@ -409,6 +409,73 @@ pre.chat-md-code-block code {
409
409
  border-bottom-color: var(--primary);
410
410
  }
411
411
 
412
+ .chat-md-link.chat-md-file-ref {
413
+ display: inline-flex;
414
+ min-width: 0;
415
+ max-width: min(100%, 20rem);
416
+ align-items: center;
417
+ gap: 0.375rem;
418
+ padding: 0.1875rem 0.5rem;
419
+ margin-inline: 0.125rem;
420
+ border: 1px solid color-mix(in srgb, var(--border) 82%, transparent);
421
+ border-radius: 999px;
422
+ background-color: color-mix(in srgb, var(--muted) 68%, transparent);
423
+ color: var(--foreground);
424
+ vertical-align: baseline;
425
+ overflow: hidden;
426
+ overflow-wrap: normal;
427
+ text-decoration: none;
428
+ transition:
429
+ border-color 150ms ease,
430
+ background-color 150ms ease,
431
+ color 150ms ease;
432
+ cursor: pointer;
433
+ }
434
+
435
+ .chat-md-link.chat-md-file-ref:hover {
436
+ border-bottom-color: transparent;
437
+ border-color: color-mix(in srgb, var(--primary) 34%, var(--border));
438
+ background-color: color-mix(in srgb, var(--accent) 84%, transparent);
439
+ color: color-mix(in srgb, var(--primary) 78%, var(--foreground));
440
+ }
441
+
442
+ .chat-md-link.chat-md-file-ref:focus-visible {
443
+ outline: 2px solid color-mix(in srgb, var(--primary) 30%, transparent);
444
+ outline-offset: 2px;
445
+ }
446
+
447
+ .chat-md-file-ref-prefix,
448
+ .chat-md-file-ref-name,
449
+ .chat-md-file-ref-line {
450
+ min-width: 0;
451
+ }
452
+
453
+ .chat-md-file-ref-name {
454
+ overflow: hidden;
455
+ text-overflow: ellipsis;
456
+ white-space: nowrap;
457
+ font-weight: 600;
458
+ }
459
+
460
+ .chat-md-file-ref-prefix {
461
+ flex: 0 1 auto;
462
+ max-width: 7.5rem;
463
+ overflow: hidden;
464
+ text-overflow: ellipsis;
465
+ white-space: nowrap;
466
+ color: var(--muted-foreground);
467
+ font-size: 0.75em;
468
+ line-height: 1.2;
469
+ }
470
+
471
+ .chat-md-file-ref-line {
472
+ flex: 0 0 auto;
473
+ color: var(--muted-foreground);
474
+ font-size: 0.75em;
475
+ font-weight: 650;
476
+ line-height: 1.2;
477
+ }
478
+
412
479
  .chat-md-image {
413
480
  max-width: 100%;
414
481
  border-radius: 0.5rem;
@@ -27,7 +27,7 @@ function A(b) {
27
27
  d() && e.files.length === 0 && e.onExpand && e.onExpand("/");
28
28
  });
29
29
  const n = T({
30
- initialPath: e.initialPath ?? "/",
30
+ initialPath: () => e.initialPath ?? "/",
31
31
  open: () => !0,
32
32
  files: () => e.files,
33
33
  onExpand: (r) => e.onExpand?.(r),
@@ -8,7 +8,7 @@ import { usePickerTree as P, PathInputBar as x, PickerBreadcrumb as C, PickerFol
8
8
  var b = /* @__PURE__ */ i('<div class="flex flex-col gap-2 -mt-1">'), y = /* @__PURE__ */ i('<div class="flex items-center w-full gap-2"><span class="flex-1 text-[11px] text-muted-foreground truncate">');
9
9
  function E(t) {
10
10
  const e = P({
11
- initialPath: t.initialPath,
11
+ initialPath: () => t.initialPath,
12
12
  open: () => t.open,
13
13
  files: () => t.files,
14
14
  // eslint-disable-next-line solid/reactivity -- filter is a static callback
@@ -10,7 +10,7 @@ import { usePickerTree as O, normalizePath as R, PathInputBar as G, PickerBreadc
10
10
  var A = /* @__PURE__ */ m('<div class="flex flex-col gap-2 -mt-1"><div class="flex border border-border rounded overflow-hidden"style=height:260px><div class="w-1/2 min-w-0 overflow-y-auto">'), H = /* @__PURE__ */ m('<div class="flex flex-col w-full gap-2"><div class="flex items-center gap-1.5"><label class="text-xs text-muted-foreground flex-shrink-0">File name:</label><div class=flex-1></div></div><div class="flex items-center gap-2"><span class="flex-1 text-[11px] text-muted-foreground truncate">'), J = /* @__PURE__ */ m('<div class="flex items-center justify-center h-full text-xs text-muted-foreground">No files in this directory'), Q = /* @__PURE__ */ m('<span class="ml-auto text-[10px] text-muted-foreground/60 flex-shrink-0">'), U = /* @__PURE__ */ m("<button type=button><span class=truncate>");
11
11
  function ie(e) {
12
12
  const [u, f] = F(e.initialFileName ?? ""), [w, s] = F(""), r = O({
13
- initialPath: e.initialPath,
13
+ initialPath: () => e.initialPath,
14
14
  open: () => e.open,
15
15
  files: () => e.files,
16
16
  // eslint-disable-next-line solid/reactivity -- filter is a static callback
@@ -57,7 +57,7 @@ export declare function getParentPath(path: string): string;
57
57
  /** Build a path → FileItem map for all folders in the tree */
58
58
  export declare function useFolderIndex(files: Accessor<FileItem[]>): Accessor<Map<string, FileItem>>;
59
59
  export interface UsePickerTreeOptions {
60
- initialPath?: string;
60
+ initialPath?: string | Accessor<string | undefined>;
61
61
  open: Accessor<boolean>;
62
62
  files: Accessor<FileItem[]>;
63
63
  filter?: (item: FileItem) => boolean;
@@ -105,6 +105,7 @@ export interface PickerTreeState {
105
105
  /** Convert internal tree path to display (real filesystem) path */
106
106
  toDisplayPath: (internalPath: string) => string;
107
107
  }
108
+ export declare function resolvePickerInitialPath(initialPath: string | undefined, homePath: string | undefined): string;
108
109
  export declare function usePickerTree(opts: UsePickerTreeOptions): PickerTreeState;
109
110
  export interface NewFolderSectionProps {
110
111
  parentPath: Accessor<string>;
@@ -1,64 +1,71 @@
1
- import { insert as d, createComponent as c, effect as T, className as p, style as Z, memo as B, template as y, setAttribute as ee, setStyleProperty as te, delegateEvents as ne } from "solid-js/web";
2
- import { createSignal as _, createMemo as L, createEffect as K, on as G, For as z, Show as F } from "solid-js";
3
- import { cn as E } from "../../../utils/cn.js";
1
+ import { insert as d, createComponent as c, effect as T, className as p, style as Z, memo as z, template as $, setAttribute as ee, setStyleProperty as te, delegateEvents as ne } from "solid-js/web";
2
+ import { createSignal as _, createMemo as L, createEffect as K, on as G, For as N, Show as F } from "solid-js";
3
+ import { cn as I } from "../../../utils/cn.js";
4
4
  import { deferAfterPaint as re } from "../../../utils/defer.js";
5
- import { Button as N } from "../Button.js";
6
- import { Input as H } from "../Input.js";
7
- import { ChevronRight as M, Check as oe, X as le, Plus as ae } from "../../icons/index.js";
8
- import { FolderOpenIcon as W, FolderIcon as ie } from "../../file-browser/FileIcons.js";
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 C(e) {
5
+ import { Button as B } from "../Button.js";
6
+ import { Input as W } from "../Input.js";
7
+ import { ChevronRight as j, Check as oe, X as le, Plus as ie } from "../../icons/index.js";
8
+ import { FolderOpenIcon as M, FolderIcon as ae } from "../../file-browser/FileIcons.js";
9
+ var O = /* @__PURE__ */ $('<div class="flex items-center gap-1.5"><div class=flex-1>'), ce = /* @__PURE__ */ $('<p class="text-[11px] text-muted-foreground -mt-1">Creating in: '), se = /* @__PURE__ */ $("<button type=button><span>New Folder"), ue = /* @__PURE__ */ $('<nav class="flex items-center gap-0.5 min-w-0 overflow-x-auto py-0.5"aria-label="Selected path">'), V = /* @__PURE__ */ $("<button type=button>"), de = /* @__PURE__ */ $('<div class="flex items-center justify-center py-6 text-xs text-muted-foreground">'), he = /* @__PURE__ */ $("<div><button type=button><span>"), fe = /* @__PURE__ */ $("<div class=overflow-hidden>"), ge = /* @__PURE__ */ $('<div class="flex flex-col"><div><button type=button><span class="flex-shrink-0 w-4 h-4"></span><span class=truncate>'), me = /* @__PURE__ */ $('<span class="flex-shrink-0 w-4 h-4">');
10
+ function y(e) {
11
11
  const l = (e ?? "").trim();
12
12
  if (l === "" || l === "/") return "/";
13
- const r = l.replace(/\/+$/, "");
14
- return r.startsWith("/") ? r : "/" + r;
13
+ const n = l.replace(/\/+$/, "");
14
+ return n.startsWith("/") ? n : "/" + n;
15
15
  }
16
- function j(e) {
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;
16
+ function H(e) {
17
+ const l = e.split("/").filter(Boolean), n = [];
18
+ let r = "";
19
+ for (let i = 0; i < l.length - 1; i++)
20
+ r += "/" + l[i], n.push(r);
21
+ return n;
22
22
  }
23
23
  function ve(e) {
24
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));
25
+ const l = /* @__PURE__ */ new Map(), n = (r) => {
26
+ for (const i of r)
27
+ i.type === "folder" && (l.set(y(i.path), i), i.children?.length && n(i.children));
28
28
  };
29
- return r(e()), l;
29
+ return n(e()), l;
30
30
  });
31
31
  }
32
- function _e(e) {
33
- const l = e.initialPath ?? "/", r = () => (typeof e.homeLabel == "function" ? e.homeLabel() : e.homeLabel) ?? "Root", i = () => {
32
+ function xe(e, l) {
33
+ const n = y(e ?? "/"), r = l ? y(l) : void 0;
34
+ return !r || r === "/" ? n : n === r ? "/" : n.startsWith(r + "/") ? y(n.slice(r.length)) : n;
35
+ }
36
+ function pe(e) {
37
+ const l = () => (typeof e.homeLabel == "function" ? e.homeLabel() : e.homeLabel) ?? "Root", n = () => {
34
38
  const t = typeof e.homePath == "function" ? e.homePath() : e.homePath;
35
- return t ? C(t) : void 0;
36
- }, o = (t) => {
37
- const a = i();
39
+ return t ? y(t) : void 0;
40
+ }, r = () => {
41
+ const t = typeof e.initialPath == "function" ? e.initialPath() : e.initialPath;
42
+ return xe(t, n());
43
+ }, i = (t) => {
44
+ const a = n();
38
45
  if (!a) return t;
39
- const h = C(t);
46
+ const h = y(t);
40
47
  return h === "/" ? a : a === "/" ? h : a + h;
41
48
  }, u = (t) => {
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
- }, [b, v] = _(l), [P, f] = _(/* @__PURE__ */ new Set(["/"])), [$, n] = _(o(l)), [x, w] = _(""), s = ve(e.files), g = L(() => e.files().filter((t) => t.type === "folder"));
49
+ const a = n();
50
+ if (!a) return y(t);
51
+ const h = y(t);
52
+ return h === a ? "/" : a !== "/" && h.startsWith(a + "/") ? h.slice(a.length) || "/" : y(t);
53
+ }, [b, v] = _(r()), [P, f] = _(/* @__PURE__ */ new Set(["/"])), [k, o] = _(i(r())), [x, w] = _(""), s = ve(e.files), g = L(() => e.files().filter((t) => t.type === "folder"));
47
54
  K(G(e.open, (t) => {
48
55
  if (t) {
49
- const a = e.initialPath ?? "/";
50
- v(a), n(o(a)), w("");
51
- const h = j(a);
56
+ const a = r();
57
+ v(a), o(i(a)), w("");
58
+ const h = H(a);
52
59
  f(/* @__PURE__ */ new Set(["/", ...h])), e.onReset?.(a);
53
60
  }
54
61
  })), K(G(b, (t) => {
55
- n(o(t)), w("");
62
+ o(i(t)), w("");
56
63
  }));
57
- const k = (t) => {
58
- const a = C(t);
64
+ const S = (t) => {
65
+ const a = y(t);
59
66
  return a === "/" || s().has(a);
60
- }, S = (t) => e.filter ? e.filter(t) : !0, I = (t) => {
61
- const a = j(t);
67
+ }, C = (t) => e.filter ? e.filter(t) : !0, E = (t) => {
68
+ const a = H(t);
62
69
  f((h) => {
63
70
  const m = new Set(h);
64
71
  for (const D of a) m.add(D);
@@ -71,7 +78,7 @@ function _e(e) {
71
78
  return m.has(t) ? m.delete(t) : m.add(t), m;
72
79
  }), a || e.onExpand?.(t);
73
80
  }, J = (t) => {
74
- if (!S(t)) return;
81
+ if (!C(t)) return;
75
82
  v(t.path);
76
83
  const a = P().has(t.path);
77
84
  f((h) => {
@@ -81,12 +88,12 @@ function _e(e) {
81
88
  }, Q = () => {
82
89
  v("/");
83
90
  }, R = () => {
84
- const t = u($().trim());
85
- k(t) ? (v(t), w(""), I(t)) : w("Path not found");
91
+ const t = u(k().trim());
92
+ S(t) ? (v(t), w(""), E(t)) : w("Path not found");
86
93
  }, U = (t) => {
87
94
  t.key === "Enter" && (t.preventDefault(), R());
88
95
  }, Y = L(() => {
89
- const t = b(), a = r();
96
+ const t = b(), a = l();
90
97
  if (t === "/" || t === "") return [{
91
98
  name: a,
92
99
  path: "/"
@@ -108,48 +115,48 @@ function _e(e) {
108
115
  setSelectedPath: v,
109
116
  expandedPaths: P,
110
117
  toggleExpand: q,
111
- pathInput: $,
112
- setPathInput: n,
118
+ pathInput: k,
119
+ setPathInput: o,
113
120
  pathInputError: x,
114
121
  setPathInputError: w,
115
122
  folderIndex: s,
116
123
  rootFolders: g,
117
- isValidPath: k,
118
- isSelectable: S,
124
+ isValidPath: S,
125
+ isSelectable: C,
119
126
  handleSelectFolder: J,
120
127
  handleSelectRoot: Q,
121
128
  handlePathInputGo: R,
122
129
  handlePathInputKeyDown: U,
123
- expandToPath: I,
130
+ expandToPath: E,
124
131
  breadcrumbSegments: Y,
125
132
  handleBreadcrumbClick: (t) => {
126
- v(t), I(t);
133
+ v(t), E(t);
127
134
  },
128
- homeLabel: r,
129
- toDisplayPath: o
135
+ homeLabel: l,
136
+ toDisplayPath: i
130
137
  };
131
138
  }
132
- function pe(e) {
133
- const [l, r] = _(!1), [i, o] = _(""), [u, b] = _(!1), v = () => {
134
- r(!0), o("");
139
+ function Ie(e) {
140
+ const [l, n] = _(!1), [r, i] = _(""), [u, b] = _(!1), v = () => {
141
+ n(!0), i("");
135
142
  }, P = () => {
136
- r(!1), o("");
143
+ n(!1), i("");
137
144
  }, f = () => {
138
- const n = i().trim();
139
- if (!n || u()) return;
145
+ const o = r().trim();
146
+ if (!o || u()) return;
140
147
  b(!0);
141
- const x = e.parentPath(), w = n, s = e.onCreateFolder;
148
+ const x = e.parentPath(), w = o, s = e.onCreateFolder;
142
149
  re(() => {
143
150
  s(x, w).then(() => {
144
- r(!1), o("");
151
+ n(!1), i("");
145
152
  }).catch((g) => {
146
153
  console.error("Failed to create folder:", g);
147
154
  }).finally(() => {
148
155
  b(!1);
149
156
  });
150
157
  });
151
- }, $ = (n) => {
152
- n.key === "Enter" ? (n.preventDefault(), f()) : n.key === "Escape" && (n.preventDefault(), P());
158
+ }, k = (o) => {
159
+ o.key === "Enter" ? (o.preventDefault(), f()) : o.key === "Escape" && (o.preventDefault(), P());
153
160
  };
154
161
  return c(F, {
155
162
  get when() {
@@ -157,28 +164,28 @@ function pe(e) {
157
164
  },
158
165
  get fallback() {
159
166
  return (() => {
160
- var n = se(), x = n.firstChild;
161
- return n.$$click = v, d(n, c(ae, {
167
+ var o = se(), x = o.firstChild;
168
+ return o.$$click = v, d(o, c(ie, {
162
169
  class: "w-3.5 h-3.5"
163
- }), x), T(() => p(n, E("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;
170
+ }), x), T(() => p(o, 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"))), o;
164
171
  })();
165
172
  },
166
173
  get children() {
167
174
  return [(() => {
168
- var n = O(), x = n.firstChild;
169
- return d(x, c(H, {
175
+ var o = O(), x = o.firstChild;
176
+ return d(x, c(W, {
170
177
  size: "sm",
171
178
  get value() {
172
- return i();
179
+ return r();
173
180
  },
174
- onInput: (w) => o(w.currentTarget.value),
175
- onKeyDown: $,
181
+ onInput: (w) => i(w.currentTarget.value),
182
+ onKeyDown: k,
176
183
  placeholder: "Folder name",
177
184
  get disabled() {
178
185
  return u();
179
186
  },
180
187
  autofocus: !0
181
- })), d(n, c(N, {
188
+ })), d(o, c(B, {
182
189
  variant: "primary",
183
190
  size: "sm",
184
191
  onClick: f,
@@ -186,14 +193,14 @@ function pe(e) {
186
193
  return u();
187
194
  },
188
195
  get disabled() {
189
- return !i().trim();
196
+ return !r().trim();
190
197
  },
191
198
  get children() {
192
199
  return c(oe, {
193
200
  class: "w-3.5 h-3.5"
194
201
  });
195
202
  }
196
- }), null), d(n, c(N, {
203
+ }), null), d(o, c(B, {
197
204
  variant: "ghost-destructive",
198
205
  size: "sm",
199
206
  onClick: P,
@@ -205,26 +212,26 @@ function pe(e) {
205
212
  class: "w-3.5 h-3.5"
206
213
  });
207
214
  }
208
- }), null), n;
215
+ }), null), o;
209
216
  })(), (() => {
210
- var n = ce();
211
- return n.firstChild, d(n, (() => {
212
- var x = B(() => !!e.toDisplayPath);
217
+ var o = ce();
218
+ return o.firstChild, d(o, (() => {
219
+ var x = z(() => !!e.toDisplayPath);
213
220
  return () => x() ? e.toDisplayPath(e.parentPath()) : e.parentPath();
214
- })(), null), n;
221
+ })(), null), o;
215
222
  })()];
216
223
  }
217
224
  });
218
225
  }
219
226
  function Ee(e) {
220
227
  return (() => {
221
- var l = O(), r = l.firstChild;
222
- return d(r, c(H, {
228
+ var l = O(), n = l.firstChild;
229
+ return d(n, c(W, {
223
230
  size: "sm",
224
231
  get value() {
225
232
  return e.value();
226
233
  },
227
- onInput: (i) => e.onInput(i.currentTarget.value),
234
+ onInput: (r) => e.onInput(r.currentTarget.value),
228
235
  get onKeyDown() {
229
236
  return e.onKeyDown;
230
237
  },
@@ -234,7 +241,7 @@ function Ee(e) {
234
241
  get error() {
235
242
  return e.error();
236
243
  }
237
- })), d(l, c(N, {
244
+ })), d(l, c(B, {
238
245
  variant: "outline",
239
246
  size: "sm",
240
247
  get onClick() {
@@ -244,36 +251,36 @@ function Ee(e) {
244
251
  }), null), l;
245
252
  })();
246
253
  }
247
- function Ie(e) {
254
+ function Fe(e) {
248
255
  return (() => {
249
256
  var l = ue();
250
- return d(l, c(z, {
257
+ return d(l, c(N, {
251
258
  get each() {
252
259
  return e.segments();
253
260
  },
254
- children: (r, i) => [c(F, {
261
+ children: (n, r) => [c(F, {
255
262
  get when() {
256
- return i() > 0;
263
+ return r() > 0;
257
264
  },
258
265
  get children() {
259
- return c(M, {
266
+ return c(j, {
260
267
  class: "w-3 h-3 text-muted-foreground/50 flex-shrink-0"
261
268
  });
262
269
  }
263
270
  }), (() => {
264
- var o = V();
265
- return o.$$click = () => e.onClick(r.path), d(o, () => r.name), T(() => p(o, E("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;
271
+ var i = V();
272
+ return i.$$click = () => e.onClick(n.path), d(i, () => n.name), T(() => p(i, 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", r() === e.segments().length - 1 ? "font-medium text-foreground" : "text-muted-foreground hover:text-foreground hover:bg-muted/50"))), i;
266
273
  })()]
267
274
  })), l;
268
275
  })();
269
276
  }
270
- function Fe(e) {
277
+ function Te(e) {
271
278
  const l = () => (typeof e.homeLabel == "function" ? e.homeLabel() : e.homeLabel) ?? "Root";
272
279
  return (() => {
273
- var r = he(), i = r.firstChild, o = i.firstChild;
274
- return i.$$click = () => e.onSelectRoot(), d(i, c(W, {
280
+ var n = he(), r = n.firstChild, i = r.firstChild;
281
+ return r.$$click = () => e.onSelectRoot(), d(r, c(M, {
275
282
  class: "w-4 h-4 flex-shrink-0"
276
- }), o), d(o, l), d(r, c(z, {
283
+ }), i), d(i, l), d(n, c(N, {
277
284
  get each() {
278
285
  return e.rootFolders();
279
286
  },
@@ -296,7 +303,7 @@ function Fe(e) {
296
303
  return e.isSelectable;
297
304
  }
298
305
  })
299
- }), null), d(r, c(F, {
306
+ }), null), d(n, c(F, {
300
307
  get when() {
301
308
  return e.rootFolders().length === 0;
302
309
  },
@@ -305,24 +312,24 @@ function Fe(e) {
305
312
  return d(u, () => e.emptyText ?? "No directories available"), u;
306
313
  }
307
314
  }), null), T((u) => {
308
- var b = E("border border-border rounded overflow-y-auto", e.class), v = e.style, P = E("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");
309
- return b !== u.e && p(r, u.e = b), u.t = Z(r, v, u.t), P !== u.a && p(i, u.a = P), u;
315
+ var b = I("border border-border rounded overflow-y-auto", e.class), v = e.style, P = 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");
316
+ return b !== u.e && p(n, u.e = b), u.t = Z(n, v, u.t), P !== u.a && p(r, u.a = P), u;
310
317
  }, {
311
318
  e: void 0,
312
319
  t: void 0,
313
320
  a: void 0
314
- }), r;
321
+ }), n;
315
322
  })();
316
323
  }
317
324
  function X(e) {
318
- 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, b = () => e.item.type === "folder", v = (f) => {
325
+ const l = () => e.expandedPaths().has(e.item.path), n = () => e.selectedPath() === e.item.path, r = () => e.isSelectable(e.item), i = L(() => e.item.children?.filter((f) => f.type === "folder") ?? []), u = () => i().length > 0, b = () => e.item.type === "folder", v = (f) => {
319
326
  f.stopPropagation(), e.onToggle(e.item.path);
320
327
  }, P = () => {
321
328
  e.onSelect(e.item);
322
329
  };
323
330
  return (() => {
324
- var f = ge(), $ = f.firstChild, n = $.firstChild, x = n.firstChild, w = x.nextSibling;
325
- return d($, c(F, {
331
+ var f = ge(), k = f.firstChild, o = k.firstChild, x = o.firstChild, w = x.nextSibling;
332
+ return d(k, c(F, {
326
333
  get when() {
327
334
  return b();
328
335
  },
@@ -331,39 +338,39 @@ function X(e) {
331
338
  },
332
339
  get children() {
333
340
  var s = V();
334
- return s.$$click = v, d(s, c(M, {
341
+ return s.$$click = v, d(s, c(j, {
335
342
  class: "w-3 h-3 opacity-60"
336
343
  })), T((g) => {
337
- var k = E("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";
338
- return k !== g.e && p(s, g.e = k), S !== g.t && ee(s, "aria-label", g.t = S), g;
344
+ var S = 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"), C = l() ? "Collapse folder" : "Expand folder";
345
+ return S !== g.e && p(s, g.e = S), C !== g.t && ee(s, "aria-label", g.t = C), g;
339
346
  }, {
340
347
  e: void 0,
341
348
  t: void 0
342
349
  }), s;
343
350
  }
344
- }), n), n.$$click = P, d(x, c(F, {
351
+ }), o), o.$$click = P, d(x, c(F, {
345
352
  get when() {
346
- return B(() => !!u())() && l();
353
+ return z(() => !!u())() && l();
347
354
  },
348
355
  get fallback() {
349
- return c(ie, {
356
+ return c(ae, {
350
357
  class: "w-4 h-4"
351
358
  });
352
359
  },
353
360
  get children() {
354
- return c(W, {
361
+ return c(M, {
355
362
  class: "w-4 h-4"
356
363
  });
357
364
  }
358
365
  })), d(w, () => e.item.name), d(f, c(F, {
359
366
  get when() {
360
- return B(() => !!l())() && u();
367
+ return z(() => !!l())() && u();
361
368
  },
362
369
  get children() {
363
370
  var s = fe();
364
- return d(s, c(z, {
371
+ return d(s, c(N, {
365
372
  get each() {
366
- return o();
373
+ return i();
367
374
  },
368
375
  children: (g) => c(X, {
369
376
  item: g,
@@ -389,8 +396,8 @@ function X(e) {
389
396
  })), s;
390
397
  }
391
398
  }), null), T((s) => {
392
- var g = E("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(), I = E("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");
393
- return g !== s.e && p($, s.e = g), k !== s.t && te($, "padding-left", s.t = k), S !== s.a && (n.disabled = s.a = S), I !== s.o && p(n, s.o = I), s;
399
+ var g = I("group flex items-center w-full text-xs", "transition-colors duration-100", r() ? "hover:bg-accent/60" : "opacity-50", n() && r() && "bg-accent text-accent-foreground font-medium"), S = `${4 + e.depth * 14}px`, C = !r(), E = I("flex items-center gap-1 flex-1 min-w-0 text-left py-1.5 pl-0.5 pr-2", r() ? "cursor-pointer" : "cursor-not-allowed", "focus:outline-none focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-ring");
400
+ return g !== s.e && p(k, s.e = g), S !== s.t && te(k, "padding-left", s.t = S), C !== s.a && (o.disabled = s.a = C), E !== s.o && p(o, s.o = E), s;
394
401
  }, {
395
402
  e: void 0,
396
403
  t: void 0,
@@ -401,13 +408,14 @@ function X(e) {
401
408
  }
402
409
  ne(["click"]);
403
410
  export {
404
- pe as NewFolderSection,
411
+ Ie as NewFolderSection,
405
412
  Ee as PathInputBar,
406
- Ie as PickerBreadcrumb,
407
- Fe as PickerFolderTree,
413
+ Fe as PickerBreadcrumb,
414
+ Te as PickerFolderTree,
408
415
  X as PickerTreeNode,
409
- j as getAncestorPaths,
410
- C as normalizePath,
416
+ H as getAncestorPaths,
417
+ y as normalizePath,
418
+ xe as resolvePickerInitialPath,
411
419
  ve as useFolderIndex,
412
- _e as usePickerTree
420
+ pe as usePickerTree
413
421
  };