@nuxt/devtools 0.8.5 → 1.0.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (119) hide show
  1. package/README.md +1 -5
  2. package/dist/chunks/module-main.mjs +54 -26
  3. package/dist/chunks/vscode.mjs +11 -11
  4. package/dist/client/200.html +17 -17
  5. package/dist/client/404.html +17 -17
  6. package/dist/client/_nuxt/{CodeDiff.vue.0e58df1f.js → CodeDiff.vue.3beaa134.js} +1 -1
  7. package/dist/client/_nuxt/{ComposableItem.vue.e263b9a9.js → ComposableItem.vue.136c5104.js} +1 -1
  8. package/dist/client/_nuxt/DataSchemaButton.vue.125423b7.js +1 -0
  9. package/dist/client/_nuxt/{DataSchemaDrawer.6de1f238.js → DataSchemaDrawer.8ac6b677.js} +2 -2
  10. package/dist/client/_nuxt/{DurationDisplay.vue.8da73fd3.js → DurationDisplay.vue.c49b4e64.js} +1 -1
  11. package/dist/client/_nuxt/{FilepathItem.vue.7bd675c6.js → FilepathItem.vue.5af0b5df.js} +1 -1
  12. package/dist/client/_nuxt/HelpFab.vue.98c902f4.js +1 -0
  13. package/dist/client/_nuxt/LaunchPage.vue.805f9595.js +1 -0
  14. package/dist/client/_nuxt/NBadge.98d5d309.js +1 -0
  15. package/dist/client/_nuxt/{NCheckbox.vue.fcd1d971.js → NCheckbox.vue.6fb2ece1.js} +1 -1
  16. package/dist/client/_nuxt/{NCodeBlock.vue.84865d5b.js → NCodeBlock.vue.adf1e9b4.js} +2 -2
  17. package/dist/client/_nuxt/NDrawer.vue.8e620517.js +1 -0
  18. package/dist/client/_nuxt/{NDropdown.vue.d756d40c.js → NDropdown.vue.b2f7aaef.js} +1 -1
  19. package/dist/client/_nuxt/{NIconTitle.vue.b6d28480.js → NIconTitle.vue.bf8093eb.js} +1 -1
  20. package/dist/client/_nuxt/NLink.vue.0e98999b.js +1 -0
  21. package/dist/client/_nuxt/{NMarkdown.vue.d2063d22.js → NMarkdown.vue.b0e8b2fc.js} +1 -1
  22. package/dist/client/_nuxt/{NSectionBlock.42a3cefc.js → NSectionBlock.4347cc14.js} +1 -1
  23. package/dist/client/_nuxt/NSelect.vue.4c22d30e.js +1 -0
  24. package/dist/client/_nuxt/{NSelectTabs.vue.4a83d611.js → NSelectTabs.vue.c9be0aa2.js} +1 -1
  25. package/dist/client/_nuxt/{NSwitch.vue.21018268.js → NSwitch.vue.de333089.js} +1 -1
  26. package/dist/client/_nuxt/{NTip.vue.d193bf96.js → NTip.vue.770a171a.js} +1 -1
  27. package/dist/client/_nuxt/{Navbar.vue.bacddf14.js → Navbar.vue.371e4d0a.js} +1 -1
  28. package/dist/client/_nuxt/StateEditor.vue.332bb451.js +1 -0
  29. package/dist/client/_nuxt/analyze-build.281c50c1.js +1 -0
  30. package/dist/client/_nuxt/assets.ca8faf7a.js +16 -0
  31. package/dist/client/_nuxt/{client.d926285a.js → client.3f2665f1.js} +1 -1
  32. package/dist/client/_nuxt/{components.fc36eeef.js → components.a8900a78.js} +26 -26
  33. package/dist/client/_nuxt/custom-_name_.c49c72a2.js +1 -0
  34. package/dist/client/_nuxt/{default.c4c43b40.js → default.3ba7d10b.js} +1 -1
  35. package/dist/client/_nuxt/entry.1c0836ed.css +1 -0
  36. package/dist/client/_nuxt/entry.e01776ec.js +27 -0
  37. package/dist/client/_nuxt/{error-404.087131b3.js → error-404.9d2aaad9.js} +1 -1
  38. package/dist/client/_nuxt/{error-500.d1c41037.js → error-500.20d1b3ce.js} +1 -1
  39. package/dist/client/_nuxt/{full.478da439.js → full.6d0fd7cf.js} +1 -1
  40. package/dist/client/_nuxt/hooks.908144b2.js +1 -0
  41. package/dist/client/_nuxt/{imports.79d88ab3.js → imports.d7bd415a.js} +1 -1
  42. package/dist/client/_nuxt/{index.5e3c6999.js → index.a0a2f0b3.js} +1 -1
  43. package/dist/client/_nuxt/index.eb95211d.js +1 -0
  44. package/dist/client/_nuxt/{json-editor-vue.ce96762e.js → json-editor-vue.b22bf91c.js} +1 -1
  45. package/dist/client/_nuxt/{middleware.87876377.js → middleware.9e4b2529.js} +1 -1
  46. package/dist/client/_nuxt/modules.fd214f26.js +2 -0
  47. package/dist/client/_nuxt/{none.cfaeed76.js → none.27bf71df.js} +1 -1
  48. package/dist/client/_nuxt/open-graph.b95ebacd.js +3 -0
  49. package/dist/client/_nuxt/overview.4991be1e.js +1 -0
  50. package/dist/client/_nuxt/pages.708b9e25.js +1 -0
  51. package/dist/client/_nuxt/payload.eaf10e21.js +1 -0
  52. package/dist/client/_nuxt/plugins.f02b2c56.js +1 -0
  53. package/dist/client/_nuxt/{runtime-configs.bf4f2459.js → runtime-configs.63235af8.js} +1 -1
  54. package/dist/client/_nuxt/server-routes.88eebd4c.js +9 -0
  55. package/dist/client/_nuxt/settings.7dbb31cf.js +1 -0
  56. package/dist/client/_nuxt/{state-components.c2201640.js → state-components.ca4a58b1.js} +1 -1
  57. package/dist/client/_nuxt/state-modules.6d6b039c.js +1 -0
  58. package/dist/client/_nuxt/storage-options.ab028b2a.js +1 -0
  59. package/dist/client/_nuxt/storage.27117a31.js +1 -0
  60. package/dist/client/_nuxt/{terminals.a1c82952.js → terminals.cdead889.js} +3 -3
  61. package/dist/client/_nuxt/timeline.ddc61557.js +29 -0
  62. package/dist/client/_nuxt/{unocss-runtime.dedd4a37.js → unocss-runtime.ddd835d7.js} +2 -2
  63. package/dist/client/_nuxt/virtual-files.9da3562d.js +1 -0
  64. package/dist/client/index.html +17 -17
  65. package/dist/client/modules/analyze-build/index.html +17 -17
  66. package/dist/client/modules/assets/index.html +17 -17
  67. package/dist/client/modules/components/index.html +17 -17
  68. package/dist/client/modules/hooks/index.html +17 -17
  69. package/dist/client/modules/imports/index.html +17 -17
  70. package/dist/client/modules/middleware/index.html +17 -17
  71. package/dist/client/modules/modules/index.html +17 -17
  72. package/dist/client/modules/open-graph/index.html +17 -17
  73. package/dist/client/modules/overview/index.html +17 -17
  74. package/dist/client/modules/pages/index.html +17 -17
  75. package/dist/client/modules/payload/index.html +17 -17
  76. package/dist/client/modules/plugins/index.html +17 -17
  77. package/dist/client/modules/runtime-configs/index.html +17 -17
  78. package/dist/client/modules/server-routes/index.html +17 -17
  79. package/dist/client/modules/storage/index.html +17 -17
  80. package/dist/client/modules/terminals/index.html +17 -17
  81. package/dist/client/modules/timeline/index.html +17 -17
  82. package/dist/client/modules/virtual-files/index.html +17 -17
  83. package/dist/client/settings/index.html +17 -17
  84. package/dist/module.json +1 -1
  85. package/dist/module.mjs +1 -1
  86. package/dist/runtime/plugins/view/Main.vue +39 -10
  87. package/dist/runtime/plugins/view/client.mjs +2 -1
  88. package/dist/runtime/settings.d.ts +4 -0
  89. package/dist/runtime/settings.mjs +2 -0
  90. package/dist/shared/{devtools.18eefaee.mjs → devtools.c28fc9a7.mjs} +3 -1
  91. package/package.json +16 -18
  92. package/dist/client/_nuxt/Badge.15b76164.js +0 -1
  93. package/dist/client/_nuxt/DataSchemaButton.vue.41ad6158.js +0 -1
  94. package/dist/client/_nuxt/DrawerRight.vue.5bde5a0b.js +0 -1
  95. package/dist/client/_nuxt/HelpFab.vue.f082102a.js +0 -1
  96. package/dist/client/_nuxt/LaunchPage.vue.f8df9e2a.js +0 -1
  97. package/dist/client/_nuxt/NLink.vue.e0a3a39a.js +0 -1
  98. package/dist/client/_nuxt/NSelect.vue.e3495019.js +0 -1
  99. package/dist/client/_nuxt/StateEditor.vue.5fea57d7.js +0 -1
  100. package/dist/client/_nuxt/analyze-build.7513704d.js +0 -1
  101. package/dist/client/_nuxt/assets.35017b46.js +0 -16
  102. package/dist/client/_nuxt/custom-_name_.50e8c68f.js +0 -1
  103. package/dist/client/_nuxt/entry.38bf3bdf.css +0 -1
  104. package/dist/client/_nuxt/entry.54b63325.js +0 -27
  105. package/dist/client/_nuxt/hooks.d9e8fd29.js +0 -1
  106. package/dist/client/_nuxt/index.86b1fd88.js +0 -1
  107. package/dist/client/_nuxt/modules.caf682af.js +0 -2
  108. package/dist/client/_nuxt/open-graph.cd0bdf97.js +0 -3
  109. package/dist/client/_nuxt/overview.14a73720.js +0 -1
  110. package/dist/client/_nuxt/pages.746eb038.js +0 -1
  111. package/dist/client/_nuxt/payload.913d1fd8.js +0 -1
  112. package/dist/client/_nuxt/plugins.5342d060.js +0 -1
  113. package/dist/client/_nuxt/server-routes.8c094c9d.js +0 -9
  114. package/dist/client/_nuxt/settings.59f50baa.js +0 -1
  115. package/dist/client/_nuxt/state-modules.8816f603.js +0 -1
  116. package/dist/client/_nuxt/storage-options.b1a5fc25.js +0 -1
  117. package/dist/client/_nuxt/storage.713a7e46.js +0 -1
  118. package/dist/client/_nuxt/timeline.9cfa88d9.js +0 -29
  119. package/dist/client/_nuxt/virtual-files.7dc060d0.js +0 -1
