@nuxt/devtools 1.0.4 → 1.0.5

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 (92) hide show
  1. package/README.md +3 -6
  2. package/dist/chunks/module-main.mjs +2 -2
  3. package/dist/chunks/plugin-metrics.mjs +1 -1
  4. package/dist/chunks/vue-inspector.mjs +1 -1
  5. package/dist/client/200.html +21 -21
  6. package/dist/client/404.html +21 -21
  7. package/dist/client/_nuxt/{CodeDiff.vue.d8722166.js → CodeDiff.vue.470b870b.js} +1 -1
  8. package/dist/client/_nuxt/{ComposableItem.vue.a0062ecc.js → ComposableItem.vue.4be0b467.js} +1 -1
  9. package/dist/client/_nuxt/{DataSchemaButton.vue.baec9a00.js → DataSchemaButton.vue.7acec8bd.js} +1 -1
  10. package/dist/client/_nuxt/{DataSchemaDrawer.b2c7e5f0.js → DataSchemaDrawer.6f0305ae.js} +2 -2
  11. package/dist/client/_nuxt/{DurationDisplay.vue.75bf04c2.js → DurationDisplay.vue.d5eecd01.js} +1 -1
  12. package/dist/client/_nuxt/{FilepathItem.vue.7a091e26.js → FilepathItem.vue.0f604f99.js} +1 -1
  13. package/dist/client/_nuxt/{HelpFab.vue.07720a44.js → HelpFab.vue.308adf61.js} +1 -1
  14. package/dist/client/_nuxt/{LaunchPage.vue.51fc4c47.js → LaunchPage.vue.ffcbcacd.js} +1 -1
  15. package/dist/client/_nuxt/{NBadge.ce033599.js → NBadge.1af19adc.js} +1 -1
  16. package/dist/client/_nuxt/{NCheckbox.vue.0f5a8440.js → NCheckbox.vue.c0c515c4.js} +1 -1
  17. package/dist/client/_nuxt/NCodeBlock.a117b19b.css +1 -0
  18. package/dist/client/_nuxt/{NCodeBlock.vue.4697f7e4.js → NCodeBlock.vue.55894991.js} +1 -1
  19. package/dist/client/_nuxt/{NDrawer.vue.4b4bd813.js → NDrawer.vue.99f5580b.js} +1 -1
  20. package/dist/client/_nuxt/{NDropdown.vue.ddbb4404.js → NDropdown.vue.82a0f7a6.js} +1 -1
  21. package/dist/client/_nuxt/{NIconTitle.vue.8be5866f.js → NIconTitle.vue.a9777fd3.js} +1 -1
  22. package/dist/client/_nuxt/{NLink.vue.99516332.js → NLink.vue.090d2b6e.js} +1 -1
  23. package/dist/client/_nuxt/{NMarkdown.vue.d386a844.js → NMarkdown.vue.4a9638b7.js} +1 -1
  24. package/dist/client/_nuxt/{NNavbar.vue.a82b9c01.js → NNavbar.vue.329d273e.js} +1 -1
  25. package/dist/client/_nuxt/NSectionBlock.3af235cd.css +1 -0
  26. package/dist/client/_nuxt/NSectionBlock.bc36f09f.js +1 -0
  27. package/dist/client/_nuxt/{NSelect.vue.7cf27fe7.js → NSelect.vue.73b358c9.js} +1 -1
  28. package/dist/client/_nuxt/{NSelectTabs.vue.8f4924f6.js → NSelectTabs.vue.c879b497.js} +1 -1
  29. package/dist/client/_nuxt/{NSwitch.vue.6fd7c26d.js → NSwitch.vue.8e26c951.js} +1 -1
  30. package/dist/client/_nuxt/{StacktraceList.vue.a2e4171d.js → StacktraceList.vue.8012c829.js} +1 -1
  31. package/dist/client/_nuxt/{StateEditor.vue.777f604e.js → StateEditor.vue.de9e5fb0.js} +1 -1
  32. package/dist/client/_nuxt/{__blank.2e21a1a7.js → __blank.b424e04d.js} +1 -1
  33. package/dist/client/_nuxt/{analyze-build.371a5734.js → analyze-build.0a92832b.js} +1 -1
  34. package/dist/client/_nuxt/{assets.439f186c.js → assets.b1bb5a8b.js} +1 -1
  35. package/dist/client/_nuxt/builds/latest.json +1 -1
  36. package/dist/client/_nuxt/builds/meta/136dbdb0-d4da-4a06-b141-83ca2e534bfd.json +1 -0
  37. package/dist/client/_nuxt/{client.bd4053bc.js → client.5139b740.js} +1 -1
  38. package/dist/client/_nuxt/{components.ccf2fad3.js → components.ec2bc2e0.js} +27 -27
  39. package/dist/client/_nuxt/{custom-_name_.b0891a20.js → custom-_name_.22b5de51.js} +1 -1
  40. package/dist/client/_nuxt/{default.97700872.js → default.a830102b.js} +1 -1
  41. package/dist/client/_nuxt/entry.56a3d1dd.css +1 -0
  42. package/dist/client/_nuxt/entry.7025a867.js +27 -0
  43. package/dist/client/_nuxt/{error-404.576aef72.js → error-404.08d4b3ab.js} +1 -1
  44. package/dist/client/_nuxt/{error-500.61e43a5a.js → error-500.2884d8fb.js} +1 -1
  45. package/dist/client/_nuxt/{error.82c66fee.js → error.480298a9.js} +1 -1
  46. package/dist/client/_nuxt/{full.72d92407.js → full.7cf1e42e.js} +1 -1
  47. package/dist/client/_nuxt/{hooks.889b91ae.js → hooks.09b6efe0.js} +1 -1
  48. package/dist/client/_nuxt/{imports.8a1177ed.js → imports.9dbeba31.js} +1 -1
  49. package/dist/client/_nuxt/{index.0214b01d.js → index.3ee0584e.js} +1 -1
  50. package/dist/client/_nuxt/{index.11f08f78.js → index.cc851671.js} +1 -1
  51. package/dist/client/_nuxt/json-editor-vue.e51c968b.js +99 -0
  52. package/dist/client/_nuxt/{modules.0ea1264b.js → modules.451e38d7.js} +1 -1
  53. package/dist/client/_nuxt/{none.9d86a5c5.js → none.67be85f3.js} +1 -1
  54. package/dist/client/_nuxt/{open-graph.484b1a77.css → open-graph.058fa32c.css} +1 -1
  55. package/dist/client/_nuxt/{open-graph.ce924f19.js → open-graph.9eed2b01.js} +2 -2
  56. package/dist/client/_nuxt/{overview.811117a6.js → overview.d4940d4b.js} +1 -1
  57. package/dist/client/_nuxt/{pages.f870c402.js → pages.e7892d8a.js} +1 -1
  58. package/dist/client/_nuxt/{payload.ae9699f5.js → payload.734d0b5c.js} +1 -1
  59. package/dist/client/_nuxt/{plugins.a8eafa2c.js → plugins.4ae6abad.js} +1 -1
  60. package/dist/client/_nuxt/{runtime-configs.344cb73a.js → runtime-configs.be989942.js} +1 -1
  61. package/dist/client/_nuxt/{server-routes.d5948352.js → server-routes.e1a8e445.js} +2 -2
  62. package/dist/client/_nuxt/{settings.a887e1c0.js → settings.a91f8ddb.js} +1 -1
  63. package/dist/client/_nuxt/{state-components.295d8108.js → state-components.558caa8f.js} +1 -1
  64. package/dist/client/_nuxt/{state-modules.a1a00874.js → state-modules.59c565a3.js} +1 -1
  65. package/dist/client/_nuxt/{storage-options.835c9b2d.js → storage-options.1c93b6a2.js} +1 -1
  66. package/dist/client/_nuxt/{storage.d4c1d127.js → storage.d115f7c4.js} +1 -1
  67. package/dist/client/_nuxt/{terminals.3c6722c6.js → terminals.8201c148.js} +1 -1
  68. package/dist/client/_nuxt/timeline.58bc6682.css +1 -0
  69. package/dist/client/_nuxt/{timeline.cebcddc5.js → timeline.ca0d67c3.js} +5 -4
  70. package/dist/client/_nuxt/unocss-runtime.43e5d503.js +2 -0
  71. package/dist/client/_nuxt/vanilla-picker-NKbIFE8h.23409a58.js +8 -0
  72. package/dist/client/_nuxt/{virtual-files.33dacdaf.js → virtual-files.19e5fb95.js} +1 -1
  73. package/dist/client/_nuxt/vue-html.ded4875c.js +1 -0
  74. package/dist/client/_nuxt/vue.421a3560.js +5603 -0
  75. package/dist/client/index.html +21 -21
  76. package/dist/module.json +1 -1
  77. package/dist/runtime/auth/index.html +65 -50
  78. package/dist/runtime/plugins/view/FrameBox.vue +2 -2
  79. package/dist/runtime/plugins/view/Main.vue +7 -2
  80. package/dist/runtime/plugins/view/client.mjs +2 -0
  81. package/package.json +30 -30
  82. package/dist/client/_nuxt/NCodeBlock.6994516c.css +0 -1
  83. package/dist/client/_nuxt/NSectionBlock.0d0061ef.css +0 -1
  84. package/dist/client/_nuxt/NSectionBlock.1609c1ec.js +0 -1
  85. package/dist/client/_nuxt/builds/meta/f35e8543-749e-4b65-87f9-0ac9fa3dd3ab.json +0 -1
  86. package/dist/client/_nuxt/entry.2732f55b.css +0 -1
  87. package/dist/client/_nuxt/entry.35c58391.js +0 -27
  88. package/dist/client/_nuxt/json-editor-vue.24ac60a9.js +0 -129
  89. package/dist/client/_nuxt/timeline.1ad3a70f.css +0 -1
  90. package/dist/client/_nuxt/unocss-runtime.eab56c8d.js +0 -2
  91. package/dist/client/_nuxt/vue-html.88dda4a8.js +0 -1
  92. package/dist/client/_nuxt/vue.7ad3b25a.js +0 -1844
