@nuxt/devtools 2.4.1 → 2.5.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/module-main.mjs +12 -52
- package/dist/chunks/vscode.mjs +1 -1
- package/dist/client/200.html +22 -22
- package/dist/client/404.html +22 -22
- package/dist/client/_nuxt/__blank-mumgdw29.js +1 -0
- package/dist/client/_nuxt/analyze-build-lb4a69k4.js +1 -0
- package/dist/client/_nuxt/assets-jc9tzvj2.js +16 -0
- package/dist/client/_nuxt/builds/latest.json +1 -1
- package/dist/client/_nuxt/builds/meta/1bba8c88-485d-4954-ab8c-e56e95b99d88.json +1 -0
- package/dist/client/_nuxt/{client-etfulgf7.js → client-jlcyzfwz.js} +1 -1
- package/dist/client/_nuxt/code-diff.vue-c6don53k.js +8 -0
- package/dist/client/_nuxt/{code-snippets.vue-yqoxee04.js → code-snippets.vue-fbdww2bz.js} +1 -1
- package/dist/client/_nuxt/components-k4k1h6le.js +1 -0
- package/dist/client/_nuxt/composable-item.vue-kjbvgud6.js +1 -0
- package/dist/client/_nuxt/{custom-_name_-xxdc4xyk.js → custom-_name_-ihhvc01j.js} +1 -1
- package/dist/client/_nuxt/data-schema-button.vue-drlalata.js +1 -0
- package/dist/client/_nuxt/data-schema-drawer-ij5sf0rl.js +2 -0
- package/dist/client/_nuxt/debug-lohroe37.js +1 -0
- package/dist/client/_nuxt/{default-pd4kv06p.js → default-f68tjzna.js} +1 -1
- package/dist/client/_nuxt/{duration-display.vue-ibudjtt4.js → duration-display.vue-l7hutejt.js} +1 -1
- package/dist/client/_nuxt/{entry.css-nlmjo2pz.css → entry.css-gmgc8zz6.css} +1 -1
- package/dist/client/_nuxt/{error-404-jsmb2ylw.js → error-404-z3t35dwt.js} +1 -1
- package/dist/client/_nuxt/error-404.css-elh6uwdu.css +1 -0
- package/dist/client/_nuxt/{error-500-mbsayqot.js → error-500-k56nq9lo.js} +1 -1
- package/dist/client/_nuxt/error-500.css-bxkdntg7.css +1 -0
- package/dist/client/_nuxt/{error-h1v9m9m6.js → error-eg316ohw.js} +4 -4
- package/dist/client/_nuxt/{filepath-item.vue-br6hjwqx.js → filepath-item.vue-gp9fle8u.js} +1 -1
- package/dist/client/_nuxt/full-ifel6yw8.js +1 -0
- package/dist/client/_nuxt/{help-fab.vue-gswykw6o.js → help-fab.vue-f0g3gbyq.js} +1 -1
- package/dist/client/_nuxt/{hooks-gejjjavi.js → hooks-nyntnfws.js} +1 -1
- package/dist/client/_nuxt/{imports-lgt9tkvl.js → imports-ev6yf6rq.js} +1 -1
- package/dist/client/_nuxt/index-cgtwuik1.js +1 -0
- package/dist/client/_nuxt/k3jbhgz8.js +15 -0
- package/dist/client/_nuxt/launch-page.vue-igtsle8u.js +1 -0
- package/dist/client/_nuxt/modules-mhd4fei2.js +1 -0
- package/dist/client/_nuxt/nbadge-k17ouxot.js +1 -0
- package/dist/client/_nuxt/{ncheckbox.vue-jtldzl6k.js → ncheckbox.vue-obepl48o.js} +1 -1
- package/dist/client/_nuxt/ncode-block.vue-lge6rogf.js +2 -0
- package/dist/client/_nuxt/{ndrawer.vue-nkn577bf.js → ndrawer.vue-bvlhfrru.js} +1 -1
- package/dist/client/_nuxt/ndropdown.vue-np55ni86.js +1 -0
- package/dist/client/_nuxt/nicon-title.vue-d27ih16g.js +1 -0
- package/dist/client/_nuxt/{nlink.vue-gepdvjyn.js → nlink.vue-e0431874.js} +1 -1
- package/dist/client/_nuxt/nmarkdown.vue-isat7p33.js +1 -0
- package/dist/client/_nuxt/{nnavbar.vue-exzr4e5w.js → nnavbar.vue-jhylceus.js} +1 -1
- package/dist/client/_nuxt/none-djo8lm18.js +1 -0
- package/dist/client/_nuxt/nsection-block-e106blep.js +1 -0
- package/dist/client/_nuxt/{nselect-tabs.vue-l5x0yirx.js → nselect-tabs.vue-dd0i77k7.js} +1 -1
- package/dist/client/_nuxt/{nselect.vue-jigqjeiw.js → nselect.vue-dbmwjbou.js} +1 -1
- package/dist/client/_nuxt/{nswitch.vue-km9qm824.js → nswitch.vue-f07mzo8x.js} +1 -1
- package/dist/client/_nuxt/open-graph-l04ovzzw.js +3 -0
- package/dist/client/_nuxt/overview-cfkpobw1.js +1 -0
- package/dist/client/_nuxt/pages-ij8tcm9q.js +1 -0
- package/dist/client/_nuxt/payload-jp1vnzdz.js +1 -0
- package/dist/client/_nuxt/pinia-kfhkoott.js +1 -0
- package/dist/client/_nuxt/plugins-bnpq8t1o.js +1 -0
- package/dist/client/_nuxt/render-tree-fdpy9okv.js +1 -0
- package/dist/client/_nuxt/{runtime-configs-lkma1hwx.js → runtime-configs-hguo987n.js} +1 -1
- package/dist/client/_nuxt/{server-discovery-blv2rxq3.js → server-discovery-f0dmvae1.js} +1 -1
- package/dist/client/_nuxt/{server-route-inputs.vue-cjdtnuu4.js → server-route-inputs.vue-hmskcen8.js} +1 -1
- package/dist/client/_nuxt/{server-routes-ove4utlk.js → server-routes-opx8sfs1.js} +2 -2
- package/dist/client/_nuxt/{server-tasks-i8kjqc0d.js → server-tasks-dexl30xm.js} +1 -1
- package/dist/client/_nuxt/settings-oeg7vwse.js +1 -0
- package/dist/client/_nuxt/{stacktrace-list.vue-b70k1t8t.js → stacktrace-list.vue-lbykh9n8.js} +1 -1
- package/dist/client/_nuxt/{state-components-ittrf6yq.js → state-components-f096k414.js} +1 -1
- package/dist/client/_nuxt/state-editor.vue-pc9ctaaq.js +1 -0
- package/dist/client/_nuxt/state-modules-d3nbn93r.js +1 -0
- package/dist/client/_nuxt/storage-e20ao8q7.js +1 -0
- package/dist/client/_nuxt/terminals-jcwqz9e4.js +1 -0
- package/dist/client/_nuxt/{timeline-jtxqs7h6.js → timeline-m95we3bl.js} +2 -2
- package/dist/client/_nuxt/{unocss-runtime-o1gs2hkj.js → unocss-runtime-n76zvjc0.js} +1 -1
- package/dist/client/_nuxt/vendor/{json-editor-vue-g7zhhq6q.js → json-editor-vue-pb6xqf2y.js} +111 -126
- package/dist/client/_nuxt/vendor/{quicktype-core-gg1jfx29.js → quicktype-core-lhaz4hgj.js} +55 -55
- package/dist/client/_nuxt/vendor/unocss-k776m6tm.js +2 -0
- package/dist/client/_nuxt/virtual-files-jlvcu5g2.js +1 -0
- package/dist/client/_nuxt/{vue-devtools-l0o7d54g.js → vue-devtools-fxhixcjy.js} +2 -2
- package/dist/client/_nuxt/{vue-virtual-scroller.esm-b2tvdrfk.js → vue-virtual-scroller.esm-nuoya9vo.js} +2 -2
- package/dist/client/index.html +22 -22
- package/dist/module.d.mts +1 -1
- package/dist/module.json +2 -2
- package/dist/module.mjs +1 -1
- package/dist/runtime/plugins/view/client.d.ts +2 -1
- package/dist/runtime/plugins/view/client.js +57 -28
- package/dist/runtime/plugins/view/state.d.ts +1 -3
- package/dist/runtime/plugins/view/state.js +0 -3
- package/dist/runtime/plugins/view/utils.d.ts +0 -28
- package/dist/runtime/plugins/view/utils.js +1 -125
- package/dist/runtime/shared/hooks.d.ts +1 -0
- package/dist/shared/devtools.Dlu0WIXO.mjs +122 -0
- package/dist/types.d.mts +1 -1
- package/dist/webcomponents/index.d.mts +20 -0
- package/dist/webcomponents/index.mjs +1543 -0
- package/package.json +34 -26
- package/types.d.ts +1 -1
- package/dist/client/_nuxt/__blank-nqwixhj1.js +0 -1
- package/dist/client/_nuxt/analyze-build-o4s5ob2q.js +0 -1
- package/dist/client/_nuxt/assets-huxgsitw.js +0 -16
- package/dist/client/_nuxt/builds/meta/bc495f3e-a5e4-477e-bd8b-c102bb505b43.json +0 -1
- package/dist/client/_nuxt/code-diff.vue-dvzw16bz.js +0 -8
- package/dist/client/_nuxt/components-edsbjzww.js +0 -1
- package/dist/client/_nuxt/composable-item.vue-izr4dc9x.js +0 -1
- package/dist/client/_nuxt/data-schema-button.vue-oxz1jnzv.js +0 -1
- package/dist/client/_nuxt/data-schema-drawer-dv9md89s.js +0 -2
- package/dist/client/_nuxt/debug-iijfcpov.js +0 -1
- package/dist/client/_nuxt/error-404.css-lvo9ozyv.css +0 -1
- package/dist/client/_nuxt/error-500.css-lrbzpi5q.css +0 -1
- package/dist/client/_nuxt/f1cbvne4.js +0 -15
- package/dist/client/_nuxt/full-fcbl8hea.js +0 -1
- package/dist/client/_nuxt/index-mkswwai7.js +0 -1
- package/dist/client/_nuxt/launch-page.vue-jvl04rwq.js +0 -1
- package/dist/client/_nuxt/modules-oiyvev1x.js +0 -1
- package/dist/client/_nuxt/nbadge-lodw2y18.js +0 -1
- package/dist/client/_nuxt/ncode-block.vue-lex5o4lv.js +0 -2
- package/dist/client/_nuxt/ndropdown.vue-ji36i25f.js +0 -1
- package/dist/client/_nuxt/nicon-title.vue-g35plvi8.js +0 -1
- package/dist/client/_nuxt/nmarkdown.vue-gamlcow3.js +0 -1
- package/dist/client/_nuxt/none-nffzj9cd.js +0 -1
- package/dist/client/_nuxt/nsection-block-x8dothd4.js +0 -1
- package/dist/client/_nuxt/open-graph-nz4i7u7j.js +0 -3
- package/dist/client/_nuxt/overview-n2xqscmi.js +0 -1
- package/dist/client/_nuxt/pages-cu5a742d.js +0 -1
- package/dist/client/_nuxt/payload-jugfo4ki.js +0 -1
- package/dist/client/_nuxt/pinia-gsipwrbm.js +0 -1
- package/dist/client/_nuxt/plugins-cchxh0ve.js +0 -1
- package/dist/client/_nuxt/render-tree-gxqpdalx.js +0 -1
- package/dist/client/_nuxt/settings-jkgzzend.js +0 -1
- package/dist/client/_nuxt/state-editor.vue-j3haepux.js +0 -1
- package/dist/client/_nuxt/state-modules-b39szh0f.js +0 -1
- package/dist/client/_nuxt/storage-mf5e8tar.js +0 -1
- package/dist/client/_nuxt/terminals-e8xd9utc.js +0 -1
- package/dist/client/_nuxt/vendor/unocss-hvn0t0zz.js +0 -2
- package/dist/client/_nuxt/virtual-files-xlijdz1c.js +0 -1
- package/dist/dirs.d.ts +0 -7
- package/dist/module.cjs +0 -5
- package/dist/module.d.ts +0 -8
- package/dist/runtime/plugins/view/FrameBox.vue +0 -167
- package/dist/runtime/plugins/view/Main.vue +0 -432
- package/dist/shared/devtools.427ec2e8.d.ts +0 -57
- package/dist/shared/devtools.d413ad55.mjs +0 -122
- package/dist/types.d.ts +0 -41
- /package/dist/shared/{devtools.427ec2e8.d.mts → devtools.C1a10l_c.d.mts} +0 -0
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nuxt/devtools",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.5.0-beta.1",
|
|
5
5
|
"description": "The Nuxt DevTools gives you insights and transparency about your Nuxt App.",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"homepage": "https://devtools.nuxt.com",
|
|
@@ -15,8 +15,12 @@
|
|
|
15
15
|
"types": "./dist/module.d.mts",
|
|
16
16
|
"import": "./dist/module.mjs"
|
|
17
17
|
},
|
|
18
|
+
"./webcomponents": {
|
|
19
|
+
"types": "./dist/webcomponents/index.d.mts",
|
|
20
|
+
"import": "./dist/webcomponents/index.mjs"
|
|
21
|
+
},
|
|
18
22
|
"./types": {
|
|
19
|
-
"types": "./dist/types.d.
|
|
23
|
+
"types": "./dist/types.d.mts"
|
|
20
24
|
},
|
|
21
25
|
"./*": "./*"
|
|
22
26
|
},
|
|
@@ -32,7 +36,7 @@
|
|
|
32
36
|
"vite": ">=6.0"
|
|
33
37
|
},
|
|
34
38
|
"dependencies": {
|
|
35
|
-
"@nuxt/kit": "^3.17.
|
|
39
|
+
"@nuxt/kit": "^3.17.4",
|
|
36
40
|
"@vue/devtools-core": "^7.7.6",
|
|
37
41
|
"@vue/devtools-kit": "^7.7.6",
|
|
38
42
|
"birpc": "^2.3.0",
|
|
@@ -40,7 +44,7 @@
|
|
|
40
44
|
"destr": "^2.0.5",
|
|
41
45
|
"error-stack-parser-es": "^1.0.5",
|
|
42
46
|
"execa": "^8.0.1",
|
|
43
|
-
"fast-npm-meta": "^0.4.
|
|
47
|
+
"fast-npm-meta": "^0.4.3",
|
|
44
48
|
"get-port-please": "^3.1.2",
|
|
45
49
|
"hookable": "^5.5.3",
|
|
46
50
|
"image-meta": "^0.2.1",
|
|
@@ -57,13 +61,13 @@
|
|
|
57
61
|
"simple-git": "^3.27.0",
|
|
58
62
|
"sirv": "^3.0.1",
|
|
59
63
|
"structured-clone-es": "^1.0.0",
|
|
60
|
-
"tinyglobby": "^0.2.
|
|
61
|
-
"vite-plugin-inspect": "^11.0
|
|
62
|
-
"vite-plugin-vue-tracer": "^0.1.
|
|
64
|
+
"tinyglobby": "^0.2.14",
|
|
65
|
+
"vite-plugin-inspect": "^11.1.0",
|
|
66
|
+
"vite-plugin-vue-tracer": "^0.1.4",
|
|
63
67
|
"which": "^5.0.0",
|
|
64
68
|
"ws": "^8.18.2",
|
|
65
|
-
"@nuxt/devtools-kit": "2.
|
|
66
|
-
"@nuxt/devtools-wizard": "2.
|
|
69
|
+
"@nuxt/devtools-kit": "2.5.0-beta.1",
|
|
70
|
+
"@nuxt/devtools-wizard": "2.5.0-beta.1"
|
|
67
71
|
},
|
|
68
72
|
"devDependencies": {
|
|
69
73
|
"@antfu/utils": "^9.2.0",
|
|
@@ -72,51 +76,55 @@
|
|
|
72
76
|
"@iconify-json/bxl": "^1.2.2",
|
|
73
77
|
"@iconify-json/carbon": "^1.2.8",
|
|
74
78
|
"@iconify-json/logos": "^1.2.4",
|
|
79
|
+
"@iconify-json/ph": "^1.2.2",
|
|
75
80
|
"@iconify-json/ri": "^1.2.5",
|
|
76
|
-
"@iconify-json/simple-icons": "^1.2.
|
|
77
|
-
"@iconify-json/tabler": "^1.2.
|
|
78
|
-
"@nuxt/test-utils": "^3.
|
|
81
|
+
"@iconify-json/simple-icons": "^1.2.37",
|
|
82
|
+
"@iconify-json/tabler": "^1.2.18",
|
|
83
|
+
"@nuxt/test-utils": "^3.19.1",
|
|
79
84
|
"@parcel/watcher": "^2.5.1",
|
|
80
85
|
"@types/markdown-it-link-attributes": "^3.0.5",
|
|
81
|
-
"@unhead/schema": "^2.0.
|
|
82
|
-
"@unocss/nuxt": "^66.1.
|
|
83
|
-
"@unocss/preset-icons": "^66.1.
|
|
84
|
-
"@unocss/preset-uno": "^66.1.
|
|
85
|
-
"@unocss/runtime": "^66.1.
|
|
86
|
-
"@vitest/ui": "^3.
|
|
86
|
+
"@unhead/schema": "^2.0.10",
|
|
87
|
+
"@unocss/nuxt": "^66.1.3",
|
|
88
|
+
"@unocss/preset-icons": "^66.1.3",
|
|
89
|
+
"@unocss/preset-uno": "^66.1.3",
|
|
90
|
+
"@unocss/runtime": "^66.1.3",
|
|
91
|
+
"@vitest/ui": "^3.2.0",
|
|
87
92
|
"@vue/devtools-applet": "^7.7.6",
|
|
88
|
-
"@vueuse/nuxt": "^13.
|
|
93
|
+
"@vueuse/nuxt": "^13.3.0",
|
|
89
94
|
"@xterm/addon-fit": "^0.10.0",
|
|
90
95
|
"@xterm/xterm": "^5.5.0",
|
|
91
96
|
"cronstrue": "^2.61.0",
|
|
97
|
+
"exsolve": "^1.0.5",
|
|
92
98
|
"floating-vue": "^5.2.2",
|
|
93
99
|
"fuse.js": "^7.1.0",
|
|
94
100
|
"json-editor-vue": "^0.18.1",
|
|
101
|
+
"lightningcss": "^1.30.1",
|
|
95
102
|
"markdown-it": "^14.1.0",
|
|
96
103
|
"markdown-it-link-attributes": "^4.0.1",
|
|
97
104
|
"my-ua-parser": "^2.0.4",
|
|
98
105
|
"nitropack": "^2.11.12",
|
|
99
|
-
"nuxt": "^3.17.
|
|
106
|
+
"nuxt": "^3.17.4",
|
|
100
107
|
"ofetch": "^1.4.1",
|
|
101
108
|
"quicktype-core": "22.0.0",
|
|
102
109
|
"scule": "^1.3.0",
|
|
103
|
-
"shiki": "^3.4.
|
|
104
|
-
"shiki-codegen": "^3.4.
|
|
110
|
+
"shiki": "^3.4.2",
|
|
111
|
+
"shiki-codegen": "^3.4.2",
|
|
105
112
|
"theme-vitesse": "^0.8.3",
|
|
106
113
|
"tsx": "^4.19.4",
|
|
107
114
|
"unimport": "^5.0.1",
|
|
108
|
-
"unocss": "^66.1.
|
|
115
|
+
"unocss": "^66.1.3",
|
|
116
|
+
"unplugin-vue": "^6.2.0",
|
|
109
117
|
"unplugin-vue-markdown": "^28.3.1",
|
|
110
|
-
"vanilla-jsoneditor": "^3.
|
|
118
|
+
"vanilla-jsoneditor": "^3.5.0",
|
|
111
119
|
"vis-data": "^7.1.9",
|
|
112
120
|
"vis-network": "^9.1.10",
|
|
113
121
|
"vue-tsc": "^2.2.10",
|
|
114
122
|
"vue-virtual-scroller": "^2.0.0-beta.8",
|
|
115
|
-
"@nuxt/devtools": "2.
|
|
123
|
+
"@nuxt/devtools": "2.5.0-beta.1"
|
|
116
124
|
},
|
|
117
125
|
"scripts": {
|
|
118
126
|
"build": "pnpm dev:prepare && pnpm build:module && pnpm build:discovery && pnpm build:client",
|
|
119
|
-
"build:client": "nuxi generate client",
|
|
127
|
+
"build:client": "nuxi generate client && cp -r client/.output/public/ dist/client/",
|
|
120
128
|
"build:module": "nuxt-build-module build",
|
|
121
129
|
"build:discovery": "npx discovery-build -c .discoveryrc.cjs -s -o client/public/discovery",
|
|
122
130
|
"dev:discovery": "discovery -c .discoveryrc.cjs",
|
package/types.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './dist/types'
|
|
1
|
+
export type * from './dist/types.d.mts'
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{p as e,I as n,a2 as t}from"./vendor/json-editor-vue-g7zhhq6q.js";const a={"h-screen":"","w-screen":"","bg-black":""},r=e({__name:"__blank",setup(c){return(o,s)=>(t(),n("div",a))}});export{r as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b6 as J,b7 as R,_ as j,r as S,E as P,aj as X,b8 as h,a6 as ee,a7 as ne,Z as te,a1 as le,i as ie,b9 as k,a8 as oe,Q as re,v as ue,q as se,M as ae}from"./f1cbvne4.js";import{_ as de}from"./filepath-item.vue-br6hjwqx.js";import{p as U,q as V,k as F,I as u,a2 as i,R as e,S as g,F as p,af as L,a4 as d,a9 as v,u as b,a3 as a,aa as f,ab as D,ac as I,Y as E,U as B}from"./vendor/json-editor-vue-g7zhhq6q.js";import{_ as me}from"./ncode-block.vue-lex5o4lv.js";import{_ as pe}from"./ncheckbox.vue-jtldzl6k.js";import{_ as ve}from"./help-fab.vue-gswykw6o.js";import"./vendor/unocss-hvn0t0zz.js";import"./vendor/shiki-hjqm7vcp.js";import"./client-etfulgf7.js";const fe={"h-full":"",grid:"~ rows-[max-content_1fr]"},ce={flex:"~ wrap","w-full":""},ye=["onClick"],be={key:0,flex:"~ col gap-4 items-center justify-center",p4:""},xe={grid:"~ cols-[30px_1fr] gap-x-2 gap-y-3 items-center justify-center","w-100":""},ge="/__nuxt_devtools__/client",_e=U({__name:"BuildAnalyzeDetails",props:{current:{},prev:{}},setup(N){const c=N,w=`${J().app.baseURL.replace(ge,"/")}/__nuxt_devtools__/analyze/`.replace(/\/+/g,"/"),y=V(()=>{const l=[{name:"Overview",id:"overview"}];return c.current.features.bundleClient&&l.push({name:"Client Bundle",id:"bundle-client"}),c.current.features.bundleNitro&&l.push({name:"Nitro Bundle",id:"bundle-nitro"}),c.current.features.viteInspect&&l.push({name:"Vite Inspect",id:"vite-inspect"}),l}),o=F(y.value[0]);function $(l){return`${((l.endTime-l.startTime)/1e3).toFixed(1)}s`}function m(l){return l<1024?`${l}B`:l<1024*1024?`${(l/1024).toFixed(1)}KB`:l<1024*1024*1024?`${(l/1024/1024).toFixed(1)}MB`:`${(l/1024/1024/1024).toFixed(1)}GB`}async function T(l){return S.clearAnalyzeBuilds(await P(),[l])}return(l,n)=>{const A=de,C=j;return i(),u("div",fe,[e("div",ce,[(i(!0),u(p,null,L(y.value,(r,t)=>(i(),u("button",{key:t,px4:"",py2:"",border:"r base",hover:"bg-active",class:E(r.id===o.value?.id?"":"border-b"),onClick:z=>o.value=r},[e("div",{class:E(r.id===o.value?.id?"":"op30")},v(r.name),3)],10,ye))),128)),n[1]||(n[1]=e("div",{border:"b base","flex-auto":""},null,-1))]),o.value?.id==="overview"?(i(),u("div",be,[n[15]||(n[15]=e("div",{"flex-auto":""},null,-1)),e("div",xe,[n[10]||(n[10]=e("div",{"i-carbon-commit":"","text-xl":""},null,-1)),e("div",null,[n[2]||(n[2]=e("div",{"text-sm":"",op50:""}," Name ",-1)),e("div",null,v(l.current.name),1)]),n[11]||(n[11]=e("div",{"i-carbon-time":"","text-xl":""},null,-1)),e("div",null,[n[3]||(n[3]=e("div",{"text-sm":"",op50:""}," Build duration ",-1)),e("div",null,v($(l.current)),1)]),l.current.size?.clientBundle?(i(),u(p,{key:0},[n[5]||(n[5]=e("div",{"i-carbon-cics-program":"","text-xl":""},null,-1)),e("div",null,[n[4]||(n[4]=e("div",{"text-sm":"",op50:""}," Client bundle size ",-1)),e("div",null,v(m(l.current.size.clientBundle)),1)])],64)):g("",!0),l.current.size?.nitroBundle?(i(),u(p,{key:1},[n[7]||(n[7]=e("div",{"i-carbon-bare-metal-server":"","text-xl":""},null,-1)),e("div",null,[n[6]||(n[6]=e("div",{"text-sm":"",op50:""}," Nitro bundle size ",-1)),e("div",null,v(m(l.current.size.nitroBundle)),1)])],64)):g("",!0),n[12]||(n[12]=e("div",{"i-carbon-edge-node":"","text-xl":""},null,-1)),e("div",null,[n[8]||(n[8]=e("div",{"text-sm":"",op50:""}," Built ",-1)),e("div",null,v(b(R)(new Date(l.current.endTime))),1)]),n[13]||(n[13]=e("div",{"i-carbon:folder-parent":"","text-xl":""},null,-1)),e("div",null,[n[9]||(n[9]=e("div",{"text-sm":"",op50:""}," Report Path ",-1)),d(A,{filepath:l.current.analyzeDir},null,8,["filepath"])])]),n[16]||(n[16]=e("div",{"flex-auto":""},null,-1)),d(C,{n:"rose",icon:"carbon-delete",onClick:n[0]||(n[0]=r=>T(l.current.name))},{default:a(()=>n[14]||(n[14]=[f(" Delete this report ")])),_:1})])):g("",!0),n._lazyshow1||o.value?.id==="bundle-client"?(n._lazyshow1=!0,i(),u(p,null,[D(e("iframe",{src:`${b(w)}${l.current.slug}/client.html`,"h-full":"","w-full":""},null,8,["src"]),[[I,o.value?.id==="bundle-client"]])],64)):g("v-show-if",!0),n._lazyshow2||o.value?.id==="bundle-nitro"?(n._lazyshow2=!0,i(),u(p,null,[D(e("iframe",{src:`${b(w)}${l.current.slug}/nitro.html`,"h-full":"","w-full":""},null,8,["src"]),[[I,o.value?.id==="bundle-nitro"]])],64)):g("v-show-if",!0),n._lazyshow3||o.value?.id==="vite-inspect"?(n._lazyshow3=!0,i(),u(p,null,[D(e("iframe",{src:`${b(w)}${l.current.slug}/.vite-inspect/`,"h-full":"","w-full":""},null,8,["src"]),[[I,o.value?.id==="vite-inspect"]])],64)):g("v-show-if",!0)])}}}),we={class:"markdown-body"},$e={__name:"analyze-build",setup(N,{expose:c}){return c({frontmatter:{}}),(w,y)=>(i(),u("div",we,y[0]||(y[0]=[e("h1",null,"Build Analyze",-1),e("p",null,[f("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 "),e("code",null,"nuxt build --analyze"),f(" and present the output data directly in DevTools for easy browsing and comparing.")],-1)])))}},ze={flex:"~ col"},Be=["onClick"],Ce={flex:"~ gap-1 items-center wrap","w-full":"","text-sm":"",op60:""},ke={flex:"~ items-center justify-center wrap",p4:""},Ne={flex:"~ col gap-1","w-250":"",p4:""},Te={flex:"~ gap-3",mt2:"","justify-end":""},Pe=U({__name:"analyze-build",setup(N){const c=X(),_=h(),w=ee(),y=ne("analyze-build:slug",""),o=V(()=>_.value?.builds.find(r=>r.slug===y.value)??_.value?.builds[0]),$=F(!1),m=F(""),T=V(()=>_.value?.builds.some(r=>r.name===m.value.trim()));async function l(){m.value=await S.generateAnalyzeBuildName(),await c.start()&&(ae("analyze-build:start"),k.value={name:m.value,processId:await S.startAnalyzeBuild(await P(),m.value)},$.value&&C())}const n=te();function A(r){return`${((r.endTime-r.startTime)/1e3).toFixed(1)}s`}function C(){k.value?.processId&&(n.value=k.value.processId,w.push("/modules/terminals"))}return le(()=>[{id:"action:analyze-build: start",title:"Start a new analyze build",icon:"i-carbon-edge-node",action:l}]),(r,t)=>{const z=j,G=_e,q=ie,M=oe,O=ue,Y=se,Z=me,H=pe,K=re,Q=$e,W=ve;return i(),u(p,null,[d(M,{"left-size":30},{left:a(()=>[e("div",ze,[(i(!0),u(p,null,L(b(_)?.builds,s=>(i(),u(p,{key:s.slug},[e("button",{flex:"~ col gap1","hover:bg-active":"",p3:"",class:E(s.slug===o.value?.slug?"text-primary bg-active":""),onClick:x=>y.value=s.slug},[e("code",null,v(s.name),1),e("div",Ce,[t[4]||(t[4]=e("div",{"i-carbon-time":""},null,-1)),e("span",null,v(A(s)),1),t[5]||(t[5]=e("div",{"flex-auto":""},null,-1)),e("span",null,v(b(R)(new Date(s.endTime))),1)])],10,Be),t[6]||(t[6]=e("div",{"x-divider":""},null,-1))],64))),128)),e("div",ke,[b(k)?(i(),B(z,{key:1,n:"primary",icon:"carbon-circle-dash animate-spin",onClick:t[1]||(t[1]=s=>C())},{default:a(()=>t[8]||(t[8]=[f(" Building... ")])),_:1})):(i(),B(z,{key:0,n:"primary",icon:"carbon-edge-node",onClick:t[0]||(t[0]=s=>l())},{default:a(()=>t[7]||(t[7]=[f(" Start a new build ")])),_:1}))])])]),right:a(()=>[o.value?(i(),B(G,{key:0,current:o.value},null,8,["current"])):(i(),B(q,{key:1}))]),_:1}),d(b(c),null,{default:a(({resolve:s})=>[d(K,{"model-value":!0,onClose:x=>s(!1)},{default:a(()=>[e("div",Ne,[t[13]||(t[13]=e("h3",{class:"text-lg font-medium leading-6",mb2:""}," Start analyze build? ",-1)),t[14]||(t[14]=e("p",{op50:""}," Enter the name of the build: ",-1)),d(O,{modelValue:m.value,"onUpdate:modelValue":t[2]||(t[2]=x=>m.value=x),placeholder:"Build name"},null,8,["modelValue"]),T.value?(i(),B(Y,{key:0,"n-orange":""},{default:a(()=>t[9]||(t[9]=[f(" A build with the same name already exists, continue would overrides the previous build result. ")])),_:1})):g("",!0),t[15]||(t[15]=e("div",{my3:"","x-divider":""},null,-1)),t[16]||(t[16]=e("p",{op50:""}," The following command will be executed in your terminal: ",-1)),d(Z,{code:`npx nuxi analyze --no-serve --name=${m.value}`,lang:"bash",px4:"",py2:"",border:"~ base rounded",lines:!1},null,8,["code"]),d(H,{modelValue:$.value,"onUpdate:modelValue":t[3]||(t[3]=x=>$.value=x),mt2:"",n:"primary"},{default:a(()=>t[10]||(t[10]=[f(" Navigate to terminal ")])),_:1},8,["modelValue"]),e("div",Te,[d(z,{onClick:x=>s(!1)},{default:a(()=>t[11]||(t[11]=[f(" Cancel ")])),_:2},1032,["onClick"]),d(z,{n:"solid primary",onClick:x=>s(!0)},{default:a(()=>t[12]||(t[12]=[f(" Start ")])),_:2},1032,["onClick"])])])]),_:2},1032,["onClose"])]),_:1}),d(W,null,{default:a(()=>[d(Q)]),_:1})],64)}}});export{Pe as default};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import{G as ee,H,_ as te,I as ne,J as R,K as ce,L as pe,M as me,r as X,E as Z,v as se,N as ve,O as fe,c as le,A as ge,a as he,w as xe,P as be,Q as we,R as _e,S as ye,T as $e,g as ke,U as Ce}from"./f1cbvne4.js";import{_ as Ve}from"./ncheckbox.vue-jtldzl6k.js";import{_ as Pe}from"./ndropdown.vue-ji36i25f.js";import{_ as Ae}from"./nnavbar.vue-exzr4e5w.js";import{p as W,k as T,ah as oe,I as i,a2 as o,Y as J,u as m,ab as K,a4 as d,R as t,aa as D,F as z,af as G,U as V,S,a3 as h,q as U,W as ae,a9 as N,V as De,j as Ne,as as Fe,X as Se}from"./vendor/json-editor-vue-g7zhhq6q.js";import{_ as Ue}from"./nsection-block-x8dothd4.js";import{_ as Ie}from"./filepath-item.vue-br6hjwqx.js";import{_ as Te}from"./code-snippets.vue-yqoxee04.js";import{_ as je}from"./ndrawer.vue-nkn577bf.js";import{D as Ee}from"./constants-b32h69zq.js";import"./vendor/unocss-hvn0t0zz.js";import"./vendor/shiki-hjqm7vcp.js";import"./nicon-title.vue-g35plvi8.js";import"./ncode-block.vue-lex5o4lv.js";import"./client-etfulgf7.js";const Be={key:0,"h-full":"","w-full":"",flex:"","items-center":"","justify-center":""},Le={for:"drop-zone-input","text-3xl":"",hover:"text-green cursor-pointer","transition-all":""},ze={key:1,relative:"","h-full":"","w-full":"",grid:"~ rows-[max-content_1fr_max-content]"},Oe={grid:"~ cols-minmax-8rem gap-8","overflow-auto":"",p6:""},Re={flex:"","items-center":"","justify-center":"","of-hidden":"",rounded:"","rounded-t-lg":"","bg-active":"","object-cover":"",class:"aspect-1/1",border:"~ base"},Me=["src"],Ke={flex:"~ gap1","items-center":""},qe={flex:"~ gap-2","items-center":"","justify-center":"",p8:""},Ge=W({__name:"AssetDropZone",props:{modelValue:{type:Boolean,required:!0},folder:{type:String,required:!0}},setup(L){const l=L,f=ee(l,"modelValue"),C=T(),n=T([]);function v(s){C.value=s.target,f.value=!0}function b(s){s.target===C.value&&(f.value=!1)}function j(s){s.preventDefault()}function P(s){s.preventDefault(),x(s.dataTransfer.files)}function x(s){const c=Array.from(s||[]);if(c.length){const g=[],_=n.value.map(u=>u.name);for(const u of c)if(_.includes(u.name)){let A=1;const[y,B]=u.name.split(".");for(;_.includes(`${y} (${A}).${B}`);)A++;const M=`${y}-${A}.${B}`,a=new Blob([u],{type:u.type}),e=new File([a],M,{lastModified:Date.now()});g.push(e),_.push(M)}else u.type===""&&R({message:"Folders are not supported yet",icon:"carbon:face-dissatisfied",classes:"text-orange"}),g.push(u);n.value=[...n.value,...g]}}async function E(){if(ce.value||pe.value)return;me("assets:upload");const s=[];for(const c of n.value){const g=new FileReader;g.readAsDataURL(c);const u=(await new Promise(A=>{g.onload=()=>A(g.result)})).split(";base64,").pop();s.push({path:c.name,encoding:"base64",content:u})}await X.writeStaticAssets(await Z(),[...s],l.folder).then(()=>{p(),R({message:"Files uploaded successfully!",icon:"i-carbon:checkmark"})}).catch(c=>{p(),R({message:`Error uploading files: ${c?.message??"unknown"}`,icon:"i-carbon-warning",classes:"text-red"})}),f.value=!1}function q(s){n.value?.splice(s,1)}function O(s){return URL.createObjectURL(s)}function w(s,c){const[g,_]=s.name.split("."),u=c.replace(/\.\w+$/,""),A=`${u}.${_}`;return u.length===0?(alert("File name must be at least 1 characters long"),g):(Object.defineProperty(s,"name",{value:A,writable:!1}),n.value.splice(n.value.indexOf(s),1,s),s)}function r(){n.value=[]}function p(){f.value=!1,r()}return H("dragenter",v),H("dragleave",b),H("dragover",j),H("drop",P),(s,c)=>{const g=te,_=ne,u=se,A=oe("tooltip");return o(),i("div",{fixed:"","bottom-0":"","left-13":"","right-0":"","top-0":"","z-10":"","backdrop-blur-20":"","transition-all":"",class:J(m(f)?"opacity-100 visible":"opacity-0 invisible")},[K(d(g,{icon:"carbon-close",title:"Close",absolute:"","right-5":"","top-5":"","z-20":"","text-xl":"",border:!1,onClick:p},null,512),[[A,"Close",void 0,{"bottom-end":!0}]]),n.value?.length?(o(),i("div",ze,[c[4]||(c[4]=t("div",{px6:"",py6:""},[t("h1",{"text-2xl":""}," Upload "),t("p",{"text-sm":"",op50:""}," Drag and drop files to upload ")],-1)),t("div",Oe,[(o(!0),i(z,null,G(n.value,(y,B)=>(o(),i("div",{key:y.name,flex:"~ col gap-2",relative:"","h-50":"","w-40":"","items-center":""},[t("div",Re,[t("img",{"h-full":"","w-full":"","rounded-t-lg":"","object-cover":"",src:O(y)},null,8,Me)]),t("div",Ke,[d(u,{n:"xs","h-full":"","flex-auto":"","model-value":y.name,"onUpdate:modelValue":M=>w(y,M.target.value)},null,8,["model-value","onUpdate:modelValue"]),d(g,{n:"red",icon:"carbon-trash-can","h-full":"","flex-none":"",title:"Remove file",onClick:M=>q(B)},null,8,["onClick"])])]))),128))]),t("div",qe,[n.value.length?(o(),V(g,{key:0,n:"red",onClick:r},{default:h(()=>[d(_,{icon:"carbon-clean"}),c[2]||(c[2]=D(" Clear "))]),_:1})):S("",!0),d(g,{disabled:!n.value.length,n:"primary solid",onClick:E},{default:h(()=>[d(_,{icon:"carbon-cloud-upload"}),c[3]||(c[3]=D(" Upload "))]),_:1},8,["disabled"])])])):(o(),i("div",Be,[t("label",Le,[d(_,{icon:"carbon-cloud-upload","mr-2":""}),c[1]||(c[1]=D(" Drop files here or click to select "))]),t("input",{id:"drop-zone-input",type:"file",multiple:"",hidden:"",onChange:c[0]||(c[0]=y=>x(y.target.files))},null,32)]))],2)}}}),We=W({__name:"AssetFontPreview",props:{asset:{}},setup(L){const l=L,f=U(()=>`devtools-assets-${ve(l.asset)}`);return fe(U(()=>`
|
|
2
|
-
@font-face {
|
|
3
|
-
font-family: '${f.value}';
|
|
4
|
-
src: url('${l.asset.publicPath}');
|
|
5
|
-
}
|
|
6
|
-
`)),(C,n)=>(o(),i("div",{"of-hidden":"",style:ae({fontFamily:`'${f.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))}}),Xe={flex:"","items-center":"","justify-center":"","of-hidden":"","bg-active":"","object-cover":"",p1:""},Ze=["src"],He={key:2,"i-carbon-document":"","text-3xl":"",op20:""},Je={key:3,"w-full":"","self-start":"",p4:""},Qe=["textContent"],Ye={key:4},et=["src","autoplay","controls"],tt={key:5},nt={key:0,"i-carbon-volume-up":"","text-3xl":"",op20:""},ot=["src"],lt={key:6,"i-carbon-help":"","text-3xl":"",op20:""},ie=W({__name:"AssetPreview",props:{asset:{},textContent:{},detail:{type:Boolean}},setup(L){return(l,f)=>{const C=We;return o(),i("div",Xe,[l.asset.type==="image"?(o(),i("img",{key:0,src:l.asset.publicPath},null,8,Ze)):l.asset.type==="font"?(o(),V(C,{key:l.asset.publicPath,asset:l.asset,"self-stretch":"",p2:"","text-2xl":""},null,8,["asset"])):l.asset.type==="text"&&!l.textContent?(o(),i("div",He)):l.asset.type==="text"&&l.textContent?(o(),i("div",Je,[t("pre",{"max-h-10rem":"","of-hidden":"","text-xs":"","font-mono":"",textContent:N(l.textContent)},null,8,Qe)])):l.asset.type==="video"?(o(),i("div",Ye,[t("video",{src:l.asset.publicPath,autoplay:l.detail,controls:l.detail},null,8,et)])):l.asset.type==="audio"?(o(),i("div",tt,[l.detail?(o(),i("audio",{key:1,src:l.asset.publicPath,controls:""},null,8,ot)):(o(),i("div",nt))])):(o(),i("div",lt))])}}}),st={relative:"",flex:"~ col gap-1",hover:"bg-active","items-center":"","of-hidden":"",rounded:"",p2:""},at={"w-full":"","of-hidden":"",truncate:"","ws-nowrap":"","text-center":"","text-xs":""},it=W({__name:"AssetGridItem",props:{asset:{},folder:{}},setup(L){const l=L,f=U(()=>l.folder&&l.asset.path.startsWith(l.folder)?l.asset.path.slice(l.folder.length):l.asset.path);return(C,n)=>{const v=ne,b=ie;return o(),i("button",st,[C.asset.layer?(o(),V(v,{key:0,icon:"i-carbon-layers",absolute:"","right-4":"","top-4":"","bg-primary":""})):S("",!0),d(b,{"h-30":"","w-30":"",rounded:"",border:"~ base",asset:C.asset},null,8,["asset"]),t("div",at,N(f.value),1)])}}}),re=W({__name:"AssetListItem",props:{item:{},index:{default:0},modelValue:{}},setup(L,{emit:l}){const f=L,n=ee(f,"modelValue",l,{passive:!0}),v=U(()=>f.item?.children?.length),b=T(!0),j=U(()=>v.value?"i-carbon-folder":f.item.type==="image"?"i-carbon-image":f.item.type==="video"?"i-carbon-video":f.item.type==="audio"?"i-carbon-volume-up":f.item.type==="font"?"i-carbon-text-small-caps":f.item.type==="text"?"i-carbon-document":f.item.type==="json"?"i-carbon-json":"i-carbon-document-blank");return(P,x)=>{const E=ne,q=re;return o(),i("div",null,[t("button",{flex:"~ gap-2","w-full":"","items-center":"",hover:"bg-active",px4:"",py1:"",style:ae({paddingLeft:`calc(1rem + ${P.index*1.5}em)`}),class:J({"bg-active":!v.value&&m(n)?.filePath===P.item?.filePath}),border:"b base",onClick:x[0]||(x[0]=O=>v.value?b.value=!b.value:n.value=P.item)},[t("div",{class:J(j.value)},null,2),t("span",{class:J({"flex items-center":v.value}),"flex-auto":"","text-start":"","text-sm":"","font-mono":""},[D(N(P.item.path)+" ",1),P.item.layer?(o(),V(E,{key:0,icon:"i-carbon-layers","bg-primary":""})):S("",!0)],2),v.value?(o(),V(E,{key:0,icon:"carbon:chevron-right","transform-rotate":b.value?90:0,transition:""},null,8,["transform-rotate"])):S("",!0)],6),b.value?De(P.$slots,"default",{key:0},()=>[(o(!0),i(z,null,G(P.item?.children,O=>(o(),V(q,{key:O.filepath,modelValue:m(n),"onUpdate:modelValue":x[1]||(x[1]=w=>Ne(n)?n.value=w:null),item:O,index:P.index+1},null,8,["modelValue","item","index"]))),128))]):S("",!0)])}}}),rt={flex:"~ col gap-4","min-h-full":"","w-full":"","of-hidden":"",p4:""},ut={flex:"~","items-center":"","justify-center":""},dt={"max-w-full":"","w-full":"","table-fixed":""},ct={flex:"~ gap-1","w-full":"","items-center":""},pt={flex:"~ gap-1","w-full":"","items-center":"","of-hidden":""},mt={"flex-auto":"","of-hidden":"",truncate:"","ws-pre":"","font-mono":""},vt={capitalize:""},ft={key:0},gt={op70:""},ht={flex:"~ gap2 wrap"},xt={flex:"~ col gap-4","min-h-full":"","w-full":"","of-hidden":"",p8:""},bt={flex:"~ gap2 wrap justify-center"},wt={flex:"~ col gap-4","min-h-full":"","w-full":"","of-hidden":"",p8:""},_t={flex:"~ gap2 wrap justify-center"},yt={flex:"~ col gap-4","min-h-full":"","w-full":"","of-hidden":"",p4:""},$t={flex:"","justify-end":"","gap-4":""},kt=W({__name:"AssetDetails",props:{modelValue:{}},setup(L,{emit:l}){const n=ee(L,"modelValue",l,{passive:!0}),v=le(async()=>{if(n.value.type==="image")return X.getImageMeta(await Z(),n.value.filePath)}),b=T(!1),j=T(),P=T(0),x=le(async()=>{if(n.value.type!=="text")return;P.value;const a=await X.getTextAssetContent(await Z(),n.value.filePath);return j.value=a,a});async function E(){if(x.value!==j.value)try{await X.writeStaticAssets(await Z(),[{path:n.value.path,content:j.value,override:!0}],""),b.value=!1,P.value++,R({message:"Updated",icon:"i-carbon-checkmark",classes:"text-green"})}catch(a){console.error(a),R({message:"Something went wrong!",icon:"i-carbon-warning",classes:"text-red"})}}const q=ge(),O=U(()=>(q.value?._installedModules||[]).some(e=>e.meta?.name==="@nuxt/image"||e.meta?.name==="@nuxt/image-edge"||e.meta?.name==="@nuxt/image-nightly")),w=U(()=>{const a=[];if(n.value.type==="image"){const e=v.value?.width?`
|
|
7
|
-
width="${v.value.width}"
|
|
8
|
-
height="${v.value.height}" `:" ";return a.push({lang:"vue-html",code:`<img${e}
|
|
9
|
-
src="${n.value.publicPath}"
|
|
10
|
-
/>`,name:"Plain Image"}),O.value&&a.push({lang:"vue-html",code:`<NuxtImg${e}
|
|
11
|
-
src="${n.value.publicPath}"
|
|
12
|
-
/>`,name:"Nuxt Img",docs:"https://image.nuxt.com/usage/nuxt-img"},{lang:"vue-html",code:`<NuxtPicture${e}
|
|
13
|
-
src="${n.value.publicPath}"
|
|
14
|
-
/>`,name:"Nuxt Picture",docs:"https://image.nuxt.com/usage/nuxt-picture"}),a}return a.push({lang:"html",code:`<a download href="${n.value.publicPath}">
|
|
15
|
-
Download ${n.value.path.split("/").slice(-1)[0]}
|
|
16
|
-
</a>`,name:"Download link"}),a}),r=he(),p=xe(),s=be(()=>n.value.mtime),c=U(()=>{const a=n.value.size;return a<1024?`${a} B`:a<1024*1024?`${(a/1024).toFixed(2)} KB`:`${(a/1024/1024).toFixed(2)} MB`}),g=U(()=>{if(!v.value?.width||!v.value?.height)return"";const a=($,I)=>I?a(I,$%I):$,e=a(v.value.width,v.value.height);return e>3?`${v.value.width/e}:${v.value.height/e}`:""}),_=U(()=>["image","text","video","audio","font"].includes(n.value.type)),u=T(!1);async function A(){try{await X.deleteStaticAsset(await Z(),n.value.filePath),n.value=void 0,u.value=!1,R({message:"Asset deleted",icon:"i-carbon-checkmark",classes:"text-green"})}catch(a){console.error(a),R({message:"Something went wrong!",icon:"i-carbon-warning",classes:"text-red"})}}const y=T(!1),B=T("");async function M(){const a=n.value.filePath.split("/"),e=a.slice(-1)[0].split(".").slice(0,-1).join(".");if(!B.value||B.value===e)return R({message:"Please enter a new name",icon:"i-carbon-warning",classes:"text-orange"});try{const $=a.slice(-1)[0].split(".").slice(-1)[0],I=`${a.slice(0,-1).join("/")}/${B.value}.${$}`;await X.renameStaticAsset(await Z(),n.value.filePath,I),n.value=void 0,y.value=!1,R({message:"Asset renamed",icon:"i-carbon-checkmark",classes:"text-green"})}catch($){console.error($),R({message:"Something went wrong!",icon:"i-carbon-warning",classes:"text-red"})}}return(a,e)=>{const $=ie,I=Ie,F=te,ue=Te,Q=we,de=se,Y=oe("tooltip");return o(),i(z,null,[t("div",rt,[_.value?(o(),i(z,{key:0},[e[13]||(e[13]=t("div",{flex:"~ gap2","mb--2":"","items-center":"",op50:""},[t("div",{"x-divider":""}),t("div",{"flex-none":""}," Preview "),t("div",{"x-divider":""})],-1)),t("div",ut,[d($,{detail:"","max-h-80":"","min-h-20":"","min-w-20":"","w-auto":"",rounded:"",border:"~ base",asset:m(n),"text-content":m(x)},null,8,["asset","text-content"])])],64)):S("",!0),e[25]||(e[25]=t("div",{flex:"~ gap2","mb--2":"","items-center":"",op50:""},[t("div",{"x-divider":""}),t("div",{"flex-none":""}," Details "),t("div",{"x-divider":""})],-1)),t("table",dt,[t("tbody",null,[t("tr",null,[e[14]||(e[14]=t("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," Filepath ",-1)),t("td",null,[t("div",ct,[d(I,{filepath:m(n).filePath,"text-left":""},null,8,["filepath"]),K(d(F,{"flex-none":"",title:"Open in Editor",icon:"carbon-launch",border:!1,onClick:e[0]||(e[0]=k=>m(p)(m(n).filePath))},null,512),[[Y,"Open in Editor"]])])])]),t("tr",null,[e[15]||(e[15]=t("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," Public Path ",-1)),t("td",null,[t("div",pt,[t("div",mt,N(m(n).publicPath),1),K(d(F,{"flex-none":"",title:"Copy public path",icon:"carbon-copy",border:!1,onClick:e[1]||(e[1]=k=>m(r)(m(n).publicPath,"assets-public-path"))},null,512),[[Y,"Copy public path"]]),K(d(F,{"flex-none":"",to:m(n).publicPath,icon:"carbon-launch",target:"_blank",border:!1,title:"Open in browser"},null,8,["to"]),[[Y,"Open in browser"]])])])]),t("tr",null,[e[16]||(e[16]=t("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," Type ",-1)),t("td",vt,N(m(n).type),1)]),m(v)?.width?(o(),i(z,{key:0},[t("tr",null,[e[17]||(e[17]=t("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," Image Size ",-1)),t("td",null,N(m(v).width)+" x "+N(m(v).height),1)]),g.value?(o(),i("tr",ft,[e[18]||(e[18]=t("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," Aspect Ratio ",-1)),t("td",null,N(g.value),1)])):S("",!0)],64)):S("",!0),t("tr",null,[e[19]||(e[19]=t("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," File size ",-1)),t("td",null,N(c.value),1)]),t("tr",null,[e[20]||(e[20]=t("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," Last modified ",-1)),t("td",null,[D(N(new Date(m(n).mtime).toLocaleString())+" ",1),t("span",gt,"("+N(m(s))+")",1)])])])]),e[26]||(e[26]=t("div",{flex:"~ gap2","mb--2":"","items-center":"",op50:""},[t("div",{"x-divider":""}),t("div",{"flex-none":""}," Actions "),t("div",{"x-divider":""})],-1)),t("div",ht,[d(F,{to:m(n).publicPath,download:"",target:"_blank",icon:"carbon-download",n:"green"},{default:h(()=>e[21]||(e[21]=[D(" Download ")])),_:1},8,["to"]),m(n).type==="text"?(o(),V(F,{key:0,icon:"carbon-edit",n:"cyan",onClick:e[2]||(e[2]=k=>b.value=!b.value)},{default:h(()=>e[22]||(e[22]=[D(" Edit ")])),_:1})):S("",!0),d(F,{icon:"carbon-text-annotation-toggle",n:"blue",onClick:e[3]||(e[3]=k=>y.value=!y.value)},{default:h(()=>e[23]||(e[23]=[D(" Rename ")])),_:1}),d(F,{icon:"carbon-delete",n:"red",onClick:e[4]||(e[4]=k=>u.value=!u.value)},{default:h(()=>e[24]||(e[24]=[D(" Delete ")])),_:1})]),e[27]||(e[27]=t("div",{"flex-auto":""},null,-1)),w.value.length?(o(),V(ue,{key:1,border:"t base","mx--4":"","mb--4":"","code-snippets":w.value},null,8,["code-snippets"])):S("",!0)]),d(Q,{modelValue:u.value,"onUpdate:modelValue":e[6]||(e[6]=k=>u.value=k)},{default:h(()=>[t("div",xt,[e[30]||(e[30]=t("span",null," Are you sure you want to delete this asset? ",-1)),t("div",bt,[d(F,{icon:"carbon-close",onClick:e[5]||(e[5]=k=>u.value=!1)},{default:h(()=>e[28]||(e[28]=[D(" Cancel ")])),_:1}),d(F,{icon:"carbon-delete",n:"red",onClick:A},{default:h(()=>e[29]||(e[29]=[D(" Delete ")])),_:1})])])]),_:1},8,["modelValue"]),d(Q,{modelValue:y.value,"onUpdate:modelValue":e[9]||(e[9]=k=>y.value=k)},{default:h(()=>[t("div",wt,[d(de,{modelValue:B.value,"onUpdate:modelValue":e[7]||(e[7]=k=>B.value=k),placeholder:"New name",n:"blue"},null,8,["modelValue"]),t("div",_t,[d(F,{icon:"carbon-close",onClick:e[8]||(e[8]=k=>y.value=!1)},{default:h(()=>e[31]||(e[31]=[D(" Cancel ")])),_:1}),d(F,{icon:"carbon-text-annotation-toggle",n:"blue",onClick:M},{default:h(()=>e[32]||(e[32]=[D(" Rename ")])),_:1})])])]),_:1},8,["modelValue"]),m(n).type==="text"?(o(),V(Q,{key:0,modelValue:b.value,"onUpdate:modelValue":e[12]||(e[12]=k=>b.value=k)},{default:h(()=>[t("div",yt,[K(t("textarea",{"onUpdate:modelValue":e[10]||(e[10]=k=>j.value=k),placeholder:"Item value...",class:"h-lg w-xl of-auto rounded-lg p-4 text-sm font-mono outline-none",onKeydown:Se(E,["enter"])},null,544),[[Fe,j.value]]),t("div",$t,[d(F,{icon:"carbon-close",onClick:e[11]||(e[11]=k=>b.value=!1)},{default:h(()=>e[33]||(e[33]=[D(" Cancel ")])),_:1}),d(F,{icon:"carbon:save",n:"primary",onClick:E},{default:h(()=>e[34]||(e[34]=[D(" save ")])),_:1})])])]),_:1},8,["modelValue"])):S("",!0)],64)}}}),Ct={"h-full":"","of-auto":""},Vt={"flex-none":"",flex:"~ gap2 items-center","text-lg":""},Pt={flex:"~ items-center justify-center",absolute:"","bottom--1":"","right--1":"","h-4":"","w-4":"","rounded-full":"","bg-primary:30":"","text-8px":""},At={flex:"~ col","w-30":"","of-auto":""},Dt={"text-xs":"",op75:""},Nt={op50:""},Ft={key:0},St={"mt--4":"",px2:"",grid:"~ cols-minmax-8rem"},Ut={key:1,p2:"",grid:"~ cols-minmax-8rem"},It={key:1},Ht=W({__name:"assets",setup(L){const l=_e(),f=T(!1),C=T(""),n=U(()=>new ye(l.value||[],{keys:["path"]})),v=$e(()=>{const w=[];for(const r of l.value||[]){const p=r.path.split(".").pop();p&&!w.find(s=>s.name===p)&&w.push({name:p,value:!0})}return w}),b=U(()=>(C.value?n.value.search(C.value).map(r=>r.item):l.value||[]).filter(r=>{const p=r.path.split(".").pop();return!p||v.some(s=>s.name===p&&s.value)})),j=U(()=>{const w={};for(const r of b.value){const p=`${r.path.split("/").slice(0,-1).join("/")}/`;w[p]||(w[p]=[]),w[p].push(r)}return Object.entries(w).sort(([r],[p])=>r.localeCompare(p))}),P=U(()=>{const w={children:[]},r=(p,s,c)=>{const[g,..._]=s;let u=p.children.find(A=>A.path===g);u||(u={...c,path:g,children:[]},p.children.push(u)),_.length>1?r(u,_,c):_.length===1&&u.children.push({...c,path:_[0]})};return b.value.forEach(p=>{const s=p.path.split("/").filter(c=>c!=="");r(w,s,p)}),w.children}),x=T(),{view:E}=ke("assets");function q(){E.value=E.value==="list"?"grid":"list"}Ce("Escape",()=>{x.value=void 0});const O=T();return(w,r)=>{const p=te,s=Ve,c=Pe,g=Ae,_=Ge,u=it,A=Ue,y=re,B=kt,M=je,a=oe("tooltip");return o(),i("div",Ct,[d(g,{ref_key:"navbar",ref:O,search:C.value,"onUpdate:search":r[1]||(r[1]=e=>C.value=e),pb2:""},{actions:h(()=>[t("div",Vt,[K(d(p,{icon:"carbon:cloud-upload",title:"File Upload",border:!1,onClick:r[0]||(r[0]=e=>f.value=!f.value)},null,512),[[a,"File Upload",void 0,{"bottom-end":!0}]]),m(v).length?(o(),V(c,{key:0,direction:"end",n:"sm primary"},{trigger:h(({click:e})=>[K(d(p,{icon:"carbon-filter",border:!1,title:"Filter",p3:"","text-lg":"",onClick:$=>e()},null,8,["onClick"]),[[a,"Filter",void 0,{"bottom-end":!0}]]),t("span",Pt,N(m(v).length),1)]),default:h(()=>[t("div",At,[(o(!0),i(z,null,G(m(v),e=>(o(),V(s,{key:e.name,modelValue:e.value,"onUpdate:modelValue":$=>e.value=$,flex:"~ gap-2",rounded:"",px2:"",py2:""},{default:h(()=>[t("span",Dt,N(e.name),1)]),_:2},1032,["modelValue","onUpdate:modelValue"]))),128))])]),_:1})):S("",!0),K(d(p,{"text-lg":"",border:!1,icon:m(E)==="grid"?"i-carbon-list":"i-carbon-grid",title:"Toggle view",onClick:q},null,8,["icon"]),[[a,"Toggle View",void 0,{"bottom-end":!0}]])])]),default:h(()=>[t("div",Nt,[C.value?(o(),i("span",Ft,N(b.value.length)+" matched · ",1)):S("",!0),t("span",null,N(m(l)?.length)+" assets in total",1)])]),_:1},8,["search"]),d(_,{modelValue:f.value,"onUpdate:modelValue":r[2]||(r[2]=e=>f.value=e),folder:"/"},null,8,["modelValue"]),m(E)==="grid"?(o(),i(z,{key:0},[j.value.length>1?(o(!0),i(z,{key:0},G(j.value,([e,$])=>(o(),V(A,{key:e,text:e,description:`${$.length} items`,open:$.length<=m(Ee),padding:!1},{default:h(()=>[t("div",St,[(o(!0),i(z,null,G($,I=>(o(),V(u,{key:I.path,asset:I,folder:e,onClick:F=>x.value=I},null,8,["asset","folder","onClick"]))),128))])]),_:2},1032,["text","description","open"]))),128)):(o(),i("div",Ut,[(o(!0),i(z,null,G(b.value,e=>(o(),V(u,{key:e.path,asset:e,onClick:$=>x.value=e},null,8,["asset","onClick"]))),128))]))],64)):(o(),i("div",It,[(o(!0),i(z,null,G(P.value,(e,$)=>(o(),V(y,{key:$,modelValue:x.value,"onUpdate:modelValue":r[3]||(r[3]=I=>x.value=I),item:e},null,8,["modelValue","item"]))),128))])),d(M,{"model-value":!!x.value,"auto-close":"","w-120":"",top:O.value,onClose:r[5]||(r[5]=e=>x.value=void 0)},{default:h(()=>[x.value?(o(),V(B,{key:0,modelValue:x.value,"onUpdate:modelValue":r[4]||(r[4]=e=>x.value=e)},null,8,["modelValue"])):S("",!0)]),_:1},8,["model-value","top"])])}}});export{Ht as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"id":"bc495f3e-a5e4-477e-bd8b-c102bb505b43","timestamp":1747147239849,"matcher":{"static":{},"wildcard":{},"dynamic":{}},"prerendered":[]}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import{_ as H}from"./ncode-block.vue-lex5o4lv.js";import{ao as P}from"./f1cbvne4.js";import{p as Q,q as X,k as Y,E as j,U as W,a2 as S}from"./vendor/json-editor-vue-g7zhhq6q.js";function g(){}g.prototype={diff:function(e,r){var t,u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=u.callback;typeof u=="function"&&(o=u,u={});var i=this;function f(v){return v=i.postProcess(v,u),o?(setTimeout(function(){o(v)},0),!0):v}e=this.castInput(e,u),r=this.castInput(r,u),e=this.removeEmpty(this.tokenize(e,u)),r=this.removeEmpty(this.tokenize(r,u));var l=r.length,s=e.length,a=1,c=l+s;u.maxEditLength!=null&&(c=Math.min(c,u.maxEditLength));var p=(t=u.timeout)!==null&&t!==void 0?t:1/0,d=Date.now()+p,m=[{oldPos:-1,lastComponent:void 0}],h=this.extractCommon(m[0],r,e,0,u);if(m[0].oldPos+1>=s&&h+1>=l)return f(F(i,m[0].lastComponent,r,e,i.useLongestToken));var y=-1/0,T=1/0;function z(){for(var v=Math.max(y,-a);v<=Math.min(T,a);v+=2){var C=void 0,w=m[v-1],E=m[v+1];w&&(m[v-1]=void 0);var q=!1;if(E){var M=E.oldPos-v;q=E&&0<=M&&M<l}var B=w&&w.oldPos+1<s;if(!q&&!B){m[v]=void 0;continue}if(!B||q&&w.oldPos<E.oldPos?C=i.addToPath(E,!0,!1,0,u):C=i.addToPath(w,!1,!0,1,u),h=i.extractCommon(C,r,e,v,u),C.oldPos+1>=s&&h+1>=l)return f(F(i,C.lastComponent,r,e,i.useLongestToken));m[v]=C,C.oldPos+1>=s&&(T=Math.min(T,v-1)),h+1>=l&&(y=Math.max(y,v+1))}a++}if(o)(function v(){setTimeout(function(){if(a>c||Date.now()>d)return o();z()||v()},0)})();else for(;a<=c&&Date.now()<=d;){var x=z();if(x)return x}},addToPath:function(e,r,t,u,o){var i=e.lastComponent;return i&&!o.oneChangePerToken&&i.added===r&&i.removed===t?{oldPos:e.oldPos+u,lastComponent:{count:i.count+1,added:r,removed:t,previousComponent:i.previousComponent}}:{oldPos:e.oldPos+u,lastComponent:{count:1,added:r,removed:t,previousComponent:i}}},extractCommon:function(e,r,t,u,o){for(var i=r.length,f=t.length,l=e.oldPos,s=l-u,a=0;s+1<i&&l+1<f&&this.equals(t[l+1],r[s+1],o);)s++,l++,a++,o.oneChangePerToken&&(e.lastComponent={count:1,previousComponent:e.lastComponent,added:!1,removed:!1});return a&&!o.oneChangePerToken&&(e.lastComponent={count:a,previousComponent:e.lastComponent,added:!1,removed:!1}),e.oldPos=l,s},equals:function(e,r,t){return t.comparator?t.comparator(e,r):e===r||t.ignoreCase&&e.toLowerCase()===r.toLowerCase()},removeEmpty:function(e){for(var r=[],t=0;t<e.length;t++)e[t]&&r.push(e[t]);return r},castInput:function(e){return e},tokenize:function(e){return Array.from(e)},join:function(e){return e.join("")},postProcess:function(e){return e}};function F(n,e,r,t,u){for(var o=[],i;e;)o.push(e),i=e.previousComponent,delete e.previousComponent,e=i;o.reverse();for(var f=0,l=o.length,s=0,a=0;f<l;f++){var c=o[f];if(c.removed)c.value=n.join(t.slice(a,a+c.count)),a+=c.count;else{if(!c.added&&u){var p=r.slice(s,s+c.count);p=p.map(function(d,m){var h=t[a+m];return h.length>d.length?h:d}),c.value=n.join(p)}else c.value=n.join(r.slice(s,s+c.count));s+=c.count,c.added||(a+=c.count)}}return o}function V(n,e){var r;for(r=0;r<n.length&&r<e.length;r++)if(n[r]!=e[r])return n.slice(0,r);return n.slice(0,r)}function U(n,e){var r;if(!n||!e||n[n.length-1]!=e[e.length-1])return"";for(r=0;r<n.length&&r<e.length;r++)if(n[n.length-(r+1)]!=e[e.length-(r+1)])return n.slice(-r);return n.slice(-r)}function _(n,e,r){if(n.slice(0,e.length)!=e)throw Error("string ".concat(JSON.stringify(n)," doesn't start with prefix ").concat(JSON.stringify(e),"; this is a bug"));return r+n.slice(e.length)}function N(n,e,r){if(!e)return n+r;if(n.slice(-e.length)!=e)throw Error("string ".concat(JSON.stringify(n)," doesn't end with suffix ").concat(JSON.stringify(e),"; this is a bug"));return n.slice(0,-e.length)+r}function L(n,e){return _(n,e,"")}function I(n,e){return N(n,e,"")}function Z(n,e){return e.slice(0,b(n,e))}function b(n,e){var r=0;n.length>e.length&&(r=n.length-e.length);var t=e.length;n.length<e.length&&(t=n.length);var u=Array(t),o=0;u[0]=0;for(var i=1;i<t;i++){for(e[i]==e[o]?u[i]=u[o]:u[i]=o;o>0&&e[i]!=e[o];)o=u[o];e[i]==e[o]&&o++}o=0;for(var f=r;f<n.length;f++){for(;o>0&&n[f]!=e[o];)o=u[o];n[f]==e[o]&&o++}return o}var O="a-zA-Z0-9_\\u{C0}-\\u{FF}\\u{D8}-\\u{F6}\\u{F8}-\\u{2C6}\\u{2C8}-\\u{2D7}\\u{2DE}-\\u{2FF}\\u{1E00}-\\u{1EFF}",K=new RegExp("[".concat(O,"]+|\\s+|[^").concat(O,"]"),"ug"),k=new g;k.equals=function(n,e,r){return r.ignoreCase&&(n=n.toLowerCase(),e=e.toLowerCase()),n.trim()===e.trim()};k.tokenize=function(n){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r;if(e.intlSegmenter){if(e.intlSegmenter.resolvedOptions().granularity!="word")throw new Error('The segmenter passed must have a granularity of "word"');r=Array.from(e.intlSegmenter.segment(n),function(o){return o.segment})}else r=n.match(K)||[];var t=[],u=null;return r.forEach(function(o){/\s/.test(o)?u==null?t.push(o):t.push(t.pop()+o):/\s/.test(u)?t[t.length-1]==u?t.push(t.pop()+o):t.push(u+o):t.push(o),u=o}),t};k.join=function(n){return n.map(function(e,r){return r==0?e:e.replace(/^\s+/,"")}).join("")};k.postProcess=function(n,e){if(!n||e.oneChangePerToken)return n;var r=null,t=null,u=null;return n.forEach(function(o){o.added?t=o:o.removed?u=o:((t||u)&&G(r,u,t,o),r=o,t=null,u=null)}),(t||u)&&G(r,u,t,null),n};function G(n,e,r,t){if(e&&r){var u=e.value.match(/^\s*/)[0],o=e.value.match(/\s*$/)[0],i=r.value.match(/^\s*/)[0],f=r.value.match(/\s*$/)[0];if(n){var l=V(u,i);n.value=N(n.value,i,l),e.value=L(e.value,l),r.value=L(r.value,l)}if(t){var s=U(o,f);t.value=_(t.value,f,s),e.value=I(e.value,s),r.value=I(r.value,s)}}else if(r)n&&(r.value=r.value.replace(/^\s*/,"")),t&&(t.value=t.value.replace(/^\s*/,""));else if(n&&t){var a=t.value.match(/^\s*/)[0],c=e.value.match(/^\s*/)[0],p=e.value.match(/\s*$/)[0],d=V(a,c);e.value=L(e.value,d);var m=U(L(a,d),p);e.value=I(e.value,m),t.value=_(t.value,a,m),n.value=N(n.value,a,a.slice(0,a.length-m.length))}else if(t){var h=t.value.match(/^\s*/)[0],y=e.value.match(/\s*$/)[0],T=Z(y,h);e.value=I(e.value,T)}else if(n){var z=n.value.match(/\s*$/)[0],x=e.value.match(/^\s*/)[0],v=Z(z,x);e.value=L(e.value,v)}}var ee=new g;ee.tokenize=function(n){var e=new RegExp("(\\r?\\n)|[".concat(O,"]+|[^\\S\\n\\r]+|[^").concat(O,"]"),"ug");return n.match(e)||[]};var $=new g;$.tokenize=function(n,e){e.stripTrailingCr&&(n=n.replace(/\r\n/g,`
|
|
2
|
-
`));var r=[],t=n.split(/(\n|\r\n)/);t[t.length-1]||t.pop();for(var u=0;u<t.length;u++){var o=t[u];u%2&&!e.newlineIsToken?r[r.length-1]+=o:r.push(o)}return r};$.equals=function(n,e,r){return r.ignoreWhitespace?((!r.newlineIsToken||!n.includes(`
|
|
3
|
-
`))&&(n=n.trim()),(!r.newlineIsToken||!e.includes(`
|
|
4
|
-
`))&&(e=e.trim())):r.ignoreNewlineAtEof&&!r.newlineIsToken&&(n.endsWith(`
|
|
5
|
-
`)&&(n=n.slice(0,-1)),e.endsWith(`
|
|
6
|
-
`)&&(e=e.slice(0,-1))),g.prototype.equals.call(this,n,e,r)};function ne(n,e,r){return $.diff(n,e,r)}var re=new g;re.tokenize=function(n){return n.split(/(\S.+?[.!?])(?=\s+|$)/)};var oe=new g;oe.tokenize=function(n){return n.split(/([{}:;,]|\s+)/)};function R(n){"@babel/helpers - typeof";return R=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},R(n)}var D=new g;D.useLongestToken=!0;D.tokenize=$.tokenize;D.castInput=function(n,e){var r=e.undefinedReplacement,t=e.stringifyReplacer,u=t===void 0?function(o,i){return typeof i>"u"?r:i}:t;return typeof n=="string"?n:JSON.stringify(A(n,null,null,u),u," ")};D.equals=function(n,e,r){return g.prototype.equals.call(D,n.replace(/,([\r\n])/g,"$1"),e.replace(/,([\r\n])/g,"$1"),r)};function A(n,e,r,t,u){e=e||[],r=r||[],t&&(n=t(u,n));var o;for(o=0;o<e.length;o+=1)if(e[o]===n)return r[o];var i;if(Object.prototype.toString.call(n)==="[object Array]"){for(e.push(n),i=new Array(n.length),r.push(i),o=0;o<n.length;o+=1)i[o]=A(n[o],e,r,t,u);return e.pop(),r.pop(),i}if(n&&n.toJSON&&(n=n.toJSON()),R(n)==="object"&&n!==null){e.push(n),i={},r.push(i);var f=[],l;for(l in n)Object.prototype.hasOwnProperty.call(n,l)&&f.push(l);for(f.sort(),o=0;o<f.length;o+=1)l=f[o],i[l]=A(n[l],e,r,t,l);e.pop(),r.pop()}else i=n;return i}var J=new g;J.tokenize=function(n){return n.slice()};J.join=J.removeEmpty=function(n){return n};const le=Q({__name:"CodeDiff",props:{from:{},to:{},lang:{}},setup(n){const e=n;function r(f,l){const s=ne(f.trim(),l.trim()),a=[],c=[],p=[];for(const d of s){const m=d.value.trimEnd().split(`
|
|
7
|
-
`);for(const h of m)d.added?(a.push(p.length),p.push(h)):(d.removed&&c.push(p.length),p.push(h))}return{added:a,removed:c,result:p.join(`
|
|
8
|
-
`)}}const t=X(()=>r(e.from,e.to));function u(f){let l=0;return f.replace(/class="shiki/,'class="shiki diff').replace(/class="line"/g,s=>(l++,t.value.added.includes(l-1)?'class="line line-added"':t.value.removed.includes(l-1)?'class="line line-removed"':s))}const o=Y();j(i);function i(){const f=P(o);f&&f.querySelector(".line-added,.line-removed")?.scrollIntoView()}return(f,l)=>{const s=H;return S(),W(s,{ref_key:"elRef",ref:o,code:t.value.result,lang:f.lang,"transform-rendered":u,onLoaded:i},null,8,["code","lang"])}}});export{le as _};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as ie,_ as Y,a4 as re,aq as ue,A as me,B as ce,g as Z,ar as de,n as fe,as as ve,S as he,Y as _e,W as be,I as ge,f as xe}from"./f1cbvne4.js";import{I as m,a2 as o,R as n,p as G,q as P,aa as E,a9 as O,S as g,V as j,a4 as u,U as b,a3 as c,u as $,F as B,af as M,k as F,n as ye,E as we,x as ke,j as z,Z as Ce,Y as Ne,a5 as W,ah as $e,ab as X,ae as Ve}from"./vendor/json-editor-vue-g7zhhq6q.js";import{_ as De}from"./help-fab.vue-gswykw6o.js";import{_ as Pe}from"./ncheckbox.vue-jtldzl6k.js";import{_ as J}from"./nnavbar.vue-exzr4e5w.js";import{p as K}from"./index-jc4yj4to.js";import{_ as Q}from"./nbadge-lodw2y18.js";import{_ as ee}from"./filepath-item.vue-br6hjwqx.js";import{_ as Se}from"./ndrawer.vue-nkn577bf.js";import{D as Le,N as Be}from"./vendor/vis-gqe7ml2e.js";import{_ as Ie}from"./nselect-tabs.vue-l5x0yirx.js";import{_ as Te}from"./nsection-block-x8dothd4.js";import{_ as Me}from"./nicon-title.vue-g35plvi8.js";import{D as H}from"./constants-b32h69zq.js";import{u as Ue,a as Fe}from"./state-components-ittrf6yq.js";import"./vendor/unocss-hvn0t0zz.js";import"./vendor/shiki-hjqm7vcp.js";const Ge={class:"markdown-body"},Re={__name:"components",setup(D,{expose:l}){return l({frontmatter:{}}),(p,d)=>(o(),m("div",Ge,d[0]||(d[0]=[n("h1",null,"Components",-1),n("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.",-1),n("p",null,"Components placed in the components/ directory are automatically registered by Nuxt. They can be used in your templates without importing them.",-1),n("p",null,[n("a",{href:"https://nuxt.com/docs/guide/directory-structure/components",target:"_blank",rel:"noopener"},"Learn more in the documentation")],-1)])))}},Ae={"text-sm":"","font-mono":""},ne=G({__name:"ComponentName",props:{component:{}},setup(D){const l=D,v=P(()=>l.component.pascalName||K(l.component.name||l.component.__name||l.component.kebabName||""));return(p,d)=>(o(),m("code",Ae,[d[0]||(d[0]=n("span",{mr1:"",op20:""},"<",-1)),E(O(v.value),1),d[1]||(d[1]=n("span",{ml1:"",op20:""},"/>",-1))]))}}),ze={flex:"~ col gap1","items-start":"","of-hidden":""},Ee={flex:"~ gap2 items-center",px3:""},We={px3:"",pb2:""},Oe={key:0,border:"t base","max-h-60":"","w-full":"","of-auto":"",px3:"",py3:""},je={"text-sm":""},qe={"text-primary":""},He={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:""},Xe={"text-sm":""},Ze={"text-primary":""},Je={key:0,flex:"~ col gap-2","items-start":"",pt3:"","text-sm":"",op75:""},oe=G({__name:"ComponentDetails",props:{component:{},dependencies:{},dependents:{}},setup(D){const l=D,v=P(()=>l.component.pascalName||K(l.component.name||l.component.__name||l.component.kebabName||"")),p=P(()=>l.component.filePath||l.component.file||l.component.__file||""),d=ie();return(s,h)=>{const i=ne,x=Y,a=Q,w=ee;return o(),m("div",ze,[n("div",Ee,[u(i,{component:s.component},null,8,["component"]),s.component.meta?.docs&&typeof s.component.meta.docs=="string"?(o(),b(x,{key:0,title:"Open docs","flex-none":"",n:"xs",to:s.component.meta.docs,target:"_blank",icon:"carbon-catalog"},{default:c(()=>h[1]||(h[1]=[E(" Docs ")])),_:1},8,["to"])):g("",!0),u(x,{title:"Copy name","flex-none":"",n:"xs",icon:"carbon-copy",onClick:h[0]||(h[0]=_=>$(d)(`<${v.value}></${v.value}>`,"component-name"))},{default:c(()=>h[2]||(h[2]=[E(" Copy ")])),_:1}),s.component.global?(o(),b(a,{key:1,n:"green",title:"Registered at runtime as a global component",textContent:"runtime"})):g("",!0)]),n("div",We,[p.value?(o(),b(w,{key:0,filepath:p.value,"w-full":"","text-sm":"",op40:"","group-hover:op75":""},null,8,["filepath"])):g("",!0)]),s.dependents?(o(),m("div",Oe,[n("div",je,[n("strong",qe,O(s.dependents.length),1),h[3]||(h[3]=n("span",{op50:""}," references",-1))]),s.dependents.length?(o(),m("div",He,[(o(!0),m(B,null,M(s.dependents,_=>(o(),b(w,{key:_,filepath:_},null,8,["filepath"]))),128))])):g("",!0)])):g("",!0),s.dependencies?(o(),m("div",Ye,[n("div",Xe,[n("strong",Ze,O(s.dependencies.length),1),h[4]||(h[4]=n("span",{op50:""}," dependencies",-1))]),s.dependencies.length?(o(),m("div",Je,[(o(!0),m(B,null,M(s.dependencies,_=>(o(),b(w,{key:_,filepath:_},null,8,["filepath"]))),128))])):g("",!0)])):g("",!0),j(s.$slots,"default")])}}}),Ke={flex:"~ gap-x-3 gap-y-1 wrap","w-full":""},Qe={relative:"","h-full":"","w-full":""},en={key:0,py4:"",pt3:"",flex:"~ col"},nn={border:"t base",p4:""},on=G({__name:"ComponentsGraph",props:{components:{},relationships:{}},setup(D){const l=D,v=F(),p=F(),d=re(),s=ye(),h=ue(),i=me(),x=ce(),{componentsGraphShowNodeModules:a,componentsGraphShowGlobalComponents:w,componentsGraphShowPages:_,componentsGraphShowLayouts:k,componentsGraphShowWorkspace:S}=Z("ui"),f=F(),C=F(""),r=de(C,300),R=P(()=>{const V=l.relationships||[];if(f.value){let e=function(N){!N||t.has(N)||(t.add(N),N.deps.forEach(I=>{e(V.find(U=>U.id===I))}))};const t=new Set;return e(f.value),Array.from(t)}return V}),T=P(()=>{const V=R.value.map(t=>{const N=l.components.find(A=>A.filePath===t.id),I=h.value?.find(A=>A.file===t.id),U=x.value?.find(A=>A.file===t.id),L=t.id.includes("/node_modules/")?"lib":N?N.global?"global":"user":U?"layout":I?"page":"unknown";if(!a.value&&L==="lib"||!_.value&&L==="page"||!k.value&&L==="layout"||!S.value&&L==="user"&&i.value&&!t.id.startsWith(i.value.rootDir)||!w.value&&L==="global")return null;const q=L==="layout"?"hexagon":L==="page"?"square":"dot",y=r.value&&!t.id.toLowerCase().includes(r.value.toLowerCase());return{id:t.id,label:ae(t.id),group:L,shape:q,size:15+Math.min(t.deps.length/2,8),font:{color:y?"#8885":d.value==="dark"?"white":"black"},color:y?"#8885":f.value?.id===t.id?"#82c742":void 0,extra:{id:t.id,component:N,page:I,layout:U,relationship:t}}}).filter(t=>!!t),e=R.value.flatMap(t=>t.deps.map(N=>({from:t.id,to:N,arrows:{to:{enabled:!0,scaleFactor:.8}}})));return{nodes:new Le(V),edges:e}}),te=P(()=>s.value?.component?l.relationships?.find(e=>e.id===s.value?.component?.filePath)?.deps?.map(e=>l.relationships?.find(t=>t.id===e)?.id).filter(Boolean):[]),se=P(()=>s.value?.component?l.relationships?.filter(e=>e.deps.includes(s.value.component.filePath))?.map(e=>l.relationships?.find(t=>t.id===e.id)?.id).filter(Boolean):[]);we(()=>{const V={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=new Be(v.value,T.value,V);e.on("click",t=>{const N=t.nodes?.[0],I=T.value.nodes.get(N).extra;s.value=I}),ke(T,()=>{e.setData(T.value)})});function le(){s.value=void 0}function ae(V){const e=l.components.find(t=>t.filePath===V);return e?e.pascalName:V.replace(/.*\/components\//,"").replace(/\.vue$/,"").replace(/\/index$/,"").split("/").map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join("")}function pe(){f.value=s.value?.relationship,s.value=void 0}return(V,e)=>{const t=Pe,N=J,I=fe,U=oe,L=Y,q=Se;return o(),m(B,null,[u(N,{ref_key:"navbar",ref:p,search:C.value,"onUpdate:search":e[6]||(e[6]=y=>C.value=y),absolute:"","left-0":"","right-0":"","top-0":""},{actions:c(()=>[n("div",Ke,[u(t,{modelValue:$(_),"onUpdate:modelValue":e[0]||(e[0]=y=>z(_)?_.value=y:null),n:"primary sm"},{default:c(()=>e[8]||(e[8]=[n("span",{op75:""},"Show pages",-1)])),_:1},8,["modelValue"]),u(t,{modelValue:$(k),"onUpdate:modelValue":e[1]||(e[1]=y=>z(k)?k.value=y:null),n:"primary sm"},{default:c(()=>e[9]||(e[9]=[n("span",{op75:""},"Show layouts",-1)])),_:1},8,["modelValue"]),u(t,{modelValue:$(S),"onUpdate:modelValue":e[2]||(e[2]=y=>z(S)?S.value=y:null),n:"primary sm"},{default:c(()=>e[10]||(e[10]=[n("span",{op75:""},"Show workspace",-1)])),_:1},8,["modelValue"]),u(t,{modelValue:$(a),"onUpdate:modelValue":e[3]||(e[3]=y=>z(a)?a.value=y:null),n:"primary sm"},{default:c(()=>e[11]||(e[11]=[n("span",{op75:""},"Show node_modules",-1)])),_:1},8,["modelValue"]),u(t,{modelValue:$(w),"onUpdate:modelValue":e[4]||(e[4]=y=>z(w)?w.value=y:null),n:"primary sm"},{default:c(()=>e[12]||(e[12]=[n("span",{op75:""},"Show global components",-1)])),_:1},8,["modelValue"])]),f.value?(o(),m("button",{key:0,flex:"~ gap-1","flex-none":"","items-center":"","rounded-full":"","bg-gray:20":"",py1:"",pl3:"",pr2:"","text-xs":"",op50:"","hover:op100":"",onClick:e[5]||(e[5]=y=>f.value=void 0)},e[13]||(e[13]=[E(" Clear filter "),n("div",{"i-carbon-close":""},null,-1)]))):g("",!0),e[14]||(e[14]=n("div",{"flex-auto":""},null,-1)),j(V.$slots,"default")]),_:3},8,["search"]),n("div",Qe,[n("div",{ref_key:"container",ref:v,"h-full":"","w-full":""},null,512),u(I,{absolute:"","bottom-3":"","left-3":"","border-0":"",p2:"",px3:"","text-sm":"","n-glass-effect":""},{default:c(()=>e[15]||(e[15]=[n("div",{grid:"~ cols-[20px_1fr] items-center gap-y-1"},[n("div",{"h-3":"","w-3":"","rounded-full":"","bg-hex-42b883":""}),n("div",{op50:""}," Component "),n("div",{"h-3":"","w-3":"","rounded-full":"","bg-hex-97c2fc":""}),n("div",{op50:""}," Global Component "),n("div",{"h-3":"","w-3":"","bg-hex-42b2b8":""}),n("div",{op50:""}," Page "),n("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 726 628","ml--1px":"","h-3":""},[n("path",{fill:"#4256b8","stroke-width":"4",d:"M723 314 543 625.8H183L3 314 183 2.2h360L723 314z"})]),n("div",{op50:""}," Layout "),n("div",{"h-3":"","w-3":"","rounded-full":"","bg-hex-b4b842":""}),n("div",{op50:""}," Library Component "),n("div",{"h-3":"","w-3":"","rounded-full":"","bg-hex-b86542":""}),n("div",{op50:""}," Unknown ")],-1)])),_:1}),u(q,{"model-value":!!(s.value&&s.value.component),top:p.value,border:"t l base","w-80":"",onClose:le},{default:c(()=>[s.value&&s.value.component?(o(),m("div",en,[u(U,{component:s.value.component,dependencies:te.value,dependents:se.value},null,8,["component","dependencies","dependents"]),n("div",nn,[u(L,{n:"primary solid",onClick:e[7]||(e[7]=y=>pe())},{default:c(()=>e[16]||(e[16]=[E(" Filter to this component ")])),_:1})])])):g("",!0)]),_:1},8,["model-value","top"])])],64)}}}),tn={hover:"bg-active",class:"group",flex:"~ gap2","w-full":"","items-center":"",rounded:"",px2:"",py1:""},sn={key:0,"ml--1":"","text-primary":""},ln=G({__name:"ComponentItem",props:{component:{},dependencies:{},dependents:{}},setup(D){const l=D,v=P(()=>l.component.filePath||l.component.file||l.component.__file||"");return(p,d)=>{const s=ne,h=oe,i=Ce("VDropdown"),x=Q,a=ee;return o(),m("div",tn,[u(i,null,{popper:c(()=>[u(h,{component:p.component,dependencies:p.dependencies,dependents:p.dependents,"w-100":"",pt3:""},null,8,["component","dependencies","dependents"])]),default:c(()=>[n("button",{"hover:text-primary":"",class:Ne(p.dependents&&p.dependents.length===0?"op50":"")},[u(s,{component:p.component},null,8,["component"])],2)]),_:1}),p.dependents?.length?(o(),m("sup",sn," x"+O(p.dependents?.length),1)):g("",!0),p.component.global?(o(),b(x,{key:1,n:"green",title:"Registered at runtime as a global component",textContent:"runtime"})):g("",!0),j(p.$slots,"default"),v.value?(o(),b(a,{key:2,filepath:v.value,"text-sm":"",op25:"","group-hover:op75":""},null,8,["filepath"])):g("",!0)])}}}),an={flex:"~ gap-2 items-center"},pn={pl4:""},rn=G({__name:"ComponentsList",props:{components:{},relationships:{}},setup(D){const l=D,v=F(""),p=F("all"),d=P(()=>{const x=l.components.map(a=>ve(a,l.relationships));return p.value==="using"?x.filter(a=>a.dependents?.length):p.value==="not-used"?x.filter(a=>!a.dependents?.length):x}),s={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"},h=P(()=>new he(d.value,{keys:["component.pascalName","component.filePath","component.kebabName"]})),i=P(()=>{const x=[],a=new Map,w=[],_=[],k={user:0,lib:0,builtin:0,runtime:0};return(v.value?h.value.search(v.value).map(f=>f.item):d.value).forEach(f=>{const C=f.component;if(C.filePath&&_e(C.filePath)){const r=be(C.filePath);if(!r)return;r==="nuxt"?(C.meta??={},C.meta.docs??=s?.[C.pascalName],w.push(f),k.builtin++):(a.has(r)||a.set(r,[]),a.get(r).push(f),k.lib++)}else C.global&&!C.filePath?(_.push(f),k.runtime++):(x.push(f),k.user++)}),{count:k,user:x,builtin:w,lib:a,runtime:_}});return(x,a)=>{const w=ge,_=Ie,k=J,S=ln,f=Te,C=Me;return o(),m(B,null,[u(k,{search:v.value,"onUpdate:search":a[1]||(a[1]=r=>v.value=r),pb3:""},{actions:c(()=>[j(x.$slots,"default")]),default:c(()=>[n("div",an,[u(w,{icon:"carbon-filter",op50:""}),u(_,{modelValue:p.value,"onUpdate:modelValue":a[0]||(a[0]=r=>p.value=r),n:"primary sm",options:[{label:"All",value:"all"},{label:"Using",value:"using"},{label:"Not used",value:"not-used"}]},null,8,["modelValue"])])]),_:3},8,["search"]),i.value.user.length?(o(),b(f,{key:0,icon:"carbon-nominal",text:"User components",open:i.value.user.length<=$(H),description:`Total components: ${i.value.count.user}`},{default:c(()=>[(o(!0),m(B,null,M(i.value.user,r=>(o(),b(S,W({key:r.component.filePath,ref_for:!0},r),null,16))),128))]),_:1},8,["open","description"])):g("",!0),i.value.runtime.length?(o(),b(f,{key:1,icon:"carbon-load-balancer-global",open:i.value.runtime.length<=$(H),text:"Runtime components",description:`Total components: ${i.value.count.runtime}`},{default:c(()=>[(o(!0),m(B,null,M(i.value.runtime,r=>(o(),b(S,W({key:r.component.filePath,ref_for:!0},r),null,16))),128))]),_:1},8,["open","description"])):g("",!0),i.value.builtin.length?(o(),b(f,{key:2,icon:"simple-icons-nuxtdotjs",text:"Built-in components",description:`Total components: ${i.value.count.builtin}`},{default:c(()=>[(o(!0),m(B,null,M(i.value.builtin,r=>(o(),b(S,W({key:r.component.filePath,ref_for:!0},r),null,16))),128))]),_:1},8,["description"])):g("",!0),i.value.lib.size?(o(),b(f,{key:3,open:i.value.count.lib<=$(H),icon:"carbon-3d-mpr-toggle",text:"Components from libraries",description:`${i.value.count.lib} components from ${i.value.lib.size} packages`},{default:c(()=>[(o(!0),m(B,null,M(i.value.lib.entries(),([r,R])=>(o(),m("div",{key:r,"ml-2":""},[u(C,{text:`${r} (${R.length})`,py1:"",op50:""},null,8,["text"]),n("div",pn,[(o(!0),m(B,null,M(R,T=>(o(),b(S,W({key:T.component.filePath,ref_for:!0},T),null,16))),128))])]))),128))]),_:1},8,["open","description"])):g("",!0)],64)}}}),un={relative:"","h-full":"","of-auto":""},mn={"flex-none":"",flex:"~ gap3"},Pn=G({__name:"components",setup(D){const l=xe(),v=Ue(),p=Fe(),{componentsView:d}=Z("ui");function s(){l.value?.inspector?.enable()}function h(){d.value=d.value==="list"?"graph":"list"}return(i,x)=>{const a=Y,w=Re,_=De,k=$e("tooltip");return o(),m(B,null,[n("div",un,[(o(),b(Ve($(d)==="list"?rn:on),{components:$(v),relationships:$(p)},{default:c(()=>[n("div",mn,[X(u(a,{"text-lg":"",border:!1,icon:$(d)==="graph"?"i-carbon-list":"i-carbon-network-4",title:"Toggle view",onClick:h},null,8,["icon"]),[[k,"Toggle View",void 0,{"bottom-end":!0}]]),$(l)?.inspector?.isAvailable?X((o(),b(a,{key:0,"text-lg":"",border:!1,icon:"i-tabler-focus-2",title:"Inspect Vue components",onClick:s},null,512)),[[k,"Inspect Vue components",void 0,{"bottom-end":!0}]]):g("",!0)])]),_:1},8,["components","relationships"]))]),u(_,null,{default:c(()=>[u(w)]),_:1})],64)}}});export{Pn as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as U,w as $,I as E,_ as F}from"./f1cbvne4.js";import{_ as S}from"./nmarkdown.vue-gamlcow3.js";import{_ as j}from"./filepath-item.vue-br6hjwqx.js";import{k as q}from"./index-jc4yj4to.js";import{C as y}from"./constants-b32h69zq.js";import{p as z,q as r,Z as L,U as i,a2 as s,a3 as m,R as a,Y as M,I as p,S as l,aa as c,a9 as _,a4 as b,u as k,F as x,af as O}from"./vendor/json-editor-vue-g7zhhq6q.js";const R={rounded:"","font-mono":""},T={key:0,"text-primary":""},W={key:0},Y={title:"Vue Directive"},Z={"max-w-100":""},A={px4:"",py3:"","text-sm":""},G={flex:"~ gap2",n:"primary xs"},H={border:"t base","max-h-60":"","of-auto":"",px4:"",py3:""},J={"text-sm":""},K={"text-primary":""},P={flex:"~ col gap-2","items-start":"",pt3:"","text-sm":"",op75:""},Q={key:1,"text-sm":"",op50:""},ne=z({__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(g){const o=g,C=U(),h=$(),u=r(()=>o.item.as||o.item.name),D=r(()=>{let e=u.value;return o.isDirective&&(e[0]!=="v"&&(e=`v${e}`),e=q(e)),e}),n=r(()=>o.metadata?.injectionUsage?.[u.value]?.count||0),I=r(()=>(o.metadata?.injectionUsage?.[u.value]?.moduleIds||[]).filter(e=>!e.endsWith("?macro=true"))),v=r(()=>o.item.meta?.docsUrl?o.item.meta.docsUrl:["nuxt","#app","nuxt3"].includes(o.item.from)?y.nuxt[o.item.name]:o.item.from==="vue"?y.vue[o.item.name]:null);return(e,t)=>{const N=E,w=S,f=F,B=j,V=L("VDropdown");return s(),i(V,{disabled:!o.metadata},{popper:m(()=>[a("div",Z,[a("div",A,[e.item.meta?.description?(s(),i(w,{key:0,tag:"div",pb3:"","text-sm":"",markdown:e.item.meta.description},null,8,["markdown"])):l("",!0),a("div",G,[b(f,{icon:"carbon-copy",onClick:t[0]||(t[0]=d=>k(C)(D.value,"imports-name"))},{default:m(()=>t[2]||(t[2]=[c(" Copy ")])),_:1}),e.filepath?(s(),i(f,{key:0,icon:"carbon-code",onClick:t[1]||(t[1]=d=>e.filepath&&k(h)(e.filepath))},{default:m(()=>t[3]||(t[3]=[c(" Source ")])),_:1})):l("",!0),v.value?(s(),i(f,{key:1,icon:"carbon-catalog",to:v.value,target:"_blank"},{default:m(()=>t[4]||(t[4]=[c(" Docs ")])),_:1},8,["to"])):l("",!0)])]),a("div",H,[n.value?(s(),p(x,{key:0},[a("div",J,[t[5]||(t[5]=a("span",{op50:""},"It has been referenced ",-1)),a("strong",K,_(n.value),1),t[6]||(t[6]=a("span",{op50:""}," times by:",-1))]),a("div",P,[(s(!0),p(x,null,O(I.value,d=>(s(),i(B,{key:d,filepath:d},null,8,["filepath"]))),128))])],64)):(s(),p("div",Q," Not in use via auto import. "))])])]),default:m(()=>[a("button",{"hover:text-primary":"",class:M([e.metadata&&!n.value?"op30 hover:op100":"",e.classes])},[a("code",R,[c(_(u.value)+" ",1),n.value&&e.counter?(s(),p("sup",T,"x"+_(n.value),1)):l("",!0)]),e.isDirective?(s(),p("sup",W,[a("abbr",Y,[b(N,{icon:"tabler:hexagon-letter-d"})])])):l("",!0)],2)]),_:1},8,["disabled"])}}});export{ne as _};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{u as r,_ as s}from"./f1cbvne4.js";import{p as c,ah as i,ab as p,a2 as _,U as m}from"./vendor/json-editor-vue-g7zhhq6q.js";const h=c({__name:"DataSchemaButton",props:{getter:{type:Function}},setup(u){const t=r();return(o,e)=>{const n=s,a=i("tooltip");return p((_(),m(n,{title:"Generate Data Schema",icon:"carbon:container-services",border:!1,onClick:e[0]||(e[0]=l=>t.value=o.getter())},null,512)),[[a,"Generate Data Schema"]])}}});export{h as _};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{_ as A}from"./nselect.vue-jigqjeiw.js";import{u as E,c as F,a as W,_ as q}from"./f1cbvne4.js";import{_ as z}from"./nswitch.vue-km9qm824.js";import{_ as J}from"./ndropdown.vue-ji36i25f.js";import{_ as O}from"./ncode-block.vue-lex5o4lv.js";import{_ as R}from"./ndrawer.vue-nkn577bf.js";import{A as h,d as x}from"./vendor/quicktype-core-gg1jfx29.js";import{p as G,k,q as N,x as C,U as c,S as m,a2 as n,a4 as d,a3 as r,R as i,I as f,F as D,af as S,u as _,a9 as b,ad as H}from"./vendor/json-editor-vue-g7zhhq6q.js";import"./vendor/unocss-hvn0t0zz.js";import"./vendor/shiki-hjqm7vcp.js";import"./client-etfulgf7.js";const K={border:"b base",flex:"~ items-center gap-2",sticky:"","left-0":"","right-0":"","top-0":"","z-1":"",p3:"","bg-base":""},M={key:0,flex:"~ items-center justify-center",absolute:"","bottom--1":"","right--2":"","h-4":"","w-4":"","rounded-full":"","bg-lime:30":"","text-8px":""},P={flex:"~ col","w-100":"","of-auto":"",py2:""},Q={"text-xs":"",capitalize:"",op75:""},ie=G({__name:"DataSchemaDrawer",setup(X){const s=E(),V=k(0),l=k("TypeScript"),v=N(()=>h.all.find(e=>e.displayName===l.value)),o=k(v.value?.optionDefinitions.filter(e=>typeof e.defaultValue=="boolean")),y=F(async()=>{if(V.value,!s.value)return"";const e=x.jsonInputForTargetLanguage(l.value);await e.addSource({name:s.value.name??"Data",samples:[s.value.input]});const t=new x.InputData;return t.addInput(e),(await x.quicktype({inputData:t,lang:l.value,rendererOptions:o.value?.reduce((u,p)=>(u[p.name]=p.defaultValue,u),{})})).lines.join(`
|
|
2
|
-
`)}),j=N(()=>{const e=l.value.toLocaleLowerCase();return e.startsWith("javascript")?"javascript":e.startsWith("json")?"json":e.startsWith("typescript")?"typescript":e});C(o,()=>{V.value++},{deep:!0}),C(l,()=>{o.value=v.value?.optionDefinitions.filter(e=>typeof e.defaultValue=="boolean")});const $=W();function B(){$(y.value||"")}return(e,t)=>{const w=A,u=q,p=z,I=J,L=O,T=R;return v.value?(n(),c(H,{key:0,to:"body"},[d(T,{"model-value":!!_(s)?.input,"auto-close":"","max-w-screen":"","w-2xl":"","n-code-block":"",onClose:t[2]||(t[2]=a=>s.value=null)},{default:r(()=>[i("div",K,[t[3]||(t[3]=i("p",{"mr-2":""}," Schema ",-1)),d(w,{modelValue:l.value,"onUpdate:modelValue":t[0]||(t[0]=a=>l.value=a),n:"xs primary"},{default:r(()=>[(n(!0),f(D,null,S(_(h.all),a=>(n(),f("option",{key:a.displayName},b(a.displayName),1))),128))]),_:1},8,["modelValue"]),o.value?.length?(n(),c(I,{key:0,n:"sm lime"},{trigger:r(({click:a})=>[d(u,{icon:"carbon-settings","h-full":"",onClick:g=>a()},null,8,["onClick"]),o.value?(n(),f("span",M,b(o.value.length),1)):m("",!0)]),default:r(()=>[i("div",P,[(n(!0),f(D,null,S(o.value,(a,g)=>(n(),c(p,{key:a.name,modelValue:o.value[g].defaultValue,"onUpdate:modelValue":U=>o.value[g].defaultValue=U,flex:"~ gap-2",rounded:"",px2:"",py2:""},{default:r(()=>[i("span",Q,b(a.description),1)]),_:2},1032,["modelValue","onUpdate:modelValue"]))),128))])]),_:1})):m("",!0),t[4]||(t[4]=i("div",{"flex-auto":""},null,-1)),d(u,{icon:"carbon-copy","mr-6":"","h-full":"",onClick:t[1]||(t[1]=a=>B())})]),_(y)?(n(),c(L,{key:0,lang:j.value,code:_(y)},null,8,["lang","code"])):m("",!0)]),_:1},8,["model-value"])])):m("",!0)}}});export{ie as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{_ as T}from"./nsection-block-x8dothd4.js";import{_ as D}from"./ncheckbox.vue-jtldzl6k.js";import{g as M}from"./color-mt9xuhgy.js";import{_ as H}from"./nbadge-lodw2y18.js";import{p as V,q as R,U as g,a2 as l,a3 as d,aa as P,V as j,a9 as k,W as z,k as p,I as u,F as x,R as t,a4 as s,S as B,af as N,Y as E,u as $}from"./vendor/json-editor-vue-g7zhhq6q.js";import{_ as W,p as O}from"./f1cbvne4.js";import{_ as q}from"./filepath-item.vue-br6hjwqx.js";import{_ as K}from"./ncode-block.vue-lex5o4lv.js";import"./nicon-title.vue-g35plvi8.js";import"./vendor/unocss-hvn0t0zz.js";import"./vendor/shiki-hjqm7vcp.js";import"./client-etfulgf7.js";const L=V({__name:"NBadgeHashed",props:{text:{}},setup(_){const i=_,c=R(()=>{const a=M(i.text,50,60),r=M(i.text,50,60,.05);return{color:a,background:r}});return(a,r)=>(l(),g(H,{style:z(c.value)},{default:d(()=>[P(k(a.text),1),j(a.$slots,"default")]),_:3},8,["style"]))}}),Y={flex:"~ gap-2 col",mb4:""},A={flex:"~ gap-3 items-center"},G={key:0,flex:"~ gap-1","items-center":"",p1:"",border:"~ base rounded"},J={"max-w-full":"","of-auto":""},Q={"text-center":"",op50:""},X={flex:"~",px4:""},Z={key:0,op50:""},ee={px2:"","text-center":""},te={"of-auto":""},oe=V({__name:"DebugModuleMutationRecords",props:{moduleMutationRecords:{}},setup(_){const i=_;function c(n){return n.startsWith("/")||n.match(/^[a-z]:[\\/]/i)}const a=p(!1),r=p(!1),v=p(!1),b=p(!1),w=p(!1),m=p(""),S=R(()=>{let n=i.moduleMutationRecords;return a.value||(n=n.filter(e=>!e.name.startsWith("nuxt:")&&e.name!=="@nuxt/devtools")),r.value||(n=n.filter(e=>e.keys.join(".")!=="build.templates")),v.value||(n=n.filter(e=>e.keys.join(".")!=="build.transpile")),b.value||(n=n.filter(e=>e.keys.join(".")!=="plugins")),w.value||(n=n.filter(e=>e.method||e.value!=="[]"&&e.value!=="{}")),m.value&&(n=n.filter(e=>e.name===m.value)),n});return(n,e)=>{const f=D,y=L,F=W,U=q,I=K;return l(),u(x,null,[t("div",Y,[t("div",A,[s(f,{modelValue:a.value,"onUpdate:modelValue":e[0]||(e[0]=o=>a.value=o),n:"primary"},{default:d(()=>e[6]||(e[6]=[t("span",{"ws-nowrap":"",op75:""},"Builtin Modules",-1)])),_:1},8,["modelValue"]),s(f,{modelValue:r.value,"onUpdate:modelValue":e[1]||(e[1]=o=>r.value=o),n:"primary"},{default:d(()=>e[7]||(e[7]=[t("span",{"ws-nowrap":"",op75:""},"Templates",-1)])),_:1},8,["modelValue"]),s(f,{modelValue:v.value,"onUpdate:modelValue":e[2]||(e[2]=o=>v.value=o),n:"primary"},{default:d(()=>e[8]||(e[8]=[t("span",{"ws-nowrap":"",op75:""},"Transpile",-1)])),_:1},8,["modelValue"]),s(f,{modelValue:b.value,"onUpdate:modelValue":e[3]||(e[3]=o=>b.value=o),n:"primary"},{default:d(()=>e[9]||(e[9]=[t("span",{"ws-nowrap":"",op75:""},"Plugins",-1)])),_:1},8,["modelValue"]),s(f,{modelValue:w.value,"onUpdate:modelValue":e[4]||(e[4]=o=>w.value=o),n:"primary"},{default:d(()=>e[10]||(e[10]=[t("span",{"ws-nowrap":"",op75:""},"Empty Initial",-1)])),_:1},8,["modelValue"]),m.value?(l(),u("div",G,[s(y,{"font-mono":"",text:m.value},null,8,["text"]),s(F,{icon:"carbon-close",border:!1,onClick:e[5]||(e[5]=o=>m.value="")})])):B("",!0)])]),t("table",J,[e[11]||(e[11]=t("thead",{border:"b base"},[t("tr",null,[t("th",{"ws-nowrap":"",p1:"","text-center":"","font-bold":""}," Index "),t("th",{"ws-nowrap":"",p1:"","text-center":"","font-bold":""}," Module "),t("th",{"ws-nowrap":"",p1:"","text-center":"","font-bold":""}," Key Path "),t("th",{"ws-nowrap":"",p1:"","text-center":"","font-bold":""}," Method "),t("th",{"ws-nowrap":"",p1:"","text-center":"","font-bold":""}," Value ")])],-1)),t("tbody",null,[(l(!0),u(x,null,N(S.value,o=>(l(),u("tr",{key:n.moduleMutationRecords.indexOf(o),border:"b dashed transparent hover:base"},[t("td",Q,[t("div",null,k(n.moduleMutationRecords.indexOf(o)+1),1)]),t("td",null,[o.name&&c(o.name)?(l(),g(U,{key:0,filepath:o.name},null,8,["filepath"])):(l(),g(y,{key:1,role:"button","font-mono":"",text:o.name,onClick:h=>m.value=o.name},null,8,["text","onClick"]))]),t("td",null,[t("code",X,[(l(!0),u(x,null,N(o.keys,(h,C)=>(l(),u(x,{key:C},[t("span",null,k(h),1),C<o.keys.length-1?(l(),u("span",Z," . ")):B("",!0)],64))),128))])]),t("td",ee,[s(y,{"font-mono":"",text:o.method||"=",class:E(o.method?"":"saturate-0")},null,8,["text","class"])]),t("td",te,[s(I,{code:String(o.value),lang:"ts","grammar-context-code":"let a = ","ws-normal":"","break-all":"",py1:"",lines:!1,inline:!0},null,8,["code"])])]))),128))])])],64)}}}),ne={key:0,p6:""},le={key:1},ve=V({__name:"debug",setup(_){const i=O();return(c,a)=>{const r=T;return $(i)?(l(),u("div",le,[s(r,{icon:"carbon-container-image-push-pull",text:"Module Mutation Records",description:"Records of module mutations to nuxt options"},{default:d(()=>[s(oe,{"module-mutation-records":$(i).moduleMutationRecords||[]},null,8,["module-mutation-records"])]),_:1})])):(l(),u("div",ne,a[0]||(a[0]=[t("div",null,"No Debug Context Found",-1),t("div",null,"Set `debug: true` in your nuxt.config.ts to enable this panel",-1)])))}}});export{ve as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.spotlight[data-v-252ab519]{background:linear-gradient(45deg,#00dc82,#36e4da 50%,#0047e1);bottom:-30vh;filter:blur(20vh);height:40vh}.gradient-border[data-v-252ab519]{-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);border-radius:.5rem;position:relative}@media (prefers-color-scheme:light){.gradient-border[data-v-252ab519]{background-color:#ffffff4d}.gradient-border[data-v-252ab519]:before{background:linear-gradient(90deg,#e2e2e2,#e2e2e2 25%,#00dc82,#36e4da 75%,#0047e1)}}@media (prefers-color-scheme:dark){.gradient-border[data-v-252ab519]{background-color:#1414144d}.gradient-border[data-v-252ab519]:before{background:linear-gradient(90deg,#303030,#303030 25%,#00dc82,#36e4da 75%,#0047e1)}}.gradient-border[data-v-252ab519]:before{background-size:400% auto;border-radius:.5rem;content:"";inset:0;-webkit-mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);-webkit-mask-composite:xor;mask-composite:exclude;opacity:.5;padding:2px;position:absolute;transition:background-position .3s ease-in-out,opacity .2s ease-in-out;width:100%}.gradient-border[data-v-252ab519]:hover:before{background-position:-50% 0;opacity:1}.fixed[data-v-252ab519]{position:fixed}.left-0[data-v-252ab519]{left:0}.right-0[data-v-252ab519]{right:0}.z-10[data-v-252ab519]{z-index:10}.z-20[data-v-252ab519]{z-index:20}.grid[data-v-252ab519]{display:grid}.mb-16[data-v-252ab519]{margin-bottom:4rem}.mb-8[data-v-252ab519]{margin-bottom:2rem}.max-w-520px[data-v-252ab519]{max-width:520px}.min-h-screen[data-v-252ab519]{min-height:100vh}.w-full[data-v-252ab519]{width:100%}.flex[data-v-252ab519]{display:flex}.cursor-pointer[data-v-252ab519]{cursor:pointer}.place-content-center[data-v-252ab519]{place-content:center}.items-center[data-v-252ab519]{align-items:center}.justify-center[data-v-252ab519]{justify-content:center}.overflow-hidden[data-v-252ab519]{overflow:hidden}.bg-white[data-v-252ab519]{--un-bg-opacity:1;background-color:rgb(255 255 255/var(--un-bg-opacity))}.px-4[data-v-252ab519]{padding-left:1rem;padding-right:1rem}.px-8[data-v-252ab519]{padding-left:2rem;padding-right:2rem}.py-2[data-v-252ab519]{padding-bottom:.5rem;padding-top:.5rem}.text-center[data-v-252ab519]{text-align:center}.text-8xl[data-v-252ab519]{font-size:6rem;line-height:1}.text-xl[data-v-252ab519]{font-size:1.25rem;line-height:1.75rem}.text-black[data-v-252ab519]{--un-text-opacity:1;color:rgb(0 0 0/var(--un-text-opacity))}.font-light[data-v-252ab519]{font-weight:300}.font-medium[data-v-252ab519]{font-weight:500}.leading-tight[data-v-252ab519]{line-height:1.25}.font-sans[data-v-252ab519]{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}.antialiased[data-v-252ab519]{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}@media (prefers-color-scheme:dark){.dark\:bg-black[data-v-252ab519]{--un-bg-opacity:1;background-color:rgb(0 0 0/var(--un-bg-opacity))}.dark\:text-white[data-v-252ab519]{--un-text-opacity:1;color:rgb(255 255 255/var(--un-text-opacity))}}@media (min-width:640px){.sm\:px-0[data-v-252ab519]{padding-left:0;padding-right:0}.sm\:px-6[data-v-252ab519]{padding-left:1.5rem;padding-right:1.5rem}.sm\:py-3[data-v-252ab519]{padding-bottom:.75rem;padding-top:.75rem}.sm\:text-4xl[data-v-252ab519]{font-size:2.25rem;line-height:2.5rem}.sm\:text-xl[data-v-252ab519]{font-size:1.25rem;line-height:1.75rem}}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.spotlight[data-v-8c86eed3]{background:linear-gradient(45deg,#00dc82,#36e4da 50%,#0047e1);filter:blur(20vh)}.fixed[data-v-8c86eed3]{position:fixed}.-bottom-1\/2[data-v-8c86eed3]{bottom:-50%}.left-0[data-v-8c86eed3]{left:0}.right-0[data-v-8c86eed3]{right:0}.grid[data-v-8c86eed3]{display:grid}.mb-16[data-v-8c86eed3]{margin-bottom:4rem}.mb-8[data-v-8c86eed3]{margin-bottom:2rem}.h-1\/2[data-v-8c86eed3]{height:50%}.max-w-520px[data-v-8c86eed3]{max-width:520px}.min-h-screen[data-v-8c86eed3]{min-height:100vh}.place-content-center[data-v-8c86eed3]{place-content:center}.overflow-hidden[data-v-8c86eed3]{overflow:hidden}.bg-white[data-v-8c86eed3]{--un-bg-opacity:1;background-color:rgb(255 255 255/var(--un-bg-opacity))}.px-8[data-v-8c86eed3]{padding-left:2rem;padding-right:2rem}.text-center[data-v-8c86eed3]{text-align:center}.text-8xl[data-v-8c86eed3]{font-size:6rem;line-height:1}.text-xl[data-v-8c86eed3]{font-size:1.25rem;line-height:1.75rem}.text-black[data-v-8c86eed3]{--un-text-opacity:1;color:rgb(0 0 0/var(--un-text-opacity))}.font-light[data-v-8c86eed3]{font-weight:300}.font-medium[data-v-8c86eed3]{font-weight:500}.leading-tight[data-v-8c86eed3]{line-height:1.25}.font-sans[data-v-8c86eed3]{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}.antialiased[data-v-8c86eed3]{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}@media (prefers-color-scheme:dark){.dark\:bg-black[data-v-8c86eed3]{--un-bg-opacity:1;background-color:rgb(0 0 0/var(--un-bg-opacity))}.dark\:text-white[data-v-8c86eed3]{--un-text-opacity:1;color:rgb(255 255 255/var(--un-text-opacity))}}@media (min-width:640px){.sm\:px-0[data-v-8c86eed3]{padding-left:0;padding-right:0}.sm\:text-4xl[data-v-8c86eed3]{font-size:2.25rem;line-height:2.5rem}}
|