@nuxt/devtools 1.0.2 → 1.0.3
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 +71 -42
- package/dist/chunks/vscode.mjs +4 -4
- package/dist/client/200.html +35 -35
- package/dist/client/404.html +35 -35
- package/dist/client/_nuxt/{CodeDiff.vue.495a2700.js → CodeDiff.vue.0700b533.js} +1 -1
- package/dist/client/_nuxt/{ComposableItem.vue.09c56ec4.js → ComposableItem.vue.869f4305.js} +1 -1
- package/dist/client/_nuxt/{DataSchemaButton.vue.058ff215.js → DataSchemaButton.vue.72b202db.js} +1 -1
- package/dist/client/_nuxt/{DataSchemaDrawer.d62bbda3.js → DataSchemaDrawer.3aeebd14.js} +3 -3
- package/dist/client/_nuxt/{DurationDisplay.vue.e7d2f90b.js → DurationDisplay.vue.37c54f2c.js} +1 -1
- package/dist/client/_nuxt/{FilepathItem.vue.feb8a13c.js → FilepathItem.vue.ca308ea2.js} +1 -1
- package/dist/client/_nuxt/{HelpFab.vue.70bfd8f0.js → HelpFab.vue.6bf23ece.js} +1 -1
- package/dist/client/_nuxt/LaunchPage.vue.c8e4a567.js +1 -0
- package/dist/client/_nuxt/{NBadge.b912de36.js → NBadge.0b42c7f8.js} +1 -1
- package/dist/client/_nuxt/{NCheckbox.vue.a65a9466.js → NCheckbox.vue.6b5ce38f.js} +1 -1
- package/dist/client/_nuxt/{NCodeBlock.vue.c114d969.js → NCodeBlock.vue.c80c8282.js} +1 -1
- package/dist/client/_nuxt/{NDrawer.vue.4bcebe5d.js → NDrawer.vue.e2617b9c.js} +1 -1
- package/dist/client/_nuxt/{NDropdown.vue.32f13066.js → NDropdown.vue.ff9a8df2.js} +1 -1
- package/dist/client/_nuxt/{NIconTitle.vue.dcd70230.js → NIconTitle.vue.83cd82be.js} +1 -1
- package/dist/client/_nuxt/{NLink.vue.353afc82.js → NLink.vue.92e49c8b.js} +1 -1
- package/dist/client/_nuxt/{NMarkdown.vue.4e215b1f.js → NMarkdown.vue.07fe8875.js} +1 -1
- package/dist/client/_nuxt/{NNavbar.vue.29f03776.js → NNavbar.vue.823096f1.js} +1 -1
- package/dist/client/_nuxt/{NSectionBlock.56f7fa97.js → NSectionBlock.c3646235.js} +1 -1
- package/dist/client/_nuxt/{NSelect.vue.d4b5d548.js → NSelect.vue.c8c511ae.js} +1 -1
- package/dist/client/_nuxt/{NSelectTabs.vue.f4ae464e.js → NSelectTabs.vue.ec21a846.js} +1 -1
- package/dist/client/_nuxt/{NSwitch.vue.95382b67.js → NSwitch.vue.1cea2bc6.js} +1 -1
- package/dist/client/_nuxt/{NTip.vue.fbfe6de9.js → NTip.vue.ca2f8e8a.js} +1 -1
- package/dist/client/_nuxt/{StateEditor.vue.9d7dcb3f.js → StateEditor.vue.2abb9bb3.js} +1 -1
- package/dist/client/_nuxt/{__blank.961dc152.js → __blank.aff34a18.js} +1 -1
- package/dist/client/_nuxt/analyze-build.76d0de73.js +1 -0
- package/dist/client/_nuxt/{assets.5182b2b7.js → assets.2cb4325d.js} +3 -3
- package/dist/client/_nuxt/builds/latest.json +1 -1
- package/dist/client/_nuxt/builds/meta/c6495541-4f21-430a-9b71-cda3f41cbf03.json +1 -0
- package/dist/client/_nuxt/{client.4841a079.js → client.b8ca1554.js} +1 -1
- package/dist/client/_nuxt/{components.3821affe.js → components.f8fde87c.js} +5 -5
- package/dist/client/_nuxt/{custom-_name_.45e0e481.js → custom-_name_.779ca3e5.js} +1 -1
- package/dist/client/_nuxt/{default.551695d6.js → default.50175b13.js} +1 -1
- package/dist/client/_nuxt/{entry.5d59ff5c.js → entry.9a5af3dc.js} +6 -6
- package/dist/client/_nuxt/{error-404.c4b39504.js → error-404.0dae1ccf.js} +1 -1
- package/dist/client/_nuxt/{error-500.4029de92.js → error-500.0a479375.js} +1 -1
- package/dist/client/_nuxt/{full.b09bb7d2.js → full.f21cfe4d.js} +1 -1
- package/dist/client/_nuxt/{hooks.ad652487.js → hooks.08bf14b9.js} +1 -1
- package/dist/client/_nuxt/{imports.779c7207.js → imports.10f1634a.js} +1 -1
- package/dist/client/_nuxt/{index.8874e47c.js → index.06e4cc9c.js} +1 -1
- package/dist/client/_nuxt/{index.07112662.js → index.b567c37e.js} +1 -1
- package/dist/client/_nuxt/{json-editor-vue.b1851782.js → json-editor-vue.c3cbb111.js} +1 -1
- package/dist/client/_nuxt/{modules.53d23733.js → modules.63cf2a03.js} +2 -2
- package/dist/client/_nuxt/{none.48f4e2a5.js → none.7a39bbba.js} +1 -1
- package/dist/client/_nuxt/{open-graph.545307be.js → open-graph.7c382b87.js} +2 -2
- package/dist/client/_nuxt/overview.ea00b3f6.js +1 -0
- package/dist/client/_nuxt/{pages.065c5174.js → pages.e4e22a03.js} +1 -1
- package/dist/client/_nuxt/{payload.f3ad6ba9.js → payload.d7e93a46.js} +1 -1
- package/dist/client/_nuxt/{plugins.97361fa6.js → plugins.b2f10668.js} +1 -1
- package/dist/client/_nuxt/{runtime-configs.04157e18.js → runtime-configs.9fe5125f.js} +1 -1
- package/dist/client/_nuxt/{server-routes.631067b9.js → server-routes.95c3caa5.js} +2 -2
- package/dist/client/_nuxt/{settings.72bdb2b5.js → settings.78f334a8.js} +1 -1
- package/dist/client/_nuxt/state-components.d81178a3.js +1 -0
- package/dist/client/_nuxt/{state-modules.3599ee72.js → state-modules.b9e84f85.js} +1 -1
- package/dist/client/_nuxt/{storage-options.5fca38da.js → storage-options.2b389201.js} +1 -1
- package/dist/client/_nuxt/storage.44a95fac.js +1 -0
- package/dist/client/_nuxt/{terminals.ad730beb.js → terminals.539d48eb.js} +1 -1
- package/dist/client/_nuxt/timeline.5deddf7e.js +29 -0
- package/dist/client/_nuxt/unocss-runtime.dfaa24d0.js +2 -0
- package/dist/client/_nuxt/{virtual-files.7fd05201.js → virtual-files.46ad04c9.js} +1 -1
- package/dist/client/index.html +35 -35
- package/dist/module.json +1 -1
- package/dist/module.mjs +1 -1
- package/dist/runtime/plugins/view/FrameBox.vue +1 -1
- package/dist/runtime/plugins/view/client.mjs +3 -2
- package/dist/shared/{devtools.ca660ec5.mjs → devtools.6f6e0f47.mjs} +3 -6
- package/package.json +21 -21
- package/dist/client/__blank/index.html +0 -42
- package/dist/client/_nuxt/LaunchPage.vue.68d99ad2.js +0 -1
- package/dist/client/_nuxt/analyze-build.29ca822b.js +0 -1
- package/dist/client/_nuxt/builds/meta/9c2bc90a-5134-40c2-becb-286bd0304a77.json +0 -1
- package/dist/client/_nuxt/overview.60692331.js +0 -1
- package/dist/client/_nuxt/state-components.9496e3b2.js +0 -1
- package/dist/client/_nuxt/storage.be53a14a.js +0 -1
- package/dist/client/_nuxt/timeline.b8cc1d67.js +0 -29
- package/dist/client/_nuxt/unocss-runtime.55c74b5c.js +0 -2
- package/dist/client/modules/analyze-build/index.html +0 -42
- package/dist/client/modules/assets/index.html +0 -42
- package/dist/client/modules/components/index.html +0 -42
- package/dist/client/modules/hooks/index.html +0 -42
- package/dist/client/modules/imports/index.html +0 -42
- package/dist/client/modules/modules/index.html +0 -42
- package/dist/client/modules/open-graph/index.html +0 -42
- package/dist/client/modules/overview/index.html +0 -42
- package/dist/client/modules/pages/index.html +0 -42
- package/dist/client/modules/payload/index.html +0 -42
- package/dist/client/modules/plugins/index.html +0 -42
- package/dist/client/modules/runtime-configs/index.html +0 -42
- package/dist/client/modules/server-routes/index.html +0 -42
- package/dist/client/modules/storage/index.html +0 -42
- package/dist/client/modules/terminals/index.html +0 -42
- package/dist/client/modules/timeline/index.html +0 -42
- package/dist/client/modules/virtual-files/index.html +0 -42
- package/dist/client/settings/index.html +0 -42
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as _,r as c,f as o,m as s,k as d,i as a,j as i,
|
|
1
|
+
import{d as _,r as c,f as o,m as s,k as d,i as a,j as i,aS as u,F as m,p as n,o as l,a9 as v,B as k,_ as g}from"./entry.9a5af3dc.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":""},C=_({__name:"HelpFab",setup(w){const e=c(!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":"",border:!1,onClick:t[2]||(t[2]=r=>e.value=!1)})])):n("",!0)]),_:3})],64)):n("",!0)}}});export{C as _};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as w,h as a,j as o,A as y,o as t,i,k as r,t as m,p as l,m as C,n as B,as as V,v as $,F as v,V as F,bF as P,a5 as I,_ as L,an as T}from"./entry.9a5af3dc.js";import{_ as j}from"./NMarkdown.vue.07fe8875.js";const A={"text-xl":""},D={flex:"~ gap2 wrap"},S=w({__name:"LaunchPage",props:{name:{},icon:{},title:{},description:{},actions:{}},emits:["action"],setup(_,{emit:p}){const d=_,u=p;function f(e,s){F("launch-page",{pageName:d.name}),e.handle?.(),u("action",s)}return(e,s)=>{const k=P,g=j,h=I,b=L,N=T,x=y;return t(),a(x,null,{default:o(()=>[i(N,{flex:"~ col gap2",mxa:"","min-w-100":"","items-center":"",p6:""},{default:o(()=>[i(k,{mb2:"","text-5xl":"",icon:e.icon||e.icon,title:e.title},null,8,["icon","title"]),r("h1",A,m(e.title),1),e.description?(t(),a(g,{key:0,mb2:"","mt--1":"","text-center":"","text-base":"",op50:"",markdown:e.description},null,8,["markdown"])):l("",!0),r("div",D,[(t(!0),C(v,null,B(e.actions,(n,c)=>(t(),a(b,V({key:c,n:"solid primary",disabled:n.pending,to:n.src,target:n.src?"_blank":void 0},n.attrs,{onClick:E=>f(n,c)}),{default:o(()=>[n.pending?(t(),a(h,{key:0,icon:"carbon-circle-dash","animate-spin":""})):l("",!0),$(" "+m(n.label),1)]),_:2},1040,["disabled","to","target","onClick"]))),128))])]),_:1})]),_:1})}}});export{S as _};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{q as n,o,m as s,
|
|
1
|
+
import{q as n,o,m as s,a9 as t}from"./entry.9a5af3dc.js";const c={},_={class:"n-badge"};function a(e,r){return o(),s("span",_,[t(e.$slots,"default")])}const d=n(c,[["render",a]]);export{d as _};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as i,
|
|
1
|
+
import{d as i,Z as r,o as p,m as b,I as u,bO as h,f as o,k as n,l as k,ad as m,i as f,a9 as v,G as _,a5 as x}from"./entry.9a5af3dc.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"},w=i({__name:"NCheckbox",props:{modelValue:{type:[Boolean,null],default:!1},disabled:{type:Boolean,default:!1}},setup(c,{emit:t}){const e=r(c,"modelValue",t,{passive:!0});return(a,s)=>{const d=x;return p(),b("label",{class:"n-checkbox hover:n-checkbox-hover select-none items-center n-disabled:n-disabled",checked:o(e)||null,disabled:a.disabled||null},[u(n("input",{"onUpdate:modelValue":s[0]||(s[0]=l=>k(e)?e.value=l:null),type:"checkbox",class:"peer absolute op0",disabled:a.disabled,onKeypress:s[1]||(s[1]=m(l=>e.value=!o(e),["enter"]))},null,40,y),[[h,o(e)]]),n("span",B,[f(d,{class:"n-checkbox-icon scale-0 transform op0 n-transition n-checked:scale-100 n-checked:op100"})]),n("span",{class:_([o(e)?"":"op50","n-transition"])},[v(a.$slots,"default")],2)],8,V)}}});export{w as _};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{d as m}from"./client.
|
|
1
|
+
import{d as m}from"./client.b8ca1554.js";import{d as _,a as k,ax as f,o as n,m as s,G as d,k as t,F as r,n as g,t as h}from"./entry.9a5af3dc.js";const C=["innerHTML"],v={class:"shiki"},y=["textContent"],B=t("br",null,null,-1),H=_({__name:"NCodeBlock",props:{code:{},lang:{},lines:{type:Boolean,default:!0},transformRendered:{}},emits:["loaded"],setup(a,{emit:c}){const o=a,i=c,l=k(()=>{const e=o.lang==="text"?{code:o.code,supported:!1}:m.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&&f(()=>i("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,C)):(n(),s("pre",{key:1,class:d(["n-code-block",e.lines?"n-code-block-lines":""])},[t("pre",v,[t("code",null,[(n(!0),s(r,null,g(e.code.split(`
|
|
2
2
|
`),(p,u)=>(n(),s(r,{key:u},[t("span",{class:"line",textContent:h(p)},null,8,y),B],64))),128))])])],2))}});export{H as _};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as b,r as h,
|
|
1
|
+
import{d as b,r as h,bG as n,aT as g,h as y,j as v,as as l,aS as k,o as i,m as B,i as C,k as $,a9 as w,f as o,p as V,_ as N}from"./entry.9a5af3dc.js";const _=["border"],x={relative:"","h-full":"","w-full":"","of-auto":""},T=b({__name:"NDrawer",props:{modelValue:{type:Boolean},top:{},left:{},autoClose:{type:Boolean},transition:{default:"right"}},emits:["close"],setup(m,{emit:f}){const e=m,c=f,a=h(),{height:d}=n(()=>e.top,void 0,{box:"border-box"}),s=typeof e.left=="string"&&e.left.startsWith("#")?document.querySelector(e.left)?.getBoundingClientRect().width:n(()=>e.left,void 0,{box:"border-box"}).width;g(a,()=>{e.modelValue&&e.autoClose&&c("close")},{ignore:["a","button","summary",'[role="dialog"]']});const u={right:{"enter-from-class":"transform translate-x-1/1","leave-to-class":"transform translate-x-1/1"},top:{"enter-from-class":"transform translate-y--1/1","leave-to-class":"transform translate-y--1/1"},bottom:{"enter-from-class":"transform translate-y-1/1","leave-to-class":"transform translate-y-1/1"}};return(t,r)=>{const p=N;return i(),y(k,l(u[t.transition],{"enter-active-class":"duration-200 ease-in","enter-to-class":"opacity-100","leave-active-class":"duration-200 ease-out","leave-from-class":"opacity-100"}),{default:v(()=>[t.modelValue?(i(),B("div",l({key:0,ref_key:"el",ref:a,border:`${t.transition==="right"?"l":t.transition==="bottom"?"t":"b"} base`,flex:"~ col gap-1",class:{"right-0":t.transition==="right"||t.transition==="bottom"},absolute:"","bottom-0":"","z-10":"","z-20":"","of-auto":"","text-sm":"","n-glass-effect":"",style:{top:t.transition==="bottom"?"auto":`${o(d)}px`,left:t.transition==="right"&&!o(s)?"auto":`${o(s)}px`}},t.$attrs),[C(p,{absolute:"","right-2":"","top-2":"","z-20":"","text-xl":"",icon:"carbon-close",border:!1,onClick:r[0]||(r[0]=z=>t.$emit("close"))}),$("div",x,[w(t.$slots,"default")])],16,_)):V("",!0)]),_:3},16)}}});export{T as _};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as i,
|
|
1
|
+
import{d as i,Z as c,r as p,aT as u,o as m,m as f,a9 as n,i as v,j as _,v as b,f as o,k,G as V,_ as B}from"./entry.9a5af3dc.js";const $=i({__name:"NDropdown",props:{modelValue:{type:Boolean},direction:{default:"start"}},setup(r,{emit:l}){const e=c(r,"modelValue",l,{passive:!0}),a=p();return u(a,()=>{e.value=!1}),(s,t)=>{const d=B;return m(),f("div",{ref_key:"el",ref:a,class:"relative"},[n(s.$slots,"trigger",{enabled:o(e),click:()=>e.value=!o(e)},()=>[v(d,{onClick:t[0]||(t[0]=g=>e.value=!o(e))},{default:_(()=>[b(" Dropdown ")]),_:1})]),k("div",{class:V(["absolute z-10 border n-border-base rounded shadow n-transition n-bg-base",[o(e)?"op-100":"op0 pointer-events-none -translate-y-1",s.direction==="end"?"right-0":"left-0"]])},[n(s.$slots,"default")],2)],512)}}});export{$ as _};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as t,o,m as s,G as a,p as n,
|
|
1
|
+
import{d as t,o,m as s,G as a,p as n,a9 as r,k as l,t as i}from"./entry.9a5af3dc.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 s,a as l,o as a,h as i,j as p,
|
|
1
|
+
import{d as s,a as l,o as a,h as i,j as p,a9 as u,m as c,p as m,as as _,x as k}from"./entry.9a5af3dc.js";const d={key:0,"i-carbon:arrow-up-right":"","translate-y--1":"","text-xs":"",op50:""},g=s({__name:"NLink",props:{to:{},href:{},target:{},underline:{type:Boolean}},setup(o){const t=o,n=l(()=>t.href||t.to);return(e,h)=>{const r=k;return a(),i(r,_(n.value?{href:n.value,target:e.target,rel:e.target==="_blank"?"noopener noreferrer":null}:{},{class:{"n-link n-transition hover:n-link-hover n-link-base":n.value||e.underline}}),{default:p(()=>[u(e.$slots,"default"),n.value&&e.target==="_blank"?(a(),c("div",d)):m("",!0)]),_:3},16,["class"])}}});export{g as _};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as o}from"./client.
|
|
1
|
+
import{d as o}from"./client.b8ca1554.js";import{d as t,f as e,o as a,h as r,au as s,t as d}from"./entry.9a5af3dc.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 l,m as p,k as d,
|
|
1
|
+
import{d as l,m as p,k as d,a9 as a,G as s,o,h as i,p as m,X as u}from"./entry.9a5af3dc.js";const h={flex:"~ gap4","items-center":""},g=l({__name:"NNavbar",props:{search:{},noPadding:{type:Boolean}},emits:["update:search"],setup(f,{emit:n}){const r=n;function t(e){r("update:search",e.target.value)}return(e,v)=>{const c=u;return o(),p("div",{flex:"~ col gap2",border:"b base","flex-1":"","n-navbar-glass":"",class:s([{p4:!e.noPadding}])},[d("div",h,[a(e.$slots,"search",{},()=>[e.search!==void 0?(o(),i(c,{key:0,placeholder:"Search...",icon:"carbon-search",n:"primary","flex-auto":"",class:s({"px-5 py-2":!e.noPadding}),value:e.search,onInput:t},null,8,["class","value"])):m("",!0)]),a(e.$slots,"actions")]),a(e.$slots,"default")],2)}}});export{g as _};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as g,
|
|
1
|
+
import{d as g,Z as y,m as r,k as o,G as n,i as B,j as S,f as i,F as c,I as $,J as b,a9 as s,p,o as l,v as u,t as v,h as k,y as w,z as C,a5 as N,q as I}from"./entry.9a5af3dc.js";import{_ as x}from"./NIconTitle.vue.83cd82be.js";const _=t=>(w("data-v-cb964879"),t=t(),C(),t),V=["open"],z={"text-base":""},T={key:0,"text-sm":"",op50:""},D=_(()=>o("div",{class:"flex-auto"},null,-1)),F=_(()=>o("div",{class:"x-divider"},null,-1)),j=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 f(e){a.value=e.target.open}return(e,d)=>{const m=N,h=x;return l(),r(c,null,[o("details",{open:i(a),onToggle:f},[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)])):p("",!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":""})):p("",!0)]),_:3},8,["icon","text","class"])],2),d._lazyshow1||i(a)?(d._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)):p("v-show-if",!0)],40,V),F],64)}}});const J=I(j,[["__scopeId","data-v-cb964879"]]);export{J as _};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as p,
|
|
1
|
+
import{d as p,Z as m,o,m as l,a9 as n,h as f,p as t,I as b,bP as h,f as v,k,t as y,l as V,G as d,a5 as B}from"./entry.9a5af3dc.js";const g=["disabled"],w={key:0,value:"",disabled:"",hidden:""},C=p({__name:"NSelect",props:{modelValue:{default:void 0},placeholder:{default:""},icon:{default:""},disabled:{type:Boolean,default:!1}},setup(i,{emit:r}){const s=m(i,"modelValue",r,{passive:!0});return(e,a)=>{const c=B;return o(),l("div",{class:d(["n-select flex flex items-center border rounded px-2 py-1 focus-within:n-focus-base focus-within:border-context n-bg-base",e.disabled?"border-gray:10":"n-border-base"])},[n(e.$slots,"icon",{},()=>[e.icon?(o(),f(c,{key:0,icon:e.icon,class:"mr-0.4em text-1.1em op50"},null,8,["icon"])):t("",!0)]),b(k("select",{"onUpdate:modelValue":a[0]||(a[0]=u=>V(s)?s.value=u:null),disabled:e.disabled,class:d(["w-full flex-auto n-bg-base !outline-none",e.disabled?"appearance-none":""])},[e.placeholder?(o(),l("option",w,y(e.placeholder),1)):t("",!0),n(e.$slots,"default")],10,g),[[h,v(s)]])],2)}}});export{C as _};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as m,
|
|
1
|
+
import{d as m,Z as c,o as l,m as t,F as v,n as f,G as d,f as o,k as i,t as _,I as g,aK as y,l as V}from"./entry.9a5af3dc.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"],D=m({__name:"NSelectTabs",props:{modelValue:{default:void 0},disabled:{type:Boolean,default:!1},options:{}},setup(r,{emit:b}){const s=c(r,"modelValue",b,{passive:!0});return(a,n)=>(l(),t("fieldset",h,[(l(!0),t(v,null,f(a.options,(e,p)=>(l(),t("label",{key:e.label,disabled:a.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(s)?"n-bg-active":""]]),title:e.label},[i("div",{class:d([e.value===o(s)?"":"op35"])},_(e.label),3),g(i("input",{"onUpdate:modelValue":n[0]||(n[0]=u=>V(s)?s.value=u:null),type:"radio",disabled:a.disabled,value:e.value,title:e.label,class:"absolute inset-0 op-0.1"},null,8,x),[[y,o(s)]])],10,k))),128))]))}});export{D as _};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as i,
|
|
1
|
+
import{d as i,Z as c,o as r,m as u,I as h,bO as p,f as a,k as l,l as b,ad as m,a9 as f}from"./entry.9a5af3dc.js";const v=["checked","disabled"],k=["disabled"],w=l("div",{class:"n-switch-slider n-checked:n-switch-slider-checked peer-active:n-active-base peer-focus-visible:n-focus-base n-transition"},[l("div",{class:"n-checked:n-switch-thumb-checked n-switch-thumb n-transition"})],-1),V=i({__name:"NSwitch",props:{modelValue:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},setup(d,{emit:o}){const e=c(d,"modelValue",o,{passive:!0});return(t,s)=>(r(),u("label",{class:"n-switch n-switch-base hover:n-switch-hover n-disabled:n-disabled",checked:a(e)||null,disabled:t.disabled||null},[h(l("input",{"onUpdate:modelValue":s[0]||(s[0]=n=>b(e)?e.value=n:null),type:"checkbox",class:"peer absolute op0",disabled:t.disabled,onKeypress:s[1]||(s[1]=m(n=>e.value=!a(e),["enter"]))},null,40,k),[[p,a(e)]]),w,f(t.$slots,"default")],8,v))}});export{V as _};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as a,o,m as c,
|
|
1
|
+
import{d as a,o,m as c,a9 as n,h as t,p as i,k as r,a5 as p}from"./entry.9a5af3dc.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 V,
|
|
1
|
+
import{d as V,Z as B,aj as _,r as w,bc as O,bj as C,a1 as $,o as i,m as p,k as u,G as c,f as t,t as j,p as l,a9 as J,bg as D,bh as P,F as R,I as z,i as F,h as v,as as G,bk as M,l as A,ax as E,_ as I}from"./entry.9a5af3dc.js";import{_ as T}from"./DataSchemaButton.vue.72b202db.js";import{t as U}from"./json-editor-vue.c3cbb111.js";const Y=["open"],Z={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(),m=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 d=C(o,e=>{typeof e!="number"&&typeof e!="string"?f(e,s.state):m.value=e},{deep:!0});function f(e,r){for(const a in e)e[a]===null?r[a]=null:Array.isArray(e[a])?r[a]=e[a].slice():typeof e[a]=="object"?f(e[a],r[a]):r[a]=e[a]}async function h(){d.pause(),o.value=JSON.parse(JSON.stringify(s.state)),await E(),d.resume()}return(e,r)=>{const a=I,S=T,N=$("tooltip");return i(),p("div",{class:"state-editor-details",open:e.name?t(n):!0},[u("div",Z,[e.name?(i(),p("button",{key:0,flex:"~","cursor-pointer":"","items-center":"",class:c(t(n)?"":"op50"),onClick:r[0]||(r[0]=y=>n.value=!t(n))},[u("div",{"i-carbon-chevron-right":"",transition:"",class:c(t(n)?"rotate-90 op0":"")},null,2),u("code",{px3:"",py1:"","font-mono":"",class:c(t(n)?"bg-[#8881] rounded-t":"rounded hover:bg-active")},j(e.name),3)],2)):l("",!0),J(e.$slots,"actions",D(P({isOpen:t(n),name:e.name,state:t(m)}))),t(n)?(i(),p(R,{key:1},[z(F(a,{title:"Refresh View",icon:"carbon-renew",border:!1,onClick:h},null,512),[[N,"Refresh View",void 0,{bottom:!0}]]),t(o)?(i(),v(S,{key:0,getter:()=>({name:e.name,input:JSON.stringify(t(o))})},null,8,["getter"])):l("",!0)],64)):l("",!0)]),t(n)||!e.name?(i(),v(t(U),G({key:0,modelValue:t(o),"onUpdate:modelValue":r[1]||(r[1]=y=>A(o)?o.value=y:null)},e.$attrs,{class:["json-editor-vue",[t(k).value==="dark"?"jse-theme-dark":"",(e.name,"")]],"main-menu-bar":!1,"navigation-bar":!1,"status-bar":!1,"read-only":"readonly"in e?e.readonly:t(M),indentation:2,"tab-size":2}),null,16,["modelValue","class","read-only"])):l("",!0)],8,Y)}}});export{Q as _};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as e,m as n,o}from"./entry.
|
|
1
|
+
import{d as e,m as n,o}from"./entry.9a5af3dc.js";const t={"h-screen":"","w-screen":"","bg-black":""},r=e({__name:"__blank",setup(c){return(s,_)=>(o(),n("div",t))}});export{r as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as P,a as I,r as V,o,m as s,k as e,F as _,n as j,G as S,f as t,t as p,p as b,H as U,i as u,j as r,v as f,I as A,J as D,K as Z,L as F,M as E,_ as G,N as q,O as ee,P as ne,Q as te,R as oe,S as le,U as ie,V as se,W as C,h as z,l as R,X as ae,Y as re,A as ue}from"./entry.9a5af3dc.js";import{_ as de}from"./FilepathItem.vue.ca308ea2.js";import{_ as ce}from"./NTip.vue.ca2f8e8a.js";import{_ as me}from"./NCodeBlock.vue.c80c8282.js";import{_ as _e}from"./NCheckbox.vue.6b5ce38f.js";import{_ as pe}from"./HelpFab.vue.6bf23ece.js";import"./client.b8ca1554.js";const fe={"h-full":"",grid:"~ rows-[max-content_1fr]"},ve={flex:"~ wrap","w-full":""},he=["onClick"],ye=e("div",{border:"b base","flex-auto":""},null,-1),be={key:0,flex:"~ col gap-4 items-center justify-center",p4:""},$e=e("div",{"flex-auto":""},null,-1),ge={grid:"~ cols-[30px_1fr] gap-x-2 gap-y-3 items-center justify-center","w-100":""},xe=e("div",{"i-carbon-commit":"","text-xl":""},null,-1),we=e("div",{"text-sm":"",op50:""}," Name ",-1),ze=e("div",{"i-carbon-time":"","text-xl":""},null,-1),Be=e("div",{"text-sm":"",op50:""}," Build duration ",-1),Ce=e("div",{"i-carbon-cics-program":"","text-xl":""},null,-1),ke=e("div",{"text-sm":"",op50:""}," Client bundle size ",-1),Ne=e("div",{"i-carbon-bare-metal-server":"","text-xl":""},null,-1),Te=e("div",{"text-sm":"",op50:""}," Nitro bundle size ",-1),Ae=e("div",{"i-carbon-edge-node":"","text-xl":""},null,-1),De=e("div",{"text-sm":"",op50:""}," Built ",-1),Ie=e("div",{"i-carbon:folder-parent":"","text-xl":""},null,-1),Ve=e("div",{"text-sm":"",op50:""}," Report Path ",-1),Se=e("div",{"flex-auto":""},null,-1),Fe=P({__name:"BuildAnalyzeDetails",props:{current:{},prev:{}},setup(k){const v=k,g=`${Z().app.baseURL}/__nuxt_devtools__/analyze/`.replace(/\/+/g,"/"),x=I(()=>{const n=[{name:"Overview",id:"overview"}];return v.current.features.bundleClient&&n.push({name:"Client Bundle",id:"bundle-client"}),v.current.features.bundleNitro&&n.push({name:"Nitro Bundle",id:"bundle-nitro"}),v.current.features.viteInspect&&n.push({name:"Vite Inspect",id:"vite-inspect"}),n}),i=V(x.value[0]);function h(n){return n<1024?`${n}B`:n<1024*1024?`${(n/1024).toFixed(1)}KB`:n<1024*1024*1024?`${(n/1024/1024).toFixed(1)}MB`:`${(n/1024/1024/1024).toFixed(1)}GB`}function d(n){return`${((n.endTime-n.startTime)/1e3).toFixed(1)}s`}async function N(n){return F.clearAnalyzeBuilds(await E(),[n])}return(n,c)=>{const B=de,T=G;return o(),s("div",fe,[e("div",ve,[(o(!0),s(_,null,j(t(x),(l,m)=>(o(),s("button",{key:m,px4:"",py2:"",border:"r base",hover:"bg-active",class:S(l.id===t(i).id?"":"border-b"),onClick:w=>i.value=l},[e("div",{class:S(l.id===t(i).id?"":"op30")},p(l.name),3)],10,he))),128)),ye]),t(i).id==="overview"?(o(),s("div",be,[$e,e("div",ge,[xe,e("div",null,[we,e("div",null,p(n.current.name),1)]),ze,e("div",null,[Be,e("div",null,p(d(n.current)),1)]),n.current.size?.clientBundle?(o(),s(_,{key:0},[Ce,e("div",null,[ke,e("div",null,p(h(n.current.size.clientBundle)),1)])],64)):b("",!0),n.current.size.nitroBundle?(o(),s(_,{key:1},[Ne,e("div",null,[Te,e("div",null,p(h(n.current.size.nitroBundle)),1)])],64)):b("",!0),Ae,e("div",null,[De,e("div",null,p(t(U)(new Date(n.current.endTime))),1)]),Ie,e("div",null,[Ve,u(B,{filepath:n.current.analyzeDir},null,8,["filepath"])])]),Se,u(T,{n:"rose",icon:"carbon-delete",onClick:c[0]||(c[0]=l=>N(n.current.name))},{default:r(()=>[f(" Delete this report ")]),_:1})])):b("",!0),c._lazyshow1||t(i).id==="bundle-client"?(c._lazyshow1=!0,o(),s(_,null,[A(e("iframe",{src:`${t(g)}${n.current.slug}/client.html`,"h-full":"","w-full":""},null,8,["src"]),[[D,t(i).id==="bundle-client"]])],64)):b("v-show-if",!0),c._lazyshow2||t(i).id==="bundle-nitro"?(c._lazyshow2=!0,o(),s(_,null,[A(e("iframe",{src:`${t(g)}${n.current.slug}/nitro.html`,"h-full":"","w-full":""},null,8,["src"]),[[D,t(i).id==="bundle-nitro"]])],64)):b("v-show-if",!0),c._lazyshow3||t(i).id==="vite-inspect"?(c._lazyshow3=!0,o(),s(_,null,[A(e("iframe",{src:`${t(g)}${n.current.slug}/.vite-inspect/`,"h-full":"","w-full":""},null,8,["src"]),[[D,t(i).id==="vite-inspect"]])],64)):b("v-show-if",!0)])}}}),Re={class:"markdown-body"},Pe=e("h1",null,"Build Analyze",-1),je=e("p",null,[f("DevTools provides a build analyze tool to help you understand the size of your app in production. Whenever you start a new build, it runs the command "),e("code",null,"nuxt build --analyze"),f(" and present the output data directly in DevTools for easy browsing and comparing.")],-1),Ue=[Pe,je],Ee={__name:"analyze-build",setup(k,{expose:v}){return v({frontmatter:{}}),(g,x)=>(o(),s("div",Re,Ue))}},Ge={flex:"~ col"},Le=["onClick"],Oe={flex:"~ gap-1 items-center wrap","w-full":"","text-sm":"",op60:""},He=e("div",{"i-carbon-time":""},null,-1),Ke=e("div",{"flex-auto":""},null,-1),Me=e("div",{"x-divider":""},null,-1),We={flex:"~ items-center justify-center wrap",p4:""},Ye={flex:"~ col gap-1","w-250":"",p4:""},Je=e("h3",{class:"text-lg font-medium leading-6",mb2:""}," Start analyze build? ",-1),Qe=e("p",{op50:""}," Enter the name of the build: ",-1),Xe=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":""},rn=P({__name:"analyze-build",setup(k){const v=q(),$=ee(),g=ne(),x=te("analyze-build:slug",""),i=I(()=>$.value?.builds.find(l=>l.slug===x.value)??$.value?.builds[0]),h=V(!1),d=V(""),N=I(()=>$.value?.builds.some(l=>l.name===d.value.trim()));async function n(){d.value=await F.generateAnalyzeBuildName(),await v.start()&&(se("analyze-build:start"),C.value={name:d.value,processId:await F.startAnalyzeBuild(await E(),d.value)},h.value&&B())}const c=oe();function B(){C.value?.processId&&(c.value=C.value.processId,g.push("/modules/terminals"))}function T(l){return`${((l.endTime-l.startTime)/1e3).toFixed(1)}s`}return le(()=>[{id:"action:analyze-build: start",title:"Start a new analyze build",icon:"i-carbon-edge-node",action:n}]),(l,m)=>{const w=G,L=Fe,O=ue,H=ie,K=ae,M=ce,W=me,Y=_e,J=re,Q=Ee,X=pe;return o(),s(_,null,[u(H,{"left-size":30},{left:r(()=>[e("div",Ge,[(o(!0),s(_,null,j(t($)?.builds,a=>(o(),s(_,{key:a.slug},[e("button",{flex:"~ col gap1","hover:bg-active":"",p3:"",class:S(a.slug===t(i)?.slug?"text-primary bg-active":""),onClick:y=>x.value=a.slug},[e("code",null,p(a.name),1),e("div",Oe,[He,e("span",null,p(T(a)),1),Ke,e("span",null,p(t(U)(new Date(a.endTime))),1)])],10,Le),Me],64))),128)),e("div",We,[("processAnalyzeBuildInfo"in l?l.processAnalyzeBuildInfo:t(C))?(o(),z(w,{key:1,n:"primary",icon:"carbon-circle-dash animate-spin",onClick:m[1]||(m[1]=a=>B())},{default:r(()=>[f(" Building... ")]),_:1})):(o(),z(w,{key:0,n:"primary",icon:"carbon-edge-node",onClick:m[0]||(m[0]=a=>n())},{default:r(()=>[f(" Start a new build ")]),_:1}))])])]),right:r(()=>[t(i)?(o(),z(L,{key:0,current:t(i)},null,8,["current"])):(o(),z(O,{key:1}))]),_:1}),u(t(v),null,{default:r(({resolve:a})=>[u(J,{"model-value":!0,onClose:y=>a(!1)},{default:r(()=>[e("div",Ye,[Je,Qe,u(K,{modelValue:t(d),"onUpdate:modelValue":m[2]||(m[2]=y=>R(d)?d.value=y:null),placeholder:"Build name"},null,8,["modelValue"]),t(N)?(o(),z(M,{key:0,"n-orange":""},{default:r(()=>[f(" A build with the same name already exists, continue would overrides the previous build result. ")]),_:1})):b("",!0),Xe,Ze,u(W,{code:`npx nuxi analyze --no-serve --name=${t(d)}`,lang:"bash",px4:"",py2:"",border:"~ base rounded",lines:!1},null,8,["code"]),u(Y,{modelValue:t(h),"onUpdate:modelValue":m[3]||(m[3]=y=>R(h)?h.value=y:null),mt2:"",n:"primary"},{default:r(()=>[f(" Navigate to terminal ")]),_:1},8,["modelValue"]),e("div",qe,[u(w,{onClick:y=>a(!1)},{default:r(()=>[f(" Cancel ")]),_:2},1032,["onClick"]),u(w,{n:"solid primary",onClick:y=>a(!0)},{default:r(()=>[f(" Start ")]),_:2},1032,["onClick"])])])]),_:2},1032,["onClose"])]),_:1}),u(X,null,{default:r(()=>[u(Q)]),_:1})],64)}}});export{rn as default};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import{d as q,
|
|
1
|
+
import{d as q,Z as te,r as j,a0 as Y,a1 as ne,m as u,I as G,i as d,f as t,k as e,v as N,F as M,n as Z,h as S,j as g,p as E,G as H,a2 as pe,a3 as me,V as fe,L as W,M as J,a4 as O,_ as oe,o as s,a5 as le,X as ae,a as I,a6 as ve,a7 as he,a8 as ie,t as A,a9 as _e,l as R,aa as ge,b as se,ab as xe,e as be,ac as we,ad as ye,ae as $e,Y as ke,af as Ce,ag as Ve,ah as Pe,ai as Ae}from"./entry.9a5af3dc.js";import{_ as De}from"./NCheckbox.vue.6b5ce38f.js";import{_ as Fe}from"./NDropdown.vue.ff9a8df2.js";import{_ as Ne}from"./NNavbar.vue.823096f1.js";import{_ as Se}from"./NSectionBlock.c3646235.js";import{_ as Ie}from"./FilepathItem.vue.ca308ea2.js";import{_ as Te,u as Ue}from"./storage-options.2b389201.js";import{_ as je}from"./NDrawer.vue.e2617b9c.js";import{D as Ee}from"./constants.2cc6e981.js";import"./NIconTitle.vue.83cd82be.js";import"./NCodeBlock.vue.c80c8282.js";import"./client.b8ca1554.js";const Le={key:0,"h-full":"","w-full":"",flex:"","items-center":"","justify-center":""},Be={for:"drop-zone-input","text-3xl":"",hover:"text-green cursor-pointer","transition-all":""},Me={key:1,relative:"","h-full":"","w-full":"",grid:"~ rows-[max-content_1fr_max-content]"},ze=e("div",{px6:"",py6:""},[e("h1",{"text-2xl":""}," Upload "),e("p",{"text-sm":"",op50:""}," Drag and drop files to upload ")],-1),Oe={grid:"~ cols-minmax-8rem gap-8","overflow-auto":"",p6:""},Re={flex:"","items-center":"","justify-center":"","of-hidden":"",rounded:"","rounded-t-lg":"","bg-active":"","object-cover":"",class:"aspect-1/1",border:"~ base"},Ke=["src"],Xe={flex:"~ gap1","items-center":""},Ge={flex:"~ gap-2","items-center":"","justify-center":"",p8:""},Ze=q({__name:"AssetDropZone",props:{modelValue:{type:Boolean,required:!0},folder:{type:String,required:!0}},setup(L){const l=L,m=te(l,"modelValue"),C=j(),o=j([]);function V(a){C.value=a.target,m.value=!0}function f(a){a.target===C.value&&(m.value=!1)}function D(a){a.preventDefault()}function y(a){a.preventDefault(),v(a.dataTransfer.files)}function v(a){const h=Array.from(a||[]);if(h.length){const _=[],b=o.value.map(r=>r.name);for(const r of h)if(b.includes(r.name)){let P=1;const[w,T]=r.name.split(".");for(;b.includes(`${w} (${P}).${T}`);)P++;const K=`${w}-${P}.${T}`,c=new Blob([r],{type:r.type}),n=new File([c],K,{lastModified:Date.now()});_.push(n),b.push(K)}else r.type===""&&O({message:"Folders are not supported yet",icon:"carbon:face-dissatisfied",classes:"text-orange"}),_.push(r);o.value=[...o.value,..._]}}async function B(){if(pe.value||me.value)return;fe("assets:upload");const a=[];for(const h of o.value){const _=new FileReader;_.readAsDataURL(h);const r=(await new Promise(P=>{_.onload=()=>P(_.result)})).split(";base64,").pop();a.push({path:h.name,encoding:"base64",content:r})}await W.writeStaticAssets(await J(),[...a],l.folder).then(()=>{p(),O({message:"Files uploaded successfully!",icon:"i-carbon:checkmark"})}).catch(h=>{p(),O({message:`Error uploading files: ${h?.message??"unknown"}`,icon:"i-carbon-warning",classes:"text-red"})}),m.value=!1}function X(a){o.value?.splice(a,1)}function z(a){return URL.createObjectURL(a)}function x(a,h){const[_,b]=a.name.split("."),r=h.replace(/\.\w+$/,""),P=`${r}.${b}`;return r.length===0?(alert("File name must be at least 1 characters long"),_):(Object.defineProperty(a,"name",{value:P,writable:!1}),o.value.splice(o.value.indexOf(a),1,a),a)}function i(){o.value=[]}function p(){m.value=!1,i()}return Y("dragenter",V),Y("dragleave",f),Y("dragover",D),Y("drop",y),(a,h)=>{const _=oe,b=le,r=ae,P=ne("tooltip");return s(),u("div",{fixed:"","bottom-0":"","left-13":"","right-0":"","top-0":"","z-10":"","backdrop-blur-20":"","transition-all":"",class:H(t(m)?"opacity-100 visible":"opacity-0 invisible")},[G(d(_,{icon:"carbon-close",title:"Close",absolute:"","right-5":"","top-5":"","z-20":"","text-xl":"",border:!1,onClick:p},null,512),[[P,"Close",void 0,{"bottom-end":!0}]]),t(o)?.length?(s(),u("div",Me,[ze,e("div",Oe,[(s(!0),u(M,null,Z(t(o),(w,T)=>(s(),u("div",{key:w.name,flex:"~ col gap-2",relative:"","h-50":"","w-40":"","items-center":""},[e("div",Re,[e("img",{"h-full":"","w-full":"","rounded-t-lg":"","object-cover":"",src:z(w)},null,8,Ke)]),e("div",Xe,[d(r,{n:"xs","h-full":"","flex-auto":"","model-value":w.name,"onUpdate:modelValue":K=>x(w,K.target.value)},null,8,["model-value","onUpdate:modelValue"]),d(_,{n:"red",icon:"carbon-trash-can","h-full":"","flex-none":"",title:"Remove file",onClick:K=>X(T)},null,8,["onClick"])])]))),128))]),e("div",Ge,[t(o).length?(s(),S(_,{key:0,n:"red",onClick:i},{default:g(()=>[d(b,{icon:"carbon-clean"}),N(" Clear ")]),_:1})):E("",!0),d(_,{disabled:!t(o).length,n:"primary solid",onClick:B},{default:g(()=>[d(b,{icon:"carbon-cloud-upload"}),N(" Upload ")]),_:1},8,["disabled"])])])):(s(),u("div",Le,[e("label",Be,[d(b,{icon:"carbon-cloud-upload","mr-2":""}),N(" Drop files here or click to select ")]),e("input",{id:"drop-zone-input",type:"file",multiple:"",hidden:"",onChange:h[0]||(h[0]=w=>v(w.target.files))},null,32)]))],2)}}}),qe=q({__name:"AssetFontPreview",props:{asset:{}},setup(L){const l=L,m=I(()=>`devtools-assets-${ve(l.asset)}`);return he(I(()=>`
|
|
2
2
|
@font-face {
|
|
3
3
|
font-family: '${m.value}';
|
|
4
4
|
src: url('${l.asset.publicPath}');
|
|
5
5
|
}
|
|
6
|
-
`)),(C,o)=>(s(),u("div",{"of-hidden":"",style:ie({fontFamily:`'${t(m)}'`})}," 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))}}),We={flex:"","items-center":"","justify-center":"","of-hidden":"","bg-active":"","object-cover":"",p1:""},Ye=["src"],He={key:2,"i-carbon-document":"","text-3xl":"",op20:""},Je={key:3,"w-full":"","self-start":"",p4:""},Qe=["textContent"],et={key:4},tt=["src","autoplay","controls"],nt={key:5},ot={key:0,"i-carbon-volume-up":"","text-3xl":"",op20:""},st=["src"],lt={key:6,"i-carbon-help":"","text-3xl":"",op20:""},re=q({__name:"AssetPreview",props:{asset:{},textContent:{},detail:{type:Boolean}},setup(L){return(l,m)=>{const C=qe;return s(),u("div",We,[l.asset.type==="image"?(s(),u("img",{key:0,src:l.asset.publicPath},null,8,Ye)):l.asset.type==="font"?(s(),S(C,{key:l.asset.publicPath,asset:l.asset,"self-stretch":"",p2:"","text-2xl":""},null,8,["asset"])):l.asset.type==="text"&&!l.textContent?(s(),u("div",He)):l.asset.type==="text"&&l.textContent?(s(),u("div",Je,[e("pre",{"max-h-10rem":"","of-hidden":"","text-xs":"","font-mono":"",textContent:A(l.textContent)},null,8,Qe)])):l.asset.type==="video"?(s(),u("div",et,[e("video",{src:l.asset.publicPath,autoplay:l.detail,controls:l.detail},null,8,tt)])):l.asset.type==="audio"?(s(),u("div",nt,[l.detail?(s(),u("audio",{key:1,src:l.asset.publicPath,controls:""},null,8,st)):(s(),u("div",ot))])):(s(),u("div",lt))])}}}),at={flex:"~ col gap-1",hover:"bg-active","items-center":"","of-hidden":"",rounded:"",p2:""},it={"w-full":"","of-hidden":"",truncate:"","ws-nowrap":"","text-center":"","text-xs":""},rt=q({__name:"AssetGridItem",props:{asset:{},folder:{}},setup(L){const l=L,m=I(()=>l.folder&&l.asset.path.startsWith(l.folder)?l.asset.path.slice(l.folder.length):l.asset.path);return(C,o)=>{const V=re;return s(),u("button",at,[d(V,{"h-30":"","w-30":"",rounded:"",border:"~ base",asset:C.asset},null,8,["asset"]),e("div",it,A(t(m)),1)])}}}),ue=q({__name:"AssetListItem",props:{item:{},index:{default:0},modelValue:{}},setup(L,{emit:l}){const m=L,o=te(m,"modelValue",l,{passive:!0}),V=I(()=>m.item?.children?.length),f=j(!0),D=I(()=>V.value?"i-carbon-folder":m.item.type==="image"?"i-carbon-image":m.item.type==="video"?"i-carbon-video":m.item.type==="audio"?"i-carbon-volume-up":m.item.type==="font"?"i-carbon-text-small-caps":m.item.type==="text"?"i-carbon-document":m.item.type==="json"?"i-carbon-json":"i-carbon-document-blank");return(y,v)=>{const B=le,X=ue;return s(),u("div",null,[e("button",{flex:"~ gap-2","w-full":"","items-center":"",hover:"bg-active",px4:"",py1:"",style:ie({paddingLeft:`calc(1rem + ${y.index*1.5}em)`}),class:H({"bg-active":!t(V)&&t(o)?.filePath===y.item?.filePath}),border:"b base",onClick:v[0]||(v[0]=
|
|
6
|
+
`)),(C,o)=>(s(),u("div",{"of-hidden":"",style:ie({fontFamily:`'${t(m)}'`})}," 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))}}),We={flex:"","items-center":"","justify-center":"","of-hidden":"","bg-active":"","object-cover":"",p1:""},Ye=["src"],He={key:2,"i-carbon-document":"","text-3xl":"",op20:""},Je={key:3,"w-full":"","self-start":"",p4:""},Qe=["textContent"],et={key:4},tt=["src","autoplay","controls"],nt={key:5},ot={key:0,"i-carbon-volume-up":"","text-3xl":"",op20:""},st=["src"],lt={key:6,"i-carbon-help":"","text-3xl":"",op20:""},re=q({__name:"AssetPreview",props:{asset:{},textContent:{},detail:{type:Boolean}},setup(L){return(l,m)=>{const C=qe;return s(),u("div",We,[l.asset.type==="image"?(s(),u("img",{key:0,src:l.asset.publicPath},null,8,Ye)):l.asset.type==="font"?(s(),S(C,{key:l.asset.publicPath,asset:l.asset,"self-stretch":"",p2:"","text-2xl":""},null,8,["asset"])):l.asset.type==="text"&&!l.textContent?(s(),u("div",He)):l.asset.type==="text"&&l.textContent?(s(),u("div",Je,[e("pre",{"max-h-10rem":"","of-hidden":"","text-xs":"","font-mono":"",textContent:A(l.textContent)},null,8,Qe)])):l.asset.type==="video"?(s(),u("div",et,[e("video",{src:l.asset.publicPath,autoplay:l.detail,controls:l.detail},null,8,tt)])):l.asset.type==="audio"?(s(),u("div",nt,[l.detail?(s(),u("audio",{key:1,src:l.asset.publicPath,controls:""},null,8,st)):(s(),u("div",ot))])):(s(),u("div",lt))])}}}),at={flex:"~ col gap-1",hover:"bg-active","items-center":"","of-hidden":"",rounded:"",p2:""},it={"w-full":"","of-hidden":"",truncate:"","ws-nowrap":"","text-center":"","text-xs":""},rt=q({__name:"AssetGridItem",props:{asset:{},folder:{}},setup(L){const l=L,m=I(()=>l.folder&&l.asset.path.startsWith(l.folder)?l.asset.path.slice(l.folder.length):l.asset.path);return(C,o)=>{const V=re;return s(),u("button",at,[d(V,{"h-30":"","w-30":"",rounded:"",border:"~ base",asset:C.asset},null,8,["asset"]),e("div",it,A(t(m)),1)])}}}),ue=q({__name:"AssetListItem",props:{item:{},index:{default:0},modelValue:{}},setup(L,{emit:l}){const m=L,o=te(m,"modelValue",l,{passive:!0}),V=I(()=>m.item?.children?.length),f=j(!0),D=I(()=>V.value?"i-carbon-folder":m.item.type==="image"?"i-carbon-image":m.item.type==="video"?"i-carbon-video":m.item.type==="audio"?"i-carbon-volume-up":m.item.type==="font"?"i-carbon-text-small-caps":m.item.type==="text"?"i-carbon-document":m.item.type==="json"?"i-carbon-json":"i-carbon-document-blank");return(y,v)=>{const B=le,X=ue;return s(),u("div",null,[e("button",{flex:"~ gap-2","w-full":"","items-center":"",hover:"bg-active",px4:"",py1:"",style:ie({paddingLeft:`calc(1rem + ${y.index*1.5}em)`}),class:H({"bg-active":!t(V)&&t(o)?.filePath===y.item?.filePath}),border:"b base",onClick:v[0]||(v[0]=z=>t(V)?f.value=!t(f):o.value=y.item)},[e("div",{class:H(t(D))},null,2),e("span",{class:H({"flex items-center":t(V)}),"flex-auto":"","text-start":"","text-sm":"","font-mono":""},A(y.item.path),3),t(V)?(s(),S(B,{key:0,icon:"carbon:chevron-right","transform-rotate":t(f)?90:0,transition:""},null,8,["transform-rotate"])):E("",!0)],6),t(f)?_e(y.$slots,"default",{key:0},()=>[(s(!0),u(M,null,Z(y.item?.children,z=>(s(),S(X,{key:z.filepath,modelValue:t(o),"onUpdate:modelValue":v[1]||(v[1]=x=>R(o)?o.value=x:null),item:z,index:y.index+1},null,8,["modelValue","item","index"]))),128))]):E("",!0)])}}}),ut={flex:"~ col gap-4","min-h-full":"","w-full":"","of-hidden":"",p4:""},ct=e("div",{flex:"~ gap2","mb--2":"","items-center":"",op50:""},[e("div",{"x-divider":""}),e("div",{"flex-none":""}," Preview "),e("div",{"x-divider":""})],-1),dt={flex:"~","items-center":"","justify-center":""},pt=e("div",{flex:"~ gap2","mb--2":"","items-center":"",op50:""},[e("div",{"x-divider":""}),e("div",{"flex-none":""}," Details "),e("div",{"x-divider":""})],-1),mt={"max-w-full":"","w-full":"","table-fixed":""},ft=e("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," Filepath ",-1),vt={flex:"~ gap-1","w-full":"","items-center":""},ht=e("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," Public Path ",-1),_t={flex:"~ gap-1","w-full":"","items-center":"","of-hidden":""},gt={"flex-auto":"","of-hidden":"",truncate:"","ws-pre":"","font-mono":""},xt=e("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," Type ",-1),bt={capitalize:""},wt=e("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," Image Size ",-1),yt={key:0},$t=e("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," Aspect Ratio ",-1),kt=e("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," File size ",-1),Ct=e("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," Last modified ",-1),Vt={op70:""},Pt=e("div",{flex:"~ gap2","mb--2":"","items-center":"",op50:""},[e("div",{"x-divider":""}),e("div",{"flex-none":""}," Actions "),e("div",{"x-divider":""})],-1),At={flex:"~ gap2 wrap"},Dt=e("div",{"flex-auto":""},null,-1),Ft={flex:"~ col gap-4","min-h-full":"","w-full":"","of-hidden":"",p8:""},Nt=e("span",null," Are you sure you want to delete this asset? ",-1),St={flex:"~ gap2 wrap justify-center"},It={flex:"~ col gap-4","min-h-full":"","w-full":"","of-hidden":"",p8:""},Tt={flex:"~ gap2 wrap justify-center"},Ut={flex:"~ col gap-4","min-h-full":"","w-full":"","of-hidden":"",p4:""},jt=["onKeydown"],Et={flex:"","justify-end":"","gap-4":""},Lt=q({__name:"AssetDetails",props:{modelValue:{}},setup(L,{emit:l}){const o=te(L,"modelValue",l,{passive:!0}),V=ge(),f=se(()=>{if(o.value.type==="image")return W.getImageMeta(o.value.filePath)}),D=j(!1),y=j(),v=j(0),B=se(async()=>{if(o.value.type!=="text")return;v.value;const c=await W.getTextAssetContent(o.value.filePath);return y.value=c,c});async function X(){if(B.value!==y.value)try{await W.writeStaticAssets(await J(),[{path:o.value.path,content:y.value,override:!0}],""),D.value=!1,v.value++,O({message:"Updated",icon:"i-carbon-checkmark",classes:"text-green"})}catch{O({message:"Something went wrong!",icon:"i-carbon-warning",classes:"text-red"})}}const z=xe(),x=I(()=>(z.value?._installedModules||[]).some(n=>n.meta?.name==="@nuxt/image"||n.meta?.name==="@nuxt/image-edge")),i=I(()=>{const c=[];if(o.value.type==="image"){const n=f.value?.width?`
|
|
7
7
|
width="${f.value.width}"
|
|
8
8
|
height="${f.value.height}" `:" ";return c.push({lang:"vue-html",code:`<img${n}
|
|
9
9
|
src="${o.value.publicPath}"
|
|
@@ -13,4 +13,4 @@ import{d as q,Y as te,r as j,Z as Y,a0 as ne,m as u,I as G,i as d,f as t,k as e,
|
|
|
13
13
|
src="${o.value.publicPath}"
|
|
14
14
|
/>`,name:"Nuxt Picture",docs:"https://image.nuxt.com/usage/nuxt-picture"}),c}return c.push({lang:"html",code:`<a download href="${o.value.publicPath}">
|
|
15
15
|
Download ${o.value.path.split("/").slice(-1)[0]}
|
|
16
|
-
</a>`,name:"Download link"}),c}),p=be(),a=we(()=>o.value.mtime),h=I(()=>{const c=o.value.size;return c<1024?`${c} B`:c<1024*1024?`${(c/1024).toFixed(2)} KB`:`${(c/1024/1024).toFixed(2)} MB`}),_=I(()=>{if(!f.value?.width||!f.value?.height)return"";const c=($,U)=>U?c(U,$%U):$,n=c(f.value.width,f.value.height);return n>3?`${f.value.width/n}:${f.value.height/n}`:""}),b=I(()=>["image","text","video","audio","font"].includes(o.value.type)),r=j(!1);async function P(){try{await W.deleteStaticAsset(await J(),o.value.filePath),o.value=void 0,r.value=!1,O({message:"Asset deleted",icon:"i-carbon-checkmark",classes:"text-green"})}catch{O({message:"Something went wrong!",icon:"i-carbon-warning",classes:"text-red"})}}const w=j(!1),T=j("");async function K(){const c=o.value.filePath.split("/"),n=c.slice(-1)[0].split(".").slice(0,-1).join(".");if(!T.value||T.value===n)return O({message:"Please enter a new name",icon:"i-carbon-warning",classes:"text-orange"});try{const $=c.slice(-1)[0].split(".").slice(-1)[0],U=`${c.slice(0,-1).join("/")}/${T.value}.${$}`;await W.renameStaticAsset(await J(),o.value.filePath,U),o.value=void 0,w.value=!1,O({message:"Asset renamed",icon:"i-carbon-checkmark",classes:"text-green"})}catch{O({message:"Something went wrong!",icon:"i-carbon-warning",classes:"text-red"})}}return(c,n)=>{const $=re,U=Ie,F=oe,ce=Te,Q=ke,de=ae,ee=ne("tooltip");return s(),u(
|
|
16
|
+
</a>`,name:"Download link"}),c}),p=be(),a=we(()=>o.value.mtime),h=I(()=>{const c=o.value.size;return c<1024?`${c} B`:c<1024*1024?`${(c/1024).toFixed(2)} KB`:`${(c/1024/1024).toFixed(2)} MB`}),_=I(()=>{if(!f.value?.width||!f.value?.height)return"";const c=($,U)=>U?c(U,$%U):$,n=c(f.value.width,f.value.height);return n>3?`${f.value.width/n}:${f.value.height/n}`:""}),b=I(()=>["image","text","video","audio","font"].includes(o.value.type)),r=j(!1);async function P(){try{await W.deleteStaticAsset(await J(),o.value.filePath),o.value=void 0,r.value=!1,O({message:"Asset deleted",icon:"i-carbon-checkmark",classes:"text-green"})}catch{O({message:"Something went wrong!",icon:"i-carbon-warning",classes:"text-red"})}}const w=j(!1),T=j("");async function K(){const c=o.value.filePath.split("/"),n=c.slice(-1)[0].split(".").slice(0,-1).join(".");if(!T.value||T.value===n)return O({message:"Please enter a new name",icon:"i-carbon-warning",classes:"text-orange"});try{const $=c.slice(-1)[0].split(".").slice(-1)[0],U=`${c.slice(0,-1).join("/")}/${T.value}.${$}`;await W.renameStaticAsset(await J(),o.value.filePath,U),o.value=void 0,w.value=!1,O({message:"Asset renamed",icon:"i-carbon-checkmark",classes:"text-green"})}catch{O({message:"Something went wrong!",icon:"i-carbon-warning",classes:"text-red"})}}return(c,n)=>{const $=re,U=Ie,F=oe,ce=Te,Q=ke,de=ae,ee=ne("tooltip");return s(),u(M,null,[e("div",ut,[t(b)?(s(),u(M,{key:0},[ct,e("div",dt,[d($,{detail:"","max-h-80":"","min-h-20":"","min-w-20":"","w-auto":"",rounded:"",border:"~ base",asset:t(o),"text-content":t(B)},null,8,["asset","text-content"])])],64)):E("",!0),pt,e("table",mt,[e("tbody",null,[e("tr",null,[ft,e("td",null,[e("div",vt,[d(U,{filepath:t(o).filePath,"text-left":""},null,8,["filepath"]),G(d(F,{"flex-none":"",title:"Open in Editor",icon:"carbon-launch",border:!1,onClick:n[0]||(n[0]=k=>t(V)(t(o).filePath))},null,512),[[ee,"Open in Editor"]])])])]),e("tr",null,[ht,e("td",null,[e("div",_t,[e("div",gt,A(t(o).publicPath),1),G(d(F,{"flex-none":"",title:"Copy public path",icon:"carbon-copy",border:!1,onClick:n[1]||(n[1]=k=>t(p)(t(o).publicPath,"assets-public-path"))},null,512),[[ee,"Copy public path"]]),G(d(F,{"flex-none":"",to:t(o).publicPath,icon:"carbon-launch",target:"_blank",border:!1,title:"Open in browser"},null,8,["to"]),[[ee,"Open in browser"]])])])]),e("tr",null,[xt,e("td",bt,A(t(o).type),1)]),t(f)?.width?(s(),u(M,{key:0},[e("tr",null,[wt,e("td",null,A(t(f).width)+" x "+A(t(f).height),1)]),t(_)?(s(),u("tr",yt,[$t,e("td",null,A(t(_)),1)])):E("",!0)],64)):E("",!0),e("tr",null,[kt,e("td",null,A(t(h)),1)]),e("tr",null,[Ct,e("td",null,[N(A(new Date(t(o).mtime).toLocaleString())+" ",1),e("span",Vt,"("+A(t(a))+")",1)])])])]),Pt,e("div",At,[d(F,{to:t(o).publicPath,download:"",target:"_blank",icon:"carbon-download",n:"green"},{default:g(()=>[N(" Download ")]),_:1},8,["to"]),t(o).type==="text"?(s(),S(F,{key:0,icon:"carbon-edit",n:"cyan",onClick:n[2]||(n[2]=k=>D.value=!t(D))},{default:g(()=>[N(" Edit ")]),_:1})):E("",!0),d(F,{icon:"carbon-text-annotation-toggle",n:"blue",onClick:n[3]||(n[3]=k=>w.value=!t(w))},{default:g(()=>[N(" Rename ")]),_:1}),d(F,{icon:"carbon-delete",n:"red",onClick:n[4]||(n[4]=k=>r.value=!t(r))},{default:g(()=>[N(" Delete ")]),_:1})]),Dt,t(i).length?(s(),S(ce,{key:1,border:"t base","mx--4":"","mb--4":"","code-snippets":t(i)},null,8,["code-snippets"])):E("",!0)]),d(Q,{modelValue:t(r),"onUpdate:modelValue":n[6]||(n[6]=k=>R(r)?r.value=k:null)},{default:g(()=>[e("div",Ft,[Nt,e("div",St,[d(F,{icon:"carbon-close",onClick:n[5]||(n[5]=k=>r.value=!1)},{default:g(()=>[N(" Cancel ")]),_:1}),d(F,{icon:"carbon-delete",n:"red",onClick:P},{default:g(()=>[N(" Delete ")]),_:1})])])]),_:1},8,["modelValue"]),d(Q,{modelValue:t(w),"onUpdate:modelValue":n[9]||(n[9]=k=>R(w)?w.value=k:null)},{default:g(()=>[e("div",It,[d(de,{modelValue:t(T),"onUpdate:modelValue":n[7]||(n[7]=k=>R(T)?T.value=k:null),placeholder:"New name",n:"blue"},null,8,["modelValue"]),e("div",Tt,[d(F,{icon:"carbon-close",onClick:n[8]||(n[8]=k=>w.value=!1)},{default:g(()=>[N(" Cancel ")]),_:1}),d(F,{icon:"carbon-text-annotation-toggle",n:"blue",onClick:K},{default:g(()=>[N(" Rename ")]),_:1})])])]),_:1},8,["modelValue"]),t(o).type==="text"?(s(),S(Q,{key:0,modelValue:t(D),"onUpdate:modelValue":n[12]||(n[12]=k=>R(D)?D.value=k:null)},{default:g(()=>[e("div",Ut,[G(e("textarea",{"onUpdate:modelValue":n[10]||(n[10]=k=>R(y)?y.value=k:null),placeholder:"Item value...",class:"h-lg w-xl of-auto rounded-lg p-4 text-sm font-mono outline-none",onKeydown:ye(X,["enter"])},null,40,jt),[[$e,t(y)]]),e("div",Et,[d(F,{icon:"carbon-close",onClick:n[11]||(n[11]=k=>D.value=!1)},{default:g(()=>[N(" Cancel ")]),_:1}),d(F,{icon:"carbon:save",n:"primary",onClick:X},{default:g(()=>[N(" save ")]),_:1})])])]),_:1},8,["modelValue"])):E("",!0)],64)}}}),Bt={"h-full":"","of-auto":""},Mt={"flex-none":"",flex:"~ gap2 items-center","text-lg":""},zt={flex:"~ items-center justify-center",absolute:"","bottom--1":"","right--1":"","h-4":"","w-4":"","rounded-full":"","bg-primary:30":"","text-8px":""},Ot={flex:"~ col","w-30":"","of-auto":""},Rt={"text-xs":"",op75:""},Kt={op50:""},Xt={key:0},Gt={"mt--4":"",px2:"",grid:"~ cols-minmax-8rem"},Zt={key:1,p2:"",grid:"~ cols-minmax-8rem"},qt={key:1},rn=q({__name:"assets",setup(L){const l=Ce(),m=j(!1),C=j(""),o=I(()=>new Ve(l.value||[],{keys:["path"]})),V=Pe(()=>{const x=[];for(const i of l.value||[]){const p=i.path.split(".").pop();p&&!x.find(a=>a.name===p)&&x.push({name:p,value:!0})}return x}),f=I(()=>(C.value?o.value.search(C.value).map(i=>i.item):l.value||[]).filter(i=>{const p=i.path.split(".").pop();return!p||V.some(a=>a.name===p&&a.value)})),D=I(()=>{const x={};for(const i of f.value){const p=`${i.path.split("/").slice(0,-1).join("/")}/`;x[p]||(x[p]=[]),x[p].push(i)}return Object.entries(x).sort(([i],[p])=>i.localeCompare(p))}),y=I(()=>{const x={path:"public",children:[]},i=(p,a,h)=>{const[_,...b]=a;let r=p.children.find(P=>P.path===_);r||(r={...h,path:_,children:[]},p.children.push(r)),b.length>1?i(r,b,h):b.length===1&&r.children.push({...h,path:b[0]})};return f.value.forEach(p=>{const a=p.path.split("/").filter(h=>h!=="");i(x,a,p)}),x.children}),v=j(),{view:B}=Ue("assets");function X(){B.value=B.value==="list"?"grid":"list"}Ae("Escape",()=>{v.value=void 0});const z=j();return(x,i)=>{const p=oe,a=De,h=Fe,_=Ne,b=Ze,r=rt,P=Se,w=ue,T=Lt,K=je,c=ne("tooltip");return s(),u("div",Bt,[d(_,{ref_key:"navbar",ref:z,search:t(C),"onUpdate:search":i[1]||(i[1]=n=>R(C)?C.value=n:null),pb2:""},{actions:g(()=>[e("div",Mt,[G(d(p,{icon:"carbon:cloud-upload",title:"File Upload",border:!1,onClick:i[0]||(i[0]=n=>m.value=!t(m))},null,512),[[c,"File Upload",void 0,{"bottom-end":!0}]]),t(V).length?(s(),S(h,{key:0,direction:"end",n:"sm primary"},{trigger:g(({click:n})=>[G(d(p,{icon:"carbon-filter",border:!1,title:"Filter",p3:"","text-lg":"",onClick:$=>n()},null,8,["onClick"]),[[c,"Filter",void 0,{"bottom-end":!0}]]),e("span",zt,A(t(V).length),1)]),default:g(()=>[e("div",Ot,[(s(!0),u(M,null,Z(t(V),n=>(s(),S(a,{key:n.name,modelValue:n.value,"onUpdate:modelValue":$=>n.value=$,flex:"~ gap-2",rounded:"",px2:"",py2:""},{default:g(()=>[e("span",Rt,A(n.name),1)]),_:2},1032,["modelValue","onUpdate:modelValue"]))),128))])]),_:1})):E("",!0),G(d(p,{"text-lg":"",border:!1,icon:t(B)==="grid"?"i-carbon-list":"i-carbon-grid",title:"Toggle view",onClick:X},null,8,["icon"]),[[c,"Toggle View",void 0,{"bottom-end":!0}]])])]),default:g(()=>[e("div",Kt,[t(C)?(s(),u("span",Xt,A(t(f).length)+" matched · ",1)):E("",!0),e("span",null,A(t(l)?.length)+" assets in total",1)])]),_:1},8,["search"]),d(b,{modelValue:t(m),"onUpdate:modelValue":i[2]||(i[2]=n=>R(m)?m.value=n:null),folder:"/"},null,8,["modelValue"]),t(B)==="grid"?(s(),u(M,{key:0},[t(D).length>1?(s(!0),u(M,{key:0},Z(t(D),([n,$])=>(s(),S(P,{key:n,text:n,description:`${$.length} items`,open:$.length<=("DETAILS_MAX_ITEMS"in x?x.DETAILS_MAX_ITEMS:t(Ee)),padding:!1},{default:g(()=>[e("div",Gt,[(s(!0),u(M,null,Z($,U=>(s(),S(r,{key:U.path,asset:U,folder:n,onClick:F=>v.value=U},null,8,["asset","folder","onClick"]))),128))])]),_:2},1032,["text","description","open"]))),128)):(s(),u("div",Zt,[(s(!0),u(M,null,Z(t(f),n=>(s(),S(r,{key:n.path,asset:n,onClick:$=>v.value=n},null,8,["asset","onClick"]))),128))]))],64)):(s(),u("div",qt,[(s(!0),u(M,null,Z(t(y),(n,$)=>(s(),S(w,{key:$,modelValue:t(v),"onUpdate:modelValue":i[3]||(i[3]=U=>R(v)?v.value=U:null),item:n},null,8,["modelValue","item"]))),128))])),d(K,{"model-value":!!t(v),"auto-close":"","w-120":"",top:t(z),onClose:i[5]||(i[5]=n=>v.value=void 0)},{default:g(()=>[t(v)?(s(),S(T,{key:0,modelValue:t(v),"onUpdate:modelValue":i[4]||(i[4]=n=>R(v)?v.value=n:null)},null,8,["modelValue"])):E("",!0)]),_:1},8,["model-value","top"])])}}});export{rn as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"id":"
|
|
1
|
+
{"id":"c6495541-4f21-430a-9b71-cda3f41cbf03","timestamp":1700488523667}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"id":"c6495541-4f21-430a-9b71-cda3f41cbf03","timestamp":1700488523667,"matcher":{"static":{},"wildcard":{},"dynamic":{}},"prerendered":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{bv as f,bL as r}from"./entry.9a5af3dc.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};
|