@nuxt/devtools 0.4.1 → 0.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/module-main.mjs +30 -4
- package/dist/chunks/plugin-metrics.mjs +2 -0
- package/dist/chunks/vite-inspect.mjs +1 -0
- package/dist/chunks/vscode.mjs +4 -2
- package/dist/client/200.html +2 -2
- package/dist/client/404.html +2 -2
- package/dist/client/__inspecting/index.html +2 -2
- package/dist/client/_nuxt/Badge.cd3914e8.js +1 -0
- package/dist/client/_nuxt/CodeSnippets.vue.632ecac5.js +1 -0
- package/dist/client/_nuxt/ContentDoc.3c736737.js +1 -0
- package/dist/client/_nuxt/ContentList.5cf63827.js +1 -0
- package/dist/client/_nuxt/ContentNavigation.d3330b12.js +1 -0
- package/dist/client/_nuxt/ContentQuery.c351de6d.js +1 -0
- package/dist/client/_nuxt/ContentRenderer.84f6a8ba.js +1 -0
- package/dist/client/_nuxt/ContentRendererMarkdown.9627ed5f.js +1 -0
- package/dist/client/_nuxt/ContentSlot.e5309aa2.js +1 -0
- package/dist/client/_nuxt/DocumentDrivenEmpty.3a7246d4.js +1 -0
- package/dist/client/_nuxt/DocumentDrivenNotFound.4003c1dc.js +1 -0
- package/dist/client/_nuxt/DrawerRight.vue.87ef0065.js +1 -0
- package/dist/client/_nuxt/DurationDisplay.vue.d82ba06a.js +1 -0
- package/dist/client/_nuxt/FilepathItem.vue.c910f268.js +1 -0
- package/dist/client/_nuxt/HelpFab.vue.f1360997.js +1 -0
- package/dist/client/_nuxt/HelpImportsDirs.d2f2fbd4.js +1 -0
- package/dist/client/_nuxt/HelpImportsModules.cb999704.js +1 -0
- package/dist/client/_nuxt/HelpTip.66944fd5.js +1 -0
- package/dist/client/_nuxt/HelpTip.vue.66567591.js +1 -0
- package/dist/client/_nuxt/HelpTipPerformance.d870bc22.js +1 -0
- package/dist/client/_nuxt/LaunchPage.vue.7af6375c.js +1 -0
- package/dist/client/_nuxt/Markdown.9c3fd89e.js +1 -0
- package/dist/client/_nuxt/NCheckbox.vue.556df786.js +1 -0
- package/dist/client/_nuxt/NCodeBlock.vue.0cfd6eb2.js +2 -0
- package/dist/client/_nuxt/NIconButton.vue.3972e12f.js +1 -0
- package/dist/client/_nuxt/{NIconTitle.vue.20baf9ca.js → NIconTitle.vue.c904da9d.js} +1 -1
- package/dist/client/_nuxt/{NMarkdown.vue.04a4db38.js → NMarkdown.vue.141eb8e5.js} +1 -1
- package/dist/client/_nuxt/NPanelGrids.e798da22.js +1 -0
- package/dist/client/_nuxt/NSectionBlock.3f4396b3.js +1 -0
- package/dist/client/_nuxt/NSelect.vue.6f8626a9.js +1 -0
- package/dist/client/_nuxt/NSwitch.vue.b4a00fa1.js +1 -0
- package/dist/client/_nuxt/NTextInput.vue.3ee9e6a6.js +1 -0
- package/dist/client/_nuxt/NpmVersionCheck.vue.ff1c08a5.js +1 -0
- package/dist/client/_nuxt/NuxtLogo.49ed4c34.js +1 -0
- package/dist/client/_nuxt/{PanelLeftRight.vue.9f476475.js → PanelLeftRight.vue.6f7c90d0.js} +1 -1
- package/dist/client/_nuxt/ProseA.723ab41b.js +1 -0
- package/dist/client/_nuxt/ProseBlockquote.31111395.js +1 -0
- package/dist/client/_nuxt/ProseCode.91764405.js +1 -0
- package/dist/client/_nuxt/ProseCodeInline.95391ff4.js +1 -0
- package/dist/client/_nuxt/ProseEm.7e9bacf8.js +1 -0
- package/dist/client/_nuxt/ProseH1.f4be965c.js +1 -0
- package/dist/client/_nuxt/ProseH2.3323da15.js +1 -0
- package/dist/client/_nuxt/ProseH3.97aadf2d.js +1 -0
- package/dist/client/_nuxt/ProseH4.77f0d76e.js +1 -0
- package/dist/client/_nuxt/ProseH5.a1e9a524.js +1 -0
- package/dist/client/_nuxt/ProseH6.badb2182.js +1 -0
- package/dist/client/_nuxt/ProseHr.1f3f8a19.js +1 -0
- package/dist/client/_nuxt/ProseImg.addee287.js +1 -0
- package/dist/client/_nuxt/ProseLi.c0a4081c.js +1 -0
- package/dist/client/_nuxt/ProseOl.f409cff0.js +1 -0
- package/dist/client/_nuxt/ProseP.90fa930a.js +1 -0
- package/dist/client/_nuxt/ProseStrong.ef82c4c4.js +1 -0
- package/dist/client/_nuxt/ProseTable.559935a7.js +1 -0
- package/dist/client/_nuxt/ProseTbody.bea00982.js +1 -0
- package/dist/client/_nuxt/ProseTd.5c53f1ad.js +1 -0
- package/dist/client/_nuxt/ProseTh.da6bf596.js +1 -0
- package/dist/client/_nuxt/ProseThead.ab101e90.js +1 -0
- package/dist/client/_nuxt/ProseTr.10b22f69.js +1 -0
- package/dist/client/_nuxt/ProseUl.92d3161d.js +1 -0
- package/dist/client/_nuxt/StateEditor.vue.a8ab5450.js +1 -0
- package/dist/client/_nuxt/__inspecting.a8b39e37.js +1 -0
- package/dist/client/_nuxt/_commonjsHelpers.87174ba5.js +1 -0
- package/dist/client/_nuxt/assets.7855a15c.js +16 -0
- package/dist/client/_nuxt/client-db.340d7fc8.js +1 -0
- package/dist/client/_nuxt/components.51a27467.js +1 -0
- package/dist/client/_nuxt/custom-_name_.397eb835.js +1 -0
- package/dist/client/_nuxt/default.5983d3fb.js +1 -0
- package/dist/client/_nuxt/editor.ec5a160f.js +1 -0
- package/dist/client/_nuxt/{entry.573eb475.js → entry.af9b874e.js} +111 -109
- package/dist/client/_nuxt/entry.c396e258.css +32 -0
- package/dist/client/_nuxt/error-404.ef05cd7d.js +1 -0
- package/dist/client/_nuxt/error-500.b994b6de.js +1 -0
- package/dist/client/_nuxt/{error-component.9b2b9ea0.js → error-component.93dcf272.js} +2 -2
- package/dist/client/_nuxt/full.3c77498c.js +1 -0
- package/dist/client/_nuxt/{fuse.esm.dd081c31.js → fuse.esm.6cb10448.js} +1 -1
- package/dist/client/_nuxt/hooks.8df155de.js +1 -0
- package/dist/client/_nuxt/imports.25b1c719.js +1 -0
- package/dist/client/_nuxt/index.38611814.js +1 -0
- package/dist/client/_nuxt/{index.ce8efa93.js → index.840dc95c.js} +6 -6
- package/dist/client/_nuxt/index.a6ef77ff.js +1 -0
- package/dist/client/_nuxt/{middleware.8446ef05.js → middleware.dacaa23f.js} +1 -1
- package/dist/client/_nuxt/modules.f91472de.js +1 -0
- package/dist/client/_nuxt/none.bb3f80b9.js +1 -0
- package/dist/client/_nuxt/overview.e0d22c39.js +1 -0
- package/dist/client/_nuxt/pages.12d35349.js +1 -0
- package/dist/client/_nuxt/payload.81558f87.js +1 -0
- package/dist/client/_nuxt/plugins.f5f45f1f.js +1 -0
- package/dist/client/_nuxt/preview.f5b42a41.js +1 -0
- package/dist/client/_nuxt/query.1a3ba2be.js +1 -0
- package/dist/client/_nuxt/runtime-configs.67372add.js +1 -0
- package/dist/client/_nuxt/server-routes.204b3d28.js +9 -0
- package/dist/client/_nuxt/settings.953b561c.js +1 -0
- package/dist/client/_nuxt/storage.857d8900.js +1 -0
- package/dist/client/_nuxt/terminals.961240f9.js +1 -0
- package/dist/client/_nuxt/unocss-runtime.c139499c.js +2 -0
- package/dist/client/_nuxt/utils.f4f8ef5c.js +1 -0
- package/dist/client/_nuxt/virtual-files.2e221c7c.js +1 -0
- package/dist/client/api/_content/cache.1682797615036.json +1 -0
- package/dist/client/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/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/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/plugins/devtools.client.mjs +34 -31
- package/dist/runtime/plugins/view/Frame.vue +1 -1
- package/dist/shared/{devtools.95cf6023.mjs → devtools.23768dcf.mjs} +2 -0
- package/dist/types.d.ts +2 -0
- package/package.json +25 -21
- package/dist/client/_nuxt/Badge.18a1faa1.js +0 -1
- package/dist/client/_nuxt/CodeSnippets.vue.93d86055.js +0 -1
- package/dist/client/_nuxt/DrawerRight.vue.753ffedf.js +0 -1
- package/dist/client/_nuxt/DurationDisplay.vue.2e10a9ab.js +0 -1
- package/dist/client/_nuxt/FilepathItem.vue.17a1ef3b.js +0 -1
- package/dist/client/_nuxt/LaunchPage.vue.d669f6a6.js +0 -1
- package/dist/client/_nuxt/NCheckbox.vue.e9f99715.js +0 -1
- package/dist/client/_nuxt/NCodeBlock.vue.bac56013.js +0 -2
- package/dist/client/_nuxt/NIconButton.vue.dc045a77.js +0 -1
- package/dist/client/_nuxt/NPanelGrids.02a70c97.js +0 -1
- package/dist/client/_nuxt/NSectionBlock.a11f230b.js +0 -1
- package/dist/client/_nuxt/NSelect.vue.ee701084.js +0 -1
- package/dist/client/_nuxt/NSwitch.vue.57428898.js +0 -1
- package/dist/client/_nuxt/NTextInput.vue.321edbfc.js +0 -1
- package/dist/client/_nuxt/NTip.vue.6b28ea49.js +0 -1
- package/dist/client/_nuxt/NpmVersionCheck.vue.cf2f92dc.js +0 -1
- package/dist/client/_nuxt/NuxtLogo.9393be93.js +0 -1
- package/dist/client/_nuxt/StateEditor.vue.780bea4b.js +0 -1
- package/dist/client/_nuxt/__inspecting.dca08c99.js +0 -1
- package/dist/client/_nuxt/assets.32f43d91.js +0 -16
- package/dist/client/_nuxt/components.cf2ad6d8.js +0 -1
- package/dist/client/_nuxt/custom-_name_.02a0e7a4.js +0 -1
- package/dist/client/_nuxt/default.15ad6f94.js +0 -1
- package/dist/client/_nuxt/editor.21c0f631.js +0 -1
- package/dist/client/_nuxt/entry.7a4bae62.css +0 -32
- package/dist/client/_nuxt/error-404.362e6f4b.js +0 -1
- package/dist/client/_nuxt/error-500.333947d6.js +0 -1
- package/dist/client/_nuxt/full.11c5f922.js +0 -1
- package/dist/client/_nuxt/hooks.5ac5215b.js +0 -1
- package/dist/client/_nuxt/imports.a42ed4e0.js +0 -1
- package/dist/client/_nuxt/index.207404a1.js +0 -1
- package/dist/client/_nuxt/index.c769634a.js +0 -3
- package/dist/client/_nuxt/modules.7af01df4.js +0 -1
- package/dist/client/_nuxt/none.a6f40eb7.js +0 -1
- package/dist/client/_nuxt/overview.57469504.js +0 -1
- package/dist/client/_nuxt/pages.e7c45d03.js +0 -1
- package/dist/client/_nuxt/payload.45880f90.js +0 -1
- package/dist/client/_nuxt/plugins.c2b464a0.js +0 -1
- package/dist/client/_nuxt/runtime-configs.c3bb5842.js +0 -1
- package/dist/client/_nuxt/server-routes.39ca7aaf.js +0 -9
- package/dist/client/_nuxt/settings.63e9273e.js +0 -1
- package/dist/client/_nuxt/storage.997cf777.js +0 -1
- package/dist/client/_nuxt/terminals.c017f557.js +0 -1
- package/dist/client/_nuxt/unocss-runtime.32a65eb2.js +0 -2
- package/dist/client/_nuxt/virtual-files.554fde6c.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as i,z as c,o as s,e as o,u as r,p as a}from"./entry.af9b874e.js";const l=["id"],u=["href"],p=i({__name:"ProseH5",props:{id:null},setup(e){const{anchorLinks:n}=c().public.content,d=n?.depth>=5&&!n?.exclude.includes(5);return(t,f)=>(s(),o("h5",{id:e.id},[e.id&&r(d)?(s(),o("a",{key:0,href:`#${e.id}`},[a(t.$slots,"default")],8,u)):a(t.$slots,"default",{key:1})],8,l))}});export{p as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as i,z as c,o as s,e as o,u as r,p as a}from"./entry.af9b874e.js";const l=["id"],u=["href"],p=i({__name:"ProseH6",props:{id:null},setup(e){const{anchorLinks:n}=c().public.content,d=n?.depth>=6&&!n?.exclude.includes(6);return(t,f)=>(s(),o("h6",{id:e.id},[e.id&&r(d)?(s(),o("a",{key:0,href:`#${e.id}`},[a(t.$slots,"default")],8,u)):a(t.$slots,"default",{key:1})],8,l))}});export{p as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{k as e,o as r,e as c}from"./entry.af9b874e.js";const o={};function t(n,s){return r(),c("hr")}const _=e(o,[["render",t]]);export{_ as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as s,h as a,K as i,z as n,o as c,e as h,u as o}from"./entry.af9b874e.js";const u=["src","alt","width","height"],m=s({__name:"ProseImg",props:{src:{type:String,default:""},alt:{type:String,default:""},width:{type:[String,Number],default:void 0},height:{type:[String,Number],default:void 0}},setup(t){const e=t,r=a(()=>e.src?.startsWith("/")&&!e.src.startsWith("//")?i(e.src,n().app.baseURL):e.src);return(d,l)=>(c(),h("img",{src:o(r),alt:t.alt,width:t.width,height:t.height},null,8,u))}});export{m as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{k as o,o as r,e as s,p as t}from"./entry.af9b874e.js";const n={};function c(e,a){return r(),s("li",null,[t(e.$slots,"default")])}const f=o(n,[["render",c]]);export{f as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{k as o,o as r,e as s,p as t}from"./entry.af9b874e.js";const n={};function c(e,l){return r(),s("ol",null,[t(e.$slots,"default")])}const f=o(n,[["render",c]]);export{f as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{k as o,o as r,e as s,p as t}from"./entry.af9b874e.js";const n={};function c(e,a){return r(),s("p",null,[t(e.$slots,"default")])}const f=o(n,[["render",c]]);export{f as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{k as o,o as r,e as t,p as n}from"./entry.af9b874e.js";const s={};function c(e,a){return r(),t("strong",null,[n(e.$slots,"default")])}const f=o(s,[["render",c]]);export{f as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{k as o,o as r,e as t,p as s}from"./entry.af9b874e.js";const a={};function n(e,c){return r(),t("table",null,[s(e.$slots,"default")])}const f=o(a,[["render",n]]);export{f as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{k as o,o as r,e as t,p as s}from"./entry.af9b874e.js";const n={};function c(e,a){return r(),t("tbody",null,[s(e.$slots,"default")])}const d=o(n,[["render",c]]);export{d as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{k as o,o as r,e as t,p as s}from"./entry.af9b874e.js";const n={};function c(e,a){return r(),t("td",null,[s(e.$slots,"default")])}const d=o(n,[["render",c]]);export{d as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{k as o,o as r,e as t,p as s}from"./entry.af9b874e.js";const n={};function c(e,a){return r(),t("th",null,[s(e.$slots,"default")])}const f=o(n,[["render",c]]);export{f as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{k as o,o as r,e as t,p as s}from"./entry.af9b874e.js";const a={};function n(e,c){return r(),t("thead",null,[s(e.$slots,"default")])}const d=o(a,[["render",n]]);export{d as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{k as r,o,e as t,p as s}from"./entry.af9b874e.js";const n={};function c(e,a){return o(),t("tr",null,[s(e.$slots,"default")])}const f=r(n,[["render",c]]);export{f as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{k as o,o as r,e as s,p as t}from"./entry.af9b874e.js";const n={};function c(e,l){return r(),s("ul",null,[t(e.$slots,"default")])}const f=o(n,[["render",c]]);export{f as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as h}from"./NIconButton.vue.3972e12f.js";import{a as N,ag as O,at as S,V,b0 as x,o as i,e as c,m as u,O as d,u as s,t as B,f as m,p as C,n as w,g as j,c as v,F as J,ao as P,af as $,b1 as z,x as M}from"./entry.af9b874e.js";const R=["open"],A={flex:"~ gap2","select-none":"","items-center":"",px4:""},E={key:1,"bg-active":"",p5:"",italic:""},F=u("span",{op50:""},"No data",-1),U=[F],T=N({__name:"StateEditor",props:{name:null,open:{type:Boolean},state:null,readonly:{type:Boolean}},emits:["update:open"],setup(t,{emit:b}){const r=t,n=O(r,"open",b,{passive:!0}),g=S(),l=V();l.value=JSON.parse(JSON.stringify(r.state));const p=x(l,e=>{y(e,r.state)},{deep:!0});function y(e,o){for(const a in e)e[a]===null?o[a]=null:Array.isArray(e[a])?o[a]=e[a].slice():typeof e[a]=="object"?y(e[a],o[a]):o[a]=e[a]}async function k(){p.pause(),l.value=JSON.parse(JSON.stringify(r.state)),await M(),p.resume()}return(e,o)=>{const a=h;return i(),c("div",{class:"state-editor-details",open:t.name?s(n):!0},[u("div",A,[t.name?(i(),c("button",{key:0,flex:"~","cursor-pointer":"","items-center":"",class:d(s(n)?"":"op50"),onClick:o[0]||(o[0]=f=>n.value=!s(n))},[u("div",{"i-carbon-chevron-right":"",transition:"",class:d(s(n)?"rotate-90 op0":"")},null,2),u("code",{px3:"",py1:"","font-mono":"",class:d(s(n)?"bg-[#8881] rounded-t":"rounded hover:bg-active")},B(t.name),3)],2)):m("",!0),C(e.$slots,"actions",w(j({isOpen:s(n),name:t.name,state:t.state}))),s(n)?(i(),v(a,{key:1,title:"Refresh View",icon:"carbon-renew",onClick:k})):m("",!0)]),s(n)||!t.name?(i(),c(J,{key:0},[t.state&&Object.keys(t.state).length>0?(i(),v(s(z),P({key:0,modelValue:s(l),"onUpdate:modelValue":o[1]||(o[1]=f=>$(l)?l.value=f:null)},e.$attrs,{class:["json-editor-vue",[s(g).value==="dark"?"jse-theme-dark":"",(t.name,"")]],"main-menu-bar":!1,"navigation-bar":!1,"status-bar":!1,"read-only":t.readonly,indentation:2,"tab-size":2}),null,16,["modelValue","class","read-only"])):(i(),c("div",E,U))],64)):m("",!0)],8,R)}}});export{T as _};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as c}from"./NPanelGrids.e798da22.js";import{a,a3 as i,a4 as p,o as r,c as _,w as l,m as e}from"./entry.af9b874e.js";const u=e("div",null," Inspecting Vue components ",-1),h=a({__name:"__inspecting",setup(m){const o=i();p("keydown",t=>{t.key==="Escape"&&n()});function n(){o.value?.inspector?.disable()}return(t,d)=>{const s=c;return r(),_(s,{"h-screen":"","w-screen":"",px5:""},{default:l(()=>[e("div",{absolute:"","right-0":"","top-0":"",p2:""},[e("button",{"carbon-close":"",ma:"","text-xl":"",op50:"","hover:op100":"",onClick:n})]),u]),_:1})}}});export{h as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var f=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function l(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function a(e){if(e.__esModule)return e;var r=e.default;if(typeof r=="function"){var o=function n(){if(this instanceof n){var t=[null];t.push.apply(t,arguments);var u=Function.bind.apply(r,t);return new u}return r.apply(this,arguments)};o.prototype=r.prototype}else o={};return Object.defineProperty(o,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var t=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(o,n,t.get?t:{enumerable:!0,get:function(){return e[n]}})}),o}export{l as a,f as c,a as g};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import{a as T,h as y,D as Y,a7 as ee,o as n,e as r,a8 as te,u as s,c as $,m as e,t as w,a9 as q,L as ne,aa as se,F as N,l as f,f as S,N as L,w as z,S as X,a6 as G,O as K,U as oe,V as j,a4 as V,r as O,ab as ae,ac as ie,q as Z,ad as le,ae as re,af as ce}from"./entry.af9b874e.js";import{F as ue,_ as de}from"./fuse.esm.6cb10448.js";import{_ as W}from"./NIconButton.vue.3972e12f.js";import{_ as pe}from"./NTextInput.vue.3ee9e6a6.js";import{_ as me}from"./NSectionBlock.3f4396b3.js";import{_ as fe}from"./FilepathItem.vue.c910f268.js";import{_ as he}from"./CodeSnippets.vue.632ecac5.js";import{u as _e,a as ve}from"./editor.ec5a160f.js";import{_ as ge}from"./DrawerRight.vue.87ef0065.js";import{D as xe}from"./constants.126da185.js";import"./NIconTitle.vue.c904da9d.js";import"./NCodeBlock.vue.0cfd6eb2.js";const be=T({__name:"AssetFontPreview",props:{asset:null},setup(o){const t=o,m=y(()=>`devtools-assets-${Y(t.asset)}`);return ee(y(()=>`
|
|
2
|
+
@font-face {
|
|
3
|
+
font-family: '${m.value}';
|
|
4
|
+
src: url('${t.asset.publicPath}');
|
|
5
|
+
}
|
|
6
|
+
`)),(c,g)=>(n(),r("div",{"of-hidden":"",style:te({fontFamily:`'${s(m)}'`})}," Aa Bb Cc Dd Ee Ff Gg Hh Ii Jj Kk Ll Mm Nn Oo Pp Qq Rr Ss Tt Uu Vv Ww Xx Yy Zz ",4))}}),we={flex:"","items-center":"","justify-center":"","of-hidden":"","bg-active":"","object-cover":"",p1:""},ye=["src"],$e={key:2,"i-carbon-document":"","text-3xl":"",op20:""},ke={key:3,"w-full":"","self-start":"",p4:""},Ce=["textContent"],Fe={key:4,"i-carbon-help":"","text-3xl":"",op20:""},H=T({__name:"AssetPreview",props:{asset:null,textContent:null},setup(o){return(t,m)=>{const c=be;return n(),r("div",we,[o.asset.type==="image"?(n(),r("img",{key:0,src:o.asset.publicPath},null,8,ye)):o.asset.type==="font"?(n(),$(c,{key:o.asset.publicPath,asset:o.asset,"self-stretch":"",p2:"","text-2xl":""},null,8,["asset"])):o.asset.type==="text"&&!o.textContent?(n(),r("div",$e)):o.asset.type==="text"&&o.textContent?(n(),r("div",ke,[e("pre",{"max-h-10rem":"","of-hidden":"","font-mono":"","text-xs":"",textContent:w(o.textContent)},null,8,Ce)])):(n(),r("div",Fe))])}}}),Pe={flex:"~ col gap-4","min-h-full":"","w-full":"","of-hidden":"",p4:""},Ae=e("div",{flex:"~ gap2","mb--2":"","items-center":"",op50:""},[e("div",{"x-divider":""}),e("div",{"flex-none":""}," Preview "),e("div",{"x-divider":""})],-1),De={flex:"~","items-center":"","justify-center":""},Ie=e("div",{flex:"~ gap2","mb--2":"","items-center":"",op50:""},[e("div",{"x-divider":""}),e("div",{"flex-none":""}," Details "),e("div",{"x-divider":""})],-1),Ne={"max-w-full":"","w-full":"","table-fixed":""},Se=e("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," Filepath ",-1),ze={flex:"~ gap-1","w-full":"","items-center":""},je=e("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," Public Path ",-1),Te={flex:"~ gap-1","w-full":"","items-center":"","of-hidden":""},Ee={"flex-auto":"","of-hidden":"",truncate:"","ws-pre":"","font-mono":""},Le=e("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," Type ",-1),Be={capitalize:""},Me=e("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," Image Size ",-1),Ue={key:0},Oe=e("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," Aspect Ratio ",-1),Re=e("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," File size ",-1),Ve=e("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," Last modified ",-1),Xe={op70:""},qe=e("div",{flex:"~ gap2","mb--2":"","items-center":"",op50:""},[e("div",{"x-divider":""}),e("div",{"flex-none":""}," Actions "),e("div",{"x-divider":""})],-1),Ge={flex:"~ gap2 wrap"},Ke=e("div",{"flex-auto":""},null,-1),Ze=T({__name:"AssetDetails",props:{asset:null},setup(o){const t=o,m=_e(),c=q(()=>{if(t.asset.type==="image")return X.getImageMeta(t.asset.filePath)}),g=q(()=>{if(t.asset.type==="text")return X.getTextAssetContent(t.asset.filePath)}),C=ne(),u=y(()=>(C.value?._installedModules||[]).some(p=>p.meta?.name==="@nuxt/image"||p.meta?.name==="@nuxt/image-edge")),F=y(()=>{const i=[];if(t.asset.type==="image"){const p=c.value?.width?`
|
|
7
|
+
width="${c.value.width}"
|
|
8
|
+
height="${c.value.height}" `:" ";return i.push({lang:"vue-html",code:`<img${p}
|
|
9
|
+
src="${t.asset.publicPath}"
|
|
10
|
+
/>`,name:"Plain Image"}),u.value&&i.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"}),i}return i.push({lang:"html",code:`<a download href="${t.asset.publicPath}">
|
|
15
|
+
Download ${t.asset.path.split("/").slice(-1)[0]}
|
|
16
|
+
</a>`,name:"Download link"}),i}),B=ve(),E=se(()=>t.asset.mtime),M=y(()=>{const i=t.asset.size;return i<1024?`${i} B`:i<1024*1024?`${(i/1024).toFixed(2)} KB`:`${(i/1024/1024).toFixed(2)} MB`}),x=y(()=>{if(!c.value?.width||!c.value?.height)return"";const i=(A,k)=>k?i(k,A%k):A,p=i(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(i,p)=>{const A=H,k=fe,D=W,I=G,a=he;return n(),r("div",Pe,[s(h)?(n(),r(N,{key:0},[Ae,e("div",De,[f(A,{"max-h-80":"","min-h-20":"","min-w-20":"","w-auto":"",rounded:"",border:"~ base",asset:o.asset,"text-content":s(g)},null,8,["asset","text-content"])])],64)):S("",!0),Ie,e("table",Ne,[e("tbody",null,[e("tr",null,[Se,e("td",null,[e("div",ze,[f(k,{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]=_=>s(m)(o.asset.filePath))})])])]),e("tr",null,[je,e("td",null,[e("div",Te,[e("div",Ee,w(o.asset.publicPath),1),f(D,{"flex-none":"",title:"Copy public path",icon:"carbon-copy",onClick:p[1]||(p[1]=_=>s(B)(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,[Le,e("td",Be,w(o.asset.type),1)]),s(c)?.width?(n(),r(N,{key:0},[e("tr",null,[Me,e("td",null,w(s(c).width)+" x "+w(s(c).height),1)]),s(x)?(n(),r("tr",Ue,[Oe,e("td",null,w(s(x)),1)])):S("",!0)],64)):S("",!0),e("tr",null,[Re,e("td",null,w(s(M)),1)]),e("tr",null,[Ve,e("td",null,[L(w(new Date(o.asset.mtime).toLocaleString())+" ",1),e("span",Xe,"("+w(s(E))+")",1)])])])]),qe,e("div",Ge,[f(I,{to:o.asset.publicPath,download:"",target:"_blank",icon:"carbon-download"},{default:z(()=>[L(" Download ")]),_:1},8,["to"]),o.asset.type==="image"?(n(),$(I,{key:0,disabled:"",icon:"carbon-image-service"},{default:z(()=>[L(" Optimize image (Coming soon) ")]),_:1})):S("",!0)]),Ke,s(F).length?(n(),$(a,{key:1,border:"t base","mx--4":"","mb--4":"","code-snippets":s(F)},null,8,["code-snippets"])):S("",!0)])}}}),We={flex:"~ col gap-1",hover:"bg-active","items-center":"","of-hidden":"",rounded:"",p2:""},He={"w-full":"","of-hidden":"",truncate:"","ws-nowrap":"","text-center":"","text-xs":""},Je=T({__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 C=H;return n(),r("button",We,[f(C,{"h-30":"","w-30":"",rounded:"",border:"~ base",asset:o.asset},null,8,["asset"]),e("div",He,w(s(m)),1)])}}}),Qe={flex:"~ gap-1","w-full":"","items-center":"",hover:"bg-active",rounded:"",px4:"",py2:""},Ye={"of-hidden":"",truncate:"","ws-nowrap":"","text-center":""},et=T({__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)=>(n(),r("button",Qe,[e("div",{class:K(s(m))},null,2),e("div",Ye,w(o.asset.path),1)]))}}),tt={key:0,"h-full":"","w-full":"",flex:"","items-center":"","justify-center":""},nt={for:"drop-zone-input","text-3xl":""},st={key:1,relative:"","h-full":"","w-full":"",grid:"~ rows-[max-content_1fr_max-content]"},ot=e("div",{px6:"",py6:""},[e("h1",{"text-2xl":""}," Upload "),e("p",{"text-sm":"",op50:""}," Drag and drop files to upload ")],-1),at={grid:"~ cols-minmax-8rem","overflow-auto":"",p6:""},it={flex:"","items-center":"","justify-center":"","of-hidden":"",rounded:"","rounded-t-lg":"","bg-active":"","object-cover":"",class:"aspect-1/1",border:"~ base"},lt=["src"],rt={flex:"~ gap1","items-center":""},ct={flex:"~ gap-2","items-center":"","justify-center":"",p8:""},ut=T({__name:"DropZone",props:{folder:{type:String,required:!0}},emits:["uploaded"],setup(o,{emit:t}){const m=o,c=oe(),g=j(!1),C=j(),u=j([]),F=["image","video"];function B(a){C.value=a.target,g.value=!0}function E(a){a.target===C.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 l=[],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}`,J=new Blob([d],{type:d.type}),Q=new File([J],U,{lastModified:Date.now()});l.push(Q),v.push(U)}else d.type===""?c("Folders are not supported yet","carbon:face-dissatisfied"):F.some(b=>d.type.includes(b))?l.push(d):c(`"${d.type}" file type is not allowed`,"carbon:face-dizzy");u.value=[...u.value,...l]}}async function i(){if(ae.value||ie.value)return;const a=[];for(const _ of u.value){const l=new FileReader;l.readAsDataURL(_);const d=(await new Promise(b=>{l.onload=()=>b(l.result)})).split(";base64,").pop();a.push({name:_.name,data:d})}await X.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 k(a,_){const[l,v]=a.name.split("."),d=_.replace(/\.\w+$/,""),b=`${d}.${v}`;return d.length===0?(alert("File name must be at least 1 characters long"),l):(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",B),V("dragleave",E),V("dragover",M),V("drop",x),(a,_)=>{const l=W,v=Z,d=pe,b=G;return n(),r("div",{fixed:"","bottom-0":"","left-13":"","right-0":"","top-0":"","z-10":"","backdrop-blur-20":"","transition-all":"",class:K(s(g)?"opacity-100 visible":"opacity-0 invisible")},[f(l,{icon:"carbon-close",absolute:"","right-5":"","top-5":"","z-20":"","text-xl":"",onClick:I}),s(u)?.length?(n(),r("div",st,[ot,e("div",at,[(n(!0),r(N,null,O(s(u),(P,R)=>(n(),r("div",{key:P.name,flex:"~ col gap-2",relative:"","h-50":"","w-40":"","items-center":""},[e("div",it,[e("img",{"h-full":"","w-full":"","rounded-t-lg":"","object-cover":"",src:A(P)},null,8,lt)]),e("div",rt,[f(d,{n:"xs","flex-auto":"","model-value":P.name,"onUpdate:modelValue":U=>k(P,U.target.value)},null,8,["model-value","onUpdate:modelValue"]),f(l,{icon:"carbon-delete","flex-none":"",title:"Remove file",onClick:U=>p(R)},null,8,["onClick"])])]))),128))]),e("div",ct,[s(u).length?(n(),$(b,{key:0,n:"red",onClick:D},{default:z(()=>[f(v,{icon:"carbon-clean"}),L(" Clear ")]),_:1})):S("",!0),f(b,{disabled:!s(u).length,n:"primary solid",onClick:i},{default:z(()=>[f(v,{icon:"carbon-cloud-upload"}),L(" Upload ")]),_:1},8,["disabled"])])])):(n(),r("div",tt,[e("label",nt,[f(v,{icon:"carbon-cloud-upload","mr-2":""}),L(" 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)}}}),dt={"h-full":"","of-auto":""},pt={"flex-none":"",flex:"~ gap4"},mt={op50:""},ft={key:0},ht={"mt--4":"",px2:"",grid:"~ cols-minmax-8rem"},_t={key:1,p2:"",grid:"~ cols-minmax-8rem"},vt={key:1},It=T({__name:"assets",setup(o){const t=le(),m=j(""),c=y(()=>new ue(t.value||[],{keys:["path"]})),g=y(()=>m.value?c.value.search(m.value).map(h=>h.item):t.value||[]),C=y(()=>{const x={};for(const h of g.value){const i=`${h.path.split("/").slice(0,-1).join("/")}/`;x[i]||(x[i]=[]),x[i].push(h)}return Object.entries(x).sort(([h],[i])=>h.localeCompare(i))}),u=j(),F=j("grid");function B(){F.value=F.value==="list"?"grid":"list"}re("Escape",()=>{u.value=void 0});const E=j();function M(){}return(x,h)=>{const i=Z,p=de,A=ut,k=Je,D=me,I=et,a=Ze,_=ge;return n(),r("div",dt,[f(p,{ref_key:"navbar",ref:E,search:s(m),"onUpdate:search":h[0]||(h[0]=l=>ce(m)?m.value=l:null),pb2:""},{actions:z(()=>[e("div",pt,[e("button",{title:"Toggle view",onClick:B},[s(F)==="grid"?(n(),$(i,{key:0,icon:"i-carbon-list"})):(n(),$(i,{key:1,icon:"i-carbon-grid"}))])])]),default:z(()=>[e("div",mt,[s(m)?(n(),r("span",ft,w(s(g).length)+" matched · ",1)):S("",!0),e("span",null,w(s(t)?.length)+" assets in total",1)])]),_:1},8,["search"]),f(A,{folder:"/",onUploaded:M}),s(F)==="grid"?(n(),r(N,{key:0},[s(C).length>1?(n(!0),r(N,{key:0},O(s(C),([l,v])=>(n(),$(D,{key:l,text:l,description:`${v.length} items`,open:v.length<=("DETAILS_MAX_ITEMS"in x?x.DETAILS_MAX_ITEMS:s(xe)),padding:!1},{default:z(()=>[e("div",ht,[(n(!0),r(N,null,O(v,d=>(n(),$(k,{key:d.path,asset:d,folder:l,onClick:b=>u.value=d},null,8,["asset","folder","onClick"]))),128))])]),_:2},1032,["text","description","open"]))),128)):(n(),r("div",_t,[(n(!0),r(N,null,O(s(g),l=>(n(),$(k,{key:l.path,asset:l,onClick:v=>u.value=l},null,8,["asset","onClick"]))),128))]))],64)):(n(),r("div",vt,[(n(!0),r(N,null,O(s(g),l=>(n(),$(I,{key:l.path,asset:l,onClick:v=>u.value=l},null,8,["asset","onClick"]))),128))])),f(_,{"model-value":!!s(u),"auto-close":"","w-120":"",navbar:s(E),onClose:h[1]||(h[1]=l=>u.value=void 0)},{default:z(()=>[s(u)?(n(),$(a,{key:0,asset:s(u)},null,8,["asset"])):S("",!0)]),_:1},8,["model-value","navbar"])])}}});export{It as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{W as j,z as _,aO as N,K as W}from"./entry.af9b874e.js";import{g as T,a as $,b as I,s as B,c as C,w as J,d as b,f as H}from"./query.1a3ba2be.js";import{p as q}from"./index.a6ef77ff.js";import{c as G}from"./_commonjsHelpers.87174ba5.js";import{u as L}from"./preview.f5b42a41.js";import"./utils.f4f8ef5c.js";const Z=()=>{const r=new Map;return{name:"memory",options:{},hasItem(t){return r.has(t)},getItem(t){return r.get(t)||null},getItemRaw(t){return r.get(t)||null},setItem(t,n){r.set(t,n)},setItemRaw(t,n){r.set(t,n)},removeItem(t){r.delete(t)},getKeys(){return Array.from(r.keys())},clear(){r.clear()},dispose(){r.clear()}}};function F(r){return!r||typeof r.then!="function"?Promise.resolve(r):r}function g(r,...t){try{return F(r(...t))}catch(n){return Promise.reject(n)}}function Q(r){const t=typeof r;return r===null||t!=="object"&&t!=="function"}function V(r){const t=Object.getPrototypeOf(r);return!t||t.isPrototypeOf(Object)}function M(r){if(Q(r))return String(r);if(V(r)||Array.isArray(r))return JSON.stringify(r);if(typeof r.toJSON=="function")return M(r.toJSON());throw new Error("[unstorage] Cannot stringify value!")}function D(){if(typeof Buffer===void 0)throw new TypeError("[unstorage] Buffer is not supported!")}const K="base64:";function X(r){if(typeof r=="string")return r;D();const t=Buffer.from(r).toString("base64");return K+t}function k(r){return typeof r!="string"||!r.startsWith(K)?r:(D(),Buffer.from(r.slice(K.length),"base64"))}const ee=["hasItem","getItem","setItem","removeItem","getMeta","setMeta","removeMeta","getKeys","clear","mount","unmount"];function te(r,t){if(t=v(t),!t)return r;const n={...r};for(const i of ee)n[i]=(s="",...c)=>r[i](t+s,...c);return n.getKeys=(i="",...s)=>r.getKeys(t+i,...s).then(c=>c.map(u=>u.slice(t.length))),n}function p(r){return r?r.split("?")[0].replace(/[/\\]/g,":").replace(/:+/g,":").replace(/^:|:$/g,""):""}function v(r){return r=p(r),r?r+":":""}const re=()=>{const r=new Map;return{name:"memory",options:{},hasItem(t){return r.has(t)},getItem(t){return r.get(t)||null},getItemRaw(t){return r.get(t)||null},setItem(t,n){r.set(t,n)},setItemRaw(t,n){r.set(t,n)},removeItem(t){r.delete(t)},getKeys(){return Array.from(r.keys())},clear(){r.clear()},dispose(){r.clear()}}};function ne(r={}){const t={mounts:{"":r.driver||re()},mountpoints:[""],watching:!1,watchListeners:[],unwatch:{}},n=e=>{for(const a of t.mountpoints)if(e.startsWith(a))return{base:a,relativeKey:e.slice(a.length),driver:t.mounts[a]};return{base:"",relativeKey:e,driver:t.mounts[""]}},i=(e,a)=>t.mountpoints.filter(o=>o.startsWith(e)||a&&e.startsWith(o)).map(o=>({relativeBase:e.length>o.length?e.slice(o.length):void 0,mountpoint:o,driver:t.mounts[o]})),s=(e,a)=>{if(t.watching){a=p(a);for(const o of t.watchListeners)o(e,a)}},c=async()=>{if(!t.watching){t.watching=!0;for(const e in t.mounts)t.unwatch[e]=await P(t.mounts[e],s,e)}},u=async()=>{if(t.watching){for(const e in t.unwatch)await t.unwatch[e]();t.unwatch={},t.watching=!1}},h={hasItem(e,a={}){e=p(e);const{relativeKey:o,driver:f}=n(e);return g(f.hasItem,o,a)},getItem(e,a={}){e=p(e);const{relativeKey:o,driver:f}=n(e);return g(f.getItem,o,a).then(m=>j(m))},getItemRaw(e,a={}){e=p(e);const{relativeKey:o,driver:f}=n(e);return f.getItemRaw?g(f.getItemRaw,o,a):g(f.getItem,o,a).then(m=>k(m))},async setItem(e,a,o={}){if(a===void 0)return h.removeItem(e);e=p(e);const{relativeKey:f,driver:m}=n(e);m.setItem&&(await g(m.setItem,f,M(a),o),m.watch||s("update",e))},async setItemRaw(e,a,o={}){if(a===void 0)return h.removeItem(e,o);e=p(e);const{relativeKey:f,driver:m}=n(e);if(m.setItemRaw)await g(m.setItemRaw,f,a,o);else if(m.setItem)await g(m.setItem,f,X(a),o);else return;m.watch||s("update",e)},async removeItem(e,a={}){typeof a=="boolean"&&(a={removeMata:a}),e=p(e);const{relativeKey:o,driver:f}=n(e);f.removeItem&&(await g(f.removeItem,o,a),a.removeMata&&await g(f.removeItem,o+"$",a),f.watch||s("remove",e))},async getMeta(e,a={}){typeof a=="boolean"&&(a={nativeOnly:a}),e=p(e);const{relativeKey:o,driver:f}=n(e),m=Object.create(null);if(f.getMeta&&Object.assign(m,await g(f.getMeta,o,a)),!a.nativeOnly){const l=await g(f.getItem,o+"$",a).then(y=>j(y));l&&typeof l=="object"&&(typeof l.atime=="string"&&(l.atime=new Date(l.atime)),typeof l.mtime=="string"&&(l.mtime=new Date(l.mtime)),Object.assign(m,l))}return m},setMeta(e,a,o={}){return this.setItem(e+"$",a,o)},removeMeta(e,a={}){return this.removeItem(e+"$",a)},async getKeys(e,a={}){e=v(e);const o=i(e,!0);let f=[];const m=[];for(const l of o){const E=(await g(l.driver.getKeys,l.relativeBase,a)).map(d=>l.mountpoint+p(d)).filter(d=>!f.some(w=>d.startsWith(w)));m.push(...E),f=[l.mountpoint,...f.filter(d=>!d.startsWith(l.mountpoint))]}return e?m.filter(l=>l.startsWith(e)&&!l.endsWith("$")):m.filter(l=>!l.endsWith("$"))},async clear(e,a={}){e=v(e),await Promise.all(i(e,!1).map(async o=>{if(o.driver.clear)return g(o.driver.clear,o.relativeBase,a);if(o.driver.removeItem){const f=await o.driver.getKeys(o.relativeBase,a);return Promise.all(f.map(m=>o.driver.removeItem(m)))}}))},async dispose(){await Promise.all(Object.values(t.mounts).map(e=>x(e)))},async watch(e){return await c(),t.watchListeners.push(e),async()=>{t.watchListeners=t.watchListeners.filter(a=>a!==e),t.watchListeners.length===0&&await u()}},async unwatch(){t.watchListeners=[],await u()},mount(e,a){if(e=v(e),e&&t.mounts[e])throw new Error(`already mounted at ${e}`);return e&&(t.mountpoints.push(e),t.mountpoints.sort((o,f)=>f.length-o.length)),t.mounts[e]=a,t.watching&&Promise.resolve(P(a,s,e)).then(o=>{t.unwatch[e]=o}).catch(console.error),h},async unmount(e,a=!0){e=v(e),!(!e||!t.mounts[e])&&(t.watching&&e in t.unwatch&&(t.unwatch[e](),delete t.unwatch[e]),a&&await x(t.mounts[e]),t.mountpoints=t.mountpoints.filter(o=>o!==e),delete t.mounts[e])},getMount(e=""){e=p(e)+":";const a=n(e);return{driver:a.driver,base:a.base}},getMounts(e="",a={}){return e=p(e),i(e,a.parents).map(f=>({driver:f.driver,base:f.mountpoint}))}};return h}function P(r,t,n){return r.watch?r.watch((i,s)=>t(i,n+s)):()=>{}}async function x(r){typeof r.dispose=="function"&&await g(r.dispose)}function ie(r={}){const t=ae(n,r.operators);function n(i,s){return typeof s!="object"||s instanceof RegExp?t.$eq(i,s):Object.keys(s||{}).every(c=>{const u=s[c];if(c.startsWith("$")&&t[c]){const h=t[c];return typeof h=="function"?h(i,u):!1}return n(T(i,c),u)})}return n}function ae(r,t={}){return{$match:(n,i)=>r(n,i),$eq:(n,i)=>i instanceof RegExp?i.test(n):n===i,$ne:(n,i)=>i instanceof RegExp?!i.test(n):n!==i,$not:(n,i)=>!r(n,i),$and:(n,i)=>($(i,"$and requires an array as condition"),i.every(s=>r(n,s))),$or:(n,i)=>($(i,"$or requires an array as condition"),i.some(s=>r(n,s))),$in:(n,i)=>I(i).some(s=>Array.isArray(n)?r(n,{$contains:s}):r(n,s)),$contains:(n,i)=>(n=Array.isArray(n)?n:String(n),I(i).every(s=>n.includes(s))),$icontains:(n,i)=>{if(typeof i!="string")throw new TypeError("$icontains requires a string, use $contains instead");return n=String(n).toLocaleLowerCase(),I(i).every(s=>n.includes(s.toLocaleLowerCase()))},$containsAny:(n,i)=>($(i,"$containsAny requires an array as condition"),n=Array.isArray(n)?n:String(n),i.some(s=>n.includes(s))),$exists:(n,i)=>i?typeof n<"u":typeof n>"u",$type:(n,i)=>typeof n===String(i),$regex:(n,i)=>{if(!(i instanceof RegExp)){const s=String(i).match(/\/(.*)\/([dgimsuy]*)$/);i=s?new RegExp(s[1],s[2]||""):new RegExp(i)}return i.test(String(n||""))},$lt:(n,i)=>n<i,$lte:(n,i)=>n<=i,$gt:(n,i)=>n>i,$gte:(n,i)=>n>=i,...t||{}}}function R(r){const t=ie(),n=(s,{query:c,before:u,after:h})=>{const e=typeof c=="string"?{_path:c}:c,a=s.findIndex(f=>t(f,e));u=u??1,h=h??1;const o=new Array(u+h).fill(null,0);return a===-1?o:o.map((f,m)=>s[a-u+m+ +(m>=u)]||null)},i=[(s,c)=>s.filter(u=>I(c.where).every(h=>t(u,h))),(s,c)=>I(c.sort).forEach(u=>B(s,u)),(s,c)=>c.surround?n(s,c.surround):s,(s,c)=>c.skip?s.slice(c.skip):s,(s,c)=>c.limit?s.slice(0,c.limit):s,(s,c)=>C(J(c.without))(s),(s,c)=>C(b(c.only))(s)];return async s=>{const c=await r(),u=s.params(),h=i.reduce((e,a)=>a(e,u)||e,c);return u.first?h[0]:h}}var z={},se={get exports(){return z},set exports(r){z=r}};(function(r,t){(function(n,i,s){r.exports=s(),r.exports.default=s()})("slugify",G,function(){var n=JSON.parse(`{"$":"dollar","%":"percent","&":"and","<":"less",">":"greater","|":"or","¢":"cent","£":"pound","¤":"currency","¥":"yen","©":"(c)","ª":"a","®":"(r)","º":"o","À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","Æ":"AE","Ç":"C","È":"E","É":"E","Ê":"E","Ë":"E","Ì":"I","Í":"I","Î":"I","Ï":"I","Ð":"D","Ñ":"N","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","Ù":"U","Ú":"U","Û":"U","Ü":"U","Ý":"Y","Þ":"TH","ß":"ss","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","æ":"ae","ç":"c","è":"e","é":"e","ê":"e","ë":"e","ì":"i","í":"i","î":"i","ï":"i","ð":"d","ñ":"n","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","ù":"u","ú":"u","û":"u","ü":"u","ý":"y","þ":"th","ÿ":"y","Ā":"A","ā":"a","Ă":"A","ă":"a","Ą":"A","ą":"a","Ć":"C","ć":"c","Č":"C","č":"c","Ď":"D","ď":"d","Đ":"DJ","đ":"dj","Ē":"E","ē":"e","Ė":"E","ė":"e","Ę":"e","ę":"e","Ě":"E","ě":"e","Ğ":"G","ğ":"g","Ģ":"G","ģ":"g","Ĩ":"I","ĩ":"i","Ī":"i","ī":"i","Į":"I","į":"i","İ":"I","ı":"i","Ķ":"k","ķ":"k","Ļ":"L","ļ":"l","Ľ":"L","ľ":"l","Ł":"L","ł":"l","Ń":"N","ń":"n","Ņ":"N","ņ":"n","Ň":"N","ň":"n","Ō":"O","ō":"o","Ő":"O","ő":"o","Œ":"OE","œ":"oe","Ŕ":"R","ŕ":"r","Ř":"R","ř":"r","Ś":"S","ś":"s","Ş":"S","ş":"s","Š":"S","š":"s","Ţ":"T","ţ":"t","Ť":"T","ť":"t","Ũ":"U","ũ":"u","Ū":"u","ū":"u","Ů":"U","ů":"u","Ű":"U","ű":"u","Ų":"U","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","ź":"z","Ż":"Z","ż":"z","Ž":"Z","ž":"z","Ə":"E","ƒ":"f","Ơ":"O","ơ":"o","Ư":"U","ư":"u","Lj":"LJ","lj":"lj","Nj":"NJ","nj":"nj","Ș":"S","ș":"s","Ț":"T","ț":"t","ə":"e","˚":"o","Ά":"A","Έ":"E","Ή":"H","Ί":"I","Ό":"O","Ύ":"Y","Ώ":"W","ΐ":"i","Α":"A","Β":"B","Γ":"G","Δ":"D","Ε":"E","Ζ":"Z","Η":"H","Θ":"8","Ι":"I","Κ":"K","Λ":"L","Μ":"M","Ν":"N","Ξ":"3","Ο":"O","Π":"P","Ρ":"R","Σ":"S","Τ":"T","Υ":"Y","Φ":"F","Χ":"X","Ψ":"PS","Ω":"W","Ϊ":"I","Ϋ":"Y","ά":"a","έ":"e","ή":"h","ί":"i","ΰ":"y","α":"a","β":"b","γ":"g","δ":"d","ε":"e","ζ":"z","η":"h","θ":"8","ι":"i","κ":"k","λ":"l","μ":"m","ν":"n","ξ":"3","ο":"o","π":"p","ρ":"r","ς":"s","σ":"s","τ":"t","υ":"y","φ":"f","χ":"x","ψ":"ps","ω":"w","ϊ":"i","ϋ":"y","ό":"o","ύ":"y","ώ":"w","Ё":"Yo","Ђ":"DJ","Є":"Ye","І":"I","Ї":"Yi","Ј":"J","Љ":"LJ","Њ":"NJ","Ћ":"C","Џ":"DZ","А":"A","Б":"B","В":"V","Г":"G","Д":"D","Е":"E","Ж":"Zh","З":"Z","И":"I","Й":"J","К":"K","Л":"L","М":"M","Н":"N","О":"O","П":"P","Р":"R","С":"S","Т":"T","У":"U","Ф":"F","Х":"H","Ц":"C","Ч":"Ch","Ш":"Sh","Щ":"Sh","Ъ":"U","Ы":"Y","Ь":"","Э":"E","Ю":"Yu","Я":"Ya","а":"a","б":"b","в":"v","г":"g","д":"d","е":"e","ж":"zh","з":"z","и":"i","й":"j","к":"k","л":"l","м":"m","н":"n","о":"o","п":"p","р":"r","с":"s","т":"t","у":"u","ф":"f","х":"h","ц":"c","ч":"ch","ш":"sh","щ":"sh","ъ":"u","ы":"y","ь":"","э":"e","ю":"yu","я":"ya","ё":"yo","ђ":"dj","є":"ye","і":"i","ї":"yi","ј":"j","љ":"lj","њ":"nj","ћ":"c","ѝ":"u","џ":"dz","Ґ":"G","ґ":"g","Ғ":"GH","ғ":"gh","Қ":"KH","қ":"kh","Ң":"NG","ң":"ng","Ү":"UE","ү":"ue","Ұ":"U","ұ":"u","Һ":"H","һ":"h","Ә":"AE","ә":"ae","Ө":"OE","ө":"oe","Ա":"A","Բ":"B","Գ":"G","Դ":"D","Ե":"E","Զ":"Z","Է":"E'","Ը":"Y'","Թ":"T'","Ժ":"JH","Ի":"I","Լ":"L","Խ":"X","Ծ":"C'","Կ":"K","Հ":"H","Ձ":"D'","Ղ":"GH","Ճ":"TW","Մ":"M","Յ":"Y","Ն":"N","Շ":"SH","Չ":"CH","Պ":"P","Ջ":"J","Ռ":"R'","Ս":"S","Վ":"V","Տ":"T","Ր":"R","Ց":"C","Փ":"P'","Ք":"Q'","Օ":"O''","Ֆ":"F","և":"EV","ء":"a","آ":"aa","أ":"a","ؤ":"u","إ":"i","ئ":"e","ا":"a","ب":"b","ة":"h","ت":"t","ث":"th","ج":"j","ح":"h","خ":"kh","د":"d","ذ":"th","ر":"r","ز":"z","س":"s","ش":"sh","ص":"s","ض":"dh","ط":"t","ظ":"z","ع":"a","غ":"gh","ف":"f","ق":"q","ك":"k","ل":"l","م":"m","ن":"n","ه":"h","و":"w","ى":"a","ي":"y","ً":"an","ٌ":"on","ٍ":"en","َ":"a","ُ":"u","ِ":"e","ْ":"","٠":"0","١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","پ":"p","چ":"ch","ژ":"zh","ک":"k","گ":"g","ی":"y","۰":"0","۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9","฿":"baht","ა":"a","ბ":"b","გ":"g","დ":"d","ე":"e","ვ":"v","ზ":"z","თ":"t","ი":"i","კ":"k","ლ":"l","მ":"m","ნ":"n","ო":"o","პ":"p","ჟ":"zh","რ":"r","ს":"s","ტ":"t","უ":"u","ფ":"f","ქ":"k","ღ":"gh","ყ":"q","შ":"sh","ჩ":"ch","ც":"ts","ძ":"dz","წ":"ts","ჭ":"ch","ხ":"kh","ჯ":"j","ჰ":"h","Ṣ":"S","ṣ":"s","Ẁ":"W","ẁ":"w","Ẃ":"W","ẃ":"w","Ẅ":"W","ẅ":"w","ẞ":"SS","Ạ":"A","ạ":"a","Ả":"A","ả":"a","Ấ":"A","ấ":"a","Ầ":"A","ầ":"a","Ẩ":"A","ẩ":"a","Ẫ":"A","ẫ":"a","Ậ":"A","ậ":"a","Ắ":"A","ắ":"a","Ằ":"A","ằ":"a","Ẳ":"A","ẳ":"a","Ẵ":"A","ẵ":"a","Ặ":"A","ặ":"a","Ẹ":"E","ẹ":"e","Ẻ":"E","ẻ":"e","Ẽ":"E","ẽ":"e","Ế":"E","ế":"e","Ề":"E","ề":"e","Ể":"E","ể":"e","Ễ":"E","ễ":"e","Ệ":"E","ệ":"e","Ỉ":"I","ỉ":"i","Ị":"I","ị":"i","Ọ":"O","ọ":"o","Ỏ":"O","ỏ":"o","Ố":"O","ố":"o","Ồ":"O","ồ":"o","Ổ":"O","ổ":"o","Ỗ":"O","ỗ":"o","Ộ":"O","ộ":"o","Ớ":"O","ớ":"o","Ờ":"O","ờ":"o","Ở":"O","ở":"o","Ỡ":"O","ỡ":"o","Ợ":"O","ợ":"o","Ụ":"U","ụ":"u","Ủ":"U","ủ":"u","Ứ":"U","ứ":"u","Ừ":"U","ừ":"u","Ử":"U","ử":"u","Ữ":"U","ữ":"u","Ự":"U","ự":"u","Ỳ":"Y","ỳ":"y","Ỵ":"Y","ỵ":"y","Ỷ":"Y","ỷ":"y","Ỹ":"Y","ỹ":"y","–":"-","‘":"'","’":"'","“":"\\"","”":"\\"","„":"\\"","†":"+","•":"*","…":"...","₠":"ecu","₢":"cruzeiro","₣":"french franc","₤":"lira","₥":"mill","₦":"naira","₧":"peseta","₨":"rupee","₩":"won","₪":"new shequel","₫":"dong","€":"euro","₭":"kip","₮":"tugrik","₯":"drachma","₰":"penny","₱":"peso","₲":"guarani","₳":"austral","₴":"hryvnia","₵":"cedi","₸":"kazakhstani tenge","₹":"indian rupee","₺":"turkish lira","₽":"russian ruble","₿":"bitcoin","℠":"sm","™":"tm","∂":"d","∆":"delta","∑":"sum","∞":"infinity","♥":"love","元":"yuan","円":"yen","﷼":"rial","ﻵ":"laa","ﻷ":"laa","ﻹ":"lai","ﻻ":"la"}`),i=JSON.parse('{"bg":{"Й":"Y","Ц":"Ts","Щ":"Sht","Ъ":"A","Ь":"Y","й":"y","ц":"ts","щ":"sht","ъ":"a","ь":"y"},"de":{"Ä":"AE","ä":"ae","Ö":"OE","ö":"oe","Ü":"UE","ü":"ue","ß":"ss","%":"prozent","&":"und","|":"oder","∑":"summe","∞":"unendlich","♥":"liebe"},"es":{"%":"por ciento","&":"y","<":"menor que",">":"mayor que","|":"o","¢":"centavos","£":"libras","¤":"moneda","₣":"francos","∑":"suma","∞":"infinito","♥":"amor"},"fr":{"%":"pourcent","&":"et","<":"plus petit",">":"plus grand","|":"ou","¢":"centime","£":"livre","¤":"devise","₣":"franc","∑":"somme","∞":"infini","♥":"amour"},"pt":{"%":"porcento","&":"e","<":"menor",">":"maior","|":"ou","¢":"centavo","∑":"soma","£":"libra","∞":"infinito","♥":"amor"},"uk":{"И":"Y","и":"y","Й":"Y","й":"y","Ц":"Ts","ц":"ts","Х":"Kh","х":"kh","Щ":"Shch","щ":"shch","Г":"H","г":"h"},"vi":{"Đ":"D","đ":"d"},"da":{"Ø":"OE","ø":"oe","Å":"AA","å":"aa","%":"procent","&":"og","|":"eller","$":"dollar","<":"mindre end",">":"større end"},"nb":{"&":"og","Å":"AA","Æ":"AE","Ø":"OE","å":"aa","æ":"ae","ø":"oe"},"it":{"&":"e"},"nl":{"&":"en"},"sv":{"&":"och","Å":"AA","Ä":"AE","Ö":"OE","å":"aa","ä":"ae","ö":"oe"}}');function s(c,u){if(typeof c!="string")throw new Error("slugify: string argument expected");u=typeof u=="string"?{replacement:u}:u||{};var h=i[u.locale]||{},e=u.replacement===void 0?"-":u.replacement,a=u.trim===void 0?!0:u.trim,o=c.normalize().split("").reduce(function(f,m){var l=h[m];return l===void 0&&(l=n[m]),l===void 0&&(l=m),l===e&&(l=" "),f+l.replace(u.remove||/[^\w\s$*_+~.()'"!\-:@]+/g,"")},"");return u.strict&&(o=o.replace(/[^A-Za-z0-9\s]/g,"")),a&&(o=o.trim()),o=o.replace(/\s+/g,e),u.lower&&(o=o.toLowerCase()),o}return s.extend=function(c){Object.assign(n,c)},s})})(se);const oe=r=>r.split(/[\s-]/g).map(q).join(" ");function ce(r,t){const{navigation:n}=_().public.content,i=c=>({...fe(["title",...n.fields])(c),...le(c?.navigation)?c.navigation:{}}),s=r.sort((c,u)=>c._path.localeCompare(u._path)).reduce((c,u)=>{const h=u._path.substring(1).split("/"),e=u._id.split(":").slice(1),a=!!e[e.length-1].match(/([1-9][0-9]*\.)?index.md/g),o=l=>({title:l.title,_path:l._path,_file:l._file,children:[],...i(l),...l._draft?{_draft:!0}:{}}),f=o(u);if(a){const l=t[f._path];if(typeof l?.navigation<"u"&&!l?.navigation)return c;if(u._path!=="/"){const y=o(u);f.children.push(y)}Object.assign(f,i(l))}return h.length===1?(c.push(f),c):(h.slice(0,-1).reduce((l,y,E)=>{const d="/"+h.slice(0,E+1).join("/"),w=t[d];if(typeof w?.navigation<"u"&&!w.navigation)return[];let A=l.find(Y=>Y._path===d);return A||(A={title:oe(y),_path:d,_file:u._file,children:[],...i(w)},l.push(A)),A.children},c).push(f),c)},[]);return U(s)}const ue=new Intl.Collator(void 0,{numeric:!0,sensitivity:"base"});function U(r){const t=r.sort((n,i)=>ue.compare(n._file,i._file));for(const n of t)n.children?.length?U(n.children):delete n.children,delete n._file;return r}function fe(r){return t=>(t=t||{},r&&r.length?r.filter(n=>typeof t[n]<"u").reduce((n,i)=>Object.assign(n,{[i]:t[i]}),{}):t)}function le(r){return Object.prototype.toString.call(r)==="[object Object]"}const me=r=>W(r,_().public.content.api.baseURL),he=te(ne({driver:Z()}),"@content");function ge(r){async function t(){const n=new Set(await r.getKeys("cache:")),i=L().getPreviewToken();if(i){const c=await r.getItem(`${i}$`).then(e=>e||{});if(Array.isArray(c.ignoreSources)){const e=c.ignoreSources.map(a=>`cache:${a.trim()}:`);for(const a of n)e.some(o=>a.startsWith(o))&&n.delete(a)}const u=await r.getKeys(`${i}:`),h=await Promise.all(u.map(e=>r.getItem(e)));for(const e of h)n.delete(`cache:${e._id}`),e.__deleted||n.add(`${i}:${e._id}`)}return await Promise.all(Array.from(n).map(c=>r.getItem(c)))}return{storage:r,fetch:R(t),query:n=>H(R(t),n)}}let S=null,O=null;async function pe(){return O?await O:S||(O=de(),S=await O),S}async function de(){const r=N(),{content:t}=_().public,n=ge(he),i=await n.storage.getItem("integrity");if(t.integrity!==+(i||0)){const{contents:s,navigation:c}=await $fetch(me(t.integrity?`cache.${t.integrity}.json`:"cache.json"));await Promise.all(s.map(u=>n.storage.setItem(`cache:${u._id}`,u))),await n.storage.setItem("navigation",c),await n.storage.setItem("integrity",t.integrity)}return await r.callHook("content:storage",n.storage),n}async function Ee(r){const t=await pe();if(!L().getPreviewToken()&&Object.keys(r||{}).length===0)return t.storage.getItem("navigation");const n=await t.query(r).where({_partial:!1,navigation:{$ne:!1}}).find(),s=(await t.query().where({_path:/\/_dir$/i,_partial:!0}).find()).reduce((c,u)=>{u.title?.toLowerCase()==="dir"&&(u.title=void 0);const h=u._path.split("/").slice(0,-1).join("/")||"/";return c[h]={...u,...u.body},c},{});return ce(n,s)}export{he as contentStorage,ge as createDB,Ee as generateNavigation,pe as useContentDatabase};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as P,h as I,o as n,e as v,N as z,t as Q,u as e,m as u,l as m,c as h,f as C,p as F,Y as Z,w as g,V as E,at as ee,au as oe,L as ne,av as te,aw as se,ax as ae,ay as le,s as ie,F as M,az as U,af as L,a6 as re,aA as pe,i as ce,r as A,a3 as ue,R as me,aB as de,P as _e,q as fe}from"./entry.af9b874e.js";import{_ as he}from"./HelpFab.vue.f1360997.js";import{_ as ve}from"./NCheckbox.vue.556df786.js";import{_ as W,F as ge}from"./fuse.esm.6cb10448.js";import{p as q}from"./index.a6ef77ff.js";import{_ as be}from"./NIconButton.vue.3972e12f.js";import{_ as j}from"./Badge.cd3914e8.js";import{_ as H}from"./FilepathItem.vue.c910f268.js";import{a as ye}from"./editor.ec5a160f.js";import{_ as $e}from"./DrawerRight.vue.87ef0065.js";import{_ as ke}from"./NSectionBlock.3f4396b3.js";import{_ as we}from"./NIconTitle.vue.c904da9d.js";import{D as X}from"./constants.126da185.js";import"./ContentRenderer.84f6a8ba.js";import"./ContentRendererMarkdown.9627ed5f.js";import"./preview.f5b42a41.js";import"./query.1a3ba2be.js";import"./utils.f4f8ef5c.js";import"./NTextInput.vue.3ee9e6a6.js";const Ce={"font-mono":"","text-sm":""},xe=u("span",{mr1:"",op20:""},"<",-1),Se=u("span",{ml1:"",op20:""},"/>",-1),Y=P({__name:"ComponentName",props:{component:null},setup(_){const l=_,p=I(()=>l.component.pascalName||q(l.component.name||l.component.__name||l.component.kebabName||""));return($,t)=>(n(),v("code",Ce,[xe,z(Q(e(p)),1),Se]))}}),Ne={flex:"~ col gap1","items-start":"","of-hidden":""},Me={flex:"~ gap2"},J=P({__name:"ComponentDetails",props:{component:null},setup(_){const l=_,p=I(()=>l.component.pascalName||q(l.component.name||l.component.__name||l.component.kebabName||"")),$=I(()=>l.component.filePath||l.component.file||l.component.__file||""),t=ye();return(s,d)=>{const k=Y,b=be,r=j,w=H;return n(),v("div",Ne,[u("div",Me,[m(k,{component:_.component},null,8,["component"]),m(b,{title:"Copy name","flex-none":"",icon:"carbon-copy",onClick:d[0]||(d[0]=o=>e(t)(`<${e(p)}></${e(p)}>`))}),_.component.global?(n(),h(r,{key:0,"bg-green-400:10":"","text-green-400":"",title:"Registered at runtime as a global component",textContent:"runtime"})):C("",!0)]),u("div",null,[e($)?(n(),h(w,{key:0,filepath:e($),"w-full":"","text-sm":"",op25:"","group-hover:op75":""},null,8,["filepath"])):C("",!0)]),F(s.$slots,"default")])}}}),Ie={hover:"bg-active",class:"group",flex:"~ gap2","w-full":"","items-center":"",rounded:"",px2:"",py1:""},Ve={"hover:text-primary":""},Te=P({__name:"ComponentItem",props:{component:null},setup(_){const l=_,p=I(()=>l.component.filePath||l.component.file||l.component.__file||"");return($,t)=>{const s=Y,d=J,k=Z("VDropdown"),b=j,r=H;return n(),v("div",Ie,[m(k,null,{popper:g(()=>[m(d,{component:_.component,p4:""},null,8,["component"])]),default:g(()=>[u("button",Ve,[m(s,{component:_.component},null,8,["component"])])]),_:1}),_.component.global?(n(),h(b,{key:0,"bg-green-400:10":"","text-green-400":"",title:"Registered at runtime as a global component",textContent:"runtime"})):C("",!0),F($.$slots,"default"),e(p)?(n(),h(r,{key:1,filepath:e(p),"text-sm":"",op25:"","group-hover:op75":""},null,8,["filepath"])):C("",!0)])}}}),Pe=u("span",{op75:""},"Show pages",-1),De=u("span",{op75:""},"Show layouts",-1),Ae=u("span",{op75:""},"Show workspace",-1),Ee=u("span",{op75:""},"Show node_modules",-1),Le=u("div",{"i-carbon-close":""},null,-1),Be=u("div",{"flex-auto":""},null,-1),Fe={relative:"","h-full":"","w-full":""},Re={key:0,p4:"",pr10:"",pt4:"",flex:"~ col gap4"},Xe=P({__name:"ComponentsGraph",props:{components:null},setup(_){const l=_,p=E(),$=E(),t=ee(),s=E(),d=oe(),k=ne(),b=te(),r=se(),{componentsGraphShowNodeModules:w,componentsGraphShowPages:o,componentsGraphShowLayouts:y,componentsGraphShowWorkspace:V}=U(),T=E(),G=I(()=>{const x=r.value||[];if(T.value){let i=function(f){!f||a.has(f)||(a.add(f),f.deps.forEach(S=>{i(x.find(N=>N.id===S))}))};const a=new Set;return x.find(f=>f.id===s.value?.id),i(T.value),Array.from(a)}return x}),B=I(()=>{const x=G.value.map(a=>{const f=l.components.find(D=>D.filePath===a.id),S=d.value?.find(D=>D.file===a.id),N=b.value?.find(D=>D.file===a.id),R=a.id.replace(/\?.*$/,"").replace(/\#.*$/,""),c=a.id.includes("/node_modules/")?"lib":f?"user":N?"layout":S?"page":"unknown";if(!w.value&&c==="lib"||!o.value&&c==="page"||!y.value&&c==="layout"||!V.value&&c==="user"&&k.value&&!a.id.startsWith(k.value.rootDir))return null;const O=c==="layout"?"hexagon":c==="page"?"square":"dot";return{id:a.id,label:R.split("/").splice(-1)[0].replace(/\.\w+$/,""),group:c,shape:O,size:15+Math.min(a.deps.length/2,8),font:{color:t.value==="dark"?"white":"black"},color:T.value?.id===a.id?"#82c742":void 0,extra:{id:a.id,component:f,page:S,layout:N,relationship:a}}}).filter(a=>!!a),i=G.value.flatMap(a=>a.deps.map(f=>({from:a.id,to:f,arrows:{to:{enabled:!0,scaleFactor:.8}}})));return{nodes:x,edges:i}});ae(()=>{const x={nodes:{shape:"dot",size:16},physics:{repulsion:{centralGravity:.7,springLength:100,springConstant:.01},maxVelocity:146,solver:"forceAtlas2Based",timestep:.35,stabilization:{enabled:!0,iterations:200}},groups:{user:{color:"#42b883"},unknown:{color:"#b86542"},lib:{color:"#b4b842"},page:{color:"#42b2b8"},layout:{color:"#4256b8"}}},i=new le(p.value,B.value,x);i.on("click",a=>{const f=a.nodes?.[0],S=B.value.nodes?.find(N=>N.id===f)?.extra;S&&(s.value=S)}),ie(B,()=>{i.setData(B.value)})});function K(){T.value=s.value?.relationship,s.value=void 0}return(x,i)=>{const a=ve,f=W,S=J,N=re,R=$e;return n(),v(M,null,[m(f,{ref_key:"navbar",ref:$,absolute:"","left-0":"","right-0":"","top-0":""},{search:g(()=>[m(a,{modelValue:e(o),"onUpdate:modelValue":i[0]||(i[0]=c=>L(o)?o.value=c:null),n:"primary sm"},{default:g(()=>[Pe]),_:1},8,["modelValue"]),m(a,{modelValue:e(y),"onUpdate:modelValue":i[1]||(i[1]=c=>L(y)?y.value=c:null),n:"primary sm"},{default:g(()=>[De]),_:1},8,["modelValue"]),m(a,{modelValue:e(V),"onUpdate:modelValue":i[2]||(i[2]=c=>L(V)?V.value=c:null),n:"primary sm"},{default:g(()=>[Ae]),_:1},8,["modelValue"]),m(a,{modelValue:e(w),"onUpdate:modelValue":i[3]||(i[3]=c=>L(w)?w.value=c:null),n:"primary sm"},{default:g(()=>[Ee]),_:1},8,["modelValue"]),e(T)?(n(),v("button",{key:0,flex:"~ gap-1","items-center":"","rounded-full":"","bg-gray:20":"",py1:"",pl3:"",pr2:"","text-xs":"",op50:"","hover:op100":"",onClick:i[4]||(i[4]=c=>T.value=void 0)},[z(" Clear filter "),Le])):C("",!0),Be,F(x.$slots,"default")]),_:3},512),u("div",Fe,[u("div",{ref_key:"container",ref:p,"h-full":"","w-full":""},null,512),m(R,{"model-value":!!(e(s)&&e(s).component),navbar:e($),"w-80":"",onClose:i[6]||(i[6]=c=>s.value=void 0)},{default:g(()=>[e(s)&&e(s).component?(n(),v("div",Re,[m(S,{component:e(s).component},null,8,["component"]),u("div",null,[m(N,{n:"primary solid",onClick:i[5]||(i[5]=c=>K())},{default:g(()=>[z(" Filter to this component ")]),_:1})])])):C("",!0)]),_:1},8,["model-value","navbar"])])],64)}}}),ze={pl4:""},Ge=P({__name:"ComponentsList",props:{components:null},setup(_){const l=_,p=E(""),$=I(()=>new ge(l.components,{keys:["pascalName","filePath","kebabName"]})),t=I(()=>{const s=[],d=new Map,k=[],b=[],r={user:0,lib:0,builtin:0,runtime:0};return(p.value?$.value.search(p.value).map(o=>o.item):l.components).forEach(o=>{if(o.filePath&&pe(o.filePath)){const y=ce(o.filePath);if(!y)return;y==="nuxt"?(k.push(o),r.builtin++):(d.has(y)||d.set(y,[]),d.get(y).push(o),r.lib++)}else o.global&&!o.filePath?(b.push(o),r.runtime++):(s.push(o),r.user++)}),{count:r,user:s,builtin:k,lib:d,runtime:b}});return(s,d)=>{const k=W,b=Te,r=ke,w=we;return n(),v(M,null,[m(k,{search:e(p),"onUpdate:search":d[0]||(d[0]=o=>L(p)?p.value=o:null)},{actions:g(()=>[F(s.$slots,"default")]),_:3},8,["search"]),e(t).user.length?(n(),h(r,{key:0,icon:"carbon-nominal",text:"User components",open:e(t).user.length<=("DETAILS_MAX_ITEMS"in s?s.DETAILS_MAX_ITEMS:e(X)),description:`Total components: ${e(t).count.user}`},{default:g(()=>[(n(!0),v(M,null,A(e(t).user,o=>(n(),h(b,{key:o.filePath,component:o},null,8,["component"]))),128))]),_:1},8,["open","description"])):C("",!0),e(t).runtime.length?(n(),h(r,{key:1,icon:"carbon-load-balancer-global",open:e(t).runtime.length<=("DETAILS_MAX_ITEMS"in s?s.DETAILS_MAX_ITEMS:e(X)),text:"Runtime components",description:`Total components: ${e(t).count.runtime}`},{default:g(()=>[(n(!0),v(M,null,A(e(t).runtime,o=>(n(),h(b,{key:o.filePath,component:o},null,8,["component"]))),128))]),_:1},8,["open","description"])):C("",!0),e(t).builtin.length?(n(),h(r,{key:2,icon:"simple-icons-nuxtdotjs",text:"Built-in components",description:`Total components: ${e(t).count.builtin}`},{default:g(()=>[(n(!0),v(M,null,A(e(t).builtin,o=>(n(),h(b,{key:o.filePath,component:o},null,8,["component"]))),128))]),_:1},8,["description"])):C("",!0),e(t).lib.size?(n(),h(r,{key:3,open:e(t).count.lib<=("DETAILS_MAX_ITEMS"in s?s.DETAILS_MAX_ITEMS:e(X)),icon:"carbon-3d-mpr-toggle",text:"Components from libraries",description:`${e(t).count.lib} components from ${e(t).lib.size} packages`},{default:g(()=>[(n(!0),v(M,null,A(e(t).lib.entries(),([o,y])=>(n(),v("div",{key:o,"ml-2":""},[m(w,{text:`${o} (${y.length})`,py1:"",op50:""},null,8,["text"]),u("div",ze,[(n(!0),v(M,null,A(y,V=>(n(),h(b,{key:V.filePath,component:V},null,8,["component"]))),128))])]))),128))]),_:1},8,["open","description"])):C("",!0)],64)}}}),Ue={relative:"","h-full":"","of-auto":""},We={"flex-none":"",flex:"~ gap4"},co=P({__name:"components",setup(_){const l=ue(),p=me(),$=de(),{componentsView:t}=U();function s(){l.value?.inspector?.instance&&(l.value.inspector.enable(),p.push("/__inspecting"))}function d(){t.value=t.value==="list"?"graph":"list"}return(k,b)=>{const r=fe,w=he;return n(),v(M,null,[u("div",Ue,[(n(),h(_e(e(t)==="list"?Ge:Xe),{components:e($)},{default:g(()=>[u("div",We,[u("button",{title:"Toggle view",onClick:d},[e(t)==="graph"?(n(),h(r,{key:0,icon:"i-carbon-list"})):(n(),h(r,{key:1,icon:"i-carbon-network-4"}))]),e(l)?.inspector?.instance?(n(),v("button",{key:0,title:"Inspect Vue components",onClick:s},[m(r,{icon:"i-carbon-select-window"})])):C("",!0)])]),_:1},8,["components"]))]),m(w,{path:"/components"})],64)}}});export{co as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as E}from"./NPanelGrids.e798da22.js";import{a as C,at as M,V as g,h as w,aE as N,aF as V,ax as T,x as B,ar as f,aG as I,aH as $,o as i,e as j,v as L,R as S,aI as W,u as t,c as d,w as h,P as O,S as P,m as c,N as y,t as k,l as R,aJ as q}from"./entry.af9b874e.js";import{_ as A}from"./LaunchPage.vue.7af6375c.js";import"./NMarkdown.vue.141eb8e5.js";const b=new Map,D=C({__name:"IframeView",props:{tab:null},setup(x){const m=x,l=M(),u=g(),r=w(()=>m.tab.name),e=g(),o=N(V(u));T(()=>{const n=m.tab.view,s=n.persistent!==!1;if(b.get(r.value)&&s)e.value=b.get(r.value),e.value.style.visibility="visible";else{e.value=document.createElement("iframe"),s&&b.set(r.value,e.value),e.value.src=n.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),B(_)}setTimeout(a,100)}),f(_),f(a),f(v),I(()=>{e.value&&(e.value.style.visibility="hidden")});function a(){if(!(!e.value||!e.value.contentWindow))try{const n=e.value.contentWindow.document.querySelector("html");n?.classList.toggle("dark",l.value==="dark"),n?.classList.toggle("light",l.value==="dark"),new MutationObserver(()=>{l.value=e.value?.contentWindow?.document.querySelector("html")?.classList.contains("dark")?"dark":"light"}).observe(n,{attributes:!0,attributeFilter:["class"]})}catch{}}const p=$();function v(){if(!(!e.value||!e.value.contentWindow))try{e.value.contentWindow.__NUXT_DEVTOOLS__=p.value}catch{}}function _(){e.value&&Object.assign(e.value.style,{position:"fixed",left:`${o.left}px`,top:`${o.top}px`,width:`${o.width}px`,height:`${o.height}px`,outline:"none"})}return(n,s)=>(i(),j("div",{ref_key:"anchor",ref:u,"h-full":"","w-full":""},null,512))}}),U={flex:"~ col gap2",mxa:"","items-center":""},F=c("div",{"i-carbon-queued":"",mb2:"","text-5xl":"",op50:""},null,-1),G={"text-xl":""},H={"text-rose":""},J=c("p",{op50:""}," It might because the module contributing this tab is not installed or enabled ",-1),X=c("p",{mt8:"","animate-pulse":""}," Redirecting to overview page... ",-1),ee=C({__name:"custom-[name]",setup(x){const m=L(),l=S(),u=w(()=>m.params.name),r=W(),e=w(()=>r.value.find(o=>o.name===u.value));return T(()=>{e.value||setTimeout(()=>{e.value||l.push("/modules/overview")},2e3)}),(o,a)=>{const p=E,v=D,_=A,n=q;return t(e)?t(e).view.type==="iframe"?(i(),d(v,{key:1,tab:t(e)},null,8,["tab"])):t(e).view.type==="vnode"?(i(),d(O(t(e).view.vnode),{key:2})):t(e).view.type==="launch"?(i(),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]=s=>("rpc"in o?o.rpc:t(P)).customTabAction(t(e).name,s))},null,8,["icon","title","description","actions"])):(i(),d(p,{key:4},{default:h(()=>[R(n,{flex:"~ col","h-full":"","items-center":"","justify-center":""},{default:h(()=>[y(" Unknown tab type "+k(t(e).view),1)]),_:1})]),_:1})):(i(),d(p,{key:0},{default:h(()=>[c("div",U,[F,c("p",G,[y(" Tab "),c("code",H,k(t(u)),1),y(" not found ")]),J,X])]),_:1}))}}});export{ee as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{k as o,o as s,e as t,m as a,p as n}from"./entry.af9b874e.js";const r={},c={"h-full":"","of-auto":"","n-panel-grids":""},l={"h-full":"","bg-base":""};function d(e,_){return s(),t("div",c,[a("div",l,[n(e.$slots,"default")])])}const i=o(r,[["render",d]]);export{i as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{L as u,Q as c,R as d,S as l,T as p,U as b}from"./entry.af9b874e.js";function v(){const i=u(),e=c(),n=d();return async o=>{const t=i.value?.buildDir,r=t&&o.startsWith(t)?`#build${o.slice(t.length).replace(/\.\w+$/,"")}`:o,a=e.value?.entries.find(s=>s.path===r||s.id===r)||e.value?.entries.find(s=>s.path===o||s.id===o);a?n.push(`/modules/virtual-files?id=${encodeURIComponent(a.id)}`):await l.openInEditor(o)}}function m(){const i=p(),e=b();return n=>{i.copy(n),e("Copied to clipboard","carbon-checkmark")}}export{m as a,v as u};
|