vintage-frames 0.19.0 → 0.19.1
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/custom-elements.json +239 -51
- package/dist/build/plugins.js +1 -1
- package/dist/components/vf-menu-bar.d.ts +6 -4
- package/dist/components/vf-menu-bar.js +26 -56
- package/dist/components/vf-menu-item.d.ts +33 -5
- package/dist/components/vf-menu-item.js +128 -61
- package/dist/components/vf-menu.d.ts +35 -0
- package/dist/components/vf-menu.js +171 -111
- package/dist/glyphs.d.ts +6 -0
- package/dist/glyphs.js +18 -14
- package/dist/menu-navigation.d.ts +34 -0
- package/dist/menu-navigation.js +53 -0
- package/dist/menu-press.d.ts +25 -7
- package/dist/menu-press.js +78 -44
- package/dist/motion.d.ts +10 -0
- package/dist/shell/catalog.d.ts +40 -2
- package/dist/shell/catalog.js +137 -105
- package/dist/shell/finder.d.ts +4 -3
- package/dist/shell/finder.js +263 -249
- package/dist/shell/index.d.ts +2 -2
- package/dist/shell/index.js +12 -12
- package/dist/shell/pure.js +6 -6
- package/dist/shell/shell.js +24 -19
- package/dist/shell/version.d.ts +1 -1
- package/dist/shell/version.js +1 -1
- package/docs/SPEC.md +10 -6
- package/editor/vscode.html-custom-data.json +10 -5
- package/editor/web-types.json +45 -9
- package/package.json +1 -1
package/dist/shell/finder.js
CHANGED
|
@@ -2,20 +2,20 @@ import { snapSys as e, systemPxQuantum as t } from "../scale.js";
|
|
|
2
2
|
import { prefersReducedMotion as n } from "../motion.js";
|
|
3
3
|
import { windowChrome as r } from "../window-chrome.js";
|
|
4
4
|
import "../index.js";
|
|
5
|
-
import { ALIAS_KIND as i, APPLE_MENU_ITEMS as a, FOLDER as o, STARTUP_ITEMS as s, SYSTEM_FOLDER as c, TRASH as l, aliasName as u, appIdOf as ee, childrenOf as te, containerOf as ne, enclosingFolders as re, isContainerKind as
|
|
6
|
-
import { cleanUp as
|
|
7
|
-
import { desktopRendered as
|
|
5
|
+
import { ALIAS_KIND as i, APPLE_MENU_ITEMS as a, FOLDER as o, STARTUP_ITEMS as s, SYSTEM_FOLDER as c, TRASH as l, aliasName as u, appIdOf as d, canAlias as ee, childrenOf as te, containerOf as ne, dropTargetOf as f, enclosingFolders as re, isContainerKind as ie, isInside as ae, isKept as p, isTrashed as m, itemCount as h, resolve as oe } from "./catalog.js";
|
|
6
|
+
import { cleanUp as se, collisions as ce, desktopLattice as le, fieldExtent as ue, fillOrder as de, folderLattice as fe, frameOf as pe, freeCellNear as me, nextFreeCell as he, pinOf as ge, pinTo as _e, trashCell as ve } from "./geometry.js";
|
|
7
|
+
import { desktopRendered as ye } from "./windows.js";
|
|
8
8
|
import { defineApp as g } from "./shell.js";
|
|
9
|
-
import { fileByDrag as
|
|
10
|
-
import { composeAlert as
|
|
9
|
+
import { fileByDrag as be } from "./filing.js";
|
|
10
|
+
import { composeAlert as xe } from "./alert.js";
|
|
11
11
|
//#region src/shell/finder.ts
|
|
12
|
-
var _ = "finder",
|
|
12
|
+
var _ = "finder", Se = 306, Ce = 300, we = {
|
|
13
13
|
"new-folder": "New Folder",
|
|
14
14
|
"empty-trash": "Empty Trash",
|
|
15
15
|
paste: "Paste",
|
|
16
16
|
"add-file": "Adding the file",
|
|
17
17
|
"make-alias": "Make Alias"
|
|
18
|
-
},
|
|
18
|
+
}, Te = 20, Ee = 18, v = {
|
|
19
19
|
left: 8,
|
|
20
20
|
top: 2
|
|
21
21
|
}, y = {
|
|
@@ -24,7 +24,7 @@ var _ = "finder", be = 306, xe = 300, Se = {
|
|
|
24
24
|
}, b = {
|
|
25
25
|
left: v.left - 1,
|
|
26
26
|
top: v.top
|
|
27
|
-
},
|
|
27
|
+
}, De = {
|
|
28
28
|
left: b.left + y.width + 3,
|
|
29
29
|
top: v.top
|
|
30
30
|
}, x = [
|
|
@@ -89,25 +89,25 @@ var _ = "finder", be = 306, xe = 300, Se = {
|
|
|
89
89
|
c,
|
|
90
90
|
a,
|
|
91
91
|
s
|
|
92
|
-
],
|
|
93
|
-
function
|
|
92
|
+
], Oe = /* @__PURE__ */ new Set(["close", "make-alias"]);
|
|
93
|
+
function C(e) {
|
|
94
94
|
return x.map(({ menu: t, label: n, items: r }) => {
|
|
95
|
-
let i = r.filter(([t]) => e(t)).map(([e, t, n], r) => `${
|
|
95
|
+
let i = r.filter(([t]) => e(t)).map(([e, t, n], r) => `${Oe.has(e) && r > 0 ? "<vf-separator></vf-separator>" : ""}<vf-menu-item value="${e}"${n ? ` shortcut="${n}"` : ""}>${t}</vf-menu-item>`);
|
|
96
96
|
return i.length ? `<vf-menu data-menu="${t}" label="${n}">${i.join("")}</vf-menu>` : "";
|
|
97
97
|
}).join("");
|
|
98
98
|
}
|
|
99
|
-
var
|
|
100
|
-
function
|
|
99
|
+
var ke = (e) => e.localName === "vf-icon" && e.dataset.app != null || e instanceof HTMLTemplateElement && (e.dataset.folder != null || e.dataset.system != null);
|
|
100
|
+
function Ae(e) {
|
|
101
101
|
let t = (e, t) => e != null && t != null && Number.isFinite(+e) && Number.isFinite(+t) ? {
|
|
102
102
|
left: +e,
|
|
103
103
|
top: +t
|
|
104
104
|
} : void 0, n = [];
|
|
105
|
-
for (let r of [...e.children].filter(
|
|
105
|
+
for (let r of [...e.children].filter(ke)) r instanceof HTMLTemplateElement ? n.push({
|
|
106
106
|
kind: o,
|
|
107
107
|
name: r.dataset.folder ?? null,
|
|
108
108
|
at: t(r.dataset.left, r.dataset.top),
|
|
109
109
|
into: r.dataset.system,
|
|
110
|
-
children:
|
|
110
|
+
children: Ae(r.content)
|
|
111
111
|
}) : n.push({
|
|
112
112
|
kind: "app",
|
|
113
113
|
name: r.getAttribute("label"),
|
|
@@ -117,8 +117,8 @@ function De(e) {
|
|
|
117
117
|
});
|
|
118
118
|
return n;
|
|
119
119
|
}
|
|
120
|
-
function
|
|
121
|
-
let o = a.volumes?.trash !== !1, s = (e) => a.commands?.[e] !== !1 && (e !== "empty-trash" || o), c = [],
|
|
120
|
+
function w(a) {
|
|
121
|
+
let o = a.volumes?.trash !== !1, s = (e) => a.commands?.[e] !== !1 && (e !== "empty-trash" || o), c = [], Oe = (e) => e, w = a.seed === "markup" ? async (e) => {
|
|
122
122
|
let t = Date.now(), n = async (r, i) => {
|
|
123
123
|
for (let a of r) {
|
|
124
124
|
if (a.into != null) {
|
|
@@ -127,7 +127,7 @@ function T(a) {
|
|
|
127
127
|
}
|
|
128
128
|
let r = await e.create({
|
|
129
129
|
kind: a.kind,
|
|
130
|
-
name: a.name ?? (a.app == null ? void 0 :
|
|
130
|
+
name: a.name ?? (a.app == null ? void 0 : Oe(a.app)),
|
|
131
131
|
parent: i,
|
|
132
132
|
...a.at,
|
|
133
133
|
...a.app == null ? {} : { data: { app: a.app } },
|
|
@@ -141,29 +141,29 @@ function T(a) {
|
|
|
141
141
|
return g({
|
|
142
142
|
id: _,
|
|
143
143
|
name: "Finder",
|
|
144
|
-
menus:
|
|
144
|
+
menus: C(s),
|
|
145
145
|
dialogs: a.dialogs,
|
|
146
146
|
catalog: {
|
|
147
147
|
storage: a.storage,
|
|
148
148
|
volumes: a.volumes,
|
|
149
149
|
system: a.system,
|
|
150
|
-
seed:
|
|
150
|
+
seed: w
|
|
151
151
|
},
|
|
152
152
|
init(g) {
|
|
153
|
-
let { desktop: S, windows:
|
|
154
|
-
|
|
155
|
-
let
|
|
153
|
+
let { desktop: S, windows: C } = g, w = g.catalog, T = a.art;
|
|
154
|
+
Oe = (e) => g.app(e)?.name ?? e;
|
|
155
|
+
let E = a.lattice?.desktop?.cell ?? 64, D = a.lattice?.folder?.cell ?? 64, je = a.window ?? {
|
|
156
156
|
width: 320,
|
|
157
157
|
height: 223
|
|
158
|
-
},
|
|
158
|
+
}, O = r({
|
|
159
159
|
scrollbars: "both",
|
|
160
|
-
headerHeight:
|
|
161
|
-
}),
|
|
162
|
-
async function
|
|
163
|
-
let i =
|
|
160
|
+
headerHeight: Te
|
|
161
|
+
}), Me = /* @__PURE__ */ new Map();
|
|
162
|
+
async function k(e, t, n, r = {}) {
|
|
163
|
+
let i = Me.get(e);
|
|
164
164
|
if (i) return i(t);
|
|
165
|
-
let a =
|
|
166
|
-
art:
|
|
165
|
+
let a = xe(n, {
|
|
166
|
+
art: T.caution ?? null,
|
|
167
167
|
...r
|
|
168
168
|
});
|
|
169
169
|
g.hold(a.dialog);
|
|
@@ -175,57 +175,57 @@ function T(a) {
|
|
|
175
175
|
g.release(a.dialog);
|
|
176
176
|
}
|
|
177
177
|
}
|
|
178
|
-
let
|
|
178
|
+
let A = (e) => (t) => {
|
|
179
179
|
let n = t;
|
|
180
|
-
|
|
180
|
+
k("failed", {
|
|
181
181
|
action: e,
|
|
182
182
|
error: n
|
|
183
|
-
}, `${
|
|
184
|
-
},
|
|
185
|
-
if (!
|
|
186
|
-
|
|
183
|
+
}, `${we[e]} failed: ${n.message}.`);
|
|
184
|
+
}, j = S.querySelector(":scope > vf-icon-field"), Ne = !j;
|
|
185
|
+
if (!j) {
|
|
186
|
+
j = document.createElement("vf-icon-field"), j.label = "Desktop", j.toggleAttribute("fill-width", !0), j.toggleAttribute("fill-height", !0);
|
|
187
187
|
let e = S.querySelector(":scope > vf-menu-bar");
|
|
188
|
-
e ? e.after(
|
|
188
|
+
e ? e.after(j) : S.prepend(j);
|
|
189
189
|
}
|
|
190
|
-
let
|
|
191
|
-
c =
|
|
192
|
-
for (let e of
|
|
193
|
-
let
|
|
194
|
-
let n =
|
|
190
|
+
let M = j, Pe = [...M.children].filter(ke);
|
|
191
|
+
c = Ae(M);
|
|
192
|
+
for (let e of Pe) e.remove();
|
|
193
|
+
let Fe = () => C.windowsOf(_).map((e) => [C.itemOf(e), e]).filter((e) => e[0] != null), N = (e) => e.querySelector(":scope > vf-icon-field"), P = () => [[null, M], ...Fe().flatMap(([e, t]) => {
|
|
194
|
+
let n = N(t);
|
|
195
195
|
return n ? [[e, n]] : [];
|
|
196
|
-
})],
|
|
196
|
+
})], F = (e) => P().find(([t]) => t === e)?.[1] ?? null, I = (e) => [...e.querySelectorAll(":scope > vf-icon[data-id]")], L = () => P().flatMap(([, e]) => I(e)), R = (e) => e.dataset.id, z = (e) => L().find((t) => R(t) === e) ?? null, B = (e) => ({
|
|
197
197
|
left: e.left ?? 0,
|
|
198
198
|
top: e.top ?? 0
|
|
199
|
-
}), Ie = (e) =>
|
|
200
|
-
width: Math.max(0, (e.width ?? 0) -
|
|
201
|
-
height: Math.max(0, (e.height ?? 0) -
|
|
202
|
-
}),
|
|
203
|
-
if (e == null) return
|
|
204
|
-
let t =
|
|
205
|
-
return
|
|
199
|
+
}), Ie = (e) => C.itemOf(e.closest("vf-window")), Le = (e) => ({
|
|
200
|
+
width: Math.max(0, (e.width ?? 0) - O.left - O.right),
|
|
201
|
+
height: Math.max(0, (e.height ?? 0) - O.top - O.bottom)
|
|
202
|
+
}), V = (e) => {
|
|
203
|
+
if (e == null) return le(S.workArea, a.lattice?.desktop);
|
|
204
|
+
let t = C.windowFor(e);
|
|
205
|
+
return fe(t ? Le(t).width : 0, a.lattice?.folder);
|
|
206
206
|
}, Re = (e) => {
|
|
207
|
-
let t =
|
|
207
|
+
let t = C.windowFor(e), n = t && N(t);
|
|
208
208
|
if (!t || !n) return;
|
|
209
|
-
let r =
|
|
209
|
+
let r = ue(I(n).map(B), Le(t), { cell: D });
|
|
210
210
|
n.width !== r.width && (n.width = r.width), n.height !== r.height && (n.height = r.height);
|
|
211
211
|
}, ze = (n, r, i) => {
|
|
212
212
|
if (r == null) {
|
|
213
|
-
let r = S.workArea, a = t(n), o = (e) => Math.floor(e / a) * a, s = Math.ceil(r.top / a) * a, c = Math.max(r.left, o(r.left + r.width -
|
|
213
|
+
let r = S.workArea, a = t(n), o = (e) => Math.floor(e / a) * a, s = Math.ceil(r.top / a) * a, c = Math.max(r.left, o(r.left + r.width - E)), l = Math.max(s, o(r.top + r.height - E));
|
|
214
214
|
n.left = Math.min(Math.max(e(i.left, n), r.left), c), n.top = Math.min(Math.max(e(i.top, n), s), l);
|
|
215
215
|
} else n.left = e(Math.max(0, i.left), n), n.top = e(Math.max(0, i.top), n);
|
|
216
216
|
}, Be = (e) => {
|
|
217
|
-
if (e.id === "system-folder") return
|
|
218
|
-
if (e.id === "apple-menu-items") return
|
|
219
|
-
if (e.id === "startup-items") return
|
|
220
|
-
if (e.kind === "folder") return
|
|
221
|
-
if (e.kind === "trash") return
|
|
222
|
-
if (e.kind === "disk") return
|
|
217
|
+
if (e.id === "system-folder") return T.systemFolder ?? T.folder;
|
|
218
|
+
if (e.id === "apple-menu-items") return T.appleMenuItems ?? T.folder;
|
|
219
|
+
if (e.id === "startup-items") return T.startupItems ?? T.folder;
|
|
220
|
+
if (e.kind === "folder") return T.folder;
|
|
221
|
+
if (e.kind === "trash") return h(w.get(), "trash") ? T.trashFull : T.trash;
|
|
222
|
+
if (e.kind === "disk") return T.disk ?? T.folder;
|
|
223
223
|
if (e.kind === "alias") {
|
|
224
|
-
let t =
|
|
225
|
-
return t ? Be(t) :
|
|
224
|
+
let t = oe(w.get(), e.id);
|
|
225
|
+
return t ? Be(t) : f(w.get(), e.id) ? T.folder : T.document;
|
|
226
226
|
}
|
|
227
227
|
let t = g.kind(e.kind);
|
|
228
|
-
return (typeof t?.art == "function" ? t.art(e) : t?.art) ||
|
|
228
|
+
return (typeof t?.art == "function" ? t.art(e) : t?.art) || T.document;
|
|
229
229
|
};
|
|
230
230
|
function Ve(e, t) {
|
|
231
231
|
let n = e.querySelector(":scope > vf-img > img");
|
|
@@ -237,257 +237,271 @@ function T(a) {
|
|
|
237
237
|
}
|
|
238
238
|
function He(e) {
|
|
239
239
|
let t = document.createElement("vf-icon");
|
|
240
|
-
return t.dataset.id = e.id, t.label = e.name, t.width =
|
|
240
|
+
return t.dataset.id = e.id, t.label = e.name, t.width = E, t.selectable = !0, t.movable = !0, t;
|
|
241
241
|
}
|
|
242
|
-
|
|
243
|
-
|
|
242
|
+
function Ue(e, t) {
|
|
243
|
+
let n = f(w.get(), t.id), r = n == null ? void 0 : "folder" in n ? n.folder : t.id;
|
|
244
|
+
r === void 0 ? delete e.dataset.folder : e.dataset.folder !== r && (e.dataset.folder = r);
|
|
245
|
+
}
|
|
246
|
+
let H = /* @__PURE__ */ new Set(), U = /* @__PURE__ */ new WeakMap();
|
|
247
|
+
function We(e, t, n, r) {
|
|
244
248
|
if (t.left != null && t.top != null) {
|
|
245
249
|
let r = `${t.left},${t.top}`;
|
|
246
|
-
if (
|
|
247
|
-
|
|
250
|
+
if (U.get(e) === r) return;
|
|
251
|
+
U.set(e, r), (e.left !== t.left || e.top !== t.top) && ze(e, n, {
|
|
248
252
|
left: t.left,
|
|
249
253
|
top: t.top
|
|
250
254
|
});
|
|
251
255
|
return;
|
|
252
256
|
}
|
|
253
|
-
let i =
|
|
254
|
-
ze(e, n, o),
|
|
257
|
+
let i = I(r).filter((t) => t !== e && t.left != null && t.top != null).map(B), o = n == null && t.id === "trash" ? ve(S.workArea, a.lattice?.desktop) : he(V(n), i, n == null ? E : D);
|
|
258
|
+
ze(e, n, o), H.add(e);
|
|
255
259
|
}
|
|
256
|
-
let
|
|
257
|
-
function
|
|
258
|
-
if (!(
|
|
259
|
-
|
|
260
|
+
let Ge = !1, W = !1;
|
|
261
|
+
function G() {
|
|
262
|
+
if (!(W || !Ge)) {
|
|
263
|
+
W = !0;
|
|
260
264
|
try {
|
|
261
|
-
let e =
|
|
262
|
-
for (let [o, s] of
|
|
265
|
+
let e = w.get(), t = new Map(L().map((e) => [R(e), e])), n = /* @__PURE__ */ new Set(), r = [], a = [];
|
|
266
|
+
for (let [o, s] of P()) for (let c of te(e, o)) {
|
|
263
267
|
let e = t.get(c.id) ?? He(c);
|
|
264
|
-
e.parentElement !== s && (s.append(e), e.left = void 0, e.top = void 0,
|
|
265
|
-
let l = c.kind === "app" ?
|
|
268
|
+
e.parentElement !== s && (s.append(e), e.left = void 0, e.top = void 0, U.delete(e)), n.add(e), e.label !== c.name && (e.label = c.name), e.editable = !p(c.id) && g.kind(c.kind)?.editable !== !1, e.alias = c.kind === i, Ue(e, c), Ve(e, Be(c));
|
|
269
|
+
let l = c.kind === "app" ? C.hasWindows(d(c) ?? "") : C.isOpen(c.id);
|
|
266
270
|
e.open !== l && (e.open = l);
|
|
267
|
-
let u = () =>
|
|
271
|
+
let u = () => We(e, c, o, s);
|
|
268
272
|
c.left != null && c.top != null ? r.push(u) : a.push(u);
|
|
269
273
|
}
|
|
270
274
|
for (let e of t.values()) n.has(e) || e.remove();
|
|
271
275
|
for (let e of [...r, ...a]) e();
|
|
272
|
-
for (let [e, t] of
|
|
273
|
-
let n =
|
|
274
|
-
n && r != null && n.label !== r && (n.label = r),
|
|
276
|
+
for (let [e, t] of Fe()) {
|
|
277
|
+
let n = N(t), r = w.item(e)?.name;
|
|
278
|
+
n && r != null && n.label !== r && (n.label = r), Je(e), Re(e);
|
|
275
279
|
}
|
|
276
280
|
} finally {
|
|
277
|
-
|
|
281
|
+
W = !1;
|
|
278
282
|
}
|
|
279
|
-
|
|
283
|
+
Ke();
|
|
280
284
|
}
|
|
281
285
|
}
|
|
282
|
-
let
|
|
283
|
-
function
|
|
284
|
-
if (
|
|
286
|
+
let K = !1;
|
|
287
|
+
function Ke() {
|
|
288
|
+
if (K = !1, !H.size) return;
|
|
285
289
|
let e = /* @__PURE__ */ new Map();
|
|
286
|
-
for (let t of
|
|
287
|
-
|
|
290
|
+
for (let t of H) t.isConnected && t.left != null && t.top != null && e.set(R(t), B(t));
|
|
291
|
+
H.clear(), w.place(e);
|
|
288
292
|
}
|
|
289
293
|
g.on(S, "vf-placement-change", (e) => {
|
|
290
294
|
let t = e.target;
|
|
291
|
-
t.localName === "vf-icon" && t.dataset.id != null && (
|
|
292
|
-
}), g.onDispose(
|
|
293
|
-
function
|
|
295
|
+
t.localName === "vf-icon" && t.dataset.id != null && (H.add(t), !K && (K = !0, queueMicrotask(Ke)));
|
|
296
|
+
}), g.onDispose(w.subscribe(G)), g.onDispose(C.onWindows(G));
|
|
297
|
+
function qe() {
|
|
294
298
|
let e = document.createElement("vf-img");
|
|
295
299
|
e.dataset.trashMark = "", e.width = y.width, e.height = y.height, e.left = b.left, e.top = b.top;
|
|
296
300
|
let t = document.createElement("img");
|
|
297
|
-
return t.alt = "in the Trash", t.src =
|
|
301
|
+
return t.alt = "in the Trash", t.src = T.trashMark, e.append(t), e;
|
|
298
302
|
}
|
|
299
|
-
function
|
|
300
|
-
let t =
|
|
303
|
+
function Je(e) {
|
|
304
|
+
let t = C.windowFor(e)?.querySelector(":scope > [slot=\"header\"]"), n = t?.querySelector(":scope > vf-label[data-count]");
|
|
301
305
|
if (!t || !n) return;
|
|
302
|
-
let r =
|
|
306
|
+
let r = w.get(), i = h(r, e), a = `${i} item${i === 1 ? "" : "s"}`;
|
|
303
307
|
n.textContent !== a && (n.textContent = a);
|
|
304
|
-
let o = !!
|
|
305
|
-
o && !s ? t.prepend(
|
|
306
|
-
let c = o ?
|
|
308
|
+
let o = !!T.trashMark && m(r, e), s = t.querySelector(":scope > vf-img[data-trash-mark]");
|
|
309
|
+
o && !s ? t.prepend(qe()) : !o && s && s.remove();
|
|
310
|
+
let c = o ? De : v;
|
|
307
311
|
n.left !== c.left && (n.left = c.left);
|
|
308
312
|
}
|
|
309
|
-
function
|
|
310
|
-
let t =
|
|
311
|
-
n.heading = t, n.closable = !0, n.movable = !0, n.outlineDrag = !0, n.resizable = !0, n.scrollbars = "both", n.headerHeight =
|
|
313
|
+
function Ye(e) {
|
|
314
|
+
let t = w.item(e)?.name ?? "", n = document.createElement("vf-window");
|
|
315
|
+
n.heading = t, n.closable = !0, n.movable = !0, n.outlineDrag = !0, n.resizable = !0, n.scrollbars = "both", n.headerHeight = Te, n.width = je.width, n.height = je.height;
|
|
312
316
|
let r = document.createElement("vf-container");
|
|
313
|
-
r.slot = "header", r.toggleAttribute("fill-width", !0), r.height =
|
|
317
|
+
r.slot = "header", r.toggleAttribute("fill-width", !0), r.height = Ee, r.rule = "bottom";
|
|
314
318
|
let i = document.createElement("vf-label");
|
|
315
319
|
i.face = "body", i.dataset.count = "", i.left = v.left, i.top = v.top, r.append(i);
|
|
316
320
|
let a = document.createElement("vf-icon-field");
|
|
317
321
|
return a.label = t, a.left = 0, a.top = 0, n.append(r, a), n;
|
|
318
322
|
}
|
|
319
323
|
g.on(S, "vf-resize", (e) => {
|
|
320
|
-
if (!e.detail?.commit ||
|
|
321
|
-
let t =
|
|
324
|
+
if (!e.detail?.commit || C.appOf(e.target) !== "finder") return;
|
|
325
|
+
let t = C.itemOf(e.target);
|
|
322
326
|
t != null && Re(t);
|
|
323
327
|
});
|
|
324
|
-
function
|
|
325
|
-
|
|
328
|
+
function Xe(e) {
|
|
329
|
+
k("original-missing", { alias: e }, `The alias “${e.name}” could not be opened, because the original item could not be found.`);
|
|
330
|
+
}
|
|
331
|
+
function Ze(e, t) {
|
|
332
|
+
let n = w.item(e);
|
|
326
333
|
if (!n) return;
|
|
327
|
-
let r =
|
|
334
|
+
let r = oe(w.get(), e);
|
|
328
335
|
if (!r) {
|
|
329
|
-
|
|
336
|
+
Xe(n);
|
|
330
337
|
return;
|
|
331
338
|
}
|
|
332
|
-
|
|
339
|
+
ie(r.kind) ? C.open({
|
|
333
340
|
app: _,
|
|
334
341
|
item: r.id,
|
|
335
342
|
from: t,
|
|
336
|
-
create: () =>
|
|
343
|
+
create: () => Ye(r.id)
|
|
337
344
|
}) : g.kind(r.kind)?.open(r, t);
|
|
338
345
|
}
|
|
339
346
|
g.on(S, "vf-open", (e) => {
|
|
340
347
|
let t = e.target;
|
|
341
|
-
t.localName === "vf-icon" && t.dataset.id != null && (t.selected && J().length > 1 ?
|
|
348
|
+
t.localName === "vf-icon" && t.dataset.id != null && (t.selected && J().length > 1 ? it() : Ze(R(t), t.cellRect()));
|
|
342
349
|
});
|
|
343
|
-
let
|
|
344
|
-
let t =
|
|
345
|
-
return t.find((e) =>
|
|
346
|
-
},
|
|
347
|
-
g.onDispose(
|
|
348
|
-
let n =
|
|
350
|
+
let Qe = (e) => {
|
|
351
|
+
let t = w.get().items.filter((t) => t.kind === "app" && d(t) === e);
|
|
352
|
+
return t.find((e) => z(e.id)) ?? t[0] ?? null;
|
|
353
|
+
}, $e = (e, t) => w.item(e) ?? (t == null ? null : Qe(t));
|
|
354
|
+
g.onDispose(C.setHome((e, t) => {
|
|
355
|
+
let n = $e(e, t);
|
|
349
356
|
if (!n) return null;
|
|
350
|
-
let r =
|
|
357
|
+
let r = z(n.id)?.cellRect();
|
|
351
358
|
if (r) return r;
|
|
352
|
-
for (let e of re(
|
|
353
|
-
let t =
|
|
359
|
+
for (let e of re(w.get(), n.parent)) {
|
|
360
|
+
let t = z(e)?.cellRect();
|
|
354
361
|
if (t) return t;
|
|
355
362
|
}
|
|
356
363
|
return null;
|
|
357
364
|
}, (e, t) => {
|
|
358
|
-
let n = e == null && t == null ? null :
|
|
365
|
+
let n = e == null && t == null ? null : $e(e, t), r = I(M), i = n ? z(n.id) : r.find((e) => e.selected) ?? r[0] ?? null;
|
|
359
366
|
return i?.checkVisibility() ? (i.focus({ preventScroll: !0 }), !0) : !1;
|
|
360
|
-
})), g.on(
|
|
361
|
-
let
|
|
367
|
+
})), g.on(M, "pointerdown", () => S.clearActive());
|
|
368
|
+
let et = (e) => {
|
|
362
369
|
let t = e.target;
|
|
363
370
|
return t.localName === "vf-icon" && t.dataset.id != null;
|
|
364
371
|
};
|
|
365
372
|
g.on(S, "vf-change", (e) => {
|
|
366
|
-
if (!
|
|
373
|
+
if (!et(e)) return;
|
|
367
374
|
let t = e.target, { label: n, previous: r } = e.detail;
|
|
368
|
-
|
|
375
|
+
w.rename(R(t), n).catch(() => {
|
|
369
376
|
t.label = r;
|
|
370
377
|
});
|
|
371
378
|
});
|
|
372
|
-
let
|
|
379
|
+
let tt = !1;
|
|
373
380
|
g.on(S, "vf-name-too-long", (e) => {
|
|
374
|
-
if (!
|
|
375
|
-
|
|
381
|
+
if (!et(e) || tt) return;
|
|
382
|
+
tt = !0;
|
|
376
383
|
let { limit: t } = e.detail;
|
|
377
|
-
|
|
378
|
-
|
|
384
|
+
k("name-too-long", { limit: t }, `That name is too long. A name can have up to ${t} characters.`).finally(() => {
|
|
385
|
+
tt = !1;
|
|
379
386
|
});
|
|
380
387
|
}), g.on(S, "vf-name-rejected", (e) => {
|
|
381
|
-
|
|
382
|
-
}), g.onDispose(
|
|
383
|
-
folderOfWindow: (e) =>
|
|
388
|
+
et(e) && k("name-rejected", {}, "An item needs a name.");
|
|
389
|
+
}), g.onDispose(be(S, {
|
|
390
|
+
folderOfWindow: (e) => C.appOf(e) === "finder" ? C.itemOf(e) ?? void 0 : void 0,
|
|
384
391
|
folderOfIcon: (e) => e.dataset.folder,
|
|
385
392
|
containerOf: (e) => e.dataset.id == null ? void 0 : Ie(e),
|
|
386
393
|
canFile: (e, t) => {
|
|
387
|
-
let n =
|
|
388
|
-
return e.every((e) => {
|
|
389
|
-
let
|
|
390
|
-
return
|
|
394
|
+
let n = w.get(), r = t == null ? null : f(n, t);
|
|
395
|
+
return t != null && !r ? !1 : e.every((e) => {
|
|
396
|
+
let t = e.dataset.id;
|
|
397
|
+
return t == null || p(t) ? !1 : !r || "missing" in r || t !== r.folder && !ae(n, r.folder, t);
|
|
391
398
|
});
|
|
392
399
|
},
|
|
393
400
|
file: (e, t, n) => {
|
|
394
|
-
let r =
|
|
395
|
-
|
|
396
|
-
|
|
401
|
+
let r = null;
|
|
402
|
+
if (t != null) {
|
|
403
|
+
let e = f(w.get(), t);
|
|
404
|
+
if (!e) return;
|
|
405
|
+
if ("missing" in e) return Xe(e.missing);
|
|
406
|
+
r = e.folder;
|
|
407
|
+
}
|
|
408
|
+
let i = new Map([...n].map(([e, t]) => [R(e), t]));
|
|
409
|
+
w.move(e.map(R), r, i).catch((e) => {
|
|
410
|
+
k("move-failed", { error: e }, `The items couldn’t be moved: ${e.message}.`);
|
|
397
411
|
});
|
|
398
412
|
}
|
|
399
413
|
}));
|
|
400
|
-
let
|
|
401
|
-
g.onDispose(
|
|
402
|
-
|
|
414
|
+
let nt = /* @__PURE__ */ new WeakMap(), q = 0;
|
|
415
|
+
g.onDispose(C.onRaster((t, n) => {
|
|
416
|
+
M.dragIcons([]);
|
|
403
417
|
let r = {
|
|
404
|
-
width:
|
|
405
|
-
height:
|
|
406
|
-
}, i =
|
|
407
|
-
for (let a of
|
|
418
|
+
width: E,
|
|
419
|
+
height: E
|
|
420
|
+
}, i = pe(S.workArea.top);
|
|
421
|
+
for (let a of I(M)) {
|
|
408
422
|
let o = {
|
|
409
|
-
...
|
|
423
|
+
...B(a),
|
|
410
424
|
...r
|
|
411
|
-
}, s =
|
|
412
|
-
a.left = e(l.left, a), a.top = e(l.top, a),
|
|
425
|
+
}, s = nt.get(a), c = !s || s.left !== o.left || s.top !== o.top ? ge(o, t, i) : s.pin, l = _e(c, n, i, { size: r });
|
|
426
|
+
a.left = e(l.left, a), a.top = e(l.top, a), nt.set(a, {
|
|
413
427
|
pin: c,
|
|
414
428
|
left: a.left,
|
|
415
429
|
top: a.top
|
|
416
430
|
});
|
|
417
431
|
}
|
|
418
432
|
a.cleanUpAfterResize && (window.clearTimeout(q), q = window.setTimeout(() => {
|
|
419
|
-
q = 0,
|
|
420
|
-
...
|
|
433
|
+
q = 0, ce(I(M).map((e) => ({
|
|
434
|
+
...B(e),
|
|
421
435
|
...r
|
|
422
|
-
}))).size &&
|
|
423
|
-
},
|
|
436
|
+
}))).size && rt(null);
|
|
437
|
+
}, Ce));
|
|
424
438
|
})), g.onDispose(() => window.clearTimeout(q));
|
|
425
439
|
let J = () => {
|
|
426
|
-
let e = new Set(
|
|
427
|
-
return
|
|
440
|
+
let e = new Set(L().filter((e) => e.selected).map(R));
|
|
441
|
+
return w.get().items.filter((t) => e.has(t.id));
|
|
428
442
|
}, Y = (e) => {
|
|
429
443
|
let t = new Set(e);
|
|
430
|
-
for (let e of
|
|
444
|
+
for (let e of L()) e.setSelected(t.has(R(e)));
|
|
431
445
|
}, X = () => {
|
|
432
446
|
let e = S.activeWindow;
|
|
433
|
-
return e &&
|
|
447
|
+
return e && C.appOf(e) === "finder" ? C.itemOf(e) : null;
|
|
434
448
|
};
|
|
435
|
-
async function
|
|
436
|
-
let t =
|
|
449
|
+
async function rt(e) {
|
|
450
|
+
let t = F(e);
|
|
437
451
|
if (!t) return;
|
|
438
|
-
let n =
|
|
452
|
+
let n = V(e), r = I(t), i = se(n, r.map(B)), a = r.map((e, t) => ({
|
|
439
453
|
icon: e,
|
|
440
454
|
...i[t]
|
|
441
|
-
})).sort((e, t) =>
|
|
455
|
+
})).sort((e, t) => de(n, e, t));
|
|
442
456
|
await t.dragIcons(a);
|
|
443
457
|
}
|
|
444
|
-
async function
|
|
445
|
-
let e = n() ? 0 :
|
|
446
|
-
for (let [t, n] of J().entries()) t && e && await new Promise((t) => setTimeout(t, e)),
|
|
458
|
+
async function it() {
|
|
459
|
+
let e = n() ? 0 : Se;
|
|
460
|
+
for (let [t, n] of J().entries()) t && e && await new Promise((t) => setTimeout(t, e)), Ze(n.id, z(n.id)?.cellRect() ?? null);
|
|
447
461
|
}
|
|
448
|
-
async function
|
|
449
|
-
let t =
|
|
462
|
+
async function at(e) {
|
|
463
|
+
let t = z(e);
|
|
450
464
|
t && (Y([e]), await t.updateComplete, t.startEditing());
|
|
451
465
|
}
|
|
452
|
-
let Z = () =>
|
|
453
|
-
async function
|
|
466
|
+
let Z = () => w.get().available ? !0 : (k("storage-unavailable", {}, "Files can’t be saved in this browser session. A private window, perhaps.", { label: "Storage Unavailable" }), !1);
|
|
467
|
+
async function ot() {
|
|
454
468
|
if (!Z()) return;
|
|
455
|
-
let e = await
|
|
456
|
-
e && await
|
|
469
|
+
let e = await w.create({ parent: X() }).catch(A("new-folder"));
|
|
470
|
+
e && await at(e.id);
|
|
457
471
|
}
|
|
458
|
-
let
|
|
459
|
-
|
|
460
|
-
return !!n && !d(n.kind) && !p(t, e.id);
|
|
461
|
-
};
|
|
462
|
-
async function it() {
|
|
472
|
+
let st = (e) => ee(w.get(), e.id);
|
|
473
|
+
async function ct() {
|
|
463
474
|
if (!Z()) return;
|
|
464
475
|
let e = /* @__PURE__ */ new Map(), t = [];
|
|
465
476
|
try {
|
|
466
|
-
for (let n of J().filter(
|
|
467
|
-
let r =
|
|
468
|
-
if (
|
|
469
|
-
let t = e.get(
|
|
470
|
-
|
|
477
|
+
for (let n of J().filter(st)) {
|
|
478
|
+
let r = w.get(), a = oe(r, n.id), o = ne(r, n.parent), s = z(n.id), c = F(o), l;
|
|
479
|
+
if (s && c) {
|
|
480
|
+
let t = e.get(o) ?? I(c).map(B);
|
|
481
|
+
l = me(V(o), B(s), t, o == null ? E : D), e.set(o, [...t, l]);
|
|
471
482
|
}
|
|
472
|
-
let
|
|
483
|
+
let d = await w.create({
|
|
473
484
|
kind: i,
|
|
474
|
-
name: u(r,
|
|
475
|
-
parent:
|
|
476
|
-
data: {
|
|
477
|
-
|
|
485
|
+
name: u(r, o, n.name),
|
|
486
|
+
parent: o,
|
|
487
|
+
data: {
|
|
488
|
+
original: a.id,
|
|
489
|
+
kind: a.kind
|
|
490
|
+
},
|
|
491
|
+
...l
|
|
478
492
|
});
|
|
479
|
-
|
|
493
|
+
d && t.push(d.id);
|
|
480
494
|
}
|
|
481
495
|
} catch (e) {
|
|
482
|
-
|
|
496
|
+
A("make-alias")(e);
|
|
483
497
|
}
|
|
484
498
|
t.length && Y(t);
|
|
485
499
|
}
|
|
486
|
-
async function
|
|
487
|
-
let e =
|
|
500
|
+
async function lt() {
|
|
501
|
+
let e = h(w.get(), l);
|
|
488
502
|
if (!o || !e) return;
|
|
489
|
-
let t =
|
|
490
|
-
await
|
|
503
|
+
let t = w.trashSize(), n = Math.ceil(t / 1024), r = e === 1 ? `The Trash contains 1 item, which uses ${n}K of disk space. Are you sure you want to permanently remove it?` : `The Trash contains ${e} items, which use ${n}K of disk space. Are you sure you want to permanently remove these items?`;
|
|
504
|
+
await k("empty-trash", {
|
|
491
505
|
count: e,
|
|
492
506
|
bytes: t
|
|
493
507
|
}, r, {
|
|
@@ -500,14 +514,14 @@ function T(a) {
|
|
|
500
514
|
value: "ok",
|
|
501
515
|
default: !0
|
|
502
516
|
}]
|
|
503
|
-
}) === "ok" && await
|
|
517
|
+
}) === "ok" && await w.emptyTrash().catch(A("empty-trash"));
|
|
504
518
|
}
|
|
505
519
|
let Q = {
|
|
506
520
|
ids: [],
|
|
507
521
|
text: ""
|
|
508
|
-
},
|
|
509
|
-
async function
|
|
510
|
-
let e = J().filter((e) => !
|
|
522
|
+
}, ut = (e) => e.replace(/\r\n?/g, "\n").trimEnd();
|
|
523
|
+
async function dt() {
|
|
524
|
+
let e = J().filter((e) => !p(e.id));
|
|
511
525
|
if (!e.length) return;
|
|
512
526
|
let t = e.map((e) => e.name).join("\n");
|
|
513
527
|
Q = {
|
|
@@ -529,12 +543,12 @@ function T(a) {
|
|
|
529
543
|
await navigator.clipboard?.writeText(t);
|
|
530
544
|
} catch {}
|
|
531
545
|
}
|
|
532
|
-
async function
|
|
546
|
+
async function ft(e, t) {
|
|
533
547
|
for (let n of g.kinds.values()) if (n.claim && await n.claim(e, t)) return !0;
|
|
534
548
|
return !1;
|
|
535
549
|
}
|
|
536
|
-
let
|
|
537
|
-
async function
|
|
550
|
+
let pt = () => [...g.kinds.values()].some((e) => e.claim);
|
|
551
|
+
async function mt() {
|
|
538
552
|
try {
|
|
539
553
|
if (navigator.clipboard?.read) {
|
|
540
554
|
let e = null, t = [];
|
|
@@ -554,109 +568,109 @@ function T(a) {
|
|
|
554
568
|
} catch {}
|
|
555
569
|
return null;
|
|
556
570
|
}
|
|
557
|
-
async function
|
|
571
|
+
async function ht(e) {
|
|
558
572
|
if (!Z()) return;
|
|
559
573
|
let t = X();
|
|
560
|
-
if (
|
|
561
|
-
let n = e === void 0 ? await
|
|
574
|
+
if (m(w.get(), t)) return;
|
|
575
|
+
let n = e === void 0 ? await mt() : e, r = Q.ids.length > 0 && (n == null || n.text != null && ut(n.text) === ut(Q.text));
|
|
562
576
|
try {
|
|
563
577
|
if (r) {
|
|
564
|
-
let e = await
|
|
578
|
+
let e = await w.copy(Q.ids, t);
|
|
565
579
|
e.length && Y(e.map((e) => e.id));
|
|
566
|
-
} else for (let e of n?.files ?? []) await
|
|
580
|
+
} else for (let e of n?.files ?? []) await ft(e, t);
|
|
567
581
|
} catch (e) {
|
|
568
|
-
|
|
582
|
+
A("paste")(e);
|
|
569
583
|
}
|
|
570
584
|
}
|
|
571
585
|
g.on(document, "paste", (e) => {
|
|
572
|
-
if (!s("paste") ||
|
|
586
|
+
if (!s("paste") || C.front !== "finder" || g.modalOpen() || g.typing()) return;
|
|
573
587
|
let t = e.clipboardData;
|
|
574
|
-
t && (e.preventDefault(),
|
|
588
|
+
t && (e.preventDefault(), ht({
|
|
575
589
|
text: t.getData("text/plain") || null,
|
|
576
590
|
files: [...t.files]
|
|
577
591
|
}));
|
|
578
592
|
});
|
|
579
|
-
let
|
|
593
|
+
let gt = (e) => [...e.dataTransfer?.types ?? []].includes("Files");
|
|
580
594
|
g.on(S, "dragover", (e) => {
|
|
581
|
-
|
|
595
|
+
gt(e) && pt() && e.preventDefault();
|
|
582
596
|
}), g.on(S, "drop", (e) => {
|
|
583
|
-
if (!
|
|
597
|
+
if (!gt(e) || !pt()) return;
|
|
584
598
|
e.preventDefault();
|
|
585
599
|
let t = e, n = [...t.dataTransfer?.files ?? []], r = document.elementsFromPoint(t.clientX, t.clientY).find((e) => e.localName === "vf-window");
|
|
586
|
-
if (r &&
|
|
587
|
-
let i = r ?
|
|
588
|
-
|
|
589
|
-
for (let e of n) await
|
|
590
|
-
})().catch(
|
|
600
|
+
if (r && C.appOf(r) !== "finder" || (r ? S.bringToFront(r) : S.clearActive(), !Z())) return;
|
|
601
|
+
let i = r ? C.itemOf(r) : null;
|
|
602
|
+
m(w.get(), i) || (async () => {
|
|
603
|
+
for (let e of n) await ft(e, i);
|
|
604
|
+
})().catch(A("add-file"));
|
|
591
605
|
});
|
|
592
|
-
let
|
|
593
|
-
open: () => void
|
|
594
|
-
"new-folder": () => void
|
|
606
|
+
let _t = {
|
|
607
|
+
open: () => void it(),
|
|
608
|
+
"new-folder": () => void ot(),
|
|
595
609
|
close: () => {
|
|
596
|
-
let e = X(), t = e == null ? null :
|
|
597
|
-
t &&
|
|
610
|
+
let e = X(), t = e == null ? null : C.windowFor(e);
|
|
611
|
+
t && C.requestClose(t);
|
|
598
612
|
},
|
|
599
|
-
"make-alias": () => void
|
|
600
|
-
copy: () => void
|
|
601
|
-
paste: () => void
|
|
613
|
+
"make-alias": () => void ct(),
|
|
614
|
+
copy: () => void dt(),
|
|
615
|
+
paste: () => void ht(),
|
|
602
616
|
"select-all": () => {
|
|
603
|
-
let e =
|
|
604
|
-
e && Y(
|
|
617
|
+
let e = F(X());
|
|
618
|
+
e && Y(I(e).map(R));
|
|
605
619
|
},
|
|
606
|
-
arrange: () =>
|
|
607
|
-
"clean-up": () => void
|
|
608
|
-
"empty-trash": () => void
|
|
620
|
+
arrange: () => C.arrange(),
|
|
621
|
+
"clean-up": () => void rt(X()),
|
|
622
|
+
"empty-trash": () => void lt()
|
|
609
623
|
}, $ = (e, t) => {
|
|
610
624
|
s(e) && g.gate(g.item(e), t);
|
|
611
625
|
};
|
|
612
|
-
if ($("open", () => !g.typing() && J().length > 0), $("new-folder", () => !
|
|
626
|
+
if ($("open", () => !g.typing() && J().length > 0), $("new-folder", () => !m(w.get(), X())), $("close", () => X() != null), $("make-alias", () => !g.typing() && J().some(st)), $("copy", () => !g.typing() && J().some((e) => !p(e.id))), $("paste", () => !g.typing() && !m(w.get(), X())), $("select-all", () => !g.typing()), $("arrange", () => !C.arranged()), $("empty-trash", () => h(w.get(), l) > 0), s("clean-up")) {
|
|
613
627
|
let e = g.item("clean-up");
|
|
614
628
|
g.gate(e, () => {
|
|
615
629
|
let t = X() == null ? "Clean Up Desktop" : "Clean Up Window";
|
|
616
630
|
return e.textContent !== t && (e.textContent = t), !0;
|
|
617
631
|
});
|
|
618
632
|
}
|
|
619
|
-
let
|
|
633
|
+
let vt = !0, yt = (e) => {
|
|
620
634
|
let t = g.menus.find((t) => t.dataset.menu === e);
|
|
621
635
|
if (t) return t;
|
|
622
|
-
if (!
|
|
636
|
+
if (!vt) throw Error(`vintage-frames/shell (finder): no ${e} menu; add to it from extend`);
|
|
623
637
|
let n = document.createElement("vf-menu");
|
|
624
638
|
n.dataset.menu = e, n.label = x.find((t) => t.menu === e).label;
|
|
625
639
|
let r = x.map((e) => e.menu), i = g.menus.findIndex((t) => r.indexOf(t.dataset.menu) > r.indexOf(e));
|
|
626
640
|
return g.menus.splice(i < 0 ? g.menus.length : i, 0, n), n;
|
|
627
|
-
},
|
|
628
|
-
catalog:
|
|
641
|
+
}, bt = {
|
|
642
|
+
catalog: w,
|
|
629
643
|
selection: J,
|
|
630
644
|
select: Y,
|
|
631
645
|
activeFolder: X,
|
|
632
646
|
open: ({ item: e, from: t = null } = {}) => {
|
|
633
|
-
e != null &&
|
|
647
|
+
e != null && Ze(e, t);
|
|
634
648
|
},
|
|
635
|
-
rename:
|
|
636
|
-
cleanUp:
|
|
637
|
-
iconFor:
|
|
649
|
+
rename: at,
|
|
650
|
+
cleanUp: rt,
|
|
651
|
+
iconFor: z,
|
|
638
652
|
addCommand(e) {
|
|
639
|
-
let t =
|
|
653
|
+
let t = yt(e.menu);
|
|
640
654
|
e.separator && t.append(document.createElement("vf-separator"));
|
|
641
655
|
let n = document.createElement("vf-menu-item");
|
|
642
|
-
return n.setAttribute("value", e.value), e.shortcut && n.setAttribute("shortcut", e.shortcut), n.textContent = e.label, t.append(n),
|
|
656
|
+
return n.setAttribute("value", e.value), e.shortcut && n.setAttribute("shortcut", e.shortcut), n.textContent = e.label, t.append(n), _t[e.value] = e.run, e.enabled && g.gate(n, e.enabled), n;
|
|
643
657
|
},
|
|
644
658
|
alertWith(e, t) {
|
|
645
|
-
|
|
659
|
+
Me.set(e, t);
|
|
646
660
|
},
|
|
647
661
|
storageReady: Z
|
|
648
662
|
};
|
|
649
|
-
a.extend?.(
|
|
650
|
-
let
|
|
663
|
+
a.extend?.(bt, g), vt = !1, g.onMenu((e) => _t[e]?.());
|
|
664
|
+
let xt = !1;
|
|
651
665
|
return g.onDispose(() => {
|
|
652
|
-
|
|
653
|
-
for (let e of
|
|
654
|
-
|
|
655
|
-
}),
|
|
656
|
-
|
|
657
|
-
}),
|
|
666
|
+
xt = !0;
|
|
667
|
+
for (let e of I(M)) e.remove();
|
|
668
|
+
Ne ? M.remove() : M.append(...Pe);
|
|
669
|
+
}), ye(S).then(() => {
|
|
670
|
+
xt || (Ge = !0, G());
|
|
671
|
+
}), bt;
|
|
658
672
|
}
|
|
659
673
|
});
|
|
660
674
|
}
|
|
661
675
|
//#endregion
|
|
662
|
-
export { _ as FINDER,
|
|
676
|
+
export { _ as FINDER, w as finder };
|