@@ -33,6 +33,7 @@ const defaultTabOptions = {
33
33
  interactionCloseOnOutsideClick: false,
34
34
  showExperimentalFeatures: false,
35
35
  showHelpButtons: true,
36
+ showPanel: null,
36
37
  scale: 1,
37
38
  minimizePanelInactive: 5e3,
38
39
  hiddenTabs: [],
@@ -48,7 +49,8 @@ const defaultTabOptions = {
48
49
  query: [],
49
50
  body: [],
50
51
  headers: []
51
- }
52
+ },
53
+ sendFrom: "app"
52
54
  },
53
55
  assets: {
54
56
  view: "grid"
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@nuxt/devtools",
3
3
  "type": "module",
4
- "version": "0.8.5",
4
+ "version": "1.0.0-beta.0",
5
5
  "license": "MIT",
6
6
  "repository": "nuxt/devtools",
7
7
  "exports": {
@@ -25,12 +25,12 @@
25
25
  "dist"
26
26
  ],
27
27
  "peerDependencies": {
28
- "nuxt": "^3.7.3",
28
+ "nuxt": "^3.7.4",
29
29
  "vite": "*"
30
30
  },
31
31
  "dependencies": {
32
32
  "@antfu/utils": "^0.7.6",
33
- "@nuxt/kit": "^3.7.3",
33
+ "@nuxt/kit": "^3.7.4",
34
34
  "birpc": "^0.2.14",
35
35
  "consola": "^3.2.3",
36
36
  "error-stack-parser-es": "^0.1.1",
@@ -55,33 +55,32 @@
55
55
  "pkg-types": "^1.0.3",
56
56
  "rc9": "^2.1.1",
57
57
  "semver": "^7.5.4",
58
- "simple-git": "^3.19.1",
58
+ "simple-git": "^3.20.0",
59
59
  "sirv": "^2.0.3",
60
60
  "unimport": "^3.3.0",
61
61
  "vite-plugin-inspect": "^0.7.38",
62
62
  "vite-plugin-vue-inspector": "^3.7.1",
63
- "wait-on": "^7.0.1",
64
63
  "which": "^3.0.1",
65
64
  "ws": "^8.14.2",
66
- "@nuxt/devtools-wizard": "0.8.5",
67
- "@nuxt/devtools-kit": "0.8.5"
65
+ "@nuxt/devtools-kit": "1.0.0-beta.0",
66
+ "@nuxt/devtools-wizard": "1.0.0-beta.0"
68
67
  },
69
68
  "devDependencies": {
70
69
  "@iconify-json/bxl": "^1.1.7",
71
70
  "@iconify-json/carbon": "^1.1.21",
72
71
  "@iconify-json/logos": "^1.1.37",
73
72
  "@iconify-json/ri": "^1.1.12",
74
- "@iconify-json/simple-icons": "^1.1.71",
75
- "@iconify-json/tabler": "^1.1.91",
73
+ "@iconify-json/simple-icons": "^1.1.72",
74
+ "@iconify-json/tabler": "^1.1.92",
76
75
  "@nuxt/content": "^2.8.2",
77
76
  "@nuxtjs/color-mode": "^3.3.0",
78
77
  "@parcel/watcher": "^2.3.0",
79
78
  "@types/markdown-it-link-attributes": "^3.0.1",
80
79
  "@types/ua-parser-js": "^0.7.37",
81
- "@unocss/nuxt": "^0.56.0",
82
- "@unocss/preset-icons": "^0.56.0",
83
- "@unocss/preset-uno": "^0.56.0",
84
- "@unocss/runtime": "^0.56.0",
80
+ "@unocss/nuxt": "^0.56.2",
81
+ "@unocss/preset-icons": "^0.56.2",
82
+ "@unocss/preset-uno": "^0.56.2",
83
+ "@unocss/runtime": "^0.56.2",
85
84
  "@vueuse/nuxt": "^10.4.1",
86
85
  "esno": "^0.17.0",
87
86
  "floating-vue": "2.0.0-beta.24",
@@ -90,23 +89,22 @@
90
89
  "markdown-it": "^13.0.1",
91
90
  "markdown-it-link-attributes": "^4.0.1",
92
91
  "nanoid": "^5.0.1",
93
- "nuxt": "^3.7.3",
92
+ "nuxt": "^3.7.4",
94
93
  "nuxt-vitest": "^0.10.5",
95
94
  "quicktype-core": "^23.0.75",
96
95
  "shikiji": "^0.6.8",
97
- "splitpanes": "^3.1.5",
98
96
  "theme-vitesse": "^0.7.3",
99
97
  "ua-parser-js": "^1.0.36",
100
- "unocss": "^0.56.0",
98
+ "unocss": "^0.56.2",
101
99
  "unplugin-vue-markdown": "^0.24.3",
102
100
  "vanilla-jsoneditor": "^0.18.4",
103
101
  "vis-data": "^7.1.7",
104
102
  "vis-network": "^9.1.6",
105
- "vue-tsc": "^1.8.11",
103
+ "vue-tsc": "^1.8.14",
106
104
  "vue-virtual-scroller": "2.0.0-beta.8",
107
105
  "xterm": "^5.3.0",
108
106
  "xterm-addon-fit": "^0.8.0",
109
- "@nuxt/devtools": "0.8.5"
107
+ "@nuxt/devtools": "1.0.0-beta.0"
110
108
  },
111
109
  "scripts": {
112
110
  "build": "pnpm dev:prepare && pnpm build:module && pnpm build:client && esno scripts/prepare.ts",
@@ -1 +0,0 @@
1
- import{q as n,o,m as s,a6 as t}from"./entry.54b63325.js";const c={},r={class:"mx-0.5 select-none whitespace-nowrap rounded px-1.5 py-0.5 text-xs"};function a(e,_){return o(),s("span",r,[t(e.$slots,"default")])}const l=n(c,[["render",a]]);export{l as _};
@@ -1 +0,0 @@
1
- import{d as c,u as s,aa as r,I as i,o as p,h as _,_ as u}from"./entry.54b63325.js";const h=c({__name:"DataSchemaButton",props:{getter:{type:Function}},setup(m){const t=s();return(n,e)=>{const o=u,a=r("tooltip");return i((p(),_(o,{title:"Generate Data Schema",icon:"carbon:container-services",onClick:e[0]||(e[0]=l=>t.value=n.getter())},null,512)),[[a,"Generate Data Schema"]])}}});export{h as _};
@@ -1 +0,0 @@
1
- import{d as c,r as u,bo as m,aQ as f,h as d,j as p,aP as _,o as s,m as b,i as v,k as g,a6 as h,aq as k,f as x,p as y,_ as B}from"./entry.54b63325.js";const C={relative:"","h-full":"","w-full":"","of-auto":""},V={inheritAttrs:!1},N=c({...V,__name:"DrawerRight",props:{modelValue:{type:Boolean},navbar:{},autoClose:{type:Boolean}},emits:["close"],setup(r,{emit:l}){const o=r,t=u(),{height:n}=m(()=>o.navbar,void 0,{box:"border-box"});return f(t,()=>{o.modelValue&&o.autoClose&&l("close")},{ignore:["a","button","summary",'[role="dialog"]']}),(e,a)=>{const i=B;return s(),d(_,{"enter-active-class":"duration-200 ease-in","enter-from-class":"transform translate-x-1/1","enter-to-class":"opacity-100","leave-active-class":"duration-200 ease-out","leave-from-class":"opacity-100","leave-to-class":"transform translate-x-1/1"},{default:p(()=>[e.modelValue?(s(),b("div",k({key:0,ref_key:"el",ref:t,border:"l base",flex:"~ col gap-1",absolute:"","bottom-0":"","right-0":"","z-10":"","z-20":"","of-auto":"","text-sm":"","glass-effect":"",style:{top:`${x(n)}px`}},e.$attrs),[v(i,{absolute:"","right-2":"","top-2":"","z-20":"","text-xl":"",icon:"carbon-close",onClick:a[0]||(a[0]=$=>e.$emit("close"))}),g("div",C,[h(e.$slots,"default")])],16)):y("",!0)]),_:3})}}});export{N as _};
@@ -1 +0,0 @@
1
- import{d as c,r as _,f as o,m as s,k as d,i as a,j as i,aP as u,F as m,p as n,o as l,a6 as v,ak as k,_ as g}from"./entry.54b63325.js";const h=d("div",{"i-ri:question-mark":""},null,-1),x=[h],y={key:0,border:"l base",class:"prose",pos:"fixed bottom-0 right-0 top-0","z-200":"","h-full":"","w-150":"","overflow-auto":"",px8:"",py4:"","bg-base":""},B=c({__name:"HelpFab",setup(w){const e=_(!1),{showHelpButtons:p}=k();return(b,t)=>{const f=g;return o(p)?(l(),s(m,{key:0},[d("button",{pos:"absolute bottom-5 right-5",border:"~ base rounded-full ",flex:"~ items-center justify-center","z-110":"","h-11":"","w-11":"","backdrop-blur-8":"",bg:"bg-base op50!","light:shadow":"",hover:"bg-active",title:"Help",onClick:t[0]||(t[0]=r=>e.value=!o(e))},x),a(u,{name:"fade-in"},{default:i(()=>[o(e)?(l(),s("div",{key:0,class:"fixed bottom-0 left-0 right-0 top-0 z-100","bg-black:20":"","backdrop-blur-2":"",onClick:t[1]||(t[1]=r=>e.value=!1)})):n("",!0)]),_:1}),a(u,{name:"slide-in"},{default:i(()=>[o(e)?(l(),s("div",y,[v(b.$slots,"default"),a(f,{icon:"carbon-close",pos:"absolute top-3 right-3","rounded-full":"","text-xl":"",onClick:t[2]||(t[2]=r=>e.value=!1)})])):n("",!0)]),_:3})],64)):n("",!0)}}});export{B as _};
@@ -1 +0,0 @@
1
- import{d as k,h as o,j as a,A as b,o as t,i as r,k as i,t as c,p as l,m as g,n as h,aq as N,v as w,F as x,bw as C,a1 as y,E as B,al as $}from"./entry.54b63325.js";import{_ as V}from"./NMarkdown.vue.d2063d22.js";const v={"text-xl":""},P={flex:"~ gap2 wrap"},T=k({__name:"LaunchPage",props:{icon:{},title:{},description:{},actions:{}},emits:["action"],setup(E){return(e,F)=>{const _=C,m=V,p=y,d=B,u=$,f=b;return t(),o(f,null,{default:a(()=>[r(u,{flex:"~ col gap2",mxa:"","min-w-100":"","items-center":"",p6:""},{default:a(()=>[r(_,{mb2:"","text-5xl":"",icon:e.icon||e.icon,title:e.title},null,8,["icon","title"]),i("h1",v,c(e.title),1),e.description?(t(),o(m,{key:0,mb2:"","mt--1":"","text-center":"","text-base":"",op50:"",markdown:e.description},null,8,["markdown"])):l("",!0),i("div",P,[(t(!0),g(x,null,h(e.actions,(n,s)=>(t(),o(d,N({key:s,n:"solid primary",disabled:n.pending,to:n.src,target:n.src?"_blank":void 0},n.attrs,{onClick:()=>{n.handle?.(),e.$emit("action",s)}}),{default:a(()=>[n.pending?(t(),o(p,{key:0,icon:"carbon-circle-dash","animate-spin":""})):l("",!0),w(" "+c(n.label),1)]),_:2},1040,["disabled","to","target","onClick"]))),128))])]),_:1})]),_:1})}}});export{T as _};
@@ -1 +0,0 @@
1
- import{d as n,o as a,h as o,j as s,a6 as r,aq as t,as as p,f as i,x as l}from"./entry.54b63325.js";const c=n({__name:"NLink",props:{to:{},href:{},target:{}},setup(_){return(e,f)=>(a(),o(p(e.href||e.target?"a":i(l)),t(e.$props,{class:"n-link n-transition hover:n-link-hover n-link-base"}),{default:s(()=>[r(e.$slots,"default")]),_:3},16))}});export{c as _};
@@ -1 +0,0 @@
1
- import{d as u,a5 as p,o as s,m as l,a6 as t,h as f,p as n,I as m,bE as b,f as h,k as _,t as v,l as k,a1 as V}from"./entry.54b63325.js";const y={class:"n-select flex flex items-center border n-border-base rounded px-2 py-1 focus-within:n-focus-base focus-within:border-context n-bg-base"},B=["disabled"],w={key:0,value:"",disabled:"",hidden:""},g=u({__name:"NSelect",props:{modelValue:{default:void 0},placeholder:{default:""},icon:{default:""},disabled:{type:Boolean,default:!1}},setup(d,{emit:i}){const o=p(d,"modelValue",i,{passive:!0});return(e,a)=>{const r=V;return s(),l("div",y,[t(e.$slots,"icon",{},()=>[e.icon?(s(),f(r,{key:0,icon:e.icon,class:"mr-0.4em text-1.1em op50"},null,8,["icon"])):n("",!0)]),m(_("select",{"onUpdate:modelValue":a[0]||(a[0]=c=>k(o)?o.value=c:null),disabled:e.disabled,class:"w-full flex-auto n-bg-base !outline-none"},[e.placeholder?(s(),l("option",w,v(e.placeholder),1)):n("",!0),t(e.$slots,"default")],8,B),[[b,h(o)]])])}}});export{g as _};
@@ -1 +0,0 @@
1
- import{d as V,a5 as B,ag as _,r as w,b6 as O,ba as C,aa as $,o as i,m as p,k as u,G as c,f as a,t as J,p as l,a6 as R,aR as D,aS as P,F as j,I as z,i as F,h as v,aq as G,bb as M,l as U,av as A,_ as E}from"./entry.54b63325.js";import{_ as I}from"./DataSchemaButton.vue.41ad6158.js";import{U as q}from"./json-editor-vue.ce96762e.js";const T=["open"],Y={flex:"~ gap2","select-none":"","items-center":"",px4:""},Q=V({__name:"StateEditor",props:{name:{},open:{type:Boolean},state:{},readonly:{type:Boolean}},emits:["update:open"],setup(b,{emit:g}){const s=b,n=B(s,"open",g,{passive:!0}),k=_(),o=w(),d=O(s.name,"$9Gvv2FGyYa");s.state?o.value=JSON.parse(JSON.stringify(s.state)):(typeof s.state=="number"||typeof s.state!="string")&&(o.value=s.state);const m=C(o,e=>{typeof e!="number"&&typeof e!="string"?f(e,s.state):d.value=e},{deep:!0});function f(e,r){for(const t in e)e[t]===null?r[t]=null:Array.isArray(e[t])?r[t]=e[t].slice():typeof e[t]=="object"?f(e[t],r[t]):r[t]=e[t]}async function S(){m.pause(),o.value=JSON.parse(JSON.stringify(s.state)),await A(),m.resume()}return(e,r)=>{const t=E,h=I,N=$("tooltip");return i(),p("div",{class:"state-editor-details",open:e.name?a(n):!0},[u("div",Y,[e.name?(i(),p("button",{key:0,flex:"~","cursor-pointer":"","items-center":"",class:c(a(n)?"":"op50"),onClick:r[0]||(r[0]=y=>n.value=!a(n))},[u("div",{"i-carbon-chevron-right":"",transition:"",class:c(a(n)?"rotate-90 op0":"")},null,2),u("code",{px3:"",py1:"","font-mono":"",class:c(a(n)?"bg-[#8881] rounded-t":"rounded hover:bg-active")},J(e.name),3)],2)):l("",!0),R(e.$slots,"actions",D(P({isOpen:a(n),name:e.name,state:a(d)}))),a(n)?(i(),p(j,{key:1},[z(F(t,{title:"Refresh View",icon:"carbon-renew",onClick:S},null,512),[[N,"Refresh View",void 0,{bottom:!0}]]),a(o)?(i(),v(h,{key:0,getter:()=>({name:e.name,input:JSON.stringify(a(o))})},null,8,["getter"])):l("",!0)],64)):l("",!0)]),a(n)||!e.name?(i(),v(a(q),G({key:0,modelValue:a(o),"onUpdate:modelValue":r[1]||(r[1]=y=>U(o)?o.value=y:null)},e.$attrs,{class:["json-editor-vue",[a(k).value==="dark"?"jse-theme-dark":"",(e.name,"")]],"main-menu-bar":!1,"navigation-bar":!1,"status-bar":!1,"read-only":"readonly"in e?e.readonly:a(M),indentation:2,"tab-size":2}),null,16,["modelValue","class","read-only"])):l("",!0)],8,T)}}});export{Q as _};
@@ -1 +0,0 @@
1
- import{d as j,a as V,r as F,o,m as i,k as e,F as c,n as E,G as S,f as n,t as m,p as b,H as G,i as r,j as a,v as _,I as A,J as D,K as P,L,E as U,M as X,N as ee,O as te,P as ne,Q as oe,R as le,S as ie,U as k,h as w,l as R,V as se,W as ae,A as re}from"./entry.54b63325.js";import{_ as ue}from"./FilepathItem.vue.7bd675c6.js";import{_ as de}from"./NTip.vue.d193bf96.js";import{_ as ce}from"./NCodeBlock.vue.84865d5b.js";import{_ as me}from"./NCheckbox.vue.fcd1d971.js";import{_ as _e}from"./HelpFab.vue.f082102a.js";import"./client.d926285a.js";const pe={"h-full":"",grid:"~ rows-[max-content_1fr]"},fe={flex:"~ wrap","w-full":""},ve=["onClick"],he=e("div",{border:"b base","flex-auto":""},null,-1),ye={key:0,flex:"~ col gap-4 items-center justify-center",p4:""},be=e("div",{"flex-auto":""},null,-1),$e={grid:"~ cols-[30px_1fr] gap-x-2 gap-y-3 items-center justify-center","w-100":""},xe=e("div",{"i-carbon-commit":"","text-xl":""},null,-1),ge=e("div",{"text-sm":"",op50:""}," Name ",-1),we=e("div",{"i-carbon-time":"","text-xl":""},null,-1),ze=e("div",{"text-sm":"",op50:""}," Build duration ",-1),Be=e("div",{"i-carbon-cics-program":"","text-xl":""},null,-1),ke=e("div",{"text-sm":"",op50:""}," Client bundle size ",-1),Ce=e("div",{"i-carbon-bare-metal-server":"","text-xl":""},null,-1),Ne=e("div",{"text-sm":"",op50:""}," Nitro bundle size ",-1),Te=e("div",{"i-carbon-edge-node":"","text-xl":""},null,-1),Ae=e("div",{"text-sm":"",op50:""}," Built ",-1),De=e("div",{"i-carbon:folder-parent":"","text-xl":""},null,-1),Ie=e("div",{"text-sm":"",op50:""}," Report Path ",-1),Ve=e("div",{"flex-auto":""},null,-1),I="/__nuxt_devtools__/analyze/",Fe=j({__name:"BuildAnalyzeDetails",props:{current:{},prev:{}},setup(C){const p=C,f=V(()=>{const t=[{name:"Overview",id:"overview"}];return p.current.features.bundleClient&&t.push({name:"Client Bundle",id:"bundle-client"}),p.current.features.bundleNitro&&t.push({name:"Nitro Bundle",id:"bundle-nitro"}),p.current.features.viteInspect&&t.push({name:"Vite Inspect",id:"vite-inspect"}),t}),l=F(f.value[0]);function $(t){return t<1024?`${t}B`:t<1024*1024?`${(t/1024).toFixed(1)}KB`:t<1024*1024*1024?`${(t/1024/1024).toFixed(1)}MB`:`${(t/1024/1024/1024).toFixed(1)}GB`}function g(t){return`${((t.endTime-t.startTime)/1e3).toFixed(1)}s`}async function x(t){return P.clearAnalyzeBuilds(await L(),[t])}return(t,u)=>{const z=ue,N=U;return o(),i("div",pe,[e("div",fe,[(o(!0),i(c,null,E(n(f),(v,T)=>(o(),i("button",{key:T,px4:"",py2:"",border:"r base",hover:"bg-active",class:S(v.id===n(l).id?"":"border-b"),onClick:d=>l.value=v},[e("div",{class:S(v.id===n(l).id?"":"op30")},m(v.name),3)],10,ve))),128)),he]),n(l).id==="overview"?(o(),i("div",ye,[be,e("div",$e,[xe,e("div",null,[ge,e("div",null,m(t.current.name),1)]),we,e("div",null,[ze,e("div",null,m(g(t.current)),1)]),t.current.size?.clientBundle?(o(),i(c,{key:0},[Be,e("div",null,[ke,e("div",null,m($(t.current.size.clientBundle)),1)])],64)):b("",!0),t.current.size.nitroBundle?(o(),i(c,{key:1},[Ce,e("div",null,[Ne,e("div",null,m($(t.current.size.nitroBundle)),1)])],64)):b("",!0),Te,e("div",null,[Ae,e("div",null,m(n(G)(new Date(t.current.endTime))),1)]),De,e("div",null,[Ie,r(z,{filepath:t.current.analyzeDir},null,8,["filepath"])])]),Ve,r(N,{n:"rose",icon:"carbon-delete",onClick:u[0]||(u[0]=v=>x(t.current.name))},{default:a(()=>[_(" Delete this report ")]),_:1})])):b("",!0),u._lazyshow1||n(l).id==="bundle-client"?(u._lazyshow1=!0,o(),i(c,null,[A(e("iframe",{src:`${I}${t.current.slug}/client.html`,"h-full":"","w-full":""},null,8,["src"]),[[D,n(l).id==="bundle-client"]])],64)):b("v-show-if",!0),u._lazyshow2||n(l).id==="bundle-nitro"?(u._lazyshow2=!0,o(),i(c,null,[A(e("iframe",{src:`${I}${t.current.slug}/nitro.html`,"h-full":"","w-full":""},null,8,["src"]),[[D,n(l).id==="bundle-nitro"]])],64)):b("v-show-if",!0),u._lazyshow3||n(l).id==="vite-inspect"?(u._lazyshow3=!0,o(),i(c,null,[A(e("iframe",{src:`${I}${t.current.slug}/.vite-inspect/`,"h-full":"","w-full":""},null,8,["src"]),[[D,n(l).id==="vite-inspect"]])],64)):b("v-show-if",!0)])}}}),Se={class:"markdown-body"},Pe=e("h1",null,"Build Analyze",-1),Re=e("p",null,[_("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"),_(" and present the output data directly in DevTools for easy browsing and comparing.")],-1),je=[Pe,Re],Ee={__name:"analyze-build",setup(C,{expose:p}){return p({frontmatter:{}}),(l,$)=>(o(),i("div",Se,je))}},Ge={flex:"~ col"},Le=["onClick"],Ue={flex:"~ gap-1 items-center wrap","w-full":"","text-sm":"",op60:""},Oe=e("div",{"i-carbon-time":""},null,-1),He=e("div",{"flex-auto":""},null,-1),Ke=e("div",{"x-divider":""},null,-1),Me={flex:"~ items-center justify-center wrap",p4:""},We={flex:"~ col gap-1","w-250":"",p4:""},Je=e("h3",{class:"text-lg font-medium leading-6",mb2:""}," Start analyze build? ",-1),Qe=e("p",{op50:""}," Enter the name of the build: ",-1),Ye=e("div",{my3:"","x-divider":""},null,-1),Ze=e("p",{op50:""}," The following command will be executed in your terminal: ",-1),qe={flex:"~ gap-3",mt2:"","justify-end":""},st=j({__name:"analyze-build",setup(C){const p=X(),f=ee(),l=te(),$=ne("analyze-build:slug",""),g=V(()=>f.value?.builds.find(d=>d.slug===$.value)??f.value?.builds[0]),x=F(!1),t=F(""),u=V(()=>f.value?.builds.some(d=>d.name===t.value.trim()));async function z(){t.value=await P.generateAnalyzeBuildName(),await p.start()&&(k.value={name:t.value,processId:await P.startAnalyzeBuild(await L(),t.value)},x.value&&v())}const N=oe();function v(){k.value?.processId&&(N.value=k.value.processId,l.push("/modules/terminals"))}function T(d){return`${((d.endTime-d.startTime)/1e3).toFixed(1)}s`}return le(()=>[{id:"action:analyze-build: start",title:"Start a new analyze build",icon:"i-carbon-edge-node",action:z}]),(d,h)=>{const B=U,O=Fe,H=re,K=ie,M=se,W=de,J=ce,Q=me,Y=ae,Z=Ee,q=_e;return o(),i(c,null,[r(K,{"left-size":30},{left:a(()=>[e("div",Ge,[(o(!0),i(c,null,E(n(f)?.builds,s=>(o(),i(c,{key:s.slug},[e("button",{flex:"~ col gap1","hover:bg-active":"",p3:"",class:S(s.slug===n(g)?.slug?"text-primary bg-active":""),onClick:y=>$.value=s.slug},[e("code",null,m(s.name),1),e("div",Ue,[Oe,e("span",null,m(T(s)),1),He,e("span",null,m(n(G)(new Date(s.endTime))),1)])],10,Le),Ke],64))),128)),e("div",Me,[("processAnalyzeBuildInfo"in d?d.processAnalyzeBuildInfo:n(k))?(o(),w(B,{key:1,n:"primary",icon:"carbon-circle-dash animate-spin",onClick:h[1]||(h[1]=s=>v())},{default:a(()=>[_(" Building... ")]),_:1})):(o(),w(B,{key:0,n:"primary",icon:"carbon-edge-node",onClick:h[0]||(h[0]=s=>z())},{default:a(()=>[_(" Start a new build ")]),_:1}))])])]),right:a(()=>[n(g)?(o(),w(O,{key:0,current:n(g)},null,8,["current"])):(o(),w(H,{key:1}))]),_:1}),r(n(p),null,{default:a(({resolve:s})=>[r(Y,{"model-value":!0,onClose:y=>s(!1)},{default:a(()=>[e("div",We,[Je,Qe,r(M,{modelValue:n(t),"onUpdate:modelValue":h[2]||(h[2]=y=>R(t)?t.value=y:null),placeholder:"Build name"},null,8,["modelValue"]),n(u)?(o(),w(W,{key:0,"n-orange":""},{default:a(()=>[_(" A build with the same name already exists, continue would overrides the previous build result. ")]),_:1})):b("",!0),Ye,Ze,r(J,{code:`npx nuxi analyze --no-serve --name=${n(t)}`,lang:"bash",px4:"",py2:"",border:"~ base rounded",lines:!1},null,8,["code"]),r(Q,{modelValue:n(x),"onUpdate:modelValue":h[3]||(h[3]=y=>R(x)?x.value=y:null),mt2:"",n:"primary"},{default:a(()=>[_(" Navigate to terminal ")]),_:1},8,["modelValue"]),e("div",qe,[r(B,{onClick:y=>s(!1)},{default:a(()=>[_(" Cancel ")]),_:2},1032,["onClick"]),r(B,{n:"solid primary",onClick:y=>s(!0)},{default:a(()=>[_(" Start ")]),_:2},1032,["onClick"])])])]),_:2},1032,["onClose"])]),_:1}),r(q,null,{default:a(()=>[r(Z)]),_:1})],64)}}});export{st as default};
@@ -1,16 +0,0 @@
1
- import{d as X,r as I,X as q,o as s,m as c,i as d,f as t,k as e,v as k,F as B,n as Z,h as N,j as x,p as S,G as Y,Y as U,Z as me,a0 as fe,K as G,L as H,_ as te,a1 as oe,V as se,E as ae,a as A,a2 as ve,a3 as he,a4 as le,t as V,a5 as ie,a6 as _e,l as R,a7 as ge,b as ne,a8 as xe,e as be,a9 as we,aa as re,I as W,ab as ye,ac as $e,W as ke,ad as Ce,ae as Pe,af as Ae}from"./entry.54b63325.js";import{_ as De}from"./Navbar.vue.bacddf14.js";import{_ as Ve}from"./NSectionBlock.42a3cefc.js";import{_ as Ie}from"./FilepathItem.vue.7bd675c6.js";import{_ as Ne,u as Fe}from"./storage-options.b1a5fc25.js";import{_ as Se}from"./DrawerRight.vue.5bde5a0b.js";import{D as Te}from"./constants.4e5eba24.js";import"./NIconTitle.vue.b6d28480.js";import"./NCodeBlock.vue.84865d5b.js";import"./client.d926285a.js";const je={key:0,"h-full":"","w-full":"",flex:"","items-center":"","justify-center":""},Ee={for:"drop-zone-input","text-3xl":""},Ue={key:1,relative:"","h-full":"","w-full":"",grid:"~ rows-[max-content_1fr_max-content]"},Le=e("div",{px6:"",py6:""},[e("h1",{"text-2xl":""}," Upload "),e("p",{"text-sm":"",op50:""}," Drag and drop files to upload ")],-1),Be={grid:"~ cols-minmax-8rem","overflow-auto":"",p6:""},ze={flex:"","items-center":"","justify-center":"","of-hidden":"",rounded:"","rounded-t-lg":"","bg-active":"","object-cover":"",class:"aspect-1/1",border:"~ base"},Me=["src"],Oe={flex:"~ gap1","items-center":""},Re={flex:"~ gap-2","items-center":"","justify-center":"",p8:""},Ke=X({__name:"DropZone",props:{folder:{type:String,required:!0}},setup(T){const a=T,p=I(!1),n=I(),m=I([]),v=["image","video"];function D(i){n.value=i.target,p.value=!0}function u(i){i.target===n.value&&(p.value=!1)}function C(i){i.preventDefault()}function K(i){i.preventDefault(),L(i.dataTransfer.files)}function L(i){const g=Array.from(i||[]);if(g.length){const _=[],P=m.value.map(f=>f.name);for(const f of g)if(P.includes(f.name)){let r=1;const[y,l]=f.name.split(".");for(;P.includes(`${y} (${r}).${l}`);)r++;const o=`${y}-${r}.${l}`,M=new Blob([f],{type:f.type}),O=new File([M],o,{lastModified:Date.now()});_.push(O),P.push(o)}else f.type===""?U({message:"Folders are not supported yet",icon:"carbon:face-dissatisfied",classes:"text-orange"}):v.some(r=>f.type.includes(r))?_.push(f):U({message:`"${f.type}" file type is not allowed`,icon:"carbon:face-dissatisfied",classes:"text-orange"});m.value=[...m.value,..._]}}async function b(){if(me.value||fe.value)return;const i=[];for(const g of m.value){const _=new FileReader;_.readAsDataURL(g);const f=(await new Promise(r=>{_.onload=()=>r(_.result)})).split(";base64,").pop();i.push({path:g.name,encoding:"base64",content:f})}await G.writeStaticAssets(await H(),[...i],a.folder).then(()=>{j(),U({message:"Files uploaded successfully!",icon:"i-carbon:checkmark"})}).catch(g=>{console.error(g),j(),U({message:`Error uploading files: ${g}`,icon:"i-carbon-warning",classes:"text-red"})}),p.value=!1}function h(i){m.value?.splice(i,1)}function w(i){return URL.createObjectURL(i)}function z(i,g){const[_,P]=i.name.split("."),f=g.replace(/\.\w+$/,""),r=`${f}.${P}`;return f.length===0?(alert("File name must be at least 1 characters long"),_):(Object.defineProperty(i,"name",{value:r,writable:!1}),m.value.splice(m.value.indexOf(i),1,i),i)}function F(){m.value=[]}function j(){p.value=!1,F()}return q("dragenter",D),q("dragleave",u),q("dragover",C),q("drop",K),(i,g)=>{const _=te,P=oe,f=se,r=ae;return s(),c("div",{fixed:"","bottom-0":"","left-13":"","right-0":"","top-0":"","z-10":"","backdrop-blur-20":"","transition-all":"",class:Y(t(p)?"opacity-100 visible":"opacity-0 invisible")},[d(_,{icon:"carbon-close",absolute:"","right-5":"","top-5":"","z-20":"","text-xl":"",onClick:j}),t(m)?.length?(s(),c("div",Ue,[Le,e("div",Be,[(s(!0),c(B,null,Z(t(m),(y,l)=>(s(),c("div",{key:y.name,flex:"~ col gap-2",relative:"","h-50":"","w-40":"","items-center":""},[e("div",ze,[e("img",{"h-full":"","w-full":"","rounded-t-lg":"","object-cover":"",src:w(y)},null,8,Me)]),e("div",Oe,[d(f,{n:"xs","flex-auto":"","model-value":y.name,"onUpdate:modelValue":o=>z(y,o.target.value)},null,8,["model-value","onUpdate:modelValue"]),d(_,{icon:"carbon-delete","flex-none":"",title:"Remove file",onClick:o=>h(l)},null,8,["onClick"])])]))),128))]),e("div",Re,[t(m).length?(s(),N(r,{key:0,n:"red",onClick:F},{default:x(()=>[d(P,{icon:"carbon-clean"}),k(" Clear ")]),_:1})):S("",!0),d(r,{disabled:!t(m).length,n:"primary solid",onClick:b},{default:x(()=>[d(P,{icon:"carbon-cloud-upload"}),k(" Upload ")]),_:1},8,["disabled"])])])):(s(),c("div",je,[e("label",Ee,[d(P,{icon:"carbon-cloud-upload","mr-2":""}),k(" Drop files here or click to select ")]),e("input",{id:"drop-zone-input",type:"file",multiple:"",hidden:"",onChange:g[0]||(g[0]=y=>L(y.target.files))},null,32)]))],2)}}}),Xe=X({__name:"AssetFontPreview",props:{asset:{}},setup(T){const a=T,p=A(()=>`devtools-assets-${ve(a.asset)}`);return he(A(()=>`
2
- @font-face {
3
- font-family: '${p.value}';
4
- src: url('${a.asset.publicPath}');
5
- }
6
- `)),(n,m)=>(s(),c("div",{"of-hidden":"",style:le({fontFamily:`'${t(p)}'`})}," 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))}}),Ge={flex:"","items-center":"","justify-center":"","of-hidden":"","bg-active":"","object-cover":"",p1:""},Ze=["src"],We={key:2,"i-carbon-document":"","text-3xl":"",op20:""},qe={key:3,"w-full":"","self-start":"",p4:""},Ye=["textContent"],He={key:4},Je=["src","autoplay","controls"],Qe={key:5},et={key:0,"i-carbon-volume-up":"","text-3xl":"",op20:""},tt=["src"],nt={key:6,"i-carbon-help":"","text-3xl":"",op20:""},ce=X({__name:"AssetPreview",props:{asset:{},textContent:{},detail:{type:Boolean}},setup(T){return(a,p)=>{const n=Xe;return s(),c("div",Ge,[a.asset.type==="image"?(s(),c("img",{key:0,src:a.asset.publicPath},null,8,Ze)):a.asset.type==="font"?(s(),N(n,{key:a.asset.publicPath,asset:a.asset,"self-stretch":"",p2:"","text-2xl":""},null,8,["asset"])):a.asset.type==="text"&&!a.textContent?(s(),c("div",We)):a.asset.type==="text"&&a.textContent?(s(),c("div",qe,[e("pre",{"max-h-10rem":"","of-hidden":"","text-xs":"","font-mono":"",textContent:V(a.textContent)},null,8,Ye)])):a.asset.type==="video"?(s(),c("div",He,[e("video",{src:a.asset.publicPath,autoplay:a.detail,controls:a.detail},null,8,Je)])):a.asset.type==="audio"?(s(),c("div",Qe,[a.detail?(s(),c("audio",{key:1,src:a.asset.publicPath,controls:""},null,8,tt)):(s(),c("div",et))])):(s(),c("div",nt))])}}}),ot={flex:"~ col gap-1",hover:"bg-active","items-center":"","of-hidden":"",rounded:"",p2:""},st={"w-full":"","of-hidden":"",truncate:"","ws-nowrap":"","text-center":"","text-xs":""},at=X({__name:"AssetGridItem",props:{asset:{},folder:{}},setup(T){const a=T,p=A(()=>a.folder&&a.asset.path.startsWith(a.folder)?a.asset.path.slice(a.folder.length):a.asset.path);return(n,m)=>{const v=ce;return s(),c("button",ot,[d(v,{"h-30":"","w-30":"",rounded:"",border:"~ base",asset:n.asset},null,8,["asset"]),e("div",st,V(t(p)),1)])}}}),ue=X({__name:"AssetListItem",props:{item:{},index:{default:0},modelValue:{}},setup(T,{emit:a}){const p=T,n=ie(p,"modelValue",a,{passive:!0}),m=A(()=>p.item?.children?.length),v=I(!0),D=A(()=>m.value?"i-carbon-folder":p.item.type==="image"?"i-carbon-image":p.item.type==="video"?"i-carbon-video":p.item.type==="audio"?"i-carbon-volume-up":p.item.type==="font"?"i-carbon-text-small-caps":p.item.type==="text"?"i-carbon-document":p.item.type==="json"?"i-carbon-json":"i-carbon-document-blank");return(u,C)=>{const K=oe,L=ue;return s(),c("div",null,[e("button",{flex:"~ gap-2","w-full":"","items-center":"",hover:"bg-active",px4:"",py1:"",style:le({paddingLeft:`calc(1rem + ${u.index*1.5}em)`}),class:Y({"bg-active":!t(m)&&t(n)?.filePath===u.item?.filePath}),border:"b base",onClick:C[0]||(C[0]=b=>t(m)?v.value=!t(v):n.value=u.item)},[e("div",{class:Y(t(D))},null,2),e("span",{class:Y({"flex items-center":t(m)}),"flex-auto":"","text-start":"","text-sm":"","font-mono":""},V(u.item.path),3),t(m)?(s(),N(K,{key:0,icon:"carbon:chevron-right","transform-rotate":t(v)?90:0,transition:""},null,8,["transform-rotate"])):S("",!0)],6),t(v)?_e(u.$slots,"default",{key:0},()=>[(s(!0),c(B,null,Z(u.item?.children,b=>(s(),N(L,{key:b.filepath,modelValue:t(n),"onUpdate:modelValue":C[1]||(C[1]=h=>R(n)?n.value=h:null),item:b,index:u.index+1},null,8,["modelValue","item","index"]))),128))]):S("",!0)])}}}),lt={flex:"~ col gap-4","min-h-full":"","w-full":"","of-hidden":"",p4:""},it=e("div",{flex:"~ gap2","mb--2":"","items-center":"",op50:""},[e("div",{"x-divider":""}),e("div",{"flex-none":""}," Preview "),e("div",{"x-divider":""})],-1),rt={flex:"~","items-center":"","justify-center":""},ct=e("div",{flex:"~ gap2","mb--2":"","items-center":"",op50:""},[e("div",{"x-divider":""}),e("div",{"flex-none":""}," Details "),e("div",{"x-divider":""})],-1),ut={"max-w-full":"","w-full":"","table-fixed":""},dt=e("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," Filepath ",-1),pt={flex:"~ gap-1","w-full":"","items-center":""},mt=e("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," Public Path ",-1),ft={flex:"~ gap-1","w-full":"","items-center":"","of-hidden":""},vt={"flex-auto":"","of-hidden":"",truncate:"","ws-pre":"","font-mono":""},ht=e("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," Type ",-1),_t={capitalize:""},gt=e("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," Image Size ",-1),xt={key:0},bt=e("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," Aspect Ratio ",-1),wt=e("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," File size ",-1),yt=e("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," Last modified ",-1),$t={op70:""},kt=e("div",{flex:"~ gap2","mb--2":"","items-center":"",op50:""},[e("div",{"x-divider":""}),e("div",{"flex-none":""}," Actions "),e("div",{"x-divider":""})],-1),Ct={flex:"~ gap2 wrap"},Pt=e("div",{"flex-auto":""},null,-1),At={flex:"~ col gap-4","min-h-full":"","w-full":"","of-hidden":"",p8:""},Dt=e("span",null," Are you sure you want to delete this asset? ",-1),Vt={flex:"~ gap2 wrap justify-center"},It={flex:"~ col gap-4","min-h-full":"","w-full":"","of-hidden":"",p8:""},Nt={flex:"~ gap2 wrap justify-center"},Ft={flex:"~ col gap-4","min-h-full":"","w-full":"","of-hidden":"",p4:""},St=["onKeydown"],Tt={flex:"","justify-end":"","gap-4":""},jt=X({__name:"AssetDetails",props:{modelValue:{}},setup(T,{emit:a}){const n=ie(T,"modelValue",a,{passive:!0}),m=ge(),v=ne(()=>{if(n.value.type==="image")return G.getImageMeta(n.value.filePath)}),D=I(!1),u=I(),C=I(0),K=ne(async()=>{if(n.value.type!=="text")return;C.value;const l=await G.getTextAssetContent(n.value.filePath);return u.value=l,l});async function L(){if(K.value!==u.value)try{await G.writeStaticAssets(await H(),[{path:n.value.path,content:u.value,override:!0}],""),D.value=!1,C.value++,U({message:"Updated",icon:"i-carbon-checkmark",classes:"text-green"})}catch{U({message:"Something went wrong!",icon:"i-carbon-warning",classes:"text-red"})}}const b=xe(),h=A(()=>(b.value?._installedModules||[]).some(o=>o.meta?.name==="@nuxt/image"||o.meta?.name==="@nuxt/image-edge")),w=A(()=>{const l=[];if(n.value.type==="image"){const o=v.value?.width?`
7
- width="${v.value.width}"
8
- height="${v.value.height}" `:" ";return l.push({lang:"vue-html",code:`<img${o}
9
- src="${n.value.publicPath}"
10
- />`,name:"Plain Image"}),h.value&&l.push({lang:"vue-html",code:`<NuxtImg${o}
11
- src="${n.value.publicPath}"
12
- />`,name:"Nuxt Img",docs:"https://image.nuxt.com/usage/nuxt-img"},{lang:"vue-html",code:`<NuxtPicture${o}
13
- src="${n.value.publicPath}"
14
- />`,name:"Nuxt Picture",docs:"https://image.nuxt.com/usage/nuxt-picture"}),l}return l.push({lang:"html",code:`<a download href="${n.value.publicPath}">
15
- Download ${n.value.path.split("/").slice(-1)[0]}
16
- </a>`,name:"Download link"}),l}),z=be(),F=we(()=>n.value.mtime),j=A(()=>{const l=n.value.size;return l<1024?`${l} B`:l<1024*1024?`${(l/1024).toFixed(2)} KB`:`${(l/1024/1024).toFixed(2)} MB`}),i=A(()=>{if(!v.value?.width||!v.value?.height)return"";const l=(M,O)=>O?l(O,M%O):M,o=l(v.value.width,v.value.height);return o>3?`${v.value.width/o}:${v.value.height/o}`:""}),g=A(()=>["image","text","video","audio","font"].includes(n.value.type)),_=I(!1);async function P(){try{await G.deleteStaticAsset(await H(),n.value.filePath),n.value=void 0,_.value=!1,U({message:"Asset deleted",icon:"i-carbon-checkmark",classes:"text-green"})}catch{U({message:"Something went wrong!",icon:"i-carbon-warning",classes:"text-red"})}}const f=I(!1),r=I("");async function y(){const l=n.value.filePath.split("/"),o=l.slice(-1)[0].split(".").slice(0,-1).join(".");if(!r.value||r.value===o)return U({message:"Please enter a new name",icon:"i-carbon-warning",classes:"text-orange"});try{const M=l.slice(-1)[0].split(".").slice(-1)[0],O=`${l.slice(0,-1).join("/")}/${r.value}.${M}`;await G.renameStaticAsset(await H(),n.value.filePath,O),n.value=void 0,f.value=!1,U({message:"Asset renamed",icon:"i-carbon-checkmark",classes:"text-green"})}catch{U({message:"Something went wrong!",icon:"i-carbon-warning",classes:"text-red"})}}return(l,o)=>{const M=ce,O=Ie,J=te,E=ae,de=Ne,Q=ke,pe=se,ee=re("tooltip");return s(),c(B,null,[e("div",lt,[t(g)?(s(),c(B,{key:0},[it,e("div",rt,[d(M,{detail:"","max-h-80":"","min-h-20":"","min-w-20":"","w-auto":"",rounded:"",border:"~ base",asset:t(n),"text-content":t(K)},null,8,["asset","text-content"])])],64)):S("",!0),ct,e("table",ut,[e("tbody",null,[e("tr",null,[dt,e("td",null,[e("div",pt,[d(O,{filepath:t(n).filePath,"text-left":""},null,8,["filepath"]),W(d(J,{"flex-none":"",title:"Open in Editor",icon:"carbon-launch",onClick:o[0]||(o[0]=$=>t(m)(t(n).filePath))},null,512),[[ee,"Open in Editor"]])])])]),e("tr",null,[mt,e("td",null,[e("div",ft,[e("div",vt,V(t(n).publicPath),1),W(d(J,{"flex-none":"",title:"Copy public path",icon:"carbon-copy",onClick:o[1]||(o[1]=$=>t(z)(t(n).publicPath))},null,512),[[ee,"Copy public path"]]),W(d(J,{"flex-none":"",to:t(n).publicPath,icon:"carbon-launch",target:"_blank",title:"Open in browser"},null,8,["to"]),[[ee,"Open in browser"]])])])]),e("tr",null,[ht,e("td",_t,V(t(n).type),1)]),t(v)?.width?(s(),c(B,{key:0},[e("tr",null,[gt,e("td",null,V(t(v).width)+" x "+V(t(v).height),1)]),t(i)?(s(),c("tr",xt,[bt,e("td",null,V(t(i)),1)])):S("",!0)],64)):S("",!0),e("tr",null,[wt,e("td",null,V(t(j)),1)]),e("tr",null,[yt,e("td",null,[k(V(new Date(t(n).mtime).toLocaleString())+" ",1),e("span",$t,"("+V(t(F))+")",1)])])])]),kt,e("div",Ct,[d(E,{to:t(n).publicPath,download:"",target:"_blank",icon:"carbon-download",n:"green"},{default:x(()=>[k(" Download ")]),_:1},8,["to"]),t(n).type==="text"?(s(),N(E,{key:0,icon:"carbon-edit",n:"cyan",onClick:o[2]||(o[2]=$=>D.value=!t(D))},{default:x(()=>[k(" Edit ")]),_:1})):S("",!0),d(E,{icon:"carbon-text-annotation-toggle",n:"blue",onClick:o[3]||(o[3]=$=>f.value=!t(f))},{default:x(()=>[k(" Rename ")]),_:1}),d(E,{icon:"carbon-delete",n:"red",onClick:o[4]||(o[4]=$=>_.value=!t(_))},{default:x(()=>[k(" Delete ")]),_:1}),t(n).type==="image"?(s(),N(E,{key:1,disabled:"",icon:"carbon-image-service"},{default:x(()=>[k(" Optimize image (Coming soon) ")]),_:1})):S("",!0)]),Pt,t(w).length?(s(),N(de,{key:1,border:"t base","mx--4":"","mb--4":"","code-snippets":t(w)},null,8,["code-snippets"])):S("",!0)]),d(Q,{modelValue:t(_),"onUpdate:modelValue":o[6]||(o[6]=$=>R(_)?_.value=$:null)},{default:x(()=>[e("div",At,[Dt,e("div",Vt,[d(E,{icon:"carbon-close",onClick:o[5]||(o[5]=$=>_.value=!1)},{default:x(()=>[k(" Cancel ")]),_:1}),d(E,{icon:"carbon-delete",n:"red",onClick:P},{default:x(()=>[k(" Delete ")]),_:1})])])]),_:1},8,["modelValue"]),d(Q,{modelValue:t(f),"onUpdate:modelValue":o[9]||(o[9]=$=>R(f)?f.value=$:null)},{default:x(()=>[e("div",It,[d(pe,{modelValue:t(r),"onUpdate:modelValue":o[7]||(o[7]=$=>R(r)?r.value=$:null),placeholder:"New name",n:"blue"},null,8,["modelValue"]),e("div",Nt,[d(E,{icon:"carbon-close",onClick:o[8]||(o[8]=$=>f.value=!1)},{default:x(()=>[k(" Cancel ")]),_:1}),d(E,{icon:"carbon-text-annotation-toggle",n:"blue",onClick:y},{default:x(()=>[k(" Rename ")]),_:1})])])]),_:1},8,["modelValue"]),t(n).type==="text"?(s(),N(Q,{key:0,modelValue:t(D),"onUpdate:modelValue":o[12]||(o[12]=$=>R(D)?D.value=$:null)},{default:x(()=>[e("div",Ft,[W(e("textarea",{"onUpdate:modelValue":o[10]||(o[10]=$=>R(u)?u.value=$:null),placeholder:"Item value...",class:"h-lg w-xl of-auto rounded-lg p-4 text-sm font-mono outline-none",onKeydown:ye(L,["enter"])},null,40,St),[[$e,t(u)]]),e("div",Tt,[d(E,{icon:"carbon-close",onClick:o[11]||(o[11]=$=>D.value=!1)},{default:x(()=>[k(" Cancel ")]),_:1}),d(E,{icon:"carbon:save",n:"primary",onClick:L},{default:x(()=>[k(" save ")]),_:1})])])]),_:1},8,["modelValue"])):S("",!0)],64)}}}),Et={"h-full":"","of-auto":""},Ut={"flex-none":"",flex:"~ gap2 items-center"},Lt={op50:""},Bt={key:0},zt={"mt--4":"",px2:"",grid:"~ cols-minmax-8rem"},Mt={key:1,p2:"",grid:"~ cols-minmax-8rem"},Ot={key:1},Qt=X({__name:"assets",setup(T){const a=Ce(),p=I(""),n=A(()=>new Pe(a.value||[],{keys:["path"]})),m=A(()=>p.value?n.value.search(p.value).map(h=>h.item):a.value||[]),v=A(()=>{const b={};for(const h of m.value){const w=`${h.path.split("/").slice(0,-1).join("/")}/`;b[w]||(b[w]=[]),b[w].push(h)}return Object.entries(b).sort(([h],[w])=>h.localeCompare(w))}),D=A(()=>{const b={path:"public",children:[]},h=(w,z,F)=>{const[j,...i]=z;let g=w.children.find(_=>_.path===j);g||(g={...F,path:j,children:[]},w.children.push(g)),i.length>1?h(g,i,F):i.length===1&&g.children.push({...F,path:i[0]})};return m.value.forEach(w=>{const z=w.path.split("/").filter(F=>F!=="");h(b,z,w)}),b.children}),u=I(),{view:C}=Fe("assets");function K(){C.value=C.value==="list"?"grid":"list"}Ae("Escape",()=>{u.value=void 0});const L=I();return(b,h)=>{const w=te,z=De,F=Ke,j=at,i=Ve,g=ue,_=jt,P=Se,f=re("tooltip");return s(),c("div",Et,[d(z,{ref_key:"navbar",ref:L,search:t(p),"onUpdate:search":h[0]||(h[0]=r=>R(p)?p.value=r:null),pb2:""},{actions:x(()=>[e("div",Ut,[W(d(w,{"text-lg":"",icon:t(C)==="grid"?"i-carbon-list":"i-carbon-grid",title:"Toggle view",onClick:K},null,8,["icon"]),[[f,"Toggle View",void 0,{"bottom-end":!0}]])])]),default:x(()=>[e("div",Lt,[t(p)?(s(),c("span",Bt,V(t(m).length)+" matched · ",1)):S("",!0),e("span",null,V(t(a)?.length)+" assets in total",1)])]),_:1},8,["search"]),d(F,{folder:"/"}),t(C)==="grid"?(s(),c(B,{key:0},[t(v).length>1?(s(!0),c(B,{key:0},Z(t(v),([r,y])=>(s(),N(i,{key:r,text:r,description:`${y.length} items`,open:y.length<=("DETAILS_MAX_ITEMS"in b?b.DETAILS_MAX_ITEMS:t(Te)),padding:!1},{default:x(()=>[e("div",zt,[(s(!0),c(B,null,Z(y,l=>(s(),N(j,{key:l.path,asset:l,folder:r,onClick:o=>u.value=l},null,8,["asset","folder","onClick"]))),128))])]),_:2},1032,["text","description","open"]))),128)):(s(),c("div",Mt,[(s(!0),c(B,null,Z(t(m),r=>(s(),N(j,{key:r.path,asset:r,onClick:y=>u.value=r},null,8,["asset","onClick"]))),128))]))],64)):(s(),c("div",Ot,[(s(!0),c(B,null,Z(t(D),(r,y)=>(s(),N(g,{key:y,modelValue:t(u),"onUpdate:modelValue":h[1]||(h[1]=l=>R(u)?u.value=l:null),item:r},null,8,["modelValue","item"]))),128))])),d(P,{"model-value":!!t(u),"auto-close":"","w-120":"",navbar:t(L),onClose:h[3]||(h[3]=r=>u.value=void 0)},{default:x(()=>[t(u)?(s(),N(_,{key:0,modelValue:t(u),"onUpdate:modelValue":h[2]||(h[2]=r=>R(u)?u.value=r:null)},null,8,["modelValue"])):S("",!0)]),_:1},8,["model-value","navbar"])])}}});export{Qt as default};
@@ -1 +0,0 @@
1
- import{d as q,ag as N,r as A,a as x,at as V,au as $,aj as B,av as D,aw as y,ax as E,ay as I,m as M,o as s,az as L,O,aA as P,aB as C,K as T,f as a,h as c,j as b,p as W,as as F,F as R,A as S,k as u,v as w,t as j,i as U,al as z,aC as G}from"./entry.54b63325.js";import{_ as K}from"./LaunchPage.vue.f8df9e2a.js";import"./NMarkdown.vue.d2063d22.js";import"./client.d926285a.js";const g=new Map,X=q({__name:"IframeView",props:{tab:{}},setup(f){const m=f,r=N(),v=A(),i=x(()=>m.tab.name),e=A(),t=V($(v));B(()=>{const n=m.tab.view,l=n.persistent!==!1,h=["clipboard-write","clipboard-read"];if(g.get(i.value)&&l)e.value=g.get(i.value),e.value.style.visibility="visible";else{e.value=document.createElement("iframe"),e.value.setAttribute("allow",h.join("; ")),l&&g.set(i.value,e.value),e.value.src=n.src;try{e.value.style.opacity="0.01",e.value.onload=()=>{d(),o(),e.value.style.opacity="1"}}catch{e.value.style.opacity="1"}document.body.appendChild(e.value),D(_)}setTimeout(o,100)}),y(_),y(o),y(d),E(()=>{e.value&&(e.value.style.visibility="hidden")});function o(){if(!(!e.value||!e.value.contentWindow))try{const n=e.value.contentWindow.document.querySelector("html");n?.classList.toggle("dark",r.value==="dark"),n?.classList.toggle("light",r.value==="dark"),new MutationObserver(()=>{r.value=e.value?.contentWindow?.document.querySelector("html")?.classList.contains("dark")?"dark":"light"}).observe(n,{attributes:!0,attributeFilter:["class"]})}catch{}}const p=I();function d(){if(!(!e.value||!e.value.contentWindow))try{e.value.contentWindow.__NUXT_DEVTOOLS__=p.value}catch{}}function _(){e.value&&Object.assign(e.value.style,{position:"fixed",left:`${t.left}px`,top:`${t.top}px`,width:`${t.width}px`,height:`${t.height}px`,outline:"none"})}return(n,l)=>(s(),M("div",{ref_key:"anchor",ref:v,"h-full":"","w-full":""},null,512))}}),H={flex:"~ col gap2",mxa:"","items-center":""},J=u("div",{"i-carbon-queued":"",mb2:"","text-5xl":"",op50:""},null,-1),Q={"text-xl":""},Y={"text-rose":""},Z=u("p",{op50:""}," It might because the module contributing this tab is not installed or enabled ",-1),ee=u("p",{mt8:"","animate-pulse":""}," Redirecting to overview page... ",-1),se=q({__name:"custom-[name]",props:{name:{}},setup(f){const m=f,r=L(),v=O(),i=x(()=>m.name??r.params.name),e=P(),t=x(()=>e.value.find(o=>o.name===i.value));return B(()=>{t.value?t.value.requireAuth&&!C.value&&T.requestForAuth():setTimeout(()=>{t.value||v.push("/modules/overview")},2e3)}),(o,p)=>{const d=S,_=G,n=X,l=K,h=z;return s(),M(R,null,[a(t)?W("",!0):(s(),c(d,{key:0},{default:b(()=>[u("div",H,[J,u("p",Q,[w(" Tab "),u("code",Y,j(a(i)),1),w(" not found ")]),Z,ee])]),_:1})),a(t).requireAuth&&!("isDevAuthed"in o?o.isDevAuthed:a(C))?(s(),c(_,{key:1})):a(t).view.type==="iframe"?(s(),c(n,{key:2,tab:a(t)},null,8,["tab"])):a(t).view.type==="vnode"?(s(),c(F(a(t).view.vnode),{key:3})):a(t).view.type==="launch"?(s(),c(l,{key:4,icon:a(t).view.icon||a(t).icon,title:a(t).view.title||a(t).title,description:a(t).view.description,actions:a(t).view.actions,onAction:p[0]||(p[0]=k=>("rpc"in o?o.rpc:a(T)).customTabAction(a(t).name,k))},null,8,["icon","title","description","actions"])):(s(),c(d,{key:5},{default:b(()=>[U(h,{flex:"~ col","h-full":"","items-center":"","justify-center":""},{default:b(()=>[w(" Unknown tab type "+j(a(t).view),1)]),_:1})]),_:1}))],64)}}});export{se as default};