@nuxt/devtools 4.0.0-alpha.6 → 4.0.0-alpha.8
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 +32 -0
- package/dist/chunks/module-main.mjs +611 -303
- package/dist/chunks/timeline.mjs +2 -2
- package/dist/chunks/vite-inspect.mjs +75 -39
- package/dist/chunks/vscode.mjs +6 -7
- package/dist/client/200.html +1 -1
- package/dist/client/404.html +1 -1
- package/dist/client/_nuxt/__blank-mr7fdmv7.js +1 -0
- package/dist/client/_nuxt/analyze-build-nemej5kd.js +1 -0
- package/dist/client/_nuxt/assets-cl372mus.js +6 -0
- package/dist/client/_nuxt/{auth-required-panel-gwrodxrm.js → auth-required-panel-gdnspumn.js} +1 -1
- package/dist/client/_nuxt/builds/latest.json +1 -1
- package/dist/client/_nuxt/builds/meta/9ec1ff21-8126-4e86-bc50-039a1d3867c9.json +1 -0
- package/dist/client/_nuxt/{client-jwk7bkap.js → client-ngo84kjy.js} +1 -1
- package/dist/client/_nuxt/{code-diff-d1bf4mlz.js → code-diff-lkyoam09.js} +3 -3
- package/dist/client/_nuxt/code-snippets-hxwvpad4.js +1 -0
- package/dist/client/_nuxt/components-f9ckplr6.js +1 -0
- package/dist/client/_nuxt/composable-item-kchrxdzu.js +1 -0
- package/dist/client/_nuxt/composables-in7qtp0e.js +1 -0
- package/dist/client/_nuxt/custom-_name_-i8pdh231.js +1 -0
- package/dist/client/_nuxt/data-schema-button-jy2w2afg.js +1 -0
- package/dist/client/_nuxt/{data-schema-drawer-5ccj6aug.js → data-schema-drawer-liuhj385.js} +2 -2
- package/dist/client/_nuxt/debug-inf9k7rz.js +1 -0
- package/dist/client/_nuxt/{default-ibmlv6hu.js → default-dgqm22gk.js} +1 -1
- package/dist/client/_nuxt/dist-cwkxp5t4.js +1 -0
- package/dist/client/_nuxt/dist-das2ggjj.js +1 -0
- package/dist/client/_nuxt/dist-hhnji3pn.js +1 -0
- package/dist/client/_nuxt/{duration-display-cfe3xsok.js → duration-display-m84jv0cg.js} +1 -1
- package/dist/client/_nuxt/entry.css-ivisc4pv.css +1 -0
- package/dist/client/_nuxt/error-404-eoz73pl9.js +1 -0
- package/dist/client/_nuxt/error-404.css-i7pin5fo.css +1 -0
- package/dist/client/_nuxt/error-500-h0agvsjp.js +1 -0
- package/dist/client/_nuxt/error-500.css-4ikva5xr.css +1 -0
- package/dist/client/_nuxt/error-h5jfp4d9.js +9 -0
- package/dist/client/_nuxt/{filepath-item-calgslzq.js → filepath-item-b7ye3und.js} +1 -1
- package/dist/client/_nuxt/full-bc145h1r.js +1 -0
- package/dist/client/_nuxt/{help-fab-ietvwhig.js → help-fab-l6k9jkcj.js} +1 -1
- package/dist/client/_nuxt/hooks-ce5n3mpx.js +1 -0
- package/dist/client/_nuxt/iefeupks.js +4 -0
- package/dist/client/_nuxt/imports-ib3kw7ns.js +1 -0
- package/dist/client/_nuxt/launch-page-f3nbtoc4.js +1 -0
- package/dist/client/_nuxt/modules-gf4tkhai.js +1 -0
- package/dist/client/_nuxt/nbadge-254fd0s4.js +1 -0
- package/dist/client/_nuxt/{ncheckbox-gl62y715.js → ncheckbox-jr3c6e4e.js} +1 -1
- package/dist/client/_nuxt/ncode-block-jv3jk7c5.js +2 -0
- package/dist/client/_nuxt/{ndrawer-evv584t1.js → ndrawer-myfvks89.js} +1 -1
- package/dist/client/_nuxt/{ndropdown-dqqc8bnq.js → ndropdown-jnrvla1s.js} +1 -1
- package/dist/client/_nuxt/{nicon-title-f3ho3hah.js → nicon-title-66kg2f9l.js} +1 -1
- package/dist/client/_nuxt/{nlink-endeyoly.js → nlink-gej31v24.js} +1 -1
- package/dist/client/_nuxt/{nmarkdown-iw4stzqp.js → nmarkdown-nskcr8pg.js} +1 -1
- package/dist/client/_nuxt/{nnavbar-n8fcnalx.js → nnavbar-bvq6rk5u.js} +1 -1
- package/dist/client/_nuxt/none-fcxnfo1z.js +1 -0
- package/dist/client/_nuxt/{nsection-block-n5u7wj9x.js → nsection-block-illvvuef.js} +1 -1
- package/dist/client/_nuxt/{nselect-kdzalcm2.js → nselect-hlo7a40m.js} +1 -1
- package/dist/client/_nuxt/nselect-tabs-f47fcdsg.js +1 -0
- package/dist/client/_nuxt/nswitch-iey7gi9t.js +1 -0
- package/dist/client/_nuxt/{ntip-m8x8y44j.js → ntip-kpuxzuo5.js} +1 -1
- package/dist/client/_nuxt/nuxt-hqfu72u1.js +2 -0
- package/dist/client/_nuxt/open-graph-m35euip2.js +3 -0
- package/dist/client/_nuxt/overview-egkv3tit.js +1 -0
- package/dist/client/_nuxt/pages-ddqyzugj.js +1 -0
- package/dist/client/_nuxt/pages-n0i7aw4m.js +1 -0
- package/dist/client/_nuxt/payload-d6h8l8l2.js +1 -0
- package/dist/client/_nuxt/pinia-dl2li4zl.js +1 -0
- package/dist/client/_nuxt/plugins-nhvbpqrg.js +1 -0
- package/dist/client/_nuxt/ready-if1s6ugr.js +1 -0
- package/dist/client/_nuxt/render-tree-h0xpx3p4.js +1 -0
- package/dist/client/_nuxt/rpc-jaaujnev.js +1 -0
- package/dist/client/_nuxt/runtime-configs-o91gwu2q.js +1 -0
- package/dist/client/_nuxt/server-route-inputs-ej6h9rh8.js +1 -0
- package/dist/client/_nuxt/server-routes-ocltmxje.js +7 -0
- package/dist/client/_nuxt/server-tasks-hhkstkby.js +1 -0
- package/dist/client/_nuxt/settings-i2ld0c8q.js +1 -0
- package/dist/client/_nuxt/stacktrace-list-epxhdumx.js +1 -0
- package/dist/client/_nuxt/{state-components-eaw2evd3.js → state-components-eipbhsbn.js} +1 -1
- package/dist/client/_nuxt/{state-editor-jm35t8p1.js → state-editor-ogobz58w.js} +1 -1
- package/dist/client/_nuxt/state-modules-egymhwqw.js +1 -0
- package/dist/client/_nuxt/storage-cciny388.js +1 -0
- package/dist/client/_nuxt/storage-options-g42elkwy.js +1 -0
- package/dist/client/_nuxt/timeline-oese6i7t.js +31 -0
- package/dist/client/_nuxt/{unocss-runtime-mcb0a6oh.js → unocss-runtime-dh4insrr.js} +1 -1
- package/dist/client/_nuxt/utils-h3uzf8s7.js +2 -0
- package/dist/client/_nuxt/vendor/json-editor-vue-c7zwcfg4.js +3861 -0
- package/dist/client/_nuxt/vendor/{markdown-it-gg8o3tmh.js → markdown-it-cx0uvu2o.js} +1 -1
- package/dist/client/_nuxt/vendor/{quicktype-core-ozubcbyl.js → quicktype-core-otmjigaj.js} +65 -65
- package/dist/client/_nuxt/vendor/shiki-mgsi4s2l.js +153 -0
- package/dist/client/_nuxt/vendor/unocss-maavuy8p.js +3 -0
- package/dist/client/_nuxt/virtual-files-pd2s0ff2.js +1 -0
- package/dist/client/_nuxt/vue-devtools-bxffe3ae.js +4 -0
- package/dist/client/_nuxt/vue-router-mro49nyg.js +1 -0
- package/dist/client/index.html +1 -1
- package/dist/module.json +1 -1
- package/dist/module.mjs +1 -1
- package/dist/runtime/plugins/view/client.js +15 -0
- package/dist/shared/devtools.B9TxdMuu.mjs +119 -0
- package/dist/types.d.mts +1 -5
- package/dist/webcomponents/index.mjs +1 -1
- package/package.json +45 -49
- package/.discoveryrc.cjs +0 -13
- package/dist/client/_nuxt/__blank-ekrx7eve.js +0 -1
- package/dist/client/_nuxt/analyze-build-gtjxxh9s.js +0 -1
- package/dist/client/_nuxt/assets-fxuoynew.js +0 -6
- package/dist/client/_nuxt/builds/meta/386e78c8-3698-49a8-a7c5-53c44542b939.json +0 -1
- package/dist/client/_nuxt/code-snippets-nodldh90.js +0 -1
- package/dist/client/_nuxt/components-ibu6c1zd.js +0 -1
- package/dist/client/_nuxt/composable-item-lb3qexrh.js +0 -1
- package/dist/client/_nuxt/custom-_name_-dt22ybu3.js +0 -1
- package/dist/client/_nuxt/data-schema-button-m4wb470q.js +0 -1
- package/dist/client/_nuxt/debug-nxl66qh3.js +0 -1
- package/dist/client/_nuxt/dist-nsuzcp77.js +0 -1
- package/dist/client/_nuxt/entry.css-m21ytcnz.css +0 -1
- package/dist/client/_nuxt/error-404-izmgsqlm.js +0 -1
- package/dist/client/_nuxt/error-404.css-l9jcssuy.css +0 -1
- package/dist/client/_nuxt/error-500-fejd4grh.js +0 -1
- package/dist/client/_nuxt/error-500.css-he4ew8b1.css +0 -1
- package/dist/client/_nuxt/error-mm873c55.js +0 -9
- package/dist/client/_nuxt/full-pesi6bu3.js +0 -1
- package/dist/client/_nuxt/h0fobd1u.js +0 -4
- package/dist/client/_nuxt/hooks-mqgelnks.js +0 -1
- package/dist/client/_nuxt/imports-bofdhcsr.js +0 -1
- package/dist/client/_nuxt/launch-page-i8mgxym7.js +0 -1
- package/dist/client/_nuxt/modules-b6uha2ss.js +0 -1
- package/dist/client/_nuxt/nbadge-ft1i3ddy.js +0 -1
- package/dist/client/_nuxt/ncode-block-ksrq5ppu.js +0 -2
- package/dist/client/_nuxt/none-gr24yqiq.js +0 -1
- package/dist/client/_nuxt/nselect-tabs-e440xayq.js +0 -1
- package/dist/client/_nuxt/nswitch-pdw73751.js +0 -1
- package/dist/client/_nuxt/nuxt-kphganvs.js +0 -1
- package/dist/client/_nuxt/open-graph-mtq8qyx5.js +0 -3
- package/dist/client/_nuxt/overview-mgkokpl9.js +0 -1
- package/dist/client/_nuxt/pages-g3tcvbsn.js +0 -1
- package/dist/client/_nuxt/pages-lk0hxlsc.js +0 -1
- package/dist/client/_nuxt/payload-ovd8emqe.js +0 -1
- package/dist/client/_nuxt/pinia-e6em75yg.js +0 -1
- package/dist/client/_nuxt/plugins-ojph2z4c.js +0 -1
- package/dist/client/_nuxt/ready-b5u27bv4.js +0 -1
- package/dist/client/_nuxt/render-tree-iwtso0n9.js +0 -1
- package/dist/client/_nuxt/rpc-ewzip6fb.js +0 -4
- package/dist/client/_nuxt/runtime-configs-gyhmrfcz.js +0 -1
- package/dist/client/_nuxt/server-discovery-cfu428ir.js +0 -1
- package/dist/client/_nuxt/server-route-inputs-hhxdu10p.js +0 -1
- package/dist/client/_nuxt/server-routes-efc7olve.js +0 -7
- package/dist/client/_nuxt/server-tasks-o59rfww6.js +0 -1
- package/dist/client/_nuxt/settings-c6tbo50r.js +0 -1
- package/dist/client/_nuxt/stacktrace-list-c5b46nul.js +0 -1
- package/dist/client/_nuxt/state-modules-oox7nhib.js +0 -1
- package/dist/client/_nuxt/storage-fdd2zc94.js +0 -1
- package/dist/client/_nuxt/storage-options-ho965h55.js +0 -1
- package/dist/client/_nuxt/terminals-b8awmi75.js +0 -1
- package/dist/client/_nuxt/terminals.css-mejv43xm.css +0 -1
- package/dist/client/_nuxt/timeline-nsh72kov.js +0 -31
- package/dist/client/_nuxt/utils-hgmynvjd.js +0 -2
- package/dist/client/_nuxt/vendor/json-editor-vue-mkw4apmc.js +0 -3869
- package/dist/client/_nuxt/vendor/shiki-c7z35hpo.js +0 -293
- package/dist/client/_nuxt/vendor/unocss-mfjt4fak.js +0 -3
- package/dist/client/_nuxt/vendor/xterm-eb5atty5.js +0 -36
- package/dist/client/_nuxt/vendor/xterm.css-j9zpjwmg.css +0 -1
- package/dist/client/_nuxt/virtual-files-met9zkti.js +0 -1
- package/dist/client/_nuxt/vue-devtools-bl144b70.js +0 -4
- package/dist/client/_nuxt/vue-router-cnnrtyb0.js +0 -1
- package/dist/client/discovery/index.html +0 -611
- package/dist/shared/devtools.nEotcg1R.mjs +0 -113
package/dist/chunks/timeline.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { resolve } from 'pathe';
|
|
2
|
-
import
|
|
2
|
+
import { isGreaterOrEqual } from 'verkit';
|
|
3
3
|
import { runtimeDir } from '../dirs.mjs';
|
|
4
4
|
import 'node:path';
|
|
5
5
|
import 'node:url';
|
|
@@ -30,7 +30,7 @@ function setup({ nuxt, options }) {
|
|
|
30
30
|
}
|
|
31
31
|
nuxt.hook("imports:context", (unimport) => {
|
|
32
32
|
const ctx = unimport.getInternalContext();
|
|
33
|
-
if (!ctx.version || !
|
|
33
|
+
if (!ctx.version || !isGreaterOrEqual(ctx.version, "3.1.0"))
|
|
34
34
|
throw new Error(`[Nuxt DevTools] The timeline feature requires \`unimport\` >= v3.1.0, but got \`${ctx.version || "(unknown)"}\`. Please upgrade using \`nuxi upgrade --force\`.`);
|
|
35
35
|
ctx.addons.push(
|
|
36
36
|
{
|
|
@@ -1,52 +1,88 @@
|
|
|
1
|
+
import { onDevtoolsReady } from '@nuxt/devtools-kit';
|
|
1
2
|
import { addVitePlugin, logger } from '@nuxt/kit';
|
|
3
|
+
import { R as RPC_NAMESPACE } from './module-main.mjs';
|
|
4
|
+
import 'node:fs';
|
|
5
|
+
import 'node:fs/promises';
|
|
6
|
+
import 'node:os';
|
|
7
|
+
import 'consola/utils';
|
|
8
|
+
import 'pathe';
|
|
9
|
+
import 'sirv';
|
|
10
|
+
import 'vite';
|
|
11
|
+
import '../shared/devtools.B9TxdMuu.mjs';
|
|
12
|
+
import '../dirs.mjs';
|
|
13
|
+
import 'node:path';
|
|
14
|
+
import 'node:url';
|
|
15
|
+
import '@devframes/plugin-data-inspector';
|
|
16
|
+
import '@vitejs/devtools-kit/node';
|
|
17
|
+
import 'tinyexec';
|
|
18
|
+
import 'tinyglobby';
|
|
19
|
+
import 'image-meta';
|
|
20
|
+
import 'perfect-debounce';
|
|
21
|
+
import 'destr';
|
|
22
|
+
import '../../dist/runtime/shared/hooks.js';
|
|
23
|
+
import 'ohash';
|
|
24
|
+
import 'node:process';
|
|
25
|
+
import 'node:module';
|
|
26
|
+
import 'pkg-types';
|
|
27
|
+
import 'node:assert';
|
|
28
|
+
import 'node:v8';
|
|
29
|
+
import 'node:util';
|
|
30
|
+
import 'local-pkg';
|
|
31
|
+
import 'magicast';
|
|
32
|
+
import 'magicast/helpers';
|
|
33
|
+
import 'verkit';
|
|
34
|
+
import '@vitejs/devtools-kit/constants';
|
|
35
|
+
import 'unstorage';
|
|
2
36
|
|
|
3
37
|
const VERSION_QUERY_RE = /\?v=\w+$/;
|
|
4
38
|
const VUE_EXT_RE = /\.vue($|\?v=)/;
|
|
5
39
|
async function createVitePluginInspect(options) {
|
|
6
40
|
return await import('vite-plugin-inspect').then((r) => r.default(options));
|
|
7
41
|
}
|
|
8
|
-
async function setup(
|
|
42
|
+
async function setup(ctx) {
|
|
9
43
|
const plugin = await createVitePluginInspect();
|
|
10
44
|
addVitePlugin(plugin);
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
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", {
|
|
18
|
-
vite: meta.instances[0].vite,
|
|
19
|
-
env: meta.instances[0].environments[0]
|
|
20
|
-
}) : null) || [];
|
|
21
|
-
const components = await rpc.functions.getComponents() || [];
|
|
22
|
-
const vueModules = modules.filter((m) => {
|
|
23
|
-
const plainId = m.id.replace(VERSION_QUERY_RE, "");
|
|
24
|
-
if (components.some((c) => c.filePath === plainId))
|
|
25
|
-
return true;
|
|
26
|
-
return m.id.match(VUE_EXT_RE);
|
|
27
|
-
});
|
|
28
|
-
const graph = vueModules.map((i) => {
|
|
29
|
-
function searchForVueDeps(id, seen = /* @__PURE__ */ new Set()) {
|
|
30
|
-
if (seen.has(id))
|
|
31
|
-
return [];
|
|
32
|
-
seen.add(id);
|
|
33
|
-
const module = modules.find((m) => m.id === id);
|
|
34
|
-
if (!module)
|
|
35
|
-
return [];
|
|
36
|
-
return module.deps.flatMap((i2) => {
|
|
37
|
-
if (vueModules.some((m) => m.id === i2))
|
|
38
|
-
return [i2];
|
|
39
|
-
return searchForVueDeps(i2, seen);
|
|
40
|
-
});
|
|
45
|
+
onDevtoolsReady((kit) => {
|
|
46
|
+
async function getComponentsRelationships() {
|
|
47
|
+
if (!kit.rpc.has("vite-plugin-inspect:get-metadata")) {
|
|
48
|
+
logger.warn("[nuxt-devtools] vite-plugin-inspect RPC functions not registered, component relationships unavailable");
|
|
49
|
+
return [];
|
|
41
50
|
}
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
51
|
+
const meta = await kit.rpc.invokeLocal("vite-plugin-inspect:get-metadata");
|
|
52
|
+
const modules = (meta && meta.instances[0] ? await kit.rpc.invokeLocal("vite-plugin-inspect:get-modules-list", {
|
|
53
|
+
vite: meta.instances[0].vite,
|
|
54
|
+
env: meta.instances[0].environments[0]
|
|
55
|
+
}) : null) || [];
|
|
56
|
+
const components = await kit.rpc.invokeLocal(`${RPC_NAMESPACE}:getComponents`) || [];
|
|
57
|
+
const vueModules = modules.filter((m) => {
|
|
58
|
+
const plainId = m.id.replace(VERSION_QUERY_RE, "");
|
|
59
|
+
if (components.some((c) => c.filePath === plainId))
|
|
60
|
+
return true;
|
|
61
|
+
return m.id.match(VUE_EXT_RE);
|
|
62
|
+
});
|
|
63
|
+
const graph = vueModules.map((i) => {
|
|
64
|
+
function searchForVueDeps(id, seen = /* @__PURE__ */ new Set()) {
|
|
65
|
+
if (seen.has(id))
|
|
66
|
+
return [];
|
|
67
|
+
seen.add(id);
|
|
68
|
+
const module = modules.find((m) => m.id === id);
|
|
69
|
+
if (!module)
|
|
70
|
+
return [];
|
|
71
|
+
return module.deps.flatMap((i2) => {
|
|
72
|
+
if (vueModules.some((m) => m.id === i2))
|
|
73
|
+
return [i2];
|
|
74
|
+
return searchForVueDeps(i2, seen);
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
return {
|
|
78
|
+
id: i.id,
|
|
79
|
+
deps: searchForVueDeps(i.id)
|
|
80
|
+
};
|
|
81
|
+
});
|
|
82
|
+
return graph;
|
|
83
|
+
}
|
|
84
|
+
kit.rpc.register({ name: `${RPC_NAMESPACE}:getComponentsRelationships`, handler: getComponentsRelationships }, true);
|
|
85
|
+
}, ctx.nuxt);
|
|
50
86
|
}
|
|
51
87
|
|
|
52
88
|
export { createVitePluginInspect, setup };
|
package/dist/chunks/vscode.mjs
CHANGED
|
@@ -2,7 +2,6 @@ import { existsSync } from 'node:fs';
|
|
|
2
2
|
import fs from 'node:fs/promises';
|
|
3
3
|
import { hostname } from 'node:os';
|
|
4
4
|
import { resolve } from 'node:path';
|
|
5
|
-
import { startSubprocess } from '@nuxt/devtools-kit';
|
|
6
5
|
import { logger } from '@nuxt/kit';
|
|
7
6
|
import { checkPort, getPort } from 'get-port-please';
|
|
8
7
|
import { x } from 'tinyexec';
|
|
@@ -31,7 +30,8 @@ const codeBinaryOptions = {
|
|
|
31
30
|
connectionTokenArg: ""
|
|
32
31
|
}
|
|
33
32
|
};
|
|
34
|
-
async function setup(
|
|
33
|
+
async function setup(ctx) {
|
|
34
|
+
const { nuxt, options, openInEditorHooks } = ctx;
|
|
35
35
|
const vsOptions = options?.vscode || {};
|
|
36
36
|
const codeServer = vsOptions?.codeServer || "ms-code-server";
|
|
37
37
|
const { codeBinary, launchArg, licenseTermsArg, connectionTokenArg } = codeBinaryOptions[codeServer];
|
|
@@ -52,7 +52,7 @@ async function setup({ nuxt, options, openInEditorHooks, rpc }) {
|
|
|
52
52
|
const { port: port2 } = JSON.parse(await fs.readFile(vscodeServerControllerFile, "utf-8"));
|
|
53
53
|
const url2 = `http://localhost:${port2}/open?path=${encodeURIComponent(`${root}/${file}`)}`;
|
|
54
54
|
await fetch(url2);
|
|
55
|
-
rpc.broadcast
|
|
55
|
+
ctx.devtoolsKit?.rpc.broadcast({ method: "navigateTo", args: ["/modules/custom-builtin-vscode"], event: true });
|
|
56
56
|
return true;
|
|
57
57
|
} catch (e) {
|
|
58
58
|
console.debug(`Failed to open file "${file}" in VS Code Server`);
|
|
@@ -76,7 +76,7 @@ async function setup({ nuxt, options, openInEditorHooks, rpc }) {
|
|
|
76
76
|
"--install-extension",
|
|
77
77
|
"antfu.vscode-server-controller"
|
|
78
78
|
], { nodeOptions: { stdio: ["pipe", "ignore", "inherit"] } });
|
|
79
|
-
|
|
79
|
+
await ctx.devtoolsKit?.terminals.startChildProcess(
|
|
80
80
|
{
|
|
81
81
|
command: codeBinary,
|
|
82
82
|
args: [
|
|
@@ -89,10 +89,9 @@ async function setup({ nuxt, options, openInEditorHooks, rpc }) {
|
|
|
89
89
|
},
|
|
90
90
|
{
|
|
91
91
|
id: "devtools:vscode",
|
|
92
|
-
|
|
92
|
+
title: "VS Code Server",
|
|
93
93
|
icon: "logos-visual-studio-code"
|
|
94
|
-
}
|
|
95
|
-
nuxt
|
|
94
|
+
}
|
|
96
95
|
);
|
|
97
96
|
for (let i = 0; i < 100; i++) {
|
|
98
97
|
if (await fetch(url).then((r) => r.ok).catch(() => false))
|
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/iefeupks.js"}}</script><link rel="stylesheet" href="/__NUXT_DEVTOOLS_BASE__/_nuxt/entry.css-ivisc4pv.css" crossorigin><link rel="stylesheet" href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/json-editor-vue.css-lb1ewor6.css" crossorigin><link rel="stylesheet" href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/unocss.css-flyrgbwp.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/iefeupks.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/_plugin-vue_export-helper-d9irwgla.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/json-editor-vue-c7zwcfg4.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/rolldown-runtime-imbltlrc.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/utils-h3uzf8s7.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/shiki-mgsi4s2l.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/rpc-jaaujnev.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/ready-if1s6ugr.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/dist-cwkxp5t4.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/nuxt-hqfu72u1.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vue-router-mro49nyg.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/dist-hhnji3pn.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/unocss-maavuy8p.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/composables-in7qtp0e.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/storage-options-g42elkwy.js"><script type="module" src="/__NUXT_DEVTOOLS_BASE__/_nuxt/iefeupks.js" crossorigin></script><link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/markdown-it-cx0uvu2o.js"><link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/default-dgqm22gk.js"><link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/full-bc145h1r.js"><link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/none-fcxnfo1z.js"><link rel="prefetch" as="style" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/ncode-block.css-ivoxtfjk.css"><link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/data-schema-drawer-liuhj385.js"><link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/quicktype-core-otmjigaj.js"><link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/ncode-block-jv3jk7c5.js"><link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/client-ngo84kjy.js"><link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/ndrawer-myfvks89.js"><link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/ndropdown-jnrvla1s.js"><link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/nselect-hlo7a40m.js"><link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/nswitch-iey7gi9t.js"><link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/unocss-runtime-dh4insrr.js"><link rel="prefetch" as="style" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/error-500.css-4ikva5xr.css"><link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/error-500-h0agvsjp.js"></head><body><div id="__nuxt"></div><div id="teleports"></div><script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__NUXT_DEVTOOLS_BASE__/",buildId:"9ec1ff21-8126-4e86-bc50-039a1d3867c9",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1784773586677,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/iefeupks.js"}}</script><link rel="stylesheet" href="/__NUXT_DEVTOOLS_BASE__/_nuxt/entry.css-ivisc4pv.css" crossorigin><link rel="stylesheet" href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/json-editor-vue.css-lb1ewor6.css" crossorigin><link rel="stylesheet" href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/unocss.css-flyrgbwp.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/iefeupks.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/_plugin-vue_export-helper-d9irwgla.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/json-editor-vue-c7zwcfg4.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/rolldown-runtime-imbltlrc.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/utils-h3uzf8s7.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/shiki-mgsi4s2l.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/rpc-jaaujnev.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/ready-if1s6ugr.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/dist-cwkxp5t4.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/nuxt-hqfu72u1.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vue-router-mro49nyg.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/dist-hhnji3pn.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/unocss-maavuy8p.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/composables-in7qtp0e.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/storage-options-g42elkwy.js"><script type="module" src="/__NUXT_DEVTOOLS_BASE__/_nuxt/iefeupks.js" crossorigin></script><link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/markdown-it-cx0uvu2o.js"><link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/default-dgqm22gk.js"><link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/full-bc145h1r.js"><link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/none-fcxnfo1z.js"><link rel="prefetch" as="style" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/ncode-block.css-ivoxtfjk.css"><link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/data-schema-drawer-liuhj385.js"><link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/quicktype-core-otmjigaj.js"><link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/ncode-block-jv3jk7c5.js"><link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/client-ngo84kjy.js"><link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/ndrawer-myfvks89.js"><link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/ndropdown-jnrvla1s.js"><link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/nselect-hlo7a40m.js"><link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/nswitch-iey7gi9t.js"><link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/unocss-runtime-dh4insrr.js"><link rel="prefetch" as="style" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/error-500.css-4ikva5xr.css"><link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/error-500-h0agvsjp.js"></head><body><div id="__nuxt"></div><div id="teleports"></div><script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__NUXT_DEVTOOLS_BASE__/",buildId:"9ec1ff21-8126-4e86-bc50-039a1d3867c9",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1784773586681,false]</script></body></html>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{T as e,W as t,_ as n}from"./vendor/json-editor-vue-c7zwcfg4.js";import{t as r}from"./composables-ioamscf4.js";var i={"h-screen":``,"w-screen":``,"bg-black":``},a=e({__name:`__blank`,setup(e){return r({layout:`none`}),(e,r)=>(t(),n(`div`,i))}});export{a as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e}from"./nuxt-hqfu72u1.js";import{C as t,S as n,St as r,T as i,W as a,Y as o,Zt as s,_ as c,dt as l,en as u,g as d,h as f,jt as p,m,p as h,s as g,ut as _}from"./vendor/json-editor-vue-c7zwcfg4.js";import{I as v}from"./ready-if1s6ugr.js";import{g as y,h as b}from"./utils-h3uzf8s7.js";import{a as x,h as S,m as C}from"./rpc-jaaujnev.js";import{t as w}from"./_plugin-vue_export-helper-d9irwgla.js";import{H as T,O as E,S as D,_ as O,f as k,m as A,p as j,u as M}from"#entry";import{t as N}from"./ncode-block-jv3jk7c5.js";import{t as P}from"./composables-ioamscf4.js";import{t as F}from"./ncheckbox-jr3c6e4e.js";import{t as I}from"./filepath-item-b7ye3und.js";import{t as L}from"./ntip-kpuxzuo5.js";import{t as R}from"./help-fab-l6k9jkcj.js";var z={"h-full":``,grid:`~ rows-[max-content_1fr]`},B={flex:`~ wrap`,"w-full":``},V=[`onClick`],H={key:0,flex:`~ col gap-4 items-center justify-center`,p4:``},U={grid:`~ cols-[30px_1fr] gap-x-2 gap-y-3 items-center justify-center`,"w-100":``},W=`/__nuxt_devtools__/client`,G=Object.assign(i({__name:`BuildAnalyzeDetails`,props:{current:{},prev:{}},setup(i){let f=i,y=`${e().app.baseURL.replace(W,`/`)}/__nuxt_devtools__/analyze/`.replace(/\/+/g,`/`),b=h(()=>{let e=[{name:`Overview`,id:`overview`}];return f.current.features.bundleClient&&e.push({name:`Client Bundle`,id:`bundle-client`}),f.current.features.bundleNitro&&e.push({name:`Nitro Bundle`,id:`bundle-nitro`}),f.current.features.viteInspect&&e.push({name:`Vite Inspect`,id:`vite-inspect`}),e}),C=r(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 x.clearAnalyzeBuilds([e])}return(e,r)=>{let f=I,h=E;return a(),c(`div`,z,[m(`div`,B,[(a(!0),c(g,null,o(b.value,(e,t)=>(a(),c(`button`,{key:t,px4:``,py2:``,border:`r base`,hover:`bg-active`,class:s(e.id===C.value?.id?``:`border-b`),onClick:t=>C.value=e},[m(`div`,{class:s(e.id===C.value?.id?``:`op30`)},u(e.name),3)],10,V))),128)),r[1]||=m(`div`,{border:`b base`,"flex-auto":``},null,-1)]),C.value?.id===`overview`?(a(),c(`div`,H,[r[15]||=m(`div`,{"flex-auto":``},null,-1),m(`div`,U,[r[10]||=m(`div`,{"i-carbon-commit":``,"text-xl":``},null,-1),m(`div`,null,[r[2]||=m(`div`,{"text-sm":``,op50:``},` Name `,-1),m(`div`,null,u(i.current.name),1)]),r[11]||=m(`div`,{"i-carbon-time":``,"text-xl":``},null,-1),m(`div`,null,[r[3]||=m(`div`,{"text-sm":``,op50:``},` Build duration `,-1),m(`div`,null,u(w(i.current)),1)]),i.current.size?.clientBundle?(a(),c(g,{key:0},[r[5]||=m(`div`,{"i-carbon-cics-program":``,"text-xl":``},null,-1),m(`div`,null,[r[4]||=m(`div`,{"text-sm":``,op50:``},` Client bundle size `,-1),m(`div`,null,u(T(i.current.size.clientBundle)),1)])],64)):d(``,!0),i.current.size?.nitroBundle?(a(),c(g,{key:1},[r[7]||=m(`div`,{"i-carbon-bare-metal-server":``,"text-xl":``},null,-1),m(`div`,null,[r[6]||=m(`div`,{"text-sm":``,op50:``},` Nitro bundle size `,-1),m(`div`,null,u(T(i.current.size.nitroBundle)),1)])],64)):d(``,!0),r[12]||=m(`div`,{"i-carbon-edge-node":``,"text-xl":``},null,-1),m(`div`,null,[r[8]||=m(`div`,{"text-sm":``,op50:``},` Built `,-1),m(`div`,null,u(p(S)(new Date(i.current.endTime))),1)]),r[13]||=m(`div`,{"i-carbon:folder-parent":``,"text-xl":``},null,-1),m(`div`,null,[r[9]||=m(`div`,{"text-sm":``,op50:``},` Report Path `,-1),t(f,{filepath:i.current.analyzeDir},null,8,[`filepath`])])]),r[16]||=m(`div`,{"flex-auto":``},null,-1),t(h,{n:`rose`,icon:`carbon-delete`,onClick:r[0]||=e=>D(i.current.name)},{default:_(()=>[...r[14]||=[n(` Delete this report `,-1)]]),_:1})])):d(``,!0),r._lazyshow1||C.value?.id===`bundle-client`?(r._lazyshow1=!0,a(),c(g,null,[l(m(`iframe`,{src:`${p(y)}${i.current.slug}/client.html`,"h-full":``,"w-full":``},null,8,[`src`]),[[v,C.value?.id===`bundle-client`]])],64)):d(`v-show-if`,!0),r._lazyshow2||C.value?.id===`bundle-nitro`?(r._lazyshow2=!0,a(),c(g,null,[l(m(`iframe`,{src:`${p(y)}${i.current.slug}/nitro.html`,"h-full":``,"w-full":``},null,8,[`src`]),[[v,C.value?.id===`bundle-nitro`]])],64)):d(`v-show-if`,!0),r._lazyshow3||C.value?.id===`vite-inspect`?(r._lazyshow3=!0,a(),c(g,null,[l(m(`iframe`,{src:`${p(y)}${i.current.slug}/.vite-inspect/`,"h-full":``,"w-full":``},null,8,[`src`]),[[v,C.value?.id===`vite-inspect`]])],64)):d(`v-show-if`,!0)])}}}),{__name:`BuildAnalyzeDetails`}),K={},q={class:`markdown-body`};function J(e,t){return a(),c(`div`,q,[...t[0]||=[m(`template`,null,[m(`div`,{class:`markdown-body`},[m(`h1`,null,`Build Analyze`),m(`p`,null,[n(`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 `),m(`code`,{"v-pre":``},`nuxt build --analyze`),n(` and present the output data directly in DevTools for easy browsing and comparing.`)])])],-1)]])}var Y=w(K,[[`render`,J]]),X={flex:`~ col`},Z=[`onClick`],Q={flex:`~ gap-1 items-center wrap`,"w-full":``,"text-sm":``,op60:``},$={flex:`~ items-center justify-center wrap`,p4:``},ee={flex:`~ col gap-1`,"w-250":``,p4:``},te={flex:`~ gap-3`,mt2:``,"justify-end":``},ne=i({__name:`analyze-build`,setup(e){P({icon:`carbon-edge-node`,title:`Build Analyze`,layout:`full`,category:`analyze`,show(){return T(`^3.5.0`)}});let i=C(),l=y(),v=b(`analyze-build:slug`,``),w=h(()=>l.value?.builds.find(e=>e.slug===v.value)??l.value?.builds[0]),I=r(!1),z=r(``),B=h(()=>l.value?.builds.some(e=>e.name===z.value.trim()));async function V(){if(z.value=await x.generateAnalyzeBuildName(),!await i.start())return;D(`analyze-build:start`);let e=await x.startAnalyzeBuild(z.value);I.value&&x.revealTerminal(e)}function H(e){return`${((e.endTime-e.startTime)/1e3).toFixed(1)}s`}function U(){l.value?.activeSessionId&&x.revealTerminal(l.value.activeSessionId)}return M(()=>[{id:`action:analyze-build: start`,title:`Start a new analyze build`,icon:`i-carbon-edge-node`,action:V}]),(e,r)=>{let h=E,y=G,b=O,x=A,C=j,T=L,D=N,M=F,P=k,W=Y,K=R;return a(),c(g,null,[t(x,{"left-size":30},{left:_(()=>[m(`div`,X,[(a(!0),c(g,null,o(p(l)?.builds,e=>(a(),c(g,{key:e.slug},[m(`button`,{flex:`~ col gap1`,p3:``,"hover:bg-active":``,class:s(e.slug===w.value?.slug?`text-primary bg-active`:``),onClick:t=>v.value=e.slug},[m(`code`,null,u(e.name),1),m(`div`,Q,[r[4]||=m(`div`,{"i-carbon-time":``},null,-1),m(`span`,null,u(H(e)),1),r[5]||=m(`div`,{"flex-auto":``},null,-1),m(`span`,null,u(p(S)(new Date(e.endTime))),1)])],10,Z),r[6]||=m(`div`,{"x-divider":``},null,-1)],64))),128)),m(`div`,$,[p(l)?.isBuilding?(a(),f(h,{key:1,n:`primary`,icon:`carbon-circle-dash animate-spin`,title:`Open the output in the Terminals dock`,onClick:r[1]||=e=>U()},{default:_(()=>[...r[8]||=[n(` Building... `,-1)]]),_:1})):(a(),f(h,{key:0,n:`primary`,icon:`carbon-edge-node`,onClick:r[0]||=e=>V()},{default:_(()=>[...r[7]||=[n(` Start a new build `,-1)]]),_:1}))])])]),right:_(()=>[w.value?(a(),f(y,{key:0,current:w.value},null,8,[`current`])):(a(),f(b,{key:1}))]),_:1}),t(p(i),null,{default:_(({resolve:e})=>[t(P,{"model-value":!0,onClose:t=>e(!1)},{default:_(()=>[m(`div`,ee,[r[13]||=m(`h3`,{class:`text-lg font-medium leading-6`,mb2:``},` Start analyze build? `,-1),r[14]||=m(`p`,{op50:``},` Enter the name of the build: `,-1),t(C,{modelValue:z.value,"onUpdate:modelValue":r[2]||=e=>z.value=e,placeholder:`Build name`},null,8,[`modelValue`]),B.value?(a(),f(T,{key:0,"n-orange":``},{default:_(()=>[...r[9]||=[n(` A build with the same name already exists, continue would overrides the previous build result. `,-1)]]),_:1})):d(``,!0),r[15]||=m(`div`,{my3:``,"x-divider":``},null,-1),r[16]||=m(`p`,{op50:``},` The following command will be executed in your terminal: `,-1),t(D,{code:`npx nuxi analyze --no-serve --name=${z.value}`,lang:`bash`,px4:``,py2:``,border:`~ base rounded`,lines:!1},null,8,[`code`]),t(M,{modelValue:I.value,"onUpdate:modelValue":r[3]||=e=>I.value=e,mt2:``,n:`primary`},{default:_(()=>[...r[10]||=[n(` Open the Terminals dock `,-1)]]),_:1},8,[`modelValue`]),m(`div`,te,[t(h,{onClick:t=>e(!1)},{default:_(()=>[...r[11]||=[n(` Cancel `,-1)]]),_:1},8,[`onClick`]),t(h,{n:`solid primary`,onClick:t=>e(!0)},{default:_(()=>[...r[12]||=[n(` Start `,-1)]]),_:1},8,[`onClick`])])])]),_:2},1032,[`onClose`])]),_:1}),t(K,null,{default:_(()=>[t(W)]),_:1})],64)}}});export{ne as default};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{$t as e,C as t,Q as n,S as r,St as i,T as a,W as o,X as s,Y as c,Zt as l,_ as u,_t as d,dt as f,en as p,g as m,h,jt as g,m as _,p as v,s as y,ut as b}from"./vendor/json-editor-vue-c7zwcfg4.js";import{F as x,L as S}from"./ready-if1s6ugr.js";import{A as C,C as w}from"./utils-h3uzf8s7.js";import{A as T,P as E,_ as D,a as O,d as k,f as A,j,k as M,l as N,w as P}from"./rpc-jaaujnev.js";import{t as F}from"./storage-options-g42elkwy.js";import{A as I,L,O as R,S as z,d as B,f as ee,n as te,p as V,r as ne}from"#entry";import{t as H}from"./ndropdown-jnrvla1s.js";import{t as U}from"./ndrawer-myfvks89.js";import{t as W}from"./composables-ioamscf4.js";import{t as G}from"./ncheckbox-jr3c6e4e.js";import{t as re}from"./filepath-item-b7ye3und.js";import{t as K}from"./nnavbar-bvq6rk5u.js";import{n as q,t as J}from"./code-snippets-hxwvpad4.js";import{t as Y}from"./nsection-block-illvvuef.js";var X={key:0,"h-full":``,"w-full":``,flex:``,"items-center":``,"justify-center":``},ie={for:`drop-zone-input`,"text-3xl":``,hover:`text-green cursor-pointer`,"transition-all":``},ae={key:1,relative:``,"h-full":``,"w-full":``,grid:`~ rows-[max-content_1fr_max-content]`},oe={grid:`~ cols-minmax-8rem gap-8`,"overflow-auto":``,p6:``},se={flex:``,"items-center":``,"justify-center":``,"of-hidden":``,rounded:``,"rounded-t-lg":``,"bg-active":``,"object-cover":``,class:`aspect-1/1`,border:`~ base`},ce=[`src`],le={flex:`~ gap1`,"items-center":``},ue={flex:`~ gap-2`,"items-center":``,"justify-center":``,p8:``},de=Object.assign(a({__name:`AssetDropZone`,props:{modelValue:{type:Boolean,required:!0},folder:{type:String,required:!0}},setup(e){let a=e,s=/\.\w+$/,d=j(a,`modelValue`),p=i(),v=i([]);function x(e){p.value=e.target,d.value=!0}function S(e){e.target===p.value&&(d.value=!1)}function C(e){e.preventDefault()}function w(e){e.preventDefault(),T(e.dataTransfer.files)}function T(e){let t=[...e||[]];if(t.length){let e=[],n=v.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);v.value=[...v.value,...e]}}async function E(){if(N.value||k.value)return;z(`assets:upload`);let e=[];for(let t of v.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 O.writeStaticAssets([...e],a.folder).then(()=>{B(),L({message:`Files uploaded successfully!`,icon:`i-carbon:checkmark`})}).catch(e=>{B(),L({message:`Error uploading files: ${e?.message??`unknown`}`,icon:`i-carbon-warning`,classes:`text-red`})}),d.value=!1}function D(e){v.value?.splice(e,1)}function A(e){return URL.createObjectURL(e)}function M(e,t){let[n,r]=e.name.split(`.`),i=t.replace(s,``),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}),v.value.splice(v.value.indexOf(e),1,e),e)}function F(){v.value=[]}function B(){d.value=!1,F()}return P(`dragenter`,x),P(`dragleave`,S),P(`dragover`,C),P(`drop`,w),(e,i)=>{let a=R,s=I,p=V,x=n(`tooltip`);return o(),u(`div`,{fixed:``,"bottom-0":``,"left-13":``,"right-0":``,"top-0":``,"z-10":``,"backdrop-blur-20":``,"transition-all":``,class:l(g(d)?`opacity-100 visible`:`opacity-0 invisible`)},[f(t(a,{icon:`carbon-close`,title:`Close`,absolute:``,"right-5":``,"top-5":``,"z-20":``,"text-xl":``,border:!1,onClick:B},null,512),[[x,`Close`,void 0,{"bottom-end":!0}]]),v.value?.length?(o(),u(`div`,ae,[i[4]||=_(`div`,{px6:``,py6:``},[_(`h1`,{"text-2xl":``},` Upload `),_(`p`,{"text-sm":``,op50:``},` Drag and drop files to upload `)],-1),_(`div`,oe,[(o(!0),u(y,null,c(v.value,(e,n)=>(o(),u(`div`,{key:e.name,flex:`~ col gap-2`,relative:``,"h-50":``,"w-40":``,"items-center":``},[_(`div`,se,[_(`img`,{"h-full":``,"w-full":``,"rounded-t-lg":``,"object-cover":``,src:A(e)},null,8,ce)]),_(`div`,le,[t(p,{n:`xs`,"h-full":``,"flex-auto":``,"model-value":e.name,"onUpdate:modelValue":t=>M(e,t.target.value)},null,8,[`model-value`,`onUpdate:modelValue`]),t(a,{n:`red`,icon:`carbon-trash-can`,"h-full":``,"flex-none":``,title:`Remove file`,onClick:e=>D(n)},null,8,[`onClick`])])]))),128))]),_(`div`,ue,[v.value.length?(o(),h(a,{key:0,n:`red`,onClick:F},{default:b(()=>[t(s,{icon:`carbon-clean`}),i[2]||=r(` Clear `,-1)]),_:1})):m(``,!0),t(a,{disabled:!v.value.length,n:`primary solid`,onClick:E},{default:b(()=>[t(s,{icon:`carbon-cloud-upload`}),i[3]||=r(` Upload `,-1)]),_:1},8,[`disabled`])])])):(o(),u(`div`,X,[_(`label`,ie,[t(s,{icon:`carbon-cloud-upload`,"mr-2":``}),i[1]||=r(` Drop files here or click to select `,-1)]),_(`input`,{id:`drop-zone-input`,type:`file`,multiple:``,hidden:``,onChange:i[0]||=e=>T(e.target.files)},null,32)]))],2)}}}),{__name:`AssetDropZone`}),fe=Object.assign(a({__name:`AssetFontPreview`,props:{asset:{}},setup(t){let n=t,r=v(()=>`devtools-assets-${q(n.asset)}`);return M(v(()=>`
|
|
2
|
+
@font-face {
|
|
3
|
+
font-family: '${r.value}';
|
|
4
|
+
src: url('${n.asset.publicPath}');
|
|
5
|
+
}
|
|
6
|
+
`)),(t,n)=>(o(),u(`div`,{"of-hidden":``,style:e({fontFamily:`'${r.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`}),pe={flex:``,"items-center":``,"justify-center":``,"of-hidden":``,"bg-active":``,"object-cover":``,p1:``},me=[`src`],he={key:2,"i-carbon-document":``,"text-3xl":``,op20:``},ge={key:3,"w-full":``,"self-start":``,p4:``},_e=[`textContent`],ve={key:4},ye=[`src`,`autoplay`,`controls`],be={key:5},xe={key:0,"i-carbon-volume-up":``,"text-3xl":``,op20:``},Se=[`src`],Ce={key:6,"i-carbon-help":``,"text-3xl":``,op20:``},Z=Object.assign(a({__name:`AssetPreview`,props:{asset:{},textContent:{},detail:{type:Boolean}},setup(e){return(t,n)=>{let r=fe;return o(),u(`div`,pe,[e.asset.type===`image`?(o(),u(`img`,{key:0,src:e.asset.publicPath},null,8,me)):e.asset.type===`font`?(o(),h(r,{key:e.asset.publicPath,asset:e.asset,"self-stretch":``,p2:``,"text-2xl":``},null,8,[`asset`])):e.asset.type===`text`&&!e.textContent?(o(),u(`div`,he)):e.asset.type===`text`&&e.textContent?(o(),u(`div`,ge,[_(`pre`,{"max-h-10rem":``,"of-hidden":``,"text-xs":``,"font-mono":``,textContent:p(e.textContent)},null,8,_e)])):e.asset.type===`video`?(o(),u(`div`,ve,[_(`video`,{src:e.asset.publicPath,autoplay:e.detail,controls:e.detail},null,8,ye)])):e.asset.type===`audio`?(o(),u(`div`,be,[e.detail?(o(),u(`audio`,{key:1,src:e.asset.publicPath,controls:``},null,8,Se)):(o(),u(`div`,xe))])):(o(),u(`div`,Ce))])}}}),{__name:`AssetPreview`}),we={relative:``,flex:`~ col gap-1`,hover:`bg-active`,"items-center":``,"of-hidden":``,rounded:``,p2:``},Te={"w-full":``,"of-hidden":``,truncate:``,"ws-nowrap":``,"text-center":``,"text-xs":``},Ee=Object.assign(a({__name:`AssetGridItem`,props:{asset:{},folder:{}},setup(e){let n=e,r=v(()=>n.folder&&n.asset.path.startsWith(n.folder)?n.asset.path.slice(n.folder.length):n.asset.path);return(n,i)=>{let a=I,s=Z;return o(),u(`button`,we,[e.asset.layer?(o(),h(a,{key:0,icon:`i-carbon-layers`,absolute:``,"right-4":``,"top-4":``,"bg-primary":``})):m(``,!0),t(s,{"h-30":``,"w-30":``,rounded:``,border:`~ base`,asset:e.asset},null,8,[`asset`]),_(`div`,Te,p(r.value),1)])}}}),{__name:`AssetGridItem`}),Q=Object.assign(a({__name:`AssetListItem`,props:{item:{},index:{default:0},modelValue:{}},setup(t,{emit:n}){let a=t,f=j(a,`modelValue`,n,{passive:!0}),b=v(()=>a.item?.children?.length),x=i(!0),S=v(()=>b.value?`i-carbon-folder`:a.item.type===`image`?`i-carbon-image`:a.item.type===`video`?`i-carbon-video`:a.item.type===`audio`?`i-carbon-volume-up`:a.item.type===`font`?`i-carbon-text-small-caps`:a.item.type===`text`?`i-carbon-document`:a.item.type===`json`?`i-carbon-json`:`i-carbon-document-blank`);return(n,i)=>{let a=I,v=Q;return o(),u(`div`,null,[_(`button`,{flex:`~ gap-2`,"w-full":``,"items-center":``,hover:`bg-active`,px4:``,py1:``,style:e({paddingLeft:`calc(1rem + ${t.index*1.5}em)`}),class:l({"bg-active":!b.value&&g(f)?.filePath===t.item?.filePath}),border:`b base`,onClick:i[0]||=e=>b.value?x.value=!x.value:f.value=t.item},[_(`div`,{class:l(S.value)},null,2),_(`span`,{class:l({"flex items-center":b.value}),"flex-auto":``,"text-start":``,"text-sm":``,"font-mono":``},[r(p(t.item.path)+` `,1),t.item.layer?(o(),h(a,{key:0,icon:`i-carbon-layers`,"bg-primary":``})):m(``,!0)],2),b.value?(o(),h(a,{key:0,icon:`carbon:chevron-right`,"transform-rotate":x.value?90:0,transition:``},null,8,[`transform-rotate`])):m(``,!0)],6),x.value?s(n.$slots,`default`,{key:0},()=>[(o(!0),u(y,null,c(t.item?.children,e=>(o(),h(v,{key:e.filepath,modelValue:g(f),"onUpdate:modelValue":i[1]||=e=>d(f)?f.value=e:null,item:e,index:t.index+1},null,8,[`modelValue`,`item`,`index`]))),128))]):m(``,!0)])}}}),{__name:`AssetListItem`}),De={flex:`~ col gap-4`,"min-h-full":``,"w-full":``,"of-hidden":``,p4:``},Oe={flex:`~`,"items-center":``,"justify-center":``},ke={"max-w-full":``,"w-full":``,"table-fixed":``},Ae={flex:`~ gap-1`,"w-full":``,"items-center":``},je={flex:`~ gap-1`,"w-full":``,"items-center":``,"of-hidden":``},Me={"flex-auto":``,"of-hidden":``,truncate:``,"ws-pre":``,"font-mono":``},Ne={capitalize:``},Pe={key:0},Fe={op70:``},Ie={flex:`~ gap2 wrap`},Le={flex:`~ col gap-4`,"min-h-full":``,"w-full":``,"of-hidden":``,p8:``},Re={flex:`~ gap2 wrap justify-center`},ze={flex:`~ col gap-4`,"min-h-full":``,"w-full":``,"of-hidden":``,p8:``},Be={flex:`~ gap2 wrap justify-center`},Ve={flex:`~ col gap-4`,"min-h-full":``,"w-full":``,"of-hidden":``,p4:``},$={flex:``,"justify-end":``,"gap-4":``},He=Object.assign(a({__name:`AssetDetails`,props:{modelValue:{}},setup(e,{emit:a}){let s=j(e,`modelValue`,a,{passive:!0}),c=A(async()=>{if(s.value.type===`image`)return O.getImageMeta(s.value.filePath)}),l=i(!1),d=i(),C=i(0),E=A(async()=>{if(s.value.type!==`text`)return;C.value;let e=await O.getTextAssetContent(s.value.filePath);return d.value=e,e});async function D(){if(E.value!==d.value)try{await O.writeStaticAssets([{path:s.value.path,content:d.value,override:!0}],``),l.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 k=w(),M=v(()=>(k.value?._installedModules||[]).some(e=>e.meta?.name===`@nuxt/image`||e.meta?.name===`@nuxt/image-edge`||e.meta?.name===`@nuxt/image-nightly`)),N=v(()=>{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`}),M.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}),P=te(),F=ne(),I=T(()=>s.value.mtime),z=v(()=>{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=v(()=>{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=v(()=>[`image`,`text`,`video`,`audio`,`font`].includes(s.value.type)),U=i(!1);async function W(){try{await O.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=i(!1),K=i(``);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 O.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(e,i)=>{let a=Z,v=re,C=R,w=J,T=ee,O=V,k=n(`tooltip`);return o(),u(y,null,[_(`div`,De,[H.value?(o(),u(y,{key:0},[i[13]||=_(`div`,{flex:`~ gap2`,"mb--2":``,"items-center":``,op50:``},[_(`div`,{"x-divider":``}),_(`div`,{"flex-none":``},` Preview `),_(`div`,{"x-divider":``})],-1),_(`div`,Oe,[t(a,{detail:``,"max-h-80":``,"min-h-20":``,"min-w-20":``,"w-auto":``,rounded:``,border:`~ base`,asset:g(s),"text-content":g(E)},null,8,[`asset`,`text-content`])])],64)):m(``,!0),i[25]||=_(`div`,{flex:`~ gap2`,"mb--2":``,"items-center":``,op50:``},[_(`div`,{"x-divider":``}),_(`div`,{"flex-none":``},` Details `),_(`div`,{"x-divider":``})],-1),_(`table`,ke,[_(`tbody`,null,[_(`tr`,null,[i[14]||=_(`td`,{"w-30":``,"ws-nowrap":``,pr5:``,"text-right":``,op50:``},` Filepath `,-1),_(`td`,null,[_(`div`,Ae,[t(v,{filepath:g(s).filePath,"text-left":``},null,8,[`filepath`]),f(t(C,{"flex-none":``,title:`Open in Editor`,icon:`carbon-launch`,border:!1,onClick:i[0]||=e=>g(F)(g(s).filePath)},null,512),[[k,`Open in Editor`]])])])]),_(`tr`,null,[i[15]||=_(`td`,{"w-30":``,"ws-nowrap":``,pr5:``,"text-right":``,op50:``},` Public Path `,-1),_(`td`,null,[_(`div`,je,[_(`div`,Me,p(g(s).publicPath),1),f(t(C,{"flex-none":``,title:`Copy public path`,icon:`carbon-copy`,border:!1,onClick:i[1]||=e=>g(P)(g(s).publicPath,`assets-public-path`)},null,512),[[k,`Copy public path`]]),f(t(C,{"flex-none":``,to:g(s).publicPath,icon:`carbon-launch`,target:`_blank`,border:!1,title:`Open in browser`},null,8,[`to`]),[[k,`Open in browser`]])])])]),_(`tr`,null,[i[16]||=_(`td`,{"w-30":``,"ws-nowrap":``,pr5:``,"text-right":``,op50:``},` Type `,-1),_(`td`,Ne,p(g(s).type),1)]),g(c)?.width?(o(),u(y,{key:0},[_(`tr`,null,[i[17]||=_(`td`,{"w-30":``,"ws-nowrap":``,pr5:``,"text-right":``,op50:``},` Image Size `,-1),_(`td`,null,p(g(c).width)+` x `+p(g(c).height),1)]),B.value?(o(),u(`tr`,Pe,[i[18]||=_(`td`,{"w-30":``,"ws-nowrap":``,pr5:``,"text-right":``,op50:``},` Aspect Ratio `,-1),_(`td`,null,p(B.value),1)])):m(``,!0)],64)):m(``,!0),_(`tr`,null,[i[19]||=_(`td`,{"w-30":``,"ws-nowrap":``,pr5:``,"text-right":``,op50:``},` File size `,-1),_(`td`,null,p(z.value),1)]),_(`tr`,null,[i[20]||=_(`td`,{"w-30":``,"ws-nowrap":``,pr5:``,"text-right":``,op50:``},` Last modified `,-1),_(`td`,null,[r(p(new Date(g(s).mtime).toLocaleString())+` `,1),_(`span`,Fe,`(`+p(g(I))+`)`,1)])])])]),i[26]||=_(`div`,{flex:`~ gap2`,"mb--2":``,"items-center":``,op50:``},[_(`div`,{"x-divider":``}),_(`div`,{"flex-none":``},` Actions `),_(`div`,{"x-divider":``})],-1),_(`div`,Ie,[t(C,{to:g(s).publicPath,download:``,target:`_blank`,icon:`carbon-download`,n:`green`},{default:b(()=>[...i[21]||=[r(` Download `,-1)]]),_:1},8,[`to`]),g(s).type===`text`?(o(),h(C,{key:0,icon:`carbon-edit`,n:`cyan`,onClick:i[2]||=e=>l.value=!l.value},{default:b(()=>[...i[22]||=[r(` Edit `,-1)]]),_:1})):m(``,!0),t(C,{icon:`carbon-text-annotation-toggle`,n:`blue`,onClick:i[3]||=e=>G.value=!G.value},{default:b(()=>[...i[23]||=[r(` Rename `,-1)]]),_:1}),t(C,{icon:`carbon-delete`,n:`red`,onClick:i[4]||=e=>U.value=!U.value},{default:b(()=>[...i[24]||=[r(` Delete `,-1)]]),_:1})]),i[27]||=_(`div`,{"flex-auto":``},null,-1),N.value.length?(o(),h(w,{key:1,border:`t base`,"mx--4":``,"mb--4":``,"code-snippets":N.value},null,8,[`code-snippets`])):m(``,!0)]),t(T,{modelValue:U.value,"onUpdate:modelValue":i[6]||=e=>U.value=e},{default:b(()=>[_(`div`,Le,[i[30]||=_(`span`,null,` Are you sure you want to delete this asset? `,-1),_(`div`,Re,[t(C,{icon:`carbon-close`,onClick:i[5]||=e=>U.value=!1},{default:b(()=>[...i[28]||=[r(` Cancel `,-1)]]),_:1}),t(C,{icon:`carbon-delete`,n:`red`,onClick:W},{default:b(()=>[...i[29]||=[r(` Delete `,-1)]]),_:1})])])]),_:1},8,[`modelValue`]),t(T,{modelValue:G.value,"onUpdate:modelValue":i[9]||=e=>G.value=e},{default:b(()=>[_(`div`,ze,[t(O,{modelValue:K.value,"onUpdate:modelValue":i[7]||=e=>K.value=e,placeholder:`New name`,n:`blue`},null,8,[`modelValue`]),_(`div`,Be,[t(C,{icon:`carbon-close`,onClick:i[8]||=e=>G.value=!1},{default:b(()=>[...i[31]||=[r(` Cancel `,-1)]]),_:1}),t(C,{icon:`carbon-text-annotation-toggle`,n:`blue`,onClick:q},{default:b(()=>[...i[32]||=[r(` Rename `,-1)]]),_:1})])])]),_:1},8,[`modelValue`]),g(s).type===`text`?(o(),h(T,{key:0,modelValue:l.value,"onUpdate:modelValue":i[12]||=e=>l.value=e},{default:b(()=>[_(`div`,Ve,[f(_(`textarea`,{"onUpdate:modelValue":i[10]||=e=>d.value=e,placeholder:`Item value...`,class:`h-lg w-xl of-auto rounded-lg p-4 text-sm font-mono outline-none`,onKeydown:S(D,[`enter`])},null,544),[[x,d.value]]),_(`div`,$,[t(C,{icon:`carbon-close`,onClick:i[11]||=e=>l.value=!1},{default:b(()=>[...i[33]||=[r(` Cancel `,-1)]]),_:1}),t(C,{icon:`carbon:save`,n:`primary`,onClick:D},{default:b(()=>[...i[34]||=[r(` save `,-1)]]),_:1})])])]),_:1},8,[`modelValue`])):m(``,!0)],64)}}}),{__name:`AssetDetails`}),Ue={"h-full":``,"of-auto":``},We={"flex-none":``,flex:`~ gap2 items-center`,"text-lg":``},Ge={flex:`~ items-center justify-center`,absolute:``,"bottom--1":``,"right--1":``,"h-4":``,"w-4":``,"rounded-full":``,"bg-primary:30":``,"text-8px":``},Ke={flex:`~ col`,"w-30":``,"of-auto":``},qe={"text-xs":``,op75:``},Je={op50:``},Ye={key:0},Xe={"mt--4":``,px2:``,grid:`~ cols-minmax-8rem`},Ze={key:1,p2:``,grid:`~ cols-minmax-8rem`},Qe={key:1},$e=a({__name:`assets`,setup(e){W({icon:`carbon-image-copy`,title:`Assets`,layout:`full`});let r=C(),a=i(!1),s=i(``),l=v(()=>new B(r.value||[],{keys:[`path`]})),d=E(()=>{let e=[];for(let t of r.value||[]){let n=t.path.split(`.`).pop();n&&!e.some(e=>e.name===n)&&e.push({name:n,value:!0})}return e}),x=v(()=>(s.value?l.value.search(s.value).map(e=>e.item):r.value||[]).filter(e=>{let t=e.path.split(`.`).pop();return!t||d.some(e=>e.name===t&&e.value)})),S=v(()=>{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=v(()=>{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=i(),{view:O}=F(`assets`);function k(){O.value=O.value===`list`?`grid`:`list`}D(`Escape`,()=>{T.value=void 0});let A=i();return(e,i)=>{let l=R,v=G,C=H,E=K,D=de,j=Ee,M=Y,N=Q,P=He,F=U,I=n(`tooltip`);return o(),u(`div`,Ue,[t(E,{ref_key:`navbar`,ref:A,search:s.value,"onUpdate:search":i[1]||=e=>s.value=e,pb2:``},{actions:b(()=>[_(`div`,We,[f(t(l,{icon:`carbon:cloud-upload`,title:`File Upload`,border:!1,onClick:i[0]||=e=>a.value=!a.value},null,512),[[I,`File Upload`,void 0,{"bottom-end":!0}]]),g(d).length?(o(),h(C,{key:0,direction:`end`,n:`sm primary`},{trigger:b(({click:e})=>[f(t(l,{icon:`carbon-filter`,border:!1,title:`Filter`,p3:``,"text-lg":``,onClick:t=>e()},null,8,[`onClick`]),[[I,`Filter`,void 0,{"bottom-end":!0}]]),_(`span`,Ge,p(g(d).length),1)]),default:b(()=>[_(`div`,Ke,[(o(!0),u(y,null,c(g(d),e=>(o(),h(v,{key:e.name,modelValue:e.value,"onUpdate:modelValue":t=>e.value=t,flex:`~ gap-2`,rounded:``,px2:``,py2:``},{default:b(()=>[_(`span`,qe,p(e.name),1)]),_:2},1032,[`modelValue`,`onUpdate:modelValue`]))),128))])]),_:1})):m(``,!0),f(t(l,{"text-lg":``,border:!1,icon:g(O)===`grid`?`i-carbon-list`:`i-carbon-grid`,title:`Toggle view`,onClick:k},null,8,[`icon`]),[[I,`Toggle View`,void 0,{"bottom-end":!0}]])])]),default:b(()=>[_(`div`,Je,[s.value?(o(),u(`span`,Ye,p(x.value.length)+` matched · `,1)):m(``,!0),_(`span`,null,p(g(r)?.length)+` assets in total`,1)])]),_:1},8,[`search`]),t(D,{modelValue:a.value,"onUpdate:modelValue":i[2]||=e=>a.value=e,folder:`/`},null,8,[`modelValue`]),g(O)===`grid`?(o(),u(y,{key:0},[S.value.length>1?(o(!0),u(y,{key:0},c(S.value,([e,t])=>(o(),h(M,{key:e,text:e,description:`${t.length} items`,open:t.length<=g(50),padding:!1},{default:b(()=>[_(`div`,Xe,[(o(!0),u(y,null,c(t,t=>(o(),h(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(),u(`div`,Ze,[(o(!0),u(y,null,c(x.value,e=>(o(),h(j,{key:e.path,asset:e,onClick:t=>T.value=e},null,8,[`asset`,`onClick`]))),128))]))],64)):(o(),u(`div`,Qe,[(o(!0),u(y,null,c(w.value,(e,t)=>(o(),h(N,{key:t,modelValue:T.value,"onUpdate:modelValue":i[3]||=e=>T.value=e,item:e},null,8,[`modelValue`,`item`]))),128))])),t(F,{"model-value":!!T.value,"auto-close":``,"w-120":``,top:A.value,onClose:i[5]||=e=>T.value=void 0},{default:b(()=>[T.value?(o(),h(P,{key:0,modelValue:T.value,"onUpdate:modelValue":i[4]||=e=>T.value=e},null,8,[`modelValue`])):m(``,!0)]),_:1},8,[`model-value`,`top`])])}}});export{$e as default};
|
package/dist/client/_nuxt/{auth-required-panel-gwrodxrm.js → auth-required-panel-gdnspumn.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{X as e}from"./vendor/json-editor-vue-c7zwcfg4.js";import{t}from"./_plugin-vue_export-helper-d9irwgla.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":"9ec1ff21-8126-4e86-bc50-039a1d3867c9","timestamp":1784773549462}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"id":"9ec1ff21-8126-4e86-bc50-039a1d3867c9","timestamp":1784773549462,"prerendered":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{At as e,Tt as t}from"./vendor/json-editor-vue-
|
|
1
|
+
import{At as e,Tt as t}from"./vendor/json-editor-vue-c7zwcfg4.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=t(),i(a));function r(){n&&e(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};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{St as e,T as t,V as n,W as r,h as i,p as a}from"./vendor/json-editor-vue-c7zwcfg4.js";import{v as o}from"./rpc-jaaujnev.js";import{t as s}from"./ncode-block-jv3jk7c5.js";var c=class{diff(e,t,n={}){let r;typeof n==`function`?(r=n,n={}):`callback`in n&&(r=n.callback);let i=this.castInput(e,n),a=this.castInput(t,n),o=this.removeEmpty(this.tokenize(i,n)),s=this.removeEmpty(this.tokenize(a,n));return this.diffWithOptionsObj(o,s,n,r)}diffWithOptionsObj(e,t,n,r){let i=e=>{if(e=this.postProcess(e,n),r){setTimeout(function(){r(e)},0);return}else return e},a=t.length,o=e.length,s=1,c=a+o;n.maxEditLength!=null&&(c=Math.min(c,n.maxEditLength));let l=n.timeout??1/0,u=Date.now()+l,d=[{oldPos:-1,lastComponent:void 0}],f=this.extractCommon(d[0],t,e,0,n);if(d[0].oldPos+1>=o&&f+1>=a)return i(this.buildValues(d[0].lastComponent,t,e));let p=-1/0,m=1/0,h=()=>{for(let r=Math.max(p,-s);r<=Math.min(m,s);r+=2){let s,c=d[r-1],l=d[r+1];c&&(d[r-1]=void 0);let u=!1;if(l){let e=l.oldPos-r;u=l&&0<=e&&e<a}let h=c&&c.oldPos+1<o;if(!u&&!h){d[r]=void 0;continue}if(s=!h||u&&c.oldPos<l.oldPos?this.addToPath(l,!0,!1,0,n):this.addToPath(c,!1,!0,1,n),f=this.extractCommon(s,t,e,r,n),s.oldPos+1>=o&&f+1>=a)return i(this.buildValues(s.lastComponent,t,e))||!0;d[r]=s,s.oldPos+1>=o&&(m=Math.min(m,r-1)),f+1>=a&&(p=Math.max(p,r+1))}s++};if(r)(function e(){setTimeout(function(){if(s>c||Date.now()>u)return r(void 0);h()||e()},0)})();else for(;s<=c&&Date.now()<=u;){let e=h();if(e)return e}}addToPath(e,t,n,r,i){let a=e.lastComponent;return a&&!i.oneChangePerToken&&a.added===t&&a.removed===n?{oldPos:e.oldPos+r,lastComponent:{count:a.count+1,added:t,removed:n,previousComponent:a.previousComponent}}:{oldPos:e.oldPos+r,lastComponent:{count:1,added:t,removed:n,previousComponent:a}}}extractCommon(e,t,n,r,i){let a=t.length,o=n.length,s=e.oldPos,c=s-r,l=0;for(;c+1<a&&s+1<o&&this.equals(n[s+1],t[c+1],i);)c++,s++,l++,i.oneChangePerToken&&(e.lastComponent={count:1,previousComponent:e.lastComponent,added:!1,removed:!1});return l&&!i.oneChangePerToken&&(e.lastComponent={count:l,previousComponent:e.lastComponent,added:!1,removed:!1}),e.oldPos=s,c}equals(e,t,n){return n.comparator?n.comparator(e,t):e===t||!!n.ignoreCase&&e.toLowerCase()===t.toLowerCase()}removeEmpty(e){let t=[];for(let n=0;n<e.length;n++)e[n]&&t.push(e[n]);return t}castInput(e,t){return e}tokenize(e,t){return Array.from(e)}join(e){return e.join(``)}postProcess(e,t){return e}get useLongestToken(){return!1}buildValues(e,t,n){let r=[],i;for(;e;)r.push(e),i=e.previousComponent,delete e.previousComponent,e=i;r.reverse();let a=r.length,o=0,s=0,c=0;for(;o<a;o++){let e=r[o];if(e.removed)e.value=this.join(n.slice(c,c+e.count)),c+=e.count;else{if(!e.added&&this.useLongestToken){let r=t.slice(s,s+e.count);r=r.map(function(e,t){let r=n[c+t];return r.length>e.length?r:e}),e.value=this.join(r)}else e.value=this.join(t.slice(s,s+e.count));s+=e.count,e.added||(c+=e.count)}}return r}};new class extends c{};function l(e,t){let n;for(n=0;n<e.length&&n<t.length;n++)if(e[n]!=t[n])return e.slice(0,n);return e.slice(0,n)}function u(e,t){let n;if(!e||!t||e[e.length-1]!=t[t.length-1])return``;for(n=0;n<e.length&&n<t.length;n++)if(e[e.length-(n+1)]!=t[t.length-(n+1)])return e.slice(-n);return e.slice(-n)}function d(e,t,n){if(e.slice(0,t.length)!=t)throw Error(`string ${JSON.stringify(e)} doesn't start with prefix ${JSON.stringify(t)}; this is a bug`);return n+e.slice(t.length)}function f(e,t,n){if(!t)return e+n;if(e.slice(-t.length)!=t)throw Error(`string ${JSON.stringify(e)} doesn't end with suffix ${JSON.stringify(t)}; this is a bug`);return e.slice(0,-t.length)+n}function p(e,t){return d(e,t,``)}function m(e,t){return f(e,t,``)}function h(e,t){return t.slice(0,g(e,t))}function g(e,t){let n=0;e.length>t.length&&(n=e.length-t.length);let r=t.length;e.length<t.length&&(r=e.length);let i=Array(r),a=0;i[0]=0;for(let e=1;e<r;e++){for(t[e]==t[a]?i[e]=i[a]:i[e]=a;a>0&&t[e]!=t[a];)a=i[a];t[e]==t[a]&&a++}a=0;for(let r=n;r<e.length;r++){for(;a>0&&e[r]!=t[a];)a=i[a];e[r]==t[a]&&a++}return a}function _(e,t){let n=[];for(let r of Array.from(t.segment(e))){let e=r.segment;n.length&&/\s/.test(n[n.length-1])&&/\s/.test(e)?n[n.length-1]+=e:n.push(e)}return n}function v(e,t){if(t)return b(e,t)[1];let n;for(n=e.length-1;n>=0&&e[n].match(/\s/);n--);return e.substring(n+1)}function y(e,t){if(t)return b(e,t)[0];let n=e.match(/^\s*/);return n?n[0]:``}function b(e,t){if(!t)return[y(e),v(e)];if(t.resolvedOptions().granularity!=`word`)throw Error(`The segmenter passed must have a granularity of "word"`);let n=_(e,t),r=n[0],i=n[n.length-1];return[/\s/.test(r)?r:``,/\s/.test(i)?i:``]}var x=`a-zA-Z0-9_\\u{AD}\\u{C0}-\\u{D6}\\u{D8}-\\u{F6}\\u{F8}-\\u{2C6}\\u{2C8}-\\u{2D7}\\u{2DE}-\\u{2FF}\\u{1E00}-\\u{1EFF}`,S=RegExp(`[${x}]+|\\s+|[^${x}]`,`ug`);new class extends c{equals(e,t,n){return n.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e.trim()===t.trim()}tokenize(e,t={}){let n;if(t.intlSegmenter){let r=t.intlSegmenter;if(r.resolvedOptions().granularity!=`word`)throw Error(`The segmenter passed must have a granularity of "word"`);n=_(e,r)}else n=e.match(S)||[];let r=[],i=null;return n.forEach(e=>{/\s/.test(e)?i==null?r.push(e):r.push(r.pop()+e):i!=null&&/\s/.test(i)?r[r.length-1]==i?r.push(r.pop()+e):r.push(i+e):r.push(e),i=e}),r}join(e){return e.map((e,t)=>t==0?e:e.replace(/^\s+/,``)).join(``)}postProcess(e,t){if(!e||t.oneChangePerToken)return e;let n=null,r=null,i=null;return e.forEach(e=>{e.added?r=e:e.removed?i=e:((r||i)&&C(n,i,r,e,t.intlSegmenter),n=e,r=null,i=null)}),(r||i)&&C(n,i,r,null,t.intlSegmenter),e}};function C(e,t,n,r,i){if(t&&n){let[a,o]=b(t.value,i),[s,c]=b(n.value,i);if(e){let r=l(a,s);e.value=f(e.value,s,r),t.value=p(t.value,r),n.value=p(n.value,r)}if(r){let e=u(o,c);r.value=d(r.value,c,e),t.value=m(t.value,e),n.value=m(n.value,e)}}else if(n){if(e){let e=y(n.value,i);n.value=n.value.substring(e.length)}if(r){let e=y(r.value,i);r.value=r.value.substring(e.length)}}else if(e&&r){let n=y(r.value,i),[a,o]=b(t.value,i),s=l(n,a);t.value=p(t.value,s);let c=u(p(n,s),o);t.value=m(t.value,c),r.value=d(r.value,n,c),e.value=f(e.value,n,n.slice(0,n.length-c.length))}else if(r){let e=y(r.value,i),n=h(v(t.value,i),e);t.value=m(t.value,n)}else if(e){let n=h(v(e.value,i),y(t.value,i));t.value=p(t.value,n)}}new class extends c{tokenize(e){let t=RegExp(`(\\r?\\n)|[${x}]+|[^\\S\\n\\r]+|[^${x}]`,`ug`);return e.match(t)||[]}};var w=new class extends c{constructor(){super(...arguments),this.tokenize=E}equals(e,t,n){return n.ignoreWhitespace?((!n.newlineIsToken||!e.includes(`
|
|
2
2
|
`))&&(e=e.trim()),(!n.newlineIsToken||!t.includes(`
|
|
3
3
|
`))&&(t=t.trim())):n.ignoreNewlineAtEof&&!n.newlineIsToken&&(e.endsWith(`
|
|
4
4
|
`)&&(e=e.slice(0,-1)),t.endsWith(`
|
|
5
5
|
`)&&(t=t.slice(0,-1))),super.equals(e,t,n)}};function T(e,t,n){return w.diff(e,t,n)}function E(e,t){t.stripTrailingCr&&(e=e.replace(/\r\n/g,`
|
|
6
|
-
`));let n=[],r=e.split(/(\n|\r\n)/);r[r.length-1]||r.pop();for(let e=0;e<r.length;e++){let i=r[e];e%2&&!t.newlineIsToken?n[n.length-1]+=i:n.push(i)}return n}function D(e){return e==`.`||e==`!`||e==`?`}new class extends c{tokenize(e){let t=[],n=0;for(let r=0;r<e.length;r++){if(r==e.length-1){t.push(e.slice(n));break}if(D(e[r])&&e[r+1].match(/\s/)){for(t.push(e.slice(n,r+1)),r=n=r+1;e[r+1]?.match(/\s/);)r++;t.push(e.slice(n,r+1)),n=r+1}}return t}},new class extends c{tokenize(e){return e.split(/([{}:;,]|\s+)/)}},new class extends c{constructor(){super(...arguments),this.tokenize=E}get useLongestToken(){return!0}castInput(e,t){let{undefinedReplacement:n,stringifyReplacer:r=(e,t)=>t===void 0?n:t}=t;return typeof e==`string`?e:JSON.stringify(O(e,null,null,r),null,` `)}equals(e,t,n){return super.equals(e.replace(/,([\r\n])/g,`$1`),t.replace(/,([\r\n])/g,`$1`),n)}};function O(e,t,n,r,i){t||=[],n||=[],r&&(e=r(i===void 0?``:i,e));let a;for(a=0;a<t.length;a+=1)if(t[a]===e)return n[a];let o;if(Object.prototype.toString.call(e)===`[object Array]`){for(t.push(e),o=Array(e.length),n.push(o),a=0;a<e.length;a+=1)o[a]=O(e[a],t,n,r,String(a));return t.pop(),n.pop(),o}if(e&&e.toJSON&&(e=e.toJSON()),typeof e==`object`&&e){t.push(e),o={},n.push(o);let i=[],s;for(s in e)Object.prototype.hasOwnProperty.call(e,s)&&i.push(s);for(i.sort(),a=0;a<i.length;a+=1)s=i[a],o[s]=O(e[s],t,n,r,s);t.pop(),n.pop()}else o=e;return o}new class extends c{tokenize(e){return e.slice()}join(e){return e}removeEmpty(e){return e}};var k=Object.assign(
|
|
6
|
+
`));let n=[],r=e.split(/(\n|\r\n)/);r[r.length-1]||r.pop();for(let e=0;e<r.length;e++){let i=r[e];e%2&&!t.newlineIsToken?n[n.length-1]+=i:n.push(i)}return n}function D(e){return e==`.`||e==`!`||e==`?`}new class extends c{tokenize(e){let t=[],n=0;for(let r=0;r<e.length;r++){if(r==e.length-1){t.push(e.slice(n));break}if(D(e[r])&&e[r+1].match(/\s/)){for(t.push(e.slice(n,r+1)),r=n=r+1;e[r+1]?.match(/\s/);)r++;t.push(e.slice(n,r+1)),n=r+1}}return t}},new class extends c{tokenize(e){return e.split(/([{}:;,]|\s+)/)}},new class extends c{constructor(){super(...arguments),this.tokenize=E}get useLongestToken(){return!0}castInput(e,t){let{undefinedReplacement:n,stringifyReplacer:r=(e,t)=>t===void 0?n:t}=t;return typeof e==`string`?e:JSON.stringify(O(e,null,null,r),null,` `)}equals(e,t,n){return super.equals(e.replace(/,([\r\n])/g,`$1`),t.replace(/,([\r\n])/g,`$1`),n)}};function O(e,t,n,r,i){t||=[],n||=[],r&&(e=r(i===void 0?``:i,e));let a;for(a=0;a<t.length;a+=1)if(t[a]===e)return n[a];let o;if(Object.prototype.toString.call(e)===`[object Array]`){for(t.push(e),o=Array(e.length),n.push(o),a=0;a<e.length;a+=1)o[a]=O(e[a],t,n,r,String(a));return t.pop(),n.pop(),o}if(e&&e.toJSON&&(e=e.toJSON()),typeof e==`object`&&e){t.push(e),o={},n.push(o);let i=[],s;for(s in e)Object.prototype.hasOwnProperty.call(e,s)&&i.push(s);for(i.sort(),a=0;a<i.length;a+=1)s=i[a],o[s]=O(e[s],t,n,r,s);t.pop(),n.pop()}else o=e;return o}new class extends c{tokenize(e){return e.slice()}join(e){return e}removeEmpty(e){return e}};var k=Object.assign(t({__name:`CodeDiff`,props:{from:{},to:{},lang:{}},setup(t){let c=t,l=/class="shiki/,u=/class="line"/g;function d(e,t){let n=T(e.trim(),t.trim()),r=[],i=[],a=[];for(let e of n){let t=e.value.trimEnd().split(`
|
|
7
7
|
`);for(let n of t)e.added?(r.push(a.length),a.push(n)):(e.removed&&i.push(a.length),a.push(n))}return{added:r,removed:i,result:a.join(`
|
|
8
|
-
`)}}let f=a(()=>d(c.from,c.to));function p(e){let t=0;return e.replace(l,`class="shiki diff`).replace(u,e=>(t++,f.value.added.includes(t-1)?`class="line line-added"`:f.value.removed.includes(t-1)?`class="line line-removed"`:e))}let m=
|
|
8
|
+
`)}}let f=a(()=>d(c.from,c.to));function p(e){let t=0;return e.replace(l,`class="shiki diff`).replace(u,e=>(t++,f.value.added.includes(t-1)?`class="line line-added"`:f.value.removed.includes(t-1)?`class="line line-removed"`:e))}let m=e();n(h);function h(){let e=o(m);e&&e.querySelector(`.line-added,.line-removed`)?.scrollIntoView()}return(e,n)=>{let a=s;return r(),i(a,{ref_key:`elRef`,ref:m,code:f.value.result,lang:t.lang,"transform-rendered":p,onLoaded:h},null,8,[`code`,`lang`])}}}),{__name:`CodeDiff`});export{k as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{C as e,S as t,T as n,Tt as r,W as i,Y as a,Zt as o,_ as s,ct as c,en as l,g as u,h as d,jt as f,m as p,p as m,s as h,ut as g}from"./vendor/json-editor-vue-c7zwcfg4.js";import{O as _,n as v}from"#entry";import{t as y}from"./ncode-block-jv3jk7c5.js";function b(e){return typeof e==`string`?`'${e}'`:new x().serialize(e)}var x=function(){class e{#e=new Map;compare(e,t){let n=typeof e,r=typeof t;return n===`string`&&r===`string`?e.localeCompare(t):n===`number`&&r===`number`?e-t:String.prototype.localeCompare.call(this.serialize(e,!0),this.serialize(t,!0))}serialize(e,t){if(e===null)return`null`;switch(typeof e){case`string`:return t?e:`'${e}'`;case`bigint`:return`${e}n`;case`object`:return this.$object(e);case`function`:return this.$function(e)}return String(e)}serializeObject(e){let t=Object.prototype.toString.call(e);if(t!==`[object Object]`)return this.serializeBuiltInType(t.length<10?`unknown:${t}`:t.slice(8,-1),e);let n=e.constructor,r=n===Object||n===void 0?``:n.name;if(r!==``&&globalThis[r]===n)return this.serializeBuiltInType(r,e);if(typeof e.toJSON==`function`){let t=e.toJSON();return r+(typeof t==`object`&&t?this.$object(t):`(${this.serialize(t)})`)}return this.serializeObjectEntries(r,Object.entries(e))}serializeBuiltInType(e,t){let n=this[`$`+e];if(n)return n.call(this,t);if(typeof t?.entries==`function`)return this.serializeObjectEntries(e,t.entries());throw Error(`Cannot serialize ${e}`)}serializeObjectEntries(e,t){let n=Array.from(t).sort((e,t)=>this.compare(e[0],t[0])),r=`${e}{`;for(let e=0;e<n.length;e++){let[t,i]=n[e];r+=`${this.serialize(t,!0)}:${this.serialize(i)}`,e<n.length-1&&(r+=`,`)}return r+`}`}$object(e){let t=this.#e.get(e);return t===void 0&&(this.#e.set(e,`#${this.#e.size}`),t=this.serializeObject(e),this.#e.set(e,t)),t}$function(e){let t=Function.prototype.toString.call(e);return t.slice(-15)===`[native code] }`?`${e.name||``}()[native]`:`${e.name}(${e.length})${t.replace(/\s*\n\s*/g,``)}`}$Array(e){let t=`[`;for(let n=0;n<e.length;n++)t+=this.serialize(e[n]),n<e.length-1&&(t+=`,`);return t+`]`}$Date(e){try{return`Date(${e.toISOString()})`}catch{return`Date(null)`}}$ArrayBuffer(e){return`ArrayBuffer[${new Uint8Array(e).join(`,`)}]`}$Set(e){return`Set${this.$Array(Array.from(e).sort((e,t)=>this.compare(e,t)))}`}$Map(e){return this.serializeObjectEntries(`Map`,e.entries())}}for(let t of[`Error`,`RegExp`,`URL`])e.prototype[`$`+t]=function(e){return`${t}(${e})`};for(let t of[`Int8Array`,`Uint8Array`,`Uint8ClampedArray`,`Int16Array`,`Uint16Array`,`Int32Array`,`Uint32Array`,`Float32Array`,`Float64Array`])e.prototype[`$`+t]=function(e){return`${t}[${e.join(`,`)}]`};for(let t of[`BigInt64Array`,`BigUint64Array`])e.prototype[`$`+t]=function(e){return`${t}[${e.join(`n,`)}${e.length>0?`n`:``}]`};return e}();function S(e,t){return e===t||b(e)===b(t)}var C=[1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225],w=[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],T=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_`,E=[],D=class{_data=new O;_hash=new O([...C]);_nDataBytes=0;_minBufferSize=0;finalize(e){e&&this._append(e);let t=this._nDataBytes*8,n=this._data.sigBytes*8;return this._data.words[n>>>5]|=128<<24-n%32,this._data.words[(n+64>>>9<<4)+14]=Math.floor(t/4294967296),this._data.words[(n+64>>>9<<4)+15]=t,this._data.sigBytes=this._data.words.length*4,this._process(),this._hash}_doProcessBlock(e,t){let n=this._hash.words,r=n[0],i=n[1],a=n[2],o=n[3],s=n[4],c=n[5],l=n[6],u=n[7];for(let n=0;n<64;n++){if(n<16)E[n]=e[t+n]|0;else{let e=E[n-15],t=(e<<25|e>>>7)^(e<<14|e>>>18)^e>>>3,r=E[n-2],i=(r<<15|r>>>17)^(r<<13|r>>>19)^r>>>10;E[n]=t+E[n-7]+i+E[n-16]}let d=s&c^~s&l,f=r&i^r&a^i&a,p=(r<<30|r>>>2)^(r<<19|r>>>13)^(r<<10|r>>>22),m=(s<<26|s>>>6)^(s<<21|s>>>11)^(s<<7|s>>>25),h=u+m+d+w[n]+E[n],g=p+f;u=l,l=c,c=s,s=o+h|0,o=a,a=i,i=r,r=h+g|0}n[0]=n[0]+r|0,n[1]=n[1]+i|0,n[2]=n[2]+a|0,n[3]=n[3]+o|0,n[4]=n[4]+s|0,n[5]=n[5]+c|0,n[6]=n[6]+l|0,n[7]=n[7]+u|0}_append(e){typeof e==`string`&&(e=O.fromUtf8(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes}_process(e){let t,n=this._data.sigBytes/64;n=e?Math.ceil(n):Math.max((n|0)-this._minBufferSize,0);let r=n*16,i=Math.min(r*4,this._data.sigBytes);if(r){for(let e=0;e<r;e+=16)this._doProcessBlock(this._data.words,e);t=this._data.words.splice(0,r),this._data.sigBytes-=i}return new O(t,i)}},O=class e{words;sigBytes;constructor(e,t){e=this.words=e||[],this.sigBytes=t===void 0?e.length*4:t}static fromUtf8(t){let n=unescape(encodeURIComponent(t)),r=n.length,i=[];for(let e=0;e<r;e++)i[e>>>2]|=(n.charCodeAt(e)&255)<<24-e%4*8;return new e(i,r)}toBase64(){let e=[];for(let t=0;t<this.sigBytes;t+=3){let n=this.words[t>>>2]>>>24-t%4*8&255,r=this.words[t+1>>>2]>>>24-(t+1)%4*8&255,i=this.words[t+2>>>2]>>>24-(t+2)%4*8&255,a=n<<16|r<<8|i;for(let n=0;n<4&&t*8+n*6<this.sigBytes*8;n++)e.push(T.charAt(a>>>6*(3-n)&63))}return e.join(``)}concat(e){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 t=0;t<e.sigBytes;t++){let n=e.words[t>>>2]>>>24-t%4*8&255;this.words[this.sigBytes+t>>>2]|=n<<24-(this.sigBytes+t)%4*8}else for(let t=0;t<e.sigBytes;t+=4)this.words[this.sigBytes+t>>>2]=e.words[t>>>2];this.sigBytes+=e.sigBytes}};function k(e){return new D().finalize(e).toBase64()}function A(e){return k(b(e))}var j={key:0,relative:``,"n-code-block":``},M={flex:`~ wrap`,"w-full":``},N=[`onClick`],P={flex:`~ gap-2`,px3:``,pb3:``,n:`sm primary`},F=Object.assign(n({__name:`CodeSnippets`,props:{codeSnippets:{},eventType:{}},setup(n){let b=n,x=r(b.codeSnippets[0]),S=v(),C=m(()=>x.value?.lang||`text`);return c(()=>{b.codeSnippets.includes(x.value)||(x.value=b.codeSnippets[0])}),(r,c)=>{let m=y,v=_;return n.codeSnippets.length?(i(),s(`div`,j,[p(`div`,M,[(i(!0),s(h,null,a(n.codeSnippets,(e,t)=>(i(),s(`button`,{key:t,px4:``,py2:``,border:`r base`,hover:`bg-active`,class:o(e===x.value?``:`border-b`),onClick:t=>x.value=e},[p(`div`,{class:o(e===x.value?``:`op30`),"font-mono":``},l(e.name),3)],10,N))),128)),c[1]||=p(`div`,{border:`b base`,"flex-auto":``},null,-1)]),x.value?(i(),s(h,{key:0},[e(m,{code:x.value.code,lang:C.value,lines:!1,"w-full":``,"of-auto":``,p3:``},null,8,[`code`,`lang`]),p(`div`,P,[e(v,{icon:`carbon-copy`,onClick:c[0]||=e=>f(S)(x.value.code,n.eventType||`code-snippet-${x.value.name}`)},{default:g(()=>[...c[2]||=[t(` Copy `,-1)]]),_:1}),x.value?.docs?(i(),d(v,{key:0,to:x.value.docs,target:`_blank`,icon:`carbon-catalog`},{default:g(()=>[...c[3]||=[t(` Docs `,-1)]]),_:1},8,[`to`])):u(``,!0)])],64)):u(``,!0)])):u(``,!0)}}}),{__name:`CodeSnippets`});export{A as n,S as r,F as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{$ as e,C as t,P as n,Q as r,S as i,St as a,T as o,Tt as s,V as c,W as l,X as u,Y as d,Z as f,Zt as p,_ as m,_t as h,dt as g,en as _,g as v,h as y,jt as b,m as x,p as S,s as C,st as ee,ut as w}from"./vendor/json-editor-vue-c7zwcfg4.js";import{C as T,E,F as te,L as D,c as O,i as k,n as A,y as ne}from"./utils-h3uzf8s7.js";import{z as re}from"./rpc-jaaujnev.js";import{t as j}from"./storage-options-g42elkwy.js";import{t as M}from"./_plugin-vue_export-helper-d9irwgla.js";import{A as N,O as P,d as F,n as I,v as L}from"#entry";import{t as ie}from"./ndrawer-myfvks89.js";import{t as R}from"./composables-ioamscf4.js";import{t as z}from"./ncheckbox-jr3c6e4e.js";import{t as B}from"./filepath-item-b7ye3und.js";import{t as V}from"./help-fab-l6k9jkcj.js";import{t as H}from"./nnavbar-bvq6rk5u.js";import{t as U}from"./nicon-title-66kg2f9l.js";import{t as W}from"./nsection-block-illvvuef.js";import{n as G}from"./dist-das2ggjj.js";import{t as K}from"./nbadge-254fd0s4.js";import{n as q,t as J}from"./vendor/vis-izx2wksk.js";import{t as Y}from"./nselect-tabs-f47fcdsg.js";import{n as X,t as ae}from"./state-components-eipbhsbn.js";var oe={},se={class:`markdown-body`};function ce(e,t){return l(),m(`div`,se,[...t[0]||=[x(`template`,null,[x(`div`,{class:`markdown-body`},[x(`h1`,null,`Components`),x(`p`,null,`Vue Components allow us to split the UI into independent and reusable pieces, and think about each piece in isolation. This is very similar to how we nest native HTML elements, but Vue implements its own component model that allow us to encapsulate custom content and logic in each component.`),x(`p`,null,`Components placed in the components/ directory are automatically registered by Nuxt. They can be used in your templates without importing them.`),x(`p`,null,[x(`a`,{href:`https://nuxt.com/docs/guide/directory-structure/components`,target:`_blank`,rel:`noopener`},`Learn more in the documentation`)])])],-1)]])}var le=M(oe,[[`render`,ce]]),ue={"text-sm":``,"font-mono":``},Z=Object.assign(o({__name:`ComponentName`,props:{component:{}},setup(e){let t=e,n=S(()=>t.component.pascalName||G(t.component.name||t.component.__name||t.component.kebabName||``));return(e,t)=>(l(),m(`code`,ue,[t[0]||=x(`span`,{mr1:``,op20:``},`<`,-1),i(_(n.value),1),t[1]||=x(`span`,{ml1:``,op20:``},`/>`,-1)]))}}),{__name:`ComponentName`}),Q={flex:`~ col gap1`,"items-start":``,"of-hidden":``},de={flex:`~ gap2 items-center`,px3:``},fe={px3:``,pb2:``},pe={key:0,border:`t base`,"max-h-60":``,"w-full":``,"of-auto":``,px3:``,py3:``},me={"text-sm":``},he={"text-primary":``},ge={key:0,flex:`~ col gap-2`,"items-start":``,pt3:``,"text-sm":``,op75:``},_e={key:1,border:`t base`,"max-h-60":``,"w-full":``,"of-auto":``,px3:``,py3:``},ve={"text-sm":``},ye={"text-primary":``},be={key:0,flex:`~ col gap-2`,"items-start":``,pt3:``,"text-sm":``,op75:``},$=Object.assign(o({__name:`ComponentDetails`,props:{component:{},dependencies:{},dependents:{}},setup(e){let n=e,r=S(()=>n.component.pascalName||G(n.component.name||n.component.__name||n.component.kebabName||``)),a=S(()=>n.component.filePath||n.component.file||n.component.__file||``),o=I();return(n,s)=>{let c=Z,f=P,p=K,h=B;return l(),m(`div`,Q,[x(`div`,de,[t(c,{component:e.component},null,8,[`component`]),e.component.meta?.docs&&typeof e.component.meta.docs==`string`?(l(),y(f,{key:0,title:`Open docs`,"flex-none":``,n:`xs`,to:e.component.meta.docs,target:`_blank`,icon:`carbon-catalog`},{default:w(()=>[...s[1]||=[i(` Docs `,-1)]]),_:1},8,[`to`])):v(``,!0),t(f,{title:`Copy name`,"flex-none":``,n:`xs`,icon:`carbon-copy`,onClick:s[0]||=e=>b(o)(`<${r.value}></${r.value}>`,`component-name`)},{default:w(()=>[...s[2]||=[i(` Copy `,-1)]]),_:1}),e.component.global?(l(),y(p,{key:1,n:`green`,title:`Registered at runtime as a global component`,textContent:`runtime`})):v(``,!0)]),x(`div`,fe,[a.value?(l(),y(h,{key:0,filepath:a.value,"w-full":``,"text-sm":``,op40:``,"group-hover:op75":``},null,8,[`filepath`])):v(``,!0)]),e.dependents?(l(),m(`div`,pe,[x(`div`,me,[x(`strong`,he,_(e.dependents.length),1),s[3]||=x(`span`,{op50:``},` references`,-1)]),e.dependents.length?(l(),m(`div`,ge,[(l(!0),m(C,null,d(e.dependents,e=>(l(),y(h,{key:e,filepath:e},null,8,[`filepath`]))),128))])):v(``,!0)])):v(``,!0),e.dependencies?(l(),m(`div`,_e,[x(`div`,ve,[x(`strong`,ye,_(e.dependencies.length),1),s[4]||=x(`span`,{op50:``},` dependencies`,-1)]),e.dependencies.length?(l(),m(`div`,be,[(l(!0),m(C,null,d(e.dependencies,e=>(l(),y(h,{key:e,filepath:e},null,8,[`filepath`]))),128))])):v(``,!0)])):v(``,!0),u(n.$slots,`default`)])}}}),{__name:`ComponentDetails`}),xe={flex:`~ gap-x-3 gap-y-1 wrap`,"w-full":``},Se={relative:``,"h-full":``,"w-full":``},Ce={key:0,py4:``,pt3:``,flex:`~ col`},we={border:`t base`,p4:``},Te=Object.assign(o({__name:`ComponentsGraph`,props:{components:{},relationships:{}},setup(e){let n=e,r=a(),o=a(),d=te(),f=s(),p=E(),g=T(),_=ne(),{componentsGraphShowNodeModules:y,componentsGraphShowGlobalComponents:D,componentsGraphShowPages:O,componentsGraphShowLayouts:k,componentsGraphShowWorkspace:A}=j(`ui`),M=a(),N=a(``),F=re(N,300),I=S(()=>{let e=n.relationships||[];if(M.value){let t=new Set;function n(r){!r||t.has(r)||(t.add(r),r.deps.forEach(t=>{n(e.find(e=>e.id===t))}))}return n(M.value),[...t]}return e}),R=S(()=>{let e=I.value.map(e=>{let t=n.components.find(t=>t.filePath===e.id),r=p.value?.find(t=>t.file===e.id),i=_.value?.find(t=>t.file===e.id),a=e.id.includes(`/node_modules/`)?`lib`:t?t.global?`global`:`user`:i?`layout`:r?`page`:`unknown`;if(!y.value&&a===`lib`||!O.value&&a===`page`||!k.value&&a===`layout`||!A.value&&a===`user`&&g.value&&!e.id.startsWith(g.value.rootDir)||!D.value&&a===`global`)return null;let o=a===`layout`?`hexagon`:a===`page`?`square`:`dot`,s=F.value&&!e.id.toLowerCase().includes(F.value.toLowerCase());return{id:e.id,label:Y(e.id),group:a,shape:o,size:15+Math.min(e.deps.length/2,8),font:{color:s?`#8885`:d.value===`dark`?`white`:`black`},color:s?`#8885`:M.value?.id===e.id?`#82c742`:void 0,extra:{id:e.id,component:t,page:r,layout:i,relationship:e}}}).filter(e=>!!e),t=I.value.flatMap(e=>e.deps.map(t=>({from:e.id,to:t,arrows:{to:{enabled:!0,scaleFactor:.8}}})));return{nodes:new q(e),edges:t}}),B=S(()=>f.value?.component?(n.relationships?.find(e=>e.id===f.value?.component?.filePath)?.deps)?.map(e=>n.relationships?.find(t=>t.id===e)?.id).filter(Boolean):[]),V=S(()=>f.value?.component?(n.relationships?.filter(e=>e.deps.includes(f.value.component.filePath)))?.map(e=>n.relationships?.find(t=>t.id===e.id)?.id).filter(Boolean):[]);c(()=>{let e=new J(r.value,R.value,{nodes:{shape:`dot`,size:16},physics:{repulsion:{centralGravity:.7,springLength:100,springConstant:.01},maxVelocity:146,solver:`forceAtlas2Based`,timestep:.35,stabilization:{enabled:!0,iterations:200}},groups:{user:{color:`#42b883`},unknown:{color:`#b86542`},lib:{color:`#b4b842`},page:{color:`#42b2b8`},layout:{color:`#4256b8`}}});e.on(`click`,e=>{let t=e.nodes?.[0];f.value=R.value.nodes.get(t).extra}),ee(R,()=>{e.setData(R.value)})});function U(){f.value=void 0}let W=/.*\/components\//,G=/\.vue$/,K=/\/index$/;function Y(e){let t=n.components.find(t=>t.filePath===e);return t?t.pascalName:e.replace(W,``).replace(G,``).replace(K,``).split(`/`).map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(``)}function X(){M.value=f.value?.relationship,f.value=void 0}return(e,n)=>{let a=z,s=H,c=L,d=$,p=P,g=ie;return l(),m(C,null,[t(s,{ref_key:`navbar`,ref:o,search:N.value,"onUpdate:search":n[6]||=e=>N.value=e,absolute:``,"left-0":``,"right-0":``,"top-0":``},{actions:w(()=>[x(`div`,xe,[t(a,{modelValue:b(O),"onUpdate:modelValue":n[0]||=e=>h(O)?O.value=e:null,n:`primary sm`},{default:w(()=>[...n[8]||=[x(`span`,{op75:``},`Show pages`,-1)]]),_:1},8,[`modelValue`]),t(a,{modelValue:b(k),"onUpdate:modelValue":n[1]||=e=>h(k)?k.value=e:null,n:`primary sm`},{default:w(()=>[...n[9]||=[x(`span`,{op75:``},`Show layouts`,-1)]]),_:1},8,[`modelValue`]),t(a,{modelValue:b(A),"onUpdate:modelValue":n[2]||=e=>h(A)?A.value=e:null,n:`primary sm`},{default:w(()=>[...n[10]||=[x(`span`,{op75:``},`Show workspace`,-1)]]),_:1},8,[`modelValue`]),t(a,{modelValue:b(y),"onUpdate:modelValue":n[3]||=e=>h(y)?y.value=e:null,n:`primary sm`},{default:w(()=>[...n[11]||=[x(`span`,{op75:``},`Show node_modules`,-1)]]),_:1},8,[`modelValue`]),t(a,{modelValue:b(D),"onUpdate:modelValue":n[4]||=e=>h(D)?D.value=e:null,n:`primary sm`},{default:w(()=>[...n[12]||=[x(`span`,{op75:``},`Show global components`,-1)]]),_:1},8,[`modelValue`])]),M.value?(l(),m(`button`,{key:0,flex:`~ gap-1`,"flex-none":``,"items-center":``,"rounded-full":``,"bg-gray:20":``,py1:``,pl3:``,pr2:``,"text-xs":``,op50:``,"hover:op100":``,onClick:n[5]||=e=>M.value=void 0},[...n[13]||=[i(` Clear filter `,-1),x(`div`,{"i-carbon-close":``},null,-1)]])):v(``,!0),n[14]||=x(`div`,{"flex-auto":``},null,-1),u(e.$slots,`default`)]),_:3},8,[`search`]),x(`div`,Se,[x(`div`,{ref_key:`container`,ref:r,"h-full":``,"w-full":``},null,512),t(c,{absolute:``,"bottom-3":``,"left-3":``,"border-0":``,"n-glass-effect":``,p2:``,px3:``,"text-sm":``},{default:w(()=>[...n[15]||=[x(`div`,{grid:`~ cols-[20px_1fr] items-center gap-y-1`},[x(`div`,{"h-3":``,"w-3":``,"rounded-full":``,"bg-hex-42b883":``}),x(`div`,{op50:``},` Component `),x(`div`,{"h-3":``,"w-3":``,"rounded-full":``,"bg-hex-97c2fc":``}),x(`div`,{op50:``},` Global Component `),x(`div`,{"h-3":``,"w-3":``,"bg-hex-42b2b8":``}),x(`div`,{op50:``},` Page `),x(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 726 628`,"ml--1px":``,"h-3":``},[x(`path`,{fill:`#4256b8`,"stroke-width":`4`,d:`M723 314 543 625.8H183L3 314 183 2.2h360L723 314z`})]),x(`div`,{op50:``},` Layout `),x(`div`,{"h-3":``,"w-3":``,"rounded-full":``,"bg-hex-b4b842":``}),x(`div`,{op50:``},` Library Component `),x(`div`,{"h-3":``,"w-3":``,"rounded-full":``,"bg-hex-b86542":``}),x(`div`,{op50:``},` Unknown `)],-1)]]),_:1}),t(g,{"model-value":!!(f.value&&f.value.component),top:o.value,border:`t l base`,"w-80":``,onClose:U},{default:w(()=>[f.value&&f.value.component?(l(),m(`div`,Ce,[t(d,{component:f.value.component,dependencies:B.value,dependents:V.value},null,8,[`component`,`dependencies`,`dependents`]),x(`div`,we,[t(p,{n:`primary solid`,onClick:n[7]||=e=>X()},{default:w(()=>[...n[16]||=[i(` Filter to this component `,-1)]]),_:1})])])):v(``,!0)]),_:1},8,[`model-value`,`top`])])],64)}}}),{__name:`ComponentsGraph`}),Ee={hover:`bg-active`,class:`group`,flex:`~ gap2`,"w-full":``,"items-center":``,rounded:``,px2:``,py1:``},De={key:0,"ml--1":``,"text-primary":``},Oe=Object.assign(o({__name:`ComponentItem`,props:{component:{},dependencies:{},dependents:{}},setup(e){let n=e,r=S(()=>n.component.filePath||n.component.file||n.component.__file||``);return(n,i)=>{let a=Z,o=$,s=f(`VDropdown`),c=K,d=B;return l(),m(`div`,Ee,[t(s,null,{popper:w(()=>[t(o,{component:e.component,dependencies:e.dependencies,dependents:e.dependents,"w-100":``,pt3:``},null,8,[`component`,`dependencies`,`dependents`])]),default:w(()=>[x(`button`,{"hover:text-primary":``,class:p(e.dependents&&e.dependents.length===0?`op50`:``)},[t(a,{component:e.component},null,8,[`component`])],2)]),_:1}),e.dependents?.length?(l(),m(`sup`,De,` x`+_(e.dependents?.length),1)):v(``,!0),e.component.global?(l(),y(c,{key:1,n:`green`,title:`Registered at runtime as a global component`,textContent:`runtime`})):v(``,!0),u(n.$slots,`default`),r.value?(l(),y(d,{key:2,filepath:r.value,"text-sm":``,op25:``,"group-hover:op75":``},null,8,[`filepath`])):v(``,!0)])}}}),{__name:`ComponentItem`}),ke={flex:`~ gap-2 items-center`},Ae={pl4:``},je=Object.assign(o({__name:`ComponentsList`,props:{components:{},relationships:{}},setup(e){let r=e,i=a(``),o=a(`all`),s=S(()=>{let e=r.components.map(e=>A(e,r.relationships));return o.value===`using`?e.filter(e=>e.dependents?.length):o.value===`not-used`?e.filter(e=>!e.dependents?.length):e}),c={ClientOnly:`https://nuxt.com/docs/api/components/client-only`,DevOnly:`https://nuxt.com/docs/api/components/dev-only`,NuxtClientFallback:`https://nuxt.com/docs/api/components/nuxt-client-fallback`,NuxtPicture:`https://nuxt.com/docs/api/components/nuxt-picture`,NuxtRouteAnnouncer:`https://nuxt.com/docs/api/components/nuxt-route-announcer`,NuxtTime:`https://nuxt.com/docs/api/components/nuxt-time`,NuxtPage:`https://nuxt.com/docs/api/components/nuxt-page`,NuxtLayout:`https://nuxt.com/docs/api/components/nuxt-layout`,NuxtLink:`https://nuxt.com/docs/api/components/nuxt-link`,NuxtLoadingIndicator:`https://nuxt.com/docs/api/components/nuxt-loading-indicator`,NuxtErrorBoundary:`https://nuxt.com/docs/api/components/nuxt-error-boundary`,NuxtWelcome:`https://nuxt.com/docs/api/components/nuxt-welcome`,NuxtIsland:`https://nuxt.com/docs/api/components/nuxt-island`,NuxtImg:`https://nuxt.com/docs/api/components/nuxt-img`},f=S(()=>new F(s.value,{keys:[`component.pascalName`,`component.filePath`,`component.kebabName`]})),p=S(()=>{let e=[],t=new Map,n=[],r=[],a={user:0,lib:0,builtin:0,runtime:0};return(i.value?f.value.search(i.value).map(e=>e.item):s.value).forEach(i=>{let o=i.component;if(o.filePath&&O(o.filePath)){let e=k(o.filePath);if(!e)return;e===`nuxt`?(o.meta??={},o.meta.docs??=c?.[o.pascalName],n.push(i),a.builtin++):(t.has(e)||t.set(e,[]),t.get(e).push(i),a.lib++)}else o.global&&!o.filePath?(r.push(i),a.runtime++):(e.push(i),a.user++)}),{count:a,user:e,builtin:n,lib:t,runtime:r}});return(e,r)=>{let a=N,s=Y,c=H,f=Oe,h=W,g=U;return l(),m(C,null,[t(c,{search:i.value,"onUpdate:search":r[1]||=e=>i.value=e,pb3:``},{actions:w(()=>[u(e.$slots,`default`)]),default:w(()=>[x(`div`,ke,[t(a,{icon:`carbon-filter`,op50:``}),t(s,{modelValue:o.value,"onUpdate:modelValue":r[0]||=e=>o.value=e,n:`primary sm`,options:[{label:`All`,value:`all`},{label:`Using`,value:`using`},{label:`Not used`,value:`not-used`}]},null,8,[`modelValue`])])]),_:3},8,[`search`]),p.value.user.length?(l(),y(h,{key:0,icon:`carbon-nominal`,text:`User components`,open:p.value.user.length<=b(50),description:`Total components: ${p.value.count.user}`},{default:w(()=>[(l(!0),m(C,null,d(p.value.user,e=>(l(),y(f,n({key:e.component.filePath},{ref_for:!0},e),null,16))),128))]),_:1},8,[`open`,`description`])):v(``,!0),p.value.runtime.length?(l(),y(h,{key:1,icon:`carbon-load-balancer-global`,open:p.value.runtime.length<=b(50),text:`Runtime components`,description:`Total components: ${p.value.count.runtime}`},{default:w(()=>[(l(!0),m(C,null,d(p.value.runtime,e=>(l(),y(f,n({key:e.component.filePath},{ref_for:!0},e),null,16))),128))]),_:1},8,[`open`,`description`])):v(``,!0),p.value.builtin.length?(l(),y(h,{key:2,icon:`simple-icons-nuxtdotjs`,text:`Built-in components`,description:`Total components: ${p.value.count.builtin}`},{default:w(()=>[(l(!0),m(C,null,d(p.value.builtin,e=>(l(),y(f,n({key:e.component.filePath},{ref_for:!0},e),null,16))),128))]),_:1},8,[`description`])):v(``,!0),p.value.lib.size?(l(),y(h,{key:3,open:p.value.count.lib<=b(50),icon:`carbon-3d-mpr-toggle`,text:`Components from libraries`,description:`${p.value.count.lib} components from ${p.value.lib.size} packages`},{default:w(()=>[(l(!0),m(C,null,d(p.value.lib.entries(),([e,r])=>(l(),m(`div`,{key:e,"ml-2":``},[t(g,{text:`${e} (${r.length})`,py1:``,op50:``},null,8,[`text`]),x(`div`,Ae,[(l(!0),m(C,null,d(r,e=>(l(),y(f,n({key:e.component.filePath},{ref_for:!0},e),null,16))),128))])]))),128))]),_:1},8,[`open`,`description`])):v(``,!0)],64)}}}),{__name:`ComponentsList`}),Me={relative:``,"h-full":``,"of-auto":``},Ne={"flex-none":``,flex:`~ gap3`},Pe=o({__name:`components`,setup(n){R({icon:`i-carbon-assembly-cluster`,title:`Components`,order:2});let i=D(),a=ae(),o=X(),{componentsView:s}=j(`ui`);function c(){i.value?.inspector?.enable()}function u(){s.value=s.value===`list`?`graph`:`list`}return(n,d)=>{let f=P,p=le,h=V,_=r(`tooltip`);return l(),m(C,null,[x(`div`,Me,[(l(),y(e(b(s)===`list`?je:Te),{components:b(a),relationships:b(o)},{default:w(()=>[x(`div`,Ne,[g(t(f,{"text-lg":``,border:!1,icon:b(s)===`graph`?`i-carbon-list`:`i-carbon-network-4`,title:`Toggle view`,onClick:u},null,8,[`icon`]),[[_,`Toggle View`,void 0,{"bottom-end":!0}]]),b(i)?.inspector?.isAvailable?g((l(),y(f,{key:0,"text-lg":``,border:!1,icon:`i-tabler-focus-2`,title:`Inspect Vue components`,onClick:c},null,512)),[[_,`Inspect Vue components`,void 0,{"bottom-end":!0}]]):v(``,!0)])]),_:1},8,[`components`,`relationships`]))]),t(h,null,{default:w(()=>[t(p)]),_:1})],64)}}});export{Pe as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{C as e,S as t,T as n,W as r,Y as i,Z as a,Zt as o,_ as s,en as c,g as l,h as u,jt as d,m as f,p,s as m,ut as h}from"./vendor/json-editor-vue-c7zwcfg4.js";import{A as g,O as _,n as v,r as y}from"#entry";import{t as b}from"./filepath-item-b7ye3und.js";import{t as x}from"./constants-g2z8m4rs.js";import{t as S}from"./dist-das2ggjj.js";import{t as C}from"./nmarkdown-nskcr8pg.js";var w={rounded:``,"font-mono":``},T={key:0,"text-primary":``},E={key:0},D={title:`Vue Directive`},O={"max-w-100":``},k={px4:``,py3:``,"text-sm":``},A={flex:`~ gap2`,n:`primary xs`},j={border:`t base`,"max-h-60":``,"of-auto":``,px4:``,py3:``},M={"text-sm":``},N={"text-primary":``},P={flex:`~ col gap-2`,"items-start":``,pt3:``,"text-sm":``,op75:``},F={key:1,"text-sm":``,op50:``},I=Object.assign(n({__name:`ComposableItem`,props:{item:{},isDirective:{type:Boolean,default:!1},metadata:{},filepath:{},counter:{type:Boolean,default:!0},classes:{default:`px2 py1 text-sm bg-gray:5 `}},setup(n){let I=n,L=v(),R=y(),z=p(()=>I.item.as||I.item.name),B=p(()=>{let e=z.value;return I.isDirective&&(e[0]!==`v`&&(e=`v${e}`),e=S(e)),e}),V=p(()=>I.metadata?.injectionsUsageMap?.get(z.value)?.count||0),H=p(()=>(I.metadata?.injectionsUsageMap?.get(z.value)?.moduleIds||[]).filter(e=>!e.endsWith(`?macro=true`))),U=p(()=>I.item.meta?.docsUrl?I.item.meta.docsUrl:[`nuxt`,`#app`,`nuxt3`].includes(I.item.from)?x.nuxt[I.item.name]:I.item.from===`vue`?x.vue[I.item.name]:null);return(p,v)=>{let y=g,x=C,S=_,W=b,G=a(`VDropdown`);return r(),u(G,{disabled:!I.metadata},{popper:h(()=>[f(`div`,O,[f(`div`,k,[n.item.meta?.description?(r(),u(x,{key:0,tag:`div`,pb3:``,"text-sm":``,markdown:n.item.meta.description},null,8,[`markdown`])):l(``,!0),f(`div`,A,[e(S,{icon:`carbon-copy`,onClick:v[0]||=e=>d(L)(B.value,`imports-name`)},{default:h(()=>[...v[2]||=[t(` Copy `,-1)]]),_:1}),n.filepath?(r(),u(S,{key:0,icon:`carbon-code`,onClick:v[1]||=e=>n.filepath&&d(R)(n.filepath)},{default:h(()=>[...v[3]||=[t(` Source `,-1)]]),_:1})):l(``,!0),U.value?(r(),u(S,{key:1,icon:`carbon-catalog`,to:U.value,target:`_blank`},{default:h(()=>[...v[4]||=[t(` Docs `,-1)]]),_:1},8,[`to`])):l(``,!0)])]),f(`div`,j,[V.value?(r(),s(m,{key:0},[f(`div`,M,[v[5]||=f(`span`,{op50:``},`It has been referenced `,-1),f(`strong`,N,c(V.value),1),v[6]||=f(`span`,{op50:``},` times by:`,-1)]),f(`div`,P,[(r(!0),s(m,null,i(H.value,e=>(r(),u(W,{key:e,filepath:e},null,8,[`filepath`]))),128))])],64)):(r(),s(`div`,F,` Not in use via auto import. `))])])]),default:h(()=>[f(`button`,{"hover:text-primary":``,class:o([n.metadata&&!V.value?`op30 hover:op100`:``,n.classes])},[f(`code`,w,[t(c(z.value)+` `,1),V.value&&n.counter?(r(),s(`sup`,T,`x`+c(V.value),1)):l(``,!0)]),n.isDirective?(r(),s(`sup`,E,[f(`abbr`,D,[e(y,{icon:`tabler:hexagon-letter-d`})])])):l(``,!0)],2)]),_:1},8,[`disabled`])}}}),{__name:`ComposableItem`});export{I as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as e,h as t,i as n,v as r,x as i}from"./nuxt-hqfu72u1.js";import{A as a,E as o,I as s,R as c,St as l,_t as u,ct as d,ht as f,j as p,kt as m,z as h}from"./vendor/json-editor-vue-c7zwcfg4.js";var g=i({docsBase:e,reporters:r}),_=new Set([`link`,`style`,`script`,`noscript`]),v=new Set([`title`,`titleTemplate`,`script`,`style`,`noscript`]),y=new Set([`base`,`meta`,`link`,`style`,`script`,`noscript`]),b=new Set([`title`,`base`,`htmlAttrs`,`bodyAttrs`,`meta`,`link`,`style`,`script`,`noscript`]),x=new Set([`base`,`title`,`titleTemplate`,`bodyAttrs`,`htmlAttrs`,`templateParams`]),S=new Set([`key`,`tagPosition`,`tagPriority`,`tagDuplicateStrategy`,`innerHTML`,`textContent`,`processTemplateParams`]),C=new Set([`templateParams`,`htmlAttrs`,`bodyAttrs`]),w=new Set([`theme-color`,`google-site-verification`,`og`,`article`,`book`,`profile`,`twitter`,`author`]),T={critical:-8,high:-1,low:2};function E(e){return e===`__proto__`||e===`constructor`||e===`prototype`}function D(e){let n=new t;for(let t in e||{})n.hook(t,e[t]);return n}function O(e,t,n){if(e.hooks?._hooks?.[t]?.length)return e.hooks?.callHook(t,n)}var k=/^(?:viewport|description|keywords|robots)$/,A=[`name`,`property`,`http-equiv`];function j(e){let t=e.indexOf(`:`);if(t===-1)return!1;let n=e.indexOf(`:`,t+1);return w.has(e.slice(t+1,n===-1?e.length:n))}function M(e){let{props:t,tag:n,key:r}=e;if(x.has(n))return n;if(n===`link`){if(t.rel===`canonical`)return`canonical`;if(t.rel===`alternate`&&t.hreflang)return`alternate:${t.hreflang}`}if(t.charset)return`charset`;if(n===`meta`)for(let e of A){let n=t[e];if(n!==void 0)return`meta:${n}${(typeof n!=`string`||!n.includes(`:`))&&!k.test(n)&&r?`:key:${r}`:``}`}return r?`${n}:key:${r}`:t.id?`${n}:id:${t.id}`:n===`link`&&t.rel&&t.href?`link:${t.rel}:${t.href}`:v.has(n)&&(e.textContent||e.innerHTML)?`${n}:content:${e.textContent||e.innerHTML}`:void 0}function N(e){let t=e._h||e._d||e.textContent||e.innerHTML;if(t)return t;let n=Object.keys(e.props).sort(),r=`${e.tag}:`,i=``;for(let t of n)r+=`${i}${t}:${String(e.props[t])}`,i=`,`;return r}function P(e,t,n){if(n===`_resolver`)return e;typeof e==`function`&&(!n||n!==`titleTemplate`&&!n.startsWith(`on`))&&(e=e());let r=t?t(n,e):e;if(Array.isArray(r)){let e;for(let n=0;n<r.length;n++){let i=P(r[n],t);e?e[n]=i:i!==r[n]&&(e=r.slice(0,n),e[n]=i)}return e||r}if(r?.constructor===Object){let e;for(let n in r){let i=E(n),a=i?void 0:P(r[n],t,n);if(!e&&(i||a!==r[n])){e={};for(let t in r){if(t===n)break;e[t]=r[t]}}e&&!i&&(e[n]=a)}return e||r}return r}var F=/[\s"'<>/=\x00-\x1F\x7F]/;function I(e,t){let n=e===`style`,r=n?new Map:new Set,i=e=>{if(e)if(n){let t=e.indexOf(`:`);t>0&&r.set(e.slice(0,t).trim(),e.slice(t+1).trim())}else e.split(` `).forEach(e=>e&&r.add(e))};if(typeof t==`string`)(n?t.split(`;`):[t]).forEach(i);else if(Array.isArray(t))t.forEach(i);else if(t&&typeof t==`object`)for(let e in t){let a=t[e];a&&a!==`false`&&(n?r.set(e.trim(),String(a)):i(e))}return r}function L(e,t){if(e.props=e.props||{},!t)return e;if(e.tag===`templateParams`)return e.props=t,e;let n=y.has(e.tag)||e.tag===`htmlAttrs`||e.tag===`bodyAttrs`;for(let r in t){if(E(r))continue;let i=r.startsWith(`data-`),a=n&&!S.has(r),o=a&&!i?r.toLowerCase():r;if(a&&(!o||F.test(o)))continue;let s=t[r];if(s===null)e.props[o]=null;else if(r===`class`||r===`style`)e.props[r]=I(r,s);else if(S.has(r))if((r===`textContent`||r===`innerHTML`)&&typeof s==`object`){let n=t.type||`application/json`;(n.endsWith(`json`)||n===`speculationrules`||n===`importmap`)&&(e.props.type=t.type=n,e[r]=JSON.stringify(s))}else e[r]=s;else if(s!==void 0){let t=String(s),n=e.tag===`meta`&&o===`content`;e.props[o]=t===`true`||t===``?i||n?t:!0:!s&&i&&t===`false`?`false`:s}}return e}function R(e,t){let n=L({tag:e,props:{}},typeof t==`object`&&typeof t!=`function`?t:{[e===`script`||e===`noscript`||e===`style`?`innerHTML`:`textContent`]:t});if(n.key&&_.has(n.tag)&&(n.props[`data-hid`]=n._h=n.key),n.tag===`script`&&typeof n.innerHTML==`object`&&(n.innerHTML=JSON.stringify(n.innerHTML),n.props.type=n.props.type||`application/json`),Array.isArray(n.props.content)){let e=[];for(let t of n.props.content)e.push({...n,props:{...n.props,content:t}});return e}return n}function z(e,t){if(Array.isArray(t))for(let n of t)e.push(n);else e.push(t)}function B(e,t){if(!e)return[];typeof e==`function`&&(e=e());let n;t.length&&(n=(e,n)=>{for(let r=0;r<t.length;r++)n=t[r](e,n);return n},e=n(void 0,e)),e=P(e,n);let r=[];for(let t in e){let n=e[t];if(n!==void 0)if(Array.isArray(n))for(let e of n)z(r,R(t,e));else z(r,R(t,n))}return r}var ee=/</g,V=/<\/script/g,H=(e,t)=>e._w===t._w?e._p-t._p:e._w-t._w,U=()=>100;function W(e){for(let t in e)return!1;return!0}var G=/^tags:|:render/;function K(e,t){let n=(t[`entries:resolve`]?.length||0)+(t[`entries:normalize`]?.length||0);if(e._h!==n){e._h=n;for(let t of e.entries.values())delete t._tags}}function q(e){for(let t=0;t<e.length;t++){let n=e[t],r={...n.props};r.class instanceof Set&&(r.class=new Set(r.class)),r.style instanceof Map&&(r.style=new Map(r.style)),e[t]={...n,props:r}}}function J(e,t){let n=e.tags,r=0;for(let t of e.tagMap.values())if(Array.isArray(t))for(let e of t)n[r++]=e;else n[r++]=t;n.length=r,t&&n.sort(H)}function Y(e){let t=!1;for(let n of e.tags.sort(H)){let r=n._d||N(n);if(!r)continue;let i=e.tagMap.get(r);if(!i){e.tagMap.set(r,n);continue}if((n.tagDuplicateStrategy||(C.has(n.tag)?`merge`:null)||(n.key&&n.key===i.key?`merge`:null))===`merge`){let t={...i.props};for(let e in n.props)t[e]=e===`style`?new Map([...i.props.style||new Map,...n.props[e]]):e===`class`?new Set([...i.props.class||[],...n.props[e]]):n.props[e];e.tagMap.set(r,{...n,props:t})}else n._p>>10==i._p>>10&&n.tag===`meta`&&j(r)?(e.tagMap.set(r,Object.assign([...Array.isArray(i)?i:[i],n],n)),t=!0):(n._w===i._w?n._p>i._p:n._w<i._w)&&e.tagMap.set(r,n)}return t}function X(e,t){let n=e.tagMap.get(`title`),r=e.tagMap.get(`titleTemplate`);if(t._title=n?.textContent,!r)return;let i=r.textContent;if(t._titleTemplate=i,!i)return;let a=typeof i==`function`?i(n?.textContent):i;typeof a==`string`&&!t.plugins.has(`template-params`)&&(a=a.replace(`%s`,n?.textContent||``)),n?a===null?e.tagMap.delete(`title`):e.tagMap.set(`title`,{...n,textContent:a}):e.tagMap.set(`titleTemplate`,{...r,tag:`title`,textContent:a})}function Z(e){let t=0;for(let n of e){let{innerHTML:r,tag:i,props:a}=n;if(!(!b.has(i)||W(a)&&!r&&!n.textContent)&&!(i===`meta`&&!a.content&&!a[`http-equiv`]&&!a.charset)){if(i===`script`&&(r||n.textContent)){let e=String(a.type),t=e.endsWith(`json`)||e===`importmap`||e===`speculationrules`,i=e=>t?(typeof e==`string`?e:JSON.stringify(e)).replace(ee,`\\u003C`):typeof e==`string`?e.replace(V,`<\\/script`):e;n={...n},r&&(n.innerHTML=i(r)),n.textContent&&=i(n.textContent),n._d=M(n)}e[t++]=n}}return e.length=t,e}function Q(e,t){let n=t?.tagWeight??e.resolvedOptions._tagWeight??U,r={tagMap:new Map,tags:[]},i=e.hooks?._hooks||{};K(e,i);for(let t of e.entries.values())t._pending!==void 0&&(t.input=t._pending,delete t._pending,delete t._tags,delete t._precomputedTags);let a;(i[`entries:resolve`]?.length||i[`entries:normalize`]?.length)&&(a=[...e.entries.values()],i[`entries:resolve`]?.length&&O(e,`entries:resolve`,{entries:a,...r})),K(e,i);for(let t of a||e.entries.values()){let a=t._tags;if(!a)if(t._precomputedTags&&n===e.resolvedOptions._tagWeight&&!i[`entries:normalize`]?.length&&!i[`entries:resolve`]?.length&&(!t.options||W(t.options)))a=t._precomputedTags;else{if(a=B(t.input,e.resolvedOptions.propResolvers||[]),t.options&&!W(t.options))for(let e of a)Object.assign(e,t.options);if(i[`entries:normalize`]?.length){let n={tags:a,entry:t};O(e,`entries:normalize`,n),a=n.tags}for(let e=0;e<a.length;e++){let r=a[e];r._w=n(r),r._p=(t._i<<10)+e,r._d=M(r),r._d||(r._h=N(r))}t._tags=a}r.tags.push(...a)}for(let e in i)if(i[e]?.length&&G.test(e)){q(r.tags);break}let o=Y(r);return X(r,e),J(r,o),O(e,`tags:beforeResolve`,r),O(e,`tags:resolve`,r),O(e,`tags:afterResolve`,r),Z(r.tags)}var $=`usehead`;function te(){if(a()){let e=p($);if(e)return e}throw Error(`useHead() was called without provide context, ensure you call it through the setup() function.`)}function ne(e){return{install(t){t.config.globalProperties.$unhead=e,t.config.globalProperties.$head=e,t.provide($,e)}}.install}var re=Object.assign((e,t)=>u(t)?m(t):t,{_static:!0});function ie(e,t={}){let n=t.head||te();return n.ssr?n.push(e||{},t):ae(n,e,t)}function ae(e,t,n={}){let r=f();if(r&&!r.active)return{patch(){},dispose(){},_i:-1};let i=l(!1);if(n.onRendered&&r){let e=n.onRendered;n={...n,onRendered:t=>r.run(()=>e(t))}}let a;return d(()=>{let r=i.value?{}:P(t,re);a?a.patch(r):a=e.push(r,n)}),o()&&(c(()=>{a.dispose()}),h(()=>{i.value=!0}),s(()=>{i.value=!1})),a}function oe(e){let t=e||n();return t.ssrContext?.head||t.runWithContext(()=>{if(a()){let e=p(`usehead`);if(!e)throw g.NUXT_E6001();return e}})}function se(e,t={}){return ie(e,{head:t.head||oe(t.nuxt),...t})}export{j as a,O as c,T as d,N as i,D as l,ne as n,L as o,M as r,Q as s,se as t,y as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{$ as e,C as t,F as n,H as r,S as i,St as a,T as o,V as s,W as c,_ as l,bt as u,ct as d,en as f,h as p,jt as m,m as h,p as g,ut as _}from"./vendor/json-editor-vue-c7zwcfg4.js";import{b as v,y}from"./ready-if1s6ugr.js";import{F as b,V as x}from"./utils-h3uzf8s7.js";import{S,a as C}from"./rpc-jaaujnev.js";import{T as w,_ as T,v as E,w as D,x as O}from"#entry";import{t as k}from"./composables-ioamscf4.js";import{t as A}from"./auth-required-panel-gdnspumn.js";import{t as j}from"./launch-page-f3nbtoc4.js";var M=new Map,N=Object.assign(o({__name:`IframeView`,props:{tab:{}},setup(e){let t=e,i=b(),o=a(),f=g(()=>t.tab.name),p=a(),m=u(S(o));s(()=>{let e=t.tab.view,r=e.persistent!==!1,i=[`clipboard-write`,`clipboard-read`,...e.permissions||[]];if(M.get(f.value)&&r)p.value=M.get(f.value),p.value.style.visibility=`visible`;else{p.value=document.createElement(`iframe`),p.value.setAttribute(`allow`,i.join(`; `)),p.value.setAttribute(`aria-label`,`Nuxt Devtools`),r&&M.set(f.value,p.value),p.value.src=e.src;try{p.value.style.opacity=`0.01`,p.value.onload=()=>{v(),h(),p.value.style.opacity=`1`}}catch{p.value.style.opacity=`1`}document.body.appendChild(p.value),n(y)}setTimeout(h,100)}),d(y),d(h),d(v),r(()=>{p.value&&(p.value.style.visibility=`hidden`)});function h(){if(!(!p.value||!p.value.contentWindow))try{let e=p.value.contentWindow.document.querySelector(`html`);e?.classList.toggle(`dark`,i.value===`dark`),e?.classList.toggle(`light`,i.value===`dark`),new MutationObserver(()=>{i.value=p.value?.contentWindow?.document.querySelector(`html`)?.classList.contains(`dark`)?`dark`:`light`}).observe(e,{attributes:!0,attributeFilter:[`class`]})}catch{}}let _=x();function v(){if(!(!p.value||!p.value.contentWindow))try{p.value.contentWindow.__NUXT_DEVTOOLS__=_.value}catch{}}function y(){p.value&&Object.assign(p.value.style,{position:`fixed`,left:`${m.left}px`,top:`${m.top}px`,width:`${m.width}px`,height:`${m.height}px`,outline:`none`})}return(e,t)=>(c(),l(`div`,{ref_key:`anchor`,ref:o,"h-full":``,"w-full":``},null,512))}}),{__name:`IframeView`}),P={flex:`~ col gap2`,mxa:``,"items-center":``},F={"text-xl":``},I={"text-rose":``},L=o({__name:`custom-[name]`,props:{name:{}},setup(n){let r=n;k({layout:`full`});let a=y(),o=v(),l=g(()=>r.name??a.params.name),u=O(),d=g(()=>u.value.find(e=>e.name===l.value));return s(()=>{d.value?d.value.requireAuth&&!D.value&&w():setTimeout(()=>{d.value||o.push(`/modules/overview`)},2e3)}),(n,r)=>{let a=T,o=A,s=N,u=j,g=E;return d.value?d.value.requireAuth&&!m(D)?(c(),p(o,{key:1})):d.value.view.type===`iframe`?(c(),p(s,{key:2,tab:d.value},null,8,[`tab`])):d.value.view.type===`vnode`?(c(),p(e(d.value.view.vnode),{key:3})):d.value.view.type===`launch`?(c(),p(u,{key:4,name:`custom-${d.value.name}`,icon:d.value.view.icon||d.value.icon,title:d.value.view.title||d.value.title,description:d.value.view.description,actions:d.value.view.actions,onAction:r[0]||=e=>m(C).customTabAction(d.value.name,e)},null,8,[`name`,`icon`,`title`,`description`,`actions`])):(c(),p(a,{key:5},{default:_(()=>[t(g,{flex:`~ col`,"h-full":``,"items-center":``,"justify-center":``},{default:_(()=>[i(` Unknown tab type `+f(d.value.view),1)]),_:1})]),_:1})):(c(),p(a,{key:0},{default:_(()=>[h(`div`,P,[r[3]||=h(`div`,{"i-carbon-queued":``,mb2:``,"text-5xl":``,op50:``},null,-1),h(`p`,F,[r[1]||=i(` Tab `,-1),h(`code`,I,f(l.value),1),r[2]||=i(` not found `,-1)]),r[4]||=h(`p`,{op50:``},` It might because the module contributing this tab is not installed or enabled `,-1),r[5]||=h(`p`,{mt8:``,"animate-pulse":``},` Redirecting to overview page... `,-1)])]),_:1}))}}});export{L as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Q as e,T as t,W as n,dt as r,h as i}from"./vendor/json-editor-vue-c7zwcfg4.js";import{O as a,t as o}from"#entry";var s=Object.assign(t({__name:`DataSchemaButton`,props:{getter:{type:Function}},setup(t){let s=o();return(o,c)=>{let l=a,u=e(`tooltip`);return r((n(),i(l,{title:`Generate Data Schema`,icon:`carbon:container-services`,border:!1,onClick:c[0]||=e=>s.value=t.getter()},null,512)),[[u,`Generate Data Schema`]])}}}),{__name:`DataSchemaButton`});export{s as t};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{C as e,
|
|
2
|
-
`)}),L=d(()=>{let e=N.value.toLocaleLowerCase();return e.startsWith(`javascript`)?`javascript`:e.startsWith(`json`)?`json`:e.startsWith(`typescript`)?`typescript`:e});p(F,()=>{E.value++},{deep:!0}),p(N,()=>{F.value=P.value?.optionDefinitions.filter(e=>typeof e.defaultValue==`boolean`)});let R=
|
|
1
|
+
import{C as e,St as t,T as n,W as r,Y as i,_ as a,en as o,g as s,h as c,jt as l,m as u,p as d,s as f,st as p,u as m,ut as h}from"./vendor/json-editor-vue-c7zwcfg4.js";import{f as g}from"./rpc-jaaujnev.js";import{O as _,n as v,t as y}from"#entry";import{t as b}from"./nselect-hlo7a40m.js";import{t as x}from"./nswitch-iey7gi9t.js";import{t as S}from"./ndropdown-jnrvla1s.js";import{t as C}from"./ncode-block-jv3jk7c5.js";import{t as w}from"./ndrawer-myfvks89.js";import{n as T,t as E}from"./vendor/quicktype-core-otmjigaj.js";var D=E(),O=T(),k={border:`b base`,flex:`~ items-center gap-2`,sticky:``,"left-0":``,"right-0":``,"top-0":``,"z-1":``,"bg-base":``,p3:``},A={key:0,flex:`~ items-center justify-center`,absolute:``,"bottom--1":``,"right--2":``,"h-4":``,"w-4":``,"rounded-full":``,"bg-lime:30":``,"text-8px":``},j={flex:`~ col`,"w-100":``,"of-auto":``,py2:``},M={"text-xs":``,capitalize:``,op75:``},N=Object.assign(n({__name:`DataSchemaDrawer`,setup(n){let T=y(),E=t(0),N=t(`TypeScript`),P=d(()=>O.all.find(e=>e.displayName===N.value)),F=t(P.value?.optionDefinitions.filter(e=>typeof e.defaultValue==`boolean`)),I=g(async()=>{if(E.value,!T.value)return``;let e=(0,D.jsonInputForTargetLanguage)(N.value);await e.addSource({name:T.value.name??`Data`,samples:[T.value.input]});let t=new D.InputData;return t.addInput(e),(await(0,D.quicktype)({inputData:t,lang:N.value,rendererOptions:F.value?.reduce((e,t)=>(e[t.name]=t.defaultValue,e),{})})).lines.join(`
|
|
2
|
+
`)}),L=d(()=>{let e=N.value.toLocaleLowerCase();return e.startsWith(`javascript`)?`javascript`:e.startsWith(`json`)?`json`:e.startsWith(`typescript`)?`typescript`:e});p(F,()=>{E.value++},{deep:!0}),p(N,()=>{F.value=P.value?.optionDefinitions.filter(e=>typeof e.defaultValue==`boolean`)});let R=v();function z(){R(I.value||``)}return(t,n)=>{let d=b,p=_,g=x,v=S,y=C,E=w;return P.value?(r(),c(m,{key:0,to:`body`},[e(E,{"model-value":!!l(T)?.input,"auto-close":``,"max-w-screen":``,"w-2xl":``,"n-code-block":``,onClose:n[2]||=e=>T.value=null},{default:h(()=>[u(`div`,k,[n[3]||=u(`p`,{"mr-2":``},` Schema `,-1),e(d,{modelValue:N.value,"onUpdate:modelValue":n[0]||=e=>N.value=e,n:`xs primary`},{default:h(()=>[(r(!0),a(f,null,i(l(O.all),e=>(r(),a(`option`,{key:e.displayName},o(e.displayName),1))),128))]),_:1},8,[`modelValue`]),F.value?.length?(r(),c(v,{key:0,n:`sm lime`},{trigger:h(({click:t})=>[e(p,{icon:`carbon-settings`,"h-full":``,onClick:e=>t()},null,8,[`onClick`]),F.value?(r(),a(`span`,A,o(F.value.length),1)):s(``,!0)]),default:h(()=>[u(`div`,j,[(r(!0),a(f,null,i(F.value,(e,t)=>(r(),c(g,{key:e.name,modelValue:F.value[t].defaultValue,"onUpdate:modelValue":e=>F.value[t].defaultValue=e,flex:`~ gap-2`,rounded:``,px2:``,py2:``},{default:h(()=>[u(`span`,M,o(e.description),1)]),_:2},1032,[`modelValue`,`onUpdate:modelValue`]))),128))])]),_:1})):s(``,!0),n[4]||=u(`div`,{"flex-auto":``},null,-1),e(p,{icon:`carbon-copy`,"mr-6":``,"h-full":``,onClick:n[1]||=e=>z()})]),l(I)?(r(),c(y,{key:0,lang:L.value,code:l(I)},null,8,[`lang`,`code`])):s(``,!0)]),_:1},8,[`model-value`])])):s(``,!0)}}}),{__name:`DataSchemaDrawer`});export{N as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{$t as e,C as t,S as n,St as r,T as i,W as a,X as o,Y as s,Zt as c,_ as l,en as u,g as d,h as f,jt as p,m,p as h,s as g,ut as _}from"./vendor/json-editor-vue-c7zwcfg4.js";import{w as v}from"./utils-h3uzf8s7.js";import{O as y}from"#entry";import{t as b}from"./ncode-block-jv3jk7c5.js";import{t as x}from"./composables-ioamscf4.js";import{t as S}from"./ncheckbox-jr3c6e4e.js";import{t as C}from"./filepath-item-b7ye3und.js";import{t as w}from"./nsection-block-illvvuef.js";import{t as T}from"./nbadge-254fd0s4.js";import{t as E}from"./color-abaog8vc.js";var D=Object.assign(i({__name:`NBadgeHashed`,props:{text:{}},setup(t){let r=t,i=h(()=>({color:E(r.text,50,60),background:E(r.text,50,60,.05)}));return(r,s)=>(a(),f(T,{style:e(i.value)},{default:_(()=>[n(u(t.text),1),o(r.$slots,`default`)]),_:3},8,[`style`]))}}),{__name:`NBadgeHashed`}),O={flex:`~ gap-2 col`,mb4:``},k={flex:`~ gap-3 items-center`},A={key:0,flex:`~ gap-1`,"items-center":``,p1:``,border:`~ base rounded`},j={"max-w-full":``,"of-auto":``},M={"text-center":``,op50:``},N={flex:`~`,px4:``},P={key:0,op50:``},F={px2:``,"text-center":``},I={"of-auto":``},L=Object.assign(i({__name:`DebugModuleMutationRecords`,props:{moduleMutationRecords:{}},setup(e){let n=e,i=/^[a-z]:[\\/]/i;function o(e){return e.startsWith(`/`)||e.match(i)}let p=r(!1),v=r(!1),x=r(!1),w=r(!1),T=r(!1),E=r(``),L=h(()=>{let e=n.moduleMutationRecords;return p.value||(e=e.filter(e=>!e.name.startsWith(`nuxt:`)&&e.name!==`@nuxt/devtools`)),v.value||(e=e.filter(e=>e.keys.join(`.`)!==`build.templates`)),x.value||(e=e.filter(e=>e.keys.join(`.`)!==`build.transpile`)),w.value||(e=e.filter(e=>e.keys.join(`.`)!==`plugins`)),T.value||(e=e.filter(e=>e.method||e.value!==`[]`&&e.value!==`{}`)),E.value&&(e=e.filter(e=>e.name===E.value)),e});return(n,r)=>{let i=S,h=D,R=y,z=C,B=b;return a(),l(g,null,[m(`div`,O,[m(`div`,k,[t(i,{modelValue:p.value,"onUpdate:modelValue":r[0]||=e=>p.value=e,n:`primary`},{default:_(()=>[...r[6]||=[m(`span`,{"ws-nowrap":``,op75:``},`Builtin Modules`,-1)]]),_:1},8,[`modelValue`]),t(i,{modelValue:v.value,"onUpdate:modelValue":r[1]||=e=>v.value=e,n:`primary`},{default:_(()=>[...r[7]||=[m(`span`,{"ws-nowrap":``,op75:``},`Templates`,-1)]]),_:1},8,[`modelValue`]),t(i,{modelValue:x.value,"onUpdate:modelValue":r[2]||=e=>x.value=e,n:`primary`},{default:_(()=>[...r[8]||=[m(`span`,{"ws-nowrap":``,op75:``},`Transpile`,-1)]]),_:1},8,[`modelValue`]),t(i,{modelValue:w.value,"onUpdate:modelValue":r[3]||=e=>w.value=e,n:`primary`},{default:_(()=>[...r[9]||=[m(`span`,{"ws-nowrap":``,op75:``},`Plugins`,-1)]]),_:1},8,[`modelValue`]),t(i,{modelValue:T.value,"onUpdate:modelValue":r[4]||=e=>T.value=e,n:`primary`},{default:_(()=>[...r[10]||=[m(`span`,{"ws-nowrap":``,op75:``},`Empty Initial`,-1)]]),_:1},8,[`modelValue`]),E.value?(a(),l(`div`,A,[t(h,{"font-mono":``,text:E.value},null,8,[`text`]),t(R,{icon:`carbon-close`,border:!1,onClick:r[5]||=e=>E.value=``})])):d(``,!0)])]),m(`table`,j,[r[11]||=m(`thead`,{border:`b base`},[m(`tr`,null,[m(`th`,{"ws-nowrap":``,p1:``,"text-center":``,"font-bold":``},` Index `),m(`th`,{"ws-nowrap":``,p1:``,"text-center":``,"font-bold":``},` Module `),m(`th`,{"ws-nowrap":``,p1:``,"text-center":``,"font-bold":``},` Key Path `),m(`th`,{"ws-nowrap":``,p1:``,"text-center":``,"font-bold":``},` Method `),m(`th`,{"ws-nowrap":``,p1:``,"text-center":``,"font-bold":``},` Value `)])],-1),m(`tbody`,null,[(a(!0),l(g,null,s(L.value,n=>(a(),l(`tr`,{key:e.moduleMutationRecords.indexOf(n),border:`b dashed transparent hover:base`},[m(`td`,M,[m(`div`,null,u(e.moduleMutationRecords.indexOf(n)+1),1)]),m(`td`,null,[n.name&&o(n.name)?(a(),f(z,{key:0,filepath:n.name},null,8,[`filepath`])):(a(),f(h,{key:1,role:`button`,"font-mono":``,text:n.name,onClick:e=>E.value=n.name},null,8,[`text`,`onClick`]))]),m(`td`,null,[m(`code`,N,[(a(!0),l(g,null,s(n.keys,(e,t)=>(a(),l(g,{key:t},[m(`span`,null,u(e),1),t<n.keys.length-1?(a(),l(`span`,P,` . `)):d(``,!0)],64))),128))])]),m(`td`,F,[t(h,{"font-mono":``,text:n.method||`=`,class:c(n.method?``:`saturate-0`)},null,8,[`text`,`class`])]),m(`td`,I,[t(B,{code:String(n.value),lang:`ts`,"grammar-context-code":`let a = `,"ws-normal":``,"break-all":``,py1:``,lines:!1,inline:!0},null,8,[`code`])])]))),128))])])],64)}}}),{__name:`DebugModuleMutationRecords`}),R={key:0,p6:``},z={key:1},B=i({__name:`debug`,setup(e){x({icon:`i-carbon-debug`,title:`Debug`,category:`advanced`});let n=v();return(e,r)=>{let i=w;return p(n)?(a(),l(`div`,z,[t(i,{icon:`carbon-container-image-push-pull`,text:`Module Mutation Records`,description:`Records of module mutations to nuxt options`},{default:_(()=>[t(L,{"module-mutation-records":p(n).moduleMutationRecords||[]},null,8,[`module-mutation-records`])]),_:1})])):(a(),l(`div`,R,[...r[0]||=[m(`div`,null,`No Debug Context Found`,-1),m(`div`,null,"Set `debug: true` in your nuxt.config.ts to enable this panel",-1)]]))}}});export{B as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{W as e,X as t,_ as n,m as r}from"./vendor/json-editor-vue-c7zwcfg4.js";import{t as i}from"./_plugin-vue_export-helper-d9irwgla.js";var a={},o={"h-full":``,"of-auto":``,"n-panel-grids":``},s={"h-full":``,"bg-base":``};function c(i,a){return e(),n(`div`,o,[r(`div`,s,[t(i.$slots,`default`)])])}var l=i(a,[[`render`,c]]);export{l as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
String.fromCharCode;var e=/#/g,t=/&/g,n=/\//g,r=/=/g,i=/\?/g,a=/\+/g,o=/%5e/gi,s=/%60/gi,c=/%7c/gi,l=/%20/gi,u=/%2f/gi,d=/%252f/gi;function f(e){return encodeURI(``+e).replace(c,`|`)}function p(r){return f(typeof r==`string`?r:JSON.stringify(r)).replace(a,`%2B`).replace(l,`+`).replace(e,`%23`).replace(t,`%26`).replace(s,"`").replace(o,`^`).replace(n,`%2F`)}function m(e){return p(e).replace(r,`%3D`)}function h(n){return f(n).replace(e,`%23`).replace(i,`%3F`).replace(d,`%2F`).replace(t,`%26`).replace(a,`%2B`)}function g(e=``){try{return decodeURIComponent(``+e)}catch{return``+e}}function _(e){return g(e.replace(u,`%252F`))}function v(e){return g(e.replace(a,` `))}function y(e){return g(e.replace(a,` `))}function b(e=``){let t=Object.create(null);e[0]===`?`&&(e=e.slice(1));for(let n of e.split(`&`)){let e=n.match(/([^=]+)=?(.*)/)||[];if(e.length<2)continue;let r=v(e[1]);if(r===`__proto__`||r===`constructor`)continue;let i=y(e[2]||``);t[r]===void 0?t[r]=i:Array.isArray(t[r])?t[r].push(i):t[r]=[t[r],i]}return t}function x(e,t){return(typeof t==`number`||typeof t==`boolean`)&&(t=String(t)),t?Array.isArray(t)?t.map(t=>`${m(e)}=${p(t)}`).join(`&`):`${m(e)}=${p(t)}`:m(e)}function S(e){return Object.keys(e).filter(t=>e[t]!==void 0).map(t=>x(t,e[t])).filter(Boolean).join(`&`)}var C=/^[\s\w\0+.-]{2,}:([/\\]{1,2})/,w=/^[\s\w\0+.-]{2,}:([/\\]{2})?/,T=/^([/\\]\s*){2,}[^/\\]/,E=/^[\s\0]*(blob|data|javascript|vbscript):$/i,D=/\/$|\/\?|\/#/,O=/^\.?\//;function k(e,t={}){return typeof t==`boolean`&&(t={acceptRelative:t}),t.strict?C.test(e):w.test(e)||(t.acceptRelative?T.test(e):!1)}function A(e){return!!e&&E.test(e)}function j(e=``,t){return t?D.test(e):e.endsWith(`/`)}function M(e=``,t){if(!t)return(j(e)?e.slice(0,-1):e)||`/`;if(!j(e,!0))return e||`/`;let n=e,r=``,i=e.indexOf(`#`);i!==-1&&(n=e.slice(0,i),r=e.slice(i));let[a,...o]=n.split(`?`);return((a.endsWith(`/`)?a.slice(0,-1):a)||`/`)+(o.length>0?`?${o.join(`?`)}`:``)+r}function N(e=``,t){if(!t)return e.endsWith(`/`)?e:e+`/`;if(j(e,!0))return e||`/`;let n=e,r=``,i=e.indexOf(`#`);if(i!==-1&&(n=e.slice(0,i),r=e.slice(i),!n))return r;let[a,...o]=n.split(`?`);return a+`/`+(o.length>0?`?${o.join(`?`)}`:``)+r}function P(e,t){if(L(t)||k(e))return e;let n=M(t);if(e.startsWith(n)){let t=e[n.length];if(!t||t===`/`||t===`?`)return e}return z(n,e)}function F(e,t){if(L(t))return e;let n=M(t);if(!e.startsWith(n))return e;let r=e[n.length];return r&&r!==`/`&&r!==`?`?e:`/`+e.slice(n.length).replace(/^\/+/,``)}function I(e,t){let n=W(e);return n.search=S({...b(n.search),...t}),K(n)}function L(e){return!e||e===`/`}function R(e){return e&&e!==`/`}function z(e,...t){let n=e||``;for(let e of t.filter(e=>R(e)))if(n){let t=e.replace(O,``);n=N(n)+t}else n=e;return n}function B(...e){let t=/\/(?!\/)/,n=e.filter(Boolean),r=[],i=0;for(let e of n)if(!(!e||e===`/`)){for(let[n,a]of e.split(t).entries())if(!(!a||a===`.`)){if(a===`..`){if(r.length===1&&k(r[0]))continue;r.pop(),i--;continue}if(n===1&&r[r.length-1]?.endsWith(`:/`)){r[r.length-1]+=`/`+a;continue}r.push(a),i++}}let a=r.join(`/`);return i>=0?n[0]?.startsWith(`/`)&&!a.startsWith(`/`)?a=`/`+a:n[0]?.startsWith(`./`)&&!a.startsWith(`./`)&&(a=`./`+a):a=`../`.repeat(-1*i)+a,n[n.length-1]?.endsWith(`/`)&&!a.endsWith(`/`)&&(a+=`/`),a}function V(e,t){let n=e.match(w);return n||=e.match(/^\/{2,}/),n?t+e.slice(n[0].length):t+e}function H(e,t){return g(M(e))===g(M(t))}var U=Symbol.for(`ufo:protocolRelative`);function W(e=``,t){let n=e.match(/^[\s\0]*(blob:|data:|javascript:|vbscript:)(.*)/i);if(n){let[,e,t=``]=n;return{protocol:e.toLowerCase(),pathname:t,href:e+t,auth:``,host:``,search:``,hash:``}}if(!k(e,{acceptRelative:!0}))return t?W(t+e):G(e);let[,r=``,i,a=``]=e.replace(/\\/g,`/`).match(/^[\s\0]*([\w+.-]{2,}:)?\/\/([^/@]+@)?(.*)/)||[],[,o=``,s=``]=a.match(/([^#/?]*)(.*)?/)||[];r===`file:`&&(s=s.replace(/\/(?=[A-Za-z]:)/,``));let{pathname:c,search:l,hash:u}=G(s);return{protocol:r.toLowerCase(),auth:i?i.slice(0,Math.max(0,i.length-1)):``,host:o,pathname:c,search:l,hash:u,[U]:!r}}function G(e=``){let[t=``,n=``,r=``]=(e.match(/([^#?]*)(\?[^#]*)?(#.*)?/)||[]).splice(1);return{pathname:t,search:n,hash:r}}function K(e){let t=e.pathname||``,n=e.search?(e.search.startsWith(`?`)?``:`?`)+e.search:``,r=e.hash||``,i=e.auth?e.auth+`@`:``,a=e.host||``;return(e.protocol||e[U]?(e.protocol||``)+`//`:``)+i+a+t+n+r}var q=/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,J=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,Y=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/;function X(e,t){if(e===`__proto__`||e===`constructor`&&t&&typeof t==`object`&&`prototype`in t){Z(e);return}return t}function Z(e){console.warn(`[destr] Dropping "${e}" key to prevent prototype pollution.`)}function Q(e,t={}){if(typeof e!=`string`)return e;if(e[0]===`"`&&e[e.length-1]===`"`&&e.indexOf(`\\`)===-1)return e.slice(1,-1);let n=e.trim();if(n.length<=9)switch(n.toLowerCase()){case`true`:return!0;case`false`:return!1;case`undefined`:return;case`null`:return null;case`nan`:return NaN;case`infinity`:return 1/0;case`-infinity`:return-1/0}if(!Y.test(e)){if(t.strict)throw SyntaxError(`[destr] Invalid JSON`);return e}try{if(q.test(e)||J.test(e)){if(t.strict)throw Error(`[destr] Possible prototype pollution`);return JSON.parse(e,X)}return JSON.parse(e)}catch(n){if(t.strict)throw n;return e}}export{H as a,z as c,P as d,V as f,M as g,F as h,k as i,b as l,N as m,_ as n,A as o,I as p,h as r,B as s,Q as t,W as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=/\d/,t=[`-`,`_`,`/`,`.`];function n(t=``){if(!e.test(t))return t!==t.toLowerCase()}function r(e,r){let i=r??t,a=[];if(!e||typeof e!=`string`)return a;let o=``,s,c;for(let t of e){let e=i.includes(t);if(e===!0){a.push(o),o=``,s=void 0;continue}let r=n(t);if(c===!1){if(s===!1&&r===!0){a.push(o),o=t,s=r;continue}if(s===!0&&r===!1&&o.length>1){let e=o.at(-1);a.push(o.slice(0,Math.max(0,o.length-1))),o=e+t,s=r;continue}}o+=t,s=r,c=e}return a.push(o),a}function i(e){return e?e[0].toUpperCase()+e.slice(1):``}function a(e,t){return e?(Array.isArray(e)?e:r(e)).map(e=>i(t?.normalize?e.toLowerCase():e)).join(``):``}function o(e,t){return e?(Array.isArray(e)?e:r(e)).map(e=>e.toLowerCase()).join(t??`-`):``}export{a as n,o as t};
|