@floegence/floe-webapp-core 0.58.0 → 0.60.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,68 +1,68 @@
1
- import { addEventListener as te, use as Q, insert as y, createComponent as C, effect as N, setStyleProperty as Y, className as q, style as ie, template as S, spread as me, mergeProps as fe, memo as he, delegateEvents as ve } from "solid-js/web";
2
- import { createSignal as oe, createMemo as W, createEffect as ne, onCleanup as ae, Show as B, For as le, untrack as xe } from "solid-js";
1
+ import { addEventListener as te, use as Q, insert as S, createComponent as b, effect as N, setStyleProperty as Y, className as q, style as ue, template as y, spread as ge, mergeProps as me, memo as fe, delegateEvents as he } from "solid-js/web";
2
+ import { createSignal as ie, createMemo as W, createEffect as ne, onCleanup as oe, Show as B, For as ae, untrack as ve } from "solid-js";
3
3
  import { cn as H } from "../../utils/cn.js";
4
- import { useResizeObserver as Ie } from "../../hooks/useResizeObserver.js";
5
- import { useVirtualWindow as we } from "../../hooks/useVirtualWindow.js";
6
- import { useFileBrowser as ce } from "./FileBrowserContext.js";
7
- import { useFileBrowserDrag as be } from "../../context/FileBrowserDragContext.js";
4
+ import { useResizeObserver as xe } from "../../hooks/useResizeObserver.js";
5
+ import { useVirtualWindow as Ie } from "../../hooks/useVirtualWindow.js";
6
+ import { useFileBrowser as le } from "./FileBrowserContext.js";
7
+ import { useFileBrowserDrag as we } from "../../context/FileBrowserDragContext.js";
8
8
  import { FileItemIcon as Ce } from "./FileIcons.js";
9
- import { FileItemDecorationBadge as De, fileItemDecorationNameClass as ye } from "./FileItemDecorations.js";
9
+ import { FileItemDecorationBadge as be, fileItemDecorationNameClass as De } from "./FileItemDecorations.js";
10
10
  import { createLongPressContextMenuHandlers as Se } from "./longPressContextMenu.js";
11
- import { fileBrowserTouchTargetAttrs as Me } from "./touchInteractionGuard.js";
12
- import { createItemContextMenuEvent as Te } from "./contextMenuEvent.js";
13
- import { createFileBrowserMarqueeSelection as Pe, FILE_BROWSER_MARQUEE_OVERLAY_CLASS as _e } from "./useFileBrowserMarqueeSelection.js";
11
+ import { fileBrowserTouchTargetAttrs as ye } from "./touchInteractionGuard.js";
12
+ import { createItemContextMenuEvent as Me } from "./contextMenuEvent.js";
13
+ import { createFileBrowserMarqueeSelection as Te, FILE_BROWSER_MARQUEE_OVERLAY_CLASS as Pe } from "./useFileBrowserMarqueeSelection.js";
14
14
  import { isPrimaryModKeyPressed as re } from "../../utils/keybind.js";
