@floegence/floe-webapp-core 0.8.0 → 0.8.2

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.
@@ -5,6 +5,8 @@ export interface FileBrowserProviderProps {
5
5
  files: FileItem[];
6
6
  initialPath?: string;
7
7
  initialViewMode?: ViewMode;
8
+ /** Label for the root/home directory in breadcrumb (default: 'Root') */
9
+ homeLabel?: string;
8
10
  onNavigate?: (path: string) => void;
9
11
  onSelect?: (items: FileItem[]) => void;
10
12
  onOpen?: (item: FileItem) => void;
@@ -133,6 +133,7 @@ export interface FileBrowserContextValue {
133
133
  setCurrentPath: (path: string) => void;
134
134
  navigateUp: () => void;
135
135
  navigateTo: (item: FileItem) => void;
136
+ homeLabel: Accessor<string>;
136
137
  selectedItems: Accessor<Set<string>>;
137
138
  selectItem: (id: string, multi?: boolean) => void;
138
139
  clearSelection: () => void;
@@ -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/index41.js CHANGED
@@ -1,23 +1,23 @@
1
- import { createComponent as he } from "solid-js/web";
2
- import { createContext as me, createSignal as a, createMemo as N, useContext as we } from "solid-js";
1
+ import { createComponent as me } from "solid-js/web";
2
+ import { createContext as we, createSignal as a, createMemo as N, useContext as Pe } from "solid-js";
3
3
  import { deferNonBlocking as I } from "./index70.js";
4
- const V = me();
5
- function Q(r, p) {
6
- if (!p) return [];
7
- const x = r.toLowerCase(), w = p.toLowerCase(), h = [];
4
+ const R = we();
5
+ function Q(r, h) {
6
+ if (!h) return [];
7
+ const x = r.toLowerCase(), w = h.toLowerCase(), p = [];
8
8
  let g = 0;
9
9
  for (const S of w) {
10
10
  const m = x.indexOf(S, g);
11
11
  if (m === -1) return null;
12
- h.push(m), g = m + 1;
12
+ p.push(m), g = m + 1;
13
13
  }
14
- return h;
14
+ return p;
15
15
  }
16
- function Ce(r) {
17
- const [p, x] = a(r.initialPath ?? "/"), [w, h] = a(/* @__PURE__ */ new Set()), [g, S] = a(r.initialViewMode ?? "list"), [m, j] = a({
16
+ function ye(r) {
17
+ const [h, x] = a(r.initialPath ?? "/"), [w, p] = a(/* @__PURE__ */ new Set()), [g, S] = a(r.initialViewMode ?? "list"), [m, V] = a({
18
18
  field: "name",
19
19
  direction: "asc"
20
- }), [M, O] = a(/* @__PURE__ */ new Set(["/"])), [R, D] = a(!1), [G, k] = a(null), [v, b] = a(""), [H, B] = a(!1), [z, P] = a([]);
20
+ }), [M, b] = a(/* @__PURE__ */ new Set(["/"])), [j, D] = a(!1), [G, O] = a(null), [v, k] = a(""), [H, B] = a(!1), J = () => r.homeLabel ?? "Root", [z, P] = a([]);
21
21
  let u = null, C = {
22
22
  top: 0,
23
23
  left: 0
@@ -25,12 +25,12 @@ function Ce(r) {
25
25
  const A = () => r.files, c = (e) => {
26
26
  const t = (e ?? "").trim();
27
27
  return t === "" ? "/" : t;
28
- }, T = (e) => {
28
+ }, L = (e) => {
29
29
  const t = c(e);
30
30
  if (t === "/") return "/";
31
31
  const n = t.split("/").filter(Boolean);
32
32
  return n.pop(), n.length ? "/" + n.join("/") : "/";
33
- }, J = (e, t) => {
33
+ }, K = (e, t) => {
34
34
  const n = z();
35
35
  if (n.length === 0) return e;
36
36
  let s = [...e];
@@ -46,13 +46,13 @@ function Ce(r) {
46
46
  const l = c(o.oldPath), i = s.findIndex((f) => c(f.path) === l);
47
47
  if (i !== -1) {
48
48
  const f = o.updates.path ?? s[i].path;
49
- T(f) === d ? s[i] = {
49
+ L(f) === d ? s[i] = {
50
50
  ...s[i],
51
51
  ...o.updates
52
52
  } : s.splice(i, 1);
53
53
  } else {
54
54
  const f = o.updates.path;
55
- f && T(f);
55
+ f && L(f);
56
56
  }
57
57
  break;
58
58
  }
@@ -62,17 +62,17 @@ function Ce(r) {
62
62
  }
63
63
  }
64
64
  return s;
65
- }, K = N(() => {
65
+ }, W = N(() => {
66
66
  const e = /* @__PURE__ */ new Map(), t = (s) => {
67
67
  var d;
68
68
  for (const o of s)
69
69
  o.type === "folder" && (e.set(c(o.path), o.children ?? []), (d = o.children) != null && d.length && t(o.children));
70
70
  }, n = A();
71
71
  return e.set("/", n), t(n), e;
72
- }), U = N(() => {
73
- const e = c(p());
74
- let t = K().get(e) ?? [];
75
- t = J(t, e);
72
+ }), T = N(() => {
73
+ const e = c(h());
74
+ let t = W().get(e) ?? [];
75
+ t = K(t, e);
76
76
  const n = v().trim();
77
77
  n && (t = t.filter((o) => Q(o.name, n) !== null));
78
78
  const s = m();
@@ -100,69 +100,69 @@ function Ce(r) {
100
100
  }), y = (e) => {
101
101
  var s;
102
102
  const t = c(e);
103
- x(t), h(/* @__PURE__ */ new Set()), b(""), B(!1);
103
+ x(t), p(/* @__PURE__ */ new Set()), k(""), B(!1);
104
104
  const n = r.onSelect;
105
105
  I(() => n == null ? void 0 : n([])), (s = r.onNavigate) == null || s.call(r, t);
106
- }, W = () => {
107
- const e = p();
106
+ }, X = () => {
107
+ const e = h();
108
108
  if (e === "/" || e === "") return;
109
109
  const t = e.split("/").filter(Boolean);
110
110
  t.pop(), y(t.length ? "/" + t.join("/") : "/");
111
- }, E = (e) => {
112
- e.type === "folder" && (y(e.path), O((t) => {
111
+ }, U = (e) => {
112
+ e.type === "folder" && (y(e.path), b((t) => {
113
113
  const n = new Set(t);
114
114
  return n.add(e.path), n;
115
115
  }));
116
- }, X = (e, t = !1) => {
116
+ }, Y = (e, t = !1) => {
117
117
  const n = w(), s = t ? new Set(n) : /* @__PURE__ */ new Set();
118
- t ? s.has(e) ? s.delete(e) : s.add(e) : (s.clear(), s.add(e)), h(s);
119
- const d = U().filter((l) => s.has(l.id)), o = r.onSelect;
118
+ t ? s.has(e) ? s.delete(e) : s.add(e) : (s.clear(), s.add(e)), p(s);
119
+ const d = T().filter((l) => s.has(l.id)), o = r.onSelect;
120
120
  I(() => o == null ? void 0 : o(d));
121
- }, Y = () => {
122
- h(/* @__PURE__ */ new Set());
121
+ }, Z = () => {
122
+ p(/* @__PURE__ */ new Set());
123
123
  const e = r.onSelect;
124
124
  I(() => e == null ? void 0 : e([]));
125
- }, Z = (e) => w().has(e), _ = (e) => {
126
- O((t) => {
125
+ }, _ = (e) => w().has(e), $ = (e) => {
126
+ b((t) => {
127
127
  const n = new Set(t);
128
128
  return n.has(e) ? n.delete(e) : n.add(e), n;
129
129
  });
130
- }, $ = (e) => M().has(e), ee = () => D((e) => !e), te = (e) => k(e), ne = () => k(null), oe = (e) => {
131
- b(e);
132
- }, se = (e) => {
130
+ }, ee = (e) => M().has(e), te = () => D((e) => !e), ne = (e) => O(e), oe = () => O(null), se = (e) => {
131
+ k(e);
132
+ }, re = (e) => {
133
133
  const t = v().trim();
134
134
  if (!t) return null;
135
135
  const n = Q(e, t);
136
136
  return n ? {
137
137
  matchedIndices: n
138
138
  } : null;
139
- }, re = (e) => {
140
- var t;
141
- e.type === "folder" ? E(e) : (t = r.onOpen) == null || t.call(r, e);
142
139
  }, ie = (e) => {
140
+ var t;
141
+ e.type === "folder" ? U(e) : (t = r.onOpen) == null || t.call(r, e);
142
+ }, ce = (e) => {
143
143
  e.length !== 0 && P((t) => [...t, {
144
144
  type: "remove",
145
145
  paths: e
146
146
  }]);
147
- }, ce = (e, t) => {
147
+ }, le = (e, t) => {
148
148
  P((n) => [...n, {
149
149
  type: "update",
150
150
  oldPath: e,
151
151
  updates: t
152
152
  }]);
153
- }, le = (e, t) => {
153
+ }, ae = (e, t) => {
154
154
  P((n) => [...n, {
155
155
  type: "insert",
156
156
  parentPath: e,
157
157
  item: t
158
158
  }]);
159
- }, ae = () => {
160
- P([]);
161
159
  }, de = () => {
162
160
  P([]);
163
- }, fe = () => z().length > 0, ue = (e) => {
161
+ }, fe = () => {
162
+ P([]);
163
+ }, ue = () => z().length > 0, he = (e) => {
164
164
  u = e;
165
- }, L = () => u ? {
165
+ }, E = () => u ? {
166
166
  top: u.scrollTop,
167
167
  left: u.scrollLeft
168
168
  } : {
@@ -171,66 +171,67 @@ function Ce(r) {
171
171
  }, q = (e) => {
172
172
  u && (u.scrollTop = e.top, u.scrollLeft = e.left);
173
173
  }, pe = {
174
- currentPath: p,
174
+ currentPath: h,
175
175
  setCurrentPath: y,
176
- navigateUp: W,
177
- navigateTo: E,
176
+ navigateUp: X,
177
+ navigateTo: U,
178
+ homeLabel: J,
178
179
  selectedItems: () => w(),
179
- selectItem: X,
180
- clearSelection: Y,
181
- isSelected: Z,
180
+ selectItem: Y,
181
+ clearSelection: Z,
182
+ isSelected: _,
182
183
  viewMode: g,
183
184
  setViewMode: S,
184
185
  sortConfig: m,
185
- setSortConfig: j,
186
+ setSortConfig: V,
186
187
  expandedFolders: M,
187
- toggleFolder: _,
188
- isExpanded: $,
188
+ toggleFolder: $,
189
+ isExpanded: ee,
189
190
  files: A,
190
- currentFiles: U,
191
+ currentFiles: T,
191
192
  filterQuery: v,
192
- setFilterQuery: oe,
193
+ setFilterQuery: se,
193
194
  isFilterActive: H,
194
195
  setFilterActive: B,
195
- getFilterMatch: se,
196
- sidebarCollapsed: R,
197
- toggleSidebar: ee,
196
+ getFilterMatch: re,
197
+ sidebarCollapsed: j,
198
+ toggleSidebar: te,
198
199
  contextMenu: G,
199
- showContextMenu: te,
200
- hideContextMenu: ne,
201
- openItem: re,
200
+ showContextMenu: ne,
201
+ hideContextMenu: oe,
202
+ openItem: ie,
202
203
  // Optimistic updates
203
- optimisticRemove: ie,
204
- optimisticUpdate: ce,
205
- optimisticInsert: le,
206
- clearOptimisticUpdates: ae,
207
- rollbackOptimisticUpdates: de,
208
- hasOptimisticUpdates: fe,
204
+ optimisticRemove: ce,
205
+ optimisticUpdate: le,
206
+ optimisticInsert: ae,
207
+ clearOptimisticUpdates: de,
208
+ rollbackOptimisticUpdates: fe,
209
+ hasOptimisticUpdates: ue,
209
210
  // Scroll position management
210
- setScrollContainer: ue,
211
- getScrollPosition: L,
211
+ setScrollContainer: he,
212
+ getScrollPosition: E,
212
213
  setScrollPosition: q,
213
- saveScrollPosition: () => (C = L(), C),
214
+ saveScrollPosition: () => (C = E(), C),
214
215
  restoreScrollPosition: () => {
215
216
  requestAnimationFrame(() => {
216
217
  q(C);
217
218
  });
218
219
  }
219
220
  };
220
- return he(V.Provider, {
221
+ return me(R.Provider, {
221
222
  value: pe,
222
223
  get children() {
223
224
  return r.children;
224
225
  }
225
226
  });
226
227
  }
227
- function ye() {
228
- const r = we(V);
228
+ function Fe() {
229
+ const r = Pe(R);
229
230
  if (!r)
230
231
  throw new Error("useFileBrowser must be used within a FileBrowserProvider");
231
232
  return r;
232
233
  }
233
234
  export {
234
- Ce as FileBrowserProvider,
235
- ye as useFileBrowser
235
+ ye as FileBrowserProvider,
236
+ Fe as useFileBrowser
236
237
  };
package/dist/index46.js CHANGED
@@ -1,20 +1,20 @@
1
- import { delegateEvents as H, template as v, insert as E, createComponent as a, memo as P, effect as b, className as x, use as y } from "solid-js/web";
2
- import { createSignal as B, onMount as L, createMemo as k, For as O, Show as M, onCleanup as F } from "solid-js";
3
- import { cn as W } from "./index69.js";
1
+ import { delegateEvents as A, template as b, insert as R, createComponent as a, memo as H, effect as x, className as W, use as P } from "solid-js/web";
2
+ import { createSignal as y, onMount as B, createMemo as M, For as O, Show as T, onCleanup as F } from "solid-js";
3
+ import { cn as C } from "./index69.js";
4
4
  import { useFileBrowser as G } from "./index41.js";
5
- import { ChevronRight as T } from "./index34.js";
5
+ import { ChevronRight as E } from "./index34.js";
6
6
  import { Dropdown as z } from "./index24.js";
7
- var X = /* @__PURE__ */ v("<nav aria-label=Breadcrumb>"), j = /* @__PURE__ */ v('<button type=button title="Show hidden path segments">…'), q = /* @__PURE__ */ v('<button type=button><span class="truncate max-w-[120px] block">');
8
- const g = 16, J = 28, R = 12, K = 7, Q = 120, U = 100;
9
- function V(n) {
10
- const r = n.length * K;
11
- return Math.min(r + R, Q + R);
7
+ var X = /* @__PURE__ */ b("<nav aria-label=Breadcrumb>"), j = /* @__PURE__ */ b('<button type=button title="Show hidden path segments">…'), q = /* @__PURE__ */ b('<button type=button><span class="truncate max-w-[120px] block">');
8
+ const p = 16, J = 28, D = 12, K = 7, Q = 120, U = 100;
9
+ function V(r) {
10
+ const n = r.length * K;
11
+ return Math.min(n + D, Q + D);
12
12
  }
13
- function ce(n) {
14
- const r = G();
13
+ function ce(r) {
14
+ const n = G();
15
15
  let s;
16
- const [t, c] = B(0);
17
- L(() => {
16
+ const [t, c] = y(0);
17
+ B(() => {
18
18
  if (!s) return;
19
19
  const e = () => {
20
20
  s && c(s.offsetWidth);
@@ -23,25 +23,25 @@ function ce(n) {
23
23
  const o = new ResizeObserver(e);
24
24
  o.observe(s), F(() => o.disconnect());
25
25
  });
26
- const d = k(() => {
27
- const e = r.currentPath();
26
+ const d = M(() => {
27
+ const e = n.currentPath(), o = n.homeLabel();
28
28
  if (e === "/" || e === "")
29
29
  return [{
30
- name: "Root",
30
+ name: o,
31
31
  path: "/"
32
32
  }];
33
- const o = e.split("/").filter(Boolean), i = [{
34
- name: "Root",
33
+ const l = e.split("/").filter(Boolean), i = [{
34
+ name: o,
35
35
  path: "/"
36
36
  }];
37
- let l = "";
38
- for (const f of o)
39
- l += "/" + f, i.push({
40
- name: f,
41
- path: l
37
+ let f = "";
38
+ for (const g of l)
39
+ f += "/" + g, i.push({
40
+ name: g,
41
+ path: f
42
42
  });
43
43
  return i;
44
- }), m = k(() => {
44
+ }), m = M(() => {
45
45
  const e = d(), o = t();
46
46
  if (o < U || e.length <= 2)
47
47
  return {
@@ -49,73 +49,73 @@ function ce(n) {
49
49
  visible: e,
50
50
  shouldCollapse: !1
51
51
  };
52
- const i = e.map((u) => V(u.name)), l = i[0], f = i[e.length - 1], D = g, $ = e.length > 1 ? g : 0, S = l + f + D + $;
53
- if (S > o && e.length > 2)
52
+ const l = e.map((u) => V(u.name)), i = l[0], f = l[e.length - 1], g = p, $ = e.length > 1 ? p : 0, _ = i + f + g + $;
53
+ if (_ > o && e.length > 2)
54
54
  return {
55
55
  collapsed: e.slice(1, -1),
56
56
  visible: [e[0], e[e.length - 1]],
57
57
  shouldCollapse: !0
58
58
  };
59
- const h = e.slice(1, -1), p = [];
60
- let _ = o - S;
61
- const N = h.length > 0 ? J + g : 0;
59
+ const h = e.slice(1, -1), v = [];
60
+ let w = o - _;
61
+ const L = h.length > 0 ? J + p : 0;
62
62
  for (let u = h.length - 1; u >= 0; u--) {
63
- const I = i[u + 1] + g, A = u > 0 ? N : 0;
64
- if (_ - A >= I)
65
- p.unshift(h[u]), _ -= I;
63
+ const k = l[u + 1] + p, N = u > 0 ? L : 0;
64
+ if (w - N >= k)
65
+ v.unshift(h[u]), w -= k;
66
66
  else
67
67
  break;
68
68
  }
69
- const w = h.slice(0, h.length - p.length);
69
+ const I = h.slice(0, h.length - v.length);
70
70
  return {
71
- collapsed: w,
72
- visible: [e[0], ...p, e[e.length - 1]],
73
- shouldCollapse: w.length > 0
71
+ collapsed: I,
72
+ visible: [e[0], ...v, e[e.length - 1]],
73
+ shouldCollapse: I.length > 0
74
74
  };
75
- }), C = (e) => {
76
- r.setCurrentPath(e.path);
75
+ }), S = (e) => {
76
+ n.setCurrentPath(e.path);
77
77
  };
78
78
  return (() => {
79
79
  var e = X(), o = s;
80
- return typeof o == "function" ? y(o, e) : s = e, E(e, a(O, {
80
+ return typeof o == "function" ? P(o, e) : s = e, R(e, a(O, {
81
81
  get each() {
82
82
  return m().visible;
83
83
  },
84
- children: (i, l) => [a(M, {
84
+ children: (l, i) => [a(T, {
85
85
  get when() {
86
- return l() > 0;
86
+ return i() > 0;
87
87
  },
88
88
  get children() {
89
- return a(T, {
89
+ return a(E, {
90
90
  class: "w-3 h-3 text-muted-foreground/50 flex-shrink-0"
91
91
  });
92
92
  }
93
- }), a(M, {
93
+ }), a(T, {
94
94
  get when() {
95
- return P(() => !!m().shouldCollapse)() && l() === 1;
95
+ return H(() => !!m().shouldCollapse)() && i() === 1;
96
96
  },
97
97
  get children() {
98
98
  return [a(Y, {
99
99
  get segments() {
100
100
  return m().collapsed;
101
101
  },
102
- onSelect: C
103
- }), a(T, {
102
+ onSelect: S
103
+ }), a(E, {
104
104
  class: "w-3 h-3 text-muted-foreground/50 flex-shrink-0"
105
105
  })];
106
106
  }
107
107
  }), a(Z, {
108
- segment: i,
108
+ segment: l,
109
109
  get isLast() {
110
- return l() === m().visible.length - 1;
110
+ return i() === m().visible.length - 1;
111
111
  },
112
- onClick: () => C(i)
112
+ onClick: () => S(l)
113
113
  })]
114
- })), b(() => x(e, W("flex items-center gap-1 min-w-0 overflow-hidden", n.class))), e;
114
+ })), x(() => W(e, C("flex items-center gap-1 min-w-0 overflow-hidden", r.class))), e;
115
115
  })();
116
116
  }
117
- function Y(n) {
118
- const r = () => n.segments.map((t) => ({
117
+ function Y(r) {
118
+ const n = () => r.segments.map((t) => ({
119
119
  id: t.path,
120
120
  label: t.name
121
121
  }));
@@ -123,32 +123,32 @@ function Y(n) {
123
123
  get trigger() {
124
124
  return (() => {
125
125
  var t = j();
126
- return b(() => x(t, W("text-xs px-1.5 py-0.5 rounded cursor-pointer flex-shrink-0", "transition-all duration-100", "text-muted-foreground hover:text-foreground hover:bg-muted/50", "focus:outline-none focus-visible:ring-1 focus-visible:ring-ring"))), t;
126
+ return x(() => W(t, C("text-xs px-1.5 py-0.5 rounded cursor-pointer flex-shrink-0", "transition-all duration-100", "text-muted-foreground hover:text-foreground hover:bg-muted/50", "focus:outline-none focus-visible:ring-1 focus-visible:ring-ring"))), t;
127
127
  })();
128
128
  },
129
129
  get items() {
130
- return r();
130
+ return n();
131
131
  },
132
132
  onSelect: (t) => {
133
- const c = n.segments.find((d) => d.path === t);
134
- c && n.onSelect(c);
133
+ const c = r.segments.find((d) => d.path === t);
134
+ c && r.onSelect(c);
135
135
  },
136
136
  align: "start"
137
137
  });
138
138
  }
139
- function Z(n) {
139
+ function Z(r) {
140
140
  return (() => {
141
- var r = q(), s = r.firstChild;
142
- return r.$$click = () => n.onClick(), E(s, () => n.segment.name), b((t) => {
143
- var c = n.isLast, d = W("text-xs px-1.5 py-0.5 rounded cursor-pointer flex-shrink-0", "transition-all duration-100", "focus:outline-none focus-visible:ring-1 focus-visible:ring-ring", n.isLast ? "font-medium text-foreground cursor-default" : "text-muted-foreground hover:text-foreground hover:bg-muted/50");
144
- return c !== t.e && (r.disabled = t.e = c), d !== t.t && x(r, t.t = d), t;
141
+ var n = q(), s = n.firstChild;
142
+ return n.$$click = () => r.onClick(), R(s, () => r.segment.name), x((t) => {
143
+ var c = r.isLast, d = C("text-xs px-1.5 py-0.5 rounded cursor-pointer flex-shrink-0", "transition-all duration-100", "focus:outline-none focus-visible:ring-1 focus-visible:ring-ring", r.isLast ? "font-medium text-foreground cursor-default" : "text-muted-foreground hover:text-foreground hover:bg-muted/50");
144
+ return c !== t.e && (n.disabled = t.e = c), d !== t.t && W(n, t.t = d), t;
145
145
  }, {
146
146
  e: void 0,
147
147
  t: void 0
148
- }), r;
148
+ }), n;
149
149
  })();
150
150
  }
151
- H(["click"]);
151
+ A(["click"]);
152
152
  export {
153
153
  ce as Breadcrumb
154
154
  };
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.2",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",