@nuxt/devtools 4.0.0-alpha.3 → 4.0.0-alpha.4
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/chunks/analyze-build.mjs +0 -1
- package/dist/chunks/module-main.mjs +68 -69
- package/dist/chunks/vite-inspect.mjs +8 -20
- package/dist/client/200.html +1 -1
- package/dist/client/404.html +1 -1
- package/dist/client/_nuxt/__blank-dpye2azp.js +1 -0
- package/dist/client/_nuxt/analyze-build-bkc0yj70.js +1 -0
- package/dist/client/_nuxt/assets-c8un2dgk.js +6 -0
- package/dist/client/_nuxt/auth-required-panel-f0bx4jy3.js +1 -0
- package/dist/client/_nuxt/builds/latest.json +1 -1
- package/dist/client/_nuxt/builds/meta/c4431537-3cdf-4a17-8364-5d3d90841be5.json +1 -0
- package/dist/client/_nuxt/{client-coqmopwz.js → client-fxrhvlf0.js} +1 -1
- package/dist/client/_nuxt/{code-diff-o5b2z2ie.js → code-diff-cxfxstwy.js} +4 -4
- package/dist/client/_nuxt/code-snippets-jmly69z5.js +1 -0
- package/dist/client/_nuxt/components-jtkex3ry.js +1 -0
- package/dist/client/_nuxt/composable-item-ctv0s77c.js +1 -0
- package/dist/client/_nuxt/composables-g3h8z0a3.js +1 -0
- package/dist/client/_nuxt/custom-_name_-lmgyewpm.js +1 -0
- package/dist/client/_nuxt/data-schema-button-lia8jo2z.js +1 -0
- package/dist/client/_nuxt/data-schema-drawer-k5lpnjpj.js +2 -0
- package/dist/client/_nuxt/debug-21oc3lwa.js +1 -0
- package/dist/client/_nuxt/{default-f17ja76u.js → default-l5unzaf9.js} +1 -1
- package/dist/client/_nuxt/dialog-jbq54nkm.js +1 -0
- package/dist/client/_nuxt/dist-bxsmety0.js +1 -0
- package/dist/client/_nuxt/dist-fas03c07.js +1 -0
- package/dist/client/_nuxt/{duration-display-lgba3ul7.js → duration-display-gcccmged.js} +1 -1
- package/dist/client/_nuxt/editor-ib5dg7xf.js +1 -0
- package/dist/client/_nuxt/entry.css-nqh1m7yk.css +1 -0
- package/dist/client/_nuxt/error-404-o4nzga33.js +1 -0
- package/dist/client/_nuxt/error-404.css-cfm1arun.css +1 -0
- package/dist/client/_nuxt/error-500-lbc8po65.js +1 -0
- package/dist/client/_nuxt/error-500.css-dkbj3cof.css +1 -0
- package/dist/client/_nuxt/{error-knm3fbzu.js → error-ct6hbfyl.js} +1 -1
- package/dist/client/_nuxt/filepath-item-mxes3g27.js +1 -0
- package/dist/client/_nuxt/full-g7ubub1r.js +1 -0
- package/dist/client/_nuxt/fuse-ic4l3jjo.js +1 -0
- package/dist/client/_nuxt/gdsye0vf.js +2 -0
- package/dist/client/_nuxt/help-fab-vp6gbv3k.js +1 -0
- package/dist/client/_nuxt/hooks-iu6wyfgn.js +1 -0
- package/dist/client/_nuxt/imports-jz51309y.js +1 -0
- package/dist/client/_nuxt/{launch-page-jvtn5jef.js → launch-page-j3htdbh0.js} +1 -1
- package/dist/client/_nuxt/modules-j1gis064.js +1 -0
- package/dist/client/_nuxt/nbadge-7zr03ihs.js +1 -0
- package/dist/client/_nuxt/nbutton-dy9mskkk.js +1 -0
- package/dist/client/_nuxt/ncard-bs9j5ske.js +1 -0
- package/dist/client/_nuxt/{ncheckbox-dqqmiqln.js → ncheckbox-msykavgu.js} +1 -1
- package/dist/client/_nuxt/{ncode-block-lbvhz228.js → ncode-block-lbhgksmi.js} +1 -1
- package/dist/client/_nuxt/ndark-toggle-dd7qey8l.js +1 -0
- package/dist/client/_nuxt/ndialog-nuj407ct.js +3 -0
- package/dist/client/_nuxt/ndrawer-cshktk1a.js +1 -0
- package/dist/client/_nuxt/ndropdown-g8mioo07.js +1 -0
- package/dist/client/_nuxt/{nicon-o8vtl3nv.js → nicon-do46fhz3.js} +1 -1
- package/dist/client/_nuxt/{nicon-title-f04kekaa.js → nicon-title-jjiuucly.js} +1 -1
- package/dist/client/_nuxt/{nlink-flm1s7uj.js → nlink-kqls97wt.js} +1 -1
- package/dist/client/_nuxt/nloading-b6gn4u1s.js +1 -0
- package/dist/client/_nuxt/{nmarkdown-cu68ujlp.js → nmarkdown-c1xqnmie.js} +1 -1
- package/dist/client/_nuxt/nnavbar-h4hz44io.js +1 -0
- package/dist/client/_nuxt/none-kh2oj8rz.js +1 -0
- package/dist/client/_nuxt/npanel-grids-ip7w4ejt.js +1 -0
- package/dist/client/_nuxt/npm-bqk49gno.js +1 -0
- package/dist/client/_nuxt/{nsection-block-oc6icst0.js → nsection-block-l37co05t.js} +1 -1
- package/dist/client/_nuxt/{nselect-k14i70o0.js → nselect-mb92757x.js} +1 -1
- package/dist/client/_nuxt/{nselect-tabs-gmel1seg.js → nselect-tabs-gzwv1q7y.js} +1 -1
- package/dist/client/_nuxt/nsplit-pane-nneagzae.js +1 -0
- package/dist/client/_nuxt/nsplit-pane.css-cyge27bh.css +1 -0
- package/dist/client/_nuxt/{nswitch-kprd7bwp.js → nswitch-hxwa8dwy.js} +1 -1
- package/dist/client/_nuxt/ntext-input-ooyn577q.js +1 -0
- package/dist/client/_nuxt/{ntip-erjk5wo4.js → ntip-czdtbj5r.js} +1 -1
- package/dist/client/_nuxt/{nuxt-link-h8a2u03t.js → nuxt-link-bm02zjpm.js} +1 -1
- package/dist/client/_nuxt/nuxt-logo-bq85idrv.js +1 -0
- package/dist/client/_nuxt/{nuxt-bl8ryhiw.js → nuxt-n7rqurxx.js} +1 -1
- package/dist/client/_nuxt/{open-graph-ipvg6gyk.js → open-graph-fax7wv7x.js} +2 -2
- package/dist/client/_nuxt/overview-8jufdkso.js +1 -0
- package/dist/client/_nuxt/pages-cudjh8j7.js +1 -0
- package/dist/client/_nuxt/pages-n6yugo8p.js +1 -0
- package/dist/client/_nuxt/payload-nms0e2pn.js +1 -0
- package/dist/client/_nuxt/pinia-lqdm1sj6.js +1 -0
- package/dist/client/_nuxt/plugins-d24ibpd8.js +1 -0
- package/dist/client/_nuxt/{ready-nmtplnq5.js → ready-chvd8pav.js} +1 -1
- package/dist/client/_nuxt/render-tree-ipfeq7kp.js +1 -0
- package/dist/client/_nuxt/rpc-isxadwf4.js +1 -0
- package/dist/client/_nuxt/runtime-configs-b6hwtm9f.js +1 -0
- package/dist/client/_nuxt/server-discovery-epl1odcn.js +1 -0
- package/dist/client/_nuxt/server-route-inputs-gybyb0r7.js +1 -0
- package/dist/client/_nuxt/server-routes-iyhit45p.js +7 -0
- package/dist/client/_nuxt/server-tasks-iu8kht7l.js +1 -0
- package/dist/client/_nuxt/settings-fmpxy0sd.js +1 -0
- package/dist/client/_nuxt/{splitpanes.es-krbzt5ww.js → splitpanes.es-m52r20uv.js} +1 -1
- package/dist/client/_nuxt/{stacktrace-list-ilvbql3y.js → stacktrace-list-mzv9h3wp.js} +1 -1
- package/dist/client/_nuxt/{state-components-pfh0w3gz.js → state-components-grvqi1pg.js} +1 -1
- package/dist/client/_nuxt/state-editor-bluyryo2.js +1 -0
- package/dist/client/_nuxt/state-modules-nila4w91.js +1 -0
- package/dist/client/_nuxt/state-routes-jda6rt5m.js +1 -0
- package/dist/client/_nuxt/state-schema-dxaz6x8f.js +1 -0
- package/dist/client/_nuxt/state-subprocess-lka458r1.js +1 -0
- package/dist/client/_nuxt/{state-tabs-0wkipn6s.js → state-tabs-itldyzgg.js} +1 -1
- package/dist/client/_nuxt/storage-e6rsfrwe.js +1 -0
- package/dist/client/_nuxt/storage-j9qzpha9.js +1 -0
- package/dist/client/_nuxt/{storage-options-fmhmng6m.js → storage-options-ll4al4nh.js} +1 -1
- package/dist/client/_nuxt/tab-icon-me90e54n.js +1 -0
- package/dist/client/_nuxt/telemetry-iyty3hdu.js +1 -0
- package/dist/client/_nuxt/terminals-d6ve9pli.js +1 -0
- package/dist/client/_nuxt/timeline-ed79yl0t.js +31 -0
- package/dist/client/_nuxt/unocss-runtime-flq5aaes.js +1 -0
- package/dist/client/_nuxt/utils-0y38f305.js +2 -0
- package/dist/client/_nuxt/vendor/json-editor-vue-go859b33.js +3869 -0
- package/dist/client/_nuxt/vendor/{markdown-it-liuu8zo7.js → markdown-it-cxwyw9wc.js} +1 -1
- package/dist/client/_nuxt/vendor/{quicktype-core-bxh3g3c2.js → quicktype-core-h9yg0llp.js} +33 -33
- package/dist/client/_nuxt/vendor/{shiki-ildq90cv.js → shiki-dger8vg9.js} +4 -4
- package/dist/client/_nuxt/vendor/{unocss-hiscr44j.js → unocss-d0gwgu4l.js} +3 -3
- package/dist/client/_nuxt/vendor/{xterm-g6v3jqah.js → xterm-cbq9q6da.js} +3 -3
- package/dist/client/_nuxt/virtual-files-jir7s4c5.js +1 -0
- package/dist/client/_nuxt/vue-devtools-gkfop7rb.js +4 -0
- package/dist/client/_nuxt/{vue-router-imuzx5c1.js → vue-router-bjsf3ueg.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/module.json +1 -1
- package/package.json +21 -21
- package/dist/client/_nuxt/__blank-hkoz1rvj.js +0 -1
- package/dist/client/_nuxt/analyze-build-kqtn42f3.js +0 -1
- package/dist/client/_nuxt/assets-pdpavuv7.js +0 -6
- package/dist/client/_nuxt/auth-required-panel-eykuzska.js +0 -1
- package/dist/client/_nuxt/builds/meta/424f9fd7-bd33-4b1e-8498-929c14b6ad71.json +0 -1
- package/dist/client/_nuxt/code-snippets-lje00rjy.js +0 -1
- package/dist/client/_nuxt/components-mkmd03mc.js +0 -1
- package/dist/client/_nuxt/composable-item-lw4aqry9.js +0 -1
- package/dist/client/_nuxt/custom-_name_-h2d0kmts.js +0 -1
- package/dist/client/_nuxt/data-schema-button-g6gxhvpu.js +0 -1
- package/dist/client/_nuxt/data-schema-drawer-h229qgae.js +0 -2
- package/dist/client/_nuxt/debug-ezvak7q9.js +0 -1
- package/dist/client/_nuxt/dev-auth-h6radlhi.js +0 -1
- package/dist/client/_nuxt/dist-duc3zu0y.js +0 -1
- package/dist/client/_nuxt/entry.css-d9crsfkn.css +0 -1
- package/dist/client/_nuxt/error-404-j6bw0i0a.js +0 -1
- package/dist/client/_nuxt/error-404.css-op0yx84h.css +0 -1
- package/dist/client/_nuxt/error-500-oozftcqy.js +0 -1
- package/dist/client/_nuxt/error-500.css-f169vd1x.css +0 -1
- package/dist/client/_nuxt/filepath-item-o7vxzdbh.js +0 -1
- package/dist/client/_nuxt/full-h1zczfpi.js +0 -1
- package/dist/client/_nuxt/h9sdxxta.js +0 -4
- package/dist/client/_nuxt/help-fab-ekagn9f2.js +0 -1
- package/dist/client/_nuxt/hooks-k3agmywq.js +0 -1
- package/dist/client/_nuxt/imports-gw4s306d.js +0 -1
- package/dist/client/_nuxt/modules-b3ta2mlp.js +0 -1
- package/dist/client/_nuxt/nbadge-ia2sg78l.js +0 -1
- package/dist/client/_nuxt/ncard-bpchuz30.js +0 -1
- package/dist/client/_nuxt/ndrawer-pdhwqkg2.js +0 -1
- package/dist/client/_nuxt/ndropdown-o0hg8oi1.js +0 -1
- package/dist/client/_nuxt/nnavbar-iwf1qrzf.js +0 -1
- package/dist/client/_nuxt/none-b8do2yyn.js +0 -1
- package/dist/client/_nuxt/overview-fbg2mjz1.js +0 -1
- package/dist/client/_nuxt/pages-jx3r1z1o.js +0 -1
- package/dist/client/_nuxt/pages-nqnq5f5t.js +0 -1
- package/dist/client/_nuxt/payload-f7ar9blu.js +0 -1
- package/dist/client/_nuxt/pinia-in67b2ff.js +0 -1
- package/dist/client/_nuxt/plugins-foc4m9cu.js +0 -1
- package/dist/client/_nuxt/render-tree-mzpnvjww.js +0 -1
- package/dist/client/_nuxt/rpc-ga26o8l5.js +0 -1
- package/dist/client/_nuxt/runtime-configs-f691dtpr.js +0 -1
- package/dist/client/_nuxt/server-discovery-fa3lq0oe.js +0 -1
- package/dist/client/_nuxt/server-route-inputs-kx5eivj6.js +0 -1
- package/dist/client/_nuxt/server-routes-ozsawrbd.js +0 -7
- package/dist/client/_nuxt/server-tasks-sykxh8ji.js +0 -1
- package/dist/client/_nuxt/settings-eufw79s0.js +0 -1
- package/dist/client/_nuxt/state-editor-c9yn0k8x.js +0 -1
- package/dist/client/_nuxt/state-modules-c35cpfly.js +0 -1
- package/dist/client/_nuxt/storage-dqgie6yp.js +0 -1
- package/dist/client/_nuxt/terminals-o5xyk44w.js +0 -1
- package/dist/client/_nuxt/timeline-hwj8vazt.js +0 -31
- package/dist/client/_nuxt/unocss-runtime-fghua2d1.js +0 -1
- package/dist/client/_nuxt/utils-c43quyky.js +0 -2
- package/dist/client/_nuxt/vendor/json-editor-vue-mpqfj7dd.js +0 -3869
- package/dist/client/_nuxt/virtual-files-ld5g0ep3.js +0 -1
- package/dist/client/_nuxt/vue-devtools-mcimudqm.js +0 -4
- /package/dist/client/_nuxt/{_plugin-vue_export-helper-n58akrbk.js → _plugin-vue_export-helper-cxcynmu7.js} +0 -0
- /package/dist/client/_nuxt/{color-bh8526bd.js → color-jp2clyon.js} +0 -0
- /package/dist/client/_nuxt/{composables-f0oa0ya0.js → composables-cjr9vk21.js} +0 -0
- /package/dist/client/_nuxt/{constants-g7ujya00.js → constants-xk5tdj23.js} +0 -0
- /package/dist/client/_nuxt/{dist-f16b9vaq.js → dist-el7s75zv.js} +0 -0
- /package/dist/client/_nuxt/{mitt.es-pc7qwi6p.js → mitt.es-nswlq02h.js} +0 -0
- /package/dist/client/_nuxt/vendor/{vis-obscvyyi.js → vis-iaw6hxx2.js} +0 -0
|
@@ -2,7 +2,6 @@ import { addVitePlugin } from '@nuxt/kit';
|
|
|
2
2
|
import { resolve, join } from 'pathe';
|
|
3
3
|
import { readdir, lstat } from 'node:fs/promises';
|
|
4
4
|
import { createVitePluginInspect } from './vite-inspect.mjs';
|
|
5
|
-
import '@nuxt/devtools-kit';
|
|
6
5
|
|
|
7
6
|
async function getFolderSize(dir) {
|
|
8
7
|
const dirents = await readdir(dir, {
|
|
@@ -30,10 +30,10 @@ import { getDefaultExportOptions, addNuxtModule } from 'magicast/helpers';
|
|
|
30
30
|
import semver from 'semver';
|
|
31
31
|
import { normalizeBaseKey, normalizeKey } from 'unstorage';
|
|
32
32
|
|
|
33
|
-
const version$1 = "4.0.0-alpha.
|
|
33
|
+
const version$1 = "4.0.0-alpha.4";
|
|
34
34
|
|
|
35
35
|
const COLON_RE = /:/g;
|
|
36
|
-
function setupAnalyzeBuildRPC({ nuxt, refresh
|
|
36
|
+
function setupAnalyzeBuildRPC({ nuxt, refresh }) {
|
|
37
37
|
let builds = [];
|
|
38
38
|
let promise;
|
|
39
39
|
let initalized;
|
|
@@ -127,8 +127,7 @@ function setupAnalyzeBuildRPC({ nuxt, refresh, ensureDevAuthToken }) {
|
|
|
127
127
|
builds
|
|
128
128
|
};
|
|
129
129
|
},
|
|
130
|
-
async clearAnalyzeBuilds(
|
|
131
|
-
await ensureDevAuthToken(token);
|
|
130
|
+
async clearAnalyzeBuilds(names) {
|
|
132
131
|
if (!names) {
|
|
133
132
|
await fs.rm(devtoolsAnalyzeDir, { recursive: true, force: true });
|
|
134
133
|
} else {
|
|
@@ -139,14 +138,13 @@ function setupAnalyzeBuildRPC({ nuxt, refresh, ensureDevAuthToken }) {
|
|
|
139
138
|
refresh("getAnalyzeBuildInfo");
|
|
140
139
|
},
|
|
141
140
|
generateAnalyzeBuildName,
|
|
142
|
-
async startAnalyzeBuild(
|
|
143
|
-
await ensureDevAuthToken(token);
|
|
141
|
+
async startAnalyzeBuild(...args) {
|
|
144
142
|
return startAnalyzeBuild(...args);
|
|
145
143
|
}
|
|
146
144
|
};
|
|
147
145
|
}
|
|
148
146
|
|
|
149
|
-
function setupAssetsRPC({ nuxt,
|
|
147
|
+
function setupAssetsRPC({ nuxt, refresh, options }) {
|
|
150
148
|
const _imageMetaCache = /* @__PURE__ */ new Map();
|
|
151
149
|
let cache = null;
|
|
152
150
|
const extensions = options.assets?.uploadExtensions || defaultAllowedExtensions;
|
|
@@ -202,8 +200,7 @@ function setupAssetsRPC({ nuxt, ensureDevAuthToken, refresh, options }) {
|
|
|
202
200
|
async getStaticAssets() {
|
|
203
201
|
return await scan();
|
|
204
202
|
},
|
|
205
|
-
async getImageMeta(
|
|
206
|
-
await ensureDevAuthToken(token);
|
|
203
|
+
async getImageMeta(filepath) {
|
|
207
204
|
if (_imageMetaCache.has(filepath))
|
|
208
205
|
return _imageMetaCache.get(filepath);
|
|
209
206
|
try {
|
|
@@ -216,8 +213,7 @@ function setupAssetsRPC({ nuxt, ensureDevAuthToken, refresh, options }) {
|
|
|
216
213
|
return void 0;
|
|
217
214
|
}
|
|
218
215
|
},
|
|
219
|
-
async getTextAssetContent(
|
|
220
|
-
await ensureDevAuthToken(token);
|
|
216
|
+
async getTextAssetContent(filepath, limit = 300) {
|
|
221
217
|
try {
|
|
222
218
|
const content = await fs.readFile(filepath, "utf-8");
|
|
223
219
|
return content.slice(0, limit);
|
|
@@ -226,8 +222,7 @@ function setupAssetsRPC({ nuxt, ensureDevAuthToken, refresh, options }) {
|
|
|
226
222
|
return void 0;
|
|
227
223
|
}
|
|
228
224
|
},
|
|
229
|
-
async writeStaticAssets(
|
|
230
|
-
await ensureDevAuthToken(token);
|
|
225
|
+
async writeStaticAssets(files, folder) {
|
|
231
226
|
const baseDir = resolve(nuxt.options.srcDir, nuxt.options.dir.public + folder);
|
|
232
227
|
return await Promise.all(
|
|
233
228
|
files.map(async ({ path, content, encoding, override }) => {
|
|
@@ -258,12 +253,10 @@ You can configure it in Nuxt config at \`devtools.assets.uploadExtensions\`.`);
|
|
|
258
253
|
})
|
|
259
254
|
);
|
|
260
255
|
},
|
|
261
|
-
async deleteStaticAsset(
|
|
262
|
-
await ensureDevAuthToken(token);
|
|
256
|
+
async deleteStaticAsset(path) {
|
|
263
257
|
return await fs.unlink(path);
|
|
264
258
|
},
|
|
265
|
-
async renameStaticAsset(
|
|
266
|
-
await ensureDevAuthToken(token);
|
|
259
|
+
async renameStaticAsset(oldPath, newPath) {
|
|
267
260
|
const exist = cache?.find((asset) => asset.filePath === newPath);
|
|
268
261
|
if (exist)
|
|
269
262
|
throw new Error(`[Nuxt DevTools] File ${newPath} already exists, failed to rename`);
|
|
@@ -8983,7 +8976,11 @@ function _extractExtraNames(extraNamesStr) {
|
|
|
8983
8976
|
angleDepth++;
|
|
8984
8977
|
continue;
|
|
8985
8978
|
}
|
|
8986
|
-
if (inTypeAnnotation && char === "
|
|
8979
|
+
if (!inTypeAnnotation && char === "<" && depth === 0 && i > 0 && _isIdentifierBeforeAngleBracket(extraNamesStr, i)) {
|
|
8980
|
+
angleDepth++;
|
|
8981
|
+
continue;
|
|
8982
|
+
}
|
|
8983
|
+
if (char === ">" && angleDepth > 0 && extraNamesStr[i - 1] !== "=") {
|
|
8987
8984
|
angleDepth--;
|
|
8988
8985
|
continue;
|
|
8989
8986
|
}
|
|
@@ -9148,6 +9145,14 @@ function _getLocations(code, label) {
|
|
|
9148
9145
|
}
|
|
9149
9146
|
return locations;
|
|
9150
9147
|
}
|
|
9148
|
+
function _isIdentifierBeforeAngleBracket(str, i) {
|
|
9149
|
+
let j = i - 1;
|
|
9150
|
+
while (j >= 0 && /[A-Za-z0-9_$]/.test(str[j])) {
|
|
9151
|
+
j--;
|
|
9152
|
+
}
|
|
9153
|
+
const wordStart = j + 1;
|
|
9154
|
+
return wordStart < i && /[A-Za-z_$]/.test(str[wordStart]);
|
|
9155
|
+
}
|
|
9151
9156
|
|
|
9152
9157
|
function defineUnimportPreset(preset) {
|
|
9153
9158
|
return preset;
|
|
@@ -10283,7 +10288,6 @@ function setupGeneralRPC({
|
|
|
10283
10288
|
nuxt,
|
|
10284
10289
|
options,
|
|
10285
10290
|
refresh,
|
|
10286
|
-
ensureDevAuthToken,
|
|
10287
10291
|
openInEditorHooks
|
|
10288
10292
|
}) {
|
|
10289
10293
|
const components = [];
|
|
@@ -10467,8 +10471,7 @@ function setupGeneralRPC({
|
|
|
10467
10471
|
return false;
|
|
10468
10472
|
}
|
|
10469
10473
|
},
|
|
10470
|
-
async enablePages(
|
|
10471
|
-
await ensureDevAuthToken(token);
|
|
10474
|
+
async enablePages() {
|
|
10472
10475
|
const baseDir = nuxt.options.future.compatibilityVersion === 4 ? nuxt.options.dir.app : nuxt.options.srcDir;
|
|
10473
10476
|
const pathApp = join(baseDir, "app.vue");
|
|
10474
10477
|
const pathPageIndex = join(baseDir, "pages/index.vue");
|
|
@@ -10497,8 +10500,7 @@ const route = useRoute()
|
|
|
10497
10500
|
}
|
|
10498
10501
|
logger.success("Routing creation completed");
|
|
10499
10502
|
},
|
|
10500
|
-
async restartNuxt(
|
|
10501
|
-
await ensureDevAuthToken(token);
|
|
10503
|
+
async restartNuxt(hard = true) {
|
|
10502
10504
|
logger.info("Restarting Nuxt...");
|
|
10503
10505
|
return nuxt.callHook("restart", { hard });
|
|
10504
10506
|
},
|
|
@@ -11077,7 +11079,7 @@ async function magicastGuard(fn, message = "") {
|
|
|
11077
11079
|
return generated;
|
|
11078
11080
|
}
|
|
11079
11081
|
|
|
11080
|
-
function setupNpmRPC({ nuxt
|
|
11082
|
+
function setupNpmRPC({ nuxt }) {
|
|
11081
11083
|
let detectPromise;
|
|
11082
11084
|
const updatesPromise = /* @__PURE__ */ new Map();
|
|
11083
11085
|
function getPackageManager() {
|
|
@@ -11135,12 +11137,10 @@ function setupNpmRPC({ nuxt, ensureDevAuthToken }) {
|
|
|
11135
11137
|
return updatesPromise.get(name);
|
|
11136
11138
|
},
|
|
11137
11139
|
getNpmCommand,
|
|
11138
|
-
async runNpmCommand(
|
|
11139
|
-
await ensureDevAuthToken(token);
|
|
11140
|
+
async runNpmCommand(...args) {
|
|
11140
11141
|
return runNpmCommand(...args);
|
|
11141
11142
|
},
|
|
11142
|
-
async installNuxtModule(
|
|
11143
|
-
await ensureDevAuthToken(token);
|
|
11143
|
+
async installNuxtModule(name, dry = true) {
|
|
11144
11144
|
const commands = await getNpmCommand("install", name, { dev: true });
|
|
11145
11145
|
const filepath = nuxt.options._nuxtConfigFile;
|
|
11146
11146
|
let source = latestGenerated;
|
|
@@ -11183,8 +11183,7 @@ function setupNpmRPC({ nuxt, ensureDevAuthToken }) {
|
|
|
11183
11183
|
processId
|
|
11184
11184
|
};
|
|
11185
11185
|
},
|
|
11186
|
-
async uninstallNuxtModule(
|
|
11187
|
-
await ensureDevAuthToken(token);
|
|
11186
|
+
async uninstallNuxtModule(name, dry = true) {
|
|
11188
11187
|
const commands = await getNpmCommand("uninstall", name);
|
|
11189
11188
|
const filepath = nuxt.options._nuxtConfigFile;
|
|
11190
11189
|
const source = await fs.readFile(filepath, "utf-8");
|
|
@@ -11231,8 +11230,7 @@ function setupNpmRPC({ nuxt, ensureDevAuthToken }) {
|
|
|
11231
11230
|
}
|
|
11232
11231
|
|
|
11233
11232
|
function setupServerDataRPC({
|
|
11234
|
-
nuxt
|
|
11235
|
-
ensureDevAuthToken
|
|
11233
|
+
nuxt
|
|
11236
11234
|
}) {
|
|
11237
11235
|
let nitro;
|
|
11238
11236
|
let viteServer;
|
|
@@ -11283,8 +11281,7 @@ function setupServerDataRPC({
|
|
|
11283
11281
|
getServerConfig() {
|
|
11284
11282
|
return nuxt.options;
|
|
11285
11283
|
},
|
|
11286
|
-
async getServerData(
|
|
11287
|
-
await ensureDevAuthToken(token);
|
|
11284
|
+
async getServerData() {
|
|
11288
11285
|
return {
|
|
11289
11286
|
nuxt: nuxt.options,
|
|
11290
11287
|
nitro: nitro?.options,
|
|
@@ -11426,8 +11423,7 @@ function shouldIgnoreStorageKey(key) {
|
|
|
11426
11423
|
}
|
|
11427
11424
|
function setupStorageRPC({
|
|
11428
11425
|
nuxt,
|
|
11429
|
-
rpc
|
|
11430
|
-
ensureDevAuthToken
|
|
11426
|
+
rpc
|
|
11431
11427
|
}) {
|
|
11432
11428
|
const storageMounts = {};
|
|
11433
11429
|
let storage;
|
|
@@ -11474,20 +11470,17 @@ function setupStorageRPC({
|
|
|
11474
11470
|
return [];
|
|
11475
11471
|
}
|
|
11476
11472
|
},
|
|
11477
|
-
async getStorageItem(
|
|
11478
|
-
await ensureDevAuthToken(token);
|
|
11473
|
+
async getStorageItem(key) {
|
|
11479
11474
|
if (!storage)
|
|
11480
11475
|
return null;
|
|
11481
11476
|
return await storage.getItem(key);
|
|
11482
11477
|
},
|
|
11483
|
-
async setStorageItem(
|
|
11484
|
-
await ensureDevAuthToken(token);
|
|
11478
|
+
async setStorageItem(key, value) {
|
|
11485
11479
|
if (!storage)
|
|
11486
11480
|
return;
|
|
11487
11481
|
return await storage.setItem(key, value);
|
|
11488
11482
|
},
|
|
11489
|
-
async removeStorageItem(
|
|
11490
|
-
await ensureDevAuthToken(token);
|
|
11483
|
+
async removeStorageItem(key) {
|
|
11491
11484
|
if (!storage)
|
|
11492
11485
|
return;
|
|
11493
11486
|
return await storage.removeItem(key);
|
|
@@ -11543,7 +11536,7 @@ function telemetryEvent(payload, immediate = false) {
|
|
|
11543
11536
|
throttledSend();
|
|
11544
11537
|
}
|
|
11545
11538
|
|
|
11546
|
-
function setupTerminalRPC({ nuxt, rpc, refresh
|
|
11539
|
+
function setupTerminalRPC({ nuxt, rpc, refresh }) {
|
|
11547
11540
|
const terminals = /* @__PURE__ */ new Map();
|
|
11548
11541
|
nuxt.hook("devtools:terminal:register", (terminal) => {
|
|
11549
11542
|
terminals.set(terminal.id, terminal);
|
|
@@ -11593,12 +11586,10 @@ function setupTerminalRPC({ nuxt, rpc, refresh, ensureDevAuthToken }) {
|
|
|
11593
11586
|
getTerminals() {
|
|
11594
11587
|
return Array.from(terminals.values(), (i) => serializeTerminal(i));
|
|
11595
11588
|
},
|
|
11596
|
-
async getTerminalDetail(
|
|
11597
|
-
await ensureDevAuthToken(token);
|
|
11589
|
+
async getTerminalDetail(id) {
|
|
11598
11590
|
return serializeTerminal(terminals.get(id), true);
|
|
11599
11591
|
},
|
|
11600
|
-
async runTerminalAction(
|
|
11601
|
-
await ensureDevAuthToken(token);
|
|
11592
|
+
async runTerminalAction(id, action) {
|
|
11602
11593
|
const terminal = terminals.get(id);
|
|
11603
11594
|
if (!terminal)
|
|
11604
11595
|
return false;
|
|
@@ -11653,14 +11644,14 @@ function setupTimelineRPC({ nuxt }) {
|
|
|
11653
11644
|
function setupRPC(nuxt, options) {
|
|
11654
11645
|
const serverFunctions = {};
|
|
11655
11646
|
const extendedRpcMap = /* @__PURE__ */ new Map();
|
|
11656
|
-
let
|
|
11647
|
+
let devtoolsKitCtx;
|
|
11657
11648
|
const pendingBroadcasts = [];
|
|
11658
11649
|
function broadcast(method, ...args) {
|
|
11659
|
-
if (!
|
|
11650
|
+
if (!devtoolsKitCtx) {
|
|
11660
11651
|
pendingBroadcasts.push({ method, args });
|
|
11661
11652
|
return;
|
|
11662
11653
|
}
|
|
11663
|
-
|
|
11654
|
+
devtoolsKitCtx.rpc.broadcast({
|
|
11664
11655
|
method,
|
|
11665
11656
|
args,
|
|
11666
11657
|
event: true
|
|
@@ -11681,11 +11672,11 @@ function setupRPC(nuxt, options) {
|
|
|
11681
11672
|
const functionsProxy = new Proxy(serverFunctions, {
|
|
11682
11673
|
set(target, prop, value) {
|
|
11683
11674
|
target[prop] = value;
|
|
11684
|
-
if (
|
|
11685
|
-
if (
|
|
11686
|
-
|
|
11675
|
+
if (devtoolsKitCtx && typeof prop === "string") {
|
|
11676
|
+
if (devtoolsKitCtx.rpc.has(prop)) {
|
|
11677
|
+
devtoolsKitCtx.rpc.update({ name: prop, handler: value });
|
|
11687
11678
|
} else {
|
|
11688
|
-
|
|
11679
|
+
devtoolsKitCtx.rpc.register({ name: prop, handler: value });
|
|
11689
11680
|
}
|
|
11690
11681
|
}
|
|
11691
11682
|
return true;
|
|
@@ -11700,10 +11691,10 @@ function setupRPC(nuxt, options) {
|
|
|
11700
11691
|
}
|
|
11701
11692
|
function extendServerRpc(namespace, functions) {
|
|
11702
11693
|
extendedRpcMap.set(namespace, functions);
|
|
11703
|
-
if (
|
|
11694
|
+
if (devtoolsKitCtx) {
|
|
11704
11695
|
for (const [fnName, handler] of Object.entries(functions)) {
|
|
11705
11696
|
if (typeof handler === "function") {
|
|
11706
|
-
|
|
11697
|
+
devtoolsKitCtx.rpc.register({ name: `${namespace}:${fnName}`, handler });
|
|
11707
11698
|
}
|
|
11708
11699
|
}
|
|
11709
11700
|
}
|
|
@@ -11718,13 +11709,12 @@ function setupRPC(nuxt, options) {
|
|
|
11718
11709
|
nuxt,
|
|
11719
11710
|
options,
|
|
11720
11711
|
rpc,
|
|
11712
|
+
get devtoolsKit() {
|
|
11713
|
+
return devtoolsKitCtx;
|
|
11714
|
+
},
|
|
11721
11715
|
refresh,
|
|
11722
11716
|
extendServerRpc,
|
|
11723
|
-
openInEditorHooks: []
|
|
11724
|
-
/** @deprecated Auth is now handled by Vite DevTools */
|
|
11725
|
-
async ensureDevAuthToken(_token) {
|
|
11726
|
-
logger.warn("[nuxt-devtools] `ensureDevAuthToken` is deprecated. Auth is now handled by Vite DevTools.");
|
|
11727
|
-
}
|
|
11717
|
+
openInEditorHooks: []
|
|
11728
11718
|
};
|
|
11729
11719
|
nuxt.devtools = ctx;
|
|
11730
11720
|
Object.assign(serverFunctions, {
|
|
@@ -11742,8 +11732,11 @@ function setupRPC(nuxt, options) {
|
|
|
11742
11732
|
...setupTelemetryRPC(ctx),
|
|
11743
11733
|
...setupServerDataRPC(ctx)
|
|
11744
11734
|
});
|
|
11745
|
-
function
|
|
11746
|
-
|
|
11735
|
+
function connectDevToolsKit(ctx2) {
|
|
11736
|
+
if (devtoolsKitCtx)
|
|
11737
|
+
return;
|
|
11738
|
+
devtoolsKitCtx = ctx2;
|
|
11739
|
+
const host = ctx2.rpc;
|
|
11747
11740
|
for (const { method, args } of pendingBroadcasts) {
|
|
11748
11741
|
broadcast(method, ...args);
|
|
11749
11742
|
}
|
|
@@ -11782,7 +11775,7 @@ function setupRPC(nuxt, options) {
|
|
|
11782
11775
|
}
|
|
11783
11776
|
}
|
|
11784
11777
|
return {
|
|
11785
|
-
|
|
11778
|
+
connectDevToolsKit,
|
|
11786
11779
|
...ctx
|
|
11787
11780
|
};
|
|
11788
11781
|
}
|
|
@@ -11818,9 +11811,15 @@ async function enableModule(options, nuxt) {
|
|
|
11818
11811
|
src: join(runtimeDir, "plugins/devtools.server"),
|
|
11819
11812
|
mode: "server"
|
|
11820
11813
|
});
|
|
11814
|
+
if (nuxt.options.dev) {
|
|
11815
|
+
nuxt.options.vite.optimizeDeps ||= {};
|
|
11816
|
+
nuxt.options.vite.optimizeDeps.include ||= [];
|
|
11817
|
+
nuxt.options.vite.optimizeDeps.include.push("@vue/devtools-kit");
|
|
11818
|
+
nuxt.options.vite.optimizeDeps.include.push("@vue/devtools-core");
|
|
11819
|
+
}
|
|
11821
11820
|
const DevTools = await import('@vitejs/devtools').then((r) => r.DevTools());
|
|
11822
11821
|
addVitePlugin(DevTools);
|
|
11823
|
-
let
|
|
11822
|
+
let connectDevToolsKit;
|
|
11824
11823
|
addVitePlugin(defineViteDevToolsPlugin({
|
|
11825
11824
|
name: "nuxt:devtools",
|
|
11826
11825
|
devtools: {
|
|
@@ -11832,10 +11831,10 @@ async function enableModule(options, nuxt) {
|
|
|
11832
11831
|
title: "Nuxt DevTools",
|
|
11833
11832
|
url: "/__nuxt_devtools__/client/"
|
|
11834
11833
|
});
|
|
11835
|
-
|
|
11834
|
+
connectDevToolsKit?.(ctx2);
|
|
11836
11835
|
}
|
|
11837
11836
|
}
|
|
11838
|
-
}));
|
|
11837
|
+
}), { server: false });
|
|
11839
11838
|
addPlugin({
|
|
11840
11839
|
src: join(runtimeDir, "plugins/vite-devtools.client"),
|
|
11841
11840
|
mode: "client"
|
|
@@ -11875,10 +11874,10 @@ window.__NUXT_DEVTOOLS_TIME_METRIC__.appInit = Date.now()
|
|
|
11875
11874
|
config.plugins.unshift(join(runtimeDir, "nitro/inline"));
|
|
11876
11875
|
});
|
|
11877
11876
|
const {
|
|
11878
|
-
|
|
11877
|
+
connectDevToolsKit: _connectDevToolsKit,
|
|
11879
11878
|
...ctx
|
|
11880
11879
|
} = setupRPC(nuxt, options);
|
|
11881
|
-
|
|
11880
|
+
connectDevToolsKit = _connectDevToolsKit;
|
|
11882
11881
|
const clientDirExists = existsSync(clientDir);
|
|
11883
11882
|
extendViteConfig((config) => {
|
|
11884
11883
|
config.server ||= {};
|
|
@@ -1,32 +1,20 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { addVitePlugin } from '@nuxt/kit';
|
|
1
|
+
import { addVitePlugin, logger } from '@nuxt/kit';
|
|
3
2
|
|
|
4
|
-
const DOUBLE_SLASH_RE = /\/\//g;
|
|
5
3
|
const VERSION_QUERY_RE = /\?v=\w+$/;
|
|
6
4
|
const VUE_EXT_RE = /\.vue($|\?v=)/;
|
|
7
5
|
async function createVitePluginInspect(options) {
|
|
8
6
|
return await import('vite-plugin-inspect').then((r) => r.default(options));
|
|
9
7
|
}
|
|
10
|
-
async function setup({
|
|
8
|
+
async function setup({ rpc, devtoolsKit }) {
|
|
11
9
|
const plugin = await createVitePluginInspect();
|
|
12
10
|
addVitePlugin(plugin);
|
|
13
|
-
let api;
|
|
14
|
-
nuxt.hook("vite:serverCreated", () => {
|
|
15
|
-
api = plugin.api;
|
|
16
|
-
});
|
|
17
|
-
addCustomTab(() => ({
|
|
18
|
-
name: "builtin-vite-inspect",
|
|
19
|
-
title: "Inspect",
|
|
20
|
-
icon: "carbon-ibm-watson-discovery",
|
|
21
|
-
category: "advanced",
|
|
22
|
-
view: {
|
|
23
|
-
type: "iframe",
|
|
24
|
-
src: `${nuxt.options.app.baseURL}${nuxt.options.app.buildAssetsDir}/__inspect/`.replace(DOUBLE_SLASH_RE, "/")
|
|
25
|
-
}
|
|
26
|
-
}), nuxt);
|
|
27
11
|
async function getComponentsRelationships() {
|
|
28
|
-
|
|
29
|
-
|
|
12
|
+
if (!devtoolsKit?.rpc.has("vite-plugin-inspect:get-metadata")) {
|
|
13
|
+
logger.warn("[nuxt-devtools] vite-plugin-inspect RPC functions not registered, component relationships unavailable");
|
|
14
|
+
return [];
|
|
15
|
+
}
|
|
16
|
+
const meta = await devtoolsKit.rpc.invokeLocal("vite-plugin-inspect:get-metadata");
|
|
17
|
+
const modules = (meta && meta.instances[0] ? await devtoolsKit.rpc.invokeLocal("vite-plugin-inspect:get-modules-list", {
|
|
30
18
|
vite: meta.instances[0].vite,
|
|
31
19
|
env: meta.instances[0].environments[0]
|
|
32
20
|
}) : null) || [];
|
package/dist/client/200.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><script type="importmap">{"imports":{"#entry":"/__NUXT_DEVTOOLS_BASE__/_nuxt/
|
|
1
|
+
<!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><script type="importmap">{"imports":{"#entry":"/__NUXT_DEVTOOLS_BASE__/_nuxt/gdsye0vf.js"}}</script><link rel="stylesheet" href="/__NUXT_DEVTOOLS_BASE__/_nuxt/entry.css-nqh1m7yk.css" crossorigin><link rel="stylesheet" href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/json-editor-vue.css-lkbe0qhh.css" crossorigin><link rel="stylesheet" href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/unocss.css-3gd0e2sv.css" crossorigin><link rel="stylesheet" href="/__NUXT_DEVTOOLS_BASE__/_nuxt/nsplit-pane.css-cyge27bh.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/gdsye0vf.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/_plugin-vue_export-helper-cxcynmu7.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/json-editor-vue-go859b33.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/rolldown-runtime-oipoa1or.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/utils-0y38f305.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/shiki-dger8vg9.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/rpc-isxadwf4.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/ready-chvd8pav.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/dist-mnod32r1.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/nuxt-n7rqurxx.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vue-router-bjsf3ueg.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/dist-fas03c07.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/unocss-d0gwgu4l.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/composables-g3h8z0a3.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/ndialog-nuj407ct.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/ncard-bs9j5ske.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/fuse-ic4l3jjo.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/nuxt-link-bm02zjpm.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/dist-bxsmety0.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/npm-bqk49gno.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/nsplit-pane-nneagzae.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/splitpanes.es-m52r20uv.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/telemetry-iyty3hdu.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/storage-options-ll4al4nh.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/nbutton-dy9mskkk.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/nicon-do46fhz3.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/ndark-toggle-dd7qey8l.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/nloading-b6gn4u1s.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/npanel-grids-ip7w4ejt.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/ntext-input-ooyn577q.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/editor-ib5dg7xf.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/state-routes-jda6rt5m.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/nuxt-logo-bq85idrv.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/tab-icon-me90e54n.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/dialog-jbq54nkm.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/state-subprocess-lka458r1.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/state-tabs-itldyzgg.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/state-schema-dxaz6x8f.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/storage-e6rsfrwe.js"><script type="module" src="/__NUXT_DEVTOOLS_BASE__/_nuxt/gdsye0vf.js" crossorigin></script></head><body><div id="__nuxt"></div><div id="teleports"></div><script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__NUXT_DEVTOOLS_BASE__/",buildId:"c4431537-3cdf-4a17-8364-5d3d90841be5",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1775609765717,false]</script></body></html>
|
package/dist/client/404.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><script type="importmap">{"imports":{"#entry":"/__NUXT_DEVTOOLS_BASE__/_nuxt/
|
|
1
|
+
<!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><script type="importmap">{"imports":{"#entry":"/__NUXT_DEVTOOLS_BASE__/_nuxt/gdsye0vf.js"}}</script><link rel="stylesheet" href="/__NUXT_DEVTOOLS_BASE__/_nuxt/entry.css-nqh1m7yk.css" crossorigin><link rel="stylesheet" href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/json-editor-vue.css-lkbe0qhh.css" crossorigin><link rel="stylesheet" href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/unocss.css-3gd0e2sv.css" crossorigin><link rel="stylesheet" href="/__NUXT_DEVTOOLS_BASE__/_nuxt/nsplit-pane.css-cyge27bh.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/gdsye0vf.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/_plugin-vue_export-helper-cxcynmu7.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/json-editor-vue-go859b33.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/rolldown-runtime-oipoa1or.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/utils-0y38f305.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/shiki-dger8vg9.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/rpc-isxadwf4.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/ready-chvd8pav.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/dist-mnod32r1.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/nuxt-n7rqurxx.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vue-router-bjsf3ueg.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/dist-fas03c07.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/unocss-d0gwgu4l.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/composables-g3h8z0a3.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/ndialog-nuj407ct.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/ncard-bs9j5ske.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/fuse-ic4l3jjo.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/nuxt-link-bm02zjpm.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/dist-bxsmety0.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/npm-bqk49gno.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/nsplit-pane-nneagzae.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/splitpanes.es-m52r20uv.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/telemetry-iyty3hdu.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/storage-options-ll4al4nh.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/nbutton-dy9mskkk.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/nicon-do46fhz3.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/ndark-toggle-dd7qey8l.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/nloading-b6gn4u1s.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/npanel-grids-ip7w4ejt.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/ntext-input-ooyn577q.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/editor-ib5dg7xf.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/state-routes-jda6rt5m.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/nuxt-logo-bq85idrv.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/tab-icon-me90e54n.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/dialog-jbq54nkm.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/state-subprocess-lka458r1.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/state-tabs-itldyzgg.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/state-schema-dxaz6x8f.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/storage-e6rsfrwe.js"><script type="module" src="/__NUXT_DEVTOOLS_BASE__/_nuxt/gdsye0vf.js" crossorigin></script></head><body><div id="__nuxt"></div><div id="teleports"></div><script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__NUXT_DEVTOOLS_BASE__/",buildId:"c4431537-3cdf-4a17-8364-5d3d90841be5",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1775609765721,false]</script></body></html>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{E as e,W as t,v as n}from"./vendor/json-editor-vue-go859b33.js";import"./composables-cjr9vk21.js";var r={"h-screen":``,"w-screen":``,"bg-black":``},i=e({__name:`__blank`,setup(e){return(e,i)=>(t(),n(`div`,r))}});export{i as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{C as e,Ct as t,E as n,Mt as r,Qt as i,W as a,Y as o,_ as s,c,dt as l,ft as u,g as d,h as f,m as p,tn as m,v as h,w as g}from"./vendor/json-editor-vue-go859b33.js";import{A as _,_ as v}from"./ready-chvd8pav.js";import{a as y}from"./nuxt-n7rqurxx.js";import{_ as b,g as x}from"./utils-0y38f305.js";import"./npm-bqk49gno.js";import{a as S,m as C,p as w}from"./rpc-isxadwf4.js";import{t as T}from"./_plugin-vue_export-helper-cxcynmu7.js";import{t as E}from"./nbutton-dy9mskkk.js";import{t as D}from"./telemetry-iyty3hdu.js";import{t as O}from"./npanel-grids-ip7w4ejt.js";import{t as k}from"./nsplit-pane-nneagzae.js";import{t as A}from"./ntext-input-ooyn577q.js";import{t as j}from"./ndialog-nuj407ct.js";import{r as M,t as N}from"./state-subprocess-lka458r1.js";import{r as P}from"./state-routes-jda6rt5m.js";import{t as F}from"./ncode-block-lbhgksmi.js";import"./composables-cjr9vk21.js";import{t as I}from"./ncheckbox-msykavgu.js";import{t as L}from"./filepath-item-mxes3g27.js";import{t as R}from"./ntip-czdtbj5r.js";import{t as z}from"./help-fab-vp6gbv3k.js";var B={"h-full":``,grid:`~ rows-[max-content_1fr]`},V={flex:`~ wrap`,"w-full":``},H=[`onClick`],U={key:0,flex:`~ col gap-4 items-center justify-center`,p4:``},W={grid:`~ cols-[30px_1fr] gap-x-2 gap-y-3 items-center justify-center`,"w-100":``},G=`/__nuxt_devtools__/client`,K=Object.assign(n({__name:`BuildAnalyzeDetails`,props:{current:{},prev:{}},setup(n){let d=n,v=`${y().app.baseURL.replace(G,`/`)}/__nuxt_devtools__/analyze/`.replace(/\/+/g,`/`),b=p(()=>{let e=[{name:`Overview`,id:`overview`}];return d.current.features.bundleClient&&e.push({name:`Client Bundle`,id:`bundle-client`}),d.current.features.bundleNitro&&e.push({name:`Nitro Bundle`,id:`bundle-nitro`}),d.current.features.viteInspect&&e.push({name:`Vite Inspect`,id:`vite-inspect`}),e}),x=t(b.value[0]);function w(e){return`${((e.endTime-e.startTime)/1e3).toFixed(1)}s`}function T(e){return e<1024?`${e}B`:e<1024*1024?`${(e/1024).toFixed(1)}KB`:e<1024*1024*1024?`${(e/1024/1024).toFixed(1)}MB`:`${(e/1024/1024/1024).toFixed(1)}GB`}async function D(e){return S.clearAnalyzeBuilds([e])}return(t,d)=>{let p=L,y=E;return a(),h(`div`,B,[f(`div`,V,[(a(!0),h(c,null,o(b.value,(e,t)=>(a(),h(`button`,{key:t,px4:``,py2:``,border:`r base`,hover:`bg-active`,class:i(e.id===x.value?.id?``:`border-b`),onClick:t=>x.value=e},[f(`div`,{class:i(e.id===x.value?.id?``:`op30`)},m(e.name),3)],10,H))),128)),d[1]||=f(`div`,{border:`b base`,"flex-auto":``},null,-1)]),x.value?.id===`overview`?(a(),h(`div`,U,[d[15]||=f(`div`,{"flex-auto":``},null,-1),f(`div`,W,[d[10]||=f(`div`,{"i-carbon-commit":``,"text-xl":``},null,-1),f(`div`,null,[d[2]||=f(`div`,{"text-sm":``,op50:``},` Name `,-1),f(`div`,null,m(n.current.name),1)]),d[11]||=f(`div`,{"i-carbon-time":``,"text-xl":``},null,-1),f(`div`,null,[d[3]||=f(`div`,{"text-sm":``,op50:``},` Build duration `,-1),f(`div`,null,m(w(n.current)),1)]),n.current.size?.clientBundle?(a(),h(c,{key:0},[d[5]||=f(`div`,{"i-carbon-cics-program":``,"text-xl":``},null,-1),f(`div`,null,[d[4]||=f(`div`,{"text-sm":``,op50:``},` Client bundle size `,-1),f(`div`,null,m(T(n.current.size.clientBundle)),1)])],64)):s(``,!0),n.current.size?.nitroBundle?(a(),h(c,{key:1},[d[7]||=f(`div`,{"i-carbon-bare-metal-server":``,"text-xl":``},null,-1),f(`div`,null,[d[6]||=f(`div`,{"text-sm":``,op50:``},` Nitro bundle size `,-1),f(`div`,null,m(T(n.current.size.nitroBundle)),1)])],64)):s(``,!0),d[12]||=f(`div`,{"i-carbon-edge-node":``,"text-xl":``},null,-1),f(`div`,null,[d[8]||=f(`div`,{"text-sm":``,op50:``},` Built `,-1),f(`div`,null,m(r(C)(new Date(n.current.endTime))),1)]),d[13]||=f(`div`,{"i-carbon:folder-parent":``,"text-xl":``},null,-1),f(`div`,null,[d[9]||=f(`div`,{"text-sm":``,op50:``},` Report Path `,-1),g(p,{filepath:n.current.analyzeDir},null,8,[`filepath`])])]),d[16]||=f(`div`,{"flex-auto":``},null,-1),g(y,{n:`rose`,icon:`carbon-delete`,onClick:d[0]||=e=>D(n.current.name)},{default:l(()=>[...d[14]||=[e(` Delete this report `,-1)]]),_:1})])):s(``,!0),d._lazyshow1||x.value?.id===`bundle-client`?(d._lazyshow1=!0,a(),h(c,null,[u(f(`iframe`,{src:`${r(v)}${n.current.slug}/client.html`,"h-full":``,"w-full":``},null,8,[`src`]),[[_,x.value?.id===`bundle-client`]])],64)):s(`v-show-if`,!0),d._lazyshow2||x.value?.id===`bundle-nitro`?(d._lazyshow2=!0,a(),h(c,null,[u(f(`iframe`,{src:`${r(v)}${n.current.slug}/nitro.html`,"h-full":``,"w-full":``},null,8,[`src`]),[[_,x.value?.id===`bundle-nitro`]])],64)):s(`v-show-if`,!0),d._lazyshow3||x.value?.id===`vite-inspect`?(d._lazyshow3=!0,a(),h(c,null,[u(f(`iframe`,{src:`${r(v)}${n.current.slug}/.vite-inspect/`,"h-full":``,"w-full":``},null,8,[`src`]),[[_,x.value?.id===`vite-inspect`]])],64)):s(`v-show-if`,!0)])}}}),{__name:`BuildAnalyzeDetails`}),q={},J={class:`markdown-body`};function Y(t,n){return a(),h(`div`,J,[...n[0]||=[f(`template`,null,[f(`div`,{class:`markdown-body`},[f(`h1`,null,`Build Analyze`),f(`p`,null,[e(`DevTools provides a build analyze tool to help you understand the size of your app in production. Whenever you start a new build, it runs the command `),f(`code`,{"v-pre":``},`nuxt build --analyze`),e(` and present the output data directly in DevTools for easy browsing and comparing.`)])])],-1)]])}var X=T(q,[[`render`,Y]]),Z={flex:`~ col`},Q=[`onClick`],$={flex:`~ gap-1 items-center wrap`,"w-full":``,"text-sm":``,op60:``},ee={flex:`~ items-center justify-center wrap`,p4:``},te={flex:`~ col gap-1`,"w-250":``,p4:``},ne={flex:`~ gap-3`,mt2:``,"justify-end":``},re=n({__name:`analyze-build`,setup(n){let u=w(),_=b(),y=v(),T=x(`analyze-build:slug`,``),L=p(()=>_.value?.builds.find(e=>e.slug===T.value)??_.value?.builds[0]),B=t(!1),V=t(``),H=p(()=>_.value?.builds.some(e=>e.name===V.value.trim()));async function U(){V.value=await S.generateAnalyzeBuildName(),await u.start()&&(D(`analyze-build:start`),N.value={name:V.value,processId:await S.startAnalyzeBuild(V.value)},B.value&&q())}let W=P();function G(e){return`${((e.endTime-e.startTime)/1e3).toFixed(1)}s`}function q(){N.value?.processId&&(W.value=N.value.processId,y.push(`/modules/terminals`))}return M(()=>[{id:`action:analyze-build: start`,title:`Start a new analyze build`,icon:`i-carbon-edge-node`,action:U}]),(t,n)=>{let p=E,v=K,y=O,b=k,x=A,S=R,w=F,D=I,M=j,P=X,W=z;return a(),h(c,null,[g(b,{"left-size":30},{left:l(()=>[f(`div`,Z,[(a(!0),h(c,null,o(r(_)?.builds,e=>(a(),h(c,{key:e.slug},[f(`button`,{flex:`~ col gap1`,p3:``,"hover:bg-active":``,class:i(e.slug===L.value?.slug?`text-primary bg-active`:``),onClick:t=>T.value=e.slug},[f(`code`,null,m(e.name),1),f(`div`,$,[n[4]||=f(`div`,{"i-carbon-time":``},null,-1),f(`span`,null,m(G(e)),1),n[5]||=f(`div`,{"flex-auto":``},null,-1),f(`span`,null,m(r(C)(new Date(e.endTime))),1)])],10,Q),n[6]||=f(`div`,{"x-divider":``},null,-1)],64))),128)),f(`div`,ee,[r(N)?(a(),d(p,{key:1,n:`primary`,icon:`carbon-circle-dash animate-spin`,onClick:n[1]||=e=>q()},{default:l(()=>[...n[8]||=[e(` Building... `,-1)]]),_:1})):(a(),d(p,{key:0,n:`primary`,icon:`carbon-edge-node`,onClick:n[0]||=e=>U()},{default:l(()=>[...n[7]||=[e(` Start a new build `,-1)]]),_:1}))])])]),right:l(()=>[L.value?(a(),d(v,{key:0,current:L.value},null,8,[`current`])):(a(),d(y,{key:1}))]),_:1}),g(r(u),null,{default:l(({resolve:t})=>[g(M,{"model-value":!0,onClose:e=>t(!1)},{default:l(()=>[f(`div`,te,[n[13]||=f(`h3`,{class:`text-lg font-medium leading-6`,mb2:``},` Start analyze build? `,-1),n[14]||=f(`p`,{op50:``},` Enter the name of the build: `,-1),g(x,{modelValue:V.value,"onUpdate:modelValue":n[2]||=e=>V.value=e,placeholder:`Build name`},null,8,[`modelValue`]),H.value?(a(),d(S,{key:0,"n-orange":``},{default:l(()=>[...n[9]||=[e(` A build with the same name already exists, continue would overrides the previous build result. `,-1)]]),_:1})):s(``,!0),n[15]||=f(`div`,{my3:``,"x-divider":``},null,-1),n[16]||=f(`p`,{op50:``},` The following command will be executed in your terminal: `,-1),g(w,{code:`npx nuxi analyze --no-serve --name=${V.value}`,lang:`bash`,px4:``,py2:``,border:`~ base rounded`,lines:!1},null,8,[`code`]),g(D,{modelValue:B.value,"onUpdate:modelValue":n[3]||=e=>B.value=e,mt2:``,n:`primary`},{default:l(()=>[...n[10]||=[e(` Navigate to terminal `,-1)]]),_:1},8,[`modelValue`]),f(`div`,ne,[g(p,{onClick:e=>t(!1)},{default:l(()=>[...n[11]||=[e(` Cancel `,-1)]]),_:1},8,[`onClick`]),g(p,{n:`solid primary`,onClick:e=>t(!0)},{default:l(()=>[...n[12]||=[e(` Start `,-1)]]),_:1},8,[`onClick`])])])]),_:2},1032,[`onClose`])]),_:1}),g(W,null,{default:l(()=>[g(P)]),_:1})],64)}}});export{re as default};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{C as e,Ct as t,E as n,Mt as r,Q as i,Qt as a,W as o,X as s,Y as c,_ as l,c as u,dt as d,en as f,ft as p,g as m,h,m as g,tn as _,v,vt as y,w as b}from"./vendor/json-editor-vue-go859b33.js";import{j as x,k as S}from"./ready-chvd8pav.js";import{j as C,w}from"./utils-0y38f305.js";import{A as T,B as E,C as D,N as O,O as k,a as A,c as j,d as M,g as N,k as P,u as F}from"./rpc-isxadwf4.js";import{t as I}from"./storage-options-ll4al4nh.js";import{i as L,n as ee,t as te}from"./editor-ib5dg7xf.js";import{t as R}from"./nicon-do46fhz3.js";import{t as z}from"./nbutton-dy9mskkk.js";import{t as B}from"./telemetry-iyty3hdu.js";import{t as V}from"./ntext-input-ooyn577q.js";import{t as ne}from"./ndialog-nuj407ct.js";import{t as H}from"./fuse-ic4l3jjo.js";import{t as U}from"./ndropdown-g8mioo07.js";import{t as W}from"./ndrawer-cshktk1a.js";import"./composables-cjr9vk21.js";import{t as G}from"./ncheckbox-msykavgu.js";import{t as re}from"./filepath-item-mxes3g27.js";import{t as K}from"./nnavbar-h4hz44io.js";import{t as q}from"./nsection-block-l37co05t.js";import{t as J}from"./code-snippets-jmly69z5.js";var Y={key:0,"h-full":``,"w-full":``,flex:``,"items-center":``,"justify-center":``},X={for:`drop-zone-input`,"text-3xl":``,hover:`text-green cursor-pointer`,"transition-all":``},ie={key:1,relative:``,"h-full":``,"w-full":``,grid:`~ rows-[max-content_1fr_max-content]`},ae={grid:`~ cols-minmax-8rem gap-8`,"overflow-auto":``,p6:``},oe={flex:``,"items-center":``,"justify-center":``,"of-hidden":``,rounded:``,"rounded-t-lg":``,"bg-active":``,"object-cover":``,class:`aspect-1/1`,border:`~ base`},se=[`src`],ce={flex:`~ gap1`,"items-center":``},le={flex:`~ gap-2`,"items-center":``,"justify-center":``,p8:``},ue=Object.assign(n({__name:`AssetDropZone`,props:{modelValue:{type:Boolean,required:!0},folder:{type:String,required:!0}},setup(n){let s=n,f=/\.\w+$/,g=T(s,`modelValue`),_=t(),y=t([]);function x(e){_.value=e.target,g.value=!0}function S(e){e.target===_.value&&(g.value=!1)}function C(e){e.preventDefault()}function w(e){e.preventDefault(),E(e.dataTransfer.files)}function E(e){let t=[...e||[]];if(t.length){let e=[],n=y.value.map(e=>e.name);for(let r of t)if(n.includes(r.name)){let t=1,[i,a]=r.name.split(`.`);for(;n.includes(`${i} (${t}).${a}`);)t++;let o=`${i}-${t}.${a}`,s=new Blob([r],{type:r.type}),c=new File([s],o,{lastModified:Date.now()});e.push(c),n.push(o)}else r.type===``&&L({message:`Folders are not supported yet`,icon:`carbon:face-dissatisfied`,classes:`text-orange`}),e.push(r);y.value=[...y.value,...e]}}async function O(){if(j.value||F.value)return;B(`assets:upload`);let e=[];for(let t of y.value){let n=new FileReader;n.readAsDataURL(t);let r=(await new Promise(e=>{n.onload=()=>e(n.result)})).split(`;base64,`).pop();e.push({path:t.name,encoding:`base64`,content:r})}await A.writeStaticAssets([...e],s.folder).then(()=>{I(),L({message:`Files uploaded successfully!`,icon:`i-carbon:checkmark`})}).catch(e=>{I(),L({message:`Error uploading files: ${e?.message??`unknown`}`,icon:`i-carbon-warning`,classes:`text-red`})}),g.value=!1}function k(e){y.value?.splice(e,1)}function M(e){return URL.createObjectURL(e)}function N(e,t){let[n,r]=e.name.split(`.`),i=t.replace(f,``),a=`${i}.${r}`;return i.length===0?(alert(`File name must be at least 1 characters long`),n):(Object.defineProperty(e,`name`,{value:a,writable:!1}),y.value.splice(y.value.indexOf(e),1,e),e)}function P(){y.value=[]}function I(){g.value=!1,P()}return D(`dragenter`,x),D(`dragleave`,S),D(`dragover`,C),D(`drop`,w),(t,n)=>{let s=z,f=R,_=V,x=i(`tooltip`);return o(),v(`div`,{fixed:``,"bottom-0":``,"left-13":``,"right-0":``,"top-0":``,"z-10":``,"backdrop-blur-20":``,"transition-all":``,class:a(r(g)?`opacity-100 visible`:`opacity-0 invisible`)},[p(b(s,{icon:`carbon-close`,title:`Close`,absolute:``,"right-5":``,"top-5":``,"z-20":``,"text-xl":``,border:!1,onClick:I},null,512),[[x,`Close`,void 0,{"bottom-end":!0}]]),y.value?.length?(o(),v(`div`,ie,[n[4]||=h(`div`,{px6:``,py6:``},[h(`h1`,{"text-2xl":``},` Upload `),h(`p`,{"text-sm":``,op50:``},` Drag and drop files to upload `)],-1),h(`div`,ae,[(o(!0),v(u,null,c(y.value,(e,t)=>(o(),v(`div`,{key:e.name,flex:`~ col gap-2`,relative:``,"h-50":``,"w-40":``,"items-center":``},[h(`div`,oe,[h(`img`,{"h-full":``,"w-full":``,"rounded-t-lg":``,"object-cover":``,src:M(e)},null,8,se)]),h(`div`,ce,[b(_,{n:`xs`,"h-full":``,"flex-auto":``,"model-value":e.name,"onUpdate:modelValue":t=>N(e,t.target.value)},null,8,[`model-value`,`onUpdate:modelValue`]),b(s,{n:`red`,icon:`carbon-trash-can`,"h-full":``,"flex-none":``,title:`Remove file`,onClick:e=>k(t)},null,8,[`onClick`])])]))),128))]),h(`div`,le,[y.value.length?(o(),m(s,{key:0,n:`red`,onClick:P},{default:d(()=>[b(f,{icon:`carbon-clean`}),n[2]||=e(` Clear `,-1)]),_:1})):l(``,!0),b(s,{disabled:!y.value.length,n:`primary solid`,onClick:O},{default:d(()=>[b(f,{icon:`carbon-cloud-upload`}),n[3]||=e(` Upload `,-1)]),_:1},8,[`disabled`])])])):(o(),v(`div`,Y,[h(`label`,X,[b(f,{icon:`carbon-cloud-upload`,"mr-2":``}),n[1]||=e(` Drop files here or click to select `,-1)]),h(`input`,{id:`drop-zone-input`,type:`file`,multiple:``,hidden:``,onChange:n[0]||=e=>E(e.target.files)},null,32)]))],2)}}}),{__name:`AssetDropZone`}),de=Object.assign(n({__name:`AssetFontPreview`,props:{asset:{}},setup(e){let t=e,n=g(()=>`devtools-assets-${E(t.asset)}`);return k(g(()=>`
|
|
2
|
+
@font-face {
|
|
3
|
+
font-family: '${n.value}';
|
|
4
|
+
src: url('${t.asset.publicPath}');
|
|
5
|
+
}
|
|
6
|
+
`)),(e,t)=>(o(),v(`div`,{"of-hidden":``,style:f({fontFamily:`'${n.value}'`})},` 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))}}),{__name:`AssetFontPreview`}),fe={flex:``,"items-center":``,"justify-center":``,"of-hidden":``,"bg-active":``,"object-cover":``,p1:``},pe=[`src`],me={key:2,"i-carbon-document":``,"text-3xl":``,op20:``},he={key:3,"w-full":``,"self-start":``,p4:``},ge=[`textContent`],_e={key:4},ve=[`src`,`autoplay`,`controls`],ye={key:5},be={key:0,"i-carbon-volume-up":``,"text-3xl":``,op20:``},xe=[`src`],Se={key:6,"i-carbon-help":``,"text-3xl":``,op20:``},Z=Object.assign(n({__name:`AssetPreview`,props:{asset:{},textContent:{},detail:{type:Boolean}},setup(e){return(t,n)=>{let r=de;return o(),v(`div`,fe,[e.asset.type===`image`?(o(),v(`img`,{key:0,src:e.asset.publicPath},null,8,pe)):e.asset.type===`font`?(o(),m(r,{key:e.asset.publicPath,asset:e.asset,"self-stretch":``,p2:``,"text-2xl":``},null,8,[`asset`])):e.asset.type===`text`&&!e.textContent?(o(),v(`div`,me)):e.asset.type===`text`&&e.textContent?(o(),v(`div`,he,[h(`pre`,{"max-h-10rem":``,"of-hidden":``,"text-xs":``,"font-mono":``,textContent:_(e.textContent)},null,8,ge)])):e.asset.type===`video`?(o(),v(`div`,_e,[h(`video`,{src:e.asset.publicPath,autoplay:e.detail,controls:e.detail},null,8,ve)])):e.asset.type===`audio`?(o(),v(`div`,ye,[e.detail?(o(),v(`audio`,{key:1,src:e.asset.publicPath,controls:``},null,8,xe)):(o(),v(`div`,be))])):(o(),v(`div`,Se))])}}}),{__name:`AssetPreview`}),Ce={relative:``,flex:`~ col gap-1`,hover:`bg-active`,"items-center":``,"of-hidden":``,rounded:``,p2:``},we={"w-full":``,"of-hidden":``,truncate:``,"ws-nowrap":``,"text-center":``,"text-xs":``},Te=Object.assign(n({__name:`AssetGridItem`,props:{asset:{},folder:{}},setup(e){let t=e,n=g(()=>t.folder&&t.asset.path.startsWith(t.folder)?t.asset.path.slice(t.folder.length):t.asset.path);return(t,r)=>{let i=R,a=Z;return o(),v(`button`,Ce,[e.asset.layer?(o(),m(i,{key:0,icon:`i-carbon-layers`,absolute:``,"right-4":``,"top-4":``,"bg-primary":``})):l(``,!0),b(a,{"h-30":``,"w-30":``,rounded:``,border:`~ base`,asset:e.asset},null,8,[`asset`]),h(`div`,we,_(n.value),1)])}}}),{__name:`AssetGridItem`}),Q=Object.assign(n({__name:`AssetListItem`,props:{item:{},index:{default:0},modelValue:{}},setup(n,{emit:i}){let d=n,p=T(d,`modelValue`,i,{passive:!0}),b=g(()=>d.item?.children?.length),x=t(!0),S=g(()=>b.value?`i-carbon-folder`:d.item.type===`image`?`i-carbon-image`:d.item.type===`video`?`i-carbon-video`:d.item.type===`audio`?`i-carbon-volume-up`:d.item.type===`font`?`i-carbon-text-small-caps`:d.item.type===`text`?`i-carbon-document`:d.item.type===`json`?`i-carbon-json`:`i-carbon-document-blank`);return(t,i)=>{let d=R,g=Q;return o(),v(`div`,null,[h(`button`,{flex:`~ gap-2`,"w-full":``,"items-center":``,hover:`bg-active`,px4:``,py1:``,style:f({paddingLeft:`calc(1rem + ${n.index*1.5}em)`}),class:a({"bg-active":!b.value&&r(p)?.filePath===n.item?.filePath}),border:`b base`,onClick:i[0]||=e=>b.value?x.value=!x.value:p.value=n.item},[h(`div`,{class:a(S.value)},null,2),h(`span`,{class:a({"flex items-center":b.value}),"flex-auto":``,"text-start":``,"text-sm":``,"font-mono":``},[e(_(n.item.path)+` `,1),n.item.layer?(o(),m(d,{key:0,icon:`i-carbon-layers`,"bg-primary":``})):l(``,!0)],2),b.value?(o(),m(d,{key:0,icon:`carbon:chevron-right`,"transform-rotate":x.value?90:0,transition:``},null,8,[`transform-rotate`])):l(``,!0)],6),x.value?s(t.$slots,`default`,{key:0},()=>[(o(!0),v(u,null,c(n.item?.children,e=>(o(),m(g,{key:e.filepath,modelValue:r(p),"onUpdate:modelValue":i[1]||=e=>y(p)?p.value=e:null,item:e,index:n.index+1},null,8,[`modelValue`,`item`,`index`]))),128))]):l(``,!0)])}}}),{__name:`AssetListItem`}),Ee={flex:`~ col gap-4`,"min-h-full":``,"w-full":``,"of-hidden":``,p4:``},De={flex:`~`,"items-center":``,"justify-center":``},Oe={"max-w-full":``,"w-full":``,"table-fixed":``},ke={flex:`~ gap-1`,"w-full":``,"items-center":``},Ae={flex:`~ gap-1`,"w-full":``,"items-center":``,"of-hidden":``},je={"flex-auto":``,"of-hidden":``,truncate:``,"ws-pre":``,"font-mono":``},Me={capitalize:``},Ne={key:0},Pe={op70:``},Fe={flex:`~ gap2 wrap`},Ie={flex:`~ col gap-4`,"min-h-full":``,"w-full":``,"of-hidden":``,p8:``},Le={flex:`~ gap2 wrap justify-center`},Re={flex:`~ col gap-4`,"min-h-full":``,"w-full":``,"of-hidden":``,p8:``},ze={flex:`~ gap2 wrap justify-center`},Be={flex:`~ col gap-4`,"min-h-full":``,"w-full":``,"of-hidden":``,p4:``},Ve={flex:``,"justify-end":``,"gap-4":``},$=Object.assign(n({__name:`AssetDetails`,props:{modelValue:{}},setup(n,{emit:a}){let s=T(n,`modelValue`,a,{passive:!0}),c=M(async()=>{if(s.value.type===`image`)return A.getImageMeta(s.value.filePath)}),f=t(!1),y=t(),C=t(0),E=M(async()=>{if(s.value.type!==`text`)return;C.value;let e=await A.getTextAssetContent(s.value.filePath);return y.value=e,e});async function D(){if(E.value!==y.value)try{await A.writeStaticAssets([{path:s.value.path,content:y.value,override:!0}],``),f.value=!1,C.value++,L({message:`Updated`,icon:`i-carbon-checkmark`,classes:`text-green`})}catch(e){console.error(e),L({message:`Something went wrong!`,icon:`i-carbon-warning`,classes:`text-red`})}}let O=w(),k=g(()=>(O.value?._installedModules||[]).some(e=>e.meta?.name===`@nuxt/image`||e.meta?.name===`@nuxt/image-edge`||e.meta?.name===`@nuxt/image-nightly`)),j=g(()=>{let e=[];if(s.value.type===`image`){let t=c.value?.width?`\n width="${c.value.width}"\n height="${c.value.height}" `:` `;return e.push({lang:`vue-html`,code:`<img${t}\n src="${s.value.publicPath}"\n/>`,name:`Plain Image`}),k.value&&e.push({lang:`vue-html`,code:`<NuxtImg${t}\n src="${s.value.publicPath}"\n/>`,name:`Nuxt Img`,docs:`https://image.nuxt.com/usage/nuxt-img`},{lang:`vue-html`,code:`<NuxtPicture${t}\n src="${s.value.publicPath}"\n/>`,name:`Nuxt Picture`,docs:`https://image.nuxt.com/usage/nuxt-picture`}),e}return e.push({lang:`html`,code:`<a download href="${s.value.publicPath}">\n Download ${s.value.path.split(`/`).slice(-1)[0]}\n</a>`,name:`Download link`}),e}),N=te(),F=ee(),I=P(()=>s.value.mtime),R=g(()=>{let e=s.value.size;return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(2)} KB`:`${(e/1024/1024).toFixed(2)} MB`}),B=g(()=>{if(!c.value?.width||!c.value?.height)return``;let e=(t,n)=>n?e(n,t%n):t,t=e(c.value.width,c.value.height);return t>3?`${c.value.width/t}:${c.value.height/t}`:``}),H=g(()=>[`image`,`text`,`video`,`audio`,`font`].includes(s.value.type)),U=t(!1);async function W(){try{await A.deleteStaticAsset(s.value.filePath),s.value=void 0,U.value=!1,L({message:`Asset deleted`,icon:`i-carbon-checkmark`,classes:`text-green`})}catch(e){console.error(e),L({message:`Something went wrong!`,icon:`i-carbon-warning`,classes:`text-red`})}}let G=t(!1),K=t(``);async function q(){let e=s.value.filePath.split(`/`),t=e.slice(-1)[0]?.split(`.`).slice(0,-1).join(`.`);if(!K.value||K.value===t)return L({message:`Please enter a new name`,icon:`i-carbon-warning`,classes:`text-orange`});try{let t=e.slice(-1)[0]?.split(`.`).slice(-1)[0],n=`${e.slice(0,-1).join(`/`)}/${K.value}.${t}`;await A.renameStaticAsset(s.value.filePath,n),s.value=void 0,G.value=!1,L({message:`Asset renamed`,icon:`i-carbon-checkmark`,classes:`text-green`})}catch(e){console.error(e),L({message:`Something went wrong!`,icon:`i-carbon-warning`,classes:`text-red`})}}return(t,n)=>{let a=Z,g=re,C=z,w=J,T=ne,O=V,k=i(`tooltip`);return o(),v(u,null,[h(`div`,Ee,[H.value?(o(),v(u,{key:0},[n[13]||=h(`div`,{flex:`~ gap2`,"mb--2":``,"items-center":``,op50:``},[h(`div`,{"x-divider":``}),h(`div`,{"flex-none":``},` Preview `),h(`div`,{"x-divider":``})],-1),h(`div`,De,[b(a,{detail:``,"max-h-80":``,"min-h-20":``,"min-w-20":``,"w-auto":``,rounded:``,border:`~ base`,asset:r(s),"text-content":r(E)},null,8,[`asset`,`text-content`])])],64)):l(``,!0),n[25]||=h(`div`,{flex:`~ gap2`,"mb--2":``,"items-center":``,op50:``},[h(`div`,{"x-divider":``}),h(`div`,{"flex-none":``},` Details `),h(`div`,{"x-divider":``})],-1),h(`table`,Oe,[h(`tbody`,null,[h(`tr`,null,[n[14]||=h(`td`,{"w-30":``,"ws-nowrap":``,pr5:``,"text-right":``,op50:``},` Filepath `,-1),h(`td`,null,[h(`div`,ke,[b(g,{filepath:r(s).filePath,"text-left":``},null,8,[`filepath`]),p(b(C,{"flex-none":``,title:`Open in Editor`,icon:`carbon-launch`,border:!1,onClick:n[0]||=e=>r(F)(r(s).filePath)},null,512),[[k,`Open in Editor`]])])])]),h(`tr`,null,[n[15]||=h(`td`,{"w-30":``,"ws-nowrap":``,pr5:``,"text-right":``,op50:``},` Public Path `,-1),h(`td`,null,[h(`div`,Ae,[h(`div`,je,_(r(s).publicPath),1),p(b(C,{"flex-none":``,title:`Copy public path`,icon:`carbon-copy`,border:!1,onClick:n[1]||=e=>r(N)(r(s).publicPath,`assets-public-path`)},null,512),[[k,`Copy public path`]]),p(b(C,{"flex-none":``,to:r(s).publicPath,icon:`carbon-launch`,target:`_blank`,border:!1,title:`Open in browser`},null,8,[`to`]),[[k,`Open in browser`]])])])]),h(`tr`,null,[n[16]||=h(`td`,{"w-30":``,"ws-nowrap":``,pr5:``,"text-right":``,op50:``},` Type `,-1),h(`td`,Me,_(r(s).type),1)]),r(c)?.width?(o(),v(u,{key:0},[h(`tr`,null,[n[17]||=h(`td`,{"w-30":``,"ws-nowrap":``,pr5:``,"text-right":``,op50:``},` Image Size `,-1),h(`td`,null,_(r(c).width)+` x `+_(r(c).height),1)]),B.value?(o(),v(`tr`,Ne,[n[18]||=h(`td`,{"w-30":``,"ws-nowrap":``,pr5:``,"text-right":``,op50:``},` Aspect Ratio `,-1),h(`td`,null,_(B.value),1)])):l(``,!0)],64)):l(``,!0),h(`tr`,null,[n[19]||=h(`td`,{"w-30":``,"ws-nowrap":``,pr5:``,"text-right":``,op50:``},` File size `,-1),h(`td`,null,_(R.value),1)]),h(`tr`,null,[n[20]||=h(`td`,{"w-30":``,"ws-nowrap":``,pr5:``,"text-right":``,op50:``},` Last modified `,-1),h(`td`,null,[e(_(new Date(r(s).mtime).toLocaleString())+` `,1),h(`span`,Pe,`(`+_(r(I))+`)`,1)])])])]),n[26]||=h(`div`,{flex:`~ gap2`,"mb--2":``,"items-center":``,op50:``},[h(`div`,{"x-divider":``}),h(`div`,{"flex-none":``},` Actions `),h(`div`,{"x-divider":``})],-1),h(`div`,Fe,[b(C,{to:r(s).publicPath,download:``,target:`_blank`,icon:`carbon-download`,n:`green`},{default:d(()=>[...n[21]||=[e(` Download `,-1)]]),_:1},8,[`to`]),r(s).type===`text`?(o(),m(C,{key:0,icon:`carbon-edit`,n:`cyan`,onClick:n[2]||=e=>f.value=!f.value},{default:d(()=>[...n[22]||=[e(` Edit `,-1)]]),_:1})):l(``,!0),b(C,{icon:`carbon-text-annotation-toggle`,n:`blue`,onClick:n[3]||=e=>G.value=!G.value},{default:d(()=>[...n[23]||=[e(` Rename `,-1)]]),_:1}),b(C,{icon:`carbon-delete`,n:`red`,onClick:n[4]||=e=>U.value=!U.value},{default:d(()=>[...n[24]||=[e(` Delete `,-1)]]),_:1})]),n[27]||=h(`div`,{"flex-auto":``},null,-1),j.value.length?(o(),m(w,{key:1,border:`t base`,"mx--4":``,"mb--4":``,"code-snippets":j.value},null,8,[`code-snippets`])):l(``,!0)]),b(T,{modelValue:U.value,"onUpdate:modelValue":n[6]||=e=>U.value=e},{default:d(()=>[h(`div`,Ie,[n[30]||=h(`span`,null,` Are you sure you want to delete this asset? `,-1),h(`div`,Le,[b(C,{icon:`carbon-close`,onClick:n[5]||=e=>U.value=!1},{default:d(()=>[...n[28]||=[e(` Cancel `,-1)]]),_:1}),b(C,{icon:`carbon-delete`,n:`red`,onClick:W},{default:d(()=>[...n[29]||=[e(` Delete `,-1)]]),_:1})])])]),_:1},8,[`modelValue`]),b(T,{modelValue:G.value,"onUpdate:modelValue":n[9]||=e=>G.value=e},{default:d(()=>[h(`div`,Re,[b(O,{modelValue:K.value,"onUpdate:modelValue":n[7]||=e=>K.value=e,placeholder:`New name`,n:`blue`},null,8,[`modelValue`]),h(`div`,ze,[b(C,{icon:`carbon-close`,onClick:n[8]||=e=>G.value=!1},{default:d(()=>[...n[31]||=[e(` Cancel `,-1)]]),_:1}),b(C,{icon:`carbon-text-annotation-toggle`,n:`blue`,onClick:q},{default:d(()=>[...n[32]||=[e(` Rename `,-1)]]),_:1})])])]),_:1},8,[`modelValue`]),r(s).type===`text`?(o(),m(T,{key:0,modelValue:f.value,"onUpdate:modelValue":n[12]||=e=>f.value=e},{default:d(()=>[h(`div`,Be,[p(h(`textarea`,{"onUpdate:modelValue":n[10]||=e=>y.value=e,placeholder:`Item value...`,class:`h-lg w-xl of-auto rounded-lg p-4 text-sm font-mono outline-none`,onKeydown:x(D,[`enter`])},null,544),[[S,y.value]]),h(`div`,Ve,[b(C,{icon:`carbon-close`,onClick:n[11]||=e=>f.value=!1},{default:d(()=>[...n[33]||=[e(` Cancel `,-1)]]),_:1}),b(C,{icon:`carbon:save`,n:`primary`,onClick:D},{default:d(()=>[...n[34]||=[e(` save `,-1)]]),_:1})])])]),_:1},8,[`modelValue`])):l(``,!0)],64)}}}),{__name:`AssetDetails`}),He={"h-full":``,"of-auto":``},Ue={"flex-none":``,flex:`~ gap2 items-center`,"text-lg":``},We={flex:`~ items-center justify-center`,absolute:``,"bottom--1":``,"right--1":``,"h-4":``,"w-4":``,"rounded-full":``,"bg-primary:30":``,"text-8px":``},Ge={flex:`~ col`,"w-30":``,"of-auto":``},Ke={"text-xs":``,op75:``},qe={op50:``},Je={key:0},Ye={"mt--4":``,px2:``,grid:`~ cols-minmax-8rem`},Xe={key:1,p2:``,grid:`~ cols-minmax-8rem`},Ze={key:1},Qe=n({__name:`assets`,setup(e){let n=C(),a=t(!1),s=t(``),f=g(()=>new H(n.value||[],{keys:[`path`]})),y=O(()=>{let e=[];for(let t of n.value||[]){let n=t.path.split(`.`).pop();n&&!e.some(e=>e.name===n)&&e.push({name:n,value:!0})}return e}),x=g(()=>(s.value?f.value.search(s.value).map(e=>e.item):n.value||[]).filter(e=>{let t=e.path.split(`.`).pop();return!t||y.some(e=>e.name===t&&e.value)})),S=g(()=>{let e={};for(let t of x.value){let n=`${t.path.split(`/`).slice(0,-1).join(`/`)}/`;e[n]||(e[n]=[]),e[n].push(t)}return Object.entries(e).sort(([e],[t])=>e.localeCompare(t))}),w=g(()=>{let e={path:`public`,children:[]},t=(e,n,r)=>{let[i,...a]=n,o=e.children.find(e=>e.path===i);o||(o={...r,path:i,children:[]},e.children.push(o)),a.length>1?t(o,a,r):a.length===1&&o.children.push({...r,path:a[0]})};return x.value.forEach(n=>{t(e,n.path.split(`/`).filter(e=>e!==``),n)}),e.children}),T=t(),{view:E}=I(`assets`);function D(){E.value=E.value===`list`?`grid`:`list`}N(`Escape`,()=>{T.value=void 0});let k=t();return(e,t)=>{let f=z,g=G,C=U,O=K,A=ue,j=Te,M=q,N=Q,P=$,F=W,I=i(`tooltip`);return o(),v(`div`,He,[b(O,{ref_key:`navbar`,ref:k,search:s.value,"onUpdate:search":t[1]||=e=>s.value=e,pb2:``},{actions:d(()=>[h(`div`,Ue,[p(b(f,{icon:`carbon:cloud-upload`,title:`File Upload`,border:!1,onClick:t[0]||=e=>a.value=!a.value},null,512),[[I,`File Upload`,void 0,{"bottom-end":!0}]]),r(y).length?(o(),m(C,{key:0,direction:`end`,n:`sm primary`},{trigger:d(({click:e})=>[p(b(f,{icon:`carbon-filter`,border:!1,title:`Filter`,p3:``,"text-lg":``,onClick:t=>e()},null,8,[`onClick`]),[[I,`Filter`,void 0,{"bottom-end":!0}]]),h(`span`,We,_(r(y).length),1)]),default:d(()=>[h(`div`,Ge,[(o(!0),v(u,null,c(r(y),e=>(o(),m(g,{key:e.name,modelValue:e.value,"onUpdate:modelValue":t=>e.value=t,flex:`~ gap-2`,rounded:``,px2:``,py2:``},{default:d(()=>[h(`span`,Ke,_(e.name),1)]),_:2},1032,[`modelValue`,`onUpdate:modelValue`]))),128))])]),_:1})):l(``,!0),p(b(f,{"text-lg":``,border:!1,icon:r(E)===`grid`?`i-carbon-list`:`i-carbon-grid`,title:`Toggle view`,onClick:D},null,8,[`icon`]),[[I,`Toggle View`,void 0,{"bottom-end":!0}]])])]),default:d(()=>[h(`div`,qe,[s.value?(o(),v(`span`,Je,_(x.value.length)+` matched · `,1)):l(``,!0),h(`span`,null,_(r(n)?.length)+` assets in total`,1)])]),_:1},8,[`search`]),b(A,{modelValue:a.value,"onUpdate:modelValue":t[2]||=e=>a.value=e,folder:`/`},null,8,[`modelValue`]),r(E)===`grid`?(o(),v(u,{key:0},[S.value.length>1?(o(!0),v(u,{key:0},c(S.value,([e,t])=>(o(),m(M,{key:e,text:e,description:`${t.length} items`,open:t.length<=r(50),padding:!1},{default:d(()=>[h(`div`,Ye,[(o(!0),v(u,null,c(t,t=>(o(),m(j,{key:t.path,asset:t,folder:e,onClick:e=>T.value=t},null,8,[`asset`,`folder`,`onClick`]))),128))])]),_:2},1032,[`text`,`description`,`open`]))),128)):(o(),v(`div`,Xe,[(o(!0),v(u,null,c(x.value,e=>(o(),m(j,{key:e.path,asset:e,onClick:t=>T.value=e},null,8,[`asset`,`onClick`]))),128))]))],64)):(o(),v(`div`,Ze,[(o(!0),v(u,null,c(w.value,(e,n)=>(o(),m(N,{key:n,modelValue:T.value,"onUpdate:modelValue":t[3]||=e=>T.value=e,item:e},null,8,[`modelValue`,`item`]))),128))])),b(F,{"model-value":!!T.value,"auto-close":``,"w-120":``,top:k.value,onClose:t[5]||=e=>T.value=void 0},{default:d(()=>[T.value?(o(),m(P,{key:0,modelValue:T.value,"onUpdate:modelValue":t[4]||=e=>T.value=e},null,8,[`modelValue`])):l(``,!0)]),_:1},8,[`model-value`,`top`])])}}});export{Qe as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{X as e}from"./vendor/json-editor-vue-go859b33.js";import{t}from"./_plugin-vue_export-helper-cxcynmu7.js";var n={};function r(t,n){return e(t.$slots,`default`)}var i=Object.assign(t(n,[[`render`,r]]),{__name:`AuthRequiredPanel`});export{i as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"id":"
|
|
1
|
+
{"id":"c4431537-3cdf-4a17-8364-5d3d90841be5","timestamp":1775609729297}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"id":"c4431537-3cdf-4a17-8364-5d3d90841be5","timestamp":1775609729297,"prerendered":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Et as e,jt as t}from"./vendor/json-editor-vue-
|
|
1
|
+
import{Et as e,jt as t}from"./vendor/json-editor-vue-go859b33.js";var n,r=[];function i(e){if(r.push(e),!(typeof window>`u`))return window.__NUXT_DEVTOOLS__&&r.forEach(e=>e(window.__NUXT_DEVTOOLS__)),Object.defineProperty(window,`__NUXT_DEVTOOLS__`,{set(e){e&&r.forEach(t=>t(e))},get(){return n.value},configurable:!0}),()=>{r.splice(r.indexOf(e),1)}}function a(){n||(n=e(),i(a));function r(){n&&t(n)}function a(e){n.value=e,e.host&&e.host.hooks.hook(`host:update:reactivity`,r)}return n}var o=a();export{o as t};
|