@nuxt/devtools 0.7.6 → 0.8.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 +9 -3
- 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.f2e9b29c.js → Badge.73590739.js} +1 -1
- package/dist/client/_nuxt/{CodeDiff.vue.9b0b0885.js → CodeDiff.vue.5bc59452.js} +1 -1
- package/dist/client/_nuxt/{ComposableItem.vue.3f961e9e.js → ComposableItem.vue.b891778e.js} +1 -1
- package/dist/client/_nuxt/{DataSchemaButton.vue.a6df5cb8.js → DataSchemaButton.vue.58aa4fbb.js} +1 -1
- package/dist/client/_nuxt/{DataSchemaDrawer.be265d1e.js → DataSchemaDrawer.b54a9c8c.js} +1 -1
- package/dist/client/_nuxt/{DrawerRight.vue.92472251.js → DrawerRight.vue.462f9048.js} +1 -1
- package/dist/client/_nuxt/{DurationDisplay.vue.ebef3eee.js → DurationDisplay.vue.281ea057.js} +1 -1
- package/dist/client/_nuxt/FilepathItem.vue.3d85c8b7.js +1 -0
- package/dist/client/_nuxt/{HelpFab.vue.4d768974.js → HelpFab.vue.7e36821f.js} +1 -1
- package/dist/client/_nuxt/{LaunchPage.vue.c2e514b2.js → LaunchPage.vue.fd74a96c.js} +1 -1
- package/dist/client/_nuxt/{NCheckbox.vue.78fd8d82.js → NCheckbox.vue.1ddacd54.js} +1 -1
- package/dist/client/_nuxt/{NCodeBlock.vue.c7ed33b1.js → NCodeBlock.vue.31f18b3e.js} +1 -1
- package/dist/client/_nuxt/{NDropdown.vue.c7f63cd6.js → NDropdown.vue.ba86ab23.js} +1 -1
- package/dist/client/_nuxt/{NIconTitle.vue.2f7c2128.js → NIconTitle.vue.9acdbad1.js} +1 -1
- package/dist/client/_nuxt/{NLink.vue.3fcc5a37.js → NLink.vue.a8242afb.js} +1 -1
- package/dist/client/_nuxt/{NMarkdown.vue.e4405095.js → NMarkdown.vue.12b1eecd.js} +1 -1
- package/dist/client/_nuxt/{NSectionBlock.9c411590.js → NSectionBlock.00736ab5.js} +1 -1
- package/dist/client/_nuxt/NSelect.vue.d378258a.js +1 -0
- package/dist/client/_nuxt/NSelectTabs.vue.515b8214.js +1 -0
- package/dist/client/_nuxt/{NSwitch.vue.defcd586.js → NSwitch.vue.8201d15e.js} +1 -1
- package/dist/client/_nuxt/{NTip.vue.04791b31.js → NTip.vue.8812abb8.js} +1 -1
- package/dist/client/_nuxt/{Navbar.vue.3fbf7ca0.js → Navbar.vue.c509e5d2.js} +1 -1
- package/dist/client/_nuxt/{StateEditor.vue.01c203b9.js → StateEditor.vue.2dfb9208.js} +1 -1
- package/dist/client/_nuxt/{__blank.3dddd973.js → __blank.6f88f9ac.js} +1 -1
- package/dist/client/_nuxt/{analyze-build.3db956f4.js → analyze-build.ad9015ef.js} +1 -1
- package/dist/client/_nuxt/{assets.634c950e.js → assets.d0e2ffb5.js} +1 -1
- package/dist/client/_nuxt/{client.d5aff798.js → client.237dd3ea.js} +1 -1
- package/dist/client/_nuxt/{components.e360f866.js → components.5d298b86.js} +32 -32
- package/dist/client/_nuxt/{custom-_name_.95236ea5.js → custom-_name_.6bfb7c0f.js} +1 -1
- package/dist/client/_nuxt/{default.8f859e18.js → default.f2c7ccc5.js} +1 -1
- package/dist/client/_nuxt/entry.582098fc.css +1 -0
- package/dist/client/_nuxt/{entry.b81bf245.js → entry.d12f745d.js} +4 -4
- package/dist/client/_nuxt/{error-404.50ed5273.js → error-404.ed94fa51.js} +1 -1
- package/dist/client/_nuxt/{error-500.3f0ba72e.js → error-500.7606b55d.js} +1 -1
- package/dist/client/_nuxt/{full.778b4958.js → full.69c969de.js} +1 -1
- package/dist/client/_nuxt/{hooks.22b55b1c.js → hooks.2100ca5d.js} +1 -1
- package/dist/client/_nuxt/imports.cb581504.js +1 -0
- package/dist/client/_nuxt/{index.622264a3.js → index.0d56c910.js} +1 -1
- package/dist/client/_nuxt/{index.76729ecb.js → index.f204f87e.js} +1 -1
- package/dist/client/_nuxt/{json-editor-vue.58ea58a4.js → json-editor-vue.ddceb6bb.js} +1 -1
- package/dist/client/_nuxt/{middleware.f7a35d95.js → middleware.688539e5.js} +1 -1
- package/dist/client/_nuxt/{modules.15421639.js → modules.bd62827c.js} +2 -2
- package/dist/client/_nuxt/{none.3d88124b.js → none.1af6e0ee.js} +1 -1
- package/dist/client/_nuxt/{open-graph.73aa4a70.js → open-graph.11338a0a.js} +2 -2
- package/dist/client/_nuxt/overview.94507b31.js +1 -0
- package/dist/client/_nuxt/{pages.7e22d9e3.js → pages.e761585a.js} +1 -1
- package/dist/client/_nuxt/{payload.cc8ba563.js → payload.6d63ca94.js} +1 -1
- package/dist/client/_nuxt/{plugins.b4d83e48.js → plugins.37532eb5.js} +1 -1
- package/dist/client/_nuxt/runtime-configs.5354fdd6.js +1 -0
- package/dist/client/_nuxt/{server-routes.10f98ec2.js → server-routes.6fd21992.js} +1 -1
- package/dist/client/_nuxt/settings.5fe86309.js +1 -0
- package/dist/client/_nuxt/{state-components.c65acb0d.js → state-components.7bf3566d.js} +1 -1
- package/dist/client/_nuxt/{state-modules.e0b57d1b.js → state-modules.065d01b4.js} +1 -1
- package/dist/client/_nuxt/{storage-options.f095012b.js → storage-options.f9b1696b.js} +1 -1
- package/dist/client/_nuxt/{storage.81e195cf.js → storage.228d88e2.js} +1 -1
- package/dist/client/_nuxt/{terminals.57b44373.js → terminals.0377de90.js} +1 -1
- package/dist/client/_nuxt/{timeline.e3f428d4.js → timeline.e89330f3.js} +3 -3
- package/dist/client/_nuxt/unocss-runtime.a5ba4c7b.js +2 -0
- package/dist/client/_nuxt/{virtual-files.02aedd29.js → virtual-files.1f7c68a1.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/{global-ea55645c.d.ts → global-2a48a9e5.d.ts} +5 -1
- package/dist/module.d.ts +1 -1
- package/dist/module.json +1 -1
- package/dist/runtime/plugins/view/FrameBox.vue +1 -1
- package/dist/runtime/plugins/view/Main.vue +3 -3
- package/dist/runtime/plugins/view/client.mjs +64 -44
- package/dist/runtime/use-nuxt-devtools.d.ts +8 -0
- package/dist/runtime/use-nuxt-devtools.mjs +23 -0
- package/dist/types.d.ts +1 -1
- package/package.json +9 -9
- package/dist/client/_nuxt/FilepathItem.vue.a967b383.js +0 -1
- package/dist/client/_nuxt/NSelect.vue.7a8edc85.js +0 -1
- package/dist/client/_nuxt/entry.2ee3a83f.css +0 -1
- package/dist/client/_nuxt/imports.2a0fb129.js +0 -1
- package/dist/client/_nuxt/overview.0aabd2ca.js +0 -1
- package/dist/client/_nuxt/runtime-configs.15955414.js +0 -1
- package/dist/client/_nuxt/settings.b2b35d44.js +0 -1
- package/dist/client/_nuxt/unocss-runtime.2f2f07ae.js +0 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as c,r as
|
|
1
|
+
import{d as c,r as u,bo as m,aP as f,h as d,j as p,aO as _,o as s,m as b,i as v,k as g,a5 as h,ap as k,f as x,p as y,_ as B}from"./entry.d12f745d.js";const C={relative:"","h-full":"","w-full":"","of-auto":""},V={inheritAttrs:!1},N=c({...V,__name:"DrawerRight",props:{modelValue:{type:Boolean},navbar:{},autoClose:{type:Boolean}},emits:["close"],setup(r,{emit:l}){const o=r,t=u(),{height:n}=m(()=>o.navbar,void 0,{box:"border-box"});return f(t,()=>{o.modelValue&&o.autoClose&&l("close")},{ignore:["a","button","summary",'[role="dialog"]']}),(e,a)=>{const i=B;return s(),d(_,{"enter-active-class":"duration-200 ease-in","enter-from-class":"transform translate-x-1/1","enter-to-class":"opacity-100","leave-active-class":"duration-200 ease-out","leave-from-class":"opacity-100","leave-to-class":"transform translate-x-1/1"},{default:p(()=>[e.modelValue?(s(),b("div",k({key:0,ref_key:"el",ref:t,border:"l base",flex:"~ col gap-1",absolute:"","bottom-0":"","right-0":"","z-10":"","z-20":"","of-auto":"","text-sm":"","glass-effect":"",style:{top:`${x(n)}px`}},e.$attrs),[v(i,{absolute:"","right-2":"","top-2":"","z-20":"","text-xl":"",icon:"carbon-close",onClick:a[0]||(a[0]=$=>e.$emit("close"))}),g("div",C,[h(e.$slots,"default")])],16)):y("",!0)]),_:3})}}});export{N as _};
|
package/dist/client/_nuxt/{DurationDisplay.vue.ebef3eee.js → DurationDisplay.vue.281ea057.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
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.
|
|
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.d12f745d.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,b6 as v,o as t,h as y,j as B,m as s,F as l,v as d,t as n,f as a,k as C,p as N,E as b,ar as g}from"./entry.d12f745d.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(),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",E,n(a(o).path.slice(a(o).moduleName.length)),1)):N("",!0)],64)):(t(),s(l,{key:2},[d(n(a(o).path),1)],64))]),_:1},8,["class","title"]))}});export{F as _};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as c,r as _,f as o,m as s,k as d,i as a,j as i,
|
|
1
|
+
import{d as c,r as _,f as o,m as s,k as d,i as a,j as i,aO as u,F as m,p as n,o as l,a5 as v,aj as k,_ as g}from"./entry.d12f745d.js";const h=d("div",{"i-ri:question-mark":""},null,-1),x=[h],y={key:0,border:"l base",class:"prose",pos:"fixed bottom-0 right-0 top-0","z-200":"","h-full":"","w-150":"","overflow-auto":"",px8:"",py4:"","bg-base":""},B=c({__name:"HelpFab",setup(w){const e=_(!1),{showHelpButtons:p}=k();return(b,t)=>{const f=g;return o(p)?(l(),s(m,{key:0},[d("button",{pos:"absolute bottom-5 right-5",border:"~ base rounded-full ",flex:"~ items-center justify-center","z-110":"","h-11":"","w-11":"","backdrop-blur-8":"",bg:"bg-base op50!","light:shadow":"",hover:"bg-active",title:"Help",onClick:t[0]||(t[0]=r=>e.value=!o(e))},x),a(u,{name:"fade-in"},{default:i(()=>[o(e)?(l(),s("div",{key:0,class:"fixed bottom-0 left-0 right-0 top-0 z-100","bg-black:20":"","backdrop-blur-2":"",onClick:t[1]||(t[1]=r=>e.value=!1)})):n("",!0)]),_:1}),a(u,{name:"slide-in"},{default:i(()=>[o(e)?(l(),s("div",y,[v(b.$slots,"default"),a(f,{icon:"carbon-close",pos:"absolute top-3 right-3","rounded-full":"","text-xl":"",onClick:t[2]||(t[2]=r=>e.value=!1)})])):n("",!0)]),_:3})],64)):n("",!0)}}});export{B as _};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as f,h as o,j as a,A as b,o as t,i as r,k as i,t as c,p as _,m as g,n as h,
|
|
1
|
+
import{d as f,h as o,j as a,A as b,o as t,i as r,k as i,t as c,p as _,m as g,n as h,ap as N,v as w,F as C,bw as x,a0 as y,C as B,ak as $}from"./entry.d12f745d.js";import{_ as V}from"./NMarkdown.vue.12b1eecd.js";const v={"text-xl":""},P={flex:"~ gap2 wrap"},j=f({__name:"LaunchPage",props:{icon:{},title:{},description:{},actions:{}},emits:["action"],setup(F){return(e,I)=>{const l=x,m=V,p=y,d=B,u=$,k=b;return t(),o(k,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"]),i("h1",v,c(e.title),1),e.description?(t(),o(m,{key:0,mb2:"","mt--1":"","text-center":"","text-base":"",op50:"",markdown:e.description},null,8,["markdown"])):_("",!0),i("div",P,[(t(!0),g(C,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(" "+c(n.label),1)]),_:2},1040,["disabled","to","target","onClick"]))),128))])]),_:1})]),_:1})}}});export{j as _};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as i,a4 as r,m as p,H as b,
|
|
1
|
+
import{d as i,a4 as r,m as p,H as b,bD as u,f as a,k as n,l as h,aa as k,i as f,a5 as m,E as v,o as _,a0 as x}from"./entry.d12f745d.js";const V=["checked","disabled"],y=["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(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,y),[[u,a(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([a(e)?"":"op50","n-transition"])},[m(o.$slots,"default")],2)],8,V)}}});export{$ as _};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{d as u}from"./client.
|
|
1
|
+
import{d as u}from"./client.237dd3ea.js";import{d as _,a as m,au 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.d12f745d.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
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 _};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as i,a4 as p,r as c,
|
|
1
|
+
import{d as i,a4 as p,r as c,aP 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.d12f745d.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 _};
|
|
@@ -1 +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.
|
|
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.d12f745d.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 _};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as n,o as a,h as o,j as r,a5 as s,
|
|
1
|
+
import{d as n,o as a,h as o,j as r,a5 as s,ap as t,ar as p,f as i,x as l}from"./entry.d12f745d.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.237dd3ea.js";import{d as t,f as e,o as a,h as r,ar as s,t as d}from"./entry.d12f745d.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 _};
|
|
@@ -1 +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.
|
|
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.d12f745d.js";import{_ as x}from"./NIconTitle.vue.9acdbad1.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,bE 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.d12f745d.js";const y={class:"n-select flex flex items-center border n-border-base rounded px-2 py-1 focus-within:n-focus-base focus-within:border-context n-bg-base"},B=["disabled"],w={key:0,value:"",disabled:"",hidden:""},g=u({__name:"NSelect",props:{modelValue:{default:void 0},placeholder:{default:""},icon:{default:""},disabled:{type:Boolean,default:!1}},setup(d,{emit:i}){const o=p(d,"modelValue",i,{passive:!0});return(e,a)=>{const r=V;return s(),l("div",y,[t(e.$slots,"icon",{},()=>[e.icon?(s(),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 c,a4 as m,o as s,m as t,F as v,n as f,E as d,f as o,k as r,t as _,H as g,aG as y,l as V}from"./entry.d12f745d.js";const h={class:"n-select-tabs flex flex-inline flex-wrap items-center border n-border-base rounded n-bg-base"},k=["disabled","title"],x=["disabled","value","title"],C=c({__name:"NSelectTabs",props:{modelValue:{default:void 0},disabled:{type:Boolean,default:!1},options:{}},setup(i,{emit:b}){const a=m(i,"modelValue",b,{passive:!0});return(l,n)=>(s(),t("fieldset",h,[(s(!0),t(v,null,f(l.options,(e,p)=>(s(),t("label",{key:e.label,disabled:l.disabled,class:d(["relative n-border-base hover:n-bg-active px-0.5em py-0.1em",[p?"border-l n-border-base ml--1px":"",e.value===o(a)?"n-bg-active":""]]),title:e.label},[r("div",{class:d([e.value===o(a)?"":"op35"])},_(e.label),3),g(r("input",{"onUpdate:modelValue":n[0]||(n[0]=u=>V(a)?a.value=u:null),type:"radio",disabled:l.disabled,value:e.value,title:e.label,class:"absolute inset-0 op-0.1"},null,8,x),[[y,o(a)]])],10,k))),128))]))}});export{C as _};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as i,a4 as c,o as r,m as u,H as h,
|
|
1
|
+
import{d as i,a4 as c,o as r,m as u,H as h,bD as p,f as l,k as t,l as b,aa as f,a5 as v}from"./entry.d12f745d.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(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{B as _};
|
|
@@ -1 +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.
|
|
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.d12f745d.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 _};
|
|
@@ -1 +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.
|
|
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.d12f745d.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 _};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as V,a4 as B,af as
|
|
1
|
+
import{d as V,a4 as B,af as _,r as w,b5 as O,b9 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 R,aQ as D,aR as P,F as j,H as z,i as E,h as v,ap as F,ba as M,l as U,au as A,_ as G}from"./entry.d12f745d.js";import{_ as H}from"./DataSchemaButton.vue.58aa4fbb.js";import{U as I}from"./json-editor-vue.ddceb6bb.js";const Q=["open"],T={flex:"~ gap2","select-none":"","items-center":"",px4:""},L=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=H,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),R(e.$slots,"actions",D(P({isOpen:a(n),name:e.name,state:a(d)}))),a(n)?(i(),p(j,{key:1},[z(E(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(I),F({key:0,modelValue:a(o),"onUpdate:modelValue":r[1]||(r[1]=y=>U(o)?o.value=y:null)},e.$attrs,{class:["json-editor-vue",[a(k).value==="dark"?"jse-theme-dark":"",(e.name,"")]],"main-menu-bar":!1,"navigation-bar":!1,"status-bar":!1,"read-only":"readonly"in e?e.readonly:a(M),indentation:2,"tab-size":2}),null,16,["modelValue","class","read-only"])):l("",!0)],8,Q)}}});export{L as _};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as n,h as o,j as t,A as _,o as s,k as a}from"./entry.
|
|
1
|
+
import{d as n,h as o,j as t,A as _,o as s,k as a}from"./entry.d12f745d.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};
|
|
@@ -1 +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.
|
|
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.d12f745d.js";import{_ as ue}from"./FilepathItem.vue.3d85c8b7.js";import{_ as de}from"./NTip.vue.8812abb8.js";import{_ as ce}from"./NCodeBlock.vue.31f18b3e.js";import{_ as me}from"./NCheckbox.vue.1ddacd54.js";import{_ as _e}from"./HelpFab.vue.7e36821f.js";import"./client.237dd3ea.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};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{d as X,r as N,W as q,o as s,m as p,i as u,f as t,k as e,v as k,F as L,n as G,h as F,j as x,p as S,E as H,X as U,Y as me,Z as fe,J as Z,K as J,_ as te,a0 as oe,U as se,C as ae,a as A,a1 as ve,a2 as he,a3 as le,t as V,a4 as ie,a5 as _e,l as R,a6 as ge,b as ne,a7 as xe,e as we,a8 as be,a9 as re,H as W,aa as ye,ab as $e,V as ke,ac as Ce,ad as Pe,ae as Ae}from"./entry.
|
|
1
|
+
import{d as X,r as N,W as q,o as s,m as p,i as u,f as t,k as e,v as k,F as L,n as G,h as F,j as x,p as S,E as H,X as U,Y as me,Z as fe,J as Z,K as J,_ as te,a0 as oe,U as se,C as ae,a as A,a1 as ve,a2 as he,a3 as le,t as V,a4 as ie,a5 as _e,l as R,a6 as ge,b as ne,a7 as xe,e as we,a8 as be,a9 as re,H as W,aa as ye,ab as $e,V as ke,ac as Ce,ad as Pe,ae as Ae}from"./entry.d12f745d.js";import{_ as De}from"./Navbar.vue.c509e5d2.js";import{_ as Ve}from"./NSectionBlock.00736ab5.js";import{_ as Ne}from"./FilepathItem.vue.3d85c8b7.js";import{_ as Fe,u as Ie}from"./storage-options.f9b1696b.js";import{_ as Se}from"./DrawerRight.vue.462f9048.js";import{D as Te}from"./constants.4e5eba24.js";import"./NIconTitle.vue.9acdbad1.js";import"./NCodeBlock.vue.31f18b3e.js";import"./client.237dd3ea.js";const je={key:0,"h-full":"","w-full":"",flex:"","items-center":"","justify-center":""},Ee={for:"drop-zone-input","text-3xl":""},Ue={key:1,relative:"","h-full":"","w-full":"",grid:"~ rows-[max-content_1fr_max-content]"},Be=e("div",{px6:"",py6:""},[e("h1",{"text-2xl":""}," Upload "),e("p",{"text-sm":"",op50:""}," Drag and drop files to upload ")],-1),Le={grid:"~ cols-minmax-8rem","overflow-auto":"",p6:""},ze={flex:"","items-center":"","justify-center":"","of-hidden":"",rounded:"","rounded-t-lg":"","bg-active":"","object-cover":"",class:"aspect-1/1",border:"~ base"},Me=["src"],Oe={flex:"~ gap1","items-center":""},Re={flex:"~ gap-2","items-center":"","justify-center":"",p8:""},Ke=X({__name:"DropZone",props:{folder:{type:String,required:!0}},setup(T){const l=T,d=N(!1),n=N(),m=N([]),v=["image","video"];function D(i){n.value=i.target,d.value=!0}function c(i){i.target===n.value&&(d.value=!1)}function C(i){i.preventDefault()}function K(i){i.preventDefault(),B(i.dataTransfer.files)}function B(i){const g=Array.from(i||[]);if(g.length){const _=[],P=m.value.map(f=>f.name);for(const f of g)if(P.includes(f.name)){let r=1;const[y,a]=f.name.split(".");for(;P.includes(`${y} (${r}).${a}`);)r++;const o=`${y}-${r}.${a}`,M=new Blob([f],{type:f.type}),O=new File([M],o,{lastModified:Date.now()});_.push(O),P.push(o)}else f.type===""?U({message:"Folders are not supported yet",icon:"carbon:face-dissatisfied",classes:"text-orange"}):v.some(r=>f.type.includes(r))?_.push(f):U({message:`"${f.type}" file type is not allowed`,icon:"carbon:face-dissatisfied",classes:"text-orange"});m.value=[...m.value,..._]}}async function w(){if(me.value||fe.value)return;const i=[];for(const g of m.value){const _=new FileReader;_.readAsDataURL(g);const f=(await new Promise(r=>{_.onload=()=>r(_.result)})).split(";base64,").pop();i.push({path:g.name,encoding:"base64",content:f})}await Z.writeStaticAssets(await J(),[...i],l.folder).then(()=>{j(),U({message:"Files uploaded successfully!",icon:"i-carbon:checkmark"})}).catch(g=>{console.error(g),j(),U({message:`Error uploading files: ${g}`,icon:"i-carbon-warning",classes:"text-red"})}),d.value=!1}function h(i){m.value?.splice(i,1)}function b(i){return URL.createObjectURL(i)}function z(i,g){const[_,P]=i.name.split("."),f=g.replace(/\.\w+$/,""),r=`${f}.${P}`;return f.length===0?(alert("File name must be at least 1 characters long"),_):(Object.defineProperty(i,"name",{value:r,writable:!1}),m.value.splice(m.value.indexOf(i),1,i),i)}function I(){m.value=[]}function j(){d.value=!1,I()}return q("dragenter",D),q("dragleave",c),q("dragover",C),q("drop",K),(i,g)=>{const _=te,P=oe,f=se,r=ae;return s(),p("div",{fixed:"","bottom-0":"","left-13":"","right-0":"","top-0":"","z-10":"","backdrop-blur-20":"","transition-all":"",class:H(t(d)?"opacity-100 visible":"opacity-0 invisible")},[u(_,{icon:"carbon-close",absolute:"","right-5":"","top-5":"","z-20":"","text-xl":"",onClick:j}),t(m)?.length?(s(),p("div",Ue,[Be,e("div",Le,[(s(!0),p(L,null,G(t(m),(y,a)=>(s(),p("div",{key:y.name,flex:"~ col gap-2",relative:"","h-50":"","w-40":"","items-center":""},[e("div",ze,[e("img",{"h-full":"","w-full":"","rounded-t-lg":"","object-cover":"",src:b(y)},null,8,Me)]),e("div",Oe,[u(f,{n:"xs","flex-auto":"","model-value":y.name,"onUpdate:modelValue":o=>z(y,o.target.value)},null,8,["model-value","onUpdate:modelValue"]),u(_,{icon:"carbon-delete","flex-none":"",title:"Remove file",onClick:o=>h(a)},null,8,["onClick"])])]))),128))]),e("div",Re,[t(m).length?(s(),F(r,{key:0,n:"red",onClick:I},{default:x(()=>[u(P,{icon:"carbon-clean"}),k(" Clear ")]),_:1})):S("",!0),u(r,{disabled:!t(m).length,n:"primary solid",onClick:w},{default:x(()=>[u(P,{icon:"carbon-cloud-upload"}),k(" Upload ")]),_:1},8,["disabled"])])])):(s(),p("div",je,[e("label",Ee,[u(P,{icon:"carbon-cloud-upload","mr-2":""}),k(" Drop files here or click to select ")]),e("input",{id:"drop-zone-input",type:"file",multiple:"",hidden:"",onChange:g[0]||(g[0]=y=>B(y.target.files))},null,32)]))],2)}}}),Xe=X({__name:"AssetFontPreview",props:{asset:{}},setup(T){const l=T,d=A(()=>`devtools-assets-${ve(l.asset)}`);return he(A(()=>`
|
|
2
2
|
@font-face {
|
|
3
3
|
font-family: '${d.value}';
|
|
4
4
|
src: url('${l.asset.publicPath}');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{bl as f,bA as r}from"./entry.d12f745d.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};
|