@nuxt/devtools 1.0.0-beta.0 → 1.0.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/module-main.mjs +137 -45
- package/dist/chunks/vscode.mjs +3 -1
- package/dist/client/200.html +17 -17
- package/dist/client/404.html +17 -17
- package/dist/client/_nuxt/{CodeDiff.vue.3beaa134.js → CodeDiff.vue.09a831fc.js} +1 -1
- package/dist/client/_nuxt/{ComposableItem.vue.136c5104.js → ComposableItem.vue.770ce9d1.js} +1 -1
- package/dist/client/_nuxt/{DataSchemaButton.vue.125423b7.js → DataSchemaButton.vue.65a9244c.js} +1 -1
- package/dist/client/_nuxt/{DataSchemaDrawer.8ac6b677.js → DataSchemaDrawer.939e0d36.js} +1 -1
- package/dist/client/_nuxt/{DurationDisplay.vue.c49b4e64.js → DurationDisplay.vue.3abddd08.js} +1 -1
- package/dist/client/_nuxt/{FilepathItem.vue.5af0b5df.js → FilepathItem.vue.66158bcd.js} +1 -1
- package/dist/client/_nuxt/{HelpFab.vue.98c902f4.js → HelpFab.vue.074157ff.js} +1 -1
- package/dist/client/_nuxt/LaunchPage.vue.20d8d836.js +1 -0
- package/dist/client/_nuxt/{NBadge.98d5d309.js → NBadge.532c6829.js} +1 -1
- package/dist/client/_nuxt/NCheckbox.vue.83a6e70e.js +1 -0
- package/dist/client/_nuxt/{NCodeBlock.vue.adf1e9b4.js → NCodeBlock.vue.d4a74ca4.js} +2 -2
- package/dist/client/_nuxt/{NDrawer.vue.8e620517.js → NDrawer.vue.f03c3dec.js} +1 -1
- package/dist/client/_nuxt/{NDropdown.vue.b2f7aaef.js → NDropdown.vue.885f70c3.js} +1 -1
- package/dist/client/_nuxt/{NIconTitle.vue.bf8093eb.js → NIconTitle.vue.5caf9fc5.js} +1 -1
- package/dist/client/_nuxt/{NLink.vue.0e98999b.js → NLink.vue.c05eef3c.js} +1 -1
- package/dist/client/_nuxt/{NMarkdown.vue.b0e8b2fc.js → NMarkdown.vue.52b3ce56.js} +1 -1
- package/dist/client/_nuxt/NNavbar.vue.0f176f87.js +1 -0
- package/dist/client/_nuxt/{NSectionBlock.4347cc14.js → NSectionBlock.43816001.js} +1 -1
- package/dist/client/_nuxt/{NSelect.vue.4c22d30e.js → NSelect.vue.dcac9c73.js} +1 -1
- package/dist/client/_nuxt/{NSelectTabs.vue.c9be0aa2.js → NSelectTabs.vue.411a7347.js} +1 -1
- package/dist/client/_nuxt/{NSwitch.vue.de333089.js → NSwitch.vue.aacb5de3.js} +1 -1
- package/dist/client/_nuxt/{NTip.vue.770a171a.js → NTip.vue.7a94f00d.js} +1 -1
- package/dist/client/_nuxt/{StateEditor.vue.332bb451.js → StateEditor.vue.e862f0c1.js} +1 -1
- package/dist/client/_nuxt/analyze-build.2cdd206f.js +1 -0
- package/dist/client/_nuxt/assets.41fcf77e.js +16 -0
- package/dist/client/_nuxt/{client.3f2665f1.js → client.ab169146.js} +1 -1
- package/dist/client/_nuxt/components.81bb7f4d.js +98 -0
- package/dist/client/_nuxt/{custom-_name_.c49c72a2.js → custom-_name_.3060f125.js} +1 -1
- package/dist/client/_nuxt/{default.3ba7d10b.js → default.de670135.js} +1 -1
- package/dist/client/_nuxt/entry.9effa704.js +27 -0
- package/dist/client/_nuxt/entry.ebd8706b.css +1 -0
- package/dist/client/_nuxt/{error-404.9d2aaad9.js → error-404.b43ed6fa.js} +1 -1
- package/dist/client/_nuxt/{error-500.20d1b3ce.js → error-500.9a32d319.js} +1 -1
- package/dist/client/_nuxt/{full.6d0fd7cf.js → full.44b6f3d9.js} +1 -1
- package/dist/client/_nuxt/{hooks.908144b2.js → hooks.85310903.js} +1 -1
- package/dist/client/_nuxt/imports.3e92b5b9.js +1 -0
- package/dist/client/_nuxt/index.370f8c55.js +17 -0
- package/dist/client/_nuxt/{index.eb95211d.js → index.780a9ee0.js} +1 -1
- package/dist/client/_nuxt/json-editor-vue.724e0801.js +129 -0
- package/dist/client/_nuxt/{middleware.9e4b2529.js → middleware.44a34c7b.js} +1 -1
- package/dist/client/_nuxt/modules.24081f84.js +2 -0
- package/dist/client/_nuxt/{none.27bf71df.js → none.06949a5f.js} +1 -1
- package/dist/client/_nuxt/{open-graph.b95ebacd.js → open-graph.6cf823d3.js} +2 -2
- package/dist/client/_nuxt/{overview.4991be1e.js → overview.86a88207.js} +1 -1
- package/dist/client/_nuxt/{pages.708b9e25.js → pages.23eb0566.js} +1 -1
- package/dist/client/_nuxt/{payload.eaf10e21.js → payload.1baa204b.js} +1 -1
- package/dist/client/_nuxt/{plugins.f02b2c56.js → plugins.f261769b.js} +1 -1
- package/dist/client/_nuxt/runtime-configs.a5615107.js +1 -0
- package/dist/client/_nuxt/server-routes.2022f4ba.js +9 -0
- package/dist/client/_nuxt/settings.ab7b45b3.js +1 -0
- package/dist/client/_nuxt/{state-components.ca4a58b1.js → state-components.1d5849c5.js} +1 -1
- package/dist/client/_nuxt/state-modules.78318316.js +1 -0
- package/dist/client/_nuxt/storage-options.8ca9ecbc.js +1 -0
- package/dist/client/_nuxt/{storage.27117a31.js → storage.cb6d643c.js} +1 -1
- package/dist/client/_nuxt/{terminals.cdead889.js → terminals.06dde221.js} +2 -2
- package/dist/client/_nuxt/timeline.5add59be.js +29 -0
- package/dist/client/_nuxt/{unocss-runtime.ddd835d7.js → unocss-runtime.1dfe0ac4.js} +2 -2
- package/dist/client/_nuxt/virtual-files.804fdba7.js +1 -0
- package/dist/client/index.html +17 -17
- package/dist/client/modules/analyze-build/index.html +17 -17
- package/dist/client/modules/assets/index.html +17 -17
- package/dist/client/modules/components/index.html +17 -17
- package/dist/client/modules/hooks/index.html +17 -17
- package/dist/client/modules/imports/index.html +17 -17
- package/dist/client/modules/middleware/index.html +17 -17
- package/dist/client/modules/modules/index.html +17 -17
- package/dist/client/modules/open-graph/index.html +17 -17
- package/dist/client/modules/overview/index.html +17 -17
- package/dist/client/modules/pages/index.html +17 -17
- package/dist/client/modules/payload/index.html +17 -17
- package/dist/client/modules/plugins/index.html +17 -17
- package/dist/client/modules/runtime-configs/index.html +17 -17
- package/dist/client/modules/server-routes/index.html +17 -17
- package/dist/client/modules/storage/index.html +17 -17
- package/dist/client/modules/terminals/index.html +17 -17
- package/dist/client/modules/timeline/index.html +17 -17
- package/dist/client/modules/virtual-files/index.html +17 -17
- package/dist/client/settings/index.html +17 -17
- package/dist/module.json +1 -1
- package/dist/module.mjs +1 -1
- package/dist/shared/devtools.d18bab28.mjs +84 -0
- package/package.json +32 -29
- package/dist/client/_nuxt/LaunchPage.vue.805f9595.js +0 -1
- package/dist/client/_nuxt/NCheckbox.vue.6fb2ece1.js +0 -1
- package/dist/client/_nuxt/Navbar.vue.371e4d0a.js +0 -1
- package/dist/client/_nuxt/analyze-build.281c50c1.js +0 -1
- package/dist/client/_nuxt/assets.ca8faf7a.js +0 -16
- package/dist/client/_nuxt/components.a8900a78.js +0 -98
- package/dist/client/_nuxt/entry.1c0836ed.css +0 -1
- package/dist/client/_nuxt/entry.e01776ec.js +0 -27
- package/dist/client/_nuxt/imports.d7bd415a.js +0 -1
- package/dist/client/_nuxt/index.a0a2f0b3.js +0 -17
- package/dist/client/_nuxt/json-editor-vue.b22bf91c.js +0 -129
- package/dist/client/_nuxt/modules.fd214f26.js +0 -2
- package/dist/client/_nuxt/runtime-configs.63235af8.js +0 -1
- package/dist/client/_nuxt/server-routes.88eebd4c.js +0 -9
- package/dist/client/_nuxt/settings.7dbb31cf.js +0 -1
- package/dist/client/_nuxt/state-modules.6d6b039c.js +0 -1
- package/dist/client/_nuxt/storage-options.ab028b2a.js +0 -1
- package/dist/client/_nuxt/timeline.ddc61557.js +0 -29
- package/dist/client/_nuxt/virtual-files.9da3562d.js +0 -1
- package/dist/shared/devtools.c28fc9a7.mjs +0 -80
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{_ as ze}from"./FilepathItem.vue.5af0b5df.js";import{d as H,a as L,a7 as he,o as d,h as C,j as y,k as a,a6 as E,f as m,v as M,t as O,m as b,G as D,p as S,i as v,F as j,n as U,x as te,ak as _e,Q as ve,aI as Me,K as ae,L as ce,aJ as ye,aK as ge,_ as ie,y as Ce,z as Te,au as be,aL as Oe,aM as Ne,aN as Ve,al as Pe,aa as Ae,I as Le,ar as ue,ap as Be,aO as je,a4 as Ee,r as xe,ae as Re,l as De,V as He,a8 as Fe,W as Ue,R as qe,aP as de}from"./entry.e01776ec.js";import{_ as Ke,u as $e,a as We}from"./state-modules.6d6b039c.js";import{_ as Ye}from"./NSectionBlock.4347cc14.js";import{_ as Ge}from"./NIconTitle.vue.bf8093eb.js";import{_ as Xe}from"./NBadge.98d5d309.js";import{_ as Je}from"./NDropdown.vue.b2f7aaef.js";import{_ as Qe}from"./NCodeBlock.vue.adf1e9b4.js";import{_ as Ze}from"./NLink.vue.0e98999b.js";import{_ as et}from"./CodeDiff.vue.3beaa134.js";import{_ as tt}from"./NTip.vue.770a171a.js";import{_ as it}from"./HelpFab.vue.98c902f4.js";import"./NCheckbox.vue.6fb2ece1.js";import"./client.3f2665f1.js";const nt={flex:"~ col gap2","flex-auto":"","of-hidden":"",px1:""},ot={"gap-1t":"",flex:"","items-center":"","text-ellipsis":"","ws-nowrap":"","text-lg":""},st={key:2},rt=a("div",{"flex-auto":""},null,-1),lt={key:1,flex:"~ gap-2",title:"Documentation"},at=a("span",{"i-carbon-link":"","text-lg":"",op50:""},null,-1),ct={key:2,flex:"~ gap-2"},ut=a("span",{"i-carbon-logo-github":"","text-lg":"",op50:""},null,-1),dt={flex:"~ col","items-end":""},mt={key:0,"h-20":"","w-20":"",flex:"","flex-none":"",rounded:"","bg-gray:3":"",p4:""},ft=["src","alt"],pt=a("div",{"i-carbon-cube":"",ma:"","text-4xl":"",op30:""},null,-1),ht={key:1,flex:"~",mt2:"","flex-auto":"","items-end":"","justify-end":""},_t=["src"],vt=a("div",{"flex-auto":""},null,-1),yt={flex:"","justify-end":""},gt="https://api.nuxtjs.org/api/ipx/s_80,f_webp/gh/nuxt/modules/main/icons/",bt="https://api.nuxtjs.org/api/ipx/s_44,f_webp/gh_avatar/",xt="https://github.com/",$t="https://www.npmjs.com/package/",ne=H({__name:"ModuleItemBase",props:{mod:{},info:{},compact:{type:Boolean},maintainers:{type:Boolean,default:!0}},setup(e){const t=e,i=L(()=>({...t.mod?.meta,...t.mod,...t.info})),o=he();return(n,r)=>{const c=te,l=_e;return d(),C(l,{p4:"",flex:"~ gap2"},{default:y(()=>[a("div",nt,[E(n.$slots,"main",{},()=>[a("div",ot,[n.mod.isPackageModule?(d(),C(c,{key:0,to:$t+(m(i).npm||m(i).name),target:"_blank",hover:"underline text-primary"},{default:y(()=>[M(O(m(i).name),1)]),_:1},8,["to"])):n.mod.entryPath?(d(),b("button",{key:1,role:"button",hover:"underline text-primary",onClick:r[0]||(r[0]=s=>m(o)(n.mod.entryPath))},O(m(i).name),1)):(d(),b("span",st,O(m(i).name),1)),E(n.$slots,"badge")]),m(i).description?(d(),b("div",{key:0,class:D(n.compact?"ws-nowrap of-hidden truncate":"line-clamp-2"),"mt--1":"","text-sm":"",op50:""},O(m(i).description),3)):S("",!0),rt,m(i).website?(d(),b("div",lt,[at,v(c,{to:m(i).website,target:"_blank","of-hidden":"",truncate:"","ws-nowrap":"","text-sm":"",op50:"",hover:"op100 underline text-primary"},{default:y(()=>[M(O(m(i).website.replace(/^https?:\/\//,"")),1)]),_:1},8,["to"])])):S("",!0),m(i).github?(d(),b("div",ct,[ut,v(c,{to:m(i).github,target:"_blank","of-hidden":"",truncate:"","ws-nowrap":"","text-sm":"",op50:"",hover:"op100 underline text-primary"},{default:y(()=>[M(O(m(i).github.replace(/^https?:\/\/github.com\//,"")),1)]),_:1},8,["to"])])):S("",!0)]),E(n.$slots,"items")]),a("div",dt,[m(i).icon||n.mod.isPackageModule?(d(),b("div",mt,[m(i).icon?(d(),b("img",{key:0,src:gt+m(i).icon,alt:n.mod.name,ma:""},null,8,ft)):S("",!0),pt])):S("",!0),m(i).maintainers?.length&&n.maintainers?(d(),b("div",ht,[(d(!0),b(j,null,U(m(i).maintainers,s=>(d(),C(c,{key:s.name,target:"_blank",to:xt+s.github,title:s.name},{default:y(()=>[a("img",{src:bt+s.github,"h-6":"","w-6":"","rounded-full":""},null,8,_t)]),_:2},1032,["to","title"]))),128))])):S("",!0),n.$slots.actions?(d(),b(j,{key:2},[vt,a("div",yt,[E(n.$slots,"actions")])],64)):S("",!0)])]),_:3})}}}),kt={key:0,flex:"~ gap-2",title:"Open on filesystem"},wt=a("span",{"i-carbon-folder-move-to":"","text-lg":"",op50:""},null,-1),It=a("span",{"i-carbon-circle-dash":"","animate-spin":"","text-lg":"",op50:""},null,-1),St=a("code",{"text-sm":"",op50:""},"Upgrading...",-1),zt={key:1,"mx--2":""},Mt=["onClick"],Ct=a("span",{"i-carbon-intent-request-active":"","text-lg":"","text-primary":""},null,-1),Tt=a("code",{"text-xs":""},"Update installed, click to restart",-1),Ot=[Ct,Tt],Nt={key:2,"mx--2":""},Vt=["onClick"],Pt=a("span",{"i-carbon-intent-request-upgrade":"","text-lg":"",op50:""},null,-1),At={op50:""},Lt=a("div",{"i-carbon-arrow-right":"",op50:""},null,-1),Bt={"text-green":""},jt={key:3,flex:"~ gap-2","items-center":"",title:"NPM"},Et=a("span",{"i-carbon-cube":"","text-lg":"",op50:""},null,-1),Rt={"text-sm":"",op50:""},Dt=H({__name:"ModuleItem",props:{mod:{}},setup(e){const t=e,i=L(()=>t.mod.info),o=L(()=>({...t.mod?.meta,...t.mod,...i.value})),n=ve();return(r,c)=>{const l=ze,s=te,u=Ke,p=ne;return d(),C(p,{mod:r.mod,info:m(i)},{items:y(()=>[r.mod.entryPath?(d(),b("div",kt,[wt,v(l,{filepath:r.mod.entryPath,"text-sm":"",op50:"",hover:"text-primary op100"},null,8,["filepath"])])):S("",!0),m(o).npm?(d(),C(u,{key:m(o).npm,"package-name":m(o).npm,options:{dev:!0}},{default:y(({info:h,update:k,state:T,id:w,restart:g})=>[T==="running"?(d(),C(s,{key:0,flex:"~ gap-2","animate-pulse":"","items-center":"",to:w?"/modules/terminals":void 0,onClick:x=>w?n.value=w:void 0},{default:y(()=>[It,St]),_:2},1032,["to","onClick"])):T==="updated"?(d(),b("div",zt,[a("button",{flex:"~ gap-2",hover:"bg-primary/20","items-center":"",rounded:"","bg-primary:10":"",px2:"","text-sm":"","text-primary":"",onClick:g},Ot,8,Mt)])):h?.needsUpdate?(d(),b("div",Nt,[a("button",{flex:"~ gap-2",title:"Click to upgrade","items-center":"",rounded:"",px2:"","text-sm":"",hover:"bg-active",onClick:x=>k()},[Pt,a("code",At,"v"+O(h.current),1),Lt,a("code",Bt,"v"+O(h.latest),1)],8,Vt)])):h?.latest?(d(),b("div",jt,[Et,a("code",Rt,"v"+O(h.current),1)])):S("",!0)]),_:1},8,["package-name"])):S("",!0)]),_:1},8,["mod","info"])}}}),Ht=H({__name:"ModuleItemInstall",props:{item:{}},emits:["start"],setup(e,{emit:t}){const i=e,o=$e(),n=L(()=>o.value.find(u=>u.name===i.item.npm)),r=L(()=>n.value&&n.value.isPackageModule),c=L(()=>n.value&&n.value.isPackageModule&&n.value.isUninstallable);async function l(u,p){const h=p==="install"?ae.installNuxtModule:ae.uninstallNuxtModule,k=await h(await ce(),u.npm,!0);k.commands&&await ye.start(u,k,p)&&(ge.value.push({name:u.npm,info:u,processId:k.processId}),t("start"),await h(await ce(),u.npm,!1))}const s={};return(u,p)=>{const h=Xe,k=ie,T=Je,w=ne;return d(),C(w,{mod:s,role:m(r)?"":"button",info:u.item,mb2:"","h-full":"",class:D(m(r)?"border-dashed op75":"hover:bg-active!"),compact:!0,onClick:p[1]||(p[1]=g=>m(r)?null:l(u.item,"install"))},Me({_:2},[m(r)?{name:"badge",fn:y(()=>[v(h,{n:"green",textContent:"Installed"}),m(c)?(d(),C(T,{key:0,n:"sm green"},{trigger:y(({click:g})=>[v(k,{icon:"carbon-overflow-menu-vertical",border:!1,onClick:x=>g()},null,8,["onClick"])]),default:y(()=>[v(k,{icon:"carbon-trash-can",n:"red",onClick:p[0]||(p[0]=g=>l(u.item,"uninstall"))},{default:y(()=>[M(" Uninstall ")]),_:1})]),_:1})):S("",!0)]),key:"0"}:void 0]),1032,["role","info","class"])}}});function Ft(){var e=window.navigator.userAgent,t=e.indexOf("MSIE ");if(t>0)return parseInt(e.substring(t+5,e.indexOf(".",t)),10);var i=e.indexOf("Trident/");if(i>0){var o=e.indexOf("rv:");return parseInt(e.substring(o+3,e.indexOf(".",o)),10)}var n=e.indexOf("Edge/");return n>0?parseInt(e.substring(n+5,e.indexOf(".",n)),10):-1}let W;function J(){J.init||(J.init=!0,W=Ft()!==-1)}var G={name:"ResizeObserver",props:{emitOnMount:{type:Boolean,default:!1},ignoreWidth:{type:Boolean,default:!1},ignoreHeight:{type:Boolean,default:!1}},emits:["notify"],mounted(){J(),be(()=>{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",W&&this.$el.appendChild(e),e.data="about:blank",W||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&&(!W&&this._resizeObject.contentDocument&&this._resizeObject.contentDocument.defaultView.removeEventListener("resize",this.compareAndNotify),this.$el.removeChild(this._resizeObject),this._resizeObject.onload=null,this._resizeObject=null)}}};const Ut=Oe();Ce("data-v-b329ee4c");const qt={class:"resize-observer",tabindex:"-1"};Te();const Kt=Ut((e,t,i,o,n,r)=>(d(),C("div",qt)));G.render=Kt;G.__scopeId="data-v-b329ee4c";G.__file="src/components/ResizeObserver.vue";function Y(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Y=function(t){return typeof t}:Y=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Y(e)}function Wt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function me(e,t){for(var i=0;i<t.length;i++){var o=t[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function Yt(e,t,i){return t&&me(e.prototype,t),i&&me(e,i),e}function fe(e){return Gt(e)||Xt(e)||Jt(e)||Qt()}function Gt(e){if(Array.isArray(e))return Q(e)}function Xt(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function Jt(e,t){if(e){if(typeof e=="string")return Q(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);if(i==="Object"&&e.constructor&&(i=e.constructor.name),i==="Map"||i==="Set")return Array.from(e);if(i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return Q(e,t)}}function Q(e,t){(t==null||t>e.length)&&(t=e.length);for(var i=0,o=new Array(t);i<t;i++)o[i]=e[i];return o}function Qt(){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 Zt(e){var t;return typeof e=="function"?t={callback:e}:t=e,t}function ei(e,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o,n,r,c=function(s){for(var u=arguments.length,p=new Array(u>1?u-1:0),h=1;h<u;h++)p[h-1]=arguments[h];if(r=p,!(o&&s===n)){var k=i.leading;typeof k=="function"&&(k=k(s,n)),(!o||s!==n)&&k&&e.apply(void 0,[s].concat(fe(r))),n=s,clearTimeout(o),o=setTimeout(function(){e.apply(void 0,[s].concat(fe(r))),o=0},t)}};return c._clear=function(){clearTimeout(o),o=null},c}function ke(e,t){if(e===t)return!0;if(Y(e)==="object"){for(var i in e)if(!ke(e[i],t[i]))return!1;return!0}return!1}var ti=function(){function e(t,i,o){Wt(this,e),this.el=t,this.observer=null,this.frozen=!1,this.createObserver(i,o)}return Yt(e,[{key:"createObserver",value:function(i,o){var n=this;if(this.observer&&this.destroyObserver(),!this.frozen){if(this.options=Zt(i),this.callback=function(l,s){n.options.callback(l,s),l&&n.options.once&&(n.frozen=!0,n.destroyObserver())},this.callback&&this.options.throttle){var r=this.options.throttleOptions||{},c=r.leading;this.callback=ei(this.callback,this.options.throttle,{leading:function(s){return c==="both"||c==="visible"&&s||c==="hidden"&&!s}})}this.oldResult=void 0,this.observer=new IntersectionObserver(function(l){var s=l[0];if(l.length>1){var u=l.find(function(h){return h.isIntersecting});u&&(s=u)}if(n.callback){var p=s.isIntersecting&&s.intersectionRatio>=n.threshold;if(p===n.oldResult)return;n.oldResult=p,n.callback(p,s)}},this.options.intersection),be(function(){n.observer&&n.observer.observe(n.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 we(e,t,i){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 n=new ti(e,o,i);e._vue_visibilityState=n}}function ii(e,t,i){var o=t.value,n=t.oldValue;if(!ke(o,n)){var r=e._vue_visibilityState;if(!o){Ie(e);return}r?r.createObserver(o,i):we(e,{value:o},i)}}function Ie(e){var t=e._vue_visibilityState;t&&(t.destroyObserver(),delete e._vue_visibilityState)}var ni={beforeMount:we,updated:ii,unmounted:Ie},oi={itemsLimit:1e3},si=/(auto|scroll)/;function Se(e,t){return e.parentNode===null?t:Se(e.parentNode,t.concat([e]))}var X=function(t,i){return getComputedStyle(t,null).getPropertyValue(i)},ri=function(t){return X(t,"overflow")+X(t,"overflow-y")+X(t,"overflow-x")},li=function(t){return si.test(ri(t))};function pe(e){if(e instanceof HTMLElement||e instanceof SVGElement){for(var t=Se(e.parentNode,[]),i=0;i<t.length;i+=1)if(li(t[i]))return t[i];return document.scrollingElement||document.documentElement}}function Z(e){"@babel/helpers - typeof";return Z=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},Z(e)}var ai={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 ci(){return this.items.length&&Z(this.items[0])!=="object"}var ee=!1;if(typeof window<"u"){ee=!1;try{var ui=Object.defineProperty({},"passive",{get:function(){ee=!0}});window.addEventListener("test",null,ui)}catch{}}let di=0;var oe={name:"RecycleScroller",components:{ResizeObserver:G},directives:{ObserveVisibility:ni},props:{...ai,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,i=this.sizeField,o=this.minItemSize;let n=1e4,r=0,c;for(let l=0,s=t.length;l<s;l++)c=t[l][i]||o,c<n&&(n=c),r+=c,e[l]={accumulator:r,size:c};return this.$_computedMinItemSize=n,e}return[]},simpleArray:ci,itemIndexByKey(){const{keyField:e,items:t}=this,i={};for(let o=0,n=t.length;o<n;o++)i[t[o][e]]=o;return i}},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,i,o,n){const r=Ne({id:di++,index:t,used:!0,key:o,type:n}),c=Ve({item:i,position:0,nr:r});return e.push(c),c},unuseView(e,t=!1){const i=this.$_unusedViews,o=e.nr.type;let n=i.get(o);n||(n=[],i.set(o,n)),n.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:i}=this.updateVisibleItems(!1,!0);i||(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 i=this.itemSize,o=this.gridItems||1,n=this.itemSecondarySize||i,r=this.$_computedMinItemSize,c=this.typeField,l=this.simpleArray?null:this.keyField,s=this.items,u=s.length,p=this.sizes,h=this.$_views,k=this.$_unusedViews,T=this.pool,w=this.itemIndexByKey;let g,x,$,N,A;if(!u)g=x=N=A=$=0;else if(this.$_prerender)g=N=0,x=A=Math.min(this.prerender,s.length),$=null;else{const f=this.getScroll();if(t){let z=f.start-this.$_lastUpdateScrollPosition;if(z<0&&(z=-z),i===null&&z<r||z<i)return{continuous:!0}}this.$_lastUpdateScrollPosition=f.start;const V=this.buffer;f.start-=V,f.end+=V;let I=0;if(this.$refs.before&&(I=this.$refs.before.scrollHeight,f.start-=I),this.$refs.after){const z=this.$refs.after.scrollHeight;f.end+=z}if(i===null){let z,F=0,re=u-1,P=~~(u/2),le;do le=P,z=p[P].accumulator,z<f.start?F=P:P<u-1&&p[P+1].accumulator>f.start&&(re=P),P=~~((F+re)/2);while(P!==le);for(P<0&&(P=0),g=P,$=p[u-1].accumulator,x=P;x<u&&p[x].accumulator<f.end;x++);for(x===-1?x=s.length-1:(x++,x>u&&(x=u)),N=g;N<u&&I+p[N].accumulator<f.start;N++);for(A=N;A<u&&I+p[A].accumulator<f.end;A++);}else{g=~~(f.start/i*o);const z=g%o;g-=z,x=Math.ceil(f.end/i*o),N=Math.max(0,Math.floor((f.start-I)/i*o)),A=Math.floor((f.end-I)/i*o),g<0&&(g=0),x>u&&(x=u),N<0&&(N=0),A>u&&(A=u),$=Math.ceil(u/o)*i}}x-g>oi.itemsLimit&&this.itemsLimitError(),this.totalSize=$;let _;const q=g<=this.$_endIndex&&x>=this.$_startIndex;if(q)for(let f=0,V=T.length;f<V;f++)_=T[f],_.nr.used&&(e&&(_.nr.index=w[_.item[l]]),(_.nr.index==null||_.nr.index<g||_.nr.index>=x)&&this.unuseView(_));const se=q?null:new Map;let R,B,K;for(let f=g;f<x;f++){R=s[f];const V=l?R[l]:R;if(V==null)throw new Error(`Key is ${V} on item (keyField is '${l}')`);if(_=h.get(V),!i&&!p[f].size){_&&this.unuseView(_);continue}B=R[c];let I=k.get(B),z=!1;if(!_)q?I&&I.length?_=I.pop():_=this.addView(T,f,R,V,B):(K=se.get(B)||0,(!I||K>=I.length)&&(_=this.addView(T,f,R,V,B),this.unuseView(_,!0),I=k.get(B)),_=I[K],se.set(B,K+1)),h.delete(_.nr.key),_.nr.used=!0,_.nr.index=f,_.nr.key=V,_.nr.type=B,h.set(V,_),z=!0;else if(!_.nr.used&&(_.nr.used=!0,z=!0,I)){const F=I.indexOf(_);F!==-1&&I.splice(F,1)}_.item=R,z&&(f===s.length-1&&this.$emit("scroll-end"),f===0&&this.$emit("scroll-start")),i===null?(_.position=p[f-1].accumulator,_.offset=0):(_.position=Math.floor(f/o)*i,_.offset=f%o*n)}return this.$_startIndex=g,this.$_endIndex=x,this.emitUpdate&&this.$emit("update",g,x,N,A),clearTimeout(this.$_sortTimer),this.$_sortTimer=setTimeout(this.sortViews,this.updateInterval+300),{continuous:q}},getListenerTarget(){let e=pe(this.$el);return window.document&&(e===window.document.documentElement||e===window.document.body)&&(e=window),e},getScroll(){const{$el:e,direction:t}=this,i=t==="vertical";let o;if(this.pageMode){const n=e.getBoundingClientRect(),r=i?n.height:n.width;let c=-(i?n.top:n.left),l=i?window.innerHeight:window.innerWidth;c<0&&(l+=c,c=0),c+l>r&&(l=r-c),o={start:c,end:c+l}}else i?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,ee?{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 i=this.gridItems||1;this.itemSize===null?t=e>0?this.sizes[e-1].accumulator:0:t=Math.floor(e/i)*this.itemSize,this.scrollToPosition(t)},scrollToPosition(e){const t=this.direction==="vertical"?{scroll:"scrollTop",start:"top"}:{scroll:"scrollLeft",start:"left"};let i,o,n;if(this.pageMode){const r=pe(this.$el),c=r.tagName==="HTML"?0:r[t.scroll],l=r.getBoundingClientRect(),u=this.$el.getBoundingClientRect()[t.start]-l[t.start];i=r,o=t.scroll,n=e+c+u}else i=this.$el,o=t.scroll,n=e;i[o]=n},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 mi={key:0,ref:"before",class:"vue-recycle-scroller__slot"},fi={key:1,ref:"after",class:"vue-recycle-scroller__slot"};function pi(e,t,i,o,n,r){const c=Pe("ResizeObserver"),l=Ae("observe-visibility");return Le((d(),b("div",{class:D(["vue-recycle-scroller",{ready:n.ready,"page-mode":i.pageMode,[`direction-${e.direction}`]:!0}]),onScrollPassive:t[0]||(t[0]=(...s)=>r.handleScroll&&r.handleScroll(...s))},[e.$slots.before?(d(),b("div",mi,[E(e.$slots,"before")],512)):S("v-if",!0),(d(),C(ue(i.listTag),{ref:"wrapper",style:Ee({[e.direction==="vertical"?"minHeight":"minWidth"]:n.totalSize+"px"}),class:D(["vue-recycle-scroller__item-wrapper",i.listClass])},{default:y(()=>[(d(!0),b(j,null,U(n.pool,s=>(d(),C(ue(i.itemTag),Be({key:s.nr.id,style:n.ready?{transform:`translate${e.direction==="vertical"?"Y":"X"}(${s.position}px) translate${e.direction==="vertical"?"X":"Y"}(${s.offset}px)`,width:i.gridItems?`${e.direction==="vertical"&&i.itemSecondarySize||i.itemSize}px`:void 0,height:i.gridItems?`${e.direction==="horizontal"&&i.itemSecondarySize||i.itemSize}px`:void 0}:null,class:["vue-recycle-scroller__item-view",[i.itemClass,{hover:!i.skipHover&&n.hoverKey===s.nr.key}]]},je(i.skipHover?{}:{mouseenter:()=>{n.hoverKey=s.nr.key},mouseleave:()=>{n.hoverKey=null}})),{default:y(()=>[E(e.$slots,"default",{item:s.item,index:s.nr.index,active:s.nr.used})]),_:2},1040,["style","class"]))),128)),E(e.$slots,"empty")]),_:3},8,["style","class"])),e.$slots.after?(d(),b("div",fi,[E(e.$slots,"after")],512)):S("v-if",!0),v(c,{onNotify:r.handleResize},null,8,["onNotify"])],34)),[[l,r.handleVisibilityChange]])}oe.render=pi;oe.__file="src/components/RecycleScroller.vue";const hi={"h-full":"",flex:"~ col gap-4"},_i={"flex-auto":"","of-auto":"",flex:"~ col gap-2",pl6:"",pr4:""},vi=H({__name:"ModuleInstallList",emits:["close"],setup(e,{emit:t}){const i=We(),o=xe(""),n=L(()=>new Re(i.value||[],{keys:["name","description","npm","category"]})),r=L(()=>o.value?n.value.search(o.value).map(c=>c.item):i.value);return(c,l)=>{const s=Ge,u=He,p=Ht;return d(),b("div",hi,[v(s,{mx6:"",mt6:"","text-xl":"",op75:"",icon:"i-carbon-intent-request-create",text:"Install Module"}),v(u,{modelValue:m(o),"onUpdate:modelValue":l[0]||(l[0]=h=>De(o)?o.value=h:null),autofocus:!0,placeholder:"Search...",icon:"carbon-search",n:"primary",mx6:"","px-5":"","py-2":""},null,8,["modelValue"]),a("div",_i,[v(m(oe),{class:"scroller",items:m(r),"item-size":160,"key-field":"name"},{default:y(({item:h})=>[v(p,{item:h,onStart:l[1]||(l[1]=k=>t("close"))},null,8,["item"])]),_:1},8,["items"])])])}}}),yi={flex:"~ col gap-2","w-150":"",p4:"",border:"t base"},gi={capitalize:""},bi=a("p",{op50:""}," Following command will be executed in your terminal: ",-1),xi={op50:""},$i=a("p",null,[a("span",{op50:""},"After that, Nuxt will "),a("span",{"text-orange":""},"restart automatically"),M(". ")],-1),ki={flex:"~ gap-3",mt2:"","justify-end":""},wi=H({__name:"ModuleActionDialog",setup(e){const t=Fe(),i=he(),o={};return(n,r)=>{const c=ne,l=Qe,s=Ze,u=et,p=tt,h=ie,k=Ue;return d(),C(m(ye),null,{default:y(({resolve:T,args:w})=>[v(k,{"model-value":!0,onClose:g=>T(!1)},{default:y(()=>[v(c,{mod:o,info:w[0],border:"none","w-150":"","n-panel-grids":""},null,8,["info"]),a("div",yi,[a("h2",{"text-xl":"",class:D(w[2]==="install"?"text-primary":"text-red")},[a("span",gi,O(w[2]),1),M(),a("code",null,O(w[0].name),1),M("? ")],2),bi,v(l,{code:w[1].commands.join(" "),lang:"bash",px4:"",py2:"",border:"~ base rounded",lines:!1},null,8,["code"]),a("p",xi,[M(" Then your "),v(s,{role:"button",n:"primary",underline:"",onClick:r[0]||(r[0]=g=>m(i)(m(t)?._nuxtConfigFile)),textContent:"Nuxt config"}),M(" will be updated as: ")]),v(u,{from:w[1].configOriginal,to:w[1].configGenerated,"max-h-80":"","of-auto":"",py2:"",border:"~ base rounded",lang:"ts"},null,8,["from","to"]),$i,a("div",ki,[v(p,{n:"sm amber","flex-auto":"",icon:"i-carbon-data-backup"},{default:y(()=>[M(" Please make sure to backup your project first. ")]),_:1}),v(h,{onClick:g=>T(!1)},{default:y(()=>[M(" Cancel ")]),_:2},1032,["onClick"]),v(h,{n:"solid",capitalize:"",class:D(w[2]==="install"?"n-primary":"n-red"),onClick:g=>T(!0)},{default:y(()=>[M(O(w[2]),1)]),_:2},1032,["class","onClick"])])])]),_:2},1032,["onClose"])]),_:1})}}}),Ii={class:"markdown-body"},Si=a("h1",null,"Modules",-1),zi=a("p",null,[M("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 "),a("code",null,"nuxt.config"),M(".")],-1),Mi=a("p",null,[M("You can explore the list of modules on "),a("a",{href:"https://nuxt.com/modules",target:"_blank",rel:"noopener"},"nuxt.com/modules"),M(" or install them directly inside the DevTools.")],-1),Ci=a("p",null,[a("a",{href:"https://nuxt.com/docs/guide/concepts/modules",target:"_blank",rel:"noopener"},"Learn more on the documentation")],-1),Ti=[Si,zi,Mi,Ci],Oi={__name:"modules",setup(e,{expose:t}){return t({frontmatter:{}}),(o,n)=>(d(),b("div",Ii,Ti))}},Ni={"h-full":"","w-full":"","of-auto":""},Vi={relative:"","h-20":"","w-20":"",flex:"","flex-none":"",rounded:"","bg-gray:3":"",p3:""},Pi=["src","alt"],Ai=a("div",{"i-carbon-cube":"",ma:"","text-4xl":"",op30:""},null,-1),Li={"text-lg":"","group-hover":"text-primary",transition:"",flex:"~ gap-2 items-center"},Bi=a("div",{"i-carbon-circle-dash":"","animate-spin":"","text-xl":"",op75:""},null,-1),ji={op75:""},Ei=a("div",{"i-carbon-intent-request-create":"","text-4xl":"",op40:"","group-hover":"op75 text-primary",transition:""},null,-1),Ri=a("div",{"text-lg":"",op40:"","group-hover":"op75 text-primary",transition:""}," Install New Module ",-1),Di={key:0,border:"l base",pos:"fixed bottom-0 right-0 top-0","z-200":"","w-150":"","bg-base":""},Hi="https://api.nuxtjs.org/api/ipx/s_80,f_webp/gh/nuxt/modules/main/icons/",on=H({__name:"modules",setup(e){const t=xe(!1),i=$e(),o=ve(),n=L(()=>i.value.filter(c=>c.isPackageModule)),r=L(()=>i.value.filter(c=>!c.isPackageModule));return qe(()=>[{id:"action:modules:install",title:"Install a new module",icon:"i-carbon-intent-request-create ",action:()=>{t.value=!0}}]),(c,l)=>{const s=Dt,u=_e,p=te,h=Ye,k=ie,T=vi,w=wi,g=Oi,x=it;return d(),b(j,null,[a("div",Ni,[v(h,{icon:"carbon-3d-mpr-toggle",text:"Installed Modules","container-class":"grid grid-cols-minmax-400px gap3 px4",padding:!1,description:`Total modules: ${m(n).length}`},{default:y(()=>[(d(!0),b(j,null,U(m(n),$=>(d(),C(s,{key:$.name,mod:$},null,8,["mod"]))),128)),(d(!0),b(j,null,U("processInstallingModules"in c?c.processInstallingModules:m(ge),$=>(d(),C(p,{key:$.processId,block:"","min-h-30":"",to:"/modules/terminals",onClick:N=>o.value=$.processId},{default:y(()=>[v(u,{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:y(()=>[a("div",Vi,[a("img",{src:Hi+$.info.icon,alt:$.info.name,ma:""},null,8,Pi),Ai]),a("div",Li,[Bi,a("span",ji,"Installing "+O($.name)+"...",1)])]),_:2},1024)]),_:2},1032,["onClick"]))),128)),v(u,{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:l[0]||(l[0]=$=>t.value=!0)},{default:y(()=>[Ei,Ri]),_:1})]),_:1},8,["description"]),m(r).length?(d(),C(h,{key:0,icon:"carbon-3d-mpr-toggle",text:"User Modules","container-class":"grid grid-cols-minmax-400px gap3 px4",padding:!1,description:`Total modules: ${m(r).length}`},{default:y(()=>[(d(!0),b(j,null,U(m(r),$=>(d(),b(j,{key:$.meta?.name||$.entryPath},[$.meta?.name||$.entryPath?(d(),C(s,{key:0,mod:$},null,8,["mod"])):S("",!0)],64))),128))]),_:1},8,["description"])):S("",!0),v(de,{name:"fade-in"},{default:y(()=>[m(t)?(d(),b("div",{key:0,class:"fixed bottom-0 left-0 right-0 top-0 z-100","bg-black:20":"","backdrop-blur-2":"",onClick:l[1]||(l[1]=$=>t.value=!1)})):S("",!0)]),_:1}),v(de,{name:"slide-in"},{default:y(()=>[m(t)?(d(),b("div",Di,[v(k,{icon:"carbon-close",pos:"absolute top-3 right-3 z-10","rounded-full":"","text-xl":"",border:!1,onClick:l[2]||(l[2]=$=>t.value=!1)}),v(T,{onClose:l[3]||(l[3]=$=>t.value=!1)})])):S("",!0)]),_:1}),v(w)]),v(x,null,{default:y(()=>[v(g)]),_:1})],64)}}});export{on as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{_ as C}from"./StateEditor.vue.332bb451.js";import{_ as h}from"./NSectionBlock.4347cc14.js";import{o as c,m as r,k as u,d as v,aq as x,a8 as b,a as m,f as o,i as e,j as s,p as k,F as y}from"./entry.e01776ec.js";import{_ as R}from"./HelpFab.vue.98c902f4.js";import"./DataSchemaButton.vue.125423b7.js";import"./json-editor-vue.b22bf91c.js";import"./NIconTitle.vue.bf8093eb.js";const B={class:"markdown-body"},N=u("h1",null,"Runtime Configs",-1),$=u("p",null,"// TODO:",-1),D=[N,$],F={__name:"runtime-configs",setup(d,{expose:t}){return t({frontmatter:{}}),(l,p)=>(c(),r("div",B,D))}},S={key:0},A=v({__name:"runtime-configs",setup(d){const t=x(),_=b(),l=m(()=>t.value?.nuxt.payload),p=m(()=>{const n={..._.value?.runtimeConfig};return delete n.public,delete n.app,n});return(n,T)=>{const a=C,i=h,f=F,g=R;return c(),r(y,null,[o(t)?(c(),r("div",S,[e(i,{icon:"carbon-settings-services",text:"App Config",padding:!1},{default:s(()=>[e(a,{state:o(t).app.appConfig},null,8,["state"])]),_:1}),e(i,{icon:"carbon-settings",text:"Public Runtime Config",padding:!1},{default:s(()=>[e(a,{state:o(l).config?.public},null,8,["state"])]),_:1}),e(i,{icon:"i-carbon-code-signing-service",text:"Private Runtime Config",open:!1,padding:!1,description:"These values are not exposed to the client. Readonly in the DevTools."},{default:s(()=>[e(a,{state:o(p),readonly:""},null,8,["state"])]),_:1})])):k("",!0),e(g,null,{default:s(()=>[e(f)]),_:1})],64)}}});export{A as default};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{r as P,bd as Fe,aw as ze,au as He,w as xe,be as Ge,bf as We,d as ae,bg as we,o as t,m as v,k as d,G as E,h as C,f as e,bh as se,t as j,p as D,v as z,a4 as Je,a6 as ee,F as U,n as A,a1 as ce,a5 as Ke,a as T,i as m,j as k,V as $e,_ as fe,bi as Qe,a8 as Xe,aq as Ye,as as pe,a7 as Ze,av as et,e as tt,aa as Se,l as X,I as le,ap as ot,A as Te,bj as nt,bk as st,ae as lt,S as at,bl as rt,ak as it}from"./entry.e01776ec.js";import{_ as ut}from"./Navbar.vue.371e4d0a.js";import{_ as Ve}from"./NBadge.98d5d309.js";import{_ as Re}from"./NSelect.vue.4c22d30e.js";import{_ as dt}from"./NCheckbox.vue.6fb2ece1.js";import{u as Ue,_ as pt}from"./storage-options.ab028b2a.js";import{_ as ct}from"./DataSchemaButton.vue.125423b7.js";import{_ as ft}from"./NCodeBlock.vue.adf1e9b4.js";import{C as ke,S as Ie}from"./constants.4e5eba24.js";import{U as mt}from"./json-editor-vue.b22bf91c.js";import{_ as vt}from"./NSectionBlock.4347cc14.js";import{_ as ht}from"./NDrawer.vue.8e620517.js";import"./client.3f2665f1.js";import"./NIconTitle.vue.bf8093eb.js";const ne=/^[\u0009\u0020-\u007E\u0080-\u00FF]+$/;function yt(r,y){if(typeof r!="string")throw new TypeError("argument str must be a string");const h={},w=(y||{}).decode||bt;let g=0;for(;g<r.length;){const c=r.indexOf("=",g);if(c===-1)break;let s=r.indexOf(";",g);if(s===-1)s=r.length;else if(s<c){g=r.lastIndexOf(";",c-1)+1;continue}const i=r.slice(g,c).trim();if(h[i]===void 0){let a=r.slice(c+1,s).trim();a.codePointAt(0)===34&&(a=a.slice(1,-1)),h[i]=gt(a,w)}g=s+1}return h}function Ce(r,y,h){const o=h||{},w=o.encode||kt;if(typeof w!="function")throw new TypeError("option encode is invalid");if(!ne.test(r))throw new TypeError("argument name is invalid");const g=w(y);if(g&&!ne.test(g))throw new TypeError("argument val is invalid");let c=r+"="+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(!_t(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 _t(r){return Object.prototype.toString.call(r)==="[object Date]"||r instanceof Date}function gt(r,y){try{return y(r)}catch{return r}}function bt(r){return r.includes("%")?decodeURIComponent(r):r}function kt(r){return encodeURIComponent(r)}const Ct={path:"/",watch:!0,decode:r=>Ge(decodeURIComponent(r)),encode:r=>encodeURIComponent(typeof r=="string"?r:JSON.stringify(r))};function xt(r,y){const h={...Ct,...y},o=wt(h)||{},w=P(o[r]??h.default?.());{const g=typeof BroadcastChannel>"u"?null:new BroadcastChannel(`nuxt:cookies:${r}`);Fe()&&ze(()=>{g?.close()});const c=()=>{St(r,w.value,h),g?.postMessage(We(w.value))};let s=!1;g&&(g.onmessage=i=>{s=!0,w.value=i.data,He(()=>{s=!1})}),h.watch?xe(w,()=>{s||c()},{deep:h.watch!=="shallow"}):c()}return w}function wt(r={}){return yt(document.cookie,r)}function $t(r,y,h={}){return y==null?Ce(r,y,{...h,maxAge:-1}):Ce(r,y,h)}function St(r,y,h={}){document.cookie=$t(r,y,h)}const Tt=d("div",{"x-divider":""},null,-1),Ne=ae({__name:"ServerRouteListItem",props:{item:{},index:{default:0}},setup(r){const y=P(!0),h=we();return(o,w)=>{const g=ce,c=Ve,s=Ne;return t(),v("div",null,[d("button",{flex:"~ gap-2","w-full":"","items-start":"","items-center":"","hover-bg-active":"",px2:"",py1:"",class:E([{"bg-active":e(h)===o.item.filepath}]),style:Je({paddingLeft:`calc(0.5rem + ${o.index*1.5}em)`}),onClick:w[0]||(w[0]=i=>{y.value=!e(y),h.value=o.item.filepath})},[d("div",{class:E({"w-12":!o.item.routes}),"flex-none":"","text-left":""},[o.item.type==="collection"?(t(),C(g,{key:0,icon:"carbon:chevron-right","mb0.5":"","transform-rotate":e(y)?90:0,transition:""},null,8,["transform-rotate"])):(t(),C(c,{key:1,class:E(("getRequestMethodClass"in o?o.getRequestMethodClass:e(se))(o.item.method||"*")),textContent:j((o.item.method||"*").toUpperCase())},null,8,["class","textContent"]))],2),d("span",{class:E({"flex items-center":o.item.routes}),"text-sm":"","font-mono":""},[o.item.type==="collection"?(t(),C(g,{key:0,title:`${o.item.routes?.length} routes`,icon:"carbon:folder",mr1:""},null,8,["title"])):D("",!0),z(" "+j(o.item.route),1)],2)],6),Tt,e(y)?ee(o.$slots,"default",{key:0},()=>[(t(!0),v(U,null,A(o.item.routes,i=>(t(),C(s,{key:i.filepath,item:i,index:o.index+1},null,8,["item","index"]))),128))]):D("",!0)])}}}),Vt={p4:"",flex:"~ col gap-4"},Rt={key:1,ml2:"",flex:""},Ut=["value"],It={key:0,flex:"","gap-4":""},Nt=d("div",{"flex-auto":""},null,-1),De=ae({__name:"ServerRouteInputs",props:{modelValue:{},keys:{default:()=>[]},default:{default:()=>({})},disabled:{type:Boolean,default:!1}},setup(r,{emit:y}){const h=r,o=Ke(h,"modelValue",y,{passive:!0}),w=T(()=>[...h.keys,"key","value","type"]),g=T(()=>{const i={};for(const a of w.value)i[a]=h.default[a]||"";return i}),c=["string","number","boolean","file","date","time","datetime-local"];function s(i,a){const R=a.target;if(R.files&&R.files[0]){const H=R.files[0],F=new FileReader;F.readAsDataURL(H),F.onload=()=>{o.value[i].value=F.result}}}return xe(()=>o,i=>{i.value.forEach(a=>{if(a.type==="number"&&typeof a.value!="number"){const R=Number.parseFloat(a.value);a.value=Number.isNaN(R)?0:R}else a.type==="boolean"&&typeof a.value!="boolean"?a.value=!0:a.type==="file"&&typeof a.value!="object"?a.value="":a.type==="date"&&typeof a.value=="string"&&!a.value.match(/^\d{4}-\d{2}-\d{2}$/)?a.value=new Date().toISOString().slice(0,10):a.type==="time"&&typeof a.value=="string"&&!a.value.match(/^\d{2}:\d{2}$/)?a.value=new Date().toISOString().slice(11,16):a.type==="datetime-local"&&typeof a.value=="string"&&!a.value.match(/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}$/)?a.value=new Date().toISOString().slice(0,16):a.type==="string"&&(a.value=a.value.toString())})},{deep:!0,immediate:!0,flush:"sync"}),(i,a)=>{const R=$e,H=dt,F=Re,J=ce,b=fe;return t(),v("div",Vt,[(t(!0),v(U,null,A(e(o),(u,S)=>(t(),v("div",{key:S,flex:"~ gap-2","justify-around":""},[ee(i.$slots,"input",{item:u}),(t(!0),v(U,null,A(e(w),$=>(t(),v(U,{key:$},[u.type!==null&&$==="key"?(t(),C(R,{key:0,modelValue:u[$],"onUpdate:modelValue":_=>u[$]=_,placeholder:$,"flex-1":"","font-mono":"",n:"sm primary",disabled:i.disabled,class:E(i.disabled?"op50":"")},null,8,["modelValue","onUpdate:modelValue","placeholder","disabled","class"])):$==="value"?(t(),v(U,{key:1},[u.type==="file"?(t(),C(R,{key:0,type:"file",disabled:i.disabled,class:E(i.disabled?"op75":""),onChange:_=>s(S,_)},null,8,["disabled","class","onChange"])):u.type==="boolean"?(t(),v("div",Rt,[m(H,{modelValue:u.value,"onUpdate:modelValue":_=>u.value=_,placeholder:"Value",n:"green lg",disabled:i.disabled},null,8,["modelValue","onUpdate:modelValue","disabled"])])):(t(),C(R,{key:2,modelValue:u.value,"onUpdate:modelValue":_=>u.value=_,type:u.type,placeholder:"Value","flex-1":"","font-mono":"",n:"sm primary",disabled:i.disabled,class:E(i.disabled?"op75":"")},null,8,["modelValue","onUpdate:modelValue","type","disabled","class"]))],64)):$==="type"?(t(),C(F,{key:2,modelValue:u.type,"onUpdate:modelValue":_=>u.type=_,n:"sm green",class:E(i.disabled?"op75":""),disabled:i.disabled},{default:k(()=>[(t(),v(U,null,A(c,_=>d("option",{key:_,value:_},j(_),9,Ut)),64))]),_:2},1032,["modelValue","onUpdate:modelValue","class","disabled"])):D("",!0)],64))),128)),ee(i.$slots,"input-actions",{},()=>[m(b,{n:"red",disabled:i.disabled,class:E(i.disabled?"op0!":""),onClick:$=>e(o).splice(S,1)},{default:k(()=>[m(J,{icon:"carbon:delete"})]),_:2},1032,["disabled","class","onClick"])])]))),128)),i.disabled?D("",!0):(t(),v("div",It,[ee(i.$slots,"actions",{params:e(o)},()=>[m(b,{icon:"carbon-add",n:"sm primary",my1:"","px-3":"",onClick:a[0]||(a[0]=u=>e(o).push({...e(g)}))},{default:k(()=>[z(" Add ")]),_:1}),Nt,e(o).length?(t(),C(b,{key:0,icon:"carbon-trash-can",n:"sm red",my1:"","px-3":"",onClick:a[1]||(a[1]=u=>o.value=[])},{default:k(()=>[z(" Remove All ")]),_:1})):D("",!0)])])),ee(i.$slots,"default")])}}}),Dt={"h-full":"","w-full":"",flex:"~ col"},jt={flex:"~ col gap-2","flex-none":"",p4:"","navbar-glass":""},Et={flex:"~ gap2 items-center"},Ot={relative:"","w-full":""},Lt={absolute:"","right-2":"","top-1.5":"",flex:"~ gap-1"},Pt={flex:"~ gap2 wrap","w-full":"","items-center":"",px4:"",pb2:"","text-center":"","text-sm":"",border:"b base"},qt=d("div",{"flex-auto":""},null,-1),Bt=d("div",{"text-xs":"",op50:""}," Send from ",-1),At=d("option",{value:"app"}," App ",-1),Mt=d("option",{value:"devtools"}," DevTools ",-1),Ft={key:0,border:"b base","items-center":"",px4:"",py2:"",grid:"~ cols-[max-content_1fr] gap-2"},zt={"text-right":"","font-mono":""},Ht={key:1,border:"b base",p4:"",flex:"~ col gap-4","font-mono":""},Gt={flex:"~ gap-4"},Wt={flex:"~ gap2","mb--2":"","items-center":"",op50:""},Jt=d("div",{"w-5":"","x-divider":""},null,-1),Kt=d("div",{"flex-none":""}," Default Inputs ",-1),Qt=d("div",{"x-divider":""},null,-1),Xt={key:2},Yt={key:3,border:"b base",relative:"","n-code-block":""},Zt={flex:"~ wrap","w-full":""},eo=["onClick"],to=d("div",{border:"b base","flex-auto":""},null,-1),oo={border:"b base",flex:"~ gap2","items-center":"",px4:"",py2:""},no=d("div",null,"Response",-1),so={key:1,"text-xs":"",op50:""},lo=d("div",{"flex-auto":""},null,-1),ao=d("div",{op50:""}," Request finished in ",-1),ro={key:0,"flex-auto":"","overflow-auto":""},io={border:"~ base","h-full":"","w-full":"",rounded:""},uo=["data"],po={key:2,"flex-auto":"","overflow-auto":"",p4:""},co={border:"~ base",rounded:""},fo=["src"],mo={key:1,controls:"",rounded:""},vo=["src"],ho=ae({__name:"ServerRouteDetails",props:{route:{}},emits:["open-default-input"],setup(r,{emit:y}){const h=r,[o,w]=Qe(),g=Xe(),c=Ye(),s=pe({contentType:"text/plain",data:"",statusCode:200,error:void 0,fetchTime:0}),i=T(()=>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"),a=T(()=>{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}),R=P(!1),H=P(!1),F=Ze(),J=T(()=>h.route.route?.split(/((?:\*\*)?:[\w_]+)/g)),b=T(()=>J.value?.filter(n=>n.startsWith(":")||n.startsWith("**:"))||[]),u=P(h.route.method||"GET"),S=P({}),$=pe({query:[{key:"",value:"",type:"string"}],body:[{key:"",value:"",type:"string"}],headers:[{key:"Content-Type",value:"application/json",type:"string"}]}),_=P({}),{inputDefaults:V,sendFrom:q}=Ue("serverRoutes"),O=T(()=>c?.value?.app?.$fetch?q.value:"devtools"),B=["GET","POST","PUT","PATCH","DELETE","HEAD"],re=["PATCH","POST","PUT","DELETE"],te=T(()=>re.includes(u.value.toUpperCase())),L=P(b.value.length?"params":"query"),Y=["input","json"],x=P(Y[0]),K=T({get:()=>$[L.value],set:n=>{$[L.value]=n}}),me=T(()=>({...W(V.value.query),...W($.query)})),ve=T(()=>({...W(V.value.headers),...W($.headers)})),ie=T(()=>te.value?x.value==="json"?{...W(V.value.body),..._.value}:{...W(V.value.body),...W($.body)}:void 0),je=T(()=>{let n=window?.location.origin;return n.charAt(n.length-1)==="/"&&(n=n.slice(0,-1)),n}),oe=T(()=>{let n=new URLSearchParams(me.value).toString();n&&(n=`?${n}`);const p=(J.value?.map(I=>(I.startsWith(":")||I.startsWith("**:"))&&S.value[I]||I).join("")||"")+n;let f=g.value?.app.baseURL||"";return(f==="./"||f===".")&&(f=""),f.endsWith("/")&&(f=f.slice(0,-1)),f+p}),he=T(()=>je.value+oe.value);function W(n){const p=Object.fromEntries(n.filter(({key:f,value:I})=>f&&I!==void 0).map(({key:f,value:I})=>[f,I]));return Object.entries(p).length?p:void 0}async function ye(){H.value=!0,R.value=!0;const n=Date.now(),p=O.value==="app"?c.value.app.$fetch:$fetch;try{s.data=await p(he.value,{method:u.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{}R.value=!1,s.fetchTime=Date.now()-n}const _e=T(()=>{const n=[],p=[],f=Object.entries(ve.value).filter(([N,M])=>N&&M&&!(N==="Content-Type"&&M==="application/json")).map(([N,M])=>` '${N}': '${M}'`).join(`,
|
|
2
|
-
`);u.value.toUpperCase()!=="GET"&&p.push(`method: '${u.value.toUpperCase()}'`),f&&p.push(`headers: {
|
|
3
|
-
${f}
|
|
4
|
-
}`),ie.value&&p.push(`body: ${JSON.stringify(ie.value,null,2)}`);const I=p.length?`, {
|
|
5
|
-
${p.join(`,
|
|
6
|
-
`).split(`
|
|
7
|
-
`).map(N=>` ${N}`).join(`
|
|
8
|
-
`)}
|
|
9
|
-
}`:"";return n.push({name:"useFetch",lang:"javascript",docs:ke.nuxt.useFetch,code:`const { data, pending, error, refresh } = useFetch('${oe.value}'${I})`}),n.push({name:"$fetch",lang:"javascript",docs:ke.nuxt.$fetch,code:`await $fetch('${oe.value}'${I})`}),n}),Ee=T(()=>{const n=[];return b.value.length&&n.push({name:"Params",slug:"params",length:b.value.length}),n.push({name:"Query",slug:"query",length:$.query.length}),te.value&&n.push({name:"Body",slug:"body",length:$.body.length}),n.push({name:"Headers",slug:"headers",length:$.headers.length}),n.push({name:"Cookies",slug:"cookies"}),n.push({name:"Snippets",slug:"snippet"}),n}),Z=P(Oe());function Oe(){return document.cookie.split("; ").map(n=>{const[p,f]=n.split("=");return{key:p,value:f}})}const G=pe({key:"",value:""});function ue(n,p){if(!n)return;const f=Z.value.find(N=>N.key===n),I=xt(n);f!==void 0?p===void 0&&(Z.value=Z.value.filter(N=>N.key!==n)):(Z.value.push({key:n,value:p}),G.key="",G.value=""),I.value=p}et(()=>{x.value==="json"&&typeof _.value=="string"&&(_.value=JSON.parse(_.value))});const Le=tt();return(n,p)=>{const f=fe,I=Re,N=$e,M=ce,ge=De,Pe=pt,qe=Te,Be=nt,de=Ve,Ae=ct,Me=ft,be=Se("tooltip");return t(),v("div",Dt,[d("div",jt,[d("div",Et,[n.route.method?(t(),C(f,{key:0,class:E(["n-badge-base n-sm",("getRequestMethodClass"in n?n.getRequestMethodClass:e(se))(e(u))]),"pointer-events-none":"","font-mono":"",tabindex:"-1"},{default:k(()=>[z(j(e(u).toUpperCase()),1)]),_:1},8,["class"])):(t(),C(I,{key:1,modelValue:e(u),"onUpdate:modelValue":p[0]||(p[0]=l=>X(u)?u.value=l:null),class:E(["n-badge-base n-sm",("getRequestMethodClass"in n?n.getRequestMethodClass:e(se))(e(u))])},{default:k(()=>[(t(),v(U,null,A(B,l=>d("option",{key:l,class:E(("getRequestMethodClass"in n?n.getRequestMethodClass:e(se))(l))},j(l.toUpperCase()),3)),64))]),_:1},8,["modelValue","class"])),d("div",Ot,[m(N,{"model-value":e(oe),readonly:"","flex-auto":"","font-mono":"",p:"x5 y2",n:"sm"},null,8,["model-value"]),d("div",Lt,[le(m(f,{title:"Copy URL",n:"xs blue",icon:"carbon:copy",border:!1,onClick:p[1]||(p[1]=l=>e(Le)(e(he)))},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]=l=>e(F)(n.route.filepath))},null,512),[[be,"Open in Editor"]])])]),m(f,{n:"primary solid",onClick:ye},{default:k(()=>[m(M,{icon:"carbon:send"})]),_:1})])]),d("div",Pt,[(t(!0),v(U,null,A(e(Ee),l=>(t(),C(f,{key:l.slug,class:E(e(L)===l.slug?"text-primary n-primary":"border-transparent shadow-none"),onClick:Q=>L.value=l.slug},{default:k(()=>[m(M,{icon:("ServerRouteTabIcons"in n?n.ServerRouteTabIcons:e(Ie))[l.slug]},null,8,["icon"]),z(" "+j(l.name)+" "+j(l?.length?`(${l.length})`:"")+" ",1),d("span",null,j(e(V)[l.slug]?.length?`(${e(V)[l.slug].length})`:""),1)]),_:2},1032,["class","onClick"]))),128)),qt,Bt,m(I,{modelValue:e(O),"onUpdate:modelValue":p[3]||(p[3]=l=>X(O)?O.value=l:null),class:"n-xs",disabled:!e(c)?.app?.$fetch},{default:k(()=>[At,Mt]),_:1},8,["modelValue","disabled"])]),e(L)==="params"?(t(),v("div",Ft,[(t(!0),v(U,null,A(e(b),l=>(t(),v(U,{key:l},[d("div",zt,j(l),1),m(N,{modelValue:e(S)[l],"onUpdate:modelValue":Q=>e(S)[l]=Q,placeholder:l,"flex-1":""},null,8,["modelValue","onUpdate:modelValue","placeholder"])],64))),128))])):D("",!0),e(L)==="cookies"?(t(),v("div",Ht,[(t(!0),v(U,null,A(e(Z),l=>(t(),v("div",{key:l.key,flex:"~ gap-4 items-center"},[m(N,{placeholder:"Key...","model-value":l.key,disabled:"","op-70":""},null,8,["model-value"]),m(N,{placeholder:"Value...","model-value":l.value,"flex-1":"",n:"primary",onInput:Q=>ue(l.key,Q.target?.value)},null,8,["model-value","onInput"]),m(f,{title:"Delete",n:"red",onClick:Q=>ue(l.key,void 0)},{default:k(()=>[m(M,{icon:"i-carbon-delete"})]),_:2},1032,["onClick"])]))),128)),d("div",Gt,[m(N,{modelValue:e(G).key,"onUpdate:modelValue":p[4]||(p[4]=l=>e(G).key=l),placeholder:"Key",n:"primary","flex-1":""},null,8,["modelValue"]),m(N,{modelValue:e(G).value,"onUpdate:modelValue":p[5]||(p[5]=l=>e(G).value=l),placeholder:"Value",n:"primary","flex-1":""},null,8,["modelValue"]),m(f,{title:"Add",n:"primary",onClick:p[6]||(p[6]=l=>ue(e(G).key,e(G).value))},{default:k(()=>[m(M,{icon:"i-carbon-save"})]),_:1})])])):D("",!0),m(e(o),null,{default:k(()=>[m(ge,{modelValue:e(K),"onUpdate:modelValue":p[9]||(p[9]=l=>X(K)?K.value=l:null),default:{type:"string"},"max-h-xs":"","of-auto":""},{default:k(()=>[e(V)[e(L)]?.length?(t(),v(U,{key:0},[d("div",Wt,[Jt,Kt,m(f,{icon:"i-carbon-edit",border:!1,onClick:p[7]||(p[7]=l=>y("open-default-input"))}),Qt]),m(ge,{modelValue:e(V)[e(L)],"onUpdate:modelValue":p[8]||(p[8]=l=>e(V)[e(L)]=l),disabled:"",p0:""},null,8,["modelValue"])],64)):D("",!0)]),_:1},8,["modelValue"])]),_:1}),e(L)==="snippet"?(t(),v("div",Xt,[e(_e).length?(t(),C(Pe,{key:0,"code-snippets":e(_e)},null,8,["code-snippets"])):D("",!0)])):e(K)?(t(),v("div",Yt,[e(L)==="body"?(t(),v(U,{key:0},[d("div",Zt,[(t(),v(U,null,A(Y,l=>d("button",{key:l,px4:"",py2:"",border:"r base",hover:"bg-active",class:E({"border-b":l!==e(x)}),onClick:Q=>x.value=l},[d("div",{class:E({op30:l!==e(x)}),"font-mono":""},j(l),3)],10,eo)),64)),to]),e(x)==="input"?(t(),C(e(w),{key:0})):e(x)==="json"?(t(),C(e(mt),ot({key:1,modelValue:e(_),"onUpdate:modelValue":p[10]||(p[10]=l=>X(_)?_.value=l: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"])):D("",!0)],64)):(t(),C(e(w),{key:1}))])):D("",!0),e(H)?e(R)?(t(),C(Be,{key:5,"z-10":"","flex-auto":"","backdrop-blur":""},{default:k(()=>[z(" Fetching... ")]),_:1})):(t(),v(U,{key:6},[d("div",oo,[no,e(s).error?(t(),C(de,{key:0,n:"red"},{default:k(()=>[z(" Error ")]),_:1})):D("",!0),m(de,{n:e(s).error?"orange":"green",textContent:j(e(s).statusCode)},null,8,["n","textContent"]),e(s).contentType?(t(),v("code",so,j(e(s).contentType),1)):D("",!0),e(s).contentType==="application/json"?(t(),C(Ae,{key:2,getter:()=>({input:e(a)})},null,8,["getter"])):D("",!0),lo,ao,m(de,{n:"green"},{default:k(()=>[z(j(e(s).fetchTime)+" ms ",1)]),_:1})]),e(i)==="pdf"?(t(),v("div",ro,[d("div",io,[d("object",{data:e(a),type:"application/pdf","flex-auto":"",width:"100%",height:"100%",rounded:""},null,8,uo)])])):e(i)!=="media"?(t(),C(Me,{key:1,"flex-auto":"","overflow-auto":"","py-2":"",code:e(a),lang:e(i)},null,8,["code","lang"])):(t(),v("div",po,[d("div",co,[e(s).contentType.includes("image")?(t(),v("img",{key:0,rounded:"",src:e(a)},null,8,fo)):(t(),v("video",mo,[d("source",{src:e(a),type:"video/mp4"},null,8,vo)]))])]))],64)):(t(),C(qe,{key:4},{default:k(()=>[m(f,{n:"primary",onClick:ye},{default:k(()=>[m(M,{icon:"carbon:send"}),z(" Send request ")]),_:1})]),_:1}))])}}}),yo={flex:"~ gap1","text-sm":""},_o={key:0,op50:""},go={op50:""},bo=d("span",{op75:""},"Select a route to start",-1),ko=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),Oo=ae({__name:"server-routes",setup(r){const y=P(!1),h=st(),o=we(),{selectedRoute:w,view:g,inputDefaults:c}=Ue("serverRoutes"),s=T(()=>{!o.value&&w.value&&(o.value=w.value.filepath);const b=h.value?.find(u=>u.filepath===o.value);return o.value!==w.value?.filepath&&b&&(w.value=b),b}),i=P(""),a=T(()=>new lt(h.value||[],{keys:["method","route"],shouldSort:!0})),R=T(()=>h.value?i.value?a.value.search(i.value).map(u=>u.item):h.value:[]),H=T(()=>{const b=[],u=(S,$)=>{S.routes=S.routes||[],S.routes.push($)};return R.value.forEach(S=>{const $=S.filepath.split("/"),_=$.slice($.indexOf("server")+1);_.length>0&&_[_.length-1].includes(".")&&_.pop();let V=null;if(_.forEach(q=>{const O=V?V.routes?.find(B=>B.route===q):b.find(B=>B.route===q);if(O)V=O;else{const B={route:q,filepath:q.replace(/\W/g,"-").toLowerCase(),type:"collection",routes:[]};V?u(V,B):b.push(B),V=B}}),S.type==="runtime"){const q=b.find(O=>O.route==="runtime");if(q)u(q,S);else{const O={route:"runtime",filepath:"runtime",type:"collection",routes:[S]};b.push(O)}}else V?u(V,S):b.push(S)}),b});function F(){g.value=g.value==="tree"?"list":"tree"}function J(b){return b.charAt(0).toUpperCase()+b.slice(1)}return(b,u)=>{const S=fe,$=ut,_=Ne,V=ho,q=it,O=Te,B=at,re=De,te=vt,L=ht,Y=Se("tooltip");return t(),v(U,null,[m(B,{"storage-key":"tab-server-routes"},{left:k(()=>[m($,{search:e(i),"onUpdate:search":u[1]||(u[1]=x=>X(i)?i.value=x:null),pb2:""},{actions:k(()=>[le(m(S,{"text-lg":"",icon:e(g)==="list"?"i-carbon-list":"i-carbon-tree-view-alt",title:"Toggle view",border:!1,onClick:F},null,8,["icon"]),[[Y,"Toggle View"]]),le(m(S,{"text-lg":"",icon:"i-carbon-cics-sit-overrides",title:"Default Inputs",border:!1,onClick:u[0]||(u[0]=x=>y.value=!e(y))},null,512),[[Y,"Default Inputs"]])]),default:k(()=>[d("div",yo,[e(i)?(t(),v("span",_o,j(e(R).length)+" matched · ",1)):D("",!0),d("span",go,j(e(h)?.length)+" routes in total",1)])]),_:1},8,["search"]),(t(!0),v(U,null,A(e(g)==="tree"?e(H):e(R),x=>(t(),C(_,{key:x.filepath,item:x},null,8,["item"]))),128))]),right:k(()=>[(t(),C(rt,{max:10},[e(s)?(t(),C(V,{key:e(s).filepath,route:e(s),onOpenDefaultInput:u[2]||(u[2]=x=>y.value=!0)},null,8,["route"])):D("",!0)],1024)),e(s)?D("",!0):(t(),C(O,{key:0},{default:k(()=>[m(q,{px6:"",py2:""},{default:k(()=>[bo]),_:1})]),_:1}))]),_:1}),m(L,{modelValue:e(y),"onUpdate:modelValue":u[3]||(u[3]=x=>X(y)?y.value=x:null),"auto-close":"","max-w-xl":"","min-w-xl":"",onClose:u[4]||(u[4]=x=>y.value=!1)},{default:k(()=>[d("div",null,[ko,(t(!0),v(U,null,A(Object.keys(e(c)),x=>(t(),C(te,{key:x,text:`${J(x)} ${e(c)[x].length?`(${e(c)[x].length})`:""}`,padding:!1,icon:("ServerRouteTabIcons"in b?b.ServerRouteTabIcons:e(Ie))[x]},{default:k(()=>[m(re,{modelValue:e(c)[x],"onUpdate:modelValue":K=>e(c)[x]=K,py0:"",default:{type:"string"}},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["text","icon"]))),128))])]),_:1},8,["modelValue"])],64)}}});export{Oo as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{_ as K}from"./NIconTitle.vue.bf8093eb.js";import{_ as Q}from"./NSwitch.vue.de333089.js";import{d as W,aq as X,bC as Y,az as Z,av as P,m as p,i as o,k as e,F as v,n as U,f as t,j as a,ak as ee,o as r,h as j,t as h,G as A,p as F,v as z,l as c,C as B,B as le,bw as ne,_ as oe,bD as te}from"./entry.e01776ec.js";import{_ as ae}from"./NSelect.vue.4c22d30e.js";import{_ as se}from"./NCheckbox.vue.6fb2ece1.js";const ie={px8:"",py6:""},de={grid:"~ md:cols-2 gap-x-10 gap-y-3","max-w-300":""},ue={flex:"~ col gap-2"},re=e("h3",{"text-lg":""}," Tabs ",-1),ce={flex:"~ gap-2","flex-auto":"","items-center":"","justify-start":""},pe={capitalize:"",op75:""},me=e("div",{"mx--1":"",my1:"","h-1px":"",border:"b base",op75:""},null,-1),_e=e("div",{"flex-auto":""},null,-1),fe={flex:"~ col gap-2"},ve=e("h3",{"text-lg":""}," Appearance ",-1),ge=e("div",{"i-carbon-sun":"","dark:i-carbon-moon":"","translate-y--1px":""},null,-1),xe=e("div",{"mx--2":"",my1:"","h-1px":"",border:"b base",op75:""},null,-1),be=e("p",null,"UI Scale",-1),he=["value"],ye=e("div",{"mx--2":"",my1:"","h-1px":"",border:"b base",op75:""},null,-1),Ve=e("span",null," Expand Sidebar ",-1),ke=e("span",null," Scrollable Sidebar ",-1),Ce=e("h3",{mt2:"","text-lg":""}," Features ",-1),Te=e("span",null,"Close DevTools when clicking outside",-1),we=e("span",null,"Show help buttons",-1),Se=e("span",null,"Always show the floating panel",-1),Ue=e("div",{"mx--2":"",my1:"","h-1px":"",border:"b base",op75:""},null,-1),Ne=e("p",null,"Minimize floating panel on inactive",-1),Oe=["value"],$e=e("h3",{mt2:"","text-lg":""}," Feedback ",-1),Ie=e("span",null,"Send anonymous statistics, help us improving DevTools",-1),ze=e("div",{"mx--2":"",my1:"","h-1px":"",border:"b base",op75:""},null,-1),Be={flex:"~ gap-2"},De=e("div",{"i-carbon-data-enrichment":""},null,-1),Ee=e("div",{"i-carbon-debug":""},null,-1),He=W({__name:"settings",setup(Pe){const{interactionCloseOnOutsideClick:y,showPanel:N,showHelpButtons:O,scale:$,hiddenTabs:g,pinnedTabs:i,hiddenTabCategories:x,minimizePanelInactive:V,sidebarExpanded:k,sidebarScrollable:I}=le(),C=X(),M=[["Tiny",12/15],["Small",14/15],["Normal",1],["Large",16/15],["Huge",18/15]],L=[["Always",0],["1s",1e3],["2s",2e3],["5s",5e3],["10s",1e4],["Never",-1]],H=Y(Z());function R(d,n){n?g.value=g.value.filter(u=>u!==d):g.value.push(d)}function q(d,n){n?x.value=x.value.filter(u=>u!==d):x.value.push(d)}function G(d){i.value.includes(d)?i.value=i.value.filter(n=>n!==d):i.value.push(d)}function D(d,n){const u=i.value.indexOf(d);if(u===-1)return;const m=u+n;if(m<0||m>=i.value.length)return;const b=[...i.value];b.splice(u,1),b.splice(m,0,d),i.value=b}return P(()=>{C.value&&(C.value.app.frameState.value.closeOnOutsideClick=y.value)}),P(()=>{C.value&&(C.value.app.frameState.value.minimizePanelInactive=V.value)}),(d,n)=>{const u=K,m=Q,b=ne,_=oe,T=ee,J=te,E=ae,f=se;return r(),p("div",ie,[o(u,{class:"mb-5 text-xl op75",icon:"i-carbon-settings-adjust",text:"DevTools Settings"}),e("div",de,[e("div",ue,[re,(r(!0),p(v,null,U(t(H),([l,w])=>(r(),p(v,{key:l},[w.length?(r(),j(T,{key:0,p3:"",flex:"~ col gap-1",class:A(t(x).includes(l)?"op50 grayscale":"")},{default:a(()=>[o(m,{flex:"~ row-reverse",py1:"",pl2:"",pr1:"","n-lime":"","model-value":!t(x).includes(l),"onUpdate:modelValue":s=>q(l,s)},{default:a(()=>[e("div",ce,[e("span",pe,h(l),1)])]),_:2},1032,["model-value","onUpdate:modelValue"]),me,(r(!0),p(v,null,U(w,s=>(r(),j(m,{key:s.name,flex:"~ row-reverse",py1:"",pl2:"",pr1:"","n-primary":"","model-value":!t(g).includes(s.name),"onUpdate:modelValue":S=>R(s.name,S)},{default:a(()=>[e("div",{flex:"~ gap-2","flex-auto":"","items-center":"","justify-start":"","pr-4":"",class:A(t(g).includes(s.name)?"op25":"")},[o(b,{"text-xl":"",icon:s.icon,title:s.title},null,8,["icon","title"]),e("span",null,h(s.title),1),_e,t(i).includes(s.name)?(r(),p(v,{key:0},[o(_,{icon:"i-carbon-caret-up",disabled:t(i).indexOf(s.name)===0,border:!1,onClick:S=>D(s.name,-1)},null,8,["disabled","onClick"]),o(_,{icon:"i-carbon-caret-down",disabled:t(i).indexOf(s.name)===t(i).length-1,border:!1,onClick:S=>D(s.name,1)},null,8,["disabled","onClick"])],64)):F("",!0),o(_,{icon:t(i).includes(s.name)?" i-carbon-pin-filled rotate--45":" i-carbon-pin op50",border:!1,onClick:S=>G(s.name)},null,8,["icon","onClick"])],2)]),_:2},1032,["model-value","onUpdate:modelValue"]))),128))]),_:2},1032,["class"])):F("",!0)],64))),128))]),e("div",fe,[ve,o(T,{p4:"",flex:"~ col gap-2"},{default:a(()=>[e("div",null,[o(J,null,{default:a(({toggle:l,isDark:w})=>[o(_,{n:"primary",onClick:l},{default:a(()=>[ge,z(" "+h(w.value?"Dark":"Light"),1)]),_:2},1032,["onClick"])]),_:1})]),xe,be,o(E,{modelValue:t($),"onUpdate:modelValue":n[0]||(n[0]=l=>c($)?$.value=l:null),n:"primary"},{default:a(()=>[(r(),p(v,null,U(M,l=>e("option",{key:l[0],value:l[1]},h(l[0]),9,he)),64))]),_:1},8,["modelValue"]),ye,o(f,{modelValue:t(k),"onUpdate:modelValue":n[1]||(n[1]=l=>c(k)?k.value=l:null),"n-primary":""},{default:a(()=>[Ve]),_:1},8,["modelValue"]),o(f,{modelValue:t(I),"onUpdate:modelValue":n[2]||(n[2]=l=>c(I)?I.value=l:null),disabled:t(k),"n-primary":""},{default:a(()=>[ke]),_:1},8,["modelValue","disabled"])]),_:1}),Ce,o(T,{p4:"",flex:"~ col gap-2"},{default:a(()=>[o(f,{modelValue:t(y),"onUpdate:modelValue":n[3]||(n[3]=l=>c(y)?y.value=l:null),"n-primary":""},{default:a(()=>[Te]),_:1},8,["modelValue"]),o(f,{modelValue:t(O),"onUpdate:modelValue":n[4]||(n[4]=l=>c(O)?O.value=l:null),"n-primary":""},{default:a(()=>[we]),_:1},8,["modelValue"]),o(f,{modelValue:t(N),"onUpdate:modelValue":n[5]||(n[5]=l=>c(N)?N.value=l:null),"n-primary":""},{default:a(()=>[Se]),_:1},8,["modelValue"]),Ue,Ne,o(E,{modelValue:t(V),"onUpdate:modelValue":n[6]||(n[6]=l=>c(V)?V.value=l:null),modelModifiers:{number:!0},"n-primary":""},{default:a(()=>[(r(),p(v,null,U(L,l=>e("option",{key:l[0],value:l[1]},h(l[0]),9,Oe)),64))]),_:1},8,["modelValue"])]),_:1}),$e,o(T,{p4:"",flex:"~ col gap-2"},{default:a(()=>[o(f,{modelValue:t(B),"onUpdate:modelValue":n[7]||(n[7]=l=>c(B)?B.value=l:null),"n-primary":""},{default:a(()=>[Ie]),_:1},8,["modelValue"]),ze,e("div",Be,[o(_,{n:"blue",to:"https://github.com/nuxt/devtools/discussions/29",target:"_blank"},{default:a(()=>[De,z(" Ideas & Suggestions ")]),_:1}),o(_,{n:"orange",to:"https://github.com/nuxt/devtools/issues",target:"_blank"},{default:a(()=>[Ee,z(" Bug Reports ")]),_:1})])]),_:1})])])])}}});export{He as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{_ as F}from"./NBadge.98d5d309.js";import{_ as L}from"./NCodeBlock.vue.adf1e9b4.js";import{_ as W}from"./NCheckbox.vue.6fb2ece1.js";import{_ as A}from"./NTip.vue.770a171a.js";import{d as E,O as G,b3 as O,r as V,b4 as Q,M as q,Q as z,o as m,m as g,a6 as H,f as t,t as $,p as w,F as M,i as s,h as J,j as u,k as h,l as B,v as p,_ as K,W as X,b5 as Y,a8 as Z,a as ee,an as te,ao as ae,b6 as se,b2 as ne}from"./entry.e01776ec.js";const oe={key:0},le={p4:"",flex:"~ col gap-1"},re={class:"text-lg font-medium leading-6"},ue=h("p",{op50:""}," The following command will be executed in your terminal: ",-1),ie={flex:"~ gap-3",mt2:"","justify-end":""},ve=E({__name:"NpmVersionCheck",props:{packageName:{},options:{},showVersion:{type:Boolean,default:!0}},setup(l){const a=l,e=G(),{info:n,update:i,state:y,processId:k,restart:c}=O(a.packageName,a.options),f=V(!0),_=V(!0),U=Q(),b=q(),R=z();async function C(){const r=await i(async o=>b.start(o));r&&_.value&&U.value.push({id:r,message:`${a.packageName} has been updated. Do you want to restart the Nuxt server now?`}),r&&f.value&&(R.value=r,e.push("/modules/terminals"))}return(r,o)=>{const N=F,S=L,x=W,T=A,P=K,j=X;return m(),g(M,null,[H(r.$slots,"default",{id:t(k),info:t(n),update:C,state:t(y),restart:t(c)},()=>[t(n)&&r.showVersion?(m(),g("code",oe,$(`v${t(n).current}`),1)):w("",!0),t(n)?.latest?(m(),g(M,{key:1},[t(n).needsUpdate?(m(),g("button",{key:0,onClick:o[0]||(o[0]=v=>C())},[s(N,{n:"green",title:"updates available",textContent:"updates available"})])):(m(),J(N,{key:1,n:"gray",title:"latest",textContent:"latest"}))],64)):w("",!0)]),s(t(b),null,{default:u(({resolve:v,args:I})=>[s(j,{"model-value":!0,onClose:d=>v(!1)},{default:u(()=>[h("div",le,[h("h3",re," Update "+$(a.packageName)+"? ",1),ue,s(S,{code:I[0],lang:"bash",my3:"",px4:"",py2:"",border:"~ base rounded",lines:!1},null,8,["code"]),s(x,{modelValue:t(f),"onUpdate:modelValue":o[1]||(o[1]=d=>B(f)?f.value=d:null),n:"primary"},{default:u(()=>[p(" Navigate to terminal ")]),_:1},8,["modelValue"]),s(x,{modelValue:t(_),"onUpdate:modelValue":o[2]||(o[2]=d=>B(_)?_.value=d:null),n:"primary"},{default:u(()=>[p(" Restart Nuxt server after update ")]),_:1},8,["modelValue"]),h("div",ie,[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:d=>v(!1)},{default:u(()=>[p(" Cancel ")]),_:2},1032,["onClick"]),s(P,{n:"solid primary",onClick:d=>v(!0)},{default:u(()=>[p(" Update ")]),_:2},1032,["onClick"])])])]),_:2},1032,["onClose"])]),_:1})],64)}}}),D=["pages","meta","components","imports","nuxt-config-schema","@nuxt/devtools","@nuxt/telemetry"];function de(){return ne("getModulesList",async()=>(await $fetch("https://cdn.jsdelivr.net/npm/@nuxt/modules@latest/modules.json")).filter(a=>!D.includes(a.npm)&&a.compatibility.nuxt.includes("^3")))}function ge(){return Y("installed-modules",()=>{const l=Z(),a=de();return ee(()=>(l.value?._installedModules||[]).map(e=>{if(!e.entryPath)return;const n=e.entryPath&&te(e.entryPath),i=e.meta?.name?e.meta?.name:e.entryPath?n?ae(e.entryPath):l.value?.rootDir?se(e.entryPath,l.value?.rootDir).path:void 0:void 0,y=l.value?.modules?.includes(i),k=a.value?.find(c=>c.npm===i)||a.value?.find(c=>c.name===i);return{name:i,isPackageModule:n,isUninstallable:y,info:k,...e}}).filter(e=>e&&(!e.name||!D.includes(e.name))))})}export{ve as _,de as a,ge as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{_ as O}from"./NCodeBlock.vue.adf1e9b4.js";import{d as B,bm as N,e as R,av as D,o as n,m as a,k as c,F as f,n as V,G as _,f as o,t as $,i as m,j as b,v,h as E,p as i,_ as F,r as k,K as r,bn as h,bo as y}from"./entry.e01776ec.js";const T={key:0,relative:"","n-code-block":""},W={flex:"~ wrap","w-full":""},j=["onClick"],z=c("div",{border:"b base","flex-auto":""},null,-1),G={flex:"~ gap-2",px3:"",pb3:"",n:"sm primary"},J=B({__name:"CodeSnippets",props:{codeSnippets:{}},setup(s){const p=s,e=N(p.codeSnippets[0]),w=R();return D(()=>{p.codeSnippets.includes(e.value)||(e.value=p.codeSnippets[0])}),(l,d)=>{const x=O,u=F;return l.codeSnippets.length?(n(),a("div",T,[c("div",W,[(n(!0),a(f,null,V(l.codeSnippets,(t,S)=>(n(),a("button",{key:S,px4:"",py2:"",border:"r base",hover:"bg-active",class:_(t===o(e)?"":"border-b"),onClick:A=>e.value=t},[c("div",{class:_(t===o(e)?"":"op30"),"font-mono":""},$(t.name),3)],10,j))),128)),z]),o(e)?(n(),a(f,{key:0},[m(x,{code:o(e).code,lang:o(e).lang,lines:!1,"w-full":"","of-auto":"",p3:""},null,8,["code","lang"]),c("div",G,[m(u,{icon:"carbon-copy",onClick:d[0]||(d[0]=t=>o(w)(o(e).code))},{default:b(()=>[v(" Copy ")]),_:1}),o(e)?.docs?(n(),E(u,{key:0,to:o(e).docs,target:"_blank",icon:"carbon-catalog"},{default:b(()=>[v(" Docs ")]),_:1},8,["to"])):i("",!0)])],64)):i("",!0)])):i("",!0)}}}),g=k(await r.getOptions("assets")),K=h(g);y(g,async s=>{r.updateOptions("assets",s)},{deep:!0,flush:"post",debounce:500,maxWait:1e3});const C=k(await r.getOptions("serverRoutes")),L=h(C);y(C,async s=>{r.updateOptions("serverRoutes",s)},{deep:!0,flush:"post",debounce:500,maxWait:1e3});const q={serverRoutes:L,assets:K};function M(s){return q[s]}export{J as _,M as u};
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import{d as w,a as T,aD as W,o as t,m as i,k as s,a4 as N,f as a,t as k,a9 as j,F as h,n as E,h as b,r as B,w as U,au as Y,X as V,bt as q,p as x,i as m,G as O,q as K,e as X,al as R,j as g,ap as Z,v as F,_ as z,a8 as P,aF as Q,aq as ee,aT as se,bu as ne,M as te,a7 as oe,A as ae,K as G,W as le}from"./entry.e01776ec.js";import{_ as M}from"./DurationDisplay.vue.c49b4e64.js";import{_ as H}from"./NBadge.98d5d309.js";import{_ as ie}from"./ComposableItem.vue.136c5104.js";import{U as re}from"./json-editor-vue.b22bf91c.js";import{_ as ce}from"./FilepathItem.vue.5af0b5df.js";import{_ as pe}from"./NDrawer.vue.8e620517.js";import{_ as de}from"./LaunchPage.vue.805f9595.js";import{_ as ue}from"./NLink.vue.0e98999b.js";import{_ as me}from"./CodeDiff.vue.3beaa134.js";import{_ as ke}from"./HelpFab.vue.98c902f4.js";import"./NMarkdown.vue.b0e8b2fc.js";import"./client.3f2665f1.js";import"./constants.4e5eba24.js";import"./NCodeBlock.vue.adf1e9b4.js";const _e=w({__name:"TimelineItemFunction",props:{item:{}},setup(_){const p=_,c=T(()=>W(p.item.name,50,60,"_op_")),e=T(()=>c.value.replace(/_op_/,"1")),o=T(()=>W(p.item.name,50,40)),r=T(()=>c.value.replace(/_op_/,"0.2"));return(d,n)=>(t(),i("button",{class:"group",style:N({color:a(e),borderLeft:`2px solid ${a(e)}`}),relative:"","text-sm":"",transition:"","hover:z-1000":"","bg-base":""},[s("div",{style:N({backgroundColor:a(r)}),absolute:"","bottom-0":"","left--1px":"","top-0":"","w-full":"","text-sm":"","transition-all":"","duration-300":""},null,4),s("div",{style:N({color:a(o),"--c":a(e)}),border:"r-2 t-2 y-2 transparent","min-w-max":"",px1:"","text-left":"","group-hover":"border-$c"},k(d.item.name),5)],4))}}),he={relative:"","h-full":""},fe={absolute:"","left-2":"","top-2.3em":"","text-xs":"",op50:""},ye=w({__name:"TimelineSegment",props:{segment:{}},emits:["select"],setup(_,{emit:p}){const c=_,e=j(()=>c.segment.start,{updateInterval:1e3,showSecond:!0,messages:{justNow:"",past:o=>o,future:o=>o,invalid:"-",second:o=>o?`${o}s`:"",minute:o=>`${o}m`,hour:o=>`${o}h`,week:o=>`${o}w`,day:o=>`${o}d`,month:o=>`${o}mo`,year:o=>`${o}y`}});return(o,r)=>{const d=_e;return t(),i("div",he,[s("button",{absolute:"","left-0":"","right-0":"","top-0":"","bg-green:5":"",px2:"",py1:"","text-left":"","text-xs":"","font-mono":"","text-green6":"",onClick:r[0]||(r[0]=n=>o.segment.route?p("select",o.segment.route):void 0)},k(o.segment.route?.event.to),1),s("div",fe,k(a(e))+" ago ",1),s("div",null,[(t(!0),i(h,null,E(o.segment.functions,(n,l)=>(t(),b(d,{key:l,item:n.event,style:N({position:"absolute",minWidth:`${n.relativeWidth*100}%`,maxWidth:`${n.relativeWidth*100}%`,top:`${4+n.layer*1.6}em`,left:`${n.relativeStart*100}%`}),onClick:u=>p("select",n)},null,8,["item","style","onClick"]))),128))])])}}}),ve=3e3,be=50;function ge(_){const p=[];let c={start:0,end:0,events:[],functions:[],duration:0};for(const e of _){const o=e.end||e.start;(e.start-c.end>ve||e.type==="route")&&(c={start:e.start,end:o,events:[],functions:[],duration:0},p.push(c)),c.events.push(e),c.end=o+be}return p.forEach((e,o)=>{const r=e.end-e.start,d=[];e.duration=r,e.previousGap=o>0?e.start-p[o-1].end:0,e.events.forEach(n=>{const l=n.end||n.start;let u=0;n.type!=="route"&&(u=d.findIndex($=>$<=n.start),u===-1?(u=d.length,d.push(l+1e3)):d[u]=l+1e3);const f={event:n,segment:e,relativeStart:(n.start-e.start)/r,relativeWidth:(l-n.start)/r,layer:u};n.type==="function"?e.functions.push(f):e.route=f})}),p}const xe={relative:""},$e={key:0,border:"x base","h-full":"","flex-inline":"","bg-true-gray-1":"",py15:"","text-xs":"","write-vertical-left":"",op50:"","dark:bg-true-gray-9":""},Ae=w({__name:"TimelineTable",props:{data:{}},emits:["select"],setup(_,{emit:p}){const c=_,e=B(),o=B(),r=B(),d=B(),n=B(!0),l=B(1.5),u=T(()=>ge(c.data.events)),f=T(()=>(c.data.events.length,e.value?.scrollWidth||window.innerWidth));function $(){d.value&&(d.value.style.width=`${f.value}px`)}function I(){n.value&&e.value&&(e.value.scrollTo({left:e.value.scrollWidth-e.value.clientWidth,behavior:"smooth"}),r.value.scrollTo({left:e.value.scrollWidth-e.value.clientWidth,behavior:"smooth"}))}return U(()=>c.data.events.length,async()=>{await Y(),$(),I()},{flush:"post"}),V(e,"scroll",()=>{r.value.scrollLeft!==e.value.scrollLeft&&($(),r.value.scrollLeft=e.value.scrollLeft,n.value=e.value.scrollLeft>=e.value.scrollWidth-e.value.clientWidth)}),V(r,"scroll",()=>{r.value.scrollLeft!==e.value.scrollLeft&&($(),e.value.scrollLeft=r.value.scrollLeft)}),V(e,"wheel",A=>{A.altKey?(l.value=q(l.value+A.deltaY/200,.5,3),$()):e.value.scrollLeft+=A.deltaY}),(A,S)=>{const D=M,y=ye;return t(),i(h,null,[s("div",xe,[s("div",{ref_key:"minimap",ref:o,border:"t b base",relative:"","h-50px":"","ws-nowrap":"","border-base":""},[(t(!0),i(h,null,E(a(u),(v,L)=>(t(),i("div",{key:L,relative:"","h-full":"","flex-inline":"",style:N({width:`${Math.max(100,v.duration/10)/a(f)*100}%`})},[(t(!0),i(h,null,E(v.functions,(C,J)=>(t(),i("div",{key:J,"h-3px":"",rounded:"",style:N({width:`max(${C.relativeWidth*100}%, 10px)`,position:"absolute",top:`${C.layer*4}px`,left:`${C.relativeStart*100}%`,backgroundColor:("getHashColorFromString"in A?A.getHashColorFromString:a(W))(C.event.name,50,60)})},null,4))),128)),v.route?(t(),i("div",{key:0,absolute:"","top-0":"","h-full":"","w-px":"","border-l":"","border-green6":"",op10:"",style:N({left:`${v.route.relativeStart*100}%`})},null,4)):x("",!0)],4))),128))],512),s("div",{ref_key:"minimapScroller",ref:r,class:"timeline-scroller",absolute:"","inset-0":"","h-full":"","w-full":"","of-x-scroll":""},[s("div",{ref_key:"minimapScrollerInner",ref:d,"h-1px":""},null,512)],512)]),s("div",{ref_key:"scroller",ref:e,relative:"","h-full":"","w-full":"","of-x-scroll":"","of-y-hidden":"","ws-nowrap":"","n-panel-grids":""},[(t(!0),i(h,null,E(a(u),(v,L)=>(t(),i(h,{key:L},[v.previousGap&&v.previousGap>=200?(t(),i("div",$e,[m(D,{op50:"",duration:v.previousGap,color:!1},null,8,["duration"])])):x("",!0),m(y,{"flex-inline":"","of-x-hidden":"","hover:of-x-visible":"","bg-base":"",class:O(L===a(u).length-1?"border-r border-base":""),segment:v,style:N({width:`${Math.max(50,v.duration/10)*a(l)}px`}),onSelect:S[0]||(S[0]=C=>p("select",C))},null,8,["class","segment","style"])],64))),128))],512)],64)}}});const De=K(Ae,[["__scopeId","data-v-a2c475c0"]]),Ce={border:"t base",flex:"~ col","h-full":"","of-y-auto":"","text-sm":""},Be=["onClick"],we=s("div",{"i-carbon-function":"",op50:""},null,-1),Te={flex:"~","font-mono":""},Ne=s("div",{op30:""}," ( ",-1),Se={key:0,mr2:"",op30:""},Fe={op75:""},Ee=s("div",{op30:""}," ) ",-1),Ie=s("div",{"mr-1":"","h-7":"","w-7":"",flex:"","rounded-lg":"","bg-primary:5":"",p1:"","text-green6":""},[s("div",{"i-carbon-direction-rotary-right":"",ma:"","text-lg":""})],-1),Le={flex:"~ col items-start"},We={"text-xs":"","font-mono":"",op30:""},Me={"font-bold":"","font-mono":"","text-green":""},Ve=s("div",{"flex-auto":""},null,-1),je=s("div",{"min-h-100":""},null,-1),Oe=w({__name:"TimelineList",props:{data:{}},emits:["select"],setup(_,{emit:p}){return(c,e)=>{const o=M;return t(),i("div",Ce,[(t(!0),i(h,null,E(c.data.events,(r,d)=>(t(),i("button",{key:d,border:"b base",px3:"",py2:"",flex:"~ items-center gap-2",hover:"bg-active",onClick:n=>p("select",r)},[r.type==="function"?(t(),i(h,{key:0},[we,s("div",{"font-mono":"",style:N({color:r.type==="function"?("getHashColorFromString"in c?c.getHashColorFromString:a(W))(r.name,50,60):""})},k(r.name),5),s("div",Te,[Ne,(t(!0),i(h,null,E(r.args,(n,l)=>(t(),i(h,{key:l},[d?(t(),i("div",Se," , ")):x("",!0),s("div",Fe,k(n===null?"null":n===void 0?"undefined":typeof n=="function"?"[function]":Array.isArray(n)?"[Array]":typeof n=="object"?"[object]":JSON.stringify(n)),1)],64))),128)),Ee])],64)):(t(),i(h,{key:1},[Ie,s("div",Le,[s("div",We,k(r.from),1),s("div",Me,k(r.to),1)])],64)),Ve,r.end?(t(),b(o,{key:2,duration:r.end-r.start,color:r.type==="function"},null,8,["duration","color"])):x("",!0)],8,Be))),128)),je])}}}),ze={key:0,"text-blue":""},Ge={key:1,"text-purple":""},Re={key:2,"text-green":""},Pe={key:3,"text-gray":""},He={key:4,"text-gray":""},Je={key:5,"text-gray":""},Ue={key:0,"bg-red:10":"",px2:"",py1:"","text-red":""},Ye={key:1},qe={p2:"","text-sm":"",border:"t base"},Ke=w({__name:"TimelineArgumentView",props:{value:{}},setup(_){const p=_,c=B(),e=B();function o(){try{c.value=JSON.parse(JSON.stringify(p.value))}catch(n){console.error(n),e.value=n}}const r=w({emits:["setup"],setup(n,{emit:l}){return l("setup"),()=>null}}),d=X();return(n,l)=>{const u=z,f=R("VMenu");return typeof n.value=="string"?(t(),i("div",ze,k(JSON.stringify(n.value)),1)):typeof n.value=="number"?(t(),i("div",Ge,k(n.value),1)):typeof n.value=="boolean"?(t(),i("div",Re,k(n.value),1)):typeof n.value>"u"?(t(),i("div",Pe," undefined ")):typeof n.value=="function"?(t(),i("div",He," [Function"+k(n.value.name?`: ${n.value.name}`:"")+"] ",1)):n.value===null?(t(),i("div",Je," null ")):(t(),b(f,{key:6,placement:"top"},{popper:g(()=>[m(a(r),{onSetup:o}),a(e)?(t(),i("div",Ue," Failed to display object: "+k(a(e)),1)):a(c)?(t(),i("div",Ye,[m(a(re),Z({"model-value":a(c)},n.$attrs,{class:["json-editor-vue",[n.$colorMode.value==="dark"?"jse-theme-dark":""]],"main-menu-bar":!1,"navigation-bar":!1,"status-bar":!1,"read-only":!0,indentation:2,"tab-size":2}),null,16,["model-value","class"]),s("div",qe,[m(u,{title:"Copy to clipboard",icon:"carbon-copy",onClick:l[0]||(l[0]=$=>a(d)(JSON.stringify(a(c),null,2)))},{default:g(()=>[F(" Copy ")]),_:1})])])):x("",!0)]),default:g(()=>[s("span",{"rounded-sm":"",px1:"","py0.5":"","text-sm":"",class:O([Array.isArray(n.value)?"text-amber bg-amber:10":"text-orange bg-orange:10"])},k(Array.isArray(n.value)?`[Array(${n.value.length})]`:"[Object]"),3)]),_:1}))}}}),Xe={key:0,"p-4":"",flex:"~ col gap-2","text-base":""},Ze={"mx--1":""},Qe={flex:"~ gap-1","font-mono":""},es={key:1},ss=s("span",{ml1:"",op30:""},"(",-1),ns={key:0,op30:""},ts=s("span",{op30:""},")",-1),os={flex:"~ gap-1","text-sm":""},as=s("span",{mx1:"",op50:""},"·",-1),ls={class:"text-sm text-gray-400"},is={key:0,class:"text-xs text-gray-400",mt2:"",grid:"~ cols-[max-content_1fr] gap-x-4","font-mono":""},rs={"text-right":""},cs={"ws-nowrap":""},ps=w({__name:"TimelineDetailsFunction",props:{record:{}},setup(_){const p=_,c=P(),e=j(()=>p.record.start,{showSecond:!0});function o(l){let u=new URL(l).pathname;return u.startsWith("/_nuxt/")&&(u=u.slice(6)),u.startsWith("/@id/virtual:nuxt:")?`#build/${u.split("/.nuxt/")[1]}`.replace(/\.m?js$/,""):u.includes("/@fs/")?`/${u.split("/@fs/")[1]}`:(c.value?.rootDir||"")+u}const r=Q(),d=T(()=>r.value?.metadata),n=T(()=>r.value?.imports.find(l=>l.as===p.record.name));return(l,u)=>{const f=H,$=ie,I=Ke,A=M,S=ce;return l.record?(t(),i("div",Xe,[s("div",Ze,[m(f,{n:"yellow",textContent:"Function call"})]),s("div",Qe,[a(n)?(t(),b($,{key:0,item:a(n),metadata:a(d),counter:!1,classes:"px2 py1","mx--2":""},null,8,["item","metadata"])):(t(),i("span",es,k(l.record.name),1)),ss,(t(!0),i(h,null,E(l.record.args,(D,y)=>(t(),i(h,{key:y},[y?(t(),i("span",ns,", ")):x("",!0),m(I,{value:D},null,8,["value"])],64))),128)),ts]),s("div",os,[l.record.end?(t(),b(A,{key:0,duration:l.record.end-l.record.start},null,8,["duration"])):x("",!0),as,s("div",ls,k(a(e)),1)]),l.record.stacktrace?(t(),i("div",is,[(t(!0),i(h,null,E(l.record.stacktrace,(D,y)=>(t(),i(h,{key:y},[s("div",rs,k(D.functionName||"(anonymous)"),1),s("div",cs,[D.fileName?(t(),b(S,{key:0,filepath:`${o(D.fileName)}:${D.lineNumber}:${D.columnNumber}`,subpath:""},null,8,["filepath"])):x("",!0)])],64))),128))])):x("",!0)])):x("",!0)}}}),ds={key:0,"p-4":"",flex:"~ col gap-2"},us={"mx--1":""},ms={flex:"~ gap-1 items-center","font-mono":""},ks={op50:""},_s=s("span",{"i-carbon-arrow-right":"",op50:""},null,-1),hs={flex:"~ gap-1","text-sm":""},fs=s("span",{mx1:"",op50:""},"·",-1),ys={class:"text-sm text-gray-400"},vs=w({__name:"TimelineDetailsRoute",props:{record:{}},setup(_){const p=_,c=j(()=>p.record.start,{showSecond:!0});return(e,o)=>{const r=H,d=M;return e.record?(t(),i("div",ds,[s("div",us,[m(r,{n:"green",textContent:"Route Change"})]),s("div",ms,[s("span",ks,k(e.record.from),1),_s,s("span",null,k(e.record.to),1)]),s("div",hs,[e.record.end?(t(),b(d,{key:0,duration:e.record.end-e.record.start},null,8,["duration"])):x("",!0),fs,s("div",ys,k(a(c)),1)])])):x("",!0)}}}),bs={key:0,"h-screen":"","of-hidden":""},gs={"h-screen":"","w-full":"",flex:"","flex-col":""},xs={"h-10":"",flex:"~ gap-2 items-center justify-end",p2:"",px3:""},$s={"text-sm":""},As=s("div",{"flex-auto":""},null,-1),Ds={"min-h-50":"",px3:"",py2:""},Cs=w({__name:"TimelineView",setup(_){const p=ee(),c=B("table"),e=B(),o=T(()=>p.value?.metrics.clientTimeline());function r(){o.value&&(o.value.events=[])}function d(){c.value=c.value==="table"?"list":"table"}return(n,l)=>{const u=R("VTooltip"),f=z,$=De,I=Oe,A=ps,S=vs,D=pe;return a(o)?(t(),i("div",bs,[s("div",gs,[s("div",xs,[m(u,{flex:""},{popper:g(()=>[s("div",$s,k(a(o).options.enabled?"Recording...":"Paused"),1)]),default:g(()=>[s("div",{"text-lg":"",class:O(a(o).options.enabled?"i-carbon-radio-button-checked text-primary animate-pulse":"i-carbon-pause-outline op30")},null,2)]),_:1}),a(o).options.enabled?(t(),b(f,{key:1,size:"small",ml1:"","text-sm":"",n:"orange",icon:"i-carbon-stop",onClick:l[1]||(l[1]=y=>a(o).options.enabled=!1)},{default:g(()=>[F(" Stop Tracking ")]),_:1})):(t(),b(f,{key:0,size:"small",ml1:"","text-sm":"",n:"primary",icon:"i-carbon-play",onClick:l[0]||(l[0]=y=>a(o).options.enabled=!0)},{default:g(()=>[F(" Start Tracking ")]),_:1})),As,m(f,{icon:a(c)==="table"?"i-carbon-roadmap":"i-carbon-list",class:"ml-2",title:"Toggle View",border:!1,onClick:d},null,8,["icon"]),m(f,{icon:"i-carbon-trash-can","hover-text-red":"",class:"ml-2",border:!1,onClick:r})]),a(c)==="table"?(t(),b($,{key:0,data:{...a(o)},onSelect:l[2]||(l[2]=y=>e.value=y.event)},null,8,["data"])):(t(),b(I,{key:1,data:{...a(o)},onSelect:l[3]||(l[3]=y=>e.value=y)},null,8,["data"]))]),m(D,{"model-value":!!a(e),"auto-close":"",transition:"bottom",left:"#nuxt-devtools-side-nav",onClose:l[4]||(l[4]=y=>e.value=void 0)},{default:g(()=>[s("div",Ds,[a(e)?.type==="function"?(t(),b(A,{key:0,record:a(e)},null,8,["record"])):a(e)?.type==="route"?(t(),b(S,{key:1,record:a(e)},null,8,["record"])):x("",!0)])]),_:1},8,["model-value"])])):x("",!0)}}}),Bs={class:"markdown-body"},ws=s("h1",null,"Timeline",-1),Ts=s("p",null,[s("blockquote",{"text-orange":"","bg-orange:10":"",py1:""}," This is an experimental feature ")],-1),Ns=se(`<p>Timeline tracks your route navigations and functions calls in your Nuxt application. It can be used to debug performance issues and to understand how your application works.</p><h2>Function calls</h2><p>Nuxt DevTools tracks function calls by wrapping them in the build time. It works for functions referenced by auto-imports, or explicit imports through <code>import {} from '#imports'</code>.</p><pre class="shiki shiki-themes vitesse-light vitesse-dark" style="background-color:#ffffff;--shiki-dark-bg:#121212;color:#393a34;--shiki-dark:#dbd7caee;" tabindex="0"><code><span class="line"><span style="color:#999999;--shiki-dark:#666666;"><</span><span style="color:#1E754F;--shiki-dark:#4D9375;">script</span><span style="color:#B07D48;--shiki-dark:#BD976A;"> setup</span><span style="color:#999999;--shiki-dark:#666666;">></span></span>
|
|
2
|
-
<span class="line"><span style="color:#1E754F;--shiki-dark:#4D9375;">import</span><span style="color:#999999;--shiki-dark:#666666;"> {</span><span style="color:#B07D48;--shiki-dark:#BD976A;"> useNuxtApp</span><span style="color:#999999;--shiki-dark:#666666;"> }</span><span style="color:#1E754F;--shiki-dark:#4D9375;"> from</span><span style="color:#B5695999;--shiki-dark:#C98A7D99;"> '</span><span style="color:#B56959;--shiki-dark:#C98A7D;">#imports</span><span style="color:#B5695999;--shiki-dark:#C98A7D99;">'</span></span>
|
|
3
|
-
<span class="line"><span style="color:#1E754F;--shiki-dark:#4D9375;">import</span><span style="color:#999999;--shiki-dark:#666666;"> {</span><span style="color:#B07D48;--shiki-dark:#BD976A;"> useMouse</span><span style="color:#999999;--shiki-dark:#666666;"> }</span><span style="color:#1E754F;--shiki-dark:#4D9375;"> from</span><span style="color:#B5695999;--shiki-dark:#C98A7D99;"> '</span><span style="color:#B56959;--shiki-dark:#C98A7D;">@vueuse/core</span><span style="color:#B5695999;--shiki-dark:#C98A7D99;">'</span></span>
|
|
4
|
-
<span class="line"></span>
|
|
5
|
-
<span class="line"><span style="color:#AB5959;--shiki-dark:#CB7676;">const</span><span style="color:#B07D48;--shiki-dark:#BD976A;"> route</span><span style="color:#999999;--shiki-dark:#666666;"> =</span><span style="color:#59873A;--shiki-dark:#80A665;"> useRoute</span><span style="color:#999999;--shiki-dark:#666666;">()</span><span style="color:#A0ADA0;--shiki-dark:#758575DD;"> // tracked</span></span>
|
|
6
|
-
<span class="line"><span style="color:#AB5959;--shiki-dark:#CB7676;">const</span><span style="color:#B07D48;--shiki-dark:#BD976A;"> app</span><span style="color:#999999;--shiki-dark:#666666;"> =</span><span style="color:#59873A;--shiki-dark:#80A665;"> useNuxtApp</span><span style="color:#999999;--shiki-dark:#666666;">()</span><span style="color:#A0ADA0;--shiki-dark:#758575DD;"> // tracked</span></span>
|
|
7
|
-
<span class="line"></span>
|
|
8
|
-
<span class="line"><span style="color:#A0ADA0;--shiki-dark:#758575DD;">// NOT tracked because it's directly imported</span></span>
|
|
9
|
-
<span class="line"><span style="color:#AB5959;--shiki-dark:#CB7676;">const</span><span style="color:#B07D48;--shiki-dark:#BD976A;"> mouse</span><span style="color:#999999;--shiki-dark:#666666;"> =</span><span style="color:#59873A;--shiki-dark:#80A665;"> useMouse</span><span style="color:#999999;--shiki-dark:#666666;">()</span><span style="color:#393A34;--shiki-dark:#DBD7CAEE;"> </span></span>
|
|
10
|
-
<span class="line"></span></code></pre><p>By default, it tracks Nuxt provided composables as well as user defined functions. You can include/exclude functions by using the <code>include</code> and <code>exclude</code> options in the <code>nuxt.config.js</code> file.</p><pre class="shiki shiki-themes vitesse-light vitesse-dark" style="background-color:#ffffff;--shiki-dark-bg:#121212;color:#393a34;--shiki-dark:#dbd7caee;" tabindex="0"><code><span class="line"><span style="color:#1E754F;--shiki-dark:#4D9375;">export</span><span style="color:#1E754F;--shiki-dark:#4D9375;"> default</span><span style="color:#59873A;--shiki-dark:#80A665;"> defineNuxtConfig</span><span style="color:#999999;--shiki-dark:#666666;">({</span></span>
|
|
11
|
-
<span class="line"><span style="color:#998418;--shiki-dark:#B8A965;"> devtools</span><span style="color:#999999;--shiki-dark:#666666;">:</span><span style="color:#999999;--shiki-dark:#666666;"> {</span></span>
|
|
12
|
-
<span class="line"><span style="color:#998418;--shiki-dark:#B8A965;"> timeline</span><span style="color:#999999;--shiki-dark:#666666;">:</span><span style="color:#999999;--shiki-dark:#666666;"> {</span></span>
|
|
13
|
-
<span class="line"><span style="color:#998418;--shiki-dark:#B8A965;"> functions</span><span style="color:#999999;--shiki-dark:#666666;">:</span><span style="color:#999999;--shiki-dark:#666666;"> {</span></span>
|
|
14
|
-
<span class="line"><span style="color:#998418;--shiki-dark:#B8A965;"> include</span><span style="color:#999999;--shiki-dark:#666666;">:</span><span style="color:#999999;--shiki-dark:#666666;"> [</span></span>
|
|
15
|
-
<span class="line"><span style="color:#A0ADA0;--shiki-dark:#758575DD;"> // track \`useMouse\`</span></span>
|
|
16
|
-
<span class="line"><span style="color:#B5695999;--shiki-dark:#C98A7D99;"> '</span><span style="color:#B56959;--shiki-dark:#C98A7D;">useMouse</span><span style="color:#B5695999;--shiki-dark:#C98A7D99;">'</span><span style="color:#999999;--shiki-dark:#666666;">,</span></span>
|
|
17
|
-
<span class="line"><span style="color:#A0ADA0;--shiki-dark:#758575DD;"> // track all functions starting with \`use\`</span></span>
|
|
18
|
-
<span class="line"><span style="color:#B5695999;--shiki-dark:#C98A7D99;"> /</span><span style="color:#1E754F;--shiki-dark:#4D9375;">^</span><span style="color:#AB5E3F;--shiki-dark:#C4704F;">use</span><span style="color:#999999;--shiki-dark:#666666;">[</span><span style="color:#A65E2B;--shiki-dark:#C99076;">A-Z</span><span style="color:#999999;--shiki-dark:#666666;">]</span><span style="color:#B5695999;--shiki-dark:#C98A7D99;">/</span><span style="color:#999999;--shiki-dark:#666666;">,</span></span>
|
|
19
|
-
<span class="line"><span style="color:#A0ADA0;--shiki-dark:#758575DD;"> // track all functions from @vueuse/core</span></span>
|
|
20
|
-
<span class="line"><span style="color:#B07D48;--shiki-dark:#BD976A;"> entry</span><span style="color:#999999;--shiki-dark:#666666;"> =></span><span style="color:#B07D48;--shiki-dark:#BD976A;"> entry</span><span style="color:#999999;--shiki-dark:#666666;">.</span><span style="color:#B07D48;--shiki-dark:#BD976A;">from</span><span style="color:#AB5959;--shiki-dark:#CB7676;"> ===</span><span style="color:#B5695999;--shiki-dark:#C98A7D99;"> '</span><span style="color:#B56959;--shiki-dark:#C98A7D;">@vueuse/core</span><span style="color:#B5695999;--shiki-dark:#C98A7D99;">'</span><span style="color:#999999;--shiki-dark:#666666;">,</span></span>
|
|
21
|
-
<span class="line"><span style="color:#999999;--shiki-dark:#666666;"> ],</span></span>
|
|
22
|
-
<span class="line"><span style="color:#998418;--shiki-dark:#B8A965;"> exclude</span><span style="color:#999999;--shiki-dark:#666666;">:</span><span style="color:#999999;--shiki-dark:#666666;"> [</span></span>
|
|
23
|
-
<span class="line"><span style="color:#B5695999;--shiki-dark:#C98A7D99;"> '</span><span style="color:#B56959;--shiki-dark:#C98A7D;">useRouter</span><span style="color:#B5695999;--shiki-dark:#C98A7D99;">'</span></span>
|
|
24
|
-
<span class="line"><span style="color:#999999;--shiki-dark:#666666;"> ]</span></span>
|
|
25
|
-
<span class="line"><span style="color:#999999;--shiki-dark:#666666;"> }</span></span>
|
|
26
|
-
<span class="line"><span style="color:#999999;--shiki-dark:#666666;"> }</span></span>
|
|
27
|
-
<span class="line"><span style="color:#999999;--shiki-dark:#666666;"> }</span></span>
|
|
28
|
-
<span class="line"><span style="color:#999999;--shiki-dark:#666666;">})</span></span>
|
|
29
|
-
<span class="line"></span></code></pre>`,6),Ss=[ws,Ts,Ns],Fs={__name:"timeline",setup(_,{expose:p}){return p({frontmatter:{}}),(e,o)=>(t(),i("div",Bs,Ss))}},Es={flex:"~ col gap-2","w-150":"",p4:"",border:"t base"},Is=s("h2",{"text-xl":""},[s("span",{capitalize:""},"Enable Timeline?")],-1),Ls={op50:""},Ws=s("p",null,[s("span",{op50:""},"Then Nuxt will "),s("span",{"text-orange":""},"restart automatically"),F(". ")],-1),Ms={flex:"~ gap-3",mt2:"","justify-end":""},Qs=w({__name:"timeline",setup(_){const p=ne(),c=P(),e=te(),o=oe();async function r(){const[d,n]=await G.enableTimeline(!0);await e.start(d,n)&&await G.enableTimeline(!1)}return(d,n)=>{const l=Cs,u=de,f=ae,$=ue,I=me,A=z,S=le,D=Fs,y=ke;return t(),i(h,null,[a(p)?.timeline?.enabled?(t(),b(l,{key:0})):(t(),i(h,{key:1},[m(f,null,{default:g(()=>[m(u,{icon:"i-carbon-roadmap",title:"Timeline",description:"Timeline enables the inspection of when composable being executed and the route changes.",actions:[{label:"Enable"}],onAction:r})]),_:1}),m(a(e),null,{default:g(({resolve:v,args:L})=>[m(S,{"model-value":!0,onClose:C=>v(!1)},{default:g(()=>[s("div",Es,[Is,s("p",Ls,[F(" Your "),m($,{role:"button",n:"primary",underline:"",onClick:n[0]||(n[0]=C=>a(o)(a(c)?._nuxtConfigFile)),textContent:"Nuxt config"}),F(" will be updated as: ")]),m(I,{from:L[0],to:L[1],"max-h-80":"","of-auto":"",py2:"",border:"~ base rounded",lang:"ts"},null,8,["from","to"]),Ws,s("div",Ms,[m(A,{onClick:C=>v(!1)},{default:g(()=>[F(" Cancel ")]),_:2},1032,["onClick"]),m(A,{n:"solid primary",capitalize:"",onClick:C=>v(!0)},{default:g(()=>[F(" Enable ")]),_:2},1032,["onClick"])])])]),_:2},1032,["onClose"])]),_:1})],64)),m(y,null,{default:g(()=>[m(D)]),_:1})],64)}}});export{Qs as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{_ as D}from"./Navbar.vue.371e4d0a.js";import{_ as S}from"./NCodeBlock.vue.adf1e9b4.js";import{o as c,m as _,k as s,d as B,r as v,bz as j,bA as P,av as z,a as p,ae as A,i as l,j as u,F as f,S as E,f as i,l as G,n as I,t as h,G as R,h as U,ak as W,A as H}from"./entry.e01776ec.js";import{_ as L}from"./HelpFab.vue.98c902f4.js";import"./client.3f2665f1.js";const q={class:"markdown-body"},J=s("h1",null,"Virtual Files",-1),K=s("p",null,"Virtual files are generated on the fly to support the conventions of the framework, and to provide a better developer experience.",-1),M=[J,K],O={__name:"virtual-files",setup(x,{expose:n}){return n({frontmatter:{}}),(d,a)=>(c(),_("div",q,M))}},Q=["onClick"],T=s("div",{"x-divider":""},null,-1),X={key:0,"h-full":"","of-hidden":"",flex:"~ col"},Y={border:"b base","flex-none":"",px4:"",py2:"","text-sm":"",op75:""},Z=s("span",{op75:""},"Select a file to start",-1),re=B({__name:"virtual-files",setup(x){const n=v(""),o=j(),d=P(),a=v();z(()=>{if(!d.value)return;const e=`/_vfs.json/${encodeURIComponent(d.value)}`;fetch(e,{headers:{accept:"application/json"}}).then(t=>t.json()).then(t=>a.value=t.current)});function k(e){if(o.value?.rootDir)return e.startsWith(o.value?.rootDir)?e.slice(o.value.rootDir.length):e}const m=p(()=>o.value?o.value.entries.filter(e=>!e.id.startsWith(`${o.value?.rootDir||""}/.nuxt/`)).sort((e,t)=>e.id.localeCompare(t.id)):[]),y=p(()=>new A(m.value,{keys:["id","path"]})),b=p(()=>n.value?y.value.search(n.value).map(e=>e.item):m.value);return(e,t)=>{const g=D,$=S,C=W,F=H,N=E,V=O,w=L;return c(),_(f,null,[l(N,{class:"virtual-files","storage-key":"tab-virtual-files"},{left:u(()=>[l(g,{search:i(n),"onUpdate:search":t[0]||(t[0]=r=>G(n)?n.value=r:null),"no-padding":"",p3:""},null,8,["search"]),(c(!0),_(f,null,I(i(b),r=>(c(),_(f,{key:r.id},[s("button",{block:"","w-full":"","select-none":"",truncate:"",px2:"",py1:"","text-start":"","text-sm":"","font-mono":"",class:R(r.id===i(a)?.id?"text-primary n-bg-active":"text-secondary hover:n-bg-hover"),onClick:ee=>d.value=r.id},h(k(r.id)),11,Q),T],64))),128))]),right:u(()=>[i(a)?.content?(c(),_("div",X,[s("div",Y,[s("code",null,h(i(a).id),1)]),l($,{"h-full":"","of-auto":"","text-sm":"",code:i(a).content,lang:"typescript"},null,8,["code"])])):(c(),U(F,{key:1},{default:u(()=>[l(C,{px6:"",py2:""},{default:u(()=>[Z]),_:1})]),_:1}))]),_:1}),l(w,null,{default:u(()=>[l(V)]),_:1})],64)}}});export{re as default};
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import { defineNuxtModule } from '@nuxt/kit';
|
|
2
|
-
import { isGlobalInstall } from '../dirs.mjs';
|
|
3
|
-
|
|
4
|
-
const ROUTE_PATH = "/__nuxt_devtools__";
|
|
5
|
-
const ROUTE_CLIENT = `${ROUTE_PATH}/client`;
|
|
6
|
-
const ROUTE_AUTH = `${ROUTE_PATH}/auth`;
|
|
7
|
-
const ROUTE_AUTH_VERIFY = `${ROUTE_PATH}/auth-verify`;
|
|
8
|
-
const ROUTE_ANALYZE = `${ROUTE_PATH}/analyze`;
|
|
9
|
-
const WS_EVENT_NAME = "nuxt:devtools:rpc";
|
|
10
|
-
const defaultOptions = {
|
|
11
|
-
enabled: void 0,
|
|
12
|
-
// determine multiple conditions
|
|
13
|
-
componentInspector: true,
|
|
14
|
-
viteInspect: true,
|
|
15
|
-
vscode: {
|
|
16
|
-
enabled: true,
|
|
17
|
-
startOnBoot: false,
|
|
18
|
-
port: 3080,
|
|
19
|
-
reuseExistingServer: true
|
|
20
|
-
}
|
|
21
|
-
};
|
|
22
|
-
const defaultTabOptions = {
|
|
23
|
-
behavior: {
|
|
24
|
-
telemetry: null
|
|
25
|
-
},
|
|
26
|
-
ui: {
|
|
27
|
-
componentsView: "list",
|
|
28
|
-
componentsGraphShowNodeModules: false,
|
|
29
|
-
componentsGraphShowGlobalComponents: true,
|
|
30
|
-
componentsGraphShowPages: false,
|
|
31
|
-
componentsGraphShowLayouts: false,
|
|
32
|
-
componentsGraphShowWorkspace: true,
|
|
33
|
-
interactionCloseOnOutsideClick: false,
|
|
34
|
-
showExperimentalFeatures: false,
|
|
35
|
-
showHelpButtons: true,
|
|
36
|
-
showPanel: null,
|
|
37
|
-
scale: 1,
|
|
38
|
-
minimizePanelInactive: 5e3,
|
|
39
|
-
hiddenTabs: [],
|
|
40
|
-
pinnedTabs: [],
|
|
41
|
-
hiddenTabCategories: [],
|
|
42
|
-
sidebarExpanded: false,
|
|
43
|
-
sidebarScrollable: false
|
|
44
|
-
},
|
|
45
|
-
serverRoutes: {
|
|
46
|
-
selectedRoute: null,
|
|
47
|
-
view: "tree",
|
|
48
|
-
inputDefaults: {
|
|
49
|
-
query: [],
|
|
50
|
-
body: [],
|
|
51
|
-
headers: []
|
|
52
|
-
},
|
|
53
|
-
sendFrom: "app"
|
|
54
|
-
},
|
|
55
|
-
assets: {
|
|
56
|
-
view: "grid"
|
|
57
|
-
}
|
|
58
|
-
};
|
|
59
|
-
|
|
60
|
-
const module = defineNuxtModule({
|
|
61
|
-
meta: {
|
|
62
|
-
name: "@nuxt/devtools",
|
|
63
|
-
configKey: "devtools"
|
|
64
|
-
},
|
|
65
|
-
defaults: defaultOptions,
|
|
66
|
-
setup(options, nuxt) {
|
|
67
|
-
if (typeof options === "boolean")
|
|
68
|
-
options = { enabled: options };
|
|
69
|
-
if (options.enabled === false)
|
|
70
|
-
return;
|
|
71
|
-
if (isGlobalInstall()) {
|
|
72
|
-
const globalOptions = nuxt.options.devtoolsGlobal || {};
|
|
73
|
-
if (options.enabled !== true && !globalOptions.projects?.includes(nuxt.options.rootDir))
|
|
74
|
-
return;
|
|
75
|
-
}
|
|
76
|
-
return import('../chunks/module-main.mjs').then(function (n) { return n.m; }).then(({ enableModule }) => enableModule(options, nuxt));
|
|
77
|
-
}
|
|
78
|
-
});
|
|
79
|
-
|
|
80
|
-
export { ROUTE_AUTH as R, WS_EVENT_NAME as W, ROUTE_ANALYZE as a, ROUTE_CLIENT as b, ROUTE_AUTH_VERIFY as c, defaultTabOptions as d, module as m };
|