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