@nuxt/devtools 2.6.5 → 3.0.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 +30 -28
- package/dist/client/200.html +1 -30
- package/dist/client/404.html +1 -30
- package/dist/client/_nuxt/__blank-dhzpxa9h.js +1 -0
- package/dist/client/_nuxt/analyze-build-iuobyrzk.js +1 -0
- package/dist/client/_nuxt/assets-i23nsbgy.js +16 -0
- package/dist/client/_nuxt/builds/latest.json +1 -1
- package/dist/client/_nuxt/builds/meta/99eb76b8-150e-4172-bac8-9e493b66294f.json +1 -0
- package/dist/client/_nuxt/{client-kvgyopwa.js → client-miiq4qin.js} +1 -1
- package/dist/client/_nuxt/code-diff-ojhnq7lb.js +8 -0
- package/dist/client/_nuxt/code-snippets-io8vjgte.js +1 -0
- package/dist/client/_nuxt/components-oba7gxs1.js +1 -0
- package/dist/client/_nuxt/composable-item-de2qbj5y.js +1 -0
- package/dist/client/_nuxt/custom-_name_-jurovv1y.js +1 -0
- package/dist/client/_nuxt/data-schema-button-hqryewml.js +1 -0
- package/dist/client/_nuxt/data-schema-drawer-eud3u5zb.js +2 -0
- package/dist/client/_nuxt/debug-kbm2yt7r.js +1 -0
- package/dist/client/_nuxt/default-kby21ji1.js +1 -0
- package/dist/client/_nuxt/duration-display-cjpkh71u.js +1 -0
- package/dist/client/_nuxt/entry.css-gme6a42i.css +1 -0
- package/dist/client/_nuxt/error-404-kic6hw35.js +1 -0
- package/dist/client/_nuxt/error-404.css-b77wc31r.css +1 -0
- package/dist/client/_nuxt/error-500-bwkywpkx.js +1 -0
- package/dist/client/_nuxt/error-500.css-fqn6oeub.css +1 -0
- package/dist/client/_nuxt/{error-ghvu2n3h.js → error-cojkix4q.js} +4 -4
- package/dist/client/_nuxt/filepath-item-owlv864w.js +1 -0
- package/dist/client/_nuxt/full-cgtv2v5d.js +1 -0
- package/dist/client/_nuxt/gyfk82sn.js +19 -0
- package/dist/client/_nuxt/help-fab-chg6ox1v.js +1 -0
- package/dist/client/_nuxt/hooks-k468vrdo.js +1 -0
- package/dist/client/_nuxt/imports-k6f5buxo.js +1 -0
- package/dist/client/_nuxt/index-f2v7sbjf.js +1 -0
- package/dist/client/_nuxt/launch-page-l87i7ewv.js +1 -0
- package/dist/client/_nuxt/modules-ivdlwkom.js +1 -0
- package/dist/client/_nuxt/nbadge-d24jlq2b.js +1 -0
- package/dist/client/_nuxt/ncheckbox-eijyrwcq.js +1 -0
- package/dist/client/_nuxt/ncode-block-pcw3yh3u.js +2 -0
- package/dist/client/_nuxt/ndrawer-bkb7znk3.js +1 -0
- package/dist/client/_nuxt/ndropdown-jcnxkt1n.js +1 -0
- package/dist/client/_nuxt/nicon-title-he6hzgyb.js +1 -0
- package/dist/client/_nuxt/nlink-fgjzhevk.js +1 -0
- package/dist/client/_nuxt/nmarkdown-n6zsr15e.js +1 -0
- package/dist/client/_nuxt/nnavbar-b4ap0r8w.js +1 -0
- package/dist/client/_nuxt/none-exs5d7mb.js +1 -0
- package/dist/client/_nuxt/nsection-block-je23gs2w.js +1 -0
- package/dist/client/_nuxt/nsection-block.css-h05mpq8x.css +1 -0
- package/dist/client/_nuxt/nselect-nvb1idpm.js +1 -0
- package/dist/client/_nuxt/nselect-tabs-fwdas30r.js +1 -0
- package/dist/client/_nuxt/nswitch-ls95gzk4.js +1 -0
- package/dist/client/_nuxt/open-graph-hsd8h01v.js +3 -0
- package/dist/client/_nuxt/{overview-igkkj0w7.js → overview-i8xqj81i.js} +1 -1
- package/dist/client/_nuxt/pages-ks4c3kru.js +1 -0
- package/dist/client/_nuxt/payload-e1fl41fl.js +1 -0
- package/dist/client/_nuxt/pinia-hsuzmrlr.js +1 -0
- package/dist/client/_nuxt/plugins-clu2903o.js +1 -0
- package/dist/client/_nuxt/render-tree-gs2gfb9k.js +1 -0
- package/dist/client/_nuxt/runtime-configs-ljy2p74w.js +1 -0
- package/dist/client/_nuxt/{server-discovery-iq9d1ccu.js → server-discovery-dvc1bk9x.js} +1 -1
- package/dist/client/_nuxt/server-route-inputs-e42a8bs5.js +1 -0
- package/dist/client/_nuxt/server-routes-n5316xz0.js +9 -0
- package/dist/client/_nuxt/server-tasks-kis4i2hm.js +1 -0
- package/dist/client/_nuxt/settings-bspq3ibj.js +1 -0
- package/dist/client/_nuxt/stacktrace-list-gp6s7nwa.js +1 -0
- package/dist/client/_nuxt/{state-components-i9ev6w42.js → state-components-8k7sf46m.js} +1 -1
- package/dist/client/_nuxt/state-editor-kisl1jyp.js +1 -0
- package/dist/client/_nuxt/state-modules-lzveckmy.js +1 -0
- package/dist/client/_nuxt/storage-ljwzb54h.js +1 -0
- package/dist/client/_nuxt/terminals-d4haajhp.js +1 -0
- package/dist/client/_nuxt/timeline-juw2n1du.js +31 -0
- package/dist/client/_nuxt/{unocss-runtime-natbzd10.js → unocss-runtime-kbodm5ry.js} +1 -1
- package/dist/client/_nuxt/vendor/json-editor-vue-ikjc812x.js +3902 -0
- package/dist/client/_nuxt/vendor/json-editor-vue.css-f8ezrn37.css +1 -0
- package/dist/client/_nuxt/vendor/{quicktype-core-jxekulwx.js → quicktype-core-e2ngitjr.js} +47 -47
- package/dist/client/_nuxt/vendor/{shiki-jxvjmls6.js → shiki-hpfujfi3.js} +1 -1
- package/dist/client/_nuxt/vendor/{unocss-n80di6md.js → unocss-e5jy1i5r.js} +3 -3
- package/dist/client/_nuxt/vendor/unocss.css-c5u30s53.css +1 -0
- package/dist/client/_nuxt/vendor/xterm.css-g1ekxkss.css +1 -0
- package/dist/client/_nuxt/virtual-files-f5fteh9f.js +1 -0
- package/dist/client/_nuxt/vue-devtools-bywsfgh0.js +2 -0
- package/dist/client/_nuxt/{vue-virtual-scroller.esm-oaume2n6.js → vue-virtual-scroller.esm-b0ym3ct8.js} +2 -2
- package/dist/client/discovery/index.html +1 -1
- package/dist/client/index.html +1 -30
- package/dist/module.json +1 -1
- package/dist/webcomponents/index.mjs +612 -586
- package/package.json +34 -34
- package/dist/client/_nuxt/__blank-oybwb9u0.js +0 -1
- package/dist/client/_nuxt/analyze-build-exflnuwi.js +0 -1
- package/dist/client/_nuxt/assets-jmd1acsq.js +0 -16
- package/dist/client/_nuxt/builds/meta/50d38183-21be-4c6a-b93c-9aad9dacb71b.json +0 -1
- package/dist/client/_nuxt/ch41giyg.js +0 -15
- package/dist/client/_nuxt/code-diff.vue-bq8bth0l.js +0 -8
- package/dist/client/_nuxt/code-snippets.vue-i2momvvn.js +0 -1
- package/dist/client/_nuxt/components-hke3x7rv.js +0 -1
- package/dist/client/_nuxt/composable-item.vue-bd0qe28q.js +0 -1
- package/dist/client/_nuxt/custom-_name_-vk6sxnjq.js +0 -1
- package/dist/client/_nuxt/data-schema-button.vue-hwc5uuo4.js +0 -1
- package/dist/client/_nuxt/data-schema-drawer-l8t0dpro.js +0 -2
- package/dist/client/_nuxt/debug-kzd6td4c.js +0 -1
- package/dist/client/_nuxt/default-hdlt6j4k.js +0 -1
- package/dist/client/_nuxt/duration-display.vue-juecltgn.js +0 -1
- package/dist/client/_nuxt/entry.css-bgro2w4m.css +0 -1
- package/dist/client/_nuxt/error-404-i1es9hcq.js +0 -1
- package/dist/client/_nuxt/error-404.css-nxlugf5l.css +0 -1
- package/dist/client/_nuxt/error-500-du8psod2.js +0 -1
- package/dist/client/_nuxt/error-500.css-bcokcrit.css +0 -1
- package/dist/client/_nuxt/filepath-item.vue-e693vfym.js +0 -1
- package/dist/client/_nuxt/full-duvrk1v3.js +0 -1
- package/dist/client/_nuxt/help-fab.vue-le7iybnb.js +0 -1
- package/dist/client/_nuxt/hooks-jnw6sgbe.js +0 -1
- package/dist/client/_nuxt/imports-n9gtts3r.js +0 -1
- package/dist/client/_nuxt/index-ltaw282l.js +0 -1
- package/dist/client/_nuxt/launch-page.vue-mubr1qiq.js +0 -1
- package/dist/client/_nuxt/modules-oshl858b.js +0 -1
- package/dist/client/_nuxt/nbadge-hbh0pw7g.js +0 -1
- package/dist/client/_nuxt/ncheckbox.vue-cowm3nmm.js +0 -1
- package/dist/client/_nuxt/ncode-block.vue-nph7f5ph.js +0 -2
- package/dist/client/_nuxt/ndrawer.vue-bscihm5p.js +0 -1
- package/dist/client/_nuxt/ndropdown.vue-mt2skirs.js +0 -1
- package/dist/client/_nuxt/nicon-title.vue-l5va2e26.js +0 -1
- package/dist/client/_nuxt/nlink.vue-gjku6j2r.js +0 -1
- package/dist/client/_nuxt/nmarkdown.vue-ho3nn7tc.js +0 -1
- package/dist/client/_nuxt/nnavbar.vue-fe2vbqhk.js +0 -1
- package/dist/client/_nuxt/none-b6qt2l9k.js +0 -1
- package/dist/client/_nuxt/nsection-block-b1meb1ma.js +0 -1
- package/dist/client/_nuxt/nsection-block.css-h1lgpwgm.css +0 -1
- package/dist/client/_nuxt/nselect-tabs.vue-hb4dua1x.js +0 -1
- package/dist/client/_nuxt/nselect.vue-j457efs9.js +0 -1
- package/dist/client/_nuxt/nswitch.vue-m7rzt1v6.js +0 -1
- package/dist/client/_nuxt/open-graph-h1bmv712.js +0 -3
- package/dist/client/_nuxt/pages-egvz386w.js +0 -1
- package/dist/client/_nuxt/payload-be770vb8.js +0 -1
- package/dist/client/_nuxt/pinia-brl9kc3p.js +0 -1
- package/dist/client/_nuxt/plugins-bgfzay6d.js +0 -1
- package/dist/client/_nuxt/render-tree-npycwzn4.js +0 -1
- package/dist/client/_nuxt/runtime-configs-fbrk7nq8.js +0 -1
- package/dist/client/_nuxt/server-route-inputs.vue-m4ax1l4d.js +0 -1
- package/dist/client/_nuxt/server-routes-koaspj0k.js +0 -9
- package/dist/client/_nuxt/server-tasks-2v7pcdmy.js +0 -1
- package/dist/client/_nuxt/settings-ob6p57bq.js +0 -1
- package/dist/client/_nuxt/stacktrace-list.vue-nfhbrir6.js +0 -1
- package/dist/client/_nuxt/state-editor.vue-byiz4hoi.js +0 -1
- package/dist/client/_nuxt/state-modules-c2rs6wdq.js +0 -1
- package/dist/client/_nuxt/storage-fgzv4lrj.js +0 -1
- package/dist/client/_nuxt/terminals-fj33nfal.js +0 -1
- package/dist/client/_nuxt/timeline-f04w3haj.js +0 -31
- package/dist/client/_nuxt/vendor/json-editor-vue-gd4lkf0o.js +0 -3902
- package/dist/client/_nuxt/vendor/json-editor-vue.css-mqq5uooj.css +0 -1
- package/dist/client/_nuxt/vendor/unocss.css-mhvipxpl.css +0 -1
- package/dist/client/_nuxt/vendor/xterm.css-egmhki83.css +0 -32
- package/dist/client/_nuxt/virtual-files-lrvn9h52.js +0 -1
- package/dist/client/_nuxt/vue-devtools-m76pi1vn.js +0 -2
- /package/dist/client/_nuxt/vendor/{xterm-elw8536o.js → xterm-nmc0lagr.js} +0 -0
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nuxt/devtools",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "3.0.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",
|
|
@@ -36,18 +36,18 @@
|
|
|
36
36
|
"vite": ">=6.0"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@nuxt/kit": "^
|
|
39
|
+
"@nuxt/kit": "^4.2.0",
|
|
40
40
|
"@vue/devtools-core": "^7.7.7",
|
|
41
41
|
"@vue/devtools-kit": "^7.7.7",
|
|
42
|
-
"birpc": "^2.
|
|
42
|
+
"birpc": "^2.6.1",
|
|
43
43
|
"consola": "^3.4.2",
|
|
44
44
|
"destr": "^2.0.5",
|
|
45
45
|
"error-stack-parser-es": "^1.0.5",
|
|
46
46
|
"execa": "^8.0.1",
|
|
47
|
-
"fast-npm-meta": "^0.4.
|
|
47
|
+
"fast-npm-meta": "^0.4.7",
|
|
48
48
|
"get-port-please": "^3.2.0",
|
|
49
49
|
"hookable": "^5.5.3",
|
|
50
|
-
"image-meta": "^0.2.
|
|
50
|
+
"image-meta": "^0.2.2",
|
|
51
51
|
"is-installed-globally": "^1.0.0",
|
|
52
52
|
"launch-editor": "^2.11.1",
|
|
53
53
|
"local-pkg": "^1.1.2",
|
|
@@ -57,40 +57,40 @@
|
|
|
57
57
|
"pathe": "^2.0.3",
|
|
58
58
|
"perfect-debounce": "^1.0.0",
|
|
59
59
|
"pkg-types": "^2.3.0",
|
|
60
|
-
"semver": "^7.7.
|
|
60
|
+
"semver": "^7.7.3",
|
|
61
61
|
"simple-git": "^3.28.0",
|
|
62
62
|
"sirv": "^3.0.2",
|
|
63
63
|
"structured-clone-es": "^1.0.0",
|
|
64
64
|
"tinyglobby": "^0.2.15",
|
|
65
65
|
"vite-plugin-inspect": "^11.3.3",
|
|
66
|
-
"vite-plugin-vue-tracer": "^1.0.
|
|
66
|
+
"vite-plugin-vue-tracer": "^1.0.1",
|
|
67
67
|
"which": "^5.0.0",
|
|
68
68
|
"ws": "^8.18.3",
|
|
69
|
-
"@nuxt/devtools-kit": "
|
|
70
|
-
"@nuxt/devtools-wizard": "
|
|
69
|
+
"@nuxt/devtools-kit": "3.0.0-beta.1",
|
|
70
|
+
"@nuxt/devtools-wizard": "3.0.0-beta.1"
|
|
71
71
|
},
|
|
72
72
|
"devDependencies": {
|
|
73
|
-
"@antfu/utils": "^9.
|
|
73
|
+
"@antfu/utils": "^9.3.0",
|
|
74
74
|
"@discoveryjs/cli": "^2.14.6",
|
|
75
75
|
"@discoveryjs/discovery": "1.0.0-beta.92",
|
|
76
76
|
"@iconify-json/bxl": "^1.2.2",
|
|
77
|
-
"@iconify-json/carbon": "^1.2.
|
|
77
|
+
"@iconify-json/carbon": "^1.2.14",
|
|
78
78
|
"@iconify-json/logos": "^1.2.9",
|
|
79
79
|
"@iconify-json/ph": "^1.2.2",
|
|
80
|
-
"@iconify-json/ri": "^1.2.
|
|
81
|
-
"@iconify-json/simple-icons": "^1.2.
|
|
80
|
+
"@iconify-json/ri": "^1.2.6",
|
|
81
|
+
"@iconify-json/simple-icons": "^1.2.55",
|
|
82
82
|
"@iconify-json/tabler": "^1.2.23",
|
|
83
|
-
"@nuxt/test-utils": "^3.
|
|
83
|
+
"@nuxt/test-utils": "^3.20.1",
|
|
84
84
|
"@parcel/watcher": "^2.5.1",
|
|
85
85
|
"@types/markdown-it-link-attributes": "^3.0.5",
|
|
86
|
-
"@unhead/schema": "^2.0.
|
|
87
|
-
"@unocss/nuxt": "^66.5.
|
|
88
|
-
"@unocss/preset-icons": "^66.5.
|
|
89
|
-
"@unocss/preset-uno": "^66.5.
|
|
90
|
-
"@unocss/runtime": "^66.5.
|
|
91
|
-
"@vitest/ui": "^
|
|
86
|
+
"@unhead/schema": "^2.0.19",
|
|
87
|
+
"@unocss/nuxt": "^66.5.4",
|
|
88
|
+
"@unocss/preset-icons": "^66.5.4",
|
|
89
|
+
"@unocss/preset-uno": "^66.5.4",
|
|
90
|
+
"@unocss/runtime": "^66.5.4",
|
|
91
|
+
"@vitest/ui": "^4.0.3",
|
|
92
92
|
"@vue/devtools-applet": "^7.7.7",
|
|
93
|
-
"@vueuse/nuxt": "^
|
|
93
|
+
"@vueuse/nuxt": "^14.0.0",
|
|
94
94
|
"@xterm/addon-fit": "^0.10.0",
|
|
95
95
|
"@xterm/xterm": "^5.5.0",
|
|
96
96
|
"cronstrue": "^2.61.0",
|
|
@@ -98,29 +98,29 @@
|
|
|
98
98
|
"floating-vue": "^5.2.2",
|
|
99
99
|
"fuse.js": "^7.1.0",
|
|
100
100
|
"json-editor-vue": "^0.18.1",
|
|
101
|
-
"lightningcss": "^1.30.
|
|
101
|
+
"lightningcss": "^1.30.2",
|
|
102
102
|
"markdown-it": "^14.1.0",
|
|
103
103
|
"markdown-it-link-attributes": "^4.0.1",
|
|
104
104
|
"my-ua-parser": "^2.0.4",
|
|
105
|
-
"nitropack": "^2.12.
|
|
106
|
-
"nuxt": "^
|
|
105
|
+
"nitropack": "^2.12.8",
|
|
106
|
+
"nuxt": "^4.2.0",
|
|
107
107
|
"ofetch": "^1.4.1",
|
|
108
108
|
"quicktype-core": "22.0.0",
|
|
109
109
|
"scule": "^1.3.0",
|
|
110
|
-
"shiki": "^3.
|
|
111
|
-
"shiki-codegen": "^3.
|
|
110
|
+
"shiki": "^3.14.0",
|
|
111
|
+
"shiki-codegen": "^3.14.0",
|
|
112
112
|
"theme-vitesse": "^1.0.0",
|
|
113
|
-
"tsx": "^4.20.
|
|
114
|
-
"unimport": "^5.
|
|
115
|
-
"unocss": "^66.5.
|
|
116
|
-
"unplugin-vue": "^7.0.
|
|
117
|
-
"unplugin-vue-markdown": "^29.
|
|
118
|
-
"vanilla-jsoneditor": "^3.
|
|
113
|
+
"tsx": "^4.20.6",
|
|
114
|
+
"unimport": "^5.5.0",
|
|
115
|
+
"unocss": "^66.5.4",
|
|
116
|
+
"unplugin-vue": "^7.0.3",
|
|
117
|
+
"unplugin-vue-markdown": "^29.2.0",
|
|
118
|
+
"vanilla-jsoneditor": "^3.10.0",
|
|
119
119
|
"vis-data": "^8.0.3",
|
|
120
120
|
"vis-network": "^10.0.2",
|
|
121
|
-
"vue-tsc": "^3.
|
|
121
|
+
"vue-tsc": "^3.1.2",
|
|
122
122
|
"vue-virtual-scroller": "^2.0.0-beta.8",
|
|
123
|
-
"@nuxt/devtools": "
|
|
123
|
+
"@nuxt/devtools": "3.0.0-beta.1"
|
|
124
124
|
},
|
|
125
125
|
"scripts": {
|
|
126
126
|
"build": "pnpm dev:prepare && pnpm build:module && pnpm build:discovery && pnpm build:client",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{p as e,J as n,$ as t}from"./vendor/json-editor-vue-gd4lkf0o.js";const c={"h-screen":"","w-screen":"","bg-black":""},r=e({__name:"__blank",setup(o){return(s,_)=>(t(),n("div",c))}});export{r as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b6 as X,b7 as j,_ as P,r as V,E as R,b8 as Y,a6 as h,a7 as ee,Z as ne,a1 as te,j as le,b9 as k,a8 as ie,Q as oe,v as re,q as ue,aj as se,M as ae}from"#entry";import{_ as de}from"./filepath-item.vue-e693vfym.js";import{p as U,q as S,k as F,J as u,$ as i,a0 as e,a1 as g,F as p,ag as L,X as d,a8 as v,u as b,V as a,ab as f,ac as D,ad as I,a4 as E,U as B}from"./vendor/json-editor-vue-gd4lkf0o.js";import{_ as me}from"./ncode-block.vue-nph7f5ph.js";import{_ as pe}from"./ncheckbox.vue-cowm3nmm.js";import{_ as ve}from"./help-fab.vue-le7iybnb.js";import"./vendor/shiki-jxvjmls6.js";import"./vendor/unocss-n80di6md.js";import"./client-kvgyopwa.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=`${X().app.baseURL.replace(ge,"/")}/__nuxt_devtools__/analyze/`.replace(/\/+/g,"/"),y=S(()=>{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 V.clearAnalyzeBuilds(await R(),[l])}return(l,n)=>{const A=de,C=P;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(j)(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)])]),_: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":""},Re=U({__name:"analyze-build",setup(N){const c=se(),_=Y(),w=h(),y=ee("analyze-build:slug",""),o=S(()=>_.value?.builds.find(r=>r.slug===y.value)??_.value?.builds[0]),$=F(!1),m=F(""),T=S(()=>_.value?.builds.some(r=>r.name===m.value.trim()));async function l(){m.value=await V.generateAnalyzeBuildName(),await c.start()&&(ae("analyze-build:start"),k.value={name:m.value,processId:await V.startAnalyzeBuild(await R(),m.value)},$.value&&C())}const n=ne();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 te(()=>[{id:"action:analyze-build: start",title:"Start a new analyze build",icon:"i-carbon-edge-node",action:l}]),(r,t)=>{const z=P,G=_e,q=le,M=ie,O=re,Z=ue,H=me,J=pe,K=oe,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",p3:"","hover:bg-active":"",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(j)(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)])]),_: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)])]),_: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(Z,{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)])]),_: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(H,{code:`npx nuxi analyze --no-serve --name=${m.value}`,lang:"bash",px4:"",py2:"",border:"~ base rounded",lines:!1},null,8,["code"]),d(J,{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)])]),_:1},8,["modelValue"]),e("div",Te,[d(z,{onClick:x=>s(!1)},{default:a(()=>[...t[11]||(t[11]=[f(" Cancel ",-1)])]),_:1},8,["onClick"]),d(z,{n:"solid primary",onClick:x=>s(!0)},{default:a(()=>[...t[12]||(t[12]=[f(" Start ",-1)])]),_:1},8,["onClick"])])])]),_:2},1032,["onClose"])]),_:1}),d(W,null,{default:a(()=>[d(Q)]),_:1})],64)}}});export{Re as default};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import{G as Z,H as ee,_ as te,I as ne,J as R,K as ce,L as pe,M as me,r as W,E as X,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"#entry";import{_ as Ve}from"./ncheckbox.vue-cowm3nmm.js";import{_ as Pe}from"./ndropdown.vue-mt2skirs.js";import{_ as Ae}from"./nnavbar.vue-fe2vbqhk.js";import{p as J,k as T,ai as oe,J as i,$ as o,a4 as H,u as m,ac as K,X as d,a0 as t,ab as D,F as z,ag as G,U as V,a1 as U,V as h,q as S,a2 as ae,a8 as N,W as De,j as Ne,at as Fe,a3 as Ue}from"./vendor/json-editor-vue-gd4lkf0o.js";import{_ as Se}from"./nsection-block-b1meb1ma.js";import{_ as Ie}from"./filepath-item.vue-e693vfym.js";import{_ as Te}from"./code-snippets.vue-i2momvvn.js";import{_ as je}from"./ndrawer.vue-bscihm5p.js";import{D as Ee}from"./constants-b32h69zq.js";import"./vendor/shiki-jxvjmls6.js";import"./vendor/unocss-n80di6md.js";import"./nicon-title.vue-l5va2e26.js";import"./ncode-block.vue-nph7f5ph.js";import"./client-kvgyopwa.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=J({__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 W.writeStaticAssets(await X(),[...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 Z("dragenter",v),Z("dragleave",b),Z("dragover",j),Z("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:H(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))]),_:1})):U("",!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))]),_: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 ",-1))]),t("input",{id:"drop-zone-input",type:"file",multiple:"",hidden:"",onChange:c[0]||(c[0]=y=>x(y.target.files))},null,32)]))],2)}}}),Je=J({__name:"AssetFontPreview",props:{asset:{}},setup(L){const l=L,f=S(()=>`devtools-assets-${ve(l.asset)}`);return fe(S(()=>`
|
|
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))}}),We={flex:"","items-center":"","justify-center":"","of-hidden":"","bg-active":"","object-cover":"",p1:""},Xe=["src"],Ze={key:2,"i-carbon-document":"","text-3xl":"",op20:""},He={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=J({__name:"AssetPreview",props:{asset:{},textContent:{},detail:{type:Boolean}},setup(L){return(l,f)=>{const C=Je;return o(),i("div",We,[l.asset.type==="image"?(o(),i("img",{key:0,src:l.asset.publicPath},null,8,Xe)):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",Ze)):l.asset.type==="text"&&l.textContent?(o(),i("div",He,[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=J({__name:"AssetGridItem",props:{asset:{},folder:{}},setup(L){const l=L,f=S(()=>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":""})):U("",!0),d(b,{"h-30":"","w-30":"",rounded:"",border:"~ base",asset:C.asset},null,8,["asset"]),t("div",at,N(f.value),1)])}}}),re=J({__name:"AssetListItem",props:{item:{},index:{default:0},modelValue:{}},setup(L,{emit:l}){const f=L,n=ee(f,"modelValue",l,{passive:!0}),v=S(()=>f.item?.children?.length),b=T(!0),j=S(()=>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:H({"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:H(j.value)},null,2),t("span",{class:H({"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":""})):U("",!0)],2),v.value?(o(),V(E,{key:0,icon:"carbon:chevron-right","transform-rotate":b.value?90:0,transition:""},null,8,["transform-rotate"])):U("",!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))]):U("",!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=J({__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 W.getImageMeta(await X(),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 W.getTextAssetContent(await X(),n.value.filePath);return j.value=a,a});async function E(){if(x.value!==j.value)try{await W.writeStaticAssets(await X(),[{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=S(()=>(q.value?._installedModules||[]).some(e=>e.meta?.name==="@nuxt/image"||e.meta?.name==="@nuxt/image-edge"||e.meta?.name==="@nuxt/image-nightly")),w=S(()=>{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=S(()=>{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=S(()=>{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}`:""}),_=S(()=>["image","text","video","audio","font"].includes(n.value.type)),u=T(!1);async function A(){try{await W.deleteStaticAsset(await X(),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 W.renameStaticAsset(await X(),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)):U("",!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)])):U("",!0)],64)):U("",!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)])]),_: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)])]),_:1})):U("",!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)])]),_: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)])]),_: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"])):U("",!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)])]),_:1}),d(F,{icon:"carbon-delete",n:"red",onClick:A},{default:h(()=>[...e[29]||(e[29]=[D(" Delete ",-1)])]),_: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)])]),_:1}),d(F,{icon:"carbon-text-annotation-toggle",n:"blue",onClick:M},{default:h(()=>[...e[32]||(e[32]=[D(" Rename ",-1)])]),_: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:Ue(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)])]),_:1}),d(F,{icon:"carbon:save",n:"primary",onClick:E},{default:h(()=>[...e[34]||(e[34]=[D(" save ",-1)])]),_:1})])])]),_:1},8,["modelValue"])):U("",!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},Ut={"mt--4":"",px2:"",grid:"~ cols-minmax-8rem"},St={key:1,p2:"",grid:"~ cols-minmax-8rem"},It={key:1},Zt=J({__name:"assets",setup(L){const l=_e(),f=T(!1),C=T(""),n=S(()=>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=S(()=>(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=S(()=>{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=S(()=>{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=Se,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})):U("",!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)):U("",!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",Ut,[(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",St,[(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"])):U("",!0)]),_:1},8,["model-value","top"])])}}});export{Zt as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"id":"50d38183-21be-4c6a-b93c-9aad9dacb71b","timestamp":1758391374888,"matcher":{"static":{},"wildcard":{},"dynamic":{}},"prerendered":[]}
|