@floegence/floe-webapp-core 0.3.0 → 0.3.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.
package/dist/index41.js CHANGED
@@ -1,131 +1,199 @@
1
- import { delegateEvents as M, template as v, insert as s, createComponent as a, effect as S, className as k, Dynamic as z, memo as T, setStyleProperty as L } from "solid-js/web";
2
- import { Show as A, For as B, untrack as K } from "solid-js";
3
- import { cn as g } from "./index67.js";
4
- import { useFileBrowser as F } from "./index39.js";
5
- import { FolderIcon as U, getFileIcon as j } from "./index46.js";
6
- import { ChevronDown as E } from "./index32.js";
7
- import { createLongPressContextMenuHandlers as N } from "./index81.js";
8
- var H = /* @__PURE__ */ v("<span>"), V = /* @__PURE__ */ v('<div><div class="flex items-center border-b border-border text-[11px] text-muted-foreground font-medium"><button type=button class="group flex items-center flex-1 min-w-0 px-3 py-2 cursor-pointer hover:bg-muted/50 transition-colors">Name</button><button type=button class="group hidden sm:flex items-center w-32 px-3 py-2 cursor-pointer hover:bg-muted/50 transition-colors">Modified</button><button type=button class="group hidden md:flex items-center w-24 px-3 py-2 text-right justify-end cursor-pointer hover:bg-muted/50 transition-colors">Size</button></div><div class="flex-1 min-h-0 overflow-auto">'), X = /* @__PURE__ */ v('<div class="flex items-center justify-center h-32 text-xs text-muted-foreground">This folder is empty'), Y = /* @__PURE__ */ v('<button type=button style=animation-fill-mode:backwards><div class="flex items-center gap-2 flex-1 min-w-0 px-3 py-1.5"><span class="flex-shrink-0 w-4 h-4"></span><span class=truncate></span></div><div class="hidden sm:block w-32 px-3 py-1.5 text-muted-foreground truncate"></div><div class="hidden md:block w-24 px-3 py-1.5 text-right text-muted-foreground">');
9
- function ee(n) {
10
- const i = F(), u = (t) => {
11
- const o = i.sortConfig();
1
+ import { delegateEvents as L, template as h, insert as s, createComponent as a, effect as S, className as F, Dynamic as A, memo as D, setStyleProperty as B } from "solid-js/web";
2
+ import { Show as I, For as T, untrack as H, createMemo as N } from "solid-js";
3
+ import { cn as y } from "./index67.js";
4
+ import { useFileBrowser as z } from "./index39.js";
5
+ import { FolderIcon as K, getFileIcon as Q } from "./index46.js";
6
+ import { ChevronDown as U } from "./index32.js";
7
+ import { createLongPressContextMenuHandlers as j } from "./index81.js";
8
+ var E = /* @__PURE__ */ h("<span class=truncate>"), V = /* @__PURE__ */ h('<mark class="bg-warning/40 text-inherit rounded-sm">'), X = /* @__PURE__ */ h("<span>"), Y = /* @__PURE__ */ h('<div><div class="flex items-center border-b border-border text-[11px] text-muted-foreground font-medium"><button type=button class="group flex items-center flex-1 min-w-0 px-3 py-2 cursor-pointer hover:bg-muted/50 transition-colors">Name</button><button type=button class="group hidden sm:flex items-center w-32 px-3 py-2 cursor-pointer hover:bg-muted/50 transition-colors">Modified</button><button type=button class="group hidden md:flex items-center w-24 px-3 py-2 text-right justify-end cursor-pointer hover:bg-muted/50 transition-colors">Size</button></div><div class="flex-1 min-h-0 overflow-auto">'), q = /* @__PURE__ */ h('<span>No files matching "<!>"'), G = /* @__PURE__ */ h('<button type=button class="px-2 py-1 rounded bg-muted hover:bg-muted/80 transition-colors">Clear Filter'), J = /* @__PURE__ */ h('<div class="flex flex-col items-center justify-center h-32 gap-2 text-xs text-muted-foreground">'), O = /* @__PURE__ */ h("<span>This folder is empty"), R = /* @__PURE__ */ h('<button type=button style=animation-fill-mode:backwards><div class="flex items-center gap-2 flex-1 min-w-0 px-3 py-1.5"><span class="flex-shrink-0 w-4 h-4"></span></div><div class="hidden sm:block w-32 px-3 py-1.5 text-muted-foreground truncate"></div><div class="hidden md:block w-24 px-3 py-1.5 text-right text-muted-foreground">');
9
+ function W(n) {
10
+ const i = N(() => {
11
+ if (!n.match || n.match.matchedIndices.length === 0)
12
+ return [{
13
+ text: n.name,
14
+ highlight: !1
15
+ }];
16
+ const l = [], d = new Set(n.match.matchedIndices);
17
+ let c = "", o = !1;
18
+ for (let e = 0; e < n.name.length; e++) {
19
+ const r = d.has(e);
20
+ e === 0 ? (o = r, c = n.name[e]) : r === o ? c += n.name[e] : (l.push({
21
+ text: c,
22
+ highlight: o
23
+ }), c = n.name[e], o = r);
24
+ }
25
+ return c && l.push({
26
+ text: c,
27
+ highlight: o
28
+ }), l;
29
+ });
30
+ return (() => {
31
+ var l = E();
32
+ return s(l, a(T, {
33
+ get each() {
34
+ return i();
35
+ },
36
+ children: (d) => a(I, {
37
+ get when() {
38
+ return d.highlight;
39
+ },
40
+ get fallback() {
41
+ return D(() => d.text);
42
+ },
43
+ get children() {
44
+ var c = V();
45
+ return s(c, () => d.text), c;
46
+ }
47
+ })
48
+ })), l;
49
+ })();
50
+ }
51
+ function ce(n) {
52
+ const i = z(), l = (e) => {
53
+ const r = i.sortConfig();
12
54
  i.setSortConfig({
13
- field: t,
14
- direction: o.field === t && o.direction === "asc" ? "desc" : "asc"
55
+ field: e,
56
+ direction: r.field === e && r.direction === "asc" ? "desc" : "asc"
15
57
  });
16
- }, $ = (t) => t === void 0 ? "-" : t < 1024 ? `${t} B` : t < 1024 * 1024 ? `${(t / 1024).toFixed(1)} KB` : `${(t / (1024 * 1024)).toFixed(1)} MB`, d = (t) => t ? t.toLocaleDateString("en-US", {
58
+ }, d = (e) => e === void 0 ? "-" : e < 1024 ? `${e} B` : e < 1024 * 1024 ? `${(e / 1024).toFixed(1)} KB` : `${(e / (1024 * 1024)).toFixed(1)} MB`, c = (e) => e ? e.toLocaleDateString("en-US", {
17
59
  month: "short",
18
60
  day: "numeric",
19
61
  year: "numeric"
20
- }) : "-", r = (t) => {
21
- const o = () => i.sortConfig(), c = () => o().field === t.field;
62
+ }) : "-", o = (e) => {
63
+ const r = () => i.sortConfig(), f = () => r().field === e.field;
22
64
  return (() => {
23
- var l = H();
24
- return s(l, a(E, {
65
+ var u = X();
66
+ return s(u, a(U, {
25
67
  get class() {
26
- return g("w-3 h-3 transition-transform duration-150", c() && o().direction === "asc" && "rotate-180");
68
+ return y("w-3 h-3 transition-transform duration-150", f() && r().direction === "asc" && "rotate-180");
27
69
  }
28
- })), S(() => k(l, g("ml-1 transition-all duration-150", c() ? "opacity-100" : "opacity-0 group-hover:opacity-40"))), l;
70
+ })), S(() => F(u, y("ml-1 transition-all duration-150", f() ? "opacity-100" : "opacity-0 group-hover:opacity-40"))), u;
29
71
  })();
30
72
  };
31
73
  return (() => {
32
- var t = V(), o = t.firstChild, c = o.firstChild;
33
- c.firstChild;
34
- var l = c.nextSibling;
35
- l.firstChild;
36
- var f = l.nextSibling;
74
+ var e = Y(), r = e.firstChild, f = r.firstChild;
37
75
  f.firstChild;
38
- var b = o.nextSibling;
39
- return c.$$click = () => u("name"), s(c, a(r, {
76
+ var u = f.nextSibling;
77
+ u.firstChild;
78
+ var v = u.nextSibling;
79
+ v.firstChild;
80
+ var _ = r.nextSibling;
81
+ return f.$$click = () => l("name"), s(f, a(o, {
40
82
  field: "name"
41
- }), null), l.$$click = () => u("modifiedAt"), s(l, a(r, {
83
+ }), null), u.$$click = () => l("modifiedAt"), s(u, a(o, {
42
84
  field: "modifiedAt"
43
- }), null), f.$$click = () => u("size"), s(f, a(r, {
85
+ }), null), v.$$click = () => l("size"), s(v, a(o, {
44
86
  field: "size"
45
- }), null), s(b, a(A, {
87
+ }), null), s(_, a(I, {
46
88
  get when() {
47
89
  return i.currentFiles().length > 0;
48
90
  },
49
91
  get fallback() {
50
- return X();
92
+ return (() => {
93
+ var x = J();
94
+ return s(x, a(I, {
95
+ get when() {
96
+ return i.filterQuery().trim();
97
+ },
98
+ get fallback() {
99
+ return O();
100
+ },
101
+ get children() {
102
+ return [(() => {
103
+ var m = q(), w = m.firstChild, p = w.nextSibling;
104
+ return p.nextSibling, s(m, () => i.filterQuery(), p), m;
105
+ })(), (() => {
106
+ var m = G();
107
+ return m.$$click = () => i.setFilterQuery(""), m;
108
+ })()];
109
+ }
110
+ })), x;
111
+ })();
51
112
  },
52
113
  get children() {
53
- return a(B, {
114
+ return a(T, {
54
115
  get each() {
55
116
  return i.currentFiles();
56
117
  },
57
- children: (y, w) => a(q, {
58
- item: y,
59
- formatSize: $,
60
- formatDate: d,
118
+ children: (x, m) => a(Z, {
119
+ item: x,
120
+ formatSize: d,
121
+ formatDate: c,
61
122
  get index() {
62
- return w();
123
+ return m();
63
124
  }
64
125
  })
65
126
  });
66
127
  }
67
- })), S(() => k(t, g("flex flex-col h-full min-h-0", n.class))), t;
128
+ })), S(() => F(e, y("flex flex-col h-full min-h-0", n.class))), e;
68
129
  })();
69
130
  }
70
- function q(n) {
71
- const i = F(), u = () => i.isSelected(n.item.id), $ = K(() => n.item), d = N(i, $);
72
- let r;
73
- const t = () => r === "touch" || r === "pen", o = (e) => {
74
- r = e.pointerType, d.onPointerDown(e);
75
- }, c = (e) => {
76
- r = e.pointerType, d.onPointerMove(e);
77
- }, l = (e) => {
78
- r = e.pointerType, d.onPointerUp();
79
- }, f = (e) => {
80
- r = e.pointerType, d.onPointerCancel();
81
- }, b = (e) => {
82
- if (!d.consumeClickSuppression(e)) {
83
- if (t()) {
131
+ function Z(n) {
132
+ const i = z(), l = () => i.isSelected(n.item.id), d = () => i.getFilterMatch(n.item.name), c = H(() => n.item), o = j(i, c);
133
+ let e;
134
+ const r = () => e === "touch" || e === "pen", f = (t) => {
135
+ e = t.pointerType, o.onPointerDown(t);
136
+ }, u = (t) => {
137
+ e = t.pointerType, o.onPointerMove(t);
138
+ }, v = (t) => {
139
+ e = t.pointerType, o.onPointerUp();
140
+ }, _ = (t) => {
141
+ e = t.pointerType, o.onPointerCancel();
142
+ }, x = (t) => {
143
+ if (!o.consumeClickSuppression(t)) {
144
+ if (r()) {
84
145
  i.openItem(n.item);
85
146
  return;
86
147
  }
87
- i.selectItem(n.item.id, e.metaKey || e.ctrlKey);
148
+ i.selectItem(n.item.id, t.metaKey || t.ctrlKey);
88
149
  }
89
- }, y = () => {
90
- t() || i.openItem(n.item);
91
- }, w = (e) => {
92
- if (e.preventDefault(), e.stopPropagation(), t()) return;
93
- u() || i.selectItem(n.item.id, !1);
94
- const x = i.selectedItems(), h = i.currentFiles(), C = x.size > 0 ? h.filter((p) => x.has(p.id)) : [n.item];
150
+ }, m = () => {
151
+ r() || i.openItem(n.item);
152
+ }, w = (t) => {
153
+ if (t.preventDefault(), t.stopPropagation(), r()) return;
154
+ l() || i.selectItem(n.item.id, !1);
155
+ const $ = i.selectedItems(), C = i.currentFiles(), b = $.size > 0 ? C.filter((k) => $.has(k.id)) : [n.item];
95
156
  i.showContextMenu({
96
- x: e.clientX,
97
- y: e.clientY,
98
- items: C
157
+ x: t.clientX,
158
+ y: t.clientY,
159
+ items: b
99
160
  });
100
- }, I = () => n.item.type === "folder" ? U : j(n.item.extension);
161
+ }, p = () => n.item.type === "folder" ? K : Q(n.item.extension);
101
162
  return (() => {
102
- var e = Y(), x = e.firstChild, h = x.firstChild, C = h.nextSibling, p = x.nextSibling, D = p.nextSibling;
103
- return e.addEventListener("pointercancel", f), e.$$pointerup = l, e.$$pointermove = c, e.$$pointerdown = o, e.$$contextmenu = w, e.$$dblclick = y, e.$$click = b, s(h, a(z, {
163
+ var t = R(), $ = t.firstChild, C = $.firstChild, b = $.nextSibling, k = b.nextSibling;
164
+ return t.addEventListener("pointercancel", _), t.$$pointerup = v, t.$$pointermove = u, t.$$pointerdown = f, t.$$contextmenu = w, t.$$dblclick = m, t.$$click = x, s(C, a(A, {
104
165
  get component() {
105
- return I();
166
+ return p();
106
167
  },
107
168
  class: "w-4 h-4"
108
- })), s(C, () => n.item.name), s(p, () => n.formatDate(n.item.modifiedAt)), s(D, (() => {
109
- var m = T(() => n.item.type === "folder");
110
- return () => m() ? "-" : n.formatSize(n.item.size);
111
- })()), S((m) => {
112
- var _ = g(
169
+ })), s($, a(W, {
170
+ get name() {
171
+ return n.item.name;
172
+ },
173
+ get match() {
174
+ return d();
175
+ }
176
+ }), null), s(b, () => n.formatDate(n.item.modifiedAt)), s(k, (() => {
177
+ var g = D(() => n.item.type === "folder");
178
+ return () => g() ? "-" : n.formatSize(n.item.size);
179
+ })()), S((g) => {
180
+ var P = y(
113
181
  "group w-full flex items-center text-xs cursor-pointer",
114
182
  "transition-all duration-100",
115
183
  "hover:bg-accent/50",
116
184
  "focus:outline-none focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-ring",
117
- u() && "bg-accent text-accent-foreground",
185
+ l() && "bg-accent text-accent-foreground",
118
186
  // Staggered animation on mount
119
187
  "animate-in fade-in slide-in-from-top-2"
120
- ), P = `${Math.min(n.index * 20, 200)}ms`;
121
- return _ !== m.e && k(e, m.e = _), P !== m.t && L(e, "animation-delay", m.t = P), m;
188
+ ), M = `${Math.min(n.index * 20, 200)}ms`;
189
+ return P !== g.e && F(t, g.e = P), M !== g.t && B(t, "animation-delay", g.t = M), g;
122
190
  }, {
123
191
  e: void 0,
124
192
  t: void 0
125
- }), e;
193
+ }), t;
126
194
  })();
127
195
  }
128
- M(["click", "dblclick", "contextmenu", "pointerdown", "pointermove", "pointerup"]);
196
+ L(["click", "dblclick", "contextmenu", "pointerdown", "pointermove", "pointerup"]);
129
197
  export {
130
- ee as FileListView
198
+ ce as FileListView
131
199
  };
package/dist/index42.js CHANGED
@@ -1,95 +1,160 @@
1
- import { delegateEvents as B, template as g, insert as m, createComponent as u, effect as C, className as a, Dynamic as E, setStyleProperty as P, setAttribute as G } from "solid-js/web";
2
- import { Show as I, For as K, untrack as U } from "solid-js";
3
- import { cn as d } from "./index67.js";
4
- import { useFileBrowser as F } from "./index39.js";
5
- import { FolderIcon as A, getFileIcon as H } from "./index46.js";
6
- import { createLongPressContextMenuHandlers as N } from "./index81.js";
7
- var V = /* @__PURE__ */ g('<div class="grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5 xl:grid-cols-6 gap-2">'), X = /* @__PURE__ */ g("<div>"), Y = /* @__PURE__ */ g('<div class="flex items-center justify-center h-32 text-xs text-muted-foreground">This folder is empty'), q = /* @__PURE__ */ g('<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">'), J = /* @__PURE__ */ g("<button type=button style=animation-fill-mode:backwards><div></div><span></span><div>");
8
- function ne(n) {
9
- const i = F();
1
+ import { delegateEvents as z, template as m, insert as u, createComponent as s, effect as I, className as f, Dynamic as B, setStyleProperty as F, setAttribute as E, memo as G } from "solid-js/web";
2
+ import { Show as p, For as P, untrack as K, createMemo as U } from "solid-js";
3
+ import { cn as v } from "./index67.js";
4
+ import { useFileBrowser as S } from "./index39.js";
5
+ import { FolderIcon as A, getFileIcon as V } from "./index46.js";
6
+ import { createLongPressContextMenuHandlers as X } from "./index81.js";
7
+ var Y = /* @__PURE__ */ m('<mark class="bg-warning/40 text-inherit rounded-sm">'), q = /* @__PURE__ */ m('<div class="grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5 xl:grid-cols-6 gap-2">'), J = /* @__PURE__ */ m("<div>"), O = /* @__PURE__ */ m('<span>No files matching "<!>"'), R = /* @__PURE__ */ m('<button type=button class="px-2 py-1 rounded bg-muted hover:bg-muted/80 transition-colors">Clear Filter'), W = /* @__PURE__ */ m('<div class="flex flex-col items-center justify-center h-32 gap-2 text-xs text-muted-foreground">'), Z = /* @__PURE__ */ m("<span>This folder is empty"), ee = /* @__PURE__ */ m('<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">'), te = /* @__PURE__ */ m("<button type=button style=animation-fill-mode:backwards><div></div><span></span><div>");
8
+ function ne(t) {
9
+ const n = U(() => {
10
+ if (!t.match || t.match.matchedIndices.length === 0)
11
+ return [{
12
+ text: t.name,
13
+ highlight: !1
14
+ }];
15
+ const o = [], c = new Set(t.match.matchedIndices);
16
+ let i = "", a = !1;
17
+ for (let r = 0; r < t.name.length; r++) {
18
+ const d = c.has(r);
19
+ r === 0 ? (a = d, i = t.name[r]) : d === a ? i += t.name[r] : (o.push({
20
+ text: i,
21
+ highlight: a
22
+ }), i = t.name[r], a = d);
23
+ }
24
+ return i && o.push({
25
+ text: i,
26
+ highlight: a
27
+ }), o;
28
+ });
29
+ return s(P, {
30
+ get each() {
31
+ return n();
32
+ },
33
+ children: (o) => s(p, {
34
+ get when() {
35
+ return o.highlight;
36
+ },
37
+ get fallback() {
38
+ return G(() => o.text);
39
+ },
40
+ get children() {
41
+ var c = Y();
42
+ return u(c, () => o.text), c;
43
+ }
44
+ })
45
+ });
46
+ }
47
+ function me(t) {
48
+ const n = S();
10
49
  return (() => {
11
- var r = X();
12
- return m(r, u(I, {
50
+ var o = J();
51
+ return u(o, s(p, {
13
52
  get when() {
14
- return i.currentFiles().length > 0;
53
+ return n.currentFiles().length > 0;
15
54
  },
16
55
  get fallback() {
17
- return Y();
56
+ return (() => {
57
+ var c = W();
58
+ return u(c, s(p, {
59
+ get when() {
60
+ return n.filterQuery().trim();
61
+ },
62
+ get fallback() {
63
+ return Z();
64
+ },
65
+ get children() {
66
+ return [(() => {
67
+ var i = O(), a = i.firstChild, r = a.nextSibling;
68
+ return r.nextSibling, u(i, () => n.filterQuery(), r), i;
69
+ })(), (() => {
70
+ var i = R();
71
+ return i.$$click = () => n.setFilterQuery(""), i;
72
+ })()];
73
+ }
74
+ })), c;
75
+ })();
18
76
  },
19
77
  get children() {
20
- var f = V();
21
- return m(f, u(K, {
78
+ var c = q();
79
+ return u(c, s(P, {
22
80
  get each() {
23
- return i.currentFiles();
81
+ return n.currentFiles();
24
82
  },
25
- children: (l, o) => u(O, {
26
- item: l,
83
+ children: (i, a) => s(ie, {
84
+ item: i,
27
85
  get index() {
28
- return o();
86
+ return a();
29
87
  }
30
88
  })
31
- })), f;
89
+ })), c;
32
90
  }
33
- })), C(() => a(r, d("h-full min-h-0 overflow-auto p-3", n.class))), r;
91
+ })), I(() => f(o, v("h-full min-h-0 overflow-auto p-3", t.class))), o;
34
92
  })();
35
93
  }
36
- function O(n) {
37
- const i = F(), r = () => i.isSelected(n.item.id), f = U(() => n.item), l = N(i, f);
38
- let o;
39
- const p = () => o === "touch" || o === "pen", S = (e) => {
40
- o = e.pointerType, l.onPointerDown(e);
94
+ function ie(t) {
95
+ const n = S(), o = () => n.isSelected(t.item.id), c = () => n.getFilterMatch(t.item.name), i = K(() => t.item), a = X(n, i);
96
+ let r;
97
+ const d = () => r === "touch" || r === "pen", M = (e) => {
98
+ r = e.pointerType, a.onPointerDown(e);
41
99
  }, T = (e) => {
42
- o = e.pointerType, l.onPointerMove(e);
43
- }, M = (e) => {
44
- o = e.pointerType, l.onPointerUp();
100
+ r = e.pointerType, a.onPointerMove(e);
45
101
  }, D = (e) => {
46
- o = e.pointerType, l.onPointerCancel();
102
+ r = e.pointerType, a.onPointerUp();
47
103
  }, j = (e) => {
48
- if (!l.consumeClickSuppression(e)) {
49
- if (p()) {
50
- i.openItem(n.item);
104
+ r = e.pointerType, a.onPointerCancel();
105
+ }, H = (e) => {
106
+ if (!a.consumeClickSuppression(e)) {
107
+ if (d()) {
108
+ n.openItem(t.item);
51
109
  return;
52
110
  }
53
- i.selectItem(n.item.id, e.metaKey || e.ctrlKey);
111
+ n.selectItem(t.item.id, e.metaKey || e.ctrlKey);
54
112
  }
55
- }, _ = () => {
56
- p() || i.openItem(n.item);
57
- }, L = (e) => {
58
- if (e.preventDefault(), e.stopPropagation(), p()) return;
59
- r() || i.selectItem(n.item.id, !1);
60
- const c = i.selectedItems(), s = i.currentFiles(), v = c.size > 0 ? s.filter((t) => c.has(t.id)) : [n.item];
61
- i.showContextMenu({
113
+ }, L = () => {
114
+ d() || n.openItem(t.item);
115
+ }, N = (e) => {
116
+ if (e.preventDefault(), e.stopPropagation(), d()) return;
117
+ o() || n.selectItem(t.item.id, !1);
118
+ const g = n.selectedItems(), h = n.currentFiles(), x = g.size > 0 ? h.filter((l) => g.has(l.id)) : [t.item];
119
+ n.showContextMenu({
62
120
  x: e.clientX,
63
121
  y: e.clientY,
64
- items: v
122
+ items: x
65
123
  });
66
- }, z = () => n.item.type === "folder" ? A : H(n.item.extension);
124
+ }, Q = () => t.item.type === "folder" ? A : V(t.item.extension);
67
125
  return (() => {
68
- var e = J(), c = e.firstChild, s = c.nextSibling, v = s.nextSibling;
69
- return e.addEventListener("pointercancel", D), e.$$pointerup = M, e.$$pointermove = T, e.$$pointerdown = S, e.$$contextmenu = L, e.$$dblclick = _, e.$$click = j, m(e, u(I, {
126
+ var e = te(), g = e.firstChild, h = g.nextSibling, x = h.nextSibling;
127
+ return e.addEventListener("pointercancel", j), e.$$pointerup = D, e.$$pointermove = T, e.$$pointerdown = M, e.$$contextmenu = N, e.$$dblclick = L, e.$$click = H, u(e, s(p, {
70
128
  get when() {
71
- return r();
129
+ return o();
72
130
  },
73
131
  get children() {
74
- return q();
132
+ return ee();
75
133
  }
76
- }), c), m(c, u(E, {
134
+ }), g), u(g, s(B, {
77
135
  get component() {
78
- return z();
136
+ return Q();
79
137
  },
80
138
  class: "w-8 h-8"
81
- })), m(s, () => n.item.name), C((t) => {
82
- var h = d(
139
+ })), u(h, s(ne, {
140
+ get name() {
141
+ return t.item.name;
142
+ },
143
+ get match() {
144
+ return c();
145
+ }
146
+ })), I((l) => {
147
+ var y = v(
83
148
  "group relative flex flex-col items-center gap-2 p-3 rounded-lg cursor-pointer",
84
149
  "transition-all duration-150",
85
150
  "hover:bg-accent/50 hover:scale-[1.02]",
86
151
  "focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
87
152
  "active:scale-[0.98]",
88
- r() && "bg-accent ring-2 ring-primary/50",
153
+ o() && "bg-accent ring-2 ring-primary/50",
89
154
  // Staggered animation on mount
90
155
  "animate-in fade-in zoom-in-95"
91
- ), x = `${Math.min(n.index * 30, 300)}ms`, y = d("w-12 h-12 flex items-center justify-center rounded-lg", "transition-transform duration-200", "group-hover:scale-110", n.item.type === "folder" ? "bg-warning/10" : "bg-muted/50"), w = d("text-xs text-center line-clamp-2 w-full px-1", "transition-colors duration-150", r() && "font-medium"), b = n.item.name, $ = d("absolute inset-0 rounded-lg opacity-0 transition-opacity duration-300", "group-hover:opacity-100", "pointer-events-none"), k = n.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%)";
92
- return h !== t.e && a(e, t.e = h), x !== t.t && P(e, "animation-delay", t.t = x), y !== t.a && a(c, t.a = y), w !== t.o && a(s, t.o = w), b !== t.i && G(s, "title", t.i = b), $ !== t.n && a(v, t.n = $), k !== t.s && P(v, "background", t.s = k), t;
156
+ ), b = `${Math.min(t.index * 30, 300)}ms`, w = v("w-12 h-12 flex items-center justify-center rounded-lg", "transition-transform duration-200", "group-hover:scale-110", t.item.type === "folder" ? "bg-warning/10" : "bg-muted/50"), $ = v("text-xs text-center line-clamp-2 w-full px-1", "transition-colors duration-150", o() && "font-medium"), k = t.item.name, _ = v("absolute inset-0 rounded-lg opacity-0 transition-opacity duration-300", "group-hover:opacity-100", "pointer-events-none"), C = t.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%)";
157
+ return y !== l.e && f(e, l.e = y), b !== l.t && F(e, "animation-delay", l.t = b), w !== l.a && f(g, l.a = w), $ !== l.o && f(h, l.o = $), k !== l.i && E(h, "title", l.i = k), _ !== l.n && f(x, l.n = _), C !== l.s && F(x, "background", l.s = C), l;
93
158
  }, {
94
159
  e: void 0,
95
160
  t: void 0,
@@ -101,7 +166,7 @@ function O(n) {
101
166
  }), e;
102
167
  })();
103
168
  }
104
- B(["click", "dblclick", "contextmenu", "pointerdown", "pointermove", "pointerup"]);
169
+ z(["click", "dblclick", "contextmenu", "pointerdown", "pointermove", "pointerup"]);
105
170
  export {
106
- ne as FileGridView
171
+ me as FileGridView
107
172
  };