@nuxt/devtools 1.3.1 → 1.3.2
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 +1 -1
- package/dist/client/200.html +16 -16
- package/dist/client/404.html +16 -16
- package/dist/client/_nuxt/{BkK_qJ34.js → 4DrMDvOf.js} +1 -1
- package/dist/client/_nuxt/{JkOP3KoO.js → 73fsk-_M.js} +1 -1
- package/dist/client/_nuxt/{B5LBktAa.js → 8icePJ4I.js} +1 -1
- package/dist/client/_nuxt/{DCzXkWpZ.js → B-HJZUhU.js} +1 -1
- package/dist/client/_nuxt/{DRzmYdLW.js → B-hub2K2.js} +1 -1
- package/dist/client/_nuxt/{BcobmRlA.js → BL_hfvyy.js} +1 -1
- package/dist/client/_nuxt/{BEabNaD3.js → BO-iudyo.js} +1 -1
- package/dist/client/_nuxt/{B1WwrPQO.js → BVCgwITN.js} +1 -1
- package/dist/client/_nuxt/{CGdFtN3I.js → BVJlJdda.js} +1 -1
- package/dist/client/_nuxt/{CiwDa1gT.js → BVT_pDx1.js} +1 -1
- package/dist/client/_nuxt/{2rHQ-89_.js → BX8u6kVi.js} +1 -1
- package/dist/client/_nuxt/{BYVFCOjE.js → BYLmgL12.js} +1 -1
- package/dist/client/_nuxt/{Cdv1FpqM.js → BZAoIDF4.js} +1 -1
- package/dist/client/_nuxt/{Bs6Xt_hm.js → BZrBobni.js} +1 -1
- package/dist/client/_nuxt/{DTnMHt2b.js → BeLKwQPd.js} +1 -1
- package/dist/client/_nuxt/{BlDdoh7Z.js → BfqSh0jD.js} +1 -1
- package/dist/client/_nuxt/{K0tfU50F.js → BhuDhIKJ.js} +1 -1
- package/dist/client/_nuxt/{DnhEYZMs.js → Bwpf36Bl.js} +1 -1
- package/dist/client/_nuxt/{LKwhzCVp.js → BxZrC5KW.js} +1 -1
- package/dist/client/_nuxt/{B_Ym5JKn.js → C41DfgCv.js} +1 -1
- package/dist/client/_nuxt/{DW3jphl9.js → C49LnR7I.js} +1 -1
- package/dist/client/_nuxt/{DdJKusQR.js → C71Avik8.js} +1 -1
- package/dist/client/_nuxt/{CLKMZBSj.js → C8GUE1SK.js} +1 -1
- package/dist/client/_nuxt/{BOBmlKb6.js → CAWcj-Fr.js} +1 -1
- package/dist/client/_nuxt/{BbqA4Ggc.js → CBxMqsuL.js} +1 -1
- package/dist/client/_nuxt/{B4a1LB7w.js → CI_a6Yq_.js} +1 -1
- package/dist/client/_nuxt/{BBiSxoA1.js → CJ4574JA.js} +1 -1
- package/dist/client/_nuxt/{BNIC4eZE.js → CJU5ujxD.js} +1 -1
- package/dist/client/_nuxt/{DE_Uwlru.js → CQ0ZKsih.js} +1 -1
- package/dist/client/_nuxt/{CDjZ2Pwm.js → CQhVfK23.js} +1 -1
- package/dist/client/_nuxt/{CLVJ1qFH.js → CYVTKYED.js} +1 -1
- package/dist/client/_nuxt/{DRuHuqMZ.js → CYpIh8Vy.js} +1 -1
- package/dist/client/_nuxt/{DQS-rzez.js → C_mHwna3.js} +1 -1
- package/dist/client/_nuxt/{DgR63EN_.js → C_vNhPYi.js} +1 -1
- package/dist/client/_nuxt/{Zl399FYQ.js → CfjSiY3T.js} +1 -1
- package/dist/client/_nuxt/{CQfzcXIu.js → CnDX42ER.js} +1 -1
- package/dist/client/_nuxt/{BL23Bc6O.js → Cri_jq9f.js} +1 -1
- package/dist/client/_nuxt/{-qWogbxp.js → D1Dg62su.js} +1 -1
- package/dist/client/_nuxt/{HBr8xMzr.js → D26FlHPL.js} +1 -1
- package/dist/client/_nuxt/{66lAmVWa.js → D2pUCviE.js} +1 -1
- package/dist/client/_nuxt/{Br0oqAKP.js → D44vw0ad.js} +1 -1
- package/dist/client/_nuxt/{DjVyxknR.js → D7gBCge-.js} +1 -1
- package/dist/client/_nuxt/{5Viy9mJZ.js → D847XyuR.js} +1 -1
- package/dist/client/_nuxt/{CgvvXsvn.js → D9bWLJbD.js} +1 -1
- package/dist/client/_nuxt/{DO3F8Knp.js → DGIjOFdj.js} +1 -1
- package/dist/client/_nuxt/{DCvec3a_.js → DGmtW0X_.js} +1 -1
- package/dist/client/_nuxt/{5rat9AfN.js → DQm4bOV6.js} +1 -1
- package/dist/client/_nuxt/{CgdhjF_I.js → DTf74veE.js} +1 -1
- package/dist/client/_nuxt/{BlKdmH9f.js → DTjbdWHx.js} +1 -1
- package/dist/client/_nuxt/{CSxKs2xg.js → DW2rdoo9.js} +5 -5
- package/dist/client/_nuxt/{BNSBUDhB.js → DZg4WwSa.js} +1 -1
- package/dist/client/_nuxt/{D0LPR03l.js → D_ZAQadg.js} +1 -1
- package/dist/client/_nuxt/{B7vUcbNk.js → Dm8mUwGL.js} +1 -1
- package/dist/client/_nuxt/{D4dWpejW.js → Ds6yAegc.js} +1 -1
- package/dist/client/_nuxt/{tYBohD88.js → DxtaXLVv.js} +1 -1
- package/dist/client/_nuxt/{C0doa8lg.js → Dyh3t1OB.js} +1 -1
- package/dist/client/_nuxt/{BWnGocWo.js → WIBjn-aJ.js} +1 -1
- package/dist/client/_nuxt/{f1qyuWhx.js → _hj05-RZ.js} +1 -1
- package/dist/client/_nuxt/builds/latest.json +1 -1
- package/dist/client/_nuxt/builds/meta/923994c1-a7bd-4c91-b02b-513548587468.json +1 -0
- package/dist/client/_nuxt/entry.C09IdXcP.css +1 -0
- package/dist/client/_nuxt/{DQFmACZp.js → hXtXgLSE.js} +1 -1
- package/dist/client/_nuxt/{J3djixjQ.js → l2Y-wpZG.js} +1 -1
- package/dist/client/_nuxt/{Bx439kud.js → nd9mx79B.js} +1 -1
- package/dist/client/_nuxt/{Dw5Tt5gJ.js → s0KB5W3i.js} +1 -1
- package/dist/client/index.html +16 -16
- package/dist/module.json +1 -1
- package/dist/runtime/plugins/view/FrameBox.vue +8 -8
- package/package.json +4 -4
- package/dist/client/_nuxt/builds/meta/24abe175-04a3-492b-88f5-fff7ea90b9c1.json +0 -1
- package/dist/client/_nuxt/entry.CyP5HdOH.css +0 -1
- package/dist/client/_nuxt/index.BeOv1PgR.css +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as T,o as s,m as i,F as M,n as w,i as p,k as _,h as I,aL as k,f as e,p as b,a as g,av as C,aM as L,t as X,ab as U,r as D,ah as z,au as H,j as v,l as N,a6 as j}from"./
|
|
1
|
+
import{d as T,o as s,m as i,F as M,n as w,i as p,k as _,h as I,aL as k,f as e,p as b,a as g,av as C,aM as L,t as X,ab as U,r as D,ah as z,au as H,j as v,l as N,a6 as j}from"./DW2rdoo9.js";import{_ as P}from"./BO-iudyo.js";import{_ as R}from"./CnDX42ER.js";import{_ as B}from"./BZrBobni.js";import{_ as Y}from"./DGIjOFdj.js";import{_ as q}from"./B-hub2K2.js";import{_ as G}from"./BX8u6kVi.js";import{D as E}from"./BcJws1i5.js";import"./BL_hfvyy.js";import"./_hj05-RZ.js";import"./BVJlJdda.js";const J={flex:"~ wrap gap2",p2:"",pl4:""},K=T({__name:"ComposableTree",props:{map:{},root:{},metadata:{}},setup(y){return(r,m)=>{const a=B,d=Y;return s(),i("div",null,[(s(!0),i(M,null,w(r.map.entries(),([o,h])=>(s(),i("div",{key:o},[p(a,{filepath:o,op50:"","hover:underline":""},null,8,["filepath"]),_("div",J,[(s(!0),i(M,null,w(h,$=>(s(),I(d,{key:$.as,item:$,metadata:r.metadata,filepath:o.match(/^[\w@]/)?void 0:o},null,8,["item","metadata","filepath"]))),128))])]))),128))])}}}),O={key:0,flex:"~ col gap-2 items-start"},Q=T({__name:"HelpImportsDirs",setup(y){const r=k();return(m,a)=>{const d=B;return e(r)?.dirs?(s(),i("div",O,[(s(!0),i(M,null,w(e(r).dirs,o=>(s(),I(d,{key:o,filepath:o,"text-primary":""},null,8,["filepath"]))),128))])):b("",!0)}}}),W={flex:"~ gap-2 wrap",mb6:""},Z=T({__name:"HelpImportsModules",setup(y){const r=k(),m=g(()=>[...new Set(r.value?.imports.map(a=>C(a.from)).filter(a=>!!a&&!L(a)))]);return(a,d)=>(s(),i("div",W,[(s(!0),i(M,null,w(e(m),o=>(s(),i("code",{key:o,rounded:"","bg-primary:5":"",p:"x2 y0.5","text-primary":""},X(o),1))),128))]))}}),ee={class:"markdown-body"},oe=_("h1",null,"Auto imports",-1),te=_("p",null,"Nuxt auto-imports helper functions, composables and Vue APIs to be used across your application without explicitly importing them. Based on the directory structure, every Nuxt application can also use auto-imports for its own components, composables and plugins. Components, composables or plugins can use these functions.",-1),se=_("hr",null,null,-1),ne=_("p",null,"According to your config, exports of files under the following folders will be registed as auto-imports entry:",-1),ae=_("p",null,"Meanwhile, modules could also provide auto-imports for their own components. You have auto-imports from the following modules as well:",-1),re=_("hr",null,null,-1),le=_("p",null,[_("a",{href:"https://nuxt.com/docs/guide/concepts/auto-imports",target:"_blank",rel:"noopener"},"Learn more in the documentation")],-1),ie={__name:"imports",setup(y,{expose:r}){return r({frontmatter:{}}),(a,d)=>{const o=Q,h=Z;return s(),i("div",ee,[oe,te,se,ne,p(o),ae,p(h),re,le])}}},ue={key:0,relative:"","h-full":"","of-auto":""},pe={key:0,flex:"~ gap-2 items-center"},ye=T({__name:"imports",setup(y){const r=U(),m=D("all"),a=D(""),d=k(),o=g(()=>d.value?.metadata),h=g(()=>d.value?.imports.filter(n=>n.as||n.name).sort((n,u)=>(n.as||n.name).localeCompare(u.as||u.name))||[]),$=g(()=>new z(h.value,{keys:["from","as","name"]})),l=g(()=>{const n=new Map,u=new Map,A=new Map;let f=a.value?$.value.search(a.value).map(t=>t.item):h.value;m.value==="using"&&o.value?f=f.filter(t=>(t.as||t.name)in o.value.injectionUsage):m.value==="not-used"&&o.value&&(f=f.filter(t=>!((t.as||t.name)in o.value.injectionUsage)));const S={user:0,lib:0,builtin:0};return f.forEach(t=>{const c=H(t.from)?L(C(t.from))?A:u:n;c.has(t.from)||c.set(t.from,[]),c.get(t.from).push(t),S[c===n?"user":c===u?"lib":"builtin"]++}),{user:n,lib:u,builtin:A,count:S}});return(n,u)=>{const A=j,f=P,S=R,t=K,c=q,F=ie,V=G;return s(),i(M,null,[e(r)?(s(),i("div",ue,[p(S,{search:e(a),"onUpdate:search":u[1]||(u[1]=x=>N(a)?a.value=x:null),pb3:""},{default:v(()=>[e(o)?(s(),i("div",pe,[p(A,{icon:"carbon-filter",op50:""}),p(f,{modelValue:e(m),"onUpdate:modelValue":u[0]||(u[0]=x=>N(m)?m.value=x:null),n:"primary sm",options:[{label:"All",value:"all"},{label:"Using",value:"using"},{label:"Not used",value:"not-used"}]},null,8,["modelValue"])])):b("",!0)]),_:1},8,["search"]),e(l).user.size?(s(),I(c,{key:0,open:e(l).count.user<=("DETAILS_MAX_ITEMS"in n?n.DETAILS_MAX_ITEMS:e(E)),icon:"carbon-function",text:"User composables",description:`${e(l).count.user} composables from ${e(l).user.size} modules`},{default:v(()=>[p(t,{map:e(l).user,root:e(r).rootDir,metadata:e(o)},null,8,["map","root","metadata"])]),_:1},8,["open","description"])):b("",!0),e(l).builtin.size?(s(),I(c,{key:1,open:e(l).count.builtin<=("DETAILS_MAX_ITEMS"in n?n.DETAILS_MAX_ITEMS:e(E)),icon:"simple-icons-nuxtdotjs",text:"Built-in composables",description:`${e(l).count.builtin} composables`},{default:v(()=>[p(t,{map:e(l).builtin,root:e(r).rootDir,metadata:e(o)},null,8,["map","root","metadata"])]),_:1},8,["open","description"])):b("",!0),e(l).lib.size?(s(),I(c,{key:2,open:e(l).count.lib<=("DETAILS_MAX_ITEMS"in n?n.DETAILS_MAX_ITEMS:e(E)),icon:"carbon-3d-mpr-toggle",text:"Composables from libraries",description:`${e(l).count.lib} composables from ${e(l).lib.size} packages`},{default:v(()=>[p(t,{map:e(l).lib,root:e(r).rootDir,metadata:e(o)},null,8,["map","root","metadata"])]),_:1},8,["open","description"])):b("",!0)])):b("",!0),p(V,null,{default:v(()=>[p(F)]),_:1})],64)}}});export{ye as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{_ as Ce}from"./Bs6Xt_hm.js";import{d as F,a as B,ac as _e,o as u,h as T,j as g,k as s,aa as E,f as c,v as z,t as C,m as w,G as U,p as S,i as _,F as L,n as H,x as ie,a6 as ve,ar as ge,R as ye,aO as Te,L as ce,M as de,V as Oe,aP as be,aQ as xe,_ as X,y as Ne,z as Ve,aA as $e,aR as Ae,aS as Pe,aT as Be,as as Le,a2 as je,I as Re,ax as ue,aw as Ee,aU as De,a9 as He,r as K,ah as Ue,l as Fe,ab as qe,Y as We,Z as Ke,S as Ye,aV as me}from"./CSxKs2xg.js";import{_ as Ge,u as we,a as Xe}from"./DW3jphl9.js";import{_ as Qe}from"./DRzmYdLW.js";import{_ as Ze}from"./CGdFtN3I.js";import{_ as ke}from"./Zl399FYQ.js";import{_ as Je}from"./CQfzcXIu.js";import{_ as et}from"./B7vUcbNk.js";import{_ as tt}from"./DjVyxknR.js";import{_ as nt}from"./B_Ym5JKn.js";import{_ as it}from"./5rat9AfN.js";import{_ as ot}from"./2rHQ-89_.js";import"./K0tfU50F.js";import"./f1qyuWhx.js";const st={flex:"~ col gap2","flex-auto":"","of-hidden":"",px1:""},rt={"gap-1t":"",flex:"","items-center":"","text-ellipsis":"","ws-nowrap":"","text-lg":""},lt={key:2},at=s("div",{"flex-auto":""},null,-1),ct={key:1,flex:"~ gap-2",title:"Documentation"},dt=s("span",{"i-carbon-link":"","text-lg":"",op50:""},null,-1),ut={key:2,flex:"~ gap-2"},mt=s("span",{"i-carbon-logo-github":"","text-lg":"",op50:""},null,-1),ft={key:0,flex:"~ gap-4 items-center"},pt={flex:"~ gap-1 items-center",op50:""},ht={flex:"~ gap-1 items-center",op50:""},_t={flex:"~ col","items-end":""},vt={key:0,"h-20":"","w-20":"",flex:"","flex-none":"",rounded:"","bg-gray:3":"",p4:""},gt=["src","alt"],yt=s("div",{"i-carbon-cube":"",ma:"","text-4xl":"",op30:""},null,-1),bt={key:1,flex:"~",mt2:"","flex-auto":"","items-end":"","justify-end":""},xt=["src"],$t=s("div",{"flex-auto":""},null,-1),wt={flex:"","justify-end":""},kt="https://api.nuxtjs.org/api/ipx/s_80,f_webp/gh/nuxt/modules/main/icons/",It="https://api.nuxtjs.org/api/ipx/s_44,f_webp/gh_avatar/",St="https://github.com/",zt="https://www.npmjs.com/package/",oe=F({__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=_e();return(i,r)=>{const l=ie,d=ve,a=ge;return u(),T(a,{p4:"",flex:"~ gap2"},{default:g(()=>[s("div",st,[E(i.$slots,"main",{},()=>[s("div",rt,[i.mod.isPackageModule?(u(),T(l,{key:0,to:zt+(c(n).npm||c(n).name),target:"_blank",hover:"underline text-primary"},{default:g(()=>[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",lt,C(c(n).name),1)),E(i.$slots,"badge")]),c(n).description?(u(),w("div",{key:0,class:U(i.compact?"ws-nowrap of-hidden truncate":"line-clamp-2"),"mt--1":"","text-sm":"",op50:""},C(c(n).description),3)):S("",!0),at,c(n).website?(u(),w("div",ct,[dt,_(l,{to:c(n).website,target:"_blank","of-hidden":"",truncate:"","ws-nowrap":"","text-sm":"",op50:"",hover:"op100 underline text-primary"},{default:g(()=>[z(C(c(n).website.replace(/^https?:\/\//,"")),1)]),_:1},8,["to"])])):S("",!0),c(n).github?(u(),w("div",ut,[mt,_(l,{to:c(n).github,target:"_blank","of-hidden":"",truncate:"","ws-nowrap":"","text-sm":"",op50:"",hover:"op100 underline text-primary"},{default:g(()=>[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",ft,[s("div",pt,[_(d,{icon:"carbon-star","text-lg":""}),s("span",null,C(c(n).stats.stars),1)]),s("div",ht,[_(d,{icon:"carbon-download","text-lg":""}),s("span",null,C(c(n).stats.downloads),1)])])):S("",!0)]),s("div",_t,[c(n).icon||i.mod.isPackageModule?(u(),w("div",vt,[c(n).icon?(u(),w("img",{key:0,src:kt+c(n).icon,alt:i.mod.name,ma:""},null,8,gt)):S("",!0),yt])):S("",!0),c(n).maintainers?.length&&i.maintainers?(u(),w("div",bt,[(u(!0),w(L,null,H(c(n).maintainers,m=>(u(),T(l,{key:m.name,target:"_blank",to:St+m.github,title:m.name},{default:g(()=>[s("img",{src:It+m.github,"h-6":"","w-6":"","rounded-full":""},null,8,xt)]),_:2},1032,["to","title"]))),128))])):S("",!0),i.$slots.actions?(u(),w(L,{key:2},[$t,s("div",wt,[E(i.$slots,"actions")])],64)):S("",!0)])]),_:3})}}}),Mt={key:0,flex:"~ gap-2",title:"Open on filesystem"},Ct=s("span",{"i-carbon-folder-move-to":"","text-lg":"",op50:""},null,-1),Tt=s("span",{"i-carbon-circle-dash":"","animate-spin":"","text-lg":"",op50:""},null,-1),Ot=s("code",{"text-sm":"",op50:""},"Upgrading...",-1),Nt={key:1,"mx--2":""},Vt=["onClick"],At=s("span",{"i-carbon-intent-request-active":"","text-lg":"","text-primary":""},null,-1),Pt=s("code",{"text-xs":""},"Update installed, click to restart",-1),Bt=[At,Pt],Lt={key:2,"mx--2":""},jt=["onClick"],Rt=s("span",{"i-carbon-intent-request-upgrade":"","text-lg":"",op50:""},null,-1),Et={op50:""},Dt=s("div",{"i-carbon-arrow-right":"",op50:""},null,-1),Ht={"text-green":""},Ut={key:3,flex:"~ gap-2","items-center":"",title:"NPM"},Ft=s("span",{"i-carbon-cube":"","text-lg":"",op50:""},null,-1),qt={"text-sm":"",op50:""},Wt=F({__name:"ModuleItem",props:{mod:{}},setup(e){const t=e,n=B(()=>t.mod.info),o=B(()=>({...t.mod?.meta,...t.mod,...n.value})),i=ye();return(r,l)=>{const d=Ce,a=ie,m=Ge,h=oe;return u(),T(h,{mod:r.mod,info:c(n)},{items:g(()=>[r.mod.entryPath?(u(),w("div",Mt,[Ct,_(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:g(({info:v,update:b,state:p,id:I,restart:$})=>[p==="running"?(u(),T(a,{key:0,flex:"~ gap-2","animate-pulse":"","items-center":"",to:I?"/modules/terminals":void 0,onClick:x=>I?i.value=I:void 0},{default:g(()=>[Tt,Ot]),_:2},1032,["to","onClick"])):p==="updated"?(u(),w("div",Nt,[s("button",{flex:"~ gap-2",hover:"bg-primary/20","items-center":"",rounded:"","bg-primary:10":"",px2:"","text-sm":"","text-primary":"",onClick:$},Bt,8,Vt)])):v?.needsUpdate?(u(),w("div",Lt,[s("button",{flex:"~ gap-2",title:"Click to upgrade","items-center":"",rounded:"",px2:"","text-sm":"",hover:"bg-active",onClick:x=>b()},[Rt,s("code",Et,"v"+C(v.current),1),Dt,s("code",Ht,"v"+C(v.latest),1)],8,jt)])):v?.latest?(u(),w("div",Ut,[Ft,s("code",qt,"v"+C(v.current),1)])):S("",!0)]),_:1},8,["package-name"])):S("",!0)]),_:1},8,["mod","info"])}}}),Kt=F({__name:"ModuleItemInstall",props:{item:{}},emits:["start"],setup(e,{emit:t}){const n=e,o=t,i=we(),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,v){const b=v==="install"?ce.installNuxtModule:ce.uninstallNuxtModule,p=await b(await de(),h.npm,!0);Oe(`modules:${v}`,{moduleName:h.npm}),p.commands&&await be.start(h,p,v)&&(xe.value.push({name:h.npm,info:h,processId:p.processId}),o("start"),await b(await de(),h.npm,!1))}const m={};return(h,v)=>{const b=et,p=X,I=ke,$=oe;return u(),T($,{mod:m,role:c(l)?"":"button",info:h.item,mb2:"","h-full":"",class:U(c(l)?"border-dashed op75":"hover:bg-active!"),compact:!0,onClick:v[1]||(v[1]=x=>c(l)?null:a(h.item,"install"))},Te({_:2},[c(l)?{name:"badge",fn:g(()=>[_(b,{n:"green",textContent:"Installed"}),c(d)?(u(),T(I,{key:0,n:"sm green"},{trigger:g(({click:x})=>[_(p,{icon:"carbon-overflow-menu-vertical",border:!1,onClick:k=>x()},null,8,["onClick"])]),default:g(()=>[_(p,{icon:"carbon-trash-can",n:"red",onClick:v[0]||(v[0]=x=>a(h.item,"uninstall"))},{default:g(()=>[z(" Uninstall ")]),_:1})]),_:1})):S("",!0)]),key:"0"}:void 0]),1032,["role","info","class"])}}});function Yt(){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=Yt()!==-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(),$e(()=>{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 Gt=Ae();Ne("data-v-b329ee4c");const Xt={class:"resize-observer",tabindex:"-1"};Ve();const Qt=Gt((e,t,n,o,i,r)=>(u(),T("div",Xt)));Q.render=Qt;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 Zt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function fe(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&&fe(e.prototype,t),n&&fe(e,n),e}function pe(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 Ce}from"./BZrBobni.js";import{d as F,a as B,ac as _e,o as u,h as T,j as g,k as s,aa as E,f as c,v as z,t as C,m as w,G as U,p as S,i as _,F as L,n as H,x as ie,a6 as ve,ar as ge,R as ye,aO as Te,L as ce,M as de,V as Oe,aP as be,aQ as xe,_ as X,y as Ne,z as Ve,aA as $e,aR as Ae,aS as Pe,aT as Be,as as Le,a2 as je,I as Re,ax as ue,aw as Ee,aU as De,a9 as He,r as K,ah as Ue,l as Fe,ab as qe,Y as We,Z as Ke,S as Ye,aV as me}from"./DW2rdoo9.js";import{_ as Ge,u as we,a as Xe}from"./C49LnR7I.js";import{_ as Qe}from"./B-hub2K2.js";import{_ as Ze}from"./BVJlJdda.js";import{_ as ke}from"./CfjSiY3T.js";import{_ as Je}from"./CnDX42ER.js";import{_ as et}from"./Dm8mUwGL.js";import{_ as tt}from"./D7gBCge-.js";import{_ as nt}from"./C41DfgCv.js";import{_ as it}from"./DQm4bOV6.js";import{_ as ot}from"./BX8u6kVi.js";import"./BhuDhIKJ.js";import"./_hj05-RZ.js";const st={flex:"~ col gap2","flex-auto":"","of-hidden":"",px1:""},rt={"gap-1t":"",flex:"","items-center":"","text-ellipsis":"","ws-nowrap":"","text-lg":""},lt={key:2},at=s("div",{"flex-auto":""},null,-1),ct={key:1,flex:"~ gap-2",title:"Documentation"},dt=s("span",{"i-carbon-link":"","text-lg":"",op50:""},null,-1),ut={key:2,flex:"~ gap-2"},mt=s("span",{"i-carbon-logo-github":"","text-lg":"",op50:""},null,-1),ft={key:0,flex:"~ gap-4 items-center"},pt={flex:"~ gap-1 items-center",op50:""},ht={flex:"~ gap-1 items-center",op50:""},_t={flex:"~ col","items-end":""},vt={key:0,"h-20":"","w-20":"",flex:"","flex-none":"",rounded:"","bg-gray:3":"",p4:""},gt=["src","alt"],yt=s("div",{"i-carbon-cube":"",ma:"","text-4xl":"",op30:""},null,-1),bt={key:1,flex:"~",mt2:"","flex-auto":"","items-end":"","justify-end":""},xt=["src"],$t=s("div",{"flex-auto":""},null,-1),wt={flex:"","justify-end":""},kt="https://api.nuxtjs.org/api/ipx/s_80,f_webp/gh/nuxt/modules/main/icons/",It="https://api.nuxtjs.org/api/ipx/s_44,f_webp/gh_avatar/",St="https://github.com/",zt="https://www.npmjs.com/package/",oe=F({__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=_e();return(i,r)=>{const l=ie,d=ve,a=ge;return u(),T(a,{p4:"",flex:"~ gap2"},{default:g(()=>[s("div",st,[E(i.$slots,"main",{},()=>[s("div",rt,[i.mod.isPackageModule?(u(),T(l,{key:0,to:zt+(c(n).npm||c(n).name),target:"_blank",hover:"underline text-primary"},{default:g(()=>[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",lt,C(c(n).name),1)),E(i.$slots,"badge")]),c(n).description?(u(),w("div",{key:0,class:U(i.compact?"ws-nowrap of-hidden truncate":"line-clamp-2"),"mt--1":"","text-sm":"",op50:""},C(c(n).description),3)):S("",!0),at,c(n).website?(u(),w("div",ct,[dt,_(l,{to:c(n).website,target:"_blank","of-hidden":"",truncate:"","ws-nowrap":"","text-sm":"",op50:"",hover:"op100 underline text-primary"},{default:g(()=>[z(C(c(n).website.replace(/^https?:\/\//,"")),1)]),_:1},8,["to"])])):S("",!0),c(n).github?(u(),w("div",ut,[mt,_(l,{to:c(n).github,target:"_blank","of-hidden":"",truncate:"","ws-nowrap":"","text-sm":"",op50:"",hover:"op100 underline text-primary"},{default:g(()=>[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",ft,[s("div",pt,[_(d,{icon:"carbon-star","text-lg":""}),s("span",null,C(c(n).stats.stars),1)]),s("div",ht,[_(d,{icon:"carbon-download","text-lg":""}),s("span",null,C(c(n).stats.downloads),1)])])):S("",!0)]),s("div",_t,[c(n).icon||i.mod.isPackageModule?(u(),w("div",vt,[c(n).icon?(u(),w("img",{key:0,src:kt+c(n).icon,alt:i.mod.name,ma:""},null,8,gt)):S("",!0),yt])):S("",!0),c(n).maintainers?.length&&i.maintainers?(u(),w("div",bt,[(u(!0),w(L,null,H(c(n).maintainers,m=>(u(),T(l,{key:m.name,target:"_blank",to:St+m.github,title:m.name},{default:g(()=>[s("img",{src:It+m.github,"h-6":"","w-6":"","rounded-full":""},null,8,xt)]),_:2},1032,["to","title"]))),128))])):S("",!0),i.$slots.actions?(u(),w(L,{key:2},[$t,s("div",wt,[E(i.$slots,"actions")])],64)):S("",!0)])]),_:3})}}}),Mt={key:0,flex:"~ gap-2",title:"Open on filesystem"},Ct=s("span",{"i-carbon-folder-move-to":"","text-lg":"",op50:""},null,-1),Tt=s("span",{"i-carbon-circle-dash":"","animate-spin":"","text-lg":"",op50:""},null,-1),Ot=s("code",{"text-sm":"",op50:""},"Upgrading...",-1),Nt={key:1,"mx--2":""},Vt=["onClick"],At=s("span",{"i-carbon-intent-request-active":"","text-lg":"","text-primary":""},null,-1),Pt=s("code",{"text-xs":""},"Update installed, click to restart",-1),Bt=[At,Pt],Lt={key:2,"mx--2":""},jt=["onClick"],Rt=s("span",{"i-carbon-intent-request-upgrade":"","text-lg":"",op50:""},null,-1),Et={op50:""},Dt=s("div",{"i-carbon-arrow-right":"",op50:""},null,-1),Ht={"text-green":""},Ut={key:3,flex:"~ gap-2","items-center":"",title:"NPM"},Ft=s("span",{"i-carbon-cube":"","text-lg":"",op50:""},null,-1),qt={"text-sm":"",op50:""},Wt=F({__name:"ModuleItem",props:{mod:{}},setup(e){const t=e,n=B(()=>t.mod.info),o=B(()=>({...t.mod?.meta,...t.mod,...n.value})),i=ye();return(r,l)=>{const d=Ce,a=ie,m=Ge,h=oe;return u(),T(h,{mod:r.mod,info:c(n)},{items:g(()=>[r.mod.entryPath?(u(),w("div",Mt,[Ct,_(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:g(({info:v,update:b,state:p,id:I,restart:$})=>[p==="running"?(u(),T(a,{key:0,flex:"~ gap-2","animate-pulse":"","items-center":"",to:I?"/modules/terminals":void 0,onClick:x=>I?i.value=I:void 0},{default:g(()=>[Tt,Ot]),_:2},1032,["to","onClick"])):p==="updated"?(u(),w("div",Nt,[s("button",{flex:"~ gap-2",hover:"bg-primary/20","items-center":"",rounded:"","bg-primary:10":"",px2:"","text-sm":"","text-primary":"",onClick:$},Bt,8,Vt)])):v?.needsUpdate?(u(),w("div",Lt,[s("button",{flex:"~ gap-2",title:"Click to upgrade","items-center":"",rounded:"",px2:"","text-sm":"",hover:"bg-active",onClick:x=>b()},[Rt,s("code",Et,"v"+C(v.current),1),Dt,s("code",Ht,"v"+C(v.latest),1)],8,jt)])):v?.latest?(u(),w("div",Ut,[Ft,s("code",qt,"v"+C(v.current),1)])):S("",!0)]),_:1},8,["package-name"])):S("",!0)]),_:1},8,["mod","info"])}}}),Kt=F({__name:"ModuleItemInstall",props:{item:{}},emits:["start"],setup(e,{emit:t}){const n=e,o=t,i=we(),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,v){const b=v==="install"?ce.installNuxtModule:ce.uninstallNuxtModule,p=await b(await de(),h.npm,!0);Oe(`modules:${v}`,{moduleName:h.npm}),p.commands&&await be.start(h,p,v)&&(xe.value.push({name:h.npm,info:h,processId:p.processId}),o("start"),await b(await de(),h.npm,!1))}const m={};return(h,v)=>{const b=et,p=X,I=ke,$=oe;return u(),T($,{mod:m,role:c(l)?"":"button",info:h.item,mb2:"","h-full":"",class:U(c(l)?"border-dashed op75":"hover:bg-active!"),compact:!0,onClick:v[1]||(v[1]=x=>c(l)?null:a(h.item,"install"))},Te({_:2},[c(l)?{name:"badge",fn:g(()=>[_(b,{n:"green",textContent:"Installed"}),c(d)?(u(),T(I,{key:0,n:"sm green"},{trigger:g(({click:x})=>[_(p,{icon:"carbon-overflow-menu-vertical",border:!1,onClick:k=>x()},null,8,["onClick"])]),default:g(()=>[_(p,{icon:"carbon-trash-can",n:"red",onClick:v[0]||(v[0]=x=>a(h.item,"uninstall"))},{default:g(()=>[z(" Uninstall ")]),_:1})]),_:1})):S("",!0)]),key:"0"}:void 0]),1032,["role","info","class"])}}});function Yt(){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=Yt()!==-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(),$e(()=>{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 Gt=Ae();Ne("data-v-b329ee4c");const Xt={class:"resize-observer",tabindex:"-1"};Ve();const Qt=Gt((e,t,n,o,i,r)=>(u(),T("div",Xt)));Q.render=Qt;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 Zt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function fe(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&&fe(e.prototype,t),n&&fe(e,n),e}function pe(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),v=1;v<m;v++)h[v-1]=arguments[v];if(r=h,!(o&&a===i)){var b=n.leading;typeof b=="function"&&(b=b(a,i)),(!o||a!==i)&&b&&e.apply(void 0,[a].concat(pe(r))),i=a,clearTimeout(o),o=setTimeout(function(){e.apply(void 0,[a].concat(pe(r))),o=0},t)}};return l._clear=function(){clearTimeout(o),o=null},l}function Ie(e,t){if(e===t)return!0;if(G(e)==="object"){for(var n in e)if(!Ie(e[n],t[n]))return!1;return!0}return!1}var ln=function(){function e(t,n,o){Zt(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(v){return v.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),$e(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 Se(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(!Ie(o,i)){var r=e._vue_visibilityState;if(!o){ze(e);return}r?r.createObserver(o,n):Se(e,{value:o},n)}}function ze(e){var t=e._vue_visibilityState;t&&(t.destroyObserver(),delete e._vue_visibilityState)}var cn={beforeMount:Se,updated:an,unmounted:ze},dn={itemsLimit:1e3},un=/(auto|scroll)/;function Me(e,t){return e.parentNode===null?t:Me(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 he(e){if(e instanceof HTMLElement||e instanceof SVGElement){for(var t=Me(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=Pe({id:vn++,index:t,used:!0,key:o,type:i}),l=Be({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,v=this.$_views,b=this.$_unusedViews,p=this.pool,I=this.itemIndexByKey;let $,x,k,N,V;if(!m)$=x=N=V=k=0;else if(this.$_prerender)$=N=0,x=V=Math.min(this.prerender,a.length),k=null;else{const y=this.getScroll();if(t){let O=y.start-this.$_lastUpdateScrollPosition;if(O<0&&(O=-O),n===null&&O<r||O<n)return{continuous:!0}}this.$_lastUpdateScrollPosition=y.start;const A=this.buffer;y.start-=A,y.end+=A;let M=0;if(this.$refs.before&&(M=this.$refs.before.scrollHeight,y.start-=M),this.$refs.after){const O=this.$refs.after.scrollHeight;y.end+=O}if(n===null){let O,q=0,le=m-1,P=~~(m/2),ae;do ae=P,O=h[P].accumulator,O<y.start?q=P:P<m-1&&h[P+1].accumulator>y.start&&(le=P),P=~~((q+le)/2);while(P!==ae);for(P<0&&(P=0),$=P,k=h[m-1].accumulator,x=P;x<m&&h[x].accumulator<y.end;x++);for(x===-1?x=a.length-1:(x++,x>m&&(x=m)),N=$;N<m&&M+h[N].accumulator<y.start;N++);for(V=N;V<m&&M+h[V].accumulator<y.end;V++);}else{$=~~(y.start/n*o);const O=$%o;$-=O,x=Math.ceil(y.end/n*o),N=Math.max(0,Math.floor((y.start-M)/n*o)),V=Math.floor((y.end-M)/n*o),$<0&&($=0),x>m&&(x=m),N<0&&(N=0),V>m&&(V=m),k=Math.ceil(m/o)*n}}x-$>dn.itemsLimit&&this.itemsLimitError(),this.totalSize=k;let f;const j=$<=this.$_endIndex&&x>=this.$_startIndex;if(j)for(let y=0,A=p.length;y<A;y++)f=p[y],f.nr.used&&(e&&(f.nr.index=I[f.item[d]]),(f.nr.index==null||f.nr.index<$||f.nr.index>=x)&&this.unuseView(f));const re=j?null:new Map;let D,R,W;for(let y=$;y<x;y++){D=a[y];const A=d?D[d]:D;if(A==null)throw new Error(`Key is ${A} on item (keyField is '${d}')`);if(f=v.get(A),!n&&!h[y].size){f&&this.unuseView(f);continue}R=D[l];let M=b.get(R),O=!1;if(!f)j?M&&M.length?f=M.pop():f=this.addView(p,y,D,A,R):(W=re.get(R)||0,(!M||W>=M.length)&&(f=this.addView(p,y,D,A,R),this.unuseView(f,!0),M=b.get(R)),f=M[W],re.set(R,W+1)),v.delete(f.nr.key),f.nr.used=!0,f.nr.index=y,f.nr.key=A,f.nr.type=R,v.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&&(y===a.length-1&&this.$emit("scroll-end"),y===0&&this.$emit("scroll-start")),n===null?(f.position=h[y-1].accumulator,f.offset=0):(f.position=Math.floor(y/o)*n,f.offset=y%o*i)}return this.$_startIndex=$,this.$_endIndex=x,this.emitUpdate&&this.$emit("update",$,x,N,V),clearTimeout(this.$_sortTimer),this.$_sortTimer=setTimeout(this.sortViews,this.updateInterval+300),{continuous:j}},getListenerTarget(){let e=he(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=he(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=Le("ResizeObserver"),d=je("observe-visibility");return Re((u(),w("div",{class:U(["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:He({[e.direction==="vertical"?"minHeight":"minWidth"]:i.totalSize+"px"}),class:U(["vue-recycle-scroller__item-wrapper",n.listClass])},{default:g(()=>[(u(!0),w(L,null,H(i.pool,a=>(u(),T(ue(n.itemTag),Ee({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}]]},De(n.skipHover?{}:{mouseenter:()=>{i.hoverKey=a.nr.key},mouseleave:()=>{i.hoverKey=null}})),{default:g(()=>[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=F({__name:"ModuleInstallList",emits:["close"],setup(e,{emit:t}){const n=t,o=Xe(),i=["downloads","stars","updated","created"],r=K(!1),l=K(i[0]),d={downloads:(b,p)=>b.stats.downloads-p.stats.downloads,stars:(b,p)=>b.stats.stars-p.stats.stars,created:(b,p)=>b.stats.createdAt-p.stats.createdAt,updated:(b,p)=>b.stats.publishedAt-p.stats.publishedAt},a=B(()=>o.value?.slice().sort((b,p)=>d[l.value](b,p)*(r.value?1:-1))),m=K(""),h=B(()=>new Ue(a.value||[],{keys:["name","description","npm","category"]})),v=B(()=>m.value?h.value.search(m.value).map(b=>b.item):a.value);return(b,p)=>{const I=Ze,$=X,x=ve,k=ke,N=Je,V=Kt;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:g(()=>[_(k,{direction:"end",n:"sm primary"},{trigger:g(({click:f})=>[s("div",$n,[_($,{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"]),_($,{flex:"~ justify-between","min-w-30":"","border-l-0":"","rounded-l-none":"","px-2":"",capitalize:"",hover:"border-l-1",onClick:j=>f()},{default:g(()=>[z(C(c(l))+" ",1),_(x,{icon:"carbon:chevron-down"})]),_:2},1032,["onClick"])])]),default:g(()=>[s("div",wn,[(u(),w(L,null,H(i,f=>_($,{key:f,border:!1,p2:"",hover:"n-checkbox-hover text-green",onClick:j=>l.value=f},{default:g(()=>[s("span",kn,[z(C(f)+" ",1),c(l)===f?(u(),T(x,{key:0,icon:"carbon:checkmark"})):S("",!0)])]),_:2},1032,["onClick"])),64))])]),_:1})]),_:1},8,["search"]),s("div",In,[_(c(se),{class:"scroller",items:c(v),"item-size":200,"key-field":"name"},{default:g(({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=F({__name:"ModuleActionDialog",setup(e){const t=qe(),n=_e(),o={};return(i,r)=>{const l=oe,d=tt,a=nt,m=it,h=We,v=X,b=Ke;return u(),T(c(be),null,{default:g(({resolve:p,args:I})=>[_(b,{"model-value":!0,onClose:$=>p(!1)},{default:g(()=>[_(l,{mod:o,info:I[0],border:"none","w-150":"","n-panel-grids":""},null,8,["info"]),s("div",zn,[s("h2",{"text-xl":"",class:U(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]=$=>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:g(()=>[z(" Please make sure to backup your project first. ")]),_:1}),_(v,{onClick:$=>p(!1)},{default:g(()=>[z(" Cancel ")]),_:2},1032,["onClick"]),_(v,{n:"solid",capitalize:"",class:U(I[2]==="install"?"n-primary":"n-red"),onClick:$=>p(!0)},{default:g(()=>[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={"h-full":"","w-full":"","of-auto":""},Hn={relative:"","h-20":"","w-20":"",flex:"","flex-none":"",rounded:"","bg-gray:3":"",p3:""},Un=["src","alt"],Fn=s("div",{"i-carbon-cube":"",ma:"","text-4xl":"",op30:""},null,-1),qn={"text-lg":"","group-hover":"text-primary",transition:"",flex:"~ gap-2 items-center"},Wn=s("div",{"i-carbon-circle-dash":"","animate-spin":"","text-xl":"",op75:""},null,-1),Kn={op75:""},Yn=s("div",{"i-carbon-intent-request-create":"","text-4xl":"",op40:"","group-hover":"op75 text-primary",transition:""},null,-1),Gn=s("div",{"text-lg":"",op40:"","group-hover":"op75 text-primary",transition:""}," Install New Module ",-1),Xn={key:0,border:"l base",pos:"fixed bottom-0 right-0 top-0","z-200":"","w-150":"","bg-base":""},Qn="https://api.nuxtjs.org/api/ipx/s_80,f_webp/gh/nuxt/modules/main/icons/",mi=F({__name:"modules",setup(e){const t=K(!1),n=we(),o=ye(),i=B(()=>n.value.filter(l=>l.isPackageModule)),r=B(()=>n.value.filter(l=>!l.isPackageModule));return Ye(()=>[{id:"action:modules:install",title:"Install a new module",icon:"i-carbon-intent-request-create ",action:()=>{t.value=!0}}]),(l,d)=>{const a=Wt,m=ge,h=ie,v=Qe,b=X,p=Sn,I=Vn,$=En,x=ot;return u(),w(L,null,[s("div",Dn,[_(v,{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:g(()=>[(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(xe),k=>(u(),T(h,{key:k.processId,block:"","min-h-30":"",to:"/modules/terminals",onClick:N=>o.value=k.processId},{default:g(()=>[_(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:g(()=>[s("div",Hn,[s("img",{src:Qn+k.info.icon,alt:k.info.name,ma:""},null,8,Un),Fn]),s("div",qn,[Wn,s("span",Kn,"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:g(()=>[Yn,Gn]),_:1})]),_:1},8,["description"]),c(r).length?(u(),T(v,{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:g(()=>[(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:g(()=>[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:g(()=>[c(t)?(u(),w("div",Xn,[_(b,{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)]),_(x,null,{default:g(()=>[_($)]),_:1})],64)}}});export{mi as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as C}from"./
|
|
1
|
+
import{_ as C}from"./D7gBCge-.js";import{d as h,bl as S,e as x,a as B,aB as w,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"./DW2rdoo9.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=B(()=>e.value?.lang||"text");return w(()=>{c.codeSnippets.includes(e.value)||(e.value=c.codeSnippets[0])}),(l,r)=>{const y=C,d=T;return l.codeSnippets.length?(n(),s("div",D,[a("div",E,[(n(!0),s(i,null,N(l.codeSnippets,(t,g)=>(n(),s("button",{key:g,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 _};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as S}from"./
|
|
1
|
+
import{_ as S}from"./DTf74veE.js";import{d as N,r as $,a as g,o as d,m,k as t,v as c,G as p,f as n,F as y,n as T,t as _,a9 as F,aJ as B,i as h,aK as V,al as D,h as H,j as w,p as C}from"./DW2rdoo9.js";import{_ as P}from"./B-hub2K2.js";import{_ as j}from"./BX8u6kVi.js";import"./BVJlJdda.js";const E={"w-full":""},O={border:"b base"},L={"select-none":"","ws-nowrap":"",p1:"","text-right":"","font-bold":""},z={colspan:"2",p1:"",pl5:"","text-left":"","font-bold":""},A={"ws-nowrap":"",p1:"","text-center":"","font-bold":""},Y={"ws-nowrap":"",p1:"","text-center":"","font-bold":""},G={"ws-nowrap":"",p1:"","text-right":"","font-bold":""},J={"w-0":"","ws-nowrap":"","text-center":"","text-sm":"",op25:""},K={"text-sm":""},R={"ws-nowrap":""},U={"text-sm":""},q={"w-0":"","text-center":"","text-sm":""},M={"w-0":"","text-center":"","text-sm":""},Q={"w-0":"","text-right":"","text-sm":""},W=N({__name:"HooksTable",props:{hooks:{}},setup(k){const l=k,a=$("duration"),s=$("asc"),x={duration:(e,o)=>(o.duration??Number.POSITIVE_INFINITY)-(e.duration??Number.POSITIVE_INFINITY),name:(e,o)=>e.name.localeCompare(o.name),listener:(e,o)=>o.listeners-e.listeners,start:(e,o)=>o.start-e.start,executions:(e,o)=>o.executions.length-e.executions.length},v=g(()=>l.hooks.map(e=>e.start).sort((e,o)=>e-o)),b=g(()=>{const e=x[a.value],o=[...l.hooks].sort(e);return s.value==="desc"&&o.reverse(),o});function u(e){const o=e.split(":");return o.length===1?"":`${o[0]}:`}function f(e){const o=e.split(":");return o.length===1?e:o.slice(1).join(":")}function i(e){a.value===e?s.value=s.value==="asc"?"desc":"asc":a.value=e}return(e,o)=>{const I=S;return d(),m("table",E,[t("thead",O,[t("tr",null,[t("th",L,[t("button",{onClick:o[0]||(o[0]=r=>i("start"))},[c(" Order "),t("div",{"ml--1":"","text-xs":"",class:p([n(a)==="start"?"op50":"op0",n(s)==="asc"?"carbon-arrow-down":"carbon-arrow-up"])},null,2)])]),t("th",z,[t("button",{onClick:o[1]||(o[1]=r=>i("name"))},[c(" Hook name "),t("div",{"ml--1":"","text-xs":"",class:p([n(a)==="name"?"op50":"op0",n(s)==="asc"?"carbon-arrow-down":"carbon-arrow-up"])},null,2)])]),t("th",A,[t("button",{onClick:o[2]||(o[2]=r=>i("listener"))},[c(" Listeners "),t("div",{"ml--1":"","text-xs":"",class:p([n(a)==="listener"?"op50":"op0",n(s)==="asc"?"carbon-arrow-down":"carbon-arrow-up"])},null,2)])]),t("th",Y,[t("button",{onClick:o[3]||(o[3]=r=>i("executions"))},[c(" Executions "),t("div",{"ml--1":"","text-xs":"",class:p([n(a)==="executions"?"op50":"op0",n(s)==="asc"?"carbon-arrow-down":"carbon-arrow-up"])},null,2)])]),t("th",G,[t("button",{onClick:o[4]||(o[4]=r=>i("duration"))},[c(" Duration "),t("div",{"ml--1":"","text-xs":"",class:p([n(a)==="duration"?"op50":"op0",n(s)==="asc"?"carbon-arrow-down":"carbon-arrow-up"])},null,2)])])])]),t("tbody",null,[(d(!0),m(y,null,T(n(b),r=>(d(),m("tr",{key:r.name,border:"b dashed transparent hover:base"},[t("td",J,_(n(v).indexOf(r.start)),1),t("td",{"w-0":"","ws-nowrap":"","text-right":"",style:F({color:("getHashColorFromString"in e?e.getHashColorFromString:n(B))(u(r.name))})},[t("code",K,_(u(r.name)),1)],4),t("td",R,[t("code",U,_(f(r.name)),1)]),t("td",q,_(r.listeners),1),t("td",M,_(r.executions.length+1),1),t("td",Q,[h(I,{duration:r.duration},null,8,["duration"])])]))),128))])])}}}),X={class:"markdown-body"},Z=t("h1",null,"Hooks",-1),tt=t("p",null,[c("Hooks are an advanced API which can be used for module development or other advanced use cases. The hooking API can be used to expand almost every aspect of Nuxt. Under the hood it is powered by "),t("a",{href:"https://github.com/unjs/hookable",target:"_blank",rel:"noopener"},"unjs/hookable"),c(".")],-1),ot=t("p",null,[t("a",{href:"https://nuxt.com/docs/guide/going-further/hooks",target:"_blank",rel:"noopener"},"Learn more about hooks"),c(".")],-1),et=[Z,tt,ot],nt={__name:"hooks",setup(k,{expose:l}){return l({frontmatter:{}}),(s,x)=>(d(),m("div",X,et))}},it=N({__name:"hooks",setup(k){const l=V(),a=D(),s=g(()=>a.value?.metrics.clientHooks());return(x,v)=>{const b=W,u=P,f=nt,i=j;return d(),m(y,null,[t("div",null,[n(s)?.length?(d(),H(u,{key:0,icon:"carbon-ibm-cloud-direct-link-1-dedicated-hosting",text:"Client Hooks",description:`Total hooks: ${n(s).length}`,padding:"pl4 pr6"},{default:w(()=>[h(b,{hooks:n(s)},null,8,["hooks"])]),_:1},8,["description"])):C("",!0),n(l)?.length?(d(),H(u,{key:1,icon:"carbon-ibm-cloud-direct-link-2-dedicated",text:"Server Hooks",description:`Total hooks: ${n(l)?.length}`,padding:"pl4 pr6"},{default:w(()=>[h(b,{hooks:n(l)},null,8,["hooks"])]),_:1},8,["description"])):C("",!0)]),h(i,null,{default:w(()=>[h(f)]),_:1})],64)}}});export{it as default};
|
package/dist/client/index.html
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<!DOCTYPE html><html><head><meta charset="utf-8">
|
|
2
2
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
3
|
-
<link rel="stylesheet" href="/__NUXT_DEVTOOLS_BASE__/_nuxt/entry.
|
|
4
|
-
<link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/
|
|
3
|
+
<link rel="stylesheet" href="/__NUXT_DEVTOOLS_BASE__/_nuxt/entry.C09IdXcP.css">
|
|
4
|
+
<link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/DW2rdoo9.js">
|
|
5
5
|
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/Blr6EMNg.js">
|
|
6
6
|
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/V_y36BGi.js">
|
|
7
7
|
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/BGq4KZyx.js">
|
|
@@ -16,23 +16,23 @@
|
|
|
16
16
|
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/DvyTQcux.js">
|
|
17
17
|
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/BZfs-ost.js">
|
|
18
18
|
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/CsTmP73Z.js">
|
|
19
|
-
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/
|
|
20
|
-
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/
|
|
21
|
-
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/
|
|
19
|
+
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/Bwpf36Bl.js">
|
|
20
|
+
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/C8GUE1SK.js">
|
|
21
|
+
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/BxZrC5KW.js">
|
|
22
22
|
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/D5r6TWiw.js">
|
|
23
23
|
<link rel="prefetch" as="style" href="/__NUXT_DEVTOOLS_BASE__/_nuxt/NCodeBlock.Bcfh0aRP.css">
|
|
24
|
-
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/
|
|
25
|
-
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/
|
|
26
|
-
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/
|
|
27
|
-
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/
|
|
28
|
-
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/
|
|
29
|
-
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/
|
|
30
|
-
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt
|
|
31
|
-
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/
|
|
24
|
+
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/C_vNhPYi.js">
|
|
25
|
+
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/D9bWLJbD.js">
|
|
26
|
+
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/Cri_jq9f.js">
|
|
27
|
+
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/CfjSiY3T.js">
|
|
28
|
+
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/D7gBCge-.js">
|
|
29
|
+
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/_hj05-RZ.js">
|
|
30
|
+
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/D1Dg62su.js">
|
|
31
|
+
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/Ds6yAegc.js">
|
|
32
32
|
<link rel="prefetch" as="style" href="/__NUXT_DEVTOOLS_BASE__/_nuxt/error-404.ClUqCsUG.css">
|
|
33
|
-
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/
|
|
33
|
+
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/Dyh3t1OB.js">
|
|
34
34
|
<link rel="prefetch" as="style" href="/__NUXT_DEVTOOLS_BASE__/_nuxt/error-500.Xj6Xfe4d.css">
|
|
35
|
-
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/
|
|
36
|
-
<script type="module" src="/__NUXT_DEVTOOLS_BASE__/_nuxt/
|
|
35
|
+
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/D2pUCviE.js">
|
|
36
|
+
<script type="module" src="/__NUXT_DEVTOOLS_BASE__/_nuxt/DW2rdoo9.js" crossorigin></script><script>"use strict";(()=>{const a=window,e=document.documentElement,c=window.localStorage,d=["dark","light"],n=c&&c.getItem&&c.getItem("nuxt-color-mode")||"system";let l=n==="system"?f():n;const i=e.getAttribute("data-color-mode-forced");i&&(l=i),r(l),a["__NUXT_COLOR_MODE__"]={preference:n,value:l,getColorScheme:f,addColorScheme:r,removeColorScheme:u};function r(o){const t=""+o+"",s="";e.classList?e.classList.add(t):e.className+=" "+t,s&&e.setAttribute("data-"+s,o)}function u(o){const t=""+o+"",s="";e.classList?e.classList.remove(t):e.className=e.className.replace(new RegExp(t,"g"),""),s&&e.removeAttribute("data-"+s)}function m(o){return a.matchMedia("(prefers-color-scheme"+o+")")}function f(){if(a.matchMedia&&m("").media!=="not all"){for(const o of d)if(m(":"+o).matches)return o}return"light"}})();
|
|
37
37
|
</script></head><body><div id="__nuxt"></div><div id="teleports"></div><script type="application/json" id="__NUXT_DATA__" data-ssr="false">[{"_errors":1,"serverRendered":2,"data":3,"state":4,"once":5},{},false,{},{},["Set"]]</script>
|
|
38
38
|
<script>window.__NUXT__={};window.__NUXT__.config={public:{fixture4:"public runtime config from nuxt.config.ts"},app:{baseURL:"/__NUXT_DEVTOOLS_BASE__/",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script></body></html>
|
package/dist/module.json
CHANGED
|
@@ -108,56 +108,56 @@ useEventListener(window, 'mouseleave', () => isResizing.value = false)
|
|
|
108
108
|
class="nuxt-devtools-resize-handle nuxt-devtools-resize-handle-horizontal"
|
|
109
109
|
:style="{ top: 0 }"
|
|
110
110
|
@mousedown.prevent="isResizing = { top: true }"
|
|
111
|
-
@touchstart="() => isResizing = { top: true }"
|
|
111
|
+
@touchstart.passive="() => isResizing = { top: true }"
|
|
112
112
|
/>
|
|
113
113
|
<div
|
|
114
114
|
v-show="state.position !== 'bottom'"
|
|
115
115
|
class="nuxt-devtools-resize-handle nuxt-devtools-resize-handle-horizontal"
|
|
116
116
|
:style="{ bottom: 0 }"
|
|
117
117
|
@mousedown.prevent="() => isResizing = { bottom: true }"
|
|
118
|
-
@touchstart="() => isResizing = { bottom: true }"
|
|
118
|
+
@touchstart.passive="() => isResizing = { bottom: true }"
|
|
119
119
|
/>
|
|
120
120
|
<div
|
|
121
121
|
v-show="state.position !== 'left'"
|
|
122
122
|
class="nuxt-devtools-resize-handle nuxt-devtools-resize-handle-vertical"
|
|
123
123
|
:style="{ left: 0 }"
|
|
124
124
|
@mousedown.prevent="() => isResizing = { left: true }"
|
|
125
|
-
@touchstart="() => isResizing = { left: true }"
|
|
125
|
+
@touchstart.passive="() => isResizing = { left: true }"
|
|
126
126
|
/>
|
|
127
127
|
<div
|
|
128
128
|
v-show="state.position !== 'right'"
|
|
129
129
|
class="nuxt-devtools-resize-handle nuxt-devtools-resize-handle-vertical"
|
|
130
130
|
:style="{ right: 0 }"
|
|
131
131
|
@mousedown.prevent="() => isResizing = { right: true }"
|
|
132
|
-
@touchstart="() => isResizing = { right: true }"
|
|
132
|
+
@touchstart.passive="() => isResizing = { right: true }"
|
|
133
133
|
/>
|
|
134
134
|
<div
|
|
135
135
|
v-show="state.position !== 'top' && state.position !== 'left'"
|
|
136
136
|
class="nuxt-devtools-resize-handle nuxt-devtools-resize-handle-corner"
|
|
137
137
|
:style="{ top: 0, left: 0, cursor: 'nwse-resize' }"
|
|
138
138
|
@mousedown.prevent="() => isResizing = { top: true, left: true }"
|
|
139
|
-
@touchstart="() => isResizing = { top: true, left: true }"
|
|
139
|
+
@touchstart.passive="() => isResizing = { top: true, left: true }"
|
|
140
140
|
/>
|
|
141
141
|
<div
|
|
142
142
|
v-show="state.position !== 'top' && state.position !== 'right'"
|
|
143
143
|
class="nuxt-devtools-resize-handle nuxt-devtools-resize-handle-corner"
|
|
144
144
|
:style="{ top: 0, right: 0, cursor: 'nesw-resize' }"
|
|
145
145
|
@mousedown.prevent="() => isResizing = { top: true, right: true }"
|
|
146
|
-
@touchstart="() => isResizing = { top: true, right: true }"
|
|
146
|
+
@touchstart.passive="() => isResizing = { top: true, right: true }"
|
|
147
147
|
/>
|
|
148
148
|
<div
|
|
149
149
|
v-show="state.position !== 'bottom' && state.position !== 'left'"
|
|
150
150
|
class="nuxt-devtools-resize-handle nuxt-devtools-resize-handle-corner"
|
|
151
151
|
:style="{ bottom: 0, left: 0, cursor: 'nesw-resize' }"
|
|
152
152
|
@mousedown.prevent="() => isResizing = { bottom: true, left: true }"
|
|
153
|
-
@touchstart="() => isResizing = { bottom: true, left: true }"
|
|
153
|
+
@touchstart.passive="() => isResizing = { bottom: true, left: true }"
|
|
154
154
|
/>
|
|
155
155
|
<div
|
|
156
156
|
v-show="state.position !== 'bottom' && state.position !== 'right'"
|
|
157
157
|
class="nuxt-devtools-resize-handle nuxt-devtools-resize-handle-corner"
|
|
158
158
|
:style="{ bottom: 0, right: 0, cursor: 'nwse-resize' }"
|
|
159
159
|
@mousedown.prevent="() => isResizing = { bottom: true, right: true }"
|
|
160
|
-
@touchstart="() => isResizing = { bottom: true, right: true }"
|
|
160
|
+
@touchstart.passive="() => isResizing = { bottom: true, right: true }"
|
|
161
161
|
/>
|
|
162
162
|
</div>
|
|
163
163
|
</template>
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nuxt/devtools",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.3.
|
|
4
|
+
"version": "1.3.2",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://devtools.nuxt.com",
|
|
7
7
|
"repository": {
|
|
@@ -70,8 +70,8 @@
|
|
|
70
70
|
"vite-plugin-vue-inspector": "^5.1.0",
|
|
71
71
|
"which": "^3.0.1",
|
|
72
72
|
"ws": "^8.17.0",
|
|
73
|
-
"@nuxt/devtools-
|
|
74
|
-
"@nuxt/devtools-
|
|
73
|
+
"@nuxt/devtools-kit": "1.3.2",
|
|
74
|
+
"@nuxt/devtools-wizard": "1.3.2"
|
|
75
75
|
},
|
|
76
76
|
"devDependencies": {
|
|
77
77
|
"@iconify-json/bxl": "^1.1.10",
|
|
@@ -115,7 +115,7 @@
|
|
|
115
115
|
"vue-virtual-scroller": "2.0.0-beta.8",
|
|
116
116
|
"xterm": "^5.3.0",
|
|
117
117
|
"xterm-addon-fit": "^0.8.0",
|
|
118
|
-
"@nuxt/devtools": "1.3.
|
|
118
|
+
"@nuxt/devtools": "1.3.2"
|
|
119
119
|
},
|
|
120
120
|
"scripts": {
|
|
121
121
|
"build": "pnpm dev:prepare && pnpm build:module && pnpm build:client && esno scripts/prepare.ts",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"id":"24abe175-04a3-492b-88f5-fff7ea90b9c1","timestamp":1715349558104,"matcher":{"static":{},"wildcard":{},"dynamic":{}},"prerendered":[]}
|