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