@floegence/floe-webapp-core 0.4.0 → 0.6.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.
- package/dist/components/ui/Dialog.d.ts +3 -0
- package/dist/components/ui/DirectoryPicker.d.ts +31 -0
- package/dist/components/ui/index.d.ts +1 -0
- package/dist/index.js +193 -191
- package/dist/index10.js +2 -2
- package/dist/index11.js +4 -4
- package/dist/index12.js +5 -5
- package/dist/index13.js +3 -3
- package/dist/index14.js +4 -4
- package/dist/index15.js +5 -5
- package/dist/index16.js +5 -5
- package/dist/index17.js +4 -4
- package/dist/index18.js +6 -6
- package/dist/index19.js +2 -2
- package/dist/index2.js +6 -6
- package/dist/index20.js +2 -2
- package/dist/index21.js +1 -1
- package/dist/index22.js +8 -5
- package/dist/index23.js +3 -3
- package/dist/index24.js +3 -3
- package/dist/index25.js +1 -1
- package/dist/index26.js +5 -5
- package/dist/index27.js +1 -1
- package/dist/index28.js +3 -3
- package/dist/index29.js +362 -81
- package/dist/index3.js +2 -2
- package/dist/index30.js +87 -37
- package/dist/index31.js +37 -66
- package/dist/index32.js +69 -278
- package/dist/index33.js +278 -152
- package/dist/index34.js +147 -24
- package/dist/index35.js +26 -45
- package/dist/index36.js +45 -10
- package/dist/index37.js +10 -27
- package/dist/index38.js +27 -159
- package/dist/index39.js +156 -228
- package/dist/index4.js +1 -1
- package/dist/index40.js +228 -125
- package/dist/index41.js +110 -176
- package/dist/index42.js +149 -122
- package/dist/index43.js +161 -183
- package/dist/index44.js +185 -145
- package/dist/index45.js +143 -114
- package/dist/index46.js +119 -47
- package/dist/index47.js +50 -48
- package/dist/index48.js +40 -30
- package/dist/index49.js +33 -44
- package/dist/index5.js +4 -4
- package/dist/index50.js +49 -25
- package/dist/index51.js +21 -169
- package/dist/index52.js +169 -36
- package/dist/index53.js +38 -64
- package/dist/index54.js +63 -93
- package/dist/index55.js +86 -111
- package/dist/index56.js +114 -131
- package/dist/index57.js +131 -32
- package/dist/index58.js +29 -425
- package/dist/index59.js +433 -36
- package/dist/index6.js +2 -2
- package/dist/index60.js +31 -12
- package/dist/index61.js +19 -13
- package/dist/index62.js +13 -10
- package/dist/index63.js +10 -16
- package/dist/index64.js +16 -10
- package/dist/index65.js +10 -8
- package/dist/index66.js +8 -61
- package/dist/index67.js +61 -5
- package/dist/index68.js +5 -11
- package/dist/index69.js +10 -25
- package/dist/index7.js +2 -2
- package/dist/index70.js +24 -30
- package/dist/index71.js +31 -90
- package/dist/index72.js +90 -26
- package/dist/index73.js +24 -43
- package/dist/index74.js +45 -13
- package/dist/index75.js +14 -35
- package/dist/index76.js +33 -62
- package/dist/index77.js +61 -81
- package/dist/index78.js +84 -14
- package/dist/index79.js +12 -2261
- package/dist/index8.js +2 -2
- package/dist/index80.js +2262 -6
- package/dist/index81.js +7 -39
- package/dist/index82.js +42 -0
- package/dist/index9.js +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/dist/index41.js
CHANGED
|
@@ -1,199 +1,133 @@
|
|
|
1
|
-
import { delegateEvents as
|
|
2
|
-
import {
|
|
3
|
-
import { cn as
|
|
4
|
-
import { useFileBrowser as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { createLongPressContextMenuHandlers as
|
|
8
|
-
var
|
|
9
|
-
function
|
|
10
|
-
const i =
|
|
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
|
-
});
|
|
1
|
+
import { delegateEvents as U, template as x, insert as s, createComponent as o, effect as $, className as g, setAttribute as j, memo as k, setStyleProperty as B } from "solid-js/web";
|
|
2
|
+
import { createMemo as w, For as H, untrack as R, Show as b } from "solid-js";
|
|
3
|
+
import { cn as v } from "./index68.js";
|
|
4
|
+
import { useFileBrowser as T } from "./index40.js";
|
|
5
|
+
import { FolderOpenIcon as X, FolderIcon as Y } from "./index47.js";
|
|
6
|
+
import { ChevronRight as q } from "./index33.js";
|
|
7
|
+
import { createLongPressContextMenuHandlers as z } from "./index82.js";
|
|
8
|
+
var _ = /* @__PURE__ */ x("<div>"), G = /* @__PURE__ */ x("<button type=button>"), J = /* @__PURE__ */ x('<span class="ml-auto mr-2 text-[10px] text-muted-foreground/60 opacity-0 group-hover:opacity-100 transition-opacity">'), K = /* @__PURE__ */ x('<div class="flex flex-col"><div><button type=button><span class="flex-shrink-0 w-4 h-4"></span><span class=truncate>'), Q = /* @__PURE__ */ x('<span class="flex-shrink-0 w-3.5 h-3.5">');
|
|
9
|
+
function ie(n) {
|
|
10
|
+
const i = T(), r = w(() => i.files().filter((c) => c.type === "folder"));
|
|
30
11
|
return (() => {
|
|
31
|
-
var
|
|
32
|
-
return s(
|
|
33
|
-
get
|
|
34
|
-
return
|
|
12
|
+
var c = _();
|
|
13
|
+
return c.$$contextmenu = (y) => y.preventDefault(), s(c, o(F, {
|
|
14
|
+
get items() {
|
|
15
|
+
return r();
|
|
35
16
|
},
|
|
36
|
-
|
|
37
|
-
|
|
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;
|
|
17
|
+
depth: 0
|
|
18
|
+
})), $(() => g(c, v("flex flex-col", n.class))), c;
|
|
49
19
|
})();
|
|
50
20
|
}
|
|
51
|
-
function
|
|
52
|
-
const i =
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
21
|
+
function F(n) {
|
|
22
|
+
const i = w(() => n.items.filter((r) => r.type === "folder"));
|
|
23
|
+
return o(H, {
|
|
24
|
+
get each() {
|
|
25
|
+
return i();
|
|
26
|
+
},
|
|
27
|
+
children: (r) => o(V, {
|
|
28
|
+
item: r,
|
|
29
|
+
get depth() {
|
|
30
|
+
return n.depth;
|
|
31
|
+
}
|
|
32
|
+
})
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
function V(n) {
|
|
36
|
+
const i = T(), r = () => i.isExpanded(n.item.path), c = () => i.currentPath() === n.item.path, y = R(() => n.item), f = z(i, y, {
|
|
37
|
+
selectOnOpen: !1
|
|
38
|
+
});
|
|
39
|
+
let u;
|
|
40
|
+
const M = () => u === "touch" || u === "pen", P = w(() => {
|
|
41
|
+
var e;
|
|
42
|
+
return ((e = n.item.children) == null ? void 0 : e.filter((d) => d.type === "folder").length) ?? 0;
|
|
43
|
+
}), m = () => P() > 0, D = (e) => {
|
|
44
|
+
u = e.pointerType, f.onPointerDown(e);
|
|
45
|
+
}, E = (e) => {
|
|
46
|
+
u = e.pointerType, f.onPointerMove(e);
|
|
47
|
+
}, S = (e) => {
|
|
48
|
+
u = e.pointerType, f.onPointerUp();
|
|
49
|
+
}, I = (e) => {
|
|
50
|
+
u = e.pointerType, f.onPointerCancel();
|
|
51
|
+
}, L = (e) => {
|
|
52
|
+
f.consumeClickSuppression(e) || i.setCurrentPath(n.item.path);
|
|
53
|
+
}, N = (e) => {
|
|
54
|
+
e.preventDefault(), e.stopPropagation(), !M() && i.showContextMenu({
|
|
55
|
+
x: e.clientX,
|
|
56
|
+
y: e.clientY,
|
|
57
|
+
items: [n.item]
|
|
57
58
|
});
|
|
58
|
-
},
|
|
59
|
-
|
|
60
|
-
day: "numeric",
|
|
61
|
-
year: "numeric"
|
|
62
|
-
}) : "-", o = (e) => {
|
|
63
|
-
const r = () => i.sortConfig(), f = () => r().field === e.field;
|
|
64
|
-
return (() => {
|
|
65
|
-
var u = X();
|
|
66
|
-
return s(u, a(U, {
|
|
67
|
-
get class() {
|
|
68
|
-
return y("w-3 h-3 transition-transform duration-150", f() && r().direction === "asc" && "rotate-180");
|
|
69
|
-
}
|
|
70
|
-
})), S(() => F(u, y("ml-1 transition-all duration-150", f() ? "opacity-100" : "opacity-0 group-hover:opacity-40"))), u;
|
|
71
|
-
})();
|
|
59
|
+
}, O = () => {
|
|
60
|
+
m() && i.toggleFolder(n.item.path);
|
|
72
61
|
};
|
|
73
62
|
return (() => {
|
|
74
|
-
var e =
|
|
75
|
-
|
|
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, {
|
|
82
|
-
field: "name"
|
|
83
|
-
}), null), u.$$click = () => l("modifiedAt"), s(u, a(o, {
|
|
84
|
-
field: "modifiedAt"
|
|
85
|
-
}), null), v.$$click = () => l("size"), s(v, a(o, {
|
|
86
|
-
field: "size"
|
|
87
|
-
}), null), s(_, a(I, {
|
|
63
|
+
var e = K(), d = e.firstChild, l = d.firstChild, C = l.firstChild, A = C.nextSibling;
|
|
64
|
+
return s(d, o(b, {
|
|
88
65
|
get when() {
|
|
89
|
-
return
|
|
66
|
+
return m();
|
|
90
67
|
},
|
|
91
68
|
get fallback() {
|
|
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
|
-
})();
|
|
69
|
+
return Q();
|
|
112
70
|
},
|
|
113
71
|
get children() {
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
}
|
|
125
|
-
})
|
|
126
|
-
});
|
|
72
|
+
var t = G();
|
|
73
|
+
return t.$$click = O, s(t, o(q, {
|
|
74
|
+
class: "w-3 h-3 opacity-50"
|
|
75
|
+
})), $((a) => {
|
|
76
|
+
var h = v("flex-shrink-0 w-3.5 h-3.5 flex items-center justify-center cursor-pointer", "transition-transform duration-150", r() && "rotate-90", "focus:outline-none focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-sidebar-ring"), p = r() ? "Collapse folder" : "Expand folder";
|
|
77
|
+
return h !== a.e && g(t, a.e = h), p !== a.t && j(t, "aria-label", a.t = p), a;
|
|
78
|
+
}, {
|
|
79
|
+
e: void 0,
|
|
80
|
+
t: void 0
|
|
81
|
+
}), t;
|
|
127
82
|
}
|
|
128
|
-
})),
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
e = t.pointerType, o.onPointerCancel();
|
|
142
|
-
}, x = (t) => {
|
|
143
|
-
if (!o.consumeClickSuppression(t)) {
|
|
144
|
-
if (r()) {
|
|
145
|
-
i.openItem(n.item);
|
|
146
|
-
return;
|
|
83
|
+
}), l), l.addEventListener("pointercancel", I), l.$$pointerup = S, l.$$pointermove = E, l.$$pointerdown = D, l.$$contextmenu = N, l.$$click = L, s(C, o(b, {
|
|
84
|
+
get when() {
|
|
85
|
+
return k(() => !!m())() && r();
|
|
86
|
+
},
|
|
87
|
+
get fallback() {
|
|
88
|
+
return o(Y, {
|
|
89
|
+
class: "w-4 h-4"
|
|
90
|
+
});
|
|
91
|
+
},
|
|
92
|
+
get children() {
|
|
93
|
+
return o(X, {
|
|
94
|
+
class: "w-4 h-4"
|
|
95
|
+
});
|
|
147
96
|
}
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
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];
|
|
156
|
-
i.showContextMenu({
|
|
157
|
-
x: t.clientX,
|
|
158
|
-
y: t.clientY,
|
|
159
|
-
items: b
|
|
160
|
-
});
|
|
161
|
-
}, p = () => n.item.type === "folder" ? K : Q(n.item.extension);
|
|
162
|
-
return (() => {
|
|
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, {
|
|
165
|
-
get component() {
|
|
166
|
-
return p();
|
|
97
|
+
})), s(A, () => n.item.name), s(l, o(b, {
|
|
98
|
+
get when() {
|
|
99
|
+
return m();
|
|
167
100
|
},
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
101
|
+
get children() {
|
|
102
|
+
var t = J();
|
|
103
|
+
return s(t, P), t;
|
|
104
|
+
}
|
|
105
|
+
}), null), s(e, o(b, {
|
|
106
|
+
get when() {
|
|
107
|
+
return k(() => !!r())() && m();
|
|
172
108
|
},
|
|
173
|
-
get
|
|
174
|
-
|
|
109
|
+
get children() {
|
|
110
|
+
var t = _();
|
|
111
|
+
return s(t, o(F, {
|
|
112
|
+
get items() {
|
|
113
|
+
return n.item.children ?? [];
|
|
114
|
+
},
|
|
115
|
+
get depth() {
|
|
116
|
+
return n.depth + 1;
|
|
117
|
+
}
|
|
118
|
+
})), $(() => g(t, v("overflow-hidden transition-all duration-200", r() ? "opacity-100" : "opacity-0"))), t;
|
|
175
119
|
}
|
|
176
|
-
}), null),
|
|
177
|
-
var
|
|
178
|
-
return
|
|
179
|
-
})()), S((g) => {
|
|
180
|
-
var P = y(
|
|
181
|
-
"group w-full flex items-center text-xs cursor-pointer",
|
|
182
|
-
"transition-all duration-100",
|
|
183
|
-
"hover:bg-accent/50",
|
|
184
|
-
"focus:outline-none focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-ring",
|
|
185
|
-
l() && "bg-accent text-accent-foreground",
|
|
186
|
-
// Staggered animation on mount
|
|
187
|
-
"animate-in fade-in slide-in-from-top-2"
|
|
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;
|
|
120
|
+
}), null), $((t) => {
|
|
121
|
+
var a = v("group flex items-center w-full py-1 text-xs", "transition-all duration-100", "hover:bg-sidebar-accent/60", c() && "bg-sidebar-accent text-sidebar-accent-foreground font-medium"), h = `${8 + n.depth * 12}px`, p = v("flex items-center gap-1 flex-1 min-w-0 text-left cursor-pointer pl-1", "focus:outline-none focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-sidebar-ring");
|
|
122
|
+
return a !== t.e && g(d, t.e = a), h !== t.t && B(d, "padding-left", t.t = h), p !== t.a && g(l, t.a = p), t;
|
|
190
123
|
}, {
|
|
191
124
|
e: void 0,
|
|
192
|
-
t: void 0
|
|
193
|
-
|
|
125
|
+
t: void 0,
|
|
126
|
+
a: void 0
|
|
127
|
+
}), e;
|
|
194
128
|
})();
|
|
195
129
|
}
|
|
196
|
-
|
|
130
|
+
U(["contextmenu", "click", "pointerdown", "pointermove", "pointerup"]);
|
|
197
131
|
export {
|
|
198
|
-
|
|
132
|
+
ie as DirectoryTree
|
|
199
133
|
};
|
package/dist/index42.js
CHANGED
|
@@ -1,172 +1,199 @@
|
|
|
1
|
-
import { delegateEvents as
|
|
2
|
-
import { Show as
|
|
3
|
-
import { cn as
|
|
4
|
-
import { useFileBrowser as
|
|
5
|
-
import { FolderIcon as
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
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 "./index68.js";
|
|
4
|
+
import { useFileBrowser as z } from "./index40.js";
|
|
5
|
+
import { FolderIcon as K, getFileIcon as Q } from "./index47.js";
|
|
6
|
+
import { ChevronDown as U } from "./index33.js";
|
|
7
|
+
import { createLongPressContextMenuHandlers as j } from "./index82.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)
|
|
11
12
|
return [{
|
|
12
|
-
text:
|
|
13
|
+
text: n.name,
|
|
13
14
|
highlight: !1
|
|
14
15
|
}];
|
|
15
|
-
const
|
|
16
|
-
let
|
|
17
|
-
for (let
|
|
18
|
-
const
|
|
19
|
-
|
|
20
|
-
text:
|
|
21
|
-
highlight:
|
|
22
|
-
}),
|
|
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);
|
|
23
24
|
}
|
|
24
|
-
return
|
|
25
|
-
text:
|
|
26
|
-
highlight:
|
|
27
|
-
}),
|
|
25
|
+
return c && l.push({
|
|
26
|
+
text: c,
|
|
27
|
+
highlight: o
|
|
28
|
+
}), l;
|
|
28
29
|
});
|
|
29
|
-
return
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
get when() {
|
|
35
|
-
return o.highlight;
|
|
36
|
-
},
|
|
37
|
-
get fallback() {
|
|
38
|
-
return G(() => o.text);
|
|
30
|
+
return (() => {
|
|
31
|
+
var l = E();
|
|
32
|
+
return s(l, a(T, {
|
|
33
|
+
get each() {
|
|
34
|
+
return i();
|
|
39
35
|
},
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
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
|
+
})();
|
|
46
50
|
}
|
|
47
|
-
function
|
|
48
|
-
const
|
|
51
|
+
function ce(n) {
|
|
52
|
+
const i = z(), l = (e) => {
|
|
53
|
+
const r = i.sortConfig();
|
|
54
|
+
i.setSortConfig({
|
|
55
|
+
field: e,
|
|
56
|
+
direction: r.field === e && r.direction === "asc" ? "desc" : "asc"
|
|
57
|
+
});
|
|
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", {
|
|
59
|
+
month: "short",
|
|
60
|
+
day: "numeric",
|
|
61
|
+
year: "numeric"
|
|
62
|
+
}) : "-", o = (e) => {
|
|
63
|
+
const r = () => i.sortConfig(), f = () => r().field === e.field;
|
|
64
|
+
return (() => {
|
|
65
|
+
var u = X();
|
|
66
|
+
return s(u, a(U, {
|
|
67
|
+
get class() {
|
|
68
|
+
return y("w-3 h-3 transition-transform duration-150", f() && r().direction === "asc" && "rotate-180");
|
|
69
|
+
}
|
|
70
|
+
})), S(() => F(u, y("ml-1 transition-all duration-150", f() ? "opacity-100" : "opacity-0 group-hover:opacity-40"))), u;
|
|
71
|
+
})();
|
|
72
|
+
};
|
|
49
73
|
return (() => {
|
|
50
|
-
var
|
|
51
|
-
|
|
74
|
+
var e = Y(), r = e.firstChild, f = r.firstChild;
|
|
75
|
+
f.firstChild;
|
|
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, {
|
|
82
|
+
field: "name"
|
|
83
|
+
}), null), u.$$click = () => l("modifiedAt"), s(u, a(o, {
|
|
84
|
+
field: "modifiedAt"
|
|
85
|
+
}), null), v.$$click = () => l("size"), s(v, a(o, {
|
|
86
|
+
field: "size"
|
|
87
|
+
}), null), s(_, a(I, {
|
|
52
88
|
get when() {
|
|
53
|
-
return
|
|
89
|
+
return i.currentFiles().length > 0;
|
|
54
90
|
},
|
|
55
91
|
get fallback() {
|
|
56
92
|
return (() => {
|
|
57
|
-
var
|
|
58
|
-
return
|
|
93
|
+
var x = J();
|
|
94
|
+
return s(x, a(I, {
|
|
59
95
|
get when() {
|
|
60
|
-
return
|
|
96
|
+
return i.filterQuery().trim();
|
|
61
97
|
},
|
|
62
98
|
get fallback() {
|
|
63
|
-
return
|
|
99
|
+
return O();
|
|
64
100
|
},
|
|
65
101
|
get children() {
|
|
66
102
|
return [(() => {
|
|
67
|
-
var
|
|
68
|
-
return
|
|
103
|
+
var m = q(), w = m.firstChild, p = w.nextSibling;
|
|
104
|
+
return p.nextSibling, s(m, () => i.filterQuery(), p), m;
|
|
69
105
|
})(), (() => {
|
|
70
|
-
var
|
|
71
|
-
return
|
|
106
|
+
var m = G();
|
|
107
|
+
return m.$$click = () => i.setFilterQuery(""), m;
|
|
72
108
|
})()];
|
|
73
109
|
}
|
|
74
|
-
})),
|
|
110
|
+
})), x;
|
|
75
111
|
})();
|
|
76
112
|
},
|
|
77
113
|
get children() {
|
|
78
|
-
|
|
79
|
-
return u(c, s(P, {
|
|
114
|
+
return a(T, {
|
|
80
115
|
get each() {
|
|
81
|
-
return
|
|
116
|
+
return i.currentFiles();
|
|
82
117
|
},
|
|
83
|
-
children: (
|
|
84
|
-
item:
|
|
118
|
+
children: (x, m) => a(Z, {
|
|
119
|
+
item: x,
|
|
120
|
+
formatSize: d,
|
|
121
|
+
formatDate: c,
|
|
85
122
|
get index() {
|
|
86
|
-
return
|
|
123
|
+
return m();
|
|
87
124
|
}
|
|
88
125
|
})
|
|
89
|
-
})
|
|
126
|
+
});
|
|
90
127
|
}
|
|
91
|
-
})),
|
|
128
|
+
})), S(() => F(e, y("flex flex-col h-full min-h-0", n.class))), e;
|
|
92
129
|
})();
|
|
93
130
|
}
|
|
94
|
-
function
|
|
95
|
-
const
|
|
96
|
-
let
|
|
97
|
-
const
|
|
98
|
-
|
|
99
|
-
},
|
|
100
|
-
|
|
101
|
-
},
|
|
102
|
-
|
|
103
|
-
},
|
|
104
|
-
|
|
105
|
-
},
|
|
106
|
-
if (!
|
|
107
|
-
if (
|
|
108
|
-
|
|
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()) {
|
|
145
|
+
i.openItem(n.item);
|
|
109
146
|
return;
|
|
110
147
|
}
|
|
111
|
-
|
|
148
|
+
i.selectItem(n.item.id, t.metaKey || t.ctrlKey);
|
|
112
149
|
}
|
|
113
|
-
},
|
|
114
|
-
|
|
115
|
-
},
|
|
116
|
-
if (
|
|
117
|
-
|
|
118
|
-
const
|
|
119
|
-
|
|
120
|
-
x:
|
|
121
|
-
y:
|
|
122
|
-
items:
|
|
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];
|
|
156
|
+
i.showContextMenu({
|
|
157
|
+
x: t.clientX,
|
|
158
|
+
y: t.clientY,
|
|
159
|
+
items: b
|
|
123
160
|
});
|
|
124
|
-
},
|
|
161
|
+
}, p = () => n.item.type === "folder" ? K : Q(n.item.extension);
|
|
125
162
|
return (() => {
|
|
126
|
-
var
|
|
127
|
-
return
|
|
128
|
-
get when() {
|
|
129
|
-
return o();
|
|
130
|
-
},
|
|
131
|
-
get children() {
|
|
132
|
-
return ee();
|
|
133
|
-
}
|
|
134
|
-
}), g), u(g, s(B, {
|
|
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, {
|
|
135
165
|
get component() {
|
|
136
|
-
return
|
|
166
|
+
return p();
|
|
137
167
|
},
|
|
138
|
-
class: "w-
|
|
139
|
-
})),
|
|
168
|
+
class: "w-4 h-4"
|
|
169
|
+
})), s($, a(W, {
|
|
140
170
|
get name() {
|
|
141
|
-
return
|
|
171
|
+
return n.item.name;
|
|
142
172
|
},
|
|
143
173
|
get match() {
|
|
144
|
-
return
|
|
174
|
+
return d();
|
|
145
175
|
}
|
|
146
|
-
})),
|
|
147
|
-
var
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
"
|
|
152
|
-
"
|
|
153
|
-
|
|
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(
|
|
181
|
+
"group w-full flex items-center text-xs cursor-pointer",
|
|
182
|
+
"transition-all duration-100",
|
|
183
|
+
"hover:bg-accent/50",
|
|
184
|
+
"focus:outline-none focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-ring",
|
|
185
|
+
l() && "bg-accent text-accent-foreground",
|
|
154
186
|
// Staggered animation on mount
|
|
155
|
-
"animate-in fade-in
|
|
156
|
-
),
|
|
157
|
-
return
|
|
187
|
+
"animate-in fade-in slide-in-from-top-2"
|
|
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;
|
|
158
190
|
}, {
|
|
159
191
|
e: void 0,
|
|
160
|
-
t: void 0
|
|
161
|
-
|
|
162
|
-
o: void 0,
|
|
163
|
-
i: void 0,
|
|
164
|
-
n: void 0,
|
|
165
|
-
s: void 0
|
|
166
|
-
}), e;
|
|
192
|
+
t: void 0
|
|
193
|
+
}), t;
|
|
167
194
|
})();
|
|
168
195
|
}
|
|
169
|
-
|
|
196
|
+
L(["click", "dblclick", "contextmenu", "pointerdown", "pointermove", "pointerup"]);
|
|
170
197
|
export {
|
|
171
|
-
|
|
198
|
+
ce as FileListView
|
|
172
199
|
};
|