15
- var Fe = /* @__PURE__ */ S('<mark class="bg-warning/40 text-inherit rounded-sm">'), Ee = /* @__PURE__ */ S('<div class="grid gap-2">'), Le = /* @__PURE__ */ S('<div><div class=p-3><div class="w-full h-0"aria-hidden=true>'), Re = /* @__PURE__ */ S('<span>No files matching "<!>"'), ke = /* @__PURE__ */ S('<button type=button class="px-2 py-1 rounded bg-muted hover:bg-muted/80 transition-colors">Clear Filter'), $e = /* @__PURE__ */ S('<div class="flex flex-col items-center justify-center h-32 gap-2 text-xs text-muted-foreground">'), Ae = /* @__PURE__ */ S("<span>This folder is empty"), He = /* @__PURE__ */ S("<div>"), qe = /* @__PURE__ */ S('<div class="absolute top-1.5 right-1.5 w-4 h-4 rounded-full bg-primary flex items-center justify-center"><svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=3 stroke-linecap=round stroke-linejoin=round class="w-2.5 h-2.5 text-primary-foreground"><polyline points="20 6 9 17 4 12">'), Be = /* @__PURE__ */ S("<button type=button><div></div><span></span><div>");
16
- function Oe(e) {
15
+ var _e = /* @__PURE__ */ y('<mark class="bg-warning/40 text-inherit rounded-sm">'), Fe = /* @__PURE__ */ y('<div class="grid gap-2">'), Ee = /* @__PURE__ */ y('<div><div class=p-3><div class="w-full h-0"aria-hidden=true>'), Le = /* @__PURE__ */ y('<span>No files matching "<!>"'), Re = /* @__PURE__ */ y('<button type=button class="px-2 py-1 rounded bg-muted hover:bg-muted/80 transition-colors">Clear Filter'), $e = /* @__PURE__ */ y('<div class="flex flex-col items-center justify-center h-32 gap-2 text-xs text-muted-foreground">'), ke = /* @__PURE__ */ y("<span>This folder is empty"), Ae = /* @__PURE__ */ y("<div>"), He = /* @__PURE__ */ y('<div class="absolute top-1.5 right-1.5 w-4 h-4 rounded-full bg-primary flex items-center justify-center"><svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=3 stroke-linecap=round stroke-linejoin=round class="w-2.5 h-2.5 text-primary-foreground"><polyline points="20 6 9 17 4 12">'), qe = /* @__PURE__ */ y("<button type=button><div></div><span></span><div>");
16
+ function Be(e) {
17
17
  const r = W(() => {
18
18
  if (!e.match || e.match.matchedIndices.length === 0)
19
19
  return [{
20
20
  text: e.name,
21
21
  highlight: !1
22
22
  }];
23
- const d = [], M = new Set(e.match.matchedIndices);
23
+ const s = [], M = new Set(e.match.matchedIndices);
24
24
  let D = "", m = !1;
25
- for (let u = 0; u < e.name.length; u++) {
26
- const v = M.has(u);
27
- u === 0 ? (m = v, D = e.name[u]) : v === m ? D += e.name[u] : (d.push({
25
+ for (let d = 0; d < e.name.length; d++) {
26
+ const v = M.has(d);
27
+ d === 0 ? (m = v, D = e.name[d]) : v === m ? D += e.name[d] : (s.push({
28
28
  text: D,
29
29
  highlight: m
30
- }), D = e.name[u], m = v);
30
+ }), D = e.name[d], m = v);
31
31
  }
32
- return D && d.push({
32
+ return D && s.push({
33
33
  text: D,
34
34
  highlight: m
35
- }), d;
35
+ }), s;
36
36
  });
37
- return C(le, {
37
+ return b(ae, {
38
38
  get each() {
39
39
  return r();
40
40
  },
41
- children: (d) => C(B, {
41
+ children: (s) => b(B, {
42
42
  get when() {
43
- return d.highlight;
43
+ return s.highlight;
44
44
  },
45
45
  get fallback() {
46
- return he(() => d.text);
46
+ return fe(() => s.text);
47
47
  },
48
48
  get children() {
49
- var M = Fe();
50
- return y(M, () => d.text), M;
49
+ var M = _e();
50
+ return S(M, () => s.text), M;
51
51
  }
52
52
  })
53
53
  });
54
54
  }
55
- function tt(e) {
56
- const r = ce(), d = be(), M = () => (e.enableDragDrop ?? !0) && !!d, D = () => e.instanceId ?? "default", m = 112, u = 8, v = 180, T = 2, R = 6, [f, V] = oe(null), U = Ie(f), x = W(() => {
57
- const n = U()?.width ?? 0;
55
+ function et(e) {
56
+ const r = le(), s = we(), M = () => (e.enableDragDrop ?? !0) && !!s, D = () => e.instanceId ?? "default", m = 112, d = 8, v = 180, T = 2, R = 6, [f, V] = ie(null), z = xe(f), x = W(() => {
57
+ const n = z()?.width ?? 0;
58
58
  if (n <= 0) return T;
59
- const l = Math.floor((n + u) / (v + u));
59
+ const l = Math.floor((n + d) / (v + d));
60
60
  return Math.max(T, Math.min(R, l));
61
- }), E = () => m + u, c = we({
61
+ }), E = () => m + d, c = Ie({
62
62
  count: () => Math.ceil(r.currentFiles().length / Math.max(1, x())),
63
63
  itemSize: E,
64
64
  overscan: 2
65
- }), z = () => c.range().start * x(), k = () => Math.min(r.currentFiles().length, c.range().end * x()), $ = W(() => r.currentFiles().slice(z(), k())), P = /* @__PURE__ */ new Map(), O = (n, l) => {
65
+ }), j = () => c.range().start * x(), $ = () => Math.min(r.currentFiles().length, c.range().end * x()), k = W(() => r.currentFiles().slice(j(), $())), P = /* @__PURE__ */ new Map(), O = (n, l) => {
66
66
  if (l) {
67
67
  P.set(n, l);
68
68
  return;
@@ -80,22 +80,22 @@ function tt(e) {
80
80
  const l = E(), o = Math.floor(g.scrollTop / Math.max(1, l)) * Math.max(1, L), i = Math.floor(o / Math.max(1, n));
81
81
  g.scrollTop = i * l, c.onScroll(), L = n;
82
82
  });
83
- const X = (n) => {
83
+ const p = (n) => {
84
84
  if (!g) return;
85
- const b = Math.floor(n / Math.max(1, x())) * E(), o = b + E(), i = g.scrollTop, w = i + g.clientHeight;
86
- if (b < i) {
87
- g.scrollTop = b, c.onScroll();
85
+ const C = Math.floor(n / Math.max(1, x())) * E(), o = C + E(), i = g.scrollTop, w = i + g.clientHeight;
86
+ if (C < i) {
87
+ g.scrollTop = C, c.onScroll();
88
88
  return;
89
89
  }
90
90
  o > w && (g.scrollTop = Math.max(0, o - g.clientHeight), c.onScroll());
91
91
  };
92
92
  ne(() => {
93
93
  const n = r.revealRequest(), l = r.currentFiles();
94
- if (x(), $(), !n) return;
95
- const b = l.findIndex((w) => w.id === n.targetId);
96
- if (b < 0) return;
94
+ if (x(), k(), !n) return;
95
+ const C = l.findIndex((w) => w.id === n.targetId);
96
+ if (C < 0) return;
97
97
  if (!P.get(n.targetId)) {
98
- X(b);
98
+ p(C);
99
99
  return;
100
100
  }
101
101
  typeof cancelAnimationFrame == "function" && I && (cancelAnimationFrame(I), I = 0);
@@ -112,10 +112,10 @@ function tt(e) {
112
112
  return;
113
113
  }
114
114
  queueMicrotask(i);
115
- }), ae(() => {
115
+ }), oe(() => {
116
116
  typeof cancelAnimationFrame == "function" && I && cancelAnimationFrame(I);
117
117
  });
118
- const A = Pe({
118
+ const A = Te({
119
119
  getContainer: () => g,
120
120
  getOverlayHost: () => g,
121
121
  getVisibleItemIdsInOrder: () => r.currentFiles().map((n) => n.id),
@@ -125,29 +125,29 @@ function tt(e) {
125
125
  clearSelection: r.clearSelection
126
126
  });
127
127
  return (() => {
128
- var n = Le(), l = n.firstChild, b = l.firstChild;
128
+ var n = Ee(), l = n.firstChild, C = l.firstChild;
129
129
  return te(n, "pointerdown", A.onPointerDown, !0), te(n, "scroll", c.onScroll), Q((o) => {
130
130
  g = o, c.scrollRef(o), r.setScrollContainer(o);
131
- }, n), Q((o) => V(o), b), y(l, C(B, {
131
+ }, n), Q((o) => V(o), C), S(l, b(B, {
132
132
  get when() {
133
133
  return r.currentFiles().length > 0;
134
134
  },
135
135
  get fallback() {
136
136
  return (() => {
137
137
  var o = $e();
138
- return y(o, C(B, {
138
+ return S(o, b(B, {
139
139
  get when() {
140
140
  return r.filterQueryApplied().trim();
141
141
  },
142
142
  get fallback() {
143
- return Ae();
143
+ return ke();
144
144
  },
145
145
  get children() {
146
146
  return [(() => {
147
- var i = Re(), w = i.firstChild, _ = w.nextSibling;
148
- return _.nextSibling, y(i, () => r.filterQueryApplied(), _), i;
147
+ var i = Le(), w = i.firstChild, _ = w.nextSibling;
148
+ return _.nextSibling, S(i, () => r.filterQueryApplied(), _), i;
149
149
  })(), (() => {
150
- var i = ke();
150
+ var i = Re();
151
151
  return i.$$click = () => r.setFilterQuery(""), i;
152
152
  })()];
153
153
  }
@@ -155,12 +155,12 @@ function tt(e) {
155
155
  })();
156
156
  },
157
157
  get children() {
158
- var o = Ee();
159
- return y(o, C(le, {
158
+ var o = Fe();
159
+ return S(o, b(ae, {
160
160
  get each() {
161
- return $();
161
+ return k();
162
162
  },
163
- children: (i) => C(Xe, {
163
+ children: (i) => b(Oe, {
164
164
  item: i,
165
165
  get instanceId() {
166
166
  return D();
@@ -168,38 +168,38 @@ function tt(e) {
168
168
  get enableDragDrop() {
169
169
  return M();
170
170
  },
171
- dragContext: d,
171
+ dragContext: s,
172
172
  registerTile: O
173
173
  })
174
174
  })), N((i) => {
175
- var w = `repeat(${x()}, minmax(0, 1fr))`, _ = `${c.paddingTop()}px`, G = `${c.paddingBottom()}px`;
176
- return w !== i.e && Y(o, "grid-template-columns", i.e = w), _ !== i.t && Y(o, "padding-top", i.t = _), G !== i.a && Y(o, "padding-bottom", i.a = G), i;
175
+ var w = `repeat(${x()}, minmax(0, 1fr))`, _ = `${c.paddingTop()}px`, X = `${c.paddingBottom()}px`;
176
+ return w !== i.e && Y(o, "grid-template-columns", i.e = w), _ !== i.t && Y(o, "padding-top", i.t = _), X !== i.a && Y(o, "padding-bottom", i.a = X), i;
177
177
  }, {
178
178
  e: void 0,
179
179
  t: void 0,
180
180
  a: void 0
181
181
  }), o;
182
182
  }
183
- }), null), y(l, C(B, {
183
+ }), null), S(l, b(B, {
184
184
  get when() {
185
185
  return A.overlayStyle();
186
186
  },
187
187
  children: (o) => (() => {
188
- var i = He();
189
- return q(i, _e), N((w) => ie(i, o(), w)), i;
188
+ var i = Ae();
189
+ return q(i, Pe), N((w) => ue(i, o(), w)), i;
190
190
  })()
191
191
  }), null), N(() => q(n, H("relative h-full min-h-0 overflow-auto", e.class))), n;
192
192
  })();
193
193
  }
194
- function Xe(e) {
195
- const r = ce(), d = () => r.isSelected(e.item.id), M = () => r.getFilterMatchForId(e.item.id), D = xe(() => e.item), m = Se(r, D, {
194
+ function Oe(e) {
195
+ const r = le(), s = () => r.isSelected(e.item.id), M = () => r.getFilterMatchForId(e.item.id), D = ve(() => e.item), m = Se(r, D, {
196
196
  source: "grid"
197
197
  });
198
- let u, v = null, T = 0, R = 0, f = !1;
199
- const V = 5, U = 500;
198
+ let d, v = null, T = 0, R = 0, f = !1;
199
+ const V = 5, z = 500;
200
200
  let x = null;
201
- const [E, j] = oe(!1), c = () => u === "touch" || u === "pen", z = () => e.item.type === "folder", k = () => z() && e.enableDragDrop && e.dragContext, $ = () => {
202
- if (!k() || !e.dragContext) return !1;
201
+ const [E, U] = ie(!1), c = () => d === "touch" || d === "pen", j = () => e.item.type === "folder", $ = () => j() && e.enableDragDrop && e.dragContext, k = () => {
202
+ if (!$() || !e.dragContext) return !1;
203
203
  const t = e.dragContext.dragState();
204
204
  return t.isDragging ? e.dragContext.canDropOn(t.draggedItems, e.item.path, e.item, e.instanceId) : !1;
205
205
  }, P = () => {
@@ -215,14 +215,14 @@ function Xe(e) {
215
215
  }, I = (t) => {
216
216
  O(), g(), f && e.dragContext && e.dragContext.endDrag(t), v = null, f = !1;
217
217
  };
218
- ae(() => {
218
+ oe(() => {
219
219
  e.registerTile(e.item.id, null), I(!1);
220
220
  });
221
- const X = (t, a) => {
221
+ const p = (t, a) => {
222
222
  if (!e.enableDragDrop || !e.dragContext || f) return;
223
- f = !0, d() || r.selectItem(e.item.id, !1);
224
- const h = r.getSelectedItemsList(), s = (h.length > 0 && d() ? h : [e.item]).map((p) => ({
225
- item: p,
223
+ f = !0, s() || r.selectItem(e.item.id, !1);
224
+ const h = r.getSelectedItemsList(), u = (h.length > 0 && s() ? h : [e.item]).map((G) => ({
225
+ item: G,
226
226
  sourceInstanceId: e.instanceId,
227
227
  sourcePath: r.currentPath()
228
228
  }));
@@ -231,7 +231,7 @@ function Xe(e) {
231
231
  navigator.vibrate(50);
232
232
  } catch {
233
233
  }
234
- e.dragContext.startDrag(s, t, a);
234
+ e.dragContext.startDrag(u, t, a);
235
235
  }, A = (t) => {
236
236
  if (v !== t.pointerId) return;
237
237
  const a = t.clientX - T, h = t.clientY - R, F = Math.sqrt(a * a + h * h);
@@ -239,31 +239,31 @@ function Xe(e) {
239
239
  I(!1);
240
240
  return;
241
241
  }
242
- !c() && !f && F > V && X(t.clientX, t.clientY), f && e.dragContext && e.dragContext.updateDrag(t.clientX, t.clientY);
242
+ !c() && !f && F > V && p(t.clientX, t.clientY), f && e.dragContext && e.dragContext.updateDrag(t.clientX, t.clientY);
243
243
  }, n = (t) => {
244
244
  v === t.pointerId && (m.onPointerUp(), I(!0));
245
245
  }, l = (t) => {
246
246
  v === t.pointerId && (m.onPointerCancel(), I(!1));
247
- }, b = (t) => {
248
- u = t.pointerType, m.onPointerDown(t), !(t.pointerType === "mouse" && t.button !== 0) && (!e.enableDragDrop || !e.dragContext || (v = t.pointerId, T = t.clientX, R = t.clientY, f = !1, L(), c() && (O(), x = setTimeout(() => {
249
- v !== null && !f && X(T, R);
250
- }, U))));
247
+ }, C = (t) => {
248
+ d = t.pointerType, m.onPointerDown(t), !(t.pointerType === "mouse" && t.button !== 0) && (!e.enableDragDrop || !e.dragContext || (v = t.pointerId, T = t.clientX, R = t.clientY, f = !1, L(), c() && (O(), x = setTimeout(() => {
249
+ v !== null && !f && p(T, R);
250
+ }, z))));
251
251
  }, o = (t) => {
252
- u = t.pointerType, m.onPointerMove(t);
252
+ d = t.pointerType, m.onPointerMove(t);
253
253
  }, i = (t) => {
254
- if (!k() || !e.dragContext) return;
254
+ if (!$() || !e.dragContext) return;
255
255
  const a = e.dragContext.dragState();
256
256
  if (!a.isDragging) return;
257
- j(!0);
258
- const h = e.dragContext.canDropOn(a.draggedItems, e.item.path, e.item, e.instanceId), s = t.currentTarget?.getBoundingClientRect() ?? null;
257
+ U(!0);
258
+ const h = e.dragContext.canDropOn(a.draggedItems, e.item.path, e.item, e.instanceId), u = t.currentTarget?.getBoundingClientRect() ?? null;
259
259
  e.dragContext.setDropTarget({
260
260
  instanceId: e.instanceId,
261
261
  targetPath: e.item.path,
262
262
  targetItem: e.item
263
- }, h, s);
263
+ }, h, u);
264
264
  }, w = (t) => {
265
265
  if (!e.dragContext) return;
266
- j(!1);
266
+ U(!1);
267
267
  const a = e.dragContext.dragState();
268
268
  a.isDragging && a.dropTarget?.targetPath === e.item.path && e.dragContext.setDropTarget(null, !1);
269
269
  }, _ = (t) => {
@@ -282,39 +282,39 @@ function Xe(e) {
282
282
  }
283
283
  r.selectItem(e.item.id, re(t));
284
284
  }
285
- }, G = () => {
285
+ }, X = () => {
286
286
  c() || r.openItem(e.item);
287
- }, se = (t) => {
287
+ }, ce = (t) => {
288
288
  if (t.preventDefault(), t.stopPropagation(), c()) return;
289
289
  r.ensureContextMenuSelection(e.item.id);
290
290
  const a = r.getSelectedItemsList(), h = a.length > 0 ? a : [e.item];
291
- r.showContextMenu(Te({
291
+ r.showContextMenu(Me({
292
292
  x: t.clientX,
293
293
  y: t.clientY,
294
294
  triggerItem: e.item,
295
295
  items: h,
296
296
  source: "grid"
297
297
  }));
298
- }, de = () => e.dragContext?.dragState(), ue = () => de()?.isDragging ?? !1, K = () => E() && ue() && k();
298
+ }, se = () => e.dragContext?.dragState(), de = () => se()?.isDragging ?? !1, K = () => E() && de() && $();
299
299
  return (() => {
300
- var t = Be(), a = t.firstChild, h = a.nextSibling, F = h.nextSibling;
301
- return Q((s) => {
302
- e.registerTile(e.item.id, s);
303
- }, t), me(t, fe({
300
+ var t = qe(), a = t.firstChild, h = a.nextSibling, F = h.nextSibling;
301
+ return Q((u) => {
302
+ e.registerTile(e.item.id, u);
303
+ }, t), ge(t, me({
304
304
  get "data-file-browser-item-id"() {
305
305
  return e.item.id;
306
306
  },
307
307
  get "data-file-browser-item-path"() {
308
308
  return e.item.path;
309
309
  }
310
- }, Me, {
310
+ }, ye, {
311
311
  get title() {
312
312
  return e.item.name;
313
313
  },
314
314
  onClick: _,
315
- onDblClick: G,
316
- onContextMenu: se,
317
- onPointerDown: b,
315
+ onDblClick: X,
316
+ onContextMenu: ce,
317
+ onPointerDown: C,
318
318
  onPointerMove: o,
319
319
  onPointerEnter: i,
320
320
  onPointerLeave: w,
@@ -325,53 +325,51 @@ function Xe(e) {
325
325
  "hover:bg-accent/50 hover:scale-[1.02]",
326
326
  "focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
327
327
  "active:scale-[0.98]",
328
- d() && "bg-accent ring-2 ring-primary/50",
328
+ s() && "bg-accent ring-2 ring-primary/50",
329
329
  // Drag state styling - being dragged items become translucent and shrink
330
330
  P() && "opacity-40 scale-90",
331
331
  // Drop target styling - enhanced visual feedback for folders
332
- K() && $() && ["bg-primary/15 ring-2 ring-primary/60", "scale-105 shadow-lg shadow-primary/15"],
333
- K() && !$() && ["bg-destructive/10 ring-2 ring-dashed ring-destructive/50"]
332
+ K() && k() && ["bg-primary/15 ring-2 ring-primary/60", "scale-105 shadow-lg shadow-primary/15"],
333
+ K() && !k() && ["bg-destructive/10 ring-2 ring-dashed ring-destructive/50"]
334
334
  );
335
335
  }
336
- }), !1, !0), y(t, C(B, {
336
+ }), !1, !0), S(t, b(B, {
337
337
  get when() {
338
- return d();
338
+ return s();
339
339
  },
340
340
  get children() {
341
- return qe();
341
+ return He();
342
342
  }
343
- }), a), y(a, C(Ce, {
343
+ }), a), S(a, b(Ce, {
344
344
  get item() {
345
345
  return e.item;
346
346
  },
347
- class: "w-8 h-8"
348
- }), null), y(a, C(De, {
347
+ size: 40,
348
+ class: "w-10 h-10"
349
+ }), null), S(a, b(be, {
349
350
  get item() {
350
351
  return e.item;
351
352
  },
352
353
  size: "md"
353
- }), null), y(h, C(Oe, {
354
+ }), null), S(h, b(Be, {
354
355
  get name() {
355
356
  return e.item.name;
356
357
  },
357
358
  get match() {
358
359
  return M();
359
360
  }
360
- })), N((s) => {
361
- var p = H("w-12 h-12 flex items-center justify-center rounded-lg", "relative", e.item.type !== "folder" && "bg-muted/50"), ge = e.item.type === "folder" ? {
362
- "background-color": "color-mix(in srgb, var(--floe-file-icon-warning, var(--warning)) 10%, transparent)"
363
- } : void 0, J = H("block w-full min-w-0 truncate px-1 text-xs text-center", "transition-colors duration-150", ye(e.item), d() && "font-medium"), Z = H("absolute inset-0 rounded-lg opacity-0 transition-opacity duration-300", "group-hover:opacity-100", "pointer-events-none"), ee = e.item.type === "folder" ? "radial-gradient(circle at 50% 30%, color-mix(in srgb, var(--warning) 8%, transparent), transparent 70%)" : "radial-gradient(circle at 50% 30%, color-mix(in srgb, var(--primary) 5%, transparent), transparent 70%)";
364
- return p !== s.e && q(a, s.e = p), s.t = ie(a, ge, s.t), J !== s.a && q(h, s.a = J), Z !== s.o && q(F, s.o = Z), ee !== s.i && Y(F, "background", s.i = ee), s;
361
+ })), N((u) => {
362
+ var G = H("w-12 h-12 flex items-center justify-center rounded-lg", "relative"), J = H("block w-full min-w-0 truncate px-1 text-xs text-center", "transition-colors duration-150", De(e.item), s() && "font-medium"), Z = H("absolute inset-0 rounded-lg opacity-0 transition-opacity duration-300", "group-hover:opacity-100", "pointer-events-none"), ee = e.item.type === "folder" ? "radial-gradient(circle at 50% 30%, color-mix(in srgb, var(--warning) 8%, transparent), transparent 70%)" : "radial-gradient(circle at 50% 30%, color-mix(in srgb, var(--primary) 5%, transparent), transparent 70%)";
363
+ return G !== u.e && q(a, u.e = G), J !== u.t && q(h, u.t = J), Z !== u.a && q(F, u.a = Z), ee !== u.o && Y(F, "background", u.o = ee), u;
365
364
  }, {
366
365
  e: void 0,
367
366
  t: void 0,
368
367
  a: void 0,
369
- o: void 0,
370
- i: void 0
368
+ o: void 0
371
369
  }), t;
372
370
  })();
373
371
  }
374
- ve(["pointerdown", "click"]);
372
+ he(["pointerdown", "click"]);
375
373
  export {
376
- tt as FileGridView
374
+ et as FileGridView
377
375
  };
@@ -2,6 +2,8 @@ import { type Component, type JSX } from 'solid-js';
2
2
  import type { FileItem } from './types';
3
3
  export interface FileIconProps {
4
4
  class?: string;
5
+ /** Rendered pixel size; 20 px and below use the approved compact artwork. */
6
+ size?: number;
5
7
  }
6
8
  type FileIconComponent = Component<FileIconProps>;
7
9
  type ResolvableFileIcon = Pick<FileItem, 'name' | 'type' | 'extension' | 'icon' | 'link'>;
@@ -9,29 +11,28 @@ export type FileItemIconRenderer = FileIconComponent | JSX.Element;
9
11
  export interface ResolveFileItemIconOptions {
10
12
  open?: boolean;
11
13
  }
12
- export declare const FolderIcon: (props: FileIconProps) => JSX.Element;
13
- export declare const FolderOpenIcon: (props: FileIconProps) => JSX.Element;
14
- export declare const SymlinkFolderIcon: (props: FileIconProps) => JSX.Element;
15
- export declare const SymlinkFolderOpenIcon: (props: FileIconProps) => JSX.Element;
16
- export declare const FileIcon: (props: FileIconProps) => JSX.Element;
17
- export declare const SymlinkFileIcon: (props: FileIconProps) => JSX.Element;
18
- export declare const BrokenSymlinkIcon: (props: FileIconProps) => JSX.Element;
19
- export declare const ArchiveFileIcon: (props: FileIconProps) => JSX.Element;
20
- export declare const CodeFileIcon: (props: FileIconProps) => JSX.Element;
14
+ export declare const FolderIcon: FileIconComponent;
15
+ export declare const FolderOpenIcon: FileIconComponent;
16
+ export declare const SymlinkFolderIcon: FileIconComponent;
17
+ export declare const SymlinkFolderOpenIcon: FileIconComponent;
18
+ export declare const FileIcon: FileIconComponent;
19
+ export declare const SymlinkFileIcon: FileIconComponent;
20
+ export declare const BrokenSymlinkIcon: FileIconComponent;
21
+ export declare const ArchiveFileIcon: FileIconComponent;
22
+ export declare const CodeFileIcon: FileIconComponent;
21
23
  export declare const JavaScriptFileIcon: FileIconComponent;
22
24
  export declare const TypeScriptFileIcon: FileIconComponent;
23
25
  export declare const ShellScriptFileIcon: FileIconComponent;
24
- export declare const ImageFileIcon: (props: FileIconProps) => JSX.Element;
25
- export declare const VideoFileIcon: (props: FileIconProps) => JSX.Element;
26
- export declare const AudioFileIcon: (props: FileIconProps) => JSX.Element;
27
- export declare const DocumentFileIcon: (props: FileIconProps) => JSX.Element;
28
- export declare const ConfigFileIcon: (props: FileIconProps) => JSX.Element;
29
- export declare const StyleFileIcon: (props: FileIconProps) => JSX.Element;
26
+ export declare const ImageFileIcon: FileIconComponent;
27
+ export declare const VideoFileIcon: FileIconComponent;
28
+ export declare const AudioFileIcon: FileIconComponent;
29
+ export declare const DocumentFileIcon: FileIconComponent;
30
+ export declare const ConfigFileIcon: FileIconComponent;
31
+ export declare const StyleFileIcon: FileIconComponent;
30
32
  export declare function getFileIcon(extension?: string): FileIconComponent;
31
33
  export declare function resolveFileItemIcon(item: ResolvableFileIcon, options?: ResolveFileItemIconOptions): FileItemIconRenderer;
32
- export declare function FileItemIcon(props: {
34
+ export declare function FileItemIcon(props: FileIconProps & {
33
35
  item: ResolvableFileIcon;
34
- class?: string;
35
36
  open?: boolean;
36
37
  }): JSX.Element;
37
38
  export {};