@nuxt/devtools 0.6.7 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/module-main.mjs +126 -75
- package/dist/chunks/plugin-metrics.mjs +15 -12
- package/dist/chunks/timeline.mjs +69 -0
- package/dist/chunks/vscode.mjs +5 -5
- package/dist/client/200.html +2 -2
- package/dist/client/404.html +2 -2
- package/dist/client/_nuxt/AuthRequiredPanel.vue.d0cfb6b2.js +1 -0
- package/dist/client/_nuxt/Badge.51add8bd.js +1 -0
- package/dist/client/_nuxt/CodeDiff.vue.ef3840bb.js +3 -0
- package/dist/client/_nuxt/CodeSnippets.vue.ac1ba0c8.js +1 -0
- package/dist/client/_nuxt/ComposableItem.vue.a20c44a4.js +1 -0
- package/dist/client/_nuxt/DrawerRight.vue.53f21930.js +1 -0
- package/dist/client/_nuxt/DurationDisplay.vue.8283fdb3.js +1 -0
- package/dist/client/_nuxt/FilepathItem.vue.6f4d3680.js +1 -0
- package/dist/client/_nuxt/HelpFab.vue.58531843.js +1 -0
- package/dist/client/_nuxt/LaunchPage.vue.36ead88c.js +1 -0
- package/dist/client/_nuxt/NCheckbox.vue.a57ff0bb.js +1 -0
- package/dist/client/_nuxt/NCodeBlock.vue.2012eb81.js +2 -0
- package/dist/client/_nuxt/NIconTitle.vue.c1ac3b5f.js +1 -0
- package/dist/client/_nuxt/NLink.vue.c45070c9.js +1 -0
- package/dist/client/_nuxt/{NMarkdown.vue.31d61f61.js → NMarkdown.vue.6bccbb92.js} +1 -1
- package/dist/client/_nuxt/NSectionBlock.7613319f.js +1 -0
- package/dist/client/_nuxt/NSelect.vue.b9c29645.js +1 -0
- package/dist/client/_nuxt/NSwitch.vue.fa9b060a.js +1 -0
- package/dist/client/_nuxt/NTip.vue.95e4ec9e.js +1 -0
- package/dist/client/_nuxt/Navbar.vue.6c01dcab.js +1 -0
- package/dist/client/_nuxt/StateEditor.vue.c5cc22ae.js +1 -0
- package/dist/client/_nuxt/__blank.87af3281.js +1 -0
- package/dist/client/_nuxt/analyze-build.cf3dea6a.js +1 -0
- package/dist/client/_nuxt/assets.4f097b22.js +16 -0
- package/dist/client/_nuxt/client.247a64bd.js +1 -0
- package/dist/client/_nuxt/{components.3a437d73.js → components.07744e27.js} +6 -6
- package/dist/client/_nuxt/{constants.d7bcda3c.js → constants.2fec5dff.js} +1 -1
- package/dist/client/_nuxt/custom-_name_.6e463663.js +1 -0
- package/dist/client/_nuxt/default.3a13b5c9.js +1 -0
- package/dist/client/_nuxt/entry.185d6835.css +1 -0
- package/dist/client/_nuxt/entry.33b5be03.js +21 -0
- package/dist/client/_nuxt/{error-404.eb07c617.js → error-404.b216bd73.js} +1 -1
- package/dist/client/_nuxt/{error-500.8214e786.js → error-500.1bc58b0e.js} +1 -1
- package/dist/client/_nuxt/full.92d6a5f8.js +1 -0
- package/dist/client/_nuxt/hooks.259d0a69.js +1 -0
- package/dist/client/_nuxt/imports.cc27dbf7.js +1 -0
- package/dist/client/_nuxt/{index.98d48447.js → index.064a7a87.js} +1 -1
- package/dist/client/_nuxt/{index.6a0822c9.js → index.8f3e434d.js} +1 -1
- package/dist/client/_nuxt/{json-editor-vue.9acffc14.js → json-editor-vue.af845b1c.js} +1 -1
- package/dist/client/_nuxt/{middleware.c2f916df.js → middleware.fcdb1770.js} +1 -1
- package/dist/client/_nuxt/modules.5891e891.js +2 -0
- package/dist/client/_nuxt/none.e5b666cf.js +1 -0
- package/dist/client/_nuxt/open-graph.1141dd15.js +3 -0
- package/dist/client/_nuxt/overview.2af20256.js +1 -0
- package/dist/client/_nuxt/pages.b3fe162f.js +1 -0
- package/dist/client/_nuxt/payload.2d5cef36.js +1 -0
- package/dist/client/_nuxt/plugins.f25d8e7c.js +1 -0
- package/dist/client/_nuxt/runtime-configs.68765f10.js +1 -0
- package/dist/client/_nuxt/server-routes.ab41fbf6.js +9 -0
- package/dist/client/_nuxt/settings.cb26edfb.js +1 -0
- package/dist/client/_nuxt/{state-components.493c1b8d.js → state-components.3bf21c12.js} +1 -1
- package/dist/client/_nuxt/state-modules.dfd5fe81.js +1 -0
- package/dist/client/_nuxt/storage.921a198c.js +1 -0
- package/dist/client/_nuxt/{terminals.714ad795.js → terminals.67898f73.js} +7 -7
- package/dist/client/_nuxt/timeline.289e5c9e.css +1 -0
- package/dist/client/_nuxt/timeline.6b8e8f78.js +57 -0
- package/dist/client/_nuxt/{unocss-runtime.552cd61f.js → unocss-runtime.5034abfc.js} +2 -2
- package/dist/client/_nuxt/virtual-files.e3271a06.js +1 -0
- package/dist/client/index.html +2 -2
- package/dist/{global-20ccb74c.d.ts → global-ea55645c.d.ts} +7 -1
- package/dist/module.d.ts +1 -1
- package/dist/module.json +1 -1
- package/dist/module.mjs +1 -1
- package/dist/runtime/function-metrics-helpers.d.ts +3 -0
- package/dist/runtime/function-metrics-helpers.mjs +63 -0
- package/dist/runtime/plugins/devtools.client.mjs +2 -1
- package/dist/runtime/plugins/view/client.d.ts +3 -1
- package/dist/runtime/plugins/view/client.mjs +60 -23
- package/dist/runtime/plugins/view/state.mjs +1 -1
- package/dist/runtime/plugins/view/utils.d.ts +1 -1
- package/dist/runtime/plugins/view/utils.mjs +15 -15
- package/dist/shared/{devtools.ce3f2385.mjs → devtools.d198e7a9.mjs} +7 -1
- package/dist/types.d.ts +1 -1
- package/package.json +20 -19
- package/dist/client/__blank/index.html +0 -7
- package/dist/client/_nuxt/AuthRequiredPanel.vue.fc7f2968.js +0 -1
- package/dist/client/_nuxt/Badge.e05fc69f.js +0 -1
- package/dist/client/_nuxt/CodeSnippets.vue.a1fe908d.js +0 -1
- package/dist/client/_nuxt/DrawerRight.vue.3adebf89.js +0 -1
- package/dist/client/_nuxt/DurationDisplay.vue.c6aa67b3.js +0 -1
- package/dist/client/_nuxt/FilepathItem.vue.7520a5eb.js +0 -1
- package/dist/client/_nuxt/HelpFab.vue.6c2e0089.js +0 -1
- package/dist/client/_nuxt/LaunchPage.vue.ace7e996.js +0 -1
- package/dist/client/_nuxt/NCheckbox.vue.660c8c34.js +0 -1
- package/dist/client/_nuxt/NCodeBlock.vue.12f6d4d2.js +0 -2
- package/dist/client/_nuxt/NIconButton.vue.9dc5b644.js +0 -1
- package/dist/client/_nuxt/NIconTitle.vue.0db956c8.js +0 -1
- package/dist/client/_nuxt/NLink.vue.f3f95732.js +0 -1
- package/dist/client/_nuxt/NPanelGrids.cfd60e85.js +0 -1
- package/dist/client/_nuxt/NSectionBlock.216523d8.js +0 -1
- package/dist/client/_nuxt/NSelect.vue.38f0d91b.js +0 -1
- package/dist/client/_nuxt/NSwitch.vue.4e114eb7.js +0 -1
- package/dist/client/_nuxt/NTip.vue.d602d31e.js +0 -1
- package/dist/client/_nuxt/Navbar.vue.72301b0e.js +0 -1
- package/dist/client/_nuxt/PanelLeftRight.vue.d1539d19.js +0 -1
- package/dist/client/_nuxt/StateEditor.vue.c8fd02b3.js +0 -1
- package/dist/client/_nuxt/__blank.58b4eaa9.js +0 -1
- package/dist/client/_nuxt/analyze-build.66f9bc20.js +0 -1
- package/dist/client/_nuxt/assets.b60a4d67.js +0 -16
- package/dist/client/_nuxt/client.1e3208e3.js +0 -1
- package/dist/client/_nuxt/custom-_name_.1614dd97.js +0 -1
- package/dist/client/_nuxt/default.a69a326f.js +0 -1
- package/dist/client/_nuxt/entry.559460ac.js +0 -21
- package/dist/client/_nuxt/entry.e49b0ddd.css +0 -1
- package/dist/client/_nuxt/full.1f3e7ba7.js +0 -1
- package/dist/client/_nuxt/hooks.7a294c4b.js +0 -1
- package/dist/client/_nuxt/imports.8b3c700a.js +0 -1
- package/dist/client/_nuxt/modules.a1aceff5.js +0 -4
- package/dist/client/_nuxt/none.bf6672f1.js +0 -1
- package/dist/client/_nuxt/open-graph.f68f3562.js +0 -3
- package/dist/client/_nuxt/overview.9fbd51a4.js +0 -1
- package/dist/client/_nuxt/pages.8b6a187c.js +0 -1
- package/dist/client/_nuxt/payload.5851379a.js +0 -1
- package/dist/client/_nuxt/plugins.20750545.js +0 -1
- package/dist/client/_nuxt/runtime-configs.ce330378.js +0 -1
- package/dist/client/_nuxt/server-routes.08ebdd45.js +0 -9
- package/dist/client/_nuxt/settings.63ba52d8.js +0 -1
- package/dist/client/_nuxt/state-modules.c72270b1.js +0 -1
- package/dist/client/_nuxt/storage.d37c76d1.js +0 -1
- package/dist/client/_nuxt/virtual-files.7bf5357c.js +0 -1
- package/dist/client/modules/analyze-build/index.html +0 -7
- package/dist/client/modules/assets/index.html +0 -7
- package/dist/client/modules/components/index.html +0 -7
- package/dist/client/modules/hooks/index.html +0 -7
- package/dist/client/modules/imports/index.html +0 -7
- package/dist/client/modules/middleware/index.html +0 -7
- package/dist/client/modules/modules/index.html +0 -7
- package/dist/client/modules/open-graph/index.html +0 -7
- package/dist/client/modules/overview/index.html +0 -7
- package/dist/client/modules/pages/index.html +0 -7
- package/dist/client/modules/payload/index.html +0 -7
- package/dist/client/modules/plugins/index.html +0 -7
- package/dist/client/modules/runtime-configs/index.html +0 -7
- package/dist/client/modules/server-routes/index.html +0 -7
- package/dist/client/modules/storage/index.html +0 -7
- package/dist/client/modules/terminals/index.html +0 -7
- package/dist/client/modules/virtual-files/index.html +0 -7
- package/dist/client/settings/index.html +0 -7
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{g as i,r as u,bc as m,aw as f,h as d,w as p,aG as b,o as s,c as v,b as _,a as g,Y as h,aE as x,s as y,v as k,S as B}from"./entry.33b5be03.js";const C={relative:"","h-full":"","w-full":"","of-auto":""},V={inheritAttrs:!1},z=i({...V,__name:"DrawerRight",props:{modelValue:{type:Boolean},navbar:{},autoClose:{type:Boolean}},emits:["close"],setup(r,{emit:l}){const t=r,a=u(),{height:n}=m(()=>t.navbar,void 0,{box:"border-box"});return f(a,()=>{t.modelValue&&t.autoClose&&l("close")},{ignore:["a","button","summary"]}),(e,o)=>{const c=B;return s(),d(b,{"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(),v("div",x({key:0,ref_key:"el",ref:a,border:"l base",flex:"~ col gap-1",absolute:"","bottom-0":"","right-0":"","z-10":"","z-20":"","of-auto":"","text-sm":"","glass-effect":"",style:{top:`${y(n)}px`}},e.$attrs),[_(c,{absolute:"","right-2":"","top-2":"","z-20":"","text-xl":"",icon:"carbon-close",onClick:o[0]||(o[0]=$=>e.$emit("close"))}),g("div",C,[h(e.$slots,"default")])],16)):k("",!0)]),_:3})}}});export{z as _};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{g as s,m as u,o as d,c as f,d as c,t as o,s as n,a as p,q as m}from"./entry.33b5be03.js";const x={"ml-1":"","text-xs":"",op50:""},g=s({__name:"DurationDisplay",props:{duration:{},factor:{default:1},color:{type:Boolean,default:!0}},setup(a){const t=a;function i(r){return t.color?r?(r=r*t.factor,r<.5?"text-gray:50":r>1e3?"text-red-400":r>500?"text-orange-400":r>200?"text-yellow-400":""):"text-gray-400":""}const e=u(()=>!t.duration||t.duration<1?["<1","ms"]:t.duration<1e3?[t.duration.toFixed(0),"ms"]:t.duration<1e3*60?[(t.duration/1e3).toFixed(1),"s"]:[(t.duration/1e3/60).toFixed(1),"min"]);return(r,l)=>(d(),f("div",{class:m(i(r.duration))},[c(o(n(e)[0]),1),p("span",x,o(n(e)[1]),1)],2))}});export{g as _};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{g as u,Z as f,a1 as c,m as v,a_ as k,o as t,h as y,w as B,c as s,F as l,d,t as n,s as a,a as C,v as g,q as N,ai as b}from"./entry.33b5be03.js";const w={key:0,op50:""},F=u({__name:"FilepathItem",props:{filepath:{},lineBreak:{type:Boolean},subpath:{type:Boolean},override:{}},setup(m){const r=m,h=f(),p=c(),o=v(()=>r.filepath&&p.value?k(r.filepath,p.value.rootDir):{path:r.filepath||""});return(e,i)=>(t(),y(b(e.filepath?"button":"span"),{class:N([e.filepath?"hover:underline":"",e.lineBreak?"":"ws-nowrap of-hidden truncate"]),"font-mono":"",title:e.override||e.filepath,onClick:i[0]||(i[0]=D=>e.filepath&&a(h)(e.filepath))},{default:B(()=>[e.override?(t(),s(l,{key:0},[d(n(e.override),1)],64)):a(o).moduleName?(t(),s(l,{key:1},[C("span",null,n(a(o).moduleName),1),e.subpath?(t(),s("span",w,n(a(o).path.slice(a(o).moduleName.length)),1)):g("",!0)],64)):(t(),s(l,{key:2},[d(n(a(o).path),1)],64))]),_:1},8,["class","title"]))}});export{F as _};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{g as f,r as _,s as o,c as s,a as d,b as a,w as i,aG as u,F as m,v as n,o as l,Y as v,ac as g,S as k}from"./entry.33b5be03.js";const h=d("div",{"i-ri:question-mark":""},null,-1),x=[h],w={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=f({__name:"HelpFab",setup(y){const e=_(!1),{showHelpButtons:p}=g();return(b,t)=>{const c=k;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",w,[v(b.$slots,"default"),a(c,{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 _};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{g as k,h as o,w as a,i as b,o as t,b as r,a as c,t as i,v as _,c as g,n as h,aE as N,d as w,F as x,bn as C,T as y,k as B,ad as $}from"./entry.33b5be03.js";import{_ as V}from"./NMarkdown.vue.6bccbb92.js";const v={"text-xl":""},P={flex:"~ gap2 wrap"},L=k({__name:"LaunchPage",props:{icon:{},title:{},description:{},actions:{}},emits:["action"],setup(T){return(e,E)=>{const l=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(l,{mb2:"","text-5xl":"",icon:e.icon||e.icon,title:e.title},null,8,["icon","title"]),c("h1",v,i(e.title),1),e.description?(t(),o(m,{key:0,mb2:"","mt--1":"","text-center":"","text-base":"",op50:"",markdown:e.description},null,8,["markdown"])):_("",!0),c("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":""})):_("",!0),w(" "+i(n.label),1)]),_:2},1040,["disabled","to","target","onClick"]))),128))])]),_:1})]),_:1})}}});export{L as _};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{g as i,X as r,c as p,y as b,bv as u,s as o,a as n,L as h,aR as k,b as f,Y as m,q as v,o as _,T as x}from"./entry.33b5be03.js";const y=["checked","disabled"],V=["disabled"],B={class:"n-checkbox-box n-checked:n-checkbox-box-checked peer-active:n-active-base peer-focus-visible:n-focus-base n-transition"},$=i({__name:"NCheckbox",props:{modelValue:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},setup(c,{emit:t}){const e=r(c,"modelValue",t,{passive:!0});return(a,s)=>{const d=x;return _(),p("label",{class:"n-checkbox hover:n-checkbox-hover select-none items-center n-disabled:n-disabled",checked:o(e)||null,disabled:a.disabled||null},[b(n("input",{"onUpdate:modelValue":s[0]||(s[0]=l=>h(e)?e.value=l:null),type:"checkbox",class:"peer absolute op0",disabled:a.disabled,onKeypress:s[1]||(s[1]=k(l=>e.value=!o(e),["enter"]))},null,40,V),[[u,o(e)]]),n("span",B,[f(d,{class:"n-checkbox-icon scale-0 transform op0 n-transition n-checked:scale-100 n-checked:op100"})]),n("span",{class:v([o(e)?"":"op50","n-transition"])},[m(a.$slots,"default")],2)],8,y)}}});export{$ as _};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{d as u}from"./client.247a64bd.js";import{g as _,m,al as k,o as n,c as s,q as r,a as t,F as d,n as f,t as g}from"./entry.33b5be03.js";const h=["innerHTML"],C={class:"shiki"},v=["textContent"],y=t("br",null,null,-1),H=_({__name:"NCodeBlock",props:{code:{},lang:{},lines:{type:Boolean,default:!0},transformRendered:{}},emits:["loaded"],setup(a,{emit:c}){const o=a,l=m(()=>{const e=u.value?.devtools.renderCodeHighlight(o.code,o.lang)||{code:o.code,supported:!1};return e.supported&&o.transformRendered&&(e.code=o.transformRendered(e.code)),e.supported&&k(()=>c("loaded")),e});return(e,B)=>e.lang&&l.value.supported?(n(),s("pre",{key:0,class:r(["n-code-block",e.lines?"n-code-block-lines":""]),innerHTML:l.value.code},null,10,h)):(n(),s("pre",{key:1,class:r(["n-code-block",e.lines?"n-code-block-lines":""])},[t("pre",C,[t("code",null,[(n(!0),s(d,null,f(e.code.split(`
|
|
2
|
+
`),(i,p)=>(n(),s(d,{key:p},[t("span",{class:"line",textContent:g(i)},null,8,v),y],64))),128))])])],2))}});export{H as _};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{g as t,o,c as s,q as a,v as n,Y as r,a as l,t as i}from"./entry.33b5be03.js";const c={flex:"~ gap-3","items-center":""},u=t({__name:"NIconTitle",props:{icon:{},text:{}},setup(p){return(e,m)=>(o(),s("div",c,[e.icon?(o(),s("div",{key:0,class:a(e.icon)},null,2)):n("",!0),r(e.$slots,"default",{},()=>[l("div",null,i(e.text),1)])]))}});export{u as _};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{g as n,o as a,h as o,w as s,Y as r,aE as t,ai as p,s as i,e as l}from"./entry.33b5be03.js";const c=n({__name:"NLink",props:{to:{},href:{},target:{}},setup(_){return(e,m)=>(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 +1 @@
|
|
|
1
|
-
import{d as o}from"./client.
|
|
1
|
+
import{d as o}from"./client.247a64bd.js";import{g as t,s as e,o as a,h as r,ai as s,t as d}from"./entry.33b5be03.js";const i=t({__name:"NMarkdown",props:{markdown:{},tag:{}},setup(m){return(n,l)=>n.markdown&&e(o)?.devtools?.renderMarkdown?(a(),r(s(n.tag||"span"),{key:0,class:"n-markdown",innerHTML:e(o).devtools.renderMarkdown(n.markdown)},null,8,["innerHTML"])):(a(),r(s(n.tag||"span"),{key:1,class:"n-markdown",textContent:d(n.markdown)},null,8,["textContent"]))}});export{i as _};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{g,X as y,c as r,a as o,q as n,b,w,s as i,F as c,y as B,z as S,Y as s,v as d,o as l,d as u,t as v,h as $,p as C,f as N,T as k,_ as I}from"./entry.33b5be03.js";import{_ as x}from"./NIconTitle.vue.c1ac3b5f.js";const f=t=>(C("data-v-a73dbcfe"),t=t(),N(),t),V=["open"],z={"text-base":""},T={key:0,"text-sm":"",op50:""},D=f(()=>o("div",{class:"flex-auto"},null,-1)),F=f(()=>o("div",{class:"x-divider"},null,-1)),q=g({__name:"NSectionBlock",props:{icon:{},text:{},description:{},containerClass:{default:""},headerClass:{},collapse:{type:Boolean,default:!0},open:{type:Boolean,default:!0},padding:{type:[Boolean,String],default:!0}},setup(t){const a=y(t,"open",void 0,{passive:!0});function _(e){a.value=e.target.open}return(e,p)=>{const m=k,h=x;return l(),r(c,null,[o("details",{open:i(a),onToggle:_},[o("summary",{class:n(["cursor-pointer select-none hover:bg-active p4",e.collapse?"":"pointer-events-none"])},[b(h,{icon:e.icon,text:e.text,"text-xl":"",transition:"",class:n([i(a)?"op100":"op60",e.headerClass])},{default:w(()=>[o("div",null,[o("div",z,[s(e.$slots,"text",{},()=>[u(v(e.text),1)],!0)]),e.description||e.$slots.description?(l(),r("div",T,[s(e.$slots,"description",{},()=>[u(v(e.description),1)],!0)])):d("",!0)]),D,s(e.$slots,"actions",{},void 0,!0),e.collapse?(l(),$(m,{key:0,icon:"carbon-chevron-down",class:"chevron","cursor-pointer":"","place-self-start":"","text-base":"",op75:"",transition:"","duration-500":""})):d("",!0)]),_:3},8,["icon","text","class"])],2),p._lazyshow1||i(a)?(p._lazyshow1=!0,l(),r(c,null,[B(o("div",{class:n(["flex flex-col flex-gap2 pb6 pt2",typeof e.padding=="string"?e.padding:e.padding?"px4":""])},[s(e.$slots,"details",{},void 0,!0),o("div",{class:n([e.containerClass,"mt1"])},[s(e.$slots,"default",{},void 0,!0)],2),s(e.$slots,"footer",{},void 0,!0)],2),[[S,i(a)]])],64)):d("v-show-if",!0)],40,V),F],64)}}});const Y=I(q,[["__scopeId","data-v-a73dbcfe"]]);export{Y as _};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{g as u,X as p,c as t,Y as l,y as f,bw as m,s as b,a as h,t as v,v as n,L as _,o as s,h as y,T as V}from"./entry.33b5be03.js";const k={class:"n-text-input 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"},w=["disabled"],B={key:0,value:"",disabled:"",hidden:""},S=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(),t("div",k,[l(e.$slots,"icon",{},()=>[e.icon?(s(),y(r,{key:0,icon:e.icon,class:"mr-0.4em text-1.1em op50"},null,8,["icon"])):n("",!0)]),f(h("select",{"onUpdate:modelValue":a[0]||(a[0]=c=>_(o)?o.value=c:null),disabled:e.disabled,class:"w-full flex-auto n-bg-base !outline-none"},[e.placeholder?(s(),t("option",B,v(e.placeholder),1)):n("",!0),l(e.$slots,"default")],8,w),[[m,b(o)]])])}}});export{S as _};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{g as i,X as c,o as r,c as u,y as h,bv as p,s as l,a as t,L as b,aR as v,Y as f}from"./entry.33b5be03.js";const k=["checked","disabled"],m=["disabled"],w=t("div",{class:"n-switch-slider n-checked:n-switch-slider-checked peer-active:n-active-base peer-focus-visible:n-focus-base n-transition"},[t("div",{class:"n-checked:n-switch-thumb-checked n-switch-thumb n-transition"})],-1),B=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:l(e)||null,disabled:a.disabled||null},[h(t("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]=v(n=>e.value=!l(e),["enter"]))},null,40,m),[[p,l(e)]]),w,f(a.$slots,"default")],8,k))}});export{B as _};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{g as a,o,c,Y as n,h as t,v as i,a as r,T as l}from"./entry.33b5be03.js";const p={class:"n-tip n-tip-base"},u=a({__name:"NTip",props:{icon:{}},setup(_){return(e,m)=>{const s=l;return o(),c("div",p,[n(e.$slots,"icon",{},()=>[e.icon?(o(),t(s,{key:0,icon:e.icon,class:"n-tip-icon"},null,8,["icon"])):i("",!0)]),r("div",null,[n(e.$slots,"default")])])}}});export{u as _};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{g as r,c,a as d,Y as s,q as n,o as i,b as p,M as u}from"./entry.33b5be03.js";const f={flex:"~ gap4","items-center":""},g=r({__name:"Navbar",props:{search:{type:String,default:void 0},noPadding:{type:Boolean,default:!1}},emits:["update:search"],setup(a,{emit:t}){function o(e){t("update:search",e.target.value)}return(e,m)=>{const l=u;return i(),c("div",{flex:"~ col gap2",border:"b base","flex-1":"","navbar-glass":"",class:n([{p4:!a.noPadding}])},[d("div",f,[s(e.$slots,"search",{},()=>[p(l,{placeholder:"Search...",icon:"carbon-search",n:"primary","flex-auto":"",class:n({"px-5 py-2":!a.noPadding}),value:a.search,onInput:o},null,8,["class","value"])]),s(e.$slots,"actions")]),s(e.$slots,"default")],2)}}});export{g as _};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{g as h,X as S,a7 as N,r as B,b1 as O,o as r,c as l,a as p,q as d,s,t as V,v as u,Y as C,aH as w,aI as j,h as f,F as J,aE as P,b2 as _,L as $,al as z,S as E}from"./entry.33b5be03.js";import{U as M}from"./json-editor-vue.af845b1c.js";const R=["open"],U={flex:"~ gap2","select-none":"","items-center":"",px4:""},A={key:1,"bg-active":"",p5:"",italic:""},F=p("span",{op50:""},"No data",-1),I=[F],H=h({__name:"StateEditor",props:{name:{},open:{type:Boolean},state:{},readonly:{type:Boolean}},emits:["update:open"],setup(v,{emit:b}){const i=v,n=S(i,"open",b,{passive:!0}),k=N(),o=B();o.value=JSON.parse(JSON.stringify(i.state));const c=O(o,e=>{m(e,i.state)},{deep:!0});function m(e,t){for(const a in e)e[a]===null?t[a]=null:Array.isArray(e[a])?t[a]=e[a].slice():typeof e[a]=="object"?m(e[a],t[a]):t[a]=e[a]}async function g(){c.pause(),o.value=JSON.parse(JSON.stringify(i.state)),await z(),c.resume()}return(e,t)=>{const a=E;return r(),l("div",{class:"state-editor-details",open:e.name?s(n):!0},[p("div",U,[e.name?(r(),l("button",{key:0,flex:"~","cursor-pointer":"","items-center":"",class:d(s(n)?"":"op50"),onClick:t[0]||(t[0]=y=>n.value=!s(n))},[p("div",{"i-carbon-chevron-right":"",transition:"",class:d(s(n)?"rotate-90 op0":"")},null,2),p("code",{px3:"",py1:"","font-mono":"",class:d(s(n)?"bg-[#8881] rounded-t":"rounded hover:bg-active")},V(e.name),3)],2)):u("",!0),C(e.$slots,"actions",w(j({isOpen:s(n),name:e.name,state:e.state}))),s(n)?(r(),f(a,{key:1,title:"Refresh View",icon:"carbon-renew",onClick:g})):u("",!0)]),s(n)||!e.name?(r(),l(J,{key:0},[e.state&&Object.keys(e.state).length>0?(r(),f(s(M),P({key:0,modelValue:s(o),"onUpdate:modelValue":t[1]||(t[1]=y=>$(o)?o.value=y:null)},e.$attrs,{class:["json-editor-vue",[s(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:s(_),indentation:2,"tab-size":2}),null,16,["modelValue","class","read-only"])):(r(),l("div",A,I))],64)):u("",!0)],8,R)}}});export{H as _};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{g as n,h as o,w as t,i as _,o as a,a as s}from"./entry.33b5be03.js";const c=s("div",null," Your App ",-1),u=n({__name:"__blank",setup(r){return(p,i)=>{const e=_;return a(),o(e,{"h-screen":"","w-screen":"",px5:""},{default:t(()=>[c]),_:1})}}});export{u as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{g as R,m as V,r as F,o,c as i,a as e,F as c,n as j,q as S,s as n,t as m,v as b,x as G,b as r,w as a,d as _,y as A,z as D,A as E,B as L,k as U,C as X,D as ee,E as te,G as ne,H as oe,I as le,J as ie,K as k,h as w,L as P,M as se,N as ae,i as re}from"./entry.33b5be03.js";import{_ as ue}from"./FilepathItem.vue.6f4d3680.js";import{_ as de}from"./NTip.vue.95e4ec9e.js";import{_ as ce}from"./NCodeBlock.vue.2012eb81.js";import{_ as me}from"./NCheckbox.vue.a57ff0bb.js";import{_ as _e}from"./HelpFab.vue.58531843.js";import"./client.247a64bd.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=R({__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 E.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,j(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"},Ee=e("h1",null,"Build Analyze",-1),Pe=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),Re=[Ee,Pe],je={__name:"analyze-build",setup(C,{expose:p}){return p({frontmatter:{}}),(l,$)=>(o(),i("div",Se,Re))}},Ge={flex:"~ col"},Le=["onClick"],Ue={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),Oe={flex:"~ items-center justify-center wrap",p4:""},qe={flex:"~ col gap-1","w-250":"",p4:""},Je=e("h3",{class:"text-lg font-medium leading-6",mb2:""}," Start analyze build? ",-1),We=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=R({__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 E.generateAnalyzeBuildName(),await p.start()&&(k.value={name:t.value,processId:await E.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,H=Fe,K=re,M=ie,O=se,q=de,J=ce,W=me,Y=ae,Z=je,Q=_e;return o(),i(c,null,[r(M,{"left-size":30},{left:a(()=>[e("div",Ge,[(o(!0),i(c,null,j(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,[He,e("span",null,m(T(s)),1),Ke,e("span",null,m(n(G)(new Date(s.endTime))),1)])],10,Le),Me],64))),128)),e("div",Oe,[("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(H,{key:0,current:n(g)},null,8,["current"])):(o(),w(K,{key:1}))]),_:1}),r(n(p),null,{default:a(({resolve:s})=>[r(Y,{"model-value":!0,onClose:y=>s(!1)},{default:a(()=>[e("div",qe,[Je,We,r(O,{modelValue:n(t),"onUpdate:modelValue":h[2]||(h[2]=y=>P(t)?t.value=y:null),placeholder:"Build name"},null,8,["modelValue"]),n(u)?(o(),w(q,{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(W,{modelValue:n(x),"onUpdate:modelValue":h[3]||(h[3]=y=>P(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};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import{g as E,r as S,O as U,o,c as u,b as g,s as t,a as e,d as B,F as N,n as L,h as F,w as T,v as D,q as R,P as O,Q as te,R as ne,A as X,B as se,S as q,T as K,M as oe,k as W,m as $,U as ae,V as ie,W as Q,t as P,X as le,Y as re,L as Z,Z as ce,a0 as G,a1 as ue,a2 as de,a3 as pe,a4 as me,a5 as fe,a6 as he}from"./entry.33b5be03.js";import{_ as _e}from"./Navbar.vue.6c01dcab.js";import{_ as ve}from"./NSectionBlock.7613319f.js";import{_ as ge}from"./FilepathItem.vue.6f4d3680.js";import{_ as xe}from"./CodeSnippets.vue.ac1ba0c8.js";import{_ as be}from"./DrawerRight.vue.53f21930.js";import{D as we}from"./constants.2fec5dff.js";import"./NIconTitle.vue.c1ac3b5f.js";import"./NCodeBlock.vue.2012eb81.js";import"./client.247a64bd.js";const ye={key:0,"h-full":"","w-full":"",flex:"","items-center":"","justify-center":""},$e={for:"drop-zone-input","text-3xl":""},ke={key:1,relative:"","h-full":"","w-full":"",grid:"~ rows-[max-content_1fr_max-content]"},Ce=e("div",{px6:"",py6:""},[e("h1",{"text-2xl":""}," Upload "),e("p",{"text-sm":"",op50:""}," Drag and drop files to upload ")],-1),Pe={grid:"~ cols-minmax-8rem","overflow-auto":"",p6:""},Ae={flex:"","items-center":"","justify-center":"","of-hidden":"",rounded:"","rounded-t-lg":"","bg-active":"","object-cover":"",class:"aspect-1/1",border:"~ base"},Fe=["src"],De={flex:"~ gap1","items-center":""},Ie={flex:"~ gap-2","items-center":"","justify-center":"",p8:""},Ne=E({__name:"DropZone",props:{folder:{type:String,required:!0}},setup(A){const n=A,l=S(!1),r=S(),c=S([]),k=["image","video"];function V(a){r.value=a.target,l.value=!0}function p(a){a.target===r.value&&(l.value=!1)}function C(a){a.preventDefault()}function j(a){a.preventDefault(),I(a.dataTransfer.files)}function I(a){const d=Array.from(a||[]);if(d.length){const v=[],y=c.value.map(i=>i.name);for(const i of d)if(y.includes(i.name)){let _=1;const[w,z]=i.name.split(".");for(;y.includes(`${w} (${_}).${z}`);)_++;const M=`${w}-${_}.${z}`,J=new Blob([i],{type:i.type}),ee=new File([J],M,{lastModified:Date.now()});v.push(ee),y.push(M)}else i.type===""?O({message:"Folders are not supported yet",icon:"carbon:face-dissatisfied",classes:"text-orange"}):k.some(_=>i.type.includes(_))?v.push(i):O({message:`"${i.type}" file type is not allowed`,icon:"carbon:face-dissatisfied",classes:"text-orange"});c.value=[...c.value,...v]}}async function h(){if(te.value||ne.value)return;const a=[];for(const d of c.value){const v=new FileReader;v.readAsDataURL(d);const i=(await new Promise(_=>{v.onload=()=>_(v.result)})).split(";base64,").pop();a.push({name:d.name,data:i})}await X.writeStaticAssets(await se(),[...a],n.folder).then(()=>{b(),O({message:"Files uploaded successfully!",icon:"i-carbon:checkmark"})}).catch(d=>{console.error(d),b(),O({message:`Error uploading files: ${d}`,icon:"i-carbon-warning",classes:"text-red"})}),l.value=!1}function f(a){c.value?.splice(a,1)}function s(a){return URL.createObjectURL(a)}function m(a,d){const[v,y]=a.name.split("."),i=d.replace(/\.\w+$/,""),_=`${i}.${y}`;return i.length===0?(alert("File name must be at least 1 characters long"),v):(Object.defineProperty(a,"name",{value:_,writable:!1}),c.value.splice(c.value.indexOf(a),1,a),a)}function x(){c.value=[]}function b(){l.value=!1,x()}return U("dragenter",V),U("dragleave",p),U("dragover",C),U("drop",j),(a,d)=>{const v=q,y=K,i=oe,_=W;return o(),u("div",{fixed:"","bottom-0":"","left-13":"","right-0":"","top-0":"","z-10":"","backdrop-blur-20":"","transition-all":"",class:R(t(l)?"opacity-100 visible":"opacity-0 invisible")},[g(v,{icon:"carbon-close",absolute:"","right-5":"","top-5":"","z-20":"","text-xl":"",onClick:b}),t(c)?.length?(o(),u("div",ke,[Ce,e("div",Pe,[(o(!0),u(N,null,L(t(c),(w,z)=>(o(),u("div",{key:w.name,flex:"~ col gap-2",relative:"","h-50":"","w-40":"","items-center":""},[e("div",Ae,[e("img",{"h-full":"","w-full":"","rounded-t-lg":"","object-cover":"",src:s(w)},null,8,Fe)]),e("div",De,[g(i,{n:"xs","flex-auto":"","model-value":w.name,"onUpdate:modelValue":M=>m(w,M.target.value)},null,8,["model-value","onUpdate:modelValue"]),g(v,{icon:"carbon-delete","flex-none":"",title:"Remove file",onClick:M=>f(z)},null,8,["onClick"])])]))),128))]),e("div",Ie,[t(c).length?(o(),F(_,{key:0,n:"red",onClick:x},{default:T(()=>[g(y,{icon:"carbon-clean"}),B(" Clear ")]),_:1})):D("",!0),g(_,{disabled:!t(c).length,n:"primary solid",onClick:h},{default:T(()=>[g(y,{icon:"carbon-cloud-upload"}),B(" Upload ")]),_:1},8,["disabled"])])])):(o(),u("div",ye,[e("label",$e,[g(y,{icon:"carbon-cloud-upload","mr-2":""}),B(" Drop files here or click to select ")]),e("input",{id:"drop-zone-input",type:"file",multiple:"",hidden:"",onChange:d[0]||(d[0]=w=>I(w.target.files))},null,32)]))],2)}}}),Se=E({__name:"AssetFontPreview",props:{asset:{}},setup(A){const n=A,l=$(()=>`devtools-assets-${ae(n.asset)}`);return ie($(()=>`
|
|
2
|
+
@font-face {
|
|
3
|
+
font-family: '${l.value}';
|
|
4
|
+
src: url('${n.asset.publicPath}');
|
|
5
|
+
}
|
|
6
|
+
`)),(r,c)=>(o(),u("div",{"of-hidden":"",style:Q({fontFamily:`'${t(l)}'`})}," 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))}}),Te={flex:"","items-center":"","justify-center":"","of-hidden":"","bg-active":"","object-cover":"",p1:""},Ve=["src"],je={key:2,"i-carbon-document":"","text-3xl":"",op20:""},Ee={key:3,"w-full":"","self-start":"",p4:""},Le=["textContent"],Be={key:4,"i-carbon-help":"","text-3xl":"",op20:""},Y=E({__name:"AssetPreview",props:{asset:{},textContent:{}},setup(A){return(n,l)=>{const r=Se;return o(),u("div",Te,[n.asset.type==="image"?(o(),u("img",{key:0,src:n.asset.publicPath},null,8,Ve)):n.asset.type==="font"?(o(),F(r,{key:n.asset.publicPath,asset:n.asset,"self-stretch":"",p2:"","text-2xl":""},null,8,["asset"])):n.asset.type==="text"&&!n.textContent?(o(),u("div",je)):n.asset.type==="text"&&n.textContent?(o(),u("div",Ee,[e("pre",{"max-h-10rem":"","of-hidden":"","text-xs":"","font-mono":"",textContent:P(n.textContent)},null,8,Le)])):(o(),u("div",Be))])}}}),ze={flex:"~ col gap-1",hover:"bg-active","items-center":"","of-hidden":"",rounded:"",p2:""},Me={"w-full":"","of-hidden":"",truncate:"","ws-nowrap":"","text-center":"","text-xs":""},Ue=E({__name:"AssetGridItem",props:{asset:{},folder:{}},setup(A){const n=A,l=$(()=>n.folder&&n.asset.path.startsWith(n.folder)?n.asset.path.slice(n.folder.length):n.asset.path);return(r,c)=>{const k=Y;return o(),u("button",ze,[g(k,{"h-30":"","w-30":"",rounded:"",border:"~ base",asset:r.asset},null,8,["asset"]),e("div",Me,P(t(l)),1)])}}}),Oe=e("div",{"x-divider":""},null,-1),H=E({__name:"AssetListItem",props:{item:{},index:{default:0},modelValue:{}},setup(A,{emit:n}){const l=A,r=le(l,"modelValue",n,{passive:!0}),c=$(()=>l.item?.children?.length),k=S(!0),V=$(()=>c.value?"i-carbon-folder":l.item.type==="image"?"i-carbon-image":l.item.type==="video"?"i-carbon-video":l.item.type==="audio"?"i-carbon-volume-up":l.item.type==="font"?"i-carbon-text-small-caps":l.item.type==="text"?"i-carbon-document":l.item.type==="json"?"i-carbon-json":"i-carbon-document-blank");return(p,C)=>{const j=K,I=H;return o(),u("div",null,[e("button",{flex:"~ gap-2","w-full":"","items-center":"",hover:"bg-active",px4:"",py1:"",style:Q({paddingLeft:`calc(1rem + ${p.index*1.5}em)`}),class:R({"bg-active":!t(c)&&t(r)?.filePath===p.item?.filePath}),onClick:C[0]||(C[0]=h=>t(c)?k.value=!t(k):r.value=p.item)},[e("div",{class:R(t(V))},null,2),e("span",{class:R({"flex items-center":t(c)}),"flex-auto":"","text-start":"","text-sm":"","font-mono":""},P(p.item.path),3),t(c)?(o(),F(j,{key:0,icon:"carbon:chevron-right","transform-rotate":t(k)?90:0,transition:""},null,8,["transform-rotate"])):D("",!0)],6),Oe,t(k)?re(p.$slots,"default",{key:0},()=>[(o(!0),u(N,null,L(p.item?.children,h=>(o(),F(I,{key:h.filepath,modelValue:t(r),"onUpdate:modelValue":C[1]||(C[1]=f=>Z(r)?r.value=f:null),item:h,index:p.index+1},null,8,["modelValue","item","index"]))),128))]):D("",!0)])}}}),Re={flex:"~ col gap-4","min-h-full":"","w-full":"","of-hidden":"",p4:""},Xe=e("div",{flex:"~ gap2","mb--2":"","items-center":"",op50:""},[e("div",{"x-divider":""}),e("div",{"flex-none":""}," Preview "),e("div",{"x-divider":""})],-1),Ze={flex:"~","items-center":"","justify-center":""},qe=e("div",{flex:"~ gap2","mb--2":"","items-center":"",op50:""},[e("div",{"x-divider":""}),e("div",{"flex-none":""}," Details "),e("div",{"x-divider":""})],-1),Ge={"max-w-full":"","w-full":"","table-fixed":""},Ke=e("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," Filepath ",-1),We={flex:"~ gap-1","w-full":"","items-center":""},Qe=e("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," Public Path ",-1),Ye={flex:"~ gap-1","w-full":"","items-center":"","of-hidden":""},He={"flex-auto":"","of-hidden":"",truncate:"","ws-pre":"","font-mono":""},Je=e("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," Type ",-1),et={capitalize:""},tt=e("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," Image Size ",-1),nt={key:0},st=e("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," Aspect Ratio ",-1),ot=e("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," File size ",-1),at=e("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," Last modified ",-1),it={op70:""},lt=e("div",{flex:"~ gap2","mb--2":"","items-center":"",op50:""},[e("div",{"x-divider":""}),e("div",{"flex-none":""}," Actions "),e("div",{"x-divider":""})],-1),rt={flex:"~ gap2 wrap"},ct=e("div",{"flex-auto":""},null,-1),ut=E({__name:"AssetDetails",props:{asset:{}},setup(A){const n=A,l=ce(),r=G(()=>{if(n.asset.type==="image")return X.getImageMeta(n.asset.filePath)}),c=G(()=>{if(n.asset.type==="text")return X.getTextAssetContent(n.asset.filePath)}),k=ue(),V=$(()=>(k.value?._installedModules||[]).some(m=>m.meta?.name==="@nuxt/image"||m.meta?.name==="@nuxt/image-edge")),p=$(()=>{const s=[];if(n.asset.type==="image"){const m=r.value?.width?`
|
|
7
|
+
width="${r.value.width}"
|
|
8
|
+
height="${r.value.height}" `:" ";return s.push({lang:"vue-html",code:`<img${m}
|
|
9
|
+
src="${n.asset.publicPath}"
|
|
10
|
+
/>`,name:"Plain Image"}),V.value&&s.push({lang:"vue-html",code:`<NuxtImage${m}
|
|
11
|
+
src="${n.asset.publicPath}"
|
|
12
|
+
/>`,name:"Nuxt Image",docs:"https://image.nuxtjs.org/components/nuxt-img"},{lang:"vue-html",code:`<NuxtPicture${m}
|
|
13
|
+
src="${n.asset.publicPath}"
|
|
14
|
+
/>`,name:"Nuxt Picture",docs:"https://image.nuxtjs.org/components/nuxt-picture"}),s}return s.push({lang:"html",code:`<a download href="${n.asset.publicPath}">
|
|
15
|
+
Download ${n.asset.path.split("/").slice(-1)[0]}
|
|
16
|
+
</a>`,name:"Download link"}),s}),C=de(),j=pe(()=>n.asset.mtime),I=$(()=>{const s=n.asset.size;return s<1024?`${s} B`:s<1024*1024?`${(s/1024).toFixed(2)} KB`:`${(s/1024/1024).toFixed(2)} MB`}),h=$(()=>{if(!r.value?.width||!r.value?.height)return"";const s=(x,b)=>b?s(b,x%b):x,m=s(r.value.width,r.value.height);return m>3?`${r.value.width/m}:${r.value.height/m}`:""}),f=$(()=>["image","text","video","font"].includes(n.asset.type));return(s,m)=>{const x=Y,b=ge,a=q,d=W,v=xe;return o(),u("div",Re,[t(f)?(o(),u(N,{key:0},[Xe,e("div",Ze,[g(x,{"max-h-80":"","min-h-20":"","min-w-20":"","w-auto":"",rounded:"",border:"~ base",asset:s.asset,"text-content":t(c)},null,8,["asset","text-content"])])],64)):D("",!0),qe,e("table",Ge,[e("tbody",null,[e("tr",null,[Ke,e("td",null,[e("div",We,[g(b,{filepath:s.asset.filePath,"text-left":""},null,8,["filepath"]),g(a,{"flex-none":"",title:"Open in Editor",icon:"carbon-launch",onClick:m[0]||(m[0]=y=>t(l)(s.asset.filePath))})])])]),e("tr",null,[Qe,e("td",null,[e("div",Ye,[e("div",He,P(s.asset.publicPath),1),g(a,{"flex-none":"",title:"Copy public path",icon:"carbon-copy",onClick:m[1]||(m[1]=y=>t(C)(s.asset.publicPath))}),g(a,{"flex-none":"",to:s.asset.publicPath,icon:"carbon-launch",target:"_blank",title:"Open in browser"},null,8,["to"])])])]),e("tr",null,[Je,e("td",et,P(s.asset.type),1)]),t(r)?.width?(o(),u(N,{key:0},[e("tr",null,[tt,e("td",null,P(t(r).width)+" x "+P(t(r).height),1)]),t(h)?(o(),u("tr",nt,[st,e("td",null,P(t(h)),1)])):D("",!0)],64)):D("",!0),e("tr",null,[ot,e("td",null,P(t(I)),1)]),e("tr",null,[at,e("td",null,[B(P(new Date(s.asset.mtime).toLocaleString())+" ",1),e("span",it,"("+P(t(j))+")",1)])])])]),lt,e("div",rt,[g(d,{to:s.asset.publicPath,download:"",target:"_blank",icon:"carbon-download"},{default:T(()=>[B(" Download ")]),_:1},8,["to"]),s.asset.type==="image"?(o(),F(d,{key:0,disabled:"",icon:"carbon-image-service"},{default:T(()=>[B(" Optimize image (Coming soon) ")]),_:1})):D("",!0)]),ct,t(p).length?(o(),F(v,{key:1,border:"t base","mx--4":"","mb--4":"","code-snippets":t(p)},null,8,["code-snippets"])):D("",!0)])}}}),dt={"h-full":"","of-auto":""},pt={"flex-none":"",flex:"~ gap2 items-center"},mt={op50:""},ft={key:0},ht={"mt--4":"",px2:"",grid:"~ cols-minmax-8rem"},_t={key:1,p2:"",grid:"~ cols-minmax-8rem"},vt={key:1},Ft=E({__name:"assets",setup(A){const n=me(),l=S(""),r=$(()=>new fe(n.value||[],{keys:["path"]})),c=$(()=>l.value?r.value.search(l.value).map(f=>f.item):n.value||[]),k=$(()=>{const h={};for(const f of c.value){const s=`${f.path.split("/").slice(0,-1).join("/")}/`;h[s]||(h[s]=[]),h[s].push(f)}return Object.entries(h).sort(([f],[s])=>f.localeCompare(s))}),V=$(()=>{const h={path:"public",children:[]},f=(s,m,x)=>{const[b,...a]=m;let d=s.children.find(v=>v.path===b);d||(d={...x,path:b,children:[]},s.children.push(d)),a.length>1?f(d,a,x):a.length===1&&d.children.push({...x,path:a[0]})};return c.value.forEach(s=>{const m=s.path.split("/").filter(x=>x!=="");f(h,m,s)}),h.children}),p=S(),C=S("grid");function j(){C.value=C.value==="list"?"grid":"list"}he("Escape",()=>{p.value=void 0});const I=S();return(h,f)=>{const s=q,m=_e,x=Ne,b=Ue,a=ve,d=H,v=ut,y=be;return o(),u("div",dt,[g(m,{ref_key:"navbar",ref:I,search:t(l),"onUpdate:search":f[0]||(f[0]=i=>Z(l)?l.value=i:null),pb2:""},{actions:T(()=>[e("div",pt,[g(s,{"text-lg":"",icon:t(C)==="grid"?"i-carbon-list":"i-carbon-grid",title:"Toggle view",onClick:j},null,8,["icon"])])]),default:T(()=>[e("div",mt,[t(l)?(o(),u("span",ft,P(t(c).length)+" matched · ",1)):D("",!0),e("span",null,P(t(n)?.length)+" assets in total",1)])]),_:1},8,["search"]),g(x,{folder:"/"}),t(C)==="grid"?(o(),u(N,{key:0},[t(k).length>1?(o(!0),u(N,{key:0},L(t(k),([i,_])=>(o(),F(a,{key:i,text:i,description:`${_.length} items`,open:_.length<=("DETAILS_MAX_ITEMS"in h?h.DETAILS_MAX_ITEMS:t(we)),padding:!1},{default:T(()=>[e("div",ht,[(o(!0),u(N,null,L(_,w=>(o(),F(b,{key:w.path,asset:w,folder:i,onClick:z=>p.value=w},null,8,["asset","folder","onClick"]))),128))])]),_:2},1032,["text","description","open"]))),128)):(o(),u("div",_t,[(o(!0),u(N,null,L(t(c),i=>(o(),F(b,{key:i.path,asset:i,onClick:_=>p.value=i},null,8,["asset","onClick"]))),128))]))],64)):(o(),u("div",vt,[(o(!0),u(N,null,L(t(V),(i,_)=>(o(),F(d,{key:_,modelValue:t(p),"onUpdate:modelValue":f[1]||(f[1]=w=>Z(p)?p.value=w:null),item:i},null,8,["modelValue","item"]))),128))])),g(y,{"model-value":!!t(p),"auto-close":"","w-120":"",navbar:t(I),onClose:f[2]||(f[2]=i=>p.value=void 0)},{default:T(()=>[t(p)?(o(),F(v,{key:0,asset:t(p)},null,8,["asset"])):D("",!0)]),_:1},8,["model-value","navbar"])])}}});export{Ft as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{bb as f,bs as r}from"./entry.33b5be03.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};
|