@@ -1 +1 @@
1
- import{d as i,a0 as c,o as r,m as u,I as h,bP as p,f as t,k as l,l as b,ae as m,aa as f}from"./entry.35c58391.js";const v=["checked","disabled"],k=["disabled"],w=l("div",{class:"n-switch-slider n-checked:n-switch-slider-checked peer-active:n-active-base peer-focus-visible:n-focus-base n-transition"},[l("div",{class:"n-checked:n-switch-thumb-checked n-switch-thumb n-transition"})],-1),V=i({__name:"NSwitch",props:{modelValue:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},setup(o,{emit:d}){const e=c(o,"modelValue",d,{passive:!0});return(a,s)=>(r(),u("label",{class:"n-switch n-switch-base hover:n-switch-hover n-disabled:n-disabled",checked:t(e)||null,disabled:a.disabled||null},[h(l("input",{"onUpdate:modelValue":s[0]||(s[0]=n=>b(e)?e.value=n:null),type:"checkbox",class:"peer absolute op0",disabled:a.disabled,onKeypress:s[1]||(s[1]=m(n=>e.value=!t(e),["enter"]))},null,40,k),[[p,t(e)]]),w,f(a.$slots,"default")],8,v))}});export{V as _};
1
+ import{d as i,a0 as c,o as r,m as u,I as h,bQ as p,f as t,k as l,l as b,ae as m,aa as f}from"./entry.7025a867.js";const v=["checked","disabled"],k=["disabled"],w=l("div",{class:"n-switch-slider n-checked:n-switch-slider-checked peer-active:n-active-base peer-focus-visible:n-focus-base n-transition"},[l("div",{class:"n-checked:n-switch-thumb-checked n-switch-thumb n-transition"})],-1),V=i({__name:"NSwitch",props:{modelValue:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},setup(o,{emit:d}){const e=c(o,"modelValue",d,{passive:!0});return(a,s)=>(r(),u("label",{class:"n-switch n-switch-base hover:n-switch-hover n-disabled:n-disabled",checked:t(e)||null,disabled:a.disabled||null},[h(l("input",{"onUpdate:modelValue":s[0]||(s[0]=n=>b(e)?e.value=n:null),type:"checkbox",class:"peer absolute op0",disabled:a.disabled,onKeypress:s[1]||(s[1]=m(n=>e.value=!t(e),["enter"]))},null,40,k),[[p,t(e)]]),w,f(a.$slots,"default")],8,v))}});export{V as _};
@@ -1 +1 @@
1
- import{_ as p}from"./FilepathItem.vue.7a091e26.js";import{d as m,ab as _,m as r,F as s,n as f,o as n,k as o,t as h,h as d,p as k}from"./entry.35c58391.js";const g={mt2:"",grid:"~ cols-[max-content_1fr] gap-x-4","font-mono":""},x={"text-right":""},N={"ws-nowrap":""},y=m({__name:"StacktraceList",props:{stacktrace:{}},setup($){const i=_();function c(a){try{let t=new URL(a).pathname;return t.startsWith("/_nuxt/")&&(t=t.slice(6)),t.startsWith("/@id/virtual:nuxt:")?`#build/${t.split("/.nuxt/")[1]}`.replace(/\.m?js$/,""):t.includes("/@fs/")?`/${t.split("/@fs/")[1]}`:(i.value?.rootDir||"")+t}catch{return a}}return(a,t)=>{const l=p;return n(),r("div",g,[(n(!0),r(s,null,f(a.stacktrace,(e,u)=>(n(),r(s,{key:u},[o("div",x,h(e.functionName||"(anonymous)"),1),o("div",N,[e.fileName?(n(),d(l,{key:0,filepath:`${c(e.fileName)}:${e.lineNumber}:${e.columnNumber}`,subpath:""},null,8,["filepath"])):k("",!0)])],64))),128))])}}});export{y as _};
1
+ import{_ as p}from"./FilepathItem.vue.0f604f99.js";import{d as m,ab as _,m as r,F as s,n as f,o as n,k as o,t as h,h as d,p as k}from"./entry.7025a867.js";const g={mt2:"",grid:"~ cols-[max-content_1fr] gap-x-4","font-mono":""},x={"text-right":""},N={"ws-nowrap":""},y=m({__name:"StacktraceList",props:{stacktrace:{}},setup($){const i=_();function c(a){try{let t=new URL(a).pathname;return t.startsWith("/_nuxt/")&&(t=t.slice(6)),t.startsWith("/@id/virtual:nuxt:")?`#build/${t.split("/.nuxt/")[1]}`.replace(/\.m?js$/,""):t.includes("/@fs/")?`/${t.split("/@fs/")[1]}`:(i.value?.rootDir||"")+t}catch{return a}}return(a,t)=>{const l=p;return n(),r("div",g,[(n(!0),r(s,null,f(a.stacktrace,(e,u)=>(n(),r(s,{key:u},[o("div",x,h(e.functionName||"(anonymous)"),1),o("div",N,[e.fileName?(n(),d(l,{key:0,filepath:`${c(e.fileName)}:${e.lineNumber}:${e.columnNumber}`,subpath:""},null,8,["filepath"])):k("",!0)])],64))),128))])}}});export{y as _};
@@ -1 +1 @@
1
- import{d as V,a0 as B,ak as _,r as w,bd as O,bk as C,a2 as $,o as i,m as p,k as u,G as c,f as t,t as J,p as l,aa as D,bh as P,bi as R,F as j,I as z,i as F,h as v,at as G,bl as M,l as A,ay as E,_ as I}from"./entry.35c58391.js";import{_ as T}from"./DataSchemaButton.vue.baec9a00.js";import{t as U}from"./json-editor-vue.24ac60a9.js";const Y=["open"],q={flex:"~ gap2","select-none":"","items-center":"",px4:""},W=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 a in e)e[a]===null?r[a]=null:Array.isArray(e[a])?r[a]=e[a].slice():typeof e[a]=="object"?f(e[a],r[a]):r[a]=e[a]}async function h(){m.pause(),o.value=JSON.parse(JSON.stringify(s.state)),await E(),m.resume()}return(e,r)=>{const a=I,S=T,N=$("tooltip");return i(),p("div",{class:"state-editor-details",open:e.name?t(n):!0},[u("div",q,[e.name?(i(),p("button",{key:0,flex:"~","cursor-pointer":"","items-center":"",class:c(t(n)?"":"op50"),onClick:r[0]||(r[0]=y=>n.value=!t(n))},[u("div",{"i-carbon-chevron-right":"",transition:"",class:c(t(n)?"rotate-90 op0":"")},null,2),u("code",{px3:"",py1:"","font-mono":"",class:c(t(n)?"bg-[#8881] rounded-t":"rounded hover:bg-active")},J(e.name),3)],2)):l("",!0),D(e.$slots,"actions",P(R({isOpen:t(n),name:e.name,state:t(d)}))),t(n)?(i(),p(j,{key:1},[z(F(a,{title:"Refresh View",icon:"carbon-renew",border:!1,onClick:h},null,512),[[N,"Refresh View",void 0,{bottom:!0}]]),t(o)?(i(),v(S,{key:0,getter:()=>({name:e.name,input:JSON.stringify(t(o))})},null,8,["getter"])):l("",!0)],64)):l("",!0)]),t(n)||!e.name?(i(),v(t(U),G({key:0,modelValue:t(o),"onUpdate:modelValue":r[1]||(r[1]=y=>A(o)?o.value=y:null)},e.$attrs,{class:["json-editor-vue",[t(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:t(M),indentation:2,"tab-size":2}),null,16,["modelValue","class","read-only"])):l("",!0)],8,Y)}}});export{W as _};
1
+ import{d as V,a0 as B,ak as _,r as w,bd as O,bk as C,a2 as $,o as i,m as p,k as u,G as c,f as t,t as J,p as l,aa as D,bh as P,bi as R,F as j,I as z,i as F,h as v,at as G,bl as M,l as q,ay as A,_ as E}from"./entry.7025a867.js";import{_ as I}from"./DataSchemaButton.vue.7acec8bd.js";import{q as T}from"./json-editor-vue.e51c968b.js";const U=["open"],Y={flex:"~ gap2","select-none":"","items-center":"",px4:""},W=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 a in e)e[a]===null?r[a]=null:Array.isArray(e[a])?r[a]=e[a].slice():typeof e[a]=="object"?f(e[a],r[a]):r[a]=e[a]}async function h(){m.pause(),o.value=JSON.parse(JSON.stringify(s.state)),await A(),m.resume()}return(e,r)=>{const a=E,S=I,N=$("tooltip");return i(),p("div",{class:"state-editor-details",open:e.name?t(n):!0},[u("div",Y,[e.name?(i(),p("button",{key:0,flex:"~","cursor-pointer":"","items-center":"",class:c(t(n)?"":"op50"),onClick:r[0]||(r[0]=y=>n.value=!t(n))},[u("div",{"i-carbon-chevron-right":"",transition:"",class:c(t(n)?"rotate-90 op0":"")},null,2),u("code",{px3:"",py1:"","font-mono":"",class:c(t(n)?"bg-[#8881] rounded-t":"rounded hover:bg-active")},J(e.name),3)],2)):l("",!0),D(e.$slots,"actions",P(R({isOpen:t(n),name:e.name,state:t(d)}))),t(n)?(i(),p(j,{key:1},[z(F(a,{title:"Refresh View",icon:"carbon-renew",border:!1,onClick:h},null,512),[[N,"Refresh View",void 0,{bottom:!0}]]),t(o)?(i(),v(S,{key:0,getter:()=>({name:e.name,input:JSON.stringify(t(o))})},null,8,["getter"])):l("",!0)],64)):l("",!0)]),t(n)||!e.name?(i(),v(t(T),G({key:0,modelValue:t(o),"onUpdate:modelValue":r[1]||(r[1]=y=>q(o)?o.value=y:null)},e.$attrs,{class:["json-editor-vue",[t(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:t(M),indentation:2,"tab-size":2}),null,16,["modelValue","class","read-only"])):l("",!0)],8,U)}}});export{W as _};
@@ -1 +1 @@
1
- import{d as e,m as n,o}from"./entry.35c58391.js";const t={"h-screen":"","w-screen":"","bg-black":""},r=e({__name:"__blank",setup(c){return(s,_)=>(o(),n("div",t))}});export{r as default};
1
+ import{d as e,m as n,o}from"./entry.7025a867.js";const t={"h-screen":"","w-screen":"","bg-black":""},r=e({__name:"__blank",setup(c){return(s,_)=>(o(),n("div",t))}});export{r as default};
@@ -1 +1 @@
1
- import{d as P,a as I,r as V,o,m as s,k as e,F as _,n as j,G as S,f as t,t as p,p as b,H as U,i as u,j as r,v as f,I as A,J as D,K as X,L as F,M as E,_ as G,N as q,O as ee,P as ne,Q as te,R as oe,S as le,U as ie,V as se,W as C,h as z,l as R,X as ae,Y as re,Z as ue,A as de}from"./entry.35c58391.js";import{_ as ce}from"./FilepathItem.vue.7a091e26.js";import{_ as me}from"./NCodeBlock.vue.4697f7e4.js";import{_ as _e}from"./NCheckbox.vue.0f5a8440.js";import{_ as pe}from"./HelpFab.vue.07720a44.js";import"./client.bd4053bc.js";const fe={"h-full":"",grid:"~ rows-[max-content_1fr]"},ve={flex:"~ wrap","w-full":""},he=["onClick"],ye=e("div",{border:"b base","flex-auto":""},null,-1),be={key:0,flex:"~ col gap-4 items-center justify-center",p4:""},$e=e("div",{"flex-auto":""},null,-1),ge={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),we=e("div",{"text-sm":"",op50:""}," Name ",-1),ze=e("div",{"i-carbon-time":"","text-xl":""},null,-1),Be=e("div",{"text-sm":"",op50:""}," Build duration ",-1),Ce=e("div",{"i-carbon-cics-program":"","text-xl":""},null,-1),ke=e("div",{"text-sm":"",op50:""}," Client bundle size ",-1),Ne=e("div",{"i-carbon-bare-metal-server":"","text-xl":""},null,-1),Te=e("div",{"text-sm":"",op50:""}," Nitro bundle size ",-1),Ae=e("div",{"i-carbon-edge-node":"","text-xl":""},null,-1),De=e("div",{"text-sm":"",op50:""}," Built ",-1),Ie=e("div",{"i-carbon:folder-parent":"","text-xl":""},null,-1),Ve=e("div",{"text-sm":"",op50:""}," Report Path ",-1),Se=e("div",{"flex-auto":""},null,-1),Fe=P({__name:"BuildAnalyzeDetails",props:{current:{},prev:{}},setup(k){const v=k,g=`${X().app.baseURL}/__nuxt_devtools__/analyze/`.replace(/\/+/g,"/"),x=I(()=>{const n=[{name:"Overview",id:"overview"}];return v.current.features.bundleClient&&n.push({name:"Client Bundle",id:"bundle-client"}),v.current.features.bundleNitro&&n.push({name:"Nitro Bundle",id:"bundle-nitro"}),v.current.features.viteInspect&&n.push({name:"Vite Inspect",id:"vite-inspect"}),n}),i=V(x.value[0]);function h(n){return n<1024?`${n}B`:n<1024*1024?`${(n/1024).toFixed(1)}KB`:n<1024*1024*1024?`${(n/1024/1024).toFixed(1)}MB`:`${(n/1024/1024/1024).toFixed(1)}GB`}function d(n){return`${((n.endTime-n.startTime)/1e3).toFixed(1)}s`}async function N(n){return F.clearAnalyzeBuilds(await E(),[n])}return(n,c)=>{const B=ce,T=G;return o(),s("div",fe,[e("div",ve,[(o(!0),s(_,null,j(t(x),(l,m)=>(o(),s("button",{key:m,px4:"",py2:"",border:"r base",hover:"bg-active",class:S(l.id===t(i).id?"":"border-b"),onClick:w=>i.value=l},[e("div",{class:S(l.id===t(i).id?"":"op30")},p(l.name),3)],10,he))),128)),ye]),t(i).id==="overview"?(o(),s("div",be,[$e,e("div",ge,[xe,e("div",null,[we,e("div",null,p(n.current.name),1)]),ze,e("div",null,[Be,e("div",null,p(d(n.current)),1)]),n.current.size?.clientBundle?(o(),s(_,{key:0},[Ce,e("div",null,[ke,e("div",null,p(h(n.current.size.clientBundle)),1)])],64)):b("",!0),n.current.size.nitroBundle?(o(),s(_,{key:1},[Ne,e("div",null,[Te,e("div",null,p(h(n.current.size.nitroBundle)),1)])],64)):b("",!0),Ae,e("div",null,[De,e("div",null,p(t(U)(new Date(n.current.endTime))),1)]),Ie,e("div",null,[Ve,u(B,{filepath:n.current.analyzeDir},null,8,["filepath"])])]),Se,u(T,{n:"rose",icon:"carbon-delete",onClick:c[0]||(c[0]=l=>N(n.current.name))},{default:r(()=>[f(" Delete this report ")]),_:1})])):b("",!0),c._lazyshow1||t(i).id==="bundle-client"?(c._lazyshow1=!0,o(),s(_,null,[A(e("iframe",{src:`${t(g)}${n.current.slug}/client.html`,"h-full":"","w-full":""},null,8,["src"]),[[D,t(i).id==="bundle-client"]])],64)):b("v-show-if",!0),c._lazyshow2||t(i).id==="bundle-nitro"?(c._lazyshow2=!0,o(),s(_,null,[A(e("iframe",{src:`${t(g)}${n.current.slug}/nitro.html`,"h-full":"","w-full":""},null,8,["src"]),[[D,t(i).id==="bundle-nitro"]])],64)):b("v-show-if",!0),c._lazyshow3||t(i).id==="vite-inspect"?(c._lazyshow3=!0,o(),s(_,null,[A(e("iframe",{src:`${t(g)}${n.current.slug}/.vite-inspect/`,"h-full":"","w-full":""},null,8,["src"]),[[D,t(i).id==="vite-inspect"]])],64)):b("v-show-if",!0)])}}}),Re={class:"markdown-body"},Pe=e("h1",null,"Build Analyze",-1),je=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),Ue=[Pe,je],Ee={__name:"analyze-build",setup(k,{expose:v}){return v({frontmatter:{}}),(g,x)=>(o(),s("div",Re,Ue))}},Ge={flex:"~ col"},Le=["onClick"],Oe={flex:"~ gap-1 items-center wrap","w-full":"","text-sm":"",op60:""},He=e("div",{"i-carbon-time":""},null,-1),Ke=e("div",{"flex-auto":""},null,-1),Me=e("div",{"x-divider":""},null,-1),We={flex:"~ items-center justify-center wrap",p4:""},Ye={flex:"~ col gap-1","w-250":"",p4:""},Ze=e("h3",{class:"text-lg font-medium leading-6",mb2:""}," Start analyze build? ",-1),Je=e("p",{op50:""}," Enter the name of the build: ",-1),Qe=e("div",{my3:"","x-divider":""},null,-1),Xe=e("p",{op50:""}," The following command will be executed in your terminal: ",-1),qe={flex:"~ gap-3",mt2:"","justify-end":""},an=P({__name:"analyze-build",setup(k){const v=q(),$=ee(),g=ne(),x=te("analyze-build:slug",""),i=I(()=>$.value?.builds.find(l=>l.slug===x.value)??$.value?.builds[0]),h=V(!1),d=V(""),N=I(()=>$.value?.builds.some(l=>l.name===d.value.trim()));async function n(){d.value=await F.generateAnalyzeBuildName(),await v.start()&&(se("analyze-build:start"),C.value={name:d.value,processId:await F.startAnalyzeBuild(await E(),d.value)},h.value&&B())}const c=oe();function B(){C.value?.processId&&(c.value=C.value.processId,g.push("/modules/terminals"))}function T(l){return`${((l.endTime-l.startTime)/1e3).toFixed(1)}s`}return le(()=>[{id:"action:analyze-build: start",title:"Start a new analyze build",icon:"i-carbon-edge-node",action:n}]),(l,m)=>{const w=G,L=Fe,O=de,H=ie,K=ae,M=re,W=me,Y=_e,Z=ue,J=Ee,Q=pe;return o(),s(_,null,[u(H,{"left-size":30},{left:r(()=>[e("div",Ge,[(o(!0),s(_,null,j(t($)?.builds,a=>(o(),s(_,{key:a.slug},[e("button",{flex:"~ col gap1","hover:bg-active":"",p3:"",class:S(a.slug===t(i)?.slug?"text-primary bg-active":""),onClick:y=>x.value=a.slug},[e("code",null,p(a.name),1),e("div",Oe,[He,e("span",null,p(T(a)),1),Ke,e("span",null,p(t(U)(new Date(a.endTime))),1)])],10,Le),Me],64))),128)),e("div",We,[("processAnalyzeBuildInfo"in l?l.processAnalyzeBuildInfo:t(C))?(o(),z(w,{key:1,n:"primary",icon:"carbon-circle-dash animate-spin",onClick:m[1]||(m[1]=a=>B())},{default:r(()=>[f(" Building... ")]),_:1})):(o(),z(w,{key:0,n:"primary",icon:"carbon-edge-node",onClick:m[0]||(m[0]=a=>n())},{default:r(()=>[f(" Start a new build ")]),_:1}))])])]),right:r(()=>[t(i)?(o(),z(L,{key:0,current:t(i)},null,8,["current"])):(o(),z(O,{key:1}))]),_:1}),u(t(v),null,{default:r(({resolve:a})=>[u(Z,{"model-value":!0,onClose:y=>a(!1)},{default:r(()=>[e("div",Ye,[Ze,Je,u(K,{modelValue:t(d),"onUpdate:modelValue":m[2]||(m[2]=y=>R(d)?d.value=y:null),placeholder:"Build name"},null,8,["modelValue"]),t(N)?(o(),z(M,{key:0,"n-orange":""},{default:r(()=>[f(" A build with the same name already exists, continue would overrides the previous build result. ")]),_:1})):b("",!0),Qe,Xe,u(W,{code:`npx nuxi analyze --no-serve --name=${t(d)}`,lang:"bash",px4:"",py2:"",border:"~ base rounded",lines:!1},null,8,["code"]),u(Y,{modelValue:t(h),"onUpdate:modelValue":m[3]||(m[3]=y=>R(h)?h.value=y:null),mt2:"",n:"primary"},{default:r(()=>[f(" Navigate to terminal ")]),_:1},8,["modelValue"]),e("div",qe,[u(w,{onClick:y=>a(!1)},{default:r(()=>[f(" Cancel ")]),_:2},1032,["onClick"]),u(w,{n:"solid primary",onClick:y=>a(!0)},{default:r(()=>[f(" Start ")]),_:2},1032,["onClick"])])])]),_:2},1032,["onClose"])]),_:1}),u(Q,null,{default:r(()=>[u(J)]),_:1})],64)}}});export{an as default};
1
+ import{d as P,a as I,r as V,o,m as s,k as e,F as _,n as j,G as S,f as t,t as p,p as b,H as U,i as u,j as r,v as f,I as A,J as D,K as X,L as F,M as E,_ as G,N as q,O as ee,P as ne,Q as te,R as oe,S as le,U as ie,V as se,W as C,h as z,l as R,X as ae,Y as re,Z as ue,A as de}from"./entry.7025a867.js";import{_ as ce}from"./FilepathItem.vue.0f604f99.js";import{_ as me}from"./NCodeBlock.vue.55894991.js";import{_ as _e}from"./NCheckbox.vue.c0c515c4.js";import{_ as pe}from"./HelpFab.vue.308adf61.js";import"./client.5139b740.js";const fe={"h-full":"",grid:"~ rows-[max-content_1fr]"},ve={flex:"~ wrap","w-full":""},he=["onClick"],ye=e("div",{border:"b base","flex-auto":""},null,-1),be={key:0,flex:"~ col gap-4 items-center justify-center",p4:""},$e=e("div",{"flex-auto":""},null,-1),ge={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),we=e("div",{"text-sm":"",op50:""}," Name ",-1),ze=e("div",{"i-carbon-time":"","text-xl":""},null,-1),Be=e("div",{"text-sm":"",op50:""}," Build duration ",-1),Ce=e("div",{"i-carbon-cics-program":"","text-xl":""},null,-1),ke=e("div",{"text-sm":"",op50:""}," Client bundle size ",-1),Ne=e("div",{"i-carbon-bare-metal-server":"","text-xl":""},null,-1),Te=e("div",{"text-sm":"",op50:""}," Nitro bundle size ",-1),Ae=e("div",{"i-carbon-edge-node":"","text-xl":""},null,-1),De=e("div",{"text-sm":"",op50:""}," Built ",-1),Ie=e("div",{"i-carbon:folder-parent":"","text-xl":""},null,-1),Ve=e("div",{"text-sm":"",op50:""}," Report Path ",-1),Se=e("div",{"flex-auto":""},null,-1),Fe=P({__name:"BuildAnalyzeDetails",props:{current:{},prev:{}},setup(k){const v=k,g=`${X().app.baseURL}/__nuxt_devtools__/analyze/`.replace(/\/+/g,"/"),x=I(()=>{const n=[{name:"Overview",id:"overview"}];return v.current.features.bundleClient&&n.push({name:"Client Bundle",id:"bundle-client"}),v.current.features.bundleNitro&&n.push({name:"Nitro Bundle",id:"bundle-nitro"}),v.current.features.viteInspect&&n.push({name:"Vite Inspect",id:"vite-inspect"}),n}),i=V(x.value[0]);function h(n){return n<1024?`${n}B`:n<1024*1024?`${(n/1024).toFixed(1)}KB`:n<1024*1024*1024?`${(n/1024/1024).toFixed(1)}MB`:`${(n/1024/1024/1024).toFixed(1)}GB`}function d(n){return`${((n.endTime-n.startTime)/1e3).toFixed(1)}s`}async function N(n){return F.clearAnalyzeBuilds(await E(),[n])}return(n,c)=>{const B=ce,T=G;return o(),s("div",fe,[e("div",ve,[(o(!0),s(_,null,j(t(x),(l,m)=>(o(),s("button",{key:m,px4:"",py2:"",border:"r base",hover:"bg-active",class:S(l.id===t(i).id?"":"border-b"),onClick:w=>i.value=l},[e("div",{class:S(l.id===t(i).id?"":"op30")},p(l.name),3)],10,he))),128)),ye]),t(i).id==="overview"?(o(),s("div",be,[$e,e("div",ge,[xe,e("div",null,[we,e("div",null,p(n.current.name),1)]),ze,e("div",null,[Be,e("div",null,p(d(n.current)),1)]),n.current.size?.clientBundle?(o(),s(_,{key:0},[Ce,e("div",null,[ke,e("div",null,p(h(n.current.size.clientBundle)),1)])],64)):b("",!0),n.current.size.nitroBundle?(o(),s(_,{key:1},[Ne,e("div",null,[Te,e("div",null,p(h(n.current.size.nitroBundle)),1)])],64)):b("",!0),Ae,e("div",null,[De,e("div",null,p(t(U)(new Date(n.current.endTime))),1)]),Ie,e("div",null,[Ve,u(B,{filepath:n.current.analyzeDir},null,8,["filepath"])])]),Se,u(T,{n:"rose",icon:"carbon-delete",onClick:c[0]||(c[0]=l=>N(n.current.name))},{default:r(()=>[f(" Delete this report ")]),_:1})])):b("",!0),c._lazyshow1||t(i).id==="bundle-client"?(c._lazyshow1=!0,o(),s(_,null,[A(e("iframe",{src:`${t(g)}${n.current.slug}/client.html`,"h-full":"","w-full":""},null,8,["src"]),[[D,t(i).id==="bundle-client"]])],64)):b("v-show-if",!0),c._lazyshow2||t(i).id==="bundle-nitro"?(c._lazyshow2=!0,o(),s(_,null,[A(e("iframe",{src:`${t(g)}${n.current.slug}/nitro.html`,"h-full":"","w-full":""},null,8,["src"]),[[D,t(i).id==="bundle-nitro"]])],64)):b("v-show-if",!0),c._lazyshow3||t(i).id==="vite-inspect"?(c._lazyshow3=!0,o(),s(_,null,[A(e("iframe",{src:`${t(g)}${n.current.slug}/.vite-inspect/`,"h-full":"","w-full":""},null,8,["src"]),[[D,t(i).id==="vite-inspect"]])],64)):b("v-show-if",!0)])}}}),Re={class:"markdown-body"},Pe=e("h1",null,"Build Analyze",-1),je=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),Ue=[Pe,je],Ee={__name:"analyze-build",setup(k,{expose:v}){return v({frontmatter:{}}),(g,x)=>(o(),s("div",Re,Ue))}},Ge={flex:"~ col"},Le=["onClick"],Oe={flex:"~ gap-1 items-center wrap","w-full":"","text-sm":"",op60:""},He=e("div",{"i-carbon-time":""},null,-1),Ke=e("div",{"flex-auto":""},null,-1),Me=e("div",{"x-divider":""},null,-1),We={flex:"~ items-center justify-center wrap",p4:""},Ye={flex:"~ col gap-1","w-250":"",p4:""},Ze=e("h3",{class:"text-lg font-medium leading-6",mb2:""}," Start analyze build? ",-1),Je=e("p",{op50:""}," Enter the name of the build: ",-1),Qe=e("div",{my3:"","x-divider":""},null,-1),Xe=e("p",{op50:""}," The following command will be executed in your terminal: ",-1),qe={flex:"~ gap-3",mt2:"","justify-end":""},an=P({__name:"analyze-build",setup(k){const v=q(),$=ee(),g=ne(),x=te("analyze-build:slug",""),i=I(()=>$.value?.builds.find(l=>l.slug===x.value)??$.value?.builds[0]),h=V(!1),d=V(""),N=I(()=>$.value?.builds.some(l=>l.name===d.value.trim()));async function n(){d.value=await F.generateAnalyzeBuildName(),await v.start()&&(se("analyze-build:start"),C.value={name:d.value,processId:await F.startAnalyzeBuild(await E(),d.value)},h.value&&B())}const c=oe();function B(){C.value?.processId&&(c.value=C.value.processId,g.push("/modules/terminals"))}function T(l){return`${((l.endTime-l.startTime)/1e3).toFixed(1)}s`}return le(()=>[{id:"action:analyze-build: start",title:"Start a new analyze build",icon:"i-carbon-edge-node",action:n}]),(l,m)=>{const w=G,L=Fe,O=de,H=ie,K=ae,M=re,W=me,Y=_e,Z=ue,J=Ee,Q=pe;return o(),s(_,null,[u(H,{"left-size":30},{left:r(()=>[e("div",Ge,[(o(!0),s(_,null,j(t($)?.builds,a=>(o(),s(_,{key:a.slug},[e("button",{flex:"~ col gap1","hover:bg-active":"",p3:"",class:S(a.slug===t(i)?.slug?"text-primary bg-active":""),onClick:y=>x.value=a.slug},[e("code",null,p(a.name),1),e("div",Oe,[He,e("span",null,p(T(a)),1),Ke,e("span",null,p(t(U)(new Date(a.endTime))),1)])],10,Le),Me],64))),128)),e("div",We,[("processAnalyzeBuildInfo"in l?l.processAnalyzeBuildInfo:t(C))?(o(),z(w,{key:1,n:"primary",icon:"carbon-circle-dash animate-spin",onClick:m[1]||(m[1]=a=>B())},{default:r(()=>[f(" Building... ")]),_:1})):(o(),z(w,{key:0,n:"primary",icon:"carbon-edge-node",onClick:m[0]||(m[0]=a=>n())},{default:r(()=>[f(" Start a new build ")]),_:1}))])])]),right:r(()=>[t(i)?(o(),z(L,{key:0,current:t(i)},null,8,["current"])):(o(),z(O,{key:1}))]),_:1}),u(t(v),null,{default:r(({resolve:a})=>[u(Z,{"model-value":!0,onClose:y=>a(!1)},{default:r(()=>[e("div",Ye,[Ze,Je,u(K,{modelValue:t(d),"onUpdate:modelValue":m[2]||(m[2]=y=>R(d)?d.value=y:null),placeholder:"Build name"},null,8,["modelValue"]),t(N)?(o(),z(M,{key:0,"n-orange":""},{default:r(()=>[f(" A build with the same name already exists, continue would overrides the previous build result. ")]),_:1})):b("",!0),Qe,Xe,u(W,{code:`npx nuxi analyze --no-serve --name=${t(d)}`,lang:"bash",px4:"",py2:"",border:"~ base rounded",lines:!1},null,8,["code"]),u(Y,{modelValue:t(h),"onUpdate:modelValue":m[3]||(m[3]=y=>R(h)?h.value=y:null),mt2:"",n:"primary"},{default:r(()=>[f(" Navigate to terminal ")]),_:1},8,["modelValue"]),e("div",qe,[u(w,{onClick:y=>a(!1)},{default:r(()=>[f(" Cancel ")]),_:2},1032,["onClick"]),u(w,{n:"solid primary",onClick:y=>a(!0)},{default:r(()=>[f(" Start ")]),_:2},1032,["onClick"])])])]),_:2},1032,["onClose"])]),_:1}),u(Q,null,{default:r(()=>[u(J)]),_:1})],64)}}});export{an as default};
@@ -1,4 +1,4 @@
1
- import{d as q,a0 as te,r as j,a1 as J,a2 as ne,m as r,I as X,i as d,f as t,k as e,v as F,F as M,n as Z,h as N,j as x,p as E,G as Q,a3 as pe,a4 as me,V as fe,L as W,M as H,a5 as O,_ as oe,o as s,a6 as le,X as ae,a as S,a7 as ve,a8 as he,a9 as ie,t as P,aa as _e,l as R,b as se,ab as ge,e as xe,ac as be,ad as we,ae as ye,af as $e,Z as ke,ag as Ce,ah as Ve,ai as Pe,aj as Ae}from"./entry.35c58391.js";import{_ as De}from"./NCheckbox.vue.0f5a8440.js";import{_ as Fe}from"./NDropdown.vue.ddbb4404.js";import{_ as Ne}from"./NNavbar.vue.a82b9c01.js";import{_ as Se}from"./NSectionBlock.1609c1ec.js";import{_ as Ie}from"./FilepathItem.vue.7a091e26.js";import{_ as Te,u as Ue}from"./storage-options.835c9b2d.js";import{_ as je}from"./NDrawer.vue.4b4bd813.js";import{D as Ee}from"./constants.2cc6e981.js";import"./NIconTitle.vue.8be5866f.js";import"./NCodeBlock.vue.4697f7e4.js";import"./client.bd4053bc.js";const Le={key:0,"h-full":"","w-full":"",flex:"","items-center":"","justify-center":""},Be={for:"drop-zone-input","text-3xl":"",hover:"text-green cursor-pointer","transition-all":""},Me={key:1,relative:"","h-full":"","w-full":"",grid:"~ rows-[max-content_1fr_max-content]"},ze=e("div",{px6:"",py6:""},[e("h1",{"text-2xl":""}," Upload "),e("p",{"text-sm":"",op50:""}," Drag and drop files to upload ")],-1),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"},Ke=["src"],Xe={flex:"~ gap1","items-center":""},Ge={flex:"~ gap-2","items-center":"","justify-center":"",p8:""},Ze=q({__name:"AssetDropZone",props:{modelValue:{type:Boolean,required:!0},folder:{type:String,required:!0}},setup(L){const l=L,m=te(l,"modelValue"),C=j(),o=j([]);function f(a){C.value=a.target,m.value=!0}function b(a){a.target===C.value&&(m.value=!1)}function I(a){a.preventDefault()}function A(a){a.preventDefault(),v(a.dataTransfer.files)}function v(a){const _=Array.from(a||[]);if(_.length){const g=[],w=o.value.map(i=>i.name);for(const i of _)if(w.includes(i.name)){let V=1;const[y,T]=i.name.split(".");for(;w.includes(`${y} (${V}).${T}`);)V++;const K=`${y}-${V}.${T}`,c=new Blob([i],{type:i.type}),n=new File([c],K,{lastModified:Date.now()});g.push(n),w.push(K)}else i.type===""&&O({message:"Folders are not supported yet",icon:"carbon:face-dissatisfied",classes:"text-orange"}),g.push(i);o.value=[...o.value,...g]}}async function B(){if(pe.value||me.value)return;fe("assets:upload");const a=[];for(const _ of o.value){const g=new FileReader;g.readAsDataURL(_);const i=(await new Promise(V=>{g.onload=()=>V(g.result)})).split(";base64,").pop();a.push({path:_.name,encoding:"base64",content:i})}await W.writeStaticAssets(await H(),[...a],l.folder).then(()=>{p(),O({message:"Files uploaded successfully!",icon:"i-carbon:checkmark"})}).catch(_=>{p(),O({message:`Error uploading files: ${_?.message??"unknown"}`,icon:"i-carbon-warning",classes:"text-red"})}),m.value=!1}function G(a){o.value?.splice(a,1)}function z(a){return URL.createObjectURL(a)}function h(a,_){const[g,w]=a.name.split("."),i=_.replace(/\.\w+$/,""),V=`${i}.${w}`;return i.length===0?(alert("File name must be at least 1 characters long"),g):(Object.defineProperty(a,"name",{value:V,writable:!1}),o.value.splice(o.value.indexOf(a),1,a),a)}function u(){o.value=[]}function p(){m.value=!1,u()}return J("dragenter",f),J("dragleave",b),J("dragover",I),J("drop",A),(a,_)=>{const g=oe,w=le,i=ae,V=ne("tooltip");return s(),r("div",{fixed:"","bottom-0":"","left-13":"","right-0":"","top-0":"","z-10":"","backdrop-blur-20":"","transition-all":"",class:Q(t(m)?"opacity-100 visible":"opacity-0 invisible")},[X(d(g,{icon:"carbon-close",title:"Close",absolute:"","right-5":"","top-5":"","z-20":"","text-xl":"",border:!1,onClick:p},null,512),[[V,"Close",void 0,{"bottom-end":!0}]]),t(o)?.length?(s(),r("div",Me,[ze,e("div",Oe,[(s(!0),r(M,null,Z(t(o),(y,T)=>(s(),r("div",{key:y.name,flex:"~ col gap-2",relative:"","h-50":"","w-40":"","items-center":""},[e("div",Re,[e("img",{"h-full":"","w-full":"","rounded-t-lg":"","object-cover":"",src:z(y)},null,8,Ke)]),e("div",Xe,[d(i,{n:"xs","h-full":"","flex-auto":"","model-value":y.name,"onUpdate:modelValue":K=>h(y,K.target.value)},null,8,["model-value","onUpdate:modelValue"]),d(g,{n:"red",icon:"carbon-trash-can","h-full":"","flex-none":"",title:"Remove file",onClick:K=>G(T)},null,8,["onClick"])])]))),128))]),e("div",Ge,[t(o).length?(s(),N(g,{key:0,n:"red",onClick:u},{default:x(()=>[d(w,{icon:"carbon-clean"}),F(" Clear ")]),_:1})):E("",!0),d(g,{disabled:!t(o).length,n:"primary solid",onClick:B},{default:x(()=>[d(w,{icon:"carbon-cloud-upload"}),F(" Upload ")]),_:1},8,["disabled"])])])):(s(),r("div",Le,[e("label",Be,[d(w,{icon:"carbon-cloud-upload","mr-2":""}),F(" Drop files here or click to select ")]),e("input",{id:"drop-zone-input",type:"file",multiple:"",hidden:"",onChange:_[0]||(_[0]=y=>v(y.target.files))},null,32)]))],2)}}}),qe=q({__name:"AssetFontPreview",props:{asset:{}},setup(L){const l=L,m=S(()=>`devtools-assets-${ve(l.asset)}`);return he(S(()=>`
1
+ import{d as q,a0 as te,r as j,a1 as J,a2 as ne,m as r,I as X,i as d,f as t,k as e,v as F,F as M,n as Z,h as N,j as x,p as E,G as Q,a3 as pe,a4 as me,V as fe,L as W,M as H,a5 as O,_ as oe,o as s,a6 as le,X as ae,a as S,a7 as ve,a8 as he,a9 as ie,t as P,aa as _e,l as R,b as se,ab as ge,e as xe,ac as be,ad as we,ae as ye,af as $e,Z as ke,ag as Ce,ah as Ve,ai as Pe,aj as Ae}from"./entry.7025a867.js";import{_ as De}from"./NCheckbox.vue.c0c515c4.js";import{_ as Fe}from"./NDropdown.vue.82a0f7a6.js";import{_ as Ne}from"./NNavbar.vue.329d273e.js";import{_ as Se}from"./NSectionBlock.bc36f09f.js";import{_ as Ie}from"./FilepathItem.vue.0f604f99.js";import{_ as Te,u as Ue}from"./storage-options.1c93b6a2.js";import{_ as je}from"./NDrawer.vue.99f5580b.js";import{D as Ee}from"./constants.2cc6e981.js";import"./NIconTitle.vue.a9777fd3.js";import"./NCodeBlock.vue.55894991.js";import"./client.5139b740.js";const Le={key:0,"h-full":"","w-full":"",flex:"","items-center":"","justify-center":""},Be={for:"drop-zone-input","text-3xl":"",hover:"text-green cursor-pointer","transition-all":""},Me={key:1,relative:"","h-full":"","w-full":"",grid:"~ rows-[max-content_1fr_max-content]"},ze=e("div",{px6:"",py6:""},[e("h1",{"text-2xl":""}," Upload "),e("p",{"text-sm":"",op50:""}," Drag and drop files to upload ")],-1),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"},Ke=["src"],Xe={flex:"~ gap1","items-center":""},Ge={flex:"~ gap-2","items-center":"","justify-center":"",p8:""},Ze=q({__name:"AssetDropZone",props:{modelValue:{type:Boolean,required:!0},folder:{type:String,required:!0}},setup(L){const l=L,m=te(l,"modelValue"),C=j(),o=j([]);function f(a){C.value=a.target,m.value=!0}function b(a){a.target===C.value&&(m.value=!1)}function I(a){a.preventDefault()}function A(a){a.preventDefault(),v(a.dataTransfer.files)}function v(a){const _=Array.from(a||[]);if(_.length){const g=[],w=o.value.map(i=>i.name);for(const i of _)if(w.includes(i.name)){let V=1;const[y,T]=i.name.split(".");for(;w.includes(`${y} (${V}).${T}`);)V++;const K=`${y}-${V}.${T}`,c=new Blob([i],{type:i.type}),n=new File([c],K,{lastModified:Date.now()});g.push(n),w.push(K)}else i.type===""&&O({message:"Folders are not supported yet",icon:"carbon:face-dissatisfied",classes:"text-orange"}),g.push(i);o.value=[...o.value,...g]}}async function B(){if(pe.value||me.value)return;fe("assets:upload");const a=[];for(const _ of o.value){const g=new FileReader;g.readAsDataURL(_);const i=(await new Promise(V=>{g.onload=()=>V(g.result)})).split(";base64,").pop();a.push({path:_.name,encoding:"base64",content:i})}await W.writeStaticAssets(await H(),[...a],l.folder).then(()=>{p(),O({message:"Files uploaded successfully!",icon:"i-carbon:checkmark"})}).catch(_=>{p(),O({message:`Error uploading files: ${_?.message??"unknown"}`,icon:"i-carbon-warning",classes:"text-red"})}),m.value=!1}function G(a){o.value?.splice(a,1)}function z(a){return URL.createObjectURL(a)}function h(a,_){const[g,w]=a.name.split("."),i=_.replace(/\.\w+$/,""),V=`${i}.${w}`;return i.length===0?(alert("File name must be at least 1 characters long"),g):(Object.defineProperty(a,"name",{value:V,writable:!1}),o.value.splice(o.value.indexOf(a),1,a),a)}function u(){o.value=[]}function p(){m.value=!1,u()}return J("dragenter",f),J("dragleave",b),J("dragover",I),J("drop",A),(a,_)=>{const g=oe,w=le,i=ae,V=ne("tooltip");return s(),r("div",{fixed:"","bottom-0":"","left-13":"","right-0":"","top-0":"","z-10":"","backdrop-blur-20":"","transition-all":"",class:Q(t(m)?"opacity-100 visible":"opacity-0 invisible")},[X(d(g,{icon:"carbon-close",title:"Close",absolute:"","right-5":"","top-5":"","z-20":"","text-xl":"",border:!1,onClick:p},null,512),[[V,"Close",void 0,{"bottom-end":!0}]]),t(o)?.length?(s(),r("div",Me,[ze,e("div",Oe,[(s(!0),r(M,null,Z(t(o),(y,T)=>(s(),r("div",{key:y.name,flex:"~ col gap-2",relative:"","h-50":"","w-40":"","items-center":""},[e("div",Re,[e("img",{"h-full":"","w-full":"","rounded-t-lg":"","object-cover":"",src:z(y)},null,8,Ke)]),e("div",Xe,[d(i,{n:"xs","h-full":"","flex-auto":"","model-value":y.name,"onUpdate:modelValue":K=>h(y,K.target.value)},null,8,["model-value","onUpdate:modelValue"]),d(g,{n:"red",icon:"carbon-trash-can","h-full":"","flex-none":"",title:"Remove file",onClick:K=>G(T)},null,8,["onClick"])])]))),128))]),e("div",Ge,[t(o).length?(s(),N(g,{key:0,n:"red",onClick:u},{default:x(()=>[d(w,{icon:"carbon-clean"}),F(" Clear ")]),_:1})):E("",!0),d(g,{disabled:!t(o).length,n:"primary solid",onClick:B},{default:x(()=>[d(w,{icon:"carbon-cloud-upload"}),F(" Upload ")]),_:1},8,["disabled"])])])):(s(),r("div",Le,[e("label",Be,[d(w,{icon:"carbon-cloud-upload","mr-2":""}),F(" Drop files here or click to select ")]),e("input",{id:"drop-zone-input",type:"file",multiple:"",hidden:"",onChange:_[0]||(_[0]=y=>v(y.target.files))},null,32)]))],2)}}}),qe=q({__name:"AssetFontPreview",props:{asset:{}},setup(L){const l=L,m=S(()=>`devtools-assets-${ve(l.asset)}`);return he(S(()=>`
2
2
  @font-face {
3
3
  font-family: '${m.value}';
4
4
  src: url('${l.asset.publicPath}');
@@ -1 +1 @@
1
- {"id":"f35e8543-749e-4b65-87f9-0ac9fa3dd3ab","timestamp":1701114946144}
1
+ {"id":"136dbdb0-d4da-4a06-b141-83ca2e534bfd","timestamp":1701975720060}
@@ -0,0 +1 @@
1
+ {"id":"136dbdb0-d4da-4a06-b141-83ca2e534bfd","timestamp":1701975720060,"matcher":{"static":{},"wildcard":{},"dynamic":{}},"prerendered":[]}
@@ -1 +1 @@
1
- import{bw as f,bM as r}from"./entry.35c58391.js";let o;const n=[];function s(i){if(n.push(i),!(typeof window>"u"))return window.__NUXT_DEVTOOLS__&&n.forEach(e=>e(window.__NUXT_DEVTOOLS__)),Object.defineProperty(window,"__NUXT_DEVTOOLS__",{set(e){e&&n.forEach(t=>t(e))},get(){return o.value},configurable:!0}),()=>{n.splice(n.indexOf(i),1)}}function u(){o||(o=f(),s(e));function i(){r(o)}function e(t){o.value=t,t.host&&t.host.hooks.hook("host:update:reactivity",i)}return o}const c=u();export{c as d};
1
+ import{bw as f,bN as r}from"./entry.7025a867.js";let o;const n=[];function s(i){if(n.push(i),!(typeof window>"u"))return window.__NUXT_DEVTOOLS__&&n.forEach(e=>e(window.__NUXT_DEVTOOLS__)),Object.defineProperty(window,"__NUXT_DEVTOOLS__",{set(e){e&&n.forEach(t=>t(e))},get(){return o.value},configurable:!0}),()=>{n.splice(n.indexOf(i),1)}}function u(){o||(o=f(),s(e));function i(){r(o)}function e(t){o.value=t,t.host&&t.host.hooks.hook("host:update:reactivity",i)}return o}const c=u();export{c as d};