@nuxt/devtools 0.7.0 → 0.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/module-main.mjs +1 -1
- package/dist/client/200.html +2 -2
- package/dist/client/404.html +2 -2
- package/dist/client/__blank/index.html +7 -0
- package/dist/client/_nuxt/{AuthRequiredPanel.vue.d0cfb6b2.js → AuthRequiredPanel.vue.17c2a7bd.js} +1 -1
- package/dist/client/_nuxt/{Badge.51add8bd.js → Badge.8d650e3b.js} +1 -1
- package/dist/client/_nuxt/{CodeDiff.vue.ef3840bb.js → CodeDiff.vue.cc3f76a7.js} +1 -1
- package/dist/client/_nuxt/{CodeSnippets.vue.ac1ba0c8.js → CodeSnippets.vue.b4698473.js} +1 -1
- package/dist/client/_nuxt/{ComposableItem.vue.a20c44a4.js → ComposableItem.vue.6d7b799a.js} +1 -1
- package/dist/client/_nuxt/{DrawerRight.vue.53f21930.js → DrawerRight.vue.3ab85e5b.js} +1 -1
- package/dist/client/_nuxt/{DurationDisplay.vue.8283fdb3.js → DurationDisplay.vue.aba5fa70.js} +1 -1
- package/dist/client/_nuxt/{FilepathItem.vue.6f4d3680.js → FilepathItem.vue.84aa0a31.js} +1 -1
- package/dist/client/_nuxt/{HelpFab.vue.58531843.js → HelpFab.vue.a8d95bd1.js} +1 -1
- package/dist/client/_nuxt/{LaunchPage.vue.36ead88c.js → LaunchPage.vue.00d3a484.js} +1 -1
- package/dist/client/_nuxt/{NCheckbox.vue.a57ff0bb.js → NCheckbox.vue.63949e52.js} +1 -1
- package/dist/client/_nuxt/{NCodeBlock.vue.2012eb81.js → NCodeBlock.vue.77e54b2e.js} +1 -1
- package/dist/client/_nuxt/{NIconTitle.vue.c1ac3b5f.js → NIconTitle.vue.0a904b99.js} +1 -1
- package/dist/client/_nuxt/{NLink.vue.c45070c9.js → NLink.vue.ec1f69e3.js} +1 -1
- package/dist/client/_nuxt/{NMarkdown.vue.6bccbb92.js → NMarkdown.vue.a74698d6.js} +1 -1
- package/dist/client/_nuxt/{NSectionBlock.7613319f.js → NSectionBlock.b074e0b8.js} +1 -1
- package/dist/client/_nuxt/{NSelect.vue.b9c29645.js → NSelect.vue.9556d6e0.js} +1 -1
- package/dist/client/_nuxt/{NSwitch.vue.fa9b060a.js → NSwitch.vue.6c2556d0.js} +1 -1
- package/dist/client/_nuxt/{NTip.vue.95e4ec9e.js → NTip.vue.861372f7.js} +1 -1
- package/dist/client/_nuxt/{Navbar.vue.6c01dcab.js → Navbar.vue.1a2a587f.js} +1 -1
- package/dist/client/_nuxt/{StateEditor.vue.c5cc22ae.js → StateEditor.vue.05c4fc16.js} +1 -1
- package/dist/client/_nuxt/{__blank.87af3281.js → __blank.3f7b27a6.js} +1 -1
- package/dist/client/_nuxt/{analyze-build.cf3dea6a.js → analyze-build.c314de67.js} +1 -1
- package/dist/client/_nuxt/{assets.4f097b22.js → assets.722939b7.js} +1 -1
- package/dist/client/_nuxt/{client.247a64bd.js → client.ece13385.js} +1 -1
- package/dist/client/_nuxt/{components.07744e27.js → components.27bdfae4.js} +1 -1
- package/dist/client/_nuxt/{constants.2fec5dff.js → constants.4e5eba24.js} +1 -1
- package/dist/client/_nuxt/{custom-_name_.6e463663.js → custom-_name_.95a8297c.js} +1 -1
- package/dist/client/_nuxt/default.7e3f9818.js +1 -0
- package/dist/client/_nuxt/entry.6507cb32.js +21 -0
- package/dist/client/_nuxt/entry.6f7d64f9.css +1 -0
- package/dist/client/_nuxt/{error-404.b216bd73.js → error-404.66ff8897.js} +1 -1
- package/dist/client/_nuxt/{error-500.1bc58b0e.js → error-500.34984f69.js} +1 -1
- package/dist/client/_nuxt/full.748a1c93.js +1 -0
- package/dist/client/_nuxt/{hooks.259d0a69.js → hooks.3ec974a8.js} +1 -1
- package/dist/client/_nuxt/{imports.cc27dbf7.js → imports.8485b75c.js} +1 -1
- package/dist/client/_nuxt/{index.064a7a87.js → index.5152a001.js} +1 -1
- package/dist/client/_nuxt/{index.8f3e434d.js → index.7ae8a638.js} +2 -2
- package/dist/client/_nuxt/{json-editor-vue.af845b1c.js → json-editor-vue.bbdad521.js} +1 -1
- package/dist/client/_nuxt/{middleware.fcdb1770.js → middleware.3c73e553.js} +1 -1
- package/dist/client/_nuxt/{modules.5891e891.js → modules.67fd6240.js} +1 -1
- package/dist/client/_nuxt/{none.e5b666cf.js → none.2f8cf810.js} +1 -1
- package/dist/client/_nuxt/{open-graph.1141dd15.js → open-graph.79a7c77c.js} +1 -1
- package/dist/client/_nuxt/{overview.2af20256.js → overview.d953fa7e.js} +1 -1
- package/dist/client/_nuxt/{pages.b3fe162f.js → pages.7b386c55.js} +1 -1
- package/dist/client/_nuxt/{payload.2d5cef36.js → payload.f36f4355.js} +1 -1
- package/dist/client/_nuxt/{plugins.f25d8e7c.js → plugins.1c37e55d.js} +1 -1
- package/dist/client/_nuxt/{runtime-configs.68765f10.js → runtime-configs.67f4f0b3.js} +1 -1
- package/dist/client/_nuxt/server-routes.64373863.js +9 -0
- package/dist/client/_nuxt/{settings.cb26edfb.js → settings.b7df1779.js} +1 -1
- package/dist/client/_nuxt/{state-components.3bf21c12.js → state-components.cd34df16.js} +1 -1
- package/dist/client/_nuxt/{state-modules.dfd5fe81.js → state-modules.c2527930.js} +1 -1
- package/dist/client/_nuxt/{storage.921a198c.js → storage.13c667f3.js} +1 -1
- package/dist/client/_nuxt/{terminals.67898f73.js → terminals.1c5a4ee9.js} +1 -1
- package/dist/client/_nuxt/timeline.1ad3a70f.css +1 -0
- package/dist/client/_nuxt/{timeline.6b8e8f78.js → timeline.741d9e72.js} +1 -1
- package/dist/client/_nuxt/{unocss-runtime.5034abfc.js → unocss-runtime.d07b0096.js} +1 -1
- package/dist/client/_nuxt/{virtual-files.e3271a06.js → virtual-files.4e8316be.js} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/client/modules/analyze-build/index.html +7 -0
- package/dist/client/modules/assets/index.html +7 -0
- package/dist/client/modules/components/index.html +7 -0
- package/dist/client/modules/hooks/index.html +7 -0
- package/dist/client/modules/imports/index.html +7 -0
- package/dist/client/modules/middleware/index.html +7 -0
- package/dist/client/modules/modules/index.html +7 -0
- package/dist/client/modules/open-graph/index.html +7 -0
- package/dist/client/modules/overview/index.html +7 -0
- package/dist/client/modules/pages/index.html +7 -0
- package/dist/client/modules/payload/index.html +7 -0
- package/dist/client/modules/plugins/index.html +7 -0
- package/dist/client/modules/runtime-configs/index.html +7 -0
- package/dist/client/modules/server-routes/index.html +7 -0
- package/dist/client/modules/storage/index.html +7 -0
- package/dist/client/modules/terminals/index.html +7 -0
- package/dist/client/modules/timeline/index.html +7 -0
- package/dist/client/modules/virtual-files/index.html +7 -0
- package/dist/client/settings/index.html +7 -0
- package/dist/module.json +1 -1
- package/package.json +20 -20
- package/dist/client/_nuxt/default.3a13b5c9.js +0 -1
- package/dist/client/_nuxt/entry.185d6835.css +0 -1
- package/dist/client/_nuxt/entry.33b5be03.js +0 -21
- package/dist/client/_nuxt/full.92d6a5f8.js +0 -1
- package/dist/client/_nuxt/server-routes.ab41fbf6.js +0 -9
- package/dist/client/_nuxt/timeline.289e5c9e.css +0 -1
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{g as C,o,h as M,w as u,Y as X,c as a,v as x,aH as ee,aI as te,ai as oe,m as S,aJ as ne,a2 as ae,Z as z,r as I,s as e,a as t,n as R,q as O,t as h,F as T,b as d,d as $,ad as J,k as se,W as L,aK as V,aL as re,aM as ie,a0 as ce,aN as le,aO as de,aP as pe,aQ as j,al as me,L as ue,aR as ge,M as he,S as _e}from"./entry.
|
|
1
|
+
import{g as C,o,h as M,w as u,Y as X,c as a,v as x,aH as ee,aI as te,ai as oe,m as S,aJ as ne,a2 as ae,Z as z,r as I,s as e,a as t,n as R,q as O,t as h,F as T,b as d,d as $,ad as J,k as se,W as L,aK as V,aL as re,aM as ie,a0 as ce,aN as le,aO as de,aP as pe,aQ as j,al as me,L as ue,aR as ge,M as he,S as _e}from"./entry.6507cb32.js";import{_ as fe}from"./Navbar.vue.1a2a587f.js";import{_ as ve}from"./NLink.vue.ec1f69e3.js";import{_ as D}from"./NSectionBlock.b074e0b8.js";import{_ as be}from"./NCodeBlock.vue.77e54b2e.js";import{_ as we}from"./HelpFab.vue.a8d95bd1.js";import"./NIconTitle.vue.0a904b99.js";import"./client.ece13385.js";const xe={key:0,"i-carbon:arrow-up-right":"","translate-y--1":"","text-xs":"",op50:""},G=C({__name:"NTextExternalLink",props:{link:{}},setup(b){return(n,c)=>(o(),M(oe(n.link?ve:"div"),ee(te(n.link?{href:n.link,target:"_blank",rel:"noopener noreferrer"}:{})),{default:u(()=>[X(n.$slots,"default"),n.link?(o(),a("div",xe)):x("",!0)]),_:3},16))}}),H=[{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."}],ye={flex:"~ wrap","mt--2":"","w-full":"","flex-none":""},ke=["onClick"],$e=t("div",{border:"b base","flex-auto":""},null,-1),Te={key:0,"x-divider":""},Se={key:1,"x-divider":""},Ce={flex:"~ gap-1 items-center",px4:"",py2:""},Ne=t("div",{"i-carbon-warning":"","text-orange":""},null,-1),Me={"w-full":"",p2:"",op75:""},Oe={key:1,m4:"",flex:"~ col gap-2"},Ae={flex:"~ gap-1 wrap items-center"},Ie={key:1},Re={flex:"~ gap-2",n:"sm primary",absolute:"","right-2":"","top-2":""},Le=C({__name:"OpenGraphMissingTabs",props:{tags:{},matchedRouteFilepath:{}},setup(b){const n=b,c=S(()=>H.filter(s=>!n.tags?.some(p=>p.name===s.name))),l=S(()=>{let s={};const p={};c.value.forEach(g=>{g.seoMeta?Object.assign(p,g.seoMeta):s=ne(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
2
|
|
|
3
3
|
`)}),m=ae(),y=z(),k=["Missing Tags","Code Snippet"],_=I(k[0]);return(s,p)=>{const v=G,g=J,N=se,A=be,B=D;return e(c).length?(o(),M(B,{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",ye,[(o(),a(T,null,R(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,ke)),64)),$e]),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,R(e(c),(r,i)=>(o(),a(T,{key:i},[i?(o(),a("div",Te)):x("",!0),i?(o(),a("div",Se)):x("",!0),t("div",Ce,[Ne,d(v,{op50:"",link:r.docs,n:"orange"},{default:u(()=>[$(h(r.name),1)]),_:2},1032,["link"])]),t("div",Me,h(r.description),1)],64))),128))]),_:1})):(o(),a("div",Oe,[t("p",Ae,[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",Ie,"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",Re,[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)}}}),Be={class:"max-w-[524px] min-w-[524px] cursor-pointer bg-base"},Ee={class:"break-words border border-base px-[12px] py-[10px] antialiased"},Fe={class:"overflow-hidden truncate whitespace-nowrap text-[12px] leading-[11px] uppercase op50"},Pe={class:"block h-[46px] max-h-[46px] border-separate select-none overflow-hidden break-words text-left",style:{"border-spacing":"0px"}},je={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"}},Je=C({__name:"SocialFacebook",props:{card:{}},setup(b){return(n,c)=>(o(),a("div",Be,[t("div",{class:"h-[274px] border border-b-0 border-base bg-cover bg-center bg-no-repeat",style:L({backgroundImage:`url(${JSON.stringify(n.card.image)})`})},null,4),t("div",Ee,[t("div",Fe,h(n.card.url),1),t("div",Pe,[t("div",je,h(n.card.title),1),t("div",ze,h(n.card.description),1)])])]))}}),Ve={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"}},De={class:"break-words border-base p-[0.75em] antialiased",flex:"~ col justify-center gap-[2px]"},Ge={class:"overflow-hidden truncate whitespace-nowrap text-[15px] leading-[20px] lowercase op50"},He={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"},Ke=C({__name:"SocialTwitter",props:{tags:{}},setup(b){const n=b,c=S(()=>V(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=S(()=>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",Ve,[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:L({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:L({backgroundImage:`url(${JSON.stringify(e(c).image)})`})},null,4)),t("div",De,[t("div",Ge,h(e(c).url),1),t("div",He,h(e(c).title),1),t("div",Ue,h(e(c).description),1)])],2)]))}}),qe={class:"max-w-[520px] min-w-[520px] cursor-pointer overflow-hidden border border-base rounded-[2px] shadow-md bg-base"},We={class:"break-words p-[10px] antialiased"},Ye={class:"block h-auto max-h-[50px] border-separate select-none break-words text-left",style:{"border-spacing":"0px"}},Qe={class:"pb-[2px] text-[16px] font-semibold leading-[24px]"},Ze={class:"overflow-hidden truncate whitespace-nowrap text-xs font-normal uppercase op85"},Xe=C({__name:"SocialLinkedin",props:{card:{}},setup(b){return(n,c)=>(o(),a("div",qe,[t("div",{class:"h-[270px] border-b border-base bg-cover bg-center bg-no-repeat",style:L({backgroundImage:`url(${JSON.stringify(n.card.image)})`})},null,4),t("div",We,[t("div",Ye,[t("div",Qe,h(n.card.title),1),t("div",Ze,h(n.card.url),1)])])]))}}),et={"h-full":"","w-520":"",flex:"~ col"},tt={flex:"~ wrap","w-full":"","flex-none":""},ot=["onClick"],nt=t("div",{border:"b base","flex-auto":""},null,-1),at={flex:"~ items-center justify-center","flex-auto":"",p4:"","n-panel-grids":""},st={key:0},rt={key:1},it={key:2},ct=C({__name:"SocialPreviewGroup",props:{tags:{}},setup(b){const n=b,c=["twitter","facebook","linkedin"],l=I(c[0]),m=S(()=>V(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 _=Je,s=Ke,p=Xe;return o(),a("div",et,[t("div",tt,[(o(),a(T,null,R(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,ot)),64)),nt]),t("div",at,[e(l)==="facebook"?(o(),a("div",st,[d(_,{card:e(m)},null,8,["card"])])):e(l)==="twitter"?(o(),a("div",rt,[d(s,{tags:y.tags},null,8,["tags"])])):e(l)==="linkedin"?(o(),a("div",it,[d(p,{card:e(m)},null,8,["card"])])):x("",!0)])])}}}),lt={class:"markdown-body"},dt=re('<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),pt=[dt],mt={__name:"open-graph",setup(b,{expose:n}){return n({frontmatter:{}}),(l,m)=>(o(),a("div",lt,pt))}},ut={flex:"~","h-full":"","w-full":"","of-hidden":""},gt={"h-full":"","flex-auto":"","of-auto":""},ht={"flex-none":"",flex:"~ gap2 items-center"},_t={flex:"~ col"},ft={key:0,"x-divider":""},vt={key:1,"x-divider":""},bt={mr2:"",px4:"",py2:""},Nt=C({__name:"open-graph",setup(b){const n=I(0),c=ie(),l=ce(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=I(!0);function y(){n.value+=1}const k=le(),_=de(),s=I(""),p=pe(),v=z();async function g(){s.value!==_.value.path&&k.value.push(s.value||"/")}const N=S(()=>s.value===_.value.path?[]:k.value.resolve(s.value||"/").matched),A=S(()=>{const r=p.value.find(i=>i.path===_.value?.matched?.[0]?.path);return r?.file||r?.meta?.file});function B(r){return H.find(i=>i.name===r.name)?.docs}return j(_).toBeTruthy().then(r=>{s.value=r.path}),j(k).toBeTruthy().then(r=>{r.afterEach(()=>{me(()=>{s.value=_.value.path,setTimeout(y,200),setTimeout(y,800)})})}),(r,i)=>{const f=he,E=_e,U=fe,P=G,K=J,q=D,W=Le,Y=ct,Q=mt,Z=we;return o(),a(T,null,[t("div",ut,[t("div",gt,[d(U,null,{search:u(()=>[d(f,{modelValue:e(s),"onUpdate:modelValue":i[0]||(i[0]=w=>ue(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:ge(g,["enter"])},null,8,["modelValue","class","onKeydown"])]),actions:u(()=>[t("div",ht,[e(A)?(o(),M(E,{key:0,"text-lg":"",icon:"carbon:launch",title:"Open file in editor",onClick:i[1]||(i[1]=w=>e(v)(e(A)))})):x("",!0),d(E,{"text-lg":"",icon:"carbon:reset",title:"Refresh Data",onClick:y}),d(E,{"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"])])]),_:1}),t("div",_t,[d(q,{text:"Tags",icon:"carbon:tag-group"},{default:u(()=>[d(K,{grid:"~ cols-[max-content_1fr]","items-center":"","justify-between":"","of-hidden":""},{default:u(()=>[(o(!0),a(T,null,R(e(l),(w,F)=>(o(),a(T,{key:F},[F?(o(),a("div",ft)):x("",!0),F?(o(),a("div",vt)):x("",!0),t("div",bt,[d(P,{op50:"",link:B(w),n:"primary"},{default:u(()=>[$(h(w.name),1)]),_:2},1032,["link"])]),d(P,{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(W,{tags:e(l),"matched-route-filepath":e(A)},null,8,["tags","matched-route-filepath"])])]),e(m)&&e(l)?.length?(o(),M(Y,{key:0,tags:e(l),border:"l base","w-540px":"","flex-none":""},null,8,["tags"])):x("",!0)]),d(Z,null,{default:u(()=>[d(Q)]),_:1})],64)}}});export{Nt as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as V,ah as B,a1 as I,au as j,aS as R,aT as L,E as $,m as A,h as m,w as o,i as E,o as s,s as e,c as l,a as t,b as i,t as d,v as c,F as p,aU as x,aV as O,d as n,j as P,l as F,e as W,k as G}from"./entry.
|
|
1
|
+
import{g as V,ah as B,a1 as I,au as j,aS as R,aT as L,E as $,m as A,h as m,w as o,i as E,o as s,s as e,c as l,a as t,b as i,t as d,v as c,F as p,aU as x,aV as O,d as n,j as P,l as F,e as W,k as G}from"./entry.6507cb32.js";import{_ as H}from"./Badge.8d650e3b.js";import{u as K,_ as U}from"./state-modules.c2527930.js";import{_ as q}from"./NTip.vue.861372f7.js";import{a as z}from"./state-components.cd34df16.js";import"./NCodeBlock.vue.77e54b2e.js";import"./client.ece13385.js";import"./NCheckbox.vue.63949e52.js";const J="0.7.1",Q={key:0},X={key:1,flex:"~ col gap2",ma:"","h-full":"","max-w-300":"","w-full":"",p5:"",px5:"","md:px20":""},Y=t("div",{"flex-auto":""},null,-1),Z={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),ct=t("div",{"carbon-tree-view-alt":"","text-3xl":""},null,-1),rt=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),St={"text-right":""},Tt={flex:"~ col gap2"},Mt={flex:"~ gap-6 wrap","mt-5":"","items-center":"","justify-center":""},Ct=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),Vt=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),Bt=t("div",{"i-carbon-settings-adjust":""},null,-1),It=t("div",{"flex-auto":""},null,-1),jt={flex:"col gap-2",mxa:"",hidden:"","w-100":"","text-sm":"",op50:"","md:flex":""},Rt={flex:"~ gap-1","items-center":""},Lt=t("span",null,"+",-1),$t=t("span",null,"+",-1),At=t("div",{"flex-auto":""},null,-1),Et={flex:"~ gap-1","items-center":""},Ot=t("span",null,"+",-1),Pt=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=V({__name:"overview",setup(Kt){const a=B(),_=I(),b=z(),f=j(),w=K(),y=R(),g=L(),S=$();function T(){P.value=!0,S.push("/")}const v=A(()=>a.value?.nuxt.vueApp.version);return(r,Ut)=>{const M=F,C=H,k=U,h=W,D=q,u=G,N=E;return s(),m(N,{"h-screen":"","w-full":"",flex:""},{default:o(()=>[e(_)?(s(),l("div",X,[Y,t("div",Z,[t("div",tt,[i(M,{"h-14":"","md:h-18":""}),t("button",{"mr--16":"","mt--6":"",onClick:T},[i(C,{"bg-green-400:10":"","text-green-400":"",title:"preview",textContent:"preview"})])]),t("div",et,[ot,t("code",st,"v"+d(e(J)),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)])):c("",!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(()=>[ct,t("div",null,d(e(y).length)+" pages",1)]),_:1})):c("",!0),e(_)?(s(),m(h,{key:1,"min-w-40":"",p4:"","theme-card-lime":"",flex:"~ col auto",to:"/modules/components"},{default:o(()=>[rt,t("div",null,d(e(b).length)+" components",1)]),_:1})):c("",!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})):c("",!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})):c("",!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})):c("",!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 r?r.formatDuration:e(x))(e(a).loadingTimeMetrics.appLoad-e(a).loadingTimeMetrics.ssrStart)),1)],64)):c("",!0),vt,t("div",kt,d(("formatDuration"in r?r.formatDuration:e(x))(e(a).loadingTimeMetrics.appLoad-e(a).loadingTimeMetrics.appInit)),1),bt,t("div",wt,d(("formatDuration"in r?r.formatDuration:e(x))(e(a).loadingTimeMetrics.pageEnd-e(a).loadingTimeMetrics.pageStart)),1),e(a).loadingTimeMetrics.hmrStart?(s(),l(p,{key:1},[yt,t("div",St,d(("formatDuration"in r?r.formatDuration:e(x))(e(a).loadingTimeMetrics.hmrEnd-e(a).loadingTimeMetrics.hmrStart)),1)],64)):c("",!0)])])):c("",!0)],64)):c("",!0)]),t("div",Tt,[("showConnectionWarning"in r?r.showConnectionWarning:e(O))?(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})):c("",!0)]),t("div",Mt,[Ct,Dt,Nt,Vt,i(h,{to:"/settings",flex:"~ gap1","inline-block":"","items-center":"",op50:"","hover:op80":""},{default:o(()=>[Bt,n(" Settings ")]),_:1})]),It,t("div",jt,[t("div",Rt,[e(g)?(s(),l(p,{key:0},[i(u,{n:"xs",class:"px2"},{default:o(()=>[n(" ⌘ Cmd ")]),_:1}),Lt,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}),$t,i(u,{n:"xs",class:"px2"},{default:o(()=>[n(" K ")]),_:1})],64)),At,n(" Open Command Palette ")]),t("div",Et,[e(g)?(s(),l(p,{key:0},[i(u,{n:"xs",class:"px2"},{default:o(()=>[n(" ⇧ Shift ")]),_:1}),Ot,i(u,{n:"xs",class:"px2"},{default:o(()=>[n(" ⌥ Option ")]),_:1}),Pt,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};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as I,r as E,m as R,ae as j,s as t,o,c as s,a as e,t as $,h as v,w as k,a$ as q,F as h,n as B,v as y,b as p,d as V,q as L,M,k as W,Z as H,b0 as D,aN as J,aO as Q,a1 as Z,a9 as G,aP as X,aQ as A,al as Y,L as ee,aR as te,A as oe,B as ne}from"./entry.
|
|
1
|
+
import{g as I,r as E,m as R,ae as j,s as t,o,c as s,a as e,t as $,h as v,w as k,a$ as q,F as h,n as B,v as y,b as p,d as V,q as L,M,k as W,Z as H,b0 as D,aN as J,aO as Q,a1 as Z,a9 as G,aP as X,aQ as A,al as Y,L as ee,aR as te,A as oe,B as ne}from"./entry.6507cb32.js";import{_ as S}from"./Badge.8d650e3b.js";import{_ as F}from"./FilepathItem.vue.84aa0a31.js";import{_ as ae}from"./NSectionBlock.b074e0b8.js";import{_ as se}from"./LaunchPage.vue.00d3a484.js";import{_ as re}from"./HelpFab.vue.a8d95bd1.js";import"./NIconTitle.vue.0a904b99.js";import"./NMarkdown.vue.a74698d6.js";import"./client.ece13385.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(P,{emit:d}){const i=P,_=E([]),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=W,l=j("VDropdown");return t(r)?(o(),v(l,{key:1},{popper:k(({hide:f})=>[e("div",ie,[e("form",{flex:"~ col",onSubmit:q(()=>{a(),f()},["prevent"])},[t(r)?(o(),s(h,{key:0},[ce,e("div",de,[(o(!0),s(h,null,B(t(m),(g,x)=>(o(),s(h,{key:x},[g[0]===":"?(o(),v(C,{key:0,modelValue:t(_)[x],"onUpdate:modelValue":T=>t(_)[x]=T,"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(()=>[V(" Navigate ")]),_:1})],40,ue)])]),default:k(()=>[e("code",le,[(o(!0),s(h,null,B(t(m),(f,g)=>(o(),s("span",{key:g,class:L(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},Pe=["onClick"],Ve=I({__name:"RoutesTable",props:{pages:{},layouts:{},matched:{},matchedPending:{}},emits:["navigate"],setup(P){const d=P,i=H(),_=D(),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=S,c=_e,C=F;return o(),s("div",null,[e("table",he,[me,e("tbody",null,[(o(!0),s(h,null,B(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:L(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,Pe)):(o(),s("button",{key:2,"text-sm":"",op15:"",onClick:a[1]||(a[1]=l=>b("default"))}," (default) "))])]))),128))])])])}}}),Be={class:"markdown-body"},Te=e("h1",null,"Pages",-1),Ie=e("p",null,[V("One core feature of Nuxt is the file system router. Every Vue file inside the "),e("code",null,"pages/"),V(" 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),Le=e("p",null,[e("a",{href:"https://nuxt.com/docs/getting-started/routing",target:"_blank",rel:"noopener"},"Learn more on the documentation")],-1),Ae=e("hr",null,null,-1),Ee=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),De=e("p",null,[e("a",{href:"https://nuxt.com/docs/guide/directory-structure/middleware",target:"_blank",rel:"noopener"},"Learn more on the documentation")],-1),Se=[Te,Ie,Le,Ae,Ee,Me,De],Fe={__name:"pages",setup(P,{expose:d}){return d({frontmatter:{}}),(_,m)=>(o(),s("div",Be,Se))}},Oe={key:0,"h-full":"","of-auto":""},Ue={border:"b base",flex:"~ col gap1",px4:"",py3:"","navbar-glass":""},ze=e("span",{op50:""},"Navigate from ",-1),Ke={"font-mono":""},je=e("span",{op50:""}," to ",-1),qe={key:1,op50:""},We=e("span",null,[V("Press "),e("b",{"font-bold":""},"Enter"),V(" to navigate")],-1),He={key:0,"text-orange":"",op75:""},Je={key:1,op50:""},Qe={"w-full":""},Ze=e("thead",{border:"b base","h-7":""},[e("tr",null,[e("th",{"text-left":""}," Name "),e("th",{"text-left":""}," Path ")])],-1),Ge={mr1:""},lt=I({__name:"pages",setup(P){const d=J(),i=Q(),_=Z(),m=D(),b=G(),w=X(),r=R(()=>m.value?.middleware||[]),a=E("");A(i).toBeTruthy().then(n=>{a.value=n.path}),A(d).toBeTruthy().then(n=>{n.afterEach(()=>{Y(()=>{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=Ve,x=ae,T=S,O=F,U=se,z=Fe,K=re;return o(),s(h,null,[t(_)?.pages&&t(d)?(o(),s("div",Oe,[e("div",Ue,[e("div",null,[t(i).path!==t(a)?(o(),s(h,{key:0},[ze,e("span",Ke,$(t(i).path),1),je],64)):(o(),s("span",qe,"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:L(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},[We,t(c).length?y("",!0):(o(),s("span",He," (no match)"))],64)):(o(),s("span",Je,"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",Qe,[Ze,(o(!0),s(h,null,B(t(r),N=>(o(),s("tr",{key:N.path,"h-7":""},[e("td",null,[e("span",Ge,$(N.name),1),N.global?(o(),v(T,{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(O,{filepath:N.path},null,8,["filepath"])])]))),128))])]),_:1},8,["description"])):y("",!0)])):(o(),v(U,{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(K,null,{default:k(()=>[p(z)]),_:1})],64)}}});export{lt as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as y}from"./StateEditor.vue.
|
|
1
|
+
import{_ as y}from"./StateEditor.vue.05c4fc16.js";import{g as k,o as e,c,F as x,n as B,h as m,w as o,Y as C,aH as D,aI as w,a as $,ah as F,m as O,s as r,b as a,v as u,d as P,k as V,S as E}from"./entry.6507cb32.js";import{_ as H}from"./NSectionBlock.b074e0b8.js";import{_ as R}from"./HelpFab.vue.a8d95bd1.js";import"./json-editor-vue.bbdad521.js";import"./NIconTitle.vue.0a904b99.js";const j={key:0,flex:"~ col gap-1"},A={key:1,mt2:"",px4:"",italic:"",op35:""},G=k({__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",j,[(e(!0),c(x,null,B(t.state,(l,s)=>(e(),m(i,{key:s,state:l,name:s.startsWith(t.prefix)?s.slice(t.prefix.length):s},{actions:o(_=>[C(t.$slots,"actions",D(w(_)))]),_:2},1032,["state","name"]))),128))])):(e(),c("div",A," No data "))])}}}),I={class:"markdown-body"},K=$("h1",null,"State & Async Data",-1),T=$("p",null,"// TODO",-1),z=[K,T],L={__name:"payload",setup(f,{expose:t}){return t({frontmatter:{}}),(i,l)=>(e(),c("div",I,z))}},W={key:0},Z=k({__name:"payload",setup(f){const t=F(),n=O(()=>t.value?.nuxt.payload);async function i(l){await t.value?.nuxt.hooks.callHookParallel("app:data:refresh",l)}return(l,s)=>{const _=G,p=H,b=V,v=E,S=y,g=L,N=R;return e(),c(x,null,[r(t)?(e(),c("div",W,[a(p,{icon:"carbon-data-set",text:"State",description:"Keyed state from `useState`",padding:!1},{default:o(()=>[a(_,{state:r(n).state,prefix:"$s"},null,8,["state"])]),_:1}),a(p,{icon:"carbon-data-blob",text:"Data",description:"Keyed state from `useAsyncData`",padding:!1},{actions:o(()=>[a(b,{n:"xs primary","self-start":"",icon:"i-carbon-recycle",onClick:s[0]||(s[0]=h=>i())},{default:o(()=>[P(" Re-fetch all data ")]),_:1})]),default:o(()=>[a(_,{state:r(n).data},{actions:o(({isOpen:h,name:d})=>[h&&d?(e(),m(v,{key:0,title:`Re-fetch '${d}'`,icon:"carbon-recycle",onClick:Y=>i([d])},null,8,["title","onClick"])):u("",!0)]),_:1},8,["state"])]),_:1}),r(n).functions&&Object.keys(r(n).functions).length?(e(),m(p,{key:0,icon:"carbon-function",text:"Functions",description:"State for functions (experimental)"},{default:o(()=>[a(S,{"ml--6":"",state:r(n).functions},null,8,["state"])]),_:1})):u("",!0)])):u("",!0),a(N,null,{default:o(()=>[a(g)]),_:1})],64)}}});export{Z as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as S}from"./FilepathItem.vue.
|
|
1
|
+
import{_ as S}from"./FilepathItem.vue.84aa0a31.js";import{_ as D}from"./Badge.8d650e3b.js";import{_ as C}from"./DurationDisplay.vue.aba5fa70.js";import{g as v,a1 as B,m as x,a_ as V,o as n,c as m,a as t,t as P,b as l,s as f,h as u,v as d,ae as F,Y as T,T as H,_ as I,w as h,d as y,b0 as M,ah as E,F as k,n as W,q as L}from"./entry.6507cb32.js";import{_ as Y}from"./NSectionBlock.b074e0b8.js";import{_ as j}from"./HelpFab.vue.a8d95bd1.js";import"./NIconTitle.vue.0a904b99.js";const q={flex:"~ gap2","items-center":""},z={w8:"","text-right":"","text-sm":"",op25:""},A={key:0,"flex-auto":"","text-right":""},R=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 _=S,o=D,s=C;return n(),m("div",q,[t("div",z,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",A,[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=H,i=F("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,[T(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(()=>[T(p.$slots,"default")]),_:3})}const U=I(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=M(),a=E(),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=R,s=C,g=Y,w=nt,N=j;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,W(f(r),($,b)=>(n(),u(o,{key:$.src,plugin:$,index:b+1,"ml--4":"","border-base":"",py2:"",class:L(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(N,null,{default:h(()=>[l(w)]),_:1})],64)}}});export{dt as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as C}from"./StateEditor.vue.
|
|
1
|
+
import{_ as C}from"./StateEditor.vue.05c4fc16.js";import{_ as h}from"./NSectionBlock.b074e0b8.js";import{o as c,c as r,a as m,g as v,ah as x,a1 as b,m as u,s as o,b as e,w as s,v as y,F as k}from"./entry.6507cb32.js";import{_ as R}from"./HelpFab.vue.a8d95bd1.js";import"./json-editor-vue.bbdad521.js";import"./NIconTitle.vue.0a904b99.js";const B={class:"markdown-body"},N=m("h1",null,"Runtime Configs",-1),$=m("p",null,"// TODO:",-1),w=[N,$],D={__name:"runtime-configs",setup(d,{expose:t}){return t({frontmatter:{}}),(l,p)=>(c(),r("div",B,w))}},F={key:0},H=v({__name:"runtime-configs",setup(d){const t=x(),_=b(),l=u(()=>t.value?.nuxt.payload),p=u(()=>{const n={..._.value?.runtimeConfig};return delete n.public,delete n.app,n});return(n,S)=>{const a=C,i=h,f=D,g=R;return c(),r(k,null,[o(t)?(c(),r("div",F,[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})])):y("",!0),e(g,null,{default:s(()=>[e(f)]),_:1})],64)}}});export{H as default};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import{r as O,b3 as Le,an as Be,al as Ae,ab as he,b4 as Me,b5 as Fe,b6 as We,g as le,b7 as ye,o as n,c as p,a as c,q as E,h as C,s as e,b8 as se,t as j,v as D,d as B,W as ze,Y,F as V,n as A,T as de,X as He,m as R,b as f,w as k,M as ge,k as _e,A as be,b9 as Je,ba as Ge,bb as Ke,a1 as Qe,aj as ie,Z as Xe,am as Ye,L as Z,aE as Ze,S as ke,i as xe,bc as et,bd as tt,a5 as ot,J as nt,be as st,ad as lt}from"./entry.6507cb32.js";import{_ as at}from"./Navbar.vue.1a2a587f.js";import{_ as Ce}from"./Badge.8d650e3b.js";import{_ as we}from"./NSelect.vue.9556d6e0.js";import{_ as rt}from"./NCheckbox.vue.63949e52.js";import{_ as ut}from"./CodeSnippets.vue.b4698473.js";import{_ as it}from"./NCodeBlock.vue.77e54b2e.js";import{C as me,S as $e}from"./constants.4e5eba24.js";import{U as dt}from"./json-editor-vue.bbdad521.js";import{_ as ct}from"./NSectionBlock.b074e0b8.js";import{_ as pt}from"./DrawerRight.vue.3ab85e5b.js";import"./client.ece13385.js";import"./NIconTitle.vue.0a904b99.js";const ne=/^[\u0009\u0020-\u007E\u0080-\u00FF]+$/;function ft(l,h){if(typeof l!="string")throw new TypeError("argument str must be a string");const m={},w=(h||{}).decode||ht;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]=vt(a,w)}_=y+1}return m}function ve(l,h,m){const o=m||{},w=o.encode||yt;if(typeof w!="function")throw new TypeError("option encode is invalid");if(!ne.test(l))throw new TypeError("argument name is invalid");const _=w(h);if(_&&!ne.test(_))throw new TypeError("argument val is invalid");let t=l+"="+_;if(o.maxAge!==void 0&&o.maxAge!==null){const y=o.maxAge-0;if(Number.isNaN(y)||!Number.isFinite(y))throw new TypeError("option maxAge is invalid");t+="; Max-Age="+Math.floor(y)}if(o.domain){if(!ne.test(o.domain))throw new TypeError("option domain is invalid");t+="; Domain="+o.domain}if(o.path){if(!ne.test(o.path))throw new TypeError("option path is invalid");t+="; Path="+o.path}if(o.expires){if(!mt(o.expires)||Number.isNaN(o.expires.valueOf()))throw new TypeError("option expires is invalid");t+="; Expires="+o.expires.toUTCString()}if(o.httpOnly&&(t+="; HttpOnly"),o.secure&&(t+="; Secure"),o.priority)switch(typeof o.priority=="string"?o.priority.toLowerCase():o.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(o.sameSite)switch(typeof o.sameSite=="string"?o.sameSite.toLowerCase():o.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 mt(l){return Object.prototype.toString.call(l)==="[object Date]"||l instanceof Date}function vt(l,h){try{return h(l)}catch{return l}}function ht(l){return l.includes("%")?decodeURIComponent(l):l}function yt(l){return encodeURIComponent(l)}const gt={path:"/",watch:!0,decode:l=>Fe(decodeURIComponent(l)),encode:l=>encodeURIComponent(typeof l=="string"?l:JSON.stringify(l))};function _t(l,h){const m={...gt,...h},o=bt(m)||{},w=O(o[l]??m.default?.());{const _=typeof BroadcastChannel>"u"?null:new BroadcastChannel(`nuxt:cookies:${l}`);Le()&&Be(()=>{_?.close()});const t=()=>{xt(l,w.value,m),_?.postMessage(We(w.value))};let y=!1;_&&(_.onmessage=r=>{y=!0,w.value=r.data,Ae(()=>{y=!1})}),m.watch?he(w,(r,a)=>{y||Me(r,a)||t()},{deep:m.watch!=="shallow"}):t()}return w}function bt(l={}){return ft(document.cookie,l)}function kt(l,h,m={}){return h==null?ve(l,h,{...m,maxAge:-1}):ve(l,h,m)}function xt(l,h,m={}){document.cookie=kt(l,h,m)}const Ct=c("div",{"x-divider":""},null,-1),Se=le({__name:"ServerRouteListItem",props:{item:{},index:{default:0}},setup(l){const h=O(!0),m=ye();return(o,w)=>{const _=de,t=Ce,y=Se;return n(),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)===o.item.filepath}]),style:ze({paddingLeft:`calc(0.5rem + ${o.index*1.5}em)`}),onClick:w[0]||(w[0]=r=>{h.value=!e(h),m.value=o.item.filepath})},[c("div",{class:E({"w-12":!o.item.routes}),"flex-none":"","text-left":""},[o.item.type==="collection"?(n(),C(_,{key:0,icon:"carbon:chevron-right","mb0.5":"","transform-rotate":e(h)?90:0,transition:""},null,8,["transform-rotate"])):(n(),C(t,{key:1,class:E(("getRequestMethodClass"in o?o.getRequestMethodClass:e(se))(o.item.method||"*")),textContent:j((o.item.method||"*").toUpperCase())},null,8,["class","textContent"]))],2),c("span",{class:E({"flex items-center":o.item.routes}),"text-sm":"","font-mono":""},[o.item.type==="collection"?(n(),C(_,{key:0,title:`${o.item.routes?.length} routes`,icon:"carbon:folder",mr1:""},null,8,["title"])):D("",!0),B(" "+j(o.item.route),1)],2)],6),Ct,e(h)?Y(o.$slots,"default",{key:0},()=>[(n(!0),p(V,null,A(o.item.routes,r=>(n(),C(y,{key:r.filepath,item:r,index:o.index+1},null,8,["item","index"]))),128))]):D("",!0)])}}}),wt={p4:"",flex:"~ col gap-4"},$t={key:1,ml2:"",flex:""},St=["value"],Tt={key:0,flex:"","gap-4":""},Rt=c("div",{"flex-auto":""},null,-1),Te=le({__name:"ServerRouteInputs",props:{modelValue:{},keys:{default:()=>[]},default:{default:()=>({})},disabled:{type:Boolean,default:!1}},setup(l,{emit:h}){const m=l,o=He(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=()=>{o.value[r].value=M.result}}}return he(()=>o,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=ge,J=rt,M=we,z=de,v=_e;return n(),p("div",wt,[(n(!0),p(V,null,A(e(o),(d,x)=>(n(),p("div",{key:x,flex:"~ gap-2","justify-around":""},[Y(r.$slots,"input",{item:d}),(n(!0),p(V,null,A(e(w),$=>(n(),p(V,{key:$},[d.type!==null&&$==="key"?(n(),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"?(n(),p(V,{key:1},[d.type==="file"?(n(),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"?(n(),p("div",$t,[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"])])):(n(),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"?(n(),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(()=>[(n(),p(V,null,A(t,g=>c("option",{key:g,value:g},j(g),9,St)),64))]),_:2},1032,["modelValue","onUpdate:modelValue","class","disabled"])):D("",!0)],64))),128)),Y(r.$slots,"input-actions",{},()=>[f(v,{n:"red",disabled:r.disabled,class:E(r.disabled?"op0!":""),onClick:$=>e(o).splice(x,1)},{default:k(()=>[f(z,{icon:"carbon:delete"})]),_:2},1032,["disabled","class","onClick"])])]))),128)),r.disabled?D("",!0):(n(),p("div",Tt,[Y(r.$slots,"actions",{params:e(o)},()=>[f(v,{icon:"carbon-add",n:"sm primary",my1:"","px-3":"",onClick:a[0]||(a[0]=d=>e(o).push({...e(_)}))},{default:k(()=>[B(" Add ")]),_:1}),Rt,e(o).length?(n(),C(v,{key:0,icon:"carbon-trash-can",n:"sm red",my1:"","px-3":"",onClick:a[1]||(a[1]=d=>o.value=[])},{default:k(()=>[B(" Remove All ")]),_:1})):D("",!0)])])),Y(r.$slots,"default")])}}}),Re=O(await be.getOptions("serverRoutes")),Vt=Je(Re),Ut={serverRoutes:Vt};function Ve(l){return Ut[l]}Ge(Re,async l=>{be.updateOptions("serverRoutes",l)},{deep:!0,flush:"post",debounce:500,maxWait:1e3});const It={"h-full":"","w-full":"",flex:"~ col"},Nt={flex:"~ col gap-2","flex-none":"",p4:"","navbar-glass":""},Dt={flex:"~ gap2"},Et={flex:"~ gap2 wrap","w-full":"","items-center":"",px4:"",pb2:"","text-center":"","text-sm":"",border:"b base"},jt=c("div",{"flex-auto":""},null,-1),Ot={key:0,border:"b base","items-center":"",px4:"",py2:"",grid:"~ cols-[max-content_1fr] gap-2"},Pt={"text-right":"","font-mono":""},qt={key:1,border:"b base",p4:"",flex:"~ col gap-4","font-mono":""},Lt={flex:"~ gap-4"},Bt={flex:"~ gap2","mb--2":"","items-center":"",op50:""},At=c("div",{"w-5":"","x-divider":""},null,-1),Mt=c("div",{"flex-none":""}," Default Inputs ",-1),Ft=c("div",{"x-divider":""},null,-1),Wt={key:2},zt={key:3,border:"b base",relative:"","n-code-block":""},Ht={flex:"~ wrap","w-full":""},Jt=["onClick"],Gt=c("div",{border:"b base","flex-auto":""},null,-1),Kt={border:"b base",flex:"~ gap2","items-center":"",px4:"",py2:""},Qt=c("div",null,"Response",-1),Xt={key:1,"text-xs":"",op50:""},Yt=c("div",{"flex-auto":""},null,-1),Zt=c("div",{op50:""}," Request finished in ",-1),eo={key:0,"flex-auto":"","overflow-auto":""},to={border:"~ base","h-full":"","w-full":"",rounded:""},oo=["data"],no={key:2,"flex-auto":"","overflow-auto":"",p4:""},so={border:"~ base",rounded:""},lo=["src"],ao={key:1,controls:"",rounded:""},ro=["src"],uo=le({__name:"ServerRouteDetails",props:{route:{}},emits:["open-default-input"],setup(l,{emit:h}){const m=l,[o,w]=Ke(),_=Qe(),t=ie({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=Xe(),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=ie({query:[{key:"",value:"",type:"string"}],body:[{key:"",value:"",type:"string"}],headers:[{key:"Content-Type",value:"application/json",type:"string"}]}),$=O({}),{inputDefaults:g}=Ve("serverRoutes"),P=["GET","POST","PUT","PATCH","DELETE","HEAD"],q=["PATCH","POST","PUT","DELETE"],L=R(()=>q.includes(v.value.toUpperCase())),S=O(z.value.length?"params":"query"),ee=["input","json"],W=O(ee[0]),K=R({get:()=>x[S.value],set:s=>{x[S.value]=s}}),T=R(()=>({...G(g.value.query),...G(x.query)})),te=R(()=>({...G(g.value.headers),...G(x.headers)})),ae=R(()=>L.value?W.value==="json"?{...G(g.value.body),...$.value}:{...G(g.value.body),...G(x.body)}:void 0),Ue=R(()=>{let s=_.value?.devServer.url||"http://localhost";s.charAt(s.length-1)==="/"&&(s=s.slice(0,-1));const i=_.value?.devServer.port||3e3;return s.includes(`:${i}`)?s:`${s}:${i}`}),oe=R(()=>{let s=new URLSearchParams(T.value).toString();s&&(s=`?${s}`);const i=(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+i}),Ie=R(()=>Ue.value+oe.value);function G(s){const i=Object.fromEntries(s.filter(({key:b,value:N})=>b&&N!==void 0).map(({key:b,value:N})=>[b,N]));return Object.entries(i).length?i:void 0}async function ce(){U.value=!0,a.value=!0;const s=Date.now();try{t.data=await $fetch(Ie.value,{method:v.value.toUpperCase(),headers:te.value,query:T.value,body:ae.value,onResponse({response:i}){t.contentType=(i.headers.get("content-type")||"").toString().toLowerCase().trim(),t.statusCode=i.status},onResponseError(i){t.error=i.response._data,t.data=i.response._data}})}catch{}a.value=!1,t.fetchTime=Date.now()-s}const pe=R(()=>{const s=[],i=[],b=Object.entries(te.value).filter(([I,F])=>I&&F&&!(I==="Content-Type"&&F==="application/json")).map(([I,F])=>` '${I}': '${F}'`).join(`,
|
|
2
|
+
`);v.value.toUpperCase()!=="GET"&&i.push(`method: '${v.value.toUpperCase()}'`),b&&i.push(`headers: {
|
|
3
|
+
${b}
|
|
4
|
+
}`),ae.value&&i.push(`body: ${JSON.stringify(ae.value,null,2)}`);const N=i.length?`, {
|
|
5
|
+
${i.join(`,
|
|
6
|
+
`).split(`
|
|
7
|
+
`).map(I=>` ${I}`).join(`
|
|
8
|
+
`)}
|
|
9
|
+
}`:"";return s.push({name:"useFetch",lang:"javascript",docs:me.nuxt.useFetch,code:`const { data, pending, error, refresh } = useFetch('${oe.value}'${N})`}),s.push({name:"$fetch",lang:"javascript",docs:me.nuxt.$fetch,code:`await $fetch('${oe.value}'${N})`}),s}),Ne=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}),L.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}),X=O(De());function De(){return document.cookie.split("; ").map(s=>{const[i,b]=s.split("=");return{key:i,value:b}})}const H=ie({key:"",value:""});function re(s,i){if(!s)return;const b=X.value.find(I=>I.key===s),N=_t(s);b!==void 0?i===void 0&&(X.value=X.value.filter(I=>I.key!==s)):(X.value.push({key:s,value:i}),H.key="",H.value=""),N.value=i}return Ye(()=>{W.value==="json"&&typeof $.value=="string"&&($.value=JSON.parse($.value))}),(s,i)=>{const b=_e,N=we,I=ge,F=de,Ee=ke,fe=Te,je=ut,Oe=xe,Pe=et,ue=Ce,qe=it;return n(),p("div",It,[c("div",Nt,[c("div",Dt,[s.route.method?(n(),C(b,{key:0,class:E(("getRequestMethodClass"in s?s.getRequestMethodClass:e(se))(e(v))),"pointer-events-none":"",tabindex:"-1"},{default:k(()=>[B(j(e(v).toUpperCase()),1)]),_:1},8,["class"])):(n(),C(N,{key:1,modelValue:e(v),"onUpdate:modelValue":i[0]||(i[0]=u=>Z(v)?v.value=u:null),class:E(("getRequestMethodClass"in s?s.getRequestMethodClass:e(se))(e(v)))},{default:k(()=>[(n(),p(V,null,A(P,u=>c("option",{key:u,class:E(("getRequestMethodClass"in s?s.getRequestMethodClass:e(se))(u))},j(u.toUpperCase()),3)),64))]),_:1},8,["modelValue","class"])),f(I,{"model-value":e(oe),disabled:"","flex-auto":"","font-mono":"",p:"x5 y2",n:"primary xs"},null,8,["model-value"]),f(b,{n:"primary solid",onClick:ce},{default:k(()=>[f(F,{icon:"carbon:send"})]),_:1})])]),c("div",Et,[(n(!0),p(V,null,A(e(Ne),u=>(n(),C(b,{key:u.slug,class:E(e(S)===u.slug?"text-primary n-primary":"border-transparent shadow-none"),onClick:Q=>S.value=u.slug},{default:k(()=>[f(F,{icon:("ServerRouteTabIcons"in s?s.ServerRouteTabIcons:e($e))[u.slug]},null,8,["icon"]),B(" "+j(u.name)+" "+j(u?.length?`(${u.length})`:"")+" ",1),c("span",null,j(e(g)[u.slug]?.length?`(${e(g)[u.slug].length})`:""),1)]),_:2},1032,["class","onClick"]))),128)),jt,f(b,{icon:"carbon-launch",onClick:i[1]||(i[1]=u=>e(J)(s.route.filepath))},{default:k(()=>[B(" Open in Editor ")]),_:1})]),e(S)==="params"?(n(),p("div",Ot,[(n(!0),p(V,null,A(e(z),u=>(n(),p(V,{key:u},[c("div",Pt,j(u),1),f(I,{modelValue:e(d)[u],"onUpdate:modelValue":Q=>e(d)[u]=Q,placeholder:u,"flex-1":""},null,8,["modelValue","onUpdate:modelValue","placeholder"])],64))),128))])):D("",!0),e(S)==="cookies"?(n(),p("div",qt,[(n(!0),p(V,null,A(e(X),u=>(n(),p("div",{key:u.key,flex:"~ gap-4 items-center"},[f(I,{placeholder:"Key...","model-value":u.key,disabled:"","op-70":""},null,8,["model-value"]),f(I,{placeholder:"Value...","model-value":u.value,"flex-1":"",n:"primary",onInput:Q=>re(u.key,Q.target?.value)},null,8,["model-value","onInput"]),f(b,{title:"Delete",n:"red",onClick:Q=>re(u.key,void 0)},{default:k(()=>[f(F,{icon:"i-carbon-delete"})]),_:2},1032,["onClick"])]))),128)),c("div",Lt,[f(I,{modelValue:e(H).key,"onUpdate:modelValue":i[2]||(i[2]=u=>e(H).key=u),placeholder:"Key",n:"primary","flex-1":""},null,8,["modelValue"]),f(I,{modelValue:e(H).value,"onUpdate:modelValue":i[3]||(i[3]=u=>e(H).value=u),placeholder:"Value",n:"primary","flex-1":""},null,8,["modelValue"]),f(b,{title:"Add",n:"primary",onClick:i[4]||(i[4]=u=>re(e(H).key,e(H).value))},{default:k(()=>[f(F,{icon:"i-carbon-save"})]),_:1})])])):D("",!0),f(e(o),null,{default:k(()=>[f(fe,{modelValue:e(K),"onUpdate:modelValue":i[7]||(i[7]=u=>Z(K)?K.value=u:null),default:{type:"string"},"max-h-xs":"","of-auto":""},{default:k(()=>[e(g)[e(S)]?.length?(n(),p(V,{key:0},[c("div",Bt,[At,Mt,f(Ee,{icon:"i-carbon-edit",onClick:i[5]||(i[5]=u=>h("open-default-input"))}),Ft]),f(fe,{modelValue:e(g)[e(S)],"onUpdate:modelValue":i[6]||(i[6]=u=>e(g)[e(S)]=u),disabled:"",p0:""},null,8,["modelValue"])],64)):D("",!0)]),_:1},8,["modelValue"])]),_:1}),e(S)==="snippet"?(n(),p("div",Wt,[e(pe).length?(n(),C(je,{key:0,"code-snippets":e(pe)},null,8,["code-snippets"])):D("",!0)])):e(K)?(n(),p("div",zt,[e(S)==="body"?(n(),p(V,{key:0},[c("div",Ht,[(n(),p(V,null,A(ee,u=>c("button",{key:u,px4:"",py2:"",border:"r base",hover:"bg-active",class:E({"border-b":u!==e(W)}),onClick:Q=>W.value=u},[c("div",{class:E({op30:u!==e(W)}),"font-mono":""},j(u),3)],10,Jt)),64)),Gt]),e(W)==="input"?(n(),C(e(w),{key:0})):e(W)==="json"?(n(),C(e(dt),Ze({key:1,modelValue:e($),"onUpdate:modelValue":i[8]||(i[8]=u=>Z($)?$.value=u: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)):(n(),C(e(w),{key:1}))])):D("",!0),e(U)?e(a)?(n(),C(Pe,{key:5,"z-10":"","flex-auto":"","backdrop-blur":""},{default:k(()=>[B(" Fetching... ")]),_:1})):(n(),p(V,{key:6},[c("div",Kt,[Qt,e(t).error?(n(),C(ue,{key:0,"bg-red-400:10":"","text-red-400":""},{default:k(()=>[B(" Error ")]),_:1})):D("",!0),f(ue,{class:E({"bg-orange-400:10 text-orange-400":e(t).error,"bg-green-400:10 text-green-400":!e(t).error})},{default:k(()=>[B(j(e(t).statusCode),1)]),_:1},8,["class"]),e(t).contentType?(n(),p("code",Xt,j(e(t).contentType),1)):D("",!0),Yt,Zt,f(ue,{"bg-green-400:10":"","text-green-400":""},{default:k(()=>[B(j(e(t).fetchTime)+" ms ",1)]),_:1})]),e(y)==="pdf"?(n(),p("div",eo,[c("div",to,[c("object",{data:e(r),type:"application/pdf","flex-auto":"",width:"100%",height:"100%",rounded:""},null,8,oo)])])):e(y)!=="media"?(n(),C(qe,{key:1,"flex-auto":"","overflow-auto":"","py-2":"",code:e(r),lang:e(y)},null,8,["code","lang"])):(n(),p("div",no,[c("div",so,[e(t).contentType.includes("image")?(n(),p("img",{key:0,rounded:"",src:e(r)},null,8,lo)):(n(),p("video",ao,[c("source",{src:e(r),type:"video/mp4"},null,8,ro)]))])]))],64)):(n(),C(Oe,{key:4},{default:k(()=>[f(b,{n:"primary",onClick:ce},{default:k(()=>[f(F,{icon:"carbon:send"}),B(" Send request ")]),_:1})]),_:1}))])}}}),io={flex:"~ gap1","text-sm":""},co={key:0,op50:""},po={op50:""},fo=c("span",{op75:""},"Select a route to start",-1),mo=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),Ro=le({__name:"server-routes",setup(l){const h=O(!1),m=tt(),o=ye(),{selectedRoute:w,view:_,inputDefaults:t}=Ve("serverRoutes"),y=R(()=>{!o.value&&w.value&&(o.value=w.value.filepath);const v=m.value?.find(d=>d.filepath===o.value);return o.value!==w.value?.filepath&&v&&(w.value=v),v}),r=O(""),a=R(()=>new ot(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 L=P?P.routes?.find(S=>S.route===q):v.find(S=>S.route===q);if(L)P=L;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(L=>L.route==="runtime");if(q)d(q,x);else{const L={route:"runtime",filepath:"runtime",type:"collection",routes:[x]};v.push(L)}}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=ke,$=at,g=Se,P=uo,q=lt,L=xe,S=nt,ee=Te,W=ct,K=pt;return n(),p(V,null,[f(S,{"storage-key":"tab-server-routes"},{left:k(()=>[f($,{search:e(r),"onUpdate:search":d[1]||(d[1]=T=>Z(r)?r.value=T:null),pb2:""},{actions:k(()=>[f(x,{"text-lg":"",icon:e(_)==="list"?"i-carbon-list":"i-carbon-tree-view-alt",title:"Toggle view",onClick:M},null,8,["icon"]),f(x,{"text-lg":"",icon:"i-carbon-cics-sit-overrides",title:"Default Inputs",onClick:d[0]||(d[0]=T=>h.value=!e(h))})]),default:k(()=>[c("div",io,[e(r)?(n(),p("span",co,j(e(U).length)+" matched · ",1)):D("",!0),c("span",po,j(e(m)?.length)+" routes in total",1)])]),_:1},8,["search"]),(n(!0),p(V,null,A(e(_)==="tree"?e(J):e(U),T=>(n(),C(g,{key:T.filepath,item:T},null,8,["item"]))),128))]),right:k(()=>[(n(),C(st,{max:10},[e(y)?(n(),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):(n(),C(L,{key:0},{default:k(()=>[f(q,{px6:"",py2:""},{default:k(()=>[fo]),_:1})]),_:1}))]),_:1}),f(K,{modelValue:e(h),"onUpdate:modelValue":d[3]||(d[3]=T=>Z(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,[mo,(n(!0),p(V,null,A(Object.keys(e(t)),T=>(n(),C(W,{key:T,text:`${z(T)} ${e(t)[T].length?`(${e(t)[T].length})`:""}`,padding:!1,icon:("ServerRouteTabIcons"in v?v.ServerRouteTabIcons:e($e))[T]},{default:k(()=>[f(ee,{modelValue:e(t)[T],"onUpdate:modelValue":te=>e(t)[T]=te,py0:"",default:{type:"string"}},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["text","icon"]))),128))])]),_:1},8,["modelValue"])],64)}}});export{Ro as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as F}from"./NIconTitle.vue.
|
|
1
|
+
import{_ as F}from"./NIconTitle.vue.0a904b99.js";import{_ as q}from"./NSwitch.vue.6c2556d0.js";import{g as A,bw as H,aq as P,c as u,b as i,a as e,F as v,n as T,s as a,w as r,L as V,ac as E,bx as M,o as d,q as $,t as h,h as R,v as U,d as G,br as J,S as K,k as Q}from"./entry.6507cb32.js";import{_ as W}from"./NSelect.vue.9556d6e0.js";import{_ as X}from"./NCheckbox.vue.63949e52.js";const Y={px6:"",py6:""},Z={grid:"~ md:cols-2 gap-x-10 gap-y-3","max-w-300":""},ee={flex:"~ col gap-1",py3:""},ne=e("h3",{mb1:"","text-lg":""}," Tabs ",-1),oe={flex:"~ gap-2","flex-auto":"","items-center":"","justify-start":""},le={capitalize:"",op75:""},te={flex:"~ col gap-1",border:"~ base rounded",py3:"",pl4:"",pr2:""},se=e("div",{"flex-auto":""},null,-1),ae={py3:"",flex:"~ col gap-1",border:"b base"},ie=e("h3",{mb1:"","text-lg":""}," Appearance ",-1),ce=e("div",{"carbon-sun":"","dark:carbon-moon":"","translate-y--1px":""},null,-1),de={py3:"",flex:"~ col gap-1",border:"b base"},ue=e("h3",{mb1:"","text-lg":""}," UI Scale ",-1),re=["value"],pe={py3:"",flex:"~ col gap-1"},_e=e("h3",{mb1:"","text-lg":""}," Features ",-1),me=e("span",null,"Close DevTools when clicking outside",-1),fe=e("span",null,"Show help buttons",-1),ke=A({__name:"settings",setup(ve){const{interactionCloseOnOutsideClick:b,showHelpButtons:y,scale:k,hiddenTabs:_,pinnedTabs:t,hiddenTabCategories:m}=E(),S=[["Tiny",12/15],["Small",14/15],["Normal",1],["Large",16/15],["Huge",18/15]],B=H(P());function O(s,l){l?_.value=_.value.filter(c=>c!==s):_.value.push(s)}function D(s,l){l?m.value=m.value.filter(c=>c!==s):m.value.push(s)}function I(s){t.value.includes(s)?t.value=t.value.filter(l=>l!==s):t.value.push(s)}function w(s,l){const c=t.value.indexOf(s);if(c===-1)return;const p=c+l;if(p<0||p>=t.value.length)return;const f=[...t.value];f.splice(c,1),f.splice(p,0,s),t.value=f}return(s,l)=>{const c=F,p=q,f=J,C=K,L=Q,j=M,z=W,N=X;return d(),u("div",Y,[i(c,{class:"mb-5 text-xl op75",icon:"i-carbon-settings-adjust",text:"DevTools Settings"}),e("div",Z,[e("div",ee,[ne,(d(!0),u(v,null,T(a(B),([n,g])=>(d(),u(v,{key:n},[g.length?(d(),u("div",{key:0,flex:"~ col gap-1","mx--1":"",class:$(a(m).includes(n)?"op50 grayscale":""),"pt-2":""},[i(p,{flex:"~ row-reverse",px2:"",py1:"","n-lime":"","model-value":!a(m).includes(n),"onUpdate:modelValue":o=>D(n,o)},{default:r(()=>[e("div",oe,[e("span",le,h(n),1)])]),_:2},1032,["model-value","onUpdate:modelValue"]),e("div",te,[(d(!0),u(v,null,T(g,o=>(d(),R(p,{key:o.name,flex:"~ row-reverse",py1:"",pl2:"",pr1:"","n-primary":"","model-value":!a(_).includes(o.name),"onUpdate:modelValue":x=>O(o.name,x)},{default:r(()=>[e("div",{flex:"~ gap-2","flex-auto":"","items-center":"","justify-start":"","pr-4":"",class:$(a(_).includes(o.name)?"op25":"")},[i(f,{"text-xl":"",icon:o.icon,title:o.title},null,8,["icon","title"]),e("span",null,h(o.title),1),se,a(t).includes(o.name)?(d(),u(v,{key:0},[i(C,{icon:"i-carbon-caret-up",disabled:a(t).indexOf(o.name)===0,onClick:x=>w(o.name,-1)},null,8,["disabled","onClick"]),i(C,{icon:"i-carbon-caret-down",disabled:a(t).indexOf(o.name)===a(t).length-1,onClick:x=>w(o.name,1)},null,8,["disabled","onClick"])],64)):U("",!0),i(C,{icon:a(t).includes(o.name)?" i-carbon-pin-filled rotate--45":" i-carbon-pin op50",onClick:x=>I(o.name)},null,8,["icon","onClick"])],2)]),_:2},1032,["model-value","onUpdate:modelValue"]))),128))])],2)):U("",!0)],64))),128))]),e("div",null,[e("div",ae,[ie,e("div",null,[i(j,null,{default:r(({toggle:n,isDark:g})=>[i(L,{n:"primary",onClick:n},{default:r(()=>[ce,G(" "+h(g.value?"Dark":"Light"),1)]),_:2},1032,["onClick"])]),_:1})])]),e("div",de,[ue,i(z,{modelValue:a(k),"onUpdate:modelValue":l[0]||(l[0]=n=>V(k)?k.value=n:null),n:"primary"},{default:r(()=>[(d(),u(v,null,T(S,n=>e("option",{key:n[0],value:n[1]},h(n[0]),9,re)),64))]),_:1},8,["modelValue"])]),e("div",pe,[_e,i(N,{modelValue:a(b),"onUpdate:modelValue":l[1]||(l[1]=n=>V(b)?b.value=n:null),"n-primary":""},{default:r(()=>[me]),_:1},8,["modelValue"]),i(N,{modelValue:a(y),"onUpdate:modelValue":l[2]||(l[2]=n=>V(y)?y.value=n:null),"n-primary":""},{default:r(()=>[fe]),_:1},8,["modelValue"])])])])])}}});export{ke as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ah as m,aW as n,m as s,A as o}from"./entry.
|
|
1
|
+
import{ah as m,aW as n,m as s,A as o}from"./entry.6507cb32.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};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as E}from"./Badge.
|
|
1
|
+
import{_ as E}from"./Badge.8d650e3b.js";import{_ as F}from"./NCodeBlock.vue.77e54b2e.js";import{_ as L}from"./NCheckbox.vue.63949e52.js";import{_ as W}from"./NTip.vue.861372f7.js";import{g as Y,E as A,aX as G,r as V,aY as H,C as X,H as Z,o as m,c as v,Y as q,s as t,t as $,v as w,F as B,b as s,h as z,w as u,a as h,L as M,d as p,k as J,N as K,aZ as O,a1 as Q,m as ee,af as te,ag as ae,a_ as se,aW as ne}from"./entry.6507cb32.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=Y({__name:"NpmVersionCheck",props:{packageName:{},options:{},showVersion:{type:Boolean,default:!0}},setup(l){const a=l,e=A(),{info:n,update:i,state:y,processId:k,restart:c}=G(a.packageName,a.options),f=V(!0),_=V(!0),U=H(),x=X(),R=Z();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 N=E,S=F,b=L,T=W,P=J,I=K;return m(),v(B,null,[q(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(N,{"bg-green-400:10":"","text-green-400":"",title:"updates available",textContent:"updates available"})])):(m(),z(N,{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:j})=>[s(I,{"model-value":!0,onClose:d=>g(!1)},{default:u(()=>[h("div",le,[h("h3",re," Update "+$(a.packageName)+"? ",1),ue,s(S,{code:j[0],lang:"bash",my3:"",px4:"",py2:"",border:"~ base rounded",lines:!1},null,8,["code"]),s(b,{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(b,{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 O("installed-modules",()=>{const l=Q(),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};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as G,E as ae,r as
|
|
1
|
+
import{g as G,E as ae,r as j,G as R,bh as T,an as oe,ab as se,am as re,O as le,m as ue,A as f,B as k,s as t,o as r,h as _,w as u,a as l,b as d,L as U,c as i,F as w,n as D,t as b,q as P,aR as A,d as c,v as F,aE as ie,y as ce,a$ as de,bi as me,bj as _e,bk as z,S as pe,M as fe,T as ve,k as ye,ad as ge,i as he,J as ke}from"./entry.6507cb32.js";import{_ as be}from"./NSelect.vue.9556d6e0.js";import{_ as xe}from"./NLink.vue.ec1f69e3.js";import{_ as we}from"./FilepathItem.vue.84aa0a31.js";import{U as Ce}from"./json-editor-vue.bbdad521.js";import{_ as Ke}from"./AuthRequiredPanel.vue.17c2a7bd.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=l("div",{"x-divider":""},null,-1),je={key:0,"h-full":"","of-hidden":"",flex:"~ col"},Ue={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=l("br",null,null,-1),Me={key:0,op50:""},qe={key:1},Ee=l("code",null,"nitro.storage",-1),Re=l("br",null,null,-1),Te={"font-bold":""},Pe=l("br",null,null,-1),Fe={"text-sm":""},ze=l("br",null,null,-1),Ge=G({__name:"StorageDetails",async setup(O){let m,g;const C=_e(),h=ae(),x=j(""),v=j(""),s=R("storage:current",""),e=j(),y=R("storage:file:state",""),{data:K}=([m,g]=T(()=>z("storageMounts",()=>f.getStorageMounts())),m=await m,g(),m),{data:S,refresh:B}=([m,g]=T(async()=>z("storageKeys",async()=>s.value?await f.getStorageKeys(s.value):[])),m=await m,g(),m),J=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(J),se(s,()=>{B(),y.value=""}),re(async()=>{if(!y.value){e.value=null;return}V(y.value)}),le("keydown",n=>{n.key==="s"&&(n.ctrlKey||n.metaKey)&&(N(),n.preventDefault())});function $(n){return n.replace(`${s.value}:`,"")}const W=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 H(){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=pe,Z=be,I=fe,ee=ve,L=ye,M=xe,q=ge,E=he,te=ke,ne=we;return t(s)?(r(),_(te,{key:0,"storage-key":"tab-storage"},{left:u(()=>[l("div",Se,[d(Y,{icon:"carbon-chevron-left","ml--1":"",onClick:a[0]||(a[0]=o=>s.value="")}),l("div",$e,[d(Z,{modelValue:t(s),"onUpdate:modelValue":a[1]||(a[1]=o=>U(s)?s.value=o:null),n:"primary",icon:"carbon-data-base"},{default:u(()=>[(r(!0),i(w,null,D(t(K),(o,p)=>(r(),i("option",{key:p,value:p},b(p),9,Ve))),128))]),_:1},8,["modelValue"])])]),d(I,{modelValue:t(x),"onUpdate:modelValue":a[2]||(a[2]=o=>U(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"]),(r(!0),i(w,null,D(t(W),o=>(r(),i(w,{key:o},[l("button",{block:"","w-full":"",truncate:"",px2:"",py1:"","text-start":"","text-sm":"","font-mono":"",class:P(o===t(e)?.key?"text-primary n-bg-active":"text-secondary hover:n-bg-hover"),onClick:p=>y.value=o},b($(o)),11,Ne),Ie],64))),128)),d(I,{modelValue:t(v),"onUpdate:modelValue":a[3]||(a[3]=o=>U(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(H,["enter"])},null,8,["modelValue","onKeyup"])]),right:u(()=>[t(e)?.key?(r(),i("div",je,[l("div",Ue,[l("div",De,[t(e).editingKey?(r(),_(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"])):(r(),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):(r(),_(L,{key:2,n:"green xs",disabled:t(e).content===t(e).updatedContent,class:P({"border-green":t(e).content!==t(e).updatedContent}),onClick:N},{default:u(()=>[c(" Save ")]),_:1},8,["disabled","class"]))]),l("div",null,[d(L,{n:"red xs",onClick:Q},{default:u(()=>[c(" Delete ")]),_:1})])]),typeof t(e).content=="object"?(r(),_(t(Ce),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((r(),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)),[[me,t(e).updatedContent]])])):(r(),_(E,{key:1},{default:u(()=>[d(q,{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})):(r(),_(E,{key:1},{default:u(()=>[Object.keys(t(K)).length?(r(),i("p",Me," Select one storage to start: ")):(r(),i("p",qe,[c(" No custom storage defined in "),Ee,c("."),Re,c(" Learn more about "),d(M,{href:"https://nitro.unjs.io/guide/storage",n:"orange",target:"_blank"},{default:u(()=>[c(" Nitro storage ")]),_:1})])),(r(!0),i(w,null,D(t(K),(o,p)=>(r(),_(q,{key:p,"min-w-80":"","cursor-pointer":"","p-4":"","text-left":"",hover:"border-green",onClick:Oe=>s.value=p},{default:u(()=>[l("span",Te,b(p),1),Pe,l("span",Fe,b(o.driver)+" driver",1),ze,o.base?(r(),_(ne,{key:0,"text-xs":"",filepath:o.base},null,8,["filepath"])):F("",!0)]),_:2},1032,["onClick"]))),128))]),_:1}))}}}),Ze=G({__name:"storage",setup(O){return(m,g)=>{const C=Ge,h=Ke;return r(),_(h,null,{default:u(()=>[d(C)]),_:1})}}});export{Ze as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{g as ae,r as he,aa as Se,O as me,A as re,B as Ce,o as Q,c as ie,a as te,b as de,s as J,h as se,v as oe,t as ne,F as _e,
|
|
1
|
+
import{g as ae,r as he,aa as Se,O as me,A as re,B as Ce,o as Q,c as ie,a as te,b as de,s as J,h as se,v as oe,t as ne,F as _e,bj as be,S as ue,bl as ye,H as we,m as Ee,am as Le,n as ke,q as ce,a$ as Re,d as le,T as De,w as Ae}from"./entry.6507cb32.js";import{_ as xe}from"./AuthRequiredPanel.vue.17c2a7bd.js";var fe={exports:{}};(function(ee,Z){(function(X,q){ee.exports=q()})(self,()=>(()=>{var X={4567:function(M,s,a){var h=this&&this.__decorate||function(t,n,c,v){var g,o=arguments.length,S=o<3?n:v===null?v=Object.getOwnPropertyDescriptor(n,c):v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")S=Reflect.decorate(t,n,c,v);else for(var C=t.length-1;C>=0;C--)(g=t[C])&&(S=(o<3?g(S):o>3?g(n,c,S):g(n,c))||S);return o>3&&S&&Object.defineProperty(n,c,S),S},u=this&&this.__param||function(t,n){return function(c,v){n(c,v,t)}};Object.defineProperty(s,"__esModule",{value:!0}),s.AccessibilityManager=void 0;const d=a(9042),_=a(6114),p=a(9924),f=a(844),l=a(5596),e=a(4725),r=a(3656);let i=class extends f.Disposable{constructor(t,n){super(),this._terminal=t,this._renderService=n,this._liveRegionLineCount=0,this._charsToConsume=[],this._charsToAnnounce="",this._accessibilityContainer=document.createElement("div"),this._accessibilityContainer.classList.add("xterm-accessibility"),this._rowContainer=document.createElement("div"),this._rowContainer.setAttribute("role","list"),this._rowContainer.classList.add("xterm-accessibility-tree"),this._rowElements=[];for(let c=0;c<this._terminal.rows;c++)this._rowElements[c]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[c]);if(this._topBoundaryFocusListener=c=>this._handleBoundaryFocus(c,0),this._bottomBoundaryFocusListener=c=>this._handleBoundaryFocus(c,1),this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions(),this._accessibilityContainer.appendChild(this._rowContainer),this._liveRegion=document.createElement("div"),this._liveRegion.classList.add("live-region"),this._liveRegion.setAttribute("aria-live","assertive"),this._accessibilityContainer.appendChild(this._liveRegion),this._liveRegionDebouncer=this.register(new p.TimeBasedDebouncer(this._announceCharacters.bind(this))),!this._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");this._terminal.element.insertAdjacentElement("afterbegin",this._accessibilityContainer),this.register(this._liveRegionDebouncer),this.register(this._terminal.onResize(c=>this._handleResize(c.rows))),this.register(this._terminal.onRender(c=>this._refreshRows(c.start,c.end))),this.register(this._terminal.onScroll(()=>this._refreshRows())),this.register(this._terminal.onA11yChar(c=>this._handleChar(c))),this.register(this._terminal.onLineFeed(()=>this._handleChar(`
|
|
2
2
|
`))),this.register(this._terminal.onA11yTab(c=>this._handleTab(c))),this.register(this._terminal.onKey(c=>this._handleKey(c.key))),this.register(this._terminal.onBlur(()=>this._clearLiveRegion())),this.register(this._renderService.onDimensionsChange(()=>this._refreshRowsDimensions())),this._screenDprMonitor=new l.ScreenDprMonitor(window),this.register(this._screenDprMonitor),this._screenDprMonitor.setListener(()=>this._refreshRowsDimensions()),this.register((0,r.addDisposableDomListener)(window,"resize",()=>this._refreshRowsDimensions())),this._refreshRows(),this.register((0,f.toDisposable)(()=>{this._accessibilityContainer.remove(),this._rowElements.length=0}))}_handleTab(t){for(let n=0;n<t;n++)this._handleChar(" ")}_handleChar(t){this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==t&&(this._charsToAnnounce+=t):this._charsToAnnounce+=t,t===`
|
|
3
3
|
`&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=d.tooMuchOutput)),_.isMac&&this._liveRegion.textContent&&this._liveRegion.textContent.length>0&&!this._liveRegion.parentNode&&setTimeout(()=>{this._accessibilityContainer.appendChild(this._liveRegion)},0))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0,_.isMac&&this._liveRegion.remove()}_handleKey(t){this._clearLiveRegion(),/\p{Control}/u.test(t)||this._charsToConsume.push(t)}_refreshRows(t,n){this._liveRegionDebouncer.refresh(t,n,this._terminal.rows)}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(t,n){const c=t.target,v=this._rowElements[n===0?1:this._rowElements.length-2];if(c.getAttribute("aria-posinset")===(n===0?"1":`${this._terminal.buffer.lines.length}`)||t.relatedTarget!==v)return;let g,o;if(n===0?(g=c,o=this._rowElements.pop(),this._rowContainer.removeChild(o)):(g=this._rowElements.shift(),o=c,this._rowContainer.removeChild(g)),g.removeEventListener("focus",this._topBoundaryFocusListener),o.removeEventListener("focus",this._bottomBoundaryFocusListener),n===0){const S=this._createAccessibilityTreeNode();this._rowElements.unshift(S),this._rowContainer.insertAdjacentElement("afterbegin",S)}else{const S=this._createAccessibilityTreeNode();this._rowElements.push(S),this._rowContainer.appendChild(S)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(n===0?-1:1),this._rowElements[n===0?1:this._rowElements.length-2].focus(),t.preventDefault(),t.stopImmediatePropagation()}_handleResize(t){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let n=this._rowContainer.children.length;n<this._terminal.rows;n++)this._rowElements[n]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[n]);for(;this._rowElements.length>t;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){const t=document.createElement("div");return t.setAttribute("role","listitem"),t.tabIndex=-1,this._refreshRowDimensions(t),t}_refreshRowsDimensions(){if(this._renderService.dimensions.css.cell.height){this._accessibilityContainer.style.width=`${this._renderService.dimensions.css.canvas.width}px`,this._rowElements.length!==this._terminal.rows&&this._handleResize(this._terminal.rows);for(let t=0;t<this._terminal.rows;t++)this._refreshRowDimensions(this._rowElements[t])}}_refreshRowDimensions(t){t.style.height=`${this._renderService.dimensions.css.cell.height}px`}};i=h([u(1,e.IRenderService)],i),s.AccessibilityManager=i},3614:(M,s)=>{function a(_){return _.replace(/\r?\n/g,"\r")}function h(_,p){return p?"\x1B[200~"+_+"\x1B[201~":_}function u(_,p,f){_=h(_=a(_),f.decPrivateModes.bracketedPasteMode),f.triggerDataEvent(_,!0),p.value=""}function d(_,p,f){const l=f.getBoundingClientRect(),e=_.clientX-l.left-10,r=_.clientY-l.top-10;p.style.width="20px",p.style.height="20px",p.style.left=`${e}px`,p.style.top=`${r}px`,p.style.zIndex="1000",p.focus()}Object.defineProperty(s,"__esModule",{value:!0}),s.rightClickHandler=s.moveTextAreaUnderMouseCursor=s.paste=s.handlePasteEvent=s.copyHandler=s.bracketTextForPaste=s.prepareTextForTerminal=void 0,s.prepareTextForTerminal=a,s.bracketTextForPaste=h,s.copyHandler=function(_,p){_.clipboardData&&_.clipboardData.setData("text/plain",p.selectionText),_.preventDefault()},s.handlePasteEvent=function(_,p,f){_.stopPropagation(),_.clipboardData&&u(_.clipboardData.getData("text/plain"),p,f)},s.paste=u,s.moveTextAreaUnderMouseCursor=d,s.rightClickHandler=function(_,p,f,l,e){d(_,p,f),e&&l.rightClickSelect(_),p.value=l.selectionText,p.select()}},7239:(M,s,a)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.ColorContrastCache=void 0;const h=a(1505);s.ColorContrastCache=class{constructor(){this._color=new h.TwoKeyMap,this._css=new h.TwoKeyMap}setCss(u,d,_){this._css.set(u,d,_)}getCss(u,d){return this._css.get(u,d)}setColor(u,d,_){this._color.set(u,d,_)}getColor(u,d){return this._color.get(u,d)}clear(){this._color.clear(),this._css.clear()}}},3656:(M,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.addDisposableDomListener=void 0,s.addDisposableDomListener=function(a,h,u,d){a.addEventListener(h,u,d);let _=!1;return{dispose:()=>{_||(_=!0,a.removeEventListener(h,u,d))}}}},6465:function(M,s,a){var h=this&&this.__decorate||function(e,r,i,t){var n,c=arguments.length,v=c<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,i):t;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")v=Reflect.decorate(e,r,i,t);else for(var g=e.length-1;g>=0;g--)(n=e[g])&&(v=(c<3?n(v):c>3?n(r,i,v):n(r,i))||v);return c>3&&v&&Object.defineProperty(r,i,v),v},u=this&&this.__param||function(e,r){return function(i,t){r(i,t,e)}};Object.defineProperty(s,"__esModule",{value:!0}),s.Linkifier2=void 0;const d=a(2585),_=a(8460),p=a(844),f=a(3656);let l=class extends p.Disposable{constructor(e){super(),this._bufferService=e,this._linkProviders=[],this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this.register(new _.EventEmitter),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this.register(new _.EventEmitter),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this.register((0,p.getDisposeArrayDisposable)(this._linkCacheDisposables)),this.register((0,p.toDisposable)(()=>{this._lastMouseEvent=void 0})),this.register(this._bufferService.onResize(()=>{this._clearCurrentLink(),this._wasResized=!0}))}get currentLink(){return this._currentLink}registerLinkProvider(e){return this._linkProviders.push(e),{dispose:()=>{const r=this._linkProviders.indexOf(e);r!==-1&&this._linkProviders.splice(r,1)}}}attachToDom(e,r,i){this._element=e,this._mouseService=r,this._renderService=i,this.register((0,f.addDisposableDomListener)(this._element,"mouseleave",()=>{this._isMouseOut=!0,this._clearCurrentLink()})),this.register((0,f.addDisposableDomListener)(this._element,"mousemove",this._handleMouseMove.bind(this))),this.register((0,f.addDisposableDomListener)(this._element,"mousedown",this._handleMouseDown.bind(this))),this.register((0,f.addDisposableDomListener)(this._element,"mouseup",this._handleMouseUp.bind(this)))}_handleMouseMove(e){if(this._lastMouseEvent=e,!this._element||!this._mouseService)return;const r=this._positionFromMouseEvent(e,this._element,this._mouseService);if(!r)return;this._isMouseOut=!1;const i=e.composedPath();for(let t=0;t<i.length;t++){const n=i[t];if(n.classList.contains("xterm"))break;if(n.classList.contains("xterm-hover"))return}this._lastBufferCell&&r.x===this._lastBufferCell.x&&r.y===this._lastBufferCell.y||(this._handleHover(r),this._lastBufferCell=r)}_handleHover(e){if(this._activeLine!==e.y||this._wasResized)return this._clearCurrentLink(),this._askForLink(e,!1),void(this._wasResized=!1);this._currentLink&&this._linkAtPosition(this._currentLink.link,e)||(this._clearCurrentLink(),this._askForLink(e,!0))}_askForLink(e,r){var i,t;this._activeProviderReplies&&r||((i=this._activeProviderReplies)===null||i===void 0||i.forEach(c=>{c?.forEach(v=>{v.link.dispose&&v.link.dispose()})}),this._activeProviderReplies=new Map,this._activeLine=e.y);let n=!1;for(const[c,v]of this._linkProviders.entries())r?!((t=this._activeProviderReplies)===null||t===void 0)&&t.get(c)&&(n=this._checkLinkProviderResult(c,e,n)):v.provideLinks(e.y,g=>{var o,S;if(this._isMouseOut)return;const C=g?.map(w=>({link:w}));(o=this._activeProviderReplies)===null||o===void 0||o.set(c,C),n=this._checkLinkProviderResult(c,e,n),((S=this._activeProviderReplies)===null||S===void 0?void 0:S.size)===this._linkProviders.length&&this._removeIntersectingLinks(e.y,this._activeProviderReplies)})}_removeIntersectingLinks(e,r){const i=new Set;for(let t=0;t<r.size;t++){const n=r.get(t);if(n)for(let c=0;c<n.length;c++){const v=n[c],g=v.link.range.start.y<e?0:v.link.range.start.x,o=v.link.range.end.y>e?this._bufferService.cols:v.link.range.end.x;for(let S=g;S<=o;S++){if(i.has(S)){n.splice(c--,1);break}i.add(S)}}}}_checkLinkProviderResult(e,r,i){var t;if(!this._activeProviderReplies)return i;const n=this._activeProviderReplies.get(e);let c=!1;for(let v=0;v<e;v++)this._activeProviderReplies.has(v)&&!this._activeProviderReplies.get(v)||(c=!0);if(!c&&n){const v=n.find(g=>this._linkAtPosition(g.link,r));v&&(i=!0,this._handleNewLink(v))}if(this._activeProviderReplies.size===this._linkProviders.length&&!i)for(let v=0;v<this._activeProviderReplies.size;v++){const g=(t=this._activeProviderReplies.get(v))===null||t===void 0?void 0:t.find(o=>this._linkAtPosition(o.link,r));if(g){i=!0,this._handleNewLink(g);break}}return i}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(e){if(!this._element||!this._mouseService||!this._currentLink)return;const r=this._positionFromMouseEvent(e,this._element,this._mouseService);r&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,r)&&this._currentLink.link.activate(e,this._currentLink.link.text)}_clearCurrentLink(e,r){this._element&&this._currentLink&&this._lastMouseEvent&&(!e||!r||this._currentLink.link.range.start.y>=e&&this._currentLink.link.range.end.y<=r)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,p.disposeArray)(this._linkCacheDisposables))}_handleNewLink(e){if(!this._element||!this._lastMouseEvent||!this._mouseService)return;const r=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);r&&this._linkAtPosition(e.link,r)&&(this._currentLink=e,this._currentLink.state={decorations:{underline:e.link.decorations===void 0||e.link.decorations.underline,pointerCursor:e.link.decorations===void 0||e.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,e.link,this._lastMouseEvent),e.link.decorations={},Object.defineProperties(e.link.decorations,{pointerCursor:{get:()=>{var i,t;return(t=(i=this._currentLink)===null||i===void 0?void 0:i.state)===null||t===void 0?void 0:t.decorations.pointerCursor},set:i=>{var t,n;!((t=this._currentLink)===null||t===void 0)&&t.state&&this._currentLink.state.decorations.pointerCursor!==i&&(this._currentLink.state.decorations.pointerCursor=i,this._currentLink.state.isHovered&&((n=this._element)===null||n===void 0||n.classList.toggle("xterm-cursor-pointer",i)))}},underline:{get:()=>{var i,t;return(t=(i=this._currentLink)===null||i===void 0?void 0:i.state)===null||t===void 0?void 0:t.decorations.underline},set:i=>{var t,n,c;!((t=this._currentLink)===null||t===void 0)&&t.state&&((c=(n=this._currentLink)===null||n===void 0?void 0:n.state)===null||c===void 0?void 0:c.decorations.underline)!==i&&(this._currentLink.state.decorations.underline=i,this._currentLink.state.isHovered&&this._fireUnderlineEvent(e.link,i))}}}),this._renderService&&this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange(i=>{if(!this._currentLink)return;const t=i.start===0?0:i.start+1+this._bufferService.buffer.ydisp,n=this._bufferService.buffer.ydisp+1+i.end;if(this._currentLink.link.range.start.y>=t&&this._currentLink.link.range.end.y<=n&&(this._clearCurrentLink(t,n),this._lastMouseEvent&&this._element)){const c=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);c&&this._askForLink(c,!1)}})))}_linkHover(e,r,i){var t;!((t=this._currentLink)===null||t===void 0)&&t.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(r,!0),this._currentLink.state.decorations.pointerCursor&&e.classList.add("xterm-cursor-pointer")),r.hover&&r.hover(i,r.text)}_fireUnderlineEvent(e,r){const i=e.range,t=this._bufferService.buffer.ydisp,n=this._createLinkUnderlineEvent(i.start.x-1,i.start.y-t-1,i.end.x,i.end.y-t-1,void 0);(r?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(n)}_linkLeave(e,r,i){var t;!((t=this._currentLink)===null||t===void 0)&&t.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(r,!1),this._currentLink.state.decorations.pointerCursor&&e.classList.remove("xterm-cursor-pointer")),r.leave&&r.leave(i,r.text)}_linkAtPosition(e,r){const i=e.range.start.y*this._bufferService.cols+e.range.start.x,t=e.range.end.y*this._bufferService.cols+e.range.end.x,n=r.y*this._bufferService.cols+r.x;return i<=n&&n<=t}_positionFromMouseEvent(e,r,i){const t=i.getCoords(e,r,this._bufferService.cols,this._bufferService.rows);if(t)return{x:t[0],y:t[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(e,r,i,t,n){return{x1:e,y1:r,x2:i,y2:t,cols:this._bufferService.cols,fg:n}}};l=h([u(0,d.IBufferService)],l),s.Linkifier2=l},9042:(M,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.tooMuchOutput=s.promptLabel=void 0,s.promptLabel="Terminal input",s.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},3730:function(M,s,a){var h=this&&this.__decorate||function(l,e,r,i){var t,n=arguments.length,c=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,r,i);else for(var v=l.length-1;v>=0;v--)(t=l[v])&&(c=(n<3?t(c):n>3?t(e,r,c):t(e,r))||c);return n>3&&c&&Object.defineProperty(e,r,c),c},u=this&&this.__param||function(l,e){return function(r,i){e(r,i,l)}};Object.defineProperty(s,"__esModule",{value:!0}),s.OscLinkProvider=void 0;const d=a(511),_=a(2585);let p=class{constructor(l,e,r){this._bufferService=l,this._optionsService=e,this._oscLinkService=r}provideLinks(l,e){var r;const i=this._bufferService.buffer.lines.get(l-1);if(!i)return void e(void 0);const t=[],n=this._optionsService.rawOptions.linkHandler,c=new d.CellData,v=i.getTrimmedLength();let g=-1,o=-1,S=!1;for(let C=0;C<v;C++)if(o!==-1||i.hasContent(C)){if(i.loadCell(C,c),c.hasExtendedAttrs()&&c.extended.urlId){if(o===-1){o=C,g=c.extended.urlId;continue}S=c.extended.urlId!==g}else o!==-1&&(S=!0);if(S||o!==-1&&C===v-1){const w=(r=this._oscLinkService.getLinkData(g))===null||r===void 0?void 0:r.uri;if(w){const y={start:{x:o+1,y:l},end:{x:C+(S||C!==v-1?0:1),y:l}};let D=!1;if(!n?.allowNonHttpProtocols)try{const B=new URL(w);["http:","https:"].includes(B.protocol)||(D=!0)}catch{D=!0}D||t.push({text:w,range:y,activate:(B,H)=>n?n.activate(B,H,y):f(0,H),hover:(B,H)=>{var O;return(O=n?.hover)===null||O===void 0?void 0:O.call(n,B,H,y)},leave:(B,H)=>{var O;return(O=n?.leave)===null||O===void 0?void 0:O.call(n,B,H,y)}})}S=!1,c.hasExtendedAttrs()&&c.extended.urlId?(o=C,g=c.extended.urlId):(o=-1,g=-1)}}e(t)}};function f(l,e){if(confirm(`Do you want to navigate to ${e}?
|
|
4
4
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.timeline-scroller[data-v-a2c475c0]::-webkit-scrollbar{height:100px;width:.1px}.timeline-scroller[data-v-a2c475c0]::-webkit-scrollbar-track{background-color:transparent}.timeline-scroller[data-v-a2c475c0]::-webkit-scrollbar-thumb{background-color:#8881;height:100px}.timeline-scroller[data-v-a2c475c0]:hover::-webkit-scrollbar-thumb{background-color:#8882}
|