@nuxt/devtools 0.5.2 → 0.5.4

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.
Files changed (105) hide show
  1. package/dist/chunks/module-main.mjs +90 -32
  2. package/dist/chunks/vscode.mjs +4 -5
  3. package/dist/client/200.html +2 -2
  4. package/dist/client/404.html +2 -2
  5. package/dist/client/__inspecting/index.html +2 -2
  6. package/dist/client/_nuxt/{Badge.83906623.js → Badge.ade65c69.js} +1 -1
  7. package/dist/client/_nuxt/CodeSnippets.vue.0933ada7.js +1 -0
  8. package/dist/client/_nuxt/{DrawerRight.vue.e303d503.js → DrawerRight.vue.7bc0ac9b.js} +1 -1
  9. package/dist/client/_nuxt/{DurationDisplay.vue.b44ca7b3.js → DurationDisplay.vue.d2a5c09b.js} +1 -1
  10. package/dist/client/_nuxt/{FilepathItem.vue.5b5ced5d.js → FilepathItem.vue.a3a55bfd.js} +1 -1
  11. package/dist/client/_nuxt/{HelpFab.vue.c263b505.js → HelpFab.vue.1ab4e4f1.js} +1 -1
  12. package/dist/client/_nuxt/{LaunchPage.vue.10a18c7c.js → LaunchPage.vue.dff3dd39.js} +1 -1
  13. package/dist/client/_nuxt/{NCheckbox.vue.fc55451a.js → NCheckbox.vue.cd1637b2.js} +1 -1
  14. package/dist/client/_nuxt/{NCodeBlock.vue.5e846b10.js → NCodeBlock.vue.d5b2e85d.js} +1 -1
  15. package/dist/client/_nuxt/{NIconButton.vue.87d44e1b.js → NIconButton.vue.3defcade.js} +1 -1
  16. package/dist/client/_nuxt/{NIconTitle.vue.44afa7ff.js → NIconTitle.vue.62b2ff0a.js} +1 -1
  17. package/dist/client/_nuxt/NLink.vue.be635eca.js +1 -0
  18. package/dist/client/_nuxt/{NMarkdown.vue.b43fcab0.js → NMarkdown.vue.00fc3014.js} +1 -1
  19. package/dist/client/_nuxt/{NPanelGrids.3011caf9.js → NPanelGrids.24e40025.js} +1 -1
  20. package/dist/client/_nuxt/{NSectionBlock.9d37fd4b.js → NSectionBlock.eb96beb4.js} +1 -1
  21. package/dist/client/_nuxt/{NSelect.vue.53616e18.js → NSelect.vue.7652516b.js} +1 -1
  22. package/dist/client/_nuxt/{NSwitch.vue.0fe4aa67.js → NSwitch.vue.c07ff0b7.js} +1 -1
  23. package/dist/client/_nuxt/{NTip.vue.42848f36.js → NTip.vue.3fd9b115.js} +1 -1
  24. package/dist/client/_nuxt/Navbar.vue.12ff05d9.js +1 -0
  25. package/dist/client/_nuxt/NpmVersionCheck.vue.7bc4775a.js +1 -0
  26. package/dist/client/_nuxt/{PanelLeftRight.vue.fed8984a.js → PanelLeftRight.vue.0d3c5a22.js} +1 -1
  27. package/dist/client/_nuxt/StateEditor.vue.6e8c107a.js +1 -0
  28. package/dist/client/_nuxt/{__inspecting.fbaf226d.js → __inspecting.137e909d.js} +1 -1
  29. package/dist/client/_nuxt/analyze-build.790e4c36.js +1 -0
  30. package/dist/client/_nuxt/assets.1c0d54b4.js +16 -0
  31. package/dist/client/_nuxt/{client.a6478274.js → client.d93a636c.js} +1 -1
  32. package/dist/client/_nuxt/{components.f00116c7.js → components.060d9fd5.js} +3 -3
  33. package/dist/client/_nuxt/custom-_name_.e88f914e.js +1 -0
  34. package/dist/client/_nuxt/{default.e408d64e.js → default.6eda7699.js} +1 -1
  35. package/dist/client/_nuxt/{editor.60cc6e07.js → editor.4380b623.js} +1 -1
  36. package/dist/client/_nuxt/entry.34446c1f.js +19 -0
  37. package/dist/client/_nuxt/{entry.5cc961cc.css → entry.bf8a0e33.css} +1 -1
  38. package/dist/client/_nuxt/{error-404.e559d2f7.js → error-404.7bcf1a44.js} +1 -1
  39. package/dist/client/_nuxt/{error-500.0eef607d.js → error-500.b67f8091.js} +1 -1
  40. package/dist/client/_nuxt/{error-component.83c76a45.js → error-component.5479d89e.js} +2 -2
  41. package/dist/client/_nuxt/{full.872180c4.js → full.89a525fd.js} +1 -1
  42. package/dist/client/_nuxt/{hooks.f607bdd3.js → hooks.99ea2107.js} +1 -1
  43. package/dist/client/_nuxt/imports.29e62250.js +1 -0
  44. package/dist/client/_nuxt/{index.ed5657ea.js → index.a348e979.js} +1 -1
  45. package/dist/client/_nuxt/{index.0676e898.js → index.b8d7fad0.js} +1 -1
  46. package/dist/client/_nuxt/{json-editor-vue.3247103b.js → json-editor-vue.62f947e8.js} +1 -1
  47. package/dist/client/_nuxt/{middleware.f8f2ddc7.js → middleware.61ccc755.js} +1 -1
  48. package/dist/client/_nuxt/modules.f8953fab.js +4 -0
  49. package/dist/client/_nuxt/{none.2ff7cc7a.js → none.566b9a55.js} +1 -1
  50. package/dist/client/_nuxt/open-graph.26d327ec.js +3 -0
  51. package/dist/client/_nuxt/overview.4326006b.js +1 -0
  52. package/dist/client/_nuxt/pages.b234eacb.js +1 -0
  53. package/dist/client/_nuxt/{payload.98eee0c8.js → payload.fbf9b90d.js} +1 -1
  54. package/dist/client/_nuxt/{plugins.33f32b58.js → plugins.9c9f9450.js} +1 -1
  55. package/dist/client/_nuxt/{runtime-configs.12858433.js → runtime-configs.cf5a4a0c.js} +1 -1
  56. package/dist/client/_nuxt/server-routes.7185e439.js +9 -0
  57. package/dist/client/_nuxt/{settings.e641de98.js → settings.8603972f.js} +1 -1
  58. package/dist/client/_nuxt/state-components.f564bfa7.js +1 -0
  59. package/dist/client/_nuxt/storage.4b5872ff.js +1 -0
  60. package/dist/client/_nuxt/{terminals.a3a9bc56.js → terminals.d263a781.js} +1 -1
  61. package/dist/client/_nuxt/{unocss-runtime.2f120d48.js → unocss-runtime.a821baa9.js} +1 -1
  62. package/dist/client/_nuxt/virtual-files.2fc42163.js +1 -0
  63. package/dist/client/index.html +2 -2
  64. package/dist/client/modules/analyze-build/index.html +2 -2
  65. package/dist/client/modules/assets/index.html +2 -2
  66. package/dist/client/modules/components/index.html +2 -2
  67. package/dist/client/modules/hooks/index.html +2 -2
  68. package/dist/client/modules/imports/index.html +2 -2
  69. package/dist/client/modules/middleware/index.html +2 -2
  70. package/dist/client/modules/modules/index.html +2 -2
  71. package/dist/client/modules/open-graph/index.html +2 -2
  72. package/dist/client/modules/overview/index.html +2 -2
  73. package/dist/client/modules/pages/index.html +2 -2
  74. package/dist/client/modules/payload/index.html +2 -2
  75. package/dist/client/modules/plugins/index.html +2 -2
  76. package/dist/client/modules/runtime-configs/index.html +2 -2
  77. package/dist/client/modules/server-routes/index.html +2 -2
  78. package/dist/client/modules/storage/index.html +2 -2
  79. package/dist/client/modules/terminals/index.html +2 -2
  80. package/dist/client/modules/virtual-files/index.html +2 -2
  81. package/dist/client/settings/index.html +2 -2
  82. package/dist/module.json +1 -1
  83. package/dist/module.mjs +1 -1
  84. package/dist/shared/{devtools.a2798b81.mjs → devtools.345c630c.mjs} +2 -2
  85. package/dist/types.d.ts +12 -1
  86. package/package.json +14 -15
  87. package/dist/client/_nuxt/CodeSnippets.vue.189d2c05.js +0 -1
  88. package/dist/client/_nuxt/NLink.vue.7642253a.js +0 -1
  89. package/dist/client/_nuxt/NTextInput.vue.0f5840ce.js +0 -1
  90. package/dist/client/_nuxt/Navbar.vue.1156f86c.js +0 -1
  91. package/dist/client/_nuxt/NpmVersionCheck.vue.01d3cdf4.js +0 -1
  92. package/dist/client/_nuxt/StateEditor.vue.a4934d8c.js +0 -1
  93. package/dist/client/_nuxt/analyze-build.1e11d4c2.js +0 -1
  94. package/dist/client/_nuxt/assets.4e286b98.js +0 -16
  95. package/dist/client/_nuxt/custom-_name_.4698ded9.js +0 -1
  96. package/dist/client/_nuxt/entry.33b4ceee.js +0 -19
  97. package/dist/client/_nuxt/fuse.esm.88e2763d.js +0 -1
  98. package/dist/client/_nuxt/imports.af078df6.js +0 -1
  99. package/dist/client/_nuxt/modules.1cb9572d.js +0 -4
  100. package/dist/client/_nuxt/open-graph.22edbc56.js +0 -3
  101. package/dist/client/_nuxt/overview.12716b2d.js +0 -1
  102. package/dist/client/_nuxt/pages.56e34b91.js +0 -1
  103. package/dist/client/_nuxt/server-routes.bde5bee5.js +0 -9
  104. package/dist/client/_nuxt/storage.b8b29d67.js +0 -1
  105. package/dist/client/_nuxt/virtual-files.c0c7f5bc.js +0 -1
@@ -1,16 +0,0 @@
1
- import{_ as K}from"./NIconButton.vue.87d44e1b.js";import{_ as H}from"./Navbar.vue.1156f86c.js";import{a as j,J as Y,r as T,e as V,o as s,h as r,i as f,u as n,f as e,l as E,F as N,q as O,c as F,w as z,v as S,s as q,K as ee,L as te,y as G,M as ne,k as Z,p as y,N as se,O as oe,P as ae,t as w,Q as X,R as ie,S as le,T as re,U as ce,G as ue}from"./entry.33b4ceee.js";import{_ as de}from"./NTextInput.vue.0f5840ce.js";import{_ as pe}from"./NSectionBlock.9d37fd4b.js";import{_ as me}from"./FilepathItem.vue.5b5ced5d.js";import{_ as fe}from"./CodeSnippets.vue.189d2c05.js";import{u as he,a as _e}from"./editor.60cc6e07.js";import{_ as ve}from"./DrawerRight.vue.e303d503.js";import{D as ge}from"./constants.d7bcda3c.js";import{F as xe}from"./fuse.esm.88e2763d.js";import"./NIconTitle.vue.44afa7ff.js";import"./NCodeBlock.vue.5e846b10.js";import"./client.a6478274.js";const be={key:0,"h-full":"","w-full":"",flex:"","items-center":"","justify-center":""},we={for:"drop-zone-input","text-3xl":""},ye={key:1,relative:"","h-full":"","w-full":"",grid:"~ rows-[max-content_1fr_max-content]"},$e=e("div",{px6:"",py6:""},[e("h1",{"text-2xl":""}," Upload "),e("p",{"text-sm":"",op50:""}," Drag and drop files to upload ")],-1),ke={grid:"~ cols-minmax-8rem","overflow-auto":"",p6:""},Ce={flex:"","items-center":"","justify-center":"","of-hidden":"",rounded:"","rounded-t-lg":"","bg-active":"","object-cover":"",class:"aspect-1/1",border:"~ base"},Pe=["src"],Fe={flex:"~ gap1","items-center":""},Ae={flex:"~ gap-2","items-center":"","justify-center":"",p8:""},De=j({__name:"DropZone",props:{folder:{type:String,required:!0}},emits:["uploaded"],setup(o,{emit:t}){const m=o,c=Y(),g=T(!1),k=T(),u=T([]),C=["image","video"];function L(a){k.value=a.target,g.value=!0}function B(a){a.target===k.value&&(g.value=!1)}function M(a){a.preventDefault()}function x(a){a.preventDefault(),h(a.dataTransfer.files)}function h(a){const _=Array.from(a||[]);if(_.length){const i=[],v=u.value.map(d=>d.name);for(const d of _)if(v.includes(d.name)){let b=1;const[P,R]=d.name.split(".");for(;v.includes(`${P} (${b}).${R}`);)b++;const U=`${P}-${b}.${R}`,Q=new Blob([d],{type:d.type}),W=new File([Q],U,{lastModified:Date.now()});i.push(W),v.push(U)}else d.type===""?c("Folders are not supported yet","carbon:face-dissatisfied"):C.some(b=>d.type.includes(b))?i.push(d):c(`"${d.type}" file type is not allowed`,"carbon:face-dizzy");u.value=[...u.value,...i]}}async function l(){if(ee.value||te.value)return;const a=[];for(const _ of u.value){const i=new FileReader;i.readAsDataURL(_);const d=(await new Promise(b=>{i.onload=()=>b(i.result)})).split(";base64,").pop();a.push({name:_.name,data:d})}await G.writeStaticAssets([...a],m.folder).then(()=>{t("uploaded"),I(),c("Files uploaded successfully!","carbon:face-cool")}).catch(_=>{console.error(_),I(),c("Upload failed!","carbon:face-dizzy")}),g.value=!1}function p(a){u.value?.splice(a,1)}function A(a){return URL.createObjectURL(a)}function $(a,_){const[i,v]=a.name.split("."),d=_.replace(/\.\w+$/,""),b=`${d}.${v}`;return d.length===0?(alert("File name must be at least 1 characters long"),i):(Object.defineProperty(a,"name",{value:b,writable:!1}),u.value.splice(u.value.indexOf(a),1,a),a)}function D(){u.value=[]}function I(){g.value=!1,D()}return V("dragenter",L),V("dragleave",B),V("dragover",M),V("drop",x),(a,_)=>{const i=K,v=ne,d=de,b=Z;return s(),r("div",{fixed:"","bottom-0":"","left-13":"","right-0":"","top-0":"","z-10":"","backdrop-blur-20":"","transition-all":"",class:q(n(g)?"opacity-100 visible":"opacity-0 invisible")},[f(i,{icon:"carbon-close",absolute:"","right-5":"","top-5":"","z-20":"","text-xl":"",onClick:I}),n(u)?.length?(s(),r("div",ye,[$e,e("div",ke,[(s(!0),r(N,null,O(n(u),(P,R)=>(s(),r("div",{key:P.name,flex:"~ col gap-2",relative:"","h-50":"","w-40":"","items-center":""},[e("div",Ce,[e("img",{"h-full":"","w-full":"","rounded-t-lg":"","object-cover":"",src:A(P)},null,8,Pe)]),e("div",Fe,[f(d,{n:"xs","flex-auto":"","model-value":P.name,"onUpdate:modelValue":U=>$(P,U.target.value)},null,8,["model-value","onUpdate:modelValue"]),f(i,{icon:"carbon-delete","flex-none":"",title:"Remove file",onClick:U=>p(R)},null,8,["onClick"])])]))),128))]),e("div",Ae,[n(u).length?(s(),F(b,{key:0,n:"red",onClick:D},{default:z(()=>[f(v,{icon:"carbon-clean"}),E(" Clear ")]),_:1})):S("",!0),f(b,{disabled:!n(u).length,n:"primary solid",onClick:l},{default:z(()=>[f(v,{icon:"carbon-cloud-upload"}),E(" Upload ")]),_:1},8,["disabled"])])])):(s(),r("div",be,[e("label",we,[f(v,{icon:"carbon-cloud-upload","mr-2":""}),E(" Drop files here or click to select ")]),e("input",{id:"drop-zone-input",type:"file",multiple:"",hidden:"",onChange:_[0]||(_[0]=P=>h(P.target.files))},null,32)]))],2)}}}),Ie=j({__name:"AssetFontPreview",props:{asset:null},setup(o){const t=o,m=y(()=>`devtools-assets-${se(t.asset)}`);return oe(y(()=>`
2
- @font-face {
3
- font-family: '${m.value}';
4
- src: url('${t.asset.publicPath}');
5
- }
6
- `)),(c,g)=>(s(),r("div",{"of-hidden":"",style:ae({fontFamily:`'${n(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))}}),Ne={flex:"","items-center":"","justify-center":"","of-hidden":"","bg-active":"","object-cover":"",p1:""},Se=["src"],ze={key:2,"i-carbon-document":"","text-3xl":"",op20:""},Te={key:3,"w-full":"","self-start":"",p4:""},je=["textContent"],Be={key:4,"i-carbon-help":"","text-3xl":"",op20:""},J=j({__name:"AssetPreview",props:{asset:null,textContent:null},setup(o){return(t,m)=>{const c=Ie;return s(),r("div",Ne,[o.asset.type==="image"?(s(),r("img",{key:0,src:o.asset.publicPath},null,8,Se)):o.asset.type==="font"?(s(),F(c,{key:o.asset.publicPath,asset:o.asset,"self-stretch":"",p2:"","text-2xl":""},null,8,["asset"])):o.asset.type==="text"&&!o.textContent?(s(),r("div",ze)):o.asset.type==="text"&&o.textContent?(s(),r("div",Te,[e("pre",{"max-h-10rem":"","of-hidden":"","font-mono":"","text-xs":"",textContent:w(o.textContent)},null,8,je)])):(s(),r("div",Be))])}}}),Ee={flex:"~ col gap-1",hover:"bg-active","items-center":"","of-hidden":"",rounded:"",p2:""},Le={"w-full":"","of-hidden":"",truncate:"","ws-nowrap":"","text-center":"","text-xs":""},Me=j({__name:"AssetGridItem",props:{asset:null,folder:null},setup(o){const t=o,m=y(()=>t.folder&&t.asset.path.startsWith(t.folder)?t.asset.path.slice(t.folder.length):t.asset.path);return(c,g)=>{const k=J;return s(),r("button",Ee,[f(k,{"h-30":"","w-30":"",rounded:"",border:"~ base",asset:o.asset},null,8,["asset"]),e("div",Le,w(n(m)),1)])}}}),Ue={flex:"~ gap-1","w-full":"","items-center":"",hover:"bg-active",rounded:"",px4:"",py2:""},Oe={"of-hidden":"",truncate:"","ws-nowrap":"","text-center":""},Re=j({__name:"AssetListItem",props:{asset:null},setup(o){const t=o,m=y(()=>t.asset.type==="image"?"i-carbon-image":t.asset.type==="video"?"i-carbon-video":t.asset.type==="audio"?"i-carbon-volume-up":t.asset.type==="font"?"i-carbon-text-small-caps":t.asset.type==="text"?"i-carbon-document":t.asset.type==="json"?"i-carbon-json":"i-carbon-document-blank");return(c,g)=>(s(),r("button",Ue,[e("div",{class:q(n(m))},null,2),e("div",Oe,w(o.asset.path),1)]))}}),Ve={flex:"~ col gap-4","min-h-full":"","w-full":"","of-hidden":"",p4:""},Ge=e("div",{flex:"~ gap2","mb--2":"","items-center":"",op50:""},[e("div",{"x-divider":""}),e("div",{"flex-none":""}," Preview "),e("div",{"x-divider":""})],-1),Ke={flex:"~","items-center":"","justify-center":""},Xe=e("div",{flex:"~ gap2","mb--2":"","items-center":"",op50:""},[e("div",{"x-divider":""}),e("div",{"flex-none":""}," Details "),e("div",{"x-divider":""})],-1),qe={"max-w-full":"","w-full":"","table-fixed":""},Ze=e("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," Filepath ",-1),Je={flex:"~ gap-1","w-full":"","items-center":""},Qe=e("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," Public Path ",-1),We={flex:"~ gap-1","w-full":"","items-center":"","of-hidden":""},He={"flex-auto":"","of-hidden":"",truncate:"","ws-pre":"","font-mono":""},Ye=e("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," Type ",-1),et={capitalize:""},tt=e("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," Image Size ",-1),nt={key:0},st=e("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," Aspect Ratio ",-1),ot=e("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," File size ",-1),at=e("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," Last modified ",-1),it={op70:""},lt=e("div",{flex:"~ gap2","mb--2":"","items-center":"",op50:""},[e("div",{"x-divider":""}),e("div",{"flex-none":""}," Actions "),e("div",{"x-divider":""})],-1),rt={flex:"~ gap2 wrap"},ct=e("div",{"flex-auto":""},null,-1),ut=j({__name:"AssetDetails",props:{asset:null},setup(o){const t=o,m=he(),c=X(()=>{if(t.asset.type==="image")return G.getImageMeta(t.asset.filePath)}),g=X(()=>{if(t.asset.type==="text")return G.getTextAssetContent(t.asset.filePath)}),k=ie(),u=y(()=>(k.value?._installedModules||[]).some(p=>p.meta?.name==="@nuxt/image"||p.meta?.name==="@nuxt/image-edge")),C=y(()=>{const l=[];if(t.asset.type==="image"){const p=c.value?.width?`
7
- width="${c.value.width}"
8
- height="${c.value.height}" `:" ";return l.push({lang:"vue-html",code:`<img${p}
9
- src="${t.asset.publicPath}"
10
- />`,name:"Plain Image"}),u.value&&l.push({lang:"vue-html",code:`<NuxtImage${p}
11
- src="${t.asset.publicPath}"
12
- />`,name:"Nuxt Image",docs:"https://image.nuxtjs.org/components/nuxt-img"},{lang:"vue-html",code:`<NuxtPicture${p}
13
- src="${t.asset.publicPath}"
14
- />`,name:"Nuxt Picture",docs:"https://image.nuxtjs.org/components/nuxt-picture"}),l}return l.push({lang:"html",code:`<a download href="${t.asset.publicPath}">
15
- Download ${t.asset.path.split("/").slice(-1)[0]}
16
- </a>`,name:"Download link"}),l}),L=_e(),B=le(()=>t.asset.mtime),M=y(()=>{const l=t.asset.size;return l<1024?`${l} B`:l<1024*1024?`${(l/1024).toFixed(2)} KB`:`${(l/1024/1024).toFixed(2)} MB`}),x=y(()=>{if(!c.value?.width||!c.value?.height)return"";const l=(A,$)=>$?l($,A%$):A,p=l(c.value.width,c.value.height);return p>3?`${c.value.width/p}:${c.value.height/p}`:""}),h=y(()=>["image","text","video","font"].includes(t.asset.type));return(l,p)=>{const A=J,$=me,D=K,I=Z,a=fe;return s(),r("div",Ve,[n(h)?(s(),r(N,{key:0},[Ge,e("div",Ke,[f(A,{"max-h-80":"","min-h-20":"","min-w-20":"","w-auto":"",rounded:"",border:"~ base",asset:o.asset,"text-content":n(g)},null,8,["asset","text-content"])])],64)):S("",!0),Xe,e("table",qe,[e("tbody",null,[e("tr",null,[Ze,e("td",null,[e("div",Je,[f($,{filepath:o.asset.filePath,"text-left":""},null,8,["filepath"]),f(D,{"flex-none":"",title:"Open in Editor",icon:"carbon-launch",onClick:p[0]||(p[0]=_=>n(m)(o.asset.filePath))})])])]),e("tr",null,[Qe,e("td",null,[e("div",We,[e("div",He,w(o.asset.publicPath),1),f(D,{"flex-none":"",title:"Copy public path",icon:"carbon-copy",onClick:p[1]||(p[1]=_=>n(L)(o.asset.publicPath))}),f(D,{"flex-none":"",to:o.asset.publicPath,icon:"carbon-launch",target:"_blank",title:"Open in browser"},null,8,["to"])])])]),e("tr",null,[Ye,e("td",et,w(o.asset.type),1)]),n(c)?.width?(s(),r(N,{key:0},[e("tr",null,[tt,e("td",null,w(n(c).width)+" x "+w(n(c).height),1)]),n(x)?(s(),r("tr",nt,[st,e("td",null,w(n(x)),1)])):S("",!0)],64)):S("",!0),e("tr",null,[ot,e("td",null,w(n(M)),1)]),e("tr",null,[at,e("td",null,[E(w(new Date(o.asset.mtime).toLocaleString())+" ",1),e("span",it,"("+w(n(B))+")",1)])])])]),lt,e("div",rt,[f(I,{to:o.asset.publicPath,download:"",target:"_blank",icon:"carbon-download"},{default:z(()=>[E(" Download ")]),_:1},8,["to"]),o.asset.type==="image"?(s(),F(I,{key:0,disabled:"",icon:"carbon-image-service"},{default:z(()=>[E(" Optimize image (Coming soon) ")]),_:1})):S("",!0)]),ct,n(C).length?(s(),F(a,{key:1,border:"t base","mx--4":"","mb--4":"","code-snippets":n(C)},null,8,["code-snippets"])):S("",!0)])}}}),dt={"h-full":"","of-auto":""},pt={"flex-none":"",flex:"~ gap2 items-center"},mt={op50:""},ft={key:0},ht={"mt--4":"",px2:"",grid:"~ cols-minmax-8rem"},_t={key:1,p2:"",grid:"~ cols-minmax-8rem"},vt={key:1},St=j({__name:"assets",setup(o){const t=re(),m=T(""),c=y(()=>new xe(t.value||[],{keys:["path"]})),g=y(()=>m.value?c.value.search(m.value).map(h=>h.item):t.value||[]),k=y(()=>{const x={};for(const h of g.value){const l=`${h.path.split("/").slice(0,-1).join("/")}/`;x[l]||(x[l]=[]),x[l].push(h)}return Object.entries(x).sort(([h],[l])=>h.localeCompare(l))}),u=T(),C=T("grid");function L(){C.value=C.value==="list"?"grid":"list"}ce("Escape",()=>{u.value=void 0});const B=T();function M(){}return(x,h)=>{const l=K,p=H,A=De,$=Me,D=pe,I=Re,a=ut,_=ve;return s(),r("div",dt,[f(p,{ref_key:"navbar",ref:B,search:n(m),"onUpdate:search":h[0]||(h[0]=i=>ue(m)?m.value=i:null),pb2:""},{actions:z(()=>[e("div",pt,[f(l,{"text-lg":"",icon:n(C)==="grid"?"i-carbon-list":"i-carbon-grid",title:"Toggle view",onClick:L},null,8,["icon"])])]),default:z(()=>[e("div",mt,[n(m)?(s(),r("span",ft,w(n(g).length)+" matched · ",1)):S("",!0),e("span",null,w(n(t)?.length)+" assets in total",1)])]),_:1},8,["search"]),f(A,{folder:"/",onUploaded:M}),n(C)==="grid"?(s(),r(N,{key:0},[n(k).length>1?(s(!0),r(N,{key:0},O(n(k),([i,v])=>(s(),F(D,{key:i,text:i,description:`${v.length} items`,open:v.length<=("DETAILS_MAX_ITEMS"in x?x.DETAILS_MAX_ITEMS:n(ge)),padding:!1},{default:z(()=>[e("div",ht,[(s(!0),r(N,null,O(v,d=>(s(),F($,{key:d.path,asset:d,folder:i,onClick:b=>u.value=d},null,8,["asset","folder","onClick"]))),128))])]),_:2},1032,["text","description","open"]))),128)):(s(),r("div",_t,[(s(!0),r(N,null,O(n(g),i=>(s(),F($,{key:i.path,asset:i,onClick:v=>u.value=i},null,8,["asset","onClick"]))),128))]))],64)):(s(),r("div",vt,[(s(!0),r(N,null,O(n(g),i=>(s(),F(I,{key:i.path,asset:i,onClick:v=>u.value=i},null,8,["asset","onClick"]))),128))])),f(_,{"model-value":!!n(u),"auto-close":"","w-120":"",navbar:n(B),onClose:h[1]||(h[1]=i=>u.value=void 0)},{default:z(()=>[n(u)?(s(),F(a,{key:0,asset:n(u)},null,8,["asset"])):S("",!0)]),_:1},8,["model-value","navbar"])])}}});export{St as default};
@@ -1 +0,0 @@
1
- import{_ as E}from"./NPanelGrids.3011caf9.js";import{a as C,W as M,r as g,p as w,ad as B,ae as N,a0 as T,af as V,ag as f,ah as W,ai as $,h as I,o as s,E as L,D as A,aj as D,u as t,c as d,w as h,a8 as O,f as c,l as y,t as k,y as P,i as S,a3 as q}from"./entry.33b4ceee.js";import{_ as R}from"./LaunchPage.vue.10a18c7c.js";import"./NMarkdown.vue.b43fcab0.js";import"./client.a6478274.js";const b=new Map,U=C({__name:"IframeView",props:{tab:null},setup(x){const p=x,l=M(),r=g(),u=w(()=>p.tab.name),e=g(),n=B(N(r));T(()=>{const o=p.tab.view,i=o.persistent!==!1,j=["clipboard-write","clipboard-read"];if(b.get(u.value)&&i)e.value=b.get(u.value),e.value.style.visibility="visible";else{e.value=document.createElement("iframe"),e.value.setAttribute("allow",j.join("; ")),i&&b.set(u.value,e.value),e.value.src=o.src;try{e.value.style.opacity="0.01",e.value.onload=()=>{v(),a(),e.value.style.opacity="1"}}catch{e.value.style.opacity="1"}document.body.appendChild(e.value),V(_)}setTimeout(a,100)}),f(_),f(a),f(v),W(()=>{e.value&&(e.value.style.visibility="hidden")});function a(){if(!(!e.value||!e.value.contentWindow))try{const o=e.value.contentWindow.document.querySelector("html");o?.classList.toggle("dark",l.value==="dark"),o?.classList.toggle("light",l.value==="dark"),new MutationObserver(()=>{l.value=e.value?.contentWindow?.document.querySelector("html")?.classList.contains("dark")?"dark":"light"}).observe(o,{attributes:!0,attributeFilter:["class"]})}catch{}}const m=$();function v(){if(!(!e.value||!e.value.contentWindow))try{e.value.contentWindow.__NUXT_DEVTOOLS__=m.value}catch{}}function _(){e.value&&Object.assign(e.value.style,{position:"fixed",left:`${n.left}px`,top:`${n.top}px`,width:`${n.width}px`,height:`${n.height}px`,outline:"none"})}return(o,i)=>(s(),I("div",{ref_key:"anchor",ref:r,"h-full":"","w-full":""},null,512))}}),F={flex:"~ col gap2",mxa:"","items-center":""},G=c("div",{"i-carbon-queued":"",mb2:"","text-5xl":"",op50:""},null,-1),X={"text-xl":""},z={"text-rose":""},H=c("p",{op50:""}," It might because the module contributing this tab is not installed or enabled ",-1),J=c("p",{mt8:"","animate-pulse":""}," Redirecting to overview page... ",-1),oe=C({__name:"custom-[name]",setup(x){const p=L(),l=A(),r=w(()=>p.params.name),u=D(),e=w(()=>u.value.find(n=>n.name===r.value));return T(()=>{e.value||setTimeout(()=>{e.value||l.push("/modules/overview")},2e3)}),(n,a)=>{const m=E,v=U,_=R,o=q;return t(e)?t(e).view.type==="iframe"?(s(),d(v,{key:1,tab:t(e)},null,8,["tab"])):t(e).view.type==="vnode"?(s(),d(O(t(e).view.vnode),{key:2})):t(e).view.type==="launch"?(s(),d(_,{key:3,icon:t(e).view.icon||t(e).icon,title:t(e).view.title||t(e).title,description:t(e).view.description,actions:t(e).view.actions,onAction:a[0]||(a[0]=i=>("rpc"in n?n.rpc:t(P)).customTabAction(t(e).name,i))},null,8,["icon","title","description","actions"])):(s(),d(m,{key:4},{default:h(()=>[S(o,{flex:"~ col","h-full":"","items-center":"","justify-center":""},{default:h(()=>[y(" Unknown tab type "+k(t(e).view),1)]),_:1})]),_:1})):(s(),d(m,{key:0},{default:h(()=>[c("div",F,[G,c("p",X,[y(" Tab "),c("code",z,k(t(r)),1),y(" not found ")]),H,J])]),_:1}))}}});export{oe as default};