@floegence/floe-webapp-core 0.8.0 → 0.8.1

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.
@@ -21,14 +21,14 @@ export interface UsePickerTreeOptions {
21
21
  filter?: (item: FileItem) => boolean;
22
22
  /** Additional reset logic when the dialog opens */
23
23
  onReset?: (initialPath: string) => void;
24
- /** Label for the home/root directory in tree and breadcrumb (default: 'Root') */
25
- homeLabel?: string;
24
+ /** Label for the home/root directory in tree and breadcrumb (default: 'Root'). Supports accessor for reactivity. */
25
+ homeLabel?: string | Accessor<string | undefined>;
26
26
  /**
27
27
  * Real filesystem path of the home directory (e.g. '/home/user').
28
28
  * When set, the path input bar and display paths will show real filesystem
29
- * paths instead of internal tree-relative paths.
29
+ * paths instead of internal tree-relative paths. Supports accessor for reactivity.
30
30
  */
31
- homePath?: string;
31
+ homePath?: string | Accessor<string | undefined>;
32
32
  }
33
33
  export interface PickerTreeState {
34
34
  selectedPath: Accessor<string>;
@@ -53,8 +53,8 @@ export interface PickerTreeState {
53
53
  path: string;
54
54
  }[]>;
55
55
  handleBreadcrumbClick: (path: string) => void;
56
- /** Home label for display */
57
- homeLabel: string;
56
+ /** Home label for display (reactive) */
57
+ homeLabel: Accessor<string>;
58
58
  /** Convert internal tree path to display (real filesystem) path */
59
59
  toDisplayPath: (internalPath: string) => string;
60
60
  }
@@ -94,8 +94,8 @@ export interface PickerFolderTreeProps {
94
94
  class?: string;
95
95
  style?: JSX.CSSProperties;
96
96
  emptyText?: string;
97
- /** Label for the home/root directory (default: 'Root') */
98
- homeLabel?: string;
97
+ /** Label for the home/root directory (default: 'Root'). Supports accessor for reactivity. */
98
+ homeLabel?: string | Accessor<string>;
99
99
  }
100
100
  export declare function PickerFolderTree(props: PickerFolderTreeProps): JSX.Element;
