@nuxt/devtools 1.0.0-beta.1 → 1.0.0-beta.3
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/README.md +19 -3
- package/dist/chunks/module-main.mjs +31 -15
- package/dist/chunks/vscode.mjs +1 -1
- package/dist/client/200.html +24 -24
- package/dist/client/404.html +24 -24
- package/dist/client/{modules/middleware → __blank}/index.html +24 -24
- package/dist/client/_nuxt/{CodeDiff.vue.09a831fc.js → CodeDiff.vue.4fcef1e4.js} +1 -1
- package/dist/client/_nuxt/{ComposableItem.vue.770ce9d1.js → ComposableItem.vue.b4d03c6d.js} +1 -1
- package/dist/client/_nuxt/{DataSchemaButton.vue.65a9244c.js → DataSchemaButton.vue.18fef0d4.js} +1 -1
- package/dist/client/_nuxt/{DataSchemaDrawer.939e0d36.js → DataSchemaDrawer.714650a4.js} +1 -1
- package/dist/client/_nuxt/{DurationDisplay.vue.3abddd08.js → DurationDisplay.vue.dd0f91f1.js} +1 -1
- package/dist/client/_nuxt/{FilepathItem.vue.66158bcd.js → FilepathItem.vue.a1b71b8d.js} +1 -1
- package/dist/client/_nuxt/{HelpFab.vue.074157ff.js → HelpFab.vue.f0924b60.js} +1 -1
- package/dist/client/_nuxt/LaunchPage.vue.c617b6d5.js +1 -0
- package/dist/client/_nuxt/{NBadge.532c6829.js → NBadge.ff27dca2.js} +1 -1
- package/dist/client/_nuxt/NCheckbox.vue.b56304c9.js +1 -0
- package/dist/client/_nuxt/{NCodeBlock.vue.d4a74ca4.js → NCodeBlock.vue.9ce69690.js} +2 -2
- package/dist/client/_nuxt/{NDrawer.vue.f03c3dec.js → NDrawer.vue.2b176b54.js} +1 -1
- package/dist/client/_nuxt/NDropdown.vue.e90fcd0b.js +1 -0
- package/dist/client/_nuxt/{NIconTitle.vue.5caf9fc5.js → NIconTitle.vue.7b846ffe.js} +1 -1
- package/dist/client/_nuxt/{NLink.vue.c05eef3c.js → NLink.vue.9859bf11.js} +1 -1
- package/dist/client/_nuxt/{NMarkdown.vue.52b3ce56.js → NMarkdown.vue.79860402.js} +1 -1
- package/dist/client/_nuxt/NNavbar.vue.737ef1b1.js +1 -0
- package/dist/client/_nuxt/NSectionBlock.acf7c6ed.js +1 -0
- package/dist/client/_nuxt/NSelect.vue.04805728.js +1 -0
- package/dist/client/_nuxt/NSelectTabs.vue.626ecbdd.js +1 -0
- package/dist/client/_nuxt/NSwitch.vue.ff927669.js +1 -0
- package/dist/client/_nuxt/{NTip.vue.7a94f00d.js → NTip.vue.c98a31a2.js} +1 -1
- package/dist/client/_nuxt/StateEditor.vue.1c34496c.js +1 -0
- package/dist/client/_nuxt/__blank.eaeade3a.js +1 -0
- package/dist/client/_nuxt/{analyze-build.2cdd206f.js → analyze-build.92ac65df.js} +1 -1
- package/dist/client/_nuxt/assets.c6f47fab.js +16 -0
- package/dist/client/_nuxt/client.17f79a3c.js +1 -0
- package/dist/client/_nuxt/components.80a04311.js +98 -0
- package/dist/client/_nuxt/{constants.4e5eba24.js → constants.2cc6e981.js} +1 -1
- package/dist/client/_nuxt/{css.a67813b3.js → css.f61fd02b.js} +3 -3
- package/dist/client/_nuxt/custom-_name_.b17c1362.js +1 -0
- package/dist/client/_nuxt/{default.de670135.js → default.201686e7.js} +1 -1
- package/dist/client/_nuxt/entry.909ad6c7.js +27 -0
- package/dist/client/_nuxt/entry.aac067b6.css +1 -0
- package/dist/client/_nuxt/{error-404.b43ed6fa.js → error-404.18967c67.js} +1 -1
- package/dist/client/_nuxt/{error-500.9a32d319.js → error-500.dcd91098.js} +1 -1
- package/dist/client/_nuxt/{full.44b6f3d9.js → full.a9db422e.js} +1 -1
- package/dist/client/_nuxt/{hooks.85310903.js → hooks.ad5f725f.js} +1 -1
- package/dist/client/_nuxt/{html.af01869e.js → html.14085b69.js} +1 -1
- package/dist/client/_nuxt/{imports.3e92b5b9.js → imports.468b0281.js} +1 -1
- package/dist/client/_nuxt/index.86b321d0.js +1 -0
- package/dist/client/_nuxt/{index.370f8c55.js → index.dacd63c3.js} +1 -1
- package/dist/client/_nuxt/{json-editor-vue.724e0801.js → json-editor-vue.8a771ed0.js} +2 -2
- package/dist/client/_nuxt/modules.dc1dbdef.js +2 -0
- package/dist/client/_nuxt/{none.06949a5f.js → none.37b64ac4.js} +1 -1
- package/dist/client/_nuxt/open-graph.03011848.js +3 -0
- package/dist/client/_nuxt/open-graph.484b1a77.css +1 -0
- package/dist/client/_nuxt/overview.acf4105d.js +1 -0
- package/dist/client/_nuxt/pages.061895e9.js +1 -0
- package/dist/client/_nuxt/payload.b7f38f74.js +1 -0
- package/dist/client/_nuxt/{plugins.f261769b.js → plugins.59bd86e7.js} +1 -1
- package/dist/client/_nuxt/{runtime-configs.a5615107.js → runtime-configs.aaa20729.js} +1 -1
- package/dist/client/_nuxt/server-routes.c8d34f99.js +9 -0
- package/dist/client/_nuxt/settings.12ae4ad7.js +1 -0
- package/dist/client/_nuxt/shellscript.e25d1410.js +4 -0
- package/dist/client/_nuxt/{state-components.1d5849c5.js → state-components.a78445e5.js} +1 -1
- package/dist/client/_nuxt/state-modules.199ca5da.js +1 -0
- package/dist/client/_nuxt/storage-options.aeaf572e.js +1 -0
- package/dist/client/_nuxt/{storage.cb6d643c.js → storage.f2e2d671.js} +1 -1
- package/dist/client/_nuxt/{terminals.06dde221.js → terminals.091a556d.js} +1 -1
- package/dist/client/_nuxt/timeline.1210bb98.js +29 -0
- package/dist/client/_nuxt/{unocss-runtime.1dfe0ac4.js → unocss-runtime.c55f86fd.js} +1 -1
- package/dist/client/_nuxt/virtual-files.7767a81f.js +1 -0
- package/dist/client/_nuxt/{vitesse-dark.ab479e3d.js → vitesse-dark.ff0e7dcb.js} +1 -1
- package/dist/client/_nuxt/{vitesse-light.696edcfd.js → vitesse-light.c6996724.js} +1 -1
- package/dist/client/_nuxt/{vue-html.0806679f.js → vue-html.88dda4a8.js} +1 -1
- package/dist/client/_nuxt/{vue.24311fdc.js → vue.7ad3b25a.js} +3 -3
- package/dist/client/index.html +24 -24
- package/dist/client/modules/analyze-build/index.html +24 -24
- package/dist/client/modules/assets/index.html +24 -24
- package/dist/client/modules/components/index.html +24 -24
- package/dist/client/modules/hooks/index.html +24 -24
- package/dist/client/modules/imports/index.html +24 -24
- package/dist/client/modules/modules/index.html +24 -24
- package/dist/client/modules/open-graph/index.html +24 -24
- package/dist/client/modules/overview/index.html +24 -24
- package/dist/client/modules/pages/index.html +24 -24
- package/dist/client/modules/payload/index.html +24 -24
- package/dist/client/modules/plugins/index.html +24 -24
- package/dist/client/modules/runtime-configs/index.html +24 -24
- package/dist/client/modules/server-routes/index.html +24 -24
- package/dist/client/modules/storage/index.html +24 -24
- package/dist/client/modules/terminals/index.html +24 -24
- package/dist/client/modules/timeline/index.html +24 -24
- package/dist/client/modules/virtual-files/index.html +24 -24
- package/dist/client/settings/index.html +24 -24
- package/dist/module.json +1 -1
- package/dist/module.mjs +1 -1
- package/dist/runtime/plugins/view/client.mjs +1 -1
- package/dist/shared/{devtools.d18bab28.mjs → devtools.ca660ec5.mjs} +31 -1
- package/package.json +11 -11
- package/dist/client/_nuxt/LaunchPage.vue.20d8d836.js +0 -1
- package/dist/client/_nuxt/NCheckbox.vue.83a6e70e.js +0 -1
- package/dist/client/_nuxt/NDropdown.vue.885f70c3.js +0 -1
- package/dist/client/_nuxt/NNavbar.vue.0f176f87.js +0 -1
- package/dist/client/_nuxt/NSectionBlock.43816001.js +0 -1
- package/dist/client/_nuxt/NSelect.vue.dcac9c73.js +0 -1
- package/dist/client/_nuxt/NSelectTabs.vue.411a7347.js +0 -1
- package/dist/client/_nuxt/NSwitch.vue.aacb5de3.js +0 -1
- package/dist/client/_nuxt/StateEditor.vue.e862f0c1.js +0 -1
- package/dist/client/_nuxt/assets.41fcf77e.js +0 -16
- package/dist/client/_nuxt/client.ab169146.js +0 -1
- package/dist/client/_nuxt/components.81bb7f4d.js +0 -98
- package/dist/client/_nuxt/custom-_name_.3060f125.js +0 -1
- package/dist/client/_nuxt/entry.9effa704.js +0 -27
- package/dist/client/_nuxt/entry.ebd8706b.css +0 -1
- package/dist/client/_nuxt/index.780a9ee0.js +0 -1
- package/dist/client/_nuxt/middleware.44a34c7b.js +0 -1
- package/dist/client/_nuxt/modules.24081f84.js +0 -2
- package/dist/client/_nuxt/open-graph.6cf823d3.js +0 -3
- package/dist/client/_nuxt/overview.86a88207.js +0 -1
- package/dist/client/_nuxt/pages.23eb0566.js +0 -1
- package/dist/client/_nuxt/payload.1baa204b.js +0 -1
- package/dist/client/_nuxt/server-routes.2022f4ba.js +0 -9
- package/dist/client/_nuxt/settings.ab7b45b3.js +0 -1
- package/dist/client/_nuxt/shellscript.9d056341.js +0 -4
- package/dist/client/_nuxt/state-modules.78318316.js +0 -1
- package/dist/client/_nuxt/storage-options.8ca9ecbc.js +0 -1
- package/dist/client/_nuxt/timeline.5add59be.js +0 -29
- package/dist/client/_nuxt/virtual-files.804fdba7.js +0 -1
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{_ as Ce}from"./FilepathItem.vue.a1b71b8d.js";import{d as F,a as B,a9 as _e,o as m,h as O,j as v,k as s,a8 as R,f as d,v as z,t as T,m as x,G as H,p as S,i as h,F as L,n as D,x as ie,a4 as ve,am as ge,Q as ye,aK as Te,K as ce,L as de,U as Oe,aL as be,aM as xe,_ as X,y as Ne,z as Ve,aw as $e,aN as Ae,aO as Pe,aP as Be,an as Le,a0 as je,I as Re,at as ue,ar as Ee,aQ as De,a7 as He,r as W,af as Fe,l as Ue,aa as qe,X as Ke,R as We,aR as me}from"./entry.909ad6c7.js";import{_ as Ye,u as we,a as Ge}from"./state-modules.199ca5da.js";import{_ as Xe}from"./NSectionBlock.acf7c6ed.js";import{_ as Qe}from"./NIconTitle.vue.7b846ffe.js";import{_ as ke}from"./NDropdown.vue.e90fcd0b.js";import{_ as Je}from"./NNavbar.vue.737ef1b1.js";import{_ as Ze}from"./NBadge.ff27dca2.js";import{_ as et}from"./NCodeBlock.vue.9ce69690.js";import{_ as tt}from"./NLink.vue.9859bf11.js";import{_ as nt}from"./CodeDiff.vue.4fcef1e4.js";import{_ as it}from"./NTip.vue.c98a31a2.js";import{_ as ot}from"./HelpFab.vue.f0924b60.js";import"./NCheckbox.vue.b56304c9.js";import"./client.17f79a3c.js";const st={flex:"~ col gap2","flex-auto":"","of-hidden":"",px1:""},rt={"gap-1t":"",flex:"","items-center":"","text-ellipsis":"","ws-nowrap":"","text-lg":""},lt={key:2},at=s("div",{"flex-auto":""},null,-1),ct={key:1,flex:"~ gap-2",title:"Documentation"},dt=s("span",{"i-carbon-link":"","text-lg":"",op50:""},null,-1),ut={key:2,flex:"~ gap-2"},mt=s("span",{"i-carbon-logo-github":"","text-lg":"",op50:""},null,-1),ft={key:0,flex:"~ gap-4 items-center"},pt={flex:"~ gap-1 items-center",op50:""},ht={flex:"~ gap-1 items-center",op50:""},_t={flex:"~ col","items-end":""},vt={key:0,"h-20":"","w-20":"",flex:"","flex-none":"",rounded:"","bg-gray:3":"",p4:""},gt=["src","alt"],yt=s("div",{"i-carbon-cube":"",ma:"","text-4xl":"",op30:""},null,-1),bt={key:1,flex:"~",mt2:"","flex-auto":"","items-end":"","justify-end":""},xt=["src"],$t=s("div",{"flex-auto":""},null,-1),wt={flex:"","justify-end":""},kt="https://api.nuxtjs.org/api/ipx/s_80,f_webp/gh/nuxt/modules/main/icons/",It="https://api.nuxtjs.org/api/ipx/s_44,f_webp/gh_avatar/",St="https://github.com/",zt="https://www.npmjs.com/package/",oe=F({__name:"ModuleItemBase",props:{mod:{},info:{},compact:{type:Boolean},maintainers:{type:Boolean,default:!0}},setup(e){const t=e,n=B(()=>({...t.mod?.meta,...t.mod,...t.info})),o=_e();return(i,r)=>{const u=ie,c=ve,l=ge;return m(),O(l,{p4:"",flex:"~ gap2"},{default:v(()=>[s("div",st,[R(i.$slots,"main",{},()=>[s("div",rt,[i.mod.isPackageModule?(m(),O(u,{key:0,to:zt+(d(n).npm||d(n).name),target:"_blank",hover:"underline text-primary"},{default:v(()=>[z(T(d(n).name),1)]),_:1},8,["to"])):i.mod.entryPath?(m(),x("button",{key:1,role:"button",hover:"underline text-primary",onClick:r[0]||(r[0]=a=>d(o)(i.mod.entryPath))},T(d(n).name),1)):(m(),x("span",lt,T(d(n).name),1)),R(i.$slots,"badge")]),d(n).description?(m(),x("div",{key:0,class:H(i.compact?"ws-nowrap of-hidden truncate":"line-clamp-2"),"mt--1":"","text-sm":"",op50:""},T(d(n).description),3)):S("",!0),at,d(n).website?(m(),x("div",ct,[dt,h(u,{to:d(n).website,target:"_blank","of-hidden":"",truncate:"","ws-nowrap":"","text-sm":"",op50:"",hover:"op100 underline text-primary"},{default:v(()=>[z(T(d(n).website.replace(/^https?:\/\//,"")),1)]),_:1},8,["to"])])):S("",!0),d(n).github?(m(),x("div",ut,[mt,h(u,{to:d(n).github,target:"_blank","of-hidden":"",truncate:"","ws-nowrap":"","text-sm":"",op50:"",hover:"op100 underline text-primary"},{default:v(()=>[z(T(d(n).github.replace(/^https?:\/\/github.com\//,"")),1)]),_:1},8,["to"])])):S("",!0)]),R(i.$slots,"items"),d(n).stats?(m(),x("div",ft,[s("div",pt,[h(c,{icon:"carbon-star","text-lg":""}),s("span",null,T(d(n).stats.stars),1)]),s("div",ht,[h(c,{icon:"carbon-download","text-lg":""}),s("span",null,T(d(n).stats.downloads),1)])])):S("",!0)]),s("div",_t,[d(n).icon||i.mod.isPackageModule?(m(),x("div",vt,[d(n).icon?(m(),x("img",{key:0,src:kt+d(n).icon,alt:i.mod.name,ma:""},null,8,gt)):S("",!0),yt])):S("",!0),d(n).maintainers?.length&&i.maintainers?(m(),x("div",bt,[(m(!0),x(L,null,D(d(n).maintainers,a=>(m(),O(u,{key:a.name,target:"_blank",to:St+a.github,title:a.name},{default:v(()=>[s("img",{src:It+a.github,"h-6":"","w-6":"","rounded-full":""},null,8,xt)]),_:2},1032,["to","title"]))),128))])):S("",!0),i.$slots.actions?(m(),x(L,{key:2},[$t,s("div",wt,[R(i.$slots,"actions")])],64)):S("",!0)])]),_:3})}}}),Mt={key:0,flex:"~ gap-2",title:"Open on filesystem"},Ct=s("span",{"i-carbon-folder-move-to":"","text-lg":"",op50:""},null,-1),Tt=s("span",{"i-carbon-circle-dash":"","animate-spin":"","text-lg":"",op50:""},null,-1),Ot=s("code",{"text-sm":"",op50:""},"Upgrading...",-1),Nt={key:1,"mx--2":""},Vt=["onClick"],At=s("span",{"i-carbon-intent-request-active":"","text-lg":"","text-primary":""},null,-1),Pt=s("code",{"text-xs":""},"Update installed, click to restart",-1),Bt=[At,Pt],Lt={key:2,"mx--2":""},jt=["onClick"],Rt=s("span",{"i-carbon-intent-request-upgrade":"","text-lg":"",op50:""},null,-1),Et={op50:""},Dt=s("div",{"i-carbon-arrow-right":"",op50:""},null,-1),Ht={"text-green":""},Ft={key:3,flex:"~ gap-2","items-center":"",title:"NPM"},Ut=s("span",{"i-carbon-cube":"","text-lg":"",op50:""},null,-1),qt={"text-sm":"",op50:""},Kt=F({__name:"ModuleItem",props:{mod:{}},setup(e){const t=e,n=B(()=>t.mod.info),o=B(()=>({...t.mod?.meta,...t.mod,...n.value})),i=ye();return(r,u)=>{const c=Ce,l=ie,a=Ye,g=oe;return m(),O(g,{mod:r.mod,info:d(n)},{items:v(()=>[r.mod.entryPath?(m(),x("div",Mt,[Ct,h(c,{filepath:r.mod.entryPath,"text-sm":"",op50:"",hover:"text-primary op100"},null,8,["filepath"])])):S("",!0),d(o).npm?(m(),O(a,{key:d(o).npm,"package-name":d(o).npm,options:{dev:!0}},{default:v(({info:f,update:p,state:M,id:k,restart:b})=>[M==="running"?(m(),O(l,{key:0,flex:"~ gap-2","animate-pulse":"","items-center":"",to:k?"/modules/terminals":void 0,onClick:$=>k?i.value=k:void 0},{default:v(()=>[Tt,Ot]),_:2},1032,["to","onClick"])):M==="updated"?(m(),x("div",Nt,[s("button",{flex:"~ gap-2",hover:"bg-primary/20","items-center":"",rounded:"","bg-primary:10":"",px2:"","text-sm":"","text-primary":"",onClick:b},Bt,8,Vt)])):f?.needsUpdate?(m(),x("div",Lt,[s("button",{flex:"~ gap-2",title:"Click to upgrade","items-center":"",rounded:"",px2:"","text-sm":"",hover:"bg-active",onClick:$=>p()},[Rt,s("code",Et,"v"+T(f.current),1),Dt,s("code",Ht,"v"+T(f.latest),1)],8,jt)])):f?.latest?(m(),x("div",Ft,[Ut,s("code",qt,"v"+T(f.current),1)])):S("",!0)]),_:1},8,["package-name"])):S("",!0)]),_:1},8,["mod","info"])}}}),Wt=F({__name:"ModuleItemInstall",props:{item:{}},emits:["start"],setup(e,{emit:t}){const n=e,o=we(),i=B(()=>o.value.find(a=>a.name===n.item.npm)),r=B(()=>i.value&&i.value.isPackageModule),u=B(()=>i.value&&i.value.isPackageModule&&i.value.isUninstallable);async function c(a,g){const f=g==="install"?ce.installNuxtModule:ce.uninstallNuxtModule,p=await f(await de(),a.npm,!0);Oe(`modules:${g}`,{moduleName:a.npm}),p.commands&&await be.start(a,p,g)&&(xe.value.push({name:a.npm,info:a,processId:p.processId}),t("start"),await f(await de(),a.npm,!1))}const l={};return(a,g)=>{const f=Ze,p=X,M=ke,k=oe;return m(),O(k,{mod:l,role:d(r)?"":"button",info:a.item,mb2:"","h-full":"",class:H(d(r)?"border-dashed op75":"hover:bg-active!"),compact:!0,onClick:g[1]||(g[1]=b=>d(r)?null:c(a.item,"install"))},Te({_:2},[d(r)?{name:"badge",fn:v(()=>[h(f,{n:"green",textContent:"Installed"}),d(u)?(m(),O(M,{key:0,n:"sm green"},{trigger:v(({click:b})=>[h(p,{icon:"carbon-overflow-menu-vertical",border:!1,onClick:$=>b()},null,8,["onClick"])]),default:v(()=>[h(p,{icon:"carbon-trash-can",n:"red",onClick:g[0]||(g[0]=b=>c(a.item,"uninstall"))},{default:v(()=>[z(" Uninstall ")]),_:1})]),_:1})):S("",!0)]),key:"0"}:void 0]),1032,["role","info","class"])}}});function Yt(){var e=window.navigator.userAgent,t=e.indexOf("MSIE ");if(t>0)return parseInt(e.substring(t+5,e.indexOf(".",t)),10);var n=e.indexOf("Trident/");if(n>0){var o=e.indexOf("rv:");return parseInt(e.substring(o+3,e.indexOf(".",o)),10)}var i=e.indexOf("Edge/");return i>0?parseInt(e.substring(i+5,e.indexOf(".",i)),10):-1}let Y;function Z(){Z.init||(Z.init=!0,Y=Yt()!==-1)}var Q={name:"ResizeObserver",props:{emitOnMount:{type:Boolean,default:!1},ignoreWidth:{type:Boolean,default:!1},ignoreHeight:{type:Boolean,default:!1}},emits:["notify"],mounted(){Z(),$e(()=>{this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitOnMount&&this.emitSize()});const e=document.createElement("object");this._resizeObject=e,e.setAttribute("aria-hidden","true"),e.setAttribute("tabindex",-1),e.onload=this.addResizeHandlers,e.type="text/html",Y&&this.$el.appendChild(e),e.data="about:blank",Y||this.$el.appendChild(e)},beforeUnmount(){this.removeResizeHandlers()},methods:{compareAndNotify(){(!this.ignoreWidth&&this._w!==this.$el.offsetWidth||!this.ignoreHeight&&this._h!==this.$el.offsetHeight)&&(this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitSize())},emitSize(){this.$emit("notify",{width:this._w,height:this._h})},addResizeHandlers(){this._resizeObject.contentDocument.defaultView.addEventListener("resize",this.compareAndNotify),this.compareAndNotify()},removeResizeHandlers(){this._resizeObject&&this._resizeObject.onload&&(!Y&&this._resizeObject.contentDocument&&this._resizeObject.contentDocument.defaultView.removeEventListener("resize",this.compareAndNotify),this.$el.removeChild(this._resizeObject),this._resizeObject.onload=null,this._resizeObject=null)}}};const Gt=Ae();Ne("data-v-b329ee4c");const Xt={class:"resize-observer",tabindex:"-1"};Ve();const Qt=Gt((e,t,n,o,i,r)=>(m(),O("div",Xt)));Q.render=Qt;Q.__scopeId="data-v-b329ee4c";Q.__file="src/components/ResizeObserver.vue";function G(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?G=function(t){return typeof t}:G=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},G(e)}function Jt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function fe(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function Zt(e,t,n){return t&&fe(e.prototype,t),n&&fe(e,n),e}function pe(e){return en(e)||tn(e)||nn(e)||on()}function en(e){if(Array.isArray(e))return ee(e)}function tn(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function nn(e,t){if(e){if(typeof e=="string")return ee(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ee(e,t)}}function ee(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function on(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
2
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function sn(e){var t;return typeof e=="function"?t={callback:e}:t=e,t}function rn(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o,i,r,u=function(l){for(var a=arguments.length,g=new Array(a>1?a-1:0),f=1;f<a;f++)g[f-1]=arguments[f];if(r=g,!(o&&l===i)){var p=n.leading;typeof p=="function"&&(p=p(l,i)),(!o||l!==i)&&p&&e.apply(void 0,[l].concat(pe(r))),i=l,clearTimeout(o),o=setTimeout(function(){e.apply(void 0,[l].concat(pe(r))),o=0},t)}};return u._clear=function(){clearTimeout(o),o=null},u}function Ie(e,t){if(e===t)return!0;if(G(e)==="object"){for(var n in e)if(!Ie(e[n],t[n]))return!1;return!0}return!1}var ln=function(){function e(t,n,o){Jt(this,e),this.el=t,this.observer=null,this.frozen=!1,this.createObserver(n,o)}return Zt(e,[{key:"createObserver",value:function(n,o){var i=this;if(this.observer&&this.destroyObserver(),!this.frozen){if(this.options=sn(n),this.callback=function(c,l){i.options.callback(c,l),c&&i.options.once&&(i.frozen=!0,i.destroyObserver())},this.callback&&this.options.throttle){var r=this.options.throttleOptions||{},u=r.leading;this.callback=rn(this.callback,this.options.throttle,{leading:function(l){return u==="both"||u==="visible"&&l||u==="hidden"&&!l}})}this.oldResult=void 0,this.observer=new IntersectionObserver(function(c){var l=c[0];if(c.length>1){var a=c.find(function(f){return f.isIntersecting});a&&(l=a)}if(i.callback){var g=l.isIntersecting&&l.intersectionRatio>=i.threshold;if(g===i.oldResult)return;i.oldResult=g,i.callback(g,l)}},this.options.intersection),$e(function(){i.observer&&i.observer.observe(i.el)})}}},{key:"destroyObserver",value:function(){this.observer&&(this.observer.disconnect(),this.observer=null),this.callback&&this.callback._clear&&(this.callback._clear(),this.callback=null)}},{key:"threshold",get:function(){return this.options.intersection&&typeof this.options.intersection.threshold=="number"?this.options.intersection.threshold:0}}]),e}();function Se(e,t,n){var o=t.value;if(o)if(typeof IntersectionObserver>"u")console.warn("[vue-observe-visibility] IntersectionObserver API is not available in your browser. Please install this polyfill: https://github.com/w3c/IntersectionObserver/tree/master/polyfill");else{var i=new ln(e,o,n);e._vue_visibilityState=i}}function an(e,t,n){var o=t.value,i=t.oldValue;if(!Ie(o,i)){var r=e._vue_visibilityState;if(!o){ze(e);return}r?r.createObserver(o,n):Se(e,{value:o},n)}}function ze(e){var t=e._vue_visibilityState;t&&(t.destroyObserver(),delete e._vue_visibilityState)}var cn={beforeMount:Se,updated:an,unmounted:ze},dn={itemsLimit:1e3},un=/(auto|scroll)/;function Me(e,t){return e.parentNode===null?t:Me(e.parentNode,t.concat([e]))}var J=function(t,n){return getComputedStyle(t,null).getPropertyValue(n)},mn=function(t){return J(t,"overflow")+J(t,"overflow-y")+J(t,"overflow-x")},fn=function(t){return un.test(mn(t))};function he(e){if(e instanceof HTMLElement||e instanceof SVGElement){for(var t=Me(e.parentNode,[]),n=0;n<t.length;n+=1)if(fn(t[n]))return t[n];return document.scrollingElement||document.documentElement}}function te(e){"@babel/helpers - typeof";return te=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},te(e)}var pn={items:{type:Array,required:!0},keyField:{type:String,default:"id"},direction:{type:String,default:"vertical",validator:function(t){return["vertical","horizontal"].includes(t)}},listTag:{type:String,default:"div"},itemTag:{type:String,default:"div"}};function hn(){return this.items.length&&te(this.items[0])!=="object"}var ne=!1;if(typeof window<"u"){ne=!1;try{var _n=Object.defineProperty({},"passive",{get:function(){ne=!0}});window.addEventListener("test",null,_n)}catch{}}let vn=0;var se={name:"RecycleScroller",components:{ResizeObserver:Q},directives:{ObserveVisibility:cn},props:{...pn,itemSize:{type:Number,default:null},gridItems:{type:Number,default:void 0},itemSecondarySize:{type:Number,default:void 0},minItemSize:{type:[Number,String],default:null},sizeField:{type:String,default:"size"},typeField:{type:String,default:"type"},buffer:{type:Number,default:200},pageMode:{type:Boolean,default:!1},prerender:{type:Number,default:0},emitUpdate:{type:Boolean,default:!1},updateInterval:{type:Number,default:0},skipHover:{type:Boolean,default:!1},listTag:{type:String,default:"div"},itemTag:{type:String,default:"div"},listClass:{type:[String,Object,Array],default:""},itemClass:{type:[String,Object,Array],default:""}},emits:["resize","visible","hidden","update","scroll-start","scroll-end"],data(){return{pool:[],totalSize:0,ready:!1,hoverKey:null}},computed:{sizes(){if(this.itemSize===null){const e={"-1":{accumulator:0}},t=this.items,n=this.sizeField,o=this.minItemSize;let i=1e4,r=0,u;for(let c=0,l=t.length;c<l;c++)u=t[c][n]||o,u<i&&(i=u),r+=u,e[c]={accumulator:r,size:u};return this.$_computedMinItemSize=i,e}return[]},simpleArray:hn,itemIndexByKey(){const{keyField:e,items:t}=this,n={};for(let o=0,i=t.length;o<i;o++)n[t[o][e]]=o;return n}},watch:{items(){this.updateVisibleItems(!0)},pageMode(){this.applyPageMode(),this.updateVisibleItems(!1)},sizes:{handler(){this.updateVisibleItems(!1)},deep:!0},gridItems(){this.updateVisibleItems(!0)},itemSecondarySize(){this.updateVisibleItems(!0)}},created(){this.$_startIndex=0,this.$_endIndex=0,this.$_views=new Map,this.$_unusedViews=new Map,this.$_scrollDirty=!1,this.$_lastUpdateScrollPosition=0,this.prerender&&(this.$_prerender=!0,this.updateVisibleItems(!1)),this.gridItems&&!this.itemSize&&console.error("[vue-recycle-scroller] You must provide an itemSize when using gridItems")},mounted(){this.applyPageMode(),this.$nextTick(()=>{this.$_prerender=!1,this.updateVisibleItems(!0),this.ready=!0})},activated(){const e=this.$_lastUpdateScrollPosition;typeof e=="number"&&this.$nextTick(()=>{this.scrollToPosition(e)})},beforeUnmount(){this.removeListeners()},methods:{addView(e,t,n,o,i){const r=Pe({id:vn++,index:t,used:!0,key:o,type:i}),u=Be({item:n,position:0,nr:r});return e.push(u),u},unuseView(e,t=!1){const n=this.$_unusedViews,o=e.nr.type;let i=n.get(o);i||(i=[],n.set(o,i)),i.push(e),t||(e.nr.used=!1,e.position=-9999)},handleResize(){this.$emit("resize"),this.ready&&this.updateVisibleItems(!1)},handleScroll(e){if(!this.$_scrollDirty){if(this.$_scrollDirty=!0,this.$_updateTimeout)return;const t=()=>requestAnimationFrame(()=>{this.$_scrollDirty=!1;const{continuous:n}=this.updateVisibleItems(!1,!0);n||(clearTimeout(this.$_refreshTimout),this.$_refreshTimout=setTimeout(this.handleScroll,this.updateInterval+100))});t(),this.updateInterval&&(this.$_updateTimeout=setTimeout(()=>{this.$_updateTimeout=0,this.$_scrollDirty&&t()},this.updateInterval))}},handleVisibilityChange(e,t){this.ready&&(e||t.boundingClientRect.width!==0||t.boundingClientRect.height!==0?(this.$emit("visible"),requestAnimationFrame(()=>{this.updateVisibleItems(!1)})):this.$emit("hidden"))},updateVisibleItems(e,t=!1){const n=this.itemSize,o=this.gridItems||1,i=this.itemSecondarySize||n,r=this.$_computedMinItemSize,u=this.typeField,c=this.simpleArray?null:this.keyField,l=this.items,a=l.length,g=this.sizes,f=this.$_views,p=this.$_unusedViews,M=this.pool,k=this.itemIndexByKey;let b,$,w,V,I;if(!a)b=$=V=I=w=0;else if(this.$_prerender)b=V=0,$=I=Math.min(this.prerender,l.length),w=null;else{const y=this.getScroll();if(t){let N=y.start-this.$_lastUpdateScrollPosition;if(N<0&&(N=-N),n===null&&N<r||N<n)return{continuous:!0}}this.$_lastUpdateScrollPosition=y.start;const A=this.buffer;y.start-=A,y.end+=A;let C=0;if(this.$refs.before&&(C=this.$refs.before.scrollHeight,y.start-=C),this.$refs.after){const N=this.$refs.after.scrollHeight;y.end+=N}if(n===null){let N,U=0,le=a-1,P=~~(a/2),ae;do ae=P,N=g[P].accumulator,N<y.start?U=P:P<a-1&&g[P+1].accumulator>y.start&&(le=P),P=~~((U+le)/2);while(P!==ae);for(P<0&&(P=0),b=P,w=g[a-1].accumulator,$=P;$<a&&g[$].accumulator<y.end;$++);for($===-1?$=l.length-1:($++,$>a&&($=a)),V=b;V<a&&C+g[V].accumulator<y.start;V++);for(I=V;I<a&&C+g[I].accumulator<y.end;I++);}else{b=~~(y.start/n*o);const N=b%o;b-=N,$=Math.ceil(y.end/n*o),V=Math.max(0,Math.floor((y.start-C)/n*o)),I=Math.floor((y.end-C)/n*o),b<0&&(b=0),$>a&&($=a),V<0&&(V=0),I>a&&(I=a),w=Math.ceil(a/o)*n}}$-b>dn.itemsLimit&&this.itemsLimitError(),this.totalSize=w;let _;const q=b<=this.$_endIndex&&$>=this.$_startIndex;if(q)for(let y=0,A=M.length;y<A;y++)_=M[y],_.nr.used&&(e&&(_.nr.index=k[_.item[c]]),(_.nr.index==null||_.nr.index<b||_.nr.index>=$)&&this.unuseView(_));const re=q?null:new Map;let E,j,K;for(let y=b;y<$;y++){E=l[y];const A=c?E[c]:E;if(A==null)throw new Error(`Key is ${A} on item (keyField is '${c}')`);if(_=f.get(A),!n&&!g[y].size){_&&this.unuseView(_);continue}j=E[u];let C=p.get(j),N=!1;if(!_)q?C&&C.length?_=C.pop():_=this.addView(M,y,E,A,j):(K=re.get(j)||0,(!C||K>=C.length)&&(_=this.addView(M,y,E,A,j),this.unuseView(_,!0),C=p.get(j)),_=C[K],re.set(j,K+1)),f.delete(_.nr.key),_.nr.used=!0,_.nr.index=y,_.nr.key=A,_.nr.type=j,f.set(A,_),N=!0;else if(!_.nr.used&&(_.nr.used=!0,N=!0,C)){const U=C.indexOf(_);U!==-1&&C.splice(U,1)}_.item=E,N&&(y===l.length-1&&this.$emit("scroll-end"),y===0&&this.$emit("scroll-start")),n===null?(_.position=g[y-1].accumulator,_.offset=0):(_.position=Math.floor(y/o)*n,_.offset=y%o*i)}return this.$_startIndex=b,this.$_endIndex=$,this.emitUpdate&&this.$emit("update",b,$,V,I),clearTimeout(this.$_sortTimer),this.$_sortTimer=setTimeout(this.sortViews,this.updateInterval+300),{continuous:q}},getListenerTarget(){let e=he(this.$el);return window.document&&(e===window.document.documentElement||e===window.document.body)&&(e=window),e},getScroll(){const{$el:e,direction:t}=this,n=t==="vertical";let o;if(this.pageMode){const i=e.getBoundingClientRect(),r=n?i.height:i.width;let u=-(n?i.top:i.left),c=n?window.innerHeight:window.innerWidth;u<0&&(c+=u,u=0),u+c>r&&(c=r-u),o={start:u,end:u+c}}else n?o={start:e.scrollTop,end:e.scrollTop+e.clientHeight}:o={start:e.scrollLeft,end:e.scrollLeft+e.clientWidth};return o},applyPageMode(){this.pageMode?this.addListeners():this.removeListeners()},addListeners(){this.listenerTarget=this.getListenerTarget(),this.listenerTarget.addEventListener("scroll",this.handleScroll,ne?{passive:!0}:!1),this.listenerTarget.addEventListener("resize",this.handleResize)},removeListeners(){this.listenerTarget&&(this.listenerTarget.removeEventListener("scroll",this.handleScroll),this.listenerTarget.removeEventListener("resize",this.handleResize),this.listenerTarget=null)},scrollToItem(e){let t;const n=this.gridItems||1;this.itemSize===null?t=e>0?this.sizes[e-1].accumulator:0:t=Math.floor(e/n)*this.itemSize,this.scrollToPosition(t)},scrollToPosition(e){const t=this.direction==="vertical"?{scroll:"scrollTop",start:"top"}:{scroll:"scrollLeft",start:"left"};let n,o,i;if(this.pageMode){const r=he(this.$el),u=r.tagName==="HTML"?0:r[t.scroll],c=r.getBoundingClientRect(),a=this.$el.getBoundingClientRect()[t.start]-c[t.start];n=r,o=t.scroll,i=e+u+a}else n=this.$el,o=t.scroll,i=e;n[o]=i},itemsLimitError(){throw setTimeout(()=>{console.log("It seems the scroller element isn't scrolling, so it tries to render all the items at once.","Scroller:",this.$el),console.log("Make sure the scroller has a fixed height (or width) and 'overflow-y' (or 'overflow-x') set to 'auto' so it can scroll correctly and only render the items visible in the scroll viewport.")}),new Error("Rendered items limit reached")},sortViews(){this.pool.sort((e,t)=>e.nr.index-t.nr.index)}}};const gn={key:0,ref:"before",class:"vue-recycle-scroller__slot"},yn={key:1,ref:"after",class:"vue-recycle-scroller__slot"};function bn(e,t,n,o,i,r){const u=Le("ResizeObserver"),c=je("observe-visibility");return Re((m(),x("div",{class:H(["vue-recycle-scroller",{ready:i.ready,"page-mode":n.pageMode,[`direction-${e.direction}`]:!0}]),onScrollPassive:t[0]||(t[0]=(...l)=>r.handleScroll&&r.handleScroll(...l))},[e.$slots.before?(m(),x("div",gn,[R(e.$slots,"before")],512)):S("v-if",!0),(m(),O(ue(n.listTag),{ref:"wrapper",style:He({[e.direction==="vertical"?"minHeight":"minWidth"]:i.totalSize+"px"}),class:H(["vue-recycle-scroller__item-wrapper",n.listClass])},{default:v(()=>[(m(!0),x(L,null,D(i.pool,l=>(m(),O(ue(n.itemTag),Ee({key:l.nr.id,style:i.ready?{transform:`translate${e.direction==="vertical"?"Y":"X"}(${l.position}px) translate${e.direction==="vertical"?"X":"Y"}(${l.offset}px)`,width:n.gridItems?`${e.direction==="vertical"&&n.itemSecondarySize||n.itemSize}px`:void 0,height:n.gridItems?`${e.direction==="horizontal"&&n.itemSecondarySize||n.itemSize}px`:void 0}:null,class:["vue-recycle-scroller__item-view",[n.itemClass,{hover:!n.skipHover&&i.hoverKey===l.nr.key}]]},De(n.skipHover?{}:{mouseenter:()=>{i.hoverKey=l.nr.key},mouseleave:()=>{i.hoverKey=null}})),{default:v(()=>[R(e.$slots,"default",{item:l.item,index:l.nr.index,active:l.nr.used})]),_:2},1040,["style","class"]))),128)),R(e.$slots,"empty")]),_:3},8,["style","class"])),e.$slots.after?(m(),x("div",yn,[R(e.$slots,"after")],512)):S("v-if",!0),h(u,{onNotify:r.handleResize},null,8,["onNotify"])],34)),[[c,r.handleVisibilityChange]])}se.render=bn;se.__file="src/components/RecycleScroller.vue";const xn={"h-full":"",flex:"~ col gap-4"},$n={flex:"~ items-center"},wn={flex:"~ col","w-30":"","of-auto":""},kn={flex:"~ justify-between","w-full":"","text-xs":"",capitalize:"",op75:""},In={"flex-auto":"","of-auto":"",flex:"~ col gap-2",pl6:"",pr4:""},Sn=F({__name:"ModuleInstallList",emits:["close"],setup(e,{emit:t}){const n=Ge(),o=["downloads","stars","updated","created"],i=W(!1),r=W(o[0]),u={downloads:(f,p)=>f.stats.downloads-p.stats.downloads,stars:(f,p)=>f.stats.stars-p.stats.stars,created:(f,p)=>f.stats.createdAt-p.stats.createdAt,updated:(f,p)=>f.stats.publishedAt-p.stats.publishedAt},c=B(()=>n.value?.slice().sort((f,p)=>u[r.value](f,p)*(i.value?1:-1))),l=W(""),a=B(()=>new Fe(c.value||[],{keys:["name","description","npm","category"]})),g=B(()=>l.value?a.value.search(l.value).map(f=>f.item):c.value);return(f,p)=>{const M=Qe,k=X,b=ve,$=ke,w=Je,V=Wt;return m(),x("div",xn,[h(M,{mx6:"",mt6:"","text-xl":"",op75:"",icon:"i-carbon-intent-request-create",text:"Install Module"}),h(w,{search:d(l),"onUpdate:search":p[1]||(p[1]=I=>Ue(l)?l.value=I:null),"no-padding":"","px-6":"","pb-5":"","pt-2":""},{actions:v(()=>[h($,{direction:"end",n:"sm primary"},{trigger:v(({click:I})=>[s("div",$n,[h(k,{icon:d(i)?"tabler:sort-ascending":"tabler:sort-descending","h-full":"","rounded-r-none":"",onClick:p[0]||(p[0]=_=>i.value=!d(i))},null,8,["icon"]),h(k,{flex:"~ justify-between","min-w-30":"","border-l-0":"","rounded-l-none":"","px-2":"",capitalize:"",hover:"border-l-1",onClick:_=>I()},{default:v(()=>[z(T(d(r))+" ",1),h(b,{icon:"carbon:chevron-down"})]),_:2},1032,["onClick"])])]),default:v(()=>[s("div",wn,[(m(),x(L,null,D(o,I=>h(k,{key:I,border:!1,p2:"",hover:"n-checkbox-hover text-green",onClick:_=>r.value=I},{default:v(()=>[s("span",kn,[z(T(I)+" ",1),d(r)===I?(m(),O(b,{key:0,icon:"carbon:checkmark"})):S("",!0)])]),_:2},1032,["onClick"])),64))])]),_:1})]),_:1},8,["search"]),s("div",In,[h(d(se),{class:"scroller",items:d(g),"item-size":200,"key-field":"name"},{default:v(({item:I})=>[h(V,{item:I,onStart:p[2]||(p[2]=_=>t("close"))},null,8,["item"])]),_:1},8,["items"])])])}}}),zn={flex:"~ col gap-2","w-150":"",p4:"",border:"t base"},Mn={capitalize:""},Cn=s("p",{op50:""}," Following command will be executed in your terminal: ",-1),Tn={op50:""},On=s("p",null,[s("span",{op50:""},"After that, Nuxt will "),s("span",{"text-orange":""},"restart automatically"),z(". ")],-1),Nn={flex:"~ gap-3",mt2:"","justify-end":""},Vn=F({__name:"ModuleActionDialog",setup(e){const t=qe(),n=_e(),o={};return(i,r)=>{const u=oe,c=et,l=tt,a=nt,g=it,f=X,p=Ke;return m(),O(d(be),null,{default:v(({resolve:M,args:k})=>[h(p,{"model-value":!0,onClose:b=>M(!1)},{default:v(()=>[h(u,{mod:o,info:k[0],border:"none","w-150":"","n-panel-grids":""},null,8,["info"]),s("div",zn,[s("h2",{"text-xl":"",class:H(k[2]==="install"?"text-primary":"text-red")},[s("span",Mn,T(k[2]),1),z(),s("code",null,T(k[0].name),1),z("? ")],2),Cn,h(c,{code:k[1].commands.join(" "),lang:"bash",px4:"",py2:"",border:"~ base rounded",lines:!1},null,8,["code"]),s("p",Tn,[z(" Then your "),h(l,{role:"button",n:"primary",underline:"",onClick:r[0]||(r[0]=b=>d(n)(d(t)?._nuxtConfigFile)),textContent:"Nuxt config"}),z(" will be updated as: ")]),h(a,{from:k[1].configOriginal,to:k[1].configGenerated,"max-h-80":"","of-auto":"",py2:"",border:"~ base rounded",lang:"ts"},null,8,["from","to"]),On,s("div",Nn,[h(g,{n:"sm amber","flex-auto":"",icon:"i-carbon-data-backup"},{default:v(()=>[z(" Please make sure to backup your project first. ")]),_:1}),h(f,{onClick:b=>M(!1)},{default:v(()=>[z(" Cancel ")]),_:2},1032,["onClick"]),h(f,{n:"solid",capitalize:"",class:H(k[2]==="install"?"n-primary":"n-red"),onClick:b=>M(!0)},{default:v(()=>[z(T(k[2]),1)]),_:2},1032,["class","onClick"])])])]),_:2},1032,["onClose"])]),_:1})}}}),An={class:"markdown-body"},Pn=s("h1",null,"Modules",-1),Bn=s("p",null,[z("Nuxt provides a module system to extend the framework core and simplify integrations. You don’t need to develop everything from scratch or maintain boilerplate if there is already a Nuxt module for it. Adding Nuxt modules is possible using "),s("code",null,"nuxt.config"),z(".")],-1),Ln=s("p",null,[z("You can explore the list of modules on "),s("a",{href:"https://nuxt.com/modules",target:"_blank",rel:"noopener"},"nuxt.com/modules"),z(" or install them directly inside the DevTools.")],-1),jn=s("p",null,[s("a",{href:"https://nuxt.com/docs/guide/concepts/modules",target:"_blank",rel:"noopener"},"Learn more in the documentation")],-1),Rn=[Pn,Bn,Ln,jn],En={__name:"modules",setup(e,{expose:t}){return t({frontmatter:{}}),(o,i)=>(m(),x("div",An,Rn))}},Dn={"h-full":"","w-full":"","of-auto":""},Hn={relative:"","h-20":"","w-20":"",flex:"","flex-none":"",rounded:"","bg-gray:3":"",p3:""},Fn=["src","alt"],Un=s("div",{"i-carbon-cube":"",ma:"","text-4xl":"",op30:""},null,-1),qn={"text-lg":"","group-hover":"text-primary",transition:"",flex:"~ gap-2 items-center"},Kn=s("div",{"i-carbon-circle-dash":"","animate-spin":"","text-xl":"",op75:""},null,-1),Wn={op75:""},Yn=s("div",{"i-carbon-intent-request-create":"","text-4xl":"",op40:"","group-hover":"op75 text-primary",transition:""},null,-1),Gn=s("div",{"text-lg":"",op40:"","group-hover":"op75 text-primary",transition:""}," Install New Module ",-1),Xn={key:0,border:"l base",pos:"fixed bottom-0 right-0 top-0","z-200":"","w-150":"","bg-base":""},Qn="https://api.nuxtjs.org/api/ipx/s_80,f_webp/gh/nuxt/modules/main/icons/",fi=F({__name:"modules",setup(e){const t=W(!1),n=we(),o=ye(),i=B(()=>n.value.filter(u=>u.isPackageModule)),r=B(()=>n.value.filter(u=>!u.isPackageModule));return We(()=>[{id:"action:modules:install",title:"Install a new module",icon:"i-carbon-intent-request-create ",action:()=>{t.value=!0}}]),(u,c)=>{const l=Kt,a=ge,g=ie,f=Xe,p=X,M=Sn,k=Vn,b=En,$=ot;return m(),x(L,null,[s("div",Dn,[h(f,{icon:"carbon-3d-mpr-toggle",text:"Installed Modules","container-class":"grid grid-cols-minmax-400px gap3 px4",padding:!1,description:`Total modules: ${d(i).length}`},{default:v(()=>[(m(!0),x(L,null,D(d(i),w=>(m(),O(l,{key:w.name,mod:w},null,8,["mod"]))),128)),(m(!0),x(L,null,D("processInstallingModules"in u?u.processInstallingModules:d(xe),w=>(m(),O(g,{key:w.processId,block:"","min-h-30":"",to:"/modules/terminals",onClick:V=>o.value=w.processId},{default:v(()=>[h(a,{border:"1.5 dashed","h-full":"","animate-pulse":"",p4:"",transition:"",hover:"border-primary",flex:"~ col gap-1 items-center justify-center",role:"button",class:"group"},{default:v(()=>[s("div",Hn,[s("img",{src:Qn+w.info.icon,alt:w.info.name,ma:""},null,8,Fn),Un]),s("div",qn,[Kn,s("span",Wn,"Installing "+T(w.name)+"...",1)])]),_:2},1024)]),_:2},1032,["onClick"]))),128)),h(a,{border:"1.5 dashed","min-h-30":"",p4:"",transition:"",hover:"border-primary",flex:"~ col gap-2 items-center justify-center",role:"button",class:"group",onClick:c[0]||(c[0]=w=>t.value=!0)},{default:v(()=>[Yn,Gn]),_:1})]),_:1},8,["description"]),d(r).length?(m(),O(f,{key:0,icon:"carbon-3d-mpr-toggle",text:"User Modules","container-class":"grid grid-cols-minmax-400px gap3 px4",padding:!1,description:`Total modules: ${d(r).length}`},{default:v(()=>[(m(!0),x(L,null,D(d(r),w=>(m(),x(L,{key:w.meta?.name||w.entryPath},[w.meta?.name||w.entryPath?(m(),O(l,{key:0,mod:w},null,8,["mod"])):S("",!0)],64))),128))]),_:1},8,["description"])):S("",!0),h(me,{name:"fade-in"},{default:v(()=>[d(t)?(m(),x("div",{key:0,class:"fixed bottom-0 left-0 right-0 top-0 z-100","bg-black:20":"","backdrop-blur-2":"",onClick:c[1]||(c[1]=w=>t.value=!1)})):S("",!0)]),_:1}),h(me,{name:"slide-in"},{default:v(()=>[d(t)?(m(),x("div",Xn,[h(p,{icon:"carbon-close",pos:"absolute top-3 right-3 z-10","rounded-full":"","text-xl":"",border:!1,onClick:c[2]||(c[2]=w=>t.value=!1)}),h(M,{onClose:c[3]||(c[3]=w=>t.value=!1)})])):S("",!0)]),_:1}),h(k)]),h($,null,{default:v(()=>[h(b)]),_:1})],64)}}});export{fi as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{q as r,
|
|
1
|
+
import{q as r,a8 as n}from"./entry.909ad6c7.js";const t={};function o(e,s){return n(e.$slots,"default")}const c=r(t,[["render",o]]);export{c as default};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{d as N,a as C,aT as oe,e as ae,a9 as G,r as A,f as t,h as I,j as _,p as x,o,k as e,m as n,n as B,G as O,t as p,F as S,i as d,v as $,am as H,_ as U,a7 as R,aU as J,aV as ne,aW as se,aX as re,y as ie,z as ce,q as le,aY as de,aZ as pe,a_ as me,b as ue,a$ as ge,b0 as he,b1 as _e,b2 as E,aw as fe,a0 as ve,l as be,ac as we,I as z,W as xe}from"./entry.909ad6c7.js";import{_ as ye}from"./NNavbar.vue.737ef1b1.js";import{_ as P}from"./NLink.vue.9859bf11.js";import{_ as q}from"./NSectionBlock.acf7c6ed.js";import{_ as ke}from"./NCodeBlock.vue.9ce69690.js";import{_ as $e}from"./HelpFab.vue.f0924b60.js";import"./NIconTitle.vue.7b846ffe.js";import"./client.17f79a3c.js";const K=[{name:"title",suggestion:"required",head:{title:"[title]"},seoMeta:{title:"[title]"},docs:"https://developer.mozilla.org/en-US/docs/Web/HTML/Element/title",description:"A concise and descriptive title for the browser that accurately summarizes the content of the page."},{name:"description",suggestion:"required",head:{meta:[{name:"description",content:"[description]"}]},seoMeta:{description:"[description]"},description:"A one to two sentence summary for search engines that includes relevant keywords to improve visibility in search results."},{name:"icon",suggestion:"recommended",head:{link:[{rel:"icon",type:"image/png",href:"/favicon.png"}]},description:"A small image that appears in the browser tab and bookmark menu to help users easily identify the page."},{name:"lang",suggestion:"recommended",head:{htmlAttrs:{lang:"en"}},description:"The primary language of the page to help search engines and browsers understand the content."},{name:"og:title",suggestion:"recommended",head:{meta:[{property:"og:title",content:"[og:title]"}]},seoMeta:{ogTitle:"[og:title]"},docs:"https://ogp.me/#metadata",description:"A title for the link preview used by social media platforms."},{name:"og:description",suggestion:"recommended",head:{meta:[{property:"og:description",content:"[og:description]"}]},seoMeta:{ogDescription:"[og:description]"},docs:"https://ogp.me/#metadata",description:"A description for the link preview used by social media platforms."},{name:"og:image",suggestion:"recommended",head:{meta:[{property:"og:image",content:"[og:image]"}]},seoMeta:{ogImage:"[og:image]"},docs:"https://ogp.me/#metadata",description:"An image for the link preview used by social media platforms."},{name:"og:url",suggestion:"recommended",head:{meta:[{property:"og:url",content:"[og:url]"}]},seoMeta:{ogUrl:"[og:url]"},docs:"https://ogp.me/#metadata",description:"A canonical URL for the link preview used to specify the preferred URL to display in search engine results and social media previews when multiple URLs may point to the same page."},{name:"twitter:title",suggestion:"recommended",head:{meta:[{name:"twitter:title",content:"[twitter:title]"}]},seoMeta:{twitterTitle:"[twitter:title]"},docs:"https://developer.twitter.com/en/docs/twitter-for-websites/cards/overview/abouts-cards",description:"A title for the Twitter card used to provide a preview of the content shared on the page."},{name:"twitter:description",suggestion:"recommended",head:{meta:[{name:"twitter:description",content:"[twitter:description]"}]},seoMeta:{twitterDescription:"[twitter:description]"},docs:"https://developer.twitter.com/en/docs/twitter-for-websites/cards/overview/abouts-cards",description:"A description for the Twitter card used to provide a preview of the content shared on the page."},{name:"twitter:image",suggestion:"recommended",head:{meta:[{name:"twitter:image",content:"[twitter:image]"}]},seoMeta:{twitterImage:"[twitter:image]"},docs:"https://developer.twitter.com/en/docs/twitter-for-websites/cards/overview/abouts-cards",description:"An image for the Twitter card used to provide a preview of the content shared on the page."},{name:"twitter:card",suggestion:"recommended",head:{meta:[{name:"twitter:card",content:"summary"}]},seoMeta:{twitterCard:"summary"},docs:"https://developer.twitter.com/en/docs/twitter-for-websites/cards/overview/abouts-cards",description:"The type of Twitter card to use, which determines the type of card to display in link previews on Twitter."}],Te={flex:"~ wrap","mt--2":"","w-full":"","flex-none":""},Se=["onClick"],Ce=e("div",{border:"b base","flex-auto":""},null,-1),Ne={key:0,"x-divider":""},Me={key:1,"x-divider":""},Oe={flex:"~ gap-1 items-center",class:"px2 pt2",lg:"px4 py2"},Ie=e("div",{"i-carbon-warning":"","text-orange":""},null,-1),Ae={"w-full":"",p2:"",op75:""},Be={key:1,m4:"",flex:"~ col gap-2"},Re={flex:"~ gap-1 wrap items-center"},Le={key:1},je={flex:"~ gap-2",n:"sm primary",absolute:"","right-2":"","top-2":""},Fe=N({__name:"OpenGraphMissingTabs",props:{tags:{},matchedRouteFilepath:{}},setup(h){const s=h,l=C(()=>K.filter(r=>!s.tags?.some(g=>g.name===r.name))),a=C(()=>{let r={};const g={};l.value.forEach(u=>{u.seoMeta?Object.assign(g,u.seoMeta):r=oe(r,u.head)});const b=[];if(Object.keys(g).length){const u=JSON.stringify(g,null,2).replace(/"([^"]+)":/g,"$1:").replace(/"/g,"'");b.push(`useSeoMeta(${u})`)}if(Object.keys(r).length){const u=JSON.stringify(r,null,2).replace(/"([^"]+)":/g,"$1:").replace(/"/g,"'");b.push(`useHead(${u})`)}return b.join(`
|
|
2
|
+
|
|
3
|
+
`)}),m=ae(),y=G(),k=["Missing Tags","Code Snippet"],f=A(k[0]);return(r,g)=>{const b=P,u=H,T=U,M=ke,L=q;return t(l).length?(o(),I(L,{key:0,text:"Missing Tags",description:`${t(l).length} missing tags`,icon:"carbon:warning-other","header-class":"text-orange op100! [[open]_&]:text-inherit",padding:!1},{default:_(()=>[e("div",Te,[(o(),n(S,null,B(k,(i,c)=>e("button",{key:c,px4:"",py2:"",border:"r t base",hover:"bg-active",class:O(i===t(f)?"":"border-b"),onClick:v=>f.value=i},[e("div",{class:O(i===t(f)?"":"op30"),capitalize:""},p(i),3)],10,Se)),64)),Ce]),t(f)===k[0]?(o(),I(u,{key:0,grid:"~ cols-[1fr] lg:cols-[max-content_1fr]",m4:"","items-center":"","justify-between":"","of-hidden":""},{default:_(()=>[(o(!0),n(S,null,B(t(l),(i,c)=>(o(),n(S,{key:c},[c?(o(),n("div",Ne)):x("",!0),c?(o(),n("div",Me)):x("",!0),e("div",Oe,[Ie,d(b,{"op-50":"",href:i.docs,target:"_blank",n:"orange"},{default:_(()=>[$(p(i.name),1)]),_:2},1032,["href"])]),e("div",Ae,p(i.description),1)],64))),128))]),_:1})):(o(),n("div",Be,[e("p",Re,[d(T,{icon:"carbon-copy",n:"xs","px-2":"",onClick:g[0]||(g[0]=i=>t(m)(t(a),"open-graph-suggestion"))},{default:_(()=>[$(" Copy ")]),_:1}),$(" the following code snippet and paste it into your "),r.matchedRouteFilepath?(o(),I(T,{key:0,icon:"carbon-launch",n:"xs","px-2":"",onClick:g[1]||(g[1]=i=>t(y)(r.matchedRouteFilepath))},{default:_(()=>[$(" page component ")]),_:1})):(o(),n("span",Le,"page component")),$(" to full fill the missing tags. ")]),d(u,{relative:"","n-code-block":""},{default:_(()=>[d(M,{code:t(a),lang:"ts",lines:!1,"w-full":"","of-auto":"",p3:""},null,8,["code"]),e("div",je,[d(T,{icon:"carbon-copy",onClick:g[2]||(g[2]=i=>t(m)(t(a),"open-graph-suggestion"))},{default:_(()=>[$(" Copy ")]),_:1})])]),_:1})]))]),_:1},8,["description"])):x("",!0)}}}),De={class:"max-w-[524px] min-w-[524px] cursor-pointer bg-base"},ze={class:"break-words border border-base px-[12px] py-[10px] antialiased"},Ve={class:"overflow-hidden truncate whitespace-nowrap text-[12px] leading-[11px] uppercase op50"},Ee={class:"block h-[46px] max-h-[46px] border-separate select-none overflow-hidden break-words text-left",style:{"border-spacing":"0px"}},Ge={class:"mt-[3px] truncate pt-[2px] text-[16px] font-semibold leading-[20px]"},He={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"}},Ue=N({__name:"SocialFacebook",props:{card:{}},setup(h){return(s,l)=>(o(),n("div",De,[e("div",{class:"h-[274px] border border-b-0 border-base bg-cover bg-center bg-no-repeat",style:R({backgroundImage:`url(${JSON.stringify(s.card.image)})`})},null,4),e("div",ze,[e("div",Ve,p(s.card.url),1),e("div",Ee,[e("div",Ge,p(s.card.title),1),e("div",He,p(s.card.description),1)])])]))}}),Je={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"}},Pe={class:"break-words border-base p-[0.75em] antialiased",flex:"~ col justify-center gap-[2px]"},qe={class:"overflow-hidden truncate whitespace-nowrap text-[15px] leading-[20px] lowercase op50"},Ke={class:"m-0 truncate text-[15px] font-semibold leading-[20px]"},We={class:"line-clamp-2 select-none overflow-hidden break-words text-left text-[15px] leading-[20px] op50"},Ye=N({__name:"SocialTwitter",props:{tags:{}},setup(h){const s=h,l=C(()=>J(s.tags,{title:[{tag:"title"}],image:[{tag:"meta",name:"twitter:image"},{tag:"meta",name:"og:image"}],imageAlt:[{tag:"meta",name:"twitter:image:alt"}],description:[{tag:"meta",name:"twitter:description"},{tag:"meta",name:"description"}],favicon:[{tag:"link",name:"icon"}]})),a=C(()=>l.value.image?s.tags.find(m=>m.tag==="meta"&&m.name==="twitter:card")?.value||"summary_large_image":"summary");return(m,y)=>(o(),n("div",Je,[e("div",{class:O(["cursor-pointer overflow-hidden leading-[1.3em]",t(a)==="summary_large_image"?"":"flex"]),hover:"bg-[#88888805]"},[t(a)==="summary_large_image"?(o(),n("div",{key:0,class:"h-[220px] border-b border-base bg-cover bg-center bg-no-repeat",style:R({backgroundImage:`url(${JSON.stringify(t(l).image)})`})},null,4)):(o(),n("div",{key:1,class:"h-[129px] w-[129px] flex-none border-r border-base bg-cover bg-center bg-no-repeat",style:R({backgroundImage:`url(${JSON.stringify(t(l).image)})`})},null,4)),e("div",Pe,[e("div",qe,p(t(l).url),1),e("div",Ke,p(t(l).title),1),e("div",We,p(t(l).description),1)])],2)]))}}),Xe={class:"max-w-[520px] min-w-[520px] cursor-pointer overflow-hidden border border-base rounded-[2px] shadow-md bg-base"},Ze={class:"break-words p-[10px] antialiased"},Qe={class:"block h-auto max-h-[50px] border-separate select-none break-words text-left",style:{"border-spacing":"0px"}},et={class:"pb-[2px] text-[16px] font-semibold leading-[24px]"},tt={class:"overflow-hidden truncate whitespace-nowrap text-xs font-normal uppercase op85"},ot=N({__name:"SocialLinkedin",props:{card:{}},setup(h){return(s,l)=>(o(),n("div",Xe,[e("div",{class:"h-[270px] border-b border-base bg-cover bg-center bg-no-repeat",style:R({backgroundImage:`url(${JSON.stringify(s.card.image)})`})},null,4),e("div",Ze,[e("div",Qe,[e("div",et,p(s.card.title),1),e("div",tt,p(s.card.url),1)])])]))}}),at=h=>(ie("data-v-829ad8ca"),h=h(),ce(),h),nt={class:"relative max-w-[420px] min-w-[420px] rounded-[16px] rounded-bl-0 py-[6px] leading-[18px] drop-shadow-sm drop-shadow-color-[#10232f26] bg-base"},st={class:"pl-[10px] pr-[8px]"},rt={class:"leading-normal text-[#3390ec] underline"},it={class:"quote w-full flex"},ct={class:"flex flex-col gap-1"},lt={key:0,class:"my-[3px] overflow-hidden rounded"},dt=["src"],pt={class:"cursor-pointer text-sm text-[#3390ec]"},mt={class:"cursor-pointer text-sm"},ut={class:"cursor-pointer text-sm"},gt={class:"flex justify-end text-xs text-[#707579]"},ht=at(()=>e("svg",{width:"11",height:"20",viewBox:"0 0 11 20",xmlns:"http://www.w3.org/2000/svg",class:"absolute bottom-0 ml-[-8.4px] translate-y-px text-white"},[e("g",{transform:"translate(9 -14)","fill-rule":"evenodd"},[e("path",{id:"corner-fill",d:"M-6 16h6v17c-.193-2.84-.876-5.767-2.05-8.782-.904-2.325-2.446-4.485-4.625-6.48A1 1 0 01-6 16z",transform:"matrix(1 0 0 -1 0 49)",fill:"currentColor"})])],-1)),_t=N({__name:"SocialTelegram",props:{card:{}},setup(h){const s=ne(),l=se(re(),"HH:mm");return(a,m)=>(o(),n("div",nt,[e("div",st,[e("div",rt,p(a.card.url),1),e("div",it,[e("div",ct,[a.card.image?(o(),n("div",lt,[e("img",{class:"h-full max-w-full w-full rounded object-cover",src:a.card.image},null,8,dt)])):x("",!0),e("div",pt,[e("strong",null,p(t(s).hostname),1)]),e("div",mt,[e("strong",null,p(a.card.title),1)]),e("div",ut,p(a.card.description),1)])]),e("div",gt,[e("span",null,p(t(l)),1)])]),ht]))}});const ft=le(_t,[["__scopeId","data-v-829ad8ca"]]),vt={flex:"~ col"},bt={flex:"~ wrap","w-full":"","flex-none":""},wt=["onClick"],xt=e("div",{border:"b base","flex-auto":""},null,-1),yt={flex:"~ items-center justify-center","flex-auto":"",p4:"","n-panel-grids":""},kt={key:0},$t={key:1},Tt={key:2},St={key:3},Ct=N({__name:"SocialPreviewGroup",props:{tags:{}},setup(h){const s=h,l=["twitter","facebook","linkedin","telegram"],a=de("nuxt-devtools-social-preview-tab",l[0]),m=C(()=>J(s.tags,{title:[{tag:"title"}],image:[{tag:"meta",name:"og:image"}],imageAlt:[{tag:"meta",name:"og:image:alt"}],description:[{tag:"meta",name:"og:description"},{tag:"meta",name:"description"}],favicon:[{tag:"link",name:"icon"}]}));return(y,k)=>{const f=Ue,r=Ye,g=ot,b=ft;return o(),n("div",vt,[e("div",bt,[(o(),n(S,null,B(l,(u,T)=>e("button",{key:T,px4:"",py2:"",border:"r base",hover:"bg-active",class:O(u===t(a)?"":"border-b"),onClick:M=>a.value=u},[e("div",{class:O(u===t(a)?"":"op30"),capitalize:""},p(u),3)],10,wt)),64)),xt]),e("div",yt,[t(a)==="facebook"?(o(),n("div",kt,[d(f,{card:t(m)},null,8,["card"])])):t(a)==="twitter"?(o(),n("div",$t,[d(r,{tags:y.tags},null,8,["tags"])])):t(a)==="linkedin"?(o(),n("div",Tt,[d(g,{card:t(m)},null,8,["card"])])):t(a)==="telegram"?(o(),n("div",St,[d(b,{card:t(m)},null,8,["card"])])):x("",!0)])])}}}),Nt={class:"markdown-body"},Mt=pe('<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),Ot=[Mt],It={__name:"open-graph",setup(h,{expose:s}){return s({frontmatter:{}}),(a,m)=>(o(),n("div",Nt,Ot))}},At={flex:"~ col lg:row","h-full":"","w-full":"","of-hidden":""},Bt={"flex-auto":"","of-auto":""},Rt={"flex-none":"",flex:"~ gap2 items-center"},Lt={flex:"~ col"},jt={key:0,"x-divider":""},Ft={key:1,"x-divider":""},Dt={mr2:"",px4:"",py2:""},qt=N({__name:"open-graph",setup(h){const s=A(0),l=me(),a=ue(async()=>(s.value,(await l.value?.resolveTags()).map(c=>{const v=c.props||{};return c.tag==="htmlAttrs"&&v.lang?{tag:"html",name:"lang",value:v.lang}:v.charset?{tag:"meta",name:"charset",value:v.charset}:{tag:c.tag,name:v.property??v.name??v.rel??c.tag,value:v.content??v.href??c.textContent??JSON.stringify(v)}})),[]),m=A(!0);function y(){s.value+=1}const k=ge(),f=he(),r=A(""),g=_e(),b=G();async function u(){r.value!==f.value.path&&k.value.push(r.value||"/")}const T=C(()=>r.value===f.value.path?[]:k.value.resolve(r.value||"/").matched),M=C(()=>{const i=g.value.find(c=>c.path===f.value?.matched?.[0]?.path);return i?.file||i?.meta?.file});function L(i){return K.find(c=>c.name===i.name)?.docs}return E(f).toBeTruthy().then(i=>{r.value=i.path}),E(k).toBeTruthy().then(i=>{i.afterEach(()=>{fe(()=>{r.value=f.value.path,setTimeout(y,200),setTimeout(y,800)})})}),(i,c)=>{const v=xe,j=U,W=ye,V=P,Y=H,X=q,Z=Fe,Q=Ct,ee=It,te=$e,F=ve("tooltip");return o(),n(S,null,[e("div",At,[e("div",Bt,[d(W,null,{search:_(()=>[d(v,{modelValue:t(r),"onUpdate:modelValue":c[0]||(c[0]=w=>be(r)?r.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",t(f)?.path===t(r)?"":t(T).length?"text-green":"text-orange"]),onKeydown:we(u,["enter"])},null,8,["modelValue","class","onKeydown"])]),actions:_(()=>[e("div",Rt,[t(M)?z((o(),I(j,{key:0,"text-lg":"",border:!1,icon:"carbon:launch",title:"Open file in editor",onClick:c[1]||(c[1]=w=>t(b)(t(M)))},null,512)),[[F,"Open file in editor"]]):x("",!0),z(d(j,{"text-lg":"",border:!1,icon:"carbon:reset",title:"Refresh Data",onClick:y},null,512),[[F,"Refresh Data"]]),z(d(j,{"text-lg":"",border:!1,icon:t(m)?"carbon:side-panel-open":"carbon:open-panel-right",title:"Toggle Preview",onClick:c[2]||(c[2]=w=>m.value=!t(m))},null,8,["icon"]),[[F,"Toggle Preview"]])])]),_:1}),e("div",Lt,[d(X,{text:"Tags",icon:"carbon:tag-group"},{default:_(()=>[d(Y,{grid:"~ cols-[max-content_1fr]","items-center":"","justify-between":"","of-hidden":""},{default:_(()=>[(o(!0),n(S,null,B(t(a),(w,D)=>(o(),n(S,{key:D},[D?(o(),n("div",jt)):x("",!0),D?(o(),n("div",Ft)):x("",!0),e("div",Dt,[d(V,{op50:"",href:L(w),target:"_blank",n:"primary"},{default:_(()=>[$(p(w.name),1)]),_:2},1032,["href"])]),d(V,{href:w.value.match(/^https?:\/\//)?w.value:void 0,target:"_blank","w-full":"",p2:"","font-mono":"",n:"primary"},{default:_(()=>[$(p(w.value),1)]),_:2},1032,["href"])],64))),128))]),_:1})]),_:1}),d(Z,{tags:t(a),"matched-route-filepath":t(M)},null,8,["tags","matched-route-filepath"])])]),t(m)&&t(a)?.length?(o(),I(Q,{key:0,tags:t(a),"flex-none":"","border-base":"","lt-lg":"border-t",lg:"h-full w-140 border-l"},null,8,["tags"])):x("",!0)]),d(te,null,{default:_(()=>[d(ee)]),_:1})],64)}}});export{qt as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.quote[data-v-829ad8ca]:before{background-color:#3390ec;border-radius:2px;content:"";flex:0 0 auto;margin:3px 8px 2px 0;width:2px}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as L,as as V,aa as R,aH as T,b3 as M,b4 as O,O as E,a as w,h as m,j as n,A as P,o as s,f as e,m as c,k as t,i,t as r,p as l,F as h,b5 as f,b6 as x,b7 as $,v as a,aC as F,D as H,L as W,E as G,x as K,_ as U}from"./entry.909ad6c7.js";import{u as q,_ as J}from"./state-modules.199ca5da.js";import{_ as Q}from"./NTip.vue.c98a31a2.js";import{u as X}from"./state-components.a78445e5.js";import"./NBadge.ff27dca2.js";import"./NCodeBlock.vue.9ce69690.js";import"./client.17f79a3c.js";import"./NCheckbox.vue.b56304c9.js";const Y="1.0.0-beta.3",Z={key:0},tt={key:1,flex:"~ col gap2",ma:"","h-full":"","max-w-300":"","w-full":"",p5:"",px5:"","md:px20":""},et=t("div",{"flex-auto":""},null,-1),ot={flex:"~ col","mt-5":"","items-center":"","md:mt-20":""},nt=t("span",{op40:""}," Nuxt DevTools ",-1),st={op40:""},at={flex:"~ gap2 wrap"},it=t("div",{"logos-nuxt-icon":"","text-3xl":""},null,-1),lt=t("div",{"logos-vue":"","text-3xl":""},null,-1),ut=t("div",{"carbon-tree-view-alt":"","text-3xl":""},null,-1),rt=t("div",{"i-carbon-assembly-cluster":"","text-3xl":""},null,-1),dt=t("div",{"carbon-function":"","text-3xl":""},null,-1),ct=t("div",{"carbon-3d-mpr-toggle":"","text-3xl":""},null,-1),pt=t("div",{"carbon-plug":"","text-3xl":""},null,-1),_t={key:5,"pointer-events-none":"","min-w-40":"",p4:"","theme-card-lime":"",flex:"~ auto gap-6"},mt=t("div",{"i-carbon-time-plot":"","flex-none":"","text-3xl":""},null,-1),ht={grid:"~ cols-[auto_auto] gap-x-5 items-center"},ft=t("div",{"text-sm":""}," SSR to full load ",-1),xt={"text-right":""},vt=t("div",{"text-sm":""}," Page load ",-1),gt={"text-right":""},bt=t("div",{"text-sm":""}," Navigation ",-1),kt={"text-right":""},yt=t("div",{"text-sm":""}," HMR ",-1),Ct={"text-right":""},wt={flex:"~ col gap2"},Dt={flex:"~ gap-6 wrap","mt-5":"","items-center":"","justify-center":""},Bt=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":""}),a(" Star on GitHub ")],-1),St=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":""}),a(" Ideas & Suggestions ")],-1),zt=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":""}),a(" Project Roadmap ")],-1),Nt=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":""}),a(" Bug Reports ")],-1),At=t("div",{"i-carbon-settings-adjust":""},null,-1),jt=t("div",{"flex-auto":""},null,-1),It={flex:"col gap-2",mxa:"",hidden:"","w-100":"","text-sm":"",op50:"","md:flex":""},Lt={flex:"~ gap-1","items-center":""},Vt=t("span",null,"+",-1),Rt=t("span",null,"+",-1),Tt=t("div",{"flex-auto":""},null,-1),Mt={flex:"~ gap-1","items-center":""},Ot=t("span",null,"+",-1),Et=t("span",null,"+",-1),Pt=t("span",null,"+",-1),$t=t("span",null,"+",-1),Ft=t("div",{"flex-auto":""},null,-1),Ht=t("div",null,"Toggle DevTools",-1),te=L({__name:"overview",setup(Wt){const v=V(),p=R(),D=X(),g=T(),B=q(),S=M(),b=O(),z=E();function N(){H.value=!0,z.push("/")}const k=w(()=>v.value?.nuxt.vueApp.version),u=w(()=>v.value?.metrics.loading());function A(){W()}return(o,Gt)=>{const j=G,_=K,y=J,C=Q,d=U,I=P;return s(),m(I,{"h-screen":"","w-full":"",flex:""},{default:n(()=>[e(p)?(s(),c("div",tt,[et,t("div",ot,[i(_,{flex:"~","mt--10":"","items-center":"","justify-center":"",to:"https://devtools.nuxt.com/",target:"_blank"},{default:n(()=>[i(j,{"h-10":""})]),_:1}),t("button",{mb6:"",mt3:"","text-center":"","text-sm":"",flex:"~ gap-1 wrap",onClick:N},[nt,t("code",st,"v"+r(e(Y)),1),i(y,{"package-name":"@nuxt/devtools",options:{dev:!0},"show-version":!1})])]),t("div",at,[i(_,{to:"https://nuxt.com",target:"_blank",p4:"","theme-card-green":"",flex:"~ col auto"},{default:n(()=>[it,i(y,{"package-name":"nuxt",options:{dev:!0}})]),_:1}),e(k)?(s(),m(_,{key:0,to:"https://vuejs.org",target:"_blank",p4:"","theme-card-green":"",flex:"~ col auto"},{default:n(()=>[lt,t("code",null,"v"+r(e(k)),1)]),_:1})):l("",!0),e(p)?(s(),c(h,{key:1},[e(p)&&e(p).pages&&e(v)?(s(),m(_,{key:0,"min-w-40":"",p4:"","theme-card-lime":"",flex:"~ col auto",to:"/modules/pages"},{default:n(()=>[ut,t("div",null,r(("pluralizeByCount"in o?o.pluralizeByCount:e(f))(e(S).length,"page")),1)]),_:1})):l("",!0),e(p)?(s(),m(_,{key:1,"min-w-40":"",p4:"","theme-card-lime":"",flex:"~ col auto",to:"/modules/components"},{default:n(()=>[rt,t("div",null,r(("pluralizeByCount"in o?o.pluralizeByCount:e(f))(e(D).length,"component")),1)]),_:1})):l("",!0),e(p)&&e(g)?(s(),m(_,{key:2,"min-w-40":"",p4:"","theme-card-yellow":"",flex:"~ col auto",to:"/modules/imports"},{default:n(()=>[dt,t("div",null,r(("pluralizeByCount"in o?o.pluralizeByCount:e(f))(e(g).imports.length,"import")),1)]),_:1})):l("",!0),e(p)?(s(),m(_,{key:3,"min-w-40":"",p4:"","theme-card-purple":"",flex:"~ col auto",to:"/modules/modules"},{default:n(()=>[ct,t("div",null,r(("pluralizeByCount"in o?o.pluralizeByCount:e(f))(e(B).length,"module")),1)]),_:1})):l("",!0),e(p)?(s(),m(_,{key:4,"min-w-40":"",p4:"","theme-card-teal":"",flex:"~ col auto",to:"/modules/plugins"},{default:n(()=>[pt,t("div",null,r(("pluralizeByCount"in o?o.pluralizeByCount:e(f))(e(p).plugins.length,"plugin")),1)]),_:1})):l("",!0),e(u)?(s(),c("div",_t,[mt,t("div",ht,[e(u).ssrStart?(s(),c(h,{key:0},[ft,t("div",xt,r(("formatDuration"in o?o.formatDuration:e(x))(e(u).appLoad-e(u).ssrStart)),1)],64)):l("",!0),vt,t("div",gt,r(("formatDuration"in o?o.formatDuration:e(x))(e(u).appLoad-e(u).appInit)),1),bt,t("div",kt,r(("formatDuration"in o?o.formatDuration:e(x))(e(u).pageEnd-e(u).pageStart)),1),e(u).hmrStart?(s(),c(h,{key:1},[yt,t("div",Ct,r(("formatDuration"in o?o.formatDuration:e(x))(e(u).hmrEnd-e(u).hmrStart)),1)],64)):l("",!0)])])):l("",!0)],64)):l("",!0)]),t("div",wt,[("showConnectionWarning"in o?o.showConnectionWarning:e($))?(s(),m(C,{key:0,n:"yellow5",icon:"carbon-unlink","justify-center":""},{default:n(()=>[a(" Not connected to the client app, showing server-side data only. Use the embedded mode for full features. ")]),_:1})):l("",!0),t("button",{title:"Authorize",onClick:A},[("isDevAuthed"in o?o.isDevAuthed:e(F))?l("",!0):(s(),m(C,{key:0,n:"orange5",icon:"i-carbon-locked","justify-center":""},{default:n(()=>[a(" Access from an untrusted browser, some features are limited. Click to authorize now. ")]),_:1}))])]),t("div",Dt,[Bt,St,zt,Nt,i(_,{to:"/settings",flex:"~ gap1","inline-block":"","items-center":"",op50:"","hover:op80":""},{default:n(()=>[At,a(" Settings ")]),_:1})]),jt,t("div",It,[t("div",Lt,[e(b)?(s(),c(h,{key:0},[i(d,{n:"xs",class:"px2"},{default:n(()=>[a(" ⌘ Cmd ")]),_:1}),Vt,i(d,{n:"xs",class:"px2"},{default:n(()=>[a(" K ")]),_:1})],64)):(s(),c(h,{key:1},[i(d,{n:"xs",class:"px2"},{default:n(()=>[a(" Ctrl ")]),_:1}),Rt,i(d,{n:"xs",class:"px2"},{default:n(()=>[a(" K ")]),_:1})],64)),Tt,a(" Open Command Palette ")]),t("div",Mt,[e(b)?(s(),c(h,{key:0},[i(d,{n:"xs",class:"px2"},{default:n(()=>[a(" ⇧ Shift ")]),_:1}),Ot,i(d,{n:"xs",class:"px2"},{default:n(()=>[a(" ⌥ Option ")]),_:1}),Et,i(d,{n:"xs",class:"px2"},{default:n(()=>[a(" D ")]),_:1})],64)):(s(),c(h,{key:1},[i(d,{n:"xs",class:"px2"},{default:n(()=>[a(" Shift ")]),_:1}),Pt,i(d,{n:"xs",class:"px2"},{default:n(()=>[a(" Alt ")]),_:1}),$t,i(d,{n:"xs",class:"px2"},{default:n(()=>[a(" D ")]),_:1})],64)),Ft,Ht])])])):(s(),c("div",Z," Loading... "))]),_:1})}}});export{te as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as E,r as B,a as x,an as O,f as t,o,m as s,k as e,t as k,h as y,j as b,bd as G,F as m,n as L,p as N,i as _,v as V,G as M,W as A,_ as H,a9 as q,be as D,a$ as J,b0 as Q,aa as X,ak as Y,b1 as Z,al as ee,l as te,ac as oe,K as ne,L as ae}from"./entry.909ad6c7.js";import{_ as j}from"./NBadge.ff27dca2.js";import{_ as F}from"./FilepathItem.vue.a1b71b8d.js";import{_ as se}from"./NSectionBlock.acf7c6ed.js";import{_ as re}from"./LaunchPage.vue.c617b6d5.js";import{_ as le}from"./HelpFab.vue.f0924b60.js";import"./NIconTitle.vue.7b846ffe.js";import"./NMarkdown.vue.79860402.js";import"./client.17f79a3c.js";const ie={block:"","cursor-pointer":""},ue={p2:""},ce=["onSubmit"],de=e("div",{px2:"","text-sm":"",op50:""}," Fill params and navigate: ",-1),pe={flex:"~","items-center":"",p2:"","text-sm":"","font-mono":""},_e={key:1},he=E({__name:"RoutePathItem",props:{route:{}},emits:["navigate"],setup(R,{emit:u}){const p=R,h=B([]),f=x(()=>{const c=g(p.route.path);return h.value=Array.from({length:c.length},()=>""),c});function g(c){return c.split(/(:\w+[\?\*]?(?:\(\))?)/).filter(Boolean).map(d=>d[0]===":"?d.replace(/\(\)$/,"?"):d)}const $=x(()=>f.value.map((c,d)=>c[0]===":"?h.value[d]:c).join("").replace(/\/+/g,"/")),r=x(()=>p.route.path.includes(":"));function n(){u("navigate",$.value)}return(c,d)=>{const C=A,a=H,i=O("VDropdown");return t(r)?(o(),y(i,{key:1},{popper:b(({hide:l})=>[e("div",ue,[e("form",{flex:"~ col",onSubmit:G(()=>{n(),l()},["prevent"])},[t(r)?(o(),s(m,{key:0},[de,e("div",pe,[(o(!0),s(m,null,L(t(f),(v,P)=>(o(),s(m,{key:P},[v[0]===":"?(o(),y(C,{key:0,modelValue:t(h)[P],"onUpdate:modelValue":I=>t(h)[P]=I,"w-20":"","n-sm":"",placeholder:v.slice(1)},null,8,["modelValue","onUpdate:modelValue","placeholder"])):(o(),s("span",_e,k(v),1))],64))),128))])],64)):N("",!0),_(a,{block:"",n:"primary"},{default:b(()=>[V(" Navigate ")]),_:1})],40,ce)])]),default:b(()=>[e("code",ie,[(o(!0),s(m,null,L(t(f),(l,v)=>(o(),s("span",{key:v,class:M(l[0]===":"?"text-gray border border-dashed rounded border-gray:50 px1":"")},k(l[0]===":"?l.slice(1):l),3))),128))])]),_:1})):(o(),s("button",{key:0,onClick:n},[e("code",null,k(c.route.path),1)]))}}}),me={"w-full":""},fe=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),ge={"w-20":"","pr-1":""},ve={flex:"","items-center":"","justify-end":""},ye={"text-sm":""},be={flex:"inline gap3","items-center":""},xe={op0:"","group-hover:op100":"",flex:"~ gap1"},ke=["onClick"],$e=e("div",{"i-carbon-script-reference":""},null,-1),we=[$e],Ne={"w-0":"","ws-nowrap":"","pr-1":"","text-left":"","text-sm":"","font-mono":"",op50:""},Re={"w-0":"","ws-nowrap":"","pr-1":"","text-center":"","text-sm":"","font-mono":"",op50:""},Ce={"w-0":"","ws-nowrap":"","text-center":"","text-sm":"","font-mono":""},Pe={key:0},Ve=["onClick"],Ie=E({__name:"RoutesTable",props:{pages:{},layouts:{},matched:{},matchedPending:{}},emits:["navigate"],setup(R){const u=R,p=q(),h=D(),f=x(()=>[...u.pages].sort((r,n)=>r.path.localeCompare(n.path)));function g(r){const n=u.layouts.find(c=>c.name===r);n&&p(n.file)}function $(r){if(typeof r=="string")return h.value?.middleware.find(n=>n.name===r)?.path}return(r,n)=>{const c=j,d=he,C=F;return o(),s("div",null,[e("table",me,[fe,e("tbody",null,[(o(!0),s(m,null,L(t(f),a=>(o(),s("tr",{key:a.name,class:"group","h-7":"",border:"b dashed transparent hover:base"},[e("td",ge,[e("div",ve,[r.matched.find(i=>i.name===a.name)?(o(),y(c,{key:0,n:"green",title:"active",textContent:"active"})):r.matchedPending.find(i=>i.name===a.name)?(o(),y(c,{key:1,n:"teal",title:"next",textContent:"next"})):N("",!0)])]),e("td",ye,[e("div",be,[_(d,{route:a,class:M(r.matched.find(i=>i.name===a.name)?"text-primary":r.matchedPending.find(i=>i.name===a.name)?"text-teal":""),onNavigate:n[0]||(n[0]=i=>r.$emit("navigate",i))},null,8,["route","class"]),e("div",xe,[a.file||a.meta?.file?(o(),s("button",{key:0,"text-sm":"",op40:"",hover:"op100 text-primary",title:"Open in editor",onClick:i=>t(p)(a.file||a.meta?.file)},we,8,ke)):N("",!0)])])]),e("td",Ne,k(a.name),1),e("td",Re,[_(C,{filepath:$(a.meta.middleware),override:`${a.meta.middleware||"-"}`},null,8,["filepath","override"])]),e("td",Ce,[a.meta.layout===!1?(o(),s("span",Pe,"-")):a.meta.layout?(o(),s("button",{key:1,onClick:i=>g(a.meta.layout)},k(a.meta.layout),9,Ve)):(o(),s("button",{key:2,"text-sm":"",op15:"",onClick:n[1]||(n[1]=i=>g("default"))}," (default) "))])]))),128))])])])}}}),Le={class:"markdown-body"},Te=e("h1",null,"Pages",-1),Be=e("p",null,[V("Nuxt provides a file-based routing to create routes within your web application using Vue Router under the hood. Pages are Vue components and can have any valid extension that Nuxt supports (by default .vue, .js, .jsx, .mjs, .ts or .tsx). Nuxt will automatically create a route for every page in your "),e("code",null,"~/pages/"),V(" directory.")],-1),Ee=e("p",null,[e("a",{href:"https://nuxt.com/docs/getting-started/routing",target:"_blank",rel:"noopener"},"Learn more in the documentation")],-1),Me=e("hr",null,null,-1),Ae=e("h1",null,"Middlewares",-1),De=e("p",null,"Nuxt provides a customizable route middleware framework that can be used throughout the application. This is ideal for extracting code that needs to run before navigating to a particular route.",-1),je=e("p",null,[e("a",{href:"https://nuxt.com/docs/guide/directory-structure/middleware",target:"_blank",rel:"noopener"},"Learn more in the documentation")],-1),Fe=[Te,Be,Ee,Me,Ae,De,je],Se={__name:"pages",setup(R,{expose:u}){return u({frontmatter:{}}),(h,f)=>(o(),s("div",Le,Fe))}},ze={key:0,"h-full":"","of-auto":""},Ke={border:"b base",flex:"~ col gap1",px4:"",py3:"","n-navbar-glass":""},Ue=e("span",{op50:""},"Navigate from ",-1),We={"font-mono":""},Oe=e("span",{op50:""}," to ",-1),Ge={key:1,op50:""},He=e("span",null,[V("Press "),e("b",{"font-bold":""},"Enter"),V(" to navigate")],-1),qe={key:0,"text-orange":"",op75:""},Je={key:1,op50:""},Qe={"min-h-14":""},Xe={key:1,class:"py-4 text-center"},Ye=e("span",{op50:""},"No routes matched",-1),Ze=[Ye],et={"w-full":""},tt=e("thead",{border:"b base","h-7":""},[e("tr",null,[e("th",{"text-left":""}," Name "),e("th",{"text-left":""}," Path ")])],-1),ot={mr1:""},pt=E({__name:"pages",setup(R){const u=J(),p=Q(),h=X(),f=D(),g=Y(),$=Z(),r=x(()=>f.value?.middleware||[]),n=B(""),c=B(0),d=x(()=>(r.value,n.value,g.value,c.value,u.value?.currentRoute?.value?.path));ee(()=>{p.value&&(n.value=u.value?.currentRoute?.value?.path),u.value?.beforeEach(l=>{n.value=l.fullPath}),u.value?.afterEach(l=>{n.value=l.fullPath})});async function C(){n.value!==u.value?.currentRoute?.value?.path&&u.value.push(n.value||"/")}const a=x(()=>u.value.resolve(n.value||"/").matched);function i(l){u.value.push(l),n.value=l}return(l,v)=>{const P=A,I=Ie,T=se,S=j,z=F,K=re,U=Se,W=le;return o(),s(m,null,[t(h)?.pages&&t(u)?(o(),s("div",ze,[e("div",Ke,[e("div",null,[t(d)!==t(n)?(o(),s(m,{key:0},[Ue,e("span",We,k(t(d)),1),Oe],64)):(o(),s("span",Ge,"Current route"))]),_(P,{modelValue:t(n),"onUpdate:modelValue":v[0]||(v[0]=w=>te(n)?n.value=w:null),"font-mono":"",icon:"carbon-direction-right-01 scale-y--100",class:M(t(d)===t(n)?"":t(a).length?"text-green":"text-orange"),onKeydown:oe(C,["enter"])},null,8,["modelValue","class","onKeydown"]),e("div",null,[t(d)!==t(n)?(o(),s(m,{key:0},[He,t(a).length?N("",!0):(o(),s("span",qe," (no match)"))],64)):(o(),s("span",Je,"Edit path above to navigate"))])]),_(T,{icon:"carbon-tree-view",text:"Matched Routes",padding:!1},{default:b(()=>[e("div",Qe,[t(a).length?(o(),y(I,{key:0,pages:t(a),layouts:t(g)||[],matched:t(p).matched,"matched-pending":t(a),onNavigate:i},null,8,["pages","layouts","matched","matched-pending"])):(o(),s("div",Xe,Ze))])]),_:1}),_(T,{icon:"carbon-tree-view-alt",text:"All Routes",description:`${t($).length} routes registered in your application`,padding:"pr5"},{default:b(()=>[_(I,{pages:t($),layouts:t(g)||[],matched:t(p).matched,"matched-pending":t(a),onNavigate:i},null,8,["pages","layouts","matched","matched-pending"])]),_:1},8,["description"]),t(r).length?(o(),y(T,{key:0,icon:"carbon:ibm-watson-studio",text:"Middleware",description:`${t(r).length} middleware registered in your application`,padding:"px13"},{default:b(()=>[e("table",et,[tt,(o(!0),s(m,null,L(t(r),w=>(o(),s("tr",{key:w.path,"h-7":""},[e("td",null,[e("span",ot,k(w.name),1),w.global?(o(),y(S,{key:0,n:"green",title:"Registered at runtime as a global component",textContent:"global"})):N("",!0)]),e("td",null,[_(z,{filepath:w.path},null,8,["filepath"])])]))),128))])]),_:1},8,["description"])):N("",!0)])):(o(),y(K,{key:1,icon:"carbon-tree-view-alt",name:"wizard-pages",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 l?l.rpc:t(ne)).runWizard(await("ensureDevAuthToken"in l?l.ensureDevAuthToken:t(ae))(),"enablePages")}}]},null,8,["actions"])),_(W,null,{default:b(()=>[_(U)]),_:1})],64)}}});export{pt as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as v}from"./StateEditor.vue.1c34496c.js";import{d as b,o as e,m as c,F as k,n as C,h as f,j as a,a8 as N,bf as B,bg as w,k as x,as as F,a as O,a0 as P,f as r,i as o,p as u,v as R,I as V,_ as j}from"./entry.909ad6c7.js";import{_ as E}from"./NSectionBlock.acf7c6ed.js";import{_ as A}from"./HelpFab.vue.f0924b60.js";import"./DataSchemaButton.vue.18fef0d4.js";import"./json-editor-vue.8a771ed0.js";import"./NIconTitle.vue.7b846ffe.js";const G={key:0,flex:"~ col gap-1"},H={key:1,mt2:"",px4:"",italic:"",op35:""},K=b({__name:"StateGroup",props:{state:{},prefix:{default:""}},setup(m){return(t,n)=>{const i=v;return e(),c("div",null,[t.state&&Object.keys(t.state).length>0?(e(),c("div",G,[(e(!0),c(k,null,C(t.state,(l,s)=>(e(),f(i,{key:s,state:l,name:s.startsWith(t.prefix)?s.slice(t.prefix.length):s},{actions:a(_=>[N(t.$slots,"actions",B(w(_)))]),_:2},1032,["state","name"]))),128))])):(e(),c("div",H," No data "))])}}}),T={class:"markdown-body"},z=x("h1",null,"State & Async Data",-1),I=x("p",null,"// TODO",-1),L=[z,I],W={__name:"payload",setup(m,{expose:t}){return t({frontmatter:{}}),(i,l)=>(e(),c("div",T,L))}},q={key:0},et=b({__name:"payload",setup(m){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 _=K,d=E,h=j,$=v,S=W,g=A,D=P("tooltip");return e(),c(k,null,[r(t)?(e(),c("div",q,[o(d,{icon:"carbon-data-set",text:"State",description:"Keyed state from `useState`",padding:!1},{default:a(()=>[o(_,{state:r(n).state,prefix:"$s"},null,8,["state"])]),_:1}),o(d,{icon:"carbon-data-blob",text:"Data",description:"Keyed state from `useAsyncData`",padding:!1},{actions:a(()=>[o(h,{n:"xs primary","self-start":"",icon:"i-carbon-recycle",onClick:s[0]||(s[0]=y=>i())},{default:a(()=>[R(" Re-fetch all data ")]),_:1})]),default:a(()=>[o(_,{state:r(n).data},{actions:a(({isOpen:y,name:p})=>[y&&p?V((e(),f(h,{key:0,title:`Re-fetch '${p}'`,icon:"carbon-recycle",border:!1,onClick:J=>i([p])},null,8,["title","onClick"])),[[D,`Re-fetch '${p}'`,void 0,{bottom:!0}]]):u("",!0)]),_:1},8,["state"])]),_:1}),r(n).functions&&Object.keys(r(n).functions).length?(e(),f(d,{key:0,icon:"carbon-function",text:"Functions",description:"State for functions"},{default:a(()=>[o($,{"ml--6":"",state:r(n).functions},null,8,["state"])]),_:1})):u("",!0)])):u("",!0),o(g,null,{default:a(()=>[o(S)]),_:1})],64)}}});export{et as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as S}from"./FilepathItem.vue.
|
|
1
|
+
import{_ as S}from"./FilepathItem.vue.a1b71b8d.js";import{_ as D}from"./NBadge.ff27dca2.js";import{_ as C}from"./DurationDisplay.vue.dd0f91f1.js";import{d as v,aa as B,a as x,bc as V,o as n,m,k as t,t as P,i as l,f,h as u,p as d,an as F,a8 as N,a4 as H,q as I,j as g,v as y,be as E,as as W,F as k,n as j,G as L}from"./entry.909ad6c7.js";import{_ as M}from"./NSectionBlock.acf7c6ed.js";import{_ as q}from"./HelpFab.vue.f0924b60.js";import"./NIconTitle.vue.7b846ffe.js";const z={flex:"~ gap2","items-center":""},A={w8:"","text-right":"","text-sm":"",op25:""},G={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",z,[t("div",A,P(i.index),1),l(_,{filepath:e.plugin.src,subpath:!0},null,8,["filepath"]),t("div",null,[f(r).startsWith("#")?(n(),u(o,{key:0,n:"rose",textContent:"virtual"})):f(r).startsWith(".")?d("",!0):(n(),u(o,{key:1,n:"gray",textContent:"module"})),i.plugin.mode==="server"?(n(),u(o,{key:2,n:"teal",textContent:"server"})):d("",!0),i.plugin.mode==="client"?(n(),u(o,{key:3,n:"orange",textContent:"client"})):d("",!0)]),i.plugin.metric?.duration!=null?(n(),m("div",G,[l(s,{duration:i.plugin.metric?.duration,factor:10},null,8,["duration"])])):d("",!0)])}}}),Y={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",Y,[t("div",J,[e.icon?(n(),u(r,{key:0,icon:e.icon,class:"n-tip-icon"},null,8,["icon"])):d("",!0),t("div",null,P(e.title),1)]),t("div",null,[N(e.$slots,"default",{},()=>[l(i,{use:e.$slots.default,unwrap:"p"},null,8,["use"])])])])}}}),O={};function Q(p,e){const a=K;return n(),u(a,{title:"Performance Tip",icon:"carbon-meter",n:"lime6 dark:lime5"},{default:g(()=>[N(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 allow you to extend the functionality of the 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 in 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:g(()=>[y(" Plugins always run before your application's runtime. The loading time of each plugin will directly impact 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=E(),a=W(),r=x(()=>{const c=e.value?.plugins||[],_=a.value?.metrics.clientPlugins()||[];return c.map(o=>{const s=typeof o=="string"?{src:o}:o;return{...s,metric:_.find(h=>h.src===s.src||h.src.startsWith(s.src))}})}),i=x(()=>{const c=a.value?.metrics.clientPlugins()||[],_=Math.min(...c.map(s=>s.start));return Math.max(...c.map(s=>s.end))-_});return(c,_)=>{const o=R,s=C,h=M,T=nt,w=q;return n(),m(k,null,[l(h,{icon:"carbon-plug",text:"Plugins",description:`Total plugins: ${f(r).length}`},{default:g(()=>[t("div",ot,[(n(!0),m(k,null,j(f(r),($,b)=>(n(),u(o,{key:$.src,plugin:$,index:b+1,"ml--4":"","border-base":"",py2:"",class: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(w,null,{default:g(()=>[l(T)]),_:1})],64)}}});export{dt as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as v}from"./StateEditor.vue.
|
|
1
|
+
import{_ as v}from"./StateEditor.vue.1c34496c.js";import{_ as x}from"./NSectionBlock.acf7c6ed.js";import{o as r,m as u,k as e,v as m,d as y,as as b,bh as C,a as d,f as i,i as t,j as a,p as k,F as w}from"./entry.909ad6c7.js";import{_ as N}from"./HelpFab.vue.f0924b60.js";import"./DataSchemaButton.vue.18fef0d4.js";import"./json-editor-vue.8a771ed0.js";import"./NIconTitle.vue.7b846ffe.js";const R={class:"markdown-body"},T=e("h1",null,"Runtime Configs",-1),B=e("p",null,"Nuxt provides a runtime config API to expose configuration within your application and server routes, with the ability to update it at runtime by setting environment variables.",-1),V=e("p",null,[m("In Nuxt DevTools, the editor allows you to edit the runtime config temporarily to see how the changes affect your application. To update them, you might want to update your "),e("code",null,"nuxt.config.js"),m(" file, or check more details in the documentation.")],-1),$=e("p",null,[e("a",{href:"https://nuxt.com/docs/guide/going-further/runtime-config",target:"_blank",rel:"noopener"},"Learn more in the documentation")],-1),D=[T,B,V,$],F={__name:"runtime-configs",setup(f,{expose:o}){return o({frontmatter:{}}),(p,_)=>(r(),u("div",R,D))}},P={key:0},z=y({__name:"runtime-configs",setup(f){const o=b(),l=C(),p=d(()=>o.value?.nuxt.payload),_=d(()=>{const n={...l.value};return delete n.public,delete n.app,n});return(n,S)=>{const s=v,c=x,g=F,h=N;return r(),u(w,null,[i(o)?(r(),u("div",P,[t(c,{icon:"carbon-settings-services",text:"App Config",padding:!1},{default:a(()=>[t(s,{state:i(o).app.appConfig},null,8,["state"])]),_:1}),t(c,{icon:"carbon-settings",text:"Public Runtime Config",padding:!1},{default:a(()=>[t(s,{state:i(p).config?.public},null,8,["state"])]),_:1}),t(c,{icon:"i-carbon-code-signing-service",text:"Private Runtime Config",open:!1,padding:!1,description:"These values are not exposed to the client. Readonly in the DevTools."},{default:a(()=>[t(s,{state:i(_),readonly:""},null,8,["state"])]),_:1})])):k("",!0),t(h,null,{default:a(()=>[t(g)]),_:1})],64)}}});export{z as default};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import{r as P,bk as Fe,ay as ze,aw as He,w as xe,bl as We,bm as Ge,d as ae,bn as we,o as t,m as v,k as d,G as j,h as k,f as e,bo as se,t as E,p as U,v as H,a7 as Je,a8 as ee,F as N,n as A,a4 as ce,Y as Ke,a as V,i as m,j as x,W as $e,_ as fe,bp as Qe,aa as Ye,as as Xe,au as pe,a9 as Ze,ax as et,e as tt,a0 as Se,l as X,I as le,ar as ot,U as nt,A as Ve,bq as st,br as lt,af as at,S as rt,bs as it,am as ut}from"./entry.909ad6c7.js";import{_ as dt}from"./NNavbar.vue.737ef1b1.js";import{_ as Te}from"./NBadge.ff27dca2.js";import{_ as Re}from"./NSelect.vue.04805728.js";import{_ as pt}from"./NCheckbox.vue.b56304c9.js";import{u as Ue,_ as ct}from"./storage-options.aeaf572e.js";import{_ as ft}from"./DataSchemaButton.vue.18fef0d4.js";import{_ as mt}from"./NCodeBlock.vue.9ce69690.js";import{C as ke,S as Ne}from"./constants.2cc6e981.js";import{U as vt}from"./json-editor-vue.8a771ed0.js";import{_ as ht}from"./NSectionBlock.acf7c6ed.js";import{_ as yt}from"./NDrawer.vue.2b176b54.js";import"./client.17f79a3c.js";import"./NIconTitle.vue.7b846ffe.js";const ne=/^[\u0009\u0020-\u007E\u0080-\u00FF]+$/;function _t(u,y){if(typeof u!="string")throw new TypeError("argument str must be a string");const h={},$=(y||{}).decode||kt;let g=0;for(;g<u.length;){const c=u.indexOf("=",g);if(c===-1)break;let s=u.indexOf(";",g);if(s===-1)s=u.length;else if(s<c){g=u.lastIndexOf(";",c-1)+1;continue}const i=u.slice(g,c).trim();if(h[i]===void 0){let r=u.slice(c+1,s).trim();r.codePointAt(0)===34&&(r=r.slice(1,-1)),h[i]=bt(r,$)}g=s+1}return h}function Ce(u,y,h){const o=h||{},$=o.encode||Ct;if(typeof $!="function")throw new TypeError("option encode is invalid");if(!ne.test(u))throw new TypeError("argument name is invalid");const g=$(y);if(g&&!ne.test(g))throw new TypeError("argument val is invalid");let c=u+"="+g;if(o.maxAge!==void 0&&o.maxAge!==null){const s=o.maxAge-0;if(Number.isNaN(s)||!Number.isFinite(s))throw new TypeError("option maxAge is invalid");c+="; Max-Age="+Math.floor(s)}if(o.domain){if(!ne.test(o.domain))throw new TypeError("option domain is invalid");c+="; Domain="+o.domain}if(o.path){if(!ne.test(o.path))throw new TypeError("option path is invalid");c+="; Path="+o.path}if(o.expires){if(!gt(o.expires)||Number.isNaN(o.expires.valueOf()))throw new TypeError("option expires is invalid");c+="; Expires="+o.expires.toUTCString()}if(o.httpOnly&&(c+="; HttpOnly"),o.secure&&(c+="; Secure"),o.priority)switch(typeof o.priority=="string"?o.priority.toLowerCase():o.priority){case"low":c+="; Priority=Low";break;case"medium":c+="; Priority=Medium";break;case"high":c+="; 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:c+="; SameSite=Strict";break;case"lax":c+="; SameSite=Lax";break;case"strict":c+="; SameSite=Strict";break;case"none":c+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return c}function gt(u){return Object.prototype.toString.call(u)==="[object Date]"||u instanceof Date}function bt(u,y){try{return y(u)}catch{return u}}function kt(u){return u.includes("%")?decodeURIComponent(u):u}function Ct(u){return encodeURIComponent(u)}const xt={path:"/",watch:!0,decode:u=>We(decodeURIComponent(u)),encode:u=>encodeURIComponent(typeof u=="string"?u:JSON.stringify(u))};function wt(u,y){const h={...xt,...y},o=$t(h)||{},$=P(o[u]??h.default?.());{const g=typeof BroadcastChannel>"u"?null:new BroadcastChannel(`nuxt:cookies:${u}`);Fe()&&ze(()=>{g?.close()});const c=()=>{Vt(u,$.value,h),g?.postMessage(Ge($.value))};let s=!1;g&&(g.onmessage=i=>{s=!0,$.value=i.data,He(()=>{s=!1})}),h.watch?xe($,()=>{s||c()},{deep:h.watch!=="shallow"}):c()}return $}function $t(u={}){return _t(document.cookie,u)}function St(u,y,h={}){return y==null?Ce(u,y,{...h,maxAge:-1}):Ce(u,y,h)}function Vt(u,y,h={}){document.cookie=St(u,y,h)}const Tt=d("div",{"x-divider":""},null,-1),Ie=ae({__name:"ServerRouteListItem",props:{item:{},index:{default:0}},setup(u){const y=P(!0),h=we();return(o,$)=>{const g=ce,c=Te,s=Ie;return t(),v("div",null,[d("button",{flex:"~ gap-2","w-full":"","items-start":"","items-center":"","hover-bg-active":"",px2:"",py1:"",class:j([{"bg-active":e(h)===o.item.filepath}]),style:Je({paddingLeft:`calc(0.5rem + ${o.index*1.5}em)`}),onClick:$[0]||($[0]=i=>{y.value=!e(y),h.value=o.item.filepath})},[d("div",{class:j({"w-12":!o.item.routes}),"flex-none":"","text-left":""},[o.item.type==="collection"?(t(),k(g,{key:0,icon:"carbon:chevron-right","mb0.5":"","transform-rotate":e(y)?90:0,transition:""},null,8,["transform-rotate"])):(t(),k(c,{key:1,class:j(("getRequestMethodClass"in o?o.getRequestMethodClass:e(se))(o.item.method||"*")),textContent:E((o.item.method||"*").toUpperCase())},null,8,["class","textContent"]))],2),d("span",{class:j({"flex items-center":o.item.routes}),"text-sm":"","font-mono":""},[o.item.type==="collection"?(t(),k(g,{key:0,title:`${o.item.routes?.length} routes`,icon:"carbon:folder",mr1:""},null,8,["title"])):U("",!0),H(" "+E(o.item.route),1)],2)],6),Tt,e(y)?ee(o.$slots,"default",{key:0},()=>[(t(!0),v(N,null,A(o.item.routes,i=>(t(),k(s,{key:i.filepath,item:i,index:o.index+1},null,8,["item","index"]))),128))]):U("",!0)])}}}),Rt={p4:"",flex:"~ col gap-4"},Ut={key:1,ml2:"",flex:""},Nt=["value"],It={key:0,flex:"","gap-4":""},Dt=d("div",{"flex-auto":""},null,-1),De=ae({__name:"ServerRouteInputs",props:{modelValue:{},keys:{default:()=>[]},default:{default:()=>({})},disabled:{type:Boolean,default:!1}},setup(u,{emit:y}){const h=u,o=Ke(h,"modelValue",y,{passive:!0}),$=V(()=>[...h.keys,"active","key","value","type"]),g=V(()=>{const i={};for(const r of $.value)i[r]=h.default[r]||"";return i}),c=["string","number","boolean","file","date","time","datetime-local"];function s(i,r){const I=r.target;if(I.files&&I.files[0]){const M=I.files[0],z=new FileReader;z.readAsDataURL(M),z.onload=()=>{o.value[i].value=z.result}}}return xe(()=>o,i=>{i.value.forEach(r=>{if(r.type==="number"&&typeof r.value!="number"){const I=Number.parseFloat(r.value);r.value=Number.isNaN(I)?0:I}else r.type==="boolean"&&typeof r.value!="boolean"?r.value=!0:r.type==="file"&&typeof r.value!="object"?r.value="":r.type==="date"&&typeof r.value=="string"&&!r.value.match(/^\d{4}-\d{2}-\d{2}$/)?r.value=new Date().toISOString().slice(0,10):r.type==="time"&&typeof r.value=="string"&&!r.value.match(/^\d{2}:\d{2}$/)?r.value=new Date().toISOString().slice(11,16):r.type==="datetime-local"&&typeof r.value=="string"&&!r.value.match(/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}$/)?r.value=new Date().toISOString().slice(0,16):r.type==="string"&&(r.value=r.value.toString())})},{deep:!0,immediate:!0,flush:"sync"}),(i,r)=>{const I=pt,M=$e,z=Re,J=ce,C=fe;return t(),v("div",Rt,[(t(!0),v(N,null,A(e(o),(l,S)=>(t(),v("div",{key:S,flex:"~ gap-2","justify-around":""},[ee(i.$slots,"input",{item:l}),(t(!0),v(N,null,A(e($),b=>(t(),v(N,{key:b},[l.type!==null&&b==="active"?(t(),k(I,{key:0,modelValue:l[b],"onUpdate:modelValue":_=>l[b]=_,n:"sm primary",disabled:i.disabled},null,8,["modelValue","onUpdate:modelValue","disabled"])):U("",!0),l.type!==null&&b==="key"?(t(),k(M,{key:1,modelValue:l[b],"onUpdate:modelValue":_=>l[b]=_,placeholder:b,"flex-1":"","font-mono":"",n:"sm primary",disabled:i.disabled,class:j(i.disabled?"op50":"")},null,8,["modelValue","onUpdate:modelValue","placeholder","disabled","class"])):b==="value"?(t(),v(N,{key:2},[l.type==="file"?(t(),k(M,{key:0,type:"file",disabled:i.disabled,class:j(i.disabled?"op75":""),onChange:_=>s(S,_)},null,8,["disabled","class","onChange"])):l.type==="boolean"?(t(),v("div",Ut,[m(I,{modelValue:l.value,"onUpdate:modelValue":_=>l.value=_,placeholder:"Value",n:"green lg",disabled:i.disabled},null,8,["modelValue","onUpdate:modelValue","disabled"])])):(t(),k(M,{key:2,modelValue:l.value,"onUpdate:modelValue":_=>l.value=_,type:l.type,placeholder:"Value","flex-1":"","font-mono":"",n:"sm primary",disabled:i.disabled,class:j(i.disabled?"op75":"")},null,8,["modelValue","onUpdate:modelValue","type","disabled","class"]))],64)):b==="type"?(t(),k(z,{key:3,modelValue:l.type,"onUpdate:modelValue":_=>l.type=_,n:"sm green",class:j(i.disabled?"op75":""),disabled:i.disabled},{default:x(()=>[(t(),v(N,null,A(c,_=>d("option",{key:_,value:_},E(_),9,Nt)),64))]),_:2},1032,["modelValue","onUpdate:modelValue","class","disabled"])):U("",!0)],64))),128)),ee(i.$slots,"input-actions",{},()=>[m(C,{n:"red",disabled:i.disabled,class:j(i.disabled?"op0!":""),onClick:b=>e(o).splice(S,1)},{default:x(()=>[m(J,{icon:"carbon:trash-can"})]),_:2},1032,["disabled","class","onClick"])])]))),128)),i.disabled?U("",!0):(t(),v("div",It,[ee(i.$slots,"actions",{params:e(o)},()=>[m(C,{icon:"carbon-add",n:"sm primary",my1:"","px-3":"",onClick:r[0]||(r[0]=l=>e(o).push({...e(g)}))},{default:x(()=>[H(" Add ")]),_:1}),Dt,e(o).length?(t(),k(C,{key:0,icon:"carbon-trash-can",n:"sm red",my1:"","px-3":"",onClick:r[1]||(r[1]=l=>o.value=[])},{default:x(()=>[H(" Remove All ")]),_:1})):U("",!0)])])),ee(i.$slots,"default")])}}}),Et={"h-full":"","w-full":"",flex:"~ col"},jt={flex:"~ col gap-2","flex-none":"",p4:"","n-navbar-glass":""},Ot={flex:"~ gap2 items-center"},Lt={relative:"","w-full":""},Pt={absolute:"","right-2":"","top-1.5":"",flex:"~ gap-1"},qt={flex:"~ gap2 wrap","w-full":"","items-center":"",px4:"",pb2:"","text-center":"","text-sm":"",border:"b base"},Bt=d("div",{"flex-auto":""},null,-1),At=d("div",{"text-xs":"",op50:""}," Send from ",-1),Mt=d("option",{value:"app"}," App ",-1),Ft=d("option",{value:"devtools"}," DevTools ",-1),zt={key:0,border:"b base","items-center":"",px4:"",py2:"",grid:"~ cols-[max-content_1fr] gap-2"},Ht={"text-right":"","font-mono":""},Wt={key:1,border:"b base",p4:"",flex:"~ col gap-4","font-mono":""},Gt={flex:"~ gap-4"},Jt={flex:"~ gap2","mb--2":"","items-center":"",op50:""},Kt=d("div",{"w-5":"","x-divider":""},null,-1),Qt=d("div",{"flex-none":""}," Default Inputs ",-1),Yt=d("div",{"x-divider":""},null,-1),Xt={key:2},Zt={key:3,border:"b base",relative:"","n-code-block":""},eo={flex:"~ wrap","w-full":""},to=["onClick"],oo=d("div",{border:"b base","flex-auto":""},null,-1),no={border:"b base",flex:"~ gap2","items-center":"",px4:"",py2:""},so=d("div",null,"Response",-1),lo={key:1,"text-xs":"",op50:""},ao=d("div",{"flex-auto":""},null,-1),ro=d("div",{op50:""}," Request finished in ",-1),io={key:0,"flex-auto":"","overflow-auto":""},uo={border:"~ base","h-full":"","w-full":"",rounded:""},po=["data"],co={key:2,"flex-auto":"","overflow-auto":"",p4:""},fo={border:"~ base",rounded:""},mo=["src"],vo={key:1,controls:"",rounded:""},ho=["src"],yo=ae({__name:"ServerRouteDetails",props:{route:{}},emits:["open-default-input"],setup(u,{emit:y}){const h=u,[o,$]=Qe(),g=Ye(),c=Xe(),s=pe({contentType:"text/plain",data:"",statusCode:200,error:void 0,fetchTime:0}),i=V(()=>s.contentType.includes("application/json")?"json":s.contentType.includes("text/html")?"html":s.contentType.includes("text/css")?"css":s.contentType.includes("text/javascript")?"javascript":s.contentType.includes("image")||s.contentType.includes("video")?"media":s.contentType.includes("text/xml")||s.contentType.includes("application/xml")?"xml":s.contentType.includes("application/pdf")?"pdf":"text"),r=V(()=>{if(i.value==="json")return JSON.stringify(s.data,null,2);if(i.value==="media"||i.value==="pdf"){const n=new Blob([s.data],{type:s.contentType});return URL.createObjectURL(n)}return s.data}),I=P(!1),M=P(!1),z=Ze(),J=V(()=>h.route.route?.split(/((?:\*\*)?:[\w_]+)/g)),C=V(()=>J.value?.filter(n=>n.startsWith(":")||n.startsWith("**:"))||[]),l=P(h.route.method||"GET"),S=P({}),b=pe({query:[{active:!0,key:"",value:"",type:"string"}],body:[{active:!0,key:"",value:"",type:"string"}],headers:[{active:!0,key:"Content-Type",value:"application/json",type:"string"}]}),_=P({}),{inputDefaults:T,sendFrom:q}=Ue("serverRoutes"),O=V(()=>c?.value?.app?.$fetch?q.value:"devtools"),B=["GET","POST","PUT","PATCH","DELETE","HEAD"],re=["PATCH","POST","PUT","DELETE"],te=V(()=>re.includes(l.value.toUpperCase())),L=P(C.value.length?"params":"query"),Z=["input","json"],w=P(Z[0]),K=V({get:()=>b[L.value],set:n=>{b[L.value]=n}}),me=V(()=>({...G(T.value.query),...G(b.query)})),ve=V(()=>({...G(T.value.headers),...G(b.headers)})),ie=V(()=>te.value?w.value==="json"?{...G(T.value.body),..._.value}:{...G(T.value.body),...G(b.body)}:void 0),Ee=V(()=>{let n=window?.location.origin;return n.charAt(n.length-1)==="/"&&(n=n.slice(0,-1)),n}),oe=V(()=>{let n=new URLSearchParams(me.value).toString();n&&(n=`?${n}`);const p=(J.value?.map(D=>(D.startsWith(":")||D.startsWith("**:"))&&S.value[D]||D).join("")||"")+n;let f=g.value?.app.baseURL||"";return(f==="./"||f===".")&&(f=""),f.endsWith("/")&&(f=f.slice(0,-1)),f+p}),he=V(()=>Ee.value+oe.value);function G(n){const p=Object.fromEntries(n.filter(({active:f,key:D,value:R})=>f&&D&&R!==void 0).map(({key:f,value:D})=>[f,D]));return Object.entries(p).length?p:void 0}async function ye(){M.value=!0,I.value=!0;const n=Date.now(),p=O.value==="app"?c.value.app.$fetch:$fetch;nt("server-routes:fetch",{method:l.value,sendFrom:O.value});try{s.data=await p(he.value,{method:l.value.toUpperCase(),headers:ve.value,query:me.value,body:ie.value,onResponse({response:f}){s.contentType=(f.headers.get("content-type")||"").toString().toLowerCase().trim(),s.statusCode=f.status,s.error=void 0},onResponseError(f){s.error=f.response._data,s.data=f.response._data}})}catch{}I.value=!1,s.fetchTime=Date.now()-n}const _e=V(()=>{const n=[],p=[],f=Object.entries(ve.value).filter(([R,F])=>R&&F&&!(R==="Content-Type"&&F==="application/json")).map(([R,F])=>` '${R}': '${F}'`).join(`,
|
|
2
|
+
`);l.value.toUpperCase()!=="GET"&&p.push(`method: '${l.value.toUpperCase()}'`),f&&p.push(`headers: {
|
|
3
|
+
${f}
|
|
4
|
+
}`),ie.value&&p.push(`body: ${JSON.stringify(ie.value,null,2)}`);const D=p.length?`, {
|
|
5
|
+
${p.join(`,
|
|
6
|
+
`).split(`
|
|
7
|
+
`).map(R=>` ${R}`).join(`
|
|
8
|
+
`)}
|
|
9
|
+
}`:"";return n.push({name:"useFetch",lang:"javascript",docs:ke.nuxt.useFetch,code:`const { data, pending, error, refresh } = useFetch('${oe.value}'${D})`}),n.push({name:"$fetch",lang:"javascript",docs:ke.nuxt.$fetch,code:`await $fetch('${oe.value}'${D})`}),n}),Q=P(Oe()),W=pe({key:"",value:""}),je=V(()=>{const n=[];return C.value.length&&n.push({name:"Params",slug:"params",length:C.value.length}),n.push({name:"Query",slug:"query",length:b.query.length}),te.value&&n.push({name:"Body",slug:"body",length:b.body.length}),n.push({name:"Headers",slug:"headers",length:b.headers.length}),n.push({name:"Cookies",slug:"cookies",length:Q.value.length}),n.push({name:"Snippets",slug:"snippet"}),n});function Oe(){return document.cookie.split("; ").map(n=>{const[p,f]=n.split("=");return{key:p,value:f}}).filter(n=>n.key)}function ue(n,p){if(!n)return;const f=Q.value.find(R=>R.key===n),D=wt(n);f!==void 0?p===void 0&&(Q.value=Q.value.filter(R=>R.key!==n)):(Q.value.push({key:n,value:p}),W.key="",W.value=""),D.value=p}et(()=>{w.value==="json"&&typeof _.value=="string"&&(_.value=JSON.parse(_.value))});const Le=tt();return(n,p)=>{const f=fe,D=Re,R=$e,F=ce,ge=De,Pe=ct,qe=Ve,Be=st,de=Te,Ae=ft,Me=mt,be=Se("tooltip");return t(),v("div",Et,[d("div",jt,[d("div",Ot,[n.route.method?(t(),k(f,{key:0,class:j(["n-badge-base n-sm",("getRequestMethodClass"in n?n.getRequestMethodClass:e(se))(e(l))]),"pointer-events-none":"","font-mono":"",tabindex:"-1"},{default:x(()=>[H(E(e(l).toUpperCase()),1)]),_:1},8,["class"])):(t(),k(D,{key:1,modelValue:e(l),"onUpdate:modelValue":p[0]||(p[0]=a=>X(l)?l.value=a:null),class:j(["n-badge-base n-sm",("getRequestMethodClass"in n?n.getRequestMethodClass:e(se))(e(l))])},{default:x(()=>[(t(),v(N,null,A(B,a=>d("option",{key:a,class:j(("getRequestMethodClass"in n?n.getRequestMethodClass:e(se))(a))},E(a.toUpperCase()),3)),64))]),_:1},8,["modelValue","class"])),d("div",Lt,[m(R,{"model-value":e(oe),readonly:"","flex-auto":"","font-mono":"",p:"x5 y2",n:"sm"},null,8,["model-value"]),d("div",Pt,[le(m(f,{title:"Copy URL",n:"xs blue",icon:"carbon:copy",border:!1,onClick:p[1]||(p[1]=a=>e(Le)(e(he),"server-route-url"))},null,512),[[be,"Copy URL"]]),le(m(f,{title:"Open in Editor",icon:"carbon-launch",n:"xs blue",border:!1,onClick:p[2]||(p[2]=a=>e(z)(n.route.filepath))},null,512),[[be,"Open in Editor"]])])]),m(f,{"h-full":"",n:"primary solid",onClick:ye},{default:x(()=>[m(F,{icon:"carbon:send"})]),_:1})])]),d("div",qt,[(t(!0),v(N,null,A(e(je),a=>(t(),k(f,{key:a.slug,class:j(e(L)===a.slug?"text-primary n-primary":"border-transparent shadow-none"),onClick:Y=>L.value=a.slug},{default:x(()=>[m(F,{icon:("ServerRouteTabIcons"in n?n.ServerRouteTabIcons:e(Ne))[a.slug]},null,8,["icon"]),H(" "+E(a.name)+" "+E(a?.length?`(${a.length})`:"")+" ",1),d("span",null,E(e(T)[a.slug]?.length?`(${e(T)[a.slug].length})`:""),1)]),_:2},1032,["class","onClick"]))),128)),Bt,At,m(D,{modelValue:e(O),"onUpdate:modelValue":p[3]||(p[3]=a=>X(O)?O.value=a:null),class:"n-xs",disabled:!e(c)?.app?.$fetch},{default:x(()=>[Mt,Ft]),_:1},8,["modelValue","disabled"])]),e(L)==="params"?(t(),v("div",zt,[(t(!0),v(N,null,A(e(C),a=>(t(),v(N,{key:a},[d("div",Ht,E(a),1),m(R,{modelValue:e(S)[a],"onUpdate:modelValue":Y=>e(S)[a]=Y,placeholder:a,"flex-1":""},null,8,["modelValue","onUpdate:modelValue","placeholder"])],64))),128))])):U("",!0),e(L)==="cookies"?(t(),v("div",Wt,[(t(!0),v(N,null,A(e(Q),a=>(t(),v("div",{key:a.key,flex:"~ gap-4 items-center"},[m(R,{placeholder:"Key...","model-value":a.key,disabled:"","op-70":""},null,8,["model-value"]),m(R,{placeholder:"Value...","model-value":a.value,"flex-1":"",n:"primary",onInput:Y=>ue(a.key,Y.target?.value)},null,8,["model-value","onInput"]),m(f,{title:"Delete",n:"red",onClick:Y=>ue(a.key,void 0)},{default:x(()=>[m(F,{icon:"i-carbon-trash-can"})]),_:2},1032,["onClick"])]))),128)),d("div",Gt,[m(R,{modelValue:e(W).key,"onUpdate:modelValue":p[4]||(p[4]=a=>e(W).key=a),placeholder:"Key",n:"primary","flex-1":""},null,8,["modelValue"]),m(R,{modelValue:e(W).value,"onUpdate:modelValue":p[5]||(p[5]=a=>e(W).value=a),placeholder:"Value",n:"primary","flex-1":""},null,8,["modelValue"]),m(f,{title:"Add",n:"primary",onClick:p[6]||(p[6]=a=>ue(e(W).key,e(W).value))},{default:x(()=>[m(F,{icon:"i-carbon-save"})]),_:1})])])):U("",!0),m(e(o),null,{default:x(()=>[m(ge,{modelValue:e(K),"onUpdate:modelValue":p[9]||(p[9]=a=>X(K)?K.value=a:null),default:{active:!0,type:"string"},"max-h-xs":"","of-auto":""},{default:x(()=>[e(T)[e(L)]?.length?(t(),v(N,{key:0},[d("div",Jt,[Kt,Qt,m(f,{icon:"i-carbon-edit",border:!1,onClick:p[7]||(p[7]=a=>y("open-default-input"))}),Yt]),m(ge,{modelValue:e(T)[e(L)],"onUpdate:modelValue":p[8]||(p[8]=a=>e(T)[e(L)]=a),disabled:"",p0:""},null,8,["modelValue"])],64)):U("",!0)]),_:1},8,["modelValue"])]),_:1}),e(L)==="snippet"?(t(),v("div",Xt,[e(_e).length?(t(),k(Pe,{key:0,"code-snippets":e(_e)},null,8,["code-snippets"])):U("",!0)])):e(K)?(t(),v("div",Zt,[e(L)==="body"?(t(),v(N,{key:0},[d("div",eo,[(t(),v(N,null,A(Z,a=>d("button",{key:a,px4:"",py2:"",border:"r base",hover:"bg-active",class:j({"border-b":a!==e(w)}),onClick:Y=>w.value=a},[d("div",{class:j({op30:a!==e(w)}),"font-mono":""},E(a),3)],10,to)),64)),oo]),e(w)==="input"?(t(),k(e($),{key:0})):e(w)==="json"?(t(),k(e(vt),ot({key:1,modelValue:e(_),"onUpdate:modelValue":p[10]||(p[10]=a=>X(_)?_.value=a:null),class:[[n.$colorMode.value==="dark"?"jse-theme-dark":"light"],"json-editor-vue of-auto text-sm outline-none"]},n.$attrs,{mode:"text","navigation-bar":!1,indentation:2,"tab-size":2}),null,16,["modelValue","class"])):U("",!0)],64)):(t(),k(e($),{key:1}))])):U("",!0),e(M)?e(I)?(t(),k(Be,{key:5,"z-10":"","flex-auto":"","backdrop-blur":""},{default:x(()=>[H(" Fetching... ")]),_:1})):(t(),v(N,{key:6},[d("div",no,[so,e(s).error?(t(),k(de,{key:0,n:"red"},{default:x(()=>[H(" Error ")]),_:1})):U("",!0),m(de,{n:e(s).error?"orange":"green",textContent:E(e(s).statusCode)},null,8,["n","textContent"]),e(s).contentType?(t(),v("code",lo,E(e(s).contentType),1)):U("",!0),e(s).contentType==="application/json"?(t(),k(Ae,{key:2,getter:()=>({input:e(r)})},null,8,["getter"])):U("",!0),ao,ro,m(de,{n:"green"},{default:x(()=>[H(E(e(s).fetchTime)+" ms ",1)]),_:1})]),e(i)==="pdf"?(t(),v("div",io,[d("div",uo,[d("object",{data:e(r),type:"application/pdf","flex-auto":"",width:"100%",height:"100%",rounded:""},null,8,po)])])):e(i)!=="media"?(t(),k(Me,{key:1,"flex-auto":"","overflow-auto":"","py-2":"",code:e(r),lang:e(i)},null,8,["code","lang"])):(t(),v("div",co,[d("div",fo,[e(s).contentType.includes("image")?(t(),v("img",{key:0,rounded:"",src:e(r)},null,8,mo)):(t(),v("video",vo,[d("source",{src:e(r),type:"video/mp4"},null,8,ho)]))])]))],64)):(t(),k(qe,{key:4},{default:x(()=>[m(f,{n:"primary",onClick:ye},{default:x(()=>[m(F,{icon:"carbon:send"}),H(" Send request ")]),_:1})]),_:1}))])}}}),_o={flex:"~ gap1","text-sm":""},go={key:0,op50:""},bo={op50:""},ko=d("span",{op75:""},"Select a route to start",-1),Co=d("div",{p4:"",border:"b base"},[d("span",{"text-lg":""},"Default Inputs"),d("br"),d("span",{"text-white":"",op50:""},"Merged as default for every request in DevTools")],-1),Lo=ae({__name:"server-routes",setup(u){const y=P(!1),h=lt(),o=we(),{selectedRoute:$,view:g,inputDefaults:c}=Ue("serverRoutes"),s=V(()=>{!o.value&&$.value&&(o.value=$.value.filepath);const C=h.value?.find(l=>l.filepath===o.value);return o.value!==$.value?.filepath&&C&&($.value=C),C}),i=P(""),r=V(()=>new at(h.value||[],{keys:["method","route"],shouldSort:!0})),I=V(()=>h.value?i.value?r.value.search(i.value).map(l=>l.item):h.value:[]),M=V(()=>{const C=[],l=(S,b)=>{S.routes=S.routes||[],S.routes.push(b)};return I.value.forEach(S=>{const b=S.filepath.split("/"),_=b.slice(b.indexOf("server")+1);_.length>0&&_[_.length-1].includes(".")&&_.pop();let T=null;if(_.forEach(q=>{const O=T?T.routes?.find(B=>B.route===q):C.find(B=>B.route===q);if(O)T=O;else{const B={route:q,filepath:q.replace(/\W/g,"-").toLowerCase(),type:"collection",routes:[]};T?l(T,B):C.push(B),T=B}}),S.type==="runtime"){const q=C.find(O=>O.route==="runtime");if(q)l(q,S);else{const O={route:"runtime",filepath:"runtime",type:"collection",routes:[S]};C.push(O)}}else T?l(T,S):C.push(S)}),C});function z(){g.value=g.value==="tree"?"list":"tree"}function J(C){return C.charAt(0).toUpperCase()+C.slice(1)}return(C,l)=>{const S=fe,b=dt,_=Ie,T=yo,q=ut,O=Ve,B=rt,re=De,te=ht,L=yt,Z=Se("tooltip");return t(),v(N,null,[m(B,{"storage-key":"tab-server-routes"},{left:x(()=>[m(b,{search:e(i),"onUpdate:search":l[1]||(l[1]=w=>X(i)?i.value=w:null),pb2:""},{actions:x(()=>[le(m(S,{"text-lg":"",icon:e(g)==="list"?"i-carbon-list":"i-carbon-tree-view-alt",title:"Toggle view",border:!1,onClick:z},null,8,["icon"]),[[Z,"Toggle View"]]),le(m(S,{"text-lg":"",icon:"i-carbon-cics-sit-overrides",title:"Default Inputs",border:!1,onClick:l[0]||(l[0]=w=>y.value=!e(y))},null,512),[[Z,"Default Inputs"]])]),default:x(()=>[d("div",_o,[e(i)?(t(),v("span",go,E(e(I).length)+" matched · ",1)):U("",!0),d("span",bo,E(e(h)?.length)+" routes in total",1)])]),_:1},8,["search"]),(t(!0),v(N,null,A(e(g)==="tree"?e(M):e(I),w=>(t(),k(_,{key:w.filepath,item:w},null,8,["item"]))),128))]),right:x(()=>[(t(),k(it,{max:10},[e(s)?(t(),k(T,{key:e(s).filepath,route:e(s),onOpenDefaultInput:l[2]||(l[2]=w=>y.value=!0)},null,8,["route"])):U("",!0)],1024)),e(s)?U("",!0):(t(),k(O,{key:0},{default:x(()=>[m(q,{px6:"",py2:""},{default:x(()=>[ko]),_:1})]),_:1}))]),_:1}),m(L,{modelValue:e(y),"onUpdate:modelValue":l[3]||(l[3]=w=>X(y)?y.value=w:null),"auto-close":"","max-w-xl":"","min-w-xl":"",onClose:l[4]||(l[4]=w=>y.value=!1)},{default:x(()=>[d("div",null,[Co,(t(!0),v(N,null,A(Object.keys(e(c)),w=>(t(),k(te,{key:w,text:`${J(w)} ${e(c)[w].length?`(${e(c)[w].length})`:""}`,padding:!1,icon:("ServerRouteTabIcons"in C?C.ServerRouteTabIcons:e(Ne))[w]},{default:x(()=>[m(re,{modelValue:e(c)[w],"onUpdate:modelValue":K=>e(c)[w]=K,py0:"",default:{active:!0,type:"string"}},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["text","icon"]))),128))])]),_:1},8,["modelValue"])],64)}}});export{Lo as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as Q}from"./NIconTitle.vue.7b846ffe.js";import{_ as X}from"./NSwitch.vue.ff927669.js";import{d as Y,as as Z,bJ as ee,aB as le,ax as L,m,i as n,k as e,F as v,n as N,f as t,j as a,K as oe,_ as ne,am as te,o as r,h as j,t as y,G as A,p as P,v as U,l as c,C as D,B as ae,bD as se,bK as ie}from"./entry.909ad6c7.js";import{_ as ue}from"./NSelect.vue.04805728.js";import{_ as de}from"./NCheckbox.vue.b56304c9.js";import{_ as re}from"./NLink.vue.9859bf11.js";const ce={px8:"",py6:""},pe={grid:"~ md:cols-2 gap-x-10 gap-y-3","max-w-300":""},me={flex:"~ col gap-2"},_e=e("h3",{"text-lg":""}," Tabs ",-1),fe={flex:"~ gap-2","flex-auto":"","items-center":"","justify-start":""},ve={capitalize:"",op75:""},ge=e("div",{"mx--1":"",my1:"","h-1px":"",border:"b base",op75:""},null,-1),he=e("div",{"flex-auto":""},null,-1),xe={flex:"~ col gap-2"},be=e("h3",{"text-lg":""}," Appearance ",-1),ye=e("div",{"i-carbon-sun":"","dark:i-carbon-moon":"","translate-y--1px":""},null,-1),ke=e("div",{"mx--2":"",my1:"","h-1px":"",border:"b base",op75:""},null,-1),Ve=e("p",null,"UI Scale",-1),Ce=["value"],we=e("div",{"mx--2":"",my1:"","h-1px":"",border:"b base",op75:""},null,-1),Te=e("span",null," Expand Sidebar ",-1),Se=e("span",null," Scrollable Sidebar ",-1),Ne=e("h3",{mt2:"","text-lg":""}," Features ",-1),Ue=e("span",null,"Close DevTools when clicking outside",-1),Oe=e("span",null,"Show help buttons",-1),$e=e("span",null,"Always show the floating panel",-1),Ie=e("div",{"mx--2":"",my1:"","h-1px":"",border:"b base",op75:""},null,-1),Be=e("p",null,"Minimize floating panel on inactive",-1),De=["value"],ze=e("h3",{mt2:"","text-lg":""}," Feedback ",-1),Ee=e("span",null,"Send anonymous statistics, help us improving DevTools",-1),Le=e("div",{"mx--2":"",my1:"","h-1px":"",border:"b base",op75:""},null,-1),je={flex:"~ gap-2"},Ae=e("div",{"i-carbon-data-enrichment":""},null,-1),Pe=e("div",{"i-carbon-debug":""},null,-1),Fe=e("h3",{mt2:"","text-lg":""}," Debug ",-1),Me={flex:"~ gap-2"},Re=e("div",{"i-carbon-breaking-change":""},null,-1),Xe=Y({__name:"settings",setup(He){const{interactionCloseOnOutsideClick:k,showPanel:O,showHelpButtons:$,scale:I,hiddenTabs:g,pinnedTabs:u,hiddenTabCategories:h,minimizePanelInactive:V,sidebarExpanded:C,sidebarScrollable:B}=ae(),x=Z(),F=[["Tiny",12/15],["Small",14/15],["Normal",1],["Large",16/15],["Huge",18/15]],M=[["Always",0],["1s",1e3],["2s",2e3],["5s",5e3],["10s",1e4],["Never",-1]],R=ee(le());function H(s,o){o?g.value=g.value.filter(d=>d!==s):g.value.push(s)}function K(s,o){o?h.value=h.value.filter(d=>d!==s):h.value.push(s)}function G(s){u.value.includes(s)?u.value=u.value.filter(o=>o!==s):u.value.push(s)}function z(s,o){const d=u.value.indexOf(s);if(d===-1)return;const _=d+o;if(_<0||_>=u.value.length)return;const b=[...u.value];b.splice(d,1),b.splice(_,0,s),u.value=b}async function J(){confirm("Are you sure you to reset all local settings & state? The app will reload.")&&(Object.keys(localStorage).forEach(s=>{s.startsWith("nuxt-devtools-")&&localStorage.removeItem(s)}),await oe.clearOptions(),x.value?.app?.reload?.(),window.location.reload())}return L(()=>{x.value&&(x.value.app.frameState.value.closeOnOutsideClick=k.value)}),L(()=>{x.value&&(x.value.app.frameState.value.minimizePanelInactive=V.value)}),(s,o)=>{const d=Q,_=X,b=se,p=ne,w=te,W=ie,E=ue,f=de,q=re;return r(),m("div",ce,[n(d,{class:"mb-5 text-xl op75",icon:"i-carbon-settings-adjust",text:"DevTools Settings"}),e("div",pe,[e("div",me,[_e,(r(!0),m(v,null,N(t(R),([l,T])=>(r(),m(v,{key:l},[T.length?(r(),j(w,{key:0,p3:"",flex:"~ col gap-1",class:A(t(h).includes(l)?"op50 grayscale":"")},{default:a(()=>[n(_,{flex:"~ row-reverse",py1:"",pl2:"",pr1:"","n-lime":"","model-value":!t(h).includes(l),"onUpdate:modelValue":i=>K(l,i)},{default:a(()=>[e("div",fe,[e("span",ve,y(l),1)])]),_:2},1032,["model-value","onUpdate:modelValue"]),ge,(r(!0),m(v,null,N(T,i=>(r(),j(_,{key:i.name,flex:"~ row-reverse",py1:"",pl2:"",pr1:"","n-primary":"","model-value":!t(g).includes(i.name),"onUpdate:modelValue":S=>H(i.name,S)},{default:a(()=>[e("div",{flex:"~ gap-2","flex-auto":"","items-center":"","justify-start":"","pr-4":"",class:A(t(g).includes(i.name)?"op25":"")},[n(b,{"text-xl":"",icon:i.icon,title:i.title},null,8,["icon","title"]),e("span",null,y(i.title),1),he,t(u).includes(i.name)?(r(),m(v,{key:0},[n(p,{icon:"i-carbon-caret-up",disabled:t(u).indexOf(i.name)===0,border:!1,onClick:S=>z(i.name,-1)},null,8,["disabled","onClick"]),n(p,{icon:"i-carbon-caret-down",disabled:t(u).indexOf(i.name)===t(u).length-1,border:!1,onClick:S=>z(i.name,1)},null,8,["disabled","onClick"])],64)):P("",!0),n(p,{icon:t(u).includes(i.name)?" i-carbon-pin-filled rotate--45":" i-carbon-pin op50",border:!1,onClick:S=>G(i.name)},null,8,["icon","onClick"])],2)]),_:2},1032,["model-value","onUpdate:modelValue"]))),128))]),_:2},1032,["class"])):P("",!0)],64))),128))]),e("div",xe,[be,n(w,{p4:"",flex:"~ col gap-2"},{default:a(()=>[e("div",null,[n(W,null,{default:a(({toggle:l,isDark:T})=>[n(p,{n:"primary",onClick:l},{default:a(()=>[ye,U(" "+y(T.value?"Dark":"Light"),1)]),_:2},1032,["onClick"])]),_:1})]),ke,Ve,n(E,{modelValue:t(I),"onUpdate:modelValue":o[0]||(o[0]=l=>c(I)?I.value=l:null),n:"primary"},{default:a(()=>[(r(),m(v,null,N(F,l=>e("option",{key:l[0],value:l[1]},y(l[0]),9,Ce)),64))]),_:1},8,["modelValue"]),we,n(f,{modelValue:t(C),"onUpdate:modelValue":o[1]||(o[1]=l=>c(C)?C.value=l:null),"n-primary":""},{default:a(()=>[Te]),_:1},8,["modelValue"]),n(f,{modelValue:t(B),"onUpdate:modelValue":o[2]||(o[2]=l=>c(B)?B.value=l:null),disabled:t(C),"n-primary":""},{default:a(()=>[Se]),_:1},8,["modelValue","disabled"])]),_:1}),Ne,n(w,{p4:"",flex:"~ col gap-2"},{default:a(()=>[n(f,{modelValue:t(k),"onUpdate:modelValue":o[3]||(o[3]=l=>c(k)?k.value=l:null),"n-primary":""},{default:a(()=>[Ue]),_:1},8,["modelValue"]),n(f,{modelValue:t($),"onUpdate:modelValue":o[4]||(o[4]=l=>c($)?$.value=l:null),"n-primary":""},{default:a(()=>[Oe]),_:1},8,["modelValue"]),n(f,{modelValue:t(O),"onUpdate:modelValue":o[5]||(o[5]=l=>c(O)?O.value=l:null),"n-primary":""},{default:a(()=>[$e]),_:1},8,["modelValue"]),Ie,Be,n(E,{modelValue:t(V),"onUpdate:modelValue":o[6]||(o[6]=l=>c(V)?V.value=l:null),modelModifiers:{number:!0},"n-primary":""},{default:a(()=>[(r(),m(v,null,N(M,l=>e("option",{key:l[0],value:l[1]},y(l[0]),9,De)),64))]),_:1},8,["modelValue"])]),_:1}),ze,n(w,{p4:"",flex:"~ col gap-2"},{default:a(()=>[n(f,{modelValue:t(D),"onUpdate:modelValue":o[7]||(o[7]=l=>c(D)?D.value=l:null),"n-primary":""},{default:a(()=>[Ee,n(q,{href:"https://github.com/nuxt/devtools#anonymous-usage-analytics",target:"_blank",ml1:"",op50:"",textContent:"Learn more"})]),_:1},8,["modelValue"]),Le,e("div",je,[n(p,{n:"blue",to:"https://github.com/nuxt/devtools/discussions/29",target:"_blank"},{default:a(()=>[Ae,U(" Ideas & Suggestions ")]),_:1}),n(p,{n:"orange",to:"https://github.com/nuxt/devtools/issues",target:"_blank"},{default:a(()=>[Pe,U(" Bug Reports ")]),_:1})])]),_:1}),Fe,e("div",Me,[n(p,{n:"orange",onClick:J},{default:a(()=>[Re,U(" Reset Local Settings & State ")]),_:1})])])])])}}});export{Xe as default};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
const e=Object.freeze({information_for_contributors:["This file has been converted from https://github.com/jeff-hykin/better-shell-syntax/blob/master/autogenerated/shell.tmLanguage.json","If you want to provide a fix or improvement, please create a pull request against the original repository.","Once accepted there, we are happy to receive an update request."],version:"https://github.com/jeff-hykin/better-shell-syntax/commit/a3de7b32f1537194a83ee848838402fbf4b67424",name:"shellscript",scopeName:"source.shell",patterns:[{include:"#initial_context"}],repository:{alias_statement:{begin:"(alias)[ \\t]*+[ \\t]*+(?:((?<=^|;|&|[ \\t])(?:readonly|declare|typeset|export|local)(?=[ \\t]|;|&|$))[ \\t]*+)?((?<!\\w)[a-zA-Z_0-9-]+(?!\\w))(?:(\\[)((?:(?:(?:\\$)?(?<!\\w)[a-zA-Z_0-9-]+(?!\\w)|@)|\\*))(\\]))?(?:(?:(\\=)|(\\+\\=))|(\\-\\=))",end:"(?:(?= |\\t|$)|(?:(?:(?:(?:(;)|(&&))|(\\|\\|))|(&))|\\n))",beginCaptures:{1:{name:"storage.type.alias.shell"},2:{name:"storage.modifier.$2.shell"},3:{name:"variable.other.assignment.shell"},4:{name:"punctuation.definition.array.access.shell"},5:{name:"variable.other.assignment.shell"},6:{name:"punctuation.definition.array.access.shell"},7:{name:"keyword.operator.assignment.shell"},8:{name:"keyword.operator.assignment.compound.shell"},9:{name:"keyword.operator.assignment.compound.shell"}},endCaptures:{1:{name:"punctuation.terminator.statement.semicolon.shell"},2:{name:"punctuation.separator.statement.and.shell"},3:{name:"punctuation.separator.statement.or.shell"},4:{name:"punctuation.separator.statement.background.shell"}},name:"meta.expression.assignment.shell",patterns:[{include:"#normal_statement_context"}]},argument:{begin:"[ \\t]++(?!(?:&|\\||\\(|\\[|#|\\n|$|;))",end:"(?= |\\t|;|\\||&|$|\\n|\\)|\\`)",beginCaptures:{},endCaptures:{},name:"meta.argument.shell",patterns:[{include:"#argument_context"},{include:"#line_continuation"}]},argument_context:{patterns:[{match:`[ \\t]*+([^
|
|
2
|
+
'&;<>\\(\\)\\$\`\\\\"\\|]+(?!>))`,captures:{1:{name:"string.unquoted.argument.shell",patterns:[{match:"\\*",name:"variable.language.special.wildcard.shell"},{include:"#variable"},{include:"#numeric_literal"},{match:"(?<!\\w)(\\b(?:true|false)\\b)(?!\\w)",captures:{1:{name:"constant.language.$1.shell"}}}]}}},{include:"#normal_statement_context"}]},assignment:{patterns:[{begin:"[ \\t]*+(?:((?<=^|;|&|[ \\t])(?:readonly|declare|typeset|export|local)(?=[ \\t]|;|&|$))[ \\t]*+)?((?<!\\w)[a-zA-Z_0-9-]+(?!\\w))(?:(\\[)((?:(?:(?:\\$)?(?<!\\w)[a-zA-Z_0-9-]+(?!\\w)|@)|\\*))(\\]))?(?:(?:(\\=)|(\\+\\=))|(\\-\\=))[ \\t]*+(\\()",end:"\\)",beginCaptures:{1:{name:"storage.modifier.$1.shell"},2:{name:"variable.other.assignment.shell"},3:{name:"punctuation.definition.array.access.shell"},4:{name:"variable.other.assignment.shell"},5:{name:"punctuation.definition.array.access.shell"},6:{name:"keyword.operator.assignment.shell"},7:{name:"keyword.operator.assignment.compound.shell"},8:{name:"keyword.operator.assignment.compound.shell"},9:{name:"punctuation.shell"}},endCaptures:{0:{name:"punctuation.shell"}},name:"meta.expression.assignment.shell",patterns:[{include:"#comment"},{include:"#argument_context"}]},{begin:"[ \\t]*+(?:((?<=^|;|&|[ \\t])(?:readonly|declare|typeset|export|local)(?=[ \\t]|;|&|$))[ \\t]*+)?((?<!\\w)[a-zA-Z_0-9-]+(?!\\w))(?:(\\[)((?:(?:(?:\\$)?(?<!\\w)[a-zA-Z_0-9-]+(?!\\w)|@)|\\*))(\\]))?(?:(?:(\\=)|(\\+\\=))|(\\-\\=))",end:"(?:(?= |\\t|$)|(?:(?:(?:(?:(;)|(&&))|(\\|\\|))|(&))|\\n))",beginCaptures:{1:{name:"storage.modifier.$1.shell"},2:{name:"variable.other.assignment.shell"},3:{name:"punctuation.definition.array.access.shell"},4:{name:"variable.other.assignment.shell"},5:{name:"punctuation.definition.array.access.shell"},6:{name:"keyword.operator.assignment.shell"},7:{name:"keyword.operator.assignment.compound.shell"},8:{name:"keyword.operator.assignment.compound.shell"}},endCaptures:{1:{name:"punctuation.terminator.statement.semicolon.shell"},2:{name:"punctuation.separator.statement.and.shell"},3:{name:"punctuation.separator.statement.or.shell"},4:{name:"punctuation.separator.statement.background.shell"}},name:"meta.expression.assignment.shell",patterns:[{include:"#comment"},{include:"#argument_context"}]}]},basic_command_name:{match:`(?!(?:!|&|\\||\\(|\\)|\\{|\\[|<|>|#|\\n|$|;|[ \\t]))(?!foreach\\b(?!\\/)|select\\b(?!\\/)|repeat\\b(?!\\/)|until\\b(?!\\/)|while\\b(?!\\/)|case\\b(?!\\/)|done\\b(?!\\/)|elif\\b(?!\\/)|else\\b(?!\\/)|esac\\b(?!\\/)|then\\b(?!\\/)|for\\b(?!\\/)|end\\b(?!\\/)|in\\b(?!\\/)|fi\\b(?!\\/)|do\\b(?!\\/)|if\\b(?!\\/))(?:((?<=^|;|&|[ \\t])(?:readonly|declare|typeset|export|local)(?=[ \\t]|;|&|$))|((?!"|'|\\\\\\n?$)[^!'" \\t\\n\\r]+?))(?:(?= |\\t)|(?=;|\\||&|\\n|\\)|\\\`|\\{|\\}|[ \\t]*#|\\])(?<!\\\\))`,captures:{1:{name:"storage.modifier.$1.shell"},2:{name:"entity.name.function.call.shell entity.name.command.shell",patterns:[{match:"(?<!\\w)(?:continue|return|break)(?!\\w)",name:"keyword.control.$0.shell"},{match:"(?<!\\w)(?:unfunction|continue|autoload|unsetopt|bindkey|builtin|getopts|command|declare|unalias|history|unlimit|typeset|suspend|source|printf|unhash|disown|ulimit|return|which|alias|break|false|print|shift|times|umask|umask|unset|read|type|exec|eval|wait|echo|dirs|jobs|kill|hash|stat|exit|test|trap|true|let|set|pwd|cd|fg|bg|fc|:|\\.)(?!\\/)(?!\\w)",name:"support.function.builtin.shell"},{include:"#variable"}]}},name:"meta.statement.command.name.basic.shell"},block_comment:{begin:"\\s*+(\\/\\*)",end:"\\*\\/",beginCaptures:{1:{name:"punctuation.definition.comment.begin.shell"}},endCaptures:{0:{name:"punctuation.definition.comment.end.shell"}},name:"comment.block.shell"},boolean:{match:"\\b(?:true|false)\\b",name:"constant.language.$0.shell"},"case-clause":{patterns:[{begin:"(?=\\S)",end:";;&?|;&",endCaptures:{0:{name:"punctuation.terminator.case-clause.shell"}},name:"meta.scope.case-clause.shell",patterns:[{begin:"\\(|(?=\\S)",beginCaptures:{0:{name:"punctuation.definition.case-pattern.shell"}},end:"\\)",endCaptures:{0:{name:"punctuation.definition.case-pattern.shell"}},name:"meta.scope.case-pattern.shell",patterns:[{match:"\\|",name:"punctuation.separator.pipe-sign.shell"},{include:"#string"},{include:"#variable"},{include:"#interpolation"},{include:"#pathname"}]},{begin:"(?<=\\))",end:"(?=;;&?|;&)",name:"meta.scope.case-clause-body.shell",patterns:[{include:"#initial_context"}]}]}]},comment:{match:"(?:^|[ \\t]++)(?:((#!).*)|((#).*))",captures:{1:{name:"comment.line.number-sign.shell meta.shebang.shell"},2:{name:"punctuation.definition.comment.shebang.shell"},3:{name:"comment.line.number-sign.shell"},4:{name:"punctuation.definition.comment.shell"}}},comments:{patterns:[{include:"#block_comment"},{include:"#line_comment"}]},"compound-command":{patterns:[{begin:"\\[{1,2}",beginCaptures:{0:{name:"punctuation.definition.logical-expression.shell"}},end:"\\]{1,2}",endCaptures:{0:{name:"punctuation.definition.logical-expression.shell"}},name:"meta.scope.logical-expression.shell",patterns:[{include:"#logical-expression"},{include:"#initial_context"}]},{begin:"\\({2}",beginCaptures:{0:{name:"punctuation.definition.string.begin.shell"}},end:"\\){2}",endCaptures:{0:{name:"punctuation.definition.string.end.shell"}},name:"string.other.math.shell",patterns:[{include:"#math"}]},{begin:"\\(",beginCaptures:{0:{name:"punctuation.definition.subshell.shell"}},end:"\\)",endCaptures:{0:{name:"punctuation.definition.subshell.shell"}},name:"meta.scope.subshell.shell",patterns:[{include:"#initial_context"}]},{begin:"(?<=\\s|^){(?=\\s|$)",beginCaptures:{0:{name:"punctuation.definition.group.shell"}},end:"(?<=^|;)\\s*(})",endCaptures:{1:{name:"punctuation.definition.group.shell"}},name:"meta.scope.group.shell",patterns:[{include:"#initial_context"}]}]},continuation_of_double_quoted_command_name:{begin:'\\G(?<=")',end:'"',beginCaptures:{},endCaptures:{0:{name:"string.quoted.double.shell punctuation.definition.string.end.shell entity.name.function.call.shell entity.name.command.shell"}},contentName:"meta.statement.command.name.continuation string.quoted.double entity.name.function.call entity.name.command",patterns:[{match:'\\\\[\\$\\n`"\\\\]',name:"constant.character.escape.shell"},{include:"#variable"},{include:"#interpolation"}]},continuation_of_single_quoted_command_name:{begin:"\\G(?<=')",end:"'",beginCaptures:{},endCaptures:{0:{name:"string.quoted.single.shell punctuation.definition.string.end.shell entity.name.function.call.shell entity.name.command.shell"}},contentName:"meta.statement.command.name.continuation string.quoted.single entity.name.function.call entity.name.command"},custom_command_names:{patterns:[]},custom_commands:{patterns:[]},double_quote_context:{patterns:[{match:'\\\\[\\$`"\\\\\\n]',name:"constant.character.escape.shell"},{include:"#variable"},{include:"#interpolation"}]},double_quote_escape_char:{match:'\\\\[\\$`"\\\\\\n]',name:"constant.character.escape.shell"},function_definition:{begin:"[ \\t]*+(?:(\\bfunction\\b)[ \\t]*+([^ \\t\\n\\r\\(\\)=]+)(?:(\\()[ \\t]*+(\\)))?|([^ \\t\\n\\r\\(\\)=]+)[ \\t]*+(\\()[ \\t]*+(\\)))",end:"(?<=\\}|\\))",beginCaptures:{1:{name:"storage.type.function.shell"},2:{name:"entity.name.function.shell"},3:{name:"punctuation.definition.arguments.shell"},4:{name:"punctuation.definition.arguments.shell"},5:{name:"entity.name.function.shell"},6:{name:"punctuation.definition.arguments.shell"},7:{name:"punctuation.definition.arguments.shell"}},endCaptures:{},name:"meta.function.shell",patterns:[{match:"\\G(?:\\t| |\\n)"},{begin:"\\{",end:"\\}",beginCaptures:{0:{name:"punctuation.definition.group.shell punctuation.section.function.definition.shell"}},endCaptures:{0:{name:"punctuation.definition.group.shell punctuation.section.function.definition.shell"}},name:"meta.function.body.shell",patterns:[{include:"#initial_context"}]},{begin:"\\(",end:"\\)",beginCaptures:{0:{name:"punctuation.definition.group.shell punctuation.section.function.definition.shell"}},endCaptures:{0:{name:"punctuation.definition.group.shell punctuation.section.function.definition.shell"}},name:"meta.function.body.shell",patterns:[{include:"#initial_context"}]}],applyEndPatternLast:1},heredoc:{patterns:[{begin:`((?<!<)<<-)[ \\t]*+("|')[ \\t]*+((?<!\\w)[a-zA-Z_0-9-]+(?!\\w))(?=\\s|;|&|<|"|')(?:\\2)(.*)`,end:"^\\t*(?:\\3)(?=\\s|;|&|$)",beginCaptures:{1:{name:"keyword.operator.heredoc.shell"},2:{},3:{name:"punctuation.definition.string.heredoc.shell"},4:{patterns:[{include:"#normal_statement_context"}]}},endCaptures:{0:{name:"punctuation.definition.string.heredoc.shell"}},contentName:"string.quoted.heredoc.indent",patterns:[]},{begin:`((?<!<)<<(?!<))[ \\t]*+("|')[ \\t]*+((?<!\\w)[a-zA-Z_0-9-]+(?!\\w))(?=\\s|;|&|<|"|')(?:\\2)(.*)`,end:"^(?:\\3)(?=\\s|;|&|$)",beginCaptures:{1:{name:"keyword.operator.heredoc.shell"},2:{},3:{name:"punctuation.definition.string.heredoc.shell"},4:{patterns:[{include:"#normal_statement_context"}]}},endCaptures:{0:{name:"punctuation.definition.string.heredoc.shell"}},contentName:"string.quoted.heredoc.no-indent",patterns:[]},{begin:`((?<!<)<<-)[ \\t]*+((?<!\\w)[a-zA-Z_0-9-]+(?!\\w))(?=\\s|;|&|<|"|')(.*)`,end:"^\\t*(?:\\2)(?=\\s|;|&|$)",beginCaptures:{1:{name:"keyword.operator.heredoc.shell"},2:{name:"punctuation.definition.string.heredoc.shell"},3:{patterns:[{include:"#normal_statement_context"}]}},endCaptures:{0:{name:"punctuation.definition.string.heredoc.shell"}},contentName:"string.unquoted.heredoc.indent",patterns:[{include:"#double_quote_escape_char"},{include:"#variable"},{include:"#interpolation"}]},{begin:`((?<!<)<<(?!<))[ \\t]*+((?<!\\w)[a-zA-Z_0-9-]+(?!\\w))(?=\\s|;|&|<|"|')(.*)`,end:"^(?:\\2)(?=\\s|;|&|$)",beginCaptures:{1:{name:"keyword.operator.heredoc.shell"},2:{name:"punctuation.definition.string.heredoc.shell"},3:{patterns:[{include:"#normal_statement_context"}]}},endCaptures:{0:{name:"punctuation.definition.string.heredoc.shell"}},contentName:"string.unquoted.heredoc.no-indent",patterns:[{include:"#double_quote_escape_char"},{include:"#variable"},{include:"#interpolation"}]}]},herestring:{patterns:[{begin:"(<<<)\\s*(('))",beginCaptures:{1:{name:"keyword.operator.herestring.shell"},2:{name:"string.quoted.single.shell"},3:{name:"punctuation.definition.string.begin.shell"}},end:"(')",endCaptures:{0:{name:"string.quoted.single.shell"},1:{name:"punctuation.definition.string.end.shell"}},name:"meta.herestring.shell",contentName:"string.quoted.single.shell"},{begin:'(<<<)\\s*(("))',beginCaptures:{1:{name:"keyword.operator.herestring.shell"},2:{name:"string.quoted.double.shell"},3:{name:"punctuation.definition.string.begin.shell"}},end:'(")',endCaptures:{0:{name:"string.quoted.double.shell"},1:{name:"punctuation.definition.string.end.shell"}},name:"meta.herestring.shell",contentName:"string.quoted.double.shell",patterns:[{include:"#double_quote_context"}]},{captures:{1:{name:"keyword.operator.herestring.shell"},2:{name:"string.unquoted.herestring.shell",patterns:[{include:"#initial_context"}]}},match:"(<<<)\\s*(([^\\s)\\\\]|\\\\.)+)",name:"meta.herestring.shell"}]},initial_context:{patterns:[{include:"#comment"},{include:"#pipeline"},{include:"#normal_statement_seperator"},{include:"#logical_expression_double"},{include:"#logical_expression_single"},{include:"#misc_ranges"},{include:"#loop"},{include:"#function_definition"},{include:"#variable"},{include:"#interpolation"},{include:"#heredoc"},{include:"#herestring"},{include:"#redirection"},{include:"#pathname"},{include:"#keyword"},{include:"#alias_statement"},{include:"#normal_statement"},{include:"#string"},{include:"#support"}]},inline_comment:{match:"(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/))",captures:{1:{name:"comment.block.shell punctuation.definition.comment.begin.shell"},2:{name:"comment.block.shell"},3:{patterns:[{match:"\\*\\/",name:"comment.block.shell punctuation.definition.comment.end.shell"},{match:"\\*",name:"comment.block.shell"}]}}},interpolation:{patterns:[{begin:"\\$\\({2}",beginCaptures:{0:{name:"punctuation.definition.evaluation.arithmetic.begin.shell"}},end:"\\)\\s*\\)",endCaptures:{0:{name:"punctuation.definition.evaluation.arithmetic.end.shell"}},name:"string.other.math.shell",patterns:[{include:"#math"}]},{begin:"`",beginCaptures:{0:{name:"punctuation.definition.evaluation.backticks.shell"}},end:"`",endCaptures:{0:{name:"punctuation.definition.evaluation.backticks.shell"}},name:"string.interpolated.backtick.shell",patterns:[{match:"\\\\[`\\\\$]",name:"constant.character.escape.shell"},{begin:"(?<=\\W)(?=#)(?!#{)",beginCaptures:{1:{name:"punctuation.whitespace.comment.leading.shell"}},end:"(?!\\G)",patterns:[{begin:"#",beginCaptures:{0:{name:"punctuation.definition.comment.shell"}},end:"(?=`)",name:"comment.line.number-sign.shell"}]},{include:"#initial_context"}]},{begin:"\\$\\(",beginCaptures:{0:{name:"punctuation.definition.evaluation.parens.begin.shell"}},end:"\\)",endCaptures:{0:{name:"punctuation.definition.evaluation.parens.end.shell"}},name:"string.interpolated.dollar.shell",patterns:[{include:"#initial_context"}]}]},keyword:{patterns:[{match:"(?<=^|;|&| |\\t)(?:continue|foreach|return|select|repeat|break|until|while|case|done|elif|else|esac|then|for|end|do|if|fi|in)(?= |\\t|;|&|$)",name:"keyword.control.$0.shell"}]},line_comment:{begin:"\\s*+(\\/\\/)",end:"(?<=\\n)(?<!\\\\\\n)",beginCaptures:{1:{name:"punctuation.definition.comment.shell"}},endCaptures:{},name:"comment.line.double-slash.shell",patterns:[{include:"#line_continuation_character"}]},line_continuation:{match:"\\\\(?=\\n)",name:"constant.character.escape.line-continuation.shell"},"logical-expression":{patterns:[{comment:"do we want a special rule for ( expr )?",match:"=[=~]?|!=?|<|>|&&|\\|\\|",name:"keyword.operator.logical.shell"},{match:"(?<!\\S)-(nt|ot|ef|eq|ne|l[te]|g[te]|[a-hknoprstuwxzOGLSN])\\b",name:"keyword.operator.logical.shell"}]},logical_expression_context:{patterns:[{include:"#regex_comparison"},{include:"#logical-expression"},{include:"#logical_expression_single"},{include:"#logical_expression_double"},{include:"#comment"},{include:"#boolean"},{include:"#redirect_number"},{include:"#numeric_literal"},{include:"#pipeline"},{include:"#normal_statement_seperator"},{include:"#string"},{include:"#variable"},{include:"#interpolation"},{include:"#heredoc"},{include:"#herestring"},{include:"#pathname"},{include:"#keyword"},{include:"#support"}]},logical_expression_double:{begin:"\\[\\[",end:"\\]\\]",beginCaptures:{0:{name:"punctuation.definition.logical-expression.shell"}},endCaptures:{0:{name:"punctuation.definition.logical-expression.shell"}},name:"meta.scope.logical-expression.shell",patterns:[{include:"#logical_expression_context"}]},logical_expression_single:{begin:"\\[",end:"\\]",beginCaptures:{0:{name:"punctuation.definition.logical-expression.shell"}},endCaptures:{0:{name:"punctuation.definition.logical-expression.shell"}},name:"meta.scope.logical-expression.shell",patterns:[{include:"#logical_expression_context"}]},loop:{patterns:[{begin:"(?<=^|;|&|\\s)(for)\\s+(?=\\({2})",beginCaptures:{1:{name:"keyword.control.shell"}},end:"(?<=^|;|&|\\s)done(?=\\s|;|&|$|\\))",endCaptures:{0:{name:"keyword.control.shell"}},name:"meta.scope.for-loop.shell",patterns:[{include:"#initial_context"}]},{begin:"(?<=^|;|&|\\s)(for)\\s+(.+?)\\s+(in)(?=\\s|;|&|$)",beginCaptures:{1:{name:"keyword.control.shell"},2:{name:"variable.other.loop.shell",patterns:[{include:"#string"}]},3:{name:"keyword.control.shell"}},end:"(?<=^|;|&|\\s)done(?=\\s|;|&|$|\\))",endCaptures:{0:{name:"keyword.control.shell"}},name:"meta.scope.for-in-loop.shell",patterns:[{include:"#initial_context"}]},{begin:"(?<=^|;|&|\\s)(while|until)(?=\\s|;|&|$)",beginCaptures:{1:{name:"keyword.control.shell"}},end:"(?<=^|;|&|\\s)done(?=\\s|;|&|$|\\))",endCaptures:{0:{name:"keyword.control.shell"}},name:"meta.scope.while-loop.shell",patterns:[{include:"#initial_context"}]},{begin:"(?<=^|;|&|\\s)(select)\\s+((?:[^\\s\\\\]|\\\\.)+)(?=\\s|;|&|$)",beginCaptures:{1:{name:"keyword.control.shell"},2:{name:"variable.other.loop.shell"}},end:"(?<=^|;|&|\\s)(done)(?=\\s|;|&|$|\\))",endCaptures:{1:{name:"keyword.control.shell"}},name:"meta.scope.select-block.shell",patterns:[{include:"#initial_context"}]},{begin:"(?<=^|;|&|\\s)case(?=\\s|;|&|$)",beginCaptures:{0:{name:"keyword.control.shell"}},end:"(?<=^|;|&|\\s)esac(?=\\s|;|&|$)",endCaptures:{0:{name:"keyword.control.shell"}},name:"meta.scope.case-block.shell",patterns:[{begin:"(?<=^|;|&|\\s)in(?=\\s|;|&|$)",beginCaptures:{0:{name:"keyword.control.shell"}},end:"(?<=^|;|&|\\s)(?=esac(\\s|;|&|$))",name:"meta.scope.case-body.shell",patterns:[{include:"#comment"},{include:"#case-clause"}]},{include:"#initial_context"}]},{begin:"(?<=^|;|&|\\s)if(?=\\s|;|&|$)",beginCaptures:{0:{name:"keyword.control.shell"}},end:"(?<=^|;|&|\\s)fi(?=\\s|;|&|$)",endCaptures:{0:{name:"keyword.control.shell"}},name:"meta.scope.if-block.shell",patterns:[{include:"#initial_context"}]}]},math:{patterns:[{include:"#variable"},{match:"\\+{1,2}|-{1,2}|!|~|\\*{1,2}|/|%|<[<=]?|>[>=]?|==|!=|^|\\|{1,2}|&{1,2}|\\?|\\:|,|=|[*/%+\\-&^|]=|<<=|>>=",name:"keyword.operator.arithmetic.shell"},{match:"0[xX][0-9A-Fa-f]+",name:"constant.numeric.hex.shell"},{match:"0\\d+",name:"constant.numeric.octal.shell"},{match:"\\d{1,2}#[0-9a-zA-Z@_]+",name:"constant.numeric.other.shell"},{match:"\\d+",name:"constant.numeric.integer.shell"}]},misc_ranges:{patterns:[{include:"#logical_expression_single"},{include:"#logical_expression_double"},{begin:"\\(\\(",end:"\\)\\)",beginCaptures:{0:{name:"punctuation.section.arithmetic.shell"}},endCaptures:{0:{name:"punctuation.section.arithmetic.shell"}},name:"meta.arithmetic.shell",patterns:[{include:"#math"}]},{begin:"(?<!=)\\(",end:"\\)",beginCaptures:{0:{name:"punctuation.definition.subshell"}},endCaptures:{0:{name:"punctuation.definition.subshell"}},name:"meta.scope.subshell",patterns:[{include:"#initial_context"}]},{begin:"(?<![^ \\t])({)",end:"}",beginCaptures:{1:{name:"punctuation.definition.group.shell"}},endCaptures:{0:{name:"punctuation.definition.group.shell"}},name:"meta.scope.group.shell",patterns:[{include:"#initial_context"}]}]},modifiers:{match:"(?<=^|;|&|[ \\t])(?:readonly|declare|typeset|export|local)(?=[ \\t]|;|&|$)",name:"storage.modifier.$0.shell"},normal_statement:{begin:"(?!^[ \\t]*+$)(?:(?<=^until | until |\\tuntil |^while | while |\\twhile |^elif | elif |\\telif |^else | else |\\telse |^then | then |\\tthen |^do | do |\\tdo |^if | if |\\tif )|(?<=(?:^|;|\\||&|!|\\(|\\{|\\`)))[ \\t]*+(?!nocorrect\\W|nocorrect\\$|function\\W|function\\$|foreach\\W|foreach\\$|repeat\\W|repeat\\$|logout\\W|logout\\$|coproc\\W|coproc\\$|select\\W|select\\$|while\\W|while\\$|pushd\\W|pushd\\$|until\\W|until\\$|case\\W|case\\$|done\\W|done\\$|elif\\W|elif\\$|else\\W|else\\$|esac\\W|esac\\$|popd\\W|popd\\$|then\\W|then\\$|time\\W|time\\$|for\\W|for\\$|end\\W|end\\$|fi\\W|fi\\$|do\\W|do\\$|in\\W|in\\$|if\\W|if\\$)",end:"(?=;|\\||&|\\n|\\)|\\`|\\{|\\}|[ \\t]*#|\\])(?<!\\\\)",beginCaptures:{},endCaptures:{},name:"meta.statement.shell",patterns:[{include:"#function_definition"},{include:"#assignment"},{begin:"[ \\t]*+(?!(?:!|&|\\||\\(|\\)|\\{|\\[|<|>|#|\\n|$|;|[ \\t]))(?!foreach\\b(?!\\/)|select\\b(?!\\/)|repeat\\b(?!\\/)|until\\b(?!\\/)|while\\b(?!\\/)|case\\b(?!\\/)|done\\b(?!\\/)|elif\\b(?!\\/)|else\\b(?!\\/)|esac\\b(?!\\/)|then\\b(?!\\/)|for\\b(?!\\/)|end\\b(?!\\/)|in\\b(?!\\/)|fi\\b(?!\\/)|do\\b(?!\\/)|if\\b(?!\\/))(?!\\\\\\n?$)",end:"(?=;|\\||&|\\n|\\)|\\`|\\{|\\}|[ \\t]*#|\\])(?<!\\\\)",beginCaptures:{},endCaptures:{},name:"meta.statement.command.shell",patterns:[{begin:"\\G",end:"(?= |\\t|;|\\||&|$|\\n|\\)|\\`)",beginCaptures:{},endCaptures:{},name:"meta.statement.command.name.shell",patterns:[{include:"#modifiers"},{match:"(?<!\\w)(?:continue|return|break)(?!\\w)",name:"entity.name.function.call.shell entity.name.command.shell keyword.control.$0.shell"},{match:"(?<!\\w)(?:unfunction|continue|autoload|unsetopt|bindkey|builtin|getopts|command|declare|unalias|history|unlimit|typeset|suspend|source|printf|unhash|disown|ulimit|return|which|alias|break|false|print|shift|times|umask|umask|unset|read|type|exec|eval|wait|echo|dirs|jobs|kill|hash|stat|exit|test|trap|true|let|set|pwd|cd|fg|bg|fc|:|\\.)(?!\\/)(?!\\w)",name:"entity.name.function.call.shell entity.name.command.shell support.function.builtin.shell"},{include:"#variable"},{match:`(?<=\\G|'|"|\\}|\\))([^ \\n\\t\\r"'=;&\\|\`\\)\\{]+)`,captures:{1:{name:"entity.name.function.call.shell entity.name.command.shell"}}},{begin:`(?:\\G|(?<! |\\t|;|\\||&|\\n|\\{|#))((?:\\$)?)((?:(")|(')))`,end:"(?<!\\G)(?<=(?:\\2))",beginCaptures:{1:{name:"meta.statement.command.name.quoted.shell punctuation.definition.string.shell entity.name.function.call.shell entity.name.command.shell"},2:{},3:{name:"meta.statement.command.name.quoted.shell string.quoted.double.shell punctuation.definition.string.begin.shell entity.name.function.call.shell entity.name.command.shell"},4:{name:"meta.statement.command.name.quoted.shell string.quoted.single.shell punctuation.definition.string.begin.shell entity.name.function.call.shell entity.name.command.shell"}},endCaptures:{},patterns:[{include:"#continuation_of_single_quoted_command_name"},{include:"#continuation_of_double_quoted_command_name"}]},{include:"#line_continuation"}]},{include:"#line_continuation"},{include:"#option"},{include:"#argument"},{include:"#statement_context"},{include:"#string"}]},{include:"#line_continuation"},{include:"#normal_statement_context"}]},normal_statement_context:{patterns:[{include:"#comment"},{include:"#pipeline"},{include:"#normal_statement_seperator"},{include:"#misc_ranges"},{include:"#boolean"},{include:"#redirect_number"},{include:"#numeric_literal"},{include:"#string"},{include:"#variable"},{include:"#interpolation"},{include:"#heredoc"},{include:"#herestring"},{include:"#redirection"},{include:"#pathname"},{include:"#keyword"},{include:"#support"}]},normal_statement_seperator:{match:"(?:(?:(?:(?:(;)|(&&))|(\\|\\|))|(&))|\\n)",captures:{1:{name:"punctuation.terminator.statement.semicolon.shell"},2:{name:"punctuation.separator.statement.and.shell"},3:{name:"punctuation.separator.statement.or.shell"},4:{name:"punctuation.separator.statement.background.shell"}}},numeric_literal:{match:"[ \\t]*+(?<==| |\\t|^|\\{|\\(|\\[)(?:(?:(?:(?:(0[xX][0-9A-Fa-f]+)|(0\\d+))|(\\d{1,2}#[0-9a-zA-Z@_]+))|(-?\\d+\\.\\d+))|(-?\\d+))(?!>)",captures:{1:{name:"constant.numeric.shell constant.numeric.hex.shell"},2:{name:"constant.numeric.shell constant.numeric.octal.shell"},3:{name:"constant.numeric.shell constant.numeric.other.shell"},4:{name:"constant.numeric.shell constant.numeric.integer.shell"},5:{name:"constant.numeric.shell constant.numeric.integer.shell"}}},option:{begin:"[ \\t]++(-)((?!(?:!|&|\\||\\(|\\)|\\{|\\[|<|>|#|\\n|$|;|[ \\t])))",end:"(?:(?=[ \\t])|(?=;|\\||&|\\n|\\)|\\`|\\{|\\}|[ \\t]*#|\\])(?<!\\\\))",beginCaptures:{1:{name:"string.unquoted.argument.shell constant.other.option.dash.shell"},2:{name:"string.unquoted.argument.shell constant.other.option.shell"}},endCaptures:{},contentName:"string.unquoted.argument constant.other.option",patterns:[{include:"#option_context"}]},option_context:{patterns:[{include:"#misc_ranges"},{include:"#string"},{include:"#variable"},{include:"#interpolation"},{include:"#heredoc"},{include:"#herestring"},{include:"#redirection"},{include:"#pathname"},{include:"#keyword"},{include:"#support"}]},pathname:{patterns:[{match:"(?<=\\s|:|=|^)~",name:"keyword.operator.tilde.shell"},{match:"\\*|\\?",name:"keyword.operator.glob.shell"},{begin:"([?*+@!])(\\()",beginCaptures:{1:{name:"keyword.operator.extglob.shell"},2:{name:"punctuation.definition.extglob.shell"}},end:"\\)",endCaptures:{0:{name:"punctuation.definition.extglob.shell"}},name:"meta.structure.extglob.shell",patterns:[{include:"#initial_context"}]}]},pipeline:{patterns:[{match:"(?<=^|;|&|\\s)(time)(?=\\s|;|&|$)",name:"keyword.other.shell"},{match:"[|!]",name:"keyword.operator.pipe.shell"}]},redirect_number:{match:"(?<=[ \\t])(?:(1)|(2)|(\\d+))(?=>)",captures:{1:{name:"keyword.operator.redirect.stdout.shell"},2:{name:"keyword.operator.redirect.stderr.shell"},3:{name:"keyword.operator.redirect.$3.shell"}}},redirection:{patterns:[{begin:"[><]\\(",beginCaptures:{0:{name:"punctuation.definition.string.begin.shell"}},end:"\\)",endCaptures:{0:{name:"punctuation.definition.string.end.shell"}},name:"string.interpolated.process-substitution.shell",patterns:[{include:"#initial_context"}]},{match:"(?<![<>])(&>|\\d*>&\\d*|\\d*(>>|>|<)|\\d*<&|\\d*<>)(?![<>])",name:"keyword.operator.redirect.shell"}]},regex_comparison:{match:"\\=~",name:"keyword.operator.logical.regex.shell"},regexp:{patterns:[{match:".+"}]},simple_options:{match:"(?:[ \\t]++\\-\\w+)*",captures:{0:{patterns:[{match:"[ \\t]++(\\-)(\\w+)",captures:{1:{name:"string.unquoted.argument.shell constant.other.option.dash.shell"},2:{name:"string.unquoted.argument.shell constant.other.option.shell"}}}]}}},start_of_command:{match:"[ \\t]*+(?!(?:!|&|\\||\\(|\\)|\\{|\\[|<|>|#|\\n|$|;|[ \\t]))(?!foreach\\b(?!\\/)|select\\b(?!\\/)|repeat\\b(?!\\/)|until\\b(?!\\/)|while\\b(?!\\/)|case\\b(?!\\/)|done\\b(?!\\/)|elif\\b(?!\\/)|else\\b(?!\\/)|esac\\b(?!\\/)|then\\b(?!\\/)|for\\b(?!\\/)|end\\b(?!\\/)|in\\b(?!\\/)|fi\\b(?!\\/)|do\\b(?!\\/)|if\\b(?!\\/))(?!\\\\\\n?$)"},start_of_double_quoted_command_name:{match:`(?!(?:!|&|\\||\\(|\\)|\\{|\\[|<|>|#|\\n|$|;|[ \\t]))(?:[ \\t]*+([^
|
|
3
|
+
'&;<>\\(\\)\\$\`\\\\"\\|]+(?!>)))?(?:(?:\\$")|")`,captures:{1:{name:"entity.name.function.call.shell entity.name.command.shell",patterns:[{match:"\\*",name:"variable.language.special.wildcard.shell"},{include:"#variable"},{include:"#numeric_literal"},{match:"(?<!\\w)(\\b(?:true|false)\\b)(?!\\w)",captures:{1:{name:"constant.language.$1.shell"}}}]}},name:"meta.statement.command.name.quoted.shell string.quoted.double.shell punctuation.definition.string.begin.shell entity.name.function.call.shell entity.name.command.shell"},start_of_single_quoted_command_name:{match:`(?!(?:!|&|\\||\\(|\\)|\\{|\\[|<|>|#|\\n|$|;|[ \\t]))(?:[ \\t]*+([^
|
|
4
|
+
'&;<>\\(\\)\\$\`\\\\"\\|]+(?!>)))?(?:(?:\\$')|')`,captures:{1:{name:"entity.name.function.call.shell entity.name.command.shell",patterns:[{match:"\\*",name:"variable.language.special.wildcard.shell"},{include:"#variable"},{include:"#numeric_literal"},{match:"(?<!\\w)(\\b(?:true|false)\\b)(?!\\w)",captures:{1:{name:"constant.language.$1.shell"}}}]}},name:"meta.statement.command.name.quoted.shell string.quoted.single.shell punctuation.definition.string.begin.shell entity.name.function.call.shell entity.name.command.shell"},string:{patterns:[{match:"\\\\.",name:"constant.character.escape.shell"},{begin:"'",end:"'",beginCaptures:{0:{name:"punctuation.definition.string.begin.shell"}},endCaptures:{0:{name:"punctuation.definition.string.end.shell"}},name:"string.quoted.single.shell"},{begin:'\\$?"',end:'"',beginCaptures:{0:{name:"punctuation.definition.string.begin.shell"}},endCaptures:{0:{name:"punctuation.definition.string.end.shell"}},name:"string.quoted.double.shell",patterns:[{match:'\\\\[\\$\\n`"\\\\]',name:"constant.character.escape.shell"},{include:"#variable"},{include:"#interpolation"}]},{begin:"\\$'",end:"'",beginCaptures:{0:{name:"punctuation.definition.string.begin.shell"}},endCaptures:{0:{name:"punctuation.definition.string.end.shell"}},name:"string.quoted.single.dollar.shell",patterns:[{match:"\\\\(?:a|b|e|f|n|r|t|v|\\\\|')",name:"constant.character.escape.ansi-c.shell"},{match:'\\\\[0-9]{3}"',name:"constant.character.escape.octal.shell"},{match:'\\\\x[0-9a-fA-F]{2}"',name:"constant.character.escape.hex.shell"},{match:'\\\\c."',name:"constant.character.escape.control-char.shell"}]}]},support:{patterns:[{match:"(?<=^|;|&|\\s)(?::|\\.)(?=\\s|;|&|$)",name:"support.function.builtin.shell"}]},variable:{patterns:[{match:"(\\$)(\\@(?!\\w))",captures:{1:{name:"punctuation.definition.variable.shell variable.parameter.positional.all.shell"},2:{name:"variable.parameter.positional.all.shell"}}},{match:"(\\$)([0-9](?!\\w))",captures:{1:{name:"punctuation.definition.variable.shell variable.parameter.positional.shell"},2:{name:"variable.parameter.positional.shell"}}},{match:"(\\$)([-*#?$!0_](?!\\w))",captures:{1:{name:"punctuation.definition.variable.shell variable.language.special.shell"},2:{name:"variable.language.special.shell"}}},{begin:"(\\$)(\\{)[ \\t]*+(?=\\d)",end:"\\}",beginCaptures:{1:{name:"punctuation.definition.variable.shell variable.parameter.positional.shell"},2:{name:"punctuation.section.bracket.curly.variable.begin.shell punctuation.definition.variable.shell variable.parameter.positional.shell"}},endCaptures:{0:{name:"punctuation.section.bracket.curly.variable.end.shell punctuation.definition.variable.shell variable.parameter.positional.shell"}},contentName:"meta.parameter-expansion",patterns:[{match:"!|:[-=?]?|\\*|@|##|#|%%|%|\\/",name:"keyword.operator.expansion.shell"},{match:"(\\[)[^\\]]+(\\])",captures:{1:{name:"punctuation.section.array.shell"},2:{name:"punctuation.section.array.shell"}}},{match:"[0-9]+",name:"variable.parameter.positional.shell"},{match:"(?<!\\w)[a-zA-Z_0-9-]+(?!\\w)",name:"variable.other.normal.shell"},{include:"#variable"},{include:"#string"}]},{begin:"(\\$)(\\{)",end:"\\}",beginCaptures:{1:{name:"punctuation.definition.variable.shell"},2:{name:"punctuation.section.bracket.curly.variable.begin.shell punctuation.definition.variable.shell"}},endCaptures:{0:{name:"punctuation.section.bracket.curly.variable.end.shell punctuation.definition.variable.shell"}},contentName:"meta.parameter-expansion",patterns:[{match:"!|:[-=?]?|\\*|@|##|#|%%|%|\\/",name:"keyword.operator.expansion.shell"},{match:"(\\[)[^\\]]+(\\])",captures:{1:{name:"punctuation.section.array.shell"},2:{name:"punctuation.section.array.shell"}}},{match:"(?<!\\w)[a-zA-Z_0-9-]+(?!\\w)",name:"variable.other.normal.shell"},{include:"#variable"},{include:"#string"}]},{match:"(\\$)(\\w+(?!\\w))",captures:{1:{name:"punctuation.definition.variable.shell variable.other.normal.shell"},2:{name:"variable.other.normal.shell"}}}]}},displayName:"Shell",aliases:["bash","sh","shell","zsh"]});var n=[e];export{n as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{as as m,b8 as n,a as s,K as o}from"./entry.909ad6c7.js";function u(){const p=m(),t=n("getComponents",()=>o.getComponents()),l=s(()=>Object.entries(p.value?.nuxt?.vueApp._context.components||{}).map(([e])=>({pascalName:e,global:!0})).filter(e=>!/^Lazy[A-Z]/.test(e.pascalName)).filter(e=>!(t.value||[]).find(a=>a.pascalName===e.pascalName)));return s(()=>[...l.value,...t.value||[]].sort((e,a)=>e.pascalName.localeCompare(a.pascalName)))}function r(){return n("getComponentsRelationships",()=>o.getComponentsRelationships())}export{r as a,u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as F}from"./NBadge.ff27dca2.js";import{_ as L}from"./NCodeBlock.vue.9ce69690.js";import{_ as q}from"./NCheckbox.vue.b56304c9.js";import{_ as A}from"./NTip.vue.c98a31a2.js";import{d as E,O as G,b9 as O,r as V,ba as Q,M as W,Q as X,o as m,m as g,a8 as z,f as a,t as $,p as w,F as M,i as s,h as H,j as u,k as h,l as B,v as p,U as J,_ as K,X as Y,bb as Z,aa as ee,a as te,ap as ae,aq as ne,bc as se,b8 as oe}from"./entry.909ad6c7.js";const le={key:0},re={p4:"",flex:"~ col gap-1"},ue={class:"text-lg font-medium leading-6"},ie=h("p",{op50:""}," The following command will be executed in your terminal: ",-1),ce={flex:"~ gap-3",mt2:"","justify-end":""},ge=E({__name:"NpmVersionCheck",props:{packageName:{},options:{},showVersion:{type:Boolean,default:!0}},setup(l){const t=l,e=G(),{info:n,update:i,state:y,processId:k,restart:d}=O(t.packageName,t.options),f=V(!0),_=V(!0),D=Q(),b=W(),R=X();async function N(){const r=await i(async o=>b.start(o));J("npm:update",{packageName:t.packageName,oldVersion:n.value?.current}),r&&_.value&&D.value.push({id:r,message:`${t.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 C=F,S=L,x=q,T=A,P=K,I=Y;return m(),g(M,null,[z(r.$slots,"default",{id:a(k),info:a(n),update:N,state:a(y),restart:a(d)},()=>[a(n)&&r.showVersion?(m(),g("code",le,$(`v${a(n).current}`),1)):w("",!0),a(n)?.latest?(m(),g(M,{key:1},[a(n).needsUpdate?(m(),g("button",{key:0,onClick:o[0]||(o[0]=v=>N())},[s(C,{n:"green",title:"updates available",textContent:"updates available"})])):(m(),H(C,{key:1,n:"gray",title:"latest",textContent:"latest"}))],64)):w("",!0)]),s(a(b),null,{default:u(({resolve:v,args:j})=>[s(I,{"model-value":!0,onClose:c=>v(!1)},{default:u(()=>[h("div",re,[h("h3",ue," Update "+$(t.packageName)+"? ",1),ie,s(S,{code:j[0],lang:"bash",my3:"",px4:"",py2:"",border:"~ base rounded",lines:!1},null,8,["code"]),s(x,{modelValue:a(f),"onUpdate:modelValue":o[1]||(o[1]=c=>B(f)?f.value=c:null),n:"primary"},{default:u(()=>[p(" Navigate to terminal ")]),_:1},8,["modelValue"]),s(x,{modelValue:a(_),"onUpdate:modelValue":o[2]||(o[2]=c=>B(_)?_.value=c:null),n:"primary"},{default:u(()=>[p(" Restart Nuxt server after update ")]),_:1},8,["modelValue"]),h("div",ce,[s(T,{n:"sm amber","flex-auto":"",icon:"i-carbon-data-backup"},{default:u(()=>[p(" Please make sure to backup your project first. ")]),_:1}),s(P,{onClick:c=>v(!1)},{default:u(()=>[p(" Cancel ")]),_:2},1032,["onClick"]),s(P,{n:"solid primary",onClick:c=>v(!0)},{default:u(()=>[p(" Update ")]),_:2},1032,["onClick"])])])]),_:2},1032,["onClose"])]),_:1})],64)}}}),U=["pages","meta","components","imports","nuxt-config-schema","@nuxt/devtools","@nuxt/telemetry"];function de(){return oe("getModulesList",async()=>(await $fetch("https://api.nuxt.com/modules?version=3")).modules.filter(t=>!U.includes(t.npm)&&t.compatibility.nuxt.includes("^3")))}function he(){return Z("installed-modules",()=>{const l=ee(),t=de();return te(()=>(l.value?._installedModules||[]).map(e=>{if(!e.entryPath)return;const n=e.entryPath&&ae(e.entryPath),i=e.meta?.name?e.meta?.name:e.entryPath?n?ne(e.entryPath):l.value?.rootDir?se(e.entryPath,l.value?.rootDir).path:void 0:void 0,y=l.value?.modules?.includes(i),k=t.value?.find(d=>d.npm===i)||t.value?.find(d=>d.name===i);return{name:i,isPackageModule:n,isUninstallable:y,info:k,...e}}).filter(e=>e&&(!e.name||!U.includes(e.name))))})}export{ge as _,de as a,he as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as B}from"./NCodeBlock.vue.9ce69690.js";import{d as N,bt as R,e as $,a as D,ax as T,o as n,m as a,k as c,F as f,n as V,G as m,f as t,t as E,i as _,j as v,v as b,h as F,p as l,_ as L,r as y,K as p,bu as k,bv as g}from"./entry.909ad6c7.js";const W={key:0,relative:"","n-code-block":""},j={flex:"~ wrap","w-full":""},z=["onClick"],G=c("div",{border:"b base","flex-auto":""},null,-1),K={flex:"~ gap-2",px3:"",pb3:"",n:"sm primary"},P=N({__name:"CodeSnippets",props:{codeSnippets:{},eventType:{}},setup(s){const r=s,e=R(r.codeSnippets[0]),x=$(),w=D(()=>e.value?.lang||"text");return T(()=>{r.codeSnippets.includes(e.value)||(e.value=r.codeSnippets[0])}),(i,d)=>{const S=B,u=L;return i.codeSnippets.length?(n(),a("div",W,[c("div",j,[(n(!0),a(f,null,V(i.codeSnippets,(o,O)=>(n(),a("button",{key:O,px4:"",py2:"",border:"r base",hover:"bg-active",class:m(o===t(e)?"":"border-b"),onClick:I=>e.value=o},[c("div",{class:m(o===t(e)?"":"op30"),"font-mono":""},E(o.name),3)],10,z))),128)),G]),t(e)?(n(),a(f,{key:0},[_(S,{code:t(e).code,lang:t(w),lines:!1,"w-full":"","of-auto":"",p3:""},null,8,["code","lang"]),c("div",K,[_(u,{icon:"carbon-copy",onClick:d[0]||(d[0]=o=>t(x)(t(e).code,i.eventType||`code-snippet-${t(e).name}`))},{default:v(()=>[b(" Copy ")]),_:1}),t(e)?.docs?(n(),F(u,{key:0,to:t(e).docs,target:"_blank",icon:"carbon-catalog"},{default:v(()=>[b(" Docs ")]),_:1},8,["to"])):l("",!0)])],64)):l("",!0)])):l("",!0)}}}),h=y(await p.getOptions("assets")),q=k(h);g(h,async s=>{p.updateOptions("assets",s)},{deep:!0,flush:"post",debounce:500,maxWait:1e3});const C=y(await p.getOptions("serverRoutes")),A=k(C);g(C,async s=>{p.updateOptions("serverRoutes",s)},{deep:!0,flush:"post",debounce:500,maxWait:1e3});const H={serverRoutes:A,assets:q};function Q(s){return H[s]}export{P as _,Q as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as G,O as ne,r as
|
|
1
|
+
import{d as G,O as ne,r as U,P as E,bw as T,ay as ae,w as oe,ax as se,Z as le,a as re,K as f,L as k,f as t,o as l,h as m,j as u,k as r,i as c,l as D,m as i,F as w,n as A,t as b,G as F,ac as L,v as d,p as R,ar as ue,I as ie,bd as de,ad as ce,bx as pe,by as z,_ as me,W as _e,a4 as fe,am as ve,A as ye,S as ge,aE as he}from"./entry.909ad6c7.js";import{_ as ke}from"./NSelect.vue.04805728.js";import{_ as be}from"./NLink.vue.9859bf11.js";import{_ as xe}from"./FilepathItem.vue.a1b71b8d.js";import{U as we}from"./json-editor-vue.8a771ed0.js";const Ce={class:"h-[48px] flex items-center justify-between gap1 px-3"},Ke={class:"w-full text-sm"},Se=["value"],Ve=["onClick"],$e=r("div",{"x-divider":""},null,-1),Ne={key:0,"h-full":"","of-hidden":"",flex:"~ col"},Ie={border:"b base",class:"h-[49px] flex flex-none items-center justify-between px-4 text-sm"},je={class:"flex items-center gap-4"},Ue={key:1},De=["onKeyup"],Ae=r("br",null,null,-1),Le={key:0,op50:""},Me={key:1},Be=r("code",null,"nitro.storage",-1),Pe=r("br",null,null,-1),qe={"font-bold":""},Ee=r("br",null,null,-1),Te={"text-sm":""},Fe=r("br",null,null,-1),Re=G({__name:"StorageDetails",async setup(O){let p,g;const C=pe(),h=ne(),x=U(""),v=U(""),s=E("storage:current",""),e=U(),y=E("storage:file:state",""),{data:K}=([p,g]=T(()=>z("storageMounts",()=>f.getStorageMounts())),p=await p,g(),p),{data:S,refresh:M}=([p,g]=T(async()=>z("storageKeys",async()=>s.value?await f.getStorageKeys(s.value):[])),p=await p,g(),p),W=C.hook("storage:key:update",async(n,a)=>{if(!(!s.value||n.split(":")[0]!==s.value)&&(await M(),y.value===n)){if(a==="remove")return h.replace({query:{storage:s.value}});await $(y.value)}});ae(W),oe(s,()=>{M(),y.value=""}),se(async()=>{if(!y.value){e.value=null;return}$(y.value)}),le("keydown",n=>{n.key==="s"&&(n.ctrlKey||n.metaKey)&&(N(),n.preventDefault())});function V(n){return n.replace(`${s.value}:`,"")}const Z=re(()=>S.value?S.value.filter(n=>n.includes(x.value)):[]);async function $(n){const a=await f.getStorageItem(await k(),n);e.value={key:n,updatedKey:V(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 $(e.value.key))}async function J(){!e.value||!s.value||(await f.removeStorageItem(await k(),e.value.key),e.value=null)}async function Q(){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 I=me,X=ke,j=_e,Y=fe,B=be,P=ve,q=ye,ee=ge,te=xe;return t(s)?(l(),m(ee,{key:0,"storage-key":"tab-storage"},{left:u(()=>[r("div",Ce,[c(I,{icon:"carbon-chevron-left","ml--1":"",border:!1,onClick:a[0]||(a[0]=o=>s.value="")}),r("div",Ke,[c(X,{modelValue:t(s),"onUpdate:modelValue":a[1]||(a[1]=o=>D(s)?s.value=o:null),n:"primary",icon:"carbon-data-base"},{default:u(()=>[(l(!0),i(w,null,A(t(K),(o,_)=>(l(),i("option",{key:_,value:_},b(_),9,Se))),128))]),_:1},8,["modelValue"])])]),c(j,{modelValue:t(x),"onUpdate:modelValue":a[2]||(a[2]=o=>D(x)?x.value=o:null),icon:"carbon-search",placeholder:"Search...",n:"primary sm",border:"y x-none base! rounded-0",class:"w-full py2 ring-0!"},null,8,["modelValue"]),(l(!0),i(w,null,A(t(Z),o=>(l(),i(w,{key:o},[r("button",{block:"","w-full":"",truncate:"",px2:"",py1:"","text-start":"","text-sm":"","font-mono":"",class:F(o===t(e)?.key?"text-primary n-bg-active":"text-secondary hover:n-bg-hover"),onClick:_=>y.value=o},b(V(o)),11,Ve),$e],64))),128)),c(j,{modelValue:t(v),"onUpdate:modelValue":a[3]||(a[3]=o=>D(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:L(H,["enter"])},null,8,["modelValue","onKeyup"])]),right:u(()=>[t(e)?.key?(l(),i("div",Ne,[r("div",Ie,[r("div",je,[t(e).editingKey?(l(),m(j,{key:0,modelValue:t(e).updatedKey,"onUpdate:modelValue":a[4]||(a[4]=o=>t(e).updatedKey=o),onKeyup:L(Q,["enter"])},null,8,["modelValue","onKeyup"])):(l(),i("code",Ue,[d(b(V(t(e).key))+" ",1),c(Y,{icon:"carbon-edit",class:"cursor-pointer op50 hover:op100",onClick:a[5]||(a[5]=o=>t(e).editingKey=!0)})])),t(e).editingKey?R("",!0):(l(),m(I,{key:2,n:"green xs",disabled:t(e).content===t(e).updatedContent,class:F({"border-green":t(e).content!==t(e).updatedContent}),onClick:N},{default:u(()=>[d(" Save ")]),_:1},8,["disabled","class"]))]),r("div",null,[c(I,{n:"red xs",onClick:J},{default:u(()=>[d(" Delete ")]),_:1})])]),typeof t(e).content=="object"?(l(),m(t(we),ue({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"])):ie((l(),i("textarea",{key:1,"onUpdate:modelValue":a[7]||(a[7]=o=>t(e).updatedContent=o),placeholder:"Item value...",class:"h-full of-auto p-4 text-sm font-mono outline-none",onKeyup:L(de(N,["ctrl"]),["enter"])},null,40,De)),[[ce,t(e).updatedContent]])])):(l(),m(q,{key:1},{default:u(()=>[c(P,{px6:"",py4:""},{default:u(()=>[d(" Select one key to start."),Ae,d("Learn more about "),c(B,{href:"https://nitro.unjs.io/guide/storage",n:"orange",target:"_blank"},{default:u(()=>[d(" Nitro storage ")]),_:1})]),_:1})]),_:1}))]),_:1})):(l(),m(q,{key:1},{default:u(()=>[Object.keys(t(K)).length?(l(),i("p",Le," Select one storage to start: ")):(l(),i("p",Me,[d(" No custom storage defined in "),Be,d("."),Pe,d(" Learn more about "),c(B,{href:"https://nitro.unjs.io/guide/storage",n:"orange",target:"_blank"},{default:u(()=>[d(" Nitro storage ")]),_:1})])),(l(!0),i(w,null,A(t(K),(o,_)=>(l(),m(P,{key:_,"min-w-80":"","cursor-pointer":"","p-4":"","text-left":"",hover:"border-green",onClick:ze=>s.value=_},{default:u(()=>[r("span",qe,b(_),1),Ee,r("span",Te,b(o.driver)+" driver",1),Fe,o.base?(l(),m(te,{key:0,"text-xs":"",filepath:o.base},null,8,["filepath"])):R("",!0)]),_:2},1032,["onClick"]))),128))]),_:1}))}}}),Je=G({__name:"storage",setup(O){return(p,g)=>{const C=Re,h=he;return l(),m(h,null,{default:u(()=>[c(C)]),_:1})}}});export{Je as default};
|