@nuxt/devtools 0.8.5 → 1.0.0-beta.1
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 +189 -69
- package/dist/chunks/vscode.mjs +13 -11
- package/dist/client/200.html +17 -17
- package/dist/client/404.html +17 -17
- package/dist/client/_nuxt/{CodeDiff.vue.0e58df1f.js → CodeDiff.vue.09a831fc.js} +1 -1
- package/dist/client/_nuxt/{ComposableItem.vue.e263b9a9.js → ComposableItem.vue.770ce9d1.js} +1 -1
- package/dist/client/_nuxt/DataSchemaButton.vue.65a9244c.js +1 -0
- package/dist/client/_nuxt/{DataSchemaDrawer.6de1f238.js → DataSchemaDrawer.939e0d36.js} +2 -2
- package/dist/client/_nuxt/{DurationDisplay.vue.8da73fd3.js → DurationDisplay.vue.3abddd08.js} +1 -1
- package/dist/client/_nuxt/{FilepathItem.vue.7bd675c6.js → FilepathItem.vue.66158bcd.js} +1 -1
- package/dist/client/_nuxt/HelpFab.vue.074157ff.js +1 -0
- package/dist/client/_nuxt/LaunchPage.vue.20d8d836.js +1 -0
- package/dist/client/_nuxt/NBadge.532c6829.js +1 -0
- package/dist/client/_nuxt/NCheckbox.vue.83a6e70e.js +1 -0
- package/dist/client/_nuxt/{NCodeBlock.vue.84865d5b.js → NCodeBlock.vue.d4a74ca4.js} +1 -1
- package/dist/client/_nuxt/NDrawer.vue.f03c3dec.js +1 -0
- package/dist/client/_nuxt/{NDropdown.vue.d756d40c.js → NDropdown.vue.885f70c3.js} +1 -1
- package/dist/client/_nuxt/{NIconTitle.vue.b6d28480.js → NIconTitle.vue.5caf9fc5.js} +1 -1
- package/dist/client/_nuxt/NLink.vue.c05eef3c.js +1 -0
- package/dist/client/_nuxt/{NMarkdown.vue.d2063d22.js → NMarkdown.vue.52b3ce56.js} +1 -1
- package/dist/client/_nuxt/NNavbar.vue.0f176f87.js +1 -0
- package/dist/client/_nuxt/{NSectionBlock.42a3cefc.js → NSectionBlock.43816001.js} +1 -1
- package/dist/client/_nuxt/NSelect.vue.dcac9c73.js +1 -0
- package/dist/client/_nuxt/{NSelectTabs.vue.4a83d611.js → NSelectTabs.vue.411a7347.js} +1 -1
- package/dist/client/_nuxt/{NSwitch.vue.21018268.js → NSwitch.vue.aacb5de3.js} +1 -1
- package/dist/client/_nuxt/{NTip.vue.d193bf96.js → NTip.vue.7a94f00d.js} +1 -1
- package/dist/client/_nuxt/StateEditor.vue.e862f0c1.js +1 -0
- package/dist/client/_nuxt/analyze-build.2cdd206f.js +1 -0
- package/dist/client/_nuxt/assets.41fcf77e.js +16 -0
- package/dist/client/_nuxt/{client.d926285a.js → client.ab169146.js} +1 -1
- package/dist/client/_nuxt/components.81bb7f4d.js +98 -0
- package/dist/client/_nuxt/custom-_name_.3060f125.js +1 -0
- package/dist/client/_nuxt/{default.c4c43b40.js → default.de670135.js} +1 -1
- package/dist/client/_nuxt/entry.9effa704.js +27 -0
- package/dist/client/_nuxt/entry.ebd8706b.css +1 -0
- package/dist/client/_nuxt/{error-404.087131b3.js → error-404.b43ed6fa.js} +1 -1
- package/dist/client/_nuxt/{error-500.d1c41037.js → error-500.9a32d319.js} +1 -1
- package/dist/client/_nuxt/{full.478da439.js → full.44b6f3d9.js} +1 -1
- package/dist/client/_nuxt/hooks.85310903.js +1 -0
- package/dist/client/_nuxt/imports.3e92b5b9.js +1 -0
- package/dist/client/_nuxt/index.370f8c55.js +17 -0
- package/dist/client/_nuxt/index.780a9ee0.js +1 -0
- package/dist/client/_nuxt/json-editor-vue.724e0801.js +129 -0
- package/dist/client/_nuxt/{middleware.87876377.js → middleware.44a34c7b.js} +1 -1
- package/dist/client/_nuxt/modules.24081f84.js +2 -0
- package/dist/client/_nuxt/{none.cfaeed76.js → none.06949a5f.js} +1 -1
- package/dist/client/_nuxt/open-graph.6cf823d3.js +3 -0
- package/dist/client/_nuxt/overview.86a88207.js +1 -0
- package/dist/client/_nuxt/pages.23eb0566.js +1 -0
- package/dist/client/_nuxt/payload.1baa204b.js +1 -0
- package/dist/client/_nuxt/plugins.f261769b.js +1 -0
- package/dist/client/_nuxt/runtime-configs.a5615107.js +1 -0
- package/dist/client/_nuxt/server-routes.2022f4ba.js +9 -0
- package/dist/client/_nuxt/settings.ab7b45b3.js +1 -0
- package/dist/client/_nuxt/{state-components.c2201640.js → state-components.1d5849c5.js} +1 -1
- package/dist/client/_nuxt/state-modules.78318316.js +1 -0
- package/dist/client/_nuxt/storage-options.8ca9ecbc.js +1 -0
- package/dist/client/_nuxt/storage.cb6d643c.js +1 -0
- package/dist/client/_nuxt/{terminals.a1c82952.js → terminals.06dde221.js} +3 -3
- package/dist/client/_nuxt/timeline.5add59be.js +29 -0
- package/dist/client/_nuxt/{unocss-runtime.dedd4a37.js → unocss-runtime.1dfe0ac4.js} +2 -2
- package/dist/client/_nuxt/virtual-files.804fdba7.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/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.d18bab28.mjs +84 -0
- package/package.json +36 -35
- package/dist/client/_nuxt/Badge.15b76164.js +0 -1
- package/dist/client/_nuxt/DataSchemaButton.vue.41ad6158.js +0 -1
- package/dist/client/_nuxt/DrawerRight.vue.5bde5a0b.js +0 -1
- package/dist/client/_nuxt/HelpFab.vue.f082102a.js +0 -1
- package/dist/client/_nuxt/LaunchPage.vue.f8df9e2a.js +0 -1
- package/dist/client/_nuxt/NCheckbox.vue.fcd1d971.js +0 -1
- package/dist/client/_nuxt/NLink.vue.e0a3a39a.js +0 -1
- package/dist/client/_nuxt/NSelect.vue.e3495019.js +0 -1
- package/dist/client/_nuxt/Navbar.vue.bacddf14.js +0 -1
- package/dist/client/_nuxt/StateEditor.vue.5fea57d7.js +0 -1
- package/dist/client/_nuxt/analyze-build.7513704d.js +0 -1
- package/dist/client/_nuxt/assets.35017b46.js +0 -16
- package/dist/client/_nuxt/components.fc36eeef.js +0 -98
- package/dist/client/_nuxt/custom-_name_.50e8c68f.js +0 -1
- package/dist/client/_nuxt/entry.38bf3bdf.css +0 -1
- package/dist/client/_nuxt/entry.54b63325.js +0 -27
- package/dist/client/_nuxt/hooks.d9e8fd29.js +0 -1
- package/dist/client/_nuxt/imports.79d88ab3.js +0 -1
- package/dist/client/_nuxt/index.5e3c6999.js +0 -17
- package/dist/client/_nuxt/index.86b1fd88.js +0 -1
- package/dist/client/_nuxt/json-editor-vue.ce96762e.js +0 -129
- package/dist/client/_nuxt/modules.caf682af.js +0 -2
- package/dist/client/_nuxt/open-graph.cd0bdf97.js +0 -3
- package/dist/client/_nuxt/overview.14a73720.js +0 -1
- package/dist/client/_nuxt/pages.746eb038.js +0 -1
- package/dist/client/_nuxt/payload.913d1fd8.js +0 -1
- package/dist/client/_nuxt/plugins.5342d060.js +0 -1
- package/dist/client/_nuxt/runtime-configs.bf4f2459.js +0 -1
- package/dist/client/_nuxt/server-routes.8c094c9d.js +0 -9
- package/dist/client/_nuxt/settings.59f50baa.js +0 -1
- package/dist/client/_nuxt/state-modules.8816f603.js +0 -1
- package/dist/client/_nuxt/storage-options.b1a5fc25.js +0 -1
- package/dist/client/_nuxt/storage.713a7e46.js +0 -1
- package/dist/client/_nuxt/timeline.9cfa88d9.js +0 -29
- package/dist/client/_nuxt/virtual-files.7dc060d0.js +0 -1
- package/dist/shared/devtools.18eefaee.mjs +0 -78
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as i,a6 as r,o as p,m as b,I as u,bG as h,f as a,k as n,l as k,ac as f,i as m,a7 as v,G as _,a2 as x}from"./entry.9effa704.js";const V=["checked","disabled"],y=["disabled"],B={class:"n-checkbox-box n-checked:n-checkbox-box-checked peer-active:n-active-base peer-focus-visible:n-focus-base n-transition"},$=i({__name:"NCheckbox",props:{modelValue:{type:[Boolean,null],default:!1},disabled:{type:Boolean,default:!1}},setup(c,{emit:t}){const e=r(c,"modelValue",t,{passive:!0});return(o,s)=>{const d=x;return p(),b("label",{class:"n-checkbox hover:n-checkbox-hover select-none items-center n-disabled:n-disabled",checked:a(e)||null,disabled:o.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:o.disabled,onKeypress:s[1]||(s[1]=f(l=>e.value=!a(e),["enter"]))},null,40,y),[[h,a(e)]]),n("span",B,[m(d,{class:"n-checkbox-icon scale-0 transform op0 n-transition n-checked:scale-100 n-checked:op100"})]),n("span",{class:_([a(e)?"":"op50","n-transition"])},[v(o.$slots,"default")],2)],8,V)}}});export{$ as _};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{d as u}from"./client.
|
|
1
|
+
import{d as u}from"./client.ab169146.js";import{d as _,a as m,av as k,o as n,m as s,G as d,k as t,F as r,n as f,t as g}from"./entry.9effa704.js";const h=["innerHTML"],v={class:"shiki"},C=["textContent"],y=t("br",null,null,-1),x=_({__name:"NCodeBlock",props:{code:{},lang:{},lines:{type:Boolean,default:!0},transformRendered:{}},emits:["loaded"],setup(a,{emit:c}){const o=a,l=m(()=>{const e=o.lang==="text"?{code:o.code,supported:!1}:u.value?.devtools.renderCodeHighlight(o.code,o.lang)||{code:o.code,supported:!1};return e.supported&&o.transformRendered&&(e.code=o.transformRendered(e.code)),e.supported&&k(()=>c("loaded")),e});return(e,B)=>e.lang&&l.value.supported?(n(),s("pre",{key:0,class:d(["n-code-block",e.lines?"n-code-block-lines":""]),innerHTML:l.value.code},null,10,h)):(n(),s("pre",{key:1,class:d(["n-code-block",e.lines?"n-code-block-lines":""])},[t("pre",v,[t("code",null,[(n(!0),s(r,null,f(e.code.split(`
|
|
2
2
|
`),(i,p)=>(n(),s(r,{key:p},[t("span",{class:"line",textContent:g(i)},null,8,C),y],64))),128))])])],2))}});export{x as _};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as p,r as b,bz as n,aR as h,h as g,j as y,aq as l,aQ as v,o as i,m as k,i as B,k as C,a7 as $,f as o,p as w,_ as V}from"./entry.9effa704.js";const z=["border"],N={relative:"","h-full":"","w-full":"","of-auto":""},S=p({__name:"NDrawer",props:{modelValue:{type:Boolean},top:{},left:{},autoClose:{type:Boolean},transition:{default:"right"}},emits:["close"],setup(f,{emit:m}){const e=f,a=b(),{height:c}=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;h(a,()=>{e.modelValue&&e.autoClose&&m("close")},{ignore:["a","button","summary",'[role="dialog"]']});const d={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 u=V;return i(),g(v,l(d[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:y(()=>[t.modelValue?(i(),k("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(c)}px`,left:t.transition==="right"&&!o(s)?"auto":`${o(s)}px`}},t.$attrs),[B(u,{absolute:"","right-2":"","top-2":"","z-20":"","text-xl":"",icon:"carbon-close",border:!1,onClick:r[0]||(r[0]=_=>t.$emit("close"))}),C("div",N,[$(t.$slots,"default")])],16,z)):w("",!0)]),_:3},16)}}});export{S as _};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as i,
|
|
1
|
+
import{d as i,a6 as p,r as c,aR as u,o as f,m,a7 as t,i as v,j as _,v as b,f as a,k,G as V,_ as B}from"./entry.9effa704.js";const $=i({__name:"NDropdown",props:{modelValue:{type:Boolean}},setup(r,{emit:l}){const e=p(r,"modelValue",l,{passive:!0}),s=c();return u(s,()=>{e.value=!1}),(o,n)=>{const d=B;return f(),m("div",{ref_key:"el",ref:s,class:"relative"},[t(o.$slots,"trigger",{enabled:a(e),click:()=>e.value=!a(e)},()=>[v(d,{onClick:n[0]||(n[0]=N=>e.value=!a(e))},{default:_(()=>[b(" Dropdown ")]),_:1})]),k("div",{class:V(["absolute z-10 border n-border-base rounded shadow n-transition n-bg-base",[a(e)?"op-100":"op0 pointer-events-none -translate-y-1"]])},[t(o.$slots,"default")],2)],512)}}});export{$ as _};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as t,o,m as s,G as a,p as n,
|
|
1
|
+
import{d as t,o,m as s,G as a,p as n,a7 as r,k as l,t as i}from"./entry.9effa704.js";const c={flex:"~ gap-3","items-center":""},u=t({__name:"NIconTitle",props:{icon:{},text:{}},setup(p){return(e,m)=>(o(),s("div",c,[e.icon?(o(),s("div",{key:0,class:a(e.icon)},null,2)):n("",!0),r(e.$slots,"default",{},()=>[l("div",null,i(e.text),1)])]))}});export{u as _};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as s,a as l,o as a,h as i,j as p,a7 as u,m as c,p as m,aq as _,x as k}from"./entry.9effa704.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.ab169146.js";import{d as t,f as e,o as a,h as r,as as s,t as d}from"./entry.9effa704.js";const i=t({__name:"NMarkdown",props:{markdown:{},tag:{}},setup(m){return(n,l)=>n.markdown&&e(o)?.devtools?.renderMarkdown?(a(),r(s(n.tag||"span"),{key:0,class:"n-markdown",innerHTML:e(o).devtools.renderMarkdown(n.markdown)},null,8,["innerHTML"])):(a(),r(s(n.tag||"span"),{key:1,class:"n-markdown",textContent:d(n.markdown)},null,8,["textContent"]))}});export{i as _};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as t,m as l,k as c,a7 as a,p,G as s,o as d,i,W as u}from"./entry.9effa704.js";const m={flex:"~ gap4","items-center":""},_=t({__name:"NNavbar",props:{search:{},noPadding:{type:Boolean}},emits:["update:search"],setup(h,{emit:o}){function n(e){o("update:search",e.target.value)}return(e,f)=>{const r=u;return d(),l("div",{flex:"~ col gap2",border:"b base","flex-1":"","n-navbar-glass":"",class:s([{p4:!e.noPadding}])},[c("div",m,[e.search!==void 0?a(e.$slots,"search",{key:0},()=>[i(r,{placeholder:"Search...",icon:"carbon-search",n:"primary","flex-auto":"",class:s({"px-5 py-2":!e.noPadding}),value:e.search,onInput:n},null,8,["class","value"])]):p("",!0),a(e.$slots,"actions")]),a(e.$slots,"default")],2)}}});export{_};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as g,
|
|
1
|
+
import{d as g,a6 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,a7 as s,p,o as l,v as u,t as v,h as k,y as w,z as C,a2 as N,q as I}from"./entry.9effa704.js";import{_ as x}from"./NIconTitle.vue.5caf9fc5.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 _};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as p,a6 as f,o,m as l,a7 as n,h as m,p as t,I as b,bH as h,f as v,k,t as y,l as V,G as d,a2 as B}from"./entry.9effa704.js";const g=["disabled"],w={key:0,value:"",disabled:"",hidden:""},_=p({__name:"NSelect",props:{modelValue:{default:void 0},placeholder:{default:""},icon:{default:""},disabled:{type:Boolean,default:!1}},setup(r,{emit:i}){const s=f(r,"modelValue",i,{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(),m(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{_};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as c,
|
|
1
|
+
import{d as c,a6 as m,o as s,m as t,F as v,n as f,G as d,f as o,k as r,t as _,I as g,aI as y,l as V}from"./entry.9effa704.js";const h={class:"n-select-tabs flex flex-inline flex-wrap items-center border n-border-base rounded n-bg-base"},k=["disabled","title"],x=["disabled","value","title"],C=c({__name:"NSelectTabs",props:{modelValue:{default:void 0},disabled:{type:Boolean,default:!1},options:{}},setup(i,{emit:b}){const a=m(i,"modelValue",b,{passive:!0});return(l,n)=>(s(),t("fieldset",h,[(s(!0),t(v,null,f(l.options,(e,p)=>(s(),t("label",{key:e.label,disabled:l.disabled,class:d(["relative n-border-base hover:n-bg-active px-0.5em py-0.1em",[p?"border-l n-border-base ml--1px":"",e.value===o(a)?"n-bg-active":""]]),title:e.label},[r("div",{class:d([e.value===o(a)?"":"op35"])},_(e.label),3),g(r("input",{"onUpdate:modelValue":n[0]||(n[0]=u=>V(a)?a.value=u:null),type:"radio",disabled:l.disabled,value:e.value,title:e.label,class:"absolute inset-0 op-0.1"},null,8,x),[[y,o(a)]])],10,k))),128))]))}});export{C as _};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as i,
|
|
1
|
+
import{d as i,a6 as c,o as r,m as u,I as h,bG as p,f as l,k as t,l as b,ac as f,a7 as v}from"./entry.9effa704.js";const k=["checked","disabled"],m=["disabled"],w=t("div",{class:"n-switch-slider n-checked:n-switch-slider-checked peer-active:n-active-base peer-focus-visible:n-focus-base n-transition"},[t("div",{class:"n-checked:n-switch-thumb-checked n-switch-thumb n-transition"})],-1),B=i({__name:"NSwitch",props:{modelValue:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},setup(d,{emit:o}){const e=c(d,"modelValue",o,{passive:!0});return(a,s)=>(r(),u("label",{class:"n-switch n-switch-base hover:n-switch-hover n-disabled:n-disabled",checked:l(e)||null,disabled:a.disabled||null},[h(t("input",{"onUpdate:modelValue":s[0]||(s[0]=n=>b(e)?e.value=n:null),type:"checkbox",class:"peer absolute op0",disabled:a.disabled,onKeypress:s[1]||(s[1]=f(n=>e.value=!l(e),["enter"]))},null,40,m),[[p,l(e)]]),w,v(a.$slots,"default")],8,k))}});export{B as _};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as a,o,m as c,
|
|
1
|
+
import{d as a,o,m as c,a7 as n,h as t,p as i,k as r,a2 as p}from"./entry.9effa704.js";const l={class:"n-tip n-tip-base"},u=a({__name:"NTip",props:{icon:{}},setup(m){return(e,_)=>{const s=p;return o(),c("div",l,[n(e.$slots,"icon",{},()=>[e.icon?(o(),t(s,{key:0,icon:e.icon,class:"n-tip-icon"},null,8,["icon"])):i("",!0)]),r("div",null,[n(e.$slots,"default")])])}}});export{u as _};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as V,a6 as B,ah as _,r as w,b6 as O,bd as C,ab as $,o as i,m as p,k as u,G as c,f as a,t as J,p as l,a7 as D,ba as P,bb as R,F as j,I as z,i as F,h as v,aq as G,be as M,l as U,av as A,_ as E}from"./entry.9effa704.js";import{_ as q}from"./DataSchemaButton.vue.65a9244c.js";import{U as I}from"./json-editor-vue.724e0801.js";const T=["open"],Y={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=q,N=$("tooltip");return i(),p("div",{class:"state-editor-details",open:e.name?a(n):!0},[u("div",Y,[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(I),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,T)}}});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 n,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 q,N as ee,O as te,P as ne,Q as oe,R as le,S as ie,U as se,V as k,h as w,l as j,W as ae,X as re,A as ue}from"./entry.9effa704.js";import{_ as de}from"./FilepathItem.vue.66158bcd.js";import{_ as ce}from"./NTip.vue.7a94f00d.js";import{_ as me}from"./NCodeBlock.vue.d4a74ca4.js";import{_ as _e}from"./NCheckbox.vue.83a6e70e.js";import{_ as pe}from"./HelpFab.vue.074157ff.js";import"./client.ab169146.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),xe={grid:"~ cols-[30px_1fr] gap-x-2 gap-y-3 items-center justify-center","w-100":""},ge=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),ke=e("div",{"i-carbon-cics-program":"","text-xl":""},null,-1),Ce=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),I="/__nuxt_devtools__/analyze/",Fe=R({__name:"BuildAnalyzeDetails",props:{current:{},prev:{}},setup(C){const p=C,f=V(()=>{const t=[{name:"Overview",id:"overview"}];return p.current.features.bundleClient&&t.push({name:"Client Bundle",id:"bundle-client"}),p.current.features.bundleNitro&&t.push({name:"Nitro Bundle",id:"bundle-nitro"}),p.current.features.viteInspect&&t.push({name:"Vite Inspect",id:"vite-inspect"}),t}),l=S(f.value[0]);function $(t){return t<1024?`${t}B`:t<1024*1024?`${(t/1024).toFixed(1)}KB`:t<1024*1024*1024?`${(t/1024/1024).toFixed(1)}MB`:`${(t/1024/1024/1024).toFixed(1)}GB`}function g(t){return`${((t.endTime-t.startTime)/1e3).toFixed(1)}s`}async function x(t){return P.clearAnalyzeBuilds(await U(),[t])}return(t,u)=>{const z=de,N=L;return o(),i("div",fe,[e("div",ve,[(o(!0),i(c,null,E(n(f),(v,T)=>(o(),i("button",{key:T,px4:"",py2:"",border:"r base",hover:"bg-active",class:F(v.id===n(l).id?"":"border-b"),onClick:d=>l.value=v},[e("div",{class:F(v.id===n(l).id?"":"op30")},m(v.name),3)],10,he))),128)),ye]),n(l).id==="overview"?(o(),i("div",be,[$e,e("div",xe,[ge,e("div",null,[we,e("div",null,m(t.current.name),1)]),ze,e("div",null,[Be,e("div",null,m(g(t.current)),1)]),t.current.size?.clientBundle?(o(),i(c,{key:0},[ke,e("div",null,[Ce,e("div",null,m($(t.current.size.clientBundle)),1)])],64)):b("",!0),t.current.size.nitroBundle?(o(),i(c,{key:1},[Ne,e("div",null,[Te,e("div",null,m($(t.current.size.nitroBundle)),1)])],64)):b("",!0),Ae,e("div",null,[De,e("div",null,m(n(G)(new Date(t.current.endTime))),1)]),Ie,e("div",null,[Ve,r(z,{filepath:t.current.analyzeDir},null,8,["filepath"])])]),Se,r(N,{n:"rose",icon:"carbon-delete",onClick:u[0]||(u[0]=v=>x(t.current.name))},{default:a(()=>[_(" Delete this report ")]),_:1})])):b("",!0),u._lazyshow1||n(l).id==="bundle-client"?(u._lazyshow1=!0,o(),i(c,null,[A(e("iframe",{src:`${I}${t.current.slug}/client.html`,"h-full":"","w-full":""},null,8,["src"]),[[D,n(l).id==="bundle-client"]])],64)):b("v-show-if",!0),u._lazyshow2||n(l).id==="bundle-nitro"?(u._lazyshow2=!0,o(),i(c,null,[A(e("iframe",{src:`${I}${t.current.slug}/nitro.html`,"h-full":"","w-full":""},null,8,["src"]),[[D,n(l).id==="bundle-nitro"]])],64)):b("v-show-if",!0),u._lazyshow3||n(l).id==="vite-inspect"?(u._lazyshow3=!0,o(),i(c,null,[A(e("iframe",{src:`${I}${t.current.slug}/.vite-inspect/`,"h-full":"","w-full":""},null,8,["src"]),[[D,n(l).id==="vite-inspect"]])],64)):b("v-show-if",!0)])}}}),Pe={class:"markdown-body"},je=e("h1",null,"Build Analyze",-1),Re=e("p",null,[_("DevTools provides a build analyze tool to help you understand the size of your app in production. Whenever you start a new build, it runs the command "),e("code",null,"nuxt build --analyze"),_(" and present the output data directly in DevTools for easy browsing and comparing.")],-1),Ee=[je,Re],Ge={__name:"analyze-build",setup(C,{expose:p}){return p({frontmatter:{}}),(l,$)=>(o(),i("div",Pe,Ee))}},Ue={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:""},Je={flex:"~ col gap-1","w-250":"",p4:""},Qe=e("h3",{class:"text-lg font-medium leading-6",mb2:""}," Start analyze build? ",-1),Xe=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":""},at=R({__name:"analyze-build",setup(C){const p=q(),f=ee(),l=te(),$=ne("analyze-build:slug",""),g=V(()=>f.value?.builds.find(d=>d.slug===$.value)??f.value?.builds[0]),x=S(!1),t=S(""),u=V(()=>f.value?.builds.some(d=>d.name===t.value.trim()));async function z(){t.value=await P.generateAnalyzeBuildName(),await p.start()&&(se("analyze-build:start"),k.value={name:t.value,processId:await P.startAnalyzeBuild(await U(),t.value)},x.value&&v())}const N=oe();function v(){k.value?.processId&&(N.value=k.value.processId,l.push("/modules/terminals"))}function T(d){return`${((d.endTime-d.startTime)/1e3).toFixed(1)}s`}return le(()=>[{id:"action:analyze-build: start",title:"Start a new analyze build",icon:"i-carbon-edge-node",action:z}]),(d,h)=>{const B=L,O=Fe,H=ue,K=ie,M=ae,W=ce,J=me,Q=_e,X=re,Y=Ge,Z=pe;return o(),i(c,null,[r(K,{"left-size":30},{left:a(()=>[e("div",Ue,[(o(!0),i(c,null,E(n(f)?.builds,s=>(o(),i(c,{key:s.slug},[e("button",{flex:"~ col gap1","hover:bg-active":"",p3:"",class:F(s.slug===n(g)?.slug?"text-primary bg-active":""),onClick:y=>$.value=s.slug},[e("code",null,m(s.name),1),e("div",Oe,[He,e("span",null,m(T(s)),1),Ke,e("span",null,m(n(G)(new Date(s.endTime))),1)])],10,Le),Me],64))),128)),e("div",We,[("processAnalyzeBuildInfo"in d?d.processAnalyzeBuildInfo:n(k))?(o(),w(B,{key:1,n:"primary",icon:"carbon-circle-dash animate-spin",onClick:h[1]||(h[1]=s=>v())},{default:a(()=>[_(" Building... ")]),_:1})):(o(),w(B,{key:0,n:"primary",icon:"carbon-edge-node",onClick:h[0]||(h[0]=s=>z())},{default:a(()=>[_(" Start a new build ")]),_:1}))])])]),right:a(()=>[n(g)?(o(),w(O,{key:0,current:n(g)},null,8,["current"])):(o(),w(H,{key:1}))]),_:1}),r(n(p),null,{default:a(({resolve:s})=>[r(X,{"model-value":!0,onClose:y=>s(!1)},{default:a(()=>[e("div",Je,[Qe,Xe,r(M,{modelValue:n(t),"onUpdate:modelValue":h[2]||(h[2]=y=>j(t)?t.value=y:null),placeholder:"Build name"},null,8,["modelValue"]),n(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=${n(t)}`,lang:"bash",px4:"",py2:"",border:"~ base rounded",lines:!1},null,8,["code"]),r(Q,{modelValue:n(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(Z,null,{default:a(()=>[r(Y)]),_:1})],64)}}});export{at as default};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import{d as X,r as F,Y 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,Z as U,a0 as de,a1 as pe,U as me,K as G,L as H,_ as ee,a2 as ne,W as oe,a as A,a3 as fe,a4 as ve,a5 as se,t as N,a6 as ae,a7 as he,l as R,a8 as _e,b as te,a9 as ge,e as xe,aa as be,ab as le,I as W,ac as we,ad as ye,X as $e,ae as ke,af as Ce,ag as Pe}from"./entry.9effa704.js";import{_ as Ae}from"./NNavbar.vue.0f176f87.js";import{_ as De}from"./NSectionBlock.43816001.js";import{_ as Ve}from"./FilepathItem.vue.66158bcd.js";import{_ as Ne,u as Fe}from"./storage-options.8ca9ecbc.js";import{_ as Ie}from"./NDrawer.vue.f03c3dec.js";import{D as Se}from"./constants.4e5eba24.js";import"./NIconTitle.vue.5caf9fc5.js";import"./NCodeBlock.vue.d4a74ca4.js";import"./client.ab169146.js";const Te={key:0,"h-full":"","w-full":"",flex:"","items-center":"","justify-center":""},je={for:"drop-zone-input","text-3xl":""},Ee={key:1,relative:"","h-full":"","w-full":"",grid:"~ rows-[max-content_1fr_max-content]"},Ue=e("div",{px6:"",py6:""},[e("h1",{"text-2xl":""}," Upload "),e("p",{"text-sm":"",op50:""}," Drag and drop files to upload ")],-1),Le={grid:"~ cols-minmax-8rem","overflow-auto":"",p6:""},ze={flex:"","items-center":"","justify-center":"","of-hidden":"",rounded:"","rounded-t-lg":"","bg-active":"","object-cover":"",class:"aspect-1/1",border:"~ base"},Be=["src"],Me={flex:"~ gap1","items-center":""},Oe={flex:"~ gap-2","items-center":"","justify-center":"",p8:""},Re=X({__name:"AssetDropZone",props:{folder:{type:String,required:!0}},setup(j){const l=j,p=F(!1),n=F(),m=F([]),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;me("assets:upload");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",Ee,[Ue,e("div",Le,[(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",ze,[e("img",{"h-full":"","w-full":"","rounded-t-lg":"","object-cover":"",src:w(a)},null,8,Be)]),e("div",Me,[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",Oe,[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",Te,[e("label",je,[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)}}}),Ke=X({__name:"AssetFontPreview",props:{asset:{}},setup(j){const l=j,p=A(()=>`devtools-assets-${fe(l.asset)}`);return ve(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))}}),Xe={flex:"","items-center":"","justify-center":"","of-hidden":"","bg-active":"","object-cover":"",p1:""},Ge=["src"],Ze={key:2,"i-carbon-document":"","text-3xl":"",op20:""},We={key:3,"w-full":"","self-start":"",p4:""},qe=["textContent"],Ye={key:4},He=["src","autoplay","controls"],Je={key:5},Qe={key:0,"i-carbon-volume-up":"","text-3xl":"",op20:""},et=["src"],tt={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=Ke;return o(),c("div",Xe,[l.asset.type==="image"?(o(),c("img",{key:0,src:l.asset.publicPath},null,8,Ge)):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",Ze)):l.asset.type==="text"&&l.textContent?(o(),c("div",We,[e("pre",{"max-h-10rem":"","of-hidden":"","text-xs":"","font-mono":"",textContent:N(l.textContent)},null,8,qe)])):l.asset.type==="video"?(o(),c("div",Ye,[e("video",{src:l.asset.publicPath,autoplay:l.detail,controls:l.detail},null,8,He)])):l.asset.type==="audio"?(o(),c("div",Je,[l.detail?(o(),c("audio",{key:1,src:l.asset.publicPath,controls:""},null,8,et)):(o(),c("div",Qe))])):(o(),c("div",tt))])}}}),nt={flex:"~ col gap-1",hover:"bg-active","items-center":"","of-hidden":"",rounded:"",p2:""},ot={"w-full":"","of-hidden":"",truncate:"","ws-nowrap":"","text-center":"","text-xs":""},st=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",nt,[d(h,{"h-30":"","w-30":"",rounded:"",border:"~ base",asset:n.asset},null,8,["asset"]),e("div",ot,N(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=F(!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":""},N(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)?he(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)])}}}),at={flex:"~ col gap-4","min-h-full":"","w-full":"","of-hidden":"",p4:""},lt=e("div",{flex:"~ gap2","mb--2":"","items-center":"",op50:""},[e("div",{"x-divider":""}),e("div",{"flex-none":""}," Preview "),e("div",{"x-divider":""})],-1),it={flex:"~","items-center":"","justify-center":""},rt=e("div",{flex:"~ gap2","mb--2":"","items-center":"",op50:""},[e("div",{"x-divider":""}),e("div",{"flex-none":""}," Details "),e("div",{"x-divider":""})],-1),ct={"max-w-full":"","w-full":"","table-fixed":""},ut=e("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," Filepath ",-1),dt={flex:"~ gap-1","w-full":"","items-center":""},pt=e("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," Public Path ",-1),mt={flex:"~ gap-1","w-full":"","items-center":"","of-hidden":""},ft={"flex-auto":"","of-hidden":"",truncate:"","ws-pre":"","font-mono":""},vt=e("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," Type ",-1),ht={capitalize:""},_t=e("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," Image Size ",-1),gt={key:0},xt=e("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," Aspect Ratio ",-1),bt=e("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," File size ",-1),wt=e("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," Last modified ",-1),yt={op70:""},$t=e("div",{flex:"~ gap2","mb--2":"","items-center":"",op50:""},[e("div",{"x-divider":""}),e("div",{"flex-none":""}," Actions "),e("div",{"x-divider":""})],-1),kt={flex:"~ gap2 wrap"},Ct=e("div",{"flex-auto":""},null,-1),Pt={flex:"~ col gap-4","min-h-full":"","w-full":"","of-hidden":"",p8:""},At=e("span",null," Are you sure you want to delete this asset? ",-1),Dt={flex:"~ gap2 wrap justify-center"},Vt={flex:"~ col gap-4","min-h-full":"","w-full":"","of-hidden":"",p8:""},Nt={flex:"~ gap2 wrap justify-center"},Ft={flex:"~ col gap-4","min-h-full":"","w-full":"","of-hidden":"",p4:""},It=["onKeydown"],St={flex:"","justify-end":"","gap-4":""},Tt=X({__name:"AssetDetails",props:{modelValue:{}},setup(j,{emit:l}){const n=ae(j,"modelValue",l,{passive:!0}),m=_e(),h=te(()=>{if(n.value.type==="image")return G.getImageMeta(n.value.filePath)}),D=F(!1),u=F(),k=F(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=ge(),_=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=xe(),S=be(()=>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=F(!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=F(!1),a=F("");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=Ve,P=ee,ce=Ne,J=$e,ue=oe,Q=le("tooltip");return o(),c(z,null,[e("div",at,[t(g)?(o(),c(z,{key:0},[lt,e("div",it,[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),rt,e("table",ct,[e("tbody",null,[e("tr",null,[ut,e("td",null,[e("div",dt,[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,[pt,e("td",null,[e("div",mt,[e("div",ft,N(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,[vt,e("td",ht,N(t(n).type),1)]),t(h)?.width?(o(),c(z,{key:0},[e("tr",null,[_t,e("td",null,N(t(h).width)+" x "+N(t(h).height),1)]),t(r)?(o(),c("tr",gt,[xt,e("td",null,N(t(r)),1)])):T("",!0)],64)):T("",!0),e("tr",null,[bt,e("td",null,N(t(E)),1)]),e("tr",null,[wt,e("td",null,[$(N(new Date(t(n).mtime).toLocaleString())+" ",1),e("span",yt,"("+N(t(S))+")",1)])])])]),$t,e("div",kt,[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)]),Ct,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",Pt,[At,e("div",Dt,[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",Vt,[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",Nt,[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:we(L,["enter"])},null,40,It),[[ye,t(u)]]),e("div",St,[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)}}}),jt={"h-full":"","of-auto":""},Et={"flex-none":"",flex:"~ gap2 items-center"},Ut={op50:""},Lt={key:0},zt={"mt--4":"",px2:"",grid:"~ cols-minmax-8rem"},Bt={key:1,p2:"",grid:"~ cols-minmax-8rem"},Mt={key:1},Jt=X({__name:"assets",setup(j){const l=ke(),p=F(""),n=A(()=>new Ce(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=F(),{view:k}=Fe("assets");function K(){k.value=k.value==="list"?"grid":"list"}Pe("Escape",()=>{u.value=void 0});const L=F();return(b,_)=>{const w=ee,B=Ae,S=Re,E=st,r=De,g=re,v=Tt,C=Ie,f=le("tooltip");return o(),c("div",jt,[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",Et,[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",Ut,[t(p)?(o(),c("span",Lt,N(t(m).length)+" matched · ",1)):T("",!0),e("span",null,N(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(Se)),padding:!1},{default:x(()=>[e("div",zt,[(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",Bt,[(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",Mt,[(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{Jt as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{bo as f,bD as r}from"./entry.9effa704.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};
|