@nuxt/devtools 0.8.4 → 1.0.0-beta.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/README.md +1 -5
- package/dist/chunks/module-main.mjs +115 -43
- package/dist/chunks/vscode.mjs +12 -13
- package/dist/client/200.html +17 -17
- package/dist/client/404.html +17 -17
- package/dist/client/_nuxt/{CodeDiff.vue.a8c9e639.js → CodeDiff.vue.3beaa134.js} +2 -2
- package/dist/client/_nuxt/ComposableItem.vue.136c5104.js +1 -0
- package/dist/client/_nuxt/DataSchemaButton.vue.125423b7.js +1 -0
- package/dist/client/_nuxt/{DataSchemaDrawer.f84a2081.js → DataSchemaDrawer.8ac6b677.js} +2 -2
- package/dist/client/_nuxt/{DurationDisplay.vue.1f34b658.js → DurationDisplay.vue.c49b4e64.js} +1 -1
- package/dist/client/_nuxt/{FilepathItem.vue.a4d269b8.js → FilepathItem.vue.5af0b5df.js} +1 -1
- package/dist/client/_nuxt/HelpFab.vue.98c902f4.js +1 -0
- package/dist/client/_nuxt/{LaunchPage.vue.012ddba7.js → LaunchPage.vue.805f9595.js} +1 -1
- package/dist/client/_nuxt/NBadge.98d5d309.js +1 -0
- package/dist/client/_nuxt/{NCheckbox.vue.0e359f85.js → NCheckbox.vue.6fb2ece1.js} +1 -1
- package/dist/client/_nuxt/{NCodeBlock.vue.01eb6d1c.js → NCodeBlock.vue.adf1e9b4.js} +1 -1
- package/dist/client/_nuxt/NDrawer.vue.8e620517.js +1 -0
- package/dist/client/_nuxt/{NDropdown.vue.b3117df4.js → NDropdown.vue.b2f7aaef.js} +1 -1
- package/dist/client/_nuxt/{NIconTitle.vue.79485c3a.js → NIconTitle.vue.bf8093eb.js} +1 -1
- package/dist/client/_nuxt/NLink.vue.0e98999b.js +1 -0
- package/dist/client/_nuxt/{NMarkdown.vue.7a10e6e6.js → NMarkdown.vue.b0e8b2fc.js} +1 -1
- package/dist/client/_nuxt/NSectionBlock.0d0061ef.css +1 -0
- package/dist/client/_nuxt/NSectionBlock.4347cc14.js +1 -0
- package/dist/client/_nuxt/NSelect.vue.4c22d30e.js +1 -0
- package/dist/client/_nuxt/{NSelectTabs.vue.72adf277.js → NSelectTabs.vue.c9be0aa2.js} +1 -1
- package/dist/client/_nuxt/{NSwitch.vue.67a4fdb0.js → NSwitch.vue.de333089.js} +1 -1
- package/dist/client/_nuxt/{NTip.vue.d505e897.js → NTip.vue.770a171a.js} +1 -1
- package/dist/client/_nuxt/{Navbar.vue.8dc15d25.js → Navbar.vue.371e4d0a.js} +1 -1
- package/dist/client/_nuxt/StateEditor.vue.332bb451.js +1 -0
- package/dist/client/_nuxt/analyze-build.281c50c1.js +1 -0
- package/dist/client/_nuxt/assets.ca8faf7a.js +16 -0
- package/dist/client/_nuxt/{client.c59e50d6.js → client.3f2665f1.js} +1 -1
- package/dist/client/_nuxt/{components.31c6fd6f.js → components.a8900a78.js} +26 -26
- package/dist/client/_nuxt/custom-_name_.c49c72a2.js +1 -0
- package/dist/client/_nuxt/{default.30ac8af4.js → default.3ba7d10b.js} +1 -1
- package/dist/client/_nuxt/entry.1c0836ed.css +1 -0
- package/dist/client/_nuxt/entry.e01776ec.js +27 -0
- package/dist/client/_nuxt/{error-404.5c6d1cc1.js → error-404.9d2aaad9.js} +1 -1
- package/dist/client/_nuxt/{error-500.b5b10475.js → error-500.20d1b3ce.js} +1 -1
- package/dist/client/_nuxt/{full.03097bfb.js → full.6d0fd7cf.js} +1 -1
- package/dist/client/_nuxt/hooks.908144b2.js +1 -0
- package/dist/client/_nuxt/{imports.b827859f.js → imports.d7bd415a.js} +1 -1
- package/dist/client/_nuxt/{index.b5454355.js → index.a0a2f0b3.js} +1 -1
- package/dist/client/_nuxt/index.eb95211d.js +1 -0
- package/dist/client/_nuxt/{json-editor-vue.1bc58c26.js → json-editor-vue.b22bf91c.js} +1 -1
- package/dist/client/_nuxt/{middleware.434dc02a.js → middleware.9e4b2529.js} +1 -1
- package/dist/client/_nuxt/modules.fd214f26.js +2 -0
- package/dist/client/_nuxt/{none.2b3e8ddc.js → none.27bf71df.js} +1 -1
- package/dist/client/_nuxt/open-graph.b95ebacd.js +3 -0
- package/dist/client/_nuxt/overview.4991be1e.js +1 -0
- package/dist/client/_nuxt/pages.708b9e25.js +1 -0
- package/dist/client/_nuxt/payload.eaf10e21.js +1 -0
- package/dist/client/_nuxt/plugins.f02b2c56.js +1 -0
- package/dist/client/_nuxt/{runtime-configs.1f844468.js → runtime-configs.63235af8.js} +1 -1
- package/dist/client/_nuxt/server-routes.88eebd4c.js +9 -0
- package/dist/client/_nuxt/settings.7dbb31cf.js +1 -0
- package/dist/client/_nuxt/{state-components.a223a28c.js → state-components.ca4a58b1.js} +1 -1
- package/dist/client/_nuxt/state-modules.6d6b039c.js +1 -0
- package/dist/client/_nuxt/storage-options.ab028b2a.js +1 -0
- package/dist/client/_nuxt/storage.27117a31.js +1 -0
- package/dist/client/_nuxt/{terminals.cb4eb909.js → terminals.cdead889.js} +3 -3
- package/dist/client/_nuxt/timeline.ddc61557.js +29 -0
- package/dist/client/_nuxt/{unocss-runtime.68d64d4a.js → unocss-runtime.ddd835d7.js} +2 -2
- package/dist/client/_nuxt/virtual-files.9da3562d.js +1 -0
- package/dist/client/index.html +17 -17
- package/dist/client/modules/analyze-build/index.html +17 -17
- package/dist/client/modules/assets/index.html +17 -17
- package/dist/client/modules/components/index.html +17 -17
- package/dist/client/modules/hooks/index.html +17 -17
- package/dist/client/modules/imports/index.html +17 -17
- package/dist/client/modules/middleware/index.html +17 -17
- package/dist/client/modules/modules/index.html +17 -17
- package/dist/client/modules/open-graph/index.html +17 -17
- package/dist/client/modules/overview/index.html +17 -17
- package/dist/client/modules/pages/index.html +17 -17
- package/dist/client/modules/payload/index.html +17 -17
- package/dist/client/modules/plugins/index.html +17 -17
- package/dist/client/modules/runtime-configs/index.html +17 -17
- package/dist/client/modules/server-routes/index.html +17 -17
- package/dist/client/modules/storage/index.html +17 -17
- package/dist/client/modules/terminals/index.html +17 -17
- package/dist/client/modules/timeline/index.html +17 -17
- package/dist/client/modules/virtual-files/index.html +17 -17
- package/dist/client/settings/index.html +17 -17
- package/dist/module.json +1 -1
- package/dist/module.mjs +1 -1
- package/dist/runtime/plugins/devtools.client.mjs +7 -0
- package/dist/runtime/plugins/view/Main.vue +39 -10
- package/dist/runtime/plugins/view/client.mjs +2 -1
- package/dist/runtime/settings.d.ts +4 -0
- package/dist/runtime/settings.mjs +2 -0
- package/dist/shared/{devtools.4169e037.mjs → devtools.c28fc9a7.mjs} +6 -1
- package/package.json +19 -23
- package/dist/client/__blank/index.html +0 -42
- package/dist/client/_nuxt/Badge.a4bd58d4.js +0 -1
- package/dist/client/_nuxt/ComposableItem.vue.bd112256.js +0 -1
- package/dist/client/_nuxt/DataSchemaButton.vue.fbb61806.js +0 -1
- package/dist/client/_nuxt/DrawerRight.vue.b9dc765f.js +0 -1
- package/dist/client/_nuxt/HelpFab.vue.c0c3f8e6.js +0 -1
- package/dist/client/_nuxt/NLink.vue.6dc3b4af.js +0 -1
- package/dist/client/_nuxt/NSectionBlock.012f83f1.css +0 -1
- package/dist/client/_nuxt/NSectionBlock.2d8e1431.js +0 -1
- package/dist/client/_nuxt/NSelect.vue.9cac29ef.js +0 -1
- package/dist/client/_nuxt/StateEditor.vue.2463efc9.js +0 -1
- package/dist/client/_nuxt/__blank.20eb2cab.js +0 -1
- package/dist/client/_nuxt/analyze-build.423f57eb.js +0 -1
- package/dist/client/_nuxt/assets.dc245910.js +0 -16
- package/dist/client/_nuxt/custom-_name_.9b02fa14.js +0 -1
- package/dist/client/_nuxt/entry.05b33d7f.js +0 -27
- package/dist/client/_nuxt/entry.79095383.css +0 -1
- package/dist/client/_nuxt/hooks.d674696d.js +0 -1
- package/dist/client/_nuxt/index.b2055c8f.js +0 -1
- package/dist/client/_nuxt/modules.7dc02a95.js +0 -2
- package/dist/client/_nuxt/open-graph.693bd031.js +0 -3
- package/dist/client/_nuxt/overview.f2e48477.js +0 -1
- package/dist/client/_nuxt/pages.745a0630.js +0 -1
- package/dist/client/_nuxt/payload.897ca8fa.js +0 -1
- package/dist/client/_nuxt/plugins.cd2e64ba.js +0 -1
- package/dist/client/_nuxt/server-routes.91c861d0.js +0 -9
- package/dist/client/_nuxt/settings.367ae337.js +0 -1
- package/dist/client/_nuxt/state-modules.c0927595.js +0 -1
- package/dist/client/_nuxt/storage-options.8fdc9b2a.js +0 -1
- package/dist/client/_nuxt/storage.76034502.js +0 -1
- package/dist/client/_nuxt/timeline.60d410a7.js +0 -29
- package/dist/client/_nuxt/virtual-files.829bd209.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as V,a5 as B,ag as _,r as w,b5 as O,bb as C,aa as $,o as i,m as p,k as u,G as c,f as a,t as J,p as l,a6 as D,b9 as P,ba as R,F as j,I as z,i as F,h as v,ap as G,bc as M,l as U,au as A,_ as E}from"./entry.e01776ec.js";import{_ as I}from"./DataSchemaButton.vue.125423b7.js";import{U as T}from"./json-editor-vue.b22bf91c.js";const Y=["open"],q={flex:"~ gap2","select-none":"","items-center":"",px4:""},Q=V({__name:"StateEditor",props:{name:{},open:{type:Boolean},state:{},readonly:{type:Boolean}},emits:["update:open"],setup(b,{emit:g}){const s=b,n=B(s,"open",g,{passive:!0}),k=_(),o=w(),d=O(s.name,"$9Gvv2FGyYa");s.state?o.value=JSON.parse(JSON.stringify(s.state)):(typeof s.state=="number"||typeof s.state!="string")&&(o.value=s.state);const m=C(o,e=>{typeof e!="number"&&typeof e!="string"?f(e,s.state):d.value=e},{deep:!0});function f(e,r){for(const t in e)e[t]===null?r[t]=null:Array.isArray(e[t])?r[t]=e[t].slice():typeof e[t]=="object"?f(e[t],r[t]):r[t]=e[t]}async function h(){m.pause(),o.value=JSON.parse(JSON.stringify(s.state)),await A(),m.resume()}return(e,r)=>{const t=E,S=I,N=$("tooltip");return i(),p("div",{class:"state-editor-details",open:e.name?a(n):!0},[u("div",q,[e.name?(i(),p("button",{key:0,flex:"~","cursor-pointer":"","items-center":"",class:c(a(n)?"":"op50"),onClick:r[0]||(r[0]=y=>n.value=!a(n))},[u("div",{"i-carbon-chevron-right":"",transition:"",class:c(a(n)?"rotate-90 op0":"")},null,2),u("code",{px3:"",py1:"","font-mono":"",class:c(a(n)?"bg-[#8881] rounded-t":"rounded hover:bg-active")},J(e.name),3)],2)):l("",!0),D(e.$slots,"actions",P(R({isOpen:a(n),name:e.name,state:a(d)}))),a(n)?(i(),p(j,{key:1},[z(F(t,{title:"Refresh View",icon:"carbon-renew",border:!1,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(T),G({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,Y)}}});export{Q as _};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as R,a as V,r as S,o,m as i,k as e,F as c,n as E,G as F,f as t,t as m,p as b,H as G,i as r,j as a,v as _,I as A,J as D,K as P,L as U,_ as L,M as X,N as ee,O as ne,P as te,Q as oe,R as le,S as ie,U as k,h as w,l as j,V as se,W as ae,A as re}from"./entry.e01776ec.js";import{_ as ue}from"./FilepathItem.vue.5af0b5df.js";import{_ as de}from"./NTip.vue.770a171a.js";import{_ as ce}from"./NCodeBlock.vue.adf1e9b4.js";import{_ as me}from"./NCheckbox.vue.6fb2ece1.js";import{_ as _e}from"./HelpFab.vue.98c902f4.js";import"./client.3f2665f1.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/",Se=R({__name:"BuildAnalyzeDetails",props:{current:{},prev:{}},setup(C){const p=C,f=V(()=>{const n=[{name:"Overview",id:"overview"}];return p.current.features.bundleClient&&n.push({name:"Client Bundle",id:"bundle-client"}),p.current.features.bundleNitro&&n.push({name:"Nitro Bundle",id:"bundle-nitro"}),p.current.features.viteInspect&&n.push({name:"Vite Inspect",id:"vite-inspect"}),n}),l=S(f.value[0]);function $(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 g(n){return`${((n.endTime-n.startTime)/1e3).toFixed(1)}s`}async function x(n){return P.clearAnalyzeBuilds(await U(),[n])}return(n,u)=>{const z=ue,N=L;return o(),i("div",pe,[e("div",fe,[(o(!0),i(c,null,E(t(f),(v,T)=>(o(),i("button",{key:T,px4:"",py2:"",border:"r base",hover:"bg-active",class:F(v.id===t(l).id?"":"border-b"),onClick:d=>l.value=v},[e("div",{class:F(v.id===t(l).id?"":"op30")},m(v.name),3)],10,ve))),128)),he]),t(l).id==="overview"?(o(),i("div",ye,[be,e("div",$e,[xe,e("div",null,[ge,e("div",null,m(n.current.name),1)]),we,e("div",null,[ze,e("div",null,m(g(n.current)),1)]),n.current.size?.clientBundle?(o(),i(c,{key:0},[Be,e("div",null,[ke,e("div",null,m($(n.current.size.clientBundle)),1)])],64)):b("",!0),n.current.size.nitroBundle?(o(),i(c,{key:1},[Ce,e("div",null,[Ne,e("div",null,m($(n.current.size.nitroBundle)),1)])],64)):b("",!0),Te,e("div",null,[Ae,e("div",null,m(t(G)(new Date(n.current.endTime))),1)]),De,e("div",null,[Ie,r(z,{filepath:n.current.analyzeDir},null,8,["filepath"])])]),Ve,r(N,{n:"rose",icon:"carbon-delete",onClick:u[0]||(u[0]=v=>x(n.current.name))},{default:a(()=>[_(" Delete this report ")]),_:1})])):b("",!0),u._lazyshow1||t(l).id==="bundle-client"?(u._lazyshow1=!0,o(),i(c,null,[A(e("iframe",{src:`${I}${n.current.slug}/client.html`,"h-full":"","w-full":""},null,8,["src"]),[[D,t(l).id==="bundle-client"]])],64)):b("v-show-if",!0),u._lazyshow2||t(l).id==="bundle-nitro"?(u._lazyshow2=!0,o(),i(c,null,[A(e("iframe",{src:`${I}${n.current.slug}/nitro.html`,"h-full":"","w-full":""},null,8,["src"]),[[D,t(l).id==="bundle-nitro"]])],64)):b("v-show-if",!0),u._lazyshow3||t(l).id==="vite-inspect"?(u._lazyshow3=!0,o(),i(c,null,[A(e("iframe",{src:`${I}${n.current.slug}/.vite-inspect/`,"h-full":"","w-full":""},null,8,["src"]),[[D,t(l).id==="vite-inspect"]])],64)):b("v-show-if",!0)])}}}),Fe={class:"markdown-body"},Pe=e("h1",null,"Build Analyze",-1),je=e("p",null,[_("DevTools provides a build analyze tool to help you understand the size of your app in production. Whenever you start a new build, it runs the command "),e("code",null,"nuxt build --analyze"),_(" and present the output data directly in DevTools for easy browsing and comparing.")],-1),Re=[Pe,je],Ee={__name:"analyze-build",setup(C,{expose:p}){return p({frontmatter:{}}),(l,$)=>(o(),i("div",Fe,Re))}},Ge={flex:"~ col"},Ue=["onClick"],Le={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:""},We={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),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":""},an=R({__name:"analyze-build",setup(C){const p=X(),f=ee(),l=ne(),$=te("analyze-build:slug",""),g=V(()=>f.value?.builds.find(d=>d.slug===$.value)??f.value?.builds[0]),x=S(!1),n=S(""),u=V(()=>f.value?.builds.some(d=>d.name===n.value.trim()));async function z(){n.value=await P.generateAnalyzeBuildName(),await p.start()&&(k.value={name:n.value,processId:await P.startAnalyzeBuild(await U(),n.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=L,O=Se,H=re,K=ie,M=se,W=de,J=ce,Q=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(t(f)?.builds,s=>(o(),i(c,{key:s.slug},[e("button",{flex:"~ col gap1","hover:bg-active":"",p3:"",class:F(s.slug===t(g)?.slug?"text-primary bg-active":""),onClick:y=>$.value=s.slug},[e("code",null,m(s.name),1),e("div",Le,[Oe,e("span",null,m(T(s)),1),He,e("span",null,m(t(G)(new Date(s.endTime))),1)])],10,Ue),Ke],64))),128)),e("div",Me,[("processAnalyzeBuildInfo"in d?d.processAnalyzeBuildInfo:t(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(()=>[t(g)?(o(),w(O,{key:0,current:t(g)},null,8,["current"])):(o(),w(H,{key:1}))]),_:1}),r(t(p),null,{default:a(({resolve:s})=>[r(Y,{"model-value":!0,onClose:y=>s(!1)},{default:a(()=>[e("div",We,[Je,Qe,r(M,{modelValue:t(n),"onUpdate:modelValue":h[2]||(h[2]=y=>j(n)?n.value=y:null),placeholder:"Build name"},null,8,["modelValue"]),t(u)?(o(),w(W,{key:0,"n-orange":""},{default:a(()=>[_(" A build with the same name already exists, continue would overrides the previous build result. ")]),_:1})):b("",!0),Ye,Ze,r(J,{code:`npx nuxi analyze --no-serve --name=${t(n)}`,lang:"bash",px4:"",py2:"",border:"~ base rounded",lines:!1},null,8,["code"]),r(Q,{modelValue:t(x),"onUpdate:modelValue":h[3]||(h[3]=y=>j(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{an as default};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import{d as X,r as N,X as q,o,m as c,i as d,f as t,k as e,v as $,F as z,n as Z,h as I,j as x,p as T,G as Y,Y as U,Z as de,a0 as pe,K as G,L as H,_ as ee,a1 as ne,V as oe,a as A,a2 as me,a3 as fe,a4 as se,t as F,a5 as ae,a6 as ve,l as R,a7 as he,b as te,a8 as _e,e as ge,a9 as xe,aa as le,I as W,ab as be,ac as we,W as ye,ad as $e,ae as ke,af as Ce}from"./entry.e01776ec.js";import{_ as Pe}from"./Navbar.vue.371e4d0a.js";import{_ as Ae}from"./NSectionBlock.4347cc14.js";import{_ as De}from"./FilepathItem.vue.5af0b5df.js";import{_ as Ve,u as Fe}from"./storage-options.ab028b2a.js";import{_ as Ne}from"./NDrawer.vue.8e620517.js";import{D as Ie}from"./constants.4e5eba24.js";import"./NIconTitle.vue.bf8093eb.js";import"./NCodeBlock.vue.adf1e9b4.js";import"./client.3f2665f1.js";const Se={key:0,"h-full":"","w-full":"",flex:"","items-center":"","justify-center":""},Te={for:"drop-zone-input","text-3xl":""},je={key:1,relative:"","h-full":"","w-full":"",grid:"~ rows-[max-content_1fr_max-content]"},Ee=e("div",{px6:"",py6:""},[e("h1",{"text-2xl":""}," Upload "),e("p",{"text-sm":"",op50:""}," Drag and drop files to upload ")],-1),Ue={grid:"~ cols-minmax-8rem","overflow-auto":"",p6:""},Le={flex:"","items-center":"","justify-center":"","of-hidden":"",rounded:"","rounded-t-lg":"","bg-active":"","object-cover":"",class:"aspect-1/1",border:"~ base"},ze=["src"],Be={flex:"~ gap1","items-center":""},Me={flex:"~ gap-2","items-center":"","justify-center":"",p8:""},Oe=X({__name:"DropZone",props:{folder:{type:String,required:!0}},setup(j){const l=j,p=N(!1),n=N(),m=N([]),h=["image","video"];function D(r){n.value=r.target,p.value=!0}function u(r){r.target===n.value&&(p.value=!1)}function k(r){r.preventDefault()}function K(r){r.preventDefault(),L(r.dataTransfer.files)}function L(r){const g=Array.from(r||[]);if(g.length){const v=[],C=m.value.map(f=>f.name);for(const f of g)if(C.includes(f.name)){let a=1;const[V,i]=f.name.split(".");for(;C.includes(`${V} (${a}).${i}`);)a++;const s=`${V}-${a}.${i}`,M=new Blob([f],{type:f.type}),O=new File([M],s,{lastModified:Date.now()});v.push(O),C.push(s)}else f.type===""?U({message:"Folders are not supported yet",icon:"carbon:face-dissatisfied",classes:"text-orange"}):h.some(a=>f.type.includes(a))?v.push(f):U({message:`"${f.type}" file type is not allowed`,icon:"carbon:face-dissatisfied",classes:"text-orange"});m.value=[...m.value,...v]}}async function b(){if(de.value||pe.value)return;const r=[];for(const g of m.value){const v=new FileReader;v.readAsDataURL(g);const f=(await new Promise(a=>{v.onload=()=>a(v.result)})).split(";base64,").pop();r.push({path:g.name,encoding:"base64",content:f})}await G.writeStaticAssets(await H(),[...r],l.folder).then(()=>{E(),U({message:"Files uploaded successfully!",icon:"i-carbon:checkmark"})}).catch(g=>{console.error(g),E(),U({message:`Error uploading files: ${g}`,icon:"i-carbon-warning",classes:"text-red"})}),p.value=!1}function _(r){m.value?.splice(r,1)}function w(r){return URL.createObjectURL(r)}function B(r,g){const[v,C]=r.name.split("."),f=g.replace(/\.\w+$/,""),a=`${f}.${C}`;return f.length===0?(alert("File name must be at least 1 characters long"),v):(Object.defineProperty(r,"name",{value:a,writable:!1}),m.value.splice(m.value.indexOf(r),1,r),r)}function S(){m.value=[]}function E(){p.value=!1,S()}return q("dragenter",D),q("dragleave",u),q("dragover",k),q("drop",K),(r,g)=>{const v=ee,C=ne,f=oe;return o(),c("div",{fixed:"","bottom-0":"","left-13":"","right-0":"","top-0":"","z-10":"","backdrop-blur-20":"","transition-all":"",class:Y(t(p)?"opacity-100 visible":"opacity-0 invisible")},[d(v,{icon:"carbon-close",absolute:"","right-5":"","top-5":"","z-20":"","text-xl":"",border:!1,onClick:E}),t(m)?.length?(o(),c("div",je,[Ee,e("div",Ue,[(o(!0),c(z,null,Z(t(m),(a,V)=>(o(),c("div",{key:a.name,flex:"~ col gap-2",relative:"","h-50":"","w-40":"","items-center":""},[e("div",Le,[e("img",{"h-full":"","w-full":"","rounded-t-lg":"","object-cover":"",src:w(a)},null,8,ze)]),e("div",Be,[d(f,{n:"xs","h-full":"","flex-auto":"","model-value":a.name,"onUpdate:modelValue":i=>B(a,i.target.value)},null,8,["model-value","onUpdate:modelValue"]),d(v,{n:"red",icon:"carbon-trash-can","h-full":"","flex-none":"",title:"Remove file",onClick:i=>_(V)},null,8,["onClick"])])]))),128))]),e("div",Me,[t(m).length?(o(),I(v,{key:0,n:"red",onClick:S},{default:x(()=>[d(C,{icon:"carbon-clean"}),$(" Clear ")]),_:1})):T("",!0),d(v,{disabled:!t(m).length,n:"primary solid",onClick:b},{default:x(()=>[d(C,{icon:"carbon-cloud-upload"}),$(" Upload ")]),_:1},8,["disabled"])])])):(o(),c("div",Se,[e("label",Te,[d(C,{icon:"carbon-cloud-upload","mr-2":""}),$(" Drop files here or click to select ")]),e("input",{id:"drop-zone-input",type:"file",multiple:"",hidden:"",onChange:g[0]||(g[0]=a=>L(a.target.files))},null,32)]))],2)}}}),Re=X({__name:"AssetFontPreview",props:{asset:{}},setup(j){const l=j,p=A(()=>`devtools-assets-${me(l.asset)}`);return fe(A(()=>`
|
|
2
|
+
@font-face {
|
|
3
|
+
font-family: '${p.value}';
|
|
4
|
+
src: url('${l.asset.publicPath}');
|
|
5
|
+
}
|
|
6
|
+
`)),(n,m)=>(o(),c("div",{"of-hidden":"",style:se({fontFamily:`'${t(p)}'`})}," 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))}}),Ke={flex:"","items-center":"","justify-center":"","of-hidden":"","bg-active":"","object-cover":"",p1:""},Xe=["src"],Ge={key:2,"i-carbon-document":"","text-3xl":"",op20:""},Ze={key:3,"w-full":"","self-start":"",p4:""},We=["textContent"],qe={key:4},Ye=["src","autoplay","controls"],He={key:5},Je={key:0,"i-carbon-volume-up":"","text-3xl":"",op20:""},Qe=["src"],et={key:6,"i-carbon-help":"","text-3xl":"",op20:""},ie=X({__name:"AssetPreview",props:{asset:{},textContent:{},detail:{type:Boolean}},setup(j){return(l,p)=>{const n=Re;return o(),c("div",Ke,[l.asset.type==="image"?(o(),c("img",{key:0,src:l.asset.publicPath},null,8,Xe)):l.asset.type==="font"?(o(),I(n,{key:l.asset.publicPath,asset:l.asset,"self-stretch":"",p2:"","text-2xl":""},null,8,["asset"])):l.asset.type==="text"&&!l.textContent?(o(),c("div",Ge)):l.asset.type==="text"&&l.textContent?(o(),c("div",Ze,[e("pre",{"max-h-10rem":"","of-hidden":"","text-xs":"","font-mono":"",textContent:F(l.textContent)},null,8,We)])):l.asset.type==="video"?(o(),c("div",qe,[e("video",{src:l.asset.publicPath,autoplay:l.detail,controls:l.detail},null,8,Ye)])):l.asset.type==="audio"?(o(),c("div",He,[l.detail?(o(),c("audio",{key:1,src:l.asset.publicPath,controls:""},null,8,Qe)):(o(),c("div",Je))])):(o(),c("div",et))])}}}),tt={flex:"~ col gap-1",hover:"bg-active","items-center":"","of-hidden":"",rounded:"",p2:""},nt={"w-full":"","of-hidden":"",truncate:"","ws-nowrap":"","text-center":"","text-xs":""},ot=X({__name:"AssetGridItem",props:{asset:{},folder:{}},setup(j){const l=j,p=A(()=>l.folder&&l.asset.path.startsWith(l.folder)?l.asset.path.slice(l.folder.length):l.asset.path);return(n,m)=>{const h=ie;return o(),c("button",tt,[d(h,{"h-30":"","w-30":"",rounded:"",border:"~ base",asset:n.asset},null,8,["asset"]),e("div",nt,F(t(p)),1)])}}}),re=X({__name:"AssetListItem",props:{item:{},index:{default:0},modelValue:{}},setup(j,{emit:l}){const p=j,n=ae(p,"modelValue",l,{passive:!0}),m=A(()=>p.item?.children?.length),h=N(!0),D=A(()=>m.value?"i-carbon-folder":p.item.type==="image"?"i-carbon-image":p.item.type==="video"?"i-carbon-video":p.item.type==="audio"?"i-carbon-volume-up":p.item.type==="font"?"i-carbon-text-small-caps":p.item.type==="text"?"i-carbon-document":p.item.type==="json"?"i-carbon-json":"i-carbon-document-blank");return(u,k)=>{const K=ne,L=re;return o(),c("div",null,[e("button",{flex:"~ gap-2","w-full":"","items-center":"",hover:"bg-active",px4:"",py1:"",style:se({paddingLeft:`calc(1rem + ${u.index*1.5}em)`}),class:Y({"bg-active":!t(m)&&t(n)?.filePath===u.item?.filePath}),border:"b base",onClick:k[0]||(k[0]=b=>t(m)?h.value=!t(h):n.value=u.item)},[e("div",{class:Y(t(D))},null,2),e("span",{class:Y({"flex items-center":t(m)}),"flex-auto":"","text-start":"","text-sm":"","font-mono":""},F(u.item.path),3),t(m)?(o(),I(K,{key:0,icon:"carbon:chevron-right","transform-rotate":t(h)?90:0,transition:""},null,8,["transform-rotate"])):T("",!0)],6),t(h)?ve(u.$slots,"default",{key:0},()=>[(o(!0),c(z,null,Z(u.item?.children,b=>(o(),I(L,{key:b.filepath,modelValue:t(n),"onUpdate:modelValue":k[1]||(k[1]=_=>R(n)?n.value=_:null),item:b,index:u.index+1},null,8,["modelValue","item","index"]))),128))]):T("",!0)])}}}),st={flex:"~ col gap-4","min-h-full":"","w-full":"","of-hidden":"",p4:""},at=e("div",{flex:"~ gap2","mb--2":"","items-center":"",op50:""},[e("div",{"x-divider":""}),e("div",{"flex-none":""}," Preview "),e("div",{"x-divider":""})],-1),lt={flex:"~","items-center":"","justify-center":""},it=e("div",{flex:"~ gap2","mb--2":"","items-center":"",op50:""},[e("div",{"x-divider":""}),e("div",{"flex-none":""}," Details "),e("div",{"x-divider":""})],-1),rt={"max-w-full":"","w-full":"","table-fixed":""},ct=e("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," Filepath ",-1),ut={flex:"~ gap-1","w-full":"","items-center":""},dt=e("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," Public Path ",-1),pt={flex:"~ gap-1","w-full":"","items-center":"","of-hidden":""},mt={"flex-auto":"","of-hidden":"",truncate:"","ws-pre":"","font-mono":""},ft=e("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," Type ",-1),vt={capitalize:""},ht=e("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," Image Size ",-1),_t={key:0},gt=e("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," Aspect Ratio ",-1),xt=e("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," File size ",-1),bt=e("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," Last modified ",-1),wt={op70:""},yt=e("div",{flex:"~ gap2","mb--2":"","items-center":"",op50:""},[e("div",{"x-divider":""}),e("div",{"flex-none":""}," Actions "),e("div",{"x-divider":""})],-1),$t={flex:"~ gap2 wrap"},kt=e("div",{"flex-auto":""},null,-1),Ct={flex:"~ col gap-4","min-h-full":"","w-full":"","of-hidden":"",p8:""},Pt=e("span",null," Are you sure you want to delete this asset? ",-1),At={flex:"~ gap2 wrap justify-center"},Dt={flex:"~ col gap-4","min-h-full":"","w-full":"","of-hidden":"",p8:""},Vt={flex:"~ gap2 wrap justify-center"},Ft={flex:"~ col gap-4","min-h-full":"","w-full":"","of-hidden":"",p4:""},Nt=["onKeydown"],It={flex:"","justify-end":"","gap-4":""},St=X({__name:"AssetDetails",props:{modelValue:{}},setup(j,{emit:l}){const n=ae(j,"modelValue",l,{passive:!0}),m=he(),h=te(()=>{if(n.value.type==="image")return G.getImageMeta(n.value.filePath)}),D=N(!1),u=N(),k=N(0),K=te(async()=>{if(n.value.type!=="text")return;k.value;const i=await G.getTextAssetContent(n.value.filePath);return u.value=i,i});async function L(){if(K.value!==u.value)try{await G.writeStaticAssets(await H(),[{path:n.value.path,content:u.value,override:!0}],""),D.value=!1,k.value++,U({message:"Updated",icon:"i-carbon-checkmark",classes:"text-green"})}catch{U({message:"Something went wrong!",icon:"i-carbon-warning",classes:"text-red"})}}const b=_e(),_=A(()=>(b.value?._installedModules||[]).some(s=>s.meta?.name==="@nuxt/image"||s.meta?.name==="@nuxt/image-edge")),w=A(()=>{const i=[];if(n.value.type==="image"){const s=h.value?.width?`
|
|
7
|
+
width="${h.value.width}"
|
|
8
|
+
height="${h.value.height}" `:" ";return i.push({lang:"vue-html",code:`<img${s}
|
|
9
|
+
src="${n.value.publicPath}"
|
|
10
|
+
/>`,name:"Plain Image"}),_.value&&i.push({lang:"vue-html",code:`<NuxtImg${s}
|
|
11
|
+
src="${n.value.publicPath}"
|
|
12
|
+
/>`,name:"Nuxt Img",docs:"https://image.nuxt.com/usage/nuxt-img"},{lang:"vue-html",code:`<NuxtPicture${s}
|
|
13
|
+
src="${n.value.publicPath}"
|
|
14
|
+
/>`,name:"Nuxt Picture",docs:"https://image.nuxt.com/usage/nuxt-picture"}),i}return i.push({lang:"html",code:`<a download href="${n.value.publicPath}">
|
|
15
|
+
Download ${n.value.path.split("/").slice(-1)[0]}
|
|
16
|
+
</a>`,name:"Download link"}),i}),B=ge(),S=xe(()=>n.value.mtime),E=A(()=>{const i=n.value.size;return i<1024?`${i} B`:i<1024*1024?`${(i/1024).toFixed(2)} KB`:`${(i/1024/1024).toFixed(2)} MB`}),r=A(()=>{if(!h.value?.width||!h.value?.height)return"";const i=(M,O)=>O?i(O,M%O):M,s=i(h.value.width,h.value.height);return s>3?`${h.value.width/s}:${h.value.height/s}`:""}),g=A(()=>["image","text","video","audio","font"].includes(n.value.type)),v=N(!1);async function C(){try{await G.deleteStaticAsset(await H(),n.value.filePath),n.value=void 0,v.value=!1,U({message:"Asset deleted",icon:"i-carbon-checkmark",classes:"text-green"})}catch{U({message:"Something went wrong!",icon:"i-carbon-warning",classes:"text-red"})}}const f=N(!1),a=N("");async function V(){const i=n.value.filePath.split("/"),s=i.slice(-1)[0].split(".").slice(0,-1).join(".");if(!a.value||a.value===s)return U({message:"Please enter a new name",icon:"i-carbon-warning",classes:"text-orange"});try{const M=i.slice(-1)[0].split(".").slice(-1)[0],O=`${i.slice(0,-1).join("/")}/${a.value}.${M}`;await G.renameStaticAsset(await H(),n.value.filePath,O),n.value=void 0,f.value=!1,U({message:"Asset renamed",icon:"i-carbon-checkmark",classes:"text-green"})}catch{U({message:"Something went wrong!",icon:"i-carbon-warning",classes:"text-red"})}}return(i,s)=>{const M=ie,O=De,P=ee,ce=Ve,J=ye,ue=oe,Q=le("tooltip");return o(),c(z,null,[e("div",st,[t(g)?(o(),c(z,{key:0},[at,e("div",lt,[d(M,{detail:"","max-h-80":"","min-h-20":"","min-w-20":"","w-auto":"",rounded:"",border:"~ base",asset:t(n),"text-content":t(K)},null,8,["asset","text-content"])])],64)):T("",!0),it,e("table",rt,[e("tbody",null,[e("tr",null,[ct,e("td",null,[e("div",ut,[d(O,{filepath:t(n).filePath,"text-left":""},null,8,["filepath"]),W(d(P,{"flex-none":"",title:"Open in Editor",icon:"carbon-launch",border:!1,onClick:s[0]||(s[0]=y=>t(m)(t(n).filePath))},null,512),[[Q,"Open in Editor"]])])])]),e("tr",null,[dt,e("td",null,[e("div",pt,[e("div",mt,F(t(n).publicPath),1),W(d(P,{"flex-none":"",title:"Copy public path",icon:"carbon-copy",border:!1,onClick:s[1]||(s[1]=y=>t(B)(t(n).publicPath))},null,512),[[Q,"Copy public path"]]),W(d(P,{"flex-none":"",to:t(n).publicPath,icon:"carbon-launch",target:"_blank",border:!1,title:"Open in browser"},null,8,["to"]),[[Q,"Open in browser"]])])])]),e("tr",null,[ft,e("td",vt,F(t(n).type),1)]),t(h)?.width?(o(),c(z,{key:0},[e("tr",null,[ht,e("td",null,F(t(h).width)+" x "+F(t(h).height),1)]),t(r)?(o(),c("tr",_t,[gt,e("td",null,F(t(r)),1)])):T("",!0)],64)):T("",!0),e("tr",null,[xt,e("td",null,F(t(E)),1)]),e("tr",null,[bt,e("td",null,[$(F(new Date(t(n).mtime).toLocaleString())+" ",1),e("span",wt,"("+F(t(S))+")",1)])])])]),yt,e("div",$t,[d(P,{to:t(n).publicPath,download:"",target:"_blank",icon:"carbon-download",n:"green"},{default:x(()=>[$(" Download ")]),_:1},8,["to"]),t(n).type==="text"?(o(),I(P,{key:0,icon:"carbon-edit",n:"cyan",onClick:s[2]||(s[2]=y=>D.value=!t(D))},{default:x(()=>[$(" Edit ")]),_:1})):T("",!0),d(P,{icon:"carbon-text-annotation-toggle",n:"blue",onClick:s[3]||(s[3]=y=>f.value=!t(f))},{default:x(()=>[$(" Rename ")]),_:1}),d(P,{icon:"carbon-delete",n:"red",onClick:s[4]||(s[4]=y=>v.value=!t(v))},{default:x(()=>[$(" Delete ")]),_:1}),t(n).type==="image"?(o(),I(P,{key:1,disabled:"",icon:"carbon-image-service"},{default:x(()=>[$(" Optimize image (Coming soon) ")]),_:1})):T("",!0)]),kt,t(w).length?(o(),I(ce,{key:1,border:"t base","mx--4":"","mb--4":"","code-snippets":t(w)},null,8,["code-snippets"])):T("",!0)]),d(J,{modelValue:t(v),"onUpdate:modelValue":s[6]||(s[6]=y=>R(v)?v.value=y:null)},{default:x(()=>[e("div",Ct,[Pt,e("div",At,[d(P,{icon:"carbon-close",onClick:s[5]||(s[5]=y=>v.value=!1)},{default:x(()=>[$(" Cancel ")]),_:1}),d(P,{icon:"carbon-delete",n:"red",onClick:C},{default:x(()=>[$(" Delete ")]),_:1})])])]),_:1},8,["modelValue"]),d(J,{modelValue:t(f),"onUpdate:modelValue":s[9]||(s[9]=y=>R(f)?f.value=y:null)},{default:x(()=>[e("div",Dt,[d(ue,{modelValue:t(a),"onUpdate:modelValue":s[7]||(s[7]=y=>R(a)?a.value=y:null),placeholder:"New name",n:"blue"},null,8,["modelValue"]),e("div",Vt,[d(P,{icon:"carbon-close",onClick:s[8]||(s[8]=y=>f.value=!1)},{default:x(()=>[$(" Cancel ")]),_:1}),d(P,{icon:"carbon-text-annotation-toggle",n:"blue",onClick:V},{default:x(()=>[$(" Rename ")]),_:1})])])]),_:1},8,["modelValue"]),t(n).type==="text"?(o(),I(J,{key:0,modelValue:t(D),"onUpdate:modelValue":s[12]||(s[12]=y=>R(D)?D.value=y:null)},{default:x(()=>[e("div",Ft,[W(e("textarea",{"onUpdate:modelValue":s[10]||(s[10]=y=>R(u)?u.value=y:null),placeholder:"Item value...",class:"h-lg w-xl of-auto rounded-lg p-4 text-sm font-mono outline-none",onKeydown:be(L,["enter"])},null,40,Nt),[[we,t(u)]]),e("div",It,[d(P,{icon:"carbon-close",onClick:s[11]||(s[11]=y=>D.value=!1)},{default:x(()=>[$(" Cancel ")]),_:1}),d(P,{icon:"carbon:save",n:"primary",onClick:L},{default:x(()=>[$(" save ")]),_:1})])])]),_:1},8,["modelValue"])):T("",!0)],64)}}}),Tt={"h-full":"","of-auto":""},jt={"flex-none":"",flex:"~ gap2 items-center"},Et={op50:""},Ut={key:0},Lt={"mt--4":"",px2:"",grid:"~ cols-minmax-8rem"},zt={key:1,p2:"",grid:"~ cols-minmax-8rem"},Bt={key:1},Ht=X({__name:"assets",setup(j){const l=$e(),p=N(""),n=A(()=>new ke(l.value||[],{keys:["path"]})),m=A(()=>p.value?n.value.search(p.value).map(_=>_.item):l.value||[]),h=A(()=>{const b={};for(const _ of m.value){const w=`${_.path.split("/").slice(0,-1).join("/")}/`;b[w]||(b[w]=[]),b[w].push(_)}return Object.entries(b).sort(([_],[w])=>_.localeCompare(w))}),D=A(()=>{const b={path:"public",children:[]},_=(w,B,S)=>{const[E,...r]=B;let g=w.children.find(v=>v.path===E);g||(g={...S,path:E,children:[]},w.children.push(g)),r.length>1?_(g,r,S):r.length===1&&g.children.push({...S,path:r[0]})};return m.value.forEach(w=>{const B=w.path.split("/").filter(S=>S!=="");_(b,B,w)}),b.children}),u=N(),{view:k}=Fe("assets");function K(){k.value=k.value==="list"?"grid":"list"}Ce("Escape",()=>{u.value=void 0});const L=N();return(b,_)=>{const w=ee,B=Pe,S=Oe,E=ot,r=Ae,g=re,v=St,C=Ne,f=le("tooltip");return o(),c("div",Tt,[d(B,{ref_key:"navbar",ref:L,search:t(p),"onUpdate:search":_[0]||(_[0]=a=>R(p)?p.value=a:null),pb2:""},{actions:x(()=>[e("div",jt,[W(d(w,{"text-lg":"",border:!1,icon:t(k)==="grid"?"i-carbon-list":"i-carbon-grid",title:"Toggle view",onClick:K},null,8,["icon"]),[[f,"Toggle View",void 0,{"bottom-end":!0}]])])]),default:x(()=>[e("div",Et,[t(p)?(o(),c("span",Ut,F(t(m).length)+" matched · ",1)):T("",!0),e("span",null,F(t(l)?.length)+" assets in total",1)])]),_:1},8,["search"]),d(S,{folder:"/"}),t(k)==="grid"?(o(),c(z,{key:0},[t(h).length>1?(o(!0),c(z,{key:0},Z(t(h),([a,V])=>(o(),I(r,{key:a,text:a,description:`${V.length} items`,open:V.length<=("DETAILS_MAX_ITEMS"in b?b.DETAILS_MAX_ITEMS:t(Ie)),padding:!1},{default:x(()=>[e("div",Lt,[(o(!0),c(z,null,Z(V,i=>(o(),I(E,{key:i.path,asset:i,folder:a,onClick:s=>u.value=i},null,8,["asset","folder","onClick"]))),128))])]),_:2},1032,["text","description","open"]))),128)):(o(),c("div",zt,[(o(!0),c(z,null,Z(t(m),a=>(o(),I(E,{key:a.path,asset:a,onClick:V=>u.value=a},null,8,["asset","onClick"]))),128))]))],64)):(o(),c("div",Bt,[(o(!0),c(z,null,Z(t(D),(a,V)=>(o(),I(g,{key:V,modelValue:t(u),"onUpdate:modelValue":_[1]||(_[1]=i=>R(u)?u.value=i:null),item:a},null,8,["modelValue","item"]))),128))])),d(C,{"model-value":!!t(u),"auto-close":"","w-120":"",top:t(L),onClose:_[3]||(_[3]=a=>u.value=void 0)},{default:x(()=>[t(u)?(o(),I(v,{key:0,modelValue:t(u),"onUpdate:modelValue":_[2]||(_[2]=a=>R(u)?u.value=a:null)},null,8,["modelValue"])):T("",!0)]),_:1},8,["model-value","top"])])}}});export{Ht as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{bm as f,bB as r}from"./entry.e01776ec.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};
|