@nuxt/devtools 3.1.0 → 3.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/chunks/module-main.mjs +59 -56
- package/dist/chunks/vscode.mjs +1 -1
- package/dist/client/200.html +1 -1
- package/dist/client/404.html +1 -1
- package/dist/client/_nuxt/__blank-may67yna.js +1 -0
- package/dist/client/_nuxt/analyze-build-ezjae6pi.js +1 -0
- package/dist/client/_nuxt/assets-cctzmb3x.js +6 -0
- package/dist/client/_nuxt/builds/latest.json +1 -1
- package/dist/client/_nuxt/builds/meta/2a5ea934-38f3-42f9-8ddd-b2d868a945a1.json +1 -0
- package/dist/client/_nuxt/client-cbmkjf3j.js +1 -0
- package/dist/client/_nuxt/code-diff-dj5abiya.js +8 -0
- package/dist/client/_nuxt/code-snippets-cgl6wpax.js +1 -0
- package/dist/client/_nuxt/color-k274hmrf.js +1 -0
- package/dist/client/_nuxt/components-gbus3qqv.js +1 -0
- package/dist/client/_nuxt/composable-item-gs2iudn4.js +1 -0
- package/dist/client/_nuxt/composables-g8w9dpc0.js +1 -0
- package/dist/client/_nuxt/constants-i6giw94a.js +1 -0
- package/dist/client/_nuxt/custom-_name_-m936a9yu.js +1 -0
- package/dist/client/_nuxt/data-schema-button-j6fxaw99.js +1 -0
- package/dist/client/_nuxt/data-schema-drawer-it2972mk.js +2 -0
- package/dist/client/_nuxt/debug-i1rscwhu.js +1 -0
- package/dist/client/_nuxt/default-fb125qds.js +1 -0
- package/dist/client/_nuxt/dist-joij2tdx.js +1 -0
- package/dist/client/_nuxt/dist-k9rc0n5t.js +1 -0
- package/dist/client/_nuxt/duration-display-dhj2ifr1.js +1 -0
- package/dist/client/_nuxt/entry.css-gx482m17.css +1 -0
- package/dist/client/_nuxt/error-404-m8kh5nuw.js +1 -0
- package/dist/client/_nuxt/error-404.css-hvuilq4i.css +1 -0
- package/dist/client/_nuxt/error-500-h85n6r14.js +1 -0
- package/dist/client/_nuxt/error-500.css-jc8udnlk.css +1 -0
- package/dist/client/_nuxt/error-l968gtru.js +9 -0
- package/dist/client/_nuxt/filepath-item-osqp88cx.js +1 -0
- package/dist/client/_nuxt/full-odhn7e61.js +1 -0
- package/dist/client/_nuxt/help-fab-bhtk9hzf.js +1 -0
- package/dist/client/_nuxt/hooks-hkx6shiy.js +1 -0
- package/dist/client/_nuxt/imports-nbrcx3j5.js +1 -0
- package/dist/client/_nuxt/launch-page-fyevedb0.js +1 -0
- package/dist/client/_nuxt/lwjah63g.js +4 -0
- package/dist/client/_nuxt/modules-kh9xciqf.js +1 -0
- package/dist/client/_nuxt/nbadge-ijsj8fjy.js +1 -0
- package/dist/client/_nuxt/ncheckbox-f4a8016e.js +1 -0
- package/dist/client/_nuxt/ncode-block-j2hcqwrp.js +2 -0
- package/dist/client/_nuxt/ncode-block.css-o2ixs97j.css +1 -0
- package/dist/client/_nuxt/ndrawer-lh0r2gbb.js +1 -0
- package/dist/client/_nuxt/ndropdown-ef0253xr.js +1 -0
- package/dist/client/_nuxt/nicon-title-hrj2h1mn.js +1 -0
- package/dist/client/_nuxt/nlink-bsck6xne.js +1 -0
- package/dist/client/_nuxt/nmarkdown-ftmgc061.js +1 -0
- package/dist/client/_nuxt/nnavbar-fdsyxwr6.js +1 -0
- package/dist/client/_nuxt/none-kpcjhluv.js +1 -0
- package/dist/client/_nuxt/nsection-block-kp1wt3o4.js +1 -0
- package/dist/client/_nuxt/nselect-cmll6q59.js +1 -0
- package/dist/client/_nuxt/nselect-tabs-dueuo8rw.js +1 -0
- package/dist/client/_nuxt/nswitch-gqy4bgn3.js +1 -0
- package/dist/client/_nuxt/open-graph-ol89f0bf.js +3 -0
- package/dist/client/_nuxt/open-graph.css-dk03m1qz.css +1 -0
- package/dist/client/_nuxt/overview-lxyqhn33.js +1 -0
- package/dist/client/_nuxt/pages-bbrpp8du.js +1 -0
- package/dist/client/_nuxt/pages-cry23sym.js +1 -0
- package/dist/client/_nuxt/payload-bhrm3gbm.js +1 -0
- package/dist/client/_nuxt/pinia-bcnuwvzr.js +1 -0
- package/dist/client/_nuxt/plugins-k9rqnu6h.js +1 -0
- package/dist/client/_nuxt/render-tree-fd08tpf3.js +1 -0
- package/dist/client/_nuxt/rolldown-runtime-oipoa1or.js +1 -0
- package/dist/client/_nuxt/runtime-configs-kagn8z75.js +1 -0
- package/dist/client/_nuxt/server-discovery-ja6p66g6.js +1 -0
- package/dist/client/_nuxt/server-route-inputs-b6nweyxn.js +1 -0
- package/dist/client/_nuxt/server-routes-dtwlhsgf.js +7 -0
- package/dist/client/_nuxt/server-tasks-lboebplp.js +1 -0
- package/dist/client/_nuxt/settings-joqzffm3.js +1 -0
- package/dist/client/_nuxt/stacktrace-list-mphoqupg.js +1 -0
- package/dist/client/_nuxt/state-components-b5shg9ni.js +1 -0
- package/dist/client/_nuxt/state-editor-gc0bkewv.js +1 -0
- package/dist/client/_nuxt/state-modules-e2s3wq2g.js +1 -0
- package/dist/client/_nuxt/storage-m3jg7c3a.js +1 -0
- package/dist/client/_nuxt/terminals-hsjdjxac.js +1 -0
- package/dist/client/_nuxt/timeline-nn4tvvo6.js +31 -0
- package/dist/client/_nuxt/timeline.css-m03aec2q.css +1 -0
- package/dist/client/_nuxt/unocss-runtime-cyizum7d.js +1 -0
- package/dist/client/_nuxt/vendor/json-editor-vue-ddj4xtqm.js +3869 -0
- package/dist/client/_nuxt/vendor/json-editor-vue.css-lkbe0qhh.css +1 -0
- package/dist/client/_nuxt/vendor/markdown-it-ew3lvn5m.js +14 -0
- package/dist/client/_nuxt/vendor/quicktype-core-f78dz8oi.js +929 -0
- package/dist/client/_nuxt/vendor/shiki-kunkft64.js +152 -0
- package/dist/client/_nuxt/vendor/unocss-f9yt86gg.js +3 -0
- package/dist/client/_nuxt/vendor/vis-ccj7spt3.js +26 -0
- package/dist/client/_nuxt/vendor/xterm-b39oya8c.js +36 -0
- package/dist/client/_nuxt/vendor/xterm.css-jqmddlol.css +1 -0
- package/dist/client/_nuxt/virtual-files-ds4udxjo.js +1 -0
- package/dist/client/_nuxt/virtual-files.css-l97kh4kx.css +1 -0
- package/dist/client/_nuxt/vue-devtools-hovopvyk.js +3 -0
- package/dist/client/_nuxt/vue-virtual-scroller.esm-il5noocm.js +2 -0
- package/dist/client/discovery/index.html +80 -80
- package/dist/client/index.html +1 -1
- package/dist/module.json +1 -1
- package/dist/module.mjs +1 -1
- package/dist/runtime/function-metrics-helpers.js +1 -1
- package/dist/shared/{devtools.Dlu0WIXO.mjs → devtools.DuFZOCNN.mjs} +2 -2
- package/dist/webcomponents/index.mjs +706 -405
- package/package.json +47 -48
- package/dist/client/_nuxt/__blank-jhf8n41f.js +0 -1
- package/dist/client/_nuxt/analyze-build-dclm2eua.js +0 -1
- package/dist/client/_nuxt/assets-gul8j4ty.js +0 -16
- package/dist/client/_nuxt/builds/meta/7f6c0584-4542-4a99-a964-04ffe2cf6d8b.json +0 -1
- package/dist/client/_nuxt/client-c7ye0k5n.js +0 -1
- package/dist/client/_nuxt/code-diff-injlkjgq.js +0 -8
- package/dist/client/_nuxt/code-snippets-m6659svv.js +0 -1
- package/dist/client/_nuxt/color-mt9xuhgy.js +0 -1
- package/dist/client/_nuxt/components-dx448jl3.js +0 -1
- package/dist/client/_nuxt/composable-item-fx38xsht.js +0 -1
- package/dist/client/_nuxt/constants-b32h69zq.js +0 -1
- package/dist/client/_nuxt/custom-_name_-hhxly3pw.js +0 -1
- package/dist/client/_nuxt/data-schema-button-n4i5g8zd.js +0 -1
- package/dist/client/_nuxt/data-schema-drawer-kqzssz6s.js +0 -2
- package/dist/client/_nuxt/debug-d3sv8xbk.js +0 -1
- package/dist/client/_nuxt/default-m5mbakn0.js +0 -1
- package/dist/client/_nuxt/dqkmjlgs.js +0 -5
- package/dist/client/_nuxt/duration-display-jckntkny.js +0 -1
- package/dist/client/_nuxt/entry.css-isd0m9wk.css +0 -1
- package/dist/client/_nuxt/error-404-gjtmorrj.js +0 -1
- package/dist/client/_nuxt/error-404.css-comgjw6y.css +0 -1
- package/dist/client/_nuxt/error-500-nccwcser.js +0 -1
- package/dist/client/_nuxt/error-500.css-mrt4j707.css +0 -1
- package/dist/client/_nuxt/error-ffv58uws.js +0 -9
- package/dist/client/_nuxt/filepath-item-i5bipy7o.js +0 -1
- package/dist/client/_nuxt/full-c16pqeel.js +0 -1
- package/dist/client/_nuxt/help-fab-9epbigv8.js +0 -1
- package/dist/client/_nuxt/hooks-mduk5nzn.js +0 -1
- package/dist/client/_nuxt/imports-i91uw6yj.js +0 -1
- package/dist/client/_nuxt/index-jc4yj4to.js +0 -1
- package/dist/client/_nuxt/index-nhqhrtpb.js +0 -1
- package/dist/client/_nuxt/launch-page-hs2f7bb3.js +0 -1
- package/dist/client/_nuxt/modules-zf3s3x2v.js +0 -1
- package/dist/client/_nuxt/nbadge-b5jyufiz.js +0 -1
- package/dist/client/_nuxt/ncheckbox-dhpz73wm.js +0 -1
- package/dist/client/_nuxt/ncode-block-j34pr9ay.js +0 -2
- package/dist/client/_nuxt/ncode-block.css-lvdc77tw.css +0 -1
- package/dist/client/_nuxt/ndrawer-drb8l4me.js +0 -1
- package/dist/client/_nuxt/ndropdown-nmlejt8k.js +0 -1
- package/dist/client/_nuxt/nicon-title-d35s6mci.js +0 -1
- package/dist/client/_nuxt/nlink-c419gh8c.js +0 -1
- package/dist/client/_nuxt/nmarkdown-nigjp7j4.js +0 -1
- package/dist/client/_nuxt/nnavbar-l4xos9kw.js +0 -1
- package/dist/client/_nuxt/none-gpw8rwbw.js +0 -1
- package/dist/client/_nuxt/nsection-block-egbswicp.js +0 -1
- package/dist/client/_nuxt/nselect-ioi0seuc.js +0 -1
- package/dist/client/_nuxt/nselect-tabs-g53jlfar.js +0 -1
- package/dist/client/_nuxt/nswitch-fe63il2r.js +0 -1
- package/dist/client/_nuxt/open-graph-at6lhslo.js +0 -3
- package/dist/client/_nuxt/open-graph.css-me89qec1.css +0 -1
- package/dist/client/_nuxt/overview-m6fs47hx.js +0 -1
- package/dist/client/_nuxt/pages-j5tlf4m8.js +0 -1
- package/dist/client/_nuxt/payload-jr962nnb.js +0 -1
- package/dist/client/_nuxt/pinia-joljeqzn.js +0 -1
- package/dist/client/_nuxt/plugins-ojaq4cs3.js +0 -1
- package/dist/client/_nuxt/render-tree-if0b608n.js +0 -1
- package/dist/client/_nuxt/runtime-configs-o7wtu3kn.js +0 -1
- package/dist/client/_nuxt/server-discovery-b3v4zpwp.js +0 -1
- package/dist/client/_nuxt/server-route-inputs-b67yt8gz.js +0 -1
- package/dist/client/_nuxt/server-routes-bv99k10t.js +0 -9
- package/dist/client/_nuxt/server-tasks-cm8nifg0.js +0 -1
- package/dist/client/_nuxt/settings-eg7tsmzu.js +0 -1
- package/dist/client/_nuxt/stacktrace-list-bcj6vnom.js +0 -1
- package/dist/client/_nuxt/state-components-fc2pwsp2.js +0 -1
- package/dist/client/_nuxt/state-editor-dk0l27xr.js +0 -1
- package/dist/client/_nuxt/state-modules-kznlrvp3.js +0 -1
- package/dist/client/_nuxt/storage-llgdq75n.js +0 -1
- package/dist/client/_nuxt/terminals-dw7izba9.js +0 -1
- package/dist/client/_nuxt/timeline-47q1o74r.js +0 -31
- package/dist/client/_nuxt/timeline.css-otdwftpy.css +0 -1
- package/dist/client/_nuxt/unocss-runtime-jh5tu2xl.js +0 -1
- package/dist/client/_nuxt/vendor/json-editor-vue-gjlsq8io.js +0 -3867
- package/dist/client/_nuxt/vendor/json-editor-vue.css-f8ezrn37.css +0 -1
- package/dist/client/_nuxt/vendor/markdown-it-fvu08dbs.js +0 -16
- package/dist/client/_nuxt/vendor/quicktype-core-bmjj6ua7.js +0 -955
- package/dist/client/_nuxt/vendor/shiki-g7cm1eew.js +0 -152
- package/dist/client/_nuxt/vendor/unocss-gny6huge.js +0 -3
- package/dist/client/_nuxt/vendor/unocss.css-c5u30s53.css +0 -1
- package/dist/client/_nuxt/vendor/vis-lxvjz9wh.js +0 -26
- package/dist/client/_nuxt/vendor/xterm-nmc0lagr.js +0 -9
- package/dist/client/_nuxt/vendor/xterm.css-g1ekxkss.css +0 -1
- package/dist/client/_nuxt/virtual-files-mjjst5kh.js +0 -1
- package/dist/client/_nuxt/virtual-files.css-gqpg2wnb.css +0 -1
- package/dist/client/_nuxt/vue-devtools-f6dfrqr1.js +0 -2
- package/dist/client/_nuxt/vue-virtual-scroller.esm-uia1jucn.js +0 -2
package/README.md
CHANGED
|
@@ -120,7 +120,7 @@ On top of the [default Nuxt Telemetry events](https://github.com/nuxt/telemetry#
|
|
|
120
120
|
[npm-downloads-href]: https://npm.chart.dev/@nuxt/devtools
|
|
121
121
|
[license-src]: https://img.shields.io/npm/l/@nuxt/devtools.svg?style=flat&colorA=18181B&colorB=28CF8D
|
|
122
122
|
[license-href]: https://npmjs.com/package/@nuxt/devtools
|
|
123
|
-
[nuxt-src]: https://img.shields.io/badge/Nuxt-18181B?logo=nuxt
|
|
123
|
+
[nuxt-src]: https://img.shields.io/badge/Nuxt-18181B?logo=nuxt
|
|
124
124
|
[nuxt-href]: https://nuxt.com
|
|
125
125
|
[volta-src]: https://user-images.githubusercontent.com/904724/209143798-32345f6c-3cf8-4e06-9659-f4ace4a6acde.svg
|
|
126
126
|
[volta-href]: https://volta.net/nuxt/devtools?utm_source=nuxt_devtools_readme
|
|
@@ -6,7 +6,7 @@ import { colors } from 'consola/utils';
|
|
|
6
6
|
import { join, dirname as dirname$1, resolve, isAbsolute } from 'pathe';
|
|
7
7
|
import sirv from 'sirv';
|
|
8
8
|
import { searchForWorkspaceRoot } from 'vite';
|
|
9
|
-
import { d as defaultAllowedExtensions, a as defaultTabOptions, W as WS_EVENT_NAME } from '../shared/devtools.
|
|
9
|
+
import { d as defaultAllowedExtensions, a as defaultTabOptions, W as WS_EVENT_NAME } from '../shared/devtools.DuFZOCNN.mjs';
|
|
10
10
|
import path, { dirname, join as join$1, relative, parse } from 'node:path';
|
|
11
11
|
import { hash } from 'ohash';
|
|
12
12
|
import { runtimeDir, clientDir, packageDir, isGlobalInstall } from '../dirs.mjs';
|
|
@@ -33,7 +33,7 @@ import { getDefaultExportOptions, addNuxtModule } from 'magicast/helpers';
|
|
|
33
33
|
import { detectPackageManager } from 'nypm';
|
|
34
34
|
import semver from 'semver';
|
|
35
35
|
|
|
36
|
-
const version$1 = "3.
|
|
36
|
+
const version$1 = "3.2.0";
|
|
37
37
|
|
|
38
38
|
const urlAlphabet = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
|
|
39
39
|
function randomStr(size = 16, dict = urlAlphabet) {
|
|
@@ -1300,10 +1300,10 @@ var pp$8 = Parser.prototype;
|
|
|
1300
1300
|
// to its body instead of creating a new node.
|
|
1301
1301
|
|
|
1302
1302
|
pp$8.parseTopLevel = function(node) {
|
|
1303
|
-
var exports = Object.create(null);
|
|
1303
|
+
var exports$1 = Object.create(null);
|
|
1304
1304
|
if (!node.body) { node.body = []; }
|
|
1305
1305
|
while (this.type !== types$1.eof) {
|
|
1306
|
-
var stmt = this.parseStatement(null, true, exports);
|
|
1306
|
+
var stmt = this.parseStatement(null, true, exports$1);
|
|
1307
1307
|
node.body.push(stmt);
|
|
1308
1308
|
}
|
|
1309
1309
|
if (this.inModule)
|
|
@@ -1410,7 +1410,7 @@ pp$8.isUsing = function(isFor) {
|
|
|
1410
1410
|
// `if (foo) /blah/.exec(foo)`, where looking at the previous token
|
|
1411
1411
|
// does not help.
|
|
1412
1412
|
|
|
1413
|
-
pp$8.parseStatement = function(context, topLevel, exports) {
|
|
1413
|
+
pp$8.parseStatement = function(context, topLevel, exports$1) {
|
|
1414
1414
|
var starttype = this.type, node = this.startNode(), kind;
|
|
1415
1415
|
|
|
1416
1416
|
if (this.isLet(context)) {
|
|
@@ -1465,7 +1465,7 @@ pp$8.parseStatement = function(context, topLevel, exports) {
|
|
|
1465
1465
|
if (!this.inModule)
|
|
1466
1466
|
{ this.raise(this.start, "'import' and 'export' may appear only with 'sourceType: module'"); }
|
|
1467
1467
|
}
|
|
1468
|
-
return starttype === types$1._import ? this.parseImport(node) : this.parseExport(node, exports)
|
|
1468
|
+
return starttype === types$1._import ? this.parseImport(node) : this.parseExport(node, exports$1)
|
|
1469
1469
|
|
|
1470
1470
|
// If the statement does not start with a statement keyword or a
|
|
1471
1471
|
// brace, it's an ExpressionStatement or LabeledStatement. We
|
|
@@ -2221,11 +2221,11 @@ function checkKeyName(node, name) {
|
|
|
2221
2221
|
|
|
2222
2222
|
// Parses module export declaration.
|
|
2223
2223
|
|
|
2224
|
-
pp$8.parseExportAllDeclaration = function(node, exports) {
|
|
2224
|
+
pp$8.parseExportAllDeclaration = function(node, exports$1) {
|
|
2225
2225
|
if (this.options.ecmaVersion >= 11) {
|
|
2226
2226
|
if (this.eatContextual("as")) {
|
|
2227
2227
|
node.exported = this.parseModuleExportName();
|
|
2228
|
-
this.checkExport(exports, node.exported, this.lastTokStart);
|
|
2228
|
+
this.checkExport(exports$1, node.exported, this.lastTokStart);
|
|
2229
2229
|
} else {
|
|
2230
2230
|
node.exported = null;
|
|
2231
2231
|
}
|
|
@@ -2239,14 +2239,14 @@ pp$8.parseExportAllDeclaration = function(node, exports) {
|
|
|
2239
2239
|
return this.finishNode(node, "ExportAllDeclaration")
|
|
2240
2240
|
};
|
|
2241
2241
|
|
|
2242
|
-
pp$8.parseExport = function(node, exports) {
|
|
2242
|
+
pp$8.parseExport = function(node, exports$1) {
|
|
2243
2243
|
this.next();
|
|
2244
2244
|
// export * from '...'
|
|
2245
2245
|
if (this.eat(types$1.star)) {
|
|
2246
|
-
return this.parseExportAllDeclaration(node, exports)
|
|
2246
|
+
return this.parseExportAllDeclaration(node, exports$1)
|
|
2247
2247
|
}
|
|
2248
2248
|
if (this.eat(types$1._default)) { // export default ...
|
|
2249
|
-
this.checkExport(exports, "default", this.lastTokStart);
|
|
2249
|
+
this.checkExport(exports$1, "default", this.lastTokStart);
|
|
2250
2250
|
node.declaration = this.parseExportDefaultDeclaration();
|
|
2251
2251
|
return this.finishNode(node, "ExportDefaultDeclaration")
|
|
2252
2252
|
}
|
|
@@ -2254,16 +2254,16 @@ pp$8.parseExport = function(node, exports) {
|
|
|
2254
2254
|
if (this.shouldParseExportStatement()) {
|
|
2255
2255
|
node.declaration = this.parseExportDeclaration(node);
|
|
2256
2256
|
if (node.declaration.type === "VariableDeclaration")
|
|
2257
|
-
{ this.checkVariableExport(exports, node.declaration.declarations); }
|
|
2257
|
+
{ this.checkVariableExport(exports$1, node.declaration.declarations); }
|
|
2258
2258
|
else
|
|
2259
|
-
{ this.checkExport(exports, node.declaration.id, node.declaration.id.start); }
|
|
2259
|
+
{ this.checkExport(exports$1, node.declaration.id, node.declaration.id.start); }
|
|
2260
2260
|
node.specifiers = [];
|
|
2261
2261
|
node.source = null;
|
|
2262
2262
|
if (this.options.ecmaVersion >= 16)
|
|
2263
2263
|
{ node.attributes = []; }
|
|
2264
2264
|
} else { // export { x, y as z } [from '...']
|
|
2265
2265
|
node.declaration = null;
|
|
2266
|
-
node.specifiers = this.parseExportSpecifiers(exports);
|
|
2266
|
+
node.specifiers = this.parseExportSpecifiers(exports$1);
|
|
2267
2267
|
if (this.eatContextual("from")) {
|
|
2268
2268
|
if (this.type !== types$1.string) { this.unexpected(); }
|
|
2269
2269
|
node.source = this.parseExprAtom();
|
|
@@ -2313,47 +2313,47 @@ pp$8.parseExportDefaultDeclaration = function() {
|
|
|
2313
2313
|
}
|
|
2314
2314
|
};
|
|
2315
2315
|
|
|
2316
|
-
pp$8.checkExport = function(exports, name, pos) {
|
|
2317
|
-
if (!exports) { return }
|
|
2316
|
+
pp$8.checkExport = function(exports$1, name, pos) {
|
|
2317
|
+
if (!exports$1) { return }
|
|
2318
2318
|
if (typeof name !== "string")
|
|
2319
2319
|
{ name = name.type === "Identifier" ? name.name : name.value; }
|
|
2320
|
-
if (hasOwn(exports, name))
|
|
2320
|
+
if (hasOwn(exports$1, name))
|
|
2321
2321
|
{ this.raiseRecoverable(pos, "Duplicate export '" + name + "'"); }
|
|
2322
|
-
exports[name] = true;
|
|
2322
|
+
exports$1[name] = true;
|
|
2323
2323
|
};
|
|
2324
2324
|
|
|
2325
|
-
pp$8.checkPatternExport = function(exports, pat) {
|
|
2325
|
+
pp$8.checkPatternExport = function(exports$1, pat) {
|
|
2326
2326
|
var type = pat.type;
|
|
2327
2327
|
if (type === "Identifier")
|
|
2328
|
-
{ this.checkExport(exports, pat, pat.start); }
|
|
2328
|
+
{ this.checkExport(exports$1, pat, pat.start); }
|
|
2329
2329
|
else if (type === "ObjectPattern")
|
|
2330
2330
|
{ for (var i = 0, list = pat.properties; i < list.length; i += 1)
|
|
2331
2331
|
{
|
|
2332
2332
|
var prop = list[i];
|
|
2333
2333
|
|
|
2334
|
-
this.checkPatternExport(exports, prop);
|
|
2334
|
+
this.checkPatternExport(exports$1, prop);
|
|
2335
2335
|
} }
|
|
2336
2336
|
else if (type === "ArrayPattern")
|
|
2337
2337
|
{ for (var i$1 = 0, list$1 = pat.elements; i$1 < list$1.length; i$1 += 1) {
|
|
2338
2338
|
var elt = list$1[i$1];
|
|
2339
2339
|
|
|
2340
|
-
if (elt) { this.checkPatternExport(exports, elt); }
|
|
2340
|
+
if (elt) { this.checkPatternExport(exports$1, elt); }
|
|
2341
2341
|
} }
|
|
2342
2342
|
else if (type === "Property")
|
|
2343
|
-
{ this.checkPatternExport(exports, pat.value); }
|
|
2343
|
+
{ this.checkPatternExport(exports$1, pat.value); }
|
|
2344
2344
|
else if (type === "AssignmentPattern")
|
|
2345
|
-
{ this.checkPatternExport(exports, pat.left); }
|
|
2345
|
+
{ this.checkPatternExport(exports$1, pat.left); }
|
|
2346
2346
|
else if (type === "RestElement")
|
|
2347
|
-
{ this.checkPatternExport(exports, pat.argument); }
|
|
2347
|
+
{ this.checkPatternExport(exports$1, pat.argument); }
|
|
2348
2348
|
};
|
|
2349
2349
|
|
|
2350
|
-
pp$8.checkVariableExport = function(exports, decls) {
|
|
2351
|
-
if (!exports) { return }
|
|
2350
|
+
pp$8.checkVariableExport = function(exports$1, decls) {
|
|
2351
|
+
if (!exports$1) { return }
|
|
2352
2352
|
for (var i = 0, list = decls; i < list.length; i += 1)
|
|
2353
2353
|
{
|
|
2354
2354
|
var decl = list[i];
|
|
2355
2355
|
|
|
2356
|
-
this.checkPatternExport(exports, decl.id);
|
|
2356
|
+
this.checkPatternExport(exports$1, decl.id);
|
|
2357
2357
|
}
|
|
2358
2358
|
};
|
|
2359
2359
|
|
|
@@ -2368,13 +2368,13 @@ pp$8.shouldParseExportStatement = function() {
|
|
|
2368
2368
|
|
|
2369
2369
|
// Parses a comma-separated list of module exports.
|
|
2370
2370
|
|
|
2371
|
-
pp$8.parseExportSpecifier = function(exports) {
|
|
2371
|
+
pp$8.parseExportSpecifier = function(exports$1) {
|
|
2372
2372
|
var node = this.startNode();
|
|
2373
2373
|
node.local = this.parseModuleExportName();
|
|
2374
2374
|
|
|
2375
2375
|
node.exported = this.eatContextual("as") ? this.parseModuleExportName() : node.local;
|
|
2376
2376
|
this.checkExport(
|
|
2377
|
-
exports,
|
|
2377
|
+
exports$1,
|
|
2378
2378
|
node.exported,
|
|
2379
2379
|
node.exported.start
|
|
2380
2380
|
);
|
|
@@ -2382,7 +2382,7 @@ pp$8.parseExportSpecifier = function(exports) {
|
|
|
2382
2382
|
return this.finishNode(node, "ExportSpecifier")
|
|
2383
2383
|
};
|
|
2384
2384
|
|
|
2385
|
-
pp$8.parseExportSpecifiers = function(exports) {
|
|
2385
|
+
pp$8.parseExportSpecifiers = function(exports$1) {
|
|
2386
2386
|
var nodes = [], first = true;
|
|
2387
2387
|
// export { x, y as z } [from '...']
|
|
2388
2388
|
this.expect(types$1.braceL);
|
|
@@ -2392,7 +2392,7 @@ pp$8.parseExportSpecifiers = function(exports) {
|
|
|
2392
2392
|
if (this.afterTrailingComma(types$1.braceR)) { break }
|
|
2393
2393
|
} else { first = false; }
|
|
2394
2394
|
|
|
2395
|
-
nodes.push(this.parseExportSpecifier(exports));
|
|
2395
|
+
nodes.push(this.parseExportSpecifier(exports$1));
|
|
2396
2396
|
}
|
|
2397
2397
|
return nodes
|
|
2398
2398
|
};
|
|
@@ -6800,7 +6800,10 @@ function withBase(input, base) {
|
|
|
6800
6800
|
}
|
|
6801
6801
|
const _base = withoutTrailingSlash(base);
|
|
6802
6802
|
if (input.startsWith(_base)) {
|
|
6803
|
-
|
|
6803
|
+
const nextChar = input[_base.length];
|
|
6804
|
+
if (!nextChar || nextChar === "/" || nextChar === "?") {
|
|
6805
|
+
return input;
|
|
6806
|
+
}
|
|
6804
6807
|
}
|
|
6805
6808
|
return joinURL(_base, input);
|
|
6806
6809
|
}
|
|
@@ -8338,11 +8341,11 @@ function resolvePackageTarget(
|
|
|
8338
8341
|
* @param {URL} base
|
|
8339
8342
|
* @returns {boolean}
|
|
8340
8343
|
*/
|
|
8341
|
-
function isConditionalExportsMainSugar(exports, packageJsonUrl, base) {
|
|
8342
|
-
if (typeof exports === 'string' || Array.isArray(exports)) return true
|
|
8343
|
-
if (typeof exports !== 'object' || exports === null) return false
|
|
8344
|
+
function isConditionalExportsMainSugar(exports$1, packageJsonUrl, base) {
|
|
8345
|
+
if (typeof exports$1 === 'string' || Array.isArray(exports$1)) return true
|
|
8346
|
+
if (typeof exports$1 !== 'object' || exports$1 === null) return false
|
|
8344
8347
|
|
|
8345
|
-
const keys = Object.getOwnPropertyNames(exports);
|
|
8348
|
+
const keys = Object.getOwnPropertyNames(exports$1);
|
|
8346
8349
|
let isConditionalSugar = false;
|
|
8347
8350
|
let i = 0;
|
|
8348
8351
|
let keyIndex = -1;
|
|
@@ -8404,19 +8407,19 @@ function packageExportsResolve(
|
|
|
8404
8407
|
base,
|
|
8405
8408
|
conditions
|
|
8406
8409
|
) {
|
|
8407
|
-
let exports = packageConfig.exports;
|
|
8410
|
+
let exports$1 = packageConfig.exports;
|
|
8408
8411
|
|
|
8409
|
-
if (isConditionalExportsMainSugar(exports, packageJsonUrl, base)) {
|
|
8410
|
-
exports = {'.': exports};
|
|
8412
|
+
if (isConditionalExportsMainSugar(exports$1, packageJsonUrl, base)) {
|
|
8413
|
+
exports$1 = {'.': exports$1};
|
|
8411
8414
|
}
|
|
8412
8415
|
|
|
8413
8416
|
if (
|
|
8414
|
-
own.call(exports, packageSubpath) &&
|
|
8417
|
+
own.call(exports$1, packageSubpath) &&
|
|
8415
8418
|
!packageSubpath.includes('*') &&
|
|
8416
8419
|
!packageSubpath.endsWith('/')
|
|
8417
8420
|
) {
|
|
8418
8421
|
// @ts-expect-error: indexable.
|
|
8419
|
-
const target = exports[packageSubpath];
|
|
8422
|
+
const target = exports$1[packageSubpath];
|
|
8420
8423
|
const resolveResult = resolvePackageTarget(
|
|
8421
8424
|
packageJsonUrl,
|
|
8422
8425
|
target,
|
|
@@ -8437,7 +8440,7 @@ function packageExportsResolve(
|
|
|
8437
8440
|
|
|
8438
8441
|
let bestMatch = '';
|
|
8439
8442
|
let bestMatchSubpath = '';
|
|
8440
|
-
const keys = Object.getOwnPropertyNames(exports);
|
|
8443
|
+
const keys = Object.getOwnPropertyNames(exports$1);
|
|
8441
8444
|
let i = -1;
|
|
8442
8445
|
|
|
8443
8446
|
while (++i < keys.length) {
|
|
@@ -8481,7 +8484,7 @@ function packageExportsResolve(
|
|
|
8481
8484
|
|
|
8482
8485
|
if (bestMatch) {
|
|
8483
8486
|
// @ts-expect-error: indexable.
|
|
8484
|
-
const target = /** @type {unknown} */ (exports[bestMatch]);
|
|
8487
|
+
const target = /** @type {unknown} */ (exports$1[bestMatch]);
|
|
8485
8488
|
const resolveResult = resolvePackageTarget(
|
|
8486
8489
|
packageJsonUrl,
|
|
8487
8490
|
target,
|
|
@@ -9008,7 +9011,7 @@ function findExports(code) {
|
|
|
9008
9011
|
const starExports = matchAll(EXPORT_STAR_RE, code, {
|
|
9009
9012
|
type: "star"
|
|
9010
9013
|
});
|
|
9011
|
-
const exports = normalizeExports([
|
|
9014
|
+
const exports$1 = normalizeExports([
|
|
9012
9015
|
...declaredExports,
|
|
9013
9016
|
...namedExports,
|
|
9014
9017
|
...destructuredExports,
|
|
@@ -9016,7 +9019,7 @@ function findExports(code) {
|
|
|
9016
9019
|
...defaultClassExports,
|
|
9017
9020
|
...starExports
|
|
9018
9021
|
]);
|
|
9019
|
-
if (exports.length === 0) {
|
|
9022
|
+
if (exports$1.length === 0) {
|
|
9020
9023
|
return [];
|
|
9021
9024
|
}
|
|
9022
9025
|
const exportLocations = _tryGetLocations(code, "export");
|
|
@@ -9025,14 +9028,14 @@ function findExports(code) {
|
|
|
9025
9028
|
}
|
|
9026
9029
|
return (
|
|
9027
9030
|
// Filter false positive export matches
|
|
9028
|
-
_filterStatement(exportLocations, exports).filter((exp, index, exports2) => {
|
|
9031
|
+
_filterStatement(exportLocations, exports$1).filter((exp, index, exports2) => {
|
|
9029
9032
|
const nextExport = exports2[index + 1];
|
|
9030
9033
|
return !nextExport || exp.type !== nextExport.type || !exp.name || exp.name !== nextExport.name;
|
|
9031
9034
|
})
|
|
9032
9035
|
);
|
|
9033
9036
|
}
|
|
9034
|
-
function normalizeExports(exports) {
|
|
9035
|
-
for (const exp of exports) {
|
|
9037
|
+
function normalizeExports(exports$1) {
|
|
9038
|
+
for (const exp of exports$1) {
|
|
9036
9039
|
if (!exp.name && exp.names && exp.names.length === 1) {
|
|
9037
9040
|
exp.name = exp.names[0];
|
|
9038
9041
|
}
|
|
@@ -9050,7 +9053,7 @@ function normalizeExports(exports) {
|
|
|
9050
9053
|
);
|
|
9051
9054
|
}
|
|
9052
9055
|
}
|
|
9053
|
-
return exports;
|
|
9056
|
+
return exports$1;
|
|
9054
9057
|
}
|
|
9055
9058
|
function normalizeNamedExports(namedExports) {
|
|
9056
9059
|
for (const namedExport of namedExports) {
|
|
@@ -9061,11 +9064,11 @@ function normalizeNamedExports(namedExports) {
|
|
|
9061
9064
|
async function resolveModuleExportNames(id, options) {
|
|
9062
9065
|
const url = await resolvePath(id, options);
|
|
9063
9066
|
const code = await loadURL(url);
|
|
9064
|
-
const exports = findExports(code);
|
|
9067
|
+
const exports$1 = findExports(code);
|
|
9065
9068
|
const exportNames = new Set(
|
|
9066
|
-
exports.flatMap((exp) => exp.names).filter(Boolean)
|
|
9069
|
+
exports$1.flatMap((exp) => exp.names).filter(Boolean)
|
|
9067
9070
|
);
|
|
9068
|
-
for (const exp of exports) {
|
|
9071
|
+
for (const exp of exports$1) {
|
|
9069
9072
|
if (exp.type !== "star" || !exp.specifier) {
|
|
9070
9073
|
continue;
|
|
9071
9074
|
}
|
|
@@ -11417,7 +11420,7 @@ function setupRPC(nuxt, options) {
|
|
|
11417
11420
|
const [namespace, fnName] = name.split(":");
|
|
11418
11421
|
return extendedRpcMap.get(namespace)?.[fnName];
|
|
11419
11422
|
},
|
|
11420
|
-
|
|
11423
|
+
onFunctionError(error, name) {
|
|
11421
11424
|
logger.error(
|
|
11422
11425
|
colors.yellow(`[nuxt-devtools] RPC error on executing "${colors.bold(name)}":
|
|
11423
11426
|
`) + colors.red(error?.message || "")
|
|
@@ -11690,11 +11693,11 @@ window.__NUXT_DEVTOOLS_TIME_METRIC__.appInit = Date.now()
|
|
|
11690
11693
|
options.experimental?.timeline || options.timeline?.enabled ? import('./timeline.mjs').then(({ setup }) => setup(ctx)) : null
|
|
11691
11694
|
];
|
|
11692
11695
|
await Promise.all(integrations);
|
|
11693
|
-
|
|
11696
|
+
nuxt.hook("modules:done", () => nuxt.callHook("devtools:initialized", {
|
|
11694
11697
|
version: version$1,
|
|
11695
11698
|
packagePath: packageDir,
|
|
11696
11699
|
isGlobalInstall: isGlobalInstall()
|
|
11697
|
-
});
|
|
11700
|
+
}));
|
|
11698
11701
|
const isMac = os.platform() === "darwin";
|
|
11699
11702
|
logger.log([
|
|
11700
11703
|
colors.yellow(` \u279C DevTools: `),
|
package/dist/chunks/vscode.mjs
CHANGED
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/lwjah63g.js"}}</script><link rel="stylesheet" href="/__NUXT_DEVTOOLS_BASE__/_nuxt/entry.css-gx482m17.css" crossorigin><link rel="stylesheet" href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/json-editor-vue.css-lkbe0qhh.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/lwjah63g.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/rolldown-runtime-oipoa1or.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/json-editor-vue-ddj4xtqm.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/shiki-kunkft64.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/dist-joij2tdx.js"><script type="module" src="/__NUXT_DEVTOOLS_BASE__/_nuxt/lwjah63g.js" crossorigin></script></head><body><div id="__nuxt"></div><div id="teleports"></div><script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__NUXT_DEVTOOLS_BASE__/",buildId:"2a5ea934-38f3-42f9-8ddd-b2d868a945a1",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1770802248048,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/lwjah63g.js"}}</script><link rel="stylesheet" href="/__NUXT_DEVTOOLS_BASE__/_nuxt/entry.css-gx482m17.css" crossorigin><link rel="stylesheet" href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/json-editor-vue.css-lkbe0qhh.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/lwjah63g.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/rolldown-runtime-oipoa1or.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/json-editor-vue-ddj4xtqm.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/shiki-kunkft64.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/dist-joij2tdx.js"><script type="module" src="/__NUXT_DEVTOOLS_BASE__/_nuxt/lwjah63g.js" crossorigin></script></head><body><div id="__nuxt"></div><div id="teleports"></div><script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__NUXT_DEVTOOLS_BASE__/",buildId:"2a5ea934-38f3-42f9-8ddd-b2d868a945a1",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1770802248050,false]</script></body></html>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{E as e,W as t,v as n}from"./vendor/json-editor-vue-ddj4xtqm.js";import{t as r}from"./composables-g8w9dpc0.js";var i={"h-screen":``,"w-screen":``,"bg-black":``},a=e({__name:`__blank`,setup(e){return(e,r)=>(t(),n(`div`,i))}});export{a as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{C as e,Ct as t,E as n,Mt as r,Qt as i,W as a,Y as o,_ as s,c,dt as l,ft as u,g as d,h as f,m as p,tn as m,v as h,w as g}from"./vendor/json-editor-vue-ddj4xtqm.js";import"./vendor/shiki-kunkft64.js";import{C as _,D as v,G as y,Ht as b,In as x,Jt as S,Kn as C,N as w,Nn as T,T as E,c as D,et as O,f as k,k as A,kt as j,l as M,o as N,q as P,qt as F,t as I,y as L}from"#entry";import"./client-cbmkjf3j.js";import{t as R}from"./ncode-block-j2hcqwrp.js";import{t as z}from"./composables-g8w9dpc0.js";import{t as B}from"./ncheckbox-f4a8016e.js";import{t as V}from"./filepath-item-osqp88cx.js";import{t as H}from"./help-fab-bhtk9hzf.js";var U={"h-full":``,grid:`~ rows-[max-content_1fr]`},W={flex:`~ wrap`,"w-full":``},G=[`onClick`],K={key:0,flex:`~ col gap-4 items-center justify-center`,p4:``},q={grid:`~ cols-[30px_1fr] gap-x-2 gap-y-3 items-center justify-center`,"w-100":``},J=`/__nuxt_devtools__/client`,Y=n({__name:`BuildAnalyzeDetails`,props:{current:{},prev:{}},setup(n){let d=n,_=`${x().app.baseURL.replace(J,`/`)}/__nuxt_devtools__/analyze/`.replace(/\/+/g,`/`),v=p(()=>{let e=[{name:`Overview`,id:`overview`}];return d.current.features.bundleClient&&e.push({name:`Client Bundle`,id:`bundle-client`}),d.current.features.bundleNitro&&e.push({name:`Nitro Bundle`,id:`bundle-nitro`}),d.current.features.viteInspect&&e.push({name:`Vite Inspect`,id:`vite-inspect`}),e}),y=t(v.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 E(e){return b.clearAnalyzeBuilds(await P(),[e])}return(t,d)=>{let p=V,b=A;return a(),h(`div`,U,[f(`div`,W,[(a(!0),h(c,null,o(v.value,(e,t)=>(a(),h(`button`,{key:t,px4:``,py2:``,border:`r base`,hover:`bg-active`,class:i(e.id===y.value?.id?``:`border-b`),onClick:t=>y.value=e},[f(`div`,{class:i(e.id===y.value?.id?``:`op30`)},m(e.name),3)],10,G))),128)),d[1]||=f(`div`,{border:`b base`,"flex-auto":``},null,-1)]),y.value?.id===`overview`?(a(),h(`div`,K,[d[15]||=f(`div`,{"flex-auto":``},null,-1),f(`div`,q,[d[10]||=f(`div`,{"i-carbon-commit":``,"text-xl":``},null,-1),f(`div`,null,[d[2]||=f(`div`,{"text-sm":``,op50:``},` Name `,-1),f(`div`,null,m(n.current.name),1)]),d[11]||=f(`div`,{"i-carbon-time":``,"text-xl":``},null,-1),f(`div`,null,[d[3]||=f(`div`,{"text-sm":``,op50:``},` Build duration `,-1),f(`div`,null,m(w(n.current)),1)]),n.current.size?.clientBundle?(a(),h(c,{key:0},[d[5]||=f(`div`,{"i-carbon-cics-program":``,"text-xl":``},null,-1),f(`div`,null,[d[4]||=f(`div`,{"text-sm":``,op50:``},` Client bundle size `,-1),f(`div`,null,m(T(n.current.size.clientBundle)),1)])],64)):s(``,!0),n.current.size?.nitroBundle?(a(),h(c,{key:1},[d[7]||=f(`div`,{"i-carbon-bare-metal-server":``,"text-xl":``},null,-1),f(`div`,null,[d[6]||=f(`div`,{"text-sm":``,op50:``},` Nitro bundle size `,-1),f(`div`,null,m(T(n.current.size.nitroBundle)),1)])],64)):s(``,!0),d[12]||=f(`div`,{"i-carbon-edge-node":``,"text-xl":``},null,-1),f(`div`,null,[d[8]||=f(`div`,{"text-sm":``,op50:``},` Built `,-1),f(`div`,null,m(r(S)(new Date(n.current.endTime))),1)]),d[13]||=f(`div`,{"i-carbon:folder-parent":``,"text-xl":``},null,-1),f(`div`,null,[d[9]||=f(`div`,{"text-sm":``,op50:``},` Report Path `,-1),g(p,{filepath:n.current.analyzeDir},null,8,[`filepath`])])]),d[16]||=f(`div`,{"flex-auto":``},null,-1),g(b,{n:`rose`,icon:`carbon-delete`,onClick:d[0]||=e=>E(n.current.name)},{default:l(()=>[...d[14]||=[e(` Delete this report `,-1)]]),_:1})])):s(``,!0),d._lazyshow1||y.value?.id===`bundle-client`?(d._lazyshow1=!0,a(),h(c,null,[u(f(`iframe`,{src:`${r(_)}${n.current.slug}/client.html`,"h-full":``,"w-full":``},null,8,[`src`]),[[C,y.value?.id===`bundle-client`]])],64)):s(`v-show-if`,!0),d._lazyshow2||y.value?.id===`bundle-nitro`?(d._lazyshow2=!0,a(),h(c,null,[u(f(`iframe`,{src:`${r(_)}${n.current.slug}/nitro.html`,"h-full":``,"w-full":``},null,8,[`src`]),[[C,y.value?.id===`bundle-nitro`]])],64)):s(`v-show-if`,!0),d._lazyshow3||y.value?.id===`vite-inspect`?(d._lazyshow3=!0,a(),h(c,null,[u(f(`iframe`,{src:`${r(_)}${n.current.slug}/.vite-inspect/`,"h-full":``,"w-full":``},null,8,[`src`]),[[C,y.value?.id===`vite-inspect`]])],64)):s(`v-show-if`,!0)])}}}),X=Object.assign(Y,{__name:`BuildAnalyzeDetails`}),Z={},Q={class:`markdown-body`};function $(t,n){return a(),h(`div`,Q,[...n[0]||=[f(`template`,null,[f(`div`,{class:`markdown-body`},[f(`h1`,null,`Build Analyze`),f(`p`,null,[e(`DevTools provides a build analyze tool to help you understand the size of your app in production. Whenever you start a new build, it runs the command `),f(`code`,{"v-pre":``},`nuxt build --analyze`),e(` and present the output data directly in DevTools for easy browsing and comparing.`)])])],-1)]])}var ee=w(Z,[[`render`,$]]),te={flex:`~ col`},ne=[`onClick`],re={flex:`~ gap-1 items-center wrap`,"w-full":``,"text-sm":``,op60:``},ie={flex:`~ items-center justify-center wrap`,p4:``},ae={flex:`~ col gap-1`,"w-250":``,p4:``},oe={flex:`~ gap-3`,mt2:``,"justify-end":``},se=n({__name:`analyze-build`,setup(n){let u=F(),y=O(),x=T(),C=j(`analyze-build:slug`,``),w=p(()=>y.value?.builds.find(e=>e.slug===C.value)??y.value?.builds[0]),z=t(!1),V=t(``),U=p(()=>y.value?.builds.some(e=>e.name===V.value.trim()));async function W(){V.value=await b.generateAnalyzeBuildName(),await u.start()&&(L(`analyze-build:start`),I.value={name:V.value,processId:await b.startAnalyzeBuild(await P(),V.value)},z.value&&q())}let G=_();function K(e){return`${((e.endTime-e.startTime)/1e3).toFixed(1)}s`}function q(){I.value?.processId&&(G.value=I.value.processId,x.push(`/modules/terminals`))}return N(()=>[{id:`action:analyze-build: start`,title:`Start a new analyze build`,icon:`i-carbon-edge-node`,action:W}]),(t,n)=>{let p=A,_=X,b=k,x=M,T=D,O=v,j=R,N=B,P=E,F=ee,L=H;return a(),h(c,null,[g(x,{"left-size":30},{left:l(()=>[f(`div`,te,[(a(!0),h(c,null,o(r(y)?.builds,e=>(a(),h(c,{key:e.slug},[f(`button`,{flex:`~ col gap1`,p3:``,"hover:bg-active":``,class:i(e.slug===w.value?.slug?`text-primary bg-active`:``),onClick:t=>C.value=e.slug},[f(`code`,null,m(e.name),1),f(`div`,re,[n[4]||=f(`div`,{"i-carbon-time":``},null,-1),f(`span`,null,m(K(e)),1),n[5]||=f(`div`,{"flex-auto":``},null,-1),f(`span`,null,m(r(S)(new Date(e.endTime))),1)])],10,ne),n[6]||=f(`div`,{"x-divider":``},null,-1)],64))),128)),f(`div`,ie,[r(I)?(a(),d(p,{key:1,n:`primary`,icon:`carbon-circle-dash animate-spin`,onClick:n[1]||=e=>q()},{default:l(()=>[...n[8]||=[e(` Building... `,-1)]]),_:1})):(a(),d(p,{key:0,n:`primary`,icon:`carbon-edge-node`,onClick:n[0]||=e=>W()},{default:l(()=>[...n[7]||=[e(` Start a new build `,-1)]]),_:1}))])])]),right:l(()=>[w.value?(a(),d(_,{key:0,current:w.value},null,8,[`current`])):(a(),d(b,{key:1}))]),_:1}),g(r(u),null,{default:l(({resolve:t})=>[g(P,{"model-value":!0,onClose:e=>t(!1)},{default:l(()=>[f(`div`,ae,[n[13]||=f(`h3`,{class:`text-lg font-medium leading-6`,mb2:``},` Start analyze build? `,-1),n[14]||=f(`p`,{op50:``},` Enter the name of the build: `,-1),g(T,{modelValue:V.value,"onUpdate:modelValue":n[2]||=e=>V.value=e,placeholder:`Build name`},null,8,[`modelValue`]),U.value?(a(),d(O,{key:0,"n-orange":``},{default:l(()=>[...n[9]||=[e(` A build with the same name already exists, continue would overrides the previous build result. `,-1)]]),_:1})):s(``,!0),n[15]||=f(`div`,{my3:``,"x-divider":``},null,-1),n[16]||=f(`p`,{op50:``},` The following command will be executed in your terminal: `,-1),g(j,{code:`npx nuxi analyze --no-serve --name=${V.value}`,lang:`bash`,px4:``,py2:``,border:`~ base rounded`,lines:!1},null,8,[`code`]),g(N,{modelValue:z.value,"onUpdate:modelValue":n[3]||=e=>z.value=e,mt2:``,n:`primary`},{default:l(()=>[...n[10]||=[e(` Navigate to terminal `,-1)]]),_:1},8,[`modelValue`]),f(`div`,oe,[g(p,{onClick:e=>t(!1)},{default:l(()=>[...n[11]||=[e(` Cancel `,-1)]]),_:1},8,[`onClick`]),g(p,{n:`solid primary`,onClick:e=>t(!0)},{default:l(()=>[...n[12]||=[e(` Start `,-1)]]),_:1},8,[`onClick`])])])]),_:2},1032,[`onClose`])]),_:1}),g(L,null,{default:l(()=>[g(F)]),_:1})],64)}}});export{se as default};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{C as e,Ct as t,E as n,Mt as r,Q as i,Qt as a,W as o,X as s,Y as c,_ as l,c as u,dt as d,en as f,ft as p,g as m,h,m as g,tn as _,v,vt as y,w as b}from"./vendor/json-editor-vue-ddj4xtqm.js";import"./vendor/shiki-kunkft64.js";import{$ as x,Gn as S,Gt as C,Ht as w,Mt as T,T as E,Ut as D,Wt as O,X as k,Xt as A,_ as j,an as M,c as N,in as P,j as F,k as I,on as L,ot as R,pt as z,q as B,qn as ee,s as V,sn as H,tn as U,v as te,y as W}from"#entry";import{t as G}from"./ndropdown-ef0253xr.js";import"./client-cbmkjf3j.js";import"./ncode-block-j2hcqwrp.js";import{t as K}from"./ndrawer-lh0r2gbb.js";import{t as q}from"./composables-g8w9dpc0.js";import{t as J}from"./ncheckbox-f4a8016e.js";import{t as ne}from"./filepath-item-osqp88cx.js";import{t as Y}from"./nnavbar-fdsyxwr6.js";import"./nicon-title-hrj2h1mn.js";import{t as re}from"./nsection-block-kp1wt3o4.js";import{t as X}from"./code-snippets-cgl6wpax.js";var ie={key:0,"h-full":``,"w-full":``,flex:``,"items-center":``,"justify-center":``},ae={for:`drop-zone-input`,"text-3xl":``,hover:`text-green cursor-pointer`,"transition-all":``},oe={key:1,relative:``,"h-full":``,"w-full":``,grid:`~ rows-[max-content_1fr_max-content]`},se={grid:`~ cols-minmax-8rem gap-8`,"overflow-auto":``,p6:``},ce={flex:``,"items-center":``,"justify-center":``,"of-hidden":``,rounded:``,"rounded-t-lg":``,"bg-active":``,"object-cover":``,class:`aspect-1/1`,border:`~ base`},le=[`src`],ue={flex:`~ gap1`,"items-center":``},de={flex:`~ gap-2`,"items-center":``,"justify-center":``,p8:``},fe=n({__name:`AssetDropZone`,props:{modelValue:{type:Boolean,required:!0},folder:{type:String,required:!0}},setup(n){let s=n,f=L(s,`modelValue`),g=t(),_=t([]);function y(e){g.value=e.target,f.value=!0}function x(e){e.target===g.value&&(f.value=!1)}function S(e){e.preventDefault()}function C(e){e.preventDefault(),T(e.dataTransfer.files)}function T(e){let t=Array.from(e||[]);if(t.length){let e=[],n=_.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===``&&k({message:`Folders are not supported yet`,icon:`carbon:face-dissatisfied`,classes:`text-orange`}),e.push(r);_.value=[..._.value,...e]}}async function E(){if(D.value||O.value)return;W(`assets:upload`);let e=[];for(let t of _.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 w.writeStaticAssets(await B(),[...e],s.folder).then(()=>{R(),k({message:`Files uploaded successfully!`,icon:`i-carbon:checkmark`})}).catch(e=>{R(),k({message:`Error uploading files: ${e?.message??`unknown`}`,icon:`i-carbon-warning`,classes:`text-red`})}),f.value=!1}function A(e){_.value?.splice(e,1)}function j(e){return URL.createObjectURL(e)}function M(e,t){let[n,r]=e.name.split(`.`),i=t.replace(/\.\w+$/,``),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}),_.value.splice(_.value.indexOf(e),1,e),e)}function P(){_.value=[]}function R(){f.value=!1,P()}return U(`dragenter`,y),U(`dragleave`,x),U(`dragover`,S),U(`drop`,C),(t,n)=>{let s=I,g=F,y=N,x=i(`tooltip`);return o(),v(`div`,{fixed:``,"bottom-0":``,"left-13":``,"right-0":``,"top-0":``,"z-10":``,"backdrop-blur-20":``,"transition-all":``,class:a(r(f)?`opacity-100 visible`:`opacity-0 invisible`)},[p(b(s,{icon:`carbon-close`,title:`Close`,absolute:``,"right-5":``,"top-5":``,"z-20":``,"text-xl":``,border:!1,onClick:R},null,512),[[x,`Close`,void 0,{"bottom-end":!0}]]),_.value?.length?(o(),v(`div`,oe,[n[4]||=h(`div`,{px6:``,py6:``},[h(`h1`,{"text-2xl":``},` Upload `),h(`p`,{"text-sm":``,op50:``},` Drag and drop files to upload `)],-1),h(`div`,se,[(o(!0),v(u,null,c(_.value,(e,t)=>(o(),v(`div`,{key:e.name,flex:`~ col gap-2`,relative:``,"h-50":``,"w-40":``,"items-center":``},[h(`div`,ce,[h(`img`,{"h-full":``,"w-full":``,"rounded-t-lg":``,"object-cover":``,src:j(e)},null,8,le)]),h(`div`,ue,[b(y,{n:`xs`,"h-full":``,"flex-auto":``,"model-value":e.name,"onUpdate:modelValue":t=>M(e,t.target.value)},null,8,[`model-value`,`onUpdate:modelValue`]),b(s,{n:`red`,icon:`carbon-trash-can`,"h-full":``,"flex-none":``,title:`Remove file`,onClick:e=>A(t)},null,8,[`onClick`])])]))),128))]),h(`div`,de,[_.value.length?(o(),m(s,{key:0,n:`red`,onClick:P},{default:d(()=>[b(g,{icon:`carbon-clean`}),n[2]||=e(` Clear `,-1)]),_:1})):l(``,!0),b(s,{disabled:!_.value.length,n:`primary solid`,onClick:E},{default:d(()=>[b(g,{icon:`carbon-cloud-upload`}),n[3]||=e(` Upload `,-1)]),_:1},8,[`disabled`])])])):(o(),v(`div`,ie,[h(`label`,ae,[b(g,{icon:`carbon-cloud-upload`,"mr-2":``}),n[1]||=e(` Drop files here or click to select `,-1)]),h(`input`,{id:`drop-zone-input`,type:`file`,multiple:``,hidden:``,onChange:n[0]||=e=>T(e.target.files)},null,32)]))],2)}}}),pe=Object.assign(fe,{__name:`AssetDropZone`}),me=n({__name:`AssetFontPreview`,props:{asset:{}},setup(e){let t=e,n=g(()=>`devtools-assets-${T(t.asset)}`);return P(g(()=>`
|
|
2
|
+
@font-face {
|
|
3
|
+
font-family: '${n.value}';
|
|
4
|
+
src: url('${t.asset.publicPath}');
|
|
5
|
+
}
|
|
6
|
+
`)),(e,t)=>(o(),v(`div`,{"of-hidden":``,style:f({fontFamily:`'${n.value}'`})},` Aa Bb Cc Dd Ee Ff Gg Hh Ii Jj Kk Ll Mm Nn Oo Pp Qq Rr Ss Tt Uu Vv Ww Xx Yy Zz `,4))}}),he=Object.assign(me,{__name:`AssetFontPreview`}),ge={flex:``,"items-center":``,"justify-center":``,"of-hidden":``,"bg-active":``,"object-cover":``,p1:``},_e=[`src`],ve={key:2,"i-carbon-document":``,"text-3xl":``,op20:``},ye={key:3,"w-full":``,"self-start":``,p4:``},be=[`textContent`],xe={key:4},Se=[`src`,`autoplay`,`controls`],Ce={key:5},we={key:0,"i-carbon-volume-up":``,"text-3xl":``,op20:``},Te=[`src`],Ee={key:6,"i-carbon-help":``,"text-3xl":``,op20:``},De=n({__name:`AssetPreview`,props:{asset:{},textContent:{},detail:{type:Boolean}},setup(e){return(t,n)=>{let r=he;return o(),v(`div`,ge,[e.asset.type===`image`?(o(),v(`img`,{key:0,src:e.asset.publicPath},null,8,_e)):e.asset.type===`font`?(o(),m(r,{key:e.asset.publicPath,asset:e.asset,"self-stretch":``,p2:``,"text-2xl":``},null,8,[`asset`])):e.asset.type===`text`&&!e.textContent?(o(),v(`div`,ve)):e.asset.type===`text`&&e.textContent?(o(),v(`div`,ye,[h(`pre`,{"max-h-10rem":``,"of-hidden":``,"text-xs":``,"font-mono":``,textContent:_(e.textContent)},null,8,be)])):e.asset.type===`video`?(o(),v(`div`,xe,[h(`video`,{src:e.asset.publicPath,autoplay:e.detail,controls:e.detail},null,8,Se)])):e.asset.type===`audio`?(o(),v(`div`,Ce,[e.detail?(o(),v(`audio`,{key:1,src:e.asset.publicPath,controls:``},null,8,Te)):(o(),v(`div`,we))])):(o(),v(`div`,Ee))])}}}),Z=Object.assign(De,{__name:`AssetPreview`}),Oe={relative:``,flex:`~ col gap-1`,hover:`bg-active`,"items-center":``,"of-hidden":``,rounded:``,p2:``},ke={"w-full":``,"of-hidden":``,truncate:``,"ws-nowrap":``,"text-center":``,"text-xs":``},Ae=n({__name:`AssetGridItem`,props:{asset:{},folder:{}},setup(e){let t=e,n=g(()=>t.folder&&t.asset.path.startsWith(t.folder)?t.asset.path.slice(t.folder.length):t.asset.path);return(t,r)=>{let i=F,a=Z;return o(),v(`button`,Oe,[e.asset.layer?(o(),m(i,{key:0,icon:`i-carbon-layers`,absolute:``,"right-4":``,"top-4":``,"bg-primary":``})):l(``,!0),b(a,{"h-30":``,"w-30":``,rounded:``,border:`~ base`,asset:e.asset},null,8,[`asset`]),h(`div`,ke,_(n.value),1)])}}}),je=Object.assign(Ae,{__name:`AssetGridItem`}),Me=n({__name:`AssetListItem`,props:{item:{},index:{default:0},modelValue:{}},setup(n,{emit:i}){let d=n,p=L(d,`modelValue`,i,{passive:!0}),b=g(()=>d.item?.children?.length),x=t(!0),S=g(()=>b.value?`i-carbon-folder`:d.item.type===`image`?`i-carbon-image`:d.item.type===`video`?`i-carbon-video`:d.item.type===`audio`?`i-carbon-volume-up`:d.item.type===`font`?`i-carbon-text-small-caps`:d.item.type===`text`?`i-carbon-document`:d.item.type===`json`?`i-carbon-json`:`i-carbon-document-blank`);return(t,i)=>{let d=F,g=Q;return o(),v(`div`,null,[h(`button`,{flex:`~ gap-2`,"w-full":``,"items-center":``,hover:`bg-active`,px4:``,py1:``,style:f({paddingLeft:`calc(1rem + ${n.index*1.5}em)`}),class:a({"bg-active":!b.value&&r(p)?.filePath===n.item?.filePath}),border:`b base`,onClick:i[0]||=e=>b.value?x.value=!x.value:p.value=n.item},[h(`div`,{class:a(S.value)},null,2),h(`span`,{class:a({"flex items-center":b.value}),"flex-auto":``,"text-start":``,"text-sm":``,"font-mono":``},[e(_(n.item.path)+` `,1),n.item.layer?(o(),m(d,{key:0,icon:`i-carbon-layers`,"bg-primary":``})):l(``,!0)],2),b.value?(o(),m(d,{key:0,icon:`carbon:chevron-right`,"transform-rotate":x.value?90:0,transition:``},null,8,[`transform-rotate`])):l(``,!0)],6),x.value?s(t.$slots,`default`,{key:0},()=>[(o(!0),v(u,null,c(n.item?.children,e=>(o(),m(g,{key:e.filepath,modelValue:r(p),"onUpdate:modelValue":i[1]||=e=>y(p)?p.value=e:null,item:e,index:n.index+1},null,8,[`modelValue`,`item`,`index`]))),128))]):l(``,!0)])}}}),Q=Object.assign(Me,{__name:`AssetListItem`}),Ne={flex:`~ col gap-4`,"min-h-full":``,"w-full":``,"of-hidden":``,p4:``},Pe={flex:`~`,"items-center":``,"justify-center":``},Fe={"max-w-full":``,"w-full":``,"table-fixed":``},Ie={flex:`~ gap-1`,"w-full":``,"items-center":``},Le={flex:`~ gap-1`,"w-full":``,"items-center":``,"of-hidden":``},Re={"flex-auto":``,"of-hidden":``,truncate:``,"ws-pre":``,"font-mono":``},ze={capitalize:``},Be={key:0},Ve={op70:``},He={flex:`~ gap2 wrap`},Ue={flex:`~ col gap-4`,"min-h-full":``,"w-full":``,"of-hidden":``,p8:``},We={flex:`~ gap2 wrap justify-center`},Ge={flex:`~ col gap-4`,"min-h-full":``,"w-full":``,"of-hidden":``,p8:``},Ke={flex:`~ gap2 wrap justify-center`},qe={flex:`~ col gap-4`,"min-h-full":``,"w-full":``,"of-hidden":``,p4:``},Je={flex:``,"justify-end":``,"gap-4":``},$=n({__name:`AssetDetails`,props:{modelValue:{}},setup(n,{emit:a}){let s=L(n,`modelValue`,a,{passive:!0}),c=C(async()=>{if(s.value.type===`image`)return w.getImageMeta(await B(),s.value.filePath)}),f=t(!1),y=t(),x=t(0),T=C(async()=>{if(s.value.type!==`text`)return;x.value;let e=await w.getTextAssetContent(await B(),s.value.filePath);return y.value=e,e});async function D(){if(T.value!==y.value)try{await w.writeStaticAssets(await B(),[{path:s.value.path,content:y.value,override:!0}],``),f.value=!1,x.value++,k({message:`Updated`,icon:`i-carbon-checkmark`,classes:`text-green`})}catch(e){console.error(e),k({message:`Something went wrong!`,icon:`i-carbon-warning`,classes:`text-red`})}}let O=R(),A=g(()=>(O.value?._installedModules||[]).some(e=>e.meta?.name===`@nuxt/image`||e.meta?.name===`@nuxt/image-edge`||e.meta?.name===`@nuxt/image-nightly`)),P=g(()=>{let e=[];if(s.value.type===`image`){let t=c.value?.width?`\n width="${c.value.width}"\n height="${c.value.height}" `:` `;return e.push({lang:`vue-html`,code:`<img${t}\n src="${s.value.publicPath}"\n/>`,name:`Plain Image`}),A.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}),F=j(),z=te(),V=M(()=>s.value.mtime),H=g(()=>{let e=s.value.size;return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(2)} KB`:`${(e/1024/1024).toFixed(2)} MB`}),U=g(()=>{if(!c.value?.width||!c.value?.height)return``;let e=(t,n)=>n?e(n,t%n):t,t=e(c.value.width,c.value.height);return t>3?`${c.value.width/t}:${c.value.height/t}`:``}),W=g(()=>[`image`,`text`,`video`,`audio`,`font`].includes(s.value.type)),G=t(!1);async function K(){try{await w.deleteStaticAsset(await B(),s.value.filePath),s.value=void 0,G.value=!1,k({message:`Asset deleted`,icon:`i-carbon-checkmark`,classes:`text-green`})}catch(e){console.error(e),k({message:`Something went wrong!`,icon:`i-carbon-warning`,classes:`text-red`})}}let q=t(!1),J=t(``);async function Y(){let e=s.value.filePath.split(`/`),t=e.slice(-1)[0]?.split(`.`).slice(0,-1).join(`.`);if(!J.value||J.value===t)return k({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(`/`)}/${J.value}.${t}`;await w.renameStaticAsset(await B(),s.value.filePath,n),s.value=void 0,q.value=!1,k({message:`Asset renamed`,icon:`i-carbon-checkmark`,classes:`text-green`})}catch(e){console.error(e),k({message:`Something went wrong!`,icon:`i-carbon-warning`,classes:`text-red`})}}return(t,n)=>{let a=Z,g=ne,x=I,C=X,w=E,O=N,k=i(`tooltip`);return o(),v(u,null,[h(`div`,Ne,[W.value?(o(),v(u,{key:0},[n[13]||=h(`div`,{flex:`~ gap2`,"mb--2":``,"items-center":``,op50:``},[h(`div`,{"x-divider":``}),h(`div`,{"flex-none":``},` Preview `),h(`div`,{"x-divider":``})],-1),h(`div`,Pe,[b(a,{detail:``,"max-h-80":``,"min-h-20":``,"min-w-20":``,"w-auto":``,rounded:``,border:`~ base`,asset:r(s),"text-content":r(T)},null,8,[`asset`,`text-content`])])],64)):l(``,!0),n[25]||=h(`div`,{flex:`~ gap2`,"mb--2":``,"items-center":``,op50:``},[h(`div`,{"x-divider":``}),h(`div`,{"flex-none":``},` Details `),h(`div`,{"x-divider":``})],-1),h(`table`,Fe,[h(`tbody`,null,[h(`tr`,null,[n[14]||=h(`td`,{"w-30":``,"ws-nowrap":``,pr5:``,"text-right":``,op50:``},` Filepath `,-1),h(`td`,null,[h(`div`,Ie,[b(g,{filepath:r(s).filePath,"text-left":``},null,8,[`filepath`]),p(b(x,{"flex-none":``,title:`Open in Editor`,icon:`carbon-launch`,border:!1,onClick:n[0]||=e=>r(z)(r(s).filePath)},null,512),[[k,`Open in Editor`]])])])]),h(`tr`,null,[n[15]||=h(`td`,{"w-30":``,"ws-nowrap":``,pr5:``,"text-right":``,op50:``},` Public Path `,-1),h(`td`,null,[h(`div`,Le,[h(`div`,Re,_(r(s).publicPath),1),p(b(x,{"flex-none":``,title:`Copy public path`,icon:`carbon-copy`,border:!1,onClick:n[1]||=e=>r(F)(r(s).publicPath,`assets-public-path`)},null,512),[[k,`Copy public path`]]),p(b(x,{"flex-none":``,to:r(s).publicPath,icon:`carbon-launch`,target:`_blank`,border:!1,title:`Open in browser`},null,8,[`to`]),[[k,`Open in browser`]])])])]),h(`tr`,null,[n[16]||=h(`td`,{"w-30":``,"ws-nowrap":``,pr5:``,"text-right":``,op50:``},` Type `,-1),h(`td`,ze,_(r(s).type),1)]),r(c)?.width?(o(),v(u,{key:0},[h(`tr`,null,[n[17]||=h(`td`,{"w-30":``,"ws-nowrap":``,pr5:``,"text-right":``,op50:``},` Image Size `,-1),h(`td`,null,_(r(c).width)+` x `+_(r(c).height),1)]),U.value?(o(),v(`tr`,Be,[n[18]||=h(`td`,{"w-30":``,"ws-nowrap":``,pr5:``,"text-right":``,op50:``},` Aspect Ratio `,-1),h(`td`,null,_(U.value),1)])):l(``,!0)],64)):l(``,!0),h(`tr`,null,[n[19]||=h(`td`,{"w-30":``,"ws-nowrap":``,pr5:``,"text-right":``,op50:``},` File size `,-1),h(`td`,null,_(H.value),1)]),h(`tr`,null,[n[20]||=h(`td`,{"w-30":``,"ws-nowrap":``,pr5:``,"text-right":``,op50:``},` Last modified `,-1),h(`td`,null,[e(_(new Date(r(s).mtime).toLocaleString())+` `,1),h(`span`,Ve,`(`+_(r(V))+`)`,1)])])])]),n[26]||=h(`div`,{flex:`~ gap2`,"mb--2":``,"items-center":``,op50:``},[h(`div`,{"x-divider":``}),h(`div`,{"flex-none":``},` Actions `),h(`div`,{"x-divider":``})],-1),h(`div`,He,[b(x,{to:r(s).publicPath,download:``,target:`_blank`,icon:`carbon-download`,n:`green`},{default:d(()=>[...n[21]||=[e(` Download `,-1)]]),_:1},8,[`to`]),r(s).type===`text`?(o(),m(x,{key:0,icon:`carbon-edit`,n:`cyan`,onClick:n[2]||=e=>f.value=!f.value},{default:d(()=>[...n[22]||=[e(` Edit `,-1)]]),_:1})):l(``,!0),b(x,{icon:`carbon-text-annotation-toggle`,n:`blue`,onClick:n[3]||=e=>q.value=!q.value},{default:d(()=>[...n[23]||=[e(` Rename `,-1)]]),_:1}),b(x,{icon:`carbon-delete`,n:`red`,onClick:n[4]||=e=>G.value=!G.value},{default:d(()=>[...n[24]||=[e(` Delete `,-1)]]),_:1})]),n[27]||=h(`div`,{"flex-auto":``},null,-1),P.value.length?(o(),m(C,{key:1,border:`t base`,"mx--4":``,"mb--4":``,"code-snippets":P.value},null,8,[`code-snippets`])):l(``,!0)]),b(w,{modelValue:G.value,"onUpdate:modelValue":n[6]||=e=>G.value=e},{default:d(()=>[h(`div`,Ue,[n[30]||=h(`span`,null,` Are you sure you want to delete this asset? `,-1),h(`div`,We,[b(x,{icon:`carbon-close`,onClick:n[5]||=e=>G.value=!1},{default:d(()=>[...n[28]||=[e(` Cancel `,-1)]]),_:1}),b(x,{icon:`carbon-delete`,n:`red`,onClick:K},{default:d(()=>[...n[29]||=[e(` Delete `,-1)]]),_:1})])])]),_:1},8,[`modelValue`]),b(w,{modelValue:q.value,"onUpdate:modelValue":n[9]||=e=>q.value=e},{default:d(()=>[h(`div`,Ge,[b(O,{modelValue:J.value,"onUpdate:modelValue":n[7]||=e=>J.value=e,placeholder:`New name`,n:`blue`},null,8,[`modelValue`]),h(`div`,Ke,[b(x,{icon:`carbon-close`,onClick:n[8]||=e=>q.value=!1},{default:d(()=>[...n[31]||=[e(` Cancel `,-1)]]),_:1}),b(x,{icon:`carbon-text-annotation-toggle`,n:`blue`,onClick:Y},{default:d(()=>[...n[32]||=[e(` Rename `,-1)]]),_:1})])])]),_:1},8,[`modelValue`]),r(s).type===`text`?(o(),m(w,{key:0,modelValue:f.value,"onUpdate:modelValue":n[12]||=e=>f.value=e},{default:d(()=>[h(`div`,qe,[p(h(`textarea`,{"onUpdate:modelValue":n[10]||=e=>y.value=e,placeholder:`Item value...`,class:`h-lg w-xl of-auto rounded-lg p-4 text-sm font-mono outline-none`,onKeydown:ee(D,[`enter`])},null,544),[[S,y.value]]),h(`div`,Je,[b(x,{icon:`carbon-close`,onClick:n[11]||=e=>f.value=!1},{default:d(()=>[...n[33]||=[e(` Cancel `,-1)]]),_:1}),b(x,{icon:`carbon:save`,n:`primary`,onClick:D},{default:d(()=>[...n[34]||=[e(` save `,-1)]]),_:1})])])]),_:1},8,[`modelValue`])):l(``,!0)],64)}}}),Ye=Object.assign($,{__name:`AssetDetails`}),Xe={"h-full":``,"of-auto":``},Ze={"flex-none":``,flex:`~ gap2 items-center`,"text-lg":``},Qe={flex:`~ items-center justify-center`,absolute:``,"bottom--1":``,"right--1":``,"h-4":``,"w-4":``,"rounded-full":``,"bg-primary:30":``,"text-8px":``},$e={flex:`~ col`,"w-30":``,"of-auto":``},et={"text-xs":``,op75:``},tt={op50:``},nt={key:0},rt={"mt--4":``,px2:``,grid:`~ cols-minmax-8rem`},it={key:1,p2:``,grid:`~ cols-minmax-8rem`},at={key:1},ot=n({__name:`assets`,setup(e){let n=z(),a=t(!1),s=t(``),f=g(()=>new V(n.value||[],{keys:[`path`]})),y=H(()=>{let e=[];for(let t of n.value||[]){let n=t.path.split(`.`).pop();n&&!e.find(e=>e.name===n)&&e.push({name:n,value:!0})}return e}),S=g(()=>(s.value?f.value.search(s.value).map(e=>e.item):n.value||[]).filter(e=>{let t=e.path.split(`.`).pop();return!t||y.some(e=>e.name===t&&e.value)})),C=g(()=>{let e={};for(let t of S.value){let n=`${t.path.split(`/`).slice(0,-1).join(`/`)}/`;e[n]||(e[n]=[]),e[n].push(t)}return Object.entries(e).sort(([e],[t])=>e.localeCompare(t))}),w=g(()=>{let e={path:`public`,children:[]},t=(e,n,r)=>{let[i,...a]=n,o=e.children.find(e=>e.path===i);o||(o={...r,path:i,children:[]},e.children.push(o)),a.length>1?t(o,a,r):a.length===1&&o.children.push({...r,path:a[0]})};return S.value.forEach(n=>{t(e,n.path.split(`/`).filter(e=>e!==``),n)}),e.children}),T=t(),{view:E}=x(`assets`);function D(){E.value=E.value===`list`?`grid`:`list`}A(`Escape`,()=>{T.value=void 0});let O=t();return(e,t)=>{let f=I,g=J,x=G,k=Y,A=pe,j=je,M=re,N=Q,P=Ye,F=K,L=i(`tooltip`);return o(),v(`div`,Xe,[b(k,{ref_key:`navbar`,ref:O,search:s.value,"onUpdate:search":t[1]||=e=>s.value=e,pb2:``},{actions:d(()=>[h(`div`,Ze,[p(b(f,{icon:`carbon:cloud-upload`,title:`File Upload`,border:!1,onClick:t[0]||=e=>a.value=!a.value},null,512),[[L,`File Upload`,void 0,{"bottom-end":!0}]]),r(y).length?(o(),m(x,{key:0,direction:`end`,n:`sm primary`},{trigger:d(({click:e})=>[p(b(f,{icon:`carbon-filter`,border:!1,title:`Filter`,p3:``,"text-lg":``,onClick:t=>e()},null,8,[`onClick`]),[[L,`Filter`,void 0,{"bottom-end":!0}]]),h(`span`,Qe,_(r(y).length),1)]),default:d(()=>[h(`div`,$e,[(o(!0),v(u,null,c(r(y),e=>(o(),m(g,{key:e.name,modelValue:e.value,"onUpdate:modelValue":t=>e.value=t,flex:`~ gap-2`,rounded:``,px2:``,py2:``},{default:d(()=>[h(`span`,et,_(e.name),1)]),_:2},1032,[`modelValue`,`onUpdate:modelValue`]))),128))])]),_:1})):l(``,!0),p(b(f,{"text-lg":``,border:!1,icon:r(E)===`grid`?`i-carbon-list`:`i-carbon-grid`,title:`Toggle view`,onClick:D},null,8,[`icon`]),[[L,`Toggle View`,void 0,{"bottom-end":!0}]])])]),default:d(()=>[h(`div`,tt,[s.value?(o(),v(`span`,nt,_(S.value.length)+` matched · `,1)):l(``,!0),h(`span`,null,_(r(n)?.length)+` assets in total`,1)])]),_:1},8,[`search`]),b(A,{modelValue:a.value,"onUpdate:modelValue":t[2]||=e=>a.value=e,folder:`/`},null,8,[`modelValue`]),r(E)===`grid`?(o(),v(u,{key:0},[C.value.length>1?(o(!0),v(u,{key:0},c(C.value,([e,t])=>(o(),m(M,{key:e,text:e,description:`${t.length} items`,open:t.length<=r(50),padding:!1},{default:d(()=>[h(`div`,rt,[(o(!0),v(u,null,c(t,t=>(o(),m(j,{key:t.path,asset:t,folder:e,onClick:e=>T.value=t},null,8,[`asset`,`folder`,`onClick`]))),128))])]),_:2},1032,[`text`,`description`,`open`]))),128)):(o(),v(`div`,it,[(o(!0),v(u,null,c(S.value,e=>(o(),m(j,{key:e.path,asset:e,onClick:t=>T.value=e},null,8,[`asset`,`onClick`]))),128))]))],64)):(o(),v(`div`,at,[(o(!0),v(u,null,c(w.value,(e,n)=>(o(),m(N,{key:n,modelValue:T.value,"onUpdate:modelValue":t[3]||=e=>T.value=e,item:e},null,8,[`modelValue`,`item`]))),128))])),b(F,{"model-value":!!T.value,"auto-close":``,"w-120":``,top:O.value,onClose:t[5]||=e=>T.value=void 0},{default:d(()=>[T.value?(o(),m(P,{key:0,modelValue:T.value,"onUpdate:modelValue":t[4]||=e=>T.value=e},null,8,[`modelValue`])):l(``,!0)]),_:1},8,[`model-value`,`top`])])}}});export{ot as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"id":"
|
|
1
|
+
{"id":"2a5ea934-38f3-42f9-8ddd-b2d868a945a1","timestamp":1770802212579}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"id":"2a5ea934-38f3-42f9-8ddd-b2d868a945a1","timestamp":1770802212579,"prerendered":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Et as e,jt as t}from"./vendor/json-editor-vue-ddj4xtqm.js";var n,r=[];function i(e){if(r.push(e),!(typeof window>`u`))return window.__NUXT_DEVTOOLS__&&r.forEach(e=>e(window.__NUXT_DEVTOOLS__)),Object.defineProperty(window,`__NUXT_DEVTOOLS__`,{set(e){e&&r.forEach(t=>t(e))},get(){return n.value},configurable:!0}),()=>{r.splice(r.indexOf(e),1)}}function a(){n||(n=e(),i(a));function r(){n&&t(n)}function a(e){n.value=e,e.host&&e.host.hooks.hook(`host:update:reactivity`,r)}return n}const o=a();export{o as t};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import{Ct as e,E as t,V as n,W as r,g as i,m as a}from"./vendor/json-editor-vue-ddj4xtqm.js";import{Zt as o}from"#entry";import{t as s}from"./ncode-block-j2hcqwrp.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){let t;for(t=e.length-1;t>=0&&e[t].match(/\s/);t--);return e.substring(t+1)}function v(e){let t=e.match(/^\s*/);return t?t[0]:``}var y=`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}`,b=RegExp(`[${y}]+|\\s+|[^${y}]`,`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=[];for(let t of Array.from(r.segment(e))){let e=t.segment;n.length&&/\s/.test(n[n.length-1])&&/\s/.test(e)?n[n.length-1]+=e:n.push(e)}}else n=e.match(b)||[];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)&&x(n,i,r,e),n=e,r=null,i=null)}),(r||i)&&x(n,i,r,null),e}};function x(e,t,n,r){if(t&&n){let i=v(t.value),a=_(t.value),o=v(n.value),s=_(n.value);if(e){let r=l(i,o);e.value=f(e.value,o,r),t.value=p(t.value,r),n.value=p(n.value,r)}if(r){let e=u(a,s);r.value=d(r.value,s,e),t.value=m(t.value,e),n.value=m(n.value,e)}}else if(n){if(e){let e=v(n.value);n.value=n.value.substring(e.length)}if(r){let e=v(r.value);r.value=r.value.substring(e.length)}}else if(e&&r){let n=v(r.value),i=v(t.value),a=_(t.value),o=l(n,i);t.value=p(t.value,o);let s=u(p(n,o),a);t.value=m(t.value,s),r.value=d(r.value,n,s),e.value=f(e.value,n,n.slice(0,n.length-s.length))}else if(r){let e=v(r.value),n=h(_(t.value),e);t.value=m(t.value,n)}else if(e){let n=h(_(e.value),v(t.value));t.value=p(t.value,n)}}new class extends c{tokenize(e){let t=RegExp(`(\\r?\\n)|[${y}]+|[^\\S\\n\\r]+|[^${y}]`,`ug`);return e.match(t)||[]}};const S=new class extends c{constructor(){super(...arguments),this.tokenize=w}equals(e,t,n){return n.ignoreWhitespace?((!n.newlineIsToken||!e.includes(`
|
|
2
|
+
`))&&(e=e.trim()),(!n.newlineIsToken||!t.includes(`
|
|
3
|
+
`))&&(t=t.trim())):n.ignoreNewlineAtEof&&!n.newlineIsToken&&(e.endsWith(`
|
|
4
|
+
`)&&(e=e.slice(0,-1)),t.endsWith(`
|
|
5
|
+
`)&&(t=t.slice(0,-1))),super.equals(e,t,n)}};function C(e,t,n){return S.diff(e,t,n)}function w(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 T(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(T(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=w}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(E(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 E(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]=E(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]=E(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 D=t({__name:`CodeDiff`,props:{from:{},to:{},lang:{}},setup(t){let c=t;function l(e,t){let n=C(e.trim(),t.trim()),r=[],i=[],a=[];for(let e of n){let t=e.value.trimEnd().split(`
|
|
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 u=a(()=>l(c.from,c.to));function d(e){let t=0;return e.replace(/class="shiki/,`class="shiki diff`).replace(/class="line"/g,e=>(t++,u.value.added.includes(t-1)?`class="line line-added"`:u.value.removed.includes(t-1)?`class="line line-removed"`:e))}let f=e();n(p);function p(){let e=o(f);e&&e.querySelector(`.line-added,.line-removed`)?.scrollIntoView()}return(e,n)=>{let a=s;return r(),i(a,{ref_key:`elRef`,ref:f,code:u.value.result,lang:t.lang,"transform-rendered":d,onLoaded:p},null,8,[`code`,`lang`])}}}),O=Object.assign(D,{__name:`CodeDiff`});export{O as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{C as e,E as t,Et as n,Mt as r,Qt as i,W as a,Y as o,_ as s,c,dt as l,g as u,h as d,lt as f,m as p,tn as m,v as h,w as g}from"./vendor/json-editor-vue-ddj4xtqm.js";import{_,k as v}from"#entry";import{t as y}from"./ncode-block-j2hcqwrp.js";var b={key:0,relative:``,"n-code-block":``},x={flex:`~ wrap`,"w-full":``},S=[`onClick`],C={flex:`~ gap-2`,px3:``,pb3:``,n:`sm primary`},w=t({__name:`CodeSnippets`,props:{codeSnippets:{},eventType:{}},setup(t){let w=t,T=n(w.codeSnippets[0]),E=_(),D=p(()=>T.value?.lang||`text`);return f(()=>{w.codeSnippets.includes(T.value)||(T.value=w.codeSnippets[0])}),(n,f)=>{let p=y,_=v;return t.codeSnippets.length?(a(),h(`div`,b,[d(`div`,x,[(a(!0),h(c,null,o(t.codeSnippets,(e,t)=>(a(),h(`button`,{key:t,px4:``,py2:``,border:`r base`,hover:`bg-active`,class:i(e===T.value?``:`border-b`),onClick:t=>T.value=e},[d(`div`,{class:i(e===T.value?``:`op30`),"font-mono":``},m(e.name),3)],10,S))),128)),f[1]||=d(`div`,{border:`b base`,"flex-auto":``},null,-1)]),T.value?(a(),h(c,{key:0},[g(p,{code:T.value.code,lang:D.value,lines:!1,"w-full":``,"of-auto":``,p3:``},null,8,[`code`,`lang`]),d(`div`,C,[g(_,{icon:`carbon-copy`,onClick:f[0]||=e=>r(E)(T.value.code,t.eventType||`code-snippet-${T.value.name}`)},{default:l(()=>[...f[2]||=[e(` Copy `,-1)]]),_:1}),T.value?.docs?(a(),u(_,{key:0,to:T.value.docs,target:`_blank`,icon:`carbon-catalog`},{default:l(()=>[...f[3]||=[e(` Docs `,-1)]]),_:1},8,[`to`])):s(``,!0)])],64)):s(``,!0)])):s(``,!0)}}}),T=Object.assign(w,{__name:`CodeSnippets`});export{T as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function e(e,t=65,n=50,r=1){let i=0;for(let t=0;t<e.length;t++)i=e.charCodeAt(t)+((i<<5)-i);return`hsla(${i%360}, ${t}%, ${n}%, ${r})`}export{e as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{$ as e,C as t,Ct as n,E as r,Et as i,Mt as a,P as o,Q as s,Qt as c,V as l,W as u,X as d,Y as f,Z as p,_ as m,c as h,ct as g,dt as _,ft as v,g as y,h as b,m as x,tn as S,v as C,vt as w,w as T}from"./vendor/json-editor-vue-ddj4xtqm.js";import"./vendor/shiki-kunkft64.js";import{$ as E,Ct as D,E as ee,It as O,N as k,Pt as te,_ as A,_t as j,j as M,k as N,lt as P,nt as F,ot as I,s as L,un as ne,yt as R}from"#entry";import{t as re}from"./ndrawer-lh0r2gbb.js";import{t as z}from"./composables-g8w9dpc0.js";import{t as B}from"./ncheckbox-f4a8016e.js";import{t as V}from"./filepath-item-osqp88cx.js";import{t as H}from"./help-fab-bhtk9hzf.js";import{t as U}from"./nnavbar-fdsyxwr6.js";import{t as W}from"./nicon-title-hrj2h1mn.js";import{t as G}from"./nsection-block-kp1wt3o4.js";import{n as K}from"./dist-k9rc0n5t.js";import{t as q}from"./nbadge-ijsj8fjy.js";import{n as J,t as Y}from"./vendor/vis-ccj7spt3.js";import{t as X}from"./nselect-tabs-dueuo8rw.js";import{n as ie,t as ae}from"./state-components-b5shg9ni.js";var oe={},se={class:`markdown-body`};function ce(e,t){return u(),C(`div`,se,[...t[0]||=[b(`template`,null,[b(`div`,{class:`markdown-body`},[b(`h1`,null,`Components`),b(`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.`),b(`p`,null,`Components placed in the components/ directory are automatically registered by Nuxt. They can be used in your templates without importing them.`),b(`p`,null,[b(`a`,{href:`https://nuxt.com/docs/guide/directory-structure/components`,target:`_blank`,rel:`noopener`},`Learn more in the documentation`)])])],-1)]])}var le=k(oe,[[`render`,ce]]),ue={"text-sm":``,"font-mono":``},de=r({__name:`ComponentName`,props:{component:{}},setup(e){let n=e,r=x(()=>n.component.pascalName||K(n.component.name||n.component.__name||n.component.kebabName||``));return(e,n)=>(u(),C(`code`,ue,[n[0]||=b(`span`,{mr1:``,op20:``},`<`,-1),t(S(r.value),1),n[1]||=b(`span`,{ml1:``,op20:``},`/>`,-1)]))}}),Z=Object.assign(de,{__name:`ComponentName`}),fe={flex:`~ col gap1`,"items-start":``,"of-hidden":``},pe={flex:`~ gap2 items-center`,px3:``},me={px3:``,pb2:``},he={key:0,border:`t base`,"max-h-60":``,"w-full":``,"of-auto":``,px3:``,py3:``},ge={"text-sm":``},_e={"text-primary":``},ve={key:0,flex:`~ col gap-2`,"items-start":``,pt3:``,"text-sm":``,op75:``},ye={key:1,border:`t base`,"max-h-60":``,"w-full":``,"of-auto":``,px3:``,py3:``},be={"text-sm":``},xe={"text-primary":``},Se={key:0,flex:`~ col gap-2`,"items-start":``,pt3:``,"text-sm":``,op75:``},Ce=r({__name:`ComponentDetails`,props:{component:{},dependencies:{},dependents:{}},setup(e){let n=e,r=x(()=>n.component.pascalName||K(n.component.name||n.component.__name||n.component.kebabName||``)),i=x(()=>n.component.filePath||n.component.file||n.component.__file||``),o=A();return(n,s)=>{let c=Z,l=N,p=q,g=V;return u(),C(`div`,fe,[b(`div`,pe,[T(c,{component:e.component},null,8,[`component`]),e.component.meta?.docs&&typeof e.component.meta.docs==`string`?(u(),y(l,{key:0,title:`Open docs`,"flex-none":``,n:`xs`,to:e.component.meta.docs,target:`_blank`,icon:`carbon-catalog`},{default:_(()=>[...s[1]||=[t(` Docs `,-1)]]),_:1},8,[`to`])):m(``,!0),T(l,{title:`Copy name`,"flex-none":``,n:`xs`,icon:`carbon-copy`,onClick:s[0]||=e=>a(o)(`<${r.value}></${r.value}>`,`component-name`)},{default:_(()=>[...s[2]||=[t(` Copy `,-1)]]),_:1}),e.component.global?(u(),y(p,{key:1,n:`green`,title:`Registered at runtime as a global component`,textContent:`runtime`})):m(``,!0)]),b(`div`,me,[i.value?(u(),y(g,{key:0,filepath:i.value,"w-full":``,"text-sm":``,op40:``,"group-hover:op75":``},null,8,[`filepath`])):m(``,!0)]),e.dependents?(u(),C(`div`,he,[b(`div`,ge,[b(`strong`,_e,S(e.dependents.length),1),s[3]||=b(`span`,{op50:``},` references`,-1)]),e.dependents.length?(u(),C(`div`,ve,[(u(!0),C(h,null,f(e.dependents,e=>(u(),y(g,{key:e,filepath:e},null,8,[`filepath`]))),128))])):m(``,!0)])):m(``,!0),e.dependencies?(u(),C(`div`,ye,[b(`div`,be,[b(`strong`,xe,S(e.dependencies.length),1),s[4]||=b(`span`,{op50:``},` dependencies`,-1)]),e.dependencies.length?(u(),C(`div`,Se,[(u(!0),C(h,null,f(e.dependencies,e=>(u(),y(g,{key:e,filepath:e},null,8,[`filepath`]))),128))])):m(``,!0)])):m(``,!0),d(n.$slots,`default`)])}}}),Q=Object.assign(Ce,{__name:`ComponentDetails`}),we={flex:`~ gap-x-3 gap-y-1 wrap`,"w-full":``},Te={relative:``,"h-full":``,"w-full":``},Ee={key:0,py4:``,pt3:``,flex:`~ col`},De={border:`t base`,p4:``},$=r({__name:`ComponentsGraph`,props:{components:{},relationships:{}},setup(e){let r=e,o=n(),s=n(),c=te(),f=i(),p=P(),v=I(),y=F(),{componentsGraphShowNodeModules:S,componentsGraphShowGlobalComponents:D,componentsGraphShowPages:O,componentsGraphShowLayouts:k,componentsGraphShowWorkspace:A}=E(`ui`),j=n(),M=n(``),L=ne(M,300),R=x(()=>{let e=r.relationships||[];if(j.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(j.value),Array.from(t)}return e}),z=x(()=>{let e=R.value.map(e=>{let t=r.components.find(t=>t.filePath===e.id),n=p.value?.find(t=>t.file===e.id),i=y.value?.find(t=>t.file===e.id),a=e.id.includes(`/node_modules/`)?`lib`:t?t.global?`global`:`user`:i?`layout`:n?`page`:`unknown`;if(!S.value&&a===`lib`||!O.value&&a===`page`||!k.value&&a===`layout`||!A.value&&a===`user`&&v.value&&!e.id.startsWith(v.value.rootDir)||!D.value&&a===`global`)return null;let o=a===`layout`?`hexagon`:a===`page`?`square`:`dot`,s=L.value&&!e.id.toLowerCase().includes(L.value.toLowerCase());return{id:e.id,label:G(e.id),group:a,shape:o,size:15+Math.min(e.deps.length/2,8),font:{color:s?`#8885`:c.value===`dark`?`white`:`black`},color:s?`#8885`:j.value?.id===e.id?`#82c742`:void 0,extra:{id:e.id,component:t,page:n,layout:i,relationship:e}}}).filter(e=>!!e),t=R.value.flatMap(e=>e.deps.map(t=>({from:e.id,to:t,arrows:{to:{enabled:!0,scaleFactor:.8}}})));return{nodes:new J(e),edges:t}}),V=x(()=>f.value?.component?(r.relationships?.find(e=>e.id===f.value?.component?.filePath)?.deps)?.map(e=>r.relationships?.find(t=>t.id===e)?.id).filter(Boolean):[]),H=x(()=>f.value?.component?(r.relationships?.filter(e=>e.deps.includes(f.value.component.filePath)))?.map(e=>r.relationships?.find(t=>t.id===e.id)?.id).filter(Boolean):[]);l(()=>{let e=new Y(o.value,z.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=z.value.nodes.get(t).extra}),g(z,()=>{e.setData(z.value)})});function W(){f.value=void 0}function G(e){let t=r.components.find(t=>t.filePath===e);return t?t.pascalName:e.replace(/.*\/components\//,``).replace(/\.vue$/,``).replace(/\/index$/,``).split(`/`).map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(``)}function K(){j.value=f.value?.relationship,f.value=void 0}return(e,n)=>{let r=B,i=U,c=ee,l=Q,p=N,g=re;return u(),C(h,null,[T(i,{ref_key:`navbar`,ref:s,search:M.value,"onUpdate:search":n[6]||=e=>M.value=e,absolute:``,"left-0":``,"right-0":``,"top-0":``},{actions:_(()=>[b(`div`,we,[T(r,{modelValue:a(O),"onUpdate:modelValue":n[0]||=e=>w(O)?O.value=e:null,n:`primary sm`},{default:_(()=>[...n[8]||=[b(`span`,{op75:``},`Show pages`,-1)]]),_:1},8,[`modelValue`]),T(r,{modelValue:a(k),"onUpdate:modelValue":n[1]||=e=>w(k)?k.value=e:null,n:`primary sm`},{default:_(()=>[...n[9]||=[b(`span`,{op75:``},`Show layouts`,-1)]]),_:1},8,[`modelValue`]),T(r,{modelValue:a(A),"onUpdate:modelValue":n[2]||=e=>w(A)?A.value=e:null,n:`primary sm`},{default:_(()=>[...n[10]||=[b(`span`,{op75:``},`Show workspace`,-1)]]),_:1},8,[`modelValue`]),T(r,{modelValue:a(S),"onUpdate:modelValue":n[3]||=e=>w(S)?S.value=e:null,n:`primary sm`},{default:_(()=>[...n[11]||=[b(`span`,{op75:``},`Show node_modules`,-1)]]),_:1},8,[`modelValue`]),T(r,{modelValue:a(D),"onUpdate:modelValue":n[4]||=e=>w(D)?D.value=e:null,n:`primary sm`},{default:_(()=>[...n[12]||=[b(`span`,{op75:``},`Show global components`,-1)]]),_:1},8,[`modelValue`])]),j.value?(u(),C(`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=>j.value=void 0},[...n[13]||=[t(` Clear filter `,-1),b(`div`,{"i-carbon-close":``},null,-1)]])):m(``,!0),n[14]||=b(`div`,{"flex-auto":``},null,-1),d(e.$slots,`default`)]),_:3},8,[`search`]),b(`div`,Te,[b(`div`,{ref_key:`container`,ref:o,"h-full":``,"w-full":``},null,512),T(c,{absolute:``,"bottom-3":``,"left-3":``,"border-0":``,"n-glass-effect":``,p2:``,px3:``,"text-sm":``},{default:_(()=>[...n[15]||=[b(`div`,{grid:`~ cols-[20px_1fr] items-center gap-y-1`},[b(`div`,{"h-3":``,"w-3":``,"rounded-full":``,"bg-hex-42b883":``}),b(`div`,{op50:``},` Component `),b(`div`,{"h-3":``,"w-3":``,"rounded-full":``,"bg-hex-97c2fc":``}),b(`div`,{op50:``},` Global Component `),b(`div`,{"h-3":``,"w-3":``,"bg-hex-42b2b8":``}),b(`div`,{op50:``},` Page `),b(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 726 628`,"ml--1px":``,"h-3":``},[b(`path`,{fill:`#4256b8`,"stroke-width":`4`,d:`M723 314 543 625.8H183L3 314 183 2.2h360L723 314z`})]),b(`div`,{op50:``},` Layout `),b(`div`,{"h-3":``,"w-3":``,"rounded-full":``,"bg-hex-b4b842":``}),b(`div`,{op50:``},` Library Component `),b(`div`,{"h-3":``,"w-3":``,"rounded-full":``,"bg-hex-b86542":``}),b(`div`,{op50:``},` Unknown `)],-1)]]),_:1}),T(g,{"model-value":!!(f.value&&f.value.component),top:s.value,border:`t l base`,"w-80":``,onClose:W},{default:_(()=>[f.value&&f.value.component?(u(),C(`div`,Ee,[T(l,{component:f.value.component,dependencies:V.value,dependents:H.value},null,8,[`component`,`dependencies`,`dependents`]),b(`div`,De,[T(p,{n:`primary solid`,onClick:n[7]||=e=>K()},{default:_(()=>[...n[16]||=[t(` Filter to this component `,-1)]]),_:1})])])):m(``,!0)]),_:1},8,[`model-value`,`top`])])],64)}}}),Oe=Object.assign($,{__name:`ComponentsGraph`}),ke={hover:`bg-active`,class:`group`,flex:`~ gap2`,"w-full":``,"items-center":``,rounded:``,px2:``,py1:``},Ae={key:0,"ml--1":``,"text-primary":``},je=r({__name:`ComponentItem`,props:{component:{},dependencies:{},dependents:{}},setup(e){let t=e,n=x(()=>t.component.filePath||t.component.file||t.component.__file||``);return(t,r)=>{let i=Z,a=Q,o=p(`VDropdown`),s=q,l=V;return u(),C(`div`,ke,[T(o,null,{popper:_(()=>[T(a,{component:e.component,dependencies:e.dependencies,dependents:e.dependents,"w-100":``,pt3:``},null,8,[`component`,`dependencies`,`dependents`])]),default:_(()=>[b(`button`,{"hover:text-primary":``,class:c(e.dependents&&e.dependents.length===0?`op50`:``)},[T(i,{component:e.component},null,8,[`component`])],2)]),_:1}),e.dependents?.length?(u(),C(`sup`,Ae,` x`+S(e.dependents?.length),1)):m(``,!0),e.component.global?(u(),y(s,{key:1,n:`green`,title:`Registered at runtime as a global component`,textContent:`runtime`})):m(``,!0),d(t.$slots,`default`),n.value?(u(),y(l,{key:2,filepath:n.value,"text-sm":``,op25:``,"group-hover:op75":``},null,8,[`filepath`])):m(``,!0)])}}}),Me=Object.assign(je,{__name:`ComponentItem`}),Ne={flex:`~ gap-2 items-center`},Pe={pl4:``},Fe=r({__name:`ComponentsList`,props:{components:{},relationships:{}},setup(e){let t=e,r=n(``),i=n(`all`),s=x(()=>{let e=t.components.map(e=>j(e,t.relationships));return i.value===`using`?e.filter(e=>e.dependents?.length):i.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`},l=x(()=>new L(s.value,{keys:[`component.pascalName`,`component.filePath`,`component.kebabName`]})),p=x(()=>{let e=[],t=new Map,n=[],i=[],a={user:0,lib:0,builtin:0,runtime:0};return(r.value?l.value.search(r.value).map(e=>e.item):s.value).forEach(r=>{let o=r.component;if(o.filePath&&D(o.filePath)){let e=R(o.filePath);if(!e)return;e===`nuxt`?(o.meta??={},o.meta.docs??=c?.[o.pascalName],n.push(r),a.builtin++):(t.has(e)||t.set(e,[]),t.get(e).push(r),a.lib++)}else o.global&&!o.filePath?(i.push(r),a.runtime++):(e.push(r),a.user++)}),{count:a,user:e,builtin:n,lib:t,runtime:i}});return(e,t)=>{let n=M,s=X,c=U,l=Me,g=G,v=W;return u(),C(h,null,[T(c,{search:r.value,"onUpdate:search":t[1]||=e=>r.value=e,pb3:``},{actions:_(()=>[d(e.$slots,`default`)]),default:_(()=>[b(`div`,Ne,[T(n,{icon:`carbon-filter`,op50:``}),T(s,{modelValue:i.value,"onUpdate:modelValue":t[0]||=e=>i.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?(u(),y(g,{key:0,icon:`carbon-nominal`,text:`User components`,open:p.value.user.length<=a(50),description:`Total components: ${p.value.count.user}`},{default:_(()=>[(u(!0),C(h,null,f(p.value.user,e=>(u(),y(l,o({key:e.component.filePath},{ref_for:!0},e),null,16))),128))]),_:1},8,[`open`,`description`])):m(``,!0),p.value.runtime.length?(u(),y(g,{key:1,icon:`carbon-load-balancer-global`,open:p.value.runtime.length<=a(50),text:`Runtime components`,description:`Total components: ${p.value.count.runtime}`},{default:_(()=>[(u(!0),C(h,null,f(p.value.runtime,e=>(u(),y(l,o({key:e.component.filePath},{ref_for:!0},e),null,16))),128))]),_:1},8,[`open`,`description`])):m(``,!0),p.value.builtin.length?(u(),y(g,{key:2,icon:`simple-icons-nuxtdotjs`,text:`Built-in components`,description:`Total components: ${p.value.count.builtin}`},{default:_(()=>[(u(!0),C(h,null,f(p.value.builtin,e=>(u(),y(l,o({key:e.component.filePath},{ref_for:!0},e),null,16))),128))]),_:1},8,[`description`])):m(``,!0),p.value.lib.size?(u(),y(g,{key:3,open:p.value.count.lib<=a(50),icon:`carbon-3d-mpr-toggle`,text:`Components from libraries`,description:`${p.value.count.lib} components from ${p.value.lib.size} packages`},{default:_(()=>[(u(!0),C(h,null,f(p.value.lib.entries(),([e,t])=>(u(),C(`div`,{key:e,"ml-2":``},[T(v,{text:`${e} (${t.length})`,py1:``,op50:``},null,8,[`text`]),b(`div`,Pe,[(u(!0),C(h,null,f(t,e=>(u(),y(l,o({key:e.component.filePath},{ref_for:!0},e),null,16))),128))])]))),128))]),_:1},8,[`open`,`description`])):m(``,!0)],64)}}}),Ie=Object.assign(Fe,{__name:`ComponentsList`}),Le={relative:``,"h-full":``,"of-auto":``},Re={"flex-none":``,flex:`~ gap3`},ze=r({__name:`components`,setup(t){let n=O(),r=ae(),i=ie(),{componentsView:o}=E(`ui`);function c(){n.value?.inspector?.enable()}function l(){o.value=o.value===`list`?`graph`:`list`}return(t,d)=>{let f=N,p=le,g=H,x=s(`tooltip`);return u(),C(h,null,[b(`div`,Le,[(u(),y(e(a(o)===`list`?Ie:Oe),{components:a(r),relationships:a(i)},{default:_(()=>[b(`div`,Re,[v(T(f,{"text-lg":``,border:!1,icon:a(o)===`graph`?`i-carbon-list`:`i-carbon-network-4`,title:`Toggle view`,onClick:l},null,8,[`icon`]),[[x,`Toggle View`,void 0,{"bottom-end":!0}]]),a(n)?.inspector?.isAvailable?v((u(),y(f,{key:0,"text-lg":``,border:!1,icon:`i-tabler-focus-2`,title:`Inspect Vue components`,onClick:c},null,512)),[[x,`Inspect Vue components`,void 0,{"bottom-end":!0}]]):m(``,!0)])]),_:1},8,[`components`,`relationships`]))]),T(g,null,{default:_(()=>[T(p)]),_:1})],64)}}});export{ze as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{C as e,E as t,Mt as n,Qt as r,W as i,Y as a,Z as o,_ as s,c,dt as l,g as u,h as d,m as f,tn as p,v as m,w as h}from"./vendor/json-editor-vue-ddj4xtqm.js";import{_ as g,j as _,k as v,v as y}from"#entry";import{t as b}from"./filepath-item-osqp88cx.js";import{t as x}from"./constants-i6giw94a.js";import{t as S}from"./dist-k9rc0n5t.js";import{t as C}from"./nmarkdown-ftmgc061.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=t({__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(t){let I=t,L=g(),R=y(),z=f(()=>I.item.as||I.item.name),B=f(()=>{let e=z.value;return I.isDirective&&(e[0]!==`v`&&(e=`v${e}`),e=S(e)),e}),V=f(()=>I.metadata?.injectionUsage?.[z.value]?.count||0),H=f(()=>(I.metadata?.injectionUsage?.[z.value]?.moduleIds||[]).filter(e=>!e.endsWith(`?macro=true`))),U=f(()=>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(f,g)=>{let y=_,x=C,S=v,W=b,G=o(`VDropdown`);return i(),u(G,{disabled:!I.metadata},{popper:l(()=>[d(`div`,O,[d(`div`,k,[t.item.meta?.description?(i(),u(x,{key:0,tag:`div`,pb3:``,"text-sm":``,markdown:t.item.meta.description},null,8,[`markdown`])):s(``,!0),d(`div`,A,[h(S,{icon:`carbon-copy`,onClick:g[0]||=e=>n(L)(B.value,`imports-name`)},{default:l(()=>[...g[2]||=[e(` Copy `,-1)]]),_:1}),t.filepath?(i(),u(S,{key:0,icon:`carbon-code`,onClick:g[1]||=e=>t.filepath&&n(R)(t.filepath)},{default:l(()=>[...g[3]||=[e(` Source `,-1)]]),_:1})):s(``,!0),U.value?(i(),u(S,{key:1,icon:`carbon-catalog`,to:U.value,target:`_blank`},{default:l(()=>[...g[4]||=[e(` Docs `,-1)]]),_:1},8,[`to`])):s(``,!0)])]),d(`div`,j,[V.value?(i(),m(c,{key:0},[d(`div`,M,[g[5]||=d(`span`,{op50:``},`It has been referenced `,-1),d(`strong`,N,p(V.value),1),g[6]||=d(`span`,{op50:``},` times by:`,-1)]),d(`div`,P,[(i(!0),m(c,null,a(H.value,e=>(i(),u(W,{key:e,filepath:e},null,8,[`filepath`]))),128))])],64)):(i(),m(`div`,F,` Not in use via auto import. `))])])]),default:l(()=>[d(`button`,{"hover:text-primary":``,class:r([t.metadata&&!V.value?`op30 hover:op100`:``,t.classes])},[d(`code`,w,[e(p(z.value)+` `,1),V.value&&t.counter?(i(),m(`sup`,T,`x`+p(V.value),1)):s(``,!0)]),t.isDirective?(i(),m(`sup`,E,[d(`abbr`,D,[h(y,{icon:`tabler:hexagon-letter-d`})])])):s(``,!0)],2)]),_:1},8,[`disabled`])}}}),L=Object.assign(I,{__name:`ComposableItem`});export{L as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=e=>{};export{e as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e={nuxt:{useAppConfig:`https://nuxt.com/docs/api/composables/use-app-config`,useAsyncData:`https://nuxt.com/docs/api/composables/use-async-data`,useCookie:`https://nuxt.com/docs/api/composables/use-cookie`,useError:`https://nuxt.com/docs/api/composables/use-error`,useFetch:`https://nuxt.com/docs/api/composables/use-fetch`,useHead:`https://nuxt.com/docs/api/composables/use-head`,useHeadSafe:`https://nuxt.com/docs/api/composables/use-head-safe`,useLazyAsyncData:`https://nuxt.com/docs/api/composables/use-lazy-async-data`,useLazyFetch:`https://nuxt.com/docs/api/composables/use-lazy-fetch`,useNuxtApp:`https://nuxt.com/docs/api/composables/use-nuxt-app`,useRoute:`https://nuxt.com/docs/api/composables/use-route`,useRouter:`https://nuxt.com/docs/api/composables/use-router`,useRuntimeConfig:`https://nuxt.com/docs/api/composables/use-runtime-config`,useState:`https://nuxt.com/docs/api/composables/use-state`,$fetch:`https://nuxt.com/docs/api/utils/dollarfetch`,abortNavigation:`https://nuxt.com/docs/api/utils/abort-navigation`,createError:`https://nuxt.com/docs/api/utils/create-error`,defineNuxtComponent:`https://nuxt.com/docs/api/utils/define-nuxt-component`,definePageMeta:`https://nuxt.com/docs/api/utils/define-page-meta`,navigateTo:`https://nuxt.com/docs/api/utils/navigate-to#navigateto`,onBeforeRouteLeave:`https://nuxt.com/docs/api/utils/on-before-route-leave`,onBeforeRouteUpdate:`https://nuxt.com/docs/api/utils/on-before-route-update`,updateAppConfig:`https://nuxt.com/docs/api/utils/update-app-config`},vue:{ref:`https://vuejs.org/api/reactivity-core.html#ref`,computed:`https://vuejs.org/api/reactivity-core.html#computed`,reactive:`https://vuejs.org/api/reactivity-core.html#reactive`,watch:`https://vuejs.org/api/reactivity-core.html#watch`,watchEffect:`https://vuejs.org/api/reactivity-core.html#watcheffect`,watchPostEffect:`https://vuejs.org/api/reactivity-core.html#watchposteffect`,watchSyncEffect:`https://vuejs.org/api/reactivity-core.html#watchsynceffect`,onMounted:`https://vuejs.org/api/composition-api-lifecycle.html#onmounted`,onUnmounted:`https://vuejs.org/api/composition-api-lifecycle.html#onunmounted`,onActivated:`https://vuejs.org/api/composition-api-lifecycle.html#onactivated`,onDeactivated:`https://vuejs.org/api/composition-api-lifecycle.html#ondeactivated`,onBeforeMount:`https://vuejs.org/api/composition-api-lifecycle.html#onbeforemount`,onBeforeUnmount:`https://vuejs.org/api/composition-api-lifecycle.html#onbeforeunmount`,onUpdated:`https://vuejs.org/api/composition-api-lifecycle.html#onupdated`,onBeforeUpdate:`https://vuejs.org/api/composition-api-lifecycle.html#onbeforeupdate`,nextTick:`https://vuejs.org/api/general.html#nexttick`}},t={snippet:`i-carbon-code`,headers:`i-carbon-html-reference`,cookies:`i-carbon-cookie`,params:`i-carbon-text-selection`,query:`i-carbon-help`,body:`i-carbon-document`};export{t as n,e as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{$ as e,C as t,Ct as n,E as r,F as i,H as a,Mt as o,V as s,W as c,dt as l,g as u,h as d,lt as f,m as p,tn as m,v as h,w as g,xt as _}from"./vendor/json-editor-vue-ddj4xtqm.js";import"./vendor/shiki-kunkft64.js";import{$t as v,Bt as y,E as b,Ht as x,J as S,Mn as C,Nn as w,Pt as T,Y as E,a as D,f as O,h as k}from"#entry";import"./client-cbmkjf3j.js";import{t as A}from"./composables-g8w9dpc0.js";import"./nmarkdown-ftmgc061.js";import{t as j}from"./launch-page-fyevedb0.js";var M=new Map,N=r({__name:`IframeView`,props:{tab:{}},setup(e){let t=e,r=T(),o=n(),l=p(()=>t.tab.name),u=n(),d=_(v(o));s(()=>{let e=t.tab.view,n=e.persistent!==!1,r=[`clipboard-write`,`clipboard-read`,...e.permissions||[]];if(M.get(l.value)&&n)u.value=M.get(l.value),u.value.style.visibility=`visible`;else{u.value=document.createElement(`iframe`),u.value.setAttribute(`allow`,r.join(`; `)),u.value.setAttribute(`aria-label`,`Nuxt Devtools`),n&&M.set(l.value,u.value),u.value.src=e.src;try{u.value.style.opacity=`0.01`,u.value.onload=()=>{b(),m(),u.value.style.opacity=`1`}}catch{u.value.style.opacity=`1`}document.body.appendChild(u.value),i(x)}setTimeout(m,100)}),f(x),f(m),f(b),a(()=>{u.value&&(u.value.style.visibility=`hidden`)});function m(){if(!(!u.value||!u.value.contentWindow))try{let e=u.value.contentWindow.document.querySelector(`html`);e?.classList.toggle(`dark`,r.value===`dark`),e?.classList.toggle(`light`,r.value===`dark`),new MutationObserver(()=>{r.value=u.value?.contentWindow?.document.querySelector(`html`)?.classList.contains(`dark`)?`dark`:`light`}).observe(e,{attributes:!0,attributeFilter:[`class`]})}catch{}}let g=y();function b(){if(!(!u.value||!u.value.contentWindow))try{u.value.contentWindow.__NUXT_DEVTOOLS__=g.value}catch{}}function x(){u.value&&Object.assign(u.value.style,{position:`fixed`,left:`${d.left}px`,top:`${d.top}px`,width:`${d.width}px`,height:`${d.height}px`,outline:`none`})}return(e,t)=>(c(),h(`div`,{ref_key:`anchor`,ref:o,"h-full":``,"w-full":``},null,512))}}),P=Object.assign(N,{__name:`IframeView`}),F={flex:`~ col gap2`,mxa:``,"items-center":``},I={"text-xl":``},L={"text-rose":``},R=r({__name:`custom-[name]`,props:{name:{}},setup(n){let r=n,i=C(),a=w(),f=p(()=>r.name??i.params.name),h=k(),_=p(()=>h.value.find(e=>e.name===f.value));return s(()=>{_.value?_.value.requireAuth&&!S.value&&E():setTimeout(()=>{_.value||a.push(`/modules/overview`)},2e3)}),(n,r)=>{let i=O,a=D,s=P,p=j,h=b;return _.value?_.value.requireAuth&&!o(S)?(c(),u(a,{key:1})):_.value.view.type===`iframe`?(c(),u(s,{key:2,tab:_.value},null,8,[`tab`])):_.value.view.type===`vnode`?(c(),u(e(_.value.view.vnode),{key:3})):_.value.view.type===`launch`?(c(),u(p,{key:4,name:`custom-${_.value.name}`,icon:_.value.view.icon||_.value.icon,title:_.value.view.title||_.value.title,description:_.value.view.description,actions:_.value.view.actions,onAction:r[0]||=e=>o(x).customTabAction(_.value.name,e)},null,8,[`name`,`icon`,`title`,`description`,`actions`])):(c(),u(i,{key:5},{default:l(()=>[g(h,{flex:`~ col`,"h-full":``,"items-center":``,"justify-center":``},{default:l(()=>[t(` Unknown tab type `+m(_.value.view),1)]),_:1})]),_:1})):(c(),u(i,{key:0},{default:l(()=>[d(`div`,F,[r[3]||=d(`div`,{"i-carbon-queued":``,mb2:``,"text-5xl":``,op50:``},null,-1),d(`p`,I,[r[1]||=t(` Tab `,-1),d(`code`,L,m(f.value),1),r[2]||=t(` not found `,-1)]),r[4]||=d(`p`,{op50:``},` It might because the module contributing this tab is not installed or enabled `,-1),r[5]||=d(`p`,{mt8:``,"animate-pulse":``},` Redirecting to overview page... `,-1)])]),_:1}))}}});export{R as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{E as e,Q as t,W as n,ft as r,g as i}from"./vendor/json-editor-vue-ddj4xtqm.js";import{k as a,r as o}from"#entry";var s=e({__name:`DataSchemaButton`,props:{getter:{type:Function}},setup(e){let s=o();return(o,c)=>{let l=a,u=t(`tooltip`);return r((n(),i(l,{title:`Generate Data Schema`,icon:`carbon:container-services`,border:!1,onClick:c[0]||=t=>s.value=e.getter()},null,512)),[[u,`Generate Data Schema`]])}}}),c=Object.assign(s,{__name:`DataSchemaButton`});export{c as t};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{Ct as e,E as t,Mt as n,W as r,Y as i,_ as a,c as o,ct as s,d as c,dt as l,g as u,h as d,m as f,tn as p,v as m,w as h}from"./vendor/json-editor-vue-ddj4xtqm.js";import"./vendor/shiki-kunkft64.js";import{Gt as g,_,k as v,r as y}from"#entry";import{t as b}from"./nselect-cmll6q59.js";import{t as x}from"./nswitch-gqy4bgn3.js";import{t as S}from"./ndropdown-ef0253xr.js";import"./client-cbmkjf3j.js";import{t as C}from"./ncode-block-j2hcqwrp.js";import{t as w}from"./ndrawer-lh0r2gbb.js";import{n as T,t as E}from"./vendor/quicktype-core-f78dz8oi.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=t({__name:`DataSchemaDrawer`,setup(t){let T=y(),E=e(0),N=e(`TypeScript`),P=f(()=>O.all.find(e=>e.displayName===N.value)),F=e(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=f(()=>{let e=N.value.toLocaleLowerCase();return e.startsWith(`javascript`)?`javascript`:e.startsWith(`json`)?`json`:e.startsWith(`typescript`)?`typescript`:e});s(F,()=>{E.value++},{deep:!0}),s(N,()=>{F.value=P.value?.optionDefinitions.filter(e=>typeof e.defaultValue==`boolean`)});let R=_();function z(){R(I.value||``)}return(e,t)=>{let s=b,f=v,g=x,_=S,y=C,E=w;return P.value?(r(),u(c,{key:0,to:`body`},[h(E,{"model-value":!!n(T)?.input,"auto-close":``,"max-w-screen":``,"w-2xl":``,"n-code-block":``,onClose:t[2]||=e=>T.value=null},{default:l(()=>[d(`div`,k,[t[3]||=d(`p`,{"mr-2":``},` Schema `,-1),h(s,{modelValue:N.value,"onUpdate:modelValue":t[0]||=e=>N.value=e,n:`xs primary`},{default:l(()=>[(r(!0),m(o,null,i(n(O.all),e=>(r(),m(`option`,{key:e.displayName},p(e.displayName),1))),128))]),_:1},8,[`modelValue`]),F.value?.length?(r(),u(_,{key:0,n:`sm lime`},{trigger:l(({click:e})=>[h(f,{icon:`carbon-settings`,"h-full":``,onClick:t=>e()},null,8,[`onClick`]),F.value?(r(),m(`span`,A,p(F.value.length),1)):a(``,!0)]),default:l(()=>[d(`div`,j,[(r(!0),m(o,null,i(F.value,(e,t)=>(r(),u(g,{key:e.name,modelValue:F.value[t].defaultValue,"onUpdate:modelValue":e=>F.value[t].defaultValue=e,flex:`~ gap-2`,rounded:``,px2:``,py2:``},{default:l(()=>[d(`span`,M,p(e.description),1)]),_:2},1032,[`modelValue`,`onUpdate:modelValue`]))),128))])]),_:1})):a(``,!0),t[4]||=d(`div`,{"flex-auto":``},null,-1),h(f,{icon:`carbon-copy`,"mr-6":``,"h-full":``,onClick:t[1]||=e=>z()})]),n(I)?(r(),u(y,{key:0,lang:L.value,code:n(I)},null,8,[`lang`,`code`])):a(``,!0)]),_:1},8,[`model-value`])])):a(``,!0)}}}),P=Object.assign(N,{__name:`DataSchemaDrawer`});export{P as default};
|