@floegence/floe-webapp-core 0.30.0 → 0.32.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/file-browser/FileBrowser.d.ts +10 -0
- package/dist/components/file-browser/FileBrowser.js +38 -32
- package/dist/components/file-browser/FileBrowserContext.d.ts +5 -0
- package/dist/components/file-browser/FileBrowserContext.js +208 -198
- package/dist/components/loading/LoadingOverlay.d.ts +1 -1
- package/dist/components/loading/LoadingOverlay.js +12 -12
- package/dist/components/loading/Skeleton.d.ts +1 -1
- package/dist/components/loading/Skeleton.js +7 -7
- package/dist/components/loading/SnakeLoader.d.ts +1 -1
- package/dist/components/loading/SnakeLoader.js +35 -82
- package/dist/styles.css +1 -1
- package/dist/ui.css +57 -0
- package/package.json +2 -2
|
@@ -1,164 +1,164 @@
|
|
|
1
|
-
import { createComponent as
|
|
2
|
-
import { createSignal as
|
|
3
|
-
import { useResolvedFloeConfig as
|
|
4
|
-
import { deferAfterPaint as
|
|
5
|
-
const
|
|
1
|
+
import { createComponent as ot } from "solid-js/web";
|
|
2
|
+
import { createSignal as p, createEffect as I, createMemo as z, useContext as it, createContext as st, untrack as rt } from "solid-js";
|
|
3
|
+
import { useResolvedFloeConfig as ct } from "../../context/FloeConfigContext.js";
|
|
4
|
+
import { deferAfterPaint as at, deferNonBlocking as y } from "../../utils/defer.js";
|
|
5
|
+
const ue = st(), b = {
|
|
6
6
|
name: 0.65,
|
|
7
7
|
modifiedAt: 0.2,
|
|
8
8
|
size: 0.15
|
|
9
|
-
},
|
|
10
|
-
function
|
|
11
|
-
const
|
|
12
|
-
return Math.max(
|
|
9
|
+
}, oe = "fileBrowser:listColumnRatios", ie = 220, lt = "fileBrowser:sidebarWidth", dt = 160, ft = 520, se = "fileBrowser:viewMode", re = "fileBrowser:sortConfig", ce = "fileBrowser:expandedFolders", ae = "fileBrowser:sidebarCollapsed";
|
|
10
|
+
function le(n, r) {
|
|
11
|
+
const s = typeof n == "number" && Number.isFinite(n) ? n : r;
|
|
12
|
+
return Math.max(dt, Math.min(ft, Math.round(s)));
|
|
13
13
|
}
|
|
14
|
-
function
|
|
15
|
-
return n === "list" || n === "grid" ? n :
|
|
14
|
+
function ut(n, r) {
|
|
15
|
+
return n === "list" || n === "grid" ? n : r;
|
|
16
16
|
}
|
|
17
|
-
function
|
|
18
|
-
if (!n || typeof n != "object") return
|
|
19
|
-
const
|
|
20
|
-
return !(f === "name" || f === "size" || f === "modifiedAt" || f === "type") || !(l === "asc" || l === "desc") ?
|
|
17
|
+
function mt(n, r) {
|
|
18
|
+
if (!n || typeof n != "object") return r;
|
|
19
|
+
const s = n, f = s.field, l = s.direction;
|
|
20
|
+
return !(f === "name" || f === "size" || f === "modifiedAt" || f === "type") || !(l === "asc" || l === "desc") ? r : {
|
|
21
21
|
field: f,
|
|
22
22
|
direction: l
|
|
23
23
|
};
|
|
24
24
|
}
|
|
25
|
-
function
|
|
25
|
+
function ht(n) {
|
|
26
26
|
if (!Array.isArray(n)) return ["/"];
|
|
27
|
-
const
|
|
27
|
+
const r = [], s = /* @__PURE__ */ new Set();
|
|
28
28
|
for (const f of n) {
|
|
29
29
|
if (typeof f != "string") continue;
|
|
30
30
|
const l = f.trim();
|
|
31
|
-
!l ||
|
|
31
|
+
!l || s.has(l) || (s.add(l), r.push(l));
|
|
32
32
|
}
|
|
33
|
-
return
|
|
33
|
+
return s.has("/") || r.unshift("/"), r;
|
|
34
34
|
}
|
|
35
|
-
function
|
|
36
|
-
const
|
|
35
|
+
function de(n) {
|
|
36
|
+
const r = Number.isFinite(n.name) ? n.name : b.name, s = Number.isFinite(n.modifiedAt) ? n.modifiedAt : b.modifiedAt, f = Number.isFinite(n.size) ? n.size : b.size, l = Math.max(0, r), m = Math.max(0, s), C = Math.max(0, f), w = l + m + C;
|
|
37
37
|
return w <= 0 ? b : {
|
|
38
38
|
name: l / w,
|
|
39
39
|
modifiedAt: m / w,
|
|
40
|
-
size:
|
|
40
|
+
size: C / w
|
|
41
41
|
};
|
|
42
42
|
}
|
|
43
|
-
function
|
|
44
|
-
if (!
|
|
45
|
-
const
|
|
43
|
+
function fe(n, r) {
|
|
44
|
+
if (!r) return [];
|
|
45
|
+
const s = [];
|
|
46
46
|
let f = 0;
|
|
47
|
-
for (const l of
|
|
47
|
+
for (const l of r) {
|
|
48
48
|
const m = n.indexOf(l, f);
|
|
49
49
|
if (m === -1) return null;
|
|
50
|
-
|
|
50
|
+
s.push(m), f = m + 1;
|
|
51
51
|
}
|
|
52
|
-
return
|
|
52
|
+
return s;
|
|
53
53
|
}
|
|
54
|
-
function
|
|
55
|
-
const
|
|
54
|
+
function Ct(n) {
|
|
55
|
+
const r = ct(), s = (e) => {
|
|
56
56
|
const t = (e ?? "").trim();
|
|
57
57
|
return t === "" ? "/" : t;
|
|
58
|
-
}, f = (n.persistenceKey ?? "").trim(), l = !!f, m = (e) => f ? `${f}:${e}` : e,
|
|
58
|
+
}, f = (n.persistenceKey ?? "").trim(), l = !!f, m = (e) => f ? `${f}:${e}` : e, C = l ? ut(r.persist.load(m(se), n.initialViewMode ?? "list"), n.initialViewMode ?? "list") : n.initialViewMode ?? "list", w = {
|
|
59
59
|
field: "name",
|
|
60
60
|
direction: "asc"
|
|
61
|
-
},
|
|
61
|
+
}, me = l ? mt(r.persist.load(m(re), w), w) : w, he = l ? ht(r.persist.load(m(ce), ["/"])) : ["/"], pe = l ? r.persist.load(m(ae), !1) === !0 : !1, Se = () => typeof n.path == "string" ? s(n.path) : s(n.initialPath ?? "/"), [x, D] = p(Se()), [E, M] = p(/* @__PURE__ */ new Set()), [N, we] = p(C), [F, Ie] = p(me), ge = de(r.persist.load(oe, n.initialListColumnRatios ?? b)), [W, ye] = p(ge), K = (n.sidebarWidthStorageKey ?? "").trim() || lt, Ce = le(r.persist.load(K, n.initialSidebarWidth ?? ie), n.initialSidebarWidth ?? ie), [U, xe] = p(Ce), [v, k] = p(new Set(he)), [V, Ae] = p(pe), [Pe, G] = p(null), [X, Y] = p(""), [_, R] = p(""), [be, q] = p(!1);
|
|
62
62
|
let L = 0;
|
|
63
|
-
|
|
64
|
-
const e =
|
|
63
|
+
I(() => {
|
|
64
|
+
const e = X().trim();
|
|
65
65
|
L += 1;
|
|
66
66
|
const t = L;
|
|
67
67
|
if (!e) {
|
|
68
68
|
R("");
|
|
69
69
|
return;
|
|
70
70
|
}
|
|
71
|
-
|
|
71
|
+
at(() => {
|
|
72
72
|
t === L && R(e);
|
|
73
73
|
});
|
|
74
|
-
}),
|
|
75
|
-
|
|
76
|
-
}),
|
|
77
|
-
|
|
78
|
-
}),
|
|
79
|
-
l &&
|
|
80
|
-
}),
|
|
81
|
-
l &&
|
|
82
|
-
}),
|
|
74
|
+
}), I(() => {
|
|
75
|
+
r.persist.debouncedSave(oe, W());
|
|
76
|
+
}), I(() => {
|
|
77
|
+
r.persist.debouncedSave(K, U());
|
|
78
|
+
}), I(() => {
|
|
79
|
+
l && r.persist.debouncedSave(m(se), N());
|
|
80
|
+
}), I(() => {
|
|
81
|
+
l && r.persist.debouncedSave(m(re), F());
|
|
82
|
+
}), I(() => {
|
|
83
83
|
if (!l) return;
|
|
84
|
-
const e = [...
|
|
85
|
-
|
|
86
|
-
}),
|
|
87
|
-
l &&
|
|
84
|
+
const e = [...v()].sort((t, o) => t.localeCompare(o));
|
|
85
|
+
r.persist.debouncedSave(m(ce), e);
|
|
86
|
+
}), I(() => {
|
|
87
|
+
l && r.persist.debouncedSave(m(ae), V());
|
|
88
88
|
});
|
|
89
|
-
const
|
|
90
|
-
let
|
|
89
|
+
const Ee = (e) => we(e), Me = (e) => Ie(e), Fe = () => n.homeLabel ?? "Root", [Q, A] = p([]);
|
|
90
|
+
let g = null, B = {
|
|
91
91
|
top: 0,
|
|
92
92
|
left: 0
|
|
93
93
|
};
|
|
94
|
-
const
|
|
95
|
-
const t =
|
|
94
|
+
const j = () => n.files, H = (e) => {
|
|
95
|
+
const t = s(e);
|
|
96
96
|
if (t === "/") return "/";
|
|
97
97
|
const o = t.split("/").filter(Boolean);
|
|
98
98
|
return o.pop(), o.length ? "/" + o.join("/") : "/";
|
|
99
|
-
},
|
|
100
|
-
const o =
|
|
99
|
+
}, ve = (e, t) => {
|
|
100
|
+
const o = Q();
|
|
101
101
|
if (o.length === 0) return e;
|
|
102
102
|
let i = [...e];
|
|
103
|
-
const a =
|
|
104
|
-
for (const
|
|
105
|
-
switch (
|
|
103
|
+
const a = s(t);
|
|
104
|
+
for (const c of o)
|
|
105
|
+
switch (c.type) {
|
|
106
106
|
case "remove": {
|
|
107
|
-
const u = new Set(
|
|
108
|
-
i = i.filter((d) => !u.has(
|
|
107
|
+
const u = new Set(c.paths.map(s));
|
|
108
|
+
i = i.filter((d) => !u.has(s(d.path)));
|
|
109
109
|
break;
|
|
110
110
|
}
|
|
111
111
|
case "update": {
|
|
112
|
-
const u = c
|
|
112
|
+
const u = s(c.oldPath), d = i.findIndex((S) => s(S.path) === u);
|
|
113
113
|
if (d !== -1) {
|
|
114
|
-
const S =
|
|
115
|
-
|
|
114
|
+
const S = c.updates.path ?? i[d].path;
|
|
115
|
+
H(S) === a ? i[d] = {
|
|
116
116
|
...i[d],
|
|
117
|
-
...
|
|
117
|
+
...c.updates
|
|
118
118
|
} : i.splice(d, 1);
|
|
119
119
|
} else {
|
|
120
|
-
const S =
|
|
121
|
-
S &&
|
|
120
|
+
const S = c.updates.path;
|
|
121
|
+
S && H(S);
|
|
122
122
|
}
|
|
123
123
|
break;
|
|
124
124
|
}
|
|
125
125
|
case "insert": {
|
|
126
|
-
c
|
|
126
|
+
s(c.parentPath) === a && (i.some((d) => s(d.path) === s(c.item.path)) || i.push(c.item));
|
|
127
127
|
break;
|
|
128
128
|
}
|
|
129
129
|
}
|
|
130
130
|
return i;
|
|
131
|
-
},
|
|
131
|
+
}, _e = z(() => {
|
|
132
132
|
const e = /* @__PURE__ */ new Map(), t = (i) => {
|
|
133
133
|
for (const a of i)
|
|
134
|
-
a.type === "folder" && (e.set(
|
|
135
|
-
}, o =
|
|
134
|
+
a.type === "folder" && (e.set(s(a.path), a.children ?? []), a.children?.length && t(a.children));
|
|
135
|
+
}, o = j();
|
|
136
136
|
return e.set("/", o), t(o), e;
|
|
137
|
-
}),
|
|
138
|
-
const e =
|
|
139
|
-
let t =
|
|
140
|
-
t =
|
|
141
|
-
const o =
|
|
142
|
-
if (
|
|
137
|
+
}), Re = z(() => {
|
|
138
|
+
const e = s(x());
|
|
139
|
+
let t = _e().get(e) ?? [];
|
|
140
|
+
t = ve(t, e);
|
|
141
|
+
const o = F(), i = [...t].sort((c, u) => {
|
|
142
|
+
if (c.type !== u.type) return c.type === "folder" ? -1 : 1;
|
|
143
143
|
let d = 0;
|
|
144
144
|
switch (o.field) {
|
|
145
145
|
case "name":
|
|
146
|
-
d =
|
|
146
|
+
d = c.name.localeCompare(u.name);
|
|
147
147
|
break;
|
|
148
148
|
case "size":
|
|
149
|
-
d = (
|
|
149
|
+
d = (c.size ?? 0) - (u.size ?? 0);
|
|
150
150
|
break;
|
|
151
151
|
case "modifiedAt":
|
|
152
|
-
d = (
|
|
152
|
+
d = (c.modifiedAt?.getTime() ?? 0) - (u.modifiedAt?.getTime() ?? 0);
|
|
153
153
|
break;
|
|
154
154
|
case "type":
|
|
155
|
-
d = (
|
|
155
|
+
d = (c.extension ?? "").localeCompare(u.extension ?? "");
|
|
156
156
|
break;
|
|
157
157
|
}
|
|
158
158
|
return o.direction === "asc" ? d : -d;
|
|
159
159
|
}), a = /* @__PURE__ */ new Map();
|
|
160
|
-
for (const
|
|
161
|
-
a.set(
|
|
160
|
+
for (const c of i)
|
|
161
|
+
a.set(c.id, c.name.toLowerCase());
|
|
162
162
|
return {
|
|
163
163
|
items: i,
|
|
164
164
|
nameLowerById: a
|
|
@@ -167,203 +167,213 @@ function gt(n) {
|
|
|
167
167
|
const {
|
|
168
168
|
items: e,
|
|
169
169
|
nameLowerById: t
|
|
170
|
-
} =
|
|
170
|
+
} = Re(), i = _().trim().toLowerCase(), a = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new Map(), u = /* @__PURE__ */ new Map();
|
|
171
171
|
if (!i) {
|
|
172
|
-
for (let
|
|
173
|
-
const
|
|
174
|
-
|
|
172
|
+
for (let h = 0; h < e.length; h++) {
|
|
173
|
+
const P = e[h];
|
|
174
|
+
c.set(P.id, P), u.set(P.id, h);
|
|
175
175
|
}
|
|
176
176
|
return {
|
|
177
177
|
items: e,
|
|
178
178
|
matchById: a,
|
|
179
|
-
fileById:
|
|
179
|
+
fileById: c,
|
|
180
180
|
indexById: u
|
|
181
181
|
};
|
|
182
182
|
}
|
|
183
183
|
const d = [];
|
|
184
184
|
let S = 0;
|
|
185
|
-
for (const
|
|
186
|
-
const
|
|
187
|
-
|
|
188
|
-
matchedIndices:
|
|
189
|
-
}),
|
|
185
|
+
for (const h of e) {
|
|
186
|
+
const P = t.get(h.id) ?? h.name.toLowerCase(), ne = fe(P, i);
|
|
187
|
+
ne && (d.push(h), a.set(h.id, {
|
|
188
|
+
matchedIndices: ne
|
|
189
|
+
}), c.set(h.id, h), u.set(h.id, S), S += 1);
|
|
190
190
|
}
|
|
191
191
|
return {
|
|
192
192
|
items: d,
|
|
193
193
|
matchById: a,
|
|
194
|
-
fileById:
|
|
194
|
+
fileById: c,
|
|
195
195
|
indexById: u
|
|
196
196
|
};
|
|
197
|
-
}),
|
|
197
|
+
}), Le = () => O().items, $ = (e) => {
|
|
198
198
|
const t = O(), o = [];
|
|
199
199
|
for (const i of e) {
|
|
200
200
|
const a = t.fileById.get(i);
|
|
201
201
|
if (!a) continue;
|
|
202
|
-
const
|
|
202
|
+
const c = t.indexById.get(i);
|
|
203
203
|
o.push({
|
|
204
|
-
index:
|
|
204
|
+
index: c ?? Number.MAX_SAFE_INTEGER,
|
|
205
205
|
item: a
|
|
206
206
|
});
|
|
207
207
|
}
|
|
208
208
|
return o.sort((i, a) => i.index - a.index), o.map((i) => i.item);
|
|
209
|
-
},
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
const
|
|
209
|
+
}, J = () => {
|
|
210
|
+
M(/* @__PURE__ */ new Set()), Y(""), R(""), q(!1);
|
|
211
|
+
const e = n.onSelect;
|
|
212
|
+
y(() => e?.([]));
|
|
213
|
+
};
|
|
214
|
+
I(() => {
|
|
215
|
+
if (typeof n.path != "string") return;
|
|
216
|
+
const e = s(n.path);
|
|
217
|
+
e !== x() && (D(e), J());
|
|
218
|
+
});
|
|
219
|
+
const T = (e) => {
|
|
220
|
+
const t = s(e);
|
|
221
|
+
if (t === x()) return;
|
|
222
|
+
D(t), J();
|
|
223
|
+
const o = n.onNavigate;
|
|
224
|
+
y(() => o?.(t));
|
|
225
|
+
const i = n.onPathChange;
|
|
226
|
+
y(() => i?.(t, "user"));
|
|
227
|
+
}, Be = (e) => {
|
|
228
|
+
ye(de(e));
|
|
229
|
+
}, Oe = () => {
|
|
230
|
+
const e = x();
|
|
221
231
|
if (e === "/" || e === "") return;
|
|
222
232
|
const t = e.split("/").filter(Boolean);
|
|
223
233
|
t.pop(), T(t.length ? "/" + t.join("/") : "/");
|
|
224
|
-
},
|
|
234
|
+
}, Z = (e) => {
|
|
225
235
|
e.type === "folder" && (T(e.path), k((t) => {
|
|
226
236
|
const o = new Set(t);
|
|
227
237
|
return o.add(e.path), o;
|
|
228
238
|
}));
|
|
229
|
-
},
|
|
230
|
-
const o =
|
|
231
|
-
t ? i.has(e) ? i.delete(e) : i.add(e) : (i.clear(), i.add(e)),
|
|
239
|
+
}, Te = (e, t = !1) => {
|
|
240
|
+
const o = E(), i = t ? new Set(o) : /* @__PURE__ */ new Set();
|
|
241
|
+
t ? i.has(e) ? i.delete(e) : i.add(e) : (i.clear(), i.add(e)), M(i);
|
|
232
242
|
const a = n.onSelect;
|
|
233
243
|
if (a) {
|
|
234
|
-
const
|
|
235
|
-
|
|
236
|
-
const u =
|
|
244
|
+
const c = new Set(i);
|
|
245
|
+
y(() => {
|
|
246
|
+
const u = rt(() => $(c));
|
|
237
247
|
a(u);
|
|
238
248
|
});
|
|
239
249
|
}
|
|
240
|
-
},
|
|
241
|
-
|
|
250
|
+
}, ze = () => {
|
|
251
|
+
M(/* @__PURE__ */ new Set());
|
|
242
252
|
const e = n.onSelect;
|
|
243
|
-
|
|
244
|
-
},
|
|
253
|
+
y(() => e?.([]));
|
|
254
|
+
}, De = (e) => E().has(e), Ne = (e) => {
|
|
245
255
|
k((t) => {
|
|
246
256
|
const o = new Set(t);
|
|
247
257
|
return o.has(e) ? o.delete(e) : o.add(e), o;
|
|
248
258
|
});
|
|
249
|
-
},
|
|
250
|
-
|
|
251
|
-
},
|
|
252
|
-
|
|
253
|
-
},
|
|
254
|
-
const t =
|
|
259
|
+
}, We = (e) => v().has(e), Ke = () => Ae((e) => !e), Ue = (e) => {
|
|
260
|
+
xe((t) => le(e, t));
|
|
261
|
+
}, ke = (e) => G(e), Ve = () => G(null), Ge = (e) => {
|
|
262
|
+
Y(e);
|
|
263
|
+
}, Xe = (e) => {
|
|
264
|
+
const t = _().trim();
|
|
255
265
|
if (!t) return null;
|
|
256
|
-
const o =
|
|
266
|
+
const o = fe(e.toLowerCase(), t.toLowerCase());
|
|
257
267
|
return o ? {
|
|
258
268
|
matchedIndices: o
|
|
259
269
|
} : null;
|
|
260
|
-
},
|
|
270
|
+
}, Ye = (e) => O().matchById.get(e) ?? null, qe = () => $(E()), Qe = (e) => {
|
|
261
271
|
if (e.type === "folder")
|
|
262
|
-
|
|
272
|
+
Z(e);
|
|
263
273
|
else {
|
|
264
274
|
const t = n.onOpen;
|
|
265
|
-
|
|
275
|
+
y(() => t?.(e));
|
|
266
276
|
}
|
|
267
|
-
},
|
|
268
|
-
e.length !== 0 &&
|
|
277
|
+
}, je = (e) => {
|
|
278
|
+
e.length !== 0 && A((t) => [...t, {
|
|
269
279
|
type: "remove",
|
|
270
280
|
paths: e
|
|
271
281
|
}]);
|
|
272
|
-
},
|
|
273
|
-
|
|
282
|
+
}, He = (e, t) => {
|
|
283
|
+
A((o) => [...o, {
|
|
274
284
|
type: "update",
|
|
275
285
|
oldPath: e,
|
|
276
286
|
updates: t
|
|
277
287
|
}]);
|
|
278
|
-
},
|
|
279
|
-
|
|
288
|
+
}, $e = (e, t) => {
|
|
289
|
+
A((o) => [...o, {
|
|
280
290
|
type: "insert",
|
|
281
291
|
parentPath: e,
|
|
282
292
|
item: t
|
|
283
293
|
}]);
|
|
284
|
-
},
|
|
285
|
-
|
|
286
|
-
},
|
|
287
|
-
|
|
288
|
-
},
|
|
289
|
-
|
|
290
|
-
},
|
|
291
|
-
top:
|
|
292
|
-
left:
|
|
294
|
+
}, Je = () => {
|
|
295
|
+
A([]);
|
|
296
|
+
}, Ze = () => {
|
|
297
|
+
A([]);
|
|
298
|
+
}, et = () => Q().length > 0, tt = (e) => {
|
|
299
|
+
g = e;
|
|
300
|
+
}, ee = () => g ? {
|
|
301
|
+
top: g.scrollTop,
|
|
302
|
+
left: g.scrollLeft
|
|
293
303
|
} : {
|
|
294
304
|
top: 0,
|
|
295
305
|
left: 0
|
|
296
|
-
},
|
|
297
|
-
|
|
298
|
-
},
|
|
299
|
-
currentPath:
|
|
306
|
+
}, te = (e) => {
|
|
307
|
+
g && (g.scrollTop = e.top, g.scrollLeft = e.left);
|
|
308
|
+
}, nt = {
|
|
309
|
+
currentPath: x,
|
|
300
310
|
setCurrentPath: T,
|
|
301
|
-
navigateUp:
|
|
302
|
-
navigateTo:
|
|
303
|
-
homeLabel:
|
|
304
|
-
selectedItems: () =>
|
|
305
|
-
selectItem:
|
|
306
|
-
clearSelection:
|
|
307
|
-
isSelected:
|
|
308
|
-
getSelectedItemsList:
|
|
309
|
-
viewMode:
|
|
310
|
-
setViewMode:
|
|
311
|
-
sortConfig:
|
|
312
|
-
setSortConfig:
|
|
313
|
-
listColumnRatios:
|
|
314
|
-
setListColumnRatios:
|
|
315
|
-
expandedFolders:
|
|
316
|
-
toggleFolder:
|
|
317
|
-
isExpanded:
|
|
318
|
-
files:
|
|
319
|
-
currentFiles:
|
|
320
|
-
filterQuery:
|
|
321
|
-
setFilterQuery:
|
|
322
|
-
filterQueryApplied:
|
|
323
|
-
isFilterActive:
|
|
324
|
-
setFilterActive:
|
|
325
|
-
getFilterMatch:
|
|
326
|
-
getFilterMatchForId:
|
|
327
|
-
sidebarCollapsed:
|
|
328
|
-
toggleSidebar:
|
|
329
|
-
sidebarWidth:
|
|
330
|
-
setSidebarWidth:
|
|
331
|
-
contextMenu:
|
|
332
|
-
showContextMenu:
|
|
333
|
-
hideContextMenu:
|
|
334
|
-
openItem:
|
|
311
|
+
navigateUp: Oe,
|
|
312
|
+
navigateTo: Z,
|
|
313
|
+
homeLabel: Fe,
|
|
314
|
+
selectedItems: () => E(),
|
|
315
|
+
selectItem: Te,
|
|
316
|
+
clearSelection: ze,
|
|
317
|
+
isSelected: De,
|
|
318
|
+
getSelectedItemsList: qe,
|
|
319
|
+
viewMode: N,
|
|
320
|
+
setViewMode: Ee,
|
|
321
|
+
sortConfig: F,
|
|
322
|
+
setSortConfig: Me,
|
|
323
|
+
listColumnRatios: W,
|
|
324
|
+
setListColumnRatios: Be,
|
|
325
|
+
expandedFolders: v,
|
|
326
|
+
toggleFolder: Ne,
|
|
327
|
+
isExpanded: We,
|
|
328
|
+
files: j,
|
|
329
|
+
currentFiles: Le,
|
|
330
|
+
filterQuery: X,
|
|
331
|
+
setFilterQuery: Ge,
|
|
332
|
+
filterQueryApplied: _,
|
|
333
|
+
isFilterActive: be,
|
|
334
|
+
setFilterActive: q,
|
|
335
|
+
getFilterMatch: Xe,
|
|
336
|
+
getFilterMatchForId: Ye,
|
|
337
|
+
sidebarCollapsed: V,
|
|
338
|
+
toggleSidebar: Ke,
|
|
339
|
+
sidebarWidth: U,
|
|
340
|
+
setSidebarWidth: Ue,
|
|
341
|
+
contextMenu: Pe,
|
|
342
|
+
showContextMenu: ke,
|
|
343
|
+
hideContextMenu: Ve,
|
|
344
|
+
openItem: Qe,
|
|
335
345
|
// Optimistic updates
|
|
336
|
-
optimisticRemove:
|
|
337
|
-
optimisticUpdate:
|
|
338
|
-
optimisticInsert:
|
|
339
|
-
clearOptimisticUpdates:
|
|
340
|
-
rollbackOptimisticUpdates:
|
|
341
|
-
hasOptimisticUpdates:
|
|
346
|
+
optimisticRemove: je,
|
|
347
|
+
optimisticUpdate: He,
|
|
348
|
+
optimisticInsert: $e,
|
|
349
|
+
clearOptimisticUpdates: Je,
|
|
350
|
+
rollbackOptimisticUpdates: Ze,
|
|
351
|
+
hasOptimisticUpdates: et,
|
|
342
352
|
// Scroll position management
|
|
343
|
-
setScrollContainer:
|
|
344
|
-
getScrollPosition:
|
|
345
|
-
setScrollPosition:
|
|
346
|
-
saveScrollPosition: () => (B =
|
|
353
|
+
setScrollContainer: tt,
|
|
354
|
+
getScrollPosition: ee,
|
|
355
|
+
setScrollPosition: te,
|
|
356
|
+
saveScrollPosition: () => (B = ee(), B),
|
|
347
357
|
restoreScrollPosition: () => {
|
|
348
358
|
requestAnimationFrame(() => {
|
|
349
|
-
|
|
359
|
+
te(B);
|
|
350
360
|
});
|
|
351
361
|
}
|
|
352
362
|
};
|
|
353
|
-
return
|
|
354
|
-
value:
|
|
363
|
+
return ot(ue.Provider, {
|
|
364
|
+
value: nt,
|
|
355
365
|
get children() {
|
|
356
366
|
return n.children;
|
|
357
367
|
}
|
|
358
368
|
});
|
|
359
369
|
}
|
|
360
|
-
function
|
|
361
|
-
const n =
|
|
370
|
+
function xt() {
|
|
371
|
+
const n = it(ue);
|
|
362
372
|
if (!n)
|
|
363
373
|
throw new Error("useFileBrowser must be used within a FileBrowserProvider");
|
|
364
374
|
return n;
|
|
365
375
|
}
|
|
366
376
|
export {
|
|
367
|
-
|
|
368
|
-
|
|
377
|
+
Ct as FileBrowserProvider,
|
|
378
|
+
xt as useFileBrowser
|
|
369
379
|
};
|
|
@@ -5,6 +5,6 @@ export interface LoadingOverlayProps {
|
|
|
5
5
|
class?: string;
|
|
6
6
|
}
|
|
7
7
|
/**
|
|
8
|
-
* Full screen or container loading overlay
|
|
8
|
+
* Full screen or container loading overlay with ambient glow
|
|
9
9
|
*/
|
|
10
10
|
export declare function LoadingOverlay(props: LoadingOverlayProps): import("solid-js").JSX.Element;
|
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
import { insert as n, createComponent as
|
|
1
|
+
import { insert as n, createComponent as r, effect as o, className as d, Portal as m, template as c } from "solid-js/web";
|
|
2
2
|
import { Show as l } from "solid-js";
|
|
3
|
-
import { cn as
|
|
3
|
+
import { cn as u } from "../../utils/cn.js";
|
|
4
4
|
import { SnakeLoader as f } from "./SnakeLoader.js";
|
|
5
|
-
var g = /* @__PURE__ */ c('<p class="text-sm text-muted-foreground">'),
|
|
5
|
+
var g = /* @__PURE__ */ c('<p class="text-sm text-muted-foreground processing-text-glow">'), b = /* @__PURE__ */ c('<div><div class=relative><div class="absolute -inset-8 rounded-full floe-loader-ambient"style="background:radial-gradient(circle, color-mix(in srgb, var(--primary) 12%, transparent) 0%, transparent 70%)">');
|
|
6
6
|
function k(e) {
|
|
7
7
|
const a = (() => {
|
|
8
|
-
var
|
|
9
|
-
return n(
|
|
8
|
+
var t = b(), i = t.firstChild;
|
|
9
|
+
return i.firstChild, n(i, r(f, {
|
|
10
10
|
size: "lg"
|
|
11
|
-
}), null), n(
|
|
11
|
+
}), null), n(t, r(l, {
|
|
12
12
|
get when() {
|
|
13
13
|
return e.message;
|
|
14
14
|
},
|
|
15
15
|
get children() {
|
|
16
|
-
var
|
|
17
|
-
return n(
|
|
16
|
+
var s = g();
|
|
17
|
+
return n(s, () => e.message), s;
|
|
18
18
|
}
|
|
19
|
-
}), null),
|
|
19
|
+
}), null), o(() => d(t, u("flex flex-col items-center justify-center gap-4", "bg-background/80 backdrop-blur-sm", e.fullscreen ? "fixed inset-0 z-50" : "absolute inset-0", "animate-in fade-in", e.class))), t;
|
|
20
20
|
})();
|
|
21
|
-
return
|
|
21
|
+
return r(l, {
|
|
22
22
|
get when() {
|
|
23
23
|
return e.visible;
|
|
24
24
|
},
|
|
25
25
|
get children() {
|
|
26
|
-
return
|
|
26
|
+
return r(l, {
|
|
27
27
|
get when() {
|
|
28
28
|
return e.fullscreen;
|
|
29
29
|
},
|
|
30
30
|
fallback: a,
|
|
31
31
|
get children() {
|
|
32
|
-
return
|
|
32
|
+
return r(m, {
|
|
33
33
|
children: a
|
|
34
34
|
});
|
|
35
35
|
}
|