@floegence/floe-webapp-core 0.8.5 → 0.8.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/index2.js +1 -1
- package/dist/index29.js +1 -1
- package/dist/index30.js +1 -1
- package/dist/index43.js +180 -168
- package/dist/index8.js +5 -5
- package/dist/index82.js +405 -6
- package/dist/index83.js +6 -405
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/dist/index2.js
CHANGED
|
@@ -11,7 +11,7 @@ import { BottomBar as D } from "./index6.js";
|
|
|
11
11
|
import { MobileTabBar as L } from "./index7.js";
|
|
12
12
|
import { ActivityBar as N } from "./index3.js";
|
|
13
13
|
import { ResizeHandle as _ } from "./index8.js";
|
|
14
|
-
import { resolveMobileTabActiveId as j, resolveMobileTabSelect as q } from "./
|
|
14
|
+
import { resolveMobileTabActiveId as j, resolveMobileTabSelect as q } from "./index83.js";
|
|
15
15
|
var y = /* @__PURE__ */ f('<div class="flex items-center gap-2">'), G = /* @__PURE__ */ f('<div class="absolute inset-0 z-40 bg-black/30 cursor-pointer">'), J = /* @__PURE__ */ f('<div><div class="h-full overflow-auto overscroll-contain">'), K = /* @__PURE__ */ f('<div class="relative shrink-0 border-t border-border bg-terminal-background overflow-hidden">'), U = /* @__PURE__ */ f('<div><div class="flex-1 min-h-0 flex overflow-hidden relative"><div class="flex-1 min-w-0 flex flex-col overflow-hidden"><main class="flex-1 min-h-0 overflow-auto overscroll-contain">');
|
|
16
16
|
function de(l) {
|
|
17
17
|
const r = R(), M = H(), d = P(M.config.layout.mobileQuery), [p, g] = F(!1), s = (() => {
|
package/dist/index29.js
CHANGED
|
@@ -4,7 +4,7 @@ import { cn as m } from "./index69.js";
|
|
|
4
4
|
import { Dialog as s } from "./index22.js";
|
|
5
5
|
import { Button as o } from "./index20.js";
|
|
6
6
|
import { deferNonBlocking as f } from "./index70.js";
|
|
7
|
-
import { usePickerTree as P, PathInputBar as x, PickerBreadcrumb as C, PickerFolderTree as S, NewFolderSection as p } from "./
|
|
7
|
+
import { usePickerTree as P, PathInputBar as x, PickerBreadcrumb as C, PickerFolderTree as S, NewFolderSection as p } from "./index82.js";
|
|
8
8
|
var b = /* @__PURE__ */ i('<div class="flex flex-col gap-2 -mt-1">'), y = /* @__PURE__ */ i('<div class="flex items-center w-full gap-2"><span class="flex-1 text-[11px] text-muted-foreground truncate">');
|
|
9
9
|
function T(t) {
|
|
10
10
|
const e = P({
|
package/dist/index30.js
CHANGED
|
@@ -6,7 +6,7 @@ import { Button as w } from "./index20.js";
|
|
|
6
6
|
import { Input as K } from "./index21.js";
|
|
7
7
|
import { getFileIcon as L } from "./index48.js";
|
|
8
8
|
import { deferNonBlocking as O } from "./index70.js";
|
|
9
|
-
import { usePickerTree as R, normalizePath as G, PathInputBar as M, PickerBreadcrumb as j, PickerFolderTree as q, NewFolderSection as A } from "./
|
|
9
|
+
import { usePickerTree as R, normalizePath as G, PathInputBar as M, PickerBreadcrumb as j, PickerFolderTree as q, NewFolderSection as A } from "./index82.js";
|
|
10
10
|
var H = /* @__PURE__ */ h('<div class="flex flex-col gap-2 -mt-1"><div class="flex border border-border rounded overflow-hidden"style=height:260px><div class="w-1/2 min-w-0 overflow-y-auto">'), J = /* @__PURE__ */ h('<div class="flex flex-col w-full gap-2"><div class="flex items-center gap-1.5"><label class="text-xs text-muted-foreground flex-shrink-0">File name:</label><div class=flex-1></div></div><div class="flex items-center gap-2"><span class="flex-1 text-[11px] text-muted-foreground truncate">'), Q = /* @__PURE__ */ h('<div class="flex items-center justify-center h-full text-xs text-muted-foreground">No files in this directory'), U = /* @__PURE__ */ h('<span class="ml-auto text-[10px] text-muted-foreground/60 flex-shrink-0">'), V = /* @__PURE__ */ h("<button type=button><span class=truncate>");
|
|
11
11
|
function ae(e) {
|
|
12
12
|
const [u, f] = $(e.initialFileName ?? ""), [S, s] = $(""), r = R({
|
package/dist/index43.js
CHANGED
|
@@ -1,341 +1,353 @@
|
|
|
1
|
-
import { delegateEvents as
|
|
2
|
-
import { createSignal as
|
|
3
|
-
import { cn as
|
|
1
|
+
import { delegateEvents as ie, template as p, use as ne, insert as m, createComponent as c, effect as P, className as I, setStyleProperty as N, Dynamic as re, memo as O } from "solid-js/web";
|
|
2
|
+
import { createSignal as oe, createMemo as V, Show as C, For as X, untrack as se } from "solid-js";
|
|
3
|
+
import { cn as R } from "./index69.js";
|
|
4
4
|
import { useMediaQuery as Q } from "./index63.js";
|
|
5
|
-
import { useResizeObserver as
|
|
6
|
-
import { useFileBrowser as
|
|
7
|
-
import { FolderIcon as
|
|
5
|
+
import { useResizeObserver as le } from "./index65.js";
|
|
6
|
+
import { useFileBrowser as Y } from "./index41.js";
|
|
7
|
+
import { FolderIcon as de, getFileIcon as ae } from "./index48.js";
|
|
8
8
|
import { ChevronDown as ce } from "./index34.js";
|
|
9
|
-
import { createLongPressContextMenuHandlers as
|
|
10
|
-
import { ResizeHandle as
|
|
11
|
-
var
|
|
12
|
-
function
|
|
13
|
-
const d =
|
|
9
|
+
import { createLongPressContextMenuHandlers as me } from "./index84.js";
|
|
10
|
+
import { ResizeHandle as j } from "./index8.js";
|
|
11
|
+
var he = /* @__PURE__ */ p("<span class=truncate>"), ue = /* @__PURE__ */ p('<mark class="bg-warning/40 text-inherit rounded-sm">'), fe = /* @__PURE__ */ p("<span>"), xe = /* @__PURE__ */ p('<div><button type=button class="group w-full flex items-center justify-start text-left px-3 py-2 cursor-pointer hover:bg-muted/50 transition-colors">Modified'), ge = /* @__PURE__ */ p('<div class=shrink-0><button type=button class="group w-full flex items-center justify-start text-left px-3 py-2 cursor-pointer hover:bg-muted/50 transition-colors">Size'), we = /* @__PURE__ */ p('<div><div class="flex items-center border-b border-border text-[11px] text-muted-foreground font-medium"><div><button type=button class="group w-full flex items-center min-w-0 px-3 py-2 cursor-pointer hover:bg-muted/50 transition-colors"><span class="flex items-center gap-2 min-w-0"><span class="flex-shrink-0 w-4 h-4"aria-hidden=true></span><span class="flex items-center min-w-0"><span class=truncate>Name</span></span></span></button></div></div><div class="flex-1 min-h-0 overflow-auto">'), ve = /* @__PURE__ */ p('<span>No files matching "<!>"'), $e = /* @__PURE__ */ p('<button type=button class="px-2 py-1 rounded bg-muted hover:bg-muted/80 transition-colors">Clear Filter'), pe = /* @__PURE__ */ p('<div class="flex flex-col items-center justify-center h-32 gap-2 text-xs text-muted-foreground">'), ze = /* @__PURE__ */ p("<span>This folder is empty"), K = /* @__PURE__ */ p('<div class="shrink-0 px-3 py-1.5 text-left text-muted-foreground truncate">'), Me = /* @__PURE__ */ p('<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">');
|
|
12
|
+
function be(r) {
|
|
13
|
+
const d = V(() => {
|
|
14
14
|
if (!r.match || r.match.matchedIndices.length === 0)
|
|
15
15
|
return [{
|
|
16
16
|
text: r.name,
|
|
17
17
|
highlight: !1
|
|
18
18
|
}];
|
|
19
|
-
const
|
|
20
|
-
let
|
|
21
|
-
for (let
|
|
22
|
-
const
|
|
23
|
-
|
|
24
|
-
text:
|
|
25
|
-
highlight:
|
|
26
|
-
}),
|
|
19
|
+
const w = [], M = new Set(r.match.matchedIndices);
|
|
20
|
+
let v = "", f = !1;
|
|
21
|
+
for (let h = 0; h < r.name.length; h++) {
|
|
22
|
+
const b = M.has(h);
|
|
23
|
+
h === 0 ? (f = b, v = r.name[h]) : b === f ? v += r.name[h] : (w.push({
|
|
24
|
+
text: v,
|
|
25
|
+
highlight: f
|
|
26
|
+
}), v = r.name[h], f = b);
|
|
27
27
|
}
|
|
28
|
-
return
|
|
29
|
-
text:
|
|
30
|
-
highlight:
|
|
31
|
-
}),
|
|
28
|
+
return v && w.push({
|
|
29
|
+
text: v,
|
|
30
|
+
highlight: f
|
|
31
|
+
}), w;
|
|
32
32
|
});
|
|
33
33
|
return (() => {
|
|
34
|
-
var
|
|
35
|
-
return
|
|
34
|
+
var w = he();
|
|
35
|
+
return m(w, c(X, {
|
|
36
36
|
get each() {
|
|
37
37
|
return d();
|
|
38
38
|
},
|
|
39
|
-
children: (
|
|
39
|
+
children: (M) => c(C, {
|
|
40
40
|
get when() {
|
|
41
|
-
return
|
|
41
|
+
return M.highlight;
|
|
42
42
|
},
|
|
43
43
|
get fallback() {
|
|
44
|
-
return
|
|
44
|
+
return O(() => M.text);
|
|
45
45
|
},
|
|
46
46
|
get children() {
|
|
47
|
-
var
|
|
48
|
-
return
|
|
47
|
+
var v = ue();
|
|
48
|
+
return m(v, () => M.text), v;
|
|
49
49
|
}
|
|
50
50
|
})
|
|
51
|
-
})),
|
|
51
|
+
})), w;
|
|
52
52
|
})();
|
|
53
53
|
}
|
|
54
|
-
function
|
|
55
|
-
const d =
|
|
54
|
+
function Ne(r) {
|
|
55
|
+
const d = Y(), w = (t) => {
|
|
56
56
|
const e = d.sortConfig();
|
|
57
57
|
d.setSortConfig({
|
|
58
58
|
field: t,
|
|
59
59
|
direction: e.field === t && e.direction === "asc" ? "desc" : "asc"
|
|
60
60
|
});
|
|
61
|
-
},
|
|
61
|
+
}, M = (t) => t === void 0 ? "-" : t < 1024 ? `${t} B` : t < 1024 * 1024 ? `${(t / 1024).toFixed(1)} KB` : `${(t / (1024 * 1024)).toFixed(1)} MB`, v = (t) => t ? t.toLocaleDateString("en-US", {
|
|
62
62
|
month: "short",
|
|
63
63
|
day: "numeric",
|
|
64
64
|
year: "numeric"
|
|
65
|
-
}) : "-",
|
|
65
|
+
}) : "-", f = (t) => {
|
|
66
66
|
const e = () => d.sortConfig(), i = () => e().field === t.field;
|
|
67
67
|
return (() => {
|
|
68
|
-
var
|
|
69
|
-
return
|
|
68
|
+
var l = fe();
|
|
69
|
+
return m(l, c(ce, {
|
|
70
70
|
get class() {
|
|
71
|
-
return
|
|
71
|
+
return R("w-3 h-3 transition-transform duration-150", i() && e().direction === "asc" && "rotate-180");
|
|
72
72
|
}
|
|
73
|
-
})),
|
|
73
|
+
})), P(() => I(l, R("ml-1 transition-all duration-150", i() ? "opacity-100" : "opacity-0 group-hover:opacity-40"))), l;
|
|
74
74
|
})();
|
|
75
|
-
},
|
|
76
|
-
var
|
|
77
|
-
const t = ((
|
|
75
|
+
}, h = Q("(min-width: 640px)"), b = Q("(min-width: 768px)"), [T, H] = oe(null), U = le(T), D = (t, e, i) => Math.max(e, Math.min(i, t)), g = V(() => {
|
|
76
|
+
var k;
|
|
77
|
+
const t = ((k = U()) == null ? void 0 : k.width) ?? 0, e = h(), i = b(), l = d.listColumnRatios(), u = 160, x = 120, $ = 80, S = 128, s = 96;
|
|
78
78
|
if (!e || t <= 0)
|
|
79
79
|
return {
|
|
80
80
|
width: t,
|
|
81
81
|
showModified: e,
|
|
82
82
|
showSize: i,
|
|
83
|
-
minName:
|
|
84
|
-
minModified:
|
|
85
|
-
minSize:
|
|
86
|
-
modifiedWidth:
|
|
87
|
-
sizeWidth:
|
|
83
|
+
minName: u,
|
|
84
|
+
minModified: x,
|
|
85
|
+
minSize: $,
|
|
86
|
+
modifiedWidth: S,
|
|
87
|
+
sizeWidth: s
|
|
88
88
|
};
|
|
89
89
|
if (!i) {
|
|
90
|
-
const
|
|
91
|
-
let
|
|
92
|
-
return
|
|
90
|
+
const W = l.size, _ = Math.max(0, 1 - W);
|
|
91
|
+
let z = (_ > 0 ? l.modifiedAt / _ : l.modifiedAt) * t;
|
|
92
|
+
return z = D(z, x, Math.max(x, t - u)), {
|
|
93
93
|
width: t,
|
|
94
94
|
showModified: e,
|
|
95
95
|
showSize: i,
|
|
96
|
-
minName:
|
|
97
|
-
minModified:
|
|
98
|
-
minSize:
|
|
99
|
-
modifiedWidth:
|
|
96
|
+
minName: u,
|
|
97
|
+
minModified: x,
|
|
98
|
+
minSize: $,
|
|
99
|
+
modifiedWidth: z,
|
|
100
100
|
sizeWidth: 0
|
|
101
101
|
};
|
|
102
102
|
}
|
|
103
|
-
let
|
|
104
|
-
const
|
|
105
|
-
if (
|
|
106
|
-
const
|
|
107
|
-
|
|
103
|
+
let o = Math.max(x, l.modifiedAt * t), a = Math.max($, l.size * t);
|
|
104
|
+
const y = Math.max(0, t - u);
|
|
105
|
+
if (o + a > y) {
|
|
106
|
+
const W = o + a - y, _ = Math.max(0, o - x), z = Math.max(0, a - $), F = _ + z;
|
|
107
|
+
F > 0 && (o -= W * (_ / F), a -= W * (z / F));
|
|
108
108
|
}
|
|
109
|
-
return
|
|
109
|
+
return o = Math.max(x, o), a = Math.max($, a), {
|
|
110
110
|
width: t,
|
|
111
111
|
showModified: e,
|
|
112
112
|
showSize: i,
|
|
113
|
-
minName:
|
|
114
|
-
minModified:
|
|
115
|
-
minSize:
|
|
116
|
-
modifiedWidth:
|
|
117
|
-
sizeWidth:
|
|
113
|
+
minName: u,
|
|
114
|
+
minModified: x,
|
|
115
|
+
minSize: $,
|
|
116
|
+
modifiedWidth: o,
|
|
117
|
+
sizeWidth: a
|
|
118
118
|
};
|
|
119
|
-
}),
|
|
120
|
-
const e =
|
|
119
|
+
}), A = () => g().modifiedWidth, L = () => g().sizeWidth, B = (t) => {
|
|
120
|
+
const e = g();
|
|
121
121
|
if (!e.showModified || e.width <= 0) return;
|
|
122
122
|
if (!e.showSize) {
|
|
123
|
-
const
|
|
124
|
-
if (
|
|
125
|
-
const
|
|
126
|
-
if (
|
|
127
|
-
const
|
|
123
|
+
const k = d.listColumnRatios().size, W = Math.max(0, 1 - k);
|
|
124
|
+
if (W <= 0) return;
|
|
125
|
+
const _ = e.width, z = e.modifiedWidth, F = Math.max(0, _ - z), q = e.minName - F, G = z - e.minModified, E = D(t, q, G);
|
|
126
|
+
if (E === 0) return;
|
|
127
|
+
const J = F + E, Z = z - E, ee = J / _ * W, te = Z / _ * W;
|
|
128
128
|
d.setListColumnRatios({
|
|
129
|
-
name:
|
|
130
|
-
modifiedAt:
|
|
131
|
-
size:
|
|
129
|
+
name: ee,
|
|
130
|
+
modifiedAt: te,
|
|
131
|
+
size: k
|
|
132
132
|
});
|
|
133
133
|
return;
|
|
134
134
|
}
|
|
135
|
-
const i = e.width,
|
|
136
|
-
if (
|
|
137
|
-
const
|
|
135
|
+
const i = e.width, l = e.modifiedWidth, u = e.sizeWidth, x = Math.max(0, i - l - u), $ = e.minName - x, S = l - e.minModified, s = D(t, $, S);
|
|
136
|
+
if (s === 0) return;
|
|
137
|
+
const o = x + s, a = l - s;
|
|
138
138
|
d.setListColumnRatios({
|
|
139
|
-
name:
|
|
140
|
-
modifiedAt:
|
|
141
|
-
size:
|
|
139
|
+
name: o / i,
|
|
140
|
+
modifiedAt: a / i,
|
|
141
|
+
size: u / i
|
|
142
142
|
});
|
|
143
143
|
}, n = (t) => {
|
|
144
|
-
const e =
|
|
144
|
+
const e = g();
|
|
145
145
|
if (!e.showSize || e.width <= 0) return;
|
|
146
|
-
const i = e.width,
|
|
147
|
-
if (
|
|
148
|
-
const
|
|
146
|
+
const i = e.width, l = e.modifiedWidth, u = e.sizeWidth, x = e.minModified - l, $ = u - e.minSize, S = D(t, x, $);
|
|
147
|
+
if (S === 0) return;
|
|
148
|
+
const s = l + S, o = u - S, a = Math.max(0, i - s - o);
|
|
149
149
|
d.setListColumnRatios({
|
|
150
|
-
name:
|
|
151
|
-
modifiedAt:
|
|
152
|
-
size:
|
|
150
|
+
name: a / i,
|
|
151
|
+
modifiedAt: s / i,
|
|
152
|
+
size: o / i
|
|
153
153
|
});
|
|
154
154
|
};
|
|
155
155
|
return (() => {
|
|
156
|
-
var t =
|
|
157
|
-
|
|
158
|
-
var
|
|
159
|
-
return
|
|
156
|
+
var t = we(), e = t.firstChild, i = e.firstChild, l = i.firstChild, u = l.firstChild, x = u.firstChild, $ = x.nextSibling;
|
|
157
|
+
$.firstChild;
|
|
158
|
+
var S = e.nextSibling;
|
|
159
|
+
return ne(H, e), l.$$click = () => w("name"), m($, c(f, {
|
|
160
160
|
field: "name"
|
|
161
|
-
}), null),
|
|
161
|
+
}), null), m(i, c(C, {
|
|
162
162
|
get when() {
|
|
163
|
-
return
|
|
163
|
+
return g().showModified;
|
|
164
164
|
},
|
|
165
165
|
get children() {
|
|
166
|
-
return c(
|
|
166
|
+
return c(j, {
|
|
167
167
|
direction: "horizontal",
|
|
168
|
-
onResize:
|
|
168
|
+
onResize: B
|
|
169
169
|
});
|
|
170
170
|
}
|
|
171
|
-
}), null),
|
|
171
|
+
}), null), m(e, c(C, {
|
|
172
172
|
get when() {
|
|
173
|
-
return
|
|
173
|
+
return g().showModified;
|
|
174
174
|
},
|
|
175
175
|
get children() {
|
|
176
|
-
var s =
|
|
177
|
-
return
|
|
176
|
+
var s = xe(), o = s.firstChild;
|
|
177
|
+
return o.firstChild, o.$$click = () => w("modifiedAt"), m(o, c(f, {
|
|
178
178
|
field: "modifiedAt"
|
|
179
|
-
}), null),
|
|
179
|
+
}), null), m(s, c(C, {
|
|
180
180
|
get when() {
|
|
181
|
-
return
|
|
181
|
+
return g().showSize;
|
|
182
182
|
},
|
|
183
183
|
get children() {
|
|
184
|
-
return c(
|
|
184
|
+
return c(j, {
|
|
185
185
|
direction: "horizontal",
|
|
186
186
|
onResize: n
|
|
187
187
|
});
|
|
188
188
|
}
|
|
189
|
-
}), null),
|
|
189
|
+
}), null), P((a) => {
|
|
190
|
+
var y = R("relative shrink-0", g().showSize && "border-r border-border"), k = `${A()}px`;
|
|
191
|
+
return y !== a.e && I(s, a.e = y), k !== a.t && N(s, "width", a.t = k), a;
|
|
192
|
+
}, {
|
|
193
|
+
e: void 0,
|
|
194
|
+
t: void 0
|
|
195
|
+
}), s;
|
|
190
196
|
}
|
|
191
|
-
}), null),
|
|
197
|
+
}), null), m(e, c(C, {
|
|
192
198
|
get when() {
|
|
193
|
-
return
|
|
199
|
+
return g().showSize;
|
|
194
200
|
},
|
|
195
201
|
get children() {
|
|
196
|
-
var s =
|
|
197
|
-
return
|
|
202
|
+
var s = ge(), o = s.firstChild;
|
|
203
|
+
return o.firstChild, o.$$click = () => w("size"), m(o, c(f, {
|
|
198
204
|
field: "size"
|
|
199
|
-
}), null),
|
|
205
|
+
}), null), P((a) => N(s, "width", `${L()}px`)), s;
|
|
200
206
|
}
|
|
201
|
-
}), null),
|
|
207
|
+
}), null), m(S, c(C, {
|
|
202
208
|
get when() {
|
|
203
209
|
return d.currentFiles().length > 0;
|
|
204
210
|
},
|
|
205
211
|
get fallback() {
|
|
206
212
|
return (() => {
|
|
207
|
-
var s =
|
|
208
|
-
return
|
|
213
|
+
var s = pe();
|
|
214
|
+
return m(s, c(C, {
|
|
209
215
|
get when() {
|
|
210
216
|
return d.filterQuery().trim();
|
|
211
217
|
},
|
|
212
218
|
get fallback() {
|
|
213
|
-
return
|
|
219
|
+
return ze();
|
|
214
220
|
},
|
|
215
221
|
get children() {
|
|
216
222
|
return [(() => {
|
|
217
|
-
var
|
|
218
|
-
return
|
|
223
|
+
var o = ve(), a = o.firstChild, y = a.nextSibling;
|
|
224
|
+
return y.nextSibling, m(o, () => d.filterQuery(), y), o;
|
|
219
225
|
})(), (() => {
|
|
220
|
-
var
|
|
221
|
-
return
|
|
226
|
+
var o = $e();
|
|
227
|
+
return o.$$click = () => d.setFilterQuery(""), o;
|
|
222
228
|
})()];
|
|
223
229
|
}
|
|
224
230
|
})), s;
|
|
225
231
|
})();
|
|
226
232
|
},
|
|
227
233
|
get children() {
|
|
228
|
-
return c(
|
|
234
|
+
return c(X, {
|
|
229
235
|
get each() {
|
|
230
236
|
return d.currentFiles();
|
|
231
237
|
},
|
|
232
|
-
children: (s,
|
|
238
|
+
children: (s, o) => c(Se, {
|
|
233
239
|
item: s,
|
|
234
|
-
formatSize:
|
|
235
|
-
formatDate:
|
|
240
|
+
formatSize: M,
|
|
241
|
+
formatDate: v,
|
|
236
242
|
get index() {
|
|
237
|
-
return
|
|
243
|
+
return o();
|
|
238
244
|
},
|
|
239
245
|
get showModified() {
|
|
240
|
-
return
|
|
246
|
+
return g().showModified;
|
|
241
247
|
},
|
|
242
248
|
get showSize() {
|
|
243
|
-
return
|
|
249
|
+
return g().showSize;
|
|
244
250
|
},
|
|
245
251
|
get modifiedWidthPx() {
|
|
246
|
-
return
|
|
252
|
+
return A();
|
|
247
253
|
},
|
|
248
254
|
get sizeWidthPx() {
|
|
249
|
-
return
|
|
255
|
+
return L();
|
|
250
256
|
}
|
|
251
257
|
})
|
|
252
258
|
});
|
|
253
259
|
}
|
|
254
|
-
})),
|
|
260
|
+
})), P((s) => {
|
|
261
|
+
var o = R("flex flex-col h-full min-h-0", r.class), a = R("relative flex-1 min-w-0", g().showModified && "border-r border-border");
|
|
262
|
+
return o !== s.e && I(t, s.e = o), a !== s.t && I(i, s.t = a), s;
|
|
263
|
+
}, {
|
|
264
|
+
e: void 0,
|
|
265
|
+
t: void 0
|
|
266
|
+
}), t;
|
|
255
267
|
})();
|
|
256
268
|
}
|
|
257
269
|
function Se(r) {
|
|
258
|
-
const d =
|
|
259
|
-
let
|
|
260
|
-
const
|
|
261
|
-
|
|
262
|
-
},
|
|
263
|
-
|
|
264
|
-
},
|
|
265
|
-
|
|
266
|
-
},
|
|
267
|
-
|
|
268
|
-
},
|
|
269
|
-
if (!
|
|
270
|
-
if (
|
|
270
|
+
const d = Y(), w = () => d.isSelected(r.item.id), M = () => d.getFilterMatch(r.item.name), v = se(() => r.item), f = me(d, v);
|
|
271
|
+
let h;
|
|
272
|
+
const b = () => h === "touch" || h === "pen", T = (n) => {
|
|
273
|
+
h = n.pointerType, f.onPointerDown(n);
|
|
274
|
+
}, H = (n) => {
|
|
275
|
+
h = n.pointerType, f.onPointerMove(n);
|
|
276
|
+
}, U = (n) => {
|
|
277
|
+
h = n.pointerType, f.onPointerUp();
|
|
278
|
+
}, D = (n) => {
|
|
279
|
+
h = n.pointerType, f.onPointerCancel();
|
|
280
|
+
}, g = (n) => {
|
|
281
|
+
if (!f.consumeClickSuppression(n)) {
|
|
282
|
+
if (b()) {
|
|
271
283
|
d.openItem(r.item);
|
|
272
284
|
return;
|
|
273
285
|
}
|
|
274
286
|
d.selectItem(r.item.id, n.metaKey || n.ctrlKey);
|
|
275
287
|
}
|
|
276
|
-
},
|
|
277
|
-
|
|
278
|
-
},
|
|
279
|
-
if (n.preventDefault(), n.stopPropagation(),
|
|
280
|
-
|
|
281
|
-
const t = d.selectedItems(), e = d.currentFiles(), i = t.size > 0 ? e.filter((
|
|
288
|
+
}, A = () => {
|
|
289
|
+
b() || d.openItem(r.item);
|
|
290
|
+
}, L = (n) => {
|
|
291
|
+
if (n.preventDefault(), n.stopPropagation(), b()) return;
|
|
292
|
+
w() || d.selectItem(r.item.id, !1);
|
|
293
|
+
const t = d.selectedItems(), e = d.currentFiles(), i = t.size > 0 ? e.filter((l) => t.has(l.id)) : [r.item];
|
|
282
294
|
d.showContextMenu({
|
|
283
295
|
x: n.clientX,
|
|
284
296
|
y: n.clientY,
|
|
285
297
|
items: i
|
|
286
298
|
});
|
|
287
|
-
},
|
|
299
|
+
}, B = () => r.item.type === "folder" ? de : ae(r.item.extension);
|
|
288
300
|
return (() => {
|
|
289
|
-
var n =
|
|
290
|
-
return n.addEventListener("pointercancel",
|
|
301
|
+
var n = Me(), t = n.firstChild, e = t.firstChild;
|
|
302
|
+
return n.addEventListener("pointercancel", D), n.$$pointerup = U, n.$$pointermove = H, n.$$pointerdown = T, n.$$contextmenu = L, n.$$dblclick = A, n.$$click = g, m(e, c(re, {
|
|
291
303
|
get component() {
|
|
292
|
-
return
|
|
304
|
+
return B();
|
|
293
305
|
},
|
|
294
306
|
class: "w-4 h-4"
|
|
295
|
-
})),
|
|
307
|
+
})), m(t, c(be, {
|
|
296
308
|
get name() {
|
|
297
309
|
return r.item.name;
|
|
298
310
|
},
|
|
299
311
|
get match() {
|
|
300
|
-
return
|
|
312
|
+
return M();
|
|
301
313
|
}
|
|
302
|
-
}), null),
|
|
314
|
+
}), null), m(n, c(C, {
|
|
303
315
|
get when() {
|
|
304
316
|
return r.showModified;
|
|
305
317
|
},
|
|
306
318
|
get children() {
|
|
307
|
-
var i =
|
|
308
|
-
return
|
|
319
|
+
var i = K();
|
|
320
|
+
return m(i, () => r.formatDate(r.item.modifiedAt)), P((l) => N(i, "width", `${r.modifiedWidthPx}px`)), i;
|
|
309
321
|
}
|
|
310
|
-
}), null),
|
|
322
|
+
}), null), m(n, c(C, {
|
|
311
323
|
get when() {
|
|
312
324
|
return r.showSize;
|
|
313
325
|
},
|
|
314
326
|
get children() {
|
|
315
|
-
var i =
|
|
316
|
-
return
|
|
317
|
-
var
|
|
318
|
-
return () =>
|
|
319
|
-
})()),
|
|
327
|
+
var i = K();
|
|
328
|
+
return m(i, (() => {
|
|
329
|
+
var l = O(() => r.item.type === "folder");
|
|
330
|
+
return () => l() ? "-" : r.formatSize(r.item.size);
|
|
331
|
+
})()), P((l) => N(i, "width", `${r.sizeWidthPx}px`)), i;
|
|
320
332
|
}
|
|
321
|
-
}), null),
|
|
322
|
-
var
|
|
333
|
+
}), null), P((i) => {
|
|
334
|
+
var l = R(
|
|
323
335
|
"group w-full flex items-center text-xs cursor-pointer",
|
|
324
336
|
"transition-all duration-100",
|
|
325
337
|
"hover:bg-accent/50",
|
|
326
338
|
"focus:outline-none focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-ring",
|
|
327
|
-
|
|
339
|
+
w() && "bg-accent text-accent-foreground",
|
|
328
340
|
// Staggered animation on mount
|
|
329
341
|
"animate-in fade-in slide-in-from-top-2"
|
|
330
|
-
),
|
|
331
|
-
return
|
|
342
|
+
), u = `${Math.min(r.index * 20, 200)}ms`;
|
|
343
|
+
return l !== i.e && I(n, i.e = l), u !== i.t && N(n, "animation-delay", i.t = u), i;
|
|
332
344
|
}, {
|
|
333
345
|
e: void 0,
|
|
334
346
|
t: void 0
|
|
335
347
|
}), n;
|
|
336
348
|
})();
|
|
337
349
|
}
|
|
338
|
-
|
|
350
|
+
ie(["click", "dblclick", "contextmenu", "pointerdown", "pointermove", "pointerup"]);
|
|
339
351
|
export {
|
|
340
|
-
|
|
352
|
+
Ne as FileListView
|
|
341
353
|
};
|
package/dist/index8.js
CHANGED
|
@@ -4,9 +4,9 @@ import { cn as p } from "./index69.js";
|
|
|
4
4
|
import { lockBodyStyle as G } from "./index72.js";
|
|
5
5
|
var L = /* @__PURE__ */ C("<div role=separator style=touch-action:none><div></div><div>");
|
|
6
6
|
function T(l) {
|
|
7
|
-
const [s,
|
|
7
|
+
const [s, v] = E(!1);
|
|
8
8
|
let r = 0, o = 0, c = null, n, u = null, i = null;
|
|
9
|
-
const
|
|
9
|
+
const g = (t) => {
|
|
10
10
|
if (!t) {
|
|
11
11
|
i == null || i(), i = null;
|
|
12
12
|
return;
|
|
@@ -19,9 +19,9 @@ function T(l) {
|
|
|
19
19
|
if (!s()) return;
|
|
20
20
|
u !== null && typeof cancelAnimationFrame < "u" && (cancelAnimationFrame(u), u = null);
|
|
21
21
|
const t = o - r;
|
|
22
|
-
t !== 0 && (l.onResize(t), r = o),
|
|
22
|
+
t !== 0 && (l.onResize(t), r = o), v(!1), c = null, g(!1);
|
|
23
23
|
}, h = (t) => l.direction === "horizontal" ? t.clientX : t.clientY, x = (t) => {
|
|
24
|
-
t.pointerType === "mouse" && t.button !== 0 || (t.preventDefault(), c = t.pointerId,
|
|
24
|
+
t.pointerType === "mouse" && t.button !== 0 || (t.preventDefault(), c = t.pointerId, v(!0), r = h(t), o = r, g(!0), n == null || n.setPointerCapture(t.pointerId));
|
|
25
25
|
}, $ = (t) => {
|
|
26
26
|
if (!(!s() || c !== t.pointerId) && (o = h(t), u === null)) {
|
|
27
27
|
if (typeof requestAnimationFrame > "u") {
|
|
@@ -51,7 +51,7 @@ function T(l) {
|
|
|
51
51
|
t.addEventListener("pointercancel", y), t.$$pointerup = y, t.$$pointermove = $, t.$$pointerdown = x;
|
|
52
52
|
var b = n;
|
|
53
53
|
return typeof b == "function" ? q(b, t) : n = t, F((e) => {
|
|
54
|
-
var z = p("absolute z-20 group", d() ? "top-0 right-0 w-1 h-full cursor-col-resize hover:w-1.5" : "left-0 top-0 h-1 w-full cursor-row-resize hover:h-1.5", "transition-all duration-100", s() && "bg-primary", !s() && "hover:bg-primary/50", l.class), w = d() ? "vertical" : "horizontal", P = p("absolute pointer-events-none", d() ? "top-0 bottom-0 left-1/2 w-px -translate-x-1/2" : "left-0 right-0 top-1/2 h-px -translate-y-1/2", s() && "bg-primary opacity-100", !s() && "bg-
|
|
54
|
+
var z = p("absolute z-20 group", d() ? "top-0 right-0 w-1 h-full cursor-col-resize hover:w-1.5" : "left-0 top-0 h-1 w-full cursor-row-resize hover:h-1.5", "transition-all duration-100", s() && "bg-primary", !s() && "hover:bg-primary/50", l.class), w = d() ? "vertical" : "horizontal", P = p("absolute pointer-events-none", d() ? "top-0 bottom-0 left-1/2 w-px -translate-x-1/2" : "left-0 right-0 top-1/2 h-px -translate-y-1/2", s() && "bg-primary opacity-100", !s() && "bg-primary/50 opacity-0 group-hover:opacity-100"), I = p("absolute opacity-0 group-hover:opacity-100 transition-opacity duration-150", d() ? "top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-0.5 h-8 rounded-full bg-muted-foreground/30" : "left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 h-0.5 w-8 rounded-full bg-muted-foreground/30");
|
|
55
55
|
return z !== e.e && f(t, e.e = z), w !== e.t && S(t, "aria-orientation", e.t = w), P !== e.a && f(a, e.a = P), I !== e.o && f(D, e.o = I), e;
|
|
56
56
|
}, {
|
|
57
57
|
e: void 0,
|