@vue/devtools-electron 7.7.7 → 8.0.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/client/{IconTitle.vue_vue_type_script_setup_true_lang-CzNAudTz.js → IconTitle.vue_vue_type_script_setup_true_lang-BUuVJmL3.js} +1 -1
- package/client/{SectionBlock-Dp0NIF_b.js → SectionBlock-CVoN8mOT.js} +15 -14
- package/client/assets-BPNh8kJj.js +1052 -0
- package/client/{components-BgyXz8w_.js → components-DXEkYjql.js} +1 -1
- package/client/css-CECN5uSL.js +6 -0
- package/client/custom-inspector-tab-view-DJHDSM_Q.js +50 -0
- package/client/{custom-tab-view-DnTFKhiI.js → custom-tab-view-CZSDs4VF.js} +3 -3
- package/client/devtools-panel.css +1 -1
- package/client/devtools-panel.js +1 -1
- package/client/diff-BxzP2J8R.js +6 -0
- package/client/graph-nbr14wai.js +49115 -0
- package/client/html-7XVNRwN7.js +10 -0
- package/client/{index-C7XPmmLS.js → index-1gPbFyyc.js} +32271 -33396
- package/client/javascript-Dp1Jmi5H.js +6 -0
- package/client/json-DxJze_jm.js +6 -0
- package/client/{overview-NOHiLwdq.js → overview-C9jQTCuB.js} +122 -112
- package/client/pages-DzlmtyA2.js +360 -0
- package/client/pinia-D_f90X-a.js +11 -0
- package/client/router-Co--FDag.js +12 -0
- package/client/{settings-DTrnopyF.js → settings-WVpvn2wJ.js} +66 -64
- package/client/shellscript-InADTalH.js +6 -0
- package/client/{timeline-CVQgEdyi.js → timeline-CUtNI62c.js} +51 -52
- package/client/typescript-mg6ATTE8.js +6 -0
- package/client/vue-BEZF_Tsk.js +33 -0
- package/client/vue-html-CBbEFYtW.js +10 -0
- package/client/yaml-DaO7k5B1.js +6 -0
- package/dist/app.js +1 -1
- package/dist/cli.d.cts +1 -1
- package/dist/cli.d.mts +1 -1
- package/dist/cli.d.ts +1 -1
- package/dist/devtools.js +850 -889
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/user-app.cjs +1 -1
- package/dist/user-app.iife.js +62 -107
- package/dist/user-app.js +1 -1
- package/package.json +11 -11
- package/client/assets-Cenvjhy6.js +0 -1081
- package/client/css-BnL1064W.js +0 -6
- package/client/custom-inspector-tab-view-dZSnsHNr.js +0 -53
- package/client/diff-DOdUfPSR.js +0 -6
- package/client/graph-CHZkohji.js +0 -49959
- package/client/html-Iy9EJBkL.js +0 -10
- package/client/javascript-CXHlxgtu.js +0 -6
- package/client/json-D4cXEhM0.js +0 -6
- package/client/pages-Bqu7i9_W.js +0 -377
- package/client/pinia-VeJqP-Jl.js +0 -11
- package/client/router-BW0WfY9R.js +0 -18
- package/client/shellscript-DmhSIIKI.js +0 -6
- package/client/typescript-DKfvlBCw.js +0 -6
- package/client/vue-ChaKAHzo.js +0 -33
- package/client/vue-html-Hg1VsDox.js +0 -10
- package/client/yaml-DcQhbMrL.js +0 -6
|
@@ -1,1081 +0,0 @@
|
|
|
1
|
-
var ce = Object.defineProperty;
|
|
2
|
-
var se = (u) => {
|
|
3
|
-
throw TypeError(u);
|
|
4
|
-
};
|
|
5
|
-
var pe = (u, t, s) => t in u ? ce(u, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : u[t] = s;
|
|
6
|
-
var M = (u, t, s) => pe(u, typeof t != "symbol" ? t + "" : t, s), he = (u, t, s) => t.has(u) || se("Cannot " + s);
|
|
7
|
-
var H = (u, t, s) => (he(u, t, "read from private field"), s ? s.call(u) : t.get(u)), ne = (u, t, s) => t.has(u) ? se("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(u) : t.set(u, s);
|
|
8
|
-
import { d as F, aq as fe, ay as te, i as $, ad as me, c as f, a as A, o as a, b as r, F as j, D as R, n as q, u as o, t as x, l as B, ai as ve, e as P, q as C, x as W, r as G, M as ee, w as N, aa as Q, az as ye, av as re, k as le, Y as ge, aA as Z, al as be, C as T, aB as we, f as oe, s as J, a5 as ae, ax as Y, G as X, a9 as ie, aj as _e, aC as $e, aD as xe, aw as ke, a0 as Be, at as Ce, O as Ae, P as Pe, v as Se } from "./index-C7XPmmLS.js";
|
|
9
|
-
import { _ as ze } from "./SectionBlock-Dp0NIF_b.js";
|
|
10
|
-
import { _ as je } from "./IconTitle.vue_vue_type_script_setup_true_lang-CzNAudTz.js";
|
|
11
|
-
const Ve = {
|
|
12
|
-
key: 0,
|
|
13
|
-
relative: "",
|
|
14
|
-
"code-block": ""
|
|
15
|
-
}, Ie = {
|
|
16
|
-
flex: "~ wrap",
|
|
17
|
-
"w-full": ""
|
|
18
|
-
}, De = ["onClick"], Oe = {
|
|
19
|
-
flex: "~ gap-2",
|
|
20
|
-
px3: "",
|
|
21
|
-
pb3: ""
|
|
22
|
-
}, Te = /* @__PURE__ */ F({
|
|
23
|
-
__name: "CodeSnippets",
|
|
24
|
-
props: {
|
|
25
|
-
codeSnippets: {},
|
|
26
|
-
eventType: {}
|
|
27
|
-
},
|
|
28
|
-
setup(u) {
|
|
29
|
-
const t = u, s = fe(t.codeSnippets[0]), { copy: e } = te(), i = $(() => {
|
|
30
|
-
var n;
|
|
31
|
-
return ((n = s.value) == null ? void 0 : n.lang) || "text";
|
|
32
|
-
});
|
|
33
|
-
return me(() => {
|
|
34
|
-
t.codeSnippets.includes(s.value) || (s.value = t.codeSnippets[0]);
|
|
35
|
-
}), (n, l) => {
|
|
36
|
-
var c;
|
|
37
|
-
return n.codeSnippets.length ? (a(), f("div", Ve, [
|
|
38
|
-
r("div", Ie, [
|
|
39
|
-
(a(!0), f(j, null, R(n.codeSnippets, (p, m) => (a(), f("button", {
|
|
40
|
-
key: m,
|
|
41
|
-
px4: "",
|
|
42
|
-
py2: "",
|
|
43
|
-
border: "r base",
|
|
44
|
-
hover: "bg-active",
|
|
45
|
-
class: q(p === o(s) ? "" : "border-b"),
|
|
46
|
-
onClick: (z) => s.value = p
|
|
47
|
-
}, [
|
|
48
|
-
r("div", {
|
|
49
|
-
class: q(p === o(s) ? "" : "op30"),
|
|
50
|
-
"font-mono": ""
|
|
51
|
-
}, x(p.name), 3)
|
|
52
|
-
], 10, De))), 128)),
|
|
53
|
-
l[1] || (l[1] = r("div", {
|
|
54
|
-
border: "b base",
|
|
55
|
-
"flex-auto": ""
|
|
56
|
-
}, null, -1))
|
|
57
|
-
]),
|
|
58
|
-
o(s) ? (a(), f(j, { key: 0 }, [
|
|
59
|
-
B(o(ve), {
|
|
60
|
-
code: o(s).code,
|
|
61
|
-
lang: o(i),
|
|
62
|
-
lines: !1,
|
|
63
|
-
"w-full": "",
|
|
64
|
-
"of-auto": "",
|
|
65
|
-
p3: ""
|
|
66
|
-
}, null, 8, ["code", "lang"]),
|
|
67
|
-
r("div", Oe, [
|
|
68
|
-
B(o(ee), {
|
|
69
|
-
onClick: l[0] || (l[0] = (p) => o(e)(o(s).code, { silent: !1, type: n.eventType || `code-snippet-${o(s).name}` }))
|
|
70
|
-
}, {
|
|
71
|
-
icon: C(() => [
|
|
72
|
-
G(n.$slots, "i-carbon-copy")
|
|
73
|
-
]),
|
|
74
|
-
default: C(() => [
|
|
75
|
-
l[2] || (l[2] = W(" Copy "))
|
|
76
|
-
]),
|
|
77
|
-
_: 3
|
|
78
|
-
}),
|
|
79
|
-
(c = o(s)) != null && c.docs ? (a(), P(o(ee), {
|
|
80
|
-
key: 0,
|
|
81
|
-
to: o(s).docs,
|
|
82
|
-
target: "_blank"
|
|
83
|
-
}, {
|
|
84
|
-
icon: C(() => [
|
|
85
|
-
G(n.$slots, "i-carbon-catalog")
|
|
86
|
-
]),
|
|
87
|
-
default: C(() => [
|
|
88
|
-
l[3] || (l[3] = W(" Docs "))
|
|
89
|
-
]),
|
|
90
|
-
_: 3
|
|
91
|
-
}, 8, ["to"])) : A("", !0)
|
|
92
|
-
])
|
|
93
|
-
], 64)) : A("", !0)
|
|
94
|
-
])) : A("", !0);
|
|
95
|
-
};
|
|
96
|
-
}
|
|
97
|
-
}), Ue = ["title"], Fe = /* @__PURE__ */ F({
|
|
98
|
-
__name: "FilepathItem",
|
|
99
|
-
props: {
|
|
100
|
-
filepath: {},
|
|
101
|
-
lineBreak: { type: Boolean },
|
|
102
|
-
subpath: { type: Boolean }
|
|
103
|
-
},
|
|
104
|
-
setup(u) {
|
|
105
|
-
const t = u, s = $(
|
|
106
|
-
() => ({ path: t.filepath })
|
|
107
|
-
), { copy: e } = te();
|
|
108
|
-
return (i, n) => N((a(), f("button", {
|
|
109
|
-
"font-mono": "",
|
|
110
|
-
"hover:underline": "",
|
|
111
|
-
class: q(i.lineBreak ? "" : "ws-nowrap of-hidden truncate"),
|
|
112
|
-
title: i.filepath,
|
|
113
|
-
onClick: n[0] || (n[0] = (l) => o(e)(i.filepath))
|
|
114
|
-
}, [
|
|
115
|
-
W(x(o(s).path), 1)
|
|
116
|
-
], 10, Ue)), [
|
|
117
|
-
[o(Q), "Copy file path"]
|
|
118
|
-
]);
|
|
119
|
-
}
|
|
120
|
-
});
|
|
121
|
-
function Ee(u) {
|
|
122
|
-
return typeof u == "string" ? `'${u}'` : new Me().serialize(u);
|
|
123
|
-
}
|
|
124
|
-
const Me = /* @__PURE__ */ function() {
|
|
125
|
-
var t;
|
|
126
|
-
class u {
|
|
127
|
-
constructor() {
|
|
128
|
-
ne(this, t, /* @__PURE__ */ new Map());
|
|
129
|
-
}
|
|
130
|
-
compare(e, i) {
|
|
131
|
-
const n = typeof e, l = typeof i;
|
|
132
|
-
return n === "string" && l === "string" ? e.localeCompare(i) : n === "number" && l === "number" ? e - i : String.prototype.localeCompare.call(this.serialize(e, !0), this.serialize(i, !0));
|
|
133
|
-
}
|
|
134
|
-
serialize(e, i) {
|
|
135
|
-
if (e === null) return "null";
|
|
136
|
-
switch (typeof e) {
|
|
137
|
-
case "string":
|
|
138
|
-
return i ? e : `'${e}'`;
|
|
139
|
-
case "bigint":
|
|
140
|
-
return `${e}n`;
|
|
141
|
-
case "object":
|
|
142
|
-
return this.$object(e);
|
|
143
|
-
case "function":
|
|
144
|
-
return this.$function(e);
|
|
145
|
-
}
|
|
146
|
-
return String(e);
|
|
147
|
-
}
|
|
148
|
-
serializeObject(e) {
|
|
149
|
-
const i = Object.prototype.toString.call(e);
|
|
150
|
-
if (i !== "[object Object]") return this.serializeBuiltInType(i.length < 10 ? `unknown:${i}` : i.slice(8, -1), e);
|
|
151
|
-
const n = e.constructor, l = n === Object || n === void 0 ? "" : n.name;
|
|
152
|
-
if (l !== "" && globalThis[l] === n) return this.serializeBuiltInType(l, e);
|
|
153
|
-
if (typeof e.toJSON == "function") {
|
|
154
|
-
const c = e.toJSON();
|
|
155
|
-
return l + (c !== null && typeof c == "object" ? this.$object(c) : `(${this.serialize(c)})`);
|
|
156
|
-
}
|
|
157
|
-
return this.serializeObjectEntries(l, Object.entries(e));
|
|
158
|
-
}
|
|
159
|
-
serializeBuiltInType(e, i) {
|
|
160
|
-
const n = this["$" + e];
|
|
161
|
-
if (n) return n.call(this, i);
|
|
162
|
-
if (typeof (i == null ? void 0 : i.entries) == "function") return this.serializeObjectEntries(e, i.entries());
|
|
163
|
-
throw new Error(`Cannot serialize ${e}`);
|
|
164
|
-
}
|
|
165
|
-
serializeObjectEntries(e, i) {
|
|
166
|
-
const n = Array.from(i).sort((c, p) => this.compare(c[0], p[0]));
|
|
167
|
-
let l = `${e}{`;
|
|
168
|
-
for (let c = 0; c < n.length; c++) {
|
|
169
|
-
const [p, m] = n[c];
|
|
170
|
-
l += `${this.serialize(p, !0)}:${this.serialize(m)}`, c < n.length - 1 && (l += ",");
|
|
171
|
-
}
|
|
172
|
-
return l + "}";
|
|
173
|
-
}
|
|
174
|
-
$object(e) {
|
|
175
|
-
let i = H(this, t).get(e);
|
|
176
|
-
return i === void 0 && (H(this, t).set(e, `#${H(this, t).size}`), i = this.serializeObject(e), H(this, t).set(e, i)), i;
|
|
177
|
-
}
|
|
178
|
-
$function(e) {
|
|
179
|
-
const i = Function.prototype.toString.call(e);
|
|
180
|
-
return i.slice(-15) === "[native code] }" ? `${e.name || ""}()[native]` : `${e.name}(${e.length})${i.replace(/\s*\n\s*/g, "")}`;
|
|
181
|
-
}
|
|
182
|
-
$Array(e) {
|
|
183
|
-
let i = "[";
|
|
184
|
-
for (let n = 0; n < e.length; n++) i += this.serialize(e[n]), n < e.length - 1 && (i += ",");
|
|
185
|
-
return i + "]";
|
|
186
|
-
}
|
|
187
|
-
$Date(e) {
|
|
188
|
-
try {
|
|
189
|
-
return `Date(${e.toISOString()})`;
|
|
190
|
-
} catch {
|
|
191
|
-
return "Date(null)";
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
$ArrayBuffer(e) {
|
|
195
|
-
return `ArrayBuffer[${new Uint8Array(e).join(",")}]`;
|
|
196
|
-
}
|
|
197
|
-
$Set(e) {
|
|
198
|
-
return `Set${this.$Array(Array.from(e).sort((i, n) => this.compare(i, n)))}`;
|
|
199
|
-
}
|
|
200
|
-
$Map(e) {
|
|
201
|
-
return this.serializeObjectEntries("Map", e.entries());
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
t = new WeakMap();
|
|
205
|
-
for (const s of ["Error", "RegExp", "URL"]) u.prototype["$" + s] = function(e) {
|
|
206
|
-
return `${s}(${e})`;
|
|
207
|
-
};
|
|
208
|
-
for (const s of ["Int8Array", "Uint8Array", "Uint8ClampedArray", "Int16Array", "Uint16Array", "Int32Array", "Uint32Array", "Float32Array", "Float64Array"]) u.prototype["$" + s] = function(e) {
|
|
209
|
-
return `${s}[${e.join(",")}]`;
|
|
210
|
-
};
|
|
211
|
-
for (const s of ["BigInt64Array", "BigUint64Array"]) u.prototype["$" + s] = function(e) {
|
|
212
|
-
return `${s}[${e.join("n,")}${e.length > 0 ? "n" : ""}]`;
|
|
213
|
-
};
|
|
214
|
-
return u;
|
|
215
|
-
}(), Le = [1779033703, -1150833019, 1013904242, -1521486534, 1359893119, -1694144372, 528734635, 1541459225], Re = [1116352408, 1899447441, -1245643825, -373957723, 961987163, 1508970993, -1841331548, -1424204075, -670586216, 310598401, 607225278, 1426881987, 1925078388, -2132889090, -1680079193, -1046744716, -459576895, -272742522, 264347078, 604807628, 770255983, 1249150122, 1555081692, 1996064986, -1740746414, -1473132947, -1341970488, -1084653625, -958395405, -710438585, 113926993, 338241895, 666307205, 773529912, 1294757372, 1396182291, 1695183700, 1986661051, -2117940946, -1838011259, -1564481375, -1474664885, -1035236496, -949202525, -778901479, -694614492, -200395387, 275423344, 430227734, 506948616, 659060556, 883997877, 958139571, 1322822218, 1537002063, 1747873779, 1955562222, 2024104815, -2067236844, -1933114872, -1866530822, -1538233109, -1090935817, -965641998], Ne = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_", L = [];
|
|
216
|
-
class qe {
|
|
217
|
-
constructor() {
|
|
218
|
-
M(this, "_data", new K());
|
|
219
|
-
M(this, "_hash", new K([...Le]));
|
|
220
|
-
M(this, "_nDataBytes", 0);
|
|
221
|
-
M(this, "_minBufferSize", 0);
|
|
222
|
-
}
|
|
223
|
-
finalize(t) {
|
|
224
|
-
t && this._append(t);
|
|
225
|
-
const s = this._nDataBytes * 8, e = this._data.sigBytes * 8;
|
|
226
|
-
return this._data.words[e >>> 5] |= 128 << 24 - e % 32, this._data.words[(e + 64 >>> 9 << 4) + 14] = Math.floor(s / 4294967296), this._data.words[(e + 64 >>> 9 << 4) + 15] = s, this._data.sigBytes = this._data.words.length * 4, this._process(), this._hash;
|
|
227
|
-
}
|
|
228
|
-
_doProcessBlock(t, s) {
|
|
229
|
-
const e = this._hash.words;
|
|
230
|
-
let i = e[0], n = e[1], l = e[2], c = e[3], p = e[4], m = e[5], z = e[6], O = e[7];
|
|
231
|
-
for (let w = 0; w < 64; w++) {
|
|
232
|
-
if (w < 16) L[w] = t[s + w] | 0;
|
|
233
|
-
else {
|
|
234
|
-
const h = L[w - 15], d = (h << 25 | h >>> 7) ^ (h << 14 | h >>> 18) ^ h >>> 3, _ = L[w - 2], k = (_ << 15 | _ >>> 17) ^ (_ << 13 | _ >>> 19) ^ _ >>> 10;
|
|
235
|
-
L[w] = d + L[w - 7] + k + L[w - 16];
|
|
236
|
-
}
|
|
237
|
-
const V = p & m ^ ~p & z, E = i & n ^ i & l ^ n & l, b = (i << 30 | i >>> 2) ^ (i << 19 | i >>> 13) ^ (i << 10 | i >>> 22), v = (p << 26 | p >>> 6) ^ (p << 21 | p >>> 11) ^ (p << 7 | p >>> 25), g = O + v + V + Re[w] + L[w], I = b + E;
|
|
238
|
-
O = z, z = m, m = p, p = c + g | 0, c = l, l = n, n = i, i = g + I | 0;
|
|
239
|
-
}
|
|
240
|
-
e[0] = e[0] + i | 0, e[1] = e[1] + n | 0, e[2] = e[2] + l | 0, e[3] = e[3] + c | 0, e[4] = e[4] + p | 0, e[5] = e[5] + m | 0, e[6] = e[6] + z | 0, e[7] = e[7] + O | 0;
|
|
241
|
-
}
|
|
242
|
-
_append(t) {
|
|
243
|
-
typeof t == "string" && (t = K.fromUtf8(t)), this._data.concat(t), this._nDataBytes += t.sigBytes;
|
|
244
|
-
}
|
|
245
|
-
_process(t) {
|
|
246
|
-
let s, e = this._data.sigBytes / 64;
|
|
247
|
-
t ? e = Math.ceil(e) : e = Math.max((e | 0) - this._minBufferSize, 0);
|
|
248
|
-
const i = e * 16, n = Math.min(i * 4, this._data.sigBytes);
|
|
249
|
-
if (i) {
|
|
250
|
-
for (let l = 0; l < i; l += 16) this._doProcessBlock(this._data.words, l);
|
|
251
|
-
s = this._data.words.splice(0, i), this._data.sigBytes -= n;
|
|
252
|
-
}
|
|
253
|
-
return new K(s, n);
|
|
254
|
-
}
|
|
255
|
-
}
|
|
256
|
-
class K {
|
|
257
|
-
constructor(t, s) {
|
|
258
|
-
M(this, "words");
|
|
259
|
-
M(this, "sigBytes");
|
|
260
|
-
t = this.words = t || [], this.sigBytes = s === void 0 ? t.length * 4 : s;
|
|
261
|
-
}
|
|
262
|
-
static fromUtf8(t) {
|
|
263
|
-
const s = unescape(encodeURIComponent(t)), e = s.length, i = [];
|
|
264
|
-
for (let n = 0; n < e; n++) i[n >>> 2] |= (s.charCodeAt(n) & 255) << 24 - n % 4 * 8;
|
|
265
|
-
return new K(i, e);
|
|
266
|
-
}
|
|
267
|
-
toBase64() {
|
|
268
|
-
const t = [];
|
|
269
|
-
for (let s = 0; s < this.sigBytes; s += 3) {
|
|
270
|
-
const e = this.words[s >>> 2] >>> 24 - s % 4 * 8 & 255, i = this.words[s + 1 >>> 2] >>> 24 - (s + 1) % 4 * 8 & 255, n = this.words[s + 2 >>> 2] >>> 24 - (s + 2) % 4 * 8 & 255, l = e << 16 | i << 8 | n;
|
|
271
|
-
for (let c = 0; c < 4 && s * 8 + c * 6 < this.sigBytes * 8; c++) t.push(Ne.charAt(l >>> 6 * (3 - c) & 63));
|
|
272
|
-
}
|
|
273
|
-
return t.join("");
|
|
274
|
-
}
|
|
275
|
-
concat(t) {
|
|
276
|
-
if (this.words[this.sigBytes >>> 2] &= 4294967295 << 32 - this.sigBytes % 4 * 8, this.words.length = Math.ceil(this.sigBytes / 4), this.sigBytes % 4) for (let s = 0; s < t.sigBytes; s++) {
|
|
277
|
-
const e = t.words[s >>> 2] >>> 24 - s % 4 * 8 & 255;
|
|
278
|
-
this.words[this.sigBytes + s >>> 2] |= e << 24 - (this.sigBytes + s) % 4 * 8;
|
|
279
|
-
}
|
|
280
|
-
else for (let s = 0; s < t.sigBytes; s += 4) this.words[this.sigBytes + s >>> 2] = t.words[s >>> 2];
|
|
281
|
-
this.sigBytes += t.sigBytes;
|
|
282
|
-
}
|
|
283
|
-
}
|
|
284
|
-
function Ge(u) {
|
|
285
|
-
return new qe().finalize(u).toBase64();
|
|
286
|
-
}
|
|
287
|
-
function Je(u) {
|
|
288
|
-
return Ge(Ee(u));
|
|
289
|
-
}
|
|
290
|
-
const Xe = /* @__PURE__ */ F({
|
|
291
|
-
__name: "AssetFontPreview",
|
|
292
|
-
props: {
|
|
293
|
-
asset: {}
|
|
294
|
-
},
|
|
295
|
-
setup(u) {
|
|
296
|
-
const t = u, s = $(() => `devtools-assets-${Je(t.asset)}`);
|
|
297
|
-
return ye($(() => `
|
|
298
|
-
@font-face {
|
|
299
|
-
font-family: '${s.value}';
|
|
300
|
-
src: url('${t.asset.publicPath}');
|
|
301
|
-
}
|
|
302
|
-
`)), (e, i) => (a(), f("div", {
|
|
303
|
-
"of-hidden": "",
|
|
304
|
-
style: re({ fontFamily: `'${o(s)}'` })
|
|
305
|
-
}, " Aa Bb Cc Dd Ee Ff Gg Hh Ii Jj Kk Ll Mm Nn Oo Pp Qq Rr Ss Tt Uu Vv Ww Xx Yy Zz ", 4));
|
|
306
|
-
}
|
|
307
|
-
}), Ke = {
|
|
308
|
-
flex: "",
|
|
309
|
-
"items-center": "",
|
|
310
|
-
"justify-center": "",
|
|
311
|
-
"of-hidden": "",
|
|
312
|
-
"bg-active": "",
|
|
313
|
-
"object-cover": "",
|
|
314
|
-
p1: ""
|
|
315
|
-
}, We = ["src"], Ye = {
|
|
316
|
-
key: 2,
|
|
317
|
-
"i-carbon-document": "",
|
|
318
|
-
"text-3xl": "",
|
|
319
|
-
op20: ""
|
|
320
|
-
}, He = {
|
|
321
|
-
key: 3,
|
|
322
|
-
"w-full": "",
|
|
323
|
-
"self-start": "",
|
|
324
|
-
p4: ""
|
|
325
|
-
}, Qe = ["textContent"], Ze = { key: 4 }, et = ["src", "autoplay", "controls"], tt = { key: 5 }, st = {
|
|
326
|
-
key: 0,
|
|
327
|
-
"i-carbon-volume-up": "",
|
|
328
|
-
"text-3xl": "",
|
|
329
|
-
op20: ""
|
|
330
|
-
}, nt = ["src"], ot = {
|
|
331
|
-
key: 6,
|
|
332
|
-
"i-vscode-icons-file-type-wasm": "",
|
|
333
|
-
"text-3xl": ""
|
|
334
|
-
}, it = {
|
|
335
|
-
key: 7,
|
|
336
|
-
"i-carbon-help": "",
|
|
337
|
-
"text-3xl": "",
|
|
338
|
-
op20: ""
|
|
339
|
-
}, ue = /* @__PURE__ */ F({
|
|
340
|
-
__name: "AssetPreview",
|
|
341
|
-
props: {
|
|
342
|
-
asset: {},
|
|
343
|
-
textContent: {},
|
|
344
|
-
detail: { type: Boolean }
|
|
345
|
-
},
|
|
346
|
-
setup(u) {
|
|
347
|
-
return (t, s) => {
|
|
348
|
-
const e = Xe;
|
|
349
|
-
return a(), f("div", Ke, [
|
|
350
|
-
t.asset.type === "image" ? (a(), f("img", {
|
|
351
|
-
key: 0,
|
|
352
|
-
src: t.asset.publicPath
|
|
353
|
-
}, null, 8, We)) : t.asset.type === "font" ? (a(), P(e, {
|
|
354
|
-
key: t.asset.publicPath,
|
|
355
|
-
asset: t.asset,
|
|
356
|
-
"self-stretch": "",
|
|
357
|
-
p2: "",
|
|
358
|
-
"text-2xl": ""
|
|
359
|
-
}, null, 8, ["asset"])) : t.asset.type === "text" && !t.textContent ? (a(), f("div", Ye)) : t.asset.type === "text" && t.textContent ? (a(), f("div", He, [
|
|
360
|
-
r("pre", {
|
|
361
|
-
"max-h-10rem": "",
|
|
362
|
-
"of-hidden": "",
|
|
363
|
-
"text-xs": "",
|
|
364
|
-
"font-mono": "",
|
|
365
|
-
textContent: x(t.textContent)
|
|
366
|
-
}, null, 8, Qe)
|
|
367
|
-
])) : t.asset.type === "video" ? (a(), f("div", Ze, [
|
|
368
|
-
r("video", {
|
|
369
|
-
src: t.asset.publicPath,
|
|
370
|
-
autoplay: t.detail,
|
|
371
|
-
controls: t.detail
|
|
372
|
-
}, null, 8, et)
|
|
373
|
-
])) : t.asset.type === "audio" ? (a(), f("div", tt, [
|
|
374
|
-
t.detail ? (a(), f("audio", {
|
|
375
|
-
key: 1,
|
|
376
|
-
src: t.asset.publicPath,
|
|
377
|
-
controls: ""
|
|
378
|
-
}, null, 8, nt)) : (a(), f("div", st))
|
|
379
|
-
])) : t.asset.type === "wasm" ? (a(), f("div", ot)) : (a(), f("div", it))
|
|
380
|
-
]);
|
|
381
|
-
};
|
|
382
|
-
}
|
|
383
|
-
}), rt = {
|
|
384
|
-
flex: "~ col gap-4",
|
|
385
|
-
"min-h-full": "",
|
|
386
|
-
"w-full": "",
|
|
387
|
-
"of-hidden": "",
|
|
388
|
-
p4: ""
|
|
389
|
-
}, lt = {
|
|
390
|
-
flex: "~",
|
|
391
|
-
"items-center": "",
|
|
392
|
-
"justify-center": ""
|
|
393
|
-
}, at = {
|
|
394
|
-
"max-w-full": "",
|
|
395
|
-
"w-full": "",
|
|
396
|
-
"table-fixed": ""
|
|
397
|
-
}, ut = {
|
|
398
|
-
flex: "~ gap-1",
|
|
399
|
-
"w-full": "",
|
|
400
|
-
"items-center": ""
|
|
401
|
-
}, dt = {
|
|
402
|
-
flex: "~ gap-1",
|
|
403
|
-
"w-full": "",
|
|
404
|
-
"items-center": "",
|
|
405
|
-
"of-hidden": ""
|
|
406
|
-
}, ct = {
|
|
407
|
-
"flex-auto": "",
|
|
408
|
-
"of-hidden": "",
|
|
409
|
-
truncate: "",
|
|
410
|
-
"ws-pre": "",
|
|
411
|
-
"font-mono": ""
|
|
412
|
-
}, pt = { capitalize: "" }, ht = { key: 0 }, ft = { op70: "" }, mt = { flex: "~ gap2 wrap" }, vt = /* @__PURE__ */ F({
|
|
413
|
-
__name: "AssetDetails",
|
|
414
|
-
props: {
|
|
415
|
-
modelValue: {}
|
|
416
|
-
},
|
|
417
|
-
setup(u, { emit: t }) {
|
|
418
|
-
const s = u, e = t, i = ge(), n = le(s, "modelValue", e, { passive: !0 }), l = $(() => i.vitePluginDetected.value), c = Z(() => Y.value.getAssetImporters(n.value.publicPath).then((h) => h), []), p = $(() => be.value), m = Z(() => {
|
|
419
|
-
if (n.value.type === "image")
|
|
420
|
-
return Y.value.getImageMeta(n.value.filePath).then((h) => h);
|
|
421
|
-
}), z = T(), O = T(0), w = Z(async () => {
|
|
422
|
-
if (n.value.type !== "text")
|
|
423
|
-
return;
|
|
424
|
-
O.value;
|
|
425
|
-
const h = await Y.value.getTextAssetContent(n.value.filePath).then((d) => d);
|
|
426
|
-
return z.value = h, h;
|
|
427
|
-
}), V = $(() => {
|
|
428
|
-
var d;
|
|
429
|
-
const h = [];
|
|
430
|
-
if (n.value.type === "image") {
|
|
431
|
-
const _ = (d = m.value) != null && d.width ? `
|
|
432
|
-
width="${m.value.width}"
|
|
433
|
-
height="${m.value.height}" ` : " ";
|
|
434
|
-
return h.push(
|
|
435
|
-
{ lang: "vue-html", code: `<img${_}
|
|
436
|
-
src="${n.value.publicPath}"
|
|
437
|
-
/>`, name: "Plain Image" }
|
|
438
|
-
), h;
|
|
439
|
-
}
|
|
440
|
-
return h.push({
|
|
441
|
-
lang: "html",
|
|
442
|
-
code: `<a download href="${n.value.publicPath}">
|
|
443
|
-
Download ${n.value.path.split("/").slice(-1)[0]}
|
|
444
|
-
</a>`,
|
|
445
|
-
name: "Download link"
|
|
446
|
-
}), h;
|
|
447
|
-
}), { copy: E } = te(), b = we(() => n.value.mtime), v = $(() => {
|
|
448
|
-
const h = n.value.size;
|
|
449
|
-
return h < 1024 ? `${h} B` : h < 1024 * 1024 ? `${(h / 1024).toFixed(2)} KB` : `${(h / 1024 / 1024).toFixed(2)} MB`;
|
|
450
|
-
}), g = $(() => {
|
|
451
|
-
var _, k;
|
|
452
|
-
if (!((_ = m.value) != null && _.width) || !((k = m.value) != null && k.height))
|
|
453
|
-
return "";
|
|
454
|
-
const h = (U, y) => y ? h(y, U % y) : U, d = h(m.value.width, m.value.height);
|
|
455
|
-
return d > 3 ? `${m.value.width / d}:${m.value.height / d}` : "";
|
|
456
|
-
}), I = $(() => [
|
|
457
|
-
"image",
|
|
458
|
-
"text",
|
|
459
|
-
"video",
|
|
460
|
-
"audio",
|
|
461
|
-
"font"
|
|
462
|
-
].includes(n.value.type));
|
|
463
|
-
return (h, d) => {
|
|
464
|
-
var D;
|
|
465
|
-
const _ = ue, k = Fe, U = ae("RouterLink"), y = Te;
|
|
466
|
-
return a(), f("div", rt, [
|
|
467
|
-
o(I) ? (a(), f(j, { key: 0 }, [
|
|
468
|
-
d[2] || (d[2] = r("div", {
|
|
469
|
-
flex: "~ gap2",
|
|
470
|
-
"mb--2": "",
|
|
471
|
-
"items-center": "",
|
|
472
|
-
op50: ""
|
|
473
|
-
}, [
|
|
474
|
-
r("div", { "x-divider": "" }),
|
|
475
|
-
r("div", { "flex-none": "" }, " Preview "),
|
|
476
|
-
r("div", { "x-divider": "" })
|
|
477
|
-
], -1)),
|
|
478
|
-
r("div", lt, [
|
|
479
|
-
B(_, {
|
|
480
|
-
detail: "",
|
|
481
|
-
"max-h-80": "",
|
|
482
|
-
"min-h-20": "",
|
|
483
|
-
"min-w-20": "",
|
|
484
|
-
"w-auto": "",
|
|
485
|
-
rounded: "",
|
|
486
|
-
border: "~ base",
|
|
487
|
-
asset: o(n),
|
|
488
|
-
"text-content": o(w)
|
|
489
|
-
}, null, 8, ["asset", "text-content"])
|
|
490
|
-
])
|
|
491
|
-
], 64)) : A("", !0),
|
|
492
|
-
d[12] || (d[12] = r("div", {
|
|
493
|
-
flex: "~ gap2",
|
|
494
|
-
"mb--2": "",
|
|
495
|
-
"items-center": "",
|
|
496
|
-
op50: ""
|
|
497
|
-
}, [
|
|
498
|
-
r("div", { "x-divider": "" }),
|
|
499
|
-
r("div", { "flex-none": "" }, " Details "),
|
|
500
|
-
r("div", { "x-divider": "" })
|
|
501
|
-
], -1)),
|
|
502
|
-
r("table", at, [
|
|
503
|
-
r("tbody", null, [
|
|
504
|
-
r("tr", null, [
|
|
505
|
-
d[3] || (d[3] = r("td", {
|
|
506
|
-
"w-30": "",
|
|
507
|
-
"ws-nowrap": "",
|
|
508
|
-
pr5: "",
|
|
509
|
-
"text-right": "",
|
|
510
|
-
op50: ""
|
|
511
|
-
}, " Filepath ", -1)),
|
|
512
|
-
r("td", null, [
|
|
513
|
-
r("div", ut, [
|
|
514
|
-
B(k, {
|
|
515
|
-
filepath: o(n).filePath,
|
|
516
|
-
"text-left": ""
|
|
517
|
-
}, null, 8, ["filepath"]),
|
|
518
|
-
o(l) && o(p) ? N((a(), P(o(J), {
|
|
519
|
-
key: 0,
|
|
520
|
-
title: "Open in Editor",
|
|
521
|
-
icon: "i-carbon-launch",
|
|
522
|
-
action: "",
|
|
523
|
-
"flex-none": "",
|
|
524
|
-
border: !1,
|
|
525
|
-
onClick: d[0] || (d[0] = (S) => o(oe)(o(n).filePath))
|
|
526
|
-
}, null, 512)), [
|
|
527
|
-
[o(Q), "Open in Editor"]
|
|
528
|
-
]) : A("", !0)
|
|
529
|
-
])
|
|
530
|
-
])
|
|
531
|
-
]),
|
|
532
|
-
r("tr", null, [
|
|
533
|
-
d[4] || (d[4] = r("td", {
|
|
534
|
-
"w-30": "",
|
|
535
|
-
"ws-nowrap": "",
|
|
536
|
-
pr5: "",
|
|
537
|
-
"text-right": "",
|
|
538
|
-
op50: ""
|
|
539
|
-
}, " Public Path ", -1)),
|
|
540
|
-
r("td", null, [
|
|
541
|
-
r("div", dt, [
|
|
542
|
-
r("div", ct, x(o(n).publicPath), 1),
|
|
543
|
-
N(B(o(J), {
|
|
544
|
-
title: "Copy public path",
|
|
545
|
-
icon: "i-carbon-copy",
|
|
546
|
-
action: "",
|
|
547
|
-
mr1: "",
|
|
548
|
-
"mt--2px": "",
|
|
549
|
-
"flex-none": "",
|
|
550
|
-
border: !1,
|
|
551
|
-
onClick: d[1] || (d[1] = (S) => o(E)(o(n).publicPath, { type: "assets-public-path" }))
|
|
552
|
-
}, null, 512), [
|
|
553
|
-
[o(Q), "Copy public path"]
|
|
554
|
-
]),
|
|
555
|
-
B(U, {
|
|
556
|
-
to: o(n).publicPath,
|
|
557
|
-
target: "_blank"
|
|
558
|
-
}, {
|
|
559
|
-
default: C(() => [
|
|
560
|
-
N(B(o(J), {
|
|
561
|
-
icon: "i-carbon-launch",
|
|
562
|
-
action: "",
|
|
563
|
-
"flex-none": "",
|
|
564
|
-
border: !1,
|
|
565
|
-
title: "Open in Browser"
|
|
566
|
-
}, null, 512), [
|
|
567
|
-
[o(Q), "Open in Browser"]
|
|
568
|
-
])
|
|
569
|
-
]),
|
|
570
|
-
_: 1
|
|
571
|
-
}, 8, ["to"])
|
|
572
|
-
])
|
|
573
|
-
])
|
|
574
|
-
]),
|
|
575
|
-
r("tr", null, [
|
|
576
|
-
d[5] || (d[5] = r("td", {
|
|
577
|
-
"w-30": "",
|
|
578
|
-
"ws-nowrap": "",
|
|
579
|
-
pr5: "",
|
|
580
|
-
"text-right": "",
|
|
581
|
-
op50: ""
|
|
582
|
-
}, " Type ", -1)),
|
|
583
|
-
r("td", pt, x(o(n).type), 1)
|
|
584
|
-
]),
|
|
585
|
-
(D = o(m)) != null && D.width ? (a(), f(j, { key: 0 }, [
|
|
586
|
-
r("tr", null, [
|
|
587
|
-
d[6] || (d[6] = r("td", {
|
|
588
|
-
"w-30": "",
|
|
589
|
-
"ws-nowrap": "",
|
|
590
|
-
pr5: "",
|
|
591
|
-
"text-right": "",
|
|
592
|
-
op50: ""
|
|
593
|
-
}, " Image Size ", -1)),
|
|
594
|
-
r("td", null, x(o(m).width) + " x " + x(o(m).height), 1)
|
|
595
|
-
]),
|
|
596
|
-
o(g) ? (a(), f("tr", ht, [
|
|
597
|
-
d[7] || (d[7] = r("td", {
|
|
598
|
-
"w-30": "",
|
|
599
|
-
"ws-nowrap": "",
|
|
600
|
-
pr5: "",
|
|
601
|
-
"text-right": "",
|
|
602
|
-
op50: ""
|
|
603
|
-
}, " Aspect Ratio ", -1)),
|
|
604
|
-
r("td", null, x(o(g)), 1)
|
|
605
|
-
])) : A("", !0)
|
|
606
|
-
], 64)) : A("", !0),
|
|
607
|
-
r("tr", null, [
|
|
608
|
-
d[8] || (d[8] = r("td", {
|
|
609
|
-
"w-30": "",
|
|
610
|
-
"ws-nowrap": "",
|
|
611
|
-
pr5: "",
|
|
612
|
-
"text-right": "",
|
|
613
|
-
op50: ""
|
|
614
|
-
}, " File size ", -1)),
|
|
615
|
-
r("td", null, x(o(v)), 1)
|
|
616
|
-
]),
|
|
617
|
-
r("tr", null, [
|
|
618
|
-
d[9] || (d[9] = r("td", {
|
|
619
|
-
"w-30": "",
|
|
620
|
-
"ws-nowrap": "",
|
|
621
|
-
pr5: "",
|
|
622
|
-
"text-right": "",
|
|
623
|
-
op50: ""
|
|
624
|
-
}, " Last modified ", -1)),
|
|
625
|
-
r("td", null, [
|
|
626
|
-
W(x(new Date(o(n).mtime).toLocaleString()) + " ", 1),
|
|
627
|
-
r("span", ft, "(" + x(o(b)) + ")", 1)
|
|
628
|
-
])
|
|
629
|
-
]),
|
|
630
|
-
r("tr", null, [
|
|
631
|
-
d[10] || (d[10] = r("td", {
|
|
632
|
-
"w-30": "",
|
|
633
|
-
"ws-nowrap": "",
|
|
634
|
-
pr5: "",
|
|
635
|
-
"text-right": "",
|
|
636
|
-
"align-top": "",
|
|
637
|
-
op50: ""
|
|
638
|
-
}, " Importers ", -1)),
|
|
639
|
-
r("td", null, [
|
|
640
|
-
o(c).length > 0 ? (a(!0), f(j, { key: 0 }, R(o(c), (S) => (a(), f("div", {
|
|
641
|
-
key: S.url,
|
|
642
|
-
flex: "~ gap-1",
|
|
643
|
-
"w-full": "",
|
|
644
|
-
"items-center": ""
|
|
645
|
-
}, [
|
|
646
|
-
B(k, {
|
|
647
|
-
filepath: S.id || S.url,
|
|
648
|
-
"text-left": ""
|
|
649
|
-
}, null, 8, ["filepath"]),
|
|
650
|
-
o(i).vitePluginDetected.value && o(p) && S.id ? N((a(), P(o(J), {
|
|
651
|
-
key: 0,
|
|
652
|
-
title: "Open in Editor",
|
|
653
|
-
icon: "i-carbon-launch",
|
|
654
|
-
action: "",
|
|
655
|
-
"flex-none": "",
|
|
656
|
-
border: !1,
|
|
657
|
-
onClick: (de) => o(oe)(S.id)
|
|
658
|
-
}, null, 8, ["onClick"])), [
|
|
659
|
-
[o(Q), "Open in Editor"]
|
|
660
|
-
]) : A("", !0)
|
|
661
|
-
]))), 128)) : (a(), f(j, { key: 1 }, [
|
|
662
|
-
W(" None ")
|
|
663
|
-
], 64))
|
|
664
|
-
])
|
|
665
|
-
])
|
|
666
|
-
])
|
|
667
|
-
]),
|
|
668
|
-
d[13] || (d[13] = r("div", {
|
|
669
|
-
flex: "~ gap2",
|
|
670
|
-
"mb--2": "",
|
|
671
|
-
"items-center": "",
|
|
672
|
-
op50: ""
|
|
673
|
-
}, [
|
|
674
|
-
r("div", { "x-divider": "" }),
|
|
675
|
-
r("div", { "flex-none": "" }, " Actions "),
|
|
676
|
-
r("div", { "x-divider": "" })
|
|
677
|
-
], -1)),
|
|
678
|
-
r("div", mt, [
|
|
679
|
-
B(o(ee), {
|
|
680
|
-
to: o(n).publicPath,
|
|
681
|
-
download: "",
|
|
682
|
-
target: "_blank"
|
|
683
|
-
}, {
|
|
684
|
-
icon: C(() => [
|
|
685
|
-
G(h.$slots, "i-carbon-download")
|
|
686
|
-
]),
|
|
687
|
-
default: C(() => [
|
|
688
|
-
d[11] || (d[11] = W(" Download "))
|
|
689
|
-
]),
|
|
690
|
-
_: 3
|
|
691
|
-
}, 8, ["to"])
|
|
692
|
-
]),
|
|
693
|
-
d[14] || (d[14] = r("div", { "flex-auto": "" }, null, -1)),
|
|
694
|
-
o(V).length ? (a(), P(y, {
|
|
695
|
-
key: 1,
|
|
696
|
-
border: "t base",
|
|
697
|
-
"mx--4": "",
|
|
698
|
-
"mb--4": "",
|
|
699
|
-
"code-snippets": o(V)
|
|
700
|
-
}, null, 8, ["code-snippets"])) : A("", !0)
|
|
701
|
-
]);
|
|
702
|
-
};
|
|
703
|
-
}
|
|
704
|
-
}), yt = /* @__PURE__ */ F({
|
|
705
|
-
__name: "AssetListItem",
|
|
706
|
-
props: {
|
|
707
|
-
item: {},
|
|
708
|
-
index: { default: 0 },
|
|
709
|
-
modelValue: {}
|
|
710
|
-
},
|
|
711
|
-
setup(u, { emit: t }) {
|
|
712
|
-
const s = u, i = le(s, "modelValue", t, { passive: !0 }), n = $(() => {
|
|
713
|
-
var p, m;
|
|
714
|
-
return (m = (p = s.item) == null ? void 0 : p.children) == null ? void 0 : m.length;
|
|
715
|
-
}), l = T(!0), c = $(() => n.value ? "i-carbon-folder" : s.item.type === "image" ? "i-carbon-image" : s.item.type === "video" ? "i-carbon-video" : s.item.type === "audio" ? "i-carbon-volume-up" : s.item.type === "font" ? "i-carbon-text-small-caps" : s.item.type === "text" ? "i-carbon-document" : s.item.type === "json" ? "i-carbon-json" : s.item.type === "wasm" ? "i-vscode-icons-file-type-wasm" : "i-carbon-document-blank");
|
|
716
|
-
return (p, m) => {
|
|
717
|
-
var O, w;
|
|
718
|
-
const z = ae("AssetListItem", !0);
|
|
719
|
-
return a(), f("div", null, [
|
|
720
|
-
r("button", {
|
|
721
|
-
flex: "~ gap-2",
|
|
722
|
-
"w-full": "",
|
|
723
|
-
"items-center": "",
|
|
724
|
-
hover: "bg-active",
|
|
725
|
-
px4: "",
|
|
726
|
-
py1: "",
|
|
727
|
-
style: re({ paddingLeft: `calc(1rem + ${p.index * 1.5}em)` }),
|
|
728
|
-
class: q({ "bg-active": !o(n) && ((O = o(i)) == null ? void 0 : O.filePath) === ((w = p.item) == null ? void 0 : w.filePath) }),
|
|
729
|
-
border: "b base",
|
|
730
|
-
onClick: m[0] || (m[0] = (V) => o(n) ? l.value = !o(l) : i.value = p.item)
|
|
731
|
-
}, [
|
|
732
|
-
r("div", {
|
|
733
|
-
class: q(o(c))
|
|
734
|
-
}, null, 2),
|
|
735
|
-
r("span", {
|
|
736
|
-
class: q({ "flex items-center": o(n) }),
|
|
737
|
-
"flex-auto": "",
|
|
738
|
-
"text-start": "",
|
|
739
|
-
"text-sm": "",
|
|
740
|
-
"font-mono": ""
|
|
741
|
-
}, x(p.item.path), 3),
|
|
742
|
-
o(n) ? (a(), P(o(J), {
|
|
743
|
-
key: 0,
|
|
744
|
-
icon: "carbon:chevron-right",
|
|
745
|
-
"transform-rotate": o(l) ? 90 : 0,
|
|
746
|
-
transition: ""
|
|
747
|
-
}, null, 8, ["transform-rotate"])) : A("", !0)
|
|
748
|
-
], 6),
|
|
749
|
-
o(l) ? G(p.$slots, "default", { key: 0 }, () => {
|
|
750
|
-
var V;
|
|
751
|
-
return [
|
|
752
|
-
(a(!0), f(j, null, R((V = p.item) == null ? void 0 : V.children, (E) => (a(), P(z, {
|
|
753
|
-
key: E.filepath,
|
|
754
|
-
modelValue: o(i),
|
|
755
|
-
"onUpdate:modelValue": m[1] || (m[1] = (b) => X(i) ? i.value = b : null),
|
|
756
|
-
item: E,
|
|
757
|
-
index: p.index + 1
|
|
758
|
-
}, null, 8, ["modelValue", "item", "index"]))), 128))
|
|
759
|
-
];
|
|
760
|
-
}) : A("", !0)
|
|
761
|
-
]);
|
|
762
|
-
};
|
|
763
|
-
}
|
|
764
|
-
}), gt = {
|
|
765
|
-
flex: "~ col gap-1",
|
|
766
|
-
hover: "bg-active",
|
|
767
|
-
"items-center": "",
|
|
768
|
-
"of-hidden": "",
|
|
769
|
-
rounded: "",
|
|
770
|
-
p2: ""
|
|
771
|
-
}, bt = {
|
|
772
|
-
"w-full": "",
|
|
773
|
-
"of-hidden": "",
|
|
774
|
-
truncate: "",
|
|
775
|
-
"ws-nowrap": "",
|
|
776
|
-
"text-center": "",
|
|
777
|
-
"text-xs": ""
|
|
778
|
-
}, wt = /* @__PURE__ */ F({
|
|
779
|
-
__name: "AssetGridItem",
|
|
780
|
-
props: {
|
|
781
|
-
asset: {},
|
|
782
|
-
folder: {}
|
|
783
|
-
},
|
|
784
|
-
setup(u) {
|
|
785
|
-
const t = u, s = $(() => t.folder && t.asset.path.startsWith(t.folder) ? t.asset.path.slice(t.folder.length) : t.asset.path);
|
|
786
|
-
return (e, i) => {
|
|
787
|
-
const n = ue;
|
|
788
|
-
return a(), f("button", gt, [
|
|
789
|
-
B(n, {
|
|
790
|
-
"h-30": "",
|
|
791
|
-
"w-30": "",
|
|
792
|
-
rounded: "",
|
|
793
|
-
border: "~ base",
|
|
794
|
-
asset: e.asset
|
|
795
|
-
}, null, 8, ["asset"]),
|
|
796
|
-
r("div", bt, x(o(s)), 1)
|
|
797
|
-
]);
|
|
798
|
-
};
|
|
799
|
-
}
|
|
800
|
-
}), _t = {
|
|
801
|
-
flex: "~ col gap2",
|
|
802
|
-
border: "b base",
|
|
803
|
-
"flex-1": "",
|
|
804
|
-
p4: "",
|
|
805
|
-
"navbar-glass": ""
|
|
806
|
-
}, $t = {
|
|
807
|
-
flex: "~ gap4",
|
|
808
|
-
"items-center": ""
|
|
809
|
-
}, xt = /* @__PURE__ */ F({
|
|
810
|
-
__name: "Navbar",
|
|
811
|
-
props: {
|
|
812
|
-
search: {},
|
|
813
|
-
noPadding: { type: Boolean }
|
|
814
|
-
},
|
|
815
|
-
emits: ["update:search"],
|
|
816
|
-
setup(u, { emit: t }) {
|
|
817
|
-
const s = u, e = t, i = T(s.search);
|
|
818
|
-
return ie(() => s.search, (n) => {
|
|
819
|
-
i.value = n;
|
|
820
|
-
}), ie(i, () => {
|
|
821
|
-
e("update:search", i.value);
|
|
822
|
-
}), (n, l) => (a(), f("div", _t, [
|
|
823
|
-
r("div", $t, [
|
|
824
|
-
G(n.$slots, "search", {}, () => [
|
|
825
|
-
n.search !== void 0 ? (a(), P(o(_e), {
|
|
826
|
-
key: 0,
|
|
827
|
-
modelValue: o(i),
|
|
828
|
-
"onUpdate:modelValue": l[0] || (l[0] = (c) => X(i) ? i.value = c : null),
|
|
829
|
-
placeholder: "Search...",
|
|
830
|
-
"left-icon": "i-carbon-search",
|
|
831
|
-
class: q(["flex-auto", { "px-5 py-2": !n.noPadding }])
|
|
832
|
-
}, null, 8, ["modelValue", "class"])) : A("", !0)
|
|
833
|
-
]),
|
|
834
|
-
G(n.$slots, "actions")
|
|
835
|
-
]),
|
|
836
|
-
G(n.$slots, "default")
|
|
837
|
-
]));
|
|
838
|
-
}
|
|
839
|
-
}), kt = {
|
|
840
|
-
block: "",
|
|
841
|
-
"h-full": "",
|
|
842
|
-
"of-hidden": "",
|
|
843
|
-
class: "drawer-container relative"
|
|
844
|
-
}, Bt = {
|
|
845
|
-
"h-full": "",
|
|
846
|
-
"w-full": "",
|
|
847
|
-
"of-auto": ""
|
|
848
|
-
}, Ct = {
|
|
849
|
-
"flex-none": "",
|
|
850
|
-
flex: "~ gap2 items-center",
|
|
851
|
-
"text-lg": ""
|
|
852
|
-
}, At = {
|
|
853
|
-
flex: "~ items-center justify-center",
|
|
854
|
-
absolute: "",
|
|
855
|
-
"bottom-0": "",
|
|
856
|
-
"right-2px": "",
|
|
857
|
-
"h-4": "",
|
|
858
|
-
"w-4": "",
|
|
859
|
-
"rounded-full": "",
|
|
860
|
-
"bg-primary-800": "",
|
|
861
|
-
"text-8px": "",
|
|
862
|
-
"text-white": ""
|
|
863
|
-
}, Pt = {
|
|
864
|
-
"w-full": "",
|
|
865
|
-
flex: "~ gap-2 items-center",
|
|
866
|
-
rounded: "",
|
|
867
|
-
px2: "",
|
|
868
|
-
py2: ""
|
|
869
|
-
}, St = {
|
|
870
|
-
"text-xs": "",
|
|
871
|
-
op75: ""
|
|
872
|
-
}, zt = { op50: "" }, jt = { key: 0 }, Vt = {
|
|
873
|
-
"mt--4": "",
|
|
874
|
-
px2: "",
|
|
875
|
-
grid: "~ cols-minmax-8rem"
|
|
876
|
-
}, It = {
|
|
877
|
-
key: 1,
|
|
878
|
-
p2: "",
|
|
879
|
-
grid: "~ cols-minmax-8rem"
|
|
880
|
-
}, Dt = { key: 1 }, Ot = 50, Mt = /* @__PURE__ */ F({
|
|
881
|
-
__name: "assets",
|
|
882
|
-
setup(u) {
|
|
883
|
-
const t = T(""), s = T(), e = T("grid"), i = T([]), n = $(() => {
|
|
884
|
-
const b = [];
|
|
885
|
-
for (const v of i.value || []) {
|
|
886
|
-
const g = v.path.split(".").pop();
|
|
887
|
-
g && !b.find((I) => I.value === g) && b.push({ label: g, value: g });
|
|
888
|
-
}
|
|
889
|
-
return b;
|
|
890
|
-
}), l = T([]);
|
|
891
|
-
$e(() => n.value, (b) => {
|
|
892
|
-
l.value = b.map((v) => v.value);
|
|
893
|
-
});
|
|
894
|
-
const c = T(), p = $(() => new xe(i.value || [], {
|
|
895
|
-
keys: [
|
|
896
|
-
"path"
|
|
897
|
-
]
|
|
898
|
-
})), m = $(() => (t.value ? p.value.search(t.value).map((v) => v.item) : i.value || []).filter((v) => {
|
|
899
|
-
const g = v.path.split(".").pop();
|
|
900
|
-
return !g || l.value.includes(g);
|
|
901
|
-
})), z = $(() => {
|
|
902
|
-
const b = {};
|
|
903
|
-
for (const v of m.value) {
|
|
904
|
-
const g = `${v.relativePath.split("/").slice(0, -1).join("/")}/`;
|
|
905
|
-
b[g] || (b[g] = []), b[g].push(v);
|
|
906
|
-
}
|
|
907
|
-
return Object.entries(b).sort(([v], [g]) => v.localeCompare(g));
|
|
908
|
-
}), O = $(() => {
|
|
909
|
-
const b = { children: [] }, v = (g, I, h) => {
|
|
910
|
-
const [d, ..._] = I;
|
|
911
|
-
let k = g.children.find((U) => U.path === d);
|
|
912
|
-
k || (k = { ...h, path: d, children: [] }, g.children.push(k)), _.length > 1 ? v(k, _, h) : _.length === 1 && k.children.push({ ...h, path: _[0] });
|
|
913
|
-
};
|
|
914
|
-
return m.value.forEach((g) => {
|
|
915
|
-
const I = g.relativePath.split("/").filter((h) => h !== "");
|
|
916
|
-
v(b, I, g);
|
|
917
|
-
}), b.children;
|
|
918
|
-
});
|
|
919
|
-
function w() {
|
|
920
|
-
Y.value.getStaticAssets().then((b) => {
|
|
921
|
-
i.value = b;
|
|
922
|
-
});
|
|
923
|
-
}
|
|
924
|
-
function V() {
|
|
925
|
-
w();
|
|
926
|
-
}
|
|
927
|
-
ke(() => {
|
|
928
|
-
w(), Y.functions.on("assetsUpdated", V);
|
|
929
|
-
});
|
|
930
|
-
function E() {
|
|
931
|
-
e.value = e.value === "list" ? "grid" : "list";
|
|
932
|
-
}
|
|
933
|
-
return Be(() => {
|
|
934
|
-
Y.functions.off("assetsUpdated", V);
|
|
935
|
-
}), (b, v) => {
|
|
936
|
-
const g = je, I = xt, h = wt, d = ze, _ = yt, k = vt, U = Se("tooltip");
|
|
937
|
-
return a(), f("div", kt, [
|
|
938
|
-
r("div", Bt, [
|
|
939
|
-
B(I, {
|
|
940
|
-
ref_key: "navbar",
|
|
941
|
-
ref: s,
|
|
942
|
-
search: o(t),
|
|
943
|
-
"onUpdate:search": v[1] || (v[1] = (y) => X(t) ? t.value = y : null),
|
|
944
|
-
pb2: "",
|
|
945
|
-
"no-padding": !0
|
|
946
|
-
}, {
|
|
947
|
-
actions: C(() => [
|
|
948
|
-
r("div", Ct, [
|
|
949
|
-
B(o(Ae), {
|
|
950
|
-
modelValue: o(l),
|
|
951
|
-
"onUpdate:modelValue": v[0] || (v[0] = (y) => X(l) ? l.value = y : null),
|
|
952
|
-
multiple: !0,
|
|
953
|
-
options: o(n)
|
|
954
|
-
}, {
|
|
955
|
-
button: C(() => [
|
|
956
|
-
N((a(), P(g, {
|
|
957
|
-
icon: "i-carbon-filter hover:op50",
|
|
958
|
-
border: !1,
|
|
959
|
-
title: "Filter",
|
|
960
|
-
relative: "",
|
|
961
|
-
"cursor-pointer": "",
|
|
962
|
-
p2: "",
|
|
963
|
-
"text-lg": "",
|
|
964
|
-
onClick: () => {
|
|
965
|
-
}
|
|
966
|
-
}, {
|
|
967
|
-
default: C(() => [
|
|
968
|
-
r("span", At, x(o(l).length), 1)
|
|
969
|
-
]),
|
|
970
|
-
_: 1
|
|
971
|
-
})), [
|
|
972
|
-
[
|
|
973
|
-
U,
|
|
974
|
-
"Filter",
|
|
975
|
-
void 0,
|
|
976
|
-
{ "bottom-end": !0 }
|
|
977
|
-
]
|
|
978
|
-
])
|
|
979
|
-
]),
|
|
980
|
-
item: C(({
|
|
981
|
-
item: y,
|
|
982
|
-
active: D
|
|
983
|
-
}) => [
|
|
984
|
-
r("div", Pt, [
|
|
985
|
-
B(o(Pe), { "model-value": D }, null, 8, ["model-value"]),
|
|
986
|
-
r("span", St, x(y.label), 1)
|
|
987
|
-
])
|
|
988
|
-
]),
|
|
989
|
-
_: 1
|
|
990
|
-
}, 8, ["modelValue", "options"]),
|
|
991
|
-
N(B(o(J), {
|
|
992
|
-
border: !1,
|
|
993
|
-
icon: o(e) === "grid" ? "i-carbon-list" : "i-carbon-grid",
|
|
994
|
-
title: "Toggle view",
|
|
995
|
-
action: "",
|
|
996
|
-
"cursor-pointer": "",
|
|
997
|
-
"text-lg": "",
|
|
998
|
-
onClick: E
|
|
999
|
-
}, null, 8, ["icon"]), [
|
|
1000
|
-
[
|
|
1001
|
-
U,
|
|
1002
|
-
"Toggle View",
|
|
1003
|
-
void 0,
|
|
1004
|
-
{ "bottom-end": !0 }
|
|
1005
|
-
]
|
|
1006
|
-
])
|
|
1007
|
-
])
|
|
1008
|
-
]),
|
|
1009
|
-
default: C(() => {
|
|
1010
|
-
var y;
|
|
1011
|
-
return [
|
|
1012
|
-
r("div", zt, [
|
|
1013
|
-
o(t) ? (a(), f("span", jt, x(o(m).length) + " matched · ", 1)) : A("", !0),
|
|
1014
|
-
r("span", null, x((y = o(i)) == null ? void 0 : y.length) + " assets in total", 1)
|
|
1015
|
-
])
|
|
1016
|
-
];
|
|
1017
|
-
}),
|
|
1018
|
-
_: 1
|
|
1019
|
-
}, 8, ["search"]),
|
|
1020
|
-
o(e) === "grid" ? (a(), f(j, { key: 0 }, [
|
|
1021
|
-
o(z).length > 1 ? (a(!0), f(j, { key: 0 }, R(o(z), ([y, D]) => (a(), P(d, {
|
|
1022
|
-
key: y,
|
|
1023
|
-
text: y,
|
|
1024
|
-
description: `${D.length} items`,
|
|
1025
|
-
open: D.length <= Ot,
|
|
1026
|
-
padding: !1
|
|
1027
|
-
}, {
|
|
1028
|
-
default: C(() => [
|
|
1029
|
-
r("div", Vt, [
|
|
1030
|
-
(a(!0), f(j, null, R(D, (S) => (a(), P(h, {
|
|
1031
|
-
key: S.path,
|
|
1032
|
-
asset: S,
|
|
1033
|
-
folder: y,
|
|
1034
|
-
onClick: (de) => c.value = S
|
|
1035
|
-
}, null, 8, ["asset", "folder", "onClick"]))), 128))
|
|
1036
|
-
])
|
|
1037
|
-
]),
|
|
1038
|
-
_: 2
|
|
1039
|
-
}, 1032, ["text", "description", "open"]))), 128)) : (a(), f("div", It, [
|
|
1040
|
-
(a(!0), f(j, null, R(o(m), (y) => (a(), P(h, {
|
|
1041
|
-
key: y.path,
|
|
1042
|
-
asset: y,
|
|
1043
|
-
onClick: (D) => c.value = y
|
|
1044
|
-
}, null, 8, ["asset", "onClick"]))), 128))
|
|
1045
|
-
]))
|
|
1046
|
-
], 64)) : (a(), f("div", Dt, [
|
|
1047
|
-
(a(!0), f(j, null, R(o(O), (y, D) => (a(), P(_, {
|
|
1048
|
-
key: D,
|
|
1049
|
-
modelValue: o(c),
|
|
1050
|
-
"onUpdate:modelValue": v[2] || (v[2] = (S) => X(c) ? c.value = S : null),
|
|
1051
|
-
item: y
|
|
1052
|
-
}, null, 8, ["modelValue", "item"]))), 128))
|
|
1053
|
-
]))
|
|
1054
|
-
]),
|
|
1055
|
-
B(o(Ce), {
|
|
1056
|
-
"model-value": !!o(c),
|
|
1057
|
-
top: o(s),
|
|
1058
|
-
permanent: "",
|
|
1059
|
-
"mount-to": ".drawer-container",
|
|
1060
|
-
position: "absolute",
|
|
1061
|
-
"content-class": "w120 text-sm",
|
|
1062
|
-
"onUpdate:modelValue": v[4] || (v[4] = (y) => {
|
|
1063
|
-
y || (c.value = void 0);
|
|
1064
|
-
})
|
|
1065
|
-
}, {
|
|
1066
|
-
default: C(() => [
|
|
1067
|
-
o(c) ? (a(), P(k, {
|
|
1068
|
-
key: 0,
|
|
1069
|
-
modelValue: o(c),
|
|
1070
|
-
"onUpdate:modelValue": v[3] || (v[3] = (y) => X(c) ? c.value = y : null)
|
|
1071
|
-
}, null, 8, ["modelValue"])) : A("", !0)
|
|
1072
|
-
]),
|
|
1073
|
-
_: 1
|
|
1074
|
-
}, 8, ["model-value", "top"])
|
|
1075
|
-
]);
|
|
1076
|
-
};
|
|
1077
|
-
}
|
|
1078
|
-
});
|
|
1079
|
-
export {
|
|
1080
|
-
Mt as default
|
|
1081
|
-
};
|