@nuxt/devtools 1.3.8 → 1.3.9
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 +523 -3
- package/dist/chunks/vscode.mjs +1 -1
- package/dist/client/200.html +18 -18
- package/dist/client/404.html +18 -18
- package/dist/client/_nuxt/{DvDu1JUs.js → -vLCBS-N.js} +1 -1
- package/dist/client/_nuxt/{C8N9kWh2.js → 2LcXl48m.js} +1 -1
- package/dist/client/_nuxt/{B04hL9Ab.js → 2e6xxFgg.js} +1 -1
- package/dist/client/_nuxt/{pA_iBoe4.js → 9vVlwvR0.js} +2 -2
- package/dist/client/_nuxt/A4w2ZRz2.js +1 -0
- package/dist/client/_nuxt/{C7cYo4YF.js → B3Xn0-WD.js} +1 -1
- package/dist/client/_nuxt/{CbM9OHn3.js → B3xdBQzM.js} +1 -1
- package/dist/client/_nuxt/{QQ7YbgtC.js → BEWN4pmm.js} +1 -1
- package/dist/client/_nuxt/BHNRcs4v.js +1 -0
- package/dist/client/_nuxt/{Bxh-fvdv.js → BJnuIykn.js} +1 -1
- package/dist/client/_nuxt/BMkcc7VF.js +1 -0
- package/dist/client/_nuxt/{B_lF4o9u.js → BfZiPQjx.js} +1 -1
- package/dist/client/_nuxt/{o8QbmO42.js → BgkXDMve.js} +1 -1
- package/dist/client/_nuxt/{Xpd7UJs5.js → BgweL_3l.js} +1 -1
- package/dist/client/_nuxt/{DJdrWIcn.js → BiD_nEzt.js} +1 -1
- package/dist/client/_nuxt/Bjf-a2fi.js +1 -0
- package/dist/client/_nuxt/Bmn7JOho.js +1 -0
- package/dist/client/_nuxt/{BM3cCZms.js → Bsa9pMTD.js} +1 -1
- package/dist/client/_nuxt/{BTj8T8Us.js → C0RAjPaQ.js} +1 -1
- package/dist/client/_nuxt/{8q1pCtVS.js → C5ufIXkV.js} +1 -1
- package/dist/client/_nuxt/{DluxqTUE.js → C8cCu25J.js} +1 -1
- package/dist/client/_nuxt/{_OFeGLwh.js → C8k43jHS.js} +1 -1
- package/dist/client/_nuxt/{CGZO0Dbu.js → CDN3PKDC.js} +1 -1
- package/dist/client/_nuxt/{Dslz6rss.js → CG8l32IX.js} +1 -1
- package/dist/client/_nuxt/{QBzUTbSD.js → CHDbzgkk.js} +1 -1
- package/dist/client/_nuxt/{BnXFHUk0.js → CHVLsZmm.js} +1 -1
- package/dist/client/_nuxt/{CHQglk26.js → CSiYmMfO.js} +2 -2
- package/dist/client/_nuxt/{fwfpIEej.js → CVc_vzB8.js} +1 -1
- package/dist/client/_nuxt/CVnen6aX.js +1 -0
- package/dist/client/_nuxt/{DE5e3ZuV.js → CeCFyH2L.js} +1 -1
- package/dist/client/_nuxt/{mQFKENXH.js → Cfh5adMM.js} +1 -1
- package/dist/client/_nuxt/{GdB9kz-4.js → CktVnUy9.js} +1 -1
- package/dist/client/_nuxt/{CPUwo9Dx.js → Ctb-QkcA.js} +1 -1
- package/dist/client/_nuxt/{Cda7aUrs.js → D8-i-l8m.js} +1 -1
- package/dist/client/_nuxt/{BRFlSxxW.js → DCIux9Jq.js} +1 -1
- package/dist/client/_nuxt/{CfkdovQd.js → DDT2yUXF.js} +1 -1
- package/dist/client/_nuxt/{DdjW6vu9.js → DL9aipy8.js} +1 -1
- package/dist/client/_nuxt/{C2c19bzT.js → DMEbMliD.js} +1 -1
- package/dist/client/_nuxt/DMp3ub-8.js +1 -0
- package/dist/client/_nuxt/{D7m39p-9.js → DMviwfII.js} +1 -1
- package/dist/client/_nuxt/{BwKcIQOa.js → DbOyCHOq.js} +1 -1
- package/dist/client/_nuxt/{DeSj8VZN.js → Dcjed-xK.js} +3 -3
- package/dist/client/_nuxt/{CCEQErg8.js → DeJGQFsa.js} +1 -1
- package/dist/client/_nuxt/{dXjzJhiW.js → Diu0Y0PU.js} +1 -1
- package/dist/client/_nuxt/{DX-YUedo.js → DkQfqnYF.js} +1 -1
- package/dist/client/_nuxt/{CssX2CxZ.js → Dp08BkoM.js} +1 -1
- package/dist/client/_nuxt/{BjYCaXNT.js → H8p8AdfC.js} +1 -1
- package/dist/client/_nuxt/{Ckn823xU.js → JOMs3kJS.js} +1 -1
- package/dist/client/_nuxt/{CH-roGkP.js → OAG_rOo8.js} +1 -1
- package/dist/client/_nuxt/{DVk2I1gO.js → QIDSXraL.js} +1 -1
- package/dist/client/_nuxt/{D0h9jATl.js → ZTrlmdYI.js} +1 -1
- package/dist/client/_nuxt/{DEkvPDn8.js → b-sJbkBg.js} +1 -1
- package/dist/client/_nuxt/{BdSLTmjP.js → brJlGqJM.js} +1 -1
- package/dist/client/_nuxt/builds/latest.json +1 -1
- package/dist/client/_nuxt/builds/meta/a9356a90-0031-4b93-8375-47585faa7c3c.json +1 -0
- package/dist/client/_nuxt/{BLxIf9BH.js → dyz0QDHl.js} +1 -1
- package/dist/client/_nuxt/eUQ_X7Id.js +43 -0
- package/dist/client/_nuxt/error-404.D-YMsRWn.css +1 -0
- package/dist/client/_nuxt/error-500.B8squ7MD.css +1 -0
- package/dist/client/_nuxt/{DKSts1V4.js → nbOvh45q.js} +1 -1
- package/dist/client/_nuxt/{BS5FcDmG.js → pOm0j4bx.js} +1 -1
- package/dist/client/_nuxt/qnM-VzkH.js +9 -0
- package/dist/client/_nuxt/{BG5RUyXI.js → s01ATyxb.js} +1 -1
- package/dist/client/_nuxt/{wGyJxDW5.js → s9jguXLC.js} +1 -1
- package/dist/client/_nuxt/{Csl1JfEo.js → tIa4hiZQ.js} +1 -1
- package/dist/client/_nuxt/terminals.BIEho_Pa.css +1 -0
- package/dist/client/_nuxt/{Cuq1Z6bh.js → xORP-8Ow.js} +1 -1
- package/dist/client/index.html +18 -18
- package/dist/module.json +1 -1
- package/dist/runtime/plugins/view/client.mjs +4 -2
- package/package.json +6 -6
- package/dist/client/_nuxt/B6TDWpKk.js +0 -1
- package/dist/client/_nuxt/BvHZCDLj.js +0 -9
- package/dist/client/_nuxt/C3FSKLnj.js +0 -1
- package/dist/client/_nuxt/CSGOJSAd.js +0 -1
- package/dist/client/_nuxt/CwTcTc2N.js +0 -43
- package/dist/client/_nuxt/CyiHZscW.js +0 -1
- package/dist/client/_nuxt/D5ctTtkd.js +0 -1
- package/dist/client/_nuxt/DETXY6Xa.js +0 -1
- package/dist/client/_nuxt/DJS8TjB-.js +0 -1
- package/dist/client/_nuxt/builds/meta/8ac9da91-0524-4abf-a805-60b3d6199fe9.json +0 -1
- package/dist/client/_nuxt/error-404.C4UNnO0a.css +0 -1
- package/dist/client/_nuxt/error-500.BbJ9e2Fk.css +0 -1
- package/dist/client/_nuxt/terminals.dNTO8Cf0.css +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as I}from"./
|
|
1
|
+
import{_ as I}from"./b-sJbkBg.js";import{d as V,e as D,ac as U,a as c,at as $,o as s,h as r,j as i,k as o,p as l,i as j,f as e,v as u,m as _,F as v,t as h,n as E,G as F,_ as S}from"./eUQ_X7Id.js";import{_ as z}from"./CDN3PKDC.js";import{C as k}from"./BcJws1i5.js";const G={"hover:text-primary":""},L={key:0,"text-primary":""},M={"max-w-100":""},O={px4:"",py3:"","text-sm":""},T={flex:"~ gap2",n:"primary xs"},W={border:"t base","max-h-60":"","of-auto":"",px4:"",py3:""},q={"text-sm":""},A=o("span",{op50:""},"It has been referenced ",-1),H={"text-primary":""},J=o("span",{op50:""}," times by:",-1),K={flex:"~ col gap-2","items-start":"",pt3:"","text-sm":"",op75:""},P={key:1,"text-sm":"",op50:""},Z=V({__name:"ComposableItem",props:{item:{},metadata:{},filepath:{},counter:{type:Boolean,default:!0},classes:{default:"px2 py1 text-sm bg-gray:5 "}},setup(x){const t=x,b=D(),g=U(),m=c(()=>t.item.as||t.item.name),n=c(()=>t.metadata?.injectionUsage?.[m.value]?.count||0),C=c(()=>(t.metadata?.injectionUsage?.[m.value]?.moduleIds||[]).filter(a=>!a.endsWith("?macro=true"))),y=c(()=>t.item.meta?.docsUrl?t.item.meta.docsUrl:["nuxt","#app","nuxt3"].includes(t.item.from)?k.nuxt[t.item.name]:t.item.from==="vue"?k.vue[t.item.name]:null);return(a,p)=>{const w=I,f=S,N=z,B=$("VDropdown");return s(),r(B,{disabled:!t.metadata},{popper:i(()=>[o("div",M,[o("div",O,[a.item.meta?.description?(s(),r(w,{key:0,tag:"div",pb3:"","text-sm":"",markdown:a.item.meta.description},null,8,["markdown"])):l("",!0),o("div",T,[j(f,{icon:"carbon-copy",onClick:p[0]||(p[0]=d=>e(b)(e(m),"imports-name"))},{default:i(()=>[u(" Copy ")]),_:1}),a.filepath?(s(),r(f,{key:0,icon:"carbon-code",onClick:p[1]||(p[1]=d=>a.filepath&&e(g)(a.filepath))},{default:i(()=>[u(" Source ")]),_:1})):l("",!0),e(y)?(s(),r(f,{key:1,icon:"carbon-catalog",to:e(y),target:"_blank"},{default:i(()=>[u(" Docs ")]),_:1},8,["to"])):l("",!0)])]),o("div",W,[e(n)?(s(),_(v,{key:0},[o("div",q,[A,o("strong",H,h(e(n)),1),J]),o("div",K,[(s(!0),_(v,null,E(e(C),d=>(s(),r(N,{key:d,filepath:d},null,8,["filepath"]))),128))])],64)):(s(),_("div",P," Not in use via auto import. "))])])]),default:i(()=>[o("button",G,[o("code",{rounded:"","font-mono":"",class:F([a.metadata&&!e(n)?"op30 hover:op100":"",a.classes])},[u(h(e(m))+" ",1),e(n)&&a.counter?(s(),_("sup",L,"x"+h(e(n)),1)):l("",!0)],2)])]),_:1},8,["disabled"])}}});export{Z as _};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as D,ao as j,r as A,a as g,az as q,aA as B,ar as $,aB as E,aC as b,aD as M,aE as N,m as I,o as s,aF as L,P,aG as V,aH as C,aI as W,f as a,h as c,j as y,ay as O,A as R,k as u,v as w,t as T,L as S,i as F,as as U,aJ as G}from"./
|
|
1
|
+
import{d as D,ao as j,r as A,a as g,az as q,aA as B,ar as $,aB as E,aC as b,aD as M,aE as N,m as I,o as s,aF as L,P,aG as V,aH as C,aI as W,f as a,h as c,j as y,ay as O,A as R,k as u,v as w,t as T,L as S,i as F,as as U,aJ as G}from"./eUQ_X7Id.js";import{_ as z}from"./DMEbMliD.js";import"./b-sJbkBg.js";import"./A4w2ZRz2.js";const x=new Map,H=D({__name:"IframeView",props:{tab:{}},setup(f){const m=f,r=j(),v=A(),i=g(()=>m.tab.name),e=A(),t=q(B(v));$(()=>{const o=m.tab.view,l=o.persistent!==!1,h=["clipboard-write","clipboard-read"];if(x.get(i.value)&&l)e.value=x.get(i.value),e.value.style.visibility="visible";else{e.value=document.createElement("iframe"),e.value.setAttribute("allow",h.join("; ")),e.value.setAttribute("aria-label","Nuxt Devtools"),l&&x.set(i.value,e.value),e.value.src=o.src;try{e.value.style.opacity="0.01",e.value.onload=()=>{d(),n(),e.value.style.opacity="1"}}catch{e.value.style.opacity="1"}document.body.appendChild(e.value),E(_)}setTimeout(n,100)}),b(_),b(n),b(d),M(()=>{e.value&&(e.value.style.visibility="hidden")});function n(){if(!(!e.value||!e.value.contentWindow))try{const o=e.value.contentWindow.document.querySelector("html");o?.classList.toggle("dark",r.value==="dark"),o?.classList.toggle("light",r.value==="dark"),new MutationObserver(()=>{r.value=e.value?.contentWindow?.document.querySelector("html")?.classList.contains("dark")?"dark":"light"}).observe(o,{attributes:!0,attributeFilter:["class"]})}catch{}}const p=N();function d(){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:`${t.left}px`,top:`${t.top}px`,width:`${t.width}px`,height:`${t.height}px`,outline:"none"})}return(o,l)=>(s(),I("div",{ref_key:"anchor",ref:v,"h-full":"","w-full":""},null,512))}}),J={flex:"~ col gap2",mxa:"","items-center":""},X=u("div",{"i-carbon-queued":"",mb2:"","text-5xl":"",op50:""},null,-1),K={"text-xl":""},Q={"text-rose":""},Y=u("p",{op50:""}," It might because the module contributing this tab is not installed or enabled ",-1),Z=u("p",{mt8:"","animate-pulse":""}," Redirecting to overview page... ",-1),ne=D({__name:"custom-[name]",props:{name:{}},setup(f){const m=f,r=L(),v=P(),i=g(()=>m.name??r.params.name),e=V(),t=g(()=>e.value.find(n=>n.name===i.value));return $(()=>{t.value?t.value.requireAuth&&!C.value&&W():setTimeout(()=>{t.value||v.push("/modules/overview")},2e3)}),(n,p)=>{const d=R,_=G,o=H,l=z,h=U;return a(t)?a(t).requireAuth&&!("isDevAuthed"in n?n.isDevAuthed:a(C))?(s(),c(_,{key:1})):a(t).view.type==="iframe"?(s(),c(o,{key:2,tab:a(t)},null,8,["tab"])):a(t).view.type==="vnode"?(s(),c(O(a(t).view.vnode),{key:3})):a(t).view.type==="launch"?(s(),c(l,{key:4,name:`custom-${a(t).name}`,icon:a(t).view.icon||a(t).icon,title:a(t).view.title||a(t).title,description:a(t).view.description,actions:a(t).view.actions,onAction:p[0]||(p[0]=k=>("rpc"in n?n.rpc:a(S)).customTabAction(a(t).name,k))},null,8,["name","icon","title","description","actions"])):(s(),c(d,{key:5},{default:y(()=>[F(h,{flex:"~ col","h-full":"","items-center":"","justify-center":""},{default:y(()=>[w(" Unknown tab type "+T(a(t).view),1)]),_:1})]),_:1})):(s(),c(d,{key:0},{default:y(()=>[u("div",J,[X,u("p",K,[w(" Tab "),u("code",Q,T(a(i)),1),w(" not found ")]),Y,Z])]),_:1}))}}});export{ne as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as F}from"./
|
|
1
|
+
import{_ as F}from"./OAG_rOo8.js";import{_ as L}from"./Ctb-QkcA.js";import{_ as A}from"./CktVnUy9.js";import{d as E,P as G,be as W,r as V,bf as Y,N as Z,R as q,o as m,m as g,aa as z,f as a,t as $,p as w,F as B,i as s,h as H,j as u,k as h,l as M,v as p,V as J,Y as K,_ as O,Z as Q,bg as X,ab as ee,a as te,av as ae,aw as ne,bh as se,bd as oe}from"./eUQ_X7Id.js";const le={key:0},re={p4:"",flex:"~ col gap-1"},ue={class:"text-lg font-medium leading-6"},ie=h("p",{op50:""}," The following command will be executed in your terminal: ",-1),de={flex:"~ gap-3",mt2:"","justify-end":""},ve=E({__name:"NpmVersionCheck",props:{packageName:{},options:{},showVersion:{type:Boolean,default:!0}},setup(l){const t=l,e=G(),{info:n,update:i,state:y,processId:k,restart:c}=W(t.packageName,t.options),f=V(!0),_=V(!0),R=Y(),N=Z(),U=q();async function b(){const r=await i(async o=>N.start(o));J("npm:update",{packageName:t.packageName,oldVersion:n.value?.current}),r&&_.value&&R.value.push({id:r,message:`${t.packageName} has been updated. Do you want to restart the Nuxt server now?`}),r&&f.value&&(U.value=r,e.push("/modules/terminals"))}return(r,o)=>{const C=F,S=L,x=A,T=K,P=O,I=Q;return m(),g(B,null,[z(r.$slots,"default",{id:a(k),info:a(n),update:b,state:a(y),restart:a(c)},()=>[a(n)&&r.showVersion?(m(),g("code",le,$(`v${a(n).current}`),1)):w("",!0),a(n)?.latest?(m(),g(B,{key:1},[a(n).needsUpdate?(m(),g("button",{key:0,onClick:o[0]||(o[0]=v=>b())},[s(C,{n:"green",title:"updates available",textContent:"updates available"})])):(m(),H(C,{key:1,n:"gray",title:"latest",textContent:"latest"}))],64)):w("",!0)]),s(a(N),null,{default:u(({resolve:v,args:j})=>[s(I,{"model-value":!0,onClose:d=>v(!1)},{default:u(()=>[h("div",re,[h("h3",ue," Update "+$(t.packageName)+"? ",1),ie,s(S,{code:j[0],lang:"bash",my3:"",px4:"",py2:"",border:"~ base rounded",lines:!1},null,8,["code"]),s(x,{modelValue:a(f),"onUpdate:modelValue":o[1]||(o[1]=d=>M(f)?f.value=d:null),n:"primary"},{default:u(()=>[p(" Navigate to terminal ")]),_:1},8,["modelValue"]),s(x,{modelValue:a(_),"onUpdate:modelValue":o[2]||(o[2]=d=>M(_)?_.value=d:null),n:"primary"},{default:u(()=>[p(" Restart Nuxt server after update ")]),_:1},8,["modelValue"]),h("div",de,[s(T,{n:"sm amber","flex-auto":"",icon:"i-carbon-data-backup"},{default:u(()=>[p(" Please make sure to backup your project first. ")]),_:1}),s(P,{onClick:d=>v(!1)},{default:u(()=>[p(" Cancel ")]),_:2},1032,["onClick"]),s(P,{n:"solid primary",onClick:d=>v(!0)},{default:u(()=>[p(" Update ")]),_:2},1032,["onClick"])])])]),_:2},1032,["onClose"])]),_:1})],64)}}}),D=["pages","meta","components","imports","nuxt-config-schema","@nuxt/devtools","@nuxt/telemetry"];function ce(){return oe("getModulesList",async()=>(await $fetch("https://api.nuxt.com/modules?version=3")).modules.filter(t=>!D.includes(t.npm)&&t.compatibility.nuxt.includes(">=3")))}function ge(){return X("installed-modules",()=>{const l=ee(),t=ce();return te(()=>(l.value?._installedModules||[]).map(e=>{if(!e.entryPath)return;const n=!!(e.entryPath&&ae(e.entryPath)),i=e.meta?.name?e.meta?.name:e.entryPath?n?ne(e.entryPath):l.value?.rootDir?se(e.entryPath,l.value?.rootDir).path:void 0:void 0,y=!!l.value?.modules?.includes(i),k=t.value?.find(c=>c.npm===i)||t.value?.find(c=>c.name===i);return{name:i,isPackageModule:n,isUninstallable:y,info:k,...e}}).filter(e=>e&&(!e.name||!D.includes(e.name))))})}export{ve as _,ce as a,ge as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as t,o,m as s,G as a,p as n,aa as r,k as l,t as i}from"./
|
|
1
|
+
import{d as t,o,m as s,G as a,p as n,aa as r,k as l,t as i}from"./eUQ_X7Id.js";const c={flex:"~ gap-3","items-center":""},u=t({__name:"NIconTitle",props:{icon:{},text:{}},setup(p){return(e,m)=>(o(),s("div",c,[e.icon?(o(),s("div",{key:0,class:a(e.icon)},null,2)):n("",!0),r(e.$slots,"default",{},()=>[l("div",null,i(e.text),1)])]))}});export{u as _};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as u,ac as f,ab as c,a as k,bh as v,o as t,h as y,j as B,m as s,F as l,v as d,t as n,f as a,k as C,p as b,G as N,ay as g}from"./
|
|
1
|
+
import{d as u,ac as f,ab as c,a as k,bh as v,o as t,h as y,j as B,m as s,F as l,v as d,t as n,f as a,k as C,p as b,G as N,ay as g}from"./eUQ_X7Id.js";const w={key:0,op50:""},F=u({__name:"FilepathItem",props:{filepath:{},lineBreak:{type:Boolean},subpath:{type:Boolean},override:{}},setup(h){const r=h,m=f(),p=c(),o=k(()=>r.filepath&&p.value?v(r.filepath,p.value.rootDir):{path:r.filepath||""});return(e,i)=>(t(),y(g(e.filepath?"button":"span"),{class:N([e.filepath?"hover:underline":"",e.lineBreak?"":"ws-nowrap of-hidden truncate"]),"font-mono":"",title:e.override||e.filepath,onClick:i[0]||(i[0]=D=>e.filepath&&a(m)(e.filepath))},{default:B(()=>[e.override?(t(),s(l,{key:0},[d(n(e.override),1)],64)):a(o).moduleName?(t(),s(l,{key:1},[C("span",null,n(a(o).moduleName),1),e.subpath?(t(),s("span",w,n(a(o).path.slice(a(o).moduleName.length)),1)):b("",!0)],64)):(t(),s(l,{key:2},[d(n(a(o).path),1)],64))]),_:1},8,["class","title"]))}});export{F as _};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as s,a as l,o as a,h as i,j as p,aa as u,m as c,p as m,ax as _,x as k}from"./
|
|
1
|
+
import{d as s,a as l,o as a,h as i,j as p,aa as u,m as c,p as m,ax as _,x as k}from"./eUQ_X7Id.js";const d={key:0,"i-carbon:arrow-up-right":"","translate-y--1":"","text-xs":"",op50:""},g=s({__name:"NLink",props:{to:{},href:{},target:{},underline:{type:Boolean}},setup(o){const t=o,n=l(()=>t.href||t.to);return(e,h)=>{const r=k;return a(),i(r,_(n.value?{href:n.value,target:e.target,rel:e.target==="_blank"?"noopener noreferrer":null}:{},{class:{"n-link n-transition hover:n-link-hover n-link-base":n.value||e.underline}}),{default:p(()=>[u(e.$slots,"default"),n.value&&e.target==="_blank"?(a(),c("div",d)):m("",!0)]),_:3},16,["class"])}}});export{g as _};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as y,a0 as $,m as p,k as o,G as i,i as w,j as B,f as l,F as u,I as C,J as S,aa as s,p as d,o as r,v as f,t as v,h as b,y as k,z as I,a6 as N,q as V}from"./
|
|
1
|
+
import{d as y,a0 as $,m as p,k as o,G as i,i as w,j as B,f as l,F as u,I as C,J as S,aa as s,p as d,o as r,v as f,t as v,h as b,y as k,z as I,a6 as N,q as V}from"./eUQ_X7Id.js";import{_ as x}from"./C8k43jHS.js";const m=t=>(k("data-v-bae9fa8d"),t=t(),I(),t),z=["open"],T={"text-base":""},D={key:0,"text-sm":"",op50:""},F=m(()=>o("div",{class:"flex-auto"},null,-1)),j=m(()=>o("div",{class:"x-divider"},null,-1)),q=y({__name:"NSectionBlock",props:{icon:{},text:{},description:{},containerClass:{default:""},headerClass:{},collapse:{type:Boolean,default:!0},open:{type:Boolean,default:!0},padding:{type:[Boolean,String],default:!0}},setup(t){const a=$(t,"open",void 0,{passive:!0});function c(e){a.value=e.target.open}return(e,n)=>{const h=N,g=x;return r(),p(u,null,[o("details",{open:l(a),onToggle:n[0]||(n[0]=(..._)=>c&&c(..._))},[o("summary",{class:i(["cursor-pointer select-none hover:bg-active p4",e.collapse?"":"pointer-events-none"])},[w(g,{icon:e.icon,text:e.text,"text-xl":"",transition:"",class:i([l(a)?"op100":"op60",e.headerClass])},{default:B(()=>[o("div",null,[o("div",T,[s(e.$slots,"text",{},()=>[f(v(e.text),1)],!0)]),e.description||e.$slots.description?(r(),p("div",D,[s(e.$slots,"description",{},()=>[f(v(e.description),1)],!0)])):d("",!0)]),F,s(e.$slots,"actions",{},void 0,!0),e.collapse?(r(),b(h,{key:0,icon:"carbon-chevron-down",class:"chevron","cursor-pointer":"","place-self-start":"","text-base":"",op75:"",transition:"","duration-500":""})):d("",!0)]),_:3},8,["icon","text","class"])],2),n._lazyshow1||l(a)?(n._lazyshow1=!0,r(),p(u,null,[C(o("div",{class:i(["flex flex-col flex-gap2 pb6 pt2",typeof e.padding=="string"?e.padding:e.padding?"px4":""])},[s(e.$slots,"details",{},void 0,!0),o("div",{class:i([e.containerClass,"mt1"])},[s(e.$slots,"default",{},void 0,!0)],2),s(e.$slots,"footer",{},void 0,!0)],2),[[S,l(a)]])],64)):d("v-show-if",!0)],40,z),j],64)}}}),M=V(q,[["__scopeId","data-v-bae9fa8d"]]);export{M as _};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as D}from"./
|
|
1
|
+
import{_ as D}from"./BgweL_3l.js";import{_ as B}from"./Ctb-QkcA.js";import{o as c,m as _,k as s,d as S,r as h,b_ as j,b$ as P,aC as U,a as p,ah as E,i as l,j as u,F as f,U as G,f as i,l as I,n as R,t as v,G as W,h as z,as as A,A as H}from"./eUQ_X7Id.js";import{_ as L}from"./BgkXDMve.js";import"./A4w2ZRz2.js";const q={class:"markdown-body"},J=s("h1",null,"Virtual Files",-1),K=s("p",null,"Virtual files are generated on the fly to support the conventions of the framework, and to provide a better developer experience.",-1),M=[J,K],O={__name:"virtual-files",setup(x,{expose:o}){return o({frontmatter:{}}),(d,a)=>(c(),_("div",q,M))}},Q=O,T=["onClick"],X=s("div",{"x-divider":""},null,-1),Y={key:0,"h-full":"","of-hidden":"",flex:"~ col"},Z={border:"b base","flex-none":"",px4:"",py2:"","text-sm":"",op75:""},ee=s("span",{op75:""},"Select a file to start",-1),le=S({__name:"virtual-files",setup(x){const o=h(""),n=j(),d=P(),a=h();U(()=>{if(!d.value)return;const e=`/_vfs.json/${encodeURIComponent(d.value)}`;fetch(e,{headers:{accept:"application/json"}}).then(t=>t.json()).then(t=>a.value=t.current)});function k(e){if(n.value?.rootDir)return e.startsWith(n.value?.rootDir)?e.slice(n.value.rootDir.length):e}const m=p(()=>n.value?n.value.entries.filter(e=>!e.id.startsWith(`${n.value?.rootDir||""}/.nuxt/`)).sort((e,t)=>e.id.localeCompare(t.id)):[]),b=p(()=>new E(m.value,{keys:["id","path"]})),y=p(()=>o.value?b.value.search(o.value).map(e=>e.item):m.value);return(e,t)=>{const $=D,g=B,C=A,F=H,N=G,V=Q,w=L;return c(),_(f,null,[l(N,{class:"virtual-files","storage-key":"tab-virtual-files"},{left:u(()=>[l($,{search:i(o),"onUpdate:search":t[0]||(t[0]=r=>I(o)?o.value=r:null),"no-padding":"",p3:""},null,8,["search"]),(c(!0),_(f,null,R(i(y),r=>(c(),_(f,{key:r.id},[s("button",{block:"","w-full":"","select-none":"",truncate:"",px2:"",py1:"","text-start":"","text-sm":"","font-mono":"",class:W(r.id===i(a)?.id?"text-primary n-bg-active":"text-secondary hover:n-bg-hover"),onClick:te=>d.value=r.id},v(k(r.id)),11,T),X],64))),128))]),right:u(()=>[i(a)?.content?(c(),_("div",Y,[s("div",Z,[s("code",null,v(i(a).id),1)]),l(g,{"h-full":"","of-auto":"","text-sm":"",code:i(a).content,lang:"typescript"},null,8,["code"])])):(c(),z(F,{key:1},{default:u(()=>[l(C,{px6:"",py2:""},{default:u(()=>[ee]),_:1})]),_:1}))]),_:1}),l(w,null,{default:u(()=>[l(V)]),_:1})],64)}}});export{le as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{d as B,a as w,aK as W,o as n,m as r,k as t,a9 as T,f as l,t as k,ad as O,F as f,n as E,h as y,r as C,w as Y,aB as q,a1 as j,bW as K,p as x,i as m,G as z,q as U,ao as X,e as Z,at as P,j as v,ax as Q,v as F,_ as G,aM as ee,am as se,b2 as te,bX as ne,ab as oe,N as ae,ac as le,A as ie,L as R,a5 as re,Z as ce}from"./CwTcTc2N.js";import{_ as V}from"./DJdrWIcn.js";import{_ as H}from"./CH-roGkP.js";import{_ as pe}from"./BTj8T8Us.js";import{e as de}from"./DX-YUedo.js";import{_ as ue}from"./C7cYo4YF.js";import{_ as me}from"./C3FSKLnj.js";import{_ as ke}from"./C2c19bzT.js";import{_ as he}from"./Dslz6rss.js";import{_ as _e}from"./DeSj8VZN.js";import{_ as fe}from"./o8QbmO42.js";import"./DEkvPDn8.js";import"./CSGOJSAd.js";import"./CGZO0Dbu.js";import"./BcJws1i5.js";import"./CPUwo9Dx.js";const ye=B({__name:"TimelineItemFunction",props:{item:{}},setup(_){const p=_,c=w(()=>W(p.item.name,50,60,"_op_")),e=w(()=>c.value.replace(/_op_/,"1")),a=w(()=>W(p.item.name,50,40)),i=w(()=>c.value.replace(/_op_/,"0.2"));return(o,d)=>(n(),r("button",{class:"group",style:T({color:l(e),borderLeft:`2px solid ${l(e)}`}),relative:"","text-sm":"",transition:"","hover:z-1000":"","bg-base":""},[t("div",{style:T({backgroundColor:l(i)}),absolute:"","bottom-0":"","left--1px":"","top-0":"","w-full":"","text-sm":"","transition-all":"","duration-300":""},null,4),t("div",{style:T({color:l(a),"--c":l(e)}),border:"r-2 t-2 y-2 transparent","min-w-max":"",px1:"","text-left":"","group-hover":"border-$c"},k(o.item.name),5)],4))}}),ve={relative:"","h-full":""},be={absolute:"","left-2":"","top-2.3em":"","text-xs":"",op50:""},ge=B({__name:"TimelineSegment",props:{segment:{}},emits:["select"],setup(_,{emit:p}){const c=_,e=p,a=O(()=>c.segment.start,{updateInterval:1e3,showSecond:!0,controls:!1,messages:{justNow:"",past:i=>i,future:i=>i,invalid:"-",second:i=>i?`${i}s`:"",minute:i=>`${i}m`,hour:i=>`${i}h`,week:i=>`${i}w`,day:i=>`${i}d`,month:i=>`${i}mo`,year:i=>`${i}y`}});return(i,o)=>{const d=ye;return n(),r("div",ve,[t("button",{absolute:"","left-0":"","right-0":"","top-0":"","bg-green:5":"",px2:"",py1:"","text-left":"","text-xs":"","text-green6":"","font-mono":"",onClick:o[0]||(o[0]=s=>i.segment.route?e("select",i.segment.route):void 0)},k(i.segment.route?.event.to),1),t("div",be,k(l(a))+" ago ",1),t("div",null,[(n(!0),r(f,null,E(i.segment.functions,(s,u)=>(n(),y(d,{key:u,item:s.event,style:T({position:"absolute",minWidth:`${s.relativeWidth*100}%`,maxWidth:`${s.relativeWidth*100}%`,top:`${4+s.layer*1.6}em`,left:`${s.relativeStart*100}%`}),onClick:h=>e("select",s)},null,8,["item","style","onClick"]))),128))])])}}}),xe=3e3,$e=50;function Ae(_){const p=[];let c={start:0,end:0,events:[],functions:[],duration:0};for(const e of _){const a=e.end||e.start;(e.start-c.end>xe||e.type==="route")&&(c={start:e.start,end:a,events:[],functions:[],duration:0},p.push(c)),c.events.push(e),c.end=a+$e}return p.forEach((e,a)=>{const i=e.end-e.start,o=[];e.duration=i,e.previousGap=a>0?e.start-p[a-1].end:0,e.events.forEach(d=>{const s=d.end||d.start;let u=0;d.type!=="route"&&(u=o.findIndex($=>$<=d.start),u===-1?(u=o.length,o.push(s+1e3)):o[u]=s+1e3);const h={event:d,segment:e,relativeStart:(d.start-e.start)/i,relativeWidth:(s-d.start)/i,layer:u};d.type==="function"?e.functions.push(h):e.route=h})}),p}const De={relative:""},Ce={key:0,border:"x base","h-full":"","flex-inline":"","bg-true-gray-1":"",py15:"","text-xs":"","write-vertical-left":"",op50:"","dark:bg-true-gray-9":""},Be=B({__name:"TimelineTable",props:{data:{}},emits:["select"],setup(_,{emit:p}){const c=_,e=p,a=C(),i=C(),o=C(),d=C(),s=C(!0),u=C(1.5),h=w(()=>Ae(c.data.events)),$=w(()=>(c.data.events.length,a.value?.scrollWidth||window.innerWidth));function A(){d.value&&(d.value.style.width=`${$.value}px`)}function S(){s.value&&a.value&&(a.value.scrollTo({left:a.value.scrollWidth-a.value.clientWidth,behavior:"smooth"}),o.value.scrollTo({left:a.value.scrollWidth-a.value.clientWidth,behavior:"smooth"}))}return Y(()=>c.data.events.length,async()=>{await q(),A(),S()},{flush:"post"}),j(a,"scroll",()=>{o.value.scrollLeft!==a.value.scrollLeft&&(A(),o.value.scrollLeft=a.value.scrollLeft,s.value=a.value.scrollLeft>=a.value.scrollWidth-a.value.clientWidth)}),j(o,"scroll",()=>{o.value.scrollLeft!==a.value.scrollLeft&&(A(),a.value.scrollLeft=o.value.scrollLeft)}),j(a,"wheel",b=>{b.altKey?(u.value=K(u.value+b.deltaY/200,.5,3),A()):a.value.scrollLeft+=b.deltaY}),(b,L)=>{const D=V,M=ge;return n(),r(f,null,[t("div",De,[t("div",{ref_key:"minimap",ref:i,border:"t b base",relative:"","h-50px":"","ws-nowrap":"","border-base":""},[(n(!0),r(f,null,E(l(h),(g,N)=>(n(),r("div",{key:N,relative:"","h-full":"","flex-inline":"",style:T({width:`${Math.max(100,g.duration/10)/l($)*100}%`})},[(n(!0),r(f,null,E(g.functions,(I,J)=>(n(),r("div",{key:J,"h-3px":"",rounded:"",style:T({width:`max(${I.relativeWidth*100}%, 10px)`,position:"absolute",top:`${I.layer*4}px`,left:`${I.relativeStart*100}%`,backgroundColor:("getHashColorFromString"in b?b.getHashColorFromString:l(W))(I.event.name,50,60)})},null,4))),128)),g.route?(n(),r("div",{key:0,absolute:"","top-0":"","h-full":"","w-px":"","border-l":"","border-green6":"",op10:"",style:T({left:`${g.route.relativeStart*100}%`})},null,4)):x("",!0)],4))),128))],512),t("div",{ref_key:"minimapScroller",ref:o,class:"timeline-scroller",absolute:"","inset-0":"","h-full":"","w-full":"","of-x-scroll":""},[t("div",{ref_key:"minimapScrollerInner",ref:d,"h-1px":""},null,512)],512)]),t("div",{ref_key:"scroller",ref:a,relative:"","h-full":"","w-full":"","of-x-scroll":"","of-y-hidden":"","ws-nowrap":"","n-panel-grids":""},[(n(!0),r(f,null,E(l(h),(g,N)=>(n(),r(f,{key:N},[g.previousGap&&g.previousGap>=200?(n(),r("div",Ce,[m(D,{op50:"",duration:g.previousGap,color:!1},null,8,["duration"])])):x("",!0),m(M,{"flex-inline":"","of-x-hidden":"","hover:of-x-visible":"","bg-base":"",class:z(N===l(h).length-1?"border-r border-base":""),segment:g,style:T({width:`${Math.max(50,g.duration/10)*l(u)}px`}),onSelect:L[0]||(L[0]=I=>e("select",I))},null,8,["class","segment","style"])],64))),128))],512)],64)}}}),we=U(Be,[["__scopeId","data-v-27e8fb2d"]]),Te={border:"t base",flex:"~ col","h-full":"","of-y-auto":"","text-sm":""},Se=["onClick"],Ne=t("div",{"i-carbon-function":"",op50:""},null,-1),Fe={flex:"~","ml--1":"","font-mono":""},Ee=t("div",{op30:""}," ( ",-1),Le={key:0,mr2:"",op30:""},Ie={op75:""},Me=t("div",{op30:""}," ) ",-1),We=t("div",{"mr-1":"","h-7":"","w-7":"",flex:"","rounded-lg":"","bg-primary:5":"",p1:"","text-green6":""},[t("div",{"i-carbon-direction-rotary-right":"",ma:"","text-lg":""})],-1),Ve={flex:"~ col items-start"},je={"text-xs":"","font-mono":"",op30:""},Oe={"text-green":"","font-bold":"","font-mono":""},ze=t("div",{"flex-auto":""},null,-1),Ge=t("div",{"min-h-100":""},null,-1),Re=B({__name:"TimelineList",props:{data:{}},emits:["select"],setup(_,{emit:p}){const c=p;return(e,a)=>{const i=V;return n(),r("div",Te,[(n(!0),r(f,null,E(e.data.events,(o,d)=>(n(),r("button",{key:d,border:"b base",px3:"",py2:"",flex:"~ items-center gap-2",hover:"bg-active",onClick:s=>c("select",o)},[o.type==="function"?(n(),r(f,{key:0},[Ne,t("div",{"font-mono":"",style:T({color:o.type==="function"?("getHashColorFromString"in e?e.getHashColorFromString:l(W))(o.name,50,60):""})},k(o.name),5),t("div",Fe,[Ee,(n(!0),r(f,null,E(o.args,(s,u)=>(n(),r(f,{key:u},[u?(n(),r("div",Le," , ")):x("",!0),t("div",Ie,k(s===null?"null":s===void 0?"undefined":typeof s=="function"?"[function]":Array.isArray(s)?"[Array]":typeof s=="object"?"[object]":JSON.stringify(s)),1)],64))),128)),Me])],64)):(n(),r(f,{key:1},[We,t("div",Ve,[t("div",je,k(o.from),1),t("div",Oe,k(o.to),1)])],64)),ze,o.end?(n(),y(i,{key:2,duration:o.end-o.start,color:o.type==="function"},null,8,["duration","color"])):x("",!0)],8,Se))),128)),Ge])}}}),Pe={key:0,"text-blue":""},He={key:1,"text-purple":""},Je={key:2,"text-green":""},Ye={key:3,"text-gray":""},qe={key:4,"text-gray":""},Ke={key:5,"text-gray":""},Ue={key:0,"bg-red:10":"",px2:"",py1:"","text-red":""},Xe={key:1},Ze={p2:"","text-sm":"",border:"t base"},Qe=B({__name:"TimelineArgumentView",props:{value:{}},setup(_){const p=_,c=C(),e=C();function a(){try{c.value=JSON.parse(JSON.stringify(p.value))}catch(s){console.error(s),e.value=s}}const i=B({emits:["setup"],setup(s,{emit:u}){return u("setup"),()=>null}}),o=X(),d=Z();return(s,u)=>{const h=G,$=P("VMenu");return typeof s.value=="string"?(n(),r("div",Pe,k(JSON.stringify(s.value)),1)):typeof s.value=="number"?(n(),r("div",He,k(s.value),1)):typeof s.value=="boolean"?(n(),r("div",Je,k(s.value),1)):typeof s.value>"u"?(n(),r("div",Ye," undefined ")):typeof s.value=="function"?(n(),r("div",qe," [Function"+k(s.value.name?`: ${s.value.name}`:"")+"] ",1)):s.value===null?(n(),r("div",Ke," null ")):(n(),y($,{key:6,placement:"top"},{popper:v(()=>[m(l(i),{onSetup:a}),l(e)?(n(),r("div",Ue," Failed to display object: "+k(l(e)),1)):l(c)?(n(),r("div",Xe,[m(l(de),Q({"model-value":l(c)},s.$attrs,{class:["json-editor-vue",[l(o)==="dark"?"jse-theme-dark":""]],"main-menu-bar":!1,"navigation-bar":!1,"status-bar":!1,"read-only":!0,indentation:2,"tab-size":2}),null,16,["model-value","class"]),t("div",Ze,[m(h,{title:"Copy to clipboard",icon:"carbon-copy",onClick:u[0]||(u[0]=A=>l(d)(JSON.stringify(l(c),null,2),"timeline-argument"))},{default:v(()=>[F(" Copy ")]),_:1})])])):x("",!0)]),default:v(()=>[t("span",{"rounded-sm":"",px1:"","py0.5":"","text-sm":"",class:z([Array.isArray(s.value)?"text-amber bg-amber:10":"text-orange bg-orange:10"])},k(Array.isArray(s.value)?`[Array(${s.value.length})]`:"[Object]"),3)]),_:1}))}}}),es={key:0,"p-4":"",flex:"~ col gap-2","text-base":""},ss={"mx--1":""},ts={flex:"~ gap-1","font-mono":""},ns={key:1},os=t("span",{ml1:"",op30:""},"(",-1),as={key:0,op30:""},ls=t("span",{op30:""},")",-1),is={flex:"~ gap-1","text-sm":""},rs=t("span",{mx1:"",op50:""},"·",-1),cs={class:"text-sm text-gray-400"},ps=B({__name:"TimelineDetailsFunction",props:{record:{}},setup(_){const p=_,c=O(()=>p.record.start,{showSecond:!0}),e=ee(),a=w(()=>e.value?.metadata),i=w(()=>e.value?.imports.find(o=>o.as===p.record.name));return(o,d)=>{const s=H,u=pe,h=Qe,$=V,A=ue;return o.record?(n(),r("div",es,[t("div",ss,[m(s,{n:"yellow",textContent:"Function call"})]),t("div",ts,[l(i)?(n(),y(u,{key:0,item:l(i),metadata:l(a),counter:!1,classes:"px2 py1","mx--2":""},null,8,["item","metadata"])):(n(),r("span",ns,k(o.record.name),1)),os,(n(!0),r(f,null,E(o.record.args,(S,b)=>(n(),r(f,{key:b},[b?(n(),r("span",as,", ")):x("",!0),m(h,{value:S},null,8,["value"])],64))),128)),ls]),t("div",is,[o.record.end?(n(),y($,{key:0,duration:o.record.end-o.record.start},null,8,["duration"])):x("",!0),rs,t("div",cs,k(l(c)),1)]),o.record.stacktrace?(n(),y(A,{key:0,stacktrace:o.record.stacktrace,class:"text-xs text-gray-400"},null,8,["stacktrace"])):x("",!0)])):x("",!0)}}}),ds={key:0,"p-4":"",flex:"~ col gap-2"},us={"mx--1":""},ms={flex:"~ gap-1 items-center","font-mono":""},ks={op50:""},hs=t("span",{"i-carbon-arrow-right":"",op50:""},null,-1),_s={flex:"~ gap-1","text-sm":""},fs=t("span",{mx1:"",op50:""},"·",-1),ys={class:"text-sm text-gray-400"},vs=B({__name:"TimelineDetailsRoute",props:{record:{}},setup(_){const p=_,c=O(()=>p.record.start,{showSecond:!0});return(e,a)=>{const i=H,o=V;return e.record?(n(),r("div",ds,[t("div",us,[m(i,{n:"green",textContent:"Route Change"})]),t("div",ms,[t("span",ks,k(e.record.from),1),hs,t("span",null,k(e.record.to),1)]),t("div",_s,[e.record.end?(n(),y(o,{key:0,duration:e.record.end-e.record.start},null,8,["duration"])):x("",!0),fs,t("div",ys,k(l(c)),1)])])):x("",!0)}}}),bs={key:0,"h-screen":"","of-hidden":""},gs={"h-screen":"","w-full":"",flex:"","flex-col":""},xs={"h-10":"",flex:"~ gap-2 items-center justify-end",p2:"",px3:""},$s={"text-sm":""},As=t("div",{"flex-auto":""},null,-1),Ds={"min-h-50":"",px3:"",py2:""},Cs=B({__name:"TimelineView",setup(_){const p=se(),c=C("table"),e=C(),a=w(()=>p.value?.metrics.clientTimeline());function i(){a.value&&(a.value.events=[])}function o(){c.value=c.value==="table"?"list":"table"}return(d,s)=>{const u=P("VTooltip"),h=G,$=we,A=Re,S=ps,b=vs,L=me;return l(a)?(n(),r("div",bs,[t("div",gs,[t("div",xs,[m(u,{flex:""},{popper:v(()=>[t("div",$s,k(l(a).options.enabled?"Recording...":"Paused"),1)]),default:v(()=>[t("div",{"text-lg":"",class:z(l(a).options.enabled?"i-carbon-radio-button-checked text-primary animate-pulse":"i-carbon-pause-outline op30")},null,2)]),_:1}),l(a).options.enabled?(n(),y(h,{key:1,size:"small",ml1:"","text-sm":"",n:"orange",icon:"i-carbon-stop",onClick:s[1]||(s[1]=D=>l(a).options.enabled=!1)},{default:v(()=>[F(" Stop Tracking ")]),_:1})):(n(),y(h,{key:0,size:"small",ml1:"","text-sm":"",n:"primary",icon:"i-carbon-play",onClick:s[0]||(s[0]=D=>l(a).options.enabled=!0)},{default:v(()=>[F(" Start Tracking ")]),_:1})),As,m(h,{icon:l(c)==="table"?"i-carbon-roadmap":"i-carbon-list",class:"ml-2",title:"Toggle View",border:!1,onClick:o},null,8,["icon"]),m(h,{icon:"i-carbon-trash-can","hover-text-red":"",class:"ml-2",border:!1,onClick:i})]),l(c)==="table"?(n(),y($,{key:0,data:{...l(a)},onSelect:s[2]||(s[2]=D=>e.value=D.event)},null,8,["data"])):(n(),y(A,{key:1,data:{...l(a)},onSelect:s[3]||(s[3]=D=>e.value=D)},null,8,["data"]))]),m(L,{"model-value":!!l(e),"auto-close":"",transition:"bottom",left:"#nuxt-devtools-side-nav",onClose:s[4]||(s[4]=D=>e.value=void 0)},{default:v(()=>[t("div",Ds,[l(e)?.type==="function"?(n(),y(S,{key:0,record:l(e)},null,8,["record"])):l(e)?.type==="route"?(n(),y(b,{key:1,record:l(e)},null,8,["record"])):x("",!0)])]),_:1},8,["model-value"])])):x("",!0)}}}),Bs={class:"markdown-body"},ws=t("h1",null,"Timeline",-1),Ts=t("p",null,[t("blockquote",{"text-orange":"","bg-orange:10":"",py1:""}," This is an experimental feature ")],-1),Ss=te(`<p>Timeline tracks your route navigations and functions calls in your Nuxt application. It can be used to debug performance issues and to understand how your application works.</p><h2>Function calls</h2><p>Nuxt DevTools tracks function calls by wrapping them in the build time. It works for functions referenced by auto-imports, or explicit imports through <code>import {} from '#imports'</code>.</p><pre class="shiki shiki-themes vitesse-light vitesse-dark" style="background-color:#ffffff;--shiki-dark-bg:#121212;color:#393a34;--shiki-dark:#dbd7caee;" tabindex="0"><code><span class="line"><span style="color:#999999;--shiki-dark:#666666;"><</span><span style="color:#1E754F;--shiki-dark:#4D9375;">script</span><span style="color:#B07D48;--shiki-dark:#BD976A;"> setup</span><span style="color:#999999;--shiki-dark:#666666;">></span></span>
|
|
1
|
+
import{d as B,a as w,aK as V,o as n,m as r,k as t,a9 as T,f as l,t as k,ad as O,F as f,n as E,h as y,r as C,w as Y,aB as q,a1 as j,bV as K,p as x,i as m,G as z,q as U,ao as Z,e as X,at as P,j as v,ax as Q,v as F,_ as G,aM as ee,am as se,b2 as te,bW as ne,ab as oe,N as ae,ac as le,A as ie,L as R,a5 as re,Z as ce}from"./eUQ_X7Id.js";import{_ as W}from"./BiD_nEzt.js";import{_ as H}from"./OAG_rOo8.js";import{_ as pe}from"./C0RAjPaQ.js";import{e as de}from"./DkQfqnYF.js";import{_ as ue}from"./B3Xn0-WD.js";import{_ as me}from"./BMkcc7VF.js";import{_ as ke}from"./DMEbMliD.js";import{_ as he}from"./CG8l32IX.js";import{_ as _e}from"./Dcjed-xK.js";import{_ as fe}from"./BgkXDMve.js";import"./b-sJbkBg.js";import"./A4w2ZRz2.js";import"./CDN3PKDC.js";import"./BcJws1i5.js";import"./Ctb-QkcA.js";const ye=B({__name:"TimelineItemFunction",props:{item:{}},setup(_){const p=_,c=w(()=>V(p.item.name,50,60,"_op_")),e=w(()=>c.value.replace(/_op_/,"1")),a=w(()=>V(p.item.name,50,40)),i=w(()=>c.value.replace(/_op_/,"0.2"));return(o,d)=>(n(),r("button",{class:"group",style:T({color:l(e),borderLeft:`2px solid ${l(e)}`}),relative:"","text-sm":"",transition:"","hover:z-1000":"","bg-base":""},[t("div",{style:T({backgroundColor:l(i)}),absolute:"","bottom-0":"","left--1px":"","top-0":"","w-full":"","text-sm":"","transition-all":"","duration-300":""},null,4),t("div",{style:T({color:l(a),"--c":l(e)}),border:"r-2 t-2 y-2 transparent","min-w-max":"",px1:"","text-left":"","group-hover":"border-$c"},k(o.item.name),5)],4))}}),ve={relative:"","h-full":""},be={absolute:"","left-2":"","top-2.3em":"","text-xs":"",op50:""},ge=B({__name:"TimelineSegment",props:{segment:{}},emits:["select"],setup(_,{emit:p}){const c=_,e=p,a=O(()=>c.segment.start,{updateInterval:1e3,showSecond:!0,controls:!1,messages:{justNow:"",past:i=>i,future:i=>i,invalid:"-",second:i=>i?`${i}s`:"",minute:i=>`${i}m`,hour:i=>`${i}h`,week:i=>`${i}w`,day:i=>`${i}d`,month:i=>`${i}mo`,year:i=>`${i}y`}});return(i,o)=>{const d=ye;return n(),r("div",ve,[t("button",{absolute:"","left-0":"","right-0":"","top-0":"","bg-green:5":"",px2:"",py1:"","text-left":"","text-xs":"","text-green6":"","font-mono":"",onClick:o[0]||(o[0]=s=>i.segment.route?e("select",i.segment.route):void 0)},k(i.segment.route?.event.to),1),t("div",be,k(l(a))+" ago ",1),t("div",null,[(n(!0),r(f,null,E(i.segment.functions,(s,u)=>(n(),y(d,{key:u,item:s.event,style:T({position:"absolute",minWidth:`${s.relativeWidth*100}%`,maxWidth:`${s.relativeWidth*100}%`,top:`${4+s.layer*1.6}em`,left:`${s.relativeStart*100}%`}),onClick:h=>e("select",s)},null,8,["item","style","onClick"]))),128))])])}}}),xe=3e3,$e=50;function Ae(_){const p=[];let c={start:0,end:0,events:[],functions:[],duration:0};for(const e of _){const a=e.end||e.start;(e.start-c.end>xe||e.type==="route")&&(c={start:e.start,end:a,events:[],functions:[],duration:0},p.push(c)),c.events.push(e),c.end=a+$e}return p.forEach((e,a)=>{const i=e.end-e.start,o=[];e.duration=i,e.previousGap=a>0?e.start-p[a-1].end:0,e.events.forEach(d=>{const s=d.end||d.start;let u=0;d.type!=="route"&&(u=o.findIndex($=>$<=d.start),u===-1?(u=o.length,o.push(s+1e3)):o[u]=s+1e3);const h={event:d,segment:e,relativeStart:(d.start-e.start)/i,relativeWidth:(s-d.start)/i,layer:u};d.type==="function"?e.functions.push(h):e.route=h})}),p}const De={relative:""},Ce={key:0,border:"x base","h-full":"","flex-inline":"","bg-true-gray-1":"",py15:"","text-xs":"","write-vertical-left":"",op50:"","dark:bg-true-gray-9":""},Be=B({__name:"TimelineTable",props:{data:{}},emits:["select"],setup(_,{emit:p}){const c=_,e=p,a=C(),i=C(),o=C(),d=C(),s=C(!0),u=C(1.5),h=w(()=>Ae(c.data.events)),$=w(()=>(c.data.events.length,a.value?.scrollWidth||window.innerWidth));function A(){d.value&&(d.value.style.width=`${$.value}px`)}function S(){s.value&&a.value&&(a.value.scrollTo({left:a.value.scrollWidth-a.value.clientWidth,behavior:"smooth"}),o.value.scrollTo({left:a.value.scrollWidth-a.value.clientWidth,behavior:"smooth"}))}return Y(()=>c.data.events.length,async()=>{await q(),A(),S()},{flush:"post"}),j(a,"scroll",()=>{o.value.scrollLeft!==a.value.scrollLeft&&(A(),o.value.scrollLeft=a.value.scrollLeft,s.value=a.value.scrollLeft>=a.value.scrollWidth-a.value.clientWidth)}),j(o,"scroll",()=>{o.value.scrollLeft!==a.value.scrollLeft&&(A(),a.value.scrollLeft=o.value.scrollLeft)}),j(a,"wheel",b=>{b.altKey?(u.value=K(u.value+b.deltaY/200,.5,3),A()):a.value.scrollLeft+=b.deltaY}),(b,L)=>{const D=W,M=ge;return n(),r(f,null,[t("div",De,[t("div",{ref_key:"minimap",ref:i,border:"t b base",relative:"","h-50px":"","ws-nowrap":"","border-base":""},[(n(!0),r(f,null,E(l(h),(g,N)=>(n(),r("div",{key:N,relative:"","h-full":"","flex-inline":"",style:T({width:`${Math.max(100,g.duration/10)/l($)*100}%`})},[(n(!0),r(f,null,E(g.functions,(I,J)=>(n(),r("div",{key:J,"h-3px":"",rounded:"",style:T({width:`max(${I.relativeWidth*100}%, 10px)`,position:"absolute",top:`${I.layer*4}px`,left:`${I.relativeStart*100}%`,backgroundColor:("getHashColorFromString"in b?b.getHashColorFromString:l(V))(I.event.name,50,60)})},null,4))),128)),g.route?(n(),r("div",{key:0,absolute:"","top-0":"","h-full":"","w-px":"","border-l":"","border-green6":"",op10:"",style:T({left:`${g.route.relativeStart*100}%`})},null,4)):x("",!0)],4))),128))],512),t("div",{ref_key:"minimapScroller",ref:o,class:"timeline-scroller",absolute:"","inset-0":"","h-full":"","w-full":"","of-x-scroll":""},[t("div",{ref_key:"minimapScrollerInner",ref:d,"h-1px":""},null,512)],512)]),t("div",{ref_key:"scroller",ref:a,relative:"","h-full":"","w-full":"","of-x-scroll":"","of-y-hidden":"","ws-nowrap":"","n-panel-grids":""},[(n(!0),r(f,null,E(l(h),(g,N)=>(n(),r(f,{key:N},[g.previousGap&&g.previousGap>=200?(n(),r("div",Ce,[m(D,{op50:"",duration:g.previousGap,color:!1},null,8,["duration"])])):x("",!0),m(M,{"flex-inline":"","of-x-hidden":"","hover:of-x-visible":"","bg-base":"",class:z(N===l(h).length-1?"border-r border-base":""),segment:g,style:T({width:`${Math.max(50,g.duration/10)*l(u)}px`}),onSelect:L[0]||(L[0]=I=>e("select",I))},null,8,["class","segment","style"])],64))),128))],512)],64)}}}),we=U(Be,[["__scopeId","data-v-27e8fb2d"]]),Te={border:"t base",flex:"~ col","h-full":"","of-y-auto":"","text-sm":""},Se=["onClick"],Ne=t("div",{"i-carbon-function":"",op50:""},null,-1),Fe={flex:"~","ml--1":"","font-mono":""},Ee=t("div",{op30:""}," ( ",-1),Le={key:0,mr2:"",op30:""},Ie={op75:""},Me=t("div",{op30:""}," ) ",-1),Ve=t("div",{"mr-1":"","h-7":"","w-7":"",flex:"","rounded-lg":"","bg-primary:5":"",p1:"","text-green6":""},[t("div",{"i-carbon-direction-rotary-right":"",ma:"","text-lg":""})],-1),We={flex:"~ col items-start"},je={"text-xs":"","font-mono":"",op30:""},Oe={"text-green":"","font-bold":"","font-mono":""},ze=t("div",{"flex-auto":""},null,-1),Ge=t("div",{"min-h-100":""},null,-1),Re=B({__name:"TimelineList",props:{data:{}},emits:["select"],setup(_,{emit:p}){const c=p;return(e,a)=>{const i=W;return n(),r("div",Te,[(n(!0),r(f,null,E(e.data.events,(o,d)=>(n(),r("button",{key:d,border:"b base",px3:"",py2:"",flex:"~ items-center gap-2",hover:"bg-active",onClick:s=>c("select",o)},[o.type==="function"?(n(),r(f,{key:0},[Ne,t("div",{"font-mono":"",style:T({color:o.type==="function"?("getHashColorFromString"in e?e.getHashColorFromString:l(V))(o.name,50,60):""})},k(o.name),5),t("div",Fe,[Ee,(n(!0),r(f,null,E(o.args,(s,u)=>(n(),r(f,{key:u},[u?(n(),r("div",Le," , ")):x("",!0),t("div",Ie,k(s===null?"null":s===void 0?"undefined":typeof s=="function"?"[function]":Array.isArray(s)?"[Array]":typeof s=="object"?"[object]":JSON.stringify(s)),1)],64))),128)),Me])],64)):(n(),r(f,{key:1},[Ve,t("div",We,[t("div",je,k(o.from),1),t("div",Oe,k(o.to),1)])],64)),ze,o.end?(n(),y(i,{key:2,duration:o.end-o.start,color:o.type==="function"},null,8,["duration","color"])):x("",!0)],8,Se))),128)),Ge])}}}),Pe={key:0,"text-blue":""},He={key:1,"text-purple":""},Je={key:2,"text-green":""},Ye={key:3,"text-gray":""},qe={key:4,"text-gray":""},Ke={key:5,"text-gray":""},Ue={key:0,"bg-red:10":"",px2:"",py1:"","text-red":""},Ze={key:1},Xe={p2:"","text-sm":"",border:"t base"},Qe=B({__name:"TimelineArgumentView",props:{value:{}},setup(_){const p=_,c=C(),e=C();function a(){try{c.value=JSON.parse(JSON.stringify(p.value))}catch(s){console.error(s),e.value=s}}const i=B({emits:["setup"],setup(s,{emit:u}){return u("setup"),()=>null}}),o=Z(),d=X();return(s,u)=>{const h=G,$=P("VMenu");return typeof s.value=="string"?(n(),r("div",Pe,k(JSON.stringify(s.value)),1)):typeof s.value=="number"?(n(),r("div",He,k(s.value),1)):typeof s.value=="boolean"?(n(),r("div",Je,k(s.value),1)):typeof s.value>"u"?(n(),r("div",Ye," undefined ")):typeof s.value=="function"?(n(),r("div",qe," [Function"+k(s.value.name?`: ${s.value.name}`:"")+"] ",1)):s.value===null?(n(),r("div",Ke," null ")):(n(),y($,{key:6,placement:"top"},{popper:v(()=>[m(l(i),{onSetup:a}),l(e)?(n(),r("div",Ue," Failed to display object: "+k(l(e)),1)):l(c)?(n(),r("div",Ze,[m(l(de),Q({"model-value":l(c)},s.$attrs,{class:["json-editor-vue",[l(o)==="dark"?"jse-theme-dark":""]],"main-menu-bar":!1,"navigation-bar":!1,"status-bar":!1,"read-only":!0,indentation:2,"tab-size":2}),null,16,["model-value","class"]),t("div",Xe,[m(h,{title:"Copy to clipboard",icon:"carbon-copy",onClick:u[0]||(u[0]=A=>l(d)(JSON.stringify(l(c),null,2),"timeline-argument"))},{default:v(()=>[F(" Copy ")]),_:1})])])):x("",!0)]),default:v(()=>[t("span",{"rounded-sm":"",px1:"","py0.5":"","text-sm":"",class:z([Array.isArray(s.value)?"text-amber bg-amber:10":"text-orange bg-orange:10"])},k(Array.isArray(s.value)?`[Array(${s.value.length})]`:"[Object]"),3)]),_:1}))}}}),es={key:0,"p-4":"",flex:"~ col gap-2","text-base":""},ss={"mx--1":""},ts={flex:"~ gap-1","font-mono":""},ns={key:1},os=t("span",{ml1:"",op30:""},"(",-1),as={key:0,op30:""},ls=t("span",{op30:""},")",-1),is={flex:"~ gap-1","text-sm":""},rs=t("span",{mx1:"",op50:""},"·",-1),cs={class:"text-sm text-gray-400"},ps=B({__name:"TimelineDetailsFunction",props:{record:{}},setup(_){const p=_,c=O(()=>p.record.start,{showSecond:!0}),e=ee(),a=w(()=>e.value?.metadata),i=w(()=>e.value?.imports.find(o=>o.as===p.record.name));return(o,d)=>{const s=H,u=pe,h=Qe,$=W,A=ue;return o.record?(n(),r("div",es,[t("div",ss,[m(s,{n:"yellow",textContent:"Function call"})]),t("div",ts,[l(i)?(n(),y(u,{key:0,item:l(i),metadata:l(a),counter:!1,classes:"px2 py1","mx--2":""},null,8,["item","metadata"])):(n(),r("span",ns,k(o.record.name),1)),os,(n(!0),r(f,null,E(o.record.args,(S,b)=>(n(),r(f,{key:b},[b?(n(),r("span",as,", ")):x("",!0),m(h,{value:S},null,8,["value"])],64))),128)),ls]),t("div",is,[o.record.end?(n(),y($,{key:0,duration:o.record.end-o.record.start},null,8,["duration"])):x("",!0),rs,t("div",cs,k(l(c)),1)]),o.record.stacktrace?(n(),y(A,{key:0,stacktrace:o.record.stacktrace,class:"text-xs text-gray-400"},null,8,["stacktrace"])):x("",!0)])):x("",!0)}}}),ds={key:0,"p-4":"",flex:"~ col gap-2"},us={"mx--1":""},ms={flex:"~ gap-1 items-center","font-mono":""},ks={op50:""},hs=t("span",{"i-carbon-arrow-right":"",op50:""},null,-1),_s={flex:"~ gap-1","text-sm":""},fs=t("span",{mx1:"",op50:""},"·",-1),ys={class:"text-sm text-gray-400"},vs=B({__name:"TimelineDetailsRoute",props:{record:{}},setup(_){const p=_,c=O(()=>p.record.start,{showSecond:!0});return(e,a)=>{const i=H,o=W;return e.record?(n(),r("div",ds,[t("div",us,[m(i,{n:"green",textContent:"Route Change"})]),t("div",ms,[t("span",ks,k(e.record.from),1),hs,t("span",null,k(e.record.to),1)]),t("div",_s,[e.record.end?(n(),y(o,{key:0,duration:e.record.end-e.record.start},null,8,["duration"])):x("",!0),fs,t("div",ys,k(l(c)),1)])])):x("",!0)}}}),bs={key:0,"h-screen":"","of-hidden":""},gs={"h-screen":"","w-full":"",flex:"","flex-col":""},xs={"h-10":"",flex:"~ gap-2 items-center justify-end",p2:"",px3:""},$s={"text-sm":""},As=t("div",{"flex-auto":""},null,-1),Ds={"min-h-50":"",px3:"",py2:""},Cs=B({__name:"TimelineView",setup(_){const p=se(),c=C("table"),e=C(),a=w(()=>p.value?.metrics.clientTimeline());function i(){a.value&&(a.value.events=[])}function o(){c.value=c.value==="table"?"list":"table"}return(d,s)=>{const u=P("VTooltip"),h=G,$=we,A=Re,S=ps,b=vs,L=me;return l(a)?(n(),r("div",bs,[t("div",gs,[t("div",xs,[m(u,{flex:""},{popper:v(()=>[t("div",$s,k(l(a).options.enabled?"Recording...":"Paused"),1)]),default:v(()=>[t("div",{"text-lg":"",class:z(l(a).options.enabled?"i-carbon-radio-button-checked text-primary animate-pulse":"i-carbon-pause-outline op30")},null,2)]),_:1}),l(a).options.enabled?(n(),y(h,{key:1,size:"small",ml1:"","text-sm":"",n:"orange",icon:"i-carbon-stop",onClick:s[1]||(s[1]=D=>l(a).options.enabled=!1)},{default:v(()=>[F(" Stop Tracking ")]),_:1})):(n(),y(h,{key:0,size:"small",ml1:"","text-sm":"",n:"primary",icon:"i-carbon-play",onClick:s[0]||(s[0]=D=>l(a).options.enabled=!0)},{default:v(()=>[F(" Start Tracking ")]),_:1})),As,m(h,{icon:l(c)==="table"?"i-carbon-roadmap":"i-carbon-list",class:"ml-2",title:"Toggle View",border:!1,onClick:o},null,8,["icon"]),m(h,{icon:"i-carbon-trash-can","hover-text-red":"",class:"ml-2",border:!1,onClick:i})]),l(c)==="table"?(n(),y($,{key:0,data:{...l(a)},onSelect:s[2]||(s[2]=D=>e.value=D.event)},null,8,["data"])):(n(),y(A,{key:1,data:{...l(a)},onSelect:s[3]||(s[3]=D=>e.value=D)},null,8,["data"]))]),m(L,{"model-value":!!l(e),"auto-close":"",transition:"bottom",left:"#nuxt-devtools-side-nav",onClose:s[4]||(s[4]=D=>e.value=void 0)},{default:v(()=>[t("div",Ds,[l(e)?.type==="function"?(n(),y(S,{key:0,record:l(e)},null,8,["record"])):l(e)?.type==="route"?(n(),y(b,{key:1,record:l(e)},null,8,["record"])):x("",!0)])]),_:1},8,["model-value"])])):x("",!0)}}}),Bs={class:"markdown-body"},ws=t("h1",null,"Timeline",-1),Ts=t("p",null,[t("blockquote",{"text-orange":"","bg-orange:10":"",py1:""}," This is an experimental feature ")],-1),Ss=te(`<p>Timeline tracks your route navigations and functions calls in your Nuxt application. It can be used to debug performance issues and to understand how your application works.</p><h2>Function calls</h2><p>Nuxt DevTools tracks function calls by wrapping them in the build time. It works for functions referenced by auto-imports, or explicit imports through <code>import {} from '#imports'</code>.</p><pre class="shiki shiki-themes vitesse-light vitesse-dark" style="background-color:#ffffff;--shiki-dark-bg:#121212;color:#393a34;--shiki-dark:#dbd7caee;" tabindex="0"><code><span class="line"><span style="color:#999999;--shiki-dark:#666666;"><</span><span style="color:#1E754F;--shiki-dark:#4D9375;">script</span><span style="color:#B07D48;--shiki-dark:#BD976A;"> setup</span><span style="color:#999999;--shiki-dark:#666666;">></span></span>
|
|
2
2
|
<span class="line"><span style="color:#1E754F;--shiki-dark:#4D9375;">import</span><span style="color:#999999;--shiki-dark:#666666;"> {</span><span style="color:#B07D48;--shiki-dark:#BD976A;"> useMouse</span><span style="color:#999999;--shiki-dark:#666666;"> }</span><span style="color:#1E754F;--shiki-dark:#4D9375;"> from</span><span style="color:#B5695999;--shiki-dark:#C98A7D99;"> '</span><span style="color:#B56959;--shiki-dark:#C98A7D;">@vueuse/core</span><span style="color:#B5695999;--shiki-dark:#C98A7D99;">'</span></span>
|
|
3
3
|
<span class="line"><span style="color:#1E754F;--shiki-dark:#4D9375;">import</span><span style="color:#999999;--shiki-dark:#666666;"> {</span><span style="color:#B07D48;--shiki-dark:#BD976A;"> useNuxtApp</span><span style="color:#999999;--shiki-dark:#666666;"> }</span><span style="color:#1E754F;--shiki-dark:#4D9375;"> from</span><span style="color:#B5695999;--shiki-dark:#C98A7D99;"> '</span><span style="color:#B56959;--shiki-dark:#C98A7D;">#imports</span><span style="color:#B5695999;--shiki-dark:#C98A7D99;">'</span></span>
|
|
4
4
|
<span class="line"></span>
|
|
@@ -27,4 +27,4 @@ import{d as B,a as w,aK as W,o as n,m as r,k as t,a9 as T,f as l,t as k,ad as O,
|
|
|
27
27
|
<span class="line"><span style="color:#999999;--shiki-dark:#666666;"> }</span></span>
|
|
28
28
|
<span class="line"><span style="color:#999999;--shiki-dark:#666666;"> }</span></span>
|
|
29
29
|
<span class="line"><span style="color:#999999;--shiki-dark:#666666;">})</span></span>
|
|
30
|
-
<span class="line"></span></code></pre>`,6),Ns=[ws,Ts,Ss],Fs={__name:"timeline",setup(_,{expose:p}){return p({frontmatter:{}}),(e,a)=>(n(),r("div",Bs,Ns))}},Es=Fs,Ls={flex:"~ col gap-2","w-150":"",p4:"",border:"t base"},Is=t("h2",{"text-xl":""},[t("span",{capitalize:""},"Enable Timeline?")],-1),Ms={op50:""},
|
|
30
|
+
<span class="line"></span></code></pre>`,6),Ns=[ws,Ts,Ss],Fs={__name:"timeline",setup(_,{expose:p}){return p({frontmatter:{}}),(e,a)=>(n(),r("div",Bs,Ns))}},Es=Fs,Ls={flex:"~ col gap-2","w-150":"",p4:"",border:"t base"},Is=t("h2",{"text-xl":""},[t("span",{capitalize:""},"Enable Timeline?")],-1),Ms={op50:""},Vs=t("p",null,[t("span",{op50:""},"Then Nuxt will "),t("span",{"text-orange":""},"restart automatically"),F(". ")],-1),Ws={flex:"~ gap-3",mt2:"","justify-end":""},st=B({__name:"timeline",setup(_){const p=ne(),c=oe(),e=ae(),a=le();async function i(){try{const[o,d]=await R.enableTimeline(!0);if(!await e.start(o,d))return;await R.enableTimeline(!1)}catch{re({message:"Failed to enable timeline automatically. Check the terminal for more details.",icon:"i-carbon-warning",classes:"text-red"})}}return(o,d)=>{const s=Cs,u=ke,h=ie,$=he,A=_e,S=G,b=ce,L=Es,D=fe;return n(),r(f,null,[l(p)?.timeline?.enabled?(n(),y(s,{key:0})):(n(),r(f,{key:1},[m(h,null,{default:v(()=>[m(u,{icon:"i-carbon-roadmap",name:"feature-timeline",title:"Timeline",description:"Timeline enables the inspection of when composable being executed and the route changes.",actions:[{label:"Enable"}],onAction:i})]),_:1}),m(l(e),null,{default:v(({resolve:M,args:g})=>[m(b,{"model-value":!0,onClose:N=>M(!1)},{default:v(()=>[t("div",Ls,[Is,t("p",Ms,[F(" Your "),m($,{role:"button",n:"primary",underline:"",onClick:d[0]||(d[0]=N=>l(a)(l(c)?._nuxtConfigFile)),textContent:"Nuxt config"}),F(" will be updated as: ")]),m(A,{from:g[0],to:g[1],"max-h-80":"","of-auto":"",py2:"",border:"~ base rounded",lang:"ts"},null,8,["from","to"]),Vs,t("div",Ws,[m(S,{onClick:N=>M(!1)},{default:v(()=>[F(" Cancel ")]),_:2},1032,["onClick"]),m(S,{n:"solid primary",capitalize:"",onClick:N=>M(!0)},{default:v(()=>[F(" Enable ")]),_:2},1032,["onClick"])])])]),_:2},1032,["onClose"])]),_:1})],64)),m(D,null,{default:v(()=>[m(L)]),_:1})],64)}}});export{st as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{_ as Me}from"./CGZO0Dbu.js";import{d as U,a as B,ac as he,o as u,h as T,j as y,k as s,aa as E,f as c,v as z,t as C,m as w,G as F,p as S,i as _,F as L,n as H,x as ie,a6 as _e,as as ve,R as ge,aP as Ce,L as ce,M as de,V as Te,aQ as ye,aR as be,_ as X,y as Oe,z as Ne,aB as xe,aS as Ve,aT as Ae,aU as Pe,at as Be,a2 as Le,I as je,ay as ue,ax as Re,aV as Ee,a9 as De,r as K,ah as He,l as Fe,ab as Ue,Y as qe,Z as We,S as Ke,aW as me}from"./CwTcTc2N.js";import{_ as Ye,u as $e,a as Ge}from"./DluxqTUE.js";import{_ as Xe}from"./QBzUTbSD.js";import{_ as Qe}from"./_OFeGLwh.js";import{_ as we}from"./B04hL9Ab.js";import{_ as Ze}from"./Xpd7UJs5.js";import{_ as Je}from"./CH-roGkP.js";import{_ as et}from"./CPUwo9Dx.js";import{_ as tt}from"./Dslz6rss.js";import{_ as nt}from"./DeSj8VZN.js";import{_ as it}from"./o8QbmO42.js";import"./GdB9kz-4.js";import"./CSGOJSAd.js";const ot={flex:"~ col gap2","flex-auto":"","of-hidden":"",px1:""},st={"gap-1t":"",flex:"","items-center":"","text-ellipsis":"","ws-nowrap":"","text-lg":""},rt={key:2},lt=s("div",{"flex-auto":""},null,-1),at={key:1,flex:"~ gap-2",title:"Documentation"},ct=s("span",{"i-carbon-link":"","text-lg":"",op50:""},null,-1),dt={key:2,flex:"~ gap-2"},ut=s("span",{"i-carbon-logo-github":"","text-lg":"",op50:""},null,-1),mt={key:0,flex:"~ gap-4 items-center"},ft={flex:"~ gap-1 items-center",op50:""},pt={flex:"~ gap-1 items-center",op50:""},ht={flex:"~ col","items-end":""},_t={key:0,"h-20":"","w-20":"",flex:"","flex-none":"",rounded:"","bg-gray:3":"",p4:""},vt=["src","alt"],gt=s("div",{"i-carbon-cube":"",ma:"","text-4xl":"",op30:""},null,-1),yt={key:1,flex:"~",mt2:"","flex-auto":"","items-end":"","justify-end":""},bt=["src"],xt=s("div",{"flex-auto":""},null,-1),$t={flex:"","justify-end":""},wt="https://api.nuxtjs.org/api/ipx/s_80,f_webp/gh/nuxt/modules/main/icons/",kt="https://api.nuxtjs.org/api/ipx/s_44,f_webp/gh_avatar/",It="https://github.com/",St="https://www.npmjs.com/package/",oe=U({__name:"ModuleItemBase",props:{mod:{},info:{},compact:{type:Boolean},maintainers:{type:Boolean,default:!0}},setup(e){const t=e,n=B(()=>({...t.mod?.meta,...t.mod,...t.info})),o=he();return(i,r)=>{const l=ie,d=_e,a=ve;return u(),T(a,{p4:"",flex:"~ gap2"},{default:y(()=>[s("div",ot,[E(i.$slots,"main",{},()=>[s("div",st,[i.mod.isPackageModule?(u(),T(l,{key:0,to:St+(c(n).npm||c(n).name),target:"_blank",hover:"underline text-primary"},{default:y(()=>[z(C(c(n).name),1)]),_:1},8,["to"])):i.mod.entryPath?(u(),w("button",{key:1,role:"button",hover:"underline text-primary",onClick:r[0]||(r[0]=m=>c(o)(i.mod.entryPath))},C(c(n).name),1)):(u(),w("span",rt,C(c(n).name),1)),E(i.$slots,"badge")]),c(n).description?(u(),w("div",{key:0,class:F(i.compact?"ws-nowrap of-hidden truncate":"line-clamp-2"),"mt--1":"","text-sm":"",op50:""},C(c(n).description),3)):S("",!0),lt,c(n).website?(u(),w("div",at,[ct,_(l,{to:c(n).website,target:"_blank","of-hidden":"",truncate:"","ws-nowrap":"","text-sm":"",op50:"",hover:"op100 underline text-primary"},{default:y(()=>[z(C(c(n).website.replace(/^https?:\/\//,"")),1)]),_:1},8,["to"])])):S("",!0),c(n).github?(u(),w("div",dt,[ut,_(l,{to:c(n).github,target:"_blank","of-hidden":"",truncate:"","ws-nowrap":"","text-sm":"",op50:"",hover:"op100 underline text-primary"},{default:y(()=>[z(C(c(n).github.replace(/^https?:\/\/github.com\//,"")),1)]),_:1},8,["to"])])):S("",!0)]),E(i.$slots,"items"),c(n).stats?(u(),w("div",mt,[s("div",ft,[_(d,{icon:"carbon-star","text-lg":""}),s("span",null,C(c(n).stats.stars),1)]),s("div",pt,[_(d,{icon:"carbon-download","text-lg":""}),s("span",null,C(c(n).stats.downloads),1)])])):S("",!0)]),s("div",ht,[c(n).icon||i.mod.isPackageModule?(u(),w("div",_t,[c(n).icon?(u(),w("img",{key:0,src:wt+c(n).icon,alt:i.mod.name,ma:""},null,8,vt)):S("",!0),gt])):S("",!0),c(n).maintainers?.length&&i.maintainers?(u(),w("div",yt,[(u(!0),w(L,null,H(c(n).maintainers,m=>(u(),T(l,{key:m.name,target:"_blank",to:It+m.github,title:m.name},{default:y(()=>[s("img",{src:kt+m.github,"h-6":"","w-6":"","rounded-full":""},null,8,bt)]),_:2},1032,["to","title"]))),128))])):S("",!0),i.$slots.actions?(u(),w(L,{key:2},[xt,s("div",$t,[E(i.$slots,"actions")])],64)):S("",!0)])]),_:3})}}}),zt={key:0,flex:"~ gap-2",title:"Open on filesystem"},Mt=s("span",{"i-carbon-folder-move-to":"","text-lg":"",op50:""},null,-1),Ct=s("span",{"i-carbon-circle-dash":"","animate-spin":"","text-lg":"",op50:""},null,-1),Tt=s("code",{"text-sm":"",op50:""},"Upgrading...",-1),Ot={key:1,"mx--2":""},Nt=["onClick"],Vt=s("span",{"i-carbon-intent-request-active":"","text-lg":"","text-primary":""},null,-1),At=s("code",{"text-xs":""},"Update installed, click to restart",-1),Pt=[Vt,At],Bt={key:2,"mx--2":""},Lt=["onClick"],jt=s("span",{"i-carbon-intent-request-upgrade":"","text-lg":"",op50:""},null,-1),Rt={op50:""},Et=s("div",{"i-carbon-arrow-right":"",op50:""},null,-1),Dt={"text-green":""},Ht={key:3,flex:"~ gap-2","items-center":"",title:"NPM"},Ft=s("span",{"i-carbon-cube":"","text-lg":"",op50:""},null,-1),Ut={"text-sm":"",op50:""},qt=U({__name:"ModuleItem",props:{mod:{}},setup(e){const t=e,n=B(()=>t.mod.info),o=B(()=>({...t.mod?.meta,...t.mod,...n.value})),i=ge();return(r,l)=>{const d=Me,a=ie,m=Ye,h=oe;return u(),T(h,{mod:r.mod,info:c(n)},{items:y(()=>[r.mod.entryPath?(u(),w("div",zt,[Mt,_(d,{filepath:r.mod.entryPath,"text-sm":"",op50:"",hover:"text-primary op100"},null,8,["filepath"])])):S("",!0),c(o).npm?(u(),T(m,{key:c(o).npm,"package-name":c(o).npm,options:{dev:!0}},{default:y(({info:g,update:v,state:p,id:I,restart:b})=>[p==="running"?(u(),T(a,{key:0,flex:"~ gap-2","animate-pulse":"","items-center":"",to:I?"/modules/terminals":void 0,onClick:$=>I?i.value=I:void 0},{default:y(()=>[Ct,Tt]),_:2},1032,["to","onClick"])):p==="updated"?(u(),w("div",Ot,[s("button",{flex:"~ gap-2",hover:"bg-primary/20","items-center":"",rounded:"","bg-primary:10":"",px2:"","text-sm":"","text-primary":"",onClick:b},Pt,8,Nt)])):g?.needsUpdate?(u(),w("div",Bt,[s("button",{flex:"~ gap-2",title:"Click to upgrade","items-center":"",rounded:"",px2:"","text-sm":"",hover:"bg-active",onClick:$=>v()},[jt,s("code",Rt,"v"+C(g.current),1),Et,s("code",Dt,"v"+C(g.latest),1)],8,Lt)])):g?.latest?(u(),w("div",Ht,[Ft,s("code",Ut,"v"+C(g.current),1)])):S("",!0)]),_:1},8,["package-name"])):S("",!0)]),_:1},8,["mod","info"])}}}),Wt=U({__name:"ModuleItemInstall",props:{item:{}},emits:["start"],setup(e,{emit:t}){const n=e,o=t,i=$e(),r=B(()=>i.value.find(h=>h.name===n.item.npm)),l=B(()=>r.value&&r.value.isPackageModule),d=B(()=>r.value&&r.value.isPackageModule&&r.value.isUninstallable);async function a(h,g){const v=g==="install"?ce.installNuxtModule:ce.uninstallNuxtModule,p=await v(await de(),h.npm,!0);Te(`modules:${g}`,{moduleName:h.npm}),p.commands&&await ye.start(h,p,g)&&(be.value.push({name:h.npm,info:h,processId:p.processId}),o("start"),await v(await de(),h.npm,!1))}const m={};return(h,g)=>{const v=Je,p=X,I=we,b=oe;return u(),T(b,{mod:m,role:c(l)?"":"button",info:h.item,mb2:"","h-full":"",class:F(c(l)?"border-dashed op75":"hover:bg-active!"),compact:!0,onClick:g[1]||(g[1]=$=>c(l)?null:a(h.item,"install"))},Ce({_:2},[c(l)?{name:"badge",fn:y(()=>[_(v,{n:"green",textContent:"Installed"}),c(d)?(u(),T(I,{key:0,n:"sm green"},{trigger:y(({click:$})=>[_(p,{icon:"carbon-overflow-menu-vertical",border:!1,onClick:k=>$()},null,8,["onClick"])]),default:y(()=>[_(p,{icon:"carbon-trash-can",n:"red",onClick:g[0]||(g[0]=$=>a(h.item,"uninstall"))},{default:y(()=>[z(" Uninstall ")]),_:1})]),_:1})):S("",!0)]),key:"0"}:void 0]),1032,["role","info","class"])}}});function Kt(){var e=window.navigator.userAgent,t=e.indexOf("MSIE ");if(t>0)return parseInt(e.substring(t+5,e.indexOf(".",t)),10);var n=e.indexOf("Trident/");if(n>0){var o=e.indexOf("rv:");return parseInt(e.substring(o+3,e.indexOf(".",o)),10)}var i=e.indexOf("Edge/");return i>0?parseInt(e.substring(i+5,e.indexOf(".",i)),10):-1}let Y;function J(){J.init||(J.init=!0,Y=Kt()!==-1)}var Q={name:"ResizeObserver",props:{emitOnMount:{type:Boolean,default:!1},ignoreWidth:{type:Boolean,default:!1},ignoreHeight:{type:Boolean,default:!1}},emits:["notify"],mounted(){J(),xe(()=>{this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitOnMount&&this.emitSize()});const e=document.createElement("object");this._resizeObject=e,e.setAttribute("aria-hidden","true"),e.setAttribute("tabindex",-1),e.onload=this.addResizeHandlers,e.type="text/html",Y&&this.$el.appendChild(e),e.data="about:blank",Y||this.$el.appendChild(e)},beforeUnmount(){this.removeResizeHandlers()},methods:{compareAndNotify(){(!this.ignoreWidth&&this._w!==this.$el.offsetWidth||!this.ignoreHeight&&this._h!==this.$el.offsetHeight)&&(this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitSize())},emitSize(){this.$emit("notify",{width:this._w,height:this._h})},addResizeHandlers(){this._resizeObject.contentDocument.defaultView.addEventListener("resize",this.compareAndNotify),this.compareAndNotify()},removeResizeHandlers(){this._resizeObject&&this._resizeObject.onload&&(!Y&&this._resizeObject.contentDocument&&this._resizeObject.contentDocument.defaultView.removeEventListener("resize",this.compareAndNotify),this.$el.removeChild(this._resizeObject),this._resizeObject.onload=null,this._resizeObject=null)}}};const Yt=Ve();Oe("data-v-b329ee4c");const Gt={class:"resize-observer",tabindex:"-1"};Ne();const Xt=Yt((e,t,n,o,i,r)=>(u(),T("div",Gt)));Q.render=Xt;Q.__scopeId="data-v-b329ee4c";Q.__file="src/components/ResizeObserver.vue";function G(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?G=function(t){return typeof t}:G=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},G(e)}function Qt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Zt(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function Jt(e,t,n){return t&&Zt(e.prototype,t),e}function fe(e){return en(e)||tn(e)||nn(e)||on()}function en(e){if(Array.isArray(e))return ee(e)}function tn(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function nn(e,t){if(e){if(typeof e=="string")return ee(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ee(e,t)}}function ee(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function on(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
1
|
+
import{_ as Me}from"./CDN3PKDC.js";import{d as U,a as B,ac as he,o as u,h as T,j as y,k as s,aa as E,f as c,v as z,t as C,m as w,G as F,p as S,i as _,F as L,n as H,x as ie,a6 as _e,as as ve,R as ge,aP as Ce,L as ce,M as de,V as Te,aQ as ye,aR as be,_ as X,y as Oe,z as Ne,aB as xe,aS as Ve,aT as Ae,aU as Pe,at as Be,a2 as Le,I as je,ay as ue,ax as Re,aV as Ee,a9 as De,r as K,ah as He,l as Fe,ab as Ue,Y as qe,Z as We,S as Ke,aW as me}from"./eUQ_X7Id.js";import{_ as Ye,u as $e,a as Ge}from"./C8cCu25J.js";import{_ as Xe}from"./CHDbzgkk.js";import{_ as Qe}from"./C8k43jHS.js";import{_ as we}from"./2e6xxFgg.js";import{_ as Ze}from"./BgweL_3l.js";import{_ as Je}from"./OAG_rOo8.js";import{_ as et}from"./Ctb-QkcA.js";import{_ as tt}from"./CG8l32IX.js";import{_ as nt}from"./Dcjed-xK.js";import{_ as it}from"./BgkXDMve.js";import"./CktVnUy9.js";import"./A4w2ZRz2.js";const ot={flex:"~ col gap2","flex-auto":"","of-hidden":"",px1:""},st={"gap-1t":"",flex:"","items-center":"","text-ellipsis":"","ws-nowrap":"","text-lg":""},rt={key:2},lt=s("div",{"flex-auto":""},null,-1),at={key:1,flex:"~ gap-2",title:"Documentation"},ct=s("span",{"i-carbon-link":"","text-lg":"",op50:""},null,-1),dt={key:2,flex:"~ gap-2"},ut=s("span",{"i-carbon-logo-github":"","text-lg":"",op50:""},null,-1),mt={key:0,flex:"~ gap-4 items-center"},ft={flex:"~ gap-1 items-center",op50:""},pt={flex:"~ gap-1 items-center",op50:""},ht={flex:"~ col","items-end":""},_t={key:0,"h-20":"","w-20":"",flex:"","flex-none":"",rounded:"","bg-gray:3":"",p4:""},vt=["src","alt"],gt=s("div",{"i-carbon-cube":"",ma:"","text-4xl":"",op30:""},null,-1),yt={key:1,flex:"~",mt2:"","flex-auto":"","items-end":"","justify-end":""},bt=["src"],xt=s("div",{"flex-auto":""},null,-1),$t={flex:"","justify-end":""},wt="https://api.nuxtjs.org/api/ipx/s_80,f_webp/gh/nuxt/modules/main/icons/",kt="https://api.nuxtjs.org/api/ipx/s_44,f_webp/gh_avatar/",It="https://github.com/",St="https://www.npmjs.com/package/",oe=U({__name:"ModuleItemBase",props:{mod:{},info:{},compact:{type:Boolean},maintainers:{type:Boolean,default:!0}},setup(e){const t=e,n=B(()=>({...t.mod?.meta,...t.mod,...t.info})),o=he();return(i,r)=>{const l=ie,d=_e,a=ve;return u(),T(a,{p4:"",flex:"~ gap2"},{default:y(()=>[s("div",ot,[E(i.$slots,"main",{},()=>[s("div",st,[i.mod.isPackageModule?(u(),T(l,{key:0,to:St+(c(n).npm||c(n).name),target:"_blank",hover:"underline text-primary"},{default:y(()=>[z(C(c(n).name),1)]),_:1},8,["to"])):i.mod.entryPath?(u(),w("button",{key:1,role:"button",hover:"underline text-primary",onClick:r[0]||(r[0]=m=>c(o)(i.mod.entryPath))},C(c(n).name),1)):(u(),w("span",rt,C(c(n).name),1)),E(i.$slots,"badge")]),c(n).description?(u(),w("div",{key:0,class:F(i.compact?"ws-nowrap of-hidden truncate":"line-clamp-2"),"mt--1":"","text-sm":"",op50:""},C(c(n).description),3)):S("",!0),lt,c(n).website?(u(),w("div",at,[ct,_(l,{to:c(n).website,target:"_blank","of-hidden":"",truncate:"","ws-nowrap":"","text-sm":"",op50:"",hover:"op100 underline text-primary"},{default:y(()=>[z(C(c(n).website.replace(/^https?:\/\//,"")),1)]),_:1},8,["to"])])):S("",!0),c(n).github?(u(),w("div",dt,[ut,_(l,{to:c(n).github,target:"_blank","of-hidden":"",truncate:"","ws-nowrap":"","text-sm":"",op50:"",hover:"op100 underline text-primary"},{default:y(()=>[z(C(c(n).github.replace(/^https?:\/\/github.com\//,"")),1)]),_:1},8,["to"])])):S("",!0)]),E(i.$slots,"items"),c(n).stats?(u(),w("div",mt,[s("div",ft,[_(d,{icon:"carbon-star","text-lg":""}),s("span",null,C(c(n).stats.stars),1)]),s("div",pt,[_(d,{icon:"carbon-download","text-lg":""}),s("span",null,C(c(n).stats.downloads),1)])])):S("",!0)]),s("div",ht,[c(n).icon||i.mod.isPackageModule?(u(),w("div",_t,[c(n).icon?(u(),w("img",{key:0,src:wt+c(n).icon,alt:i.mod.name,ma:""},null,8,vt)):S("",!0),gt])):S("",!0),c(n).maintainers?.length&&i.maintainers?(u(),w("div",yt,[(u(!0),w(L,null,H(c(n).maintainers,m=>(u(),T(l,{key:m.name,target:"_blank",to:It+m.github,title:m.name},{default:y(()=>[s("img",{src:kt+m.github,"h-6":"","w-6":"","rounded-full":""},null,8,bt)]),_:2},1032,["to","title"]))),128))])):S("",!0),i.$slots.actions?(u(),w(L,{key:2},[xt,s("div",$t,[E(i.$slots,"actions")])],64)):S("",!0)])]),_:3})}}}),zt={key:0,flex:"~ gap-2",title:"Open on filesystem"},Mt=s("span",{"i-carbon-folder-move-to":"","text-lg":"",op50:""},null,-1),Ct=s("span",{"i-carbon-circle-dash":"","animate-spin":"","text-lg":"",op50:""},null,-1),Tt=s("code",{"text-sm":"",op50:""},"Upgrading...",-1),Ot={key:1,"mx--2":""},Nt=["onClick"],Vt=s("span",{"i-carbon-intent-request-active":"","text-lg":"","text-primary":""},null,-1),At=s("code",{"text-xs":""},"Update installed, click to restart",-1),Pt=[Vt,At],Bt={key:2,"mx--2":""},Lt=["onClick"],jt=s("span",{"i-carbon-intent-request-upgrade":"","text-lg":"",op50:""},null,-1),Rt={op50:""},Et=s("div",{"i-carbon-arrow-right":"",op50:""},null,-1),Dt={"text-green":""},Ht={key:3,flex:"~ gap-2","items-center":"",title:"NPM"},Ft=s("span",{"i-carbon-cube":"","text-lg":"",op50:""},null,-1),Ut={"text-sm":"",op50:""},qt=U({__name:"ModuleItem",props:{mod:{}},setup(e){const t=e,n=B(()=>t.mod.info),o=B(()=>({...t.mod?.meta,...t.mod,...n.value})),i=ge();return(r,l)=>{const d=Me,a=ie,m=Ye,h=oe;return u(),T(h,{mod:r.mod,info:c(n)},{items:y(()=>[r.mod.entryPath?(u(),w("div",zt,[Mt,_(d,{filepath:r.mod.entryPath,"text-sm":"",op50:"",hover:"text-primary op100"},null,8,["filepath"])])):S("",!0),c(o).npm?(u(),T(m,{key:c(o).npm,"package-name":c(o).npm,options:{dev:!0}},{default:y(({info:g,update:v,state:p,id:I,restart:b})=>[p==="running"?(u(),T(a,{key:0,flex:"~ gap-2","animate-pulse":"","items-center":"",to:I?"/modules/terminals":void 0,onClick:$=>I?i.value=I:void 0},{default:y(()=>[Ct,Tt]),_:2},1032,["to","onClick"])):p==="updated"?(u(),w("div",Ot,[s("button",{flex:"~ gap-2",hover:"bg-primary/20","items-center":"",rounded:"","bg-primary:10":"",px2:"","text-sm":"","text-primary":"",onClick:b},Pt,8,Nt)])):g?.needsUpdate?(u(),w("div",Bt,[s("button",{flex:"~ gap-2",title:"Click to upgrade","items-center":"",rounded:"",px2:"","text-sm":"",hover:"bg-active",onClick:$=>v()},[jt,s("code",Rt,"v"+C(g.current),1),Et,s("code",Dt,"v"+C(g.latest),1)],8,Lt)])):g?.latest?(u(),w("div",Ht,[Ft,s("code",Ut,"v"+C(g.current),1)])):S("",!0)]),_:1},8,["package-name"])):S("",!0)]),_:1},8,["mod","info"])}}}),Wt=U({__name:"ModuleItemInstall",props:{item:{}},emits:["start"],setup(e,{emit:t}){const n=e,o=t,i=$e(),r=B(()=>i.value.find(h=>h.name===n.item.npm)),l=B(()=>r.value&&r.value.isPackageModule),d=B(()=>r.value&&r.value.isPackageModule&&r.value.isUninstallable);async function a(h,g){const v=g==="install"?ce.installNuxtModule:ce.uninstallNuxtModule,p=await v(await de(),h.npm,!0);Te(`modules:${g}`,{moduleName:h.npm}),p.commands&&await ye.start(h,p,g)&&(be.value.push({name:h.npm,info:h,processId:p.processId}),o("start"),await v(await de(),h.npm,!1))}const m={};return(h,g)=>{const v=Je,p=X,I=we,b=oe;return u(),T(b,{mod:m,role:c(l)?"":"button",info:h.item,mb2:"","h-full":"",class:F(c(l)?"border-dashed op75":"hover:bg-active!"),compact:!0,onClick:g[1]||(g[1]=$=>c(l)?null:a(h.item,"install"))},Ce({_:2},[c(l)?{name:"badge",fn:y(()=>[_(v,{n:"green",textContent:"Installed"}),c(d)?(u(),T(I,{key:0,n:"sm green"},{trigger:y(({click:$})=>[_(p,{icon:"carbon-overflow-menu-vertical",border:!1,onClick:k=>$()},null,8,["onClick"])]),default:y(()=>[_(p,{icon:"carbon-trash-can",n:"red",onClick:g[0]||(g[0]=$=>a(h.item,"uninstall"))},{default:y(()=>[z(" Uninstall ")]),_:1})]),_:1})):S("",!0)]),key:"0"}:void 0]),1032,["role","info","class"])}}});function Kt(){var e=window.navigator.userAgent,t=e.indexOf("MSIE ");if(t>0)return parseInt(e.substring(t+5,e.indexOf(".",t)),10);var n=e.indexOf("Trident/");if(n>0){var o=e.indexOf("rv:");return parseInt(e.substring(o+3,e.indexOf(".",o)),10)}var i=e.indexOf("Edge/");return i>0?parseInt(e.substring(i+5,e.indexOf(".",i)),10):-1}let Y;function J(){J.init||(J.init=!0,Y=Kt()!==-1)}var Q={name:"ResizeObserver",props:{emitOnMount:{type:Boolean,default:!1},ignoreWidth:{type:Boolean,default:!1},ignoreHeight:{type:Boolean,default:!1}},emits:["notify"],mounted(){J(),xe(()=>{this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitOnMount&&this.emitSize()});const e=document.createElement("object");this._resizeObject=e,e.setAttribute("aria-hidden","true"),e.setAttribute("tabindex",-1),e.onload=this.addResizeHandlers,e.type="text/html",Y&&this.$el.appendChild(e),e.data="about:blank",Y||this.$el.appendChild(e)},beforeUnmount(){this.removeResizeHandlers()},methods:{compareAndNotify(){(!this.ignoreWidth&&this._w!==this.$el.offsetWidth||!this.ignoreHeight&&this._h!==this.$el.offsetHeight)&&(this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitSize())},emitSize(){this.$emit("notify",{width:this._w,height:this._h})},addResizeHandlers(){this._resizeObject.contentDocument.defaultView.addEventListener("resize",this.compareAndNotify),this.compareAndNotify()},removeResizeHandlers(){this._resizeObject&&this._resizeObject.onload&&(!Y&&this._resizeObject.contentDocument&&this._resizeObject.contentDocument.defaultView.removeEventListener("resize",this.compareAndNotify),this.$el.removeChild(this._resizeObject),this._resizeObject.onload=null,this._resizeObject=null)}}};const Yt=Ve();Oe("data-v-b329ee4c");const Gt={class:"resize-observer",tabindex:"-1"};Ne();const Xt=Yt((e,t,n,o,i,r)=>(u(),T("div",Gt)));Q.render=Xt;Q.__scopeId="data-v-b329ee4c";Q.__file="src/components/ResizeObserver.vue";function G(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?G=function(t){return typeof t}:G=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},G(e)}function Qt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Zt(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function Jt(e,t,n){return t&&Zt(e.prototype,t),e}function fe(e){return en(e)||tn(e)||nn(e)||on()}function en(e){if(Array.isArray(e))return ee(e)}function tn(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function nn(e,t){if(e){if(typeof e=="string")return ee(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ee(e,t)}}function ee(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function on(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
2
2
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function sn(e){var t;return typeof e=="function"?t={callback:e}:t=e,t}function rn(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o,i,r,l=function(a){for(var m=arguments.length,h=new Array(m>1?m-1:0),g=1;g<m;g++)h[g-1]=arguments[g];if(r=h,!(o&&a===i)){var v=n.leading;typeof v=="function"&&(v=v(a,i)),(!o||a!==i)&&v&&e.apply(void 0,[a].concat(fe(r))),i=a,clearTimeout(o),o=setTimeout(function(){e.apply(void 0,[a].concat(fe(r))),o=0},t)}};return l._clear=function(){clearTimeout(o),o=null},l}function ke(e,t){if(e===t)return!0;if(G(e)==="object"){for(var n in e)if(!ke(e[n],t[n]))return!1;return!0}return!1}var ln=function(){function e(t,n,o){Qt(this,e),this.el=t,this.observer=null,this.frozen=!1,this.createObserver(n,o)}return Jt(e,[{key:"createObserver",value:function(n,o){var i=this;if(this.observer&&this.destroyObserver(),!this.frozen){if(this.options=sn(n),this.callback=function(d,a){i.options.callback(d,a),d&&i.options.once&&(i.frozen=!0,i.destroyObserver())},this.callback&&this.options.throttle){var r=this.options.throttleOptions||{},l=r.leading;this.callback=rn(this.callback,this.options.throttle,{leading:function(a){return l==="both"||l==="visible"&&a||l==="hidden"&&!a}})}this.oldResult=void 0,this.observer=new IntersectionObserver(function(d){var a=d[0];if(d.length>1){var m=d.find(function(g){return g.isIntersecting});m&&(a=m)}if(i.callback){var h=a.isIntersecting&&a.intersectionRatio>=i.threshold;if(h===i.oldResult)return;i.oldResult=h,i.callback(h,a)}},this.options.intersection),xe(function(){i.observer&&i.observer.observe(i.el)})}}},{key:"destroyObserver",value:function(){this.observer&&(this.observer.disconnect(),this.observer=null),this.callback&&this.callback._clear&&(this.callback._clear(),this.callback=null)}},{key:"threshold",get:function(){return this.options.intersection&&typeof this.options.intersection.threshold=="number"?this.options.intersection.threshold:0}}]),e}();function Ie(e,t,n){var o=t.value;if(o)if(typeof IntersectionObserver>"u")console.warn("[vue-observe-visibility] IntersectionObserver API is not available in your browser. Please install this polyfill: https://github.com/w3c/IntersectionObserver/tree/master/polyfill");else{var i=new ln(e,o,n);e._vue_visibilityState=i}}function an(e,t,n){var o=t.value,i=t.oldValue;if(!ke(o,i)){var r=e._vue_visibilityState;if(!o){Se(e);return}r?r.createObserver(o,n):Ie(e,{value:o},n)}}function Se(e){var t=e._vue_visibilityState;t&&(t.destroyObserver(),delete e._vue_visibilityState)}var cn={beforeMount:Ie,updated:an,unmounted:Se},dn={itemsLimit:1e3},un=/(auto|scroll)/;function ze(e,t){return e.parentNode===null?t:ze(e.parentNode,t.concat([e]))}var Z=function(t,n){return getComputedStyle(t,null).getPropertyValue(n)},mn=function(t){return Z(t,"overflow")+Z(t,"overflow-y")+Z(t,"overflow-x")},fn=function(t){return un.test(mn(t))};function pe(e){if(e instanceof HTMLElement||e instanceof SVGElement){for(var t=ze(e.parentNode,[]),n=0;n<t.length;n+=1)if(fn(t[n]))return t[n];return document.scrollingElement||document.documentElement}}function te(e){"@babel/helpers - typeof";return te=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},te(e)}var pn={items:{type:Array,required:!0},keyField:{type:String,default:"id"},direction:{type:String,default:"vertical",validator:function(t){return["vertical","horizontal"].includes(t)}},listTag:{type:String,default:"div"},itemTag:{type:String,default:"div"}};function hn(){return this.items.length&&te(this.items[0])!=="object"}var ne=!1;if(typeof window<"u"){ne=!1;try{var _n=Object.defineProperty({},"passive",{get:function(){ne=!0}});window.addEventListener("test",null,_n)}catch{}}let vn=0;var se={name:"RecycleScroller",components:{ResizeObserver:Q},directives:{ObserveVisibility:cn},props:{...pn,itemSize:{type:Number,default:null},gridItems:{type:Number,default:void 0},itemSecondarySize:{type:Number,default:void 0},minItemSize:{type:[Number,String],default:null},sizeField:{type:String,default:"size"},typeField:{type:String,default:"type"},buffer:{type:Number,default:200},pageMode:{type:Boolean,default:!1},prerender:{type:Number,default:0},emitUpdate:{type:Boolean,default:!1},updateInterval:{type:Number,default:0},skipHover:{type:Boolean,default:!1},listTag:{type:String,default:"div"},itemTag:{type:String,default:"div"},listClass:{type:[String,Object,Array],default:""},itemClass:{type:[String,Object,Array],default:""}},emits:["resize","visible","hidden","update","scroll-start","scroll-end"],data(){return{pool:[],totalSize:0,ready:!1,hoverKey:null}},computed:{sizes(){if(this.itemSize===null){const e={"-1":{accumulator:0}},t=this.items,n=this.sizeField,o=this.minItemSize;let i=1e4,r=0,l;for(let d=0,a=t.length;d<a;d++)l=t[d][n]||o,l<i&&(i=l),r+=l,e[d]={accumulator:r,size:l};return this.$_computedMinItemSize=i,e}return[]},simpleArray:hn,itemIndexByKey(){const{keyField:e,items:t}=this,n={};for(let o=0,i=t.length;o<i;o++)n[t[o][e]]=o;return n}},watch:{items(){this.updateVisibleItems(!0)},pageMode(){this.applyPageMode(),this.updateVisibleItems(!1)},sizes:{handler(){this.updateVisibleItems(!1)},deep:!0},gridItems(){this.updateVisibleItems(!0)},itemSecondarySize(){this.updateVisibleItems(!0)}},created(){this.$_startIndex=0,this.$_endIndex=0,this.$_views=new Map,this.$_unusedViews=new Map,this.$_scrollDirty=!1,this.$_lastUpdateScrollPosition=0,this.prerender&&(this.$_prerender=!0,this.updateVisibleItems(!1)),this.gridItems&&!this.itemSize&&console.error("[vue-recycle-scroller] You must provide an itemSize when using gridItems")},mounted(){this.applyPageMode(),this.$nextTick(()=>{this.$_prerender=!1,this.updateVisibleItems(!0),this.ready=!0})},activated(){const e=this.$_lastUpdateScrollPosition;typeof e=="number"&&this.$nextTick(()=>{this.scrollToPosition(e)})},beforeUnmount(){this.removeListeners()},methods:{addView(e,t,n,o,i){const r=Ae({id:vn++,index:t,used:!0,key:o,type:i}),l=Pe({item:n,position:0,nr:r});return e.push(l),l},unuseView(e,t=!1){const n=this.$_unusedViews,o=e.nr.type;let i=n.get(o);i||(i=[],n.set(o,i)),i.push(e),t||(e.nr.used=!1,e.position=-9999)},handleResize(){this.$emit("resize"),this.ready&&this.updateVisibleItems(!1)},handleScroll(e){if(!this.$_scrollDirty){if(this.$_scrollDirty=!0,this.$_updateTimeout)return;const t=()=>requestAnimationFrame(()=>{this.$_scrollDirty=!1;const{continuous:n}=this.updateVisibleItems(!1,!0);n||(clearTimeout(this.$_refreshTimout),this.$_refreshTimout=setTimeout(this.handleScroll,this.updateInterval+100))});t(),this.updateInterval&&(this.$_updateTimeout=setTimeout(()=>{this.$_updateTimeout=0,this.$_scrollDirty&&t()},this.updateInterval))}},handleVisibilityChange(e,t){this.ready&&(e||t.boundingClientRect.width!==0||t.boundingClientRect.height!==0?(this.$emit("visible"),requestAnimationFrame(()=>{this.updateVisibleItems(!1)})):this.$emit("hidden"))},updateVisibleItems(e,t=!1){const n=this.itemSize,o=this.gridItems||1,i=this.itemSecondarySize||n,r=this.$_computedMinItemSize,l=this.typeField,d=this.simpleArray?null:this.keyField,a=this.items,m=a.length,h=this.sizes,g=this.$_views,v=this.$_unusedViews,p=this.pool,I=this.itemIndexByKey;let b,$,k,N,V;if(!m)b=$=N=V=k=0;else if(this.$_prerender)b=N=0,$=V=Math.min(this.prerender,a.length),k=null;else{const x=this.getScroll();if(t){let O=x.start-this.$_lastUpdateScrollPosition;if(O<0&&(O=-O),n===null&&O<r||O<n)return{continuous:!0}}this.$_lastUpdateScrollPosition=x.start;const A=this.buffer;x.start-=A,x.end+=A;let M=0;if(this.$refs.before&&(M=this.$refs.before.scrollHeight,x.start-=M),this.$refs.after){const O=this.$refs.after.scrollHeight;x.end+=O}if(n===null){let O,q=0,le=m-1,P=~~(m/2),ae;do ae=P,O=h[P].accumulator,O<x.start?q=P:P<m-1&&h[P+1].accumulator>x.start&&(le=P),P=~~((q+le)/2);while(P!==ae);for(P<0&&(P=0),b=P,k=h[m-1].accumulator,$=P;$<m&&h[$].accumulator<x.end;$++);for($===-1?$=a.length-1:($++,$>m&&($=m)),N=b;N<m&&M+h[N].accumulator<x.start;N++);for(V=N;V<m&&M+h[V].accumulator<x.end;V++);}else{b=~~(x.start/n*o);const O=b%o;b-=O,$=Math.ceil(x.end/n*o),N=Math.max(0,Math.floor((x.start-M)/n*o)),V=Math.floor((x.end-M)/n*o),b<0&&(b=0),$>m&&($=m),N<0&&(N=0),V>m&&(V=m),k=Math.ceil(m/o)*n}}$-b>dn.itemsLimit&&this.itemsLimitError(),this.totalSize=k;let f;const j=b<=this.$_endIndex&&$>=this.$_startIndex;if(j)for(let x=0,A=p.length;x<A;x++)f=p[x],f.nr.used&&(e&&(f.nr.index=I[f.item[d]]),(f.nr.index==null||f.nr.index<b||f.nr.index>=$)&&this.unuseView(f));const re=j?null:new Map;let D,R,W;for(let x=b;x<$;x++){D=a[x];const A=d?D[d]:D;if(A==null)throw new Error(`Key is ${A} on item (keyField is '${d}')`);if(f=g.get(A),!n&&!h[x].size){f&&this.unuseView(f);continue}R=D[l];let M=v.get(R),O=!1;if(!f)j?M&&M.length?f=M.pop():f=this.addView(p,x,D,A,R):(W=re.get(R)||0,(!M||W>=M.length)&&(f=this.addView(p,x,D,A,R),this.unuseView(f,!0),M=v.get(R)),f=M[W],re.set(R,W+1)),g.delete(f.nr.key),f.nr.used=!0,f.nr.index=x,f.nr.key=A,f.nr.type=R,g.set(A,f),O=!0;else if(!f.nr.used&&(f.nr.used=!0,O=!0,M)){const q=M.indexOf(f);q!==-1&&M.splice(q,1)}f.item=D,O&&(x===a.length-1&&this.$emit("scroll-end"),x===0&&this.$emit("scroll-start")),n===null?(f.position=h[x-1].accumulator,f.offset=0):(f.position=Math.floor(x/o)*n,f.offset=x%o*i)}return this.$_startIndex=b,this.$_endIndex=$,this.emitUpdate&&this.$emit("update",b,$,N,V),clearTimeout(this.$_sortTimer),this.$_sortTimer=setTimeout(this.sortViews,this.updateInterval+300),{continuous:j}},getListenerTarget(){let e=pe(this.$el);return window.document&&(e===window.document.documentElement||e===window.document.body)&&(e=window),e},getScroll(){const{$el:e,direction:t}=this,n=t==="vertical";let o;if(this.pageMode){const i=e.getBoundingClientRect(),r=n?i.height:i.width;let l=-(n?i.top:i.left),d=n?window.innerHeight:window.innerWidth;l<0&&(d+=l,l=0),l+d>r&&(d=r-l),o={start:l,end:l+d}}else n?o={start:e.scrollTop,end:e.scrollTop+e.clientHeight}:o={start:e.scrollLeft,end:e.scrollLeft+e.clientWidth};return o},applyPageMode(){this.pageMode?this.addListeners():this.removeListeners()},addListeners(){this.listenerTarget=this.getListenerTarget(),this.listenerTarget.addEventListener("scroll",this.handleScroll,ne?{passive:!0}:!1),this.listenerTarget.addEventListener("resize",this.handleResize)},removeListeners(){this.listenerTarget&&(this.listenerTarget.removeEventListener("scroll",this.handleScroll),this.listenerTarget.removeEventListener("resize",this.handleResize),this.listenerTarget=null)},scrollToItem(e){let t;const n=this.gridItems||1;this.itemSize===null?t=e>0?this.sizes[e-1].accumulator:0:t=Math.floor(e/n)*this.itemSize,this.scrollToPosition(t)},scrollToPosition(e){const t=this.direction==="vertical"?{scroll:"scrollTop",start:"top"}:{scroll:"scrollLeft",start:"left"};let n,o,i;if(this.pageMode){const r=pe(this.$el),l=r.tagName==="HTML"?0:r[t.scroll],d=r.getBoundingClientRect(),m=this.$el.getBoundingClientRect()[t.start]-d[t.start];n=r,o=t.scroll,i=e+l+m}else n=this.$el,o=t.scroll,i=e;n[o]=i},itemsLimitError(){throw setTimeout(()=>{console.log("It seems the scroller element isn't scrolling, so it tries to render all the items at once.","Scroller:",this.$el),console.log("Make sure the scroller has a fixed height (or width) and 'overflow-y' (or 'overflow-x') set to 'auto' so it can scroll correctly and only render the items visible in the scroll viewport.")}),new Error("Rendered items limit reached")},sortViews(){this.pool.sort((e,t)=>e.nr.index-t.nr.index)}}};const gn={key:0,ref:"before",class:"vue-recycle-scroller__slot"},yn={key:1,ref:"after",class:"vue-recycle-scroller__slot"};function bn(e,t,n,o,i,r){const l=Be("ResizeObserver"),d=Le("observe-visibility");return je((u(),w("div",{class:F(["vue-recycle-scroller",{ready:i.ready,"page-mode":n.pageMode,[`direction-${e.direction}`]:!0}]),onScrollPassive:t[0]||(t[0]=(...a)=>r.handleScroll&&r.handleScroll(...a))},[e.$slots.before?(u(),w("div",gn,[E(e.$slots,"before")],512)):S("v-if",!0),(u(),T(ue(n.listTag),{ref:"wrapper",style:De({[e.direction==="vertical"?"minHeight":"minWidth"]:i.totalSize+"px"}),class:F(["vue-recycle-scroller__item-wrapper",n.listClass])},{default:y(()=>[(u(!0),w(L,null,H(i.pool,a=>(u(),T(ue(n.itemTag),Re({key:a.nr.id,style:i.ready?{transform:`translate${e.direction==="vertical"?"Y":"X"}(${a.position}px) translate${e.direction==="vertical"?"X":"Y"}(${a.offset}px)`,width:n.gridItems?`${e.direction==="vertical"&&n.itemSecondarySize||n.itemSize}px`:void 0,height:n.gridItems?`${e.direction==="horizontal"&&n.itemSecondarySize||n.itemSize}px`:void 0}:null,class:["vue-recycle-scroller__item-view",[n.itemClass,{hover:!n.skipHover&&i.hoverKey===a.nr.key}]]},Ee(n.skipHover?{}:{mouseenter:()=>{i.hoverKey=a.nr.key},mouseleave:()=>{i.hoverKey=null}})),{default:y(()=>[E(e.$slots,"default",{item:a.item,index:a.nr.index,active:a.nr.used})]),_:2},1040,["style","class"]))),128)),E(e.$slots,"empty")]),_:3},8,["style","class"])),e.$slots.after?(u(),w("div",yn,[E(e.$slots,"after")],512)):S("v-if",!0),_(l,{onNotify:r.handleResize},null,8,["onNotify"])],34)),[[d,r.handleVisibilityChange]])}se.render=bn;se.__file="src/components/RecycleScroller.vue";const xn={"h-full":"",flex:"~ col gap-4"},$n={flex:"~ items-center"},wn={flex:"~ col","w-30":"","of-auto":""},kn={flex:"~ justify-between","w-full":"","text-xs":"",capitalize:"",op75:""},In={"flex-auto":"","of-auto":"",flex:"~ col gap-2",pl6:"",pr4:""},Sn=U({__name:"ModuleInstallList",emits:["close"],setup(e,{emit:t}){const n=t,o=Ge(),i=["downloads","stars","updated","created"],r=K(!1),l=K(i[0]),d={downloads:(v,p)=>v.stats.downloads-p.stats.downloads,stars:(v,p)=>v.stats.stars-p.stats.stars,created:(v,p)=>v.stats.createdAt-p.stats.createdAt,updated:(v,p)=>v.stats.publishedAt-p.stats.publishedAt},a=B(()=>o.value?.toSorted((v,p)=>d[l.value](v,p)*(r.value?1:-1))),m=K(""),h=B(()=>new He(o.value||[],{keys:["name","description","npm","category"],sortFn:(v,p)=>{const I=o.value?.[v.idx],b=o.value?.[p.idx];return I&&b?d[l.value](I,b)*(r.value?1:-1):v.score-p.score},threshold:.2})),g=B(()=>m.value?h.value.search(m.value).map(v=>v.item):a.value);return(v,p)=>{const I=Qe,b=X,$=_e,k=we,N=Ze,V=Wt;return u(),w("div",xn,[_(I,{mx6:"",mt6:"","text-xl":"",op75:"",icon:"i-carbon-intent-request-create",text:"Install Module"}),_(N,{search:c(m),"onUpdate:search":p[1]||(p[1]=f=>Fe(m)?m.value=f:null),"no-padding":"","px-6":"","pb-5":"","pt-2":""},{actions:y(()=>[_(k,{direction:"end",n:"sm primary"},{trigger:y(({click:f})=>[s("div",$n,[_(b,{icon:c(r)?"tabler:sort-ascending":"tabler:sort-descending","h-full":"","rounded-r-none":"",onClick:p[0]||(p[0]=j=>r.value=!c(r))},null,8,["icon"]),_(b,{flex:"~ justify-between","min-w-30":"","border-l-0":"","rounded-l-none":"","px-2":"",capitalize:"",hover:"border-l-1",onClick:j=>f()},{default:y(()=>[z(C(c(l))+" ",1),_($,{icon:"carbon:chevron-down"})]),_:2},1032,["onClick"])])]),default:y(()=>[s("div",wn,[(u(),w(L,null,H(i,f=>_(b,{key:f,border:!1,p2:"",hover:"n-checkbox-hover text-green",onClick:j=>l.value=f},{default:y(()=>[s("span",kn,[z(C(f)+" ",1),c(l)===f?(u(),T($,{key:0,icon:"carbon:checkmark"})):S("",!0)])]),_:2},1032,["onClick"])),64))])]),_:1})]),_:1},8,["search"]),s("div",In,[_(c(se),{class:"scroller",items:c(g),"item-size":200,"key-field":"name"},{default:y(({item:f})=>[_(V,{item:f,onStart:p[2]||(p[2]=j=>n("close"))},null,8,["item"])]),_:1},8,["items"])])])}}}),zn={flex:"~ col gap-2","w-150":"",p4:"",border:"t base"},Mn={capitalize:""},Cn=s("p",{op50:""}," The following command will be executed in your terminal: ",-1),Tn={op50:""},On=s("p",null,[s("span",{op50:""},"After that, Nuxt will "),s("span",{"text-orange":""},"restart automatically"),z(". ")],-1),Nn={flex:"~ gap-3",mt2:"","justify-end":""},Vn=U({__name:"ModuleActionDialog",setup(e){const t=Ue(),n=he(),o={};return(i,r)=>{const l=oe,d=et,a=tt,m=nt,h=qe,g=X,v=We;return u(),T(c(ye),null,{default:y(({resolve:p,args:I})=>[_(v,{"model-value":!0,onClose:b=>p(!1)},{default:y(()=>[_(l,{mod:o,info:I[0],border:"none","w-150":"","n-panel-grids":""},null,8,["info"]),s("div",zn,[s("h2",{"text-xl":"",class:F(I[2]==="install"?"text-primary":"text-red")},[s("span",Mn,C(I[2]),1),z(),s("code",null,C(I[0].name),1),z("? ")],2),Cn,_(d,{code:I[1].commands.join(" "),lang:"bash",px4:"",py2:"",border:"~ base rounded",lines:!1},null,8,["code"]),s("p",Tn,[z(" Then your "),_(a,{role:"button",n:"primary",underline:"",onClick:r[0]||(r[0]=b=>c(n)(c(t)?._nuxtConfigFile)),textContent:"Nuxt config"}),z(" will be updated as: ")]),_(m,{from:I[1].configOriginal,to:I[1].configGenerated,"max-h-80":"","of-auto":"",py2:"",border:"~ base rounded",lang:"ts"},null,8,["from","to"]),On,s("div",Nn,[_(h,{n:"sm amber","flex-auto":"",icon:"i-carbon-data-backup"},{default:y(()=>[z(" Please make sure to backup your project first. ")]),_:1}),_(g,{onClick:b=>p(!1)},{default:y(()=>[z(" Cancel ")]),_:2},1032,["onClick"]),_(g,{n:"solid",capitalize:"",class:F(I[2]==="install"?"n-primary":"n-red"),onClick:b=>p(!0)},{default:y(()=>[z(C(I[2]),1)]),_:2},1032,["class","onClick"])])])]),_:2},1032,["onClose"])]),_:1})}}}),An={class:"markdown-body"},Pn=s("h1",null,"Modules",-1),Bn=s("p",null,[z("Nuxt provides a module system to extend the framework core and simplify integrations. You don’t need to develop everything from scratch or maintain boilerplate if there is already a Nuxt module for it. Adding Nuxt modules is possible using "),s("code",null,"nuxt.config"),z(".")],-1),Ln=s("p",null,[z("You can explore the list of modules on "),s("a",{href:"https://nuxt.com/modules",target:"_blank",rel:"noopener"},"nuxt.com/modules"),z(" or install them directly inside the DevTools.")],-1),jn=s("p",null,[s("a",{href:"https://nuxt.com/docs/guide/concepts/modules",target:"_blank",rel:"noopener"},"Learn more in the documentation")],-1),Rn=[Pn,Bn,Ln,jn],En={__name:"modules",setup(e,{expose:t}){return t({frontmatter:{}}),(o,i)=>(u(),w("div",An,Rn))}},Dn=En,Hn={"h-full":"","w-full":"","of-auto":""},Fn={relative:"","h-20":"","w-20":"",flex:"","flex-none":"",rounded:"","bg-gray:3":"",p3:""},Un=["src","alt"],qn=s("div",{"i-carbon-cube":"",ma:"","text-4xl":"",op30:""},null,-1),Wn={"text-lg":"","group-hover":"text-primary",transition:"",flex:"~ gap-2 items-center"},Kn=s("div",{"i-carbon-circle-dash":"","animate-spin":"","text-xl":"",op75:""},null,-1),Yn={op75:""},Gn=s("div",{"i-carbon-intent-request-create":"","text-4xl":"",op40:"","group-hover":"op75 text-primary",transition:""},null,-1),Xn=s("div",{"text-lg":"",op40:"","group-hover":"op75 text-primary",transition:""}," Install New Module ",-1),Qn={key:0,border:"l base",pos:"fixed bottom-0 right-0 top-0","z-200":"","w-150":"","bg-base":""},Zn="https://api.nuxtjs.org/api/ipx/s_80,f_webp/gh/nuxt/modules/main/icons/",fi=U({__name:"modules",setup(e){const t=K(!1),n=$e(),o=ge(),i=B(()=>n.value.filter(l=>l.isPackageModule)),r=B(()=>n.value.filter(l=>!l.isPackageModule));return Ke(()=>[{id:"action:modules:install",title:"Install a new module",icon:"i-carbon-intent-request-create ",action:()=>{t.value=!0}}]),(l,d)=>{const a=qt,m=ve,h=ie,g=Xe,v=X,p=Sn,I=Vn,b=Dn,$=it;return u(),w(L,null,[s("div",Hn,[_(g,{icon:"carbon-3d-mpr-toggle",text:"Installed Modules","container-class":"grid grid-cols-minmax-400px gap3 px4",padding:!1,description:`Total modules: ${c(i).length}`},{default:y(()=>[(u(!0),w(L,null,H(c(i),k=>(u(),T(a,{key:k.name,mod:k},null,8,["mod"]))),128)),(u(!0),w(L,null,H("processInstallingModules"in l?l.processInstallingModules:c(be),k=>(u(),T(h,{key:k.processId,block:"","min-h-30":"",to:"/modules/terminals",onClick:N=>o.value=k.processId},{default:y(()=>[_(m,{border:"1.5 dashed","h-full":"","animate-pulse":"",p4:"",transition:"",hover:"border-primary",flex:"~ col gap-1 items-center justify-center",role:"button",class:"group"},{default:y(()=>[s("div",Fn,[s("img",{src:Zn+k.info.icon,alt:k.info.name,ma:""},null,8,Un),qn]),s("div",Wn,[Kn,s("span",Yn,"Installing "+C(k.name)+"...",1)])]),_:2},1024)]),_:2},1032,["onClick"]))),128)),_(m,{border:"1.5 dashed","min-h-30":"",p4:"",transition:"",hover:"border-primary",flex:"~ col gap-2 items-center justify-center",role:"button",class:"group",onClick:d[0]||(d[0]=k=>t.value=!0)},{default:y(()=>[Gn,Xn]),_:1})]),_:1},8,["description"]),c(r).length?(u(),T(g,{key:0,icon:"carbon-3d-mpr-toggle",text:"User Modules","container-class":"grid grid-cols-minmax-400px gap3 px4",padding:!1,description:`Total modules: ${c(r).length}`},{default:y(()=>[(u(!0),w(L,null,H(c(r),k=>(u(),w(L,{key:k.meta?.name||k.entryPath},[k.meta?.name||k.entryPath?(u(),T(a,{key:0,mod:k},null,8,["mod"])):S("",!0)],64))),128))]),_:1},8,["description"])):S("",!0),_(me,{name:"fade-in"},{default:y(()=>[c(t)?(u(),w("div",{key:0,class:"fixed bottom-0 left-0 right-0 top-0 z-100","bg-black:20":"","backdrop-blur-2":"",onClick:d[1]||(d[1]=k=>t.value=!1)})):S("",!0)]),_:1}),_(me,{name:"slide-in"},{default:y(()=>[c(t)?(u(),w("div",Qn,[_(v,{icon:"carbon-close",pos:"absolute top-3 right-3 z-10","rounded-full":"","text-xl":"",border:!1,onClick:d[2]||(d[2]=k=>t.value=!1)}),_(p,{onClose:d[3]||(d[3]=k=>t.value=!1)})])):S("",!0)]),_:1}),_(I)]),_($,null,{default:y(()=>[_(b)]),_:1})],64)}}});export{fi as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{q as a,s as o,o as s,m as i,k as e,t as r,y as u,z as l}from"./eUQ_X7Id.js";const c=t=>(u("data-v-4d180ab6"),t=t(),l(),t),d={class:"font-sans antialiased bg-white dark:bg-black text-black dark:text-white grid min-h-screen place-content-center overflow-hidden"},p=c(()=>e("div",{class:"fixed -bottom-1/2 left-0 right-0 h-1/2 spotlight"},null,-1)),h={class:"max-w-520px text-center"},b=["textContent"],g=["textContent"],f={__name:"error-500",props:{appName:{type:String,default:"Nuxt"},version:{type:String,default:""},statusCode:{type:Number,default:500},statusMessage:{type:String,default:"Server error"},description:{type:String,default:"This page is temporarily unavailable."}},setup(t){const n=t;return o({title:`${n.statusCode} - ${n.statusMessage} | ${n.appName}`,script:[],style:[{children:'*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:var(--un-default-border-color, #e5e7eb)}:before,:after{--un-content:""}html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}h1{font-size:inherit;font-weight:inherit}h1,p{margin:0}*,:before,:after{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }'}]}),(m,x)=>(s(),i("div",d,[p,e("div",h,[e("h1",{class:"text-8xl sm:text-10xl font-medium mb-8",textContent:r(t.statusCode)},null,8,b),e("p",{class:"text-xl px-8 sm:px-0 sm:text-4xl font-light mb-16 leading-tight",textContent:r(t.description)},null,8,g)])]))}},k=a(f,[["__scopeId","data-v-4d180ab6"]]);export{k as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{am as m,bd as n,a as s,L as o}from"./
|
|
1
|
+
import{am as m,bd as n,a as s,L as o}from"./eUQ_X7Id.js";function u(){const p=m(),t=n("getComponents",()=>o.getComponents()),l=s(()=>Object.entries(p.value?.nuxt?.vueApp._context.components||{}).map(([e])=>({pascalName:e,global:!0})).filter(e=>!/^Lazy[A-Z]/.test(e.pascalName)).filter(e=>!(t.value||[]).find(a=>a.pascalName===e.pascalName)));return s(()=>[...l.value,...t.value||[]].sort((e,a)=>e.pascalName.localeCompare(a.pascalName)))}function r(){return n("getComponentsRelationships",()=>o.getComponentsRelationships())}export{r as a,u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as e,m as n,o}from"./
|
|
1
|
+
import{d as e,m as n,o}from"./eUQ_X7Id.js";const t={"h-screen":"","w-screen":"","bg-black":""},r=e({__name:"__blank",setup(c){return(s,_)=>(o(),n("div",t))}});export{r as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as i,a0 as r,o as p,m as b,I as u,
|
|
1
|
+
import{d as i,a0 as r,o as p,m as b,I as u,c3 as h,f as a,k as n,l as k,ae as m,i as f,aa as v,G as _,a6 as x}from"./eUQ_X7Id.js";const V=["checked","disabled"],y=["disabled"],B={class:"n-checkbox-box n-checked:n-checkbox-box-checked peer-active:n-active-base peer-focus-visible:n-focus-base n-transition"},w=i({__name:"NCheckbox",props:{modelValue:{type:[Boolean,null],default:!1},disabled:{type:Boolean,default:!1}},setup(c,{emit:t}){const e=r(c,"modelValue",t,{passive:!0});return(o,s)=>{const d=x;return p(),b("label",{class:"n-checkbox hover:n-checkbox-hover select-none items-center n-disabled:n-disabled",checked:a(e)||null,disabled:o.disabled||null},[u(n("input",{"onUpdate:modelValue":s[0]||(s[0]=l=>k(e)?e.value=l:null),type:"checkbox",class:"peer absolute op0",disabled:o.disabled,onKeypress:s[1]||(s[1]=m(l=>e.value=!a(e),["enter"]))},null,40,y),[[h,a(e)]]),n("span",B,[f(d,{class:"n-checkbox-icon scale-0 transform op0 n-transition n-checked:scale-100 n-checked:op100"})]),n("span",{class:_([a(e)?"":"op50","n-transition"])},[v(o.$slots,"default")],2)],8,V)}}});export{w as _};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{d as m}from"./
|
|
1
|
+
import{d as m}from"./A4w2ZRz2.js";import{d as k,a as f,aB as _,o as n,m as s,G as r,k as t,F as d,n as g,t as h}from"./eUQ_X7Id.js";const C=["innerHTML"],B={class:"shiki"},b=["textContent"],v=t("br",null,null,-1),L=k({__name:"NCodeBlock",props:{code:{},lang:{},lines:{type:Boolean,default:!0},transformRendered:{}},emits:["loaded"],setup(a,{emit:c}){const o=a,i=c,l=f(()=>{const e=o.lang==="text"?{code:o.code,supported:!1}:m.value?.devtools.renderCodeHighlight(o.code,o.lang)||{code:o.code,supported:!1};return e.supported&&o.transformRendered&&(e.code=o.transformRendered(e.code)),e.supported&&_(()=>i("loaded")),e});return(e,y)=>e.lang&&l.value.supported?(n(),s("pre",{key:0,class:r(["n-code-block",e.lines?"n-code-block-lines":""]),innerHTML:l.value.code},null,10,C)):(n(),s("pre",{key:1,class:r(["n-code-block",e.lines?"n-code-block-lines":""])},[t("pre",B,[t("code",null,[(n(!0),s(d,null,g(e.code.split(`
|
|
2
2
|
`),(p,u)=>(n(),s(d,{key:u},[t("span",{class:"line",textContent:h(p)},null,8,b),v],64))),128))])])],2))}});export{L as _};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as g}from"./
|
|
1
|
+
import{_ as g}from"./Ctb-QkcA.js";import{d as h,bk as S,e as x,a as w,aC as B,o as n,m as s,k as a,F as i,n as N,G as u,f as o,t as $,i as _,j as m,v as f,h as V,p,_ as T}from"./eUQ_X7Id.js";const D={key:0,relative:"","n-code-block":""},E={flex:"~ wrap","w-full":""},F=["onClick"],L=a("div",{border:"b base","flex-auto":""},null,-1),j={flex:"~ gap-2",px3:"",pb3:"",n:"sm primary"},q=h({__name:"CodeSnippets",props:{codeSnippets:{},eventType:{}},setup(v){const c=v,e=S(c.codeSnippets[0]),b=x(),k=w(()=>e.value?.lang||"text");return B(()=>{c.codeSnippets.includes(e.value)||(e.value=c.codeSnippets[0])}),(l,r)=>{const y=g,d=T;return l.codeSnippets.length?(n(),s("div",D,[a("div",E,[(n(!0),s(i,null,N(l.codeSnippets,(t,C)=>(n(),s("button",{key:C,px4:"",py2:"",border:"r base",hover:"bg-active",class:u(t===o(e)?"":"border-b"),onClick:z=>e.value=t},[a("div",{class:u(t===o(e)?"":"op30"),"font-mono":""},$(t.name),3)],10,F))),128)),L]),o(e)?(n(),s(i,{key:0},[_(y,{code:o(e).code,lang:o(k),lines:!1,"w-full":"","of-auto":"",p3:""},null,8,["code","lang"]),a("div",j,[_(d,{icon:"carbon-copy",onClick:r[0]||(r[0]=t=>o(b)(o(e).code,l.eventType||`code-snippet-${o(e).name}`))},{default:m(()=>[f(" Copy ")]),_:1}),o(e)?.docs?(n(),V(d,{key:0,to:o(e).docs,target:"_blank",icon:"carbon-catalog"},{default:m(()=>[f(" Docs ")]),_:1},8,["to"])):p("",!0)])],64)):p("",!0)])):p("",!0)}}});export{q as _};
|