101
101
  export interface PickerTreeNodeProps {
package/dist/index29.js CHANGED
@@ -13,8 +13,8 @@ function T(t) {
13
13
  files: () => t.files,
14
14
  // eslint-disable-next-line solid/reactivity -- filter is a static callback
15
15
  filter: t.filter ? (r) => t.filter(r) : void 0,
16
- homeLabel: t.homeLabel,
17
- homePath: t.homePath
16
+ homeLabel: () => t.homeLabel,
17
+ homePath: () => t.homePath
18
18
  }), c = () => {
19
19
  const r = e.selectedPath(), a = t.onSelect;
20
20
  t.onOpenChange(!1), f(() => a(r));
package/dist/index30.js CHANGED
@@ -15,8 +15,8 @@ function ae(e) {
15
15
  files: () => e.files,
16
16
  // eslint-disable-next-line solid/reactivity -- filter is a static callback
17
17
  filter: e.filter ? (t) => e.filter(t) : void 0,
18
- homeLabel: e.homeLabel,
19
- homePath: e.homePath,
18
+ homeLabel: () => e.homeLabel,
19
+ homePath: () => e.homePath,
20
20
  onReset: () => {
21
21
  f(e.initialFileName ?? ""), s("");
22
22
  }
package/dist/index83.js CHANGED
@@ -1,218 +1,223 @@
1
- import { delegateEvents as Y, template as P, insert as u, createComponent as c, effect as T, className as _, style as Z, memo as z, setAttribute as ee, setStyleProperty as te } from "solid-js/web";
2
- import { createSignal as C, createMemo as E, createEffect as L, on as A, For as R, Show as p } from "solid-js";
1
+ import { delegateEvents as Z, template as P, insert as h, createComponent as d, effect as T, className as _, style as ee, memo as B, setAttribute as te, setStyleProperty as ne } from "solid-js/web";
2
+ import { createSignal as C, createMemo as E, createEffect as A, on as G, For as N, Show as F } from "solid-js";
3
3
  import { cn as I } from "./index69.js";
4
- import { Button as N } from "./index20.js";
5
- import { Input as j } from "./index21.js";
6
- import { ChevronRight as M, Check as ne, X as re, Plus as le } from "./index34.js";
7
- import { FolderOpenIcon as W, FolderIcon as oe } from "./index48.js";
8
- var O = /* @__PURE__ */ P('<div class="flex items-center gap-1.5"><div class=flex-1>'), ie = /* @__PURE__ */ P('<p class="text-[11px] text-muted-foreground -mt-1">Creating in: '), ae = /* @__PURE__ */ P("<button type=button><span>New Folder"), ce = /* @__PURE__ */ P('<nav class="flex items-center gap-0.5 min-w-0 overflow-x-auto py-0.5"aria-label="Selected path">'), V = /* @__PURE__ */ P("<button type=button>"), se = /* @__PURE__ */ P('<div class="flex items-center justify-center py-6 text-xs text-muted-foreground">'), ue = /* @__PURE__ */ P("<div><button type=button><span>"), de = /* @__PURE__ */ P("<div class=overflow-hidden>"), he = /* @__PURE__ */ P('<div class="flex flex-col"><div><button type=button><span class="flex-shrink-0 w-4 h-4"></span><span class=truncate>'), fe = /* @__PURE__ */ P('<span class="flex-shrink-0 w-4 h-4">');
4
+ import { Button as z } from "./index20.js";
5
+ import { Input as H } from "./index21.js";
6
+ import { ChevronRight as M, Check as re, X as le, Plus as oe } from "./index34.js";
7
+ import { FolderOpenIcon as W, FolderIcon as ie } from "./index48.js";
8
+ var O = /* @__PURE__ */ P('<div class="flex items-center gap-1.5"><div class=flex-1>'), ae = /* @__PURE__ */ P('<p class="text-[11px] text-muted-foreground -mt-1">Creating in: '), ce = /* @__PURE__ */ P("<button type=button><span>New Folder"), se = /* @__PURE__ */ P('<nav class="flex items-center gap-0.5 min-w-0 overflow-x-auto py-0.5"aria-label="Selected path">'), V = /* @__PURE__ */ P("<button type=button>"), ue = /* @__PURE__ */ P('<div class="flex items-center justify-center py-6 text-xs text-muted-foreground">'), de = /* @__PURE__ */ P("<div><button type=button><span>"), he = /* @__PURE__ */ P("<div class=overflow-hidden>"), fe = /* @__PURE__ */ P('<div class="flex flex-col"><div><button type=button><span class="flex-shrink-0 w-4 h-4"></span><span class=truncate>'), ge = /* @__PURE__ */ P('<span class="flex-shrink-0 w-4 h-4">');
9
9
  function S(e) {
10
- const r = (e ?? "").trim();
11
- if (r === "" || r === "/") return "/";
12
- const o = r.replace(/\/+$/, "");
13
- return o.startsWith("/") ? o : "/" + o;
10
+ const l = (e ?? "").trim();
11
+ if (l === "" || l === "/") return "/";
12
+ const n = l.replace(/\/+$/, "");
13
+ return n.startsWith("/") ? n : "/" + n;
14
14
  }
15
- function G(e) {
16
- const r = e.split("/").filter(Boolean), o = [];
17
- let l = "";
18
- for (let n = 0; n < r.length - 1; n++)
19
- l += "/" + r[n], o.push(l);
20
- return o;
15
+ function j(e) {
16
+ const l = e.split("/").filter(Boolean), n = [];
17
+ let a = "";
18
+ for (let i = 0; i < l.length - 1; i++)
19
+ a += "/" + l[i], n.push(a);
20
+ return n;
21
21
  }
22
- function ge(e) {
22
+ function me(e) {
23
23
  return E(() => {
24
- const r = /* @__PURE__ */ new Map(), o = (l) => {
25
- var n;
26
- for (const d of l)
27
- d.type === "folder" && (r.set(S(d.path), d), (n = d.children) != null && n.length && o(d.children));
24
+ const l = /* @__PURE__ */ new Map(), n = (a) => {
25
+ var i;
26
+ for (const o of a)
27
+ o.type === "folder" && (l.set(S(o.path), o), (i = o.children) != null && i.length && n(o.children));
28
28
  };
29
- return o(e()), r;
29
+ return n(e()), l;
30
30
  });
31
31
  }
32
- function ke(e) {
33
- const r = e.initialPath ?? "/", o = e.homeLabel ?? "Root", l = e.homePath ? S(e.homePath) : void 0, n = (t) => {
34
- if (!l) return t;
35
- const s = S(t);
36
- return s === "/" ? l : l === "/" ? s : l + s;
37
- }, d = (t) => {
38
- if (!l) return S(t);
39
- const s = S(t);
40
- return s === l ? "/" : l !== "/" && s.startsWith(l + "/") ? s.slice(l.length) || "/" : S(t);
41
- }, [x, g] = C(r), [m, f] = C(/* @__PURE__ */ new Set(["/"])), [b, i] = C(n(r)), [w, a] = C(""), v = ge(e.files), k = E(() => e.files().filter((t) => t.type === "folder"));
42
- L(A(e.open, (t) => {
32
+ function Se(e) {
33
+ const l = e.initialPath ?? "/", n = () => (typeof e.homeLabel == "function" ? e.homeLabel() : e.homeLabel) ?? "Root", a = () => {
34
+ const t = typeof e.homePath == "function" ? e.homePath() : e.homePath;
35
+ return t ? S(t) : void 0;
36
+ }, i = (t) => {
37
+ const s = a();
38
+ if (!s) return t;
39
+ const u = S(t);
40
+ return u === "/" ? s : s === "/" ? u : s + u;
41
+ }, o = (t) => {
42
+ const s = a();
43
+ if (!s) return S(t);
44
+ const u = S(t);
45
+ return u === s ? "/" : s !== "/" && u.startsWith(s + "/") ? u.slice(s.length) || "/" : S(t);
46
+ }, [b, v] = C(l), [f, g] = C(/* @__PURE__ */ new Set(["/"])), [x, r] = C(i(l)), [w, c] = C(""), m = me(e.files), k = E(() => e.files().filter((t) => t.type === "folder"));
47
+ A(G(e.open, (t) => {
43
48
  var s;
44
49
  if (t) {
45
- const h = e.initialPath ?? "/";
46
- g(h), i(n(h)), a("");
47
- const $ = G(h);
48
- f(/* @__PURE__ */ new Set(["/", ...$])), (s = e.onReset) == null || s.call(e, h);
50
+ const u = e.initialPath ?? "/";
51
+ v(u), r(i(u)), c("");
52
+ const $ = j(u);
53
+ g(/* @__PURE__ */ new Set(["/", ...$])), (s = e.onReset) == null || s.call(e, u);
49
54
  }
50
- })), L(A(x, (t) => {
51
- i(n(t)), a("");
55
+ })), A(G(b, (t) => {
56
+ r(i(t)), c("");
52
57
  }));
53
58
  const y = (t) => {
54
59
  const s = S(t);
55
- return s === "/" || v().has(s);
56
- }, F = (t) => e.filter ? e.filter(t) : !0, B = (t) => {
57
- const s = G(t);
58
- f((h) => {
59
- const $ = new Set(h);
60
+ return s === "/" || m().has(s);
61
+ }, p = (t) => e.filter ? e.filter(t) : !0, L = (t) => {
62
+ const s = j(t);
63
+ g((u) => {
64
+ const $ = new Set(u);
60
65
  for (const D of s) $.add(D);
61
66
  return $.add(t), $;
62
67
  });
63
68
  }, q = (t) => {
64
- f((s) => {
65
- const h = new Set(s);
66
- return h.has(t) ? h.delete(t) : h.add(t), h;
69
+ g((s) => {
70
+ const u = new Set(s);
71
+ return u.has(t) ? u.delete(t) : u.add(t), u;
67
72
  });
68
- }, H = (t) => {
69
- F(t) && (g(t.path), f((s) => {
70
- const h = new Set(s);
71
- return h.add(t.path), h;
73
+ }, J = (t) => {
74
+ p(t) && (v(t.path), g((s) => {
75
+ const u = new Set(s);
76
+ return u.add(t.path), u;
72
77
  }));
73
- }, J = () => {
74
- g("/");
75
- }, K = () => {
76
- const t = d(b().trim());
77
- y(t) ? (g(t), a(""), B(t)) : a("Path not found");
78
- }, Q = (t) => {
79
- t.key === "Enter" && (t.preventDefault(), K());
80
- }, U = E(() => {
81
- const t = x();
78
+ }, Q = () => {
79
+ v("/");
80
+ }, R = () => {
81
+ const t = o(x().trim());
82
+ y(t) ? (v(t), c(""), L(t)) : c("Path not found");
83
+ }, U = (t) => {
84
+ t.key === "Enter" && (t.preventDefault(), R());
85
+ }, Y = E(() => {
86
+ const t = b(), s = n();
82
87
  if (t === "/" || t === "") return [{
83
- name: o,
88
+ name: s,
84
89
  path: "/"
85
90
  }];
86
- const s = t.split("/").filter(Boolean), h = [{
87
- name: o,
91
+ const u = t.split("/").filter(Boolean), $ = [{
92
+ name: s,
88
93
  path: "/"
89
94
  }];
90
- let $ = "";
91
- for (const D of s)
92
- $ += "/" + D, h.push({
93
- name: D,
94
- path: $
95
+ let D = "";
96
+ for (const K of u)
97
+ D += "/" + K, $.push({
98
+ name: K,
99
+ path: D
95
100
  });
96
- return h;
101
+ return $;
97
102
  });
98
103
  return {
99
- selectedPath: x,
100
- setSelectedPath: g,
101
- expandedPaths: m,
104
+ selectedPath: b,
105
+ setSelectedPath: v,
106
+ expandedPaths: f,
102
107
  toggleExpand: q,
103
- pathInput: b,
104
- setPathInput: i,
108
+ pathInput: x,
109
+ setPathInput: r,
105
110
  pathInputError: w,
106
- setPathInputError: a,
107
- folderIndex: v,
111
+ setPathInputError: c,
112
+ folderIndex: m,
108
113
  rootFolders: k,
109
114
  isValidPath: y,
110
- isSelectable: F,
111
- handleSelectFolder: H,
112
- handleSelectRoot: J,
113
- handlePathInputGo: K,
114
- handlePathInputKeyDown: Q,
115
- expandToPath: B,
116
- breadcrumbSegments: U,
115
+ isSelectable: p,
116
+ handleSelectFolder: J,
117
+ handleSelectRoot: Q,
118
+ handlePathInputGo: R,
119
+ handlePathInputKeyDown: U,
120
+ expandToPath: L,
121
+ breadcrumbSegments: Y,
117
122
  handleBreadcrumbClick: (t) => {
118
- g(t), B(t);
123
+ v(t), L(t);
119
124
  },
120
- homeLabel: o,
121
- toDisplayPath: n
125
+ homeLabel: n,
126
+ toDisplayPath: i
122
127
  };
123
128
  }
124
- function Se(e) {
125
- const [r, o] = C(!1), [l, n] = C(""), [d, x] = C(!1), g = () => {
126
- o(!0), n("");
127
- }, m = () => {
128
- o(!1), n("");
129
- }, f = async () => {
130
- const i = l().trim();
131
- if (i) {
132
- x(!0);
129
+ function Ce(e) {
130
+ const [l, n] = C(!1), [a, i] = C(""), [o, b] = C(!1), v = () => {
131
+ n(!0), i("");
132
+ }, f = () => {
133
+ n(!1), i("");
134
+ }, g = async () => {
135
+ const r = a().trim();
136
+ if (r) {
137
+ b(!0);
133
138
  try {
134
- await e.onCreateFolder(e.parentPath(), i), o(!1), n("");
139
+ await e.onCreateFolder(e.parentPath(), r), n(!1), i("");
135
140
  } finally {
136
- x(!1);
141
+ b(!1);
137
142
  }
138
143
  }
139
- }, b = (i) => {
140
- i.key === "Enter" ? (i.preventDefault(), f()) : i.key === "Escape" && (i.preventDefault(), m());
144
+ }, x = (r) => {
145
+ r.key === "Enter" ? (r.preventDefault(), g()) : r.key === "Escape" && (r.preventDefault(), f());
141
146
  };
142
- return c(p, {
147
+ return d(F, {
143
148
  get when() {
144
- return r();
149
+ return l();
145
150
  },
146
151
  get fallback() {
147
152
  return (() => {
148
- var i = ae(), w = i.firstChild;
149
- return i.$$click = g, u(i, c(le, {
153
+ var r = ce(), w = r.firstChild;
154
+ return r.$$click = v, h(r, d(oe, {
150
155
  class: "w-3.5 h-3.5"
151
- }), w), T(() => _(i, 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"))), i;
156
+ }), w), T(() => _(r, 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"))), r;
152
157
  })();
153
158
  },
154
159
  get children() {
155
160
  return [(() => {
156
- var i = O(), w = i.firstChild;
157
- return u(w, c(j, {
161
+ var r = O(), w = r.firstChild;
162
+ return h(w, d(H, {
158
163
  size: "sm",
159
164
  get value() {
160
- return l();
165
+ return a();
161
166
  },
162
- onInput: (a) => n(a.currentTarget.value),
163
- onKeyDown: b,
167
+ onInput: (c) => i(c.currentTarget.value),
168
+ onKeyDown: x,
164
169
  placeholder: "Folder name",
165
170
  get disabled() {
166
- return d();
171
+ return o();
167
172
  },
168
173
  autofocus: !0
169
- })), u(i, c(N, {
174
+ })), h(r, d(z, {
170
175
  variant: "primary",
171
176
  size: "sm",
172
- onClick: f,
177
+ onClick: g,
173
178
  get loading() {
174
- return d();
179
+ return o();
175
180
  },
176
181
  get disabled() {
177
- return !l().trim();
182
+ return !a().trim();
178
183
  },
179
184
  get children() {
180
- return c(ne, {
185
+ return d(re, {
181
186
  class: "w-3.5 h-3.5"
182
187
  });
183
188
  }
184
- }), null), u(i, c(N, {
189
+ }), null), h(r, d(z, {
185
190
  variant: "ghost",
186
191
  size: "sm",
187
- onClick: m,
192
+ onClick: f,
188
193
  get disabled() {
189
- return d();
194
+ return o();
190
195
  },
191
196
  get children() {
192
- return c(re, {
197
+ return d(le, {
193
198
  class: "w-3.5 h-3.5"
194
199
  });
195
200
  }
196
- }), null), i;
201
+ }), null), r;
197
202
  })(), (() => {
198
- var i = ie();
199
- return i.firstChild, u(i, (() => {
200
- var w = z(() => !!e.toDisplayPath);
203
+ var r = ae();
204
+ return r.firstChild, h(r, (() => {
205
+ var w = B(() => !!e.toDisplayPath);
201
206
  return () => w() ? e.toDisplayPath(e.parentPath()) : e.parentPath();
202
- })(), null), i;
207
+ })(), null), r;
203
208
  })()];
204
209
  }
205
210
  });
206
211
  }
207
- function Ce(e) {
212
+ function _e(e) {
208
213
  return (() => {
209
- var r = O(), o = r.firstChild;
210
- return u(o, c(j, {
214
+ var l = O(), n = l.firstChild;
215
+ return h(n, d(H, {
211
216
  size: "sm",
212
217
  get value() {
213
218
  return e.value();
214
219
  },
215
- onInput: (l) => e.onInput(l.currentTarget.value),
220
+ onInput: (a) => e.onInput(a.currentTarget.value),
216
221
  get onKeyDown() {
217
222
  return e.onKeyDown;
218
223
  },
@@ -222,50 +227,51 @@ function Ce(e) {
222
227
  get error() {
223
228
  return e.error();
224
229
  }
225
- })), u(r, c(N, {
230
+ })), h(l, d(z, {
226
231
  variant: "outline",
227
232
  size: "sm",
228
233
  get onClick() {
229
234
  return e.onGo;
230
235
  },
231
236
  children: "Go"
232
- }), null), r;
237
+ }), null), l;
233
238
  })();
234
239
  }
235
- function _e(e) {
240
+ function Ie(e) {
236
241
  return (() => {
237
- var r = ce();
238
- return u(r, c(R, {
242
+ var l = se();
243
+ return h(l, d(N, {
239
244
  get each() {
240
245
  return e.segments();
241
246
  },
242
- children: (o, l) => [c(p, {
247
+ children: (n, a) => [d(F, {
243
248
  get when() {
244
- return l() > 0;
249
+ return a() > 0;
245
250
  },
246
251
  get children() {
247
- return c(M, {
252
+ return d(M, {
248
253
  class: "w-3 h-3 text-muted-foreground/50 flex-shrink-0"
249
254
  });
250
255
  }
251
256
  }), (() => {
252
- var n = V();
253
- return n.$$click = () => e.onClick(o.path), u(n, () => o.name), T(() => _(n, 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", l() === e.segments().length - 1 ? "font-medium text-foreground" : "text-muted-foreground hover:text-foreground hover:bg-muted/50"))), n;
257
+ var i = V();
258
+ return i.$$click = () => e.onClick(n.path), h(i, () => n.name), T(() => _(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", a() === e.segments().length - 1 ? "font-medium text-foreground" : "text-muted-foreground hover:text-foreground hover:bg-muted/50"))), i;
254
259
  })()]
255
- })), r;
260
+ })), l;
256
261
  })();
257
262
  }
258
- function Ie(e) {
263
+ function Fe(e) {
264
+ const l = () => (typeof e.homeLabel == "function" ? e.homeLabel() : e.homeLabel) ?? "Root";
259
265
  return (() => {
260
- var r = ue(), o = r.firstChild, l = o.firstChild;
261
- return o.$$click = () => e.onSelectRoot(), u(o, c(W, {
266
+ var n = de(), a = n.firstChild, i = a.firstChild;
267
+ return a.$$click = () => e.onSelectRoot(), h(a, d(W, {
262
268
  class: "w-4 h-4 flex-shrink-0"
263
- }), l), u(l, () => e.homeLabel ?? "Root"), u(r, c(R, {
269
+ }), i), h(i, l), h(n, d(N, {
264
270
  get each() {
265
271
  return e.rootFolders();
266
272
  },
267
- children: (n) => c(X, {
268
- item: n,
273
+ children: (o) => d(X, {
274
+ item: o,
269
275
  depth: 1,
270
276
  get selectedPath() {
271
277
  return e.selectedPath;
@@ -283,80 +289,80 @@ function Ie(e) {
283
289
  return e.isSelectable;
284
290
  }
285
291
  })
286
- }), null), u(r, c(p, {
292
+ }), null), h(n, d(F, {
287
293
  get when() {
288
294
  return e.rootFolders().length === 0;
289
295
  },
290
296
  get children() {
291
- var n = se();
292
- return u(n, () => e.emptyText ?? "No directories available"), n;
297
+ var o = ue();
298
+ return h(o, () => e.emptyText ?? "No directories available"), o;
293
299
  }
294
- }), null), T((n) => {
295
- var d = I("border border-border rounded overflow-y-auto", e.class), x = e.style, g = 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");
296
- return d !== n.e && _(r, n.e = d), n.t = Z(r, x, n.t), g !== n.a && _(o, n.a = g), n;
300
+ }), null), T((o) => {
301
+ var b = I("border border-border rounded overflow-y-auto", e.class), v = e.style, f = 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");
302
+ return b !== o.e && _(n, o.e = b), o.t = ee(n, v, o.t), f !== o.a && _(a, o.a = f), o;
297
303
  }, {
298
304
  e: void 0,
299
305
  t: void 0,
300
306
  a: void 0
301
- }), r;
307
+ }), n;
302
308
  })();
303
309
  }
304
310
  function X(e) {
305
- const r = () => e.expandedPaths().has(e.item.path), o = () => e.selectedPath() === e.item.path, l = () => e.isSelectable(e.item), n = E(() => {
306
- var m;
307
- return ((m = e.item.children) == null ? void 0 : m.filter((f) => f.type === "folder")) ?? [];
308
- }), d = () => n().length > 0, x = (m) => {
309
- m.stopPropagation(), e.onToggle(e.item.path);
310
- }, g = () => {
311
+ const l = () => e.expandedPaths().has(e.item.path), n = () => e.selectedPath() === e.item.path, a = () => e.isSelectable(e.item), i = E(() => {
312
+ var f;
313
+ return ((f = e.item.children) == null ? void 0 : f.filter((g) => g.type === "folder")) ?? [];
314
+ }), o = () => i().length > 0, b = (f) => {
315
+ f.stopPropagation(), e.onToggle(e.item.path);
316
+ }, v = () => {
311
317
  e.onSelect(e.item);
312
318
  };
313
319
  return (() => {
314
- var m = he(), f = m.firstChild, b = f.firstChild, i = b.firstChild, w = i.nextSibling;
315
- return u(f, c(p, {
320
+ var f = fe(), g = f.firstChild, x = g.firstChild, r = x.firstChild, w = r.nextSibling;
321
+ return h(g, d(F, {
316
322
  get when() {
317
- return d();
323
+ return o();
318
324
  },
319
325
  get fallback() {
320
- return fe();
326
+ return ge();
321
327
  },
322
328
  get children() {
323
- var a = V();
324
- return a.$$click = x, u(a, c(M, {
329
+ var c = V();
330
+ return c.$$click = b, h(c, d(M, {
325
331
  class: "w-3 h-3 opacity-60"
326
- })), T((v) => {
327
- var k = I("flex-shrink-0 w-4 h-4 flex items-center justify-center cursor-pointer", "transition-transform duration-150", r() && "rotate-90", "focus:outline-none focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-ring"), y = r() ? "Collapse folder" : "Expand folder";
328
- return k !== v.e && _(a, v.e = k), y !== v.t && ee(a, "aria-label", v.t = y), v;
332
+ })), T((m) => {
333
+ 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"), y = l() ? "Collapse folder" : "Expand folder";
334
+ return k !== m.e && _(c, m.e = k), y !== m.t && te(c, "aria-label", m.t = y), m;
329
335
  }, {
330
336
  e: void 0,
331
337
  t: void 0
332
- }), a;
338
+ }), c;
333
339
  }
334
- }), b), b.$$click = g, u(i, c(p, {
340
+ }), x), x.$$click = v, h(r, d(F, {
335
341
  get when() {
336
- return z(() => !!d())() && r();
342
+ return B(() => !!o())() && l();
337
343
  },
338
344
  get fallback() {
339
- return c(oe, {
345
+ return d(ie, {
340
346
  class: "w-4 h-4"
341
347
  });
342
348
  },
343
349
  get children() {
344
- return c(W, {
350
+ return d(W, {
345
351
  class: "w-4 h-4"
346
352
  });
347
353
  }
348
- })), u(w, () => e.item.name), u(m, c(p, {
354
+ })), h(w, () => e.item.name), h(f, d(F, {
349
355
  get when() {
350
- return z(() => !!r())() && d();
356
+ return B(() => !!l())() && o();
351
357
  },
352
358
  get children() {
353
- var a = de();
354
- return u(a, c(R, {
359
+ var c = he();
360
+ return h(c, d(N, {
355
361
  get each() {
356
- return n();
362
+ return i();
357
363
  },
358
- children: (v) => c(X, {
359
- item: v,
364
+ children: (m) => d(X, {
365
+ item: m,
360
366
  get depth() {
361
367
  return e.depth + 1;
362
368
  },
@@ -376,28 +382,28 @@ function X(e) {
376
382
  return e.isSelectable;
377
383
  }
378
384
  })
379
- })), a;
385
+ })), c;
380
386
  }
381
- }), null), T((a) => {
382
- var v = I("group flex items-center w-full text-xs", "transition-colors duration-100", l() ? "hover:bg-accent/60" : "opacity-50", o() && l() && "bg-accent text-accent-foreground font-medium"), k = `${4 + e.depth * 14}px`, y = !l(), F = I("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");
383
- return v !== a.e && _(f, a.e = v), k !== a.t && te(f, "padding-left", a.t = k), y !== a.a && (b.disabled = a.a = y), F !== a.o && _(b, a.o = F), a;
387
+ }), null), T((c) => {
388
+ var m = I("group flex items-center w-full text-xs", "transition-colors duration-100", a() ? "hover:bg-accent/60" : "opacity-50", n() && a() && "bg-accent text-accent-foreground font-medium"), k = `${4 + e.depth * 14}px`, y = !a(), p = I("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");
389
+ return m !== c.e && _(g, c.e = m), k !== c.t && ne(g, "padding-left", c.t = k), y !== c.a && (x.disabled = c.a = y), p !== c.o && _(x, c.o = p), c;
384
390
  }, {
385
391
  e: void 0,
386
392
  t: void 0,
387
393
  a: void 0,
388
394
  o: void 0
389
- }), m;
395
+ }), f;
390
396
  })();
391
397
  }
392
- Y(["click"]);
398
+ Z(["click"]);
393
399
  export {
394
- Se as NewFolderSection,
395
- Ce as PathInputBar,
396
- _e as PickerBreadcrumb,
397
- Ie as PickerFolderTree,
400
+ Ce as NewFolderSection,
401
+ _e as PathInputBar,
402
+ Ie as PickerBreadcrumb,
403
+ Fe as PickerFolderTree,
398
404
  X as PickerTreeNode,
399
- G as getAncestorPaths,
405
+ j as getAncestorPaths,
400
406
  S as normalizePath,
401
- ge as useFolderIndex,
402
- ke as usePickerTree
407
+ me as useFolderIndex,
408
+ Se as usePickerTree
403
409
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@floegence/floe-webapp-core",
3
- "version": "0.8.0",
3
+ "version": "0.8.1",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",