@nuxt/devtools 0.7.3 → 0.7.5
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 +3 -3
- package/dist/chunks/vscode.mjs +1 -1
- package/dist/client/200.html +2 -2
- package/dist/client/404.html +2 -2
- package/dist/client/__blank/index.html +2 -2
- package/dist/client/_nuxt/Badge.809c442f.js +1 -0
- package/dist/client/_nuxt/{CodeDiff.vue.0fc21e08.js → CodeDiff.vue.1cd1f35a.js} +1 -1
- package/dist/client/_nuxt/CodeSnippets.vue.e2cc365d.js +1 -0
- package/dist/client/_nuxt/ComposableItem.vue.a490c449.js +1 -0
- package/dist/client/_nuxt/DataSchemaButton.vue.31fe918d.js +1 -0
- package/dist/client/_nuxt/DataSchemaDrawer.7a8538ed.js +998 -0
- package/dist/client/_nuxt/DrawerRight.vue.3bbd0e76.js +1 -0
- package/dist/client/_nuxt/{DurationDisplay.vue.ae436800.js → DurationDisplay.vue.1533a045.js} +1 -1
- package/dist/client/_nuxt/FilepathItem.vue.a9853d6c.js +1 -0
- package/dist/client/_nuxt/HelpFab.vue.5d67494b.js +1 -0
- package/dist/client/_nuxt/LaunchPage.vue.304a6918.js +1 -0
- package/dist/client/_nuxt/NCheckbox.vue.76b79ec0.js +1 -0
- package/dist/client/_nuxt/{NCodeBlock.cf3ce05b.css → NCodeBlock.6994516c.css} +1 -1
- package/dist/client/_nuxt/NCodeBlock.vue.a8601f10.js +2 -0
- package/dist/client/_nuxt/NDropdown.vue.c183f72d.js +1 -0
- package/dist/client/_nuxt/NIconTitle.vue.e492e44a.js +1 -0
- package/dist/client/_nuxt/NLink.vue.e00535a9.js +1 -0
- package/dist/client/_nuxt/{NMarkdown.vue.5af3ba6b.js → NMarkdown.vue.7d7a1e6e.js} +1 -1
- package/dist/client/_nuxt/NSectionBlock.6778ba18.js +1 -0
- package/dist/client/_nuxt/NSelect.vue.6e592a84.js +1 -0
- package/dist/client/_nuxt/NSwitch.vue.855c3f98.js +1 -0
- package/dist/client/_nuxt/NTip.vue.6bf7cf97.js +1 -0
- package/dist/client/_nuxt/Navbar.vue.c8f5ea35.js +1 -0
- package/dist/client/_nuxt/StateEditor.vue.082de4fa.js +1 -0
- package/dist/client/_nuxt/__blank.8beed58c.js +1 -0
- package/dist/client/_nuxt/analyze-build.88782d48.js +1 -0
- package/dist/client/_nuxt/assets.dec2c564.js +16 -0
- package/dist/client/_nuxt/{client.1d68892a.js → client.fbe3eaa6.js} +1 -1
- package/dist/client/_nuxt/{components.705d48d8.js → components.99398ea7.js} +28 -28
- package/dist/client/_nuxt/custom-_name_.53810490.js +1 -0
- package/dist/client/_nuxt/default.2ae1a40e.js +1 -0
- package/dist/client/_nuxt/entry.6293ec9a.css +1 -0
- package/dist/client/_nuxt/entry.704683a1.js +21 -0
- package/dist/client/_nuxt/{error-404.82a24486.js → error-404.bde0cadd.js} +1 -1
- package/dist/client/_nuxt/{error-500.540bdb82.js → error-500.524ae368.js} +1 -1
- package/dist/client/_nuxt/full.6451054a.js +1 -0
- package/dist/client/_nuxt/hooks.d1ff16ee.js +1 -0
- package/dist/client/_nuxt/imports.9142e1cd.js +1 -0
- package/dist/client/_nuxt/index.2ab6466f.js +1 -0
- package/dist/client/_nuxt/{index.0a4e7275.js → index.ef0631d4.js} +2 -2
- package/dist/client/_nuxt/{json-editor-vue.f57c50c1.js → json-editor-vue.d2d6ca22.js} +1 -1
- package/dist/client/_nuxt/middleware.c86c494b.js +1 -0
- package/dist/client/_nuxt/modules.e419f21a.js +2 -0
- package/dist/client/_nuxt/none.bdacb36e.js +1 -0
- package/dist/client/_nuxt/open-graph.ae9112ee.js +3 -0
- package/dist/client/_nuxt/overview.b36ec18b.js +1 -0
- package/dist/client/_nuxt/pages.f4173ed6.js +1 -0
- package/dist/client/_nuxt/payload.8138f0c2.js +1 -0
- package/dist/client/_nuxt/plugins.192ab129.js +1 -0
- package/dist/client/_nuxt/runtime-configs.399a5d6f.js +1 -0
- package/dist/client/_nuxt/server-routes.a3646010.js +9 -0
- package/dist/client/_nuxt/settings.2dfbccf3.js +1 -0
- package/dist/client/_nuxt/{state-components.a65979c8.js → state-components.eea2cf71.js} +1 -1
- package/dist/client/_nuxt/state-modules.8cc9b26b.js +1 -0
- package/dist/client/_nuxt/storage.7aca7890.js +1 -0
- package/dist/client/_nuxt/{terminals.2787fb0b.js → terminals.b71c30e6.js} +2 -2
- package/dist/client/_nuxt/timeline.32019995.js +57 -0
- package/dist/client/_nuxt/{unocss-runtime.54140029.js → unocss-runtime.0935bd38.js} +1 -1
- package/dist/client/_nuxt/{virtual-files.a7391947.js → virtual-files.2f2a88f3.js} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/client/modules/analyze-build/index.html +2 -2
- package/dist/client/modules/assets/index.html +2 -2
- package/dist/client/modules/components/index.html +2 -2
- package/dist/client/modules/hooks/index.html +2 -2
- package/dist/client/modules/imports/index.html +2 -2
- package/dist/client/modules/middleware/index.html +2 -2
- package/dist/client/modules/modules/index.html +2 -2
- package/dist/client/modules/open-graph/index.html +2 -2
- package/dist/client/modules/overview/index.html +2 -2
- package/dist/client/modules/pages/index.html +2 -2
- package/dist/client/modules/payload/index.html +2 -2
- package/dist/client/modules/plugins/index.html +2 -2
- package/dist/client/modules/runtime-configs/index.html +2 -2
- package/dist/client/modules/server-routes/index.html +2 -2
- package/dist/client/modules/storage/index.html +2 -2
- package/dist/client/modules/terminals/index.html +2 -2
- package/dist/client/modules/timeline/index.html +2 -2
- package/dist/client/modules/virtual-files/index.html +2 -2
- package/dist/client/settings/index.html +2 -2
- package/dist/module.json +1 -1
- package/dist/module.mjs +1 -1
- package/dist/runtime/plugins/view/Main.vue +107 -10
- package/dist/runtime/plugins/view/client.mjs +3 -2
- package/dist/runtime/plugins/view/state.mjs +2 -1
- package/dist/shared/{devtools.d198e7a9.mjs → devtools.c34e61ba.mjs} +1 -0
- package/dist/types.d.ts +1 -11
- package/package.json +14 -13
- package/dist/client/_nuxt/AuthRequiredPanel.vue.8365f094.js +0 -1
- package/dist/client/_nuxt/Badge.6a68ac78.js +0 -1
- package/dist/client/_nuxt/CodeSnippets.vue.dc4d9439.js +0 -1
- package/dist/client/_nuxt/ComposableItem.vue.2b804916.js +0 -1
- package/dist/client/_nuxt/DrawerRight.vue.76906913.js +0 -1
- package/dist/client/_nuxt/FilepathItem.vue.c12140f3.js +0 -1
- package/dist/client/_nuxt/HelpFab.vue.d8b5b257.js +0 -1
- package/dist/client/_nuxt/LaunchPage.vue.7ca11100.js +0 -1
- package/dist/client/_nuxt/NCheckbox.vue.4cf6f83b.js +0 -1
- package/dist/client/_nuxt/NCodeBlock.vue.cd2d281d.js +0 -2
- package/dist/client/_nuxt/NIconTitle.vue.2bd823c1.js +0 -1
- package/dist/client/_nuxt/NLink.vue.b78c8d55.js +0 -1
- package/dist/client/_nuxt/NSectionBlock.36261208.js +0 -1
- package/dist/client/_nuxt/NSelect.vue.5b8827ac.js +0 -1
- package/dist/client/_nuxt/NSwitch.vue.f9054ae3.js +0 -1
- package/dist/client/_nuxt/NTip.vue.cf493c45.js +0 -1
- package/dist/client/_nuxt/Navbar.vue.f3d9c7e0.js +0 -1
- package/dist/client/_nuxt/StateEditor.vue.0146462c.js +0 -1
- package/dist/client/_nuxt/__blank.59338a05.js +0 -1
- package/dist/client/_nuxt/analyze-build.901f5150.js +0 -1
- package/dist/client/_nuxt/assets.75544131.js +0 -16
- package/dist/client/_nuxt/custom-_name_.dfe8f1a7.js +0 -1
- package/dist/client/_nuxt/default.5ca90489.js +0 -1
- package/dist/client/_nuxt/entry.331cb74a.js +0 -21
- package/dist/client/_nuxt/entry.b258ed6f.css +0 -1
- package/dist/client/_nuxt/full.84bf4dc2.js +0 -1
- package/dist/client/_nuxt/hooks.9324197d.js +0 -1
- package/dist/client/_nuxt/imports.daf39689.js +0 -1
- package/dist/client/_nuxt/index.1da213bf.js +0 -1
- package/dist/client/_nuxt/middleware.a6cf7e42.js +0 -1
- package/dist/client/_nuxt/modules.882302f4.js +0 -2
- package/dist/client/_nuxt/none.91495c5f.js +0 -1
- package/dist/client/_nuxt/open-graph.e5c037bf.js +0 -3
- package/dist/client/_nuxt/overview.0f0f3fdf.js +0 -1
- package/dist/client/_nuxt/pages.012c646d.js +0 -1
- package/dist/client/_nuxt/payload.3247eb06.js +0 -1
- package/dist/client/_nuxt/plugins.17878408.js +0 -1
- package/dist/client/_nuxt/runtime-configs.42aec493.js +0 -1
- package/dist/client/_nuxt/server-routes.e57e617b.js +0 -9
- package/dist/client/_nuxt/settings.1e99e54a.js +0 -1
- package/dist/client/_nuxt/state-modules.5120fd20.js +0 -1
- package/dist/client/_nuxt/storage.9d4df500.js +0 -1
- package/dist/client/_nuxt/timeline.587165be.js +0 -57
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{d as S,o,h as M,j as u,a5 as te,m as a,p as x,aM as oe,aN as ne,an as ae,a as C,aO as se,e as re,a6 as V,r as R,f as e,k as t,n as I,E as O,t as h,F as T,i as d,v as $,ai as z,C as ie,a3 as B,aP as G,aQ as ce,aR as le,b as de,aS as pe,aT as me,aU as ue,aV as U,aq as ge,a9 as he,l as _e,aW as fe,H as P,U as ve,_ as be}from"./entry.704683a1.js";import{_ as we}from"./Navbar.vue.c8f5ea35.js";import{_ as xe}from"./NLink.vue.e00535a9.js";import{_ as H}from"./NSectionBlock.6778ba18.js";import{_ as ye}from"./NCodeBlock.vue.a8601f10.js";import{_ as ke}from"./HelpFab.vue.5d67494b.js";import"./NIconTitle.vue.e492e44a.js";import"./client.fbe3eaa6.js";const $e={key:0,"i-carbon:arrow-up-right":"","translate-y--1":"","text-xs":"",op50:""},J=S({__name:"NTextExternalLink",props:{link:{}},setup(b){return(n,c)=>(o(),M(ae(n.link?xe:"div"),oe(ne(n.link?{href:n.link,target:"_blank",rel:"noopener noreferrer"}:{})),{default:u(()=>[te(n.$slots,"default"),n.link?(o(),a("div",$e)):x("",!0)]),_:3},16))}}),q=[{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:"recommended",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:"recommended",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:"recommended",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:"recommended",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."}],Te={flex:"~ wrap","mt--2":"","w-full":"","flex-none":""},Ce=["onClick"],Se=t("div",{border:"b base","flex-auto":""},null,-1),Ne={key:0,"x-divider":""},Me={key:1,"x-divider":""},Oe={flex:"~ gap-1 items-center",px4:"",py2:""},Ae=t("div",{"i-carbon-warning":"","text-orange":""},null,-1),Re={"w-full":"",p2:"",op75:""},Ie={key:1,m4:"",flex:"~ col gap-2"},Be={flex:"~ gap-1 wrap items-center"},Ee={key:1},Le={flex:"~ gap-2",n:"sm primary",absolute:"","right-2":"","top-2":""},De=S({__name:"OpenGraphMissingTabs",props:{tags:{},matchedRouteFilepath:{}},setup(b){const n=b,c=C(()=>q.filter(s=>!n.tags?.some(p=>p.name===s.name))),l=C(()=>{let s={};const p={};c.value.forEach(g=>{g.seoMeta?Object.assign(p,g.seoMeta):s=se(s,g.head)});const v=[];if(Object.keys(p).length){const g=JSON.stringify(p,null,2).replace(/"([^"]+)":/g,"$1:").replace(/"/g,"'");v.push(`useSeoMeta(${g})`)}if(Object.keys(s).length){const g=JSON.stringify(s,null,2).replace(/"([^"]+)":/g,"$1:").replace(/"/g,"'");v.push(`useHead(${g})`)}return v.join(`
|
|
2
|
+
|
|
3
|
+
`)}),m=re(),y=V(),k=["Missing Tags","Code Snippet"],_=R(k[0]);return(s,p)=>{const v=J,g=z,N=ie,A=ye,E=H;return e(c).length?(o(),M(E,{key:0,text:"Missing Tags",description:`${e(c).length} missing tags`,icon:"carbon:warning-other","header-class":"text-orange op100! [[open]_&]:text-inherit",padding:!1},{default:u(()=>[t("div",Te,[(o(),a(T,null,I(k,(r,i)=>t("button",{key:i,px4:"",py2:"",border:"r t base",hover:"bg-active",class:O(r===e(_)?"":"border-b"),onClick:f=>_.value=r},[t("div",{class:O(r===e(_)?"":"op30"),capitalize:""},h(r),3)],10,Ce)),64)),Se]),e(_)===k[0]?(o(),M(g,{key:0,grid:"~ cols-[max-content_1fr]",m4:"","items-center":"","justify-between":"","of-hidden":""},{default:u(()=>[(o(!0),a(T,null,I(e(c),(r,i)=>(o(),a(T,{key:i},[i?(o(),a("div",Ne)):x("",!0),i?(o(),a("div",Me)):x("",!0),t("div",Oe,[Ae,d(v,{op50:"",link:r.docs,n:"orange"},{default:u(()=>[$(h(r.name),1)]),_:2},1032,["link"])]),t("div",Re,h(r.description),1)],64))),128))]),_:1})):(o(),a("div",Ie,[t("p",Be,[d(N,{icon:"carbon-copy",n:"xs","px-2":"",onClick:p[0]||(p[0]=r=>e(m)(e(l)))},{default:u(()=>[$(" Copy ")]),_:1}),$(" the following code snippet and paste it into your "),s.matchedRouteFilepath?(o(),M(N,{key:0,icon:"carbon-launch",n:"xs","px-2":"",onClick:p[1]||(p[1]=r=>e(y)(s.matchedRouteFilepath))},{default:u(()=>[$(" page component ")]),_:1})):(o(),a("span",Ee,"page component")),$(" to full fill the missing tags. ")]),d(g,{relative:"","n-code-block":""},{default:u(()=>[d(A,{code:e(l),lang:"ts",lines:!1,"w-full":"","of-auto":"",p3:""},null,8,["code"]),t("div",Le,[d(N,{icon:"carbon-copy",onClick:p[2]||(p[2]=r=>e(m)(e(l)))},{default:u(()=>[$(" Copy ")]),_:1})])]),_:1})]))]),_:1},8,["description"])):x("",!0)}}}),Fe={class:"max-w-[524px] min-w-[524px] cursor-pointer bg-base"},Pe={class:"break-words border border-base px-[12px] py-[10px] antialiased"},je={class:"overflow-hidden truncate whitespace-nowrap text-[12px] leading-[11px] uppercase op50"},Ue={class:"block h-[46px] max-h-[46px] border-separate select-none overflow-hidden break-words text-left",style:{"border-spacing":"0px"}},Ve={class:"mt-[3px] truncate pt-[2px] text-[16px] font-semibold leading-[20px]"},ze={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"}},Ge=S({__name:"SocialFacebook",props:{card:{}},setup(b){return(n,c)=>(o(),a("div",Fe,[t("div",{class:"h-[274px] border border-b-0 border-base bg-cover bg-center bg-no-repeat",style:B({backgroundImage:`url(${JSON.stringify(n.card.image)})`})},null,4),t("div",Pe,[t("div",je,h(n.card.url),1),t("div",Ue,[t("div",Ve,h(n.card.title),1),t("div",ze,h(n.card.description),1)])])]))}}),He={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"}},Je={class:"break-words border-base p-[0.75em] antialiased",flex:"~ col justify-center gap-[2px]"},qe={class:"overflow-hidden truncate whitespace-nowrap text-[15px] leading-[20px] lowercase op50"},Ke={class:"m-0 truncate text-[15px] font-semibold leading-[20px]"},We={class:"line-clamp-2 select-none overflow-hidden break-words text-left text-[15px] leading-[20px] op50"},Qe=S({__name:"SocialTwitter",props:{tags:{}},setup(b){const n=b,c=C(()=>G(n.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"}]})),l=C(()=>c.value.image?n.tags.find(m=>m.tag==="meta"&&m.name==="twitter:card")?.value||"summary_large_image":"summary");return(m,y)=>(o(),a("div",He,[t("div",{class:O(["cursor-pointer overflow-hidden leading-[1.3em]",e(l)==="summary_large_image"?"":"flex"]),hover:"bg-[#88888805]"},[e(l)==="summary_large_image"?(o(),a("div",{key:0,class:"h-[220px] border-b border-base bg-cover bg-center bg-no-repeat",style:B({backgroundImage:`url(${JSON.stringify(e(c).image)})`})},null,4)):(o(),a("div",{key:1,class:"h-[129px] w-[129px] flex-none border-r border-base bg-cover bg-center bg-no-repeat",style:B({backgroundImage:`url(${JSON.stringify(e(c).image)})`})},null,4)),t("div",Je,[t("div",qe,h(e(c).url),1),t("div",Ke,h(e(c).title),1),t("div",We,h(e(c).description),1)])],2)]))}}),Ye={class:"max-w-[520px] min-w-[520px] cursor-pointer overflow-hidden border border-base rounded-[2px] shadow-md bg-base"},Xe={class:"break-words p-[10px] antialiased"},Ze={class:"block h-auto max-h-[50px] border-separate select-none break-words text-left",style:{"border-spacing":"0px"}},et={class:"pb-[2px] text-[16px] font-semibold leading-[24px]"},tt={class:"overflow-hidden truncate whitespace-nowrap text-xs font-normal uppercase op85"},ot=S({__name:"SocialLinkedin",props:{card:{}},setup(b){return(n,c)=>(o(),a("div",Ye,[t("div",{class:"h-[270px] border-b border-base bg-cover bg-center bg-no-repeat",style:B({backgroundImage:`url(${JSON.stringify(n.card.image)})`})},null,4),t("div",Xe,[t("div",Ze,[t("div",et,h(n.card.title),1),t("div",tt,h(n.card.url),1)])])]))}}),nt={"h-full":"","w-520":"",flex:"~ col"},at={flex:"~ wrap","w-full":"","flex-none":""},st=["onClick"],rt=t("div",{border:"b base","flex-auto":""},null,-1),it={flex:"~ items-center justify-center","flex-auto":"",p4:"","n-panel-grids":""},ct={key:0},lt={key:1},dt={key:2},pt=S({__name:"SocialPreviewGroup",props:{tags:{}},setup(b){const n=b,c=["twitter","facebook","linkedin"],l=R(c[0]),m=C(()=>G(n.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(y,k)=>{const _=Ge,s=Qe,p=ot;return o(),a("div",nt,[t("div",at,[(o(),a(T,null,I(c,(v,g)=>t("button",{key:g,px4:"",py2:"",border:"r base",hover:"bg-active",class:O(v===e(l)?"":"border-b"),onClick:N=>l.value=v},[t("div",{class:O(v===e(l)?"":"op30"),capitalize:""},h(v),3)],10,st)),64)),rt]),t("div",it,[e(l)==="facebook"?(o(),a("div",ct,[d(_,{card:e(m)},null,8,["card"])])):e(l)==="twitter"?(o(),a("div",lt,[d(s,{tags:y.tags},null,8,["tags"])])):e(l)==="linkedin"?(o(),a("div",dt,[d(p,{card:e(m)},null,8,["card"])])):x("",!0)])])}}}),mt={class:"markdown-body"},ut=ce('<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),gt=[ut],ht={__name:"open-graph",setup(b,{expose:n}){return n({frontmatter:{}}),(l,m)=>(o(),a("div",mt,gt))}},_t={flex:"~","h-full":"","w-full":"","of-hidden":""},ft={"h-full":"","flex-auto":"","of-auto":""},vt={"flex-none":"",flex:"~ gap2 items-center"},bt={flex:"~ col"},wt={key:0,"x-divider":""},xt={key:1,"x-divider":""},yt={mr2:"",px4:"",py2:""},At=S({__name:"open-graph",setup(b){const n=R(0),c=le(),l=de(async()=>(n.value,(await c.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)}})),[]),m=R(!0);function y(){n.value+=1}const k=pe(),_=me(),s=R(""),p=ue(),v=V();async function g(){s.value!==_.value.path&&k.value.push(s.value||"/")}const N=C(()=>s.value===_.value.path?[]:k.value.resolve(s.value||"/").matched),A=C(()=>{const r=p.value.find(i=>i.path===_.value?.matched?.[0]?.path);return r?.file||r?.meta?.file});function E(r){return q.find(i=>i.name===r.name)?.docs}return U(_).toBeTruthy().then(r=>{s.value=r.path}),U(k).toBeTruthy().then(r=>{r.afterEach(()=>{ge(()=>{s.value=_.value.path,setTimeout(y,200),setTimeout(y,800)})})}),(r,i)=>{const f=ve,L=be,K=we,j=J,W=z,Q=H,Y=De,X=pt,Z=ht,ee=ke,D=he("tooltip");return o(),a(T,null,[t("div",_t,[t("div",ft,[d(K,null,{search:u(()=>[d(f,{modelValue:e(s),"onUpdate:modelValue":i[0]||(i[0]=w=>_e(s)?s.value=w:null),placeholder:"Route",icon:"carbon-direction-right-01 scale-y--100",n:"primary","flex-auto":"","font-mono":"",class:O(["px-5 py-2",e(_)?.path===e(s)?"":e(N).length?"text-green":"text-orange"]),onKeydown:fe(g,["enter"])},null,8,["modelValue","class","onKeydown"])]),actions:u(()=>[t("div",vt,[e(A)?P((o(),M(L,{key:0,"text-lg":"",icon:"carbon:launch",title:"Open file in editor",onClick:i[1]||(i[1]=w=>e(v)(e(A)))},null,512)),[[D,"Open file in editor"]]):x("",!0),P(d(L,{"text-lg":"",icon:"carbon:reset",title:"Refresh Data",onClick:y},null,512),[[D,"Refresh Data"]]),P(d(L,{"text-lg":"",icon:e(m)?"carbon:side-panel-open":"carbon:open-panel-right",title:"Toggle Preview",onClick:i[2]||(i[2]=w=>m.value=!e(m))},null,8,["icon"]),[[D,"Toggle Preview"]])])]),_:1}),t("div",bt,[d(Q,{text:"Tags",icon:"carbon:tag-group"},{default:u(()=>[d(W,{grid:"~ cols-[max-content_1fr]","items-center":"","justify-between":"","of-hidden":""},{default:u(()=>[(o(!0),a(T,null,I(e(l),(w,F)=>(o(),a(T,{key:F},[F?(o(),a("div",wt)):x("",!0),F?(o(),a("div",xt)):x("",!0),t("div",yt,[d(j,{op50:"",link:E(w),n:"primary"},{default:u(()=>[$(h(w.name),1)]),_:2},1032,["link"])]),d(j,{link:w.value.match(/^https?:\/\//)?w.value:void 0,"w-full":"",p2:"","font-mono":"",n:"primary"},{default:u(()=>[$(h(w.value),1)]),_:2},1032,["link"])],64))),128))]),_:1})]),_:1}),d(Y,{tags:e(l),"matched-route-filepath":e(A)},null,8,["tags","matched-route-filepath"])])]),e(m)&&e(l)?.length?(o(),M(X,{key:0,tags:e(l),border:"l base","w-540px":"","flex-none":""},null,8,["tags"])):x("",!0)]),d(ee,null,{default:u(()=>[d(Z)]),_:1})],64)}}});export{At as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as B,am as I,a7 as V,aA as j,aX as A,aY as R,N as L,a as $,h as m,j as o,A as O,o as s,f as e,m as l,k as t,i,t as d,p as r,F as p,aZ as x,a_ as P,v as n,B as E,D as F,x as W,C as G}from"./entry.704683a1.js";import{_ as H}from"./Badge.809c442f.js";import{u as K,_ as U}from"./state-modules.8cc9b26b.js";import{_ as X}from"./NTip.vue.6bf7cf97.js";import{a as Y}from"./state-components.eea2cf71.js";import"./NCodeBlock.vue.a8601f10.js";import"./client.fbe3eaa6.js";import"./NCheckbox.vue.76b79ec0.js";const Z="0.7.5",q={key:0},z={key:1,flex:"~ col gap2",ma:"","h-full":"","max-w-300":"","w-full":"",p5:"",px5:"","md:px20":""},J=t("div",{"flex-auto":""},null,-1),Q={flex:"~ col","mt-5":"","items-center":"","md:mt-20":""},tt={flex:"~","mt--10":"","items-center":"","justify-center":""},et={mb6:"","mt--1":"","text-center":"","text-sm":"",flex:"~ gap-1 wrap"},ot=t("span",{op40:""}," Nuxt DevTools ",-1),st={op40:""},nt={flex:"~ gap2 wrap"},it={p4:"","theme-card-green":"",flex:"~ col auto"},at=t("div",{"logos-nuxt-icon":"","text-3xl":""},null,-1),lt={key:0,p4:"","theme-card-green":"",flex:"~ col auto"},dt=t("div",{"logos-vue":"","text-3xl":""},null,-1),rt=t("div",{"carbon-tree-view-alt":"","text-3xl":""},null,-1),ct=t("div",{"i-carbon-assembly-cluster":"","text-3xl":""},null,-1),ut=t("div",{"carbon-function":"","text-3xl":""},null,-1),_t=t("div",{"carbon-3d-mpr-toggle":"","text-3xl":""},null,-1),mt=t("div",{"carbon-plug":"","text-3xl":""},null,-1),pt={key:5,"pointer-events-none":"","min-w-40":"",p4:"","theme-card-lime":"",flex:"~ auto gap-6"},ht=t("div",{"i-carbon-time-plot":"","flex-none":"","text-3xl":""},null,-1),xt={grid:"~ cols-[auto_auto] gap-x-5 items-center"},ft=t("div",{"text-sm":""}," SSR to full load ",-1),gt={"text-right":""},vt=t("div",{"text-sm":""}," Page load ",-1),kt={"text-right":""},bt=t("div",{"text-sm":""}," Navigation ",-1),wt={"text-right":""},yt=t("div",{"text-sm":""}," HMR ",-1),Ct={"text-right":""},Mt={flex:"~ col gap2"},St={flex:"~ gap-6 wrap","mt-5":"","items-center":"","justify-center":""},Tt=t("a",{href:"https://github.com/nuxt/devtools",target:"_blank",flex:"~ gap1","items-center":"",op50:"",hover:"op100 text-blue",transition:""},[t("div",{"i-carbon-star":""}),n(" Star on GitHub ")],-1),Dt=t("a",{href:"https://github.com/nuxt/devtools/discussions/29",target:"_blank",flex:"~ gap1","items-center":"",op50:"",hover:"op100 text-yellow",transition:""},[t("div",{"i-carbon-data-enrichment":""}),n(" Ideas & Suggestions ")],-1),Nt=t("a",{href:"https://github.com/nuxt/devtools/discussions/31",target:"_blank",flex:"~ gap1","items-center":"",op50:"",hover:"op100 text-lime",transition:""},[t("div",{"i-carbon-plan":""}),n(" Project Roadmap ")],-1),Bt=t("a",{href:"https://github.com/nuxt/devtools/issues",target:"_blank",flex:"~ gap1","items-center":"",op50:"",hover:"op100 text-rose",transition:""},[t("div",{"i-carbon-debug":""}),n(" Bug Reports ")],-1),It=t("div",{"i-carbon-settings-adjust":""},null,-1),Vt=t("div",{"flex-auto":""},null,-1),jt={flex:"col gap-2",mxa:"",hidden:"","w-100":"","text-sm":"",op50:"","md:flex":""},At={flex:"~ gap-1","items-center":""},Rt=t("span",null,"+",-1),Lt=t("span",null,"+",-1),$t=t("div",{"flex-auto":""},null,-1),Ot={flex:"~ gap-1","items-center":""},Pt=t("span",null,"+",-1),Et=t("span",null,"+",-1),Ft=t("span",null,"+",-1),Wt=t("span",null,"+",-1),Gt=t("div",{"flex-auto":""},null,-1),Ht=t("div",null,"Toggle DevTools",-1),ee=B({__name:"overview",setup(Kt){const a=I(),_=V(),b=Y(),f=j(),w=K(),y=A(),g=R(),C=L();function M(){E.value=!0,C.push("/")}const v=$(()=>a.value?.nuxt.vueApp.version);return(c,Ut)=>{const S=F,T=H,k=U,h=W,D=X,u=G,N=O;return s(),m(N,{"h-screen":"","w-full":"",flex:""},{default:o(()=>[e(_)?(s(),l("div",z,[J,t("div",Q,[t("div",tt,[i(S,{"h-14":"","md:h-18":""}),t("button",{"mr--16":"","mt--6":"",onClick:M},[i(T,{"bg-green-400:10":"","text-green-400":"",title:"preview",textContent:"preview"})])]),t("div",et,[ot,t("code",st,"v"+d(e(Z)),1),i(k,{"package-name":"@nuxt/devtools",options:{dev:!0},"show-version":!1})])]),t("div",nt,[t("div",it,[at,i(k,{"package-name":"nuxt",options:{dev:!0}})]),e(v)?(s(),l("div",lt,[dt,t("code",null,"v"+d(e(v)),1)])):r("",!0),e(_)?(s(),l(p,{key:1},[e(_)&&e(_).pages&&e(a)?(s(),m(h,{key:0,"min-w-40":"",p4:"","theme-card-lime":"",flex:"~ col auto",to:"/modules/pages"},{default:o(()=>[rt,t("div",null,d(e(y).length)+" pages",1)]),_:1})):r("",!0),e(_)?(s(),m(h,{key:1,"min-w-40":"",p4:"","theme-card-lime":"",flex:"~ col auto",to:"/modules/components"},{default:o(()=>[ct,t("div",null,d(e(b).length)+" components",1)]),_:1})):r("",!0),e(_)&&e(f)?(s(),m(h,{key:2,"min-w-40":"",p4:"","theme-card-yellow":"",flex:"~ col auto",to:"/modules/imports"},{default:o(()=>[ut,t("div",null,d(e(f).imports.length)+" imports",1)]),_:1})):r("",!0),e(_)?(s(),m(h,{key:3,"min-w-40":"",p4:"","theme-card-purple":"",flex:"~ col auto",to:"/modules/modules"},{default:o(()=>[_t,t("div",null,d(e(w).length)+" modules",1)]),_:1})):r("",!0),e(_)?(s(),m(h,{key:4,"min-w-40":"",p4:"","theme-card-teal":"",flex:"~ col auto",to:"/modules/plugins"},{default:o(()=>[mt,t("div",null,d(e(_).plugins.length)+" plugins",1)]),_:1})):r("",!0),e(a)?.loadingTimeMetrics?(s(),l("div",pt,[ht,t("div",xt,[e(a).loadingTimeMetrics.ssrStart?(s(),l(p,{key:0},[ft,t("div",gt,d(("formatDuration"in c?c.formatDuration:e(x))(e(a).loadingTimeMetrics.appLoad-e(a).loadingTimeMetrics.ssrStart)),1)],64)):r("",!0),vt,t("div",kt,d(("formatDuration"in c?c.formatDuration:e(x))(e(a).loadingTimeMetrics.appLoad-e(a).loadingTimeMetrics.appInit)),1),bt,t("div",wt,d(("formatDuration"in c?c.formatDuration:e(x))(e(a).loadingTimeMetrics.pageEnd-e(a).loadingTimeMetrics.pageStart)),1),e(a).loadingTimeMetrics.hmrStart?(s(),l(p,{key:1},[yt,t("div",Ct,d(("formatDuration"in c?c.formatDuration:e(x))(e(a).loadingTimeMetrics.hmrEnd-e(a).loadingTimeMetrics.hmrStart)),1)],64)):r("",!0)])])):r("",!0)],64)):r("",!0)]),t("div",Mt,[("showConnectionWarning"in c?c.showConnectionWarning:e(P))?(s(),m(D,{key:0,n:"yellow5",icon:"carbon-unlink","justify-center":""},{default:o(()=>[n(" Not connected to the client app, showing server-side data only. Use the embedded mode for full features. ")]),_:1})):r("",!0)]),t("div",St,[Tt,Dt,Nt,Bt,i(h,{to:"/settings",flex:"~ gap1","inline-block":"","items-center":"",op50:"","hover:op80":""},{default:o(()=>[It,n(" Settings ")]),_:1})]),Vt,t("div",jt,[t("div",At,[e(g)?(s(),l(p,{key:0},[i(u,{n:"xs",class:"px2"},{default:o(()=>[n(" ⌘ Cmd ")]),_:1}),Rt,i(u,{n:"xs",class:"px2"},{default:o(()=>[n(" K ")]),_:1})],64)):(s(),l(p,{key:1},[i(u,{n:"xs",class:"px2"},{default:o(()=>[n(" Ctrl ")]),_:1}),Lt,i(u,{n:"xs",class:"px2"},{default:o(()=>[n(" K ")]),_:1})],64)),$t,n(" Open Command Palette ")]),t("div",Ot,[e(g)?(s(),l(p,{key:0},[i(u,{n:"xs",class:"px2"},{default:o(()=>[n(" ⇧ Shift ")]),_:1}),Pt,i(u,{n:"xs",class:"px2"},{default:o(()=>[n(" ⌥ Option ")]),_:1}),Et,i(u,{n:"xs",class:"px2"},{default:o(()=>[n(" D ")]),_:1})],64)):(s(),l(p,{key:1},[i(u,{n:"xs",class:"px2"},{default:o(()=>[n(" Shift ")]),_:1}),Ft,i(u,{n:"xs",class:"px2"},{default:o(()=>[n(" Alt ")]),_:1}),Wt,i(u,{n:"xs",class:"px2"},{default:o(()=>[n(" D ")]),_:1})],64)),Gt,Ht])])])):(s(),l("div",q," Loading... "))]),_:1})}}});export{ee as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as I,r as A,a as R,aj as O,f as t,o,m as s,k as e,t as $,h as v,j as k,b4 as W,F as h,n as T,p as y,i as p,v as P,E,U as M,C as q,a6 as J,b5 as S,aS as H,aT as G,a7 as Q,af as X,aU as Y,aV as L,aq as Z,l as ee,aW as te,J as oe,K as ne}from"./entry.704683a1.js";import{_ as D}from"./Badge.809c442f.js";import{_ as F}from"./FilepathItem.vue.a9853d6c.js";import{_ as ae}from"./NSectionBlock.6778ba18.js";import{_ as se}from"./LaunchPage.vue.304a6918.js";import{_ as re}from"./HelpFab.vue.5d67494b.js";import"./NIconTitle.vue.e492e44a.js";import"./NMarkdown.vue.7d7a1e6e.js";import"./client.fbe3eaa6.js";const le={block:"","cursor-pointer":""},ie={p2:""},ue=["onSubmit"],ce=e("div",{px2:"","text-sm":"",op50:""}," Fill params and navigate: ",-1),de={flex:"~","items-center":"",p2:"","text-sm":"","font-mono":""},pe={key:1},_e=I({__name:"RoutePathItem",props:{route:{}},emits:["navigate"],setup(V,{emit:d}){const i=V,_=A([]),m=R(()=>{const u=b(i.route.path);return _.value=Array.from({length:u.length},()=>""),u});function b(u){return u.split(/(:\w+[\?\*]?(?:\(\))?)/).filter(Boolean).map(c=>c[0]===":"?c.replace(/\(\)$/,"?"):c)}const w=R(()=>m.value.map((u,c)=>u[0]===":"?_.value[c]:u).join("").replace(/\/+/g,"/")),r=R(()=>i.route.path.includes(":"));function a(){d("navigate",w.value)}return(u,c)=>{const C=M,n=q,l=O("VDropdown");return t(r)?(o(),v(l,{key:1},{popper:k(({hide:f})=>[e("div",ie,[e("form",{flex:"~ col",onSubmit:W(()=>{a(),f()},["prevent"])},[t(r)?(o(),s(h,{key:0},[ce,e("div",de,[(o(!0),s(h,null,T(t(m),(g,x)=>(o(),s(h,{key:x},[g[0]===":"?(o(),v(C,{key:0,modelValue:t(_)[x],"onUpdate:modelValue":B=>t(_)[x]=B,"w-20":"","n-sm":"",placeholder:g.slice(1)},null,8,["modelValue","onUpdate:modelValue","placeholder"])):(o(),s("span",pe,$(g),1))],64))),128))])],64)):y("",!0),p(n,{block:"",n:"primary"},{default:k(()=>[P(" Navigate ")]),_:1})],40,ue)])]),default:k(()=>[e("code",le,[(o(!0),s(h,null,T(t(m),(f,g)=>(o(),s("span",{key:g,class:E(f[0]===":"?"text-gray border border-dashed rounded border-gray:50 px1":"")},$(f[0]===":"?f.slice(1):f),3))),128))])]),_:1})):(o(),s("button",{key:0,onClick:a},[e("code",null,$(u.route.path),1)]))}}}),he={"w-full":""},me=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),fe={"w-20":"","pr-1":""},ge={flex:"","items-center":"","justify-end":""},ve={"text-sm":""},ye={flex:"inline gap3","items-center":""},be={op0:"","group-hover:op100":"",flex:"~ gap1"},xe=["onClick"],ke=e("div",{"i-carbon-script-reference":""},null,-1),$e=[ke],we={"w-0":"","ws-nowrap":"","pr-1":"","text-left":"","text-sm":"","font-mono":"",op50:""},Ce={"w-0":"","ws-nowrap":"","pr-1":"","text-center":"","text-sm":"","font-mono":"",op50:""},Ne={"w-0":"","ws-nowrap":"","text-center":"","text-sm":"","font-mono":""},Re={key:0},Ve=["onClick"],Pe=I({__name:"RoutesTable",props:{pages:{},layouts:{},matched:{},matchedPending:{}},emits:["navigate"],setup(V){const d=V,i=J(),_=S(),m=R(()=>[...d.pages].sort((r,a)=>r.path.localeCompare(a.path)));function b(r){const a=d.layouts.find(u=>u.name===r);a&&i(a.file)}function w(r){if(typeof r=="string")return _.value?.middleware.find(a=>a.name===r)?.path}return(r,a)=>{const u=D,c=_e,C=F;return o(),s("div",null,[e("table",he,[me,e("tbody",null,[(o(!0),s(h,null,T(t(m),n=>(o(),s("tr",{key:n.name,class:"group","h-7":"",border:"b dashed transparent hover:base"},[e("td",fe,[e("div",ge,[r.matched.find(l=>l.name===n.name)?(o(),v(u,{key:0,"bg-green-400:10":"","text-green-400":"",title:"active",textContent:"active"})):y("",!0),r.matchedPending.find(l=>l.name===n.name)?(o(),v(u,{key:1,"bg-teal-400:10":"","text-teal-400":"",title:"next",textContent:"next"})):y("",!0)])]),e("td",ve,[e("div",ye,[p(c,{route:n,class:E(r.matched.find(l=>l.name===n.name)?"text-primary":r.matchedPending.find(l=>l.name===n.name)?"text-teal":""),onNavigate:a[0]||(a[0]=l=>r.$emit("navigate",l))},null,8,["route","class"]),e("div",be,[n.file||n.meta?.file?(o(),s("button",{key:0,"text-sm":"",op40:"",hover:"op100 text-primary",title:"Open in editor",onClick:l=>t(i)(n.file||n.meta?.file)},$e,8,xe)):y("",!0)])])]),e("td",we,$(n.name),1),e("td",Ce,[p(C,{filepath:w(n.meta.middleware),override:`${n.meta.middleware||"-"}`},null,8,["filepath","override"])]),e("td",Ne,[n.meta.layout===!1?(o(),s("span",Re,"-")):n.meta.layout?(o(),s("button",{key:1,onClick:l=>b(n.meta.layout)},$(n.meta.layout),9,Ve)):(o(),s("button",{key:2,"text-sm":"",op15:"",onClick:a[1]||(a[1]=l=>b("default"))}," (default) "))])]))),128))])])])}}}),Te={class:"markdown-body"},Be=e("h1",null,"Pages",-1),Ie=e("p",null,[P("One core feature of Nuxt is the file system router. Every Vue file inside the "),e("code",null,"pages/"),P(" directory creates a corresponding URL (or route) that displays the contents of the file. By using dynamic imports for each page, Nuxt leverages code-splitting to ship the minimum amount of JavaScript for the requested route.")],-1),Ee=e("p",null,[e("a",{href:"https://nuxt.com/docs/getting-started/routing",target:"_blank",rel:"noopener"},"Learn more on the documentation")],-1),Le=e("hr",null,null,-1),Ae=e("h1",null,"Middlewares",-1),Me=e("p",null,"Nuxt provides a customizable route middleware framework you can use throughout your application, ideal for extracting code that you want to run before navigating to a particular route.",-1),Se=e("p",null,[e("a",{href:"https://nuxt.com/docs/guide/directory-structure/middleware",target:"_blank",rel:"noopener"},"Learn more on the documentation")],-1),De=[Be,Ie,Ee,Le,Ae,Me,Se],Fe={__name:"pages",setup(V,{expose:d}){return d({frontmatter:{}}),(_,m)=>(o(),s("div",Te,De))}},Ue={key:0,"h-full":"","of-auto":""},je={border:"b base",flex:"~ col gap1",px4:"",py3:"","navbar-glass":""},Ke=e("span",{op50:""},"Navigate from ",-1),ze={"font-mono":""},Oe=e("span",{op50:""}," to ",-1),We={key:1,op50:""},qe=e("span",null,[P("Press "),e("b",{"font-bold":""},"Enter"),P(" to navigate")],-1),Je={key:0,"text-orange":"",op75:""},He={key:1,op50:""},Ge={"w-full":""},Qe=e("thead",{border:"b base","h-7":""},[e("tr",null,[e("th",{"text-left":""}," Name "),e("th",{"text-left":""}," Path ")])],-1),Xe={mr1:""},lt=I({__name:"pages",setup(V){const d=H(),i=G(),_=Q(),m=S(),b=X(),w=Y(),r=R(()=>m.value?.middleware||[]),a=A("");L(i).toBeTruthy().then(n=>{a.value=n.path}),L(d).toBeTruthy().then(n=>{n.afterEach(()=>{Z(()=>{a.value=i.value.path})})});async function u(){a.value!==i.value.path&&d.value.push(a.value||"/")}const c=R(()=>a.value===i.value.path?[]:d.value.resolve(a.value||"/").matched);function C(n){d.value.push(n)}return(n,l)=>{const f=M,g=Pe,x=ae,B=D,U=F,j=se,K=Fe,z=re;return o(),s(h,null,[t(_)?.pages&&t(d)?(o(),s("div",Ue,[e("div",je,[e("div",null,[t(i).path!==t(a)?(o(),s(h,{key:0},[Ke,e("span",ze,$(t(i).path),1),Oe],64)):(o(),s("span",We,"Current route"))]),p(f,{modelValue:t(a),"onUpdate:modelValue":l[0]||(l[0]=N=>ee(a)?a.value=N:null),"font-mono":"",icon:"carbon-direction-right-01 scale-y--100",class:E(t(i).path===t(a)?"":t(c).length?"text-green":"text-orange"),onKeydown:te(u,["enter"])},null,8,["modelValue","class","onKeydown"]),e("div",null,[t(i).path!==t(a)?(o(),s(h,{key:0},[qe,t(c).length?y("",!0):(o(),s("span",Je," (no match)"))],64)):(o(),s("span",He,"Edit path above to navigate"))])]),t(c).length?(o(),v(x,{key:0,icon:"carbon-tree-view",text:"Matched Routes",padding:!1},{default:k(()=>[p(g,{pages:t(c),layouts:t(b)||[],matched:[],"matched-pending":t(c),onNavigate:C},null,8,["pages","layouts","matched-pending"])]),_:1})):y("",!0),p(x,{icon:"carbon-tree-view-alt",text:"All Routes",description:`${t(w).length} routes registered in your application`,padding:"pr5"},{default:k(()=>[p(g,{pages:t(w),layouts:t(b)||[],matched:t(i).matched,"matched-pending":t(c),onNavigate:C},null,8,["pages","layouts","matched","matched-pending"])]),_:1},8,["description"]),t(r).length?(o(),v(x,{key:1,icon:"carbon:ibm-watson-studio",text:"Middleware",description:`${t(r).length} middleware registered in your application`,padding:"px13"},{default:k(()=>[e("table",Ge,[Qe,(o(!0),s(h,null,T(t(r),N=>(o(),s("tr",{key:N.path,"h-7":""},[e("td",null,[e("span",Xe,$(N.name),1),N.global?(o(),v(B,{key:0,"bg-green-400:10":"","text-green-400":"",title:"Registered at runtime as a global component",textContent:"global"})):y("",!0)]),e("td",null,[p(U,{filepath:N.path},null,8,["filepath"])])]))),128))])]),_:1},8,["description"])):y("",!0)])):(o(),v(j,{key:1,icon:"carbon-tree-view-alt",title:"Nuxt Routing",description:"Create `./pages/index.vue` 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 n?n.rpc:t(oe)).runWizard(await("ensureDevAuthToken"in n?n.ensureDevAuthToken:t(ne))(),"enablePages")}}]},null,8,["actions"])),p(z,null,{default:k(()=>[p(K)]),_:1})],64)}}});export{lt as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as y}from"./StateEditor.vue.082de4fa.js";import{d as v,o as e,m as c,F as k,n as D,h as m,j as a,a5 as B,aM as w,aN as F,k as x,am as O,a as P,a9 as R,f as r,i as o,p as u,v as V,H as j,C as E,_ as H}from"./entry.704683a1.js";import{_ as A}from"./NSectionBlock.6778ba18.js";import{_ as G}from"./HelpFab.vue.5d67494b.js";import"./DataSchemaButton.vue.31fe918d.js";import"./json-editor-vue.d2d6ca22.js";import"./NIconTitle.vue.e492e44a.js";const K={key:0,flex:"~ col gap-1"},T={key:1,mt2:"",px4:"",italic:"",op35:""},z=v({__name:"StateGroup",props:{state:{},prefix:{default:""}},setup(f){return(t,n)=>{const i=y;return e(),c("div",null,[t.state&&Object.keys(t.state).length>0?(e(),c("div",K,[(e(!0),c(k,null,D(t.state,(l,s)=>(e(),m(i,{key:s,state:l,name:s.startsWith(t.prefix)?s.slice(t.prefix.length):s},{actions:a(_=>[B(t.$slots,"actions",w(F(_)))]),_:2},1032,["state","name"]))),128))])):(e(),c("div",T," No data "))])}}}),I={class:"markdown-body"},L=x("h1",null,"State & Async Data",-1),M=x("p",null,"// TODO",-1),W=[L,M],q={__name:"payload",setup(f,{expose:t}){return t({frontmatter:{}}),(i,l)=>(e(),c("div",I,W))}},J={key:0},at=v({__name:"payload",setup(f){const t=O(),n=P(()=>t.value?.nuxt.payload);async function i(l){await t.value?.nuxt.hooks.callHookParallel("app:data:refresh",l)}return(l,s)=>{const _=z,d=A,$=E,b=H,S=y,N=q,g=G,C=R("tooltip");return e(),c(k,null,[r(t)?(e(),c("div",J,[o(d,{icon:"carbon-data-set",text:"State",description:"Keyed state from `useState`",padding:!1},{default:a(()=>[o(_,{state:r(n).state,prefix:"$s"},null,8,["state"])]),_:1}),o(d,{icon:"carbon-data-blob",text:"Data",description:"Keyed state from `useAsyncData`",padding:!1},{actions:a(()=>[o($,{n:"xs primary","self-start":"",icon:"i-carbon-recycle",onClick:s[0]||(s[0]=h=>i())},{default:a(()=>[V(" Re-fetch all data ")]),_:1})]),default:a(()=>[o(_,{state:r(n).data},{actions:a(({isOpen:h,name:p})=>[h&&p?j((e(),m(b,{key:0,title:`Re-fetch '${p}'`,icon:"carbon-recycle",onClick:Q=>i([p])},null,8,["title","onClick"])),[[C,`Re-fetch '${p}'`,void 0,{bottom:!0}]]):u("",!0)]),_:1},8,["state"])]),_:1}),r(n).functions&&Object.keys(r(n).functions).length?(e(),m(d,{key:0,icon:"carbon-function",text:"Functions",description:"State for functions (experimental)"},{default:a(()=>[o(S,{"ml--6":"",state:r(n).functions},null,8,["state"])]),_:1})):u("",!0)])):u("",!0),o(g,null,{default:a(()=>[o(N)]),_:1})],64)}}});export{at as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as w}from"./FilepathItem.vue.a9853d6c.js";import{_ as D}from"./Badge.809c442f.js";import{_ as C}from"./DurationDisplay.vue.1533a045.js";import{d as v,a7 as B,a as x,b3 as V,o as n,m,k as t,t as P,i as l,f,h as u,p as d,aj as E,a5 as N,a0 as F,q as H,j as h,v as y,b5 as I,am as M,F as k,n as j,E as W}from"./entry.704683a1.js";import{_ as L}from"./NSectionBlock.6778ba18.js";import{_ as q}from"./HelpFab.vue.5d67494b.js";import"./NIconTitle.vue.e492e44a.js";const z={flex:"~ gap2","items-center":""},A={w8:"","text-right":"","text-sm":"",op25:""},R={key:0,"flex-auto":"","text-right":""},Y=v({__name:"PluginItem",props:{plugin:{},index:{}},setup(p){const e=p,a=B(),r=x(()=>V(e.plugin.src,a.value?.rootDir||"").path);return(i,c)=>{const _=w,o=D,s=C;return n(),m("div",z,[t("div",A,P(i.index),1),l(_,{filepath:e.plugin.src,subpath:!0},null,8,["filepath"]),t("div",null,[f(r).startsWith("#")?(n(),u(o,{key:0,"bg-rose-400:10":"","text-rose":"",textContent:"virtual"})):f(r).startsWith(".")?d("",!0):(n(),u(o,{key:1,"bg-gray-400:10":"","text-gray":"",textContent:"module"})),i.plugin.mode==="server"?(n(),u(o,{key:2,"bg-teal-400:10":"","text-teal-400":"",textContent:"server"})):d("",!0),i.plugin.mode==="client"?(n(),u(o,{key:3,"bg-orange-400:10":"","text-orange-400":"",textContent:"client"})):d("",!0)]),i.plugin.metric?.duration!=null?(n(),m("div",R,[l(s,{duration:i.plugin.metric?.duration,factor:10},null,8,["duration"])])):d("",!0)])}}}),G={class:"n-tip n-tip-base",flex:"~ col items-start","mx--4":"",px4:"",py4:""},J={flex:"~ items-center gap-1","font-bold":""},K=v({__name:"HelpTip",props:{title:{},icon:{}},setup(p){return(e,a)=>{const r=F,i=E("ContentSlot");return n(),m("div",G,[t("div",J,[e.icon?(n(),u(r,{key:0,icon:e.icon,class:"n-tip-icon"},null,8,["icon"])):d("",!0),t("div",null,P(e.title),1)]),t("div",null,[N(e.$slots,"default",{},()=>[l(i,{use:e.$slots.default,unwrap:"p"},null,8,["use"])])])])}}}),O={};function Q(p,e){const a=K;return n(),u(a,{title:"Performance Tip",icon:"carbon-meter",n:"lime6 dark:lime5"},{default:h(()=>[N(p.$slots,"default")]),_:3})}const U=H(O,[["render",Q]]),X={class:"markdown-body"},Z=t("h1",null,"Plugins",-1),tt=t("p",null,[y("Nuxt plugins allows you to extend the functionality of Nuxt runtime and the Vue instance. You can add plugins to the "),t("code",null,"plugins/"),y(" directory and they will be automatically imported and registered.")],-1),et=t("p",null,[t("a",{href:"https://nuxt.com/docs/guide/directory-structure/plugins",target:"_blank",rel:"noopener"},"Learn more on the documentation")],-1),nt={__name:"plugins",setup(p,{expose:e}){return e({frontmatter:{}}),(r,i)=>{const c=U;return n(),m("div",X,[Z,tt,l(c,null,{default:h(()=>[y(" Plugins runs before your application at runtime, the time each plugin cost will directly affect your application's initial loading time. ")]),_:1}),et])}}},ot={pt4:""},st={class:"text-sm",flex:"~ gap-1 items-center justify-start","mt-3":""},it=t("div",{"i-carbon-timer":"","text-lg":"",op75:""},null,-1),at=t("span",{op50:""},"Total execution time:",-1),dt=v({__name:"plugins",setup(p){const e=I(),a=M(),r=x(()=>{const c=e.value?.plugins||[],_=a.value?.clientPluginMetrics||[];return c.map(o=>{const s=typeof o=="string"?{src:o}:o;return{...s,metric:_.find(g=>g.src===s.src||g.src.startsWith(s.src))}})}),i=x(()=>{const c=a.value?.clientPluginMetrics||[],_=Math.min(...c.map(s=>s.start));return Math.max(...c.map(s=>s.end))-_});return(c,_)=>{const o=Y,s=C,g=L,S=nt,T=q;return n(),m(k,null,[l(g,{icon:"carbon-plug",text:"Plugins",description:`Total plugins: ${f(r).length}`},{default:h(()=>[t("div",ot,[(n(!0),m(k,null,j(f(r),($,b)=>(n(),u(o,{key:$.src,plugin:$,index:b+1,"ml--4":"","border-base":"",py2:"",class:W(b?"border-t":"")},null,8,["plugin","index","class"]))),128)),t("div",st,[it,at,l(s,{duration:f(i),factor:10},null,8,["duration"])])])]),_:1},8,["description"]),l(T,null,{default:h(()=>[l(S)]),_:1})],64)}}});export{dt as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as C}from"./StateEditor.vue.082de4fa.js";import{_ as h}from"./NSectionBlock.6778ba18.js";import{o as c,m as r,k as u,d as v,am as x,a7 as b,a as m,f as o,i as e,j as s,p as k,F as y}from"./entry.704683a1.js";import{_ as R}from"./HelpFab.vue.5d67494b.js";import"./DataSchemaButton.vue.31fe918d.js";import"./json-editor-vue.d2d6ca22.js";import"./NIconTitle.vue.e492e44a.js";const B={class:"markdown-body"},N=u("h1",null,"Runtime Configs",-1),$=u("p",null,"// TODO:",-1),D=[N,$],F={__name:"runtime-configs",setup(d,{expose:t}){return t({frontmatter:{}}),(l,p)=>(c(),r("div",B,D))}},S={key:0},H=v({__name:"runtime-configs",setup(d){const t=x(),_=b(),l=m(()=>t.value?.nuxt.payload),p=m(()=>{const n={..._.value?.runtimeConfig};return delete n.public,delete n.app,n});return(n,T)=>{const a=C,i=h,f=F,g=R;return c(),r(y,null,[o(t)?(c(),r("div",S,[e(i,{icon:"carbon-settings-services",text:"App Config",padding:!1},{default:s(()=>[e(a,{state:o(t).appConfig},null,8,["state"])]),_:1}),e(i,{icon:"carbon-settings",text:"Public Runtime Config",padding:!1},{default:s(()=>[e(a,{state:o(l).config?.public},null,8,["state"])]),_:1}),e(i,{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:s(()=>[e(a,{state:o(p),readonly:""},null,8,["state"])]),_:1})])):k("",!0),e(g,null,{default:s(()=>[e(f)]),_:1})],64)}}});export{H as default};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import{r as O,b8 as Fe,as as He,aq as ze,w as ye,b9 as We,ba as Je,bb as Ge,d as ae,bc as ge,o,m as p,k as c,E,h as C,f as e,bd as le,t as j,p as D,v as F,a3 as Ke,a5 as ee,F as V,n as A,a0 as ce,a4 as Qe,a as R,i as f,j as k,U as _e,C as be,J as ke,be as Xe,bf as Ye,bg as Ze,a7 as et,ao as ue,a6 as tt,ar as ot,a9 as Ce,l as te,H as de,aI as nt,_ as xe,A as we,bh as st,bi as lt,ab as at,R as rt,bj as it,ai as ut}from"./entry.704683a1.js";import{_ as dt}from"./Navbar.vue.c8f5ea35.js";import{_ as $e}from"./Badge.809c442f.js";import{_ as Se}from"./NSelect.vue.6e592a84.js";import{_ as ct}from"./NCheckbox.vue.76b79ec0.js";import{_ as pt}from"./CodeSnippets.vue.e2cc365d.js";import{_ as ft}from"./DataSchemaButton.vue.31fe918d.js";import{_ as mt}from"./NCodeBlock.vue.a8601f10.js";import{C as ve,S as Te}from"./constants.4e5eba24.js";import{U as vt}from"./json-editor-vue.d2d6ca22.js";import{_ as ht}from"./NSectionBlock.6778ba18.js";import{_ as yt}from"./DrawerRight.vue.3bbd0e76.js";import"./client.fbe3eaa6.js";import"./NIconTitle.vue.e492e44a.js";const se=/^[\u0009\u0020-\u007E\u0080-\u00FF]+$/;function gt(l,h){if(typeof l!="string")throw new TypeError("argument str must be a string");const m={},w=(h||{}).decode||kt;let _=0;for(;_<l.length;){const t=l.indexOf("=",_);if(t===-1)break;let y=l.indexOf(";",_);if(y===-1)y=l.length;else if(y<t){_=l.lastIndexOf(";",t-1)+1;continue}const r=l.slice(_,t).trim();if(m[r]===void 0){let a=l.slice(t+1,y).trim();a.codePointAt(0)===34&&(a=a.slice(1,-1)),m[r]=bt(a,w)}_=y+1}return m}function he(l,h,m){const n=m||{},w=n.encode||Ct;if(typeof w!="function")throw new TypeError("option encode is invalid");if(!se.test(l))throw new TypeError("argument name is invalid");const _=w(h);if(_&&!se.test(_))throw new TypeError("argument val is invalid");let t=l+"="+_;if(n.maxAge!==void 0&&n.maxAge!==null){const y=n.maxAge-0;if(Number.isNaN(y)||!Number.isFinite(y))throw new TypeError("option maxAge is invalid");t+="; Max-Age="+Math.floor(y)}if(n.domain){if(!se.test(n.domain))throw new TypeError("option domain is invalid");t+="; Domain="+n.domain}if(n.path){if(!se.test(n.path))throw new TypeError("option path is invalid");t+="; Path="+n.path}if(n.expires){if(!_t(n.expires)||Number.isNaN(n.expires.valueOf()))throw new TypeError("option expires is invalid");t+="; Expires="+n.expires.toUTCString()}if(n.httpOnly&&(t+="; HttpOnly"),n.secure&&(t+="; Secure"),n.priority)switch(typeof n.priority=="string"?n.priority.toLowerCase():n.priority){case"low":t+="; Priority=Low";break;case"medium":t+="; Priority=Medium";break;case"high":t+="; Priority=High";break;default:throw new TypeError("option priority is invalid")}if(n.sameSite)switch(typeof n.sameSite=="string"?n.sameSite.toLowerCase():n.sameSite){case!0:t+="; SameSite=Strict";break;case"lax":t+="; SameSite=Lax";break;case"strict":t+="; SameSite=Strict";break;case"none":t+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return t}function _t(l){return Object.prototype.toString.call(l)==="[object Date]"||l instanceof Date}function bt(l,h){try{return h(l)}catch{return l}}function kt(l){return l.includes("%")?decodeURIComponent(l):l}function Ct(l){return encodeURIComponent(l)}const xt={path:"/",watch:!0,decode:l=>Je(decodeURIComponent(l)),encode:l=>encodeURIComponent(typeof l=="string"?l:JSON.stringify(l))};function wt(l,h){const m={...xt,...h},n=$t(m)||{},w=O(n[l]??m.default?.());{const _=typeof BroadcastChannel>"u"?null:new BroadcastChannel(`nuxt:cookies:${l}`);Fe()&&He(()=>{_?.close()});const t=()=>{Tt(l,w.value,m),_?.postMessage(Ge(w.value))};let y=!1;_&&(_.onmessage=r=>{y=!0,w.value=r.data,ze(()=>{y=!1})}),m.watch?ye(w,(r,a)=>{y||We(r,a)||t()},{deep:m.watch!=="shallow"}):t()}return w}function $t(l={}){return gt(document.cookie,l)}function St(l,h,m={}){return h==null?he(l,h,{...m,maxAge:-1}):he(l,h,m)}function Tt(l,h,m={}){document.cookie=St(l,h,m)}const Rt=c("div",{"x-divider":""},null,-1),Re=ae({__name:"ServerRouteListItem",props:{item:{},index:{default:0}},setup(l){const h=O(!0),m=ge();return(n,w)=>{const _=ce,t=$e,y=Re;return o(),p("div",null,[c("button",{flex:"~ gap-2","w-full":"","items-start":"","items-center":"","hover-bg-active":"",px2:"",py1:"",class:E([{"bg-active":e(m)===n.item.filepath}]),style:Ke({paddingLeft:`calc(0.5rem + ${n.index*1.5}em)`}),onClick:w[0]||(w[0]=r=>{h.value=!e(h),m.value=n.item.filepath})},[c("div",{class:E({"w-12":!n.item.routes}),"flex-none":"","text-left":""},[n.item.type==="collection"?(o(),C(_,{key:0,icon:"carbon:chevron-right","mb0.5":"","transform-rotate":e(h)?90:0,transition:""},null,8,["transform-rotate"])):(o(),C(t,{key:1,class:E(("getRequestMethodClass"in n?n.getRequestMethodClass:e(le))(n.item.method||"*")),textContent:j((n.item.method||"*").toUpperCase())},null,8,["class","textContent"]))],2),c("span",{class:E({"flex items-center":n.item.routes}),"text-sm":"","font-mono":""},[n.item.type==="collection"?(o(),C(_,{key:0,title:`${n.item.routes?.length} routes`,icon:"carbon:folder",mr1:""},null,8,["title"])):D("",!0),F(" "+j(n.item.route),1)],2)],6),Rt,e(h)?ee(n.$slots,"default",{key:0},()=>[(o(!0),p(V,null,A(n.item.routes,r=>(o(),C(y,{key:r.filepath,item:r,index:n.index+1},null,8,["item","index"]))),128))]):D("",!0)])}}}),Vt={p4:"",flex:"~ col gap-4"},Ut={key:1,ml2:"",flex:""},It=["value"],Dt={key:0,flex:"","gap-4":""},Nt=c("div",{"flex-auto":""},null,-1),Ve=ae({__name:"ServerRouteInputs",props:{modelValue:{},keys:{default:()=>[]},default:{default:()=>({})},disabled:{type:Boolean,default:!1}},setup(l,{emit:h}){const m=l,n=Qe(m,"modelValue",h,{passive:!0}),w=R(()=>[...m.keys,"key","value","type"]),_=R(()=>{const r={};for(const a of w.value)r[a]=m.default[a]||"";return r}),t=["string","number","boolean","file","date","time","datetime-local"];function y(r,a){const U=a.target;if(U.files&&U.files[0]){const J=U.files[0],M=new FileReader;M.readAsDataURL(J),M.onload=()=>{n.value[r].value=M.result}}}return ye(()=>n,r=>{r.value.forEach(a=>{if(a.type==="number"&&typeof a.value!="number"){const U=Number.parseFloat(a.value);a.value=Number.isNaN(U)?0:U}else a.type==="boolean"&&typeof a.value!="boolean"?a.value=!0:a.type==="file"&&typeof a.value!="object"?a.value="":a.type==="date"&&typeof a.value=="string"&&!a.value.match(/^\d{4}-\d{2}-\d{2}$/)?a.value=new Date().toISOString().slice(0,10):a.type==="time"&&typeof a.value=="string"&&!a.value.match(/^\d{2}:\d{2}$/)?a.value=new Date().toISOString().slice(11,16):a.type==="datetime-local"&&typeof a.value=="string"&&!a.value.match(/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}$/)?a.value=new Date().toISOString().slice(0,16):a.type==="string"&&(a.value=a.value.toString())})},{deep:!0,immediate:!0,flush:"sync"}),(r,a)=>{const U=_e,J=ct,M=Se,z=ce,v=be;return o(),p("div",Vt,[(o(!0),p(V,null,A(e(n),(d,x)=>(o(),p("div",{key:x,flex:"~ gap-2","justify-around":""},[ee(r.$slots,"input",{item:d}),(o(!0),p(V,null,A(e(w),$=>(o(),p(V,{key:$},[d.type!==null&&$==="key"?(o(),C(U,{key:0,modelValue:d[$],"onUpdate:modelValue":g=>d[$]=g,placeholder:$,"flex-1":"","font-mono":"",n:"sm primary",disabled:r.disabled,class:E(r.disabled?"op50":"")},null,8,["modelValue","onUpdate:modelValue","placeholder","disabled","class"])):$==="value"?(o(),p(V,{key:1},[d.type==="file"?(o(),C(U,{key:0,type:"file",disabled:r.disabled,class:E(r.disabled?"op75":""),onChange:g=>y(x,g)},null,8,["disabled","class","onChange"])):d.type==="boolean"?(o(),p("div",Ut,[f(J,{modelValue:d.value,"onUpdate:modelValue":g=>d.value=g,placeholder:"Value",n:"green lg",disabled:r.disabled},null,8,["modelValue","onUpdate:modelValue","disabled"])])):(o(),C(U,{key:2,modelValue:d.value,"onUpdate:modelValue":g=>d.value=g,type:d.type,placeholder:"Value","flex-1":"","font-mono":"",n:"sm primary",disabled:r.disabled,class:E(r.disabled?"op75":"")},null,8,["modelValue","onUpdate:modelValue","type","disabled","class"]))],64)):$==="type"?(o(),C(M,{key:2,modelValue:d.type,"onUpdate:modelValue":g=>d.type=g,n:"sm green",class:E(r.disabled?"op75":""),disabled:r.disabled},{default:k(()=>[(o(),p(V,null,A(t,g=>c("option",{key:g,value:g},j(g),9,It)),64))]),_:2},1032,["modelValue","onUpdate:modelValue","class","disabled"])):D("",!0)],64))),128)),ee(r.$slots,"input-actions",{},()=>[f(v,{n:"red",disabled:r.disabled,class:E(r.disabled?"op0!":""),onClick:$=>e(n).splice(x,1)},{default:k(()=>[f(z,{icon:"carbon:delete"})]),_:2},1032,["disabled","class","onClick"])])]))),128)),r.disabled?D("",!0):(o(),p("div",Dt,[ee(r.$slots,"actions",{params:e(n)},()=>[f(v,{icon:"carbon-add",n:"sm primary",my1:"","px-3":"",onClick:a[0]||(a[0]=d=>e(n).push({...e(_)}))},{default:k(()=>[F(" Add ")]),_:1}),Nt,e(n).length?(o(),C(v,{key:0,icon:"carbon-trash-can",n:"sm red",my1:"","px-3":"",onClick:a[1]||(a[1]=d=>n.value=[])},{default:k(()=>[F(" Remove All ")]),_:1})):D("",!0)])])),ee(r.$slots,"default")])}}}),Ue=O(await ke.getOptions("serverRoutes")),Et=Xe(Ue),jt={serverRoutes:Et};function Ie(l){return jt[l]}Ye(Ue,async l=>{ke.updateOptions("serverRoutes",l)},{deep:!0,flush:"post",debounce:500,maxWait:1e3});const Ot={"h-full":"","w-full":"",flex:"~ col"},Pt={flex:"~ col gap-2","flex-none":"",p4:"","navbar-glass":""},qt={flex:"~ gap2"},Bt={flex:"~ gap2 wrap","w-full":"","items-center":"",px4:"",pb2:"","text-center":"","text-sm":"",border:"b base"},Lt=c("div",{"flex-auto":""},null,-1),At={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:""},Wt=c("div",{"w-5":"","x-divider":""},null,-1),Jt=c("div",{"flex-none":""}," Default Inputs ",-1),Gt=c("div",{"x-divider":""},null,-1),Kt={key:2},Qt={key:3,border:"b base",relative:"","n-code-block":""},Xt={flex:"~ wrap","w-full":""},Yt=["onClick"],Zt=c("div",{border:"b base","flex-auto":""},null,-1),eo={border:"b base",flex:"~ gap2","items-center":"",px4:"",py2:""},to=c("div",null,"Response",-1),oo={key:1,"text-xs":"",op50:""},no=c("div",{"flex-auto":""},null,-1),so=c("div",{op50:""}," Request finished in ",-1),lo={key:0,"flex-auto":"","overflow-auto":""},ao={border:"~ base","h-full":"","w-full":"",rounded:""},ro=["data"],io={key:2,"flex-auto":"","overflow-auto":"",p4:""},uo={border:"~ base",rounded:""},co=["src"],po={key:1,controls:"",rounded:""},fo=["src"],mo=ae({__name:"ServerRouteDetails",props:{route:{}},emits:["open-default-input"],setup(l,{emit:h}){const m=l,[n,w]=Ze(),_=et(),t=ue({contentType:"text/plain",data:"",statusCode:200,error:void 0,fetchTime:0}),y=R(()=>t.contentType.includes("application/json")?"json":t.contentType.includes("text/html")?"html":t.contentType.includes("text/css")?"css":t.contentType.includes("text/javascript")?"javascript":t.contentType.includes("image")||t.contentType.includes("video")?"media":t.contentType.includes("text/xml")||t.contentType.includes("application/xml")?"xml":t.contentType.includes("application/pdf")?"pdf":"text"),r=R(()=>{if(y.value==="json")return JSON.stringify(t.data,null,2);if(y.value==="media"||y.value==="pdf"){const s=new Blob([t.data],{type:t.contentType});return URL.createObjectURL(s)}return t.data}),a=O(!1),U=O(!1),J=tt(),M=R(()=>m.route.route?.split(/((?:\*\*)?:[\w_]+)/g)),z=R(()=>M.value?.filter(s=>s.startsWith(":")||s.startsWith("**:"))||[]),v=O(m.route.method||"GET"),d=O({}),x=ue({query:[{key:"",value:"",type:"string"}],body:[{key:"",value:"",type:"string"}],headers:[{key:"Content-Type",value:"application/json",type:"string"}]}),$=O({}),{inputDefaults:g}=Ie("serverRoutes"),P=["GET","POST","PUT","PATCH","DELETE","HEAD"],q=["PATCH","POST","PUT","DELETE"],B=R(()=>q.includes(v.value.toUpperCase())),S=O(z.value.length?"params":"query"),oe=["input","json"],H=O(oe[0]),K=R({get:()=>x[S.value],set:s=>{x[S.value]=s}}),X=R(()=>({...G(g.value.query),...G(x.query)})),T=R(()=>({...G(g.value.headers),...G(x.headers)})),Y=R(()=>B.value?H.value==="json"?{...G(g.value.body),...$.value}:{...G(g.value.body),...G(x.body)}:void 0),De=R(()=>{let s=_.value?.devServer.url||"http://localhost";s.charAt(s.length-1)==="/"&&(s=s.slice(0,-1));const u=_.value?.devServer.port||3e3;return s.includes(`:${u}`)?s:`${s}:${u}`}),ne=R(()=>{let s=new URLSearchParams(X.value).toString();s&&(s=`?${s}`);const u=(M.value?.map(N=>(N.startsWith(":")||N.startsWith("**:"))&&d.value[N]||N).join("")||"")+s;let b=_.value?.app.baseURL||"";return(b==="./"||b===".")&&(b=""),b.endsWith("/")&&(b=b.slice(0,-1)),b+u}),Ne=R(()=>De.value+ne.value);function G(s){const u=Object.fromEntries(s.filter(({key:b,value:N})=>b&&N!==void 0).map(({key:b,value:N})=>[b,N]));return Object.entries(u).length?u:void 0}async function pe(){U.value=!0,a.value=!0;const s=Date.now();try{t.data=await $fetch(Ne.value,{method:v.value.toUpperCase(),headers:T.value,query:X.value,body:Y.value,onResponse({response:u}){t.contentType=(u.headers.get("content-type")||"").toString().toLowerCase().trim(),t.statusCode=u.status,t.error=void 0},onResponseError(u){t.error=u.response._data,t.data=u.response._data}})}catch{}a.value=!1,t.fetchTime=Date.now()-s}const fe=R(()=>{const s=[],u=[],b=Object.entries(T.value).filter(([I,L])=>I&&L&&!(I==="Content-Type"&&L==="application/json")).map(([I,L])=>` '${I}': '${L}'`).join(`,
|
|
2
|
+
`);v.value.toUpperCase()!=="GET"&&u.push(`method: '${v.value.toUpperCase()}'`),b&&u.push(`headers: {
|
|
3
|
+
${b}
|
|
4
|
+
}`),Y.value&&u.push(`body: ${JSON.stringify(Y.value,null,2)}`);const N=u.length?`, {
|
|
5
|
+
${u.join(`,
|
|
6
|
+
`).split(`
|
|
7
|
+
`).map(I=>` ${I}`).join(`
|
|
8
|
+
`)}
|
|
9
|
+
}`:"";return s.push({name:"useFetch",lang:"javascript",docs:ve.nuxt.useFetch,code:`const { data, pending, error, refresh } = useFetch('${ne.value}'${N})`}),s.push({name:"$fetch",lang:"javascript",docs:ve.nuxt.$fetch,code:`await $fetch('${ne.value}'${N})`}),s}),Ee=R(()=>{const s=[];return z.value.length&&s.push({name:"Params",slug:"params",length:z.value.length}),s.push({name:"Query",slug:"query",length:x.query.length}),B.value&&s.push({name:"Body",slug:"body",length:x.body.length}),s.push({name:"Headers",slug:"headers",length:x.headers.length}),s.push({name:"Cookies",slug:"cookies"}),s.push({name:"Snippets",slug:"snippet"}),s}),Z=O(je());function je(){return document.cookie.split("; ").map(s=>{const[u,b]=s.split("=");return{key:u,value:b}})}const W=ue({key:"",value:""});function re(s,u){if(!s)return;const b=Z.value.find(I=>I.key===s),N=wt(s);b!==void 0?u===void 0&&(Z.value=Z.value.filter(I=>I.key!==s)):(Z.value.push({key:s,value:u}),W.key="",W.value=""),N.value=u}return ot(()=>{H.value==="json"&&typeof $.value=="string"&&($.value=JSON.parse($.value))}),(s,u)=>{const b=be,N=Se,I=_e,L=ce,Oe=xe,me=Ve,Pe=pt,qe=we,Be=st,ie=$e,Le=ft,Ae=mt,Me=Ce("tooltip");return o(),p("div",Ot,[c("div",Pt,[c("div",qt,[s.route.method?(o(),C(b,{key:0,class:E(("getRequestMethodClass"in s?s.getRequestMethodClass:e(le))(e(v))),"pointer-events-none":"",tabindex:"-1"},{default:k(()=>[F(j(e(v).toUpperCase()),1)]),_:1},8,["class"])):(o(),C(N,{key:1,modelValue:e(v),"onUpdate:modelValue":u[0]||(u[0]=i=>te(v)?v.value=i:null),class:E(("getRequestMethodClass"in s?s.getRequestMethodClass:e(le))(e(v)))},{default:k(()=>[(o(),p(V,null,A(P,i=>c("option",{key:i,class:E(("getRequestMethodClass"in s?s.getRequestMethodClass:e(le))(i))},j(i.toUpperCase()),3)),64))]),_:1},8,["modelValue","class"])),f(I,{"model-value":e(ne),disabled:"","flex-auto":"","font-mono":"",p:"x5 y2",n:"primary xs"},null,8,["model-value"]),f(b,{n:"primary solid",onClick:pe},{default:k(()=>[f(L,{icon:"carbon:send"})]),_:1})])]),c("div",Bt,[(o(!0),p(V,null,A(e(Ee),i=>(o(),C(b,{key:i.slug,class:E(e(S)===i.slug?"text-primary n-primary":"border-transparent shadow-none"),onClick:Q=>S.value=i.slug},{default:k(()=>[f(L,{icon:("ServerRouteTabIcons"in s?s.ServerRouteTabIcons:e(Te))[i.slug]},null,8,["icon"]),F(" "+j(i.name)+" "+j(i?.length?`(${i.length})`:"")+" ",1),c("span",null,j(e(g)[i.slug]?.length?`(${e(g)[i.slug].length})`:""),1)]),_:2},1032,["class","onClick"]))),128)),Lt,de((o(),C(b,{title:"Open in Editor",onClick:u[1]||(u[1]=i=>e(J)(s.route.filepath))},{default:k(()=>[f(L,{icon:"carbon-launch"})]),_:1})),[[Me,"Open in Editor"]])]),e(S)==="params"?(o(),p("div",At,[(o(!0),p(V,null,A(e(z),i=>(o(),p(V,{key:i},[c("div",Mt,j(i),1),f(I,{modelValue:e(d)[i],"onUpdate:modelValue":Q=>e(d)[i]=Q,placeholder:i,"flex-1":""},null,8,["modelValue","onUpdate:modelValue","placeholder"])],64))),128))])):D("",!0),e(S)==="cookies"?(o(),p("div",Ft,[(o(!0),p(V,null,A(e(Z),i=>(o(),p("div",{key:i.key,flex:"~ gap-4 items-center"},[f(I,{placeholder:"Key...","model-value":i.key,disabled:"","op-70":""},null,8,["model-value"]),f(I,{placeholder:"Value...","model-value":i.value,"flex-1":"",n:"primary",onInput:Q=>re(i.key,Q.target?.value)},null,8,["model-value","onInput"]),f(b,{title:"Delete",n:"red",onClick:Q=>re(i.key,void 0)},{default:k(()=>[f(L,{icon:"i-carbon-delete"})]),_:2},1032,["onClick"])]))),128)),c("div",Ht,[f(I,{modelValue:e(W).key,"onUpdate:modelValue":u[2]||(u[2]=i=>e(W).key=i),placeholder:"Key",n:"primary","flex-1":""},null,8,["modelValue"]),f(I,{modelValue:e(W).value,"onUpdate:modelValue":u[3]||(u[3]=i=>e(W).value=i),placeholder:"Value",n:"primary","flex-1":""},null,8,["modelValue"]),f(b,{title:"Add",n:"primary",onClick:u[4]||(u[4]=i=>re(e(W).key,e(W).value))},{default:k(()=>[f(L,{icon:"i-carbon-save"})]),_:1})])])):D("",!0),f(e(n),null,{default:k(()=>[f(me,{modelValue:e(K),"onUpdate:modelValue":u[7]||(u[7]=i=>te(K)?K.value=i:null),default:{type:"string"},"max-h-xs":"","of-auto":""},{default:k(()=>[e(g)[e(S)]?.length?(o(),p(V,{key:0},[c("div",zt,[Wt,Jt,f(Oe,{icon:"i-carbon-edit",onClick:u[5]||(u[5]=i=>h("open-default-input"))}),Gt]),f(me,{modelValue:e(g)[e(S)],"onUpdate:modelValue":u[6]||(u[6]=i=>e(g)[e(S)]=i),disabled:"",p0:""},null,8,["modelValue"])],64)):D("",!0)]),_:1},8,["modelValue"])]),_:1}),e(S)==="snippet"?(o(),p("div",Kt,[e(fe).length?(o(),C(Pe,{key:0,"code-snippets":e(fe)},null,8,["code-snippets"])):D("",!0)])):e(K)?(o(),p("div",Qt,[e(S)==="body"?(o(),p(V,{key:0},[c("div",Xt,[(o(),p(V,null,A(oe,i=>c("button",{key:i,px4:"",py2:"",border:"r base",hover:"bg-active",class:E({"border-b":i!==e(H)}),onClick:Q=>H.value=i},[c("div",{class:E({op30:i!==e(H)}),"font-mono":""},j(i),3)],10,Yt)),64)),Zt]),e(H)==="input"?(o(),C(e(w),{key:0})):e(H)==="json"?(o(),C(e(vt),nt({key:1,modelValue:e($),"onUpdate:modelValue":u[8]||(u[8]=i=>te($)?$.value=i:null),class:[[s.$colorMode.value==="dark"?"jse-theme-dark":"light"],"json-editor-vue of-auto text-sm outline-none"]},s.$attrs,{mode:"text","navigation-bar":!1,indentation:2,"tab-size":2}),null,16,["modelValue","class"])):D("",!0)],64)):(o(),C(e(w),{key:1}))])):D("",!0),e(U)?e(a)?(o(),C(Be,{key:5,"z-10":"","flex-auto":"","backdrop-blur":""},{default:k(()=>[F(" Fetching... ")]),_:1})):(o(),p(V,{key:6},[c("div",eo,[to,e(t).error?(o(),C(ie,{key:0,"bg-red-400:10":"","text-red-400":""},{default:k(()=>[F(" Error ")]),_:1})):D("",!0),f(ie,{class:E({"bg-orange-400:10 text-orange-400":e(t).error,"bg-green-400:10 text-green-400":!e(t).error})},{default:k(()=>[F(j(e(t).statusCode),1)]),_:1},8,["class"]),e(t).contentType?(o(),p("code",oo,j(e(t).contentType),1)):D("",!0),e(t).contentType==="application/json"?(o(),C(Le,{key:2,getter:()=>({input:e(r)})},null,8,["getter"])):D("",!0),no,so,f(ie,{"bg-green-400:10":"","text-green-400":""},{default:k(()=>[F(j(e(t).fetchTime)+" ms ",1)]),_:1})]),e(y)==="pdf"?(o(),p("div",lo,[c("div",ao,[c("object",{data:e(r),type:"application/pdf","flex-auto":"",width:"100%",height:"100%",rounded:""},null,8,ro)])])):e(y)!=="media"?(o(),C(Ae,{key:1,"flex-auto":"","overflow-auto":"","py-2":"",code:e(r),lang:e(y)},null,8,["code","lang"])):(o(),p("div",io,[c("div",uo,[e(t).contentType.includes("image")?(o(),p("img",{key:0,rounded:"",src:e(r)},null,8,co)):(o(),p("video",po,[c("source",{src:e(r),type:"video/mp4"},null,8,fo)]))])]))],64)):(o(),C(qe,{key:4},{default:k(()=>[f(b,{n:"primary",onClick:pe},{default:k(()=>[f(L,{icon:"carbon:send"}),F(" Send request ")]),_:1})]),_:1}))])}}}),vo={flex:"~ gap1","text-sm":""},ho={key:0,op50:""},yo={op50:""},go=c("span",{op75:""},"Select a route to start",-1),_o=c("div",{p4:"",border:"b base"},[c("span",{"text-lg":""},"Default Inputs"),c("br"),c("span",{"text-white":"",op50:""},"Merged as default for every request in DevTools")],-1),Eo=ae({__name:"server-routes",setup(l){const h=O(!1),m=lt(),n=ge(),{selectedRoute:w,view:_,inputDefaults:t}=Ie("serverRoutes"),y=R(()=>{!n.value&&w.value&&(n.value=w.value.filepath);const v=m.value?.find(d=>d.filepath===n.value);return n.value!==w.value?.filepath&&v&&(w.value=v),v}),r=O(""),a=R(()=>new at(m.value||[],{keys:["method","route"],shouldSort:!0})),U=R(()=>m.value?r.value?a.value.search(r.value).map(d=>d.item):m.value:[]),J=R(()=>{const v=[],d=(x,$)=>{x.routes=x.routes||[],x.routes.push($)};return U.value.forEach(x=>{const $=x.filepath.split("/"),g=$.slice($.indexOf("server")+1);g.length>0&&g[g.length-1].includes(".")&&g.pop();let P=null;if(g.forEach(q=>{const B=P?P.routes?.find(S=>S.route===q):v.find(S=>S.route===q);if(B)P=B;else{const S={route:q,filepath:q.replace(/\W/g,"-").toLowerCase(),type:"collection",routes:[]};P?d(P,S):v.push(S),P=S}}),x.type==="runtime"){const q=v.find(B=>B.route==="runtime");if(q)d(q,x);else{const B={route:"runtime",filepath:"runtime",type:"collection",routes:[x]};v.push(B)}}else P?d(P,x):v.push(x)}),v});function M(){_.value=_.value==="tree"?"list":"tree"}function z(v){return v.charAt(0).toUpperCase()+v.slice(1)}return(v,d)=>{const x=xe,$=dt,g=Re,P=mo,q=ut,B=we,S=rt,oe=Ve,H=ht,K=yt,X=Ce("tooltip");return o(),p(V,null,[f(S,{"storage-key":"tab-server-routes"},{left:k(()=>[f($,{search:e(r),"onUpdate:search":d[1]||(d[1]=T=>te(r)?r.value=T:null),pb2:""},{actions:k(()=>[de(f(x,{"text-lg":"",icon:e(_)==="list"?"i-carbon-list":"i-carbon-tree-view-alt",title:"Toggle view",onClick:M},null,8,["icon"]),[[X,"Toggle View"]]),de(f(x,{"text-lg":"",icon:"i-carbon-cics-sit-overrides",title:"Default Inputs",onClick:d[0]||(d[0]=T=>h.value=!e(h))},null,512),[[X,"Default Inputs"]])]),default:k(()=>[c("div",vo,[e(r)?(o(),p("span",ho,j(e(U).length)+" matched · ",1)):D("",!0),c("span",yo,j(e(m)?.length)+" routes in total",1)])]),_:1},8,["search"]),(o(!0),p(V,null,A(e(_)==="tree"?e(J):e(U),T=>(o(),C(g,{key:T.filepath,item:T},null,8,["item"]))),128))]),right:k(()=>[(o(),C(it,{max:10},[e(y)?(o(),C(P,{key:e(y).filepath,route:e(y),onOpenDefaultInput:d[2]||(d[2]=T=>h.value=!0)},null,8,["route"])):D("",!0)],1024)),e(y)?D("",!0):(o(),C(B,{key:0},{default:k(()=>[f(q,{px6:"",py2:""},{default:k(()=>[go]),_:1})]),_:1}))]),_:1}),f(K,{modelValue:e(h),"onUpdate:modelValue":d[3]||(d[3]=T=>te(h)?h.value=T:null),"auto-close":"","max-w-xl":"","min-w-xl":"",onClose:d[4]||(d[4]=T=>h.value=!1)},{default:k(()=>[c("div",null,[_o,(o(!0),p(V,null,A(Object.keys(e(t)),T=>(o(),C(H,{key:T,text:`${z(T)} ${e(t)[T].length?`(${e(t)[T].length})`:""}`,padding:!1,icon:("ServerRouteTabIcons"in v?v.ServerRouteTabIcons:e(Te))[T]},{default:k(()=>[f(oe,{modelValue:e(t)[T],"onUpdate:modelValue":Y=>e(t)[T]=Y,py0:"",default:{type:"string"}},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["text","icon"]))),128))])]),_:1},8,["modelValue"])],64)}}});export{Eo as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as L}from"./NIconTitle.vue.e492e44a.js";import{_ as H}from"./NSwitch.vue.855c3f98.js";import{d as R,am as q,bz as G,av as J,ar as I,m as d,i,k as e,F as m,n as k,f as t,j as r,l as C,ah as K,bA as Q,o as c,E as S,t as g,h as W,p as z,v as X,bu as Y,_ as Z,C as ee}from"./entry.704683a1.js";import{_ as le}from"./NSelect.vue.6e592a84.js";import{_ as ne}from"./NCheckbox.vue.76b79ec0.js";const oe={px6:"",py6:""},te={grid:"~ md:cols-2 gap-x-10 gap-y-3","max-w-300":""},ae={flex:"~ col gap-1",py3:""},se=e("h3",{mb1:"","text-lg":""}," Tabs ",-1),ie={flex:"~ gap-2","flex-auto":"","items-center":"","justify-start":""},ue={capitalize:"",op75:""},ce={flex:"~ col gap-1",border:"~ base rounded",py3:"",pl4:"",pr2:""},de=e("div",{"flex-auto":""},null,-1),re={py3:"",flex:"~ col gap-1",border:"b base"},pe=e("h3",{mb1:"","text-lg":""}," Appearance ",-1),me=e("div",{"carbon-sun":"","dark:carbon-moon":"","translate-y--1px":""},null,-1),_e={py3:"",flex:"~ col gap-1",border:"b base"},fe=e("h3",{mb1:"","text-lg":""}," Floating Panel ",-1),ve=e("p",null,"Minimize panel on inactive",-1),ge=["value"],xe={py3:"",flex:"~ col gap-1",border:"b base"},he=e("h3",{mb1:"","text-lg":""}," UI Scale ",-1),be=["value"],ye={py3:"",flex:"~ col gap-1"},ke=e("h3",{mb1:"","text-lg":""}," Features ",-1),Ce=e("span",null,"Close DevTools when clicking outside",-1),Ve=e("span",null,"Show help buttons",-1),Ie=R({__name:"settings",setup(Te){const{interactionCloseOnOutsideClick:x,showHelpButtons:V,scale:T,hiddenTabs:_,pinnedTabs:a,hiddenTabCategories:f,minimizePanelInactive:h}=K(),N=q(),B=[["Tiny",12/15],["Small",14/15],["Normal",1],["Large",16/15],["Huge",18/15]],D=[["Always",0],["1s",1e3],["2s",2e3],["5s",5e3],["10s",1e4],["Never",-1]],P=G(J());function j(s,n){n?_.value=_.value.filter(u=>u!==s):_.value.push(s)}function A(s,n){n?f.value=f.value.filter(u=>u!==s):f.value.push(s)}function F(s){a.value.includes(s)?a.value=a.value.filter(n=>n!==s):a.value.push(s)}function $(s,n){const u=a.value.indexOf(s);if(u===-1)return;const p=u+n;if(p<0||p>=a.value.length)return;const v=[...a.value];v.splice(u,1),v.splice(p,0,s),a.value=v}return I(()=>{N.value.frameState.value.closeOnOutsideClick=x.value}),I(()=>{N.value.frameState.value.minimizePanelInactive=h.value}),(s,n)=>{const u=L,p=H,v=Y,w=Z,M=ee,E=Q,O=le,U=ne;return c(),d("div",oe,[i(u,{class:"mb-5 text-xl op75",icon:"i-carbon-settings-adjust",text:"DevTools Settings"}),e("div",te,[e("div",ae,[se,(c(!0),d(m,null,k(t(P),([l,b])=>(c(),d(m,{key:l},[b.length?(c(),d("div",{key:0,flex:"~ col gap-1","mx--1":"",class:S(t(f).includes(l)?"op50 grayscale":""),"pt-2":""},[i(p,{flex:"~ row-reverse",px2:"",py1:"","n-lime":"","model-value":!t(f).includes(l),"onUpdate:modelValue":o=>A(l,o)},{default:r(()=>[e("div",ie,[e("span",ue,g(l),1)])]),_:2},1032,["model-value","onUpdate:modelValue"]),e("div",ce,[(c(!0),d(m,null,k(b,o=>(c(),W(p,{key:o.name,flex:"~ row-reverse",py1:"",pl2:"",pr1:"","n-primary":"","model-value":!t(_).includes(o.name),"onUpdate:modelValue":y=>j(o.name,y)},{default:r(()=>[e("div",{flex:"~ gap-2","flex-auto":"","items-center":"","justify-start":"","pr-4":"",class:S(t(_).includes(o.name)?"op25":"")},[i(v,{"text-xl":"",icon:o.icon,title:o.title},null,8,["icon","title"]),e("span",null,g(o.title),1),de,t(a).includes(o.name)?(c(),d(m,{key:0},[i(w,{icon:"i-carbon-caret-up",disabled:t(a).indexOf(o.name)===0,onClick:y=>$(o.name,-1)},null,8,["disabled","onClick"]),i(w,{icon:"i-carbon-caret-down",disabled:t(a).indexOf(o.name)===t(a).length-1,onClick:y=>$(o.name,1)},null,8,["disabled","onClick"])],64)):z("",!0),i(w,{icon:t(a).includes(o.name)?" i-carbon-pin-filled rotate--45":" i-carbon-pin op50",onClick:y=>F(o.name)},null,8,["icon","onClick"])],2)]),_:2},1032,["model-value","onUpdate:modelValue"]))),128))])],2)):z("",!0)],64))),128))]),e("div",null,[e("div",re,[pe,e("div",null,[i(E,null,{default:r(({toggle:l,isDark:b})=>[i(M,{n:"primary",onClick:l},{default:r(()=>[me,X(" "+g(b.value?"Dark":"Light"),1)]),_:2},1032,["onClick"])]),_:1})])]),e("div",_e,[fe,ve,i(O,{modelValue:t(h),"onUpdate:modelValue":n[0]||(n[0]=l=>C(h)?h.value=l:null),modelModifiers:{number:!0},n:"primary"},{default:r(()=>[(c(),d(m,null,k(D,l=>e("option",{key:l[0],value:l[1]},g(l[0]),9,ge)),64))]),_:1},8,["modelValue"])]),e("div",xe,[he,i(O,{modelValue:t(T),"onUpdate:modelValue":n[1]||(n[1]=l=>C(T)?T.value=l:null),n:"primary"},{default:r(()=>[(c(),d(m,null,k(B,l=>e("option",{key:l[0],value:l[1]},g(l[0]),9,be)),64))]),_:1},8,["modelValue"])]),e("div",ye,[ke,i(U,{modelValue:t(x),"onUpdate:modelValue":n[2]||(n[2]=l=>C(x)?x.value=l:null),"n-primary":""},{default:r(()=>[Ce]),_:1},8,["modelValue"]),i(U,{modelValue:t(V),"onUpdate:modelValue":n[3]||(n[3]=l=>C(V)?V.value=l:null),"n-primary":""},{default:r(()=>[Ve]),_:1},8,["modelValue"])])])])])}}});export{Ie as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{am as m,a$ as n,a as s,J as o}from"./entry.704683a1.js";function u(){const p=m(),t=n("getComponents",()=>o.getComponents()),l=s(()=>Object.entries(p.value?.nuxt?.vueApp._context.components||{}).map(([e])=>({pascalName:e,global:!0})).filter(e=>!/^Lazy[A-Z]/.test(e.pascalName)).filter(e=>!(t.value||[]).find(a=>a.pascalName===e.pascalName)));return s(()=>[...l.value,...t.value||[]].sort((e,a)=>e.pascalName.localeCompare(a.pascalName)))}function r(){return n("getComponentsRelationships",()=>o.getComponentsRelationships())}export{u as a,r as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as F}from"./Badge.809c442f.js";import{_ as L}from"./NCodeBlock.vue.a8601f10.js";import{_ as E}from"./NCheckbox.vue.76b79ec0.js";import{_ as A}from"./NTip.vue.6bf7cf97.js";import{d as G,N as W,b0 as q,r as V,b1 as z,L as H,P as J,o as m,m as v,a5 as K,f as t,t as $,p as w,F as B,i as s,h as O,j as u,k as h,l as M,v as p,C as Q,V as X,b2 as Y,a7 as Z,a as ee,ak as te,al as ae,b3 as se,a$ as ne}from"./entry.704683a1.js";const oe={key:0},le={p4:"",flex:"~ col gap-1"},re={class:"text-lg font-medium leading-6"},ue=h("p",{op50:""}," The following command will be executed in your terminal: ",-1),ie={flex:"~ gap-3",mt2:"","justify-end":""},ge=G({__name:"NpmVersionCheck",props:{packageName:{},options:{},showVersion:{type:Boolean,default:!0}},setup(l){const a=l,e=W(),{info:n,update:i,state:y,processId:k,restart:c}=q(a.packageName,a.options),f=V(!0),_=V(!0),U=z(),x=H(),R=J();async function C(){const r=await i(async o=>x.start(o));r&&_.value&&U.value.push({id:r,message:`${a.packageName} has been updated. Do you want to restart the Nuxt server now?`}),r&&f.value&&(R.value=r,e.push("/modules/terminals"))}return(r,o)=>{const b=F,S=L,N=E,T=A,P=Q,j=X;return m(),v(B,null,[K(r.$slots,"default",{id:t(k),info:t(n),update:C,state:t(y),restart:t(c)},()=>[t(n)&&r.showVersion?(m(),v("code",oe,$(`v${t(n).current}`),1)):w("",!0),t(n)?.latest?(m(),v(B,{key:1},[t(n).needsUpdate?(m(),v("button",{key:0,onClick:o[0]||(o[0]=g=>C())},[s(b,{"bg-green-400:10":"","text-green-400":"",title:"updates available",textContent:"updates available"})])):(m(),O(b,{key:1,"bg-gray-400:10":"","text-gray-400":"",title:"latest",textContent:"latest"}))],64)):w("",!0)]),s(t(x),null,{default:u(({resolve:g,args:I})=>[s(j,{"model-value":!0,onClose:d=>g(!1)},{default:u(()=>[h("div",le,[h("h3",re," Update "+$(a.packageName)+"? ",1),ue,s(S,{code:I[0],lang:"bash",my3:"",px4:"",py2:"",border:"~ base rounded",lines:!1},null,8,["code"]),s(N,{modelValue:t(f),"onUpdate:modelValue":o[1]||(o[1]=d=>M(f)?f.value=d:null),n:"primary"},{default:u(()=>[p(" Navigate to terminal ")]),_:1},8,["modelValue"]),s(N,{modelValue:t(_),"onUpdate:modelValue":o[2]||(o[2]=d=>M(_)?_.value=d:null),n:"primary"},{default:u(()=>[p(" Restart Nuxt server after update ")]),_:1},8,["modelValue"]),h("div",ie,[s(T,{n:"sm purple","flex-auto":"",icon:"carbon-chemistry"},{default:u(()=>[p(" Experimental feature. Please make sure to backup your project first. ")]),_:1}),s(P,{onClick:d=>g(!1)},{default:u(()=>[p(" Cancel ")]),_:2},1032,["onClick"]),s(P,{n:"solid primary",onClick:d=>g(!0)},{default:u(()=>[p(" Update ")]),_:2},1032,["onClick"])])])]),_:2},1032,["onClose"])]),_:1})],64)}}}),D=["pages","meta","components","imports","nuxt-config-schema","@nuxt/devtools","@nuxt/telemetry"];function de(){return ne("getModulesList",async()=>(await $fetch("https://cdn.jsdelivr.net/npm/@nuxt/modules@latest/modules.json")).filter(a=>!D.includes(a.npm)&&a.compatibility.nuxt.includes("^3")))}function ve(){return Y("installed-modules",()=>{const l=Z(),a=de();return ee(()=>(l.value?._installedModules||[]).map(e=>{if(!e.entryPath)return;const n=e.entryPath&&te(e.entryPath),i=e.meta?.name?e.meta?.name:e.entryPath?n?ae(e.entryPath):l.value?.rootDir?se(e.entryPath,l.value?.rootDir).path:void 0:void 0,y=l.value?.modules?.includes(i),k=a.value?.find(c=>c.npm===i)||a.value?.find(c=>c.name===i);return{name:i,isPackageModule:n,isUninstallable:y,info:k,...e}}).filter(e=>e&&(!e.name||!D.includes(e.name))))})}export{ge as _,de as a,ve as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as z,N as ae,r as U,O as E,bm as P,as as oe,w as se,ar as le,W as re,a as ue,J as f,K as k,f as t,o as l,h as _,j as u,k as r,i as d,l as j,m as i,F as w,n as D,t as b,E as T,aW as A,v as c,p as F,aI as ie,H as ce,b4 as de,bn as pe,bo as _e,bp as W,_ as me,U as fe,a0 as ve,C as ye,ai as ge,A as he,R as ke,ax as be}from"./entry.704683a1.js";import{_ as xe}from"./NSelect.vue.6e592a84.js";import{_ as we}from"./NLink.vue.e00535a9.js";import{_ as Ce}from"./FilepathItem.vue.a9853d6c.js";import{U as Ke}from"./json-editor-vue.d2d6ca22.js";const Se={class:"h-[48px] flex items-center justify-between gap1 px-3"},$e={class:"w-full text-sm"},Ve=["value"],Ne=["onClick"],Ie=r("div",{"x-divider":""},null,-1),Ue={key:0,"h-full":"","of-hidden":"",flex:"~ col"},je={border:"b base",class:"h-[49px] flex flex-none items-center justify-between px-4 text-sm"},De={class:"flex items-center gap-4"},Ae={key:1},Be=["onKeyup"],Le=r("br",null,null,-1),Me={key:0,op50:""},Re={key:1},qe=r("code",null,"nitro.storage",-1),Ee=r("br",null,null,-1),Pe={"font-bold":""},Te=r("br",null,null,-1),Fe={"text-sm":""},We=r("br",null,null,-1),ze=z({__name:"StorageDetails",async setup(O){let p,g;const C=_e(),h=ae(),x=U(""),v=U(""),s=E("storage:current",""),e=U(),y=E("storage:file:state",""),{data:K}=([p,g]=P(()=>W("storageMounts",()=>f.getStorageMounts())),p=await p,g(),p),{data:S,refresh:B}=([p,g]=P(async()=>W("storageKeys",async()=>s.value?await f.getStorageKeys(s.value):[])),p=await p,g(),p),G=C.hook("storage:key:update",async(n,a)=>{if(!(!s.value||n.split(":")[0]!==s.value)&&(await B(),y.value===n)){if(a==="remove")return h.replace({query:{storage:s.value}});await V(y.value)}});oe(G),se(s,()=>{B(),y.value=""}),le(async()=>{if(!y.value){e.value=null;return}V(y.value)}),re("keydown",n=>{n.key==="s"&&(n.ctrlKey||n.metaKey)&&(N(),n.preventDefault())});function $(n){return n.replace(`${s.value}:`,"")}const H=ue(()=>S.value?S.value.filter(n=>n.includes(x.value)):[]);async function V(n){const a=await f.getStorageItem(await k(),n);e.value={key:n,updatedKey:$(n),editingKey:!1,content:a,updatedContent:a}}async function J(){if(!v.value||!s.value)return;const n=`${s.value}:${v.value}`;S.value?.includes(n)||await f.setStorageItem(await k(),n,""),h.replace({query:{storage:s.value,key:n}}),v.value=""}async function N(){e.value&&(await f.setStorageItem(await k(),e.value.key,e.value.updatedContent),await V(e.value.key))}async function Q(){!e.value||!s.value||(await f.removeStorageItem(await k(),e.value.key),e.value=null)}async function X(){if(!e.value||!s.value)return;const n=`${s.value}:${e.value.updatedKey}`,a=await k();await f.setStorageItem(a,n,e.value.updatedContent),await f.removeStorageItem(a,e.value.key),h.replace({query:{storage:s.value,key:n}})}return(n,a)=>{const Y=me,Z=xe,I=fe,ee=ve,L=ye,M=we,R=ge,q=he,te=ke,ne=Ce;return t(s)?(l(),_(te,{key:0,"storage-key":"tab-storage"},{left:u(()=>[r("div",Se,[d(Y,{icon:"carbon-chevron-left","ml--1":"",onClick:a[0]||(a[0]=o=>s.value="")}),r("div",$e,[d(Z,{modelValue:t(s),"onUpdate:modelValue":a[1]||(a[1]=o=>j(s)?s.value=o:null),n:"primary",icon:"carbon-data-base"},{default:u(()=>[(l(!0),i(w,null,D(t(K),(o,m)=>(l(),i("option",{key:m,value:m},b(m),9,Ve))),128))]),_:1},8,["modelValue"])])]),d(I,{modelValue:t(x),"onUpdate:modelValue":a[2]||(a[2]=o=>j(x)?x.value=o:null),icon:"carbon-search",placeholder:"Search...",n:"primary sm",border:"y x-none base! rounded-0",class:"w-full py2 ring-0!"},null,8,["modelValue"]),(l(!0),i(w,null,D(t(H),o=>(l(),i(w,{key:o},[r("button",{block:"","w-full":"",truncate:"",px2:"",py1:"","text-start":"","text-sm":"","font-mono":"",class:T(o===t(e)?.key?"text-primary n-bg-active":"text-secondary hover:n-bg-hover"),onClick:m=>y.value=o},b($(o)),11,Ne),Ie],64))),128)),d(I,{modelValue:t(v),"onUpdate:modelValue":a[3]||(a[3]=o=>j(v)?v.value=o:null),icon:"carbon-add",placeholder:"key",n:"sm",border:"t-none x-none base! rounded-0",class:"w-full py2 font-mono ring-0!",onKeyup:A(J,["enter"])},null,8,["modelValue","onKeyup"])]),right:u(()=>[t(e)?.key?(l(),i("div",Ue,[r("div",je,[r("div",De,[t(e).editingKey?(l(),_(I,{key:0,modelValue:t(e).updatedKey,"onUpdate:modelValue":a[4]||(a[4]=o=>t(e).updatedKey=o),onKeyup:A(X,["enter"])},null,8,["modelValue","onKeyup"])):(l(),i("code",Ae,[c(b($(t(e).key))+" ",1),d(ee,{icon:"carbon-edit",class:"cursor-pointer op50 hover:op100",onClick:a[5]||(a[5]=o=>t(e).editingKey=!0)})])),t(e).editingKey?F("",!0):(l(),_(L,{key:2,n:"green xs",disabled:t(e).content===t(e).updatedContent,class:T({"border-green":t(e).content!==t(e).updatedContent}),onClick:N},{default:u(()=>[c(" Save ")]),_:1},8,["disabled","class"]))]),r("div",null,[d(L,{n:"red xs",onClick:Q},{default:u(()=>[c(" Delete ")]),_:1})])]),typeof t(e).content=="object"?(l(),_(t(Ke),ie({key:0,modelValue:t(e).updatedContent,"onUpdate:modelValue":a[6]||(a[6]=o=>t(e).updatedContent=o),class:[[n.$colorMode.value==="dark"?"jse-theme-dark":"light"],"json-editor-vue h-full of-auto text-sm outline-none"]},n.$attrs,{mode:"text","navigation-bar":!1,indentation:2,"tab-size":2}),null,16,["modelValue","class"])):ce((l(),i("textarea",{key:1,"onUpdate:modelValue":a[7]||(a[7]=o=>t(e).updatedContent=o),placeholder:"Item value...",class:"h-full of-auto p-4 text-sm font-mono outline-none",onKeyup:A(de(N,["ctrl"]),["enter"])},null,40,Be)),[[pe,t(e).updatedContent]])])):(l(),_(q,{key:1},{default:u(()=>[d(R,{px6:"",py4:""},{default:u(()=>[c(" Select one key to start."),Le,c("Learn more about "),d(M,{href:"https://nitro.unjs.io/guide/storage",n:"orange",target:"_blank"},{default:u(()=>[c(" Nitro storage ")]),_:1})]),_:1})]),_:1}))]),_:1})):(l(),_(q,{key:1},{default:u(()=>[Object.keys(t(K)).length?(l(),i("p",Me," Select one storage to start: ")):(l(),i("p",Re,[c(" No custom storage defined in "),qe,c("."),Ee,c(" Learn more about "),d(M,{href:"https://nitro.unjs.io/guide/storage",n:"orange",target:"_blank"},{default:u(()=>[c(" Nitro storage ")]),_:1})])),(l(!0),i(w,null,D(t(K),(o,m)=>(l(),_(R,{key:m,"min-w-80":"","cursor-pointer":"","p-4":"","text-left":"",hover:"border-green",onClick:Oe=>s.value=m},{default:u(()=>[r("span",Pe,b(m),1),Te,r("span",Fe,b(o.driver)+" driver",1),We,o.base?(l(),_(ne,{key:0,"text-xs":"",filepath:o.base},null,8,["filepath"])):F("",!0)]),_:2},1032,["onClick"]))),128))]),_:1}))}}}),Ye=z({__name:"storage",setup(O){return(p,g)=>{const C=ze,h=be;return l(),_(h,null,{default:u(()=>[d(C)]),_:1})}}});export{Ye as default};
|