@nuxt/devtools-nightly 2.0.0-beta.0-28940293.6562084 → 2.0.0-beta.1-28947249.59b738c
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/.discoveryrc.cjs +13 -0
- package/dist/chunks/module-main.mjs +98 -48
- package/dist/chunks/vscode.mjs +1 -1
- package/dist/client/200.html +14 -14
- package/dist/client/404.html +14 -14
- package/dist/client/_nuxt/__blank-mourf202.js +1 -0
- package/dist/client/_nuxt/{analyze-build-oe0nvo1v.js → analyze-build-fgy88qr9.js} +1 -1
- package/dist/client/_nuxt/{assets-wsbeurkn.js → assets-bu3nftwx.js} +3 -3
- package/dist/client/_nuxt/builds/latest.json +1 -1
- package/dist/client/_nuxt/builds/meta/4c388898-4b3b-4776-a060-7bf56ec54178.json +1 -0
- package/dist/client/_nuxt/{client-c9f80qsp.js → client-if03554a.js} +1 -1
- package/dist/client/_nuxt/{code-diff.vue-no0ffx8f.js → code-diff.vue-dsxarkpv.js} +1 -1
- package/dist/client/_nuxt/{code-snippets.vue-kbs96pi0.js → code-snippets.vue-bhkqsgzm.js} +1 -1
- package/dist/client/_nuxt/{components-kvmcnvun.js → components-j6ajg8e1.js} +1 -1
- package/dist/client/_nuxt/{composable-item.vue-mdhcy97i.js → composable-item.vue-d0mp4x9i.js} +1 -1
- package/dist/client/_nuxt/{custom-_name_-jeddq596.js → custom-_name_-mym6eae7.js} +1 -1
- package/dist/client/_nuxt/{default-jjobpju3.js → default-l69v3wxz.js} +1 -1
- package/dist/client/_nuxt/{duration-display.vue-kqe6a4wx.js → duration-display.vue-g20yjddp.js} +1 -1
- package/dist/client/_nuxt/entry.css-em88tyst.css +1 -0
- package/dist/client/_nuxt/{error-404-lro7u76y.js → error-404-m81p8eyx.js} +1 -1
- package/dist/client/_nuxt/error-404.css-gakauvtn.css +1 -0
- package/dist/client/_nuxt/{error-500-j409mizi.js → error-500-jfrnzryz.js} +1 -1
- package/dist/client/_nuxt/error-500.css-nt5emrt3.css +1 -0
- package/dist/client/_nuxt/{error-o3l2rbgn.js → error-fz5v3t2y.js} +5 -5
- package/dist/client/_nuxt/filepath-item.vue-cjrrk3ln.js +1 -0
- package/dist/client/_nuxt/full-lqfcq3gn.js +1 -0
- package/dist/client/_nuxt/{help-fab.vue-eyzjjtrr.js → help-fab.vue-kh0hzs3x.js} +1 -1
- package/dist/client/_nuxt/{hooks-jhvmyjnq.js → hooks-erieyy80.js} +1 -1
- package/dist/client/_nuxt/imports-mm57mzxe.js +1 -0
- package/dist/client/_nuxt/index-ecjjdceb.js +2 -0
- package/dist/client/_nuxt/index-med6ayl4.js +1 -0
- package/dist/client/_nuxt/kul02k0k.js +17 -0
- package/dist/client/_nuxt/launch-page.vue-h5h1rmqz.js +1 -0
- package/dist/client/_nuxt/{modules-i64nwxud.js → modules-k4qx2ksj.js} +1 -1
- package/dist/client/_nuxt/nbadge-dq7969id.js +1 -0
- package/dist/client/_nuxt/{ncheckbox.vue-bzh5t5xo.js → ncheckbox.vue-hmuefhp8.js} +1 -1
- package/dist/client/_nuxt/{ncode-block.vue-gy1ero5j.js → ncode-block.vue-fq4nv817.js} +1 -1
- package/dist/client/_nuxt/{ndrawer.vue-dih2d0ci.js → ndrawer.vue-mv80pm2y.js} +1 -1
- package/dist/client/_nuxt/{ndropdown.vue-fl5rdy5t.js → ndropdown.vue-zeexfnta.js} +1 -1
- package/dist/client/_nuxt/{nicon-title.vue-ouqsubn7.js → nicon-title.vue-oe3ckr8a.js} +1 -1
- package/dist/client/_nuxt/{nlink.vue-gei3dtfe.js → nlink.vue-j30b5gz7.js} +1 -1
- package/dist/client/_nuxt/{nmarkdown.vue-hygash5x.js → nmarkdown.vue-gqjdqnvm.js} +1 -1
- package/dist/client/_nuxt/{nnavbar.vue-fcbubuy5.js → nnavbar.vue-hsot3qp4.js} +1 -1
- package/dist/client/_nuxt/none-lxsv0k4t.js +1 -0
- package/dist/client/_nuxt/{nsection-block-cz4igj8y.js → nsection-block-czz9t4by.js} +1 -1
- package/dist/client/_nuxt/{nselect-tabs.vue-o3dadufj.js → nselect-tabs.vue-mlu3my71.js} +1 -1
- package/dist/client/_nuxt/{nselect.vue-lkp6tmlx.js → nselect.vue-kg1543hy.js} +1 -1
- package/dist/client/_nuxt/{open-graph-mr51d8ms.js → open-graph-ehstuk3t.js} +2 -2
- package/dist/client/_nuxt/{overview-dki4jhvf.js → overview-jn7yq6o7.js} +1 -1
- package/dist/client/_nuxt/{pages-fa5zwx08.js → pages-db784nmv.js} +1 -1
- package/dist/client/_nuxt/{payload-cza6lmj7.js → payload-imcpwbc6.js} +1 -1
- package/dist/client/_nuxt/pinia-ij5k3zx7.js +1 -0
- package/dist/client/_nuxt/plugins-e1upzt5p.js +1 -0
- package/dist/client/_nuxt/{render-tree-eispe90j.js → render-tree-kla9esid.js} +1 -1
- package/dist/client/_nuxt/{runtime-configs-klksccry.js → runtime-configs-lsft5of4.js} +1 -1
- package/dist/client/_nuxt/server-discovery-fqlczqkl.js +1 -0
- package/dist/client/_nuxt/{server-route-inputs.vue-kkkjmlpr.js → server-route-inputs.vue-bn6ehnjd.js} +1 -1
- package/dist/client/_nuxt/{server-routes-mrmhvkti.js → server-routes-chrinxrk.js} +2 -2
- package/dist/client/_nuxt/{server-tasks-ju8lwq5t.js → server-tasks-c9bhxchj.js} +1 -1
- package/dist/client/_nuxt/settings-fgk6dzzk.js +1 -0
- package/dist/client/_nuxt/{stacktrace-list.vue-fvt332qg.js → stacktrace-list.vue-nlkbtwib.js} +1 -1
- package/dist/client/_nuxt/{state-components-fo1al5n2.js → state-components-mzokhl93.js} +1 -1
- package/dist/client/_nuxt/{state-editor.vue-kzen94mi.js → state-editor.vue-n47qdx2l.js} +1 -1
- package/dist/client/_nuxt/state-modules-iei82dn5.js +1 -0
- package/dist/client/_nuxt/storage-hsf9ce2m.js +1 -0
- package/dist/client/_nuxt/{terminals-n0t1rhl7.js → terminals-m512mpu9.js} +1 -1
- package/dist/client/_nuxt/{timeline-janeok34.js → timeline-nayoii9w.js} +2 -2
- package/dist/client/_nuxt/{unocss-runtime-jzfgcoxk.js → unocss-runtime-lxpmsgjb.js} +1 -1
- package/dist/client/_nuxt/vendor/{json-editor-vue-gi2fewby.js → json-editor-vue-kmaz80fw.js} +91 -91
- package/dist/client/_nuxt/vendor/{unocss-3uirpnla.js → unocss-fae7bffg.js} +1 -1
- package/dist/client/_nuxt/{virtual-files-basg39tv.js → virtual-files-g8hr4da2.js} +1 -1
- package/dist/client/_nuxt/{vue-virtual-scroller.esm-hx1s7s1b.js → vue-virtual-scroller.esm-cj3vb08x.js} +1 -1
- package/dist/client/discovery/index.html +611 -0
- package/dist/client/index.html +14 -14
- package/dist/module.json +2 -2
- package/dist/module.mjs +1 -1
- package/dist/runtime/plugins/view/Main.vue +2 -9
- package/dist/shared/{devtools-nightly.5ac54dae.mjs → devtools-nightly.60b2ba4d.mjs} +3 -2
- package/package.json +22 -18
- package/dist/client/_nuxt/__blank-n15vnpb5.js +0 -1
- package/dist/client/_nuxt/builds/meta/949d891b-4b52-4ea6-a28d-f5ed6b11e9cf.json +0 -1
- package/dist/client/_nuxt/entry.css-nqz5coc9.css +0 -1
- package/dist/client/_nuxt/error-404.css-b3x40x40.css +0 -1
- package/dist/client/_nuxt/error-500.css-hilpkhd4.css +0 -1
- package/dist/client/_nuxt/filepath-item.vue-otp6jyyn.js +0 -1
- package/dist/client/_nuxt/full-ihuxa34t.js +0 -1
- package/dist/client/_nuxt/imports-j94jn55i.js +0 -1
- package/dist/client/_nuxt/index-hgt6j2tr.js +0 -2
- package/dist/client/_nuxt/index-irxxlbxf.js +0 -1
- package/dist/client/_nuxt/k6pa1ohq.js +0 -17
- package/dist/client/_nuxt/launch-page.vue-cd4fi46t.js +0 -1
- package/dist/client/_nuxt/nbadge-iwzd40zm.js +0 -1
- package/dist/client/_nuxt/none-nrc1e9do.js +0 -1
- package/dist/client/_nuxt/pinia-esck9n5i.js +0 -1
- package/dist/client/_nuxt/plugins-kvl3spfm.js +0 -1
- package/dist/client/_nuxt/settings-be8y8a8r.js +0 -1
- package/dist/client/_nuxt/state-modules-evifr0hw.js +0 -1
- package/dist/client/_nuxt/storage-l7ud6uto.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{I as ie,e as X,P as pe,Q as re,H as ue,R as de,b as J,S as me,T as ce,U as fe,M as ve,V as _e,W as he,D as be,X as ge}from"./k6pa1ohq.js";import{Q as t,S as _,U as n,k as R,l as S,a6 as Q,a5 as W,a0 as v,u as N,M as x,W as k,F as M,ab as B,V as H,b as L,j as ye,x as we,c as xe,$ as b,y as A,R as ke,Y as Ce,a1 as z,ae as $e,a7 as Ne,a8 as Y}from"./vendor/json-editor-vue-gi2fewby.js";import{_ as Ve}from"./help-fab.vue-eyzjjtrr.js";import{_ as Se}from"./ncheckbox.vue-bzh5t5xo.js";import{_ as K}from"./nnavbar.vue-fcbubuy5.js";import{_ as Z}from"./nbadge-iwzd40zm.js";import{_ as ee}from"./filepath-item.vue-otp6jyyn.js";import{_ as Pe}from"./ndrawer.vue-dih2d0ci.js";import{N as De}from"./vendor/vis-dlwijd5n.js";import{_ as Me}from"./nselect-tabs.vue-o3dadufj.js";import{_ as Te}from"./nsection-block-cz4igj8y.js";import{_ as Ue}from"./nicon-title.vue-ouqsubn7.js";import{D as O}from"./constants-b32h69zq.js";import{u as Be,a as Le}from"./state-components-fo1al5n2.js";import"./vendor/unocss-3uirpnla.js";import"./vendor/shiki-bnvxb5wv.js";const Re={class:"markdown-body"},Ie={__name:"components",setup(r,{expose:s}){return s({frontmatter:{}}),(a,i)=>(t(),_("div",Re,i[0]||(i[0]=[n("h1",null,"Components",-1),n("p",null,"Vue Components allow us to split the UI into independent and reusable pieces, and think about each piece in isolation. This is very similar to how we nest native HTML elements, but Vue implements its own component model that allow us to encapsulate custom content and logic in each component.",-1),n("p",null,"Components placed in the components/ directory are automatically registered by Nuxt. They can be used in your templates without importing them.",-1),n("p",null,[n("a",{href:"https://nuxt.com/docs/guide/directory-structure/components",target:"_blank",rel:"noopener"},"Learn more in the documentation")],-1)])))}},Fe=/\d/,Ge=["-","_","/","."];function Ae(r=""){if(!Fe.test(r))return r!==r.toLowerCase()}function Ee(r,s){const m=Ge,a=[];if(!r||typeof r!="string")return a;let i="",o,p;for(const c of r){const u=m.includes(c);if(u===!0){a.push(i),i="",o=void 0;continue}const f=Ae(c);if(p===!1){if(o===!1&&f===!0){a.push(i),i=c,o=f;continue}if(o===!0&&f===!1&&i.length>1){const g=i.at(-1);a.push(i.slice(0,Math.max(0,i.length-1))),i=g+c,o=f;continue}}i+=c,o=f,p=u}return a.push(i),a}function ze(r){return r?r[0].toUpperCase()+r.slice(1):""}function ne(r,s){return r?(Array.isArray(r)?r:Ee(r)).map(m=>ze(m)).join(""):""}const We={"text-sm":"","font-mono":""},oe=R({__name:"ComponentName",props:{component:{}},setup(r){const s=r,m=S(()=>s.component.pascalName||ne(s.component.name||s.component.__name||s.component.kebabName||""));return(a,i)=>(t(),_("code",We,[i[0]||(i[0]=n("span",{mr1:"",op20:""},"<",-1)),Q(W(m.value),1),i[1]||(i[1]=n("span",{ml1:"",op20:""},"/>",-1))]))}}),He={flex:"~ col gap1","items-start":"","of-hidden":""},je={flex:"~ gap2",px3:""},Oe={px3:"",pb2:""},Qe={key:0,border:"t base","max-h-60":"","w-full":"","of-auto":"",px3:"",py3:""},Xe={"text-sm":""},qe={"text-primary":""},Ye={key:0,flex:"~ col gap-2","items-start":"",pt3:"","text-sm":"",op75:""},Je={key:1,border:"t base","max-h-60":"","w-full":"","of-auto":"",px3:"",py3:""},Ke={"text-sm":""},Ze={"text-primary":""},en={key:0,flex:"~ col gap-2","items-start":"",pt3:"","text-sm":"",op75:""},te=R({__name:"ComponentDetails",props:{component:{},dependencies:{},dependents:{}},setup(r){const s=r,m=S(()=>s.component.pascalName||ne(s.component.name||s.component.__name||s.component.kebabName||"")),a=S(()=>s.component.filePath||s.component.file||s.component.__file||""),i=ie();return(o,p)=>{const c=oe,u=X,f=Z,g=ee;return t(),_("div",He,[n("div",je,[v(c,{component:o.component},null,8,["component"]),v(u,{title:"Copy name","flex-none":"",icon:"carbon-copy",border:!1,onClick:p[0]||(p[0]=h=>N(i)(`<${m.value}></${m.value}>`,"component-name"))}),o.component.global?(t(),x(f,{key:0,n:"green",title:"Registered at runtime as a global component",textContent:"runtime"})):k("",!0)]),n("div",Oe,[a.value?(t(),x(g,{key:0,filepath:a.value,"w-full":"","text-sm":"",op40:"","group-hover:op75":""},null,8,["filepath"])):k("",!0)]),o.dependents?(t(),_("div",Qe,[n("div",Xe,[n("strong",qe,W(o.dependents.length),1),p[1]||(p[1]=n("span",{op50:""}," references",-1))]),o.dependents.length?(t(),_("div",Ye,[(t(!0),_(M,null,B(o.dependents,h=>(t(),x(g,{key:h,filepath:h},null,8,["filepath"]))),128))])):k("",!0)])):k("",!0),o.dependencies?(t(),_("div",Je,[n("div",Ke,[n("strong",Ze,W(o.dependencies.length),1),p[2]||(p[2]=n("span",{op50:""}," dependencies",-1))]),o.dependencies.length?(t(),_("div",en,[(t(!0),_(M,null,B(o.dependencies,h=>(t(),x(g,{key:h,filepath:h},null,8,["filepath"]))),128))])):k("",!0)])):k("",!0),H(o.$slots,"default")])}}}),nn={flex:"~ gap-x-3 gap-y-1 wrap","w-full":""},on={relative:"","h-full":"","w-full":""},tn={key:0,py4:"",pt4:"",flex:"~ col"},sn={border:"t base",p4:""},ln=R({__name:"ComponentsGraph",props:{components:{},relationships:{}},setup(r){const s=r,m=L(),a=L(),i=pe(),o=ye(),p=re(),c=ue(),u=de(),{componentsGraphShowNodeModules:f,componentsGraphShowGlobalComponents:g,componentsGraphShowPages:h,componentsGraphShowLayouts:V,componentsGraphShowWorkspace:y}=J("ui"),C=L(),d=L(""),I=me(d,300),F=S(()=>{const P=s.relationships||[];if(C.value){let e=function($){!$||l.has($)||(l.add($),$.deps.forEach(T=>{e(P.find(U=>U.id===T))}))};const l=new Set;return e(C.value),Array.from(l)}return P}),E=S(()=>{const P=F.value.map(l=>{const $=s.components.find(G=>G.filePath===l.id),T=p.value?.find(G=>G.file===l.id),U=u.value?.find(G=>G.file===l.id),j=l.id.replace(/\?.*$/,"").replace(/#.*$/,""),D=l.id.includes("/node_modules/")?"lib":$?$.global?"global":"user":U?"layout":T?"page":"unknown";if(!f.value&&D==="lib"||!h.value&&D==="page"||!V.value&&D==="layout"||!y.value&&D==="user"&&c.value&&!l.id.startsWith(c.value.rootDir)||!g.value&&D==="global")return null;const w=D==="layout"?"hexagon":D==="page"?"square":"dot",q=I.value&&!l.id.toLowerCase().includes(I.value.toLowerCase());return{id:l.id,label:j.split("/").splice(-1)[0].replace(/\.\w+$/,""),group:D,shape:w,size:15+Math.min(l.deps.length/2,8),font:{color:q?"#8885":i.value==="dark"?"white":"black"},color:q?"#8885":C.value?.id===l.id?"#82c742":void 0,extra:{id:l.id,component:$,page:T,layout:U,relationship:l}}}).filter(l=>!!l),e=F.value.flatMap(l=>l.deps.map($=>({from:l.id,to:$,arrows:{to:{enabled:!0,scaleFactor:.8}}})));return{nodes:P,edges:e}}),se=S(()=>o.value?.component?s.relationships?.find(e=>e.id===o.value?.component?.filePath)?.deps?.map(e=>s.relationships?.find(l=>l.id===e)?.id).filter(Boolean):[]),le=S(()=>o.value?.component?s.relationships?.filter(e=>e.deps.includes(o.value.component.filePath))?.map(e=>s.relationships?.find(l=>l.id===e.id)?.id).filter(Boolean):[]);we(()=>{const P={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"}}},e=new De(m.value,E.value,P);e.on("click",l=>{const $=l.nodes?.[0],T=E.value.nodes?.find(U=>U.id===$)?.extra;T&&(o.value=T)}),xe(E,()=>{e.setData(E.value)})});function ae(){C.value=o.value?.relationship,o.value=void 0}return(P,e)=>{const l=Se,$=K,T=ce,U=te,j=X,D=Pe;return t(),_(M,null,[v($,{ref_key:"navbar",ref:a,search:d.value,"onUpdate:search":e[6]||(e[6]=w=>d.value=w),absolute:"","left-0":"","right-0":"","top-0":""},{actions:b(()=>[n("div",nn,[v(l,{modelValue:N(h),"onUpdate:modelValue":e[0]||(e[0]=w=>A(h)?h.value=w:null),n:"primary sm"},{default:b(()=>e[9]||(e[9]=[n("span",{op75:""},"Show pages",-1)])),_:1},8,["modelValue"]),v(l,{modelValue:N(V),"onUpdate:modelValue":e[1]||(e[1]=w=>A(V)?V.value=w:null),n:"primary sm"},{default:b(()=>e[10]||(e[10]=[n("span",{op75:""},"Show layouts",-1)])),_:1},8,["modelValue"]),v(l,{modelValue:N(y),"onUpdate:modelValue":e[2]||(e[2]=w=>A(y)?y.value=w:null),n:"primary sm"},{default:b(()=>e[11]||(e[11]=[n("span",{op75:""},"Show workspace",-1)])),_:1},8,["modelValue"]),v(l,{modelValue:N(f),"onUpdate:modelValue":e[3]||(e[3]=w=>A(f)?f.value=w:null),n:"primary sm"},{default:b(()=>e[12]||(e[12]=[n("span",{op75:""},"Show node_modules",-1)])),_:1},8,["modelValue"]),v(l,{modelValue:N(g),"onUpdate:modelValue":e[4]||(e[4]=w=>A(g)?g.value=w:null),n:"primary sm"},{default:b(()=>e[13]||(e[13]=[n("span",{op75:""},"Show global components",-1)])),_:1},8,["modelValue"])]),C.value?(t(),_("button",{key:0,flex:"~ gap-1","flex-none":"","items-center":"","rounded-full":"","bg-gray:20":"",py1:"",pl3:"",pr2:"","text-xs":"",op50:"","hover:op100":"",onClick:e[5]||(e[5]=w=>C.value=void 0)},e[14]||(e[14]=[Q(" Clear filter "),n("div",{"i-carbon-close":""},null,-1)]))):k("",!0),e[15]||(e[15]=n("div",{"flex-auto":""},null,-1)),H(P.$slots,"default")]),_:3},8,["search"]),n("div",on,[n("div",{ref_key:"container",ref:m,"h-full":"","w-full":""},null,512),v(T,{absolute:"","bottom-3":"","left-3":"","border-0":"",p2:"",px3:"","text-sm":"","n-glass-effect":""},{default:b(()=>e[16]||(e[16]=[n("div",{grid:"~ cols-[20px_1fr] items-center gap-y-1"},[n("div",{"h-3":"","w-3":"","rounded-full":"","bg-hex-42b883":""}),n("div",{op50:""}," Component "),n("div",{"h-3":"","w-3":"","rounded-full":"","bg-hex-97c2fc":""}),n("div",{op50:""}," Global Component "),n("div",{"h-3":"","w-3":"","bg-hex-42b2b8":""}),n("div",{op50:""}," Page "),n("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 726 628","ml--1px":"","h-3":""},[n("path",{fill:"#4256b8","stroke-width":"4",d:"M723 314 543 625.8H183L3 314 183 2.2h360L723 314z"})]),n("div",{op50:""}," Layout "),n("div",{"h-3":"","w-3":"","rounded-full":"","bg-hex-b4b842":""}),n("div",{op50:""}," Library Component "),n("div",{"h-3":"","w-3":"","rounded-full":"","bg-hex-b86542":""}),n("div",{op50:""}," Unknown ")],-1)])),_:1}),v(D,{"model-value":!!(o.value&&o.value.component),top:a.value,border:"t l base","w-80":"",onClose:e[8]||(e[8]=w=>o.value=void 0)},{default:b(()=>[o.value&&o.value.component?(t(),_("div",tn,[v(U,{component:o.value.component,dependencies:se.value,dependents:le.value},null,8,["component","dependencies","dependents"]),n("div",sn,[v(j,{n:"primary solid",onClick:e[7]||(e[7]=w=>ae())},{default:b(()=>e[17]||(e[17]=[Q(" Filter to this component ")])),_:1})])])):k("",!0)]),_:1},8,["model-value","top"])])],64)}}}),an={hover:"bg-active",class:"group",flex:"~ gap2","w-full":"","items-center":"",rounded:"",px2:"",py1:""},pn={key:0,"ml--1":"","text-primary":""},rn=R({__name:"ComponentItem",props:{component:{},dependencies:{},dependents:{}},setup(r){const s=r,m=S(()=>s.component.filePath||s.component.file||s.component.__file||"");return(a,i)=>{const o=oe,p=te,c=ke("VDropdown"),u=Z,f=ee;return t(),_("div",an,[v(c,null,{popper:b(()=>[v(p,{component:a.component,dependencies:a.dependencies,dependents:a.dependents,"w-100":"",pt4:""},null,8,["component","dependencies","dependents"])]),default:b(()=>[n("button",{"hover:text-primary":"",class:Ce(a.dependents&&a.dependents.length===0?"op50":"")},[v(o,{component:a.component},null,8,["component"])],2)]),_:1}),a.dependents?.length?(t(),_("sup",pn," x"+W(a.dependents?.length),1)):k("",!0),a.component.global?(t(),x(u,{key:1,n:"green",title:"Registered at runtime as a global component",textContent:"runtime"})):k("",!0),H(a.$slots,"default"),m.value?(t(),x(f,{key:2,filepath:m.value,"text-sm":"",op25:"","group-hover:op75":""},null,8,["filepath"])):k("",!0)])}}}),un={flex:"~ gap-2 items-center"},dn={pl4:""},mn=R({__name:"ComponentsList",props:{components:{},relationships:{}},setup(r){const s=r,m=L(""),a=L("all"),i=S(()=>{const c=s.components.map(u=>fe(u,s.relationships));return a.value==="using"?c.filter(u=>u.dependents?.length):a.value==="not-used"?c.filter(u=>!u.dependents?.length):c}),o=S(()=>new ve(i.value,{keys:["component.pascalName","component.filePath","component.kebabName"]})),p=S(()=>{const c=[],u=new Map,f=[],g=[],h={user:0,lib:0,builtin:0,runtime:0};return(m.value?o.value.search(m.value).map(y=>y.item):i.value).forEach(y=>{const C=y.component;if(C.filePath&&_e(C.filePath)){const d=he(C.filePath);if(!d)return;d==="nuxt"?(f.push(y),h.builtin++):(u.has(d)||u.set(d,[]),u.get(d).push(y),h.lib++)}else C.global&&!C.filePath?(g.push(y),h.runtime++):(c.push(y),h.user++)}),{count:h,user:c,builtin:f,lib:u,runtime:g}});return(c,u)=>{const f=be,g=Me,h=K,V=rn,y=Te,C=Ue;return t(),_(M,null,[v(h,{search:m.value,"onUpdate:search":u[1]||(u[1]=d=>m.value=d),pb3:""},{actions:b(()=>[H(c.$slots,"default")]),default:b(()=>[n("div",un,[v(f,{icon:"carbon-filter",op50:""}),v(g,{modelValue:a.value,"onUpdate:modelValue":u[0]||(u[0]=d=>a.value=d),n:"primary sm",options:[{label:"All",value:"all"},{label:"Using",value:"using"},{label:"Not used",value:"not-used"}]},null,8,["modelValue"])])]),_:3},8,["search"]),p.value.user.length?(t(),x(y,{key:0,icon:"carbon-nominal",text:"User components",open:p.value.user.length<=N(O),description:`Total components: ${p.value.count.user}`},{default:b(()=>[(t(!0),_(M,null,B(p.value.user,d=>(t(),x(V,z({key:d.component.filePath,ref_for:!0},d),null,16))),128))]),_:1},8,["open","description"])):k("",!0),p.value.runtime.length?(t(),x(y,{key:1,icon:"carbon-load-balancer-global",open:p.value.runtime.length<=N(O),text:"Runtime components",description:`Total components: ${p.value.count.runtime}`},{default:b(()=>[(t(!0),_(M,null,B(p.value.runtime,d=>(t(),x(V,z({key:d.component.filePath,ref_for:!0},d),null,16))),128))]),_:1},8,["open","description"])):k("",!0),p.value.builtin.length?(t(),x(y,{key:2,icon:"simple-icons-nuxtdotjs",text:"Built-in components",description:`Total components: ${p.value.count.builtin}`},{default:b(()=>[(t(!0),_(M,null,B(p.value.builtin,d=>(t(),x(V,z({key:d.component.filePath,ref_for:!0},d),null,16))),128))]),_:1},8,["description"])):k("",!0),p.value.lib.size?(t(),x(y,{key:3,open:p.value.count.lib<=N(O),icon:"carbon-3d-mpr-toggle",text:"Components from libraries",description:`${p.value.count.lib} components from ${p.value.lib.size} packages`},{default:b(()=>[(t(!0),_(M,null,B(p.value.lib.entries(),([d,I])=>(t(),_("div",{key:d,"ml-2":""},[v(C,{text:`${d} (${I.length})`,py1:"",op50:""},null,8,["text"]),n("div",dn,[(t(!0),_(M,null,B(I,F=>(t(),x(V,z({key:F.component.filePath,ref_for:!0},F),null,16))),128))])]))),128))]),_:1},8,["open","description"])):k("",!0)],64)}}}),cn={relative:"","h-full":"","of-auto":""},fn={"flex-none":"",flex:"~ gap3"},Mn=R({__name:"components",setup(r){const s=ge(),m=Be(),a=Le(),{componentsView:i}=J("ui");function o(){s.value?.inspector?.instance&&s.value.inspector.enable()}function p(){i.value=i.value==="list"?"graph":"list"}return(c,u)=>{const f=X,g=Ie,h=Ve,V=$e("tooltip");return t(),_(M,null,[n("div",cn,[(t(),x(Ne(N(i)==="list"?mn:ln),{components:N(m),relationships:N(a)},{default:b(()=>[n("div",fn,[Y(v(f,{"text-lg":"",border:!1,icon:N(i)==="graph"?"i-carbon-list":"i-carbon-network-4",title:"Toggle view",onClick:p},null,8,["icon"]),[[V,"Toggle View",void 0,{"bottom-end":!0}]]),N(s)?.inspector?.instance?Y((t(),x(f,{key:0,"text-lg":"",border:!1,icon:"i-tabler-focus-2",title:"Inspect Vue components",onClick:o},null,512)),[[V,"Inspect Vue components",void 0,{"bottom-end":!0}]]):k("",!0)])]),_:1},8,["components","relationships"]))]),v(h,null,{default:b(()=>[v(g)]),_:1})],64)}}});export{Mn as default};
|
|
1
|
+
import{J as ie,f as X,Q as pe,R as re,I as ue,S as de,c as Y,T as ce,U as me,V as fe,N as ve,W as _e,X as he,E as be,b as ge}from"./kul02k0k.js";import{Q as t,S as _,U as n,k as R,l as S,a6 as Q,a5 as W,a0 as v,u as N,M as x,W as k,F as T,ab as B,V as H,b as L,j as ye,x as we,c as xe,$ as b,y as E,R as ke,Y as Ce,a1 as z,ae as $e,a7 as Ne,a8 as J}from"./vendor/json-editor-vue-kmaz80fw.js";import{_ as Ve}from"./help-fab.vue-kh0hzs3x.js";import{_ as Se}from"./ncheckbox.vue-hmuefhp8.js";import{_ as K}from"./nnavbar.vue-hsot3qp4.js";import{_ as Z}from"./nbadge-dq7969id.js";import{_ as ee}from"./filepath-item.vue-cjrrk3ln.js";import{_ as Pe}from"./ndrawer.vue-mv80pm2y.js";import{N as De}from"./vendor/vis-dlwijd5n.js";import{_ as Te}from"./nselect-tabs.vue-mlu3my71.js";import{_ as Ue}from"./nsection-block-czz9t4by.js";import{_ as Me}from"./nicon-title.vue-oe3ckr8a.js";import{D as O}from"./constants-b32h69zq.js";import{u as Be,a as Le}from"./state-components-mzokhl93.js";import"./vendor/unocss-fae7bffg.js";import"./vendor/shiki-bnvxb5wv.js";const Re={class:"markdown-body"},Ie={__name:"components",setup(r,{expose:s}){return s({frontmatter:{}}),(a,i)=>(t(),_("div",Re,i[0]||(i[0]=[n("h1",null,"Components",-1),n("p",null,"Vue Components allow us to split the UI into independent and reusable pieces, and think about each piece in isolation. This is very similar to how we nest native HTML elements, but Vue implements its own component model that allow us to encapsulate custom content and logic in each component.",-1),n("p",null,"Components placed in the components/ directory are automatically registered by Nuxt. They can be used in your templates without importing them.",-1),n("p",null,[n("a",{href:"https://nuxt.com/docs/guide/directory-structure/components",target:"_blank",rel:"noopener"},"Learn more in the documentation")],-1)])))}},Fe=/\d/,Ge=["-","_","/","."];function Ee(r=""){if(!Fe.test(r))return r!==r.toLowerCase()}function Ae(r,s){const c=Ge,a=[];if(!r||typeof r!="string")return a;let i="",o,p;for(const m of r){const u=c.includes(m);if(u===!0){a.push(i),i="",o=void 0;continue}const f=Ee(m);if(p===!1){if(o===!1&&f===!0){a.push(i),i=m,o=f;continue}if(o===!0&&f===!1&&i.length>1){const g=i.at(-1);a.push(i.slice(0,Math.max(0,i.length-1))),i=g+m,o=f;continue}}i+=m,o=f,p=u}return a.push(i),a}function ze(r){return r?r[0].toUpperCase()+r.slice(1):""}function ne(r,s){return r?(Array.isArray(r)?r:Ae(r)).map(c=>ze(c)).join(""):""}const We={"text-sm":"","font-mono":""},oe=R({__name:"ComponentName",props:{component:{}},setup(r){const s=r,c=S(()=>s.component.pascalName||ne(s.component.name||s.component.__name||s.component.kebabName||""));return(a,i)=>(t(),_("code",We,[i[0]||(i[0]=n("span",{mr1:"",op20:""},"<",-1)),Q(W(c.value),1),i[1]||(i[1]=n("span",{ml1:"",op20:""},"/>",-1))]))}}),He={flex:"~ col gap1","items-start":"","of-hidden":""},je={flex:"~ gap2",px3:""},Oe={px3:"",pb2:""},Qe={key:0,border:"t base","max-h-60":"","w-full":"","of-auto":"",px3:"",py3:""},Xe={"text-sm":""},qe={"text-primary":""},Je={key:0,flex:"~ col gap-2","items-start":"",pt3:"","text-sm":"",op75:""},Ye={key:1,border:"t base","max-h-60":"","w-full":"","of-auto":"",px3:"",py3:""},Ke={"text-sm":""},Ze={"text-primary":""},en={key:0,flex:"~ col gap-2","items-start":"",pt3:"","text-sm":"",op75:""},te=R({__name:"ComponentDetails",props:{component:{},dependencies:{},dependents:{}},setup(r){const s=r,c=S(()=>s.component.pascalName||ne(s.component.name||s.component.__name||s.component.kebabName||"")),a=S(()=>s.component.filePath||s.component.file||s.component.__file||""),i=ie();return(o,p)=>{const m=oe,u=X,f=Z,g=ee;return t(),_("div",He,[n("div",je,[v(m,{component:o.component},null,8,["component"]),v(u,{title:"Copy name","flex-none":"",icon:"carbon-copy",border:!1,onClick:p[0]||(p[0]=h=>N(i)(`<${c.value}></${c.value}>`,"component-name"))}),o.component.global?(t(),x(f,{key:0,n:"green",title:"Registered at runtime as a global component",textContent:"runtime"})):k("",!0)]),n("div",Oe,[a.value?(t(),x(g,{key:0,filepath:a.value,"w-full":"","text-sm":"",op40:"","group-hover:op75":""},null,8,["filepath"])):k("",!0)]),o.dependents?(t(),_("div",Qe,[n("div",Xe,[n("strong",qe,W(o.dependents.length),1),p[1]||(p[1]=n("span",{op50:""}," references",-1))]),o.dependents.length?(t(),_("div",Je,[(t(!0),_(T,null,B(o.dependents,h=>(t(),x(g,{key:h,filepath:h},null,8,["filepath"]))),128))])):k("",!0)])):k("",!0),o.dependencies?(t(),_("div",Ye,[n("div",Ke,[n("strong",Ze,W(o.dependencies.length),1),p[2]||(p[2]=n("span",{op50:""}," dependencies",-1))]),o.dependencies.length?(t(),_("div",en,[(t(!0),_(T,null,B(o.dependencies,h=>(t(),x(g,{key:h,filepath:h},null,8,["filepath"]))),128))])):k("",!0)])):k("",!0),H(o.$slots,"default")])}}}),nn={flex:"~ gap-x-3 gap-y-1 wrap","w-full":""},on={relative:"","h-full":"","w-full":""},tn={key:0,py4:"",pt4:"",flex:"~ col"},sn={border:"t base",p4:""},ln=R({__name:"ComponentsGraph",props:{components:{},relationships:{}},setup(r){const s=r,c=L(),a=L(),i=pe(),o=ye(),p=re(),m=ue(),u=de(),{componentsGraphShowNodeModules:f,componentsGraphShowGlobalComponents:g,componentsGraphShowPages:h,componentsGraphShowLayouts:V,componentsGraphShowWorkspace:y}=Y("ui"),C=L(),d=L(""),I=ce(d,300),F=S(()=>{const P=s.relationships||[];if(C.value){let e=function($){!$||l.has($)||(l.add($),$.deps.forEach(U=>{e(P.find(M=>M.id===U))}))};const l=new Set;return e(C.value),Array.from(l)}return P}),A=S(()=>{const P=F.value.map(l=>{const $=s.components.find(G=>G.filePath===l.id),U=p.value?.find(G=>G.file===l.id),M=u.value?.find(G=>G.file===l.id),j=l.id.replace(/\?.*$/,"").replace(/#.*$/,""),D=l.id.includes("/node_modules/")?"lib":$?$.global?"global":"user":M?"layout":U?"page":"unknown";if(!f.value&&D==="lib"||!h.value&&D==="page"||!V.value&&D==="layout"||!y.value&&D==="user"&&m.value&&!l.id.startsWith(m.value.rootDir)||!g.value&&D==="global")return null;const w=D==="layout"?"hexagon":D==="page"?"square":"dot",q=I.value&&!l.id.toLowerCase().includes(I.value.toLowerCase());return{id:l.id,label:j.split("/").splice(-1)[0].replace(/\.\w+$/,""),group:D,shape:w,size:15+Math.min(l.deps.length/2,8),font:{color:q?"#8885":i.value==="dark"?"white":"black"},color:q?"#8885":C.value?.id===l.id?"#82c742":void 0,extra:{id:l.id,component:$,page:U,layout:M,relationship:l}}}).filter(l=>!!l),e=F.value.flatMap(l=>l.deps.map($=>({from:l.id,to:$,arrows:{to:{enabled:!0,scaleFactor:.8}}})));return{nodes:P,edges:e}}),se=S(()=>o.value?.component?s.relationships?.find(e=>e.id===o.value?.component?.filePath)?.deps?.map(e=>s.relationships?.find(l=>l.id===e)?.id).filter(Boolean):[]),le=S(()=>o.value?.component?s.relationships?.filter(e=>e.deps.includes(o.value.component.filePath))?.map(e=>s.relationships?.find(l=>l.id===e.id)?.id).filter(Boolean):[]);we(()=>{const P={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"}}},e=new De(c.value,A.value,P);e.on("click",l=>{const $=l.nodes?.[0],U=A.value.nodes?.find(M=>M.id===$)?.extra;U&&(o.value=U)}),xe(A,()=>{e.setData(A.value)})});function ae(){C.value=o.value?.relationship,o.value=void 0}return(P,e)=>{const l=Se,$=K,U=me,M=te,j=X,D=Pe;return t(),_(T,null,[v($,{ref_key:"navbar",ref:a,search:d.value,"onUpdate:search":e[6]||(e[6]=w=>d.value=w),absolute:"","left-0":"","right-0":"","top-0":""},{actions:b(()=>[n("div",nn,[v(l,{modelValue:N(h),"onUpdate:modelValue":e[0]||(e[0]=w=>E(h)?h.value=w:null),n:"primary sm"},{default:b(()=>e[9]||(e[9]=[n("span",{op75:""},"Show pages",-1)])),_:1},8,["modelValue"]),v(l,{modelValue:N(V),"onUpdate:modelValue":e[1]||(e[1]=w=>E(V)?V.value=w:null),n:"primary sm"},{default:b(()=>e[10]||(e[10]=[n("span",{op75:""},"Show layouts",-1)])),_:1},8,["modelValue"]),v(l,{modelValue:N(y),"onUpdate:modelValue":e[2]||(e[2]=w=>E(y)?y.value=w:null),n:"primary sm"},{default:b(()=>e[11]||(e[11]=[n("span",{op75:""},"Show workspace",-1)])),_:1},8,["modelValue"]),v(l,{modelValue:N(f),"onUpdate:modelValue":e[3]||(e[3]=w=>E(f)?f.value=w:null),n:"primary sm"},{default:b(()=>e[12]||(e[12]=[n("span",{op75:""},"Show node_modules",-1)])),_:1},8,["modelValue"]),v(l,{modelValue:N(g),"onUpdate:modelValue":e[4]||(e[4]=w=>E(g)?g.value=w:null),n:"primary sm"},{default:b(()=>e[13]||(e[13]=[n("span",{op75:""},"Show global components",-1)])),_:1},8,["modelValue"])]),C.value?(t(),_("button",{key:0,flex:"~ gap-1","flex-none":"","items-center":"","rounded-full":"","bg-gray:20":"",py1:"",pl3:"",pr2:"","text-xs":"",op50:"","hover:op100":"",onClick:e[5]||(e[5]=w=>C.value=void 0)},e[14]||(e[14]=[Q(" Clear filter "),n("div",{"i-carbon-close":""},null,-1)]))):k("",!0),e[15]||(e[15]=n("div",{"flex-auto":""},null,-1)),H(P.$slots,"default")]),_:3},8,["search"]),n("div",on,[n("div",{ref_key:"container",ref:c,"h-full":"","w-full":""},null,512),v(U,{absolute:"","bottom-3":"","left-3":"","border-0":"",p2:"",px3:"","text-sm":"","n-glass-effect":""},{default:b(()=>e[16]||(e[16]=[n("div",{grid:"~ cols-[20px_1fr] items-center gap-y-1"},[n("div",{"h-3":"","w-3":"","rounded-full":"","bg-hex-42b883":""}),n("div",{op50:""}," Component "),n("div",{"h-3":"","w-3":"","rounded-full":"","bg-hex-97c2fc":""}),n("div",{op50:""}," Global Component "),n("div",{"h-3":"","w-3":"","bg-hex-42b2b8":""}),n("div",{op50:""}," Page "),n("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 726 628","ml--1px":"","h-3":""},[n("path",{fill:"#4256b8","stroke-width":"4",d:"M723 314 543 625.8H183L3 314 183 2.2h360L723 314z"})]),n("div",{op50:""}," Layout "),n("div",{"h-3":"","w-3":"","rounded-full":"","bg-hex-b4b842":""}),n("div",{op50:""}," Library Component "),n("div",{"h-3":"","w-3":"","rounded-full":"","bg-hex-b86542":""}),n("div",{op50:""}," Unknown ")],-1)])),_:1}),v(D,{"model-value":!!(o.value&&o.value.component),top:a.value,border:"t l base","w-80":"",onClose:e[8]||(e[8]=w=>o.value=void 0)},{default:b(()=>[o.value&&o.value.component?(t(),_("div",tn,[v(M,{component:o.value.component,dependencies:se.value,dependents:le.value},null,8,["component","dependencies","dependents"]),n("div",sn,[v(j,{n:"primary solid",onClick:e[7]||(e[7]=w=>ae())},{default:b(()=>e[17]||(e[17]=[Q(" Filter to this component ")])),_:1})])])):k("",!0)]),_:1},8,["model-value","top"])])],64)}}}),an={hover:"bg-active",class:"group",flex:"~ gap2","w-full":"","items-center":"",rounded:"",px2:"",py1:""},pn={key:0,"ml--1":"","text-primary":""},rn=R({__name:"ComponentItem",props:{component:{},dependencies:{},dependents:{}},setup(r){const s=r,c=S(()=>s.component.filePath||s.component.file||s.component.__file||"");return(a,i)=>{const o=oe,p=te,m=ke("VDropdown"),u=Z,f=ee;return t(),_("div",an,[v(m,null,{popper:b(()=>[v(p,{component:a.component,dependencies:a.dependencies,dependents:a.dependents,"w-100":"",pt4:""},null,8,["component","dependencies","dependents"])]),default:b(()=>[n("button",{"hover:text-primary":"",class:Ce(a.dependents&&a.dependents.length===0?"op50":"")},[v(o,{component:a.component},null,8,["component"])],2)]),_:1}),a.dependents?.length?(t(),_("sup",pn," x"+W(a.dependents?.length),1)):k("",!0),a.component.global?(t(),x(u,{key:1,n:"green",title:"Registered at runtime as a global component",textContent:"runtime"})):k("",!0),H(a.$slots,"default"),c.value?(t(),x(f,{key:2,filepath:c.value,"text-sm":"",op25:"","group-hover:op75":""},null,8,["filepath"])):k("",!0)])}}}),un={flex:"~ gap-2 items-center"},dn={pl4:""},cn=R({__name:"ComponentsList",props:{components:{},relationships:{}},setup(r){const s=r,c=L(""),a=L("all"),i=S(()=>{const m=s.components.map(u=>fe(u,s.relationships));return a.value==="using"?m.filter(u=>u.dependents?.length):a.value==="not-used"?m.filter(u=>!u.dependents?.length):m}),o=S(()=>new ve(i.value,{keys:["component.pascalName","component.filePath","component.kebabName"]})),p=S(()=>{const m=[],u=new Map,f=[],g=[],h={user:0,lib:0,builtin:0,runtime:0};return(c.value?o.value.search(c.value).map(y=>y.item):i.value).forEach(y=>{const C=y.component;if(C.filePath&&_e(C.filePath)){const d=he(C.filePath);if(!d)return;d==="nuxt"?(f.push(y),h.builtin++):(u.has(d)||u.set(d,[]),u.get(d).push(y),h.lib++)}else C.global&&!C.filePath?(g.push(y),h.runtime++):(m.push(y),h.user++)}),{count:h,user:m,builtin:f,lib:u,runtime:g}});return(m,u)=>{const f=be,g=Te,h=K,V=rn,y=Ue,C=Me;return t(),_(T,null,[v(h,{search:c.value,"onUpdate:search":u[1]||(u[1]=d=>c.value=d),pb3:""},{actions:b(()=>[H(m.$slots,"default")]),default:b(()=>[n("div",un,[v(f,{icon:"carbon-filter",op50:""}),v(g,{modelValue:a.value,"onUpdate:modelValue":u[0]||(u[0]=d=>a.value=d),n:"primary sm",options:[{label:"All",value:"all"},{label:"Using",value:"using"},{label:"Not used",value:"not-used"}]},null,8,["modelValue"])])]),_:3},8,["search"]),p.value.user.length?(t(),x(y,{key:0,icon:"carbon-nominal",text:"User components",open:p.value.user.length<=N(O),description:`Total components: ${p.value.count.user}`},{default:b(()=>[(t(!0),_(T,null,B(p.value.user,d=>(t(),x(V,z({key:d.component.filePath,ref_for:!0},d),null,16))),128))]),_:1},8,["open","description"])):k("",!0),p.value.runtime.length?(t(),x(y,{key:1,icon:"carbon-load-balancer-global",open:p.value.runtime.length<=N(O),text:"Runtime components",description:`Total components: ${p.value.count.runtime}`},{default:b(()=>[(t(!0),_(T,null,B(p.value.runtime,d=>(t(),x(V,z({key:d.component.filePath,ref_for:!0},d),null,16))),128))]),_:1},8,["open","description"])):k("",!0),p.value.builtin.length?(t(),x(y,{key:2,icon:"simple-icons-nuxtdotjs",text:"Built-in components",description:`Total components: ${p.value.count.builtin}`},{default:b(()=>[(t(!0),_(T,null,B(p.value.builtin,d=>(t(),x(V,z({key:d.component.filePath,ref_for:!0},d),null,16))),128))]),_:1},8,["description"])):k("",!0),p.value.lib.size?(t(),x(y,{key:3,open:p.value.count.lib<=N(O),icon:"carbon-3d-mpr-toggle",text:"Components from libraries",description:`${p.value.count.lib} components from ${p.value.lib.size} packages`},{default:b(()=>[(t(!0),_(T,null,B(p.value.lib.entries(),([d,I])=>(t(),_("div",{key:d,"ml-2":""},[v(C,{text:`${d} (${I.length})`,py1:"",op50:""},null,8,["text"]),n("div",dn,[(t(!0),_(T,null,B(I,F=>(t(),x(V,z({key:F.component.filePath,ref_for:!0},F),null,16))),128))])]))),128))]),_:1},8,["open","description"])):k("",!0)],64)}}}),mn={relative:"","h-full":"","of-auto":""},fn={"flex-none":"",flex:"~ gap3"},Tn=R({__name:"components",setup(r){const s=ge(),c=Be(),a=Le(),{componentsView:i}=Y("ui");function o(){s.value?.inspector?.instance&&s.value.inspector.enable()}function p(){i.value=i.value==="list"?"graph":"list"}return(m,u)=>{const f=X,g=Ie,h=Ve,V=$e("tooltip");return t(),_(T,null,[n("div",mn,[(t(),x(Ne(N(i)==="list"?cn:ln),{components:N(c),relationships:N(a)},{default:b(()=>[n("div",fn,[J(v(f,{"text-lg":"",border:!1,icon:N(i)==="graph"?"i-carbon-list":"i-carbon-network-4",title:"Toggle view",onClick:p},null,8,["icon"]),[[V,"Toggle View",void 0,{"bottom-end":!0}]]),N(s)?.inspector?.instance?J((t(),x(f,{key:0,"text-lg":"",border:!1,icon:"i-tabler-focus-2",title:"Inspect Vue components",onClick:o},null,512)),[[V,"Inspect Vue components",void 0,{"bottom-end":!0}]]):k("",!0)])]),_:1},8,["components","relationships"]))]),v(h,null,{default:b(()=>[v(g)]),_:1})],64)}}});export{Tn as default};
|
package/dist/client/_nuxt/{composable-item.vue-mdhcy97i.js → composable-item.vue-d0mp4x9i.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as
|
|
1
|
+
import{_ as I}from"./nmarkdown.vue-gqjdqnvm.js";import{J as U,K as V,f as $}from"./kul02k0k.js";import{_ as D}from"./filepath-item.vue-cjrrk3ln.js";import{C as y}from"./constants-b32h69zq.js";import{k as E,l,R as F,Q as s,M as r,$ as i,U as o,W as u,a0 as S,u as k,a6 as d,S as c,F as x,a5 as v,ab as j,Y as M}from"./vendor/json-editor-vue-kmaz80fw.js";const W={"hover:text-primary":""},z={key:0,"text-primary":""},J={"max-w-100":""},K={px4:"",py3:"","text-sm":""},L={flex:"~ gap2",n:"primary xs"},O={border:"t base","max-h-60":"","of-auto":"",px4:"",py3:""},Q={"text-sm":""},R={"text-primary":""},T={flex:"~ col gap-2","items-start":"",pt3:"","text-sm":"",op75:""},Y={key:1,"text-sm":"",op50:""},X=E({__name:"ComposableItem",props:{item:{},metadata:{},filepath:{},counter:{type:Boolean,default:!0},classes:{default:"px2 py1 text-sm bg-gray:5 "}},setup(b){const t=b,g=U(),C=V(),m=l(()=>t.item.as||t.item.name),n=l(()=>t.metadata?.injectionUsage?.[m.value]?.count||0),h=l(()=>(t.metadata?.injectionUsage?.[m.value]?.moduleIds||[]).filter(a=>!a.endsWith("?macro=true"))),_=l(()=>t.item.meta?.docsUrl?t.item.meta.docsUrl:["nuxt","#app","nuxt3"].includes(t.item.from)?y.nuxt[t.item.name]:t.item.from==="vue"?y.vue[t.item.name]:null);return(a,e)=>{const w=I,f=$,N=D,B=F("VDropdown");return s(),r(B,{disabled:!t.metadata},{popper:i(()=>[o("div",J,[o("div",K,[a.item.meta?.description?(s(),r(w,{key:0,tag:"div",pb3:"","text-sm":"",markdown:a.item.meta.description},null,8,["markdown"])):u("",!0),o("div",L,[S(f,{icon:"carbon-copy",onClick:e[0]||(e[0]=p=>k(g)(m.value,"imports-name"))},{default:i(()=>e[2]||(e[2]=[d(" Copy ")])),_:1}),a.filepath?(s(),r(f,{key:0,icon:"carbon-code",onClick:e[1]||(e[1]=p=>a.filepath&&k(C)(a.filepath))},{default:i(()=>e[3]||(e[3]=[d(" Source ")])),_:1})):u("",!0),_.value?(s(),r(f,{key:1,icon:"carbon-catalog",to:_.value,target:"_blank"},{default:i(()=>e[4]||(e[4]=[d(" Docs ")])),_:1},8,["to"])):u("",!0)])]),o("div",O,[n.value?(s(),c(x,{key:0},[o("div",Q,[e[5]||(e[5]=o("span",{op50:""},"It has been referenced ",-1)),o("strong",R,v(n.value),1),e[6]||(e[6]=o("span",{op50:""}," times by:",-1))]),o("div",T,[(s(!0),c(x,null,j(h.value,p=>(s(),r(N,{key:p,filepath:p},null,8,["filepath"]))),128))])],64)):(s(),c("div",Y," Not in use via auto import. "))])])]),default:i(()=>[o("button",W,[o("code",{rounded:"","font-mono":"",class:M([a.metadata&&!n.value?"op30 hover:op100":"",a.classes])},[d(v(m.value)+" ",1),n.value&&a.counter?(s(),c("sup",z,"x"+v(n.value),1)):u("",!0)],2)])]),_:1},8,["disabled"])}}});export{X as _};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Q as q,Y as N,Z as j,$ as B,m as E,a0 as V,a1 as k,a2 as D,d as I,r as L,U as P,a3 as S}from"./kul02k0k.js";import{k as T,b as C,l as x,r as U,x as M,n as W,w as b,G as O,S as R,Q as n,M as u,$ as y,u as A,a7 as F,U as r,a6 as w,a5 as $,a0 as G}from"./vendor/json-editor-vue-kmaz80fw.js";import{_ as Q}from"./launch-page.vue-h5h1rmqz.js";import"./vendor/unocss-fae7bffg.js";import"./vendor/shiki-bnvxb5wv.js";import"./nmarkdown.vue-gqjdqnvm.js";import"./client-if03554a.js";const h=new Map,X=T({__name:"IframeView",props:{tab:{}},setup(f){const m=f,c=q(),d=C(),s=x(()=>m.tab.name),e=C(),t=U(N(d));M(()=>{const o=m.tab.view,l=o.persistent!==!1,_=["clipboard-write","clipboard-read"];if(h.get(s.value)&&l)e.value=h.get(s.value),e.value.style.visibility="visible";else{e.value=document.createElement("iframe"),e.value.setAttribute("allow",_.join("; ")),e.value.setAttribute("aria-label","Nuxt Devtools"),l&&h.set(s.value,e.value),e.value.src=o.src;try{e.value.style.opacity="0.01",e.value.onload=()=>{v(),i(),e.value.style.opacity="1"}}catch{e.value.style.opacity="1"}document.body.appendChild(e.value),W(p)}setTimeout(i,100)}),b(p),b(i),b(v),O(()=>{e.value&&(e.value.style.visibility="hidden")});function i(){if(!(!e.value||!e.value.contentWindow))try{const o=e.value.contentWindow.document.querySelector("html");o?.classList.toggle("dark",c.value==="dark"),o?.classList.toggle("light",c.value==="dark"),new MutationObserver(()=>{c.value=e.value?.contentWindow?.document.querySelector("html")?.classList.contains("dark")?"dark":"light"}).observe(o,{attributes:!0,attributeFilter:["class"]})}catch{}}const a=j();function v(){if(!(!e.value||!e.value.contentWindow))try{e.value.contentWindow.__NUXT_DEVTOOLS__=a.value}catch{}}function p(){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(o,l)=>(n(),R("div",{ref_key:"anchor",ref:d,"h-full":"","w-full":""},null,512))}}),Y={flex:"~ col gap2",mxa:"","items-center":""},Z={"text-xl":""},z={"text-rose":""},ne=T({__name:"custom-[name]",props:{name:{}},setup(f){const m=f,c=B(),d=E(),s=x(()=>m.name??c.params.name),e=V(),t=x(()=>e.value.find(i=>i.name===s.value));return M(()=>{t.value?t.value.requireAuth&&!k.value&&D():setTimeout(()=>{t.value||d.push("/modules/overview")},2e3)}),(i,a)=>{const v=I,p=S,o=X,l=Q,_=P;return t.value?t.value.requireAuth&&!A(k)?(n(),u(p,{key:1})):t.value.view.type==="iframe"?(n(),u(o,{key:2,tab:t.value},null,8,["tab"])):t.value.view.type==="vnode"?(n(),u(F(t.value.view.vnode),{key:3})):t.value.view.type==="launch"?(n(),u(l,{key:4,name:`custom-${t.value.name}`,icon:t.value.view.icon||t.value.icon,title:t.value.view.title||t.value.title,description:t.value.view.description,actions:t.value.view.actions,onAction:a[0]||(a[0]=g=>A(L).customTabAction(t.value.name,g))},null,8,["name","icon","title","description","actions"])):(n(),u(v,{key:5},{default:y(()=>[G(_,{flex:"~ col","h-full":"","items-center":"","justify-center":""},{default:y(()=>[w(" Unknown tab type "+$(t.value.view),1)]),_:1})]),_:1})):(n(),u(v,{key:0},{default:y(()=>[r("div",Y,[a[3]||(a[3]=r("div",{"i-carbon-queued":"",mb2:"","text-5xl":"",op50:""},null,-1)),r("p",Z,[a[1]||(a[1]=w(" Tab ")),r("code",z,$(s.value),1),a[2]||(a[2]=w(" not found "))]),a[4]||(a[4]=r("p",{op50:""}," It might because the module contributing this tab is not installed or enabled ",-1)),a[5]||(a[5]=r("p",{mt8:"","animate-pulse":""}," Redirecting to overview page... ",-1))])]),_:1}))}}});export{ne as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as o}from"./
|
|
1
|
+
import{_ as o}from"./kul02k0k.js";import{Q as t,S as s,U as r,V as a}from"./vendor/json-editor-vue-kmaz80fw.js";import"./vendor/unocss-fae7bffg.js";import"./vendor/shiki-bnvxb5wv.js";const n={},c={"h-full":"","of-auto":"","n-panel-grids":""},l={"h-full":"","bg-base":""};function _(e,d){return t(),s("div",c,[r("div",l,[a(e.$slots,"default")])])}const u=o(n,[["render",_]]);export{u as default};
|
package/dist/client/_nuxt/{duration-display.vue-kqe6a4wx.js → duration-display.vue-g20yjddp.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{k as i,l as u,Q as s,S as d,a6 as f,a5 as o,U as p,Y as c}from"./vendor/json-editor-vue-
|
|
1
|
+
import{k as i,l as u,Q as s,S as d,a6 as f,a5 as o,U as p,Y as c}from"./vendor/json-editor-vue-kmaz80fw.js";const l={"ml-1":"","text-xs":"",op50:""},_=i({__name:"DurationDisplay",props:{duration:{},factor:{default:1},color:{type:Boolean,default:!0}},setup(a){const t=a;function n(e){return t.color?e?(e=e*t.factor,e<.5?"text-gray:50":e>1e3?"text-red-400":e>500?"text-orange-400":e>200?"text-yellow-400":""):"text-gray-400":""}const r=u(()=>!t.duration||t.duration<1?["<1","ms"]:t.duration<1e3?[t.duration.toFixed(0),"ms"]:t.duration<1e3*60?[(t.duration/1e3).toFixed(1),"s"]:[(t.duration/1e3/60).toFixed(1),"min"]);return(e,m)=>(s(),d("div",{class:c(n(e.duration))},[f(o(r.value[0]),1),p("span",l,o(r.value[1]),1)],2))}});export{_};
|