@floegence/floe-webapp-core 0.35.34 → 0.35.35

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,100 +1,141 @@
1
- import { addEventListener as le, use as K, insert as w, createComponent as C, effect as Y, setStyleProperty as X, className as G, template as b, spread as ce, mergeProps as se, memo as de, delegateEvents as ge } from "solid-js/web";
2
- import { createSignal as W, createMemo as j, createEffect as ue, Show as A, For as q, untrack as me, onCleanup as fe } from "solid-js";
3
- import { cn as $ } from "../../utils/cn.js";
1
+ import { addEventListener as se, use as U, insert as M, createComponent as D, effect as z, setStyleProperty as B, className as p, template as y, spread as de, mergeProps as ue, memo as ge, delegateEvents as me } from "solid-js/web";
2
+ import { createSignal as te, createMemo as Q, createEffect as ee, onCleanup as ne, Show as O, For as re, untrack as fe } from "solid-js";
3
+ import { cn as A } from "../../utils/cn.js";
4
4
  import { useResizeObserver as he } from "../../hooks/useResizeObserver.js";
5
5
  import { useVirtualWindow as ve } from "../../hooks/useVirtualWindow.js";
6
- import { useFileBrowser as J } from "./FileBrowserContext.js";
6
+ import { useFileBrowser as ie } from "./FileBrowserContext.js";
7
7
  import { useFileBrowserDrag as xe } from "../../context/FileBrowserDragContext.js";
8
- import { FileItemIcon as Ce } from "./FileIcons.js";
8
+ import { FileItemIcon as Ie } from "./FileIcons.js";
9
9
  import { createLongPressContextMenuHandlers as be } from "./longPressContextMenu.js";
10
- import { fileBrowserTouchTargetAttrs as De } from "./touchInteractionGuard.js";
11
- import { createItemContextMenuEvent as Ie } from "./contextMenuEvent.js";
12
- var we = /* @__PURE__ */ b('<mark class="bg-warning/40 text-inherit rounded-sm">'), ye = /* @__PURE__ */ b('<div class="grid gap-2">'), Pe = /* @__PURE__ */ b('<div><div class=p-3><div class="w-full h-0"aria-hidden=true>'), Me = /* @__PURE__ */ b('<span>No files matching "<!>"'), Se = /* @__PURE__ */ b('<button type=button class="px-2 py-1 rounded bg-muted hover:bg-muted/80 transition-colors">Clear Filter'), _e = /* @__PURE__ */ b('<div class="flex flex-col items-center justify-center h-32 gap-2 text-xs text-muted-foreground">'), Te = /* @__PURE__ */ b("<span>This folder is empty"), Ee = /* @__PURE__ */ b('<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">'), Le = /* @__PURE__ */ b("<button type=button><div></div><span></span><div>");
13
- function $e(e) {
14
- const n = j(() => {
10
+ import { fileBrowserTouchTargetAttrs as we } from "./touchInteractionGuard.js";
11
+ import { createItemContextMenuEvent as Ce } from "./contextMenuEvent.js";
12
+ var De = /* @__PURE__ */ y('<mark class="bg-warning/40 text-inherit rounded-sm">'), ye = /* @__PURE__ */ y('<div class="grid gap-2">'), Te = /* @__PURE__ */ y('<div><div class=p-3><div class="w-full h-0"aria-hidden=true>'), Me = /* @__PURE__ */ y('<span>No files matching "<!>"'), Pe = /* @__PURE__ */ y('<button type=button class="px-2 py-1 rounded bg-muted hover:bg-muted/80 transition-colors">Clear Filter'), Se = /* @__PURE__ */ y('<div class="flex flex-col items-center justify-center h-32 gap-2 text-xs text-muted-foreground">'), _e = /* @__PURE__ */ y("<span>This folder is empty"), Fe = /* @__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">'), Ee = /* @__PURE__ */ y("<button type=button><div></div><span></span><div>");
13
+ function ke(e) {
14
+ const r = Q(() => {
15
15
  if (!e.match || e.match.matchedIndices.length === 0)
16
16
  return [{
17
17
  text: e.name,
18
18
  highlight: !1
19
19
  }];
20
- const o = [], D = new Set(e.match.matchedIndices);
21
- let h = "", d = !1;
22
- for (let l = 0; l < e.name.length; l++) {
23
- const f = D.has(l);
24
- l === 0 ? (d = f, h = e.name[l]) : f === d ? h += e.name[l] : (o.push({
25
- text: h,
26
- highlight: d
27
- }), h = e.name[l], d = f);
20
+ const l = [], T = new Set(e.match.matchedIndices);
21
+ let w = "", g = !1;
22
+ for (let s = 0; s < e.name.length; s++) {
23
+ const h = T.has(s);
24
+ s === 0 ? (g = h, w = e.name[s]) : h === g ? w += e.name[s] : (l.push({
25
+ text: w,
26
+ highlight: g
27
+ }), w = e.name[s], g = h);
28
28
  }
29
- return h && o.push({
30
- text: h,
31
- highlight: d
32
- }), o;
29
+ return w && l.push({
30
+ text: w,
31
+ highlight: g
32
+ }), l;
33
33
  });
34
- return C(q, {
34
+ return D(re, {
35
35
  get each() {
36
- return n();
36
+ return r();
37
37
  },
38
- children: (o) => C(A, {
38
+ children: (l) => D(O, {
39
39
  get when() {
40
- return o.highlight;
40
+ return l.highlight;
41
41
  },
42
42
  get fallback() {
43
- return de(() => o.text);
43
+ return ge(() => l.text);
44
44
  },
45
45
  get children() {
46
- var D = we();
47
- return w(D, () => o.text), D;
46
+ var T = De();
47
+ return M(T, () => l.text), T;
48
48
  }
49
49
  })
50
50
  });
51
51
  }
52
- function je(e) {
53
- const n = J(), o = xe(), D = () => (e.enableDragDrop ?? !0) && !!o, h = () => e.instanceId ?? "default", d = 112, l = 8, f = 180, y = 2, E = 6, [g, O] = W(null), p = he(g), v = j(() => {
54
- const s = p()?.width ?? 0;
55
- if (s <= 0) return y;
56
- const x = Math.floor((s + l) / (f + l));
57
- return Math.max(y, Math.min(E, x));
58
- }), k = () => d + l, c = ve({
59
- count: () => Math.ceil(n.currentFiles().length / Math.max(1, v())),
60
- itemSize: k,
52
+ function Ye(e) {
53
+ const r = ie(), l = xe(), T = () => (e.enableDragDrop ?? !0) && !!l, w = () => e.instanceId ?? "default", g = 112, s = 8, h = 180, P = 2, L = 6, [m, N] = te(null), Y = he(m), v = Q(() => {
54
+ const n = Y()?.width ?? 0;
55
+ if (n <= 0) return P;
56
+ const d = Math.floor((n + s) / (h + s));
57
+ return Math.max(P, Math.min(L, d));
58
+ }), F = () => g + s, c = ve({
59
+ count: () => Math.ceil(r.currentFiles().length / Math.max(1, v())),
60
+ itemSize: F,
61
61
  overscan: 2
62
- }), N = () => c.range().start * v(), L = () => Math.min(n.currentFiles().length, c.range().end * v()), F = j(() => n.currentFiles().slice(N(), L()));
63
- let T = null, P = y;
64
- return ue(() => {
65
- const s = v();
66
- if (!T) {
67
- P = s;
62
+ }), j = () => c.range().start * v(), $ = () => Math.min(r.currentFiles().length, c.range().end * v()), R = Q(() => r.currentFiles().slice(j(), $())), E = /* @__PURE__ */ new Map(), H = (n, d) => {
63
+ if (d) {
64
+ E.set(n, d);
65
+ return;
66
+ }
67
+ E.delete(n);
68
+ };
69
+ let x = null, k = P, I = 0;
70
+ ee(() => {
71
+ const n = v();
72
+ if (!x) {
73
+ k = n;
74
+ return;
75
+ }
76
+ if (n === k) return;
77
+ const d = F(), a = Math.floor(x.scrollTop / Math.max(1, d)) * Math.max(1, k), i = Math.floor(a / Math.max(1, n));
78
+ x.scrollTop = i * d, c.onScroll(), k = n;
79
+ });
80
+ const X = (n) => {
81
+ if (!x) return;
82
+ const b = Math.floor(n / Math.max(1, v())) * F(), a = b + F(), i = x.scrollTop, C = i + x.clientHeight;
83
+ if (b < i) {
84
+ x.scrollTop = b, c.onScroll();
85
+ return;
86
+ }
87
+ a > C && (x.scrollTop = Math.max(0, a - x.clientHeight), c.onScroll());
88
+ };
89
+ return ee(() => {
90
+ const n = r.revealRequest(), d = r.currentFiles();
91
+ if (v(), R(), !n) return;
92
+ const b = d.findIndex((C) => C.id === n.targetId);
93
+ if (b < 0) return;
94
+ if (!E.get(n.targetId)) {
95
+ X(b);
68
96
  return;
69
97
  }
70
- if (s === P) return;
71
- const x = k(), a = Math.floor(T.scrollTop / Math.max(1, x)) * Math.max(1, P), r = Math.floor(a / Math.max(1, s));
72
- T.scrollTop = r * x, c.onScroll(), P = s;
98
+ typeof cancelAnimationFrame == "function" && I && (cancelAnimationFrame(I), I = 0);
99
+ const i = () => {
100
+ r.revealRequest()?.requestId === n.requestId && (E.get(n.targetId)?.scrollIntoView({
101
+ block: "nearest",
102
+ inline: "nearest"
103
+ }), r.selectItem(n.targetId, !1), r.consumeRevealRequest(n.requestId));
104
+ };
105
+ if (typeof requestAnimationFrame == "function") {
106
+ I = requestAnimationFrame(() => {
107
+ I = 0, i();
108
+ });
109
+ return;
110
+ }
111
+ queueMicrotask(i);
112
+ }), ne(() => {
113
+ typeof cancelAnimationFrame == "function" && I && cancelAnimationFrame(I);
73
114
  }), (() => {
74
- var s = Pe(), x = s.firstChild, M = x.firstChild;
75
- return le(s, "scroll", c.onScroll), K((a) => {
76
- T = a, c.scrollRef(a), n.setScrollContainer(a);
77
- }, s), K((a) => O(a), M), w(x, C(A, {
115
+ var n = Te(), d = n.firstChild, b = d.firstChild;
116
+ return se(n, "scroll", c.onScroll), U((a) => {
117
+ x = a, c.scrollRef(a), r.setScrollContainer(a);
118
+ }, n), U((a) => N(a), b), M(d, D(O, {
78
119
  get when() {
79
- return n.currentFiles().length > 0;
120
+ return r.currentFiles().length > 0;
80
121
  },
81
122
  get fallback() {
82
123
  return (() => {
83
- var a = _e();
84
- return w(a, C(A, {
124
+ var a = Se();
125
+ return M(a, D(O, {
85
126
  get when() {
86
- return n.filterQueryApplied().trim();
127
+ return r.filterQueryApplied().trim();
87
128
  },
88
129
  get fallback() {
89
- return Te();
130
+ return _e();
90
131
  },
91
132
  get children() {
92
133
  return [(() => {
93
- var r = Me(), S = r.firstChild, I = S.nextSibling;
94
- return I.nextSibling, w(r, () => n.filterQueryApplied(), I), r;
134
+ var i = Me(), C = i.firstChild, S = C.nextSibling;
135
+ return S.nextSibling, M(i, () => r.filterQueryApplied(), S), i;
95
136
  })(), (() => {
96
- var r = Se();
97
- return r.$$click = () => n.setFilterQuery(""), r;
137
+ var i = Pe();
138
+ return i.$$click = () => r.setFilterQuery(""), i;
98
139
  })()];
99
140
  }
100
141
  })), a;
@@ -102,183 +143,193 @@ function je(e) {
102
143
  },
103
144
  get children() {
104
145
  var a = ye();
105
- return w(a, C(q, {
146
+ return M(a, D(re, {
106
147
  get each() {
107
- return F();
148
+ return R();
108
149
  },
109
- children: (r) => C(ke, {
110
- item: r,
150
+ children: (i) => D(Le, {
151
+ item: i,
111
152
  get instanceId() {
112
- return h();
153
+ return w();
113
154
  },
114
155
  get enableDragDrop() {
115
- return D();
156
+ return T();
116
157
  },
117
- dragContext: o
158
+ dragContext: l,
159
+ registerTile: H
118
160
  })
119
- })), Y((r) => {
120
- var S = `repeat(${v()}, minmax(0, 1fr))`, I = `${c.paddingTop()}px`, H = `${c.paddingBottom()}px`;
121
- return S !== r.e && X(a, "grid-template-columns", r.e = S), I !== r.t && X(a, "padding-top", r.t = I), H !== r.a && X(a, "padding-bottom", r.a = H), r;
161
+ })), z((i) => {
162
+ var C = `repeat(${v()}, minmax(0, 1fr))`, S = `${c.paddingTop()}px`, q = `${c.paddingBottom()}px`;
163
+ return C !== i.e && B(a, "grid-template-columns", i.e = C), S !== i.t && B(a, "padding-top", i.t = S), q !== i.a && B(a, "padding-bottom", i.a = q), i;
122
164
  }, {
123
165
  e: void 0,
124
166
  t: void 0,
125
167
  a: void 0
126
168
  }), a;
127
169
  }
128
- }), null), Y(() => G(s, $("h-full min-h-0 overflow-auto", e.class))), s;
170
+ }), null), z(() => p(n, A("h-full min-h-0 overflow-auto", e.class))), n;
129
171
  })();
130
172
  }
131
- function ke(e) {
132
- const n = J(), o = () => n.isSelected(e.item.id), D = () => n.getFilterMatchForId(e.item.id), h = me(() => e.item), d = be(n, h, {
173
+ function Le(e) {
174
+ const r = ie(), l = () => r.isSelected(e.item.id), T = () => r.getFilterMatchForId(e.item.id), w = fe(() => e.item), g = be(r, w, {
133
175
  source: "grid"
134
176
  });
135
- let l, f = null, y = 0, E = 0, g = !1;
136
- const O = 5, p = 500;
177
+ let s, h = null, P = 0, L = 0, m = !1;
178
+ const N = 5, Y = 500;
137
179
  let v = null;
138
- const [k, B] = W(!1), c = () => l === "touch" || l === "pen", N = () => e.item.type === "folder", L = () => N() && e.enableDragDrop && e.dragContext, F = () => {
139
- if (!L() || !e.dragContext) return !1;
180
+ const [F, V] = te(!1), c = () => s === "touch" || s === "pen", j = () => e.item.type === "folder", $ = () => j() && e.enableDragDrop && e.dragContext, R = () => {
181
+ if (!$() || !e.dragContext) return !1;
140
182
  const t = e.dragContext.dragState();
141
183
  return t.isDragging ? e.dragContext.canDropOn(t.draggedItems, e.item.path, e.item, e.instanceId) : !1;
142
- }, T = () => {
184
+ }, E = () => {
143
185
  if (!e.dragContext) return !1;
144
186
  const t = e.dragContext.dragState();
145
- return t.isDragging ? t.draggedItems.some((i) => i.item.id === e.item.id) : !1;
146
- }, P = () => {
187
+ return t.isDragging ? t.draggedItems.some((o) => o.item.id === e.item.id) : !1;
188
+ }, H = () => {
147
189
  v !== null && (clearTimeout(v), v = null);
148
- }, s = () => {
149
- typeof document > "u" || (document.removeEventListener("pointermove", r, !0), document.removeEventListener("pointerup", S, !0), document.removeEventListener("pointercancel", I, !0));
150
190
  }, x = () => {
151
- typeof document > "u" || (document.addEventListener("pointermove", r, !0), document.addEventListener("pointerup", S, !0), document.addEventListener("pointercancel", I, !0));
152
- }, M = (t) => {
153
- P(), s(), g && e.dragContext && e.dragContext.endDrag(t), f = null, g = !1;
191
+ typeof document > "u" || (document.removeEventListener("pointermove", n, !0), document.removeEventListener("pointerup", d, !0), document.removeEventListener("pointercancel", b, !0));
192
+ }, k = () => {
193
+ typeof document > "u" || (document.addEventListener("pointermove", n, !0), document.addEventListener("pointerup", d, !0), document.addEventListener("pointercancel", b, !0));
194
+ }, I = (t) => {
195
+ H(), x(), m && e.dragContext && e.dragContext.endDrag(t), h = null, m = !1;
154
196
  };
155
- fe(() => {
156
- M(!1);
197
+ ne(() => {
198
+ e.registerTile(e.item.id, null), I(!1);
157
199
  });
158
- const a = (t, i) => {
159
- if (!e.enableDragDrop || !e.dragContext || g) return;
160
- g = !0, o() || n.selectItem(e.item.id, !1);
161
- const u = n.getSelectedItemsList(), m = (u.length > 0 && o() ? u : [e.item]).map((R) => ({
162
- item: R,
200
+ const X = (t, o) => {
201
+ if (!e.enableDragDrop || !e.dragContext || m) return;
202
+ m = !0, l() || r.selectItem(e.item.id, !1);
203
+ const f = r.getSelectedItemsList(), u = (f.length > 0 && l() ? f : [e.item]).map((G) => ({
204
+ item: G,
163
205
  sourceInstanceId: e.instanceId,
164
- sourcePath: n.currentPath()
206
+ sourcePath: r.currentPath()
165
207
  }));
166
208
  if (c() && "vibrate" in navigator)
167
209
  try {
168
210
  navigator.vibrate(50);
169
211
  } catch {
170
212
  }
171
- e.dragContext.startDrag(m, t, i);
172
- }, r = (t) => {
173
- if (f !== t.pointerId) return;
174
- const i = t.clientX - y, u = t.clientY - E, _ = Math.sqrt(i * i + u * u);
175
- if (c() && !g && _ > 10) {
176
- M(!1);
213
+ e.dragContext.startDrag(u, t, o);
214
+ }, n = (t) => {
215
+ if (h !== t.pointerId) return;
216
+ const o = t.clientX - P, f = t.clientY - L, _ = Math.sqrt(o * o + f * f);
217
+ if (c() && !m && _ > 10) {
218
+ I(!1);
177
219
  return;
178
220
  }
179
- !c() && !g && _ > O && a(t.clientX, t.clientY), g && e.dragContext && e.dragContext.updateDrag(t.clientX, t.clientY);
180
- }, S = (t) => {
181
- f === t.pointerId && (d.onPointerUp(), M(!0));
182
- }, I = (t) => {
183
- f === t.pointerId && (d.onPointerCancel(), M(!1));
184
- }, H = (t) => {
185
- l = t.pointerType, d.onPointerDown(t), !(t.pointerType === "mouse" && t.button !== 0) && (!e.enableDragDrop || !e.dragContext || (f = t.pointerId, y = t.clientX, E = t.clientY, g = !1, x(), c() && (P(), v = setTimeout(() => {
186
- f !== null && !g && a(y, E);
187
- }, p))));
188
- }, Z = (t) => {
189
- l = t.pointerType, d.onPointerMove(t);
190
- }, ee = (t) => {
191
- if (!L() || !e.dragContext) return;
192
- const i = e.dragContext.dragState();
193
- if (!i.isDragging) return;
194
- B(!0);
195
- const u = e.dragContext.canDropOn(i.draggedItems, e.item.path, e.item, e.instanceId), m = t.currentTarget?.getBoundingClientRect() ?? null;
221
+ !c() && !m && _ > N && X(t.clientX, t.clientY), m && e.dragContext && e.dragContext.updateDrag(t.clientX, t.clientY);
222
+ }, d = (t) => {
223
+ h === t.pointerId && (g.onPointerUp(), I(!0));
224
+ }, b = (t) => {
225
+ h === t.pointerId && (g.onPointerCancel(), I(!1));
226
+ }, a = (t) => {
227
+ s = t.pointerType, g.onPointerDown(t), !(t.pointerType === "mouse" && t.button !== 0) && (!e.enableDragDrop || !e.dragContext || (h = t.pointerId, P = t.clientX, L = t.clientY, m = !1, k(), c() && (H(), v = setTimeout(() => {
228
+ h !== null && !m && X(P, L);
229
+ }, Y))));
230
+ }, i = (t) => {
231
+ s = t.pointerType, g.onPointerMove(t);
232
+ }, C = (t) => {
233
+ if (!$() || !e.dragContext) return;
234
+ const o = e.dragContext.dragState();
235
+ if (!o.isDragging) return;
236
+ V(!0);
237
+ const f = e.dragContext.canDropOn(o.draggedItems, e.item.path, e.item, e.instanceId), u = t.currentTarget?.getBoundingClientRect() ?? null;
196
238
  e.dragContext.setDropTarget({
197
239
  instanceId: e.instanceId,
198
240
  targetPath: e.item.path,
199
241
  targetItem: e.item
200
- }, u, m);
201
- }, te = (t) => {
242
+ }, f, u);
243
+ }, S = (t) => {
202
244
  if (!e.dragContext) return;
203
- B(!1);
204
- const i = e.dragContext.dragState();
205
- i.isDragging && i.dropTarget?.targetPath === e.item.path && e.dragContext.setDropTarget(null, !1);
206
- }, ne = (t) => {
207
- if (g) {
208
- g = !1;
245
+ V(!1);
246
+ const o = e.dragContext.dragState();
247
+ o.isDragging && o.dropTarget?.targetPath === e.item.path && e.dragContext.setDropTarget(null, !1);
248
+ }, q = (t) => {
249
+ if (m) {
250
+ m = !1;
209
251
  return;
210
252
  }
211
- if (!d.consumeClickSuppression(t)) {
253
+ if (!g.consumeClickSuppression(t)) {
212
254
  if (c()) {
213
- n.openItem(e.item);
255
+ r.openItem(e.item);
214
256
  return;
215
257
  }
216
- n.selectItem(e.item.id, t.metaKey || t.ctrlKey);
258
+ r.selectItem(e.item.id, t.metaKey || t.ctrlKey);
217
259
  }
218
- }, re = () => {
219
- c() || n.openItem(e.item);
220
- }, ie = (t) => {
260
+ }, ae = () => {
261
+ c() || r.openItem(e.item);
262
+ }, oe = (t) => {
221
263
  if (t.preventDefault(), t.stopPropagation(), c()) return;
222
- o() || n.selectItem(e.item.id, !1);
223
- const i = n.getSelectedItemsList(), u = i.length > 0 ? i : [e.item];
224
- n.showContextMenu(Ie({
264
+ l() || r.selectItem(e.item.id, !1);
265
+ const o = r.getSelectedItemsList(), f = o.length > 0 ? o : [e.item];
266
+ r.showContextMenu(Ce({
225
267
  x: t.clientX,
226
268
  y: t.clientY,
227
269
  triggerItem: e.item,
228
- items: u,
270
+ items: f,
229
271
  source: "grid"
230
272
  }));
231
- }, ae = () => e.dragContext?.dragState(), oe = () => ae()?.isDragging ?? !1, U = () => k() && oe() && L();
273
+ }, le = () => e.dragContext?.dragState(), ce = () => le()?.isDragging ?? !1, K = () => F() && ce() && $();
232
274
  return (() => {
233
- var t = Le(), i = t.firstChild, u = i.nextSibling, _ = u.nextSibling;
234
- return ce(t, se(De, {
275
+ var t = Ee(), o = t.firstChild, f = o.nextSibling, _ = f.nextSibling;
276
+ return U((u) => {
277
+ e.registerTile(e.item.id, u);
278
+ }, t), de(t, ue({
279
+ get "data-file-browser-item-id"() {
280
+ return e.item.id;
281
+ },
282
+ get "data-file-browser-item-path"() {
283
+ return e.item.path;
284
+ }
285
+ }, we, {
235
286
  get title() {
236
287
  return e.item.name;
237
288
  },
238
- onClick: ne,
239
- onDblClick: re,
240
- onContextMenu: ie,
241
- onPointerDown: H,
242
- onPointerMove: Z,
243
- onPointerEnter: ee,
244
- onPointerLeave: te,
289
+ onClick: q,
290
+ onDblClick: ae,
291
+ onContextMenu: oe,
292
+ onPointerDown: a,
293
+ onPointerMove: i,
294
+ onPointerEnter: C,
295
+ onPointerLeave: S,
245
296
  get class() {
246
- return $(
297
+ return A(
247
298
  "group relative flex flex-col items-center gap-2 p-3 rounded-lg cursor-pointer h-28",
248
299
  "transition-all duration-150 ease-out",
249
300
  "hover:bg-accent/50 hover:scale-[1.02]",
250
301
  "focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
251
302
  "active:scale-[0.98]",
252
- o() && "bg-accent ring-2 ring-primary/50",
303
+ l() && "bg-accent ring-2 ring-primary/50",
253
304
  // Drag state styling - being dragged items become translucent and shrink
254
- T() && "opacity-40 scale-90",
305
+ E() && "opacity-40 scale-90",
255
306
  // Drop target styling - enhanced visual feedback for folders
256
- U() && F() && ["bg-primary/15 ring-2 ring-primary/60", "scale-105 shadow-lg shadow-primary/15"],
257
- U() && !F() && ["bg-destructive/10 ring-2 ring-dashed ring-destructive/50"]
307
+ K() && R() && ["bg-primary/15 ring-2 ring-primary/60", "scale-105 shadow-lg shadow-primary/15"],
308
+ K() && !R() && ["bg-destructive/10 ring-2 ring-dashed ring-destructive/50"]
258
309
  );
259
310
  }
260
- }), !1, !0), w(t, C(A, {
311
+ }), !1, !0), M(t, D(O, {
261
312
  get when() {
262
- return o();
313
+ return l();
263
314
  },
264
315
  get children() {
265
- return Ee();
316
+ return Fe();
266
317
  }
267
- }), i), w(i, C(Ce, {
318
+ }), o), M(o, D(Ie, {
268
319
  get item() {
269
320
  return e.item;
270
321
  },
271
322
  class: "w-8 h-8"
272
- })), w(u, C($e, {
323
+ })), M(f, D(ke, {
273
324
  get name() {
274
325
  return e.item.name;
275
326
  },
276
327
  get match() {
277
- return D();
328
+ return T();
278
329
  }
279
- })), Y((m) => {
280
- var R = $("w-12 h-12 flex items-center justify-center rounded-lg", "transition-transform duration-200", "group-hover:scale-110", e.item.type === "folder" ? "bg-warning/10" : "bg-muted/50"), V = $("block w-full min-w-0 truncate px-1 text-xs text-center", "transition-colors duration-150", o() && "font-medium"), z = $("absolute inset-0 rounded-lg opacity-0 transition-opacity duration-300", "group-hover:opacity-100", "pointer-events-none"), Q = 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%)";
281
- return R !== m.e && G(i, m.e = R), V !== m.t && G(u, m.t = V), z !== m.a && G(_, m.a = z), Q !== m.o && X(_, "background", m.o = Q), m;
330
+ })), z((u) => {
331
+ var G = A("w-12 h-12 flex items-center justify-center rounded-lg", "transition-transform duration-200", "group-hover:scale-110", e.item.type === "folder" ? "bg-warning/10" : "bg-muted/50"), W = A("block w-full min-w-0 truncate px-1 text-xs text-center", "transition-colors duration-150", l() && "font-medium"), J = A("absolute inset-0 rounded-lg opacity-0 transition-opacity duration-300", "group-hover:opacity-100", "pointer-events-none"), Z = 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%)";
332
+ return G !== u.e && p(o, u.e = G), W !== u.t && p(f, u.t = W), J !== u.a && p(_, u.a = J), Z !== u.o && B(_, "background", u.o = Z), u;
282
333
  }, {
283
334
  e: void 0,
284
335
  t: void 0,
@@ -287,7 +338,7 @@ function ke(e) {
287
338
  }), t;
288
339
  })();
289
340
  }
290
- ge(["click"]);
341
+ me(["click"]);
291
342
  export {
292
- je as FileGridView
343
+ Ye as FileGridView
293
344
  };