@nuxt/devtools 0.7.3 → 0.7.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.
- package/dist/chunks/module-main.mjs +3 -3
- package/dist/chunks/vscode.mjs +1 -1
- package/dist/client/200.html +2 -2
- package/dist/client/404.html +2 -2
- package/dist/client/__blank/index.html +2 -2
- package/dist/client/_nuxt/Badge.809c442f.js +1 -0
- package/dist/client/_nuxt/{CodeDiff.vue.0fc21e08.js → CodeDiff.vue.1cd1f35a.js} +1 -1
- package/dist/client/_nuxt/CodeSnippets.vue.e2cc365d.js +1 -0
- package/dist/client/_nuxt/ComposableItem.vue.a490c449.js +1 -0
- package/dist/client/_nuxt/DataSchemaButton.vue.31fe918d.js +1 -0
- package/dist/client/_nuxt/DataSchemaDrawer.7a8538ed.js +998 -0
- package/dist/client/_nuxt/DrawerRight.vue.3bbd0e76.js +1 -0
- package/dist/client/_nuxt/{DurationDisplay.vue.ae436800.js → DurationDisplay.vue.1533a045.js} +1 -1
- package/dist/client/_nuxt/FilepathItem.vue.a9853d6c.js +1 -0
- package/dist/client/_nuxt/HelpFab.vue.5d67494b.js +1 -0
- package/dist/client/_nuxt/LaunchPage.vue.304a6918.js +1 -0
- package/dist/client/_nuxt/NCheckbox.vue.76b79ec0.js +1 -0
- package/dist/client/_nuxt/{NCodeBlock.cf3ce05b.css → NCodeBlock.6994516c.css} +1 -1
- package/dist/client/_nuxt/NCodeBlock.vue.a8601f10.js +2 -0
- package/dist/client/_nuxt/NDropdown.vue.c183f72d.js +1 -0
- package/dist/client/_nuxt/NIconTitle.vue.e492e44a.js +1 -0
- package/dist/client/_nuxt/NLink.vue.e00535a9.js +1 -0
- package/dist/client/_nuxt/{NMarkdown.vue.5af3ba6b.js → NMarkdown.vue.7d7a1e6e.js} +1 -1
- package/dist/client/_nuxt/NSectionBlock.6778ba18.js +1 -0
- package/dist/client/_nuxt/NSelect.vue.6e592a84.js +1 -0
- package/dist/client/_nuxt/NSwitch.vue.855c3f98.js +1 -0
- package/dist/client/_nuxt/NTip.vue.6bf7cf97.js +1 -0
- package/dist/client/_nuxt/Navbar.vue.c8f5ea35.js +1 -0
- package/dist/client/_nuxt/StateEditor.vue.082de4fa.js +1 -0
- package/dist/client/_nuxt/__blank.8beed58c.js +1 -0
- package/dist/client/_nuxt/analyze-build.88782d48.js +1 -0
- package/dist/client/_nuxt/assets.dec2c564.js +16 -0
- package/dist/client/_nuxt/{client.1d68892a.js → client.fbe3eaa6.js} +1 -1
- package/dist/client/_nuxt/{components.705d48d8.js → components.99398ea7.js} +28 -28
- package/dist/client/_nuxt/custom-_name_.53810490.js +1 -0
- package/dist/client/_nuxt/default.2ae1a40e.js +1 -0
- package/dist/client/_nuxt/entry.6293ec9a.css +1 -0
- package/dist/client/_nuxt/entry.704683a1.js +21 -0
- package/dist/client/_nuxt/{error-404.82a24486.js → error-404.bde0cadd.js} +1 -1
- package/dist/client/_nuxt/{error-500.540bdb82.js → error-500.524ae368.js} +1 -1
- package/dist/client/_nuxt/full.6451054a.js +1 -0
- package/dist/client/_nuxt/hooks.d1ff16ee.js +1 -0
- package/dist/client/_nuxt/imports.9142e1cd.js +1 -0
- package/dist/client/_nuxt/index.2ab6466f.js +1 -0
- package/dist/client/_nuxt/{index.0a4e7275.js → index.ef0631d4.js} +2 -2
- package/dist/client/_nuxt/{json-editor-vue.f57c50c1.js → json-editor-vue.d2d6ca22.js} +1 -1
- package/dist/client/_nuxt/middleware.c86c494b.js +1 -0
- package/dist/client/_nuxt/modules.e419f21a.js +2 -0
- package/dist/client/_nuxt/none.bdacb36e.js +1 -0
- package/dist/client/_nuxt/open-graph.ae9112ee.js +3 -0
- package/dist/client/_nuxt/overview.b36ec18b.js +1 -0
- package/dist/client/_nuxt/pages.f4173ed6.js +1 -0
- package/dist/client/_nuxt/payload.8138f0c2.js +1 -0
- package/dist/client/_nuxt/plugins.192ab129.js +1 -0
- package/dist/client/_nuxt/runtime-configs.399a5d6f.js +1 -0
- package/dist/client/_nuxt/server-routes.a3646010.js +9 -0
- package/dist/client/_nuxt/settings.2dfbccf3.js +1 -0
- package/dist/client/_nuxt/{state-components.a65979c8.js → state-components.eea2cf71.js} +1 -1
- package/dist/client/_nuxt/state-modules.8cc9b26b.js +1 -0
- package/dist/client/_nuxt/storage.7aca7890.js +1 -0
- package/dist/client/_nuxt/{terminals.2787fb0b.js → terminals.b71c30e6.js} +2 -2
- package/dist/client/_nuxt/timeline.32019995.js +57 -0
- package/dist/client/_nuxt/{unocss-runtime.54140029.js → unocss-runtime.0935bd38.js} +1 -1
- package/dist/client/_nuxt/{virtual-files.a7391947.js → virtual-files.2f2a88f3.js} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/client/modules/analyze-build/index.html +2 -2
- package/dist/client/modules/assets/index.html +2 -2
- package/dist/client/modules/components/index.html +2 -2
- package/dist/client/modules/hooks/index.html +2 -2
- package/dist/client/modules/imports/index.html +2 -2
- package/dist/client/modules/middleware/index.html +2 -2
- package/dist/client/modules/modules/index.html +2 -2
- package/dist/client/modules/open-graph/index.html +2 -2
- package/dist/client/modules/overview/index.html +2 -2
- package/dist/client/modules/pages/index.html +2 -2
- package/dist/client/modules/payload/index.html +2 -2
- package/dist/client/modules/plugins/index.html +2 -2
- package/dist/client/modules/runtime-configs/index.html +2 -2
- package/dist/client/modules/server-routes/index.html +2 -2
- package/dist/client/modules/storage/index.html +2 -2
- package/dist/client/modules/terminals/index.html +2 -2
- package/dist/client/modules/timeline/index.html +2 -2
- package/dist/client/modules/virtual-files/index.html +2 -2
- package/dist/client/settings/index.html +2 -2
- package/dist/module.json +1 -1
- package/dist/module.mjs +1 -1
- package/dist/runtime/plugins/view/Main.vue +107 -10
- package/dist/runtime/plugins/view/client.mjs +3 -2
- package/dist/runtime/plugins/view/state.mjs +2 -1
- package/dist/shared/{devtools.d198e7a9.mjs → devtools.c34e61ba.mjs} +1 -0
- package/dist/types.d.ts +1 -11
- package/package.json +14 -13
- package/dist/client/_nuxt/AuthRequiredPanel.vue.8365f094.js +0 -1
- package/dist/client/_nuxt/Badge.6a68ac78.js +0 -1
- package/dist/client/_nuxt/CodeSnippets.vue.dc4d9439.js +0 -1
- package/dist/client/_nuxt/ComposableItem.vue.2b804916.js +0 -1
- package/dist/client/_nuxt/DrawerRight.vue.76906913.js +0 -1
- package/dist/client/_nuxt/FilepathItem.vue.c12140f3.js +0 -1
- package/dist/client/_nuxt/HelpFab.vue.d8b5b257.js +0 -1
- package/dist/client/_nuxt/LaunchPage.vue.7ca11100.js +0 -1
- package/dist/client/_nuxt/NCheckbox.vue.4cf6f83b.js +0 -1
- package/dist/client/_nuxt/NCodeBlock.vue.cd2d281d.js +0 -2
- package/dist/client/_nuxt/NIconTitle.vue.2bd823c1.js +0 -1
- package/dist/client/_nuxt/NLink.vue.b78c8d55.js +0 -1
- package/dist/client/_nuxt/NSectionBlock.36261208.js +0 -1
- package/dist/client/_nuxt/NSelect.vue.5b8827ac.js +0 -1
- package/dist/client/_nuxt/NSwitch.vue.f9054ae3.js +0 -1
- package/dist/client/_nuxt/NTip.vue.cf493c45.js +0 -1
- package/dist/client/_nuxt/Navbar.vue.f3d9c7e0.js +0 -1
- package/dist/client/_nuxt/StateEditor.vue.0146462c.js +0 -1
- package/dist/client/_nuxt/__blank.59338a05.js +0 -1
- package/dist/client/_nuxt/analyze-build.901f5150.js +0 -1
- package/dist/client/_nuxt/assets.75544131.js +0 -16
- package/dist/client/_nuxt/custom-_name_.dfe8f1a7.js +0 -1
- package/dist/client/_nuxt/default.5ca90489.js +0 -1
- package/dist/client/_nuxt/entry.331cb74a.js +0 -21
- package/dist/client/_nuxt/entry.b258ed6f.css +0 -1
- package/dist/client/_nuxt/full.84bf4dc2.js +0 -1
- package/dist/client/_nuxt/hooks.9324197d.js +0 -1
- package/dist/client/_nuxt/imports.daf39689.js +0 -1
- package/dist/client/_nuxt/index.1da213bf.js +0 -1
- package/dist/client/_nuxt/middleware.a6cf7e42.js +0 -1
- package/dist/client/_nuxt/modules.882302f4.js +0 -2
- package/dist/client/_nuxt/none.91495c5f.js +0 -1
- package/dist/client/_nuxt/open-graph.e5c037bf.js +0 -3
- package/dist/client/_nuxt/overview.0f0f3fdf.js +0 -1
- package/dist/client/_nuxt/pages.012c646d.js +0 -1
- package/dist/client/_nuxt/payload.3247eb06.js +0 -1
- package/dist/client/_nuxt/plugins.17878408.js +0 -1
- package/dist/client/_nuxt/runtime-configs.42aec493.js +0 -1
- package/dist/client/_nuxt/server-routes.e57e617b.js +0 -9
- package/dist/client/_nuxt/settings.1e99e54a.js +0 -1
- package/dist/client/_nuxt/state-modules.5120fd20.js +0 -1
- package/dist/client/_nuxt/storage.9d4df500.js +0 -1
- package/dist/client/_nuxt/timeline.587165be.js +0 -57
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as c,r as u,bl as m,aL as f,h as d,j as p,aK as _,o as s,m as b,i as v,k as g,a5 as h,aI as k,f as x,p as y,_ as B}from"./entry.704683a1.js";const C={relative:"","h-full":"","w-full":"","of-auto":""},V={inheritAttrs:!1},N=c({...V,__name:"DrawerRight",props:{modelValue:{type:Boolean},navbar:{},autoClose:{type:Boolean}},emits:["close"],setup(l,{emit:r}){const t=l,o=u(),{height:n}=m(()=>t.navbar,void 0,{box:"border-box"});return f(o,()=>{t.modelValue&&t.autoClose&&r("close")},{ignore:["a","button","summary",'[role="dialog"]']}),(e,a)=>{const i=B;return s(),d(_,{"enter-active-class":"duration-200 ease-in","enter-from-class":"transform translate-x-1/1","enter-to-class":"opacity-100","leave-active-class":"duration-200 ease-out","leave-from-class":"opacity-100","leave-to-class":"transform translate-x-1/1"},{default:p(()=>[e.modelValue?(s(),b("div",k({key:0,ref_key:"el",ref:o,border:"l base",flex:"~ col gap-1",absolute:"","bottom-0":"","right-0":"","z-10":"","z-20":"","of-auto":"","text-sm":"","glass-effect":"",style:{top:`${x(n)}px`}},e.$attrs),[v(i,{absolute:"","right-2":"","top-2":"","z-20":"","text-xl":"",icon:"carbon-close",onClick:a[0]||(a[0]=$=>e.$emit("close"))}),g("div",C,[h(e.$slots,"default")])],16)):y("",!0)]),_:3})}}});export{N as _};
|
package/dist/client/_nuxt/{DurationDisplay.vue.ae436800.js → DurationDisplay.vue.1533a045.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{d as s,a as u,o as d,m as f,v as p,t as o,f as n,k as c,E as m}from"./entry.704683a1.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))},[p(o(n(e)[0]),1),c("span",x,o(n(e)[1]),1)],2))}});export{g as _};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as u,a6 as f,a7 as c,a as k,b3 as v,o as t,h as y,j as B,m as n,F as l,v as d,t as s,f as a,k as C,p as N,E as b,an as g}from"./entry.704683a1.js";const E={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=k(()=>r.filepath&&p.value?v(r.filepath,p.value.rootDir):{path:r.filepath||""});return(e,i)=>(t(),y(g(e.filepath?"button":"span"),{class:b([e.filepath?"hover:underline":"",e.lineBreak?"":"ws-nowrap of-hidden truncate"]),"font-mono":"",title:e.override||e.filepath,onClick:i[0]||(i[0]=w=>e.filepath&&a(h)(e.filepath))},{default:B(()=>[e.override?(t(),n(l,{key:0},[d(s(e.override),1)],64)):a(o).moduleName?(t(),n(l,{key:1},[C("span",null,s(a(o).moduleName),1),e.subpath?(t(),n("span",E,s(a(o).path.slice(a(o).moduleName.length)),1)):N("",!0)],64)):(t(),n(l,{key:2},[d(s(a(o).path),1)],64))]),_:1},8,["class","title"]))}});export{F as _};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as c,r as _,f as o,m as s,k as d,i as a,j as i,aK as u,F as m,p as n,o as l,a5 as v,ah as k,_ as g}from"./entry.704683a1.js";const h=d("div",{"i-ri:question-mark":""},null,-1),x=[h],y={key:0,border:"l base",class:"prose",pos:"fixed bottom-0 right-0 top-0","z-200":"","h-full":"","w-150":"","overflow-auto":"",px8:"",py4:"","bg-base":""},B=c({__name:"HelpFab",setup(w){const e=_(!1),{showHelpButtons:p}=k();return(b,t)=>{const f=g;return o(p)?(l(),s(m,{key:0},[d("button",{pos:"absolute bottom-5 right-5",border:"~ base rounded-full ",flex:"~ items-center justify-center","z-110":"","h-11":"","w-11":"","backdrop-blur-8":"",bg:"bg-base op50!","light:shadow":"",hover:"bg-active",title:"Help",onClick:t[0]||(t[0]=r=>e.value=!o(e))},x),a(u,{name:"fade-in"},{default:i(()=>[o(e)?(l(),s("div",{key:0,class:"fixed bottom-0 left-0 right-0 top-0 z-100","bg-black:20":"","backdrop-blur-2":"",onClick:t[1]||(t[1]=r=>e.value=!1)})):n("",!0)]),_:1}),a(u,{name:"slide-in"},{default:i(()=>[o(e)?(l(),s("div",y,[v(b.$slots,"default"),a(f,{icon:"carbon-close",pos:"absolute top-3 right-3","rounded-full":"","text-xl":"",onClick:t[2]||(t[2]=r=>e.value=!1)})])):n("",!0)]),_:3})],64)):n("",!0)}}});export{B as _};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as k,h as o,j as a,A as b,o as t,i,k as r,t as c,p as _,m as g,n as h,aI as N,v as C,F as w,bu as x,a0 as y,C as B,ai as $}from"./entry.704683a1.js";import{_ as V}from"./NMarkdown.vue.7d7a1e6e.js";const v={"text-xl":""},I={flex:"~ gap2 wrap"},j=k({__name:"LaunchPage",props:{icon:{},title:{},description:{},actions:{}},emits:["action"],setup(P){return(e,F)=>{const l=x,m=V,p=y,d=B,u=$,f=b;return t(),o(f,null,{default:a(()=>[i(u,{flex:"~ col gap2",mxa:"","min-w-100":"","items-center":"",p6:""},{default:a(()=>[i(l,{mb2:"","text-5xl":"",icon:e.icon||e.icon,title:e.title},null,8,["icon","title"]),r("h1",v,c(e.title),1),e.description?(t(),o(m,{key:0,mb2:"","mt--1":"","text-center":"","text-base":"",op50:"",markdown:e.description},null,8,["markdown"])):_("",!0),r("div",I,[(t(!0),g(w,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),C(" "+c(n.label),1)]),_:2},1040,["disabled","to","target","onClick"]))),128))])]),_:1})]),_:1})}}});export{j as _};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as i,a4 as r,m as p,H as b,bB as u,f as a,k as n,l as h,aW as k,i as f,a5 as m,E as v,o as _,a0 as x}from"./entry.704683a1.js";const B=["checked","disabled"],V=["disabled"],y={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(o,s)=>{const d=x;return _(),p("label",{class:"n-checkbox hover:n-checkbox-hover select-none items-center n-disabled:n-disabled",checked:a(e)||null,disabled:o.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:o.disabled,onKeypress:s[1]||(s[1]=k(l=>e.value=!a(e),["enter"]))},null,40,V),[[u,a(e)]]),n("span",y,[f(d,{class:"n-checkbox-icon scale-0 transform op0 n-transition n-checked:scale-100 n-checked:op100"})]),n("span",{class:v([a(e)?"":"op50","n-transition"])},[m(o.$slots,"default")],2)],8,B)}}});export{$ as _};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.n-code-block-lines .shiki code{counter-increment:step calc(var(--start, 1) - 1);counter-reset:step}.n-code-block-lines .shiki code .line:before{color:#a3a3a380;content:counter(step);counter-increment:step;display:inline-block;margin-right:.5rem;padding-right:.5rem;text-align:right;width:
|
|
1
|
+
.n-code-block-lines .shiki code{counter-increment:step calc(var(--start, 1) - 1);counter-reset:step}.n-code-block-lines .shiki code .line:before{color:#a3a3a380;content:counter(step);counter-increment:step;display:inline-block;margin-right:.5rem;padding-right:.5rem;text-align:right;width:2.5rem}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{d as u}from"./client.fbe3eaa6.js";import{d as _,a as m,aq as k,o as n,m as s,E as d,k as t,F as r,n as f,t as g}from"./entry.704683a1.js";const h=["innerHTML"],C={class:"shiki"},v=["textContent"],y=t("br",null,null,-1),x=_({__name:"NCodeBlock",props:{code:{},lang:{},lines:{type:Boolean,default:!0},transformRendered:{}},emits:["loaded"],setup(a,{emit:c}){const o=a,l=m(()=>{const e=o.lang==="text"?{code:o.code,supported:!1}: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:d(["n-code-block",e.lines?"n-code-block-lines":""]),innerHTML:l.value.code},null,10,h)):(n(),s("pre",{key:1,class:d(["n-code-block",e.lines?"n-code-block-lines":""])},[t("pre",C,[t("code",null,[(n(!0),s(r,null,f(e.code.split(`
|
|
2
|
+
`),(i,p)=>(n(),s(r,{key:p},[t("span",{class:"line",textContent:g(i)},null,8,v),y],64))),128))])])],2))}});export{x as _};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as i,a4 as p,r as c,aL as u,o as f,m,a5 as t,i as v,j as _,v as b,f as a,k,E as C,C as V}from"./entry.704683a1.js";const $=i({__name:"NDropdown",props:{modelValue:{type:Boolean}},setup(r,{emit:l}){const e=p(r,"modelValue",l,{passive:!0}),s=c();return u(s,()=>{e.value=!1}),(o,n)=>{const d=V;return f(),m("div",{ref_key:"el",ref:s,class:"relative"},[t(o.$slots,"trigger",{enabled:a(e),click:()=>e.value=!a(e)},()=>[v(d,{onClick:n[0]||(n[0]=N=>e.value=!a(e))},{default:_(()=>[b(" Dropdown ")]),_:1})]),k("div",{class:C(["absolute z-10 border n-border-base rounded shadow n-transition n-bg-base",[a(e)?"op-100":"op0 pointer-events-none -translate-y-1"]])},[t(o.$slots,"default")],2)],512)}}});export{$ as _};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as t,o,m as s,E as a,p as n,a5 as r,k as l,t as i}from"./entry.704683a1.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{d as n,o as a,h as o,j as r,a5 as s,aI as t,an as p,f as i,x as l}from"./entry.704683a1.js";const c=n({__name:"NLink",props:{to:{},href:{},target:{}},setup(_){return(e,f)=>(a(),o(p(e.href||e.target?"a":i(l)),t(e.$props,{class:"n-link n-transition hover:n-link-hover n-link-base"}),{default:r(()=>[s(e.$slots,"default")]),_:3},16))}});export{c as _};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as o}from"./client.
|
|
1
|
+
import{d as o}from"./client.fbe3eaa6.js";import{d as t,f as e,o as a,h as r,an as s,t as d}from"./entry.704683a1.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{d as g,a4 as y,m as r,k as o,E as n,i as B,j as S,f as i,F as c,H as $,I as b,a5 as s,p as d,o as l,v as u,t as v,h as k,y as w,z as C,a0 as N,q as I}from"./entry.704683a1.js";import{_ as x}from"./NIconTitle.vue.e492e44a.js";const f=t=>(w("data-v-a73dbcfe"),t=t(),C(),t),V=["open"],z={"text-base":""},T={key:0,"text-sm":"",op50:""},D=f(()=>o("div",{class:"flex-auto"},null,-1)),E=f(()=>o("div",{class:"x-divider"},null,-1)),F=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=N,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:S(()=>[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(),k(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,[$(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),[[b,i(a)]])],64)):d("v-show-if",!0)],40,V),E],64)}}});const M=I(F,[["__scopeId","data-v-a73dbcfe"]]);export{M as _};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as u,a4 as p,m as l,a5 as t,H as f,bC as m,f as b,k as h,t as _,p as n,l as v,o as s,h as k,a0 as V}from"./entry.704683a1.js";const y={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"},B=["disabled"],w={key:0,value:"",disabled:"",hidden:""},g=u({__name:"NSelect",props:{modelValue:{default:void 0},placeholder:{default:""},icon:{default:""},disabled:{type:Boolean,default:!1}},setup(d,{emit:i}){const o=p(d,"modelValue",i,{passive:!0});return(e,a)=>{const r=V;return s(),l("div",y,[t(e.$slots,"icon",{},()=>[e.icon?(s(),k(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=>v(o)?o.value=c:null),disabled:e.disabled,class:"w-full flex-auto n-bg-base !outline-none"},[e.placeholder?(s(),l("option",w,_(e.placeholder),1)):n("",!0),t(e.$slots,"default")],8,B),[[m,b(o)]])])}}});export{g as _};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as i,a4 as c,o as r,m as u,H as h,bB as p,f as l,k as t,l as b,aW as f,a5 as v}from"./entry.704683a1.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),y=i({__name:"NSwitch",props:{modelValue:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},setup(d,{emit:o}){const e=c(d,"modelValue",o,{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]=f(n=>e.value=!l(e),["enter"]))},null,40,m),[[p,l(e)]]),w,v(a.$slots,"default")],8,k))}});export{y as _};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as a,o,m as c,a5 as n,h as t,p as i,k as r,a0 as p}from"./entry.704683a1.js";const l={class:"n-tip n-tip-base"},u=a({__name:"NTip",props:{icon:{}},setup(m){return(e,_)=>{const s=p;return o(),c("div",l,[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{d as r,m as c,k as d,a5 as s,E as n,o as i,i as p,U as u}from"./entry.704683a1.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{d as V,a4 as B,ad as _,r as w,b2 as O,b6 as C,a9 as $,o as i,m as p,k as u,E as c,f as a,t as J,p as l,a5 as D,aM as M,aN as P,F as R,H as j,i as z,h as v,aI as E,b7 as F,l as U,aq as A,_ as G}from"./entry.704683a1.js";import{_ as I}from"./DataSchemaButton.vue.31fe918d.js";import{U as q}from"./json-editor-vue.d2d6ca22.js";const H=["open"],T={flex:"~ gap2","select-none":"","items-center":"",px4:""},Q=V({__name:"StateEditor",props:{name:{},open:{type:Boolean},state:{},readonly:{type:Boolean}},emits:["update:open"],setup(b,{emit:g}){const s=b,n=B(s,"open",g,{passive:!0}),k=_(),o=w(),d=O(s.name,"$9Gvv2FGyYa");s.state?o.value=JSON.parse(JSON.stringify(s.state)):(typeof s.state=="number"||typeof s.state!="string")&&(o.value=s.state);const m=C(o,e=>{typeof e!="number"&&typeof e!="string"?f(e,s.state):d.value=e},{deep:!0});function f(e,r){for(const t in e)e[t]===null?r[t]=null:Array.isArray(e[t])?r[t]=e[t].slice():typeof e[t]=="object"?f(e[t],r[t]):r[t]=e[t]}async function h(){m.pause(),o.value=JSON.parse(JSON.stringify(s.state)),await A(),m.resume()}return(e,r)=>{const t=G,S=I,N=$("tooltip");return i(),p("div",{class:"state-editor-details",open:e.name?a(n):!0},[u("div",T,[e.name?(i(),p("button",{key:0,flex:"~","cursor-pointer":"","items-center":"",class:c(a(n)?"":"op50"),onClick:r[0]||(r[0]=y=>n.value=!a(n))},[u("div",{"i-carbon-chevron-right":"",transition:"",class:c(a(n)?"rotate-90 op0":"")},null,2),u("code",{px3:"",py1:"","font-mono":"",class:c(a(n)?"bg-[#8881] rounded-t":"rounded hover:bg-active")},J(e.name),3)],2)):l("",!0),D(e.$slots,"actions",M(P({isOpen:a(n),name:e.name,state:a(d)}))),a(n)?(i(),p(R,{key:1},[j(z(t,{title:"Refresh View",icon:"carbon-renew",onClick:h},null,512),[[N,"Refresh View",void 0,{bottom:!0}]]),a(o)?(i(),v(S,{key:0,getter:()=>({name:e.name,input:JSON.stringify(a(o))})},null,8,["getter"])):l("",!0)],64)):l("",!0)]),a(n)||!e.name?(i(),v(a(q),E({key:0,modelValue:a(o),"onUpdate:modelValue":r[1]||(r[1]=y=>U(o)?o.value=y:null)},e.$attrs,{class:["json-editor-vue",[a(k).value==="dark"?"jse-theme-dark":"",(e.name,"")]],"main-menu-bar":!1,"navigation-bar":!1,"status-bar":!1,"read-only":"readonly"in e?e.readonly:a(F),indentation:2,"tab-size":2}),null,16,["modelValue","class","read-only"])):l("",!0)],8,H)}}});export{Q as _};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as n,h as o,j as t,A as _,o as s,k as a}from"./entry.704683a1.js";const c=a("div",null," Your App ",-1),u=n({__name:"__blank",setup(r){return(p,d)=>{const e=_;return s(),o(e,{"h-screen":"","w-screen":"",px5:""},{default:t(()=>[c]),_:1})}}});export{u as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as j,a as V,r as F,o,m as i,k as e,F as c,n as E,E as S,f as n,t as m,p as b,G,i as r,j as a,v as _,H as A,I as D,J as P,K as L,C as U,L as X,M as ee,N as te,O as ne,P as oe,Q as le,R as ie,S as k,h as w,l as R,U as se,V as ae,A as re}from"./entry.704683a1.js";import{_ as ue}from"./FilepathItem.vue.a9853d6c.js";import{_ as de}from"./NTip.vue.6bf7cf97.js";import{_ as ce}from"./NCodeBlock.vue.a8601f10.js";import{_ as me}from"./NCheckbox.vue.76b79ec0.js";import{_ as _e}from"./HelpFab.vue.5d67494b.js";import"./client.fbe3eaa6.js";const pe={"h-full":"",grid:"~ rows-[max-content_1fr]"},fe={flex:"~ wrap","w-full":""},ve=["onClick"],he=e("div",{border:"b base","flex-auto":""},null,-1),ye={key:0,flex:"~ col gap-4 items-center justify-center",p4:""},be=e("div",{"flex-auto":""},null,-1),$e={grid:"~ cols-[30px_1fr] gap-x-2 gap-y-3 items-center justify-center","w-100":""},xe=e("div",{"i-carbon-commit":"","text-xl":""},null,-1),ge=e("div",{"text-sm":"",op50:""}," Name ",-1),we=e("div",{"i-carbon-time":"","text-xl":""},null,-1),ze=e("div",{"text-sm":"",op50:""}," Build duration ",-1),Be=e("div",{"i-carbon-cics-program":"","text-xl":""},null,-1),ke=e("div",{"text-sm":"",op50:""}," Client bundle size ",-1),Ce=e("div",{"i-carbon-bare-metal-server":"","text-xl":""},null,-1),Ne=e("div",{"text-sm":"",op50:""}," Nitro bundle size ",-1),Te=e("div",{"i-carbon-edge-node":"","text-xl":""},null,-1),Ae=e("div",{"text-sm":"",op50:""}," Built ",-1),De=e("div",{"i-carbon:folder-parent":"","text-xl":""},null,-1),Ie=e("div",{"text-sm":"",op50:""}," Report Path ",-1),Ve=e("div",{"flex-auto":""},null,-1),I="/__nuxt_devtools__/analyze/",Fe=j({__name:"BuildAnalyzeDetails",props:{current:{},prev:{}},setup(C){const p=C,f=V(()=>{const t=[{name:"Overview",id:"overview"}];return p.current.features.bundleClient&&t.push({name:"Client Bundle",id:"bundle-client"}),p.current.features.bundleNitro&&t.push({name:"Nitro Bundle",id:"bundle-nitro"}),p.current.features.viteInspect&&t.push({name:"Vite Inspect",id:"vite-inspect"}),t}),l=F(f.value[0]);function $(t){return t<1024?`${t}B`:t<1024*1024?`${(t/1024).toFixed(1)}KB`:t<1024*1024*1024?`${(t/1024/1024).toFixed(1)}MB`:`${(t/1024/1024/1024).toFixed(1)}GB`}function g(t){return`${((t.endTime-t.startTime)/1e3).toFixed(1)}s`}async function x(t){return P.clearAnalyzeBuilds(await L(),[t])}return(t,u)=>{const z=ue,N=U;return o(),i("div",pe,[e("div",fe,[(o(!0),i(c,null,E(n(f),(v,T)=>(o(),i("button",{key:T,px4:"",py2:"",border:"r base",hover:"bg-active",class:S(v.id===n(l).id?"":"border-b"),onClick:d=>l.value=v},[e("div",{class:S(v.id===n(l).id?"":"op30")},m(v.name),3)],10,ve))),128)),he]),n(l).id==="overview"?(o(),i("div",ye,[be,e("div",$e,[xe,e("div",null,[ge,e("div",null,m(t.current.name),1)]),we,e("div",null,[ze,e("div",null,m(g(t.current)),1)]),t.current.size?.clientBundle?(o(),i(c,{key:0},[Be,e("div",null,[ke,e("div",null,m($(t.current.size.clientBundle)),1)])],64)):b("",!0),t.current.size.nitroBundle?(o(),i(c,{key:1},[Ce,e("div",null,[Ne,e("div",null,m($(t.current.size.nitroBundle)),1)])],64)):b("",!0),Te,e("div",null,[Ae,e("div",null,m(n(G)(new Date(t.current.endTime))),1)]),De,e("div",null,[Ie,r(z,{filepath:t.current.analyzeDir},null,8,["filepath"])])]),Ve,r(N,{n:"rose",icon:"carbon-delete",onClick:u[0]||(u[0]=v=>x(t.current.name))},{default:a(()=>[_(" Delete this report ")]),_:1})])):b("",!0),u._lazyshow1||n(l).id==="bundle-client"?(u._lazyshow1=!0,o(),i(c,null,[A(e("iframe",{src:`${I}${t.current.slug}/client.html`,"h-full":"","w-full":""},null,8,["src"]),[[D,n(l).id==="bundle-client"]])],64)):b("v-show-if",!0),u._lazyshow2||n(l).id==="bundle-nitro"?(u._lazyshow2=!0,o(),i(c,null,[A(e("iframe",{src:`${I}${t.current.slug}/nitro.html`,"h-full":"","w-full":""},null,8,["src"]),[[D,n(l).id==="bundle-nitro"]])],64)):b("v-show-if",!0),u._lazyshow3||n(l).id==="vite-inspect"?(u._lazyshow3=!0,o(),i(c,null,[A(e("iframe",{src:`${I}${t.current.slug}/.vite-inspect/`,"h-full":"","w-full":""},null,8,["src"]),[[D,n(l).id==="vite-inspect"]])],64)):b("v-show-if",!0)])}}}),Se={class:"markdown-body"},Pe=e("h1",null,"Build Analyze",-1),Re=e("p",null,[_("DevTools provides a build analyze tool to help you understand the size of your app in production. Whenever you start a new build, it runs the command "),e("code",null,"nuxt build --analyze"),_(" and present the output data directly in DevTools for easy browsing and comparing.")],-1),je=[Pe,Re],Ee={__name:"analyze-build",setup(C,{expose:p}){return p({frontmatter:{}}),(l,$)=>(o(),i("div",Se,je))}},Ge={flex:"~ col"},Le=["onClick"],Ue={flex:"~ gap-1 items-center wrap","w-full":"","text-sm":"",op60:""},Oe=e("div",{"i-carbon-time":""},null,-1),He=e("div",{"flex-auto":""},null,-1),Ke=e("div",{"x-divider":""},null,-1),Me={flex:"~ items-center justify-center wrap",p4:""},Je={flex:"~ col gap-1","w-250":"",p4:""},Qe=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=j({__name:"analyze-build",setup(C){const p=X(),f=ee(),l=te(),$=ne("analyze-build:slug",""),g=V(()=>f.value?.builds.find(d=>d.slug===$.value)??f.value?.builds[0]),x=F(!1),t=F(""),u=V(()=>f.value?.builds.some(d=>d.name===t.value.trim()));async function z(){t.value=await P.generateAnalyzeBuildName(),await p.start()&&(k.value={name:t.value,processId:await P.startAnalyzeBuild(await L(),t.value)},x.value&&v())}const N=oe();function v(){k.value?.processId&&(N.value=k.value.processId,l.push("/modules/terminals"))}function T(d){return`${((d.endTime-d.startTime)/1e3).toFixed(1)}s`}return le(()=>[{id:"action:analyze-build: start",title:"Start a new analyze build",icon:"i-carbon-edge-node",action:z}]),(d,h)=>{const B=U,O=Fe,H=re,K=ie,M=se,J=de,Q=ce,W=me,Y=ae,Z=Ee,q=_e;return o(),i(c,null,[r(K,{"left-size":30},{left:a(()=>[e("div",Ge,[(o(!0),i(c,null,E(n(f)?.builds,s=>(o(),i(c,{key:s.slug},[e("button",{flex:"~ col gap1","hover:bg-active":"",p3:"",class:S(s.slug===n(g)?.slug?"text-primary bg-active":""),onClick:y=>$.value=s.slug},[e("code",null,m(s.name),1),e("div",Ue,[Oe,e("span",null,m(T(s)),1),He,e("span",null,m(n(G)(new Date(s.endTime))),1)])],10,Le),Ke],64))),128)),e("div",Me,[("processAnalyzeBuildInfo"in d?d.processAnalyzeBuildInfo:n(k))?(o(),w(B,{key:1,n:"primary",icon:"carbon-circle-dash animate-spin",onClick:h[1]||(h[1]=s=>v())},{default:a(()=>[_(" Building... ")]),_:1})):(o(),w(B,{key:0,n:"primary",icon:"carbon-edge-node",onClick:h[0]||(h[0]=s=>z())},{default:a(()=>[_(" Start a new build ")]),_:1}))])])]),right:a(()=>[n(g)?(o(),w(O,{key:0,current:n(g)},null,8,["current"])):(o(),w(H,{key:1}))]),_:1}),r(n(p),null,{default:a(({resolve:s})=>[r(Y,{"model-value":!0,onClose:y=>s(!1)},{default:a(()=>[e("div",Je,[Qe,We,r(M,{modelValue:n(t),"onUpdate:modelValue":h[2]||(h[2]=y=>R(t)?t.value=y:null),placeholder:"Build name"},null,8,["modelValue"]),n(u)?(o(),w(J,{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(Q,{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=>R(x)?x.value=y:null),mt2:"",n:"primary"},{default:a(()=>[_(" Navigate to terminal ")]),_:1},8,["modelValue"]),e("div",qe,[r(B,{onClick:y=>s(!1)},{default:a(()=>[_(" Cancel ")]),_:2},1032,["onClick"]),r(B,{n:"solid primary",onClick:y=>s(!0)},{default:a(()=>[_(" Start ")]),_:2},1032,["onClick"])])])]),_:2},1032,["onClose"])]),_:1}),r(q,null,{default:a(()=>[r(Z)]),_:1})],64)}}});export{st as default};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import{d as O,r as S,W as Z,o as a,m as d,i as m,f as t,k as e,v as D,F as T,n as R,h as I,j as y,p as j,E as G,X as L,Y as ce,Z as ue,J as X,K as J,_ as Y,a0 as ee,U as te,C as ne,a as C,a1 as de,a2 as pe,a3 as oe,t as A,a4 as se,a5 as me,l as M,a6 as fe,b as Q,a7 as ve,e as he,a8 as _e,a9 as ae,H as W,V as ge,aa as xe,ab as be,ac as we}from"./entry.704683a1.js";import{_ as ye}from"./Navbar.vue.c8f5ea35.js";import{_ as $e}from"./NSectionBlock.6778ba18.js";import{_ as ke}from"./FilepathItem.vue.a9853d6c.js";import{_ as Ce}from"./CodeSnippets.vue.e2cc365d.js";import{_ as Pe}from"./DrawerRight.vue.3bbd0e76.js";import{D as Ae}from"./constants.4e5eba24.js";import"./NIconTitle.vue.e492e44a.js";import"./NCodeBlock.vue.a8601f10.js";import"./client.fbe3eaa6.js";const De={key:0,"h-full":"","w-full":"",flex:"","items-center":"","justify-center":""},Ve={for:"drop-zone-input","text-3xl":""},Ne={key:1,relative:"","h-full":"","w-full":"",grid:"~ rows-[max-content_1fr_max-content]"},Fe=e("div",{px6:"",py6:""},[e("h1",{"text-2xl":""}," Upload "),e("p",{"text-sm":"",op50:""}," Drag and drop files to upload ")],-1),Ie={grid:"~ cols-minmax-8rem","overflow-auto":"",p6:""},Se={flex:"","items-center":"","justify-center":"","of-hidden":"",rounded:"","rounded-t-lg":"","bg-active":"","object-cover":"",class:"aspect-1/1",border:"~ base"},Te=["src"],je={flex:"~ gap1","items-center":""},Ee={flex:"~ gap-2","items-center":"","justify-center":"",p8:""},Be=O({__name:"DropZone",props:{folder:{type:String,required:!0}},setup(V){const i=V,c=S(!1),o=S(),p=S([]),f=["image","video"];function z(s){o.value=s.target,c.value=!0}function v(s){s.target===o.value&&(c.value=!1)}function P(s){s.preventDefault()}function U(s){s.preventDefault(),E(s.dataTransfer.files)}function E(s){const u=Array.from(s||[]);if(u.length){const w=[],r=p.value.map(n=>n.name);for(const n of u)if(r.includes(n.name)){let l=1;const[_,k]=n.name.split(".");for(;r.includes(`${_} (${l}).${k}`);)l++;const $=`${_}-${l}.${k}`,q=new Blob([n],{type:n.type}),K=new File([q],$,{lastModified:Date.now()});w.push(K),r.push($)}else n.type===""?L({message:"Folders are not supported yet",icon:"carbon:face-dissatisfied",classes:"text-orange"}):f.some(l=>n.type.includes(l))?w.push(n):L({message:`"${n.type}" file type is not allowed`,icon:"carbon:face-dissatisfied",classes:"text-orange"});p.value=[...p.value,...w]}}async function g(){if(ce.value||ue.value)return;const s=[];for(const u of p.value){const w=new FileReader;w.readAsDataURL(u);const n=(await new Promise(l=>{w.onload=()=>l(w.result)})).split(";base64,").pop();s.push({name:u.name,data:n})}await X.writeStaticAssets(await J(),[...s],i.folder).then(()=>{N(),L({message:"Files uploaded successfully!",icon:"i-carbon:checkmark"})}).catch(u=>{console.error(u),N(),L({message:`Error uploading files: ${u}`,icon:"i-carbon-warning",classes:"text-red"})}),c.value=!1}function h(s){p.value?.splice(s,1)}function x(s){return URL.createObjectURL(s)}function B(s,u){const[w,r]=s.name.split("."),n=u.replace(/\.\w+$/,""),l=`${n}.${r}`;return n.length===0?(alert("File name must be at least 1 characters long"),w):(Object.defineProperty(s,"name",{value:l,writable:!1}),p.value.splice(p.value.indexOf(s),1,s),s)}function b(){p.value=[]}function N(){c.value=!1,b()}return Z("dragenter",z),Z("dragleave",v),Z("dragover",P),Z("drop",U),(s,u)=>{const w=Y,r=ee,n=te,l=ne;return a(),d("div",{fixed:"","bottom-0":"","left-13":"","right-0":"","top-0":"","z-10":"","backdrop-blur-20":"","transition-all":"",class:G(t(c)?"opacity-100 visible":"opacity-0 invisible")},[m(w,{icon:"carbon-close",absolute:"","right-5":"","top-5":"","z-20":"","text-xl":"",onClick:N}),t(p)?.length?(a(),d("div",Ne,[Fe,e("div",Ie,[(a(!0),d(T,null,R(t(p),(_,k)=>(a(),d("div",{key:_.name,flex:"~ col gap-2",relative:"","h-50":"","w-40":"","items-center":""},[e("div",Se,[e("img",{"h-full":"","w-full":"","rounded-t-lg":"","object-cover":"",src:x(_)},null,8,Te)]),e("div",je,[m(n,{n:"xs","flex-auto":"","model-value":_.name,"onUpdate:modelValue":$=>B(_,$.target.value)},null,8,["model-value","onUpdate:modelValue"]),m(w,{icon:"carbon-delete","flex-none":"",title:"Remove file",onClick:$=>h(k)},null,8,["onClick"])])]))),128))]),e("div",Ee,[t(p).length?(a(),I(l,{key:0,n:"red",onClick:b},{default:y(()=>[m(r,{icon:"carbon-clean"}),D(" Clear ")]),_:1})):j("",!0),m(l,{disabled:!t(p).length,n:"primary solid",onClick:g},{default:y(()=>[m(r,{icon:"carbon-cloud-upload"}),D(" Upload ")]),_:1},8,["disabled"])])])):(a(),d("div",De,[e("label",Ve,[m(r,{icon:"carbon-cloud-upload","mr-2":""}),D(" Drop files here or click to select ")]),e("input",{id:"drop-zone-input",type:"file",multiple:"",hidden:"",onChange:u[0]||(u[0]=_=>E(_.target.files))},null,32)]))],2)}}}),Le=O({__name:"AssetFontPreview",props:{asset:{}},setup(V){const i=V,c=C(()=>`devtools-assets-${de(i.asset)}`);return pe(C(()=>`
|
|
2
|
+
@font-face {
|
|
3
|
+
font-family: '${c.value}';
|
|
4
|
+
src: url('${i.asset.publicPath}');
|
|
5
|
+
}
|
|
6
|
+
`)),(o,p)=>(a(),d("div",{"of-hidden":"",style:oe({fontFamily:`'${t(c)}'`})}," 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))}}),Ue={flex:"","items-center":"","justify-center":"","of-hidden":"","bg-active":"","object-cover":"",p1:""},ze=["src"],Me={key:2,"i-carbon-document":"","text-3xl":"",op20:""},Oe={key:3,"w-full":"","self-start":"",p4:""},Re=["textContent"],Xe={key:4},Ke=["src","autoplay","controls"],Ze={key:5,"i-carbon-help":"","text-3xl":"",op20:""},le=O({__name:"AssetPreview",props:{asset:{},textContent:{},detail:{type:Boolean}},setup(V){return(i,c)=>{const o=Le;return a(),d("div",Ue,[i.asset.type==="image"?(a(),d("img",{key:0,src:i.asset.publicPath},null,8,ze)):i.asset.type==="font"?(a(),I(o,{key:i.asset.publicPath,asset:i.asset,"self-stretch":"",p2:"","text-2xl":""},null,8,["asset"])):i.asset.type==="text"&&!i.textContent?(a(),d("div",Me)):i.asset.type==="text"&&i.textContent?(a(),d("div",Oe,[e("pre",{"max-h-10rem":"","of-hidden":"","text-xs":"","font-mono":"",textContent:A(i.textContent)},null,8,Re)])):i.asset.type==="video"?(a(),d("div",Xe,[e("video",{src:i.asset.publicPath,autoplay:i.detail,controls:i.detail},null,8,Ke)])):(a(),d("div",Ze))])}}}),Ge={flex:"~ col gap-1",hover:"bg-active","items-center":"","of-hidden":"",rounded:"",p2:""},We={"w-full":"","of-hidden":"",truncate:"","ws-nowrap":"","text-center":"","text-xs":""},qe=O({__name:"AssetGridItem",props:{asset:{},folder:{}},setup(V){const i=V,c=C(()=>i.folder&&i.asset.path.startsWith(i.folder)?i.asset.path.slice(i.folder.length):i.asset.path);return(o,p)=>{const f=le;return a(),d("button",Ge,[m(f,{"h-30":"","w-30":"",rounded:"",border:"~ base",asset:o.asset},null,8,["asset"]),e("div",We,A(t(c)),1)])}}}),He=e("div",{"x-divider":""},null,-1),ie=O({__name:"AssetListItem",props:{item:{},index:{default:0},modelValue:{}},setup(V,{emit:i}){const c=V,o=se(c,"modelValue",i,{passive:!0}),p=C(()=>c.item?.children?.length),f=S(!0),z=C(()=>p.value?"i-carbon-folder":c.item.type==="image"?"i-carbon-image":c.item.type==="video"?"i-carbon-video":c.item.type==="audio"?"i-carbon-volume-up":c.item.type==="font"?"i-carbon-text-small-caps":c.item.type==="text"?"i-carbon-document":c.item.type==="json"?"i-carbon-json":"i-carbon-document-blank");return(v,P)=>{const U=ee,E=ie;return a(),d("div",null,[e("button",{flex:"~ gap-2","w-full":"","items-center":"",hover:"bg-active",px4:"",py1:"",style:oe({paddingLeft:`calc(1rem + ${v.index*1.5}em)`}),class:G({"bg-active":!t(p)&&t(o)?.filePath===v.item?.filePath}),onClick:P[0]||(P[0]=g=>t(p)?f.value=!t(f):o.value=v.item)},[e("div",{class:G(t(z))},null,2),e("span",{class:G({"flex items-center":t(p)}),"flex-auto":"","text-start":"","text-sm":"","font-mono":""},A(v.item.path),3),t(p)?(a(),I(U,{key:0,icon:"carbon:chevron-right","transform-rotate":t(f)?90:0,transition:""},null,8,["transform-rotate"])):j("",!0)],6),He,t(f)?me(v.$slots,"default",{key:0},()=>[(a(!0),d(T,null,R(v.item?.children,g=>(a(),I(E,{key:g.filepath,modelValue:t(o),"onUpdate:modelValue":P[1]||(P[1]=h=>M(o)?o.value=h:null),item:g,index:v.index+1},null,8,["modelValue","item","index"]))),128))]):j("",!0)])}}}),Je={flex:"~ col gap-4","min-h-full":"","w-full":"","of-hidden":"",p4:""},Ye=e("div",{flex:"~ gap2","mb--2":"","items-center":"",op50:""},[e("div",{"x-divider":""}),e("div",{"flex-none":""}," Preview "),e("div",{"x-divider":""})],-1),Qe={flex:"~","items-center":"","justify-center":""},et=e("div",{flex:"~ gap2","mb--2":"","items-center":"",op50:""},[e("div",{"x-divider":""}),e("div",{"flex-none":""}," Details "),e("div",{"x-divider":""})],-1),tt={"max-w-full":"","w-full":"","table-fixed":""},nt=e("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," Filepath ",-1),ot={flex:"~ gap-1","w-full":"","items-center":""},st=e("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," Public Path ",-1),at={flex:"~ gap-1","w-full":"","items-center":"","of-hidden":""},lt={"flex-auto":"","of-hidden":"",truncate:"","ws-pre":"","font-mono":""},it=e("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," Type ",-1),rt={capitalize:""},ct=e("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," Image Size ",-1),ut={key:0},dt=e("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," Aspect Ratio ",-1),pt=e("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," File size ",-1),mt=e("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," Last modified ",-1),ft={op70:""},vt=e("div",{flex:"~ gap2","mb--2":"","items-center":"",op50:""},[e("div",{"x-divider":""}),e("div",{"flex-none":""}," Actions "),e("div",{"x-divider":""})],-1),ht={flex:"~ gap2 wrap"},_t=e("div",{"flex-auto":""},null,-1),gt={flex:"~ col gap-4","min-h-full":"","w-full":"","of-hidden":"",p8:""},xt=e("span",null," Are you sure you want to delete this asset? ",-1),bt={flex:"~ gap2 wrap justify-center"},wt={flex:"~ col gap-4","min-h-full":"","w-full":"","of-hidden":"",p8:""},yt={flex:"~ gap2 wrap justify-center"},$t=O({__name:"AssetDetails",props:{modelValue:{}},setup(V,{emit:i}){const o=se(V,"modelValue",i,{passive:!0}),p=fe(),f=Q(()=>{if(o.value.type==="image")return X.getImageMeta(o.value.filePath)}),z=Q(()=>{if(o.value.type==="text")return X.getTextAssetContent(o.value.filePath)}),v=ve(),P=C(()=>(v.value?._installedModules||[]).some(n=>n.meta?.name==="@nuxt/image"||n.meta?.name==="@nuxt/image-edge")),U=C(()=>{const r=[];if(o.value.type==="image"){const n=f.value?.width?`
|
|
7
|
+
width="${f.value.width}"
|
|
8
|
+
height="${f.value.height}" `:" ";return r.push({lang:"vue-html",code:`<img${n}
|
|
9
|
+
src="${o.value.publicPath}"
|
|
10
|
+
/>`,name:"Plain Image"}),P.value&&r.push({lang:"vue-html",code:`<NuxtImage${n}
|
|
11
|
+
src="${o.value.publicPath}"
|
|
12
|
+
/>`,name:"Nuxt Image",docs:"https://image.nuxtjs.org/components/nuxt-img"},{lang:"vue-html",code:`<NuxtPicture${n}
|
|
13
|
+
src="${o.value.publicPath}"
|
|
14
|
+
/>`,name:"Nuxt Picture",docs:"https://image.nuxtjs.org/components/nuxt-picture"}),r}return r.push({lang:"html",code:`<a download href="${o.value.publicPath}">
|
|
15
|
+
Download ${o.value.path.split("/").slice(-1)[0]}
|
|
16
|
+
</a>`,name:"Download link"}),r}),E=he(),g=_e(()=>o.value.mtime),h=C(()=>{const r=o.value.size;return r<1024?`${r} B`:r<1024*1024?`${(r/1024).toFixed(2)} KB`:`${(r/1024/1024).toFixed(2)} MB`}),x=C(()=>{if(!f.value?.width||!f.value?.height)return"";const r=(l,_)=>_?r(_,l%_):l,n=r(f.value.width,f.value.height);return n>3?`${f.value.width/n}:${f.value.height/n}`:""}),B=C(()=>["image","text","video","font"].includes(o.value.type)),b=S(!1);async function N(){try{await X.deleteStaticAsset(await J(),o.value.filePath),o.value=void 0,b.value=!1,L({message:"Asset deleted",icon:"i-carbon-checkmark",classes:"text-green"})}catch{L({message:"Something went wrong!",icon:"i-carbon-warning",classes:"text-red"})}}const s=S(!1),u=S("");async function w(){const r=o.value.filePath.split("/"),n=r.slice(-1)[0].split(".").slice(0,-1).join(".");if(!u.value||u.value===n)return L({message:"Please enter a new name",icon:"i-carbon-warning",classes:"text-orange"});try{const l=r.slice(-1)[0].split(".").slice(-1)[0],_=`${r.slice(0,-1).join("/")}/${u.value}.${l}`;await X.renameStaticAsset(await J(),o.value.filePath,_),o.value=void 0,s.value=!1,L({message:"Asset renamed",icon:"i-carbon-checkmark",classes:"text-green"})}catch{L({message:"Something went wrong!",icon:"i-carbon-warning",classes:"text-red"})}}return(r,n)=>{const l=le,_=ke,k=Y,$=ne,q=Ce,K=ge,re=te,H=ae("tooltip");return a(),d(T,null,[e("div",Je,[t(B)?(a(),d(T,{key:0},[Ye,e("div",Qe,[m(l,{detail:"","max-h-80":"","min-h-20":"","min-w-20":"","w-auto":"",rounded:"",border:"~ base",asset:t(o),"text-content":t(z)},null,8,["asset","text-content"])])],64)):j("",!0),et,e("table",tt,[e("tbody",null,[e("tr",null,[nt,e("td",null,[e("div",ot,[m(_,{filepath:t(o).filePath,"text-left":""},null,8,["filepath"]),W(m(k,{"flex-none":"",title:"Open in Editor",icon:"carbon-launch",onClick:n[0]||(n[0]=F=>t(p)(t(o).filePath))},null,512),[[H,"Open in Editor"]])])])]),e("tr",null,[st,e("td",null,[e("div",at,[e("div",lt,A(t(o).publicPath),1),W(m(k,{"flex-none":"",title:"Copy public path",icon:"carbon-copy",onClick:n[1]||(n[1]=F=>t(E)(t(o).publicPath))},null,512),[[H,"Copy public path"]]),W(m(k,{"flex-none":"",to:t(o).publicPath,icon:"carbon-launch",target:"_blank",title:"Open in browser"},null,8,["to"]),[[H,"Open in browser"]])])])]),e("tr",null,[it,e("td",rt,A(t(o).type),1)]),t(f)?.width?(a(),d(T,{key:0},[e("tr",null,[ct,e("td",null,A(t(f).width)+" x "+A(t(f).height),1)]),t(x)?(a(),d("tr",ut,[dt,e("td",null,A(t(x)),1)])):j("",!0)],64)):j("",!0),e("tr",null,[pt,e("td",null,A(t(h)),1)]),e("tr",null,[mt,e("td",null,[D(A(new Date(t(o).mtime).toLocaleString())+" ",1),e("span",ft,"("+A(t(g))+")",1)])])])]),vt,e("div",ht,[m($,{to:t(o).publicPath,download:"",target:"_blank",icon:"carbon-download",n:"green"},{default:y(()=>[D(" Download ")]),_:1},8,["to"]),m($,{icon:"carbon-text-annotation-toggle",n:"blue",onClick:n[2]||(n[2]=F=>s.value=!t(s))},{default:y(()=>[D(" Rename ")]),_:1}),m($,{icon:"carbon-delete",n:"red",onClick:n[3]||(n[3]=F=>b.value=!t(b))},{default:y(()=>[D(" Delete ")]),_:1}),t(o).type==="image"?(a(),I($,{key:0,disabled:"",icon:"carbon-image-service"},{default:y(()=>[D(" Optimize image (Coming soon) ")]),_:1})):j("",!0)]),_t,t(U).length?(a(),I(q,{key:1,border:"t base","mx--4":"","mb--4":"","code-snippets":t(U)},null,8,["code-snippets"])):j("",!0)]),m(K,{modelValue:t(b),"onUpdate:modelValue":n[5]||(n[5]=F=>M(b)?b.value=F:null)},{default:y(()=>[e("div",gt,[xt,e("div",bt,[m($,{icon:"carbon-close",onClick:n[4]||(n[4]=F=>b.value=!1)},{default:y(()=>[D(" Cancel ")]),_:1}),m($,{icon:"carbon-delete",n:"red",onClick:N},{default:y(()=>[D(" Delete ")]),_:1})])])]),_:1},8,["modelValue"]),m(K,{modelValue:t(s),"onUpdate:modelValue":n[8]||(n[8]=F=>M(s)?s.value=F:null)},{default:y(()=>[e("div",wt,[m(re,{modelValue:t(u),"onUpdate:modelValue":n[6]||(n[6]=F=>M(u)?u.value=F:null),placeholder:"New name",n:"blue"},null,8,["modelValue"]),e("div",yt,[m($,{icon:"carbon-close",onClick:n[7]||(n[7]=F=>s.value=!1)},{default:y(()=>[D(" Cancel ")]),_:1}),m($,{icon:"carbon-text-annotation-toggle",n:"blue",onClick:w},{default:y(()=>[D(" Rename ")]),_:1})])])]),_:1},8,["modelValue"])],64)}}}),kt={"h-full":"","of-auto":""},Ct={"flex-none":"",flex:"~ gap2 items-center"},Pt={op50:""},At={key:0},Dt={"mt--4":"",px2:"",grid:"~ cols-minmax-8rem"},Vt={key:1,p2:"",grid:"~ cols-minmax-8rem"},Nt={key:1},Mt=O({__name:"assets",setup(V){const i=xe(),c=S(""),o=C(()=>new be(i.value||[],{keys:["path"]})),p=C(()=>c.value?o.value.search(c.value).map(h=>h.item):i.value||[]),f=C(()=>{const g={};for(const h of p.value){const x=`${h.path.split("/").slice(0,-1).join("/")}/`;g[x]||(g[x]=[]),g[x].push(h)}return Object.entries(g).sort(([h],[x])=>h.localeCompare(x))}),z=C(()=>{const g={path:"public",children:[]},h=(x,B,b)=>{const[N,...s]=B;let u=x.children.find(w=>w.path===N);u||(u={...b,path:N,children:[]},x.children.push(u)),s.length>1?h(u,s,b):s.length===1&&u.children.push({...b,path:s[0]})};return p.value.forEach(x=>{const B=x.path.split("/").filter(b=>b!=="");h(g,B,x)}),g.children}),v=S(),P=S("grid");function U(){P.value=P.value==="list"?"grid":"list"}we("Escape",()=>{v.value=void 0});const E=S();return(g,h)=>{const x=Y,B=ye,b=Be,N=qe,s=$e,u=ie,w=$t,r=Pe,n=ae("tooltip");return a(),d("div",kt,[m(B,{ref_key:"navbar",ref:E,search:t(c),"onUpdate:search":h[0]||(h[0]=l=>M(c)?c.value=l:null),pb2:""},{actions:y(()=>[e("div",Ct,[W(m(x,{"text-lg":"",icon:t(P)==="grid"?"i-carbon-list":"i-carbon-grid",title:"Toggle view",onClick:U},null,8,["icon"]),[[n,"Toggle View",void 0,{"bottom-end":!0}]])])]),default:y(()=>[e("div",Pt,[t(c)?(a(),d("span",At,A(t(p).length)+" matched · ",1)):j("",!0),e("span",null,A(t(i)?.length)+" assets in total",1)])]),_:1},8,["search"]),m(b,{folder:"/"}),t(P)==="grid"?(a(),d(T,{key:0},[t(f).length>1?(a(!0),d(T,{key:0},R(t(f),([l,_])=>(a(),I(s,{key:l,text:l,description:`${_.length} items`,open:_.length<=("DETAILS_MAX_ITEMS"in g?g.DETAILS_MAX_ITEMS:t(Ae)),padding:!1},{default:y(()=>[e("div",Dt,[(a(!0),d(T,null,R(_,k=>(a(),I(N,{key:k.path,asset:k,folder:l,onClick:$=>v.value=k},null,8,["asset","folder","onClick"]))),128))])]),_:2},1032,["text","description","open"]))),128)):(a(),d("div",Vt,[(a(!0),d(T,null,R(t(p),l=>(a(),I(N,{key:l.path,asset:l,onClick:_=>v.value=l},null,8,["asset","onClick"]))),128))]))],64)):(a(),d("div",Nt,[(a(!0),d(T,null,R(t(z),(l,_)=>(a(),I(u,{key:_,modelValue:t(v),"onUpdate:modelValue":h[1]||(h[1]=k=>M(v)?v.value=k:null),item:l},null,8,["modelValue","item"]))),128))])),m(r,{"model-value":!!t(v),"auto-close":"","w-120":"",navbar:t(E),onClose:h[3]||(h[3]=l=>v.value=void 0)},{default:y(()=>[t(v)?(a(),I(w,{key:0,modelValue:t(v),"onUpdate:modelValue":h[2]||(h[2]=l=>M(v)?v.value=l:null)},null,8,["modelValue"])):j("",!0)]),_:1},8,["model-value","navbar"])])}}});export{Mt as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{bk as f,by as r}from"./entry.704683a1.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};
|