@nuxt/devtools 0.7.5 → 0.7.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/module-main.mjs +28 -18
- package/dist/chunks/plugin-metrics.mjs +8 -1
- package/dist/chunks/vscode.mjs +1 -1
- package/dist/client/200.html +2 -2
- package/dist/client/404.html +2 -2
- package/dist/client/__blank/index.html +2 -2
- package/dist/client/_nuxt/{Badge.809c442f.js → Badge.f2e9b29c.js} +1 -1
- package/dist/client/_nuxt/{CodeDiff.vue.1cd1f35a.js → CodeDiff.vue.9b0b0885.js} +1 -1
- package/dist/client/_nuxt/{ComposableItem.vue.a490c449.js → ComposableItem.vue.3f961e9e.js} +1 -1
- package/dist/client/_nuxt/{DataSchemaButton.vue.31fe918d.js → DataSchemaButton.vue.a6df5cb8.js} +1 -1
- package/dist/client/_nuxt/{DataSchemaDrawer.7a8538ed.js → DataSchemaDrawer.be265d1e.js} +1 -1
- package/dist/client/_nuxt/{DrawerRight.vue.3bbd0e76.js → DrawerRight.vue.92472251.js} +1 -1
- package/dist/client/_nuxt/{DurationDisplay.vue.1533a045.js → DurationDisplay.vue.ebef3eee.js} +1 -1
- package/dist/client/_nuxt/FilepathItem.vue.a967b383.js +1 -0
- package/dist/client/_nuxt/{HelpFab.vue.5d67494b.js → HelpFab.vue.4d768974.js} +1 -1
- package/dist/client/_nuxt/LaunchPage.vue.c2e514b2.js +1 -0
- package/dist/client/_nuxt/{NCheckbox.vue.76b79ec0.js → NCheckbox.vue.78fd8d82.js} +1 -1
- package/dist/client/_nuxt/{NCodeBlock.vue.a8601f10.js → NCodeBlock.vue.c7ed33b1.js} +1 -1
- package/dist/client/_nuxt/{NDropdown.vue.c183f72d.js → NDropdown.vue.c7f63cd6.js} +1 -1
- package/dist/client/_nuxt/{NIconTitle.vue.e492e44a.js → NIconTitle.vue.2f7c2128.js} +1 -1
- package/dist/client/_nuxt/{NLink.vue.e00535a9.js → NLink.vue.3fcc5a37.js} +1 -1
- package/dist/client/_nuxt/{NMarkdown.vue.7d7a1e6e.js → NMarkdown.vue.e4405095.js} +1 -1
- package/dist/client/_nuxt/{NSectionBlock.6778ba18.js → NSectionBlock.9c411590.js} +1 -1
- package/dist/client/_nuxt/{NSelect.vue.6e592a84.js → NSelect.vue.7a8edc85.js} +1 -1
- package/dist/client/_nuxt/{NSwitch.vue.855c3f98.js → NSwitch.vue.defcd586.js} +1 -1
- package/dist/client/_nuxt/{NTip.vue.6bf7cf97.js → NTip.vue.04791b31.js} +1 -1
- package/dist/client/_nuxt/{Navbar.vue.c8f5ea35.js → Navbar.vue.3fbf7ca0.js} +1 -1
- package/dist/client/_nuxt/{StateEditor.vue.082de4fa.js → StateEditor.vue.01c203b9.js} +1 -1
- package/dist/client/_nuxt/{__blank.8beed58c.js → __blank.3dddd973.js} +1 -1
- package/dist/client/_nuxt/{analyze-build.88782d48.js → analyze-build.3db956f4.js} +1 -1
- package/dist/client/_nuxt/assets.634c950e.js +16 -0
- package/dist/client/_nuxt/{client.fbe3eaa6.js → client.d5aff798.js} +1 -1
- package/dist/client/_nuxt/{components.99398ea7.js → components.e360f866.js} +1 -1
- package/dist/client/_nuxt/custom-_name_.95236ea5.js +1 -0
- package/dist/client/_nuxt/{default.2ae1a40e.js → default.8f859e18.js} +1 -1
- package/dist/client/_nuxt/entry.2ee3a83f.css +1 -0
- package/dist/client/_nuxt/{entry.704683a1.js → entry.b81bf245.js} +8 -8
- package/dist/client/_nuxt/{error-404.bde0cadd.js → error-404.50ed5273.js} +1 -1
- package/dist/client/_nuxt/{error-500.524ae368.js → error-500.3f0ba72e.js} +1 -1
- package/dist/client/_nuxt/{full.6451054a.js → full.778b4958.js} +1 -1
- package/dist/client/_nuxt/{hooks.d1ff16ee.js → hooks.22b55b1c.js} +1 -1
- package/dist/client/_nuxt/imports.2a0fb129.js +1 -0
- package/dist/client/_nuxt/{index.2ab6466f.js → index.622264a3.js} +1 -1
- package/dist/client/_nuxt/{index.ef0631d4.js → index.76729ecb.js} +1 -1
- package/dist/client/_nuxt/{json-editor-vue.d2d6ca22.js → json-editor-vue.58ea58a4.js} +1 -1
- package/dist/client/_nuxt/{middleware.c86c494b.js → middleware.f7a35d95.js} +1 -1
- package/dist/client/_nuxt/{modules.e419f21a.js → modules.15421639.js} +2 -2
- package/dist/client/_nuxt/{none.bdacb36e.js → none.3d88124b.js} +1 -1
- package/dist/client/_nuxt/{open-graph.ae9112ee.js → open-graph.73aa4a70.js} +2 -2
- package/dist/client/_nuxt/{overview.b36ec18b.js → overview.0aabd2ca.js} +1 -1
- package/dist/client/_nuxt/{pages.f4173ed6.js → pages.7e22d9e3.js} +1 -1
- package/dist/client/_nuxt/{payload.8138f0c2.js → payload.cc8ba563.js} +1 -1
- package/dist/client/_nuxt/{plugins.192ab129.js → plugins.b4d83e48.js} +1 -1
- package/dist/client/_nuxt/{runtime-configs.399a5d6f.js → runtime-configs.15955414.js} +1 -1
- package/dist/client/_nuxt/server-routes.10f98ec2.js +9 -0
- package/dist/client/_nuxt/{settings.2dfbccf3.js → settings.b2b35d44.js} +1 -1
- package/dist/client/_nuxt/{state-components.eea2cf71.js → state-components.c65acb0d.js} +1 -1
- package/dist/client/_nuxt/{state-modules.8cc9b26b.js → state-modules.e0b57d1b.js} +1 -1
- package/dist/client/_nuxt/storage-options.f095012b.js +1 -0
- package/dist/client/_nuxt/{storage.7aca7890.js → storage.81e195cf.js} +1 -1
- package/dist/client/_nuxt/{terminals.b71c30e6.js → terminals.57b44373.js} +1 -1
- package/dist/client/_nuxt/{timeline.32019995.js → timeline.e3f428d4.js} +2 -2
- package/dist/client/_nuxt/{unocss-runtime.0935bd38.js → unocss-runtime.2f2f07ae.js} +1 -1
- package/dist/client/_nuxt/{virtual-files.2f2a88f3.js → virtual-files.02aedd29.js} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/client/modules/analyze-build/index.html +2 -2
- package/dist/client/modules/assets/index.html +2 -2
- package/dist/client/modules/components/index.html +2 -2
- package/dist/client/modules/hooks/index.html +2 -2
- package/dist/client/modules/imports/index.html +2 -2
- package/dist/client/modules/middleware/index.html +2 -2
- package/dist/client/modules/modules/index.html +2 -2
- package/dist/client/modules/open-graph/index.html +2 -2
- package/dist/client/modules/overview/index.html +2 -2
- package/dist/client/modules/pages/index.html +2 -2
- package/dist/client/modules/payload/index.html +2 -2
- package/dist/client/modules/plugins/index.html +2 -2
- package/dist/client/modules/runtime-configs/index.html +2 -2
- package/dist/client/modules/server-routes/index.html +2 -2
- package/dist/client/modules/storage/index.html +2 -2
- package/dist/client/modules/terminals/index.html +2 -2
- package/dist/client/modules/timeline/index.html +2 -2
- package/dist/client/modules/virtual-files/index.html +2 -2
- package/dist/client/settings/index.html +2 -2
- package/dist/module.json +1 -1
- package/dist/module.mjs +1 -1
- package/dist/runtime/function-metrics-helpers.mjs +17 -12
- package/dist/runtime/plugins/devtools.client.mjs +6 -1
- package/dist/runtime/plugins/view/Main.vue +1 -1
- package/dist/shared/{devtools.c34e61ba.mjs → devtools.6d7e3a3a.mjs} +3 -0
- package/package.json +11 -11
- package/dist/client/_nuxt/CodeSnippets.vue.e2cc365d.js +0 -1
- package/dist/client/_nuxt/FilepathItem.vue.a9853d6c.js +0 -1
- package/dist/client/_nuxt/LaunchPage.vue.304a6918.js +0 -1
- package/dist/client/_nuxt/assets.dec2c564.js +0 -16
- package/dist/client/_nuxt/custom-_name_.53810490.js +0 -1
- package/dist/client/_nuxt/entry.6293ec9a.css +0 -1
- package/dist/client/_nuxt/imports.9142e1cd.js +0 -1
- package/dist/client/_nuxt/server-routes.a3646010.js +0 -9
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nuxt/devtools",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.7.
|
|
4
|
+
"version": "0.7.6",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": "nuxt/devtools",
|
|
7
7
|
"exports": {
|
|
@@ -58,12 +58,12 @@
|
|
|
58
58
|
"sirv": "^2.0.3",
|
|
59
59
|
"unimport": "^3.1.3",
|
|
60
60
|
"vite-plugin-inspect": "^0.7.35",
|
|
61
|
-
"vite-plugin-vue-inspector": "^3.
|
|
61
|
+
"vite-plugin-vue-inspector": "^3.6.0",
|
|
62
62
|
"wait-on": "^7.0.1",
|
|
63
63
|
"which": "^3.0.1",
|
|
64
64
|
"ws": "^8.13.0",
|
|
65
|
-
"@nuxt/devtools-kit": "0.7.
|
|
66
|
-
"@nuxt/devtools-wizard": "0.7.
|
|
65
|
+
"@nuxt/devtools-kit": "0.7.6",
|
|
66
|
+
"@nuxt/devtools-wizard": "0.7.6"
|
|
67
67
|
},
|
|
68
68
|
"devDependencies": {
|
|
69
69
|
"@antfu/utils": "^0.7.5",
|
|
@@ -71,17 +71,17 @@
|
|
|
71
71
|
"@iconify-json/carbon": "^1.1.19",
|
|
72
72
|
"@iconify-json/logos": "^1.1.34",
|
|
73
73
|
"@iconify-json/ri": "^1.1.12",
|
|
74
|
-
"@iconify-json/simple-icons": "^1.1.
|
|
74
|
+
"@iconify-json/simple-icons": "^1.1.65",
|
|
75
75
|
"@iconify-json/tabler": "^1.1.87",
|
|
76
76
|
"@nuxt/content": "^2.7.2",
|
|
77
77
|
"@nuxtjs/color-mode": "^3.3.0",
|
|
78
78
|
"@parcel/watcher": "^2.2.0",
|
|
79
79
|
"@types/markdown-it-link-attributes": "^3.0.1",
|
|
80
80
|
"@types/ua-parser-js": "^0.7.36",
|
|
81
|
-
"@unocss/nuxt": "^0.54.
|
|
82
|
-
"@unocss/preset-icons": "^0.54.
|
|
83
|
-
"@unocss/preset-uno": "^0.54.
|
|
84
|
-
"@unocss/runtime": "^0.54.
|
|
81
|
+
"@unocss/nuxt": "^0.54.2",
|
|
82
|
+
"@unocss/preset-icons": "^0.54.2",
|
|
83
|
+
"@unocss/preset-uno": "^0.54.2",
|
|
84
|
+
"@unocss/runtime": "^0.54.2",
|
|
85
85
|
"@vueuse/nuxt": "^10.3.0",
|
|
86
86
|
"esno": "^0.17.0",
|
|
87
87
|
"flatted": "^3.2.7",
|
|
@@ -102,7 +102,7 @@
|
|
|
102
102
|
"splitpanes": "^3.1.5",
|
|
103
103
|
"theme-vitesse": "^0.7.2",
|
|
104
104
|
"ua-parser-js": "^1.0.35",
|
|
105
|
-
"unocss": "^0.54.
|
|
105
|
+
"unocss": "^0.54.2",
|
|
106
106
|
"vanilla-jsoneditor": "^0.17.8",
|
|
107
107
|
"vis-data": "^7.1.6",
|
|
108
108
|
"vis-network": "^9.1.6",
|
|
@@ -111,7 +111,7 @@
|
|
|
111
111
|
"vue-virtual-scroller": "2.0.0-beta.8",
|
|
112
112
|
"xterm": "^5.2.1",
|
|
113
113
|
"xterm-addon-fit": "^0.7.0",
|
|
114
|
-
"@nuxt/devtools": "0.7.
|
|
114
|
+
"@nuxt/devtools": "0.7.6"
|
|
115
115
|
},
|
|
116
116
|
"scripts": {
|
|
117
117
|
"build": "pnpm dev:prepare && pnpm build:module && pnpm build:client && esno scripts/prepare.ts",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{_ as y}from"./NCodeBlock.vue.a8601f10.js";import{d as g,bk as h,e as S,ar as x,o as n,m as s,k as a,F as d,n as w,E as u,f as o,t as B,i as _,j as f,v as m,h as N,p as l,C as V}from"./entry.704683a1.js";const $={key:0,relative:"","n-code-block":""},E={flex:"~ wrap","w-full":""},D=["onClick"],F=a("div",{border:"b base","flex-auto":""},null,-1),j={flex:"~ gap-2",px3:"",pb3:"",n:"sm primary"},T=g({__name:"CodeSnippets",props:{codeSnippets:{}},setup(b){const c=b,e=h(c.codeSnippets[0]),k=S();return x(()=>{c.codeSnippets.includes(e.value)||(e.value=c.codeSnippets[0])}),(r,p)=>{const v=y,i=V;return r.codeSnippets.length?(n(),s("div",$,[a("div",E,[(n(!0),s(d,null,w(r.codeSnippets,(t,C)=>(n(),s("button",{key:C,px4:"",py2:"",border:"r base",hover:"bg-active",class:u(t===o(e)?"":"border-b"),onClick:z=>e.value=t},[a("div",{class:u(t===o(e)?"":"op30"),"font-mono":""},B(t.name),3)],10,D))),128)),F]),o(e)?(n(),s(d,{key:0},[_(v,{code:o(e).code,lang:o(e).lang,lines:!1,"w-full":"","of-auto":"",p3:""},null,8,["code","lang"]),a("div",j,[_(i,{icon:"carbon-copy",onClick:p[0]||(p[0]=t=>o(k)(o(e).code))},{default:f(()=>[m(" Copy ")]),_:1}),o(e)?.docs?(n(),N(i,{key:0,to:o(e).docs,target:"_blank",icon:"carbon-catalog"},{default:f(()=>[m(" Docs ")]),_:1},8,["to"])):l("",!0)])],64)):l("",!0)])):l("",!0)}}});export{T as _};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{d as u,a6 as f,a7 as c,a as k,b3 as v,o as t,h as y,j as B,m as n,F as l,v as d,t as s,f as a,k as C,p as N,E as b,an as g}from"./entry.704683a1.js";const E={key:0,op50:""},F=u({__name:"FilepathItem",props:{filepath:{},lineBreak:{type:Boolean},subpath:{type:Boolean},override:{}},setup(m){const r=m,h=f(),p=c(),o=k(()=>r.filepath&&p.value?v(r.filepath,p.value.rootDir):{path:r.filepath||""});return(e,i)=>(t(),y(g(e.filepath?"button":"span"),{class:b([e.filepath?"hover:underline":"",e.lineBreak?"":"ws-nowrap of-hidden truncate"]),"font-mono":"",title:e.override||e.filepath,onClick:i[0]||(i[0]=w=>e.filepath&&a(h)(e.filepath))},{default:B(()=>[e.override?(t(),n(l,{key:0},[d(s(e.override),1)],64)):a(o).moduleName?(t(),n(l,{key:1},[C("span",null,s(a(o).moduleName),1),e.subpath?(t(),n("span",E,s(a(o).path.slice(a(o).moduleName.length)),1)):N("",!0)],64)):(t(),n(l,{key:2},[d(s(a(o).path),1)],64))]),_:1},8,["class","title"]))}});export{F as _};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{d as k,h as o,j as a,A as b,o as t,i,k as r,t as c,p as _,m as g,n as h,aI as N,v as C,F as w,bu as x,a0 as y,C as B,ai as $}from"./entry.704683a1.js";import{_ as V}from"./NMarkdown.vue.7d7a1e6e.js";const v={"text-xl":""},I={flex:"~ gap2 wrap"},j=k({__name:"LaunchPage",props:{icon:{},title:{},description:{},actions:{}},emits:["action"],setup(P){return(e,F)=>{const l=x,m=V,p=y,d=B,u=$,f=b;return t(),o(f,null,{default:a(()=>[i(u,{flex:"~ col gap2",mxa:"","min-w-100":"","items-center":"",p6:""},{default:a(()=>[i(l,{mb2:"","text-5xl":"",icon:e.icon||e.icon,title:e.title},null,8,["icon","title"]),r("h1",v,c(e.title),1),e.description?(t(),o(m,{key:0,mb2:"","mt--1":"","text-center":"","text-base":"",op50:"",markdown:e.description},null,8,["markdown"])):_("",!0),r("div",I,[(t(!0),g(w,null,h(e.actions,(n,s)=>(t(),o(d,N({key:s,n:"solid primary",disabled:n.pending,to:n.src,target:n.src?"_blank":void 0},n.attrs,{onClick:()=>{n.handle?.(),e.$emit("action",s)}}),{default:a(()=>[n.pending?(t(),o(p,{key:0,icon:"carbon-circle-dash","animate-spin":""})):_("",!0),C(" "+c(n.label),1)]),_:2},1040,["disabled","to","target","onClick"]))),128))])]),_:1})]),_:1})}}});export{j as _};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import{d as O,r as S,W as Z,o as a,m as d,i as m,f as t,k as e,v as D,F as T,n as R,h as I,j as y,p as j,E as G,X as L,Y as ce,Z as ue,J as X,K as J,_ as Y,a0 as ee,U as te,C as ne,a as C,a1 as de,a2 as pe,a3 as oe,t as A,a4 as se,a5 as me,l as M,a6 as fe,b as Q,a7 as ve,e as he,a8 as _e,a9 as ae,H as W,V as ge,aa as xe,ab as be,ac as we}from"./entry.704683a1.js";import{_ as ye}from"./Navbar.vue.c8f5ea35.js";import{_ as $e}from"./NSectionBlock.6778ba18.js";import{_ as ke}from"./FilepathItem.vue.a9853d6c.js";import{_ as Ce}from"./CodeSnippets.vue.e2cc365d.js";import{_ as Pe}from"./DrawerRight.vue.3bbd0e76.js";import{D as Ae}from"./constants.4e5eba24.js";import"./NIconTitle.vue.e492e44a.js";import"./NCodeBlock.vue.a8601f10.js";import"./client.fbe3eaa6.js";const De={key:0,"h-full":"","w-full":"",flex:"","items-center":"","justify-center":""},Ve={for:"drop-zone-input","text-3xl":""},Ne={key:1,relative:"","h-full":"","w-full":"",grid:"~ rows-[max-content_1fr_max-content]"},Fe=e("div",{px6:"",py6:""},[e("h1",{"text-2xl":""}," Upload "),e("p",{"text-sm":"",op50:""}," Drag and drop files to upload ")],-1),Ie={grid:"~ cols-minmax-8rem","overflow-auto":"",p6:""},Se={flex:"","items-center":"","justify-center":"","of-hidden":"",rounded:"","rounded-t-lg":"","bg-active":"","object-cover":"",class:"aspect-1/1",border:"~ base"},Te=["src"],je={flex:"~ gap1","items-center":""},Ee={flex:"~ gap-2","items-center":"","justify-center":"",p8:""},Be=O({__name:"DropZone",props:{folder:{type:String,required:!0}},setup(V){const i=V,c=S(!1),o=S(),p=S([]),f=["image","video"];function z(s){o.value=s.target,c.value=!0}function v(s){s.target===o.value&&(c.value=!1)}function P(s){s.preventDefault()}function U(s){s.preventDefault(),E(s.dataTransfer.files)}function E(s){const u=Array.from(s||[]);if(u.length){const w=[],r=p.value.map(n=>n.name);for(const n of u)if(r.includes(n.name)){let l=1;const[_,k]=n.name.split(".");for(;r.includes(`${_} (${l}).${k}`);)l++;const $=`${_}-${l}.${k}`,q=new Blob([n],{type:n.type}),K=new File([q],$,{lastModified:Date.now()});w.push(K),r.push($)}else n.type===""?L({message:"Folders are not supported yet",icon:"carbon:face-dissatisfied",classes:"text-orange"}):f.some(l=>n.type.includes(l))?w.push(n):L({message:`"${n.type}" file type is not allowed`,icon:"carbon:face-dissatisfied",classes:"text-orange"});p.value=[...p.value,...w]}}async function g(){if(ce.value||ue.value)return;const s=[];for(const u of p.value){const w=new FileReader;w.readAsDataURL(u);const n=(await new Promise(l=>{w.onload=()=>l(w.result)})).split(";base64,").pop();s.push({name:u.name,data:n})}await X.writeStaticAssets(await J(),[...s],i.folder).then(()=>{N(),L({message:"Files uploaded successfully!",icon:"i-carbon:checkmark"})}).catch(u=>{console.error(u),N(),L({message:`Error uploading files: ${u}`,icon:"i-carbon-warning",classes:"text-red"})}),c.value=!1}function h(s){p.value?.splice(s,1)}function x(s){return URL.createObjectURL(s)}function B(s,u){const[w,r]=s.name.split("."),n=u.replace(/\.\w+$/,""),l=`${n}.${r}`;return n.length===0?(alert("File name must be at least 1 characters long"),w):(Object.defineProperty(s,"name",{value:l,writable:!1}),p.value.splice(p.value.indexOf(s),1,s),s)}function b(){p.value=[]}function N(){c.value=!1,b()}return Z("dragenter",z),Z("dragleave",v),Z("dragover",P),Z("drop",U),(s,u)=>{const w=Y,r=ee,n=te,l=ne;return a(),d("div",{fixed:"","bottom-0":"","left-13":"","right-0":"","top-0":"","z-10":"","backdrop-blur-20":"","transition-all":"",class:G(t(c)?"opacity-100 visible":"opacity-0 invisible")},[m(w,{icon:"carbon-close",absolute:"","right-5":"","top-5":"","z-20":"","text-xl":"",onClick:N}),t(p)?.length?(a(),d("div",Ne,[Fe,e("div",Ie,[(a(!0),d(T,null,R(t(p),(_,k)=>(a(),d("div",{key:_.name,flex:"~ col gap-2",relative:"","h-50":"","w-40":"","items-center":""},[e("div",Se,[e("img",{"h-full":"","w-full":"","rounded-t-lg":"","object-cover":"",src:x(_)},null,8,Te)]),e("div",je,[m(n,{n:"xs","flex-auto":"","model-value":_.name,"onUpdate:modelValue":$=>B(_,$.target.value)},null,8,["model-value","onUpdate:modelValue"]),m(w,{icon:"carbon-delete","flex-none":"",title:"Remove file",onClick:$=>h(k)},null,8,["onClick"])])]))),128))]),e("div",Ee,[t(p).length?(a(),I(l,{key:0,n:"red",onClick:b},{default:y(()=>[m(r,{icon:"carbon-clean"}),D(" Clear ")]),_:1})):j("",!0),m(l,{disabled:!t(p).length,n:"primary solid",onClick:g},{default:y(()=>[m(r,{icon:"carbon-cloud-upload"}),D(" Upload ")]),_:1},8,["disabled"])])])):(a(),d("div",De,[e("label",Ve,[m(r,{icon:"carbon-cloud-upload","mr-2":""}),D(" Drop files here or click to select ")]),e("input",{id:"drop-zone-input",type:"file",multiple:"",hidden:"",onChange:u[0]||(u[0]=_=>E(_.target.files))},null,32)]))],2)}}}),Le=O({__name:"AssetFontPreview",props:{asset:{}},setup(V){const i=V,c=C(()=>`devtools-assets-${de(i.asset)}`);return pe(C(()=>`
|
|
2
|
-
@font-face {
|
|
3
|
-
font-family: '${c.value}';
|
|
4
|
-
src: url('${i.asset.publicPath}');
|
|
5
|
-
}
|
|
6
|
-
`)),(o,p)=>(a(),d("div",{"of-hidden":"",style:oe({fontFamily:`'${t(c)}'`})}," 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))}}),Ue={flex:"","items-center":"","justify-center":"","of-hidden":"","bg-active":"","object-cover":"",p1:""},ze=["src"],Me={key:2,"i-carbon-document":"","text-3xl":"",op20:""},Oe={key:3,"w-full":"","self-start":"",p4:""},Re=["textContent"],Xe={key:4},Ke=["src","autoplay","controls"],Ze={key:5,"i-carbon-help":"","text-3xl":"",op20:""},le=O({__name:"AssetPreview",props:{asset:{},textContent:{},detail:{type:Boolean}},setup(V){return(i,c)=>{const o=Le;return a(),d("div",Ue,[i.asset.type==="image"?(a(),d("img",{key:0,src:i.asset.publicPath},null,8,ze)):i.asset.type==="font"?(a(),I(o,{key:i.asset.publicPath,asset:i.asset,"self-stretch":"",p2:"","text-2xl":""},null,8,["asset"])):i.asset.type==="text"&&!i.textContent?(a(),d("div",Me)):i.asset.type==="text"&&i.textContent?(a(),d("div",Oe,[e("pre",{"max-h-10rem":"","of-hidden":"","text-xs":"","font-mono":"",textContent:A(i.textContent)},null,8,Re)])):i.asset.type==="video"?(a(),d("div",Xe,[e("video",{src:i.asset.publicPath,autoplay:i.detail,controls:i.detail},null,8,Ke)])):(a(),d("div",Ze))])}}}),Ge={flex:"~ col gap-1",hover:"bg-active","items-center":"","of-hidden":"",rounded:"",p2:""},We={"w-full":"","of-hidden":"",truncate:"","ws-nowrap":"","text-center":"","text-xs":""},qe=O({__name:"AssetGridItem",props:{asset:{},folder:{}},setup(V){const i=V,c=C(()=>i.folder&&i.asset.path.startsWith(i.folder)?i.asset.path.slice(i.folder.length):i.asset.path);return(o,p)=>{const f=le;return a(),d("button",Ge,[m(f,{"h-30":"","w-30":"",rounded:"",border:"~ base",asset:o.asset},null,8,["asset"]),e("div",We,A(t(c)),1)])}}}),He=e("div",{"x-divider":""},null,-1),ie=O({__name:"AssetListItem",props:{item:{},index:{default:0},modelValue:{}},setup(V,{emit:i}){const c=V,o=se(c,"modelValue",i,{passive:!0}),p=C(()=>c.item?.children?.length),f=S(!0),z=C(()=>p.value?"i-carbon-folder":c.item.type==="image"?"i-carbon-image":c.item.type==="video"?"i-carbon-video":c.item.type==="audio"?"i-carbon-volume-up":c.item.type==="font"?"i-carbon-text-small-caps":c.item.type==="text"?"i-carbon-document":c.item.type==="json"?"i-carbon-json":"i-carbon-document-blank");return(v,P)=>{const U=ee,E=ie;return a(),d("div",null,[e("button",{flex:"~ gap-2","w-full":"","items-center":"",hover:"bg-active",px4:"",py1:"",style:oe({paddingLeft:`calc(1rem + ${v.index*1.5}em)`}),class:G({"bg-active":!t(p)&&t(o)?.filePath===v.item?.filePath}),onClick:P[0]||(P[0]=g=>t(p)?f.value=!t(f):o.value=v.item)},[e("div",{class:G(t(z))},null,2),e("span",{class:G({"flex items-center":t(p)}),"flex-auto":"","text-start":"","text-sm":"","font-mono":""},A(v.item.path),3),t(p)?(a(),I(U,{key:0,icon:"carbon:chevron-right","transform-rotate":t(f)?90:0,transition:""},null,8,["transform-rotate"])):j("",!0)],6),He,t(f)?me(v.$slots,"default",{key:0},()=>[(a(!0),d(T,null,R(v.item?.children,g=>(a(),I(E,{key:g.filepath,modelValue:t(o),"onUpdate:modelValue":P[1]||(P[1]=h=>M(o)?o.value=h:null),item:g,index:v.index+1},null,8,["modelValue","item","index"]))),128))]):j("",!0)])}}}),Je={flex:"~ col gap-4","min-h-full":"","w-full":"","of-hidden":"",p4:""},Ye=e("div",{flex:"~ gap2","mb--2":"","items-center":"",op50:""},[e("div",{"x-divider":""}),e("div",{"flex-none":""}," Preview "),e("div",{"x-divider":""})],-1),Qe={flex:"~","items-center":"","justify-center":""},et=e("div",{flex:"~ gap2","mb--2":"","items-center":"",op50:""},[e("div",{"x-divider":""}),e("div",{"flex-none":""}," Details "),e("div",{"x-divider":""})],-1),tt={"max-w-full":"","w-full":"","table-fixed":""},nt=e("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," Filepath ",-1),ot={flex:"~ gap-1","w-full":"","items-center":""},st=e("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," Public Path ",-1),at={flex:"~ gap-1","w-full":"","items-center":"","of-hidden":""},lt={"flex-auto":"","of-hidden":"",truncate:"","ws-pre":"","font-mono":""},it=e("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," Type ",-1),rt={capitalize:""},ct=e("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," Image Size ",-1),ut={key:0},dt=e("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," Aspect Ratio ",-1),pt=e("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," File size ",-1),mt=e("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," Last modified ",-1),ft={op70:""},vt=e("div",{flex:"~ gap2","mb--2":"","items-center":"",op50:""},[e("div",{"x-divider":""}),e("div",{"flex-none":""}," Actions "),e("div",{"x-divider":""})],-1),ht={flex:"~ gap2 wrap"},_t=e("div",{"flex-auto":""},null,-1),gt={flex:"~ col gap-4","min-h-full":"","w-full":"","of-hidden":"",p8:""},xt=e("span",null," Are you sure you want to delete this asset? ",-1),bt={flex:"~ gap2 wrap justify-center"},wt={flex:"~ col gap-4","min-h-full":"","w-full":"","of-hidden":"",p8:""},yt={flex:"~ gap2 wrap justify-center"},$t=O({__name:"AssetDetails",props:{modelValue:{}},setup(V,{emit:i}){const o=se(V,"modelValue",i,{passive:!0}),p=fe(),f=Q(()=>{if(o.value.type==="image")return X.getImageMeta(o.value.filePath)}),z=Q(()=>{if(o.value.type==="text")return X.getTextAssetContent(o.value.filePath)}),v=ve(),P=C(()=>(v.value?._installedModules||[]).some(n=>n.meta?.name==="@nuxt/image"||n.meta?.name==="@nuxt/image-edge")),U=C(()=>{const r=[];if(o.value.type==="image"){const n=f.value?.width?`
|
|
7
|
-
width="${f.value.width}"
|
|
8
|
-
height="${f.value.height}" `:" ";return r.push({lang:"vue-html",code:`<img${n}
|
|
9
|
-
src="${o.value.publicPath}"
|
|
10
|
-
/>`,name:"Plain Image"}),P.value&&r.push({lang:"vue-html",code:`<NuxtImage${n}
|
|
11
|
-
src="${o.value.publicPath}"
|
|
12
|
-
/>`,name:"Nuxt Image",docs:"https://image.nuxtjs.org/components/nuxt-img"},{lang:"vue-html",code:`<NuxtPicture${n}
|
|
13
|
-
src="${o.value.publicPath}"
|
|
14
|
-
/>`,name:"Nuxt Picture",docs:"https://image.nuxtjs.org/components/nuxt-picture"}),r}return r.push({lang:"html",code:`<a download href="${o.value.publicPath}">
|
|
15
|
-
Download ${o.value.path.split("/").slice(-1)[0]}
|
|
16
|
-
</a>`,name:"Download link"}),r}),E=he(),g=_e(()=>o.value.mtime),h=C(()=>{const r=o.value.size;return r<1024?`${r} B`:r<1024*1024?`${(r/1024).toFixed(2)} KB`:`${(r/1024/1024).toFixed(2)} MB`}),x=C(()=>{if(!f.value?.width||!f.value?.height)return"";const r=(l,_)=>_?r(_,l%_):l,n=r(f.value.width,f.value.height);return n>3?`${f.value.width/n}:${f.value.height/n}`:""}),B=C(()=>["image","text","video","font"].includes(o.value.type)),b=S(!1);async function N(){try{await X.deleteStaticAsset(await J(),o.value.filePath),o.value=void 0,b.value=!1,L({message:"Asset deleted",icon:"i-carbon-checkmark",classes:"text-green"})}catch{L({message:"Something went wrong!",icon:"i-carbon-warning",classes:"text-red"})}}const s=S(!1),u=S("");async function w(){const r=o.value.filePath.split("/"),n=r.slice(-1)[0].split(".").slice(0,-1).join(".");if(!u.value||u.value===n)return L({message:"Please enter a new name",icon:"i-carbon-warning",classes:"text-orange"});try{const l=r.slice(-1)[0].split(".").slice(-1)[0],_=`${r.slice(0,-1).join("/")}/${u.value}.${l}`;await X.renameStaticAsset(await J(),o.value.filePath,_),o.value=void 0,s.value=!1,L({message:"Asset renamed",icon:"i-carbon-checkmark",classes:"text-green"})}catch{L({message:"Something went wrong!",icon:"i-carbon-warning",classes:"text-red"})}}return(r,n)=>{const l=le,_=ke,k=Y,$=ne,q=Ce,K=ge,re=te,H=ae("tooltip");return a(),d(T,null,[e("div",Je,[t(B)?(a(),d(T,{key:0},[Ye,e("div",Qe,[m(l,{detail:"","max-h-80":"","min-h-20":"","min-w-20":"","w-auto":"",rounded:"",border:"~ base",asset:t(o),"text-content":t(z)},null,8,["asset","text-content"])])],64)):j("",!0),et,e("table",tt,[e("tbody",null,[e("tr",null,[nt,e("td",null,[e("div",ot,[m(_,{filepath:t(o).filePath,"text-left":""},null,8,["filepath"]),W(m(k,{"flex-none":"",title:"Open in Editor",icon:"carbon-launch",onClick:n[0]||(n[0]=F=>t(p)(t(o).filePath))},null,512),[[H,"Open in Editor"]])])])]),e("tr",null,[st,e("td",null,[e("div",at,[e("div",lt,A(t(o).publicPath),1),W(m(k,{"flex-none":"",title:"Copy public path",icon:"carbon-copy",onClick:n[1]||(n[1]=F=>t(E)(t(o).publicPath))},null,512),[[H,"Copy public path"]]),W(m(k,{"flex-none":"",to:t(o).publicPath,icon:"carbon-launch",target:"_blank",title:"Open in browser"},null,8,["to"]),[[H,"Open in browser"]])])])]),e("tr",null,[it,e("td",rt,A(t(o).type),1)]),t(f)?.width?(a(),d(T,{key:0},[e("tr",null,[ct,e("td",null,A(t(f).width)+" x "+A(t(f).height),1)]),t(x)?(a(),d("tr",ut,[dt,e("td",null,A(t(x)),1)])):j("",!0)],64)):j("",!0),e("tr",null,[pt,e("td",null,A(t(h)),1)]),e("tr",null,[mt,e("td",null,[D(A(new Date(t(o).mtime).toLocaleString())+" ",1),e("span",ft,"("+A(t(g))+")",1)])])])]),vt,e("div",ht,[m($,{to:t(o).publicPath,download:"",target:"_blank",icon:"carbon-download",n:"green"},{default:y(()=>[D(" Download ")]),_:1},8,["to"]),m($,{icon:"carbon-text-annotation-toggle",n:"blue",onClick:n[2]||(n[2]=F=>s.value=!t(s))},{default:y(()=>[D(" Rename ")]),_:1}),m($,{icon:"carbon-delete",n:"red",onClick:n[3]||(n[3]=F=>b.value=!t(b))},{default:y(()=>[D(" Delete ")]),_:1}),t(o).type==="image"?(a(),I($,{key:0,disabled:"",icon:"carbon-image-service"},{default:y(()=>[D(" Optimize image (Coming soon) ")]),_:1})):j("",!0)]),_t,t(U).length?(a(),I(q,{key:1,border:"t base","mx--4":"","mb--4":"","code-snippets":t(U)},null,8,["code-snippets"])):j("",!0)]),m(K,{modelValue:t(b),"onUpdate:modelValue":n[5]||(n[5]=F=>M(b)?b.value=F:null)},{default:y(()=>[e("div",gt,[xt,e("div",bt,[m($,{icon:"carbon-close",onClick:n[4]||(n[4]=F=>b.value=!1)},{default:y(()=>[D(" Cancel ")]),_:1}),m($,{icon:"carbon-delete",n:"red",onClick:N},{default:y(()=>[D(" Delete ")]),_:1})])])]),_:1},8,["modelValue"]),m(K,{modelValue:t(s),"onUpdate:modelValue":n[8]||(n[8]=F=>M(s)?s.value=F:null)},{default:y(()=>[e("div",wt,[m(re,{modelValue:t(u),"onUpdate:modelValue":n[6]||(n[6]=F=>M(u)?u.value=F:null),placeholder:"New name",n:"blue"},null,8,["modelValue"]),e("div",yt,[m($,{icon:"carbon-close",onClick:n[7]||(n[7]=F=>s.value=!1)},{default:y(()=>[D(" Cancel ")]),_:1}),m($,{icon:"carbon-text-annotation-toggle",n:"blue",onClick:w},{default:y(()=>[D(" Rename ")]),_:1})])])]),_:1},8,["modelValue"])],64)}}}),kt={"h-full":"","of-auto":""},Ct={"flex-none":"",flex:"~ gap2 items-center"},Pt={op50:""},At={key:0},Dt={"mt--4":"",px2:"",grid:"~ cols-minmax-8rem"},Vt={key:1,p2:"",grid:"~ cols-minmax-8rem"},Nt={key:1},Mt=O({__name:"assets",setup(V){const i=xe(),c=S(""),o=C(()=>new be(i.value||[],{keys:["path"]})),p=C(()=>c.value?o.value.search(c.value).map(h=>h.item):i.value||[]),f=C(()=>{const g={};for(const h of p.value){const x=`${h.path.split("/").slice(0,-1).join("/")}/`;g[x]||(g[x]=[]),g[x].push(h)}return Object.entries(g).sort(([h],[x])=>h.localeCompare(x))}),z=C(()=>{const g={path:"public",children:[]},h=(x,B,b)=>{const[N,...s]=B;let u=x.children.find(w=>w.path===N);u||(u={...b,path:N,children:[]},x.children.push(u)),s.length>1?h(u,s,b):s.length===1&&u.children.push({...b,path:s[0]})};return p.value.forEach(x=>{const B=x.path.split("/").filter(b=>b!=="");h(g,B,x)}),g.children}),v=S(),P=S("grid");function U(){P.value=P.value==="list"?"grid":"list"}we("Escape",()=>{v.value=void 0});const E=S();return(g,h)=>{const x=Y,B=ye,b=Be,N=qe,s=$e,u=ie,w=$t,r=Pe,n=ae("tooltip");return a(),d("div",kt,[m(B,{ref_key:"navbar",ref:E,search:t(c),"onUpdate:search":h[0]||(h[0]=l=>M(c)?c.value=l:null),pb2:""},{actions:y(()=>[e("div",Ct,[W(m(x,{"text-lg":"",icon:t(P)==="grid"?"i-carbon-list":"i-carbon-grid",title:"Toggle view",onClick:U},null,8,["icon"]),[[n,"Toggle View",void 0,{"bottom-end":!0}]])])]),default:y(()=>[e("div",Pt,[t(c)?(a(),d("span",At,A(t(p).length)+" matched · ",1)):j("",!0),e("span",null,A(t(i)?.length)+" assets in total",1)])]),_:1},8,["search"]),m(b,{folder:"/"}),t(P)==="grid"?(a(),d(T,{key:0},[t(f).length>1?(a(!0),d(T,{key:0},R(t(f),([l,_])=>(a(),I(s,{key:l,text:l,description:`${_.length} items`,open:_.length<=("DETAILS_MAX_ITEMS"in g?g.DETAILS_MAX_ITEMS:t(Ae)),padding:!1},{default:y(()=>[e("div",Dt,[(a(!0),d(T,null,R(_,k=>(a(),I(N,{key:k.path,asset:k,folder:l,onClick:$=>v.value=k},null,8,["asset","folder","onClick"]))),128))])]),_:2},1032,["text","description","open"]))),128)):(a(),d("div",Vt,[(a(!0),d(T,null,R(t(p),l=>(a(),I(N,{key:l.path,asset:l,onClick:_=>v.value=l},null,8,["asset","onClick"]))),128))]))],64)):(a(),d("div",Nt,[(a(!0),d(T,null,R(t(z),(l,_)=>(a(),I(u,{key:_,modelValue:t(v),"onUpdate:modelValue":h[1]||(h[1]=k=>M(v)?v.value=k:null),item:l},null,8,["modelValue","item"]))),128))])),m(r,{"model-value":!!t(v),"auto-close":"","w-120":"",navbar:t(E),onClose:h[3]||(h[3]=l=>v.value=void 0)},{default:y(()=>[t(v)?(a(),I(w,{key:0,modelValue:t(v),"onUpdate:modelValue":h[2]||(h[2]=l=>M(v)?v.value=l:null)},null,8,["modelValue"])):j("",!0)]),_:1},8,["model-value","navbar"])])}}});export{Mt as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{d as N,ad as V,r as A,a as x,ao as $,ap as B,ag as j,aq as D,ar as y,as as E,at as I,m as M,o as s,au as L,N as P,av as W,aw as C,J as T,f as n,h as c,j as b,p as F,an as O,F as R,A as S,k as u,v as w,t as q,i as U,ai as G,ax as J}from"./entry.704683a1.js";import{_ as X}from"./LaunchPage.vue.304a6918.js";import"./NMarkdown.vue.7d7a1e6e.js";import"./client.fbe3eaa6.js";const g=new Map,z=N({__name:"IframeView",props:{tab:{}},setup(f){const m=f,r=V(),p=A(),i=x(()=>m.tab.name),e=A(),t=$(B(p));j(()=>{const a=m.tab.view,l=a.persistent!==!1,h=["clipboard-write","clipboard-read"];if(g.get(i.value)&&l)e.value=g.get(i.value),e.value.style.visibility="visible";else{e.value=document.createElement("iframe"),e.value.setAttribute("allow",h.join("; ")),l&&g.set(i.value,e.value),e.value.src=a.src;try{e.value.style.opacity="0.01",e.value.onload=()=>{d(),o(),e.value.style.opacity="1"}}catch{e.value.style.opacity="1"}document.body.appendChild(e.value),D(_)}setTimeout(o,100)}),y(_),y(o),y(d),E(()=>{e.value&&(e.value.style.visibility="hidden")});function o(){if(!(!e.value||!e.value.contentWindow))try{const a=e.value.contentWindow.document.querySelector("html");a?.classList.toggle("dark",r.value==="dark"),a?.classList.toggle("light",r.value==="dark"),new MutationObserver(()=>{r.value=e.value?.contentWindow?.document.querySelector("html")?.classList.contains("dark")?"dark":"light"}).observe(a,{attributes:!0,attributeFilter:["class"]})}catch{}}const v=I();function d(){if(!(!e.value||!e.value.contentWindow))try{e.value.contentWindow.__NUXT_DEVTOOLS__=v.value}catch{}}function _(){e.value&&Object.assign(e.value.style,{position:"fixed",left:`${t.left}px`,top:`${t.top}px`,width:`${t.width}px`,height:`${t.height}px`,outline:"none"})}return(a,l)=>(s(),M("div",{ref_key:"anchor",ref:p,"h-full":"","w-full":""},null,512))}}),H={flex:"~ col gap2",mxa:"","items-center":""},K=u("div",{"i-carbon-queued":"",mb2:"","text-5xl":"",op50:""},null,-1),Q={"text-xl":""},Y={"text-rose":""},Z=u("p",{op50:""}," It might because the module contributing this tab is not installed or enabled ",-1),ee=u("p",{mt8:"","animate-pulse":""}," Redirecting to overview page... ",-1),se=N({__name:"custom-[name]",props:{name:{}},setup(f){const m=f,r=L(),p=P(),i=x(()=>m.name??r.params.name),e=W(),t=x(()=>e.value.find(o=>o.name===i.value));return j(()=>{t.value?t.value.requireAuth&&!C.value&&T.requestForAuth():setTimeout(()=>{t.value||p.push("/modules/overview")},2e3)}),(o,v)=>{const d=S,_=J,a=z,l=X,h=G;return s(),M(R,null,[n(t)?F("",!0):(s(),c(d,{key:0},{default:b(()=>[u("div",H,[K,u("p",Q,[w(" Tab "),u("code",Y,q(n(i)),1),w(" not found ")]),Z,ee])]),_:1})),n(t).requireAuth&&!("isDevAuthed"in o?o.isDevAuthed:n(C))?(s(),c(_,{key:1})):n(t).view.type==="iframe"?(s(),c(a,{key:2,tab:n(t)},null,8,["tab"])):n(t).view.type==="vnode"?(s(),c(O(n(t).view.vnode),{key:3})):n(t).view.type==="launch"?(s(),c(l,{key:4,icon:n(t).view.icon||n(t).icon,title:n(t).view.title||n(t).title,description:n(t).view.description,actions:n(t).view.actions,onAction:v[0]||(v[0]=k=>("rpc"in o?o.rpc:n(T)).customTabAction(n(t).name,k))},null,8,["icon","title","description","actions"])):(s(),c(d,{key:5},{default:b(()=>[U(h,{flex:"~ col","h-full":"","items-center":"","justify-center":""},{default:b(()=>[w(" Unknown tab type "+q(n(t).view),1)]),_:1})]),_:1}))],64)}}});export{se as default};
|