@nuxt/devtools-nightly 2.0.0-beta.0-28940159.3b2c84c → 2.0.0-beta.0-28940293.6562084
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/chunks/vite-inspect.mjs +5 -1
- package/dist/client/200.html +10 -10
- package/dist/client/404.html +10 -10
- package/dist/client/_nuxt/__blank-n15vnpb5.js +1 -0
- package/dist/client/_nuxt/{analyze-build-d4ocz87m.js → analyze-build-oe0nvo1v.js} +1 -1
- package/dist/client/_nuxt/{assets-accfst8t.js → assets-wsbeurkn.js} +1 -1
- package/dist/client/_nuxt/builds/latest.json +1 -1
- package/dist/client/_nuxt/builds/meta/949d891b-4b52-4ea6-a28d-f5ed6b11e9cf.json +1 -0
- package/dist/client/_nuxt/{client-ihvctios.js → client-c9f80qsp.js} +1 -1
- package/dist/client/_nuxt/{code-diff.vue-dfkrd13w.js → code-diff.vue-no0ffx8f.js} +1 -1
- package/dist/client/_nuxt/{code-snippets.vue-lcfqth8k.js → code-snippets.vue-kbs96pi0.js} +1 -1
- package/dist/client/_nuxt/components-kvmcnvun.js +1 -0
- package/dist/client/_nuxt/{composable-item.vue-lu13s905.js → composable-item.vue-mdhcy97i.js} +1 -1
- package/dist/client/_nuxt/custom-_name_-jeddq596.js +1 -0
- package/dist/client/_nuxt/{default-i1yqd2to.js → default-jjobpju3.js} +1 -1
- package/dist/client/_nuxt/{duration-display.vue-e5ntxkcx.js → duration-display.vue-kqe6a4wx.js} +1 -1
- package/dist/client/_nuxt/entry.css-nqz5coc9.css +1 -0
- package/dist/client/_nuxt/{error-404-ci0xzyd6.js → error-404-lro7u76y.js} +1 -1
- package/dist/client/_nuxt/{error-500-ny17oe9i.js → error-500-j409mizi.js} +1 -1
- package/dist/client/_nuxt/error-o3l2rbgn.js +9 -0
- package/dist/client/_nuxt/filepath-item.vue-otp6jyyn.js +1 -0
- package/dist/client/_nuxt/{full-nb67w4v9.js → full-ihuxa34t.js} +1 -1
- package/dist/client/_nuxt/{help-fab.vue-opvnmtcj.js → help-fab.vue-eyzjjtrr.js} +1 -1
- package/dist/client/_nuxt/{hooks-kfudy7r2.js → hooks-jhvmyjnq.js} +1 -1
- package/dist/client/_nuxt/{imports-eo3khgic.js → imports-j94jn55i.js} +1 -1
- package/dist/client/_nuxt/index-hgt6j2tr.js +2 -0
- package/dist/client/_nuxt/{index-ow49s53n.js → index-irxxlbxf.js} +1 -1
- package/dist/client/_nuxt/k6pa1ohq.js +17 -0
- package/dist/client/_nuxt/launch-page.vue-cd4fi46t.js +1 -0
- package/dist/client/_nuxt/modules-i64nwxud.js +1 -0
- package/dist/client/_nuxt/nbadge-iwzd40zm.js +1 -0
- package/dist/client/_nuxt/{ncheckbox.vue-ms3v2bv8.js → ncheckbox.vue-bzh5t5xo.js} +1 -1
- package/dist/client/_nuxt/{ncode-block.vue-ls06c06q.js → ncode-block.vue-gy1ero5j.js} +1 -1
- package/dist/client/_nuxt/{ndrawer.vue-pawnvrjc.js → ndrawer.vue-dih2d0ci.js} +1 -1
- package/dist/client/_nuxt/ndropdown.vue-fl5rdy5t.js +1 -0
- package/dist/client/_nuxt/{nicon-title.vue-ipq3avx6.js → nicon-title.vue-ouqsubn7.js} +1 -1
- package/dist/client/_nuxt/{nlink.vue-e8l6ggyt.js → nlink.vue-gei3dtfe.js} +1 -1
- package/dist/client/_nuxt/{nmarkdown.vue-lp7ya0j6.js → nmarkdown.vue-hygash5x.js} +1 -1
- package/dist/client/_nuxt/nnavbar.vue-fcbubuy5.js +1 -0
- package/dist/client/_nuxt/{none-dgqlebv3.js → none-nrc1e9do.js} +1 -1
- package/dist/client/_nuxt/{nsection-block-o11p8ted.js → nsection-block-cz4igj8y.js} +1 -1
- package/dist/client/_nuxt/{nselect-tabs.vue-otuk7xnz.js → nselect-tabs.vue-o3dadufj.js} +1 -1
- package/dist/client/_nuxt/{nselect.vue-bjzfjabo.js → nselect.vue-lkp6tmlx.js} +1 -1
- package/dist/client/_nuxt/{open-graph-bfgokib7.js → open-graph-mr51d8ms.js} +2 -2
- package/dist/client/_nuxt/{overview-klilnch0.js → overview-dki4jhvf.js} +1 -1
- package/dist/client/_nuxt/pages-fa5zwx08.js +1 -0
- package/dist/client/_nuxt/{payload-nznxtz0n.js → payload-cza6lmj7.js} +1 -1
- package/dist/client/_nuxt/pinia-esck9n5i.js +1 -0
- package/dist/client/_nuxt/{plugins-1i3hudxm.js → plugins-kvl3spfm.js} +1 -1
- package/dist/client/_nuxt/render-tree-eispe90j.js +1 -0
- package/dist/client/_nuxt/{runtime-configs-zuvf8944.js → runtime-configs-klksccry.js} +1 -1
- package/dist/client/_nuxt/{server-route-inputs.vue-mus15xmu.js → server-route-inputs.vue-kkkjmlpr.js} +1 -1
- package/dist/client/_nuxt/server-routes-mrmhvkti.js +9 -0
- package/dist/client/_nuxt/server-tasks-ju8lwq5t.js +1 -0
- package/dist/client/_nuxt/settings-be8y8a8r.js +1 -0
- package/dist/client/_nuxt/{stacktrace-list.vue-k97c53ud.js → stacktrace-list.vue-fvt332qg.js} +1 -1
- package/dist/client/_nuxt/{state-components-hjf5pd61.js → state-components-fo1al5n2.js} +1 -1
- package/dist/client/_nuxt/{state-editor.vue-h67wwxtf.js → state-editor.vue-kzen94mi.js} +1 -1
- package/dist/client/_nuxt/{state-modules-c2e21x4m.js → state-modules-evifr0hw.js} +1 -1
- package/dist/client/_nuxt/{storage-fh94um93.js → storage-l7ud6uto.js} +1 -1
- package/dist/client/_nuxt/{terminals-l9qfrdfc.js → terminals-n0t1rhl7.js} +1 -1
- package/dist/client/_nuxt/{timeline-cb92pqd1.js → timeline-janeok34.js} +1 -1
- package/dist/client/_nuxt/vendor/{json-editor-vue-c3wisb33.js → json-editor-vue-gi2fewby.js} +22 -22
- package/dist/client/_nuxt/{virtual-files-idfl2dwx.js → virtual-files-basg39tv.js} +1 -1
- package/dist/client/_nuxt/{vue-virtual-scroller.esm-md1d6mcg.js → vue-virtual-scroller.esm-hx1s7s1b.js} +1 -1
- package/dist/client/index.html +10 -10
- package/dist/module.json +1 -1
- package/package.json +7 -7
- package/dist/client/_nuxt/__blank-f4f9nu4d.js +0 -1
- package/dist/client/_nuxt/builds/meta/078b774d-b96e-484e-b4d5-b349c23c7fd7.json +0 -1
- package/dist/client/_nuxt/c5gs2ah3.js +0 -17
- package/dist/client/_nuxt/components-oghrvkye.js +0 -1
- package/dist/client/_nuxt/components-tree-knr0y8qe.js +0 -1
- package/dist/client/_nuxt/custom-_name_-fup3n0cu.js +0 -1
- package/dist/client/_nuxt/entry.css-kxi58hys.css +0 -1
- package/dist/client/_nuxt/error-nhdqe6i6.js +0 -9
- package/dist/client/_nuxt/filepath-item.vue-mcgdbj53.js +0 -1
- package/dist/client/_nuxt/index-m4vf8cbo.js +0 -2
- package/dist/client/_nuxt/launch-page.vue-iesvi41s.js +0 -1
- package/dist/client/_nuxt/modules-bjoacevh.js +0 -1
- package/dist/client/_nuxt/nbadge-hknag3xt.js +0 -1
- package/dist/client/_nuxt/ndropdown.vue-dbst6ukt.js +0 -1
- package/dist/client/_nuxt/nnavbar.vue-lykocirm.js +0 -1
- package/dist/client/_nuxt/pages-jvi3fi1o.js +0 -1
- package/dist/client/_nuxt/pinia-dvjxs68v.js +0 -1
- package/dist/client/_nuxt/server-routes-g18npbq7.js +0 -9
- package/dist/client/_nuxt/server-tasks-mvftg09y.js +0 -1
- package/dist/client/_nuxt/settings-hux8x7fu.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as w,q as y,bi as C,D as $,e as B,T as V}from"./k6pa1ohq.js";import{_ as v}from"./nmarkdown.vue-hygash5x.js";import{k as P,M as a,$ as o,Q as n,a0 as c,U as i,a5 as m,W as l,S as T,ab as D,a1 as F,a6 as I,F as L}from"./vendor/json-editor-vue-gi2fewby.js";const M={"text-xl":""},S={flex:"~ gap2 wrap"},U=P({__name:"LaunchPage",props:{name:{},icon:{},title:{},description:{},actions:{}},emits:["action"],setup(_,{emit:p}){const d=_,u=p;function f(e,s){y("launch-page",{pageName:d.name}),e.handle?.(),u("action",s)}return(e,s)=>{const k=C,g=v,b=$,h=B,N=V,x=w;return n(),a(x,null,{default:o(()=>[c(N,{flex:"~ col gap2",mxa:"","min-w-100":"","items-center":"",p6:""},{default:o(()=>[c(k,{mb2:"","text-5xl":"",icon:e.icon||e.icon,title:e.title},null,8,["icon","title"]),i("h1",M,m(e.title),1),e.description?(n(),a(g,{key:0,mb2:"","mt--1":"","text-center":"","text-base":"",op50:"",markdown:e.description},null,8,["markdown"])):l("",!0),i("div",S,[(n(!0),T(L,null,D(e.actions,(t,r)=>(n(),a(h,F({key:r,n:"solid primary",disabled:t.pending,to:t.src,target:t.src?"_blank":void 0,ref_for:!0},t.attrs,{onClick:q=>f(t,r)}),{default:o(()=>[t.pending?(n(),a(b,{key:0,icon:"carbon-circle-dash","animate-spin":""})):l("",!0),I(" "+m(t.label),1)]),_:2},1040,["disabled","to","target","onClick"]))),128))])]),_:1})]),_:1})}}});export{U as _};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as Z}from"./filepath-item.vue-otp6jyyn.js";import{J as Y,a as S,D as H,T as G,n as J,r as q,h as V,q as ee,a8 as Q,a9 as W,e as L,M as te,H as oe,w as ne,x as se,o as le}from"./k6pa1ohq.js";import{_ as ae,u as K,a as ie}from"./state-modules-evifr0hw.js";import{k as P,l as C,Q as o,M as $,$ as i,U as e,V as T,a6 as x,a5 as k,S as p,u as j,Y as z,W as h,a0 as l,F as B,ab as D,ai as re,b as A,ad as E}from"./vendor/json-editor-vue-gi2fewby.js";import{_ as ue}from"./nsection-block-cz4igj8y.js";import{_ as de}from"./nicon-title.vue-ouqsubn7.js";import{_ as R}from"./ndropdown.vue-fl5rdy5t.js";import{_ as pe}from"./nnavbar.vue-fcbubuy5.js";import{_ as me}from"./nbadge-iwzd40zm.js";import{s as ce}from"./vue-virtual-scroller.esm-hx1s7s1b.js";import{_ as _e}from"./ncode-block.vue-gy1ero5j.js";import{_ as fe}from"./nlink.vue-gei3dtfe.js";import{_ as ve}from"./code-diff.vue-no0ffx8f.js";import{_ as ge}from"./help-fab.vue-eyzjjtrr.js";import"./vendor/unocss-3uirpnla.js";import"./vendor/shiki-bnvxb5wv.js";import"./ncheckbox.vue-bzh5t5xo.js";import"./client-c9f80qsp.js";const xe={flex:"~ col gap2","flex-auto":"","of-hidden":"",px1:""},be={"gap-1t":"",flex:"","items-center":"","text-ellipsis":"","ws-nowrap":"","text-lg":""},ke={key:2},he={key:1,flex:"~ gap-2",title:"Documentation"},ye={key:2,flex:"~ gap-2"},$e={key:0,flex:"~ gap-4 items-center"},we={flex:"~ gap-1 items-center",op50:""},Ce={flex:"~ gap-1 items-center",op50:""},Me={flex:"~ col","items-end":""},Ie={key:0,"h-20":"","w-20":"",flex:"","flex-none":"",rounded:"","bg-gray:3":"",p4:""},Ne=["src","alt"],Be={key:1,flex:"~",mt2:"","flex-auto":"","items-end":"","justify-end":""},je=["src"],Pe={flex:"","justify-end":""},De="https://api.nuxtjs.org/api/ipx/s_80,f_webp/gh/nuxt/modules/main/icons/",Te="https://api.nuxtjs.org/api/ipx/s_44,f_webp/gh_avatar/",Ae="https://github.com/",ze="https://www.npmjs.com/package/",U=P({__name:"ModuleItemBase",props:{mod:{},info:{},compact:{type:Boolean},maintainers:{type:Boolean,default:!0}},setup(N){const c=N,a=C(()=>({...c.mod?.meta,...c.mod,...c.info})),b=Y();return(r,t)=>{const n=S,u=H,w=G;return o(),$(w,{p4:"",flex:"~ gap2"},{default:i(()=>[e("div",xe,[T(r.$slots,"main",{},()=>[e("div",be,[r.mod.isPackageModule?(o(),$(n,{key:0,to:ze+(a.value.npm||a.value.name),target:"_blank",hover:"underline text-primary"},{default:i(()=>[x(k(a.value.name),1)]),_:1},8,["to"])):r.mod.entryPath?(o(),p("button",{key:1,role:"button",hover:"underline text-primary",onClick:t[0]||(t[0]=g=>j(b)(r.mod.entryPath))},k(a.value.name),1)):(o(),p("span",ke,k(a.value.name),1)),T(r.$slots,"badge")]),a.value.description?(o(),p("div",{key:0,class:z(r.compact?"ws-nowrap of-hidden truncate":"line-clamp-2"),"mt--1":"","text-sm":"",op50:""},k(a.value.description),3)):h("",!0),t[3]||(t[3]=e("div",{"flex-auto":""},null,-1)),a.value.website?(o(),p("div",he,[t[1]||(t[1]=e("span",{"i-carbon-link":"","text-lg":"",op50:""},null,-1)),l(n,{to:a.value.website,target:"_blank","of-hidden":"",truncate:"","ws-nowrap":"","text-sm":"",op50:"",hover:"op100 underline text-primary"},{default:i(()=>[x(k(a.value.website.replace(/^https?:\/\//,"")),1)]),_:1},8,["to"])])):h("",!0),a.value.github?(o(),p("div",ye,[t[2]||(t[2]=e("span",{"i-carbon-logo-github":"","text-lg":"",op50:""},null,-1)),l(n,{to:a.value.github,target:"_blank","of-hidden":"",truncate:"","ws-nowrap":"","text-sm":"",op50:"",hover:"op100 underline text-primary"},{default:i(()=>[x(k(a.value.github.replace(/^https?:\/\/github.com\//,"")),1)]),_:1},8,["to"])])):h("",!0)]),T(r.$slots,"items"),a.value.stats?(o(),p("div",$e,[e("div",we,[l(u,{icon:"carbon-star","text-lg":""}),e("span",null,k(a.value.stats.stars),1)]),e("div",Ce,[l(u,{icon:"carbon-download","text-lg":""}),e("span",null,k(a.value.stats.downloads),1)])])):h("",!0)]),e("div",Me,[a.value.icon||r.mod.isPackageModule?(o(),p("div",Ie,[a.value.icon?(o(),p("img",{key:0,src:De+a.value.icon,alt:r.mod.name,ma:""},null,8,Ne)):h("",!0),t[4]||(t[4]=e("div",{"i-carbon-cube":"",ma:"","text-4xl":"",op30:""},null,-1))])):h("",!0),a.value.maintainers?.length&&r.maintainers?(o(),p("div",Be,[(o(!0),p(B,null,D(a.value.maintainers,g=>(o(),$(n,{key:g.name,target:"_blank",to:Ae+g.github,title:g.name},{default:i(()=>[e("img",{src:Te+g.github,"h-6":"","w-6":"","rounded-full":""},null,8,je)]),_:2},1032,["to","title"]))),128))])):h("",!0),r.$slots.actions?(o(),p(B,{key:2},[t[5]||(t[5]=e("div",{"flex-auto":""},null,-1)),e("div",Pe,[T(r.$slots,"actions")])],64)):h("",!0)])]),_:3})}}}),Le={key:0,flex:"~ gap-2",title:"Open on filesystem"},Oe={key:1,"mx--2":""},Se=["onClick"],Ue={key:2,"mx--2":""},Fe=["onClick"],qe={op50:""},Ve={"text-green":""},Ee={key:3,flex:"~ gap-2","items-center":"",title:"NPM"},Ye={"text-sm":"",op50:""},He=P({__name:"ModuleItem",props:{mod:{}},setup(N){const c=N,a=C(()=>c.mod.info),b=C(()=>({...c.mod?.meta,...c.mod,...a.value})),r=J();return(t,n)=>{const u=Z,w=S,g=ae,v=U;return o(),$(v,{mod:t.mod,info:a.value},{items:i(()=>[t.mod.entryPath?(o(),p("div",Le,[n[0]||(n[0]=e("span",{"i-carbon-folder-move-to":"","text-lg":"",op50:""},null,-1)),l(u,{filepath:t.mod.entryPath,"text-sm":"",op50:"",hover:"text-primary op100"},null,8,["filepath"])])):h("",!0),b.value.npm?(o(),$(g,{key:b.value.npm,"package-name":b.value.npm,options:{dev:!0}},{default:i(({info:m,update:d,state:s,id:_,restart:y})=>[s==="running"?(o(),$(w,{key:0,flex:"~ gap-2","animate-pulse":"","items-center":"",to:_?"/modules/terminals":void 0,onClick:M=>_?r.value=_:void 0},{default:i(()=>n[1]||(n[1]=[e("span",{"i-carbon-circle-dash":"","animate-spin":"","text-lg":"",op50:""},null,-1),e("code",{"text-sm":"",op50:""},"Upgrading...",-1)])),_:2},1032,["to","onClick"])):s==="updated"?(o(),p("div",Oe,[e("button",{flex:"~ gap-2",hover:"bg-primary/20","items-center":"",rounded:"","bg-primary:10":"",px2:"","text-sm":"","text-primary":"",onClick:y},n[2]||(n[2]=[e("span",{"i-carbon-intent-request-active":"","text-lg":"","text-primary":""},null,-1),e("code",{"text-xs":""},"Update installed, click to restart",-1)]),8,Se)])):m?.needsUpdate?(o(),p("div",Ue,[e("button",{flex:"~ gap-2",title:"Click to upgrade","items-center":"",rounded:"",px2:"","text-sm":"",hover:"bg-active",onClick:M=>d()},[n[3]||(n[3]=e("span",{"i-carbon-intent-request-upgrade":"","text-lg":"",op50:""},null,-1)),e("code",qe,"v"+k(m.current),1),n[4]||(n[4]=e("div",{"i-carbon-arrow-right":"",op50:""},null,-1)),e("code",Ve,"v"+k(m.latest),1)],8,Fe)])):m?.latest?(o(),p("div",Ee,[n[5]||(n[5]=e("span",{"i-carbon-cube":"","text-lg":"",op50:""},null,-1)),e("code",Ye,"v"+k(m.current),1)])):h("",!0)]),_:1},8,["package-name"])):h("",!0)]),_:1},8,["mod","info"])}}}),Ge=P({__name:"ModuleItemInstall",props:{item:{}},emits:["start"],setup(N,{emit:c}){const a=N,b=c,r=K(),t=C(()=>r.value.find(v=>v.name===a.item.npm)),n=C(()=>t.value&&t.value.isPackageModule),u=C(()=>t.value&&t.value.isPackageModule&&t.value.isUninstallable);async function w(v,m){const d=m==="install"?q.installNuxtModule:q.uninstallNuxtModule,s=await d(await V(),v.npm,!0);ee(`modules:${m}`,{moduleName:v.npm}),s.commands&&await Q.start(v,s,m)&&(W.value.push({name:v.npm,info:v,processId:s.processId}),b("start"),await d(await V(),v.npm,!1))}const g={};return(v,m)=>{const d=me,s=L,_=R,y=U;return o(),$(y,{mod:g,role:n.value?"":"button",info:v.item,mb2:"","h-full":"",class:z(n.value?"border-dashed op75":"hover:bg-active!"),compact:!0,onClick:m[1]||(m[1]=M=>n.value?null:w(v.item,"install"))},re({_:2},[n.value?{name:"badge",fn:i(()=>[l(d,{n:"green",textContent:"Installed"}),u.value?(o(),$(_,{key:0,n:"sm green"},{trigger:i(({click:M})=>[l(s,{icon:"carbon-overflow-menu-vertical",border:!1,onClick:f=>M()},null,8,["onClick"])]),default:i(()=>[l(s,{icon:"carbon-trash-can",n:"red",onClick:m[0]||(m[0]=M=>w(v.item,"uninstall"))},{default:i(()=>m[2]||(m[2]=[x(" Uninstall ")])),_:1})]),_:1})):h("",!0)]),key:"0"}:void 0]),1032,["role","info","class"])}}}),Je={"h-full":"",flex:"~ col gap-4"},Qe={flex:"~ items-center"},We={flex:"~ col","w-30":"","of-auto":""},Ke={flex:"~ justify-between","w-full":"","text-xs":"",capitalize:"",op75:""},Re={"flex-auto":"","of-auto":"",flex:"~ col gap-2",pl6:"",pr4:""},Xe=P({__name:"ModuleInstallList",emits:["close"],setup(N,{emit:c}){const a=c,b=ie(),r=["downloads","stars","updated","created"],t=A(!1),n=A(r[0]),u={downloads:(d,s)=>d.stats.downloads-s.stats.downloads,stars:(d,s)=>d.stats.stars-s.stats.stars,created:(d,s)=>d.stats.createdAt-s.stats.createdAt,updated:(d,s)=>d.stats.publishedAt-s.stats.publishedAt},w=C(()=>b.value?.toSorted((d,s)=>u[n.value](d,s)*(t.value?1:-1))),g=A(""),v=C(()=>new te(b.value||[],{keys:["name","description","npm","category"],sortFn:(d,s)=>{const _=b.value?.[d.idx],y=b.value?.[s.idx];return _&&y?u[n.value](_,y)*(t.value?1:-1):d.score-s.score},threshold:.2})),m=C(()=>g.value?v.value.search(g.value).map(d=>d.item):w.value);return(d,s)=>{const _=de,y=L,M=H,f=R,F=pe,X=Ge;return o(),p("div",Je,[l(_,{mx6:"",mt6:"","text-xl":"",op75:"",icon:"i-carbon-intent-request-create",text:"Install Module"}),l(F,{search:g.value,"onUpdate:search":s[1]||(s[1]=I=>g.value=I),"no-padding":"","px-6":"","pb-5":"","pt-2":""},{actions:i(()=>[l(f,{direction:"end",n:"sm primary"},{trigger:i(({click:I})=>[e("div",Qe,[l(y,{icon:t.value?"tabler:sort-ascending":"tabler:sort-descending","h-full":"","rounded-r-none":"",onClick:s[0]||(s[0]=O=>t.value=!t.value)},null,8,["icon"]),l(y,{flex:"~ justify-between","min-w-30":"","border-l-0":"","rounded-l-none":"","px-2":"",capitalize:"",hover:"border-l-1",onClick:O=>I()},{default:i(()=>[x(k(n.value)+" ",1),l(M,{icon:"carbon:chevron-down"})]),_:2},1032,["onClick"])])]),default:i(()=>[e("div",We,[(o(),p(B,null,D(r,I=>l(y,{key:I,border:!1,p2:"",hover:"n-checkbox-hover text-green",onClick:O=>n.value=I},{default:i(()=>[e("span",Ke,[x(k(I)+" ",1),n.value===I?(o(),$(M,{key:0,icon:"carbon:checkmark"})):h("",!0)])]),_:2},1032,["onClick"])),64))])]),_:1})]),_:1},8,["search"]),e("div",Re,[l(j(ce),{class:"scroller",items:m.value,"item-size":200,"key-field":"name"},{default:i(({item:I})=>[l(X,{item:I,onStart:s[2]||(s[2]=O=>a("close"))},null,8,["item"])]),_:1},8,["items"])])])}}}),Ze={flex:"~ col gap-2","w-150":"",p4:"",border:"t base"},et={capitalize:""},tt={op50:""},ot={flex:"~ gap-3",mt2:"","justify-end":""},nt=P({__name:"ModuleActionDialog",setup(N){const c=oe(),a=Y(),b={};return(r,t)=>{const n=U,u=_e,w=fe,g=ve,v=ne,m=L,d=se;return o(),$(j(Q),null,{default:i(({resolve:s,args:_})=>[l(d,{"model-value":!0,onClose:y=>s(!1)},{default:i(()=>[l(n,{mod:b,info:_[0],border:"none","w-150":"","n-panel-grids":""},null,8,["info"]),e("div",Ze,[e("h2",{"text-xl":"",class:z(_[2]==="install"?"text-primary":"text-red")},[e("span",et,k(_[2]),1),t[1]||(t[1]=x()),e("code",null,k(_[0].name),1),t[2]||(t[2]=x("? "))],2),t[7]||(t[7]=e("p",{op50:""}," The following command will be executed in your terminal: ",-1)),l(u,{code:_[1].commands.join(" "),lang:"bash",px4:"",py2:"",border:"~ base rounded",lines:!1},null,8,["code"]),e("p",tt,[t[3]||(t[3]=x(" Then your ")),l(w,{role:"button",n:"primary",underline:"",onClick:t[0]||(t[0]=y=>j(a)(j(c)?._nuxtConfigFile)),textContent:"Nuxt config"}),t[4]||(t[4]=x(" will be updated as: "))]),l(g,{from:_[1].configOriginal,to:_[1].configGenerated,"max-h-80":"","of-auto":"",py2:"",border:"~ base rounded",lang:"ts"},null,8,["from","to"]),t[8]||(t[8]=e("p",null,[e("span",{op50:""},"After that, Nuxt will "),e("span",{"text-orange":""},"restart automatically"),x(". ")],-1)),e("div",ot,[l(v,{n:"sm amber","flex-auto":"",icon:"i-carbon-data-backup"},{default:i(()=>t[5]||(t[5]=[x(" Please make sure to backup your project first. ")])),_:1}),l(m,{onClick:y=>s(!1)},{default:i(()=>t[6]||(t[6]=[x(" Cancel ")])),_:2},1032,["onClick"]),l(m,{n:"solid",capitalize:"",class:z(_[2]==="install"?"n-primary":"n-red"),onClick:y=>s(!0)},{default:i(()=>[x(k(_[2]),1)]),_:2},1032,["class","onClick"])])])]),_:2},1032,["onClose"])]),_:1})}}}),st={class:"markdown-body"},lt={__name:"modules",setup(N,{expose:c}){return c({frontmatter:{}}),(b,r)=>(o(),p("div",st,r[0]||(r[0]=[e("h1",null,"Modules",-1),e("p",null,[x("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 "),e("code",null,"nuxt.config"),x(".")],-1),e("p",null,[x("You can explore the list of modules on "),e("a",{href:"https://nuxt.com/modules",target:"_blank",rel:"noopener"},"nuxt.com/modules"),x(" or install them directly inside the DevTools.")],-1),e("p",null,[e("a",{href:"https://nuxt.com/docs/guide/concepts/modules",target:"_blank",rel:"noopener"},"Learn more in the documentation")],-1)])))}},at={"h-full":"","w-full":"","of-auto":""},it={relative:"","h-20":"","w-20":"",flex:"","flex-none":"",rounded:"","bg-gray:3":"",p3:""},rt=["src","alt"],ut={"text-lg":"","group-hover":"text-primary",transition:"",flex:"~ gap-2 items-center"},dt={op75:""},pt={key:0,border:"l base",pos:"fixed bottom-0 right-0 top-0","z-200":"","w-150":"","bg-base":""},mt="https://api.nuxtjs.org/api/ipx/s_80,f_webp/gh/nuxt/modules/main/icons/",Pt=P({__name:"modules",setup(N){const c=A(!1),a=K(),b=J(),r=C(()=>a.value.filter(n=>n.isPackageModule)),t=C(()=>a.value.filter(n=>!n.isPackageModule));return le(()=>[{id:"action:modules:install",title:"Install a new module",icon:"i-carbon-intent-request-create ",action:()=>{c.value=!0}}]),(n,u)=>{const w=He,g=G,v=S,m=ue,d=L,s=Xe,_=nt,y=lt,M=ge;return o(),p(B,null,[e("div",at,[l(m,{icon:"carbon-3d-mpr-toggle",text:"Installed Modules","container-class":"grid grid-cols-minmax-400px gap3 px4",padding:!1,description:`Total modules: ${r.value.length}`},{default:i(()=>[(o(!0),p(B,null,D(r.value,f=>(o(),$(w,{key:f.name,mod:f},null,8,["mod"]))),128)),(o(!0),p(B,null,D("processInstallingModules"in n?n.processInstallingModules:j(W),f=>(o(),$(v,{key:f.processId,block:"","min-h-30":"",to:"/modules/terminals",onClick:F=>b.value=f.processId},{default:i(()=>[l(g,{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:i(()=>[e("div",it,[e("img",{src:mt+f.info.icon,alt:f.info.name,ma:""},null,8,rt),u[4]||(u[4]=e("div",{"i-carbon-cube":"",ma:"","text-4xl":"",op30:""},null,-1))]),e("div",ut,[u[5]||(u[5]=e("div",{"i-carbon-circle-dash":"","animate-spin":"","text-xl":"",op75:""},null,-1)),e("span",dt,"Installing "+k(f.name)+"...",1)])]),_:2},1024)]),_:2},1032,["onClick"]))),128)),l(g,{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:u[0]||(u[0]=f=>c.value=!0)},{default:i(()=>u[6]||(u[6]=[e("div",{"i-carbon-intent-request-create":"","text-4xl":"",op40:"","group-hover":"op75 text-primary",transition:""},null,-1),e("div",{"text-lg":"",op40:"","group-hover":"op75 text-primary",transition:""}," Install New Module ",-1)])),_:1})]),_:1},8,["description"]),t.value.length?(o(),$(m,{key:0,icon:"carbon-3d-mpr-toggle",text:"User Modules","container-class":"grid grid-cols-minmax-400px gap3 px4",padding:!1,description:`Total modules: ${t.value.length}`},{default:i(()=>[(o(!0),p(B,null,D(t.value,f=>(o(),p(B,{key:f.meta?.name||f.entryPath},[f.meta?.name||f.entryPath?(o(),$(w,{key:0,mod:f},null,8,["mod"])):h("",!0)],64))),128))]),_:1},8,["description"])):h("",!0),l(E,{name:"fade-in"},{default:i(()=>[c.value?(o(),p("div",{key:0,class:"fixed bottom-0 left-0 right-0 top-0 z-100","bg-black:20":"","backdrop-blur-2":"",onClick:u[1]||(u[1]=f=>c.value=!1)})):h("",!0)]),_:1}),l(E,{name:"slide-in"},{default:i(()=>[c.value?(o(),p("div",pt,[l(d,{icon:"carbon-close",pos:"absolute top-3 right-3 z-10","rounded-full":"","text-xl":"",border:!1,onClick:u[2]||(u[2]=f=>c.value=!1)}),l(s,{onClose:u[3]||(u[3]=f=>c.value=!1)})])):h("",!0)]),_:1}),l(_)]),l(M,null,{default:i(()=>[l(y)]),_:1})],64)}}});export{Pt as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as o}from"./k6pa1ohq.js";import{Q as n,S as s,V as t}from"./vendor/json-editor-vue-gi2fewby.js";const r={},_={class:"n-badge"};function c(e,a){return n(),s("span",_,[t(e.$slots,"default")])}const m=o(r,[["render",c]]);export{m as _};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{y as i,D as r}from"./
|
|
1
|
+
import{y as i,D as r}from"./k6pa1ohq.js";import{k as p,Q as b,S as u,a8 as h,ax as m,u as o,U as n,y as k,Z as f,a0 as v,V as x,Y as _}from"./vendor/json-editor-vue-gi2fewby.js";const y=["checked","disabled"],V=["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"},D=p({__name:"NCheckbox",props:{modelValue:{type:[Boolean,null],default:!1},disabled:{type:Boolean,default:!1}},setup(t,{emit:c}){const e=i(t,"modelValue",c,{passive:!0});return(a,s)=>{const d=r;return b(),u("label",{class:"n-checkbox hover:n-checkbox-hover select-none items-center n-disabled:n-disabled",checked:o(e)||null,disabled:a.disabled||null},[h(n("input",{"onUpdate:modelValue":s[0]||(s[0]=l=>k(e)?e.value=l:null),type:"checkbox",class:"peer absolute op0",disabled:a.disabled,onKeypress:s[1]||(s[1]=f(l=>e.value=!o(e),["enter"]))},null,40,V),[[m,o(e)]]),n("span",B,[v(d,{class:"n-checkbox-icon scale-0 transform op0 n-transition n-checked:scale-100 n-checked:op100"})]),n("span",{class:_([o(e)?"":"op50","n-transition"])},[x(a.$slots,"default")],2)],8,y)}}});export{D as _};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{d as k}from"./client-
|
|
1
|
+
import{d as k}from"./client-c9f80qsp.js";import{k as f,l as g,n as C,Q as n,S as s,Y as d,U as t,F as a,ab as _,a5 as b}from"./vendor/json-editor-vue-gi2fewby.js";const h=["innerHTML"],v={class:"shiki"},y=["textContent"],H=f({__name:"NCodeBlock",props:{code:{},lang:{},lines:{type:Boolean,default:!0},transformRendered:{}},emits:["loaded"],setup(c,{emit:i}){const o=c,p=i,l=g(()=>{const e=o.lang==="text"?{code:o.code,supported:!1}:k.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&&C(()=>p("loaded")),e});return(e,r)=>e.lang&&l.value.supported?(n(),s("pre",{key:0,class:d(["n-code-block",e.lines?"n-code-block-lines":""]),innerHTML:l.value.code},null,10,h)):(n(),s("pre",{key:1,class:d(["n-code-block",e.lines?"n-code-block-lines":""])},[t("pre",v,[t("code",null,[(n(!0),s(a,null,_(e.code.split(`
|
|
2
2
|
`),(u,m)=>(n(),s(a,{key:m},[t("span",{class:"line",textContent:b(u)},null,8,y),r[0]||(r[0]=t("br",null,null,-1))],64))),128))])])],2))}});export{H as _};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{bj as n,
|
|
1
|
+
import{bj as n,aa as b,e as g}from"./k6pa1ohq.js";import{k as h,b as y,M as v,$,a1 as l,ad as k,Q as i,S as B,a0 as C,U as V,V as w,u as o,W as N}from"./vendor/json-editor-vue-gi2fewby.js";const x=["border"],z={relative:"","h-full":"","w-full":"","of-auto":""},T=h({__name:"NDrawer",props:{modelValue:{type:Boolean},top:{},left:{},autoClose:{type:Boolean},transition:{default:"right"}},emits:["close"],setup(m,{emit:f}){const e=m,c=f,a=y(),{height:u}=n(()=>e.top,void 0,{box:"border-box"}),s=typeof e.left=="string"&&e.left.startsWith("#")?document.querySelector(e.left)?.getBoundingClientRect().width:n(()=>e.left,void 0,{box:"border-box"}).width;b(a,()=>{e.modelValue&&e.autoClose&&c("close")},{ignore:["a","button","summary",'[role="dialog"]']});const d={right:{"enter-from-class":"transform translate-x-1/1","leave-to-class":"transform translate-x-1/1"},top:{"enter-from-class":"transform translate-y--1/1","leave-to-class":"transform translate-y--1/1"},bottom:{"enter-from-class":"transform translate-y-1/1","leave-to-class":"transform translate-y-1/1"}};return(t,r)=>{const p=g;return i(),v(k,l(d[t.transition],{"enter-active-class":"duration-200 ease-in","enter-to-class":"opacity-100","leave-active-class":"duration-200 ease-out","leave-from-class":"opacity-100"}),{default:$(()=>[t.modelValue?(i(),B("div",l({key:0,ref_key:"el",ref:a,border:`${t.transition==="right"?"l":t.transition==="bottom"?"t":"b"} base`,flex:"~ col gap-1",class:{"right-0":t.transition==="right"||t.transition==="bottom"},absolute:"","bottom-0":"","z-10":"","z-20":"","of-auto":"","text-sm":"","n-glass-effect":"",style:{top:t.transition==="bottom"?"auto":`${o(u)}px`,left:t.transition==="right"&&!o(s)?"auto":`${o(s)}px`}},t.$attrs),[C(p,{absolute:"","right-2":"","top-2":"","z-20":"","text-xl":"",icon:"carbon-close",border:!1,onClick:r[0]||(r[0]=S=>t.$emit("close"))}),V("div",z,[w(t.$slots,"default")])],16,x)):N("",!0)]),_:3},16)}}});export{T as _};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{y as d,aa as p,e as u}from"./k6pa1ohq.js";import{k as m,b as c,Q as f,S as b,V as n,a0 as v,$ as k,a6 as V,u as s,U as _,Y as B}from"./vendor/json-editor-vue-gi2fewby.js";const y=m({__name:"NDropdown",props:{modelValue:{type:Boolean},direction:{default:"start"}},setup(r,{emit:l}){const e=d(r,"modelValue",l,{passive:!0}),t=c();return p(t,()=>{e.value=!1}),(a,o)=>{const i=u;return f(),b("div",{ref_key:"el",ref:t,class:"relative"},[n(a.$slots,"trigger",{enabled:s(e),click:()=>e.value=!s(e)},()=>[v(i,{onClick:o[0]||(o[0]=$=>e.value=!s(e))},{default:k(()=>o[1]||(o[1]=[V(" Dropdown ")])),_:1})]),_("div",{class:B(["absolute z-10 border n-border-base rounded shadow n-transition n-bg-base",[s(e)?"op-100":"op0 pointer-events-none -translate-y-1",a.direction==="end"?"right-0":"left-0"]])},[n(a.$slots,"default")],2)],512)}}});export{y as _};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{k as t,Q as s,S as o,Y as a,W as n,V as r,U as l,a5 as i}from"./vendor/json-editor-vue-
|
|
1
|
+
import{k as t,Q as s,S as o,Y as a,W as n,V as r,U as l,a5 as i}from"./vendor/json-editor-vue-gi2fewby.js";const c={flex:"~ gap-3","items-center":""},u=t({__name:"NIconTitle",props:{icon:{},text:{}},setup(p){return(e,m)=>(s(),o("div",c,[e.icon?(s(),o("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{a as s}from"./
|
|
1
|
+
import{a as s}from"./k6pa1ohq.js";import{k as l,l as i,Q as r,M as p,$ as u,V as c,S as m,W as k,a1 as _}from"./vendor/json-editor-vue-gi2fewby.js";const d={key:0,"i-carbon:arrow-up-right":"","translate-y--1":"","text-xs":"",op50:""},v=l({__name:"NLink",props:{to:{},href:{},target:{},underline:{type:Boolean}},setup(o){const t=o,n=i(()=>t.href||t.to);return(e,f)=>{const a=s;return r(),p(a,_(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:u(()=>[c(e.$slots,"default"),n.value&&e.target==="_blank"?(r(),m("div",d)):k("",!0)]),_:3},16,["class"])}}});export{v as _};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as o}from"./client-
|
|
1
|
+
import{d as o}from"./client-c9f80qsp.js";import{k as t,u as a,Q as e,M as r,a7 as s,a5 as d}from"./vendor/json-editor-vue-gi2fewby.js";const i=t({__name:"NMarkdown",props:{markdown:{},tag:{}},setup(m){return(n,k)=>n.markdown&&a(o)?.devtools?.renderMarkdown?(e(),r(s(n.tag||"span"),{key:0,class:"n-markdown",innerHTML:a(o).devtools.renderMarkdown(n.markdown)},null,8,["innerHTML"])):(e(),r(s(n.tag||"span"),{key:1,class:"n-markdown",textContent:d(n.markdown)},null,8,["textContent"]))}});export{i as _};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{v as l}from"./k6pa1ohq.js";import{k as p,S as i,U as d,V as a,Y as s,Q as o,M as m,W as u}from"./vendor/json-editor-vue-gi2fewby.js";const f={flex:"~ gap4 wrap","items-center":""},b=p({__name:"NNavbar",props:{search:{},noPadding:{type:Boolean}},emits:["update:search"],setup(h,{emit:n}){const r=n;function t(e){r("update:search",e.target.value)}return(e,v)=>{const c=l;return o(),i("div",{flex:"~ col gap2 wrap",border:"b base","flex-1":"","n-navbar-glass":"",class:s([{p4:!e.noPadding}])},[d("div",f,[a(e.$slots,"search",{},()=>[e.search!==void 0?(o(),m(c,{key:0,placeholder:"Search...",icon:"carbon-search",n:"primary","flex-auto":"",class:s({"px-3 py-2":!e.noPadding}),value:e.search,onInput:t},null,8,["class","value"])):u("",!0)]),a(e.$slots,"actions")]),a(e.$slots,"default")],2)}}});export{b as _};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as o}from"./
|
|
1
|
+
import{_ as o}from"./k6pa1ohq.js";import{Q as t,S as r,V as n}from"./vendor/json-editor-vue-gi2fewby.js";import"./vendor/unocss-3uirpnla.js";import"./vendor/shiki-bnvxb5wv.js";const s={},c={relative:"","w-full":""};function a(e,l){return t(),r("div",c,[n(e.$slots,"default")])}const d=o(s,[["render",a]]);export{d as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{y as $,D as B,_ as C}from"./
|
|
1
|
+
import{y as $,D as B,_ as C}from"./k6pa1ohq.js";import{_ as h}from"./nicon-title.vue-ouqsubn7.js";import{k,S as l,U as s,Y as a,a0 as w,$ as N,u as r,F as d,a8 as _,a9 as b,V as t,W as p,Q as i,a6 as u,a5 as c,M as S}from"./vendor/json-editor-vue-gi2fewby.js";const V=["open"],x={"text-base":""},T={key:0,"text-sm":"",op50:""},z=k({__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(f){const n=$(f,"open",void 0,{passive:!0});function v(e){n.value=e.target.open}return(e,o)=>{const m=B,g=h;return i(),l(d,null,[s("details",{open:r(n),onToggle:o[0]||(o[0]=(...y)=>v(...y))},[s("summary",{class:a(["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:a([r(n)?"op100":"op60",e.headerClass])},{default:N(()=>[s("div",null,[s("div",x,[t(e.$slots,"text",{},()=>[u(c(e.text),1)],!0)]),e.description||e.$slots.description?(i(),l("div",T,[t(e.$slots,"description",{},()=>[u(c(e.description),1)],!0)])):p("",!0)]),o[1]||(o[1]=s("div",{class:"flex-auto"},null,-1)),t(e.$slots,"actions",{},void 0,!0),e.collapse?(i(),S(m,{key:0,icon:"carbon-chevron-down",class:"chevron","cursor-pointer":"","place-self-start":"","text-base":"",op75:"",transition:"","duration-500":""})):p("",!0)]),_:3},8,["icon","text","class"])],2),o._lazyshow1||r(n)?(o._lazyshow1=!0,i(),l(d,null,[_(s("div",{class:a(["flex flex-col flex-gap2 pb6 pt2",typeof e.padding=="string"?e.padding:e.padding?"px4":""])},[t(e.$slots,"details",{},void 0,!0),s("div",{class:a([e.containerClass,"mt1"])},[t(e.$slots,"default",{},void 0,!0)],2),t(e.$slots,"footer",{},void 0,!0)],2),[[b,r(n)]])],64)):p("v-show-if",!0)],40,V),o[2]||(o[2]=s("div",{class:"x-divider"},null,-1))],64)}}}),E=C(z,[["__scopeId","data-v-bae9fa8d"]]);export{E as _};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{k as m,Q as l,S as t,F as c,ab as v,Y as r,u as o,U as d,a5 as f,a8 as _,am as y,y as g}from"./vendor/json-editor-vue-
|
|
1
|
+
import{k as m,Q as l,S as t,F as c,ab as v,Y as r,u as o,U as d,a5 as f,a8 as _,am as y,y as g}from"./vendor/json-editor-vue-gi2fewby.js";import{y as V}from"./k6pa1ohq.js";const h={class:"n-select-tabs flex flex-inline flex-wrap items-center border n-border-base rounded n-bg-base"},k=["disabled","title"],x=["disabled","value","title"],D=m({__name:"NSelectTabs",props:{modelValue:{default:void 0},disabled:{type:Boolean,default:!1},options:{}},setup(i,{emit:b}){const a=V(i,"modelValue",b,{passive:!0});return(s,n)=>(l(),t("fieldset",h,[(l(!0),t(c,null,v(s.options,(e,p)=>(l(),t("label",{key:e.label,disabled:s.disabled,class:r(["relative n-border-base hover:n-bg-active px-0.5em py-0.1em",[p?"border-l n-border-base ml--1px":"",e.value===o(a)?"n-bg-active":""]]),title:e.label},[d("div",{class:r([e.value===o(a)?"":"op35"])},f(e.label),3),_(d("input",{"onUpdate:modelValue":n[0]||(n[0]=u=>g(a)?a.value=u:null),type:"radio",disabled:s.disabled,value:e.value,title:e.label,class:"absolute inset-0 op-0.1"},null,8,x),[[y,o(a)]])],10,k))),128))]))}});export{D as _};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{y as p,D as m}from"./
|
|
1
|
+
import{y as p,D as m}from"./k6pa1ohq.js";import{k as f,Q as s,S as l,V as n,M as b,W as t,a8 as y,ay as h,u as v,U as V,a5 as k,y as B,Y as d}from"./vendor/json-editor-vue-gi2fewby.js";const S=["disabled"],g={key:0,value:"",disabled:"",hidden:""},D=f({__name:"NSelect",props:{modelValue:{default:void 0},placeholder:{default:""},icon:{default:""},disabled:{type:Boolean,default:!1}},setup(i,{emit:r}){const o=p(i,"modelValue",r,{passive:!0});return(e,a)=>{const c=m;return s(),l("div",{class:d(["n-select flex flex items-center border rounded px-2 py-1 focus-within:n-focus-base focus-within:border-context n-bg-base",e.disabled?"border-gray:10":"n-border-base"])},[n(e.$slots,"icon",{},()=>[e.icon?(s(),b(c,{key:0,icon:e.icon,class:"mr-0.4em text-1.1em op50"},null,8,["icon"])):t("",!0)]),y(V("select",{"onUpdate:modelValue":a[0]||(a[0]=u=>B(o)?o.value=u:null),disabled:e.disabled,class:d(["w-full flex-auto n-bg-base !outline-none",e.disabled?"appearance-none":""])},[e.placeholder?(s(),l("option",g,k(e.placeholder),1)):t("",!0),n(e.$slots,"default")],10,S),[[h,v(o)]])],2)}}});export{D as _};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{ab as oe,I as ae,J as H,T as J,e as U,ac as V,ad as ne,ae as se,af as re,_ as ie,ag as le,ah as ce,G as de,ai as pe,aj as ue,ak as me,al as G,v as ge}from"./k6pa1ohq.js";import{_ as he}from"./nnavbar.vue-fcbubuy5.js";import{_ as P}from"./nlink.vue-gei3dtfe.js";import{_ as q}from"./nsection-block-cz4igj8y.js";import{_ as _e}from"./ncode-block.vue-gy1ero5j.js";import{k as N,l as C,b as I,M as A,$ as h,W as y,Q as t,U as e,S as n,ab as B,Y as O,a5 as u,F as S,a0 as p,a6 as $,u as g,X as L,ah as fe,n as ve,ae as be,Z as we,a8 as z}from"./vendor/json-editor-vue-gi2fewby.js";import{_ as xe}from"./help-fab.vue-eyzjjtrr.js";import"./vendor/unocss-3uirpnla.js";import"./vendor/shiki-bnvxb5wv.js";import"./nicon-title.vue-ouqsubn7.js";import"./client-c9f80qsp.js";const K=[{name:"title",suggestion:"required",head:{title:"[title]"},seoMeta:{title:"[title]"},docs:"https://developer.mozilla.org/en-US/docs/Web/HTML/Element/title",description:"A concise and descriptive title for the browser that accurately summarizes the content of the page."},{name:"description",suggestion:"required",head:{meta:[{name:"description",content:"[description]"}]},seoMeta:{description:"[description]"},description:"A one to two sentence summary for search engines that includes relevant keywords to improve visibility in search results."},{name:"icon",suggestion:"recommended",head:{link:[{rel:"icon",type:"image/png",href:"/favicon.png"}]},description:"A small image that appears in the browser tab and bookmark menu to help users easily identify the page."},{name:"lang",suggestion:"recommended",head:{htmlAttrs:{lang:"en"}},description:"The primary language of the page to help search engines and browsers understand the content."},{name:"og:title",suggestion:"recommended",head:{meta:[{property:"og:title",content:"[og:title]"}]},seoMeta:{ogTitle:"[og:title]"},docs:"https://ogp.me/#metadata",description:"A title for the link preview used by social media platforms."},{name:"og:description",suggestion:"recommended",head:{meta:[{property:"og:description",content:"[og:description]"}]},seoMeta:{ogDescription:"[og:description]"},docs:"https://ogp.me/#metadata",description:"A description for the link preview used by social media platforms."},{name:"og:image",suggestion:"recommended",head:{meta:[{property:"og:image",content:"[og:image]"}]},seoMeta:{ogImage:"[og:image]"},docs:"https://ogp.me/#metadata",description:"An image for the link preview used by social media platforms."},{name:"og:url",suggestion:"recommended",head:{meta:[{property:"og:url",content:"[og:url]"}]},seoMeta:{ogUrl:"[og:url]"},docs:"https://ogp.me/#metadata",description:"A canonical URL for the link preview used to specify the preferred URL to display in search engine results and social media previews when multiple URLs may point to the same page."},{name:"twitter:title",suggestion:"optional",head:{meta:[{name:"twitter:title",content:"[twitter:title]"}]},seoMeta:{twitterTitle:"[twitter:title]"},docs:"https://developer.twitter.com/en/docs/twitter-for-websites/cards/overview/abouts-cards",description:"A title for the Twitter card used to provide a preview of the content shared on the page."},{name:"twitter:description",suggestion:"optional",head:{meta:[{name:"twitter:description",content:"[twitter:description]"}]},seoMeta:{twitterDescription:"[twitter:description]"},docs:"https://developer.twitter.com/en/docs/twitter-for-websites/cards/overview/abouts-cards",description:"A description for the Twitter card used to provide a preview of the content shared on the page."},{name:"twitter:image",suggestion:"optional",head:{meta:[{name:"twitter:image",content:"[twitter:image]"}]},seoMeta:{twitterImage:"[twitter:image]"},docs:"https://developer.twitter.com/en/docs/twitter-for-websites/cards/overview/abouts-cards",description:"An image for the Twitter card used to provide a preview of the content shared on the page."},{name:"twitter:card",suggestion:"optional",head:{meta:[{name:"twitter:card",content:"summary"}]},seoMeta:{twitterCard:"summary"},docs:"https://developer.twitter.com/en/docs/twitter-for-websites/cards/overview/abouts-cards",description:"The type of Twitter card to use, which determines the type of card to display in link previews on Twitter."}],ye={flex:"~ wrap","mt--2":"","w-full":"","flex-none":""},ke=["onClick"],$e={key:0,"x-divider":""},Te={key:1,"x-divider":""},Se={flex:"~ gap-1 items-center",class:"px2 pt2",lg:"px4 py2"},Ce={"w-full":"",p2:"",op75:""},Ne={key:1,m4:"",flex:"~ col gap-2"},Me={flex:"~ gap-1 wrap items-center"},Oe={key:1},Ae={flex:"~ gap-2",n:"sm primary",absolute:"","right-2":"","top-2":""},Ie=N({__name:"OpenGraphMissingTabs",props:{tags:{},matchedRouteFilepath:{}},setup(v){const s=v,l=C(()=>K.filter(d=>!s.tags?.some(o=>o.name===d.name))),a=C(()=>{let d={};const o={};l.value.forEach(m=>{m.seoMeta?Object.assign(o,m.seoMeta):d=oe(d,m.head)});const w=[];if(Object.keys(o).length){const m=JSON.stringify(o,null,2).replace(/"([^"]+)":/g,"$1:").replace(/"/g,"'");w.push(`useSeoMeta(${m})`)}if(Object.keys(d).length){const m=JSON.stringify(d,null,2).replace(/"([^"]+)":/g,"$1:").replace(/"/g,"'");w.push(`useHead(${m})`)}return w.join(`
|
|
2
2
|
|
|
3
|
-
`)}),c=ae(),k=H(),b=["Missing Tags","Code Snippet"],_=I(b[0]);return(d,o)=>{const w=P,m=J,T=U,M=_e,R=q;return l.value.length?(t(),A(R,{key:0,text:"Missing Tags",description:`${l.value.length} missing tags`,icon:"carbon:warning-other","header-class":"text-orange op100! [[open]_&]:text-inherit",padding:!1},{default:h(()=>[e("div",ye,[(t(),n(S,null,B(b,(r,i)=>e("button",{key:i,px4:"",py2:"",border:"r t base",hover:"bg-active",class:O(r===_.value?"":"border-b"),onClick:f=>_.value=r},[e("div",{class:O(r===_.value?"":"op30"),capitalize:""},u(r),3)],10,ke)),64)),o[3]||(o[3]=e("div",{border:"b base","flex-auto":""},null,-1))]),_.value===b[0]?(t(),A(m,{key:0,grid:"~ cols-[1fr] lg:cols-[max-content_1fr]",m4:"","items-center":"","justify-between":"","of-hidden":""},{default:h(()=>[(t(!0),n(S,null,B(l.value,(r,i)=>(t(),n(S,{key:i},[i?(t(),n("div",$e)):y("",!0),i?(t(),n("div",Te)):y("",!0),e("div",Se,[o[4]||(o[4]=e("div",{"i-carbon-warning":"","text-orange":""},null,-1)),p(w,{"op-50":"",href:r.docs,target:"_blank",n:"orange"},{default:h(()=>[$(u(r.name),1)]),_:2},1032,["href"])]),e("div",Ce,u(r.description),1)],64))),128))]),_:1})):(t(),n("div",Ne,[e("p",Me,[p(T,{icon:"carbon-copy",n:"xs","px-2":"",onClick:o[0]||(o[0]=r=>g(c)(a.value,"open-graph-suggestion"))},{default:h(()=>o[5]||(o[5]=[$(" Copy ")])),_:1}),o[7]||(o[7]=$(" the following code snippet and paste it into your ")),d.matchedRouteFilepath?(t(),A(T,{key:0,icon:"carbon-launch",n:"xs","px-2":"",onClick:o[1]||(o[1]=r=>g(k)(d.matchedRouteFilepath))},{default:h(()=>o[6]||(o[6]=[$(" page component ")])),_:1})):(t(),n("span",Oe,"page component")),o[8]||(o[8]=$(" to full fill the missing tags. "))]),p(m,{relative:"","n-code-block":""},{default:h(()=>[p(M,{code:a.value,lang:"ts",lines:!1,"w-full":"","of-auto":"",p3:""},null,8,["code"]),e("div",Ae,[p(T,{icon:"carbon-copy",onClick:o[2]||(o[2]=r=>g(c)(a.value,"open-graph-suggestion"))},{default:h(()=>o[9]||(o[9]=[$(" Copy ")])),_:1})])]),_:1})]))]),_:1},8,["description"])):y("",!0)}}}),Be={class:"max-w-[524px] min-w-[524px] cursor-pointer bg-base"},Le={class:"break-words border border-base px-[12px] py-[10px] antialiased"},Re={class:"overflow-hidden truncate whitespace-nowrap text-[12px] leading-[11px] uppercase op50"},je={class:"block h-[46px] max-h-[46px] border-separate select-none overflow-hidden break-words text-left",style:{"border-spacing":"0px"}},Fe={class:"mt-[3px] truncate pt-[2px] text-[16px] font-semibold leading-[20px]"},De={class:"mt-[3px] block h-[18px] max-h-[80px] border-separate select-none overflow-hidden truncate whitespace-nowrap break-words text-left text-[14px] leading-[20px] op50",style:{"-webkit-line-clamp":"1","border-spacing":"0px","-webkit-box-orient":"vertical"}},ze=N({__name:"SocialFacebook",props:{card:{}},setup(v){return(s,l)=>(t(),n("div",Be,[e("div",{class:"h-[274px] border border-b-0 border-base bg-cover bg-center bg-no-repeat",style:L({backgroundImage:`url(${JSON.stringify(s.card.image)})`})},null,4),e("div",Le,[e("div",Re,u(s.card.url),1),e("div",je,[e("div",Fe,u(s.card.title),1),e("div",De,u(s.card.description),1)])])]))}}),Ee={class:"max-w-[438px] min-w-[438px] of-hidden border border-base rounded-[16px] bg-base -outline-offset-1",style:{"font-family":"TwitterChirp, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif"}},Ge={class:"break-words border-base p-[0.75em] antialiased",flex:"~ col justify-center gap-[2px]"},He={class:"overflow-hidden truncate whitespace-nowrap text-[15px] leading-[20px] lowercase op50"},Je={class:"m-0 truncate text-[15px] font-semibold leading-[20px]"},Ue={class:"line-clamp-2 select-none overflow-hidden break-words text-left text-[15px] leading-[20px] op50"},Ve=N({__name:"SocialTwitter",props:{tags:{}},setup(v){const s=v,l=C(()=>V(s.tags,{title:[{tag:"title"}],image:[{tag:"meta",name:"twitter:image"},{tag:"meta",name:"og:image"}],imageAlt:[{tag:"meta",name:"twitter:image:alt"}],description:[{tag:"meta",name:"twitter:description"},{tag:"meta",name:"description"}],favicon:[{tag:"link",name:"icon"}]})),a=C(()=>l.value.image?s.tags.find(c=>c.tag==="meta"&&c.name==="twitter:card")?.value||"summary_large_image":"summary");return(c,k)=>(t(),n("div",Ee,[e("div",{class:O(["cursor-pointer overflow-hidden leading-[1.3em]",a.value==="summary_large_image"?"":"flex"]),hover:"bg-[#88888805]"},[a.value==="summary_large_image"?(t(),n("div",{key:0,class:"h-[220px] border-b border-base bg-cover bg-center bg-no-repeat",style:L({backgroundImage:`url(${JSON.stringify(l.value.image)})`})},null,4)):(t(),n("div",{key:1,class:"h-[129px] w-[129px] flex-none border-r border-base bg-cover bg-center bg-no-repeat",style:L({backgroundImage:`url(${JSON.stringify(l.value.image)})`})},null,4)),e("div",Ge,[e("div",He,u(l.value.url),1),e("div",Je,u(l.value.title),1),e("div",Ue,u(l.value.description),1)])],2)]))}}),Pe={class:"max-w-[520px] min-w-[520px] cursor-pointer overflow-hidden border border-base rounded-[2px] shadow-md bg-base"},qe={class:"break-words p-[10px] antialiased"},We={class:"block h-auto max-h-[50px] border-separate select-none break-words text-left",style:{"border-spacing":"0px"}},Ke={class:"pb-[2px] text-[16px] font-semibold leading-[24px]"},Ye={class:"overflow-hidden truncate whitespace-nowrap text-xs font-normal uppercase op85"},Qe=N({__name:"SocialLinkedin",props:{card:{}},setup(v){return(s,l)=>(t(),n("div",Pe,[e("div",{class:"h-[270px] border-b border-base bg-cover bg-center bg-no-repeat",style:L({backgroundImage:`url(${JSON.stringify(s.card.image)})`})},null,4),e("div",qe,[e("div",We,[e("div",Ke,u(s.card.title),1),e("div",Ye,u(s.card.url),1)])])]))}}),Xe={class:"relative max-w-[420px] min-w-[420px] rounded-[16px] rounded-bl-0 py-[6px] leading-[18px] drop-shadow-sm drop-shadow-color-[#10232f26] bg-base"},Ze={class:"pl-[10px] pr-[8px]"},et={class:"text-[#3390ec] leading-normal underline"},tt={class:"quote w-full flex"},ot={class:"flex flex-col gap-1"},at={key:0,class:"my-[3px] overflow-hidden rounded"},nt=["src"],st={class:"cursor-pointer text-sm text-[#3390ec]"},rt={class:"cursor-pointer text-sm"},it={class:"cursor-pointer text-sm"},lt={class:"flex justify-end text-xs text-[#707579]"},ct=N({__name:"SocialTelegram",props:{card:{}},setup(v){const s=ne(),l=se(re(),"HH:mm");return(a,c)=>(t(),n("div",Xe,[e("div",Ze,[e("div",et,u(a.card.url),1),e("div",tt,[e("div",ot,[a.card.image?(t(),n("div",at,[e("img",{class:"h-full max-w-full w-full rounded object-cover",src:a.card.image},null,8,nt)])):y("",!0),e("div",st,[e("strong",null,u(g(s).hostname),1)]),e("div",rt,[e("strong",null,u(a.card.title),1)]),e("div",it,u(a.card.description),1)])]),e("div",lt,[e("span",null,u(g(l)),1)])]),c[0]||(c[0]=e("svg",{width:"11",height:"20",viewBox:"0 0 11 20",xmlns:"http://www.w3.org/2000/svg",class:"absolute bottom-0 ml-[-8.4px] translate-y-px text-white"},[e("g",{transform:"translate(9 -14)","fill-rule":"evenodd"},[e("path",{id:"corner-fill",d:"M-6 16h6v17c-.193-2.84-.876-5.767-2.05-8.782-.904-2.325-2.446-4.485-4.625-6.48A1 1 0 01-6 16z",transform:"matrix(1 0 0 -1 0 49)",fill:"currentColor"})])],-1))]))}}),dt=ie(ct,[["__scopeId","data-v-cc2245a1"]]),pt={flex:"~ col","w-full":""},ut={flex:"~ wrap","w-full":"","flex-none":""},mt=["onClick"],gt={flex:"~ items-center justify-center","flex-auto":"",p4:"","n-panel-grids":""},ht={key:0},_t={key:1},ft={key:2},vt={key:3},bt=N({__name:"SocialPreviewGroup",props:{tags:{}},setup(v){const s=v,l=["twitter","facebook","linkedin","telegram"],a=le("nuxt-devtools-social-preview-tab",l[0]),c=C(()=>V(s.tags,{title:[{tag:"title"}],image:[{tag:"meta",name:"og:image"}],imageAlt:[{tag:"meta",name:"og:image:alt"}],description:[{tag:"meta",name:"og:description"},{tag:"meta",name:"description"}],favicon:[{tag:"link",name:"icon"}]}));return(k,b)=>{const _=ze,d=Ve,o=Qe,w=dt;return t(),n("div",pt,[e("div",ut,[(t(),n(S,null,B(l,(m,T)=>e("button",{key:T,px4:"",py2:"",border:"r base",hover:"bg-active",class:O(m===g(a)?"":"border-b"),onClick:M=>a.value=m},[e("div",{class:O(m===g(a)?"":"op30"),capitalize:""},u(m),3)],10,mt)),64)),b[0]||(b[0]=e("div",{border:"b base","flex-auto":""},null,-1))]),e("div",gt,[g(a)==="facebook"?(t(),n("div",ht,[p(_,{card:c.value},null,8,["card"])])):g(a)==="twitter"?(t(),n("div",_t,[p(d,{tags:k.tags},null,8,["tags"])])):g(a)==="linkedin"?(t(),n("div",ft,[p(o,{card:c.value},null,8,["card"])])):g(a)==="telegram"?(t(),n("div",vt,[p(w,{card:c.value},null,8,["card"])])):y("",!0)])])}}}),wt={class:"markdown-body"},xt={__name:"open-graph",setup(v,{expose:s}){return s({frontmatter:{}}),(a,c)=>(t(),n("div",wt,c[0]||(c[0]=[fe('<h1>Open Graph</h1><p>Nuxt provides several different ways to manage your meta tags using <a href="https://unhead.harlanzw.com/" target="_blank" rel="noopener"><code>unhead</code></a>. Improve your Nuxt app’s SEO with powerful head config, composables and components.</p><p><a href="https://nuxt.com/docs/getting-started/seo-meta" target="_blank" rel="noopener">Learn more on the documentation</a></p><hr><p>You can also find how open graph specs are defined in:</p><ul><li><a href="https://ogp.me/" target="_blank" rel="noopener">The Open Graph protocol</a></li><li><a href="https://developer.twitter.com/en/docs/twitter-for-websites/cards/guides/getting-started" target="_blank" rel="noopener">Twitter Cards</a></li></ul>',6)])))}},yt={grid:"~ lg:cols-2","h-full":"","w-full":"","of-hidden":""},kt={"flex-auto":"","of-auto":""},$t={"flex-none":"",flex:"~ gap2 items-center"},Tt={flex:"~ col"},St={key:0,"x-divider":""},Ct={key:1,"x-divider":""},Nt={mr2:"",px4:"",py2:""},Et=N({__name:"open-graph",setup(v){const s=I(0),l=ce(),a=de(async()=>(s.value,(await l.value?.resolveTags()).map(i=>{const f=i.props||{};return i.tag==="htmlAttrs"&&f.lang?{tag:"html",name:"lang",value:f.lang}:f.charset?{tag:"meta",name:"charset",value:f.charset}:{tag:i.tag,name:f.property??f.name??f.rel??i.tag,value:f.content??f.href??i.textContent??JSON.stringify(f)}})),[]),c=I(!0);function k(){s.value+=1}const b=pe(),_=ue(),d=I(""),o=me(),w=H();async function m(){d.value!==_.value.path&&b.value.push(d.value||"/")}const T=C(()=>d.value===_.value.path?[]:b.value.resolve(d.value||"/").matched),M=C(()=>{const r=o.value.find(i=>i.path===_.value?.matched?.[0]?.path);return r?.file||r?.meta?.file});function R(r){return W.find(i=>i.name===r.name)?.docs}return G(_).toBeTruthy().then(r=>{d.value=r.path}),G(b).toBeTruthy().then(r=>{r.afterEach(()=>{ve(()=>{d.value=_.value.path,setTimeout(k,200),setTimeout(k,800)})})}),(r,i)=>{const f=ge,j=U,K=he,E=P,Y=J,Q=q,X=Ie,Z=bt,ee=xt,te=xe,F=be("tooltip");return t(),n(S,null,[e("div",yt,[e("div",kt,[p(K,null,{search:h(()=>[p(f,{modelValue:d.value,"onUpdate:modelValue":i[0]||(i[0]=x=>d.value=x),placeholder:"Route",icon:"carbon-direction-right-01 scale-y--100",n:"primary","flex-auto":"","font-mono":"",class:O(["px-5 py-2",g(_)?.path===d.value?"":T.value.length?"text-green":"text-orange"]),onKeydown:we(m,["enter"])},null,8,["modelValue","class"])]),actions:h(()=>[e("div",$t,[M.value?z((t(),A(j,{key:0,"text-lg":"",border:!1,icon:"carbon:launch",title:"Open file in editor",onClick:i[1]||(i[1]=x=>g(w)(M.value))},null,512)),[[F,"Open file in editor"]]):y("",!0),z(p(j,{"text-lg":"",border:!1,icon:"carbon:reset",title:"Refresh Data",onClick:k},null,512),[[F,"Refresh Data"]]),z(p(j,{"text-lg":"",border:!1,icon:c.value?"carbon:side-panel-open":"carbon:open-panel-right",title:"Toggle Preview",onClick:i[2]||(i[2]=x=>c.value=!c.value)},null,8,["icon"]),[[F,"Toggle Preview"]])])]),_:1}),e("div",Tt,[p(Q,{text:"Tags",icon:"carbon:tag-group"},{default:h(()=>[p(Y,{grid:"~ cols-[max-content_1fr]","items-center":"","justify-between":"","of-hidden":""},{default:h(()=>[(t(!0),n(S,null,B(g(a),(x,D)=>(t(),n(S,{key:D},[D?(t(),n("div",St)):y("",!0),D?(t(),n("div",Ct)):y("",!0),e("div",Nt,[p(E,{op50:"",href:R(x),target:"_blank",n:"primary"},{default:h(()=>[$(u(x.name),1)]),_:2},1032,["href"])]),p(E,{href:String(x.value).match(/^https?:\/\//)?x.value:void 0,target:"_blank","w-full":"",p2:"","font-mono":"",n:"primary"},{default:h(()=>[$(u(x.value),1)]),_:2},1032,["href"])],64))),128))]),_:1})]),_:1}),p(X,{tags:g(a),"matched-route-filepath":M.value},null,8,["tags","matched-route-filepath"])])]),c.value&&g(a)?.length?(t(),A(Z,{key:0,tags:g(a),"flex-none":"","border-base":"","lt-lg":"border-t",lg:"h-full w-140 border-l"},null,8,["tags"])):y("",!0)]),p(te,null,{default:h(()=>[p(ee)]),_:1})],64)}}});export{Et as default};
|
|
3
|
+
`)}),c=ae(),k=H(),b=["Missing Tags","Code Snippet"],_=I(b[0]);return(d,o)=>{const w=P,m=J,T=U,M=_e,R=q;return l.value.length?(t(),A(R,{key:0,text:"Missing Tags",description:`${l.value.length} missing tags`,icon:"carbon:warning-other","header-class":"text-orange op100! [[open]_&]:text-inherit",padding:!1},{default:h(()=>[e("div",ye,[(t(),n(S,null,B(b,(r,i)=>e("button",{key:i,px4:"",py2:"",border:"r t base",hover:"bg-active",class:O(r===_.value?"":"border-b"),onClick:f=>_.value=r},[e("div",{class:O(r===_.value?"":"op30"),capitalize:""},u(r),3)],10,ke)),64)),o[3]||(o[3]=e("div",{border:"b base","flex-auto":""},null,-1))]),_.value===b[0]?(t(),A(m,{key:0,grid:"~ cols-[1fr] lg:cols-[max-content_1fr]",m4:"","items-center":"","justify-between":"","of-hidden":""},{default:h(()=>[(t(!0),n(S,null,B(l.value,(r,i)=>(t(),n(S,{key:i},[i?(t(),n("div",$e)):y("",!0),i?(t(),n("div",Te)):y("",!0),e("div",Se,[o[4]||(o[4]=e("div",{"i-carbon-warning":"","text-orange":""},null,-1)),p(w,{"op-50":"",href:r.docs,target:"_blank",n:"orange"},{default:h(()=>[$(u(r.name),1)]),_:2},1032,["href"])]),e("div",Ce,u(r.description),1)],64))),128))]),_:1})):(t(),n("div",Ne,[e("p",Me,[p(T,{icon:"carbon-copy",n:"xs","px-2":"",onClick:o[0]||(o[0]=r=>g(c)(a.value,"open-graph-suggestion"))},{default:h(()=>o[5]||(o[5]=[$(" Copy ")])),_:1}),o[7]||(o[7]=$(" the following code snippet and paste it into your ")),d.matchedRouteFilepath?(t(),A(T,{key:0,icon:"carbon-launch",n:"xs","px-2":"",onClick:o[1]||(o[1]=r=>g(k)(d.matchedRouteFilepath))},{default:h(()=>o[6]||(o[6]=[$(" page component ")])),_:1})):(t(),n("span",Oe,"page component")),o[8]||(o[8]=$(" to full fill the missing tags. "))]),p(m,{relative:"","n-code-block":""},{default:h(()=>[p(M,{code:a.value,lang:"ts",lines:!1,"w-full":"","of-auto":"",p3:""},null,8,["code"]),e("div",Ae,[p(T,{icon:"carbon-copy",onClick:o[2]||(o[2]=r=>g(c)(a.value,"open-graph-suggestion"))},{default:h(()=>o[9]||(o[9]=[$(" Copy ")])),_:1})])]),_:1})]))]),_:1},8,["description"])):y("",!0)}}}),Be={class:"max-w-[524px] min-w-[524px] cursor-pointer bg-base"},Le={class:"break-words border border-base px-[12px] py-[10px] antialiased"},Re={class:"overflow-hidden truncate whitespace-nowrap text-[12px] leading-[11px] uppercase op50"},je={class:"block h-[46px] max-h-[46px] border-separate select-none overflow-hidden break-words text-left",style:{"border-spacing":"0px"}},Fe={class:"mt-[3px] truncate pt-[2px] text-[16px] font-semibold leading-[20px]"},De={class:"mt-[3px] block h-[18px] max-h-[80px] border-separate select-none overflow-hidden truncate whitespace-nowrap break-words text-left text-[14px] leading-[20px] op50",style:{"-webkit-line-clamp":"1","border-spacing":"0px","-webkit-box-orient":"vertical"}},ze=N({__name:"SocialFacebook",props:{card:{}},setup(v){return(s,l)=>(t(),n("div",Be,[e("div",{class:"h-[274px] border border-b-0 border-base bg-cover bg-center bg-no-repeat",style:L({backgroundImage:`url(${JSON.stringify(s.card.image)})`})},null,4),e("div",Le,[e("div",Re,u(s.card.url),1),e("div",je,[e("div",Fe,u(s.card.title),1),e("div",De,u(s.card.description),1)])])]))}}),Ee={class:"max-w-[438px] min-w-[438px] of-hidden border border-base rounded-[16px] bg-base -outline-offset-1",style:{"font-family":"TwitterChirp, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif"}},Ge={class:"break-words border-base p-[0.75em] antialiased",flex:"~ col justify-center gap-[2px]"},He={class:"overflow-hidden truncate whitespace-nowrap text-[15px] leading-[20px] lowercase op50"},Je={class:"m-0 truncate text-[15px] font-semibold leading-[20px]"},Ue={class:"line-clamp-2 select-none overflow-hidden break-words text-left text-[15px] leading-[20px] op50"},Ve=N({__name:"SocialTwitter",props:{tags:{}},setup(v){const s=v,l=C(()=>V(s.tags,{title:[{tag:"title"}],image:[{tag:"meta",name:"twitter:image"},{tag:"meta",name:"og:image"}],imageAlt:[{tag:"meta",name:"twitter:image:alt"}],description:[{tag:"meta",name:"twitter:description"},{tag:"meta",name:"description"}],favicon:[{tag:"link",name:"icon"}]})),a=C(()=>l.value.image?s.tags.find(c=>c.tag==="meta"&&c.name==="twitter:card")?.value||"summary_large_image":"summary");return(c,k)=>(t(),n("div",Ee,[e("div",{class:O(["cursor-pointer overflow-hidden leading-[1.3em]",a.value==="summary_large_image"?"":"flex"]),hover:"bg-[#88888805]"},[a.value==="summary_large_image"?(t(),n("div",{key:0,class:"h-[220px] border-b border-base bg-cover bg-center bg-no-repeat",style:L({backgroundImage:`url(${JSON.stringify(l.value.image)})`})},null,4)):(t(),n("div",{key:1,class:"h-[129px] w-[129px] flex-none border-r border-base bg-cover bg-center bg-no-repeat",style:L({backgroundImage:`url(${JSON.stringify(l.value.image)})`})},null,4)),e("div",Ge,[e("div",He,u(l.value.url),1),e("div",Je,u(l.value.title),1),e("div",Ue,u(l.value.description),1)])],2)]))}}),Pe={class:"max-w-[520px] min-w-[520px] cursor-pointer overflow-hidden border border-base rounded-[2px] shadow-md bg-base"},qe={class:"break-words p-[10px] antialiased"},Ke={class:"block h-auto max-h-[50px] border-separate select-none break-words text-left",style:{"border-spacing":"0px"}},We={class:"pb-[2px] text-[16px] font-semibold leading-[24px]"},Ye={class:"overflow-hidden truncate whitespace-nowrap text-xs font-normal uppercase op85"},Qe=N({__name:"SocialLinkedin",props:{card:{}},setup(v){return(s,l)=>(t(),n("div",Pe,[e("div",{class:"h-[270px] border-b border-base bg-cover bg-center bg-no-repeat",style:L({backgroundImage:`url(${JSON.stringify(s.card.image)})`})},null,4),e("div",qe,[e("div",Ke,[e("div",We,u(s.card.title),1),e("div",Ye,u(s.card.url),1)])])]))}}),Xe={class:"relative max-w-[420px] min-w-[420px] rounded-[16px] rounded-bl-0 py-[6px] leading-[18px] drop-shadow-sm drop-shadow-color-[#10232f26] bg-base"},Ze={class:"pl-[10px] pr-[8px]"},et={class:"text-[#3390ec] leading-normal underline"},tt={class:"quote w-full flex"},ot={class:"flex flex-col gap-1"},at={key:0,class:"my-[3px] overflow-hidden rounded"},nt=["src"],st={class:"cursor-pointer text-sm text-[#3390ec]"},rt={class:"cursor-pointer text-sm"},it={class:"cursor-pointer text-sm"},lt={class:"flex justify-end text-xs text-[#707579]"},ct=N({__name:"SocialTelegram",props:{card:{}},setup(v){const s=ne(),l=se(re(),"HH:mm");return(a,c)=>(t(),n("div",Xe,[e("div",Ze,[e("div",et,u(a.card.url),1),e("div",tt,[e("div",ot,[a.card.image?(t(),n("div",at,[e("img",{class:"h-full max-w-full w-full rounded object-cover",src:a.card.image},null,8,nt)])):y("",!0),e("div",st,[e("strong",null,u(g(s).hostname),1)]),e("div",rt,[e("strong",null,u(a.card.title),1)]),e("div",it,u(a.card.description),1)])]),e("div",lt,[e("span",null,u(g(l)),1)])]),c[0]||(c[0]=e("svg",{width:"11",height:"20",viewBox:"0 0 11 20",xmlns:"http://www.w3.org/2000/svg",class:"absolute bottom-0 ml-[-8.4px] translate-y-px text-white"},[e("g",{transform:"translate(9 -14)","fill-rule":"evenodd"},[e("path",{id:"corner-fill",d:"M-6 16h6v17c-.193-2.84-.876-5.767-2.05-8.782-.904-2.325-2.446-4.485-4.625-6.48A1 1 0 01-6 16z",transform:"matrix(1 0 0 -1 0 49)",fill:"currentColor"})])],-1))]))}}),dt=ie(ct,[["__scopeId","data-v-cc2245a1"]]),pt={flex:"~ col","w-full":""},ut={flex:"~ wrap","w-full":"","flex-none":""},mt=["onClick"],gt={flex:"~ items-center justify-center","flex-auto":"",p4:"","n-panel-grids":""},ht={key:0},_t={key:1},ft={key:2},vt={key:3},bt=N({__name:"SocialPreviewGroup",props:{tags:{}},setup(v){const s=v,l=["twitter","facebook","linkedin","telegram"],a=le("nuxt-devtools-social-preview-tab",l[0]),c=C(()=>V(s.tags,{title:[{tag:"title"}],image:[{tag:"meta",name:"og:image"}],imageAlt:[{tag:"meta",name:"og:image:alt"}],description:[{tag:"meta",name:"og:description"},{tag:"meta",name:"description"}],favicon:[{tag:"link",name:"icon"}]}));return(k,b)=>{const _=ze,d=Ve,o=Qe,w=dt;return t(),n("div",pt,[e("div",ut,[(t(),n(S,null,B(l,(m,T)=>e("button",{key:T,px4:"",py2:"",border:"r base",hover:"bg-active",class:O(m===g(a)?"":"border-b"),onClick:M=>a.value=m},[e("div",{class:O(m===g(a)?"":"op30"),capitalize:""},u(m),3)],10,mt)),64)),b[0]||(b[0]=e("div",{border:"b base","flex-auto":""},null,-1))]),e("div",gt,[g(a)==="facebook"?(t(),n("div",ht,[p(_,{card:c.value},null,8,["card"])])):g(a)==="twitter"?(t(),n("div",_t,[p(d,{tags:k.tags},null,8,["tags"])])):g(a)==="linkedin"?(t(),n("div",ft,[p(o,{card:c.value},null,8,["card"])])):g(a)==="telegram"?(t(),n("div",vt,[p(w,{card:c.value},null,8,["card"])])):y("",!0)])])}}}),wt={class:"markdown-body"},xt={__name:"open-graph",setup(v,{expose:s}){return s({frontmatter:{}}),(a,c)=>(t(),n("div",wt,c[0]||(c[0]=[fe('<h1>Open Graph</h1><p>Nuxt provides several different ways to manage your meta tags using <a href="https://unhead.harlanzw.com/" target="_blank" rel="noopener"><code>unhead</code></a>. Improve your Nuxt app’s SEO with powerful head config, composables and components.</p><p><a href="https://nuxt.com/docs/getting-started/seo-meta" target="_blank" rel="noopener">Learn more on the documentation</a></p><hr><p>You can also find how open graph specs are defined in:</p><ul><li><a href="https://ogp.me/" target="_blank" rel="noopener">The Open Graph protocol</a></li><li><a href="https://developer.twitter.com/en/docs/twitter-for-websites/cards/guides/getting-started" target="_blank" rel="noopener">Twitter Cards</a></li></ul>',6)])))}},yt={grid:"~ lg:cols-2","h-full":"","w-full":"","of-hidden":""},kt={"flex-auto":"","of-auto":""},$t={"flex-none":"",flex:"~ gap2 items-center"},Tt={flex:"~ col"},St={key:0,"x-divider":""},Ct={key:1,"x-divider":""},Nt={mr2:"",px4:"",py2:""},Et=N({__name:"open-graph",setup(v){const s=I(0),l=ce(),a=de(async()=>(s.value,(await l.value?.resolveTags()).map(i=>{const f=i.props||{};return i.tag==="htmlAttrs"&&f.lang?{tag:"html",name:"lang",value:f.lang}:f.charset?{tag:"meta",name:"charset",value:f.charset}:{tag:i.tag,name:f.property??f.name??f.rel??i.tag,value:f.content??f.href??i.textContent??JSON.stringify(f)}})),[]),c=I(!0);function k(){s.value+=1}const b=pe(),_=ue(),d=I(""),o=me(),w=H();async function m(){d.value!==_.value.path&&b.value.push(d.value||"/")}const T=C(()=>d.value===_.value.path?[]:b.value.resolve(d.value||"/").matched),M=C(()=>{const r=o.value.find(i=>i.path===_.value?.matched?.[0]?.path);return r?.file||r?.meta?.file});function R(r){return K.find(i=>i.name===r.name)?.docs}return G(_).toBeTruthy().then(r=>{d.value=r.path}),G(b).toBeTruthy().then(r=>{r.afterEach(()=>{ve(()=>{d.value=_.value.path,setTimeout(k,200),setTimeout(k,800)})})}),(r,i)=>{const f=ge,j=U,W=he,E=P,Y=J,Q=q,X=Ie,Z=bt,ee=xt,te=xe,F=be("tooltip");return t(),n(S,null,[e("div",yt,[e("div",kt,[p(W,null,{search:h(()=>[p(f,{modelValue:d.value,"onUpdate:modelValue":i[0]||(i[0]=x=>d.value=x),placeholder:"Route",icon:"carbon-direction-right-01 scale-y--100",n:"primary","flex-auto":"","font-mono":"",class:O(["px-5 py-2",g(_)?.path===d.value?"":T.value.length?"text-green":"text-orange"]),onKeydown:we(m,["enter"])},null,8,["modelValue","class"])]),actions:h(()=>[e("div",$t,[M.value?z((t(),A(j,{key:0,"text-lg":"",border:!1,icon:"carbon:launch",title:"Open file in editor",onClick:i[1]||(i[1]=x=>g(w)(M.value))},null,512)),[[F,"Open file in editor"]]):y("",!0),z(p(j,{"text-lg":"",border:!1,icon:"carbon:reset",title:"Refresh Data",onClick:k},null,512),[[F,"Refresh Data"]]),z(p(j,{"text-lg":"",border:!1,icon:c.value?"carbon:side-panel-open":"carbon:open-panel-right",title:"Toggle Preview",onClick:i[2]||(i[2]=x=>c.value=!c.value)},null,8,["icon"]),[[F,"Toggle Preview"]])])]),_:1}),e("div",Tt,[p(Q,{text:"Tags",icon:"carbon:tag-group"},{default:h(()=>[p(Y,{grid:"~ cols-[max-content_1fr]","items-center":"","justify-between":"","of-hidden":""},{default:h(()=>[(t(!0),n(S,null,B(g(a),(x,D)=>(t(),n(S,{key:D},[D?(t(),n("div",St)):y("",!0),D?(t(),n("div",Ct)):y("",!0),e("div",Nt,[p(E,{op50:"",href:R(x),target:"_blank",n:"primary"},{default:h(()=>[$(u(x.name),1)]),_:2},1032,["href"])]),p(E,{href:String(x.value).match(/^https?:\/\//)?x.value:void 0,target:"_blank","w-full":"",p2:"","font-mono":"",n:"primary"},{default:h(()=>[$(u(x.value),1)]),_:2},1032,["href"])],64))),128))]),_:1})]),_:1}),p(X,{tags:g(a),"matched-route-filepath":M.value},null,8,["tags","matched-route-filepath"])])]),c.value&&g(a)?.length?(t(),A(Z,{key:0,tags:g(a),"flex-none":"","border-base":"","lt-lg":"border-t",lg:"h-full w-140 border-l"},null,8,["tags"])):y("",!0)]),p(te,null,{default:h(()=>[p(ee)]),_:1})],64)}}});export{Et as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{X as T,H as $,a6 as z,am as O,an as P,l as E,c as F,ao as g,ap as k,aq as H,a1 as G,i as K,h as U,d as W,a as q,w as Q,e as X}from"./k6pa1ohq.js";import{u as J,_ as Y}from"./state-modules-evifr0hw.js";import{u as Z}from"./state-components-fo1al5n2.js";import{k as h,l as A,M as v,$ as n,Q as s,u as o,S as p,U as e,a0 as i,a5 as a,W as u,F as f,a6 as l}from"./vendor/json-editor-vue-gi2fewby.js";import"./vendor/unocss-3uirpnla.js";import"./vendor/shiki-bnvxb5wv.js";import"./nbadge-iwzd40zm.js";import"./ncode-block.vue-gy1ero5j.js";import"./client-c9f80qsp.js";import"./ncheckbox.vue-bzh5t5xo.js";const c="2.0.0-beta.0-28940293.6562084",tt={key:0},et={key:1,flex:"~ col gap2",ma:"","h-full":"","max-w-300":"","w-full":"",p5:"",px5:"","md:px20":""},ot={flex:"~ col","mt-5":"","items-center":"","md:mt-20":""},nt={op40:""},st={flex:"~ gap2 wrap"},lt={key:5,"pointer-events-none":"","min-w-40":"",p4:"","theme-card-lime":"",flex:"~ auto gap-6"},it={grid:"~ cols-[auto_auto] gap-x-5 items-center"},ut={"text-right":""},rt={"text-right":""},at={"text-right":""},dt={"text-right":""},pt={flex:"~ col gap2"},mt={flex:"~ gap-6 wrap","mt-5":"","items-center":"","justify-center":""},xt={flex:"col gap-2",mxa:"",hidden:"","w-100":"","text-sm":"",op50:"","md:flex":""},vt={flex:"~ gap-1","items-center":""},ft={flex:"~ gap-1","items-center":""},jt=h({__name:"overview",setup(gt){const b=T(),m=$(),D=Z(),y=z(),j=J(),B=O(),w=P(),I=E();function V(){K.value=!0,I.push("/")}const S=A(()=>b.value?.nuxt.vueApp.version),r=A(()=>b.value?.metrics.loading());function L(){U()}return(C,t)=>{const M=W,x=q,_=Y,N=Q,d=X,R=F;return s(),v(R,{"h-screen":"","w-full":"",flex:""},{default:n(()=>[o(m)?(s(),p("div",et,[t[40]||(t[40]=e("div",{"flex-auto":""},null,-1)),e("div",ot,[i(x,{flex:"~","mt--10":"","items-center":"","justify-center":"",to:"https://devtools.nuxt.com/",target:"_blank"},{default:n(()=>[i(M,{"h-10":""})]),_:1}),e("button",{mb6:"",mt3:"","text-center":"","text-sm":"",flex:"~ gap-1 wrap",onClick:V},[t[0]||(t[0]=e("span",{op40:""}," Nuxt DevTools ",-1)),e("code",nt,"v"+a(o(c)),1),i(_,{"package-name":"@nuxt/devtools",options:{dev:!0},"show-version":!1})])]),e("div",st,[i(x,{to:"https://nuxt.com",target:"_blank",p4:"","theme-card-green":"",flex:"~ col auto"},{default:n(()=>[t[1]||(t[1]=e("div",{"logos-nuxt-icon":"","text-3xl":""},null,-1)),i(_,{"package-name":"nuxt",options:{dev:!0}})]),_:1}),S.value?(s(),v(x,{key:0,to:"https://vuejs.org",target:"_blank",p4:"","theme-card-green":"",flex:"~ col auto"},{default:n(()=>[t[2]||(t[2]=e("div",{"logos-vue":"","text-3xl":""},null,-1)),e("code",null,"v"+a(S.value),1)]),_:1})):u("",!0),o(m)?(s(),p(f,{key:1},[o(m)&&o(m).pages&&o(b)?(s(),v(x,{key:0,"min-w-40":"",p4:"","theme-card-lime":"",flex:"~ col auto",to:"/modules/pages"},{default:n(()=>[t[3]||(t[3]=e("div",{"carbon-tree-view-alt":"","text-3xl":""},null,-1)),e("div",null,a(o(g)(o(B).length,"page")),1)]),_:1})):u("",!0),o(m)?(s(),v(x,{key:1,"min-w-40":"",p4:"","theme-card-lime":"",flex:"~ col auto",to:"/modules/components"},{default:n(()=>[t[4]||(t[4]=e("div",{"i-carbon-assembly-cluster":"","text-3xl":""},null,-1)),e("div",null,a(o(g)(o(D).length,"component")),1)]),_:1})):u("",!0),o(m)&&o(y)?(s(),v(x,{key:2,"min-w-40":"",p4:"","theme-card-yellow":"",flex:"~ col auto",to:"/modules/imports"},{default:n(()=>[t[5]||(t[5]=e("div",{"carbon-function":"","text-3xl":""},null,-1)),e("div",null,a(o(g)(o(y).imports.length,"import")),1)]),_:1})):u("",!0),o(m)?(s(),v(x,{key:3,"min-w-40":"",p4:"","theme-card-purple":"",flex:"~ col auto",to:"/modules/modules"},{default:n(()=>[t[6]||(t[6]=e("div",{"carbon-3d-mpr-toggle":"","text-3xl":""},null,-1)),e("div",null,a(o(g)(o(j).length,"module")),1)]),_:1})):u("",!0),o(m)?(s(),v(x,{key:4,"min-w-40":"",p4:"","theme-card-teal":"",flex:"~ col auto",to:"/modules/plugins"},{default:n(()=>[t[7]||(t[7]=e("div",{"carbon-plug":"","text-3xl":""},null,-1)),e("div",null,a(o(g)(o(m).plugins.length,"plugin")),1)]),_:1})):u("",!0),r.value?(s(),p("div",lt,[t[12]||(t[12]=e("div",{"i-carbon-time-plot":"","flex-none":"","text-3xl":""},null,-1)),e("div",it,[r.value.ssrStart?(s(),p(f,{key:0},[t[8]||(t[8]=e("div",{"text-sm":""}," SSR to full load ",-1)),e("div",ut,a(o(k)(r.value.appLoad-r.value.ssrStart)),1)],64)):u("",!0),t[10]||(t[10]=e("div",{"text-sm":""}," Page load ",-1)),e("div",rt,a(o(k)(r.value.appLoad-r.value.appInit)),1),t[11]||(t[11]=e("div",{"text-sm":""}," Navigation ",-1)),e("div",at,a(o(k)(r.value.pageEnd-r.value.pageStart)),1),r.value.hmrStart?(s(),p(f,{key:1},[t[9]||(t[9]=e("div",{"text-sm":""}," HMR ",-1)),e("div",dt,a(o(k)(r.value.hmrEnd-r.value.hmrStart)),1)],64)):u("",!0)])])):u("",!0)],64)):u("",!0)]),e("div",pt,[o(H)?(s(),v(N,{key:0,n:"yellow5",icon:"carbon-unlink","justify-center":""},{default:n(()=>t[13]||(t[13]=[l(" Not connected to the client app, showing server-side data only. Use the embedded mode for full features. ")])),_:1})):u("",!0),e("button",{title:"Authorize",onClick:L},[("isDevAuthed"in C?C.isDevAuthed:o(G))?u("",!0):(s(),v(N,{key:0,n:"orange5",icon:"i-carbon-locked","justify-center":""},{default:n(()=>t[14]||(t[14]=[l(" Access from an untrusted browser, some features are limited. Click to authorize now. ")])),_:1}))])]),e("div",mt,[t[16]||(t[16]=e("a",{href:"https://github.com/nuxt/devtools",target:"_blank",flex:"~ gap1","items-center":"",op50:"",hover:"op100 text-blue",transition:""},[e("div",{"i-carbon-star":""}),l(" Star on GitHub ")],-1)),t[17]||(t[17]=e("a",{href:"https://github.com/nuxt/devtools/discussions/29",target:"_blank",flex:"~ gap1","items-center":"",op50:"",hover:"op100 text-yellow",transition:""},[e("div",{"i-carbon-data-enrichment":""}),l(" Ideas & Suggestions ")],-1)),t[18]||(t[18]=e("a",{href:"https://github.com/nuxt/devtools/discussions/31",target:"_blank",flex:"~ gap1","items-center":"",op50:"",hover:"op100 text-lime",transition:""},[e("div",{"i-carbon-plan":""}),l(" Project Roadmap ")],-1)),t[19]||(t[19]=e("a",{href:"https://github.com/nuxt/devtools/issues",target:"_blank",flex:"~ gap1","items-center":"",op50:"",hover:"op100 text-rose",transition:""},[e("div",{"i-carbon-debug":""}),l(" Bug Reports ")],-1)),i(x,{to:"/settings",flex:"~ gap1","inline-block":"","items-center":"",op50:"","hover:op80":""},{default:n(()=>t[15]||(t[15]=[e("div",{"i-carbon-settings-adjust":""},null,-1),l(" Settings ")])),_:1})]),t[41]||(t[41]=e("div",{"flex-auto":""},null,-1)),e("div",xt,[e("div",vt,[o(w)?(s(),p(f,{key:0},[i(d,{n:"xs",class:"px2"},{default:n(()=>t[20]||(t[20]=[l(" ⌘ Cmd ")])),_:1}),t[22]||(t[22]=e("span",null,"+",-1)),i(d,{n:"xs",class:"px2"},{default:n(()=>t[21]||(t[21]=[l(" K ")])),_:1})],64)):(s(),p(f,{key:1},[i(d,{n:"xs",class:"px2"},{default:n(()=>t[23]||(t[23]=[l(" Ctrl ")])),_:1}),t[25]||(t[25]=e("span",null,"+",-1)),i(d,{n:"xs",class:"px2"},{default:n(()=>t[24]||(t[24]=[l(" K ")])),_:1})],64)),t[26]||(t[26]=e("div",{"flex-auto":""},null,-1)),t[27]||(t[27]=l(" Open Command Palette "))]),e("div",ft,[o(w)?(s(),p(f,{key:0},[i(d,{n:"xs",class:"px2"},{default:n(()=>t[28]||(t[28]=[l(" ⇧ Shift ")])),_:1}),t[31]||(t[31]=e("span",null,"+",-1)),i(d,{n:"xs",class:"px2"},{default:n(()=>t[29]||(t[29]=[l(" ⌥ Option ")])),_:1}),t[32]||(t[32]=e("span",null,"+",-1)),i(d,{n:"xs",class:"px2"},{default:n(()=>t[30]||(t[30]=[l(" D ")])),_:1})],64)):(s(),p(f,{key:1},[i(d,{n:"xs",class:"px2"},{default:n(()=>t[33]||(t[33]=[l(" Shift ")])),_:1}),t[36]||(t[36]=e("span",null,"+",-1)),i(d,{n:"xs",class:"px2"},{default:n(()=>t[34]||(t[34]=[l(" Alt ")])),_:1}),t[37]||(t[37]=e("span",null,"+",-1)),i(d,{n:"xs",class:"px2"},{default:n(()=>t[35]||(t[35]=[l(" D ")])),_:1})],64)),t[38]||(t[38]=e("div",{"flex-auto":""},null,-1)),t[39]||(t[39]=e("div",null,"Toggle DevTools",-1))])])])):(s(),p("div",tt," Loading... "))]),_:1})}}});export{jt as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{v as S,e as J,J as Q,aw as j,I as Y,ai as Z,aj as q,H as G,R as X,ak as ee,ax as te,r as oe,h as ne}from"./k6pa1ohq.js";import{_ as F}from"./nbadge-iwzd40zm.js";import{k as L,b as E,l as x,R as ae,Q as t,S as a,U as e,a5 as C,M as k,$,ag as se,F as g,ab as M,W as N,a0 as _,a6 as I,Y as A,u as c,x as re,Z as le}from"./vendor/json-editor-vue-gi2fewby.js";import{_ as z}from"./filepath-item.vue-otp6jyyn.js";import{_ as ue}from"./nsection-block-cz4igj8y.js";import{_ as ie}from"./launch-page.vue-cd4fi46t.js";import{_ as pe}from"./help-fab.vue-eyzjjtrr.js";import"./vendor/unocss-3uirpnla.js";import"./vendor/shiki-bnvxb5wv.js";import"./nicon-title.vue-ouqsubn7.js";import"./nmarkdown.vue-hygash5x.js";import"./client-c9f80qsp.js";const de={block:"","cursor-pointer":""},ce={p2:""},me=["onSubmit"],ve={flex:"~","items-center":"",p2:"","text-sm":"","font-mono":""},he={key:1},_e=L({__name:"RoutePathItem",props:{route:{}},emits:["navigate"],setup(V,{emit:i}){const v=V,R=i,m=E([]),f=x(()=>{const r=w(v.route.path);return m.value=Array.from({length:r.length},()=>""),r});function w(r){return r.split(/(:\w+[?*]?(?:\(\))?)/).filter(Boolean).map(d=>d[0]===":"?d.replace(/\(\)$/,"?"):d)}const y=x(()=>f.value.map((r,d)=>r[0]===":"?m.value[d]:r).join("").replace(/\/+/g,"/")),o=x(()=>v.route.path.includes(":"));function s(){R("navigate",y.value)}return(r,d)=>{const h=S,n=J,l=ae("VDropdown");return o.value?(t(),k(l,{key:1},{popper:$(({hide:b})=>[e("div",ce,[e("form",{flex:"~ col",onSubmit:se(()=>{s(),b()},["prevent"])},[o.value?(t(),a(g,{key:0},[d[0]||(d[0]=e("div",{px2:"","text-sm":"",op50:""}," Fill params and navigate: ",-1)),e("div",ve,[(t(!0),a(g,null,M(f.value,(u,p)=>(t(),a(g,{key:p},[u[0]===":"?(t(),k(h,{key:0,modelValue:m.value[p],"onUpdate:modelValue":T=>m.value[p]=T,"w-20":"","n-sm":"",placeholder:u.slice(1)},null,8,["modelValue","onUpdate:modelValue","placeholder"])):(t(),a("span",he,C(u),1))],64))),128))])],64)):N("",!0),_(n,{type:"submit",block:"",n:"primary"},{default:$(()=>d[1]||(d[1]=[I(" Navigate ")])),_:1})],40,me)])]),default:$(()=>[e("code",de,[(t(!0),a(g,null,M(f.value,(b,u)=>(t(),a("span",{key:u,class:A(b[0]===":"?"text-gray border border-dashed rounded border-gray:50 px1":"")},C(b[0]===":"?b.slice(1):b),3))),128))])]),_:1})):(t(),a("button",{key:0,onClick:s},[e("code",null,C(r.route.path),1)]))}}}),fe={"max-w-full":"","of-auto":""},ge={"w-full":""},ye={"w-20":"","pr-1":""},be={flex:"","items-center":"","justify-end":""},xe={"text-sm":""},ke={flex:"inline gap3","items-center":""},we={flex:"~ gap1",pr2:"",op0:"","group-hover:op100":""},$e=["onClick"],Ce=["onClick"],Ne={"w-0":"","ws-nowrap":"","pr-1":"","text-left":"","text-sm":"","font-mono":"",op50:""},Re={"w-0":"","ws-nowrap":"","pr-1":"","text-center":"","text-sm":"","font-mono":"",op50:""},Pe={"w-0":"","ws-nowrap":"","text-center":"","text-sm":"","font-mono":""},Ve={key:0},Ie=["onClick"],Me=L({__name:"RoutesTable",props:{pages:{},layouts:{},matched:{},matchedPending:{}},emits:["navigate"],setup(V){const i=V,v=Q(),R=j(),m=Y(),f=x(()=>[...i.pages].sort((o,s)=>o.path.localeCompare(s.path)));function w(o){const s=i.layouts.find(r=>r.name===o);s&&v(s.file)}function y(o){if(typeof o=="string")return R.value?.middleware.find(s=>s.name===o)?.path}return(o,s)=>{const r=F,d=_e,h=z;return t(),a("div",fe,[e("table",ge,[s[4]||(s[4]=e("thead",{border:"b base"},[e("tr",null,[e("th",{"text-left":""}),e("th",{"text-left":""}," Route Path "),e("th",{"text-left":""}," Name "),e("th",{"text-left":""}," Middleware "),e("th",null," Layout ")])],-1)),e("tbody",null,[(t(!0),a(g,null,M(f.value,n=>(t(),a("tr",{key:n.name,class:"group","h-7":"",border:"b dashed transparent hover:base"},[e("td",ye,[e("div",be,[o.matched.find(l=>l.name===n.name)?(t(),k(r,{key:0,n:"green",title:"active",textContent:"active"})):o.matchedPending.find(l=>l.name===n.name)?(t(),k(r,{key:1,n:"teal",title:"next",textContent:"next"})):N("",!0)])]),e("td",xe,[e("div",ke,[_(d,{route:n,class:A(o.matched.find(l=>l.name===n.name)?"text-primary":o.matchedPending.find(l=>l.name===n.name)?"text-teal":""),"ws-nowrap":"",onNavigate:s[0]||(s[0]=l=>o.$emit("navigate",l))},null,8,["route","class"]),e("div",we,[n.file||n.meta?.file?(t(),a("button",{key:0,"text-sm":"",op40:"",hover:"op100 text-primary",title:"Open in editor",onClick:l=>c(v)(n.file||n.meta?.file)},s[2]||(s[2]=[e("div",{"i-carbon-script-reference":""},null,-1)]),8,$e)):N("",!0),n.file||n.meta?.file?(t(),a("button",{key:1,"text-sm":"",op40:"",hover:"op100 text-primary",title:"Copy path",onClick:l=>c(m)(n.file||n.meta?.file)},s[3]||(s[3]=[e("div",{"i-carbon-copy":""},null,-1)]),8,Ce)):N("",!0)])])]),e("td",Ne,C(n.name),1),e("td",Re,[_(h,{filepath:y(n.meta.middleware),override:`${n.meta.middleware||"-"}`},null,8,["filepath","override"])]),e("td",Pe,[n.meta.layout===!1?(t(),a("span",Ve,"-")):n.meta.layout?(t(),a("button",{key:1,onClick:l=>w(n.meta.layout)},C(n.meta.layout),9,Ie)):(t(),a("button",{key:2,"text-sm":"",op15:"",onClick:s[1]||(s[1]=l=>w("default"))}," (default) "))])]))),128))])])])}}}),Te={class:"markdown-body"},Be={__name:"pages",setup(V,{expose:i}){return i({frontmatter:{}}),(R,m)=>(t(),a("div",Te,m[0]||(m[0]=[e("h1",null,"Pages",-1),e("p",null,[I("Nuxt provides a file-based routing to create routes within your web application using Vue Router under the hood. Pages are Vue components and can have any valid extension that Nuxt supports (by default .vue, .js, .jsx, .mjs, .ts or .tsx). Nuxt will automatically create a route for every page in your "),e("code",null,"~/pages/"),I(" directory.")],-1),e("p",null,[e("a",{href:"https://nuxt.com/docs/getting-started/routing",target:"_blank",rel:"noopener"},"Learn more in the documentation")],-1),e("hr",null,null,-1),e("h1",null,"Middlewares",-1),e("p",null,"Nuxt provides a customizable route middleware framework that can be used throughout the application. This is ideal for extracting code that needs to run before navigating to a particular route.",-1),e("p",null,[e("a",{href:"https://nuxt.com/docs/guide/directory-structure/middleware",target:"_blank",rel:"noopener"},"Learn more in the documentation")],-1)])))}},Ee={key:0,"h-full":"","of-auto":""},Le={border:"b base",flex:"~ col gap1",px4:"",py3:"","n-navbar-glass":""},Ae={"font-mono":""},De={key:1,op50:""},Se={key:0,"text-orange":"",op75:""},je={key:1,op50:""},Fe={"min-h-14":""},ze={key:1,class:"py-4 text-center"},Ue={"w-full":""},We={mr1:""},ot=L({__name:"pages",setup(V){const i=Z(),v=q(),R=G(),m=j(),f=X(),w=ee(),y=x(()=>m.value?.middleware||[]),o=E(""),s=E(0),r=x(()=>(y.value,o.value,f.value,s.value,i.value?.currentRoute?.value?.path));re(()=>{v.value&&(o.value=i.value?.currentRoute?.value?.path),i.value?.beforeEach(u=>{o.value=u.fullPath}),i.value?.afterEach(u=>{o.value=u.fullPath})});async function d(){o.value!==i.value?.currentRoute?.value?.path&&i.value.push(o.value||"/")}const h=x(()=>i.value.resolve(o.value||"/").matched);function n(u){i.value.push(u),o.value=u}const l=te(),b=x(()=>`./${l===4?"app/":""}pages/index.vue`);return(u,p)=>{const T=S,D=Me,B=ue,U=F,W=z,H=ie,K=Be,O=pe;return t(),a(g,null,[c(R)?.pages&&c(i)?(t(),a("div",Ee,[e("div",Le,[e("div",null,[r.value!==o.value?(t(),a(g,{key:0},[p[1]||(p[1]=e("span",{op50:""},"Navigate from ",-1)),e("span",Ae,C(r.value),1),p[2]||(p[2]=e("span",{op50:""}," to ",-1))],64)):(t(),a("span",De,"Current route"))]),_(T,{modelValue:o.value,"onUpdate:modelValue":p[0]||(p[0]=P=>o.value=P),"font-mono":"",icon:"carbon-direction-right-01 scale-y--100",class:A(r.value===o.value?"":h.value.length?"text-green":"text-orange"),onKeydown:le(d,["enter"])},null,8,["modelValue","class"]),e("div",null,[r.value!==o.value?(t(),a(g,{key:0},[p[3]||(p[3]=e("span",null,[I("Press "),e("b",{"font-bold":""},"Enter"),I(" to navigate")],-1)),h.value.length?N("",!0):(t(),a("span",Se," (no match)"))],64)):(t(),a("span",je,"Edit path above to navigate"))])]),_(B,{icon:"carbon-tree-view",text:"Matched Routes",padding:!1},{default:$(()=>[e("div",Fe,[h.value.length?(t(),k(D,{key:0,pages:h.value,layouts:c(f)||[],matched:c(v).matched,"matched-pending":h.value,onNavigate:n},null,8,["pages","layouts","matched","matched-pending"])):(t(),a("div",ze,p[4]||(p[4]=[e("span",{op50:""},"No routes matched",-1)])))])]),_:1}),_(B,{icon:"carbon-tree-view-alt",text:"All Routes",description:`${c(w).length} routes registered in your application`,padding:"pr5"},{default:$(()=>[_(D,{pages:c(w),layouts:c(f)||[],matched:c(v).matched,"matched-pending":h.value,onNavigate:n},null,8,["pages","layouts","matched","matched-pending"])]),_:1},8,["description"]),y.value.length?(t(),k(B,{key:0,icon:"carbon:ibm-watson-studio",text:"Middleware",description:`${y.value.length} middleware registered in your application`,padding:"px13"},{default:$(()=>[e("table",Ue,[p[5]||(p[5]=e("thead",{border:"b base","h-7":""},[e("tr",null,[e("th",{"text-left":""}," Name "),e("th",{"text-left":""}," Path ")])],-1)),(t(!0),a(g,null,M(y.value,P=>(t(),a("tr",{key:P.path,"h-7":""},[e("td",null,[e("span",We,C(P.name),1),P.global?(t(),k(U,{key:0,n:"green",title:"Registered at runtime as a global component",textContent:"global"})):N("",!0)]),e("td",null,[_(W,{filepath:P.path},null,8,["filepath"])])]))),128))])]),_:1},8,["description"])):N("",!0)])):(t(),k(H,{key:1,icon:"carbon-tree-view-alt",name:"wizard-pages",title:"Nuxt Routing",description:`Create ${b.value} to enable routing`,actions:[{label:"Learn more",src:"https://nuxt.com/docs/getting-started/routing",attrs:{n:"primary"}},{label:"Enable Routing",async handle(){return("rpc"in u?u.rpc:c(oe)).runWizard(await("ensureDevAuthToken"in u?u.ensureDevAuthToken:c(ne))(),"enablePages")}}]},null,8,["description","actions"])),_(O,null,{default:$(()=>[_(K)]),_:1})],64)}}});export{ot as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as h}from"./state-editor.vue-
|
|
1
|
+
import{_ as h}from"./state-editor.vue-kzen94mi.js";import{k as $,Q as e,S as i,F as x,ab as N,M as d,$ as a,V as B,a1 as V,U as k,l as b,ae as w,u as F,a0 as o,W as _,a6 as O,a8 as E}from"./vendor/json-editor-vue-gi2fewby.js";import{_ as P}from"./nsection-block-cz4igj8y.js";import{X as R,e as j}from"./k6pa1ohq.js";import{_ as A}from"./help-fab.vue-eyzjjtrr.js";import"./nicon-title.vue-ouqsubn7.js";import"./vendor/unocss-3uirpnla.js";import"./vendor/shiki-bnvxb5wv.js";const G={key:0,flex:"~ col gap-1"},H={key:1,mt2:"",px4:"",italic:"",op35:""},K=$({__name:"StateGroup",props:{state:{},revision:{},prefix:{default:""}},setup(f){return(t,n)=>{const c=h;return e(),i("div",null,[t.state&&Object.keys(t.state).length>0?(e(),i("div",G,[(e(!0),i(x,null,N(t.state,(s,r)=>(e(),d(c,{key:r,revision:t.revision,state:s,name:r.startsWith(t.prefix)?r.slice(t.prefix.length):r},{actions:a(l=>[B(t.$slots,"actions",V({ref_for:!0},l))]),_:2},1032,["revision","state","name"]))),128))])):(e(),i("div",H," No data "))])}}}),T={class:"markdown-body"},W={__name:"payload",setup(f,{expose:t}){return t({frontmatter:{}}),(c,s)=>(e(),i("div",T,s[0]||(s[0]=[k("h1",null,"State & Async Data",-1),k("p",null,"// TODO",-1)])))}},L={key:0},Z=$({__name:"payload",setup(f){const t=R(),n=b(()=>t.value?.nuxt.payload),c=b(()=>t.value?.revision.value);async function s(r){await t.value?.nuxt.hooks.callHookParallel("app:data:refresh",r)}return(r,l)=>{const m=K,p=P,v=j,S=h,g=W,D=A,C=w("tooltip");return e(),i(x,null,[F(t)?(e(),i("div",L,[o(p,{icon:"carbon-data-set",text:"State",description:"Keyed state from `useState`",padding:!1},{default:a(()=>[o(m,{state:n.value.state,revision:c.value,prefix:"$s"},null,8,["state","revision"])]),_:1}),o(p,{icon:"carbon-data-blob",text:"Data",description:"Keyed state from `useAsyncData`",padding:!1},{actions:a(()=>[o(v,{n:"xs primary","self-start":"",icon:"i-carbon-recycle",onClick:l[0]||(l[0]=y=>s())},{default:a(()=>l[1]||(l[1]=[O(" Re-fetch all data ")])),_:1})]),default:a(()=>[o(m,{state:n.value.data,revision:c.value},{actions:a(({isOpen:y,name:u})=>[y&&u?E((e(),d(v,{key:0,title:`Re-fetch '${u}'`,icon:"carbon-recycle",border:!1,onClick:M=>s([u])},null,8,["title","onClick"])),[[C,`Re-fetch '${u}'`,void 0,{bottom:!0}]]):_("",!0)]),_:1},8,["state","revision"])]),_:1}),n.value.functions&&Object.keys(n.value.functions).length?(e(),d(p,{key:0,icon:"carbon-function",text:"Functions",description:"State for functions"},{default:a(()=>[o(S,{"ml--6":"",state:n.value.functions,revision:c.value},null,8,["state","revision"])]),_:1})):_("",!0)])):_("",!0),o(D,null,{default:a(()=>[o(g)]),_:1})],64)}}});export{Z as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{ay as r,az as c}from"./k6pa1ohq.js";import{v as i}from"./index-hgt6j2tr.js";import{k as m,S as p,u as o,M as n,$ as _,Q as t,a6 as l}from"./vendor/json-editor-vue-gi2fewby.js";import"./vendor/unocss-3uirpnla.js";import"./vendor/shiki-bnvxb5wv.js";import"./vue-virtual-scroller.esm-hx1s7s1b.js";const u={class:"h-full w-full"},g=m({__name:"pinia",setup(f){const{connected:a}=r();return(d,e)=>{const s=c;return t(),p("div",u,[o(a)?(t(),n(o(i),{key:0})):(t(),n(s,{key:1},{default:_(()=>e[0]||(e[0]=[l(" Connecting.... ")])),_:1}))])}}});export{g as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as
|
|
1
|
+
import{_ as S}from"./filepath-item.vue-otp6jyyn.js";import{_ as T}from"./nbadge-iwzd40zm.js";import{_ as k}from"./duration-display.vue-kqe6a4wx.js";import{H as D,av as B,D as V,_ as H,aw as F,X as I}from"./k6pa1ohq.js";import{k as v,l as h,Q as o,S as _,U as n,a5 as C,a0 as c,M as p,W as d,R as W,V as P,$ as g,a6 as x,F as b,ab as E,Y as M}from"./vendor/json-editor-vue-gi2fewby.js";import{_ as L}from"./nsection-block-cz4igj8y.js";import{_ as R}from"./help-fab.vue-eyzjjtrr.js";import"./vendor/unocss-3uirpnla.js";import"./vendor/shiki-bnvxb5wv.js";import"./nicon-title.vue-ouqsubn7.js";const Y={flex:"~ gap2","items-center":""},j={w8:"","text-right":"","text-sm":"",op25:""},z={key:0,"flex-auto":"","text-right":""},A=v({__name:"PluginItem",props:{plugin:{},index:{}},setup(m){const e=m,a=D(),l=h(()=>B(e.plugin.src,a.value?.rootDir||"").path);return(t,u)=>{const r=S,s=T,i=k;return o(),_("div",Y,[n("div",j,C(t.index),1),c(r,{filepath:e.plugin.src,subpath:!0},null,8,["filepath"]),n("div",null,[l.value.startsWith("#")?(o(),p(s,{key:0,n:"rose",textContent:"virtual"})):l.value.startsWith(".")?d("",!0):(o(),p(s,{key:1,n:"gray",textContent:"module"})),t.plugin.mode==="server"?(o(),p(s,{key:2,n:"teal",textContent:"server"})):d("",!0),t.plugin.mode==="client"?(o(),p(s,{key:3,n:"orange",textContent:"client"})):d("",!0)]),t.plugin.metric?.duration!=null?(o(),_("div",z,[c(i,{duration:t.plugin.metric?.duration,factor:10},null,8,["duration"])])):d("",!0)])}}}),Q={class:"n-tip n-tip-base",flex:"~ col items-start","mx--4":"",px4:"",py4:""},U={flex:"~ items-center gap-1","font-bold":""},X=v({__name:"HelpTip",props:{title:{},icon:{}},setup(m){return(e,a)=>{const l=V,t=W("ContentSlot");return o(),_("div",Q,[n("div",U,[e.icon?(o(),p(l,{key:0,icon:e.icon,class:"n-tip-icon"},null,8,["icon"])):d("",!0),n("div",null,C(e.title),1)]),n("div",null,[P(e.$slots,"default",{},()=>[c(t,{use:e.$slots.default,unwrap:"p"},null,8,["use"])])])])}}}),q={};function G(m,e){const a=X;return o(),p(a,{title:"Performance Tip",icon:"carbon-meter",n:"lime6 dark:lime5"},{default:g(()=>[P(m.$slots,"default")]),_:3})}const J=H(q,[["render",G]]),K={class:"markdown-body"},O={__name:"plugins",setup(m,{expose:e}){return e({frontmatter:{}}),(l,t)=>{const u=J;return o(),_("div",K,[t[1]||(t[1]=n("h1",null,"Plugins",-1)),t[2]||(t[2]=n("p",null,[x("Nuxt plugins allow you to extend the functionality of the Nuxt runtime and the Vue instance. You can add plugins to the "),n("code",null,"plugins/"),x(" directory and they will be automatically imported and registered.")],-1)),c(u,null,{default:g(()=>t[0]||(t[0]=[x(" Plugins always run before your application's runtime. The loading time of each plugin will directly impact your application's initial loading time. ")])),_:1}),t[3]||(t[3]=n("p",null,[n("a",{href:"https://nuxt.com/docs/guide/directory-structure/plugins",target:"_blank",rel:"noopener"},"Learn more in the documentation")],-1))])}}},Z={pt4:""},tt={class:"text-sm",flex:"~ gap-1 items-center justify-start","mt-3":""},pt=v({__name:"plugins",setup(m){const e=F(),a=I(),l=h(()=>{const u=e.value?.plugins||[],r=a.value?.metrics.clientPlugins()||[];return u.map(s=>{const i=typeof s=="string"?{src:s}:s;return{...i,metric:r.find(f=>f.src===i.src||f.src.startsWith(i.src))}})}),t=h(()=>{const u=a.value?.metrics.clientPlugins()||[],r=Math.min(...u.map(i=>i.start));return Math.max(...u.map(i=>i.end))-r});return(u,r)=>{const s=A,i=k,f=L,w=O,N=R;return o(),_(b,null,[c(f,{icon:"carbon-plug",text:"Plugins",description:`Total plugins: ${l.value.length}`},{default:g(()=>[n("div",Z,[(o(!0),_(b,null,E(l.value,(y,$)=>(o(),p(s,{key:y.src,plugin:y,index:$+1,"ml--4":"","border-base":"",py2:"",class:M($?"border-t":"")},null,8,["plugin","index","class"]))),128)),n("div",tt,[r[0]||(r[0]=n("div",{"i-carbon-timer":"","text-lg":"",op75:""},null,-1)),r[1]||(r[1]=n("span",{op50:""},"Total execution time:",-1)),c(i,{duration:t.value,factor:10},null,8,["duration"])])])]),_:1},8,["description"]),c(N,null,{default:g(()=>[c(w)]),_:1})],64)}}});export{pt as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{ay as m,X as d,J as c,az as f}from"./k6pa1ohq.js";import{p as _}from"./index-hgt6j2tr.js";import{k as v,S as k,u as n,M as a,$ as C,Q as o,a6 as E}from"./vendor/json-editor-vue-gi2fewby.js";import"./vendor/unocss-3uirpnla.js";import"./vendor/shiki-bnvxb5wv.js";import"./vue-virtual-scroller.esm-hx1s7s1b.js";const I={class:"h-full w-full"},w=v({__name:"render-tree",setup(x){const{connected:l}=m(),t=d(),p=c();function s(r){r?t.value.devtools.open():t.value.devtools.close()}return(r,e)=>{const i=f;return o(),k("div",I,[n(l)?(o(),a(n(_),{key:0,onOnInspectComponentStart:e[0]||(e[0]=u=>s(!1)),onOnInspectComponentEnd:e[1]||(e[1]=u=>s(!0)),onOpenInEditor:n(p)},null,8,["onOpenInEditor"])):(o(),a(i,{key:1},{default:C(()=>e[2]||(e[2]=[E(" Connecting.... ")])),_:1}))])}}});export{w as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as x}from"./state-editor.vue-
|
|
1
|
+
import{_ as x}from"./state-editor.vue-kzen94mi.js";import{_ as y}from"./nsection-block-cz4igj8y.js";import{Q as u,S as l,U as o,a6 as d,k as b,l as c,u as f,a0 as e,$ as a,W as C,F as k}from"./vendor/json-editor-vue-gi2fewby.js";import{_ as w}from"./help-fab.vue-eyzjjtrr.js";import{X as N,b3 as R}from"./k6pa1ohq.js";import"./nicon-title.vue-ouqsubn7.js";import"./vendor/unocss-3uirpnla.js";import"./vendor/shiki-bnvxb5wv.js";const T={class:"markdown-body"},$={__name:"runtime-configs",setup(_,{expose:t}){return t({frontmatter:{}}),(m,n)=>(u(),l("div",T,n[0]||(n[0]=[o("h1",null,"Runtime Configs",-1),o("p",null,"Nuxt provides a runtime config API to expose configuration within your application and server routes, with the ability to update it at runtime by setting environment variables.",-1),o("p",null,[d("In Nuxt DevTools, the editor allows you to edit the runtime config temporarily to see how the changes affect your application. To update them, you might want to update your "),o("code",null,"nuxt.config.js"),d(" file, or check more details in the documentation.")],-1),o("p",null,[o("a",{href:"https://nuxt.com/docs/guide/going-further/runtime-config",target:"_blank",rel:"noopener"},"Learn more in the documentation")],-1)])))}},B={key:0},H=b({__name:"runtime-configs",setup(_){const t=N(),p=R(),m=c(()=>t.value?.nuxt.payload),n=c(()=>t.value?.revision.value),g=c(()=>{const i={...p.value};return delete i.public,delete i.app,i});return(i,S)=>{const s=x,r=y,v=$,h=w;return u(),l(k,null,[f(t)?(u(),l("div",B,[e(r,{icon:"carbon-settings-services",text:"App Config",padding:!1},{default:a(()=>[e(s,{state:f(t).app.appConfig,revision:n.value},null,8,["state","revision"])]),_:1}),e(r,{icon:"carbon-settings",text:"Public Runtime Config",padding:!1},{default:a(()=>[e(s,{state:m.value.config?.public,revision:n.value},null,8,["state","revision"])]),_:1}),e(r,{icon:"i-carbon-code-signing-service",text:"Private Runtime Config",open:!1,padding:!1,description:"These values are not exposed to the client. Readonly in the DevTools."},{default:a(()=>[e(s,{state:g.value,revision:n.value,readonly:""},null,8,["state","revision"])]),_:1})])):C("",!0),e(h,null,{default:a(()=>[e(v)]),_:1})],64)}}});export{H as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as j}from"./ncheckbox.vue-
|
|
1
|
+
import{_ as j}from"./ncheckbox.vue-bzh5t5xo.js";import{y as O,v as R,D as T,e as A}from"./k6pa1ohq.js";import{_ as E}from"./nselect.vue-lkp6tmlx.js";import{k as L,l as N,c as M,Q as s,S as u,F as c,ab as h,V as b,M as p,W as y,Y as v,a0 as m,$ as V,U as C,a5 as z,u as r,a6 as S}from"./vendor/json-editor-vue-gi2fewby.js";const K={p4:"",flex:"~ col gap-4"},Q={key:1,ml2:"",flex:""},W=["value"],Y={key:0,flex:"","gap-4":""},X=L({__name:"ServerRouteInputs",props:{modelValue:{},keys:{default:()=>[]},default:{default:()=>({})},disabled:{type:Boolean,default:!1}},setup(U,{emit:w}){const g=U,d=O(g,"modelValue",w,{passive:!0}),_=N(()=>[...g.keys,"active","key","value","type"]),B=N(()=>{const l={};for(const e of _.value)l[e]=g.default[e]||"";return l}),D=["string","number","boolean","file","date","time","datetime-local"];function F(l,e){const t=e.target;if(t.files&&t.files[0]){const i=t.files[0],f=new FileReader;f.readAsDataURL(i),f.onload=()=>{d.value[l].value=f.result}}}return M(()=>d,l=>{l.value.forEach(e=>{if(e.type==="number"&&typeof e.value!="number"){const t=Number.parseFloat(e.value);e.value=Number.isNaN(t)?0:t}else e.type==="boolean"&&typeof e.value!="boolean"?e.value=!0:e.type==="file"&&typeof e.value!="object"?e.value="":e.type==="date"&&typeof e.value=="string"&&!e.value.match(/^\d{4}-\d{2}-\d{2}$/)?e.value=new Date().toISOString().slice(0,10):e.type==="time"&&typeof e.value=="string"&&!e.value.match(/^\d{2}:\d{2}$/)?e.value=new Date().toISOString().slice(11,16):e.type==="datetime-local"&&typeof e.value=="string"&&!e.value.match(/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}$/)?e.value=new Date().toISOString().slice(0,16):e.type==="string"&&(e.value=e.value.toString())})},{deep:!0,immediate:!0,flush:"sync"}),(l,e)=>{const t=j,i=R,f=E,I=T,k=A;return s(),u("div",K,[(s(!0),u(c,null,h(r(d),(a,$)=>(s(),u("div",{key:$,flex:"~ gap-2","justify-around":""},[b(l.$slots,"input",{item:a}),(s(!0),u(c,null,h(_.value,n=>(s(),u(c,{key:n},[a.type!==null&&n==="active"?(s(),p(t,{key:0,modelValue:a[n],"onUpdate:modelValue":o=>a[n]=o,n:"sm primary",disabled:l.disabled},null,8,["modelValue","onUpdate:modelValue","disabled"])):y("",!0),a.type!==null&&n==="key"?(s(),p(i,{key:1,modelValue:a[n],"onUpdate:modelValue":o=>a[n]=o,placeholder:n,"flex-1":"","font-mono":"",n:"sm primary",disabled:l.disabled,class:v(l.disabled?"op50":"")},null,8,["modelValue","onUpdate:modelValue","placeholder","disabled","class"])):n==="value"?(s(),u(c,{key:2},[a.type==="file"?(s(),p(i,{key:0,type:"file",disabled:l.disabled,class:v(l.disabled?"op75":""),onChange:o=>F($,o)},null,8,["disabled","class","onChange"])):a.type==="boolean"?(s(),u("div",Q,[m(t,{modelValue:a.value,"onUpdate:modelValue":o=>a.value=o,placeholder:"Value",n:"green lg",disabled:l.disabled},null,8,["modelValue","onUpdate:modelValue","disabled"])])):(s(),p(i,{key:2,modelValue:a.value,"onUpdate:modelValue":o=>a.value=o,type:a.type,placeholder:"Value","flex-1":"","font-mono":"",n:"sm primary",disabled:l.disabled,class:v(l.disabled?"op75":"")},null,8,["modelValue","onUpdate:modelValue","type","disabled","class"]))],64)):n==="type"?(s(),p(f,{key:3,modelValue:a.type,"onUpdate:modelValue":o=>a.type=o,n:"sm green",class:v(l.disabled?"op75":""),disabled:l.disabled},{default:V(()=>[(s(),u(c,null,h(D,o=>C("option",{key:o,value:o},z(o),9,W)),64))]),_:2},1032,["modelValue","onUpdate:modelValue","class","disabled"])):y("",!0)],64))),128)),b(l.$slots,"input-actions",{},()=>[m(k,{n:"red",disabled:l.disabled,class:v(l.disabled?"op0!":""),onClick:n=>r(d).splice($,1)},{default:V(()=>[m(I,{icon:"carbon:trash-can"})]),_:2},1032,["disabled","class","onClick"])])]))),128)),l.disabled?y("",!0):(s(),u("div",Y,[b(l.$slots,"actions",{params:r(d)},()=>[m(k,{icon:"carbon-add",n:"sm primary",my1:"","px-3":"",onClick:e[0]||(e[0]=a=>r(d).push({...B.value}))},{default:V(()=>e[2]||(e[2]=[S(" Add ")])),_:1}),e[4]||(e[4]=C("div",{"flex-auto":""},null,-1)),r(d).length?(s(),p(k,{key:0,icon:"carbon-trash-can",n:"sm red",my1:"","px-3":"",onClick:e[1]||(e[1]=a=>r(d).splice(0,r(d).length))},{default:V(()=>e[3]||(e[3]=[S(" Remove All ")])),_:1})):y("",!0)])])),b(l.$slots,"default")])}}});export{X as _};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import{b4 as $e,b5 as le,D as Ee,b6 as Ge,b7 as Ke,P as Qe,H as Xe,X as Ye,J as Ze,b as De,ag as et,b8 as tt,I as ot,q as nt,e as Re,v as at,c as Ve,az as st,b9 as lt,M as rt,p as it,T as ut}from"./k6pa1ohq.js";import{_ as dt}from"./nnavbar.vue-fcbubuy5.js";import{_ as je}from"./nbadge-iwzd40zm.js";import{k as ye,b as L,Q as r,S as k,U as i,Y as M,M as $,u as b,a5 as U,W as P,a6 as K,X as ct,V as pt,F as N,ab as J,B as me,c as Ie,g as Ue,C as ft,n as vt,r as ve,l as V,w as mt,ae as Oe,$ as C,a0 as v,a8 as Z,a1 as yt,av as ht,K as gt}from"./vendor/json-editor-vue-gi2fewby.js";import{_ as bt}from"./nselect.vue-lkp6tmlx.js";import{_ as Ne}from"./server-route-inputs.vue-kkkjmlpr.js";import{_ as _t}from"./code-snippets.vue-kbs96pi0.js";import{_ as kt}from"./ncode-block.vue-gy1ero5j.js";import{d as wt}from"./vendor/unocss-3uirpnla.js";import{C as xe,S as Le}from"./constants-b32h69zq.js";import{_ as xt}from"./nsection-block-cz4igj8y.js";import{_ as Ct}from"./ndrawer.vue-dih2d0ci.js";import"./vendor/shiki-bnvxb5wv.js";import"./ncheckbox.vue-bzh5t5xo.js";import"./client-c9f80qsp.js";import"./nicon-title.vue-ouqsubn7.js";function St(e,l){if(typeof e!="string")throw new TypeError("argument str must be a string");const n={},o=l||{},y=o.decode||Tt;let f=0;for(;f<e.length;){const d=e.indexOf("=",f);if(d===-1)break;let m=e.indexOf(";",f);if(m===-1)m=e.length;else if(m<d){f=e.lastIndexOf(";",d-1)+1;continue}const g=e.slice(f,d).trim();if(o?.filter&&!o?.filter(g)){f=m+1;continue}if(n[g]===void 0){let u=e.slice(d+1,m).trim();u.codePointAt(0)===34&&(u=u.slice(1,-1)),n[g]=$t(u,y)}f=m+1}return n}function Tt(e){return e.includes("%")?decodeURIComponent(e):e}function $t(e,l){try{return l(e)}catch{return e}}const ae=/^[\u0009\u0020-\u007E\u0080-\u00FF]+$/;function Ce(e,l,n){const o=n||{},y=o.encode||encodeURIComponent;if(typeof y!="function")throw new TypeError("option encode is invalid");if(!ae.test(e))throw new TypeError("argument name is invalid");const f=y(l);if(f&&!ae.test(f))throw new TypeError("argument val is invalid");let d=e+"="+f;if(o.maxAge!==void 0&&o.maxAge!==null){const m=o.maxAge-0;if(Number.isNaN(m)||!Number.isFinite(m))throw new TypeError("option maxAge is invalid");d+="; Max-Age="+Math.floor(m)}if(o.domain){if(!ae.test(o.domain))throw new TypeError("option domain is invalid");d+="; Domain="+o.domain}if(o.path){if(!ae.test(o.path))throw new TypeError("option path is invalid");d+="; Path="+o.path}if(o.expires){if(!Et(o.expires)||Number.isNaN(o.expires.valueOf()))throw new TypeError("option expires is invalid");d+="; Expires="+o.expires.toUTCString()}if(o.httpOnly&&(d+="; HttpOnly"),o.secure&&(d+="; Secure"),o.priority)switch(typeof o.priority=="string"?o.priority.toLowerCase():o.priority){case"low":{d+="; Priority=Low";break}case"medium":{d+="; Priority=Medium";break}case"high":{d+="; Priority=High";break}default:throw new TypeError("option priority is invalid")}if(o.sameSite)switch(typeof o.sameSite=="string"?o.sameSite.toLowerCase():o.sameSite){case!0:{d+="; SameSite=Strict";break}case"lax":{d+="; SameSite=Lax";break}case"strict":{d+="; SameSite=Strict";break}case"none":{d+="; SameSite=None";break}default:throw new TypeError("option sameSite is invalid")}return o.partitioned&&(d+="; Partitioned"),d}function Et(e){return Object.prototype.toString.call(e)==="[object Date]"||e instanceof Date}const Pe=ye({__name:"ServerRouteListItem",props:{item:{},index:{default:0}},setup(e){const l=L(!0),n=$e();return(o,y)=>{const f=Ee,d=je,m=Pe;return r(),k("div",null,[i("button",{flex:"~ gap-2","w-full":"","items-start":"","items-center":"","hover-bg-active":"",px2:"",py1:"",class:M([{"bg-active":b(n)===o.item.filepath}]),style:ct({paddingLeft:`calc(0.5rem + ${o.index*1.5}em)`}),onClick:y[0]||(y[0]=g=>{l.value=!l.value,n.value=o.item.filepath})},[i("div",{class:M({"w-12":!o.item.routes}),"flex-none":"","text-left":""},[o.item.type==="collection"?(r(),$(f,{key:0,icon:"carbon:chevron-right","mb0.5":"","transform-rotate":l.value?90:0,transition:""},null,8,["transform-rotate"])):(r(),$(d,{key:1,class:M(b(le)(o.item.method||"*")),textContent:U((o.item.method||"*").toUpperCase())},null,8,["class","textContent"]))],2),i("span",{class:M({"flex items-center":o.item.routes}),"text-sm":"","font-mono":""},[o.item.type==="collection"?(r(),$(f,{key:0,title:`${o.item.routes?.length} routes`,icon:"carbon:folder",mr1:""},null,8,["title"])):P("",!0),K(" "+U(o.item.route),1)],2)],6),y[1]||(y[1]=i("div",{"x-divider":""},null,-1)),l.value?pt(o.$slots,"default",{key:0},()=>[(r(!0),k(N,null,J(o.item.routes,g=>(r(),$(m,{key:g.filepath,item:g,index:o.index+1},null,8,["item","index"]))),128))]):P("",!0)])}}});function B(e){if(typeof e!="object")return e;var l,n,o=Object.prototype.toString.call(e);if(o==="[object Object]"){if(e.constructor!==Object&&typeof e.constructor=="function"){n=new e.constructor;for(l in e)e.hasOwnProperty(l)&&n[l]!==e[l]&&(n[l]=B(e[l]))}else{n={};for(l in e)l==="__proto__"?Object.defineProperty(n,l,{value:B(e[l]),configurable:!0,enumerable:!0,writable:!0}):n[l]=B(e[l])}return n}if(o==="[object Array]"){for(l=e.length,n=Array(l);l--;)n[l]=B(e[l]);return n}return o==="[object Set]"?(n=new Set,e.forEach(function(y){n.add(B(y))}),n):o==="[object Map]"?(n=new Map,e.forEach(function(y,f){n.set(B(f),B(y))}),n):o==="[object Date]"?new Date(+e):o==="[object RegExp]"?(n=new RegExp(e.source,e.flags),n.lastIndex=e.lastIndex,n):o==="[object DataView]"?new e.constructor(B(e.buffer)):o==="[object ArrayBuffer]"?e.slice(0):o.slice(-6)==="Array]"?new e.constructor(e):e}const Dt={path:"/",watch:!0,decode:e=>wt(decodeURIComponent(e)),encode:e=>encodeURIComponent(typeof e=="string"?e:JSON.stringify(e))},se=window.cookieStore;function Rt(e,l){const n={...Dt,...l};n.filter??=g=>g===e;const o=Se(n)||{};let y;n.maxAge!==void 0?y=n.maxAge*1e3:n.expires&&(y=n.expires.getTime()-Date.now());const f=y!==void 0&&y<=0,d=B(f?void 0:o[e]??n.default?.()),m=y&&!f?It(d,y,n.watch&&n.watch!=="shallow"):L(d);{let g=null;try{!se&&typeof BroadcastChannel<"u"&&(g=new BroadcastChannel(`nuxt:cookies:${e}`))}catch{}const u=()=>{n.readonly||Ge(m.value,o[e])||(jt(e,m.value,n),o[e]=B(m.value),g?.postMessage({value:n.encode(m.value)}))},E=A=>{const S=A.refresh?Se(n)?.[e]:n.decode(A.value);I=!0,m.value=S,o[e]=B(S),vt(()=>{I=!1})};let I=!1;const F=!!Ue();if(F&&me(()=>{I=!0,u(),g?.close()}),se){const A=S=>{const _=S.changed.find(h=>h.name===e),O=S.deleted.find(h=>h.name===e);_&&E({value:_.value}),O&&E({value:null})};se.addEventListener("change",A),F&&me(()=>se.removeEventListener("change",A))}else g&&(g.onmessage=({data:A})=>E(A));n.watch?Ie(m,()=>{I||u()},{deep:n.watch!=="shallow"}):u()}return m}function Se(e={}){return St(document.cookie,e)}function Vt(e,l,n={}){return l==null?Ce(e,l,{...n,maxAge:-1}):Ce(e,l,n)}function jt(e,l,n={}){document.cookie=Vt(e,l,n)}const Te=2147483647;function It(e,l,n){let o,y,f=0;const d=n?L(e):{value:e};return Ue()&&me(()=>{y?.(),clearTimeout(o)}),ft((m,g)=>{n&&(y=Ie(d,g));function u(){f=0,clearTimeout(o);const E=l-f,I=E<Te?E:Te;o=setTimeout(()=>{if(f+=I,f<l)return u();d.value=void 0,g()},I)}return{get(){return m(),d.value},set(E){u(),d.value=E,g()}}})}const Ut={"h-full":"","w-full":"",flex:"~ col"},Ot={flex:"~ col gap-2","flex-none":"",p4:"","n-navbar-glass":""},Nt={flex:"~ gap2 items-center"},Lt={relative:"","w-full":""},Pt={absolute:"","right-2":"","top-1.5":"",flex:"~ gap-1"},At={flex:"~ gap2 wrap","w-full":"","items-center":"",px4:"",pb2:"","text-center":"","text-sm":"",border:"b base"},Bt={class:"hidden md:block"},qt={key:0,border:"b base","items-center":"",px4:"",py2:"",grid:"~ cols-[max-content_1fr] gap-2"},Mt={"text-right":"","font-mono":""},Ft={key:1,border:"b base",p4:"",flex:"~ col gap-4","font-mono":""},Ht={flex:"~ gap-4"},zt={flex:"~ gap2","mb--2":"","items-center":"",op50:""},Jt={key:2},Wt={key:3,border:"b base",relative:"","n-code-block":""},Gt={flex:"~ wrap","w-full":""},Kt=["onClick"],Qt={border:"b base",flex:"~ gap2","items-center":"",px4:"",py2:""},Xt={key:1,"text-xs":"",op50:""},Yt={key:0,"flex-auto":"","overflow-auto":""},Zt={border:"~ base","h-full":"","w-full":"",rounded:""},eo=["data"],to={key:2,"flex-auto":"","overflow-auto":"",p4:""},oo={border:"~ base",rounded:""},no=["src"],ao={key:1,controls:"",rounded:""},so=["src"],lo=ye({__name:"ServerRouteDetails",props:{route:{}},emits:["openDefaultInput"],setup(e,{emit:l}){const n=e,o=l,[y,f]=Ke(),d=Qe(),m=Xe(),g=Ye(),u=ve({contentType:"text/plain",data:"",statusCode:200,error:void 0,fetchTime:0}),E=V(()=>u.contentType.includes("application/json")?"json":u.contentType.includes("text/html")?"html":u.contentType.includes("text/css")?"css":u.contentType.includes("text/javascript")?"javascript":u.contentType.includes("image")||u.contentType.includes("video")?"media":u.contentType.includes("text/xml")||u.contentType.includes("application/xml")?"xml":u.contentType.includes("application/pdf")?"pdf":"text"),I=V(()=>{if(E.value==="json")return JSON.stringify(u.data,null,2);if(E.value==="media"||E.value==="pdf"){const a=new Blob([u.data],{type:u.contentType});return URL.createObjectURL(a)}return u.data}),F=L(!1),A=L(!1),S=Ze(),_=V(()=>n.route.route?.split(/((?:\*\*)?:\w+)/g)),O=V(()=>_.value?.filter(a=>a.startsWith(":")||a.startsWith("**:"))||[]),h=L(n.route.method||"GET"),D=L({}),w=ve({query:[{active:!0,key:"",value:"",type:"string"}],body:[{active:!0,key:"",value:"",type:"string"}],headers:[{active:!0,key:"Content-Type",value:"application/json",type:"string"}]}),j=L({}),{inputDefaults:x,sendFrom:H}=De("serverRoutes"),Q=V(()=>g?.value?.app?.$fetch?H.value:"devtools"),re=["GET","POST","PUT","PATCH","DELETE","HEAD"],ie=["PATCH","POST","PUT","DELETE"],ee=V(()=>ie.includes(h.value.toUpperCase())),c=L(),te=["input","json"],W=L(te[0]),ue=V({get:()=>w[c.value],set:a=>{w[c.value]=a}}),he=V(()=>({...G(x.value.query),...G(w.query)})),ge=V(()=>({...G(x.value.headers),...G(w.headers)})),de=V(()=>ee.value?W.value==="json"?{...G(x.value.body),...j.value}:{...G(x.value.body),...G(w.body)}:void 0),Ae=V(()=>{let a=window?.location.origin;return a.charAt(a.length-1)==="/"&&(a=a.slice(0,-1)),a}),oe=V(()=>{let a=new URLSearchParams(he.value).toString();a&&(a=`?${a}`);const t=(_.value?.map(R=>(R.startsWith(":")||R.startsWith("**:"))&&D.value[R]||R).join("")||"")+a;let p=m.value?.app.baseURL||"";return(p==="./"||p===".")&&(p=""),p.endsWith("/")&&(p=p.slice(0,-1)),p+t}),be=V(()=>Ae.value+oe.value);function G(a){const t=Object.fromEntries(a.filter(({active:p,key:R,value:T})=>p&&R&&T!==void 0).map(({key:p,value:R})=>[p,R]));return Object.entries(t).length?t:void 0}async function _e(){A.value=!0,F.value=!0;const a=Date.now(),t=Q.value==="app"?g.value.app.$fetch:$fetch;nt("server-routes:fetch",{method:h.value,sendFrom:Q.value});try{u.data=await t(be.value,{method:h.value.toUpperCase(),headers:ge.value,query:he.value,body:de.value,onResponse({response:p}){u.contentType=(p.headers.get("content-type")||"").toString().toLowerCase().trim(),u.statusCode=p.status,u.error=void 0},onResponseError(p){u.error=p.response._data,u.data=p.response._data}})}catch{}F.value=!1,u.fetchTime=Date.now()-a}const ke=V(()=>{const a=[],t=[],p=Object.entries(ge.value).filter(([T,q])=>T&&q&&!(T==="Content-Type"&&q==="application/json")).map(([T,q])=>` '${T}': '${q}'`).join(`,
|
|
2
|
+
`);h.value.toUpperCase()!=="GET"&&t.push(`method: '${h.value.toUpperCase()}'`),p&&t.push(`headers: {
|
|
3
|
+
${p}
|
|
4
|
+
}`),de.value&&t.push(`body: ${JSON.stringify(de.value,null,2)}`);const R=t.length?`, {
|
|
5
|
+
${t.join(`,
|
|
6
|
+
`).split(`
|
|
7
|
+
`).map(T=>` ${T}`).join(`
|
|
8
|
+
`)}
|
|
9
|
+
}`:"";return a.push({name:"useFetch",lang:"javascript",docs:xe.nuxt.useFetch,code:`const { data, pending, error, refresh } = useFetch('${oe.value}'${R})`}),a.push({name:"$fetch",lang:"javascript",docs:xe.nuxt.$fetch,code:`await $fetch('${oe.value}'${R})`}),a}),X=L(qe()),z=ve({key:"",value:""}),Be=V(()=>{const a=[];return O.value.length&&a.push({name:"Params",slug:"params",length:O.value.length}),a.push({name:"Query",slug:"query",length:w.query.length}),ee.value&&a.push({name:"Body",slug:"body",length:w.body.length}),a.push({name:"Headers",slug:"headers",length:w.headers.length}),a.push({name:"Cookies",slug:"cookies",length:X.value.length}),a.push({name:"Snippets",slug:"snippet"}),a});function qe(){return document.cookie.split("; ").map(a=>{const[t,p]=a.split("=");return{key:t,value:p}}).filter(a=>a.key)}function ce(a,t){if(!a)return;const p=X.value.find(T=>T.key===a),R=Rt(a);p!==void 0?t===void 0&&(X.value=X.value.filter(T=>T.key!==a)):(X.value.push({key:a,value:t}),z.key="",z.value=""),R.value=t}mt(()=>{W.value==="json"&&typeof j.value=="string"&&(j.value=JSON.parse(j.value))});const pe=et("nuxt-devtools:server-routes:inputs",()=>[],{window:window.parent});tt([w,c],()=>{const a=pe.value?.find(t=>t.path===n.route.filepath);if(a){c.value||(c.value=a.tab),a.tab!==c.value&&(a.tab=c.value);const{body:t,query:p,headers:R,params:T}=a.inputs;Object.assign(w,{body:t,query:p,headers:R}),D.value=T}else{const t={path:n.route.filepath,tab:O.value.length?"params":"query",inputs:{...w,...O.value.length?{params:D.value}:{}}};pe.value.push(t),c.value||(c.value=t.tab)}},{immediate:!0,deep:!0,debounce:500});function Me(){pe.value=[],w.body=[],w.query=[],w.headers=[],D.value={},c.value=O.value.length?"params":"query"}const Fe=ot();return(a,t)=>{const p=Re,R=bt,T=at,q=Ee,we=Ne,He=_t,ze=Ve,Je=st,fe=je,We=kt,ne=Oe("tooltip");return r(),k("div",Ut,[i("div",Ot,[i("div",Nt,[a.route.method?(r(),$(p,{key:0,class:M(["n-badge-base n-sm",b(le)(h.value)]),"pointer-events-none":"","font-mono":"",tabindex:"-1"},{default:C(()=>[K(U(h.value.toUpperCase()),1)]),_:1},8,["class"])):(r(),$(R,{key:1,modelValue:h.value,"onUpdate:modelValue":t[0]||(t[0]=s=>h.value=s),class:M(["n-badge-base n-sm",b(le)(h.value)])},{default:C(()=>[(r(),k(N,null,J(re,s=>i("option",{key:s,class:M(b(le)(s))},U(s.toUpperCase()),3)),64))]),_:1},8,["modelValue","class"])),i("div",Lt,[v(T,{"model-value":oe.value,readonly:"","flex-auto":"","font-mono":"",p:"x5 y2",n:"sm"},null,8,["model-value"]),i("div",Pt,[Z(v(p,{title:"Copy URL",n:"xs blue",icon:"carbon:copy",border:!1,onClick:t[1]||(t[1]=s=>b(Fe)(be.value,"server-route-url"))},null,512),[[ne,"Copy URL"]]),Z(v(p,{title:"Open in Editor",icon:"carbon-launch",n:"xs blue",border:!1,onClick:t[2]||(t[2]=s=>b(S)(a.route.filepath))},null,512),[[ne,"Open in Editor"]])])]),v(p,{"h-full":"",n:"primary solid",onClick:_e},{default:C(()=>[v(q,{icon:"carbon:send"})]),_:1})])]),i("div",At,[(r(!0),k(N,null,J(Be.value,s=>Z((r(),$(p,{key:s.slug,class:M(c.value===s.slug?"text-primary n-primary":"border-transparent shadow-none"),onClick:Y=>c.value=s.slug},{default:C(()=>[v(q,{icon:b(Le)[s.slug]},null,8,["icon"]),i("div",Bt,[K(U(s.name)+" "+U(s?.length?`(${s.length})`:"")+" ",1),i("span",null,U(b(x)[s.slug]?.length?`(${b(x)[s.slug].length})`:""),1)])]),_:2},1032,["class","onClick"])),[[ne,s.name]])),128)),t[12]||(t[12]=i("div",{"flex-auto":""},null,-1)),t[13]||(t[13]=i("div",{"text-xs":"",op50:""}," Send from ",-1)),v(R,{modelValue:Q.value,"onUpdate:modelValue":t[3]||(t[3]=s=>Q.value=s),class:"n-xs",disabled:!b(g)?.app?.$fetch},{default:C(()=>t[11]||(t[11]=[i("option",{value:"app"}," App ",-1),i("option",{value:"devtools"}," DevTools ",-1)])),_:1},8,["modelValue","disabled"]),Z(v(p,{n:"orange",class:"p-3",icon:"i-carbon-clean",onClick:Me},null,512),[[ne,"Clear Inputs Saved Cache"]])]),c.value==="params"?(r(),k("div",qt,[(r(!0),k(N,null,J(O.value,s=>(r(),k(N,{key:s},[i("div",Mt,U(s),1),v(T,{modelValue:D.value[s],"onUpdate:modelValue":Y=>D.value[s]=Y,placeholder:s,"flex-1":""},null,8,["modelValue","onUpdate:modelValue","placeholder"])],64))),128))])):P("",!0),c.value==="cookies"?(r(),k("div",Ft,[(r(!0),k(N,null,J(X.value,s=>(r(),k("div",{key:s.key,flex:"~ gap-4 items-center"},[v(T,{placeholder:"Key...","model-value":s.key,disabled:"","op-70":""},null,8,["model-value"]),v(T,{placeholder:"Value...","model-value":s.value,"flex-1":"",n:"primary",onInput:Y=>ce(s.key,Y.target?.value)},null,8,["model-value","onInput"]),v(p,{title:"Delete",n:"red",onClick:Y=>ce(s.key,void 0)},{default:C(()=>[v(q,{icon:"i-carbon-trash-can"})]),_:2},1032,["onClick"])]))),128)),i("div",Ht,[v(T,{modelValue:z.key,"onUpdate:modelValue":t[4]||(t[4]=s=>z.key=s),placeholder:"Key",n:"primary","flex-1":""},null,8,["modelValue"]),v(T,{modelValue:z.value,"onUpdate:modelValue":t[5]||(t[5]=s=>z.value=s),placeholder:"Value",n:"primary","flex-1":""},null,8,["modelValue"]),v(p,{title:"Add",n:"primary",onClick:t[6]||(t[6]=s=>ce(z.key,z.value))},{default:C(()=>[v(q,{icon:"i-carbon-save"})]),_:1})])])):P("",!0),v(b(y),null,{default:C(()=>[v(we,{modelValue:ue.value,"onUpdate:modelValue":t[9]||(t[9]=s=>ue.value=s),default:{active:!0,type:"string"},"max-h-xs":"","of-auto":""},{default:C(()=>[b(x)[c.value]?.length?(r(),k(N,{key:0},[i("div",zt,[t[14]||(t[14]=i("div",{"w-5":"","x-divider":""},null,-1)),t[15]||(t[15]=i("div",{"flex-none":""}," Default Inputs ",-1)),v(p,{icon:"i-carbon-edit",border:!1,onClick:t[7]||(t[7]=s=>o("openDefaultInput"))}),t[16]||(t[16]=i("div",{"x-divider":""},null,-1))]),v(we,{modelValue:b(x)[c.value],"onUpdate:modelValue":t[8]||(t[8]=s=>b(x)[c.value]=s),disabled:"",p0:""},null,8,["modelValue"])],64)):P("",!0)]),_:1},8,["modelValue"])]),_:1}),c.value==="snippet"?(r(),k("div",Jt,[ke.value.length?(r(),$(He,{key:0,"code-snippets":ke.value},null,8,["code-snippets"])):P("",!0)])):ue.value?(r(),k("div",Wt,[c.value==="body"?(r(),k(N,{key:0},[i("div",Gt,[(r(),k(N,null,J(te,s=>i("button",{key:s,px4:"",py2:"",border:"r base",hover:"bg-active",class:M({"border-b":s!==W.value}),onClick:Y=>W.value=s},[i("div",{class:M({op30:s!==W.value}),"font-mono":""},U(s),3)],10,Kt)),64)),t[17]||(t[17]=i("div",{border:"b base","flex-auto":""},null,-1))]),W.value==="input"?(r(),$(b(f),{key:0})):W.value==="json"?(r(),$(b(ht),yt({key:1,modelValue:j.value,"onUpdate:modelValue":t[10]||(t[10]=s=>j.value=s),class:[b(d)==="dark"?"jse-theme-dark":"light","json-editor-vue of-auto text-sm outline-none"]},a.$attrs,{mode:"text","navigation-bar":!1,indentation:2,"tab-size":2}),null,16,["modelValue","class"])):P("",!0)],64)):(r(),$(b(f),{key:1}))])):P("",!0),A.value?F.value?(r(),$(Je,{key:5,"z-10":"","flex-auto":"","backdrop-blur":""},{default:C(()=>t[19]||(t[19]=[K(" Fetching... ")])),_:1})):(r(),k(N,{key:6},[i("div",Qt,[t[21]||(t[21]=i("div",null,"Response",-1)),u.error?(r(),$(fe,{key:0,n:"red"},{default:C(()=>t[20]||(t[20]=[K(" Error ")])),_:1})):P("",!0),v(fe,{n:u.error?"orange":"green",textContent:U(u.statusCode)},null,8,["n","textContent"]),u.contentType?(r(),k("code",Xt,U(u.contentType),1)):P("",!0),t[22]||(t[22]=i("div",{"flex-auto":""},null,-1)),t[23]||(t[23]=i("div",{op50:""}," Request finished in ",-1)),v(fe,{n:"green"},{default:C(()=>[K(U(u.fetchTime)+" ms ",1)]),_:1})]),E.value==="pdf"?(r(),k("div",Yt,[i("div",Zt,[i("object",{data:I.value,type:"application/pdf","flex-auto":"",width:"100%",height:"100%",rounded:""},null,8,eo)])])):E.value!=="media"?(r(),$(We,{key:1,"flex-auto":"","overflow-auto":"","py-2":"",code:I.value,lang:E.value},null,8,["code","lang"])):(r(),k("div",to,[i("div",oo,[u.contentType.includes("image")?(r(),k("img",{key:0,rounded:"",src:I.value},null,8,no)):(r(),k("video",ao,[i("source",{src:I.value,type:"video/mp4"},null,8,so)]))])]))],64)):(r(),$(ze,{key:4},{default:C(()=>[v(p,{n:"primary",onClick:_e},{default:C(()=>[v(q,{icon:"carbon:send"}),t[18]||(t[18]=K(" Send request "))]),_:1})]),_:1}))])}}}),ro={flex:"~ gap1","text-sm":""},io={key:0,op50:""},uo={op50:""},$o=ye({__name:"server-routes",setup(e){const l=L(!1),n=lt(),o=$e(),{selectedRoute:y,view:f,inputDefaults:d}=De("serverRoutes"),m=V(()=>{!o.value&&y.value&&(o.value=y.value.filepath);const S=n.value?.find(_=>_.filepath===o.value);return o.value!==y.value?.filepath&&S&&(y.value=S),S}),g=L(""),u=V(()=>new rt(n.value||[],{keys:["method","route"],shouldSort:!0})),E=V(()=>n.value?g.value?u.value.search(g.value).map(_=>_.item):n.value:[]),I=V(()=>{const S=[],_=(h,D)=>{h.routes=h.routes||[],h.routes.push(D)},O=(h,D)=>{const w=D?D.routes?.find(x=>x.route===h):S.find(x=>x.route===h);if(w)return w;const j={route:h,filepath:h.replace(/\W/g,"-").toLowerCase(),type:"collection",routes:[]};return D?_(D,j):S.push(j),j};return E.value.forEach(h=>{let D,w;const j=h.filepath.split("/"),x=j.slice(j.indexOf("server")+1);if(h.type==="runtime"){x[0]="runtime";const H=j.indexOf("dist");H!==-1&&(D=j[H-1],D&&x.splice(1,0,D))}x.length>0&&x[x.length-1].includes(".")&&x.pop(),x.forEach(H=>{w=O(H,w)}),w?_(w,h):S.push(h)}),S});function F(){f.value=f.value==="tree"?"list":"tree"}function A(S){return S.charAt(0).toUpperCase()+S.slice(1)}return(S,_)=>{const O=Re,h=dt,D=Pe,w=lo,j=ut,x=Ve,H=it,Q=Ne,re=xt,ie=Ct,ee=Oe("tooltip");return r(),k(N,null,[v(H,{"storage-key":"tab-server-routes"},{left:C(()=>[v(h,{search:g.value,"onUpdate:search":_[1]||(_[1]=c=>g.value=c),pb2:""},{actions:C(()=>[Z(v(O,{"text-lg":"",icon:b(f)==="list"?"i-carbon-list":"i-carbon-tree-view-alt",title:"Toggle view",border:!1,onClick:F},null,8,["icon"]),[[ee,"Toggle View"]]),Z(v(O,{"text-lg":"",icon:"i-carbon-cics-sit-overrides",title:"Default Inputs",border:!1,onClick:_[0]||(_[0]=c=>l.value=!l.value)},null,512),[[ee,"Default Inputs"]])]),default:C(()=>[i("div",ro,[g.value?(r(),k("span",io,U(E.value.length)+" matched · ",1)):P("",!0),i("span",uo,U(b(n)?.length)+" routes in total",1)])]),_:1},8,["search"]),(r(!0),k(N,null,J(b(f)==="tree"?I.value:E.value,c=>(r(),$(D,{key:c.filepath,item:c},null,8,["item"]))),128))]),right:C(()=>[(r(),$(gt,{max:10},[m.value?(r(),$(w,{key:m.value.filepath,route:m.value,onOpenDefaultInput:_[2]||(_[2]=c=>l.value=!0)},null,8,["route"])):P("",!0)],1024)),m.value?P("",!0):(r(),$(x,{key:0},{default:C(()=>[v(j,{px6:"",py2:""},{default:C(()=>_[5]||(_[5]=[i("span",{op75:""},"Select a route to start",-1)])),_:1})]),_:1}))]),_:1}),v(ie,{modelValue:l.value,"onUpdate:modelValue":_[3]||(_[3]=c=>l.value=c),"auto-close":"","max-w-xl":"","min-w-xl":"",onClose:_[4]||(_[4]=c=>l.value=!1)},{default:C(()=>[i("div",null,[_[6]||(_[6]=i("div",{p4:"",border:"b base"},[i("span",{"text-lg":""},"Default Inputs"),i("br"),i("span",{"text-white":"",op50:""},"Merged as default for every request in DevTools")],-1)),(r(!0),k(N,null,J(Object.keys(b(d)),c=>(r(),$(re,{key:c,text:`${A(c)} ${b(d)[c].length?`(${b(d)[c].length})`:""}`,padding:!1,icon:b(Le)[c]},{default:C(()=>[v(Q,{modelValue:b(d)[c],"onUpdate:modelValue":te=>b(d)[c]=te,py0:"",default:{active:!0,type:"string"}},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["text","icon"]))),128))])]),_:1},8,["modelValue"])],64)}}});export{$o as default};
|