@nuxt/devtools 0.8.2 → 0.8.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/analyze-build.mjs +38 -6
- package/dist/chunks/module-main.mjs +1 -1
- package/dist/client/200.html +31 -31
- package/dist/client/404.html +31 -31
- package/dist/client/__blank/index.html +31 -31
- package/dist/client/_nuxt/{Badge.3c6fa035.js → Badge.efa8b534.js} +1 -1
- package/dist/client/_nuxt/{CodeDiff.vue.7a519a6d.js → CodeDiff.vue.52d6bbaa.js} +1 -1
- package/dist/client/_nuxt/{ComposableItem.vue.ffcca591.js → ComposableItem.vue.1525d3d2.js} +1 -1
- package/dist/client/_nuxt/{DataSchemaButton.vue.9ced8093.js → DataSchemaButton.vue.dabda5da.js} +1 -1
- package/dist/client/_nuxt/{DataSchemaDrawer.6edfca87.js → DataSchemaDrawer.345f79f6.js} +2 -2
- package/dist/client/_nuxt/{DrawerRight.vue.8980fc15.js → DrawerRight.vue.e75b5510.js} +1 -1
- package/dist/client/_nuxt/{DurationDisplay.vue.dca5d690.js → DurationDisplay.vue.73c682ac.js} +1 -1
- package/dist/client/_nuxt/{FilepathItem.vue.222c7a36.js → FilepathItem.vue.253590ec.js} +1 -1
- package/dist/client/_nuxt/{HelpFab.vue.6da14cd2.js → HelpFab.vue.b3c1cf3a.js} +1 -1
- package/dist/client/_nuxt/{LaunchPage.vue.ded97a46.js → LaunchPage.vue.45c2e269.js} +1 -1
- package/dist/client/_nuxt/{NCheckbox.vue.d47be8e5.js → NCheckbox.vue.e6a37232.js} +1 -1
- package/dist/client/_nuxt/{NCodeBlock.vue.cd0d52ca.js → NCodeBlock.vue.28dd841e.js} +1 -1
- package/dist/client/_nuxt/{NDropdown.vue.3bf5669f.js → NDropdown.vue.36b68b91.js} +1 -1
- package/dist/client/_nuxt/{NIconTitle.vue.590f73cc.js → NIconTitle.vue.635c5682.js} +1 -1
- package/dist/client/_nuxt/{NLink.vue.2bd59538.js → NLink.vue.19da93af.js} +1 -1
- package/dist/client/_nuxt/{NMarkdown.vue.0929ffc5.js → NMarkdown.vue.283d6615.js} +1 -1
- package/dist/client/_nuxt/{NSectionBlock.2eb550f4.js → NSectionBlock.e780f891.js} +1 -1
- package/dist/client/_nuxt/{NSelect.vue.120a17c7.js → NSelect.vue.60befa30.js} +1 -1
- package/dist/client/_nuxt/{NSelectTabs.vue.15ded4ea.js → NSelectTabs.vue.1cae281d.js} +1 -1
- package/dist/client/_nuxt/{NSwitch.vue.00f0a211.js → NSwitch.vue.eb1bdf97.js} +1 -1
- package/dist/client/_nuxt/{NTip.vue.b82daf5f.js → NTip.vue.eef318b6.js} +1 -1
- package/dist/client/_nuxt/{Navbar.vue.454bbdad.js → Navbar.vue.d85c454f.js} +1 -1
- package/dist/client/_nuxt/{StateEditor.vue.fb44992d.js → StateEditor.vue.83907c9e.js} +1 -1
- package/dist/client/_nuxt/{__blank.ed5e6688.js → __blank.fd22bfe8.js} +1 -1
- package/dist/client/_nuxt/{analyze-build.a348d54f.js → analyze-build.3961243f.js} +1 -1
- package/dist/client/_nuxt/{assets.9cc20f0c.js → assets.22c374b3.js} +1 -1
- package/dist/client/_nuxt/{client.ecec2ff5.js → client.766a1bb7.js} +1 -1
- package/dist/client/_nuxt/{components.eb546fab.js → components.f4ae9003.js} +1 -1
- package/dist/client/_nuxt/{css.5abce139.js → css.a67813b3.js} +12 -8
- package/dist/client/_nuxt/{custom-_name_.405b1822.js → custom-_name_.4e0a3203.js} +1 -1
- package/dist/client/_nuxt/{default.d9ec755b.js → default.7b425b73.js} +1 -1
- package/dist/client/_nuxt/entry.13b4d578.css +1 -0
- package/dist/client/_nuxt/entry.2f74e286.js +27 -0
- package/dist/client/_nuxt/{error-404.27f7c5ed.js → error-404.9d0e04bf.js} +1 -1
- package/dist/client/_nuxt/{error-500.6459d9b0.js → error-500.10115977.js} +1 -1
- package/dist/client/_nuxt/{full.ff28afbd.js → full.4288bf38.js} +1 -1
- package/dist/client/_nuxt/{hooks.a92c198c.js → hooks.1d6c1af1.js} +1 -1
- package/dist/client/_nuxt/{html.66e44e78.js → html.af01869e.js} +1 -1
- package/dist/client/_nuxt/{imports.af43913a.js → imports.39a7562f.js} +1 -1
- package/dist/client/_nuxt/{index.475555a9.js → index.14b447a4.js} +1 -1
- package/dist/client/_nuxt/{index.9d25c8b5.js → index.94061115.js} +1 -1
- package/dist/client/_nuxt/{javascript.ddb4c460.js → javascript.b7d6d348.js} +7 -7
- package/dist/client/_nuxt/{json-editor-vue.28570b6b.js → json-editor-vue.87488a70.js} +53 -53
- package/dist/client/_nuxt/{middleware.17de3e64.js → middleware.66f1417a.js} +1 -1
- package/dist/client/_nuxt/{modules.d2b55e3a.js → modules.3b512e2b.js} +1 -1
- package/dist/client/_nuxt/{none.60868d86.js → none.d43da723.js} +1 -1
- package/dist/client/_nuxt/{open-graph.b86b82fa.js → open-graph.c7507223.js} +1 -1
- package/dist/client/_nuxt/{overview.5b1b22e6.js → overview.dae47b2d.js} +1 -1
- package/dist/client/_nuxt/{pages.7ce7ead1.js → pages.0902f86b.js} +1 -1
- package/dist/client/_nuxt/{payload.95a96cbc.js → payload.7de203b9.js} +1 -1
- package/dist/client/_nuxt/{plugins.19d4d843.js → plugins.30d46375.js} +1 -1
- package/dist/client/_nuxt/{runtime-configs.ccb12a0d.js → runtime-configs.a32dc753.js} +1 -1
- package/dist/client/_nuxt/{server-routes.7cc44fc0.js → server-routes.7e333622.js} +1 -1
- package/dist/client/_nuxt/{settings.105e88e7.js → settings.5586d729.js} +1 -1
- package/dist/client/_nuxt/shellscript.9d056341.js +4 -0
- package/dist/client/_nuxt/{state-components.f27756f9.js → state-components.7549d0ff.js} +1 -1
- package/dist/client/_nuxt/{state-modules.4d65021c.js → state-modules.a4af1949.js} +1 -1
- package/dist/client/_nuxt/{storage-options.f78173e7.js → storage-options.0b849b9a.js} +1 -1
- package/dist/client/_nuxt/{storage.38ee52e0.js → storage.6d27a7d0.js} +1 -1
- package/dist/client/_nuxt/{terminals.6138e467.js → terminals.2f1b22dc.js} +1 -1
- package/dist/client/_nuxt/{timeline.aeb379fb.js → timeline.849dbd44.js} +1 -1
- package/dist/client/_nuxt/{typescript.3ef79501.js → typescript.24e7badf.js} +7 -7
- package/dist/client/_nuxt/unocss-runtime.e58f9c20.js +2 -0
- package/dist/client/_nuxt/{virtual-files.c0236487.js → virtual-files.d393fac8.js} +1 -1
- package/dist/client/_nuxt/{vue-html.b80b464f.js → vue-html.0806679f.js} +1 -1
- package/dist/client/_nuxt/{vue.5b4e1de3.js → vue.24311fdc.js} +18 -18
- package/dist/client/index.html +31 -31
- package/dist/client/modules/analyze-build/index.html +31 -31
- package/dist/client/modules/assets/index.html +31 -31
- package/dist/client/modules/components/index.html +31 -31
- package/dist/client/modules/hooks/index.html +31 -31
- package/dist/client/modules/imports/index.html +31 -31
- package/dist/client/modules/middleware/index.html +31 -31
- package/dist/client/modules/modules/index.html +31 -31
- package/dist/client/modules/open-graph/index.html +31 -31
- package/dist/client/modules/overview/index.html +31 -31
- package/dist/client/modules/pages/index.html +31 -31
- package/dist/client/modules/payload/index.html +31 -31
- package/dist/client/modules/plugins/index.html +31 -31
- package/dist/client/modules/runtime-configs/index.html +31 -31
- package/dist/client/modules/server-routes/index.html +31 -31
- package/dist/client/modules/storage/index.html +31 -31
- package/dist/client/modules/terminals/index.html +31 -31
- package/dist/client/modules/timeline/index.html +31 -31
- package/dist/client/modules/virtual-files/index.html +31 -31
- package/dist/client/settings/index.html +31 -31
- package/dist/dirs.d.mts +7 -0
- package/dist/module.d.mts +9 -0
- package/dist/module.d.ts +1 -1
- package/dist/module.json +1 -1
- package/dist/runtime/plugins/view/client.mjs +1 -1
- package/dist/shared/devtools.2a48a9e5.d.ts +62 -0
- package/dist/types.d.mts +42 -0
- package/dist/types.d.ts +2 -2
- package/package.json +27 -28
- package/dist/client/_nuxt/entry.102d44fe.js +0 -27
- package/dist/client/_nuxt/entry.a2a7b315.css +0 -1
- package/dist/client/_nuxt/shellscript.3d8bff4d.js +0 -4
- package/dist/client/_nuxt/unocss-runtime.50cd6f0c.js +0 -2
- /package/dist/{global-2a48a9e5.d.ts → shared/devtools.2a48a9e5.d.mts} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as e,m as n,o}from"./entry.
|
|
1
|
+
import{d as e,m as n,o}from"./entry.2f74e286.js";const m=e({__name:"middleware",setup(t){return(a,r)=>(o(),n("div",null," WIP "))}});export{m as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{_ as Me}from"./FilepathItem.vue.222c7a36.js";import{d as H,a as A,a6 as pe,o as d,h as C,j as y,k as a,a5 as j,f as m,v as S,t as O,m as b,E as D,p as z,i as v,F as E,n as F,x as te,ak as he,P as _e,aH as Ce,J as le,K as ae,aI as ve,aJ as ye,_ as ge,C as be,y as Te,z as Oe,au as xe,aK as Ne,aL as Ve,aM as Pe,al as Be,a9 as Ae,H as Le,ar as ce,ap as Ee,aN as je,a3 as Re,r as $e,ad as De,l as He,U as Ue,a7 as Fe,V as qe,Q as Ke,aO as ue}from"./entry.102d44fe.js";import{_ as We,u as ke,a as Ye}from"./state-modules.4d65021c.js";import{_ as Ge}from"./NSectionBlock.2eb550f4.js";import{_ as Je}from"./NIconTitle.vue.590f73cc.js";import{_ as Xe}from"./Badge.3c6fa035.js";import{_ as Qe}from"./NDropdown.vue.3bf5669f.js";import{_ as Ze}from"./NCodeBlock.vue.cd0d52ca.js";import{_ as et}from"./NLink.vue.2bd59538.js";import{_ as tt}from"./CodeDiff.vue.7a519a6d.js";import{_ as it}from"./NTip.vue.b82daf5f.js";import{_ as nt}from"./HelpFab.vue.6da14cd2.js";import"./NCheckbox.vue.d47be8e5.js";import"./client.ecec2ff5.js";const ot={flex:"~ col gap2","flex-auto":"","of-hidden":"",px1:""},st={"gap-1t":"",flex:"","items-center":"","text-ellipsis":"","ws-nowrap":"","text-lg":""},rt={key:2},lt=a("div",{"flex-auto":""},null,-1),at={key:1,flex:"~ gap-2",title:"Documentation"},ct=a("span",{"i-carbon-link":"","text-lg":"",op50:""},null,-1),ut={key:2,flex:"~ gap-2"},dt=a("span",{"i-carbon-logo-github":"","text-lg":"",op50:""},null,-1),mt={flex:"~ col","items-end":""},ft={key:0,"h-20":"","w-20":"",flex:"","flex-none":"",rounded:"","bg-gray:3":"",p4:""},pt=["src","alt"],ht=a("div",{"i-carbon-cube":"",ma:"","text-4xl":"",op30:""},null,-1),_t={key:1,flex:"~",mt2:"","flex-auto":"","items-end":"","justify-end":""},vt=["src"],yt=a("div",{"flex-auto":""},null,-1),gt={flex:"","justify-end":""},bt="https://api.nuxtjs.org/api/ipx/s_80,f_webp/gh/nuxt/modules/main/icons/",xt="https://api.nuxtjs.org/api/ipx/s_44,f_webp/gh_avatar/",$t="https://github.com/",kt="https://www.npmjs.com/package/",ie=H({__name:"ModuleItemBase",props:{mod:{},info:{},compact:{type:Boolean},maintainers:{type:Boolean,default:!0}},setup(e){const t=e,i=A(()=>({...t.mod?.meta,...t.mod,...t.info})),o=pe();return(n,r)=>{const c=te,l=he;return d(),C(l,{p4:"",flex:"~ gap2"},{default:y(()=>[a("div",ot,[j(n.$slots,"main",{},()=>[a("div",st,[n.mod.isPackageModule?(d(),C(c,{key:0,to:kt+(m(i).npm||m(i).name),target:"_blank",hover:"underline text-primary"},{default:y(()=>[S(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",rt,O(m(i).name),1)),j(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)):z("",!0),lt,m(i).website?(d(),b("div",at,[ct,v(c,{to:m(i).website,target:"_blank","of-hidden":"",truncate:"","ws-nowrap":"","text-sm":"",op50:"",hover:"op100 underline text-primary"},{default:y(()=>[S(O(m(i).website.replace(/^https?:\/\//,"")),1)]),_:1},8,["to"])])):z("",!0),m(i).github?(d(),b("div",ut,[dt,v(c,{to:m(i).github,target:"_blank","of-hidden":"",truncate:"","ws-nowrap":"","text-sm":"",op50:"",hover:"op100 underline text-primary"},{default:y(()=>[S(O(m(i).github.replace(/^https?:\/\/github.com\//,"")),1)]),_:1},8,["to"])])):z("",!0)]),j(n.$slots,"items")]),a("div",mt,[m(i).icon||n.mod.isPackageModule?(d(),b("div",ft,[m(i).icon?(d(),b("img",{key:0,src:bt+m(i).icon,alt:n.mod.name,ma:""},null,8,pt)):z("",!0),ht])):z("",!0),m(i).maintainers?.length&&n.maintainers?(d(),b("div",_t,[(d(!0),b(E,null,F(m(i).maintainers,s=>(d(),C(c,{key:s.name,target:"_blank",to:$t+s.github,title:s.name},{default:y(()=>[a("img",{src:xt+s.github,"h-6":"","w-6":"","rounded-full":""},null,8,vt)]),_:2},1032,["to","title"]))),128))])):z("",!0),n.$slots.actions?(d(),b(E,{key:2},[yt,a("div",gt,[j(n.$slots,"actions")])],64)):z("",!0)])]),_:3})}}}),wt={key:0,flex:"~ gap-2",title:"Open on filesystem"},It=a("span",{"i-carbon-folder-move-to":"","text-lg":"",op50:""},null,-1),St=a("span",{"i-carbon-circle-dash":"","animate-spin":"","text-lg":"",op50:""},null,-1),zt=a("code",{"text-sm":"",op50:""},"Upgrading...",-1),Mt={key:1,"mx--2":""},Ct=["onClick"],Tt=a("span",{"i-carbon-intent-request-active":"","text-lg":"","text-primary":""},null,-1),Ot=a("code",{"text-xs":""},"Update installed, click to restart",-1),Nt=[Tt,Ot],Vt={key:2,"mx--2":""},Pt=["onClick"],Bt=a("span",{"i-carbon-intent-request-upgrade":"","text-lg":"",op50:""},null,-1),At={op50:""},Lt=a("div",{"i-carbon-arrow-right":"",op50:""},null,-1),Et={"text-green":""},jt={key:3,flex:"~ gap-2","items-center":"",title:"NPM"},Rt=a("span",{"i-carbon-cube":"","text-lg":"",op50:""},null,-1),Dt={"text-sm":"",op50:""},Ht=H({__name:"ModuleItem",props:{mod:{}},setup(e){const t=e,i=A(()=>t.mod.info),o=A(()=>({...t.mod?.meta,...t.mod,...i.value})),n=_e();return(r,c)=>{const l=Me,s=te,u=We,p=ie;return d(),C(p,{mod:r.mod,info:m(i)},{items:y(()=>[r.mod.entryPath?(d(),b("div",wt,[It,v(l,{filepath:r.mod.entryPath,"text-sm":"",op50:"",hover:"text-primary op100"},null,8,["filepath"])])):z("",!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:x})=>[T==="running"?(d(),C(s,{key:0,flex:"~ gap-2","animate-pulse":"","items-center":"",to:w?"/modules/terminals":void 0,onClick:g=>w?n.value=w:void 0},{default:y(()=>[St,zt]),_:2},1032,["to","onClick"])):T==="updated"?(d(),b("div",Mt,[a("button",{flex:"~ gap-2",hover:"bg-primary/20","items-center":"",rounded:"","bg-primary:10":"",px2:"","text-sm":"","text-primary":"",onClick:x},Nt,8,Ct)])):h?.needsUpdate?(d(),b("div",Vt,[a("button",{flex:"~ gap-2",title:"Click to upgrade","items-center":"",rounded:"",px2:"","text-sm":"",hover:"bg-active",onClick:g=>k()},[Bt,a("code",At,"v"+O(h.current),1),Lt,a("code",Et,"v"+O(h.latest),1)],8,Pt)])):h?.latest?(d(),b("div",jt,[Rt,a("code",Dt,"v"+O(h.current),1)])):z("",!0)]),_:1},8,["package-name"])):z("",!0)]),_:1},8,["mod","info"])}}}),Ut=H({__name:"ModuleItemInstall",props:{item:{}},emits:["start"],setup(e,{emit:t}){const i=e,o=ke(),n=A(()=>o.value.find(u=>u.name===i.item.npm)),r=A(()=>n.value&&n.value.isPackageModule),c=A(()=>n.value&&n.value.isPackageModule&&n.value.isUninstallable);async function l(u,p){const h=p==="install"?le.installNuxtModule:le.uninstallNuxtModule,k=await h(await ae(),u.npm,!0);k.commands&&await ve.start(u,k,p)&&(ye.value.push({name:u.npm,info:u,processId:k.processId}),t("start"),await h(await ae(),u.npm,!1))}const s={};return(u,p)=>{const h=Xe,k=ge,T=be,w=Qe,x=ie;return d(),C(x,{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"))},Ce({_:2},[m(r)?{name:"badge",fn:y(()=>[v(h,{"bg-green-400:10":"","text-green-400":""},{default:y(()=>[S(" Installed ")]),_:1}),m(c)?(d(),C(w,{key:0,n:"sm green"},{trigger:y(({click:g})=>[v(k,{icon:"carbon-overflow-menu-vertical",onClick:$=>g()},null,8,["onClick"])]),default:y(()=>[v(T,{icon:"carbon-trash-can",n:"red",onClick:p[0]||(p[0]=g=>l(u.item,"uninstall"))},{default:y(()=>[S(" Uninstall ")]),_:1})]),_:1})):z("",!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 X(){X.init||(X.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(){X(),xe(()=>{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 qt=Ne();Te("data-v-b329ee4c");const Kt={class:"resize-observer",tabindex:"-1"};Oe();const Wt=qt((e,t,i,o,n,r)=>(d(),C("div",Kt)));G.render=Wt;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 Yt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function de(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 Gt(e,t,i){return t&&de(e.prototype,t),i&&de(e,i),e}function me(e){return Jt(e)||Xt(e)||Qt(e)||Zt()}function Jt(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 Qt(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 Zt(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
1
|
+
import{_ as Me}from"./FilepathItem.vue.253590ec.js";import{d as H,a as A,a6 as pe,o as d,h as C,j as y,k as a,a5 as j,f as m,v as S,t as O,m as b,E as D,p as z,i as v,F as E,n as F,x as te,ak as he,P as _e,aH as Ce,J as le,K as ae,aI as ve,aJ as ye,_ as ge,C as be,y as Te,z as Oe,au as xe,aK as Ne,aL as Ve,aM as Pe,al as Be,a9 as Ae,H as Le,ar as ce,ap as Ee,aN as je,a3 as Re,r as $e,ad as De,l as He,U as Ue,a7 as Fe,V as qe,Q as Ke,aO as ue}from"./entry.2f74e286.js";import{_ as We,u as ke,a as Ye}from"./state-modules.a4af1949.js";import{_ as Ge}from"./NSectionBlock.e780f891.js";import{_ as Je}from"./NIconTitle.vue.635c5682.js";import{_ as Xe}from"./Badge.efa8b534.js";import{_ as Qe}from"./NDropdown.vue.36b68b91.js";import{_ as Ze}from"./NCodeBlock.vue.28dd841e.js";import{_ as et}from"./NLink.vue.19da93af.js";import{_ as tt}from"./CodeDiff.vue.52d6bbaa.js";import{_ as it}from"./NTip.vue.eef318b6.js";import{_ as nt}from"./HelpFab.vue.b3c1cf3a.js";import"./NCheckbox.vue.e6a37232.js";import"./client.766a1bb7.js";const ot={flex:"~ col gap2","flex-auto":"","of-hidden":"",px1:""},st={"gap-1t":"",flex:"","items-center":"","text-ellipsis":"","ws-nowrap":"","text-lg":""},rt={key:2},lt=a("div",{"flex-auto":""},null,-1),at={key:1,flex:"~ gap-2",title:"Documentation"},ct=a("span",{"i-carbon-link":"","text-lg":"",op50:""},null,-1),ut={key:2,flex:"~ gap-2"},dt=a("span",{"i-carbon-logo-github":"","text-lg":"",op50:""},null,-1),mt={flex:"~ col","items-end":""},ft={key:0,"h-20":"","w-20":"",flex:"","flex-none":"",rounded:"","bg-gray:3":"",p4:""},pt=["src","alt"],ht=a("div",{"i-carbon-cube":"",ma:"","text-4xl":"",op30:""},null,-1),_t={key:1,flex:"~",mt2:"","flex-auto":"","items-end":"","justify-end":""},vt=["src"],yt=a("div",{"flex-auto":""},null,-1),gt={flex:"","justify-end":""},bt="https://api.nuxtjs.org/api/ipx/s_80,f_webp/gh/nuxt/modules/main/icons/",xt="https://api.nuxtjs.org/api/ipx/s_44,f_webp/gh_avatar/",$t="https://github.com/",kt="https://www.npmjs.com/package/",ie=H({__name:"ModuleItemBase",props:{mod:{},info:{},compact:{type:Boolean},maintainers:{type:Boolean,default:!0}},setup(e){const t=e,i=A(()=>({...t.mod?.meta,...t.mod,...t.info})),o=pe();return(n,r)=>{const c=te,l=he;return d(),C(l,{p4:"",flex:"~ gap2"},{default:y(()=>[a("div",ot,[j(n.$slots,"main",{},()=>[a("div",st,[n.mod.isPackageModule?(d(),C(c,{key:0,to:kt+(m(i).npm||m(i).name),target:"_blank",hover:"underline text-primary"},{default:y(()=>[S(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",rt,O(m(i).name),1)),j(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)):z("",!0),lt,m(i).website?(d(),b("div",at,[ct,v(c,{to:m(i).website,target:"_blank","of-hidden":"",truncate:"","ws-nowrap":"","text-sm":"",op50:"",hover:"op100 underline text-primary"},{default:y(()=>[S(O(m(i).website.replace(/^https?:\/\//,"")),1)]),_:1},8,["to"])])):z("",!0),m(i).github?(d(),b("div",ut,[dt,v(c,{to:m(i).github,target:"_blank","of-hidden":"",truncate:"","ws-nowrap":"","text-sm":"",op50:"",hover:"op100 underline text-primary"},{default:y(()=>[S(O(m(i).github.replace(/^https?:\/\/github.com\//,"")),1)]),_:1},8,["to"])])):z("",!0)]),j(n.$slots,"items")]),a("div",mt,[m(i).icon||n.mod.isPackageModule?(d(),b("div",ft,[m(i).icon?(d(),b("img",{key:0,src:bt+m(i).icon,alt:n.mod.name,ma:""},null,8,pt)):z("",!0),ht])):z("",!0),m(i).maintainers?.length&&n.maintainers?(d(),b("div",_t,[(d(!0),b(E,null,F(m(i).maintainers,s=>(d(),C(c,{key:s.name,target:"_blank",to:$t+s.github,title:s.name},{default:y(()=>[a("img",{src:xt+s.github,"h-6":"","w-6":"","rounded-full":""},null,8,vt)]),_:2},1032,["to","title"]))),128))])):z("",!0),n.$slots.actions?(d(),b(E,{key:2},[yt,a("div",gt,[j(n.$slots,"actions")])],64)):z("",!0)])]),_:3})}}}),wt={key:0,flex:"~ gap-2",title:"Open on filesystem"},It=a("span",{"i-carbon-folder-move-to":"","text-lg":"",op50:""},null,-1),St=a("span",{"i-carbon-circle-dash":"","animate-spin":"","text-lg":"",op50:""},null,-1),zt=a("code",{"text-sm":"",op50:""},"Upgrading...",-1),Mt={key:1,"mx--2":""},Ct=["onClick"],Tt=a("span",{"i-carbon-intent-request-active":"","text-lg":"","text-primary":""},null,-1),Ot=a("code",{"text-xs":""},"Update installed, click to restart",-1),Nt=[Tt,Ot],Vt={key:2,"mx--2":""},Pt=["onClick"],Bt=a("span",{"i-carbon-intent-request-upgrade":"","text-lg":"",op50:""},null,-1),At={op50:""},Lt=a("div",{"i-carbon-arrow-right":"",op50:""},null,-1),Et={"text-green":""},jt={key:3,flex:"~ gap-2","items-center":"",title:"NPM"},Rt=a("span",{"i-carbon-cube":"","text-lg":"",op50:""},null,-1),Dt={"text-sm":"",op50:""},Ht=H({__name:"ModuleItem",props:{mod:{}},setup(e){const t=e,i=A(()=>t.mod.info),o=A(()=>({...t.mod?.meta,...t.mod,...i.value})),n=_e();return(r,c)=>{const l=Me,s=te,u=We,p=ie;return d(),C(p,{mod:r.mod,info:m(i)},{items:y(()=>[r.mod.entryPath?(d(),b("div",wt,[It,v(l,{filepath:r.mod.entryPath,"text-sm":"",op50:"",hover:"text-primary op100"},null,8,["filepath"])])):z("",!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:x})=>[T==="running"?(d(),C(s,{key:0,flex:"~ gap-2","animate-pulse":"","items-center":"",to:w?"/modules/terminals":void 0,onClick:g=>w?n.value=w:void 0},{default:y(()=>[St,zt]),_:2},1032,["to","onClick"])):T==="updated"?(d(),b("div",Mt,[a("button",{flex:"~ gap-2",hover:"bg-primary/20","items-center":"",rounded:"","bg-primary:10":"",px2:"","text-sm":"","text-primary":"",onClick:x},Nt,8,Ct)])):h?.needsUpdate?(d(),b("div",Vt,[a("button",{flex:"~ gap-2",title:"Click to upgrade","items-center":"",rounded:"",px2:"","text-sm":"",hover:"bg-active",onClick:g=>k()},[Bt,a("code",At,"v"+O(h.current),1),Lt,a("code",Et,"v"+O(h.latest),1)],8,Pt)])):h?.latest?(d(),b("div",jt,[Rt,a("code",Dt,"v"+O(h.current),1)])):z("",!0)]),_:1},8,["package-name"])):z("",!0)]),_:1},8,["mod","info"])}}}),Ut=H({__name:"ModuleItemInstall",props:{item:{}},emits:["start"],setup(e,{emit:t}){const i=e,o=ke(),n=A(()=>o.value.find(u=>u.name===i.item.npm)),r=A(()=>n.value&&n.value.isPackageModule),c=A(()=>n.value&&n.value.isPackageModule&&n.value.isUninstallable);async function l(u,p){const h=p==="install"?le.installNuxtModule:le.uninstallNuxtModule,k=await h(await ae(),u.npm,!0);k.commands&&await ve.start(u,k,p)&&(ye.value.push({name:u.npm,info:u,processId:k.processId}),t("start"),await h(await ae(),u.npm,!1))}const s={};return(u,p)=>{const h=Xe,k=ge,T=be,w=Qe,x=ie;return d(),C(x,{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"))},Ce({_:2},[m(r)?{name:"badge",fn:y(()=>[v(h,{"bg-green-400:10":"","text-green-400":""},{default:y(()=>[S(" Installed ")]),_:1}),m(c)?(d(),C(w,{key:0,n:"sm green"},{trigger:y(({click:g})=>[v(k,{icon:"carbon-overflow-menu-vertical",onClick:$=>g()},null,8,["onClick"])]),default:y(()=>[v(T,{icon:"carbon-trash-can",n:"red",onClick:p[0]||(p[0]=g=>l(u.item,"uninstall"))},{default:y(()=>[S(" Uninstall ")]),_:1})]),_:1})):z("",!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 X(){X.init||(X.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(){X(),xe(()=>{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 qt=Ne();Te("data-v-b329ee4c");const Kt={class:"resize-observer",tabindex:"-1"};Oe();const Wt=qt((e,t,i,o,n,r)=>(d(),C("div",Kt)));G.render=Wt;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 Yt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function de(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 Gt(e,t,i){return t&&de(e.prototype,t),i&&de(e,i),e}function me(e){return Jt(e)||Xt(e)||Qt(e)||Zt()}function Jt(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 Qt(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 Zt(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
2
2
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ei(e){var t;return typeof e=="function"?t={callback:e}:t=e,t}function ti(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(me(r))),n=s,clearTimeout(o),o=setTimeout(function(){e.apply(void 0,[s].concat(me(r))),o=0},t)}};return c._clear=function(){clearTimeout(o),o=null},c}function we(e,t){if(e===t)return!0;if(Y(e)==="object"){for(var i in e)if(!we(e[i],t[i]))return!1;return!0}return!1}var ii=function(){function e(t,i,o){Yt(this,e),this.el=t,this.observer=null,this.frozen=!1,this.createObserver(i,o)}return Gt(e,[{key:"createObserver",value:function(i,o){var n=this;if(this.observer&&this.destroyObserver(),!this.frozen){if(this.options=ei(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=ti(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),xe(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 Ie(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 ii(e,o,i);e._vue_visibilityState=n}}function ni(e,t,i){var o=t.value,n=t.oldValue;if(!we(o,n)){var r=e._vue_visibilityState;if(!o){Se(e);return}r?r.createObserver(o,i):Ie(e,{value:o},i)}}function Se(e){var t=e._vue_visibilityState;t&&(t.destroyObserver(),delete e._vue_visibilityState)}var oi={beforeMount:Ie,updated:ni,unmounted:Se},si={itemsLimit:1e3},ri=/(auto|scroll)/;function ze(e,t){return e.parentNode===null?t:ze(e.parentNode,t.concat([e]))}var J=function(t,i){return getComputedStyle(t,null).getPropertyValue(i)},li=function(t){return J(t,"overflow")+J(t,"overflow-y")+J(t,"overflow-x")},ai=function(t){return ri.test(li(t))};function fe(e){if(e instanceof HTMLElement||e instanceof SVGElement){for(var t=ze(e.parentNode,[]),i=0;i<t.length;i+=1)if(ai(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 ci={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 ui(){return this.items.length&&Z(this.items[0])!=="object"}var ee=!1;if(typeof window<"u"){ee=!1;try{var di=Object.defineProperty({},"passive",{get:function(){ee=!0}});window.addEventListener("test",null,di)}catch{}}let mi=0;var ne={name:"RecycleScroller",components:{ResizeObserver:G},directives:{ObserveVisibility:oi},props:{...ci,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:ui,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=Ve({id:mi++,index:t,used:!0,key:o,type:n}),c=Pe({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 x,g,$,N,B;if(!u)x=g=N=B=$=0;else if(this.$_prerender)x=N=0,g=B=Math.min(this.prerender,s.length),$=null;else{const f=this.getScroll();if(t){let M=f.start-this.$_lastUpdateScrollPosition;if(M<0&&(M=-M),i===null&&M<r||M<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 M=this.$refs.after.scrollHeight;f.end+=M}if(i===null){let M,U=0,se=u-1,P=~~(u/2),re;do re=P,M=p[P].accumulator,M<f.start?U=P:P<u-1&&p[P+1].accumulator>f.start&&(se=P),P=~~((U+se)/2);while(P!==re);for(P<0&&(P=0),x=P,$=p[u-1].accumulator,g=P;g<u&&p[g].accumulator<f.end;g++);for(g===-1?g=s.length-1:(g++,g>u&&(g=u)),N=x;N<u&&I+p[N].accumulator<f.start;N++);for(B=N;B<u&&I+p[B].accumulator<f.end;B++);}else{x=~~(f.start/i*o);const M=x%o;x-=M,g=Math.ceil(f.end/i*o),N=Math.max(0,Math.floor((f.start-I)/i*o)),B=Math.floor((f.end-I)/i*o),x<0&&(x=0),g>u&&(g=u),N<0&&(N=0),B>u&&(B=u),$=Math.ceil(u/o)*i}}g-x>si.itemsLimit&&this.itemsLimitError(),this.totalSize=$;let _;const q=x<=this.$_endIndex&&g>=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<x||_.nr.index>=g)&&this.unuseView(_));const oe=q?null:new Map;let R,L,K;for(let f=x;f<g;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}L=R[c];let I=k.get(L),M=!1;if(!_)q?I&&I.length?_=I.pop():_=this.addView(T,f,R,V,L):(K=oe.get(L)||0,(!I||K>=I.length)&&(_=this.addView(T,f,R,V,L),this.unuseView(_,!0),I=k.get(L)),_=I[K],oe.set(L,K+1)),h.delete(_.nr.key),_.nr.used=!0,_.nr.index=f,_.nr.key=V,_.nr.type=L,h.set(V,_),M=!0;else if(!_.nr.used&&(_.nr.used=!0,M=!0,I)){const U=I.indexOf(_);U!==-1&&I.splice(U,1)}_.item=R,M&&(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=x,this.$_endIndex=g,this.emitUpdate&&this.$emit("update",x,g,N,B),clearTimeout(this.$_sortTimer),this.$_sortTimer=setTimeout(this.sortViews,this.updateInterval+300),{continuous:q}},getListenerTarget(){let e=fe(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=fe(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 fi={key:0,ref:"before",class:"vue-recycle-scroller__slot"},pi={key:1,ref:"after",class:"vue-recycle-scroller__slot"};function hi(e,t,i,o,n,r){const c=Be("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",fi,[j(e.$slots,"before")],512)):z("v-if",!0),(d(),C(ce(i.listTag),{ref:"wrapper",style:Re({[e.direction==="vertical"?"minHeight":"minWidth"]:n.totalSize+"px"}),class:D(["vue-recycle-scroller__item-wrapper",i.listClass])},{default:y(()=>[(d(!0),b(E,null,F(n.pool,s=>(d(),C(ce(i.itemTag),Ee({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(()=>[j(e.$slots,"default",{item:s.item,index:s.nr.index,active:s.nr.used})]),_:2},1040,["style","class"]))),128)),j(e.$slots,"empty")]),_:3},8,["style","class"])),e.$slots.after?(d(),b("div",pi,[j(e.$slots,"after")],512)):z("v-if",!0),v(c,{onNotify:r.handleResize},null,8,["onNotify"])],34)),[[l,r.handleVisibilityChange]])}ne.render=hi;ne.__file="src/components/RecycleScroller.vue";const _i={"h-full":"",flex:"~ col gap-4"},vi={"flex-auto":"","of-auto":"",flex:"~ col gap-2",pl6:"",pr4:""},yi=H({__name:"ModuleInstallList",emits:["close"],setup(e,{emit:t}){const i=Ye(),o=$e(""),n=A(()=>new De(i.value||[],{keys:["name","description","npm","category"]})),r=A(()=>o.value?n.value.search(o.value).map(c=>c.item):i.value);return(c,l)=>{const s=Je,u=Ue,p=Ut;return d(),b("div",_i,[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=>He(o)?o.value=h:null),autofocus:!0,placeholder:"Search...",icon:"carbon-search",n:"primary",mx6:"","px-5":"","py-2":""},null,8,["modelValue"]),a("div",vi,[v(m(ne),{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"])])])}}}),gi={flex:"~ col gap-2","w-150":"",p4:"",border:"t base"},bi={capitalize:""},xi=a("p",{op50:""}," Following command will be executed in your terminal: ",-1),$i={op50:""},ki=a("p",null,[a("span",{op50:""},"After that, Nuxt will "),a("span",{"text-orange":""},"restart automatically"),S(". ")],-1),wi={flex:"~ gap-3",mt2:"","justify-end":""},Ii=H({__name:"ModuleActionDialog",setup(e){const t=Fe(),i=pe(),o={};return(n,r)=>{const c=ie,l=Ze,s=et,u=tt,p=it,h=be,k=qe;return d(),C(m(ve),null,{default:y(({resolve:T,args:w})=>[v(k,{"model-value":!0,onClose:x=>T(!1)},{default:y(()=>[v(c,{mod:o,info:w[0],border:"none","w-150":"","n-panel-grids":""},null,8,["info"]),a("div",gi,[a("h2",{"text-xl":"",class:D(w[2]==="install"?"text-primary":"text-red")},[a("span",bi,O(w[2]),1),S(),a("code",null,O(w[0].name),1),S("? ")],2),xi,v(l,{code:w[1].commands.join(" "),lang:"bash",px4:"",py2:"",border:"~ base rounded",lines:!1},null,8,["code"]),a("p",$i,[S(" Then your "),v(s,{role:"button",n:"primary",onClick:r[0]||(r[0]=x=>m(i)(m(t)?._nuxtConfigFile)),textContent:"Nuxt config"}),S(" 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"]),ki,a("div",wi,[v(p,{n:"sm purple","flex-auto":"",icon:"carbon-chemistry"},{default:y(()=>[S(" Experimental. Backup your project first. ")]),_:1}),v(h,{onClick:x=>T(!1)},{default:y(()=>[S(" Cancel ")]),_:2},1032,["onClick"]),v(h,{n:"solid",capitalize:"",class:D(w[2]==="install"?"n-primary":"n-red"),onClick:x=>T(!0)},{default:y(()=>[S(O(w[2]),1)]),_:2},1032,["class","onClick"])])])]),_:2},1032,["onClose"])]),_:1})}}}),Si={class:"markdown-body"},zi=a("h1",null,"Modules",-1),Mi=a("p",null,[S("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"),S(".")],-1),Ci=a("p",null,[S("You can explore the list of modules on "),a("a",{href:"https://nuxt.com/modules",target:"_blank",rel:"noopener"},"nuxt.com/modules"),S(" or install them directly inside the DevTools.")],-1),Ti=a("p",null,[a("a",{href:"https://nuxt.com/docs/guide/concepts/modules",target:"_blank",rel:"noopener"},"Learn more on the documentation")],-1),Oi=[zi,Mi,Ci,Ti],Ni={__name:"modules",setup(e,{expose:t}){return t({frontmatter:{}}),(o,n)=>(d(),b("div",Si,Oi))}},Vi={"h-full":"","w-full":"","of-auto":""},Pi={relative:"","h-20":"","w-20":"",flex:"","flex-none":"",rounded:"","bg-gray:3":"",p3:""},Bi=["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"},Ei=a("div",{"i-carbon-circle-dash":"","animate-spin":"","text-xl":"",op75:""},null,-1),ji={op75:""},Ri=a("div",{"i-carbon-intent-request-create":"","text-4xl":"",op40:"","group-hover":"op75 text-primary",transition:""},null,-1),Di=a("div",{"text-lg":"",op40:"","group-hover":"op75 text-primary",transition:""}," Install New Module ",-1),Hi={key:0,border:"l base",pos:"fixed bottom-0 right-0 top-0","z-200":"","w-150":"","bg-base":""},Ui="https://api.nuxtjs.org/api/ipx/s_80,f_webp/gh/nuxt/modules/main/icons/",sn=H({__name:"modules",setup(e){const t=$e(!1),i=ke(),o=_e(),n=A(()=>i.value.filter(c=>c.isPackageModule)),r=A(()=>i.value.filter(c=>!c.isPackageModule));return Ke(()=>[{id:"action:modules:install",title:"Install a new module",icon:"i-carbon-intent-request-create ",action:()=>{t.value=!0}}]),(c,l)=>{const s=Ht,u=he,p=te,h=Ge,k=ge,T=yi,w=Ii,x=Ni,g=nt;return d(),b(E,null,[a("div",Vi,[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(E,null,F(m(n),$=>(d(),C(s,{key:$.name,mod:$},null,8,["mod"]))),128)),(d(!0),b(E,null,F("processInstallingModules"in c?c.processInstallingModules:m(ye),$=>(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",Pi,[a("img",{src:Ui+$.info.icon,alt:$.info.name,ma:""},null,8,Bi),Ai]),a("div",Li,[Ei,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(()=>[Ri,Di]),_: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(E,null,F(m(r),$=>(d(),b(E,{key:$.meta?.name||$.entryPath},[$.meta?.name||$.entryPath?(d(),C(s,{key:0,mod:$},null,8,["mod"])):z("",!0)],64))),128))]),_:1},8,["description"])):z("",!0),v(ue,{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)})):z("",!0)]),_:1}),v(ue,{name:"slide-in"},{default:y(()=>[m(t)?(d(),b("div",Hi,[v(k,{icon:"carbon-close",pos:"absolute top-3 right-3 z-10","rounded-full":"","text-xl":"",onClick:l[2]||(l[2]=$=>t.value=!1)}),v(T,{onClose:l[3]||(l[3]=$=>t.value=!1)})])):z("",!0)]),_:1}),v(w)]),v(g,null,{default:y(()=>[v(x)]),_:1})],64)}}});export{sn as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{q as r,a5 as n}from"./entry.
|
|
1
|
+
import{q as r,a5 as n}from"./entry.2f74e286.js";const t={};function o(e,s){return n(e.$slots,"default")}const c=r(t,[["render",o]]);export{c as default};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{d as S,o,h as M,j as u,a5 as te,m as a,p as x,aQ as oe,aR as ne,ar as ae,a as C,aS as se,e as re,a6 as V,r as R,f as e,k as t,n as I,E as O,t as h,F as T,i as d,v as $,ak as z,C as ie,a3 as B,aT as G,aU as ce,aV as le,b as de,aW as pe,aX as me,aY as ue,aZ as U,au as ge,a9 as he,l as _e,aa as fe,H as j,U as ve,_ as be}from"./entry.
|
|
1
|
+
import{d as S,o,h as M,j as u,a5 as te,m as a,p as x,aQ as oe,aR as ne,ar as ae,a as C,aS as se,e as re,a6 as V,r as R,f as e,k as t,n as I,E as O,t as h,F as T,i as d,v as $,ak as z,C as ie,a3 as B,aT as G,aU as ce,aV as le,b as de,aW as pe,aX as me,aY as ue,aZ as U,au as ge,a9 as he,l as _e,aa as fe,H as j,U as ve,_ as be}from"./entry.2f74e286.js";import{_ as we}from"./Navbar.vue.d85c454f.js";import{_ as xe}from"./NLink.vue.19da93af.js";import{_ as H}from"./NSectionBlock.e780f891.js";import{_ as ye}from"./NCodeBlock.vue.28dd841e.js";import{_ as ke}from"./HelpFab.vue.b3c1cf3a.js";import"./NIconTitle.vue.635c5682.js";import"./client.766a1bb7.js";const $e={key:0,"i-carbon:arrow-up-right":"","translate-y--1":"","text-xs":"",op50:""},J=S({__name:"NTextExternalLink",props:{link:{}},setup(b){return(n,c)=>(o(),M(ae(n.link?xe:"div"),oe(ne(n.link?{href:n.link,target:"_blank",rel:"noopener noreferrer"}:{})),{default:u(()=>[te(n.$slots,"default"),n.link?(o(),a("div",$e)):x("",!0)]),_:3},16))}}),K=[{name:"title",suggestion:"required",head:{title:"[title]"},seoMeta:{title:"[title]"},docs:"https://developer.mozilla.org/en-US/docs/Web/HTML/Element/title",description:"A concise and descriptive title for the browser that accurately summarizes the content of the page."},{name:"description",suggestion:"required",head:{meta:[{name:"description",content:"[description]"}]},seoMeta:{description:"[description]"},description:"A one to two sentence summary for search engines that includes relevant keywords to improve visibility in search results."},{name:"icon",suggestion:"recommended",head:{link:[{rel:"icon",type:"image/png",href:"/favicon.png"}]},description:"A small image that appears in the browser tab and bookmark menu to help users easily identify the page."},{name:"lang",suggestion:"recommended",head:{htmlAttrs:{lang:"en"}},description:"The primary language of the page to help search engines and browsers understand the content."},{name:"og:title",suggestion:"recommended",head:{meta:[{property:"og:title",content:"[og:title]"}]},seoMeta:{ogTitle:"[og:title]"},docs:"https://ogp.me/#metadata",description:"A title for the link preview used by social media platforms."},{name:"og:description",suggestion:"recommended",head:{meta:[{property:"og:description",content:"[og:description]"}]},seoMeta:{ogDescription:"[og:description]"},docs:"https://ogp.me/#metadata",description:"A description for the link preview used by social media platforms."},{name:"og:image",suggestion:"recommended",head:{meta:[{property:"og:image",content:"[og:image]"}]},seoMeta:{ogImage:"[og:image]"},docs:"https://ogp.me/#metadata",description:"An image for the link preview used by social media platforms."},{name:"og:url",suggestion:"recommended",head:{meta:[{property:"og:url",content:"[og:url]"}]},seoMeta:{ogUrl:"[og:url]"},docs:"https://ogp.me/#metadata",description:"A canonical URL for the link preview used to specify the preferred URL to display in search engine results and social media previews when multiple URLs may point to the same page."},{name:"twitter:title",suggestion:"recommended",head:{meta:[{name:"twitter:title",content:"[twitter:title]"}]},seoMeta:{twitterTitle:"[twitter:title]"},docs:"https://developer.twitter.com/en/docs/twitter-for-websites/cards/overview/abouts-cards",description:"A title for the Twitter card used to provide a preview of the content shared on the page."},{name:"twitter:description",suggestion:"recommended",head:{meta:[{name:"twitter:description",content:"[twitter:description]"}]},seoMeta:{twitterDescription:"[twitter:description]"},docs:"https://developer.twitter.com/en/docs/twitter-for-websites/cards/overview/abouts-cards",description:"A description for the Twitter card used to provide a preview of the content shared on the page."},{name:"twitter:image",suggestion:"recommended",head:{meta:[{name:"twitter:image",content:"[twitter:image]"}]},seoMeta:{twitterImage:"[twitter:image]"},docs:"https://developer.twitter.com/en/docs/twitter-for-websites/cards/overview/abouts-cards",description:"An image for the Twitter card used to provide a preview of the content shared on the page."},{name:"twitter:card",suggestion:"recommended",head:{meta:[{name:"twitter:card",content:"summary"}]},seoMeta:{twitterCard:"summary"},docs:"https://developer.twitter.com/en/docs/twitter-for-websites/cards/overview/abouts-cards",description:"The type of Twitter card to use, which determines the type of card to display in link previews on Twitter."}],Te={flex:"~ wrap","mt--2":"","w-full":"","flex-none":""},Ce=["onClick"],Se=t("div",{border:"b base","flex-auto":""},null,-1),Ne={key:0,"x-divider":""},Me={key:1,"x-divider":""},Oe={flex:"~ gap-1 items-center",px4:"",py2:""},Ae=t("div",{"i-carbon-warning":"","text-orange":""},null,-1),Re={"w-full":"",p2:"",op75:""},Ie={key:1,m4:"",flex:"~ col gap-2"},Be={flex:"~ gap-1 wrap items-center"},Ee={key:1},Le={flex:"~ gap-2",n:"sm primary",absolute:"","right-2":"","top-2":""},De=S({__name:"OpenGraphMissingTabs",props:{tags:{},matchedRouteFilepath:{}},setup(b){const n=b,c=C(()=>K.filter(s=>!n.tags?.some(p=>p.name===s.name))),l=C(()=>{let s={};const p={};c.value.forEach(g=>{g.seoMeta?Object.assign(p,g.seoMeta):s=se(s,g.head)});const v=[];if(Object.keys(p).length){const g=JSON.stringify(p,null,2).replace(/"([^"]+)":/g,"$1:").replace(/"/g,"'");v.push(`useSeoMeta(${g})`)}if(Object.keys(s).length){const g=JSON.stringify(s,null,2).replace(/"([^"]+)":/g,"$1:").replace(/"/g,"'");v.push(`useHead(${g})`)}return v.join(`
|
|
2
2
|
|
|
3
3
|
`)}),m=re(),y=V(),k=["Missing Tags","Code Snippet"],_=R(k[0]);return(s,p)=>{const v=J,g=z,N=ie,A=ye,E=H;return e(c).length?(o(),M(E,{key:0,text:"Missing Tags",description:`${e(c).length} missing tags`,icon:"carbon:warning-other","header-class":"text-orange op100! [[open]_&]:text-inherit",padding:!1},{default:u(()=>[t("div",Te,[(o(),a(T,null,I(k,(r,i)=>t("button",{key:i,px4:"",py2:"",border:"r t base",hover:"bg-active",class:O(r===e(_)?"":"border-b"),onClick:f=>_.value=r},[t("div",{class:O(r===e(_)?"":"op30"),capitalize:""},h(r),3)],10,Ce)),64)),Se]),e(_)===k[0]?(o(),M(g,{key:0,grid:"~ cols-[max-content_1fr]",m4:"","items-center":"","justify-between":"","of-hidden":""},{default:u(()=>[(o(!0),a(T,null,I(e(c),(r,i)=>(o(),a(T,{key:i},[i?(o(),a("div",Ne)):x("",!0),i?(o(),a("div",Me)):x("",!0),t("div",Oe,[Ae,d(v,{op50:"",link:r.docs,n:"orange"},{default:u(()=>[$(h(r.name),1)]),_:2},1032,["link"])]),t("div",Re,h(r.description),1)],64))),128))]),_:1})):(o(),a("div",Ie,[t("p",Be,[d(N,{icon:"carbon-copy",n:"xs","px-2":"",onClick:p[0]||(p[0]=r=>e(m)(e(l)))},{default:u(()=>[$(" Copy ")]),_:1}),$(" the following code snippet and paste it into your "),s.matchedRouteFilepath?(o(),M(N,{key:0,icon:"carbon-launch",n:"xs","px-2":"",onClick:p[1]||(p[1]=r=>e(y)(s.matchedRouteFilepath))},{default:u(()=>[$(" page component ")]),_:1})):(o(),a("span",Ee,"page component")),$(" to full fill the missing tags. ")]),d(g,{relative:"","n-code-block":""},{default:u(()=>[d(A,{code:e(l),lang:"ts",lines:!1,"w-full":"","of-auto":"",p3:""},null,8,["code"]),t("div",Le,[d(N,{icon:"carbon-copy",onClick:p[2]||(p[2]=r=>e(m)(e(l)))},{default:u(()=>[$(" Copy ")]),_:1})])]),_:1})]))]),_:1},8,["description"])):x("",!0)}}}),Fe={class:"max-w-[524px] min-w-[524px] cursor-pointer bg-base"},je={class:"break-words border border-base px-[12px] py-[10px] antialiased"},Pe={class:"overflow-hidden truncate whitespace-nowrap text-[12px] leading-[11px] uppercase op50"},Ue={class:"block h-[46px] max-h-[46px] border-separate select-none overflow-hidden break-words text-left",style:{"border-spacing":"0px"}},Ve={class:"mt-[3px] truncate pt-[2px] text-[16px] font-semibold leading-[20px]"},ze={class:"mt-[3px] block h-[18px] max-h-[80px] border-separate select-none overflow-hidden truncate whitespace-nowrap break-words text-left text-[14px] leading-[20px] op50",style:{"-webkit-line-clamp":"1","border-spacing":"0px","-webkit-box-orient":"vertical"}},Ge=S({__name:"SocialFacebook",props:{card:{}},setup(b){return(n,c)=>(o(),a("div",Fe,[t("div",{class:"h-[274px] border border-b-0 border-base bg-cover bg-center bg-no-repeat",style:B({backgroundImage:`url(${JSON.stringify(n.card.image)})`})},null,4),t("div",je,[t("div",Pe,h(n.card.url),1),t("div",Ue,[t("div",Ve,h(n.card.title),1),t("div",ze,h(n.card.description),1)])])]))}}),He={class:"max-w-[438px] min-w-[438px] of-hidden border border-base rounded-[16px] bg-base -outline-offset-1",style:{"font-family":"TwitterChirp, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif"}},Je={class:"break-words border-base p-[0.75em] antialiased",flex:"~ col justify-center gap-[2px]"},Ke={class:"overflow-hidden truncate whitespace-nowrap text-[15px] leading-[20px] lowercase op50"},qe={class:"m-0 truncate text-[15px] font-semibold leading-[20px]"},We={class:"line-clamp-2 select-none overflow-hidden break-words text-left text-[15px] leading-[20px] op50"},Ye=S({__name:"SocialTwitter",props:{tags:{}},setup(b){const n=b,c=C(()=>G(n.tags,{title:[{tag:"title"}],image:[{tag:"meta",name:"twitter:image"},{tag:"meta",name:"og:image"}],imageAlt:[{tag:"meta",name:"twitter:image:alt"}],description:[{tag:"meta",name:"twitter:description"},{tag:"meta",name:"description"}],favicon:[{tag:"link",name:"icon"}]})),l=C(()=>c.value.image?n.tags.find(m=>m.tag==="meta"&&m.name==="twitter:card")?.value||"summary_large_image":"summary");return(m,y)=>(o(),a("div",He,[t("div",{class:O(["cursor-pointer overflow-hidden leading-[1.3em]",e(l)==="summary_large_image"?"":"flex"]),hover:"bg-[#88888805]"},[e(l)==="summary_large_image"?(o(),a("div",{key:0,class:"h-[220px] border-b border-base bg-cover bg-center bg-no-repeat",style:B({backgroundImage:`url(${JSON.stringify(e(c).image)})`})},null,4)):(o(),a("div",{key:1,class:"h-[129px] w-[129px] flex-none border-r border-base bg-cover bg-center bg-no-repeat",style:B({backgroundImage:`url(${JSON.stringify(e(c).image)})`})},null,4)),t("div",Je,[t("div",Ke,h(e(c).url),1),t("div",qe,h(e(c).title),1),t("div",We,h(e(c).description),1)])],2)]))}}),Qe={class:"max-w-[520px] min-w-[520px] cursor-pointer overflow-hidden border border-base rounded-[2px] shadow-md bg-base"},Xe={class:"break-words p-[10px] antialiased"},Ze={class:"block h-auto max-h-[50px] border-separate select-none break-words text-left",style:{"border-spacing":"0px"}},et={class:"pb-[2px] text-[16px] font-semibold leading-[24px]"},tt={class:"overflow-hidden truncate whitespace-nowrap text-xs font-normal uppercase op85"},ot=S({__name:"SocialLinkedin",props:{card:{}},setup(b){return(n,c)=>(o(),a("div",Qe,[t("div",{class:"h-[270px] border-b border-base bg-cover bg-center bg-no-repeat",style:B({backgroundImage:`url(${JSON.stringify(n.card.image)})`})},null,4),t("div",Xe,[t("div",Ze,[t("div",et,h(n.card.title),1),t("div",tt,h(n.card.url),1)])])]))}}),nt={"h-full":"","w-520":"",flex:"~ col"},at={flex:"~ wrap","w-full":"","flex-none":""},st=["onClick"],rt=t("div",{border:"b base","flex-auto":""},null,-1),it={flex:"~ items-center justify-center","flex-auto":"",p4:"","n-panel-grids":""},ct={key:0},lt={key:1},dt={key:2},pt=S({__name:"SocialPreviewGroup",props:{tags:{}},setup(b){const n=b,c=["twitter","facebook","linkedin"],l=R(c[0]),m=C(()=>G(n.tags,{title:[{tag:"title"}],image:[{tag:"meta",name:"og:image"}],imageAlt:[{tag:"meta",name:"og:image:alt"}],description:[{tag:"meta",name:"og:description"},{tag:"meta",name:"description"}],favicon:[{tag:"link",name:"icon"}]}));return(y,k)=>{const _=Ge,s=Ye,p=ot;return o(),a("div",nt,[t("div",at,[(o(),a(T,null,I(c,(v,g)=>t("button",{key:g,px4:"",py2:"",border:"r base",hover:"bg-active",class:O(v===e(l)?"":"border-b"),onClick:N=>l.value=v},[t("div",{class:O(v===e(l)?"":"op30"),capitalize:""},h(v),3)],10,st)),64)),rt]),t("div",it,[e(l)==="facebook"?(o(),a("div",ct,[d(_,{card:e(m)},null,8,["card"])])):e(l)==="twitter"?(o(),a("div",lt,[d(s,{tags:y.tags},null,8,["tags"])])):e(l)==="linkedin"?(o(),a("div",dt,[d(p,{card:e(m)},null,8,["card"])])):x("",!0)])])}}}),mt={class:"markdown-body"},ut=ce('<h1>Open Graph</h1><p>Nuxt provides several different ways to manage your meta tags using <a href="https://unhead.harlanzw.com/" target="_blank" rel="noopener"><code>unhead</code></a>. Improve your Nuxt app’s SEO with powerful head config, composables and components.</p><p><a href="https://nuxt.com/docs/getting-started/seo-meta" target="_blank" rel="noopener">Learn more on the documentation</a></p><hr><p>You can also find how open graph specs are defined in:</p><ul><li><a href="https://ogp.me/" target="_blank" rel="noopener">The Open Graph protocol</a></li><li><a href="https://developer.twitter.com/en/docs/twitter-for-websites/cards/guides/getting-started" target="_blank" rel="noopener">Twitter Cards</a></li></ul>',6),gt=[ut],ht={__name:"open-graph",setup(b,{expose:n}){return n({frontmatter:{}}),(l,m)=>(o(),a("div",mt,gt))}},_t={flex:"~","h-full":"","w-full":"","of-hidden":""},ft={"h-full":"","flex-auto":"","of-auto":""},vt={"flex-none":"",flex:"~ gap2 items-center"},bt={flex:"~ col"},wt={key:0,"x-divider":""},xt={key:1,"x-divider":""},yt={mr2:"",px4:"",py2:""},At=S({__name:"open-graph",setup(b){const n=R(0),c=le(),l=de(async()=>(n.value,(await c.value?.resolveTags()).map(i=>{const f=i.props||{};return i.tag==="htmlAttrs"&&f.lang?{tag:"html",name:"lang",value:f.lang}:f.charset?{tag:"meta",name:"charset",value:f.charset}:{tag:i.tag,name:f.property??f.name??f.rel??i.tag,value:f.content??f.href??i.textContent??JSON.stringify(f)}})),[]),m=R(!0);function y(){n.value+=1}const k=pe(),_=me(),s=R(""),p=ue(),v=V();async function g(){s.value!==_.value.path&&k.value.push(s.value||"/")}const N=C(()=>s.value===_.value.path?[]:k.value.resolve(s.value||"/").matched),A=C(()=>{const r=p.value.find(i=>i.path===_.value?.matched?.[0]?.path);return r?.file||r?.meta?.file});function E(r){return K.find(i=>i.name===r.name)?.docs}return U(_).toBeTruthy().then(r=>{s.value=r.path}),U(k).toBeTruthy().then(r=>{r.afterEach(()=>{ge(()=>{s.value=_.value.path,setTimeout(y,200),setTimeout(y,800)})})}),(r,i)=>{const f=ve,L=be,q=we,P=J,W=z,Y=H,Q=De,X=pt,Z=ht,ee=ke,D=he("tooltip");return o(),a(T,null,[t("div",_t,[t("div",ft,[d(q,null,{search:u(()=>[d(f,{modelValue:e(s),"onUpdate:modelValue":i[0]||(i[0]=w=>_e(s)?s.value=w:null),placeholder:"Route",icon:"carbon-direction-right-01 scale-y--100",n:"primary","flex-auto":"","font-mono":"",class:O(["px-5 py-2",e(_)?.path===e(s)?"":e(N).length?"text-green":"text-orange"]),onKeydown:fe(g,["enter"])},null,8,["modelValue","class","onKeydown"])]),actions:u(()=>[t("div",vt,[e(A)?j((o(),M(L,{key:0,"text-lg":"",icon:"carbon:launch",title:"Open file in editor",onClick:i[1]||(i[1]=w=>e(v)(e(A)))},null,512)),[[D,"Open file in editor"]]):x("",!0),j(d(L,{"text-lg":"",icon:"carbon:reset",title:"Refresh Data",onClick:y},null,512),[[D,"Refresh Data"]]),j(d(L,{"text-lg":"",icon:e(m)?"carbon:side-panel-open":"carbon:open-panel-right",title:"Toggle Preview",onClick:i[2]||(i[2]=w=>m.value=!e(m))},null,8,["icon"]),[[D,"Toggle Preview"]])])]),_:1}),t("div",bt,[d(Y,{text:"Tags",icon:"carbon:tag-group"},{default:u(()=>[d(W,{grid:"~ cols-[max-content_1fr]","items-center":"","justify-between":"","of-hidden":""},{default:u(()=>[(o(!0),a(T,null,I(e(l),(w,F)=>(o(),a(T,{key:F},[F?(o(),a("div",wt)):x("",!0),F?(o(),a("div",xt)):x("",!0),t("div",yt,[d(P,{op50:"",link:E(w),n:"primary"},{default:u(()=>[$(h(w.name),1)]),_:2},1032,["link"])]),d(P,{link:w.value.match(/^https?:\/\//)?w.value:void 0,"w-full":"",p2:"","font-mono":"",n:"primary"},{default:u(()=>[$(h(w.value),1)]),_:2},1032,["link"])],64))),128))]),_:1})]),_:1}),d(Q,{tags:e(l),"matched-route-filepath":e(A)},null,8,["tags","matched-route-filepath"])])]),e(m)&&e(l)?.length?(o(),M(X,{key:0,tags:e(l),border:"l base","w-540px":"","flex-none":""},null,8,["tags"])):x("",!0)]),d(ee,null,{default:u(()=>[d(Z)]),_:1})],64)}}});export{At as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as L,aq as R,a7 as $,aE as A,a_ as M,a$ as T,N as E,a as w,h as p,j as o,A as O,o as s,f as e,m as l,k as t,i,t as d,p as c,F as m,b0 as x,b1 as P,v as n,B as F,D as W,x as G,C as H}from"./entry.
|
|
1
|
+
import{d as L,aq as R,a7 as $,aE as A,a_ as M,a$ as T,N as E,a as w,h as p,j as o,A as O,o as s,f as e,m as l,k as t,i,t as d,p as c,F as m,b0 as x,b1 as P,v as n,B as F,D as W,x as G,C as H}from"./entry.2f74e286.js";import{_ as K}from"./Badge.efa8b534.js";import{u as q,_ as U}from"./state-modules.a4af1949.js";import{_ as z}from"./NTip.vue.eef318b6.js";import{u as J}from"./state-components.7549d0ff.js";import"./NCodeBlock.vue.28dd841e.js";import"./client.766a1bb7.js";import"./NCheckbox.vue.e6a37232.js";const Q="0.8.3",X={key:0},Y={key:1,flex:"~ col gap2",ma:"","h-full":"","max-w-300":"","w-full":"",p5:"",px5:"","md:px20":""},Z=t("div",{"flex-auto":""},null,-1),tt={flex:"~ col","mt-5":"","items-center":"","md:mt-20":""},et={flex:"~","mt--10":"","items-center":"","justify-center":""},ot={mb6:"","mt--1":"","text-center":"","text-sm":"",flex:"~ gap-1 wrap"},st=t("span",{op40:""}," Nuxt DevTools ",-1),nt={op40:""},it={flex:"~ gap2 wrap"},at={p4:"","theme-card-green":"",flex:"~ col auto"},lt=t("div",{"logos-nuxt-icon":"","text-3xl":""},null,-1),dt={key:0,p4:"","theme-card-green":"",flex:"~ col auto"},ct=t("div",{"logos-vue":"","text-3xl":""},null,-1),rt=t("div",{"carbon-tree-view-alt":"","text-3xl":""},null,-1),ut=t("div",{"i-carbon-assembly-cluster":"","text-3xl":""},null,-1),_t=t("div",{"carbon-function":"","text-3xl":""},null,-1),pt=t("div",{"carbon-3d-mpr-toggle":"","text-3xl":""},null,-1),mt=t("div",{"carbon-plug":"","text-3xl":""},null,-1),ht={key:5,"pointer-events-none":"","min-w-40":"",p4:"","theme-card-lime":"",flex:"~ auto gap-6"},xt=t("div",{"i-carbon-time-plot":"","flex-none":"","text-3xl":""},null,-1),ft={grid:"~ cols-[auto_auto] gap-x-5 items-center"},vt=t("div",{"text-sm":""}," SSR to full load ",-1),gt={"text-right":""},kt=t("div",{"text-sm":""}," Page load ",-1),bt={"text-right":""},wt=t("div",{"text-sm":""}," Navigation ",-1),yt={"text-right":""},Ct=t("div",{"text-sm":""}," HMR ",-1),St={"text-right":""},Dt={flex:"~ col gap2"},Nt={flex:"~ gap-6 wrap","mt-5":"","items-center":"","justify-center":""},Bt=t("a",{href:"https://github.com/nuxt/devtools",target:"_blank",flex:"~ gap1","items-center":"",op50:"",hover:"op100 text-blue",transition:""},[t("div",{"i-carbon-star":""}),n(" Star on GitHub ")],-1),It=t("a",{href:"https://github.com/nuxt/devtools/discussions/29",target:"_blank",flex:"~ gap1","items-center":"",op50:"",hover:"op100 text-yellow",transition:""},[t("div",{"i-carbon-data-enrichment":""}),n(" Ideas & Suggestions ")],-1),Vt=t("a",{href:"https://github.com/nuxt/devtools/discussions/31",target:"_blank",flex:"~ gap1","items-center":"",op50:"",hover:"op100 text-lime",transition:""},[t("div",{"i-carbon-plan":""}),n(" Project Roadmap ")],-1),jt=t("a",{href:"https://github.com/nuxt/devtools/issues",target:"_blank",flex:"~ gap1","items-center":"",op50:"",hover:"op100 text-rose",transition:""},[t("div",{"i-carbon-debug":""}),n(" Bug Reports ")],-1),Lt=t("div",{"i-carbon-settings-adjust":""},null,-1),Rt=t("div",{"flex-auto":""},null,-1),$t={flex:"col gap-2",mxa:"",hidden:"","w-100":"","text-sm":"",op50:"","md:flex":""},At={flex:"~ gap-1","items-center":""},Mt=t("span",null,"+",-1),Tt=t("span",null,"+",-1),Et=t("div",{"flex-auto":""},null,-1),Ot={flex:"~ gap-1","items-center":""},Pt=t("span",null,"+",-1),Ft=t("span",null,"+",-1),Wt=t("span",null,"+",-1),Gt=t("span",null,"+",-1),Ht=t("div",{"flex-auto":""},null,-1),Kt=t("div",null,"Toggle DevTools",-1),oe=L({__name:"overview",setup(qt){const f=R(),_=$(),y=J(),v=A(),C=q(),S=M(),g=T(),D=E();function N(){F.value=!0,D.push("/")}const k=w(()=>f.value?.nuxt.vueApp.version),a=w(()=>f.value?.metrics.loading());return(r,Ut)=>{const B=W,I=K,b=U,h=G,V=z,u=H,j=O;return s(),p(j,{"h-screen":"","w-full":"",flex:""},{default:o(()=>[e(_)?(s(),l("div",Y,[Z,t("div",tt,[t("div",et,[i(B,{"h-14":"","md:h-18":""}),t("button",{"mr--16":"","mt--6":"",onClick:N},[i(I,{"bg-green-400:10":"","text-green-400":"",title:"preview",textContent:"preview"})])]),t("div",ot,[st,t("code",nt,"v"+d(e(Q)),1),i(b,{"package-name":"@nuxt/devtools",options:{dev:!0},"show-version":!1})])]),t("div",it,[t("div",at,[lt,i(b,{"package-name":"nuxt",options:{dev:!0}})]),e(k)?(s(),l("div",dt,[ct,t("code",null,"v"+d(e(k)),1)])):c("",!0),e(_)?(s(),l(m,{key:1},[e(_)&&e(_).pages&&e(f)?(s(),p(h,{key:0,"min-w-40":"",p4:"","theme-card-lime":"",flex:"~ col auto",to:"/modules/pages"},{default:o(()=>[rt,t("div",null,d(e(S).length)+" pages",1)]),_:1})):c("",!0),e(_)?(s(),p(h,{key:1,"min-w-40":"",p4:"","theme-card-lime":"",flex:"~ col auto",to:"/modules/components"},{default:o(()=>[ut,t("div",null,d(e(y).length)+" components",1)]),_:1})):c("",!0),e(_)&&e(v)?(s(),p(h,{key:2,"min-w-40":"",p4:"","theme-card-yellow":"",flex:"~ col auto",to:"/modules/imports"},{default:o(()=>[_t,t("div",null,d(e(v).imports.length)+" imports",1)]),_:1})):c("",!0),e(_)?(s(),p(h,{key:3,"min-w-40":"",p4:"","theme-card-purple":"",flex:"~ col auto",to:"/modules/modules"},{default:o(()=>[pt,t("div",null,d(e(C).length)+" modules",1)]),_:1})):c("",!0),e(_)?(s(),p(h,{key:4,"min-w-40":"",p4:"","theme-card-teal":"",flex:"~ col auto",to:"/modules/plugins"},{default:o(()=>[mt,t("div",null,d(e(_).plugins.length)+" plugins",1)]),_:1})):c("",!0),e(a)?(s(),l("div",ht,[xt,t("div",ft,[e(a).ssrStart?(s(),l(m,{key:0},[vt,t("div",gt,d(("formatDuration"in r?r.formatDuration:e(x))(e(a).appLoad-e(a).ssrStart)),1)],64)):c("",!0),kt,t("div",bt,d(("formatDuration"in r?r.formatDuration:e(x))(e(a).appLoad-e(a).appInit)),1),wt,t("div",yt,d(("formatDuration"in r?r.formatDuration:e(x))(e(a).pageEnd-e(a).pageStart)),1),e(a).hmrStart?(s(),l(m,{key:1},[Ct,t("div",St,d(("formatDuration"in r?r.formatDuration:e(x))(e(a).hmrEnd-e(a).hmrStart)),1)],64)):c("",!0)])])):c("",!0)],64)):c("",!0)]),t("div",Dt,[("showConnectionWarning"in r?r.showConnectionWarning:e(P))?(s(),p(V,{key:0,n:"yellow5",icon:"carbon-unlink","justify-center":""},{default:o(()=>[n(" Not connected to the client app, showing server-side data only. Use the embedded mode for full features. ")]),_:1})):c("",!0)]),t("div",Nt,[Bt,It,Vt,jt,i(h,{to:"/settings",flex:"~ gap1","inline-block":"","items-center":"",op50:"","hover:op80":""},{default:o(()=>[Lt,n(" Settings ")]),_:1})]),Rt,t("div",$t,[t("div",At,[e(g)?(s(),l(m,{key:0},[i(u,{n:"xs",class:"px2"},{default:o(()=>[n(" ⌘ Cmd ")]),_:1}),Mt,i(u,{n:"xs",class:"px2"},{default:o(()=>[n(" K ")]),_:1})],64)):(s(),l(m,{key:1},[i(u,{n:"xs",class:"px2"},{default:o(()=>[n(" Ctrl ")]),_:1}),Tt,i(u,{n:"xs",class:"px2"},{default:o(()=>[n(" K ")]),_:1})],64)),Et,n(" Open Command Palette ")]),t("div",Ot,[e(g)?(s(),l(m,{key:0},[i(u,{n:"xs",class:"px2"},{default:o(()=>[n(" ⇧ Shift ")]),_:1}),Pt,i(u,{n:"xs",class:"px2"},{default:o(()=>[n(" ⌥ Option ")]),_:1}),Ft,i(u,{n:"xs",class:"px2"},{default:o(()=>[n(" D ")]),_:1})],64)):(s(),l(m,{key:1},[i(u,{n:"xs",class:"px2"},{default:o(()=>[n(" Shift ")]),_:1}),Wt,i(u,{n:"xs",class:"px2"},{default:o(()=>[n(" Alt ")]),_:1}),Gt,i(u,{n:"xs",class:"px2"},{default:o(()=>[n(" D ")]),_:1})],64)),Ht,Kt])])])):(s(),l("div",X," Loading... "))]),_:1})}}});export{oe as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as I,r as A,a as R,al as O,f as t,o,m as s,k as e,t as $,h as v,j as k,b7 as W,F as _,n as B,p as y,i as p,v as P,E,U as M,C as J,a6 as q,b8 as D,aW as H,aX as X,a7 as Y,ah as Z,aY as G,aZ as L,au as Q,l as ee,aa as te,J as oe,K as ne}from"./entry.
|
|
1
|
+
import{d as I,r as A,a as R,al as O,f as t,o,m as s,k as e,t as $,h as v,j as k,b7 as W,F as _,n as B,p as y,i as p,v as P,E,U as M,C as J,a6 as q,b8 as D,aW as H,aX as X,a7 as Y,ah as Z,aY as G,aZ as L,au as Q,l as ee,aa as te,J as oe,K as ne}from"./entry.2f74e286.js";import{_ as S}from"./Badge.efa8b534.js";import{_ as F}from"./FilepathItem.vue.253590ec.js";import{_ as ae}from"./NSectionBlock.e780f891.js";import{_ as se}from"./LaunchPage.vue.45c2e269.js";import{_ as re}from"./HelpFab.vue.b3c1cf3a.js";import"./NIconTitle.vue.635c5682.js";import"./NMarkdown.vue.283d6615.js";import"./client.766a1bb7.js";const le={block:"","cursor-pointer":""},ie={p2:""},ue=["onSubmit"],ce=e("div",{px2:"","text-sm":"",op50:""}," Fill params and navigate: ",-1),de={flex:"~","items-center":"",p2:"","text-sm":"","font-mono":""},pe={key:1},he=I({__name:"RoutePathItem",props:{route:{}},emits:["navigate"],setup(V,{emit:d}){const i=V,h=A([]),m=R(()=>{const u=b(i.route.path);return h.value=Array.from({length:u.length},()=>""),u});function b(u){return u.split(/(:\w+[\?\*]?(?:\(\))?)/).filter(Boolean).map(c=>c[0]===":"?c.replace(/\(\)$/,"?"):c)}const w=R(()=>m.value.map((u,c)=>u[0]===":"?h.value[c]:u).join("").replace(/\/+/g,"/")),r=R(()=>i.route.path.includes(":"));function a(){d("navigate",w.value)}return(u,c)=>{const C=M,n=J,l=O("VDropdown");return t(r)?(o(),v(l,{key:1},{popper:k(({hide:f})=>[e("div",ie,[e("form",{flex:"~ col",onSubmit:W(()=>{a(),f()},["prevent"])},[t(r)?(o(),s(_,{key:0},[ce,e("div",de,[(o(!0),s(_,null,B(t(m),(g,x)=>(o(),s(_,{key:x},[g[0]===":"?(o(),v(C,{key:0,modelValue:t(h)[x],"onUpdate:modelValue":T=>t(h)[x]=T,"w-20":"","n-sm":"",placeholder:g.slice(1)},null,8,["modelValue","onUpdate:modelValue","placeholder"])):(o(),s("span",pe,$(g),1))],64))),128))])],64)):y("",!0),p(n,{block:"",n:"primary"},{default:k(()=>[P(" Navigate ")]),_:1})],40,ue)])]),default:k(()=>[e("code",le,[(o(!0),s(_,null,B(t(m),(f,g)=>(o(),s("span",{key:g,class:E(f[0]===":"?"text-gray border border-dashed rounded border-gray:50 px1":"")},$(f[0]===":"?f.slice(1):f),3))),128))])]),_:1})):(o(),s("button",{key:0,onClick:a},[e("code",null,$(u.route.path),1)]))}}}),_e={"w-full":""},me=e("thead",{border:"b base"},[e("tr",null,[e("th",{"text-left":""}),e("th",{"text-left":""}," Route Path "),e("th",{"text-left":""}," Name "),e("th",{"text-left":""}," Middleware "),e("th",null," Layout ")])],-1),fe={"w-20":"","pr-1":""},ge={flex:"","items-center":"","justify-end":""},ve={"text-sm":""},ye={flex:"inline gap3","items-center":""},be={op0:"","group-hover:op100":"",flex:"~ gap1"},xe=["onClick"],ke=e("div",{"i-carbon-script-reference":""},null,-1),$e=[ke],we={"w-0":"","ws-nowrap":"","pr-1":"","text-left":"","text-sm":"","font-mono":"",op50:""},Ce={"w-0":"","ws-nowrap":"","pr-1":"","text-center":"","text-sm":"","font-mono":"",op50:""},Ne={"w-0":"","ws-nowrap":"","text-center":"","text-sm":"","font-mono":""},Re={key:0},Ve=["onClick"],Pe=I({__name:"RoutesTable",props:{pages:{},layouts:{},matched:{},matchedPending:{}},emits:["navigate"],setup(V){const d=V,i=q(),h=D(),m=R(()=>[...d.pages].sort((r,a)=>r.path.localeCompare(a.path)));function b(r){const a=d.layouts.find(u=>u.name===r);a&&i(a.file)}function w(r){if(typeof r=="string")return h.value?.middleware.find(a=>a.name===r)?.path}return(r,a)=>{const u=S,c=he,C=F;return o(),s("div",null,[e("table",_e,[me,e("tbody",null,[(o(!0),s(_,null,B(t(m),n=>(o(),s("tr",{key:n.name,class:"group","h-7":"",border:"b dashed transparent hover:base"},[e("td",fe,[e("div",ge,[r.matched.find(l=>l.name===n.name)?(o(),v(u,{key:0,"bg-green-400:10":"","text-green-400":"",title:"active",textContent:"active"})):y("",!0),r.matchedPending.find(l=>l.name===n.name)?(o(),v(u,{key:1,"bg-teal-400:10":"","text-teal-400":"",title:"next",textContent:"next"})):y("",!0)])]),e("td",ve,[e("div",ye,[p(c,{route:n,class:E(r.matched.find(l=>l.name===n.name)?"text-primary":r.matchedPending.find(l=>l.name===n.name)?"text-teal":""),onNavigate:a[0]||(a[0]=l=>r.$emit("navigate",l))},null,8,["route","class"]),e("div",be,[n.file||n.meta?.file?(o(),s("button",{key:0,"text-sm":"",op40:"",hover:"op100 text-primary",title:"Open in editor",onClick:l=>t(i)(n.file||n.meta?.file)},$e,8,xe)):y("",!0)])])]),e("td",we,$(n.name),1),e("td",Ce,[p(C,{filepath:w(n.meta.middleware),override:`${n.meta.middleware||"-"}`},null,8,["filepath","override"])]),e("td",Ne,[n.meta.layout===!1?(o(),s("span",Re,"-")):n.meta.layout?(o(),s("button",{key:1,onClick:l=>b(n.meta.layout)},$(n.meta.layout),9,Ve)):(o(),s("button",{key:2,"text-sm":"",op15:"",onClick:a[1]||(a[1]=l=>b("default"))}," (default) "))])]))),128))])])])}}}),Be={class:"markdown-body"},Te=e("h1",null,"Pages",-1),Ie=e("p",null,[P("One core feature of Nuxt is the file system router. Every Vue file inside the "),e("code",null,"pages/"),P(" directory creates a corresponding URL (or route) that displays the contents of the file. By using dynamic imports for each page, Nuxt leverages code-splitting to ship the minimum amount of JavaScript for the requested route.")],-1),Ee=e("p",null,[e("a",{href:"https://nuxt.com/docs/getting-started/routing",target:"_blank",rel:"noopener"},"Learn more on the documentation")],-1),Le=e("hr",null,null,-1),Ae=e("h1",null,"Middlewares",-1),Me=e("p",null,"Nuxt provides a customizable route middleware framework you can use throughout your application, ideal for extracting code that you want to run before navigating to a particular route.",-1),De=e("p",null,[e("a",{href:"https://nuxt.com/docs/guide/directory-structure/middleware",target:"_blank",rel:"noopener"},"Learn more on the documentation")],-1),Se=[Te,Ie,Ee,Le,Ae,Me,De],Fe={__name:"pages",setup(V,{expose:d}){return d({frontmatter:{}}),(h,m)=>(o(),s("div",Be,Se))}},Ue={key:0,"h-full":"","of-auto":""},Ke={border:"b base",flex:"~ col gap1",px4:"",py3:"","navbar-glass":""},je=e("span",{op50:""},"Navigate from ",-1),ze={"font-mono":""},Oe=e("span",{op50:""}," to ",-1),We={key:1,op50:""},Je=e("span",null,[P("Press "),e("b",{"font-bold":""},"Enter"),P(" to navigate")],-1),qe={key:0,"text-orange":"",op75:""},He={key:1,op50:""},Xe={"w-full":""},Ye=e("thead",{border:"b base","h-7":""},[e("tr",null,[e("th",{"text-left":""}," Name "),e("th",{"text-left":""}," Path ")])],-1),Ze={mr1:""},lt=I({__name:"pages",setup(V){const d=H(),i=X(),h=Y(),m=D(),b=Z(),w=G(),r=R(()=>m.value?.middleware||[]),a=A("");L(i).toBeTruthy().then(n=>{a.value=n.path}),L(d).toBeTruthy().then(n=>{n.afterEach(()=>{Q(()=>{a.value=i.value.path})})});async function u(){a.value!==i.value.path&&d.value.push(a.value||"/")}const c=R(()=>a.value===i.value.path?[]:d.value.resolve(a.value||"/").matched);function C(n){d.value.push(n)}return(n,l)=>{const f=M,g=Pe,x=ae,T=S,U=F,K=se,j=Fe,z=re;return o(),s(_,null,[t(h)?.pages&&t(d)?(o(),s("div",Ue,[e("div",Ke,[e("div",null,[t(i).path!==t(a)?(o(),s(_,{key:0},[je,e("span",ze,$(t(i).path),1),Oe],64)):(o(),s("span",We,"Current route"))]),p(f,{modelValue:t(a),"onUpdate:modelValue":l[0]||(l[0]=N=>ee(a)?a.value=N:null),"font-mono":"",icon:"carbon-direction-right-01 scale-y--100",class:E(t(i).path===t(a)?"":t(c).length?"text-green":"text-orange"),onKeydown:te(u,["enter"])},null,8,["modelValue","class","onKeydown"]),e("div",null,[t(i).path!==t(a)?(o(),s(_,{key:0},[Je,t(c).length?y("",!0):(o(),s("span",qe," (no match)"))],64)):(o(),s("span",He,"Edit path above to navigate"))])]),t(c).length?(o(),v(x,{key:0,icon:"carbon-tree-view",text:"Matched Routes",padding:!1},{default:k(()=>[p(g,{pages:t(c),layouts:t(b)||[],matched:[],"matched-pending":t(c),onNavigate:C},null,8,["pages","layouts","matched-pending"])]),_:1})):y("",!0),p(x,{icon:"carbon-tree-view-alt",text:"All Routes",description:`${t(w).length} routes registered in your application`,padding:"pr5"},{default:k(()=>[p(g,{pages:t(w),layouts:t(b)||[],matched:t(i).matched,"matched-pending":t(c),onNavigate:C},null,8,["pages","layouts","matched","matched-pending"])]),_:1},8,["description"]),t(r).length?(o(),v(x,{key:1,icon:"carbon:ibm-watson-studio",text:"Middleware",description:`${t(r).length} middleware registered in your application`,padding:"px13"},{default:k(()=>[e("table",Xe,[Ye,(o(!0),s(_,null,B(t(r),N=>(o(),s("tr",{key:N.path,"h-7":""},[e("td",null,[e("span",Ze,$(N.name),1),N.global?(o(),v(T,{key:0,"bg-green-400:10":"","text-green-400":"",title:"Registered at runtime as a global component",textContent:"global"})):y("",!0)]),e("td",null,[p(U,{filepath:N.path},null,8,["filepath"])])]))),128))])]),_:1},8,["description"])):y("",!0)])):(o(),v(K,{key:1,icon:"carbon-tree-view-alt",title:"Nuxt Routing",description:"Create `./pages/index.vue` to enable routing",actions:[{label:"Learn more",src:"https://nuxt.com/docs/getting-started/routing",attrs:{n:"primary"}},{label:"Enable Routing",async handle(){return("rpc"in n?n.rpc:t(oe)).runWizard(await("ensureDevAuthToken"in n?n.ensureDevAuthToken:t(ne))(),"enablePages")}}]},null,8,["actions"])),p(z,null,{default:k(()=>[p(j)]),_:1})],64)}}});export{lt as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as y}from"./StateEditor.vue.
|
|
1
|
+
import{_ as y}from"./StateEditor.vue.83907c9e.js";import{d as v,o as e,m as c,F as k,n as N,h as m,j as a,a5 as B,aQ as R,aR as w,k as x,aq as F,a as O,a9 as P,f as r,i as o,p as u,v as V,H as j,C as E,_ as H}from"./entry.2f74e286.js";import{_ as A}from"./NSectionBlock.e780f891.js";import{_ as G}from"./HelpFab.vue.b3c1cf3a.js";import"./DataSchemaButton.vue.dabda5da.js";import"./json-editor-vue.87488a70.js";import"./NIconTitle.vue.635c5682.js";const K={key:0,flex:"~ col gap-1"},T={key:1,mt2:"",px4:"",italic:"",op35:""},q=v({__name:"StateGroup",props:{state:{},prefix:{default:""}},setup(f){return(t,n)=>{const i=y;return e(),c("div",null,[t.state&&Object.keys(t.state).length>0?(e(),c("div",K,[(e(!0),c(k,null,N(t.state,(l,s)=>(e(),m(i,{key:s,state:l,name:s.startsWith(t.prefix)?s.slice(t.prefix.length):s},{actions:a(_=>[B(t.$slots,"actions",R(w(_)))]),_:2},1032,["state","name"]))),128))])):(e(),c("div",T," No data "))])}}}),z={class:"markdown-body"},I=x("h1",null,"State & Async Data",-1),L=x("p",null,"// TODO",-1),Q=[I,L],W={__name:"payload",setup(f,{expose:t}){return t({frontmatter:{}}),(i,l)=>(e(),c("div",z,Q))}},J={key:0},at=v({__name:"payload",setup(f){const t=F(),n=O(()=>t.value?.nuxt.payload);async function i(l){await t.value?.nuxt.hooks.callHookParallel("app:data:refresh",l)}return(l,s)=>{const _=q,d=A,$=E,b=H,S=y,g=W,C=G,D=P("tooltip");return e(),c(k,null,[r(t)?(e(),c("div",J,[o(d,{icon:"carbon-data-set",text:"State",description:"Keyed state from `useState`",padding:!1},{default:a(()=>[o(_,{state:r(n).state,prefix:"$s"},null,8,["state"])]),_:1}),o(d,{icon:"carbon-data-blob",text:"Data",description:"Keyed state from `useAsyncData`",padding:!1},{actions:a(()=>[o($,{n:"xs primary","self-start":"",icon:"i-carbon-recycle",onClick:s[0]||(s[0]=h=>i())},{default:a(()=>[V(" Re-fetch all data ")]),_:1})]),default:a(()=>[o(_,{state:r(n).data},{actions:a(({isOpen:h,name:p})=>[h&&p?j((e(),m(b,{key:0,title:`Re-fetch '${p}'`,icon:"carbon-recycle",onClick:M=>i([p])},null,8,["title","onClick"])),[[D,`Re-fetch '${p}'`,void 0,{bottom:!0}]]):u("",!0)]),_:1},8,["state"])]),_:1}),r(n).functions&&Object.keys(r(n).functions).length?(e(),m(d,{key:0,icon:"carbon-function",text:"Functions",description:"State for functions (experimental)"},{default:a(()=>[o(S,{"ml--6":"",state:r(n).functions},null,8,["state"])]),_:1})):u("",!0)])):u("",!0),o(C,null,{default:a(()=>[o(g)]),_:1})],64)}}});export{at as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as w}from"./FilepathItem.vue.
|
|
1
|
+
import{_ as w}from"./FilepathItem.vue.253590ec.js";import{_ as D}from"./Badge.efa8b534.js";import{_ as C}from"./DurationDisplay.vue.73c682ac.js";import{d as v,a7 as B,a as x,b6 as V,o as n,m,k as t,t as P,i as l,f,h as u,p as d,al as E,a5 as N,a0 as F,q as H,j as h,v as y,b8 as I,aq as W,F as k,n as j,E as q}from"./entry.2f74e286.js";import{_ as L}from"./NSectionBlock.e780f891.js";import{_ as M}from"./HelpFab.vue.b3c1cf3a.js";import"./NIconTitle.vue.635c5682.js";const z={flex:"~ gap2","items-center":""},A={w8:"","text-right":"","text-sm":"",op25:""},R={key:0,"flex-auto":"","text-right":""},Y=v({__name:"PluginItem",props:{plugin:{},index:{}},setup(p){const e=p,a=B(),r=x(()=>V(e.plugin.src,a.value?.rootDir||"").path);return(i,c)=>{const _=w,o=D,s=C;return n(),m("div",z,[t("div",A,P(i.index),1),l(_,{filepath:e.plugin.src,subpath:!0},null,8,["filepath"]),t("div",null,[f(r).startsWith("#")?(n(),u(o,{key:0,"bg-rose-400:10":"","text-rose":"",textContent:"virtual"})):f(r).startsWith(".")?d("",!0):(n(),u(o,{key:1,"bg-gray-400:10":"","text-gray":"",textContent:"module"})),i.plugin.mode==="server"?(n(),u(o,{key:2,"bg-teal-400:10":"","text-teal-400":"",textContent:"server"})):d("",!0),i.plugin.mode==="client"?(n(),u(o,{key:3,"bg-orange-400:10":"","text-orange-400":"",textContent:"client"})):d("",!0)]),i.plugin.metric?.duration!=null?(n(),m("div",R,[l(s,{duration:i.plugin.metric?.duration,factor:10},null,8,["duration"])])):d("",!0)])}}}),G={class:"n-tip n-tip-base",flex:"~ col items-start","mx--4":"",px4:"",py4:""},J={flex:"~ items-center gap-1","font-bold":""},K=v({__name:"HelpTip",props:{title:{},icon:{}},setup(p){return(e,a)=>{const r=F,i=E("ContentSlot");return n(),m("div",G,[t("div",J,[e.icon?(n(),u(r,{key:0,icon:e.icon,class:"n-tip-icon"},null,8,["icon"])):d("",!0),t("div",null,P(e.title),1)]),t("div",null,[N(e.$slots,"default",{},()=>[l(i,{use:e.$slots.default,unwrap:"p"},null,8,["use"])])])])}}}),O={};function Q(p,e){const a=K;return n(),u(a,{title:"Performance Tip",icon:"carbon-meter",n:"lime6 dark:lime5"},{default:h(()=>[N(p.$slots,"default")]),_:3})}const U=H(O,[["render",Q]]),X={class:"markdown-body"},Z=t("h1",null,"Plugins",-1),tt=t("p",null,[y("Nuxt plugins allows you to extend the functionality of Nuxt runtime and the Vue instance. You can add plugins to the "),t("code",null,"plugins/"),y(" directory and they will be automatically imported and registered.")],-1),et=t("p",null,[t("a",{href:"https://nuxt.com/docs/guide/directory-structure/plugins",target:"_blank",rel:"noopener"},"Learn more on the documentation")],-1),nt={__name:"plugins",setup(p,{expose:e}){return e({frontmatter:{}}),(r,i)=>{const c=U;return n(),m("div",X,[Z,tt,l(c,null,{default:h(()=>[y(" Plugins runs before your application at runtime, the time each plugin cost will directly affect your application's initial loading time. ")]),_:1}),et])}}},ot={pt4:""},st={class:"text-sm",flex:"~ gap-1 items-center justify-start","mt-3":""},it=t("div",{"i-carbon-timer":"","text-lg":"",op75:""},null,-1),at=t("span",{op50:""},"Total execution time:",-1),dt=v({__name:"plugins",setup(p){const e=I(),a=W(),r=x(()=>{const c=e.value?.plugins||[],_=a.value?.metrics.clientPlugins()||[];return c.map(o=>{const s=typeof o=="string"?{src:o}:o;return{...s,metric:_.find(g=>g.src===s.src||g.src.startsWith(s.src))}})}),i=x(()=>{const c=a.value?.metrics.clientPlugins()||[],_=Math.min(...c.map(s=>s.start));return Math.max(...c.map(s=>s.end))-_});return(c,_)=>{const o=Y,s=C,g=L,S=nt,T=M;return n(),m(k,null,[l(g,{icon:"carbon-plug",text:"Plugins",description:`Total plugins: ${f(r).length}`},{default:h(()=>[t("div",ot,[(n(!0),m(k,null,j(f(r),($,b)=>(n(),u(o,{key:$.src,plugin:$,index:b+1,"ml--4":"","border-base":"",py2:"",class:q(b?"border-t":"")},null,8,["plugin","index","class"]))),128)),t("div",st,[it,at,l(s,{duration:f(i),factor:10},null,8,["duration"])])])]),_:1},8,["description"]),l(T,null,{default:h(()=>[l(S)]),_:1})],64)}}});export{dt as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as C}from"./StateEditor.vue.
|
|
1
|
+
import{_ as C}from"./StateEditor.vue.83907c9e.js";import{_ as h}from"./NSectionBlock.e780f891.js";import{o as c,m as r,k as u,d as v,aq as x,a7 as b,a as m,f as o,i as e,j as s,p as k,F as y}from"./entry.2f74e286.js";import{_ as R}from"./HelpFab.vue.b3c1cf3a.js";import"./DataSchemaButton.vue.dabda5da.js";import"./json-editor-vue.87488a70.js";import"./NIconTitle.vue.635c5682.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,4 +1,4 @@
|
|
|
1
|
-
import{r as L,bb as Me,aw as Fe,au as He,w as _e,bc as ze,bd as We,d as re,be,o,m as p,k as d,E,h as C,f as e,bf as le,t as j,p as D,v as F,a3 as Ge,a5 as ee,F as R,n as A,a0 as ce,a4 as Je,a as V,i as f,j as k,U as ke,C as Ce,bg as Ke,a7 as Qe,as as de,a6 as Xe,av as Ye,e as Ze,a9 as xe,l as te,H as ae,ap as et,_ as we,A as $e,bh as tt,bi as ot,ad as nt,R as st,bj as lt,ak as at}from"./entry.102d44fe.js";import{_ as rt}from"./Navbar.vue.454bbdad.js";import{_ as Se}from"./Badge.3c6fa035.js";import{_ as Te}from"./NSelect.vue.120a17c7.js";import{_ as it}from"./NCheckbox.vue.d47be8e5.js";import{u as Ve,_ as ut}from"./storage-options.f78173e7.js";import{_ as dt}from"./DataSchemaButton.vue.9ced8093.js";import{_ as ct}from"./NCodeBlock.vue.cd0d52ca.js";import{C as ye,S as Re}from"./constants.4e5eba24.js";import{U as pt}from"./json-editor-vue.28570b6b.js";import{_ as ft}from"./NSectionBlock.2eb550f4.js";import{_ as mt}from"./DrawerRight.vue.8980fc15.js";import"./client.ecec2ff5.js";import"./NIconTitle.vue.590f73cc.js";const se=/^[\u0009\u0020-\u007E\u0080-\u00FF]+$/;function vt(r,h){if(typeof r!="string")throw new TypeError("argument str must be a string");const m={},w=(h||{}).decode||gt;let _=0;for(;_<r.length;){const t=r.indexOf("=",_);if(t===-1)break;let y=r.indexOf(";",_);if(y===-1)y=r.length;else if(y<t){_=r.lastIndexOf(";",t-1)+1;continue}const u=r.slice(_,t).trim();if(m[u]===void 0){let i=r.slice(t+1,y).trim();i.codePointAt(0)===34&&(i=i.slice(1,-1)),m[u]=yt(i,w)}_=y+1}return m}function ge(r,h,m){const n=m||{},w=n.encode||_t;if(typeof w!="function")throw new TypeError("option encode is invalid");if(!se.test(r))throw new TypeError("argument name is invalid");const _=w(h);if(_&&!se.test(_))throw new TypeError("argument val is invalid");let t=r+"="+_;if(n.maxAge!==void 0&&n.maxAge!==null){const y=n.maxAge-0;if(Number.isNaN(y)||!Number.isFinite(y))throw new TypeError("option maxAge is invalid");t+="; Max-Age="+Math.floor(y)}if(n.domain){if(!se.test(n.domain))throw new TypeError("option domain is invalid");t+="; Domain="+n.domain}if(n.path){if(!se.test(n.path))throw new TypeError("option path is invalid");t+="; Path="+n.path}if(n.expires){if(!ht(n.expires)||Number.isNaN(n.expires.valueOf()))throw new TypeError("option expires is invalid");t+="; Expires="+n.expires.toUTCString()}if(n.httpOnly&&(t+="; HttpOnly"),n.secure&&(t+="; Secure"),n.priority)switch(typeof n.priority=="string"?n.priority.toLowerCase():n.priority){case"low":t+="; Priority=Low";break;case"medium":t+="; Priority=Medium";break;case"high":t+="; Priority=High";break;default:throw new TypeError("option priority is invalid")}if(n.sameSite)switch(typeof n.sameSite=="string"?n.sameSite.toLowerCase():n.sameSite){case!0:t+="; SameSite=Strict";break;case"lax":t+="; SameSite=Lax";break;case"strict":t+="; SameSite=Strict";break;case"none":t+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return t}function ht(r){return Object.prototype.toString.call(r)==="[object Date]"||r instanceof Date}function yt(r,h){try{return h(r)}catch{return r}}function gt(r){return r.includes("%")?decodeURIComponent(r):r}function _t(r){return encodeURIComponent(r)}const bt={path:"/",watch:!0,decode:r=>ze(decodeURIComponent(r)),encode:r=>encodeURIComponent(typeof r=="string"?r:JSON.stringify(r))};function kt(r,h){const m={...bt,...h},n=Ct(m)||{},w=L(n[r]??m.default?.());{const _=typeof BroadcastChannel>"u"?null:new BroadcastChannel(`nuxt:cookies:${r}`);Me()&&Fe(()=>{_?.close()});const t=()=>{wt(r,w.value,m),_?.postMessage(We(w.value))};let y=!1;_&&(_.onmessage=u=>{y=!0,w.value=u.data,He(()=>{y=!1})}),m.watch?_e(w,()=>{y||t()},{deep:m.watch!=="shallow"}):t()}return w}function Ct(r={}){return vt(document.cookie,r)}function xt(r,h,m={}){return h==null?ge(r,h,{...m,maxAge:-1}):ge(r,h,m)}function wt(r,h,m={}){document.cookie=xt(r,h,m)}const $t=d("div",{"x-divider":""},null,-1),Ue=re({__name:"ServerRouteListItem",props:{item:{},index:{default:0}},setup(r){const h=L(!0),m=be();return(n,w)=>{const _=ce,t=Se,y=Ue;return o(),p("div",null,[d("button",{flex:"~ gap-2","w-full":"","items-start":"","items-center":"","hover-bg-active":"",px2:"",py1:"",class:E([{"bg-active":e(m)===n.item.filepath}]),style:Ge({paddingLeft:`calc(0.5rem + ${n.index*1.5}em)`}),onClick:w[0]||(w[0]=u=>{h.value=!e(h),m.value=n.item.filepath})},[d("div",{class:E({"w-12":!n.item.routes}),"flex-none":"","text-left":""},[n.item.type==="collection"?(o(),C(_,{key:0,icon:"carbon:chevron-right","mb0.5":"","transform-rotate":e(h)?90:0,transition:""},null,8,["transform-rotate"])):(o(),C(t,{key:1,class:E(("getRequestMethodClass"in n?n.getRequestMethodClass:e(le))(n.item.method||"*")),textContent:j((n.item.method||"*").toUpperCase())},null,8,["class","textContent"]))],2),d("span",{class:E({"flex items-center":n.item.routes}),"text-sm":"","font-mono":""},[n.item.type==="collection"?(o(),C(_,{key:0,title:`${n.item.routes?.length} routes`,icon:"carbon:folder",mr1:""},null,8,["title"])):D("",!0),F(" "+j(n.item.route),1)],2)],6),$t,e(h)?ee(n.$slots,"default",{key:0},()=>[(o(!0),p(R,null,A(n.item.routes,u=>(o(),C(y,{key:u.filepath,item:u,index:n.index+1},null,8,["item","index"]))),128))]):D("",!0)])}}}),St={p4:"",flex:"~ col gap-4"},Tt={key:1,ml2:"",flex:""},Vt=["value"],Rt={key:0,flex:"","gap-4":""},Ut=d("div",{"flex-auto":""},null,-1),Ie=re({__name:"ServerRouteInputs",props:{modelValue:{},keys:{default:()=>[]},default:{default:()=>({})},disabled:{type:Boolean,default:!1}},setup(r,{emit:h}){const m=r,n=Je(m,"modelValue",h,{passive:!0}),w=V(()=>[...m.keys,"key","value","type"]),_=V(()=>{const u={};for(const i of w.value)u[i]=m.default[i]||"";return u}),t=["string","number","boolean","file","date","time","datetime-local"];function y(u,i){const U=i.target;if(U.files&&U.files[0]){const G=U.files[0],M=new FileReader;M.readAsDataURL(G),M.onload=()=>{n.value[u].value=M.result}}}return _e(()=>n,u=>{u.value.forEach(i=>{if(i.type==="number"&&typeof i.value!="number"){const U=Number.parseFloat(i.value);i.value=Number.isNaN(U)?0:U}else i.type==="boolean"&&typeof i.value!="boolean"?i.value=!0:i.type==="file"&&typeof i.value!="object"?i.value="":i.type==="date"&&typeof i.value=="string"&&!i.value.match(/^\d{4}-\d{2}-\d{2}$/)?i.value=new Date().toISOString().slice(0,10):i.type==="time"&&typeof i.value=="string"&&!i.value.match(/^\d{2}:\d{2}$/)?i.value=new Date().toISOString().slice(11,16):i.type==="datetime-local"&&typeof i.value=="string"&&!i.value.match(/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}$/)?i.value=new Date().toISOString().slice(0,16):i.type==="string"&&(i.value=i.value.toString())})},{deep:!0,immediate:!0,flush:"sync"}),(u,i)=>{const U=ke,G=it,M=Te,z=ce,v=Ce;return o(),p("div",St,[(o(!0),p(R,null,A(e(n),(c,x)=>(o(),p("div",{key:x,flex:"~ gap-2","justify-around":""},[ee(u.$slots,"input",{item:c}),(o(!0),p(R,null,A(e(w),$=>(o(),p(R,{key:$},[c.type!==null&&$==="key"?(o(),C(U,{key:0,modelValue:c[$],"onUpdate:modelValue":g=>c[$]=g,placeholder:$,"flex-1":"","font-mono":"",n:"sm primary",disabled:u.disabled,class:E(u.disabled?"op50":"")},null,8,["modelValue","onUpdate:modelValue","placeholder","disabled","class"])):$==="value"?(o(),p(R,{key:1},[c.type==="file"?(o(),C(U,{key:0,type:"file",disabled:u.disabled,class:E(u.disabled?"op75":""),onChange:g=>y(x,g)},null,8,["disabled","class","onChange"])):c.type==="boolean"?(o(),p("div",Tt,[f(G,{modelValue:c.value,"onUpdate:modelValue":g=>c.value=g,placeholder:"Value",n:"green lg",disabled:u.disabled},null,8,["modelValue","onUpdate:modelValue","disabled"])])):(o(),C(U,{key:2,modelValue:c.value,"onUpdate:modelValue":g=>c.value=g,type:c.type,placeholder:"Value","flex-1":"","font-mono":"",n:"sm primary",disabled:u.disabled,class:E(u.disabled?"op75":"")},null,8,["modelValue","onUpdate:modelValue","type","disabled","class"]))],64)):$==="type"?(o(),C(M,{key:2,modelValue:c.type,"onUpdate:modelValue":g=>c.type=g,n:"sm green",class:E(u.disabled?"op75":""),disabled:u.disabled},{default:k(()=>[(o(),p(R,null,A(t,g=>d("option",{key:g,value:g},j(g),9,Vt)),64))]),_:2},1032,["modelValue","onUpdate:modelValue","class","disabled"])):D("",!0)],64))),128)),ee(u.$slots,"input-actions",{},()=>[f(v,{n:"red",disabled:u.disabled,class:E(u.disabled?"op0!":""),onClick:$=>e(n).splice(x,1)},{default:k(()=>[f(z,{icon:"carbon:delete"})]),_:2},1032,["disabled","class","onClick"])])]))),128)),u.disabled?D("",!0):(o(),p("div",Rt,[ee(u.$slots,"actions",{params:e(n)},()=>[f(v,{icon:"carbon-add",n:"sm primary",my1:"","px-3":"",onClick:i[0]||(i[0]=c=>e(n).push({...e(_)}))},{default:k(()=>[F(" Add ")]),_:1}),Ut,e(n).length?(o(),C(v,{key:0,icon:"carbon-trash-can",n:"sm red",my1:"","px-3":"",onClick:i[1]||(i[1]=c=>n.value=[])},{default:k(()=>[F(" Remove All ")]),_:1})):D("",!0)])])),ee(u.$slots,"default")])}}}),It={"h-full":"","w-full":"",flex:"~ col"},Dt={flex:"~ col gap-2","flex-none":"",p4:"","navbar-glass":""},Nt={flex:"~ gap2"},Et={relative:"","w-full":""},jt={flex:"~ gap2 wrap","w-full":"","items-center":"",px4:"",pb2:"","text-center":"","text-sm":"",border:"b base"},Ot=d("div",{"flex-auto":""},null,-1),Pt={key:0,border:"b base","items-center":"",px4:"",py2:"",grid:"~ cols-[max-content_1fr] gap-2"},Lt={"text-right":"","font-mono":""},Bt={key:1,border:"b base",p4:"",flex:"~ col gap-4","font-mono":""},qt={flex:"~ gap-4"},At={flex:"~ gap2","mb--2":"","items-center":"",op50:""},Mt=d("div",{"w-5":"","x-divider":""},null,-1),Ft=d("div",{"flex-none":""}," Default Inputs ",-1),Ht=d("div",{"x-divider":""},null,-1),zt={key:2},Wt={key:3,border:"b base",relative:"","n-code-block":""},Gt={flex:"~ wrap","w-full":""},Jt=["onClick"],Kt=d("div",{border:"b base","flex-auto":""},null,-1),Qt={border:"b base",flex:"~ gap2","items-center":"",px4:"",py2:""},Xt=d("div",null,"Response",-1),Yt={key:1,"text-xs":"",op50:""},Zt=d("div",{"flex-auto":""},null,-1),eo=d("div",{op50:""}," Request finished in ",-1),to={key:0,"flex-auto":"","overflow-auto":""},oo={border:"~ base","h-full":"","w-full":"",rounded:""},no=["data"],so={key:2,"flex-auto":"","overflow-auto":"",p4:""},lo={border:"~ base",rounded:""},ao=["src"],ro={key:1,controls:"",rounded:""},io=["src"],uo=re({__name:"ServerRouteDetails",props:{route:{}},emits:["open-default-input"],setup(r,{emit:h}){const m=r,[n,w]=Ke(),_=Qe(),t=de({contentType:"text/plain",data:"",statusCode:200,error:void 0,fetchTime:0}),y=V(()=>t.contentType.includes("application/json")?"json":t.contentType.includes("text/html")?"html":t.contentType.includes("text/css")?"css":t.contentType.includes("text/javascript")?"javascript":t.contentType.includes("image")||t.contentType.includes("video")?"media":t.contentType.includes("text/xml")||t.contentType.includes("application/xml")?"xml":t.contentType.includes("application/pdf")?"pdf":"text"),u=V(()=>{if(y.value==="json")return JSON.stringify(t.data,null,2);if(y.value==="media"||y.value==="pdf"){const s=new Blob([t.data],{type:t.contentType});return URL.createObjectURL(s)}return t.data}),i=L(!1),U=L(!1),G=Xe(),M=V(()=>m.route.route?.split(/((?:\*\*)?:[\w_]+)/g)),z=V(()=>M.value?.filter(s=>s.startsWith(":")||s.startsWith("**:"))||[]),v=L(m.route.method||"GET"),c=L({}),x=de({query:[{key:"",value:"",type:"string"}],body:[{key:"",value:"",type:"string"}],headers:[{key:"Content-Type",value:"application/json",type:"string"}]}),$=L({}),{inputDefaults:g}=Ve("serverRoutes"),O=["GET","POST","PUT","PATCH","DELETE","HEAD"],B=["PATCH","POST","PUT","DELETE"],q=V(()=>B.includes(v.value.toUpperCase())),S=L(z.value.length?"params":"query"),oe=["input","json"],H=L(oe[0]),K=V({get:()=>x[S.value],set:s=>{x[S.value]=s}}),X=V(()=>({...J(g.value.query),...J(x.query)})),T=V(()=>({...J(g.value.headers),...J(x.headers)})),Y=V(()=>q.value?H.value==="json"?{...J(g.value.body),...$.value}:{...J(g.value.body),...J(x.body)}:void 0),De=V(()=>{let s=_.value?.devServer.url||"http://localhost";s.charAt(s.length-1)==="/"&&(s=s.slice(0,-1));const l=_.value?.devServer.port||3e3;return s.includes(`:${l}`)?s:`${s}:${l}`}),ne=V(()=>{let s=new URLSearchParams(X.value).toString();s&&(s=`?${s}`);const l=(M.value?.map(N=>(N.startsWith(":")||N.startsWith("**:"))&&c.value[N]||N).join("")||"")+s;let b=_.value?.app.baseURL||"";return(b==="./"||b===".")&&(b=""),b.endsWith("/")&&(b=b.slice(0,-1)),b+l}),pe=V(()=>De.value+ne.value);function J(s){const l=Object.fromEntries(s.filter(({key:b,value:N})=>b&&N!==void 0).map(({key:b,value:N})=>[b,N]));return Object.entries(l).length?l:void 0}async function fe(){U.value=!0,i.value=!0;const s=Date.now();try{t.data=await $fetch(pe.value,{method:v.value.toUpperCase(),headers:T.value,query:X.value,body:Y.value,onResponse({response:l}){t.contentType=(l.headers.get("content-type")||"").toString().toLowerCase().trim(),t.statusCode=l.status,t.error=void 0},onResponseError(l){t.error=l.response._data,t.data=l.response._data}})}catch{}i.value=!1,t.fetchTime=Date.now()-s}const me=V(()=>{const s=[],l=[],b=Object.entries(T.value).filter(([I,P])=>I&&P&&!(I==="Content-Type"&&P==="application/json")).map(([I,P])=>` '${I}': '${P}'`).join(`,
|
|
1
|
+
import{r as L,bb as Me,aw as Fe,au as He,w as _e,bc as ze,bd as We,d as re,be,o,m as p,k as d,E,h as C,f as e,bf as le,t as j,p as D,v as F,a3 as Ge,a5 as ee,F as R,n as A,a0 as ce,a4 as Je,a as V,i as f,j as k,U as ke,C as Ce,bg as Ke,a7 as Qe,as as de,a6 as Xe,av as Ye,e as Ze,a9 as xe,l as te,H as ae,ap as et,_ as we,A as $e,bh as tt,bi as ot,ad as nt,R as st,bj as lt,ak as at}from"./entry.2f74e286.js";import{_ as rt}from"./Navbar.vue.d85c454f.js";import{_ as Se}from"./Badge.efa8b534.js";import{_ as Te}from"./NSelect.vue.60befa30.js";import{_ as it}from"./NCheckbox.vue.e6a37232.js";import{u as Ve,_ as ut}from"./storage-options.0b849b9a.js";import{_ as dt}from"./DataSchemaButton.vue.dabda5da.js";import{_ as ct}from"./NCodeBlock.vue.28dd841e.js";import{C as ye,S as Re}from"./constants.4e5eba24.js";import{U as pt}from"./json-editor-vue.87488a70.js";import{_ as ft}from"./NSectionBlock.e780f891.js";import{_ as mt}from"./DrawerRight.vue.e75b5510.js";import"./client.766a1bb7.js";import"./NIconTitle.vue.635c5682.js";const se=/^[\u0009\u0020-\u007E\u0080-\u00FF]+$/;function vt(r,h){if(typeof r!="string")throw new TypeError("argument str must be a string");const m={},w=(h||{}).decode||gt;let _=0;for(;_<r.length;){const t=r.indexOf("=",_);if(t===-1)break;let y=r.indexOf(";",_);if(y===-1)y=r.length;else if(y<t){_=r.lastIndexOf(";",t-1)+1;continue}const u=r.slice(_,t).trim();if(m[u]===void 0){let i=r.slice(t+1,y).trim();i.codePointAt(0)===34&&(i=i.slice(1,-1)),m[u]=yt(i,w)}_=y+1}return m}function ge(r,h,m){const n=m||{},w=n.encode||_t;if(typeof w!="function")throw new TypeError("option encode is invalid");if(!se.test(r))throw new TypeError("argument name is invalid");const _=w(h);if(_&&!se.test(_))throw new TypeError("argument val is invalid");let t=r+"="+_;if(n.maxAge!==void 0&&n.maxAge!==null){const y=n.maxAge-0;if(Number.isNaN(y)||!Number.isFinite(y))throw new TypeError("option maxAge is invalid");t+="; Max-Age="+Math.floor(y)}if(n.domain){if(!se.test(n.domain))throw new TypeError("option domain is invalid");t+="; Domain="+n.domain}if(n.path){if(!se.test(n.path))throw new TypeError("option path is invalid");t+="; Path="+n.path}if(n.expires){if(!ht(n.expires)||Number.isNaN(n.expires.valueOf()))throw new TypeError("option expires is invalid");t+="; Expires="+n.expires.toUTCString()}if(n.httpOnly&&(t+="; HttpOnly"),n.secure&&(t+="; Secure"),n.priority)switch(typeof n.priority=="string"?n.priority.toLowerCase():n.priority){case"low":t+="; Priority=Low";break;case"medium":t+="; Priority=Medium";break;case"high":t+="; Priority=High";break;default:throw new TypeError("option priority is invalid")}if(n.sameSite)switch(typeof n.sameSite=="string"?n.sameSite.toLowerCase():n.sameSite){case!0:t+="; SameSite=Strict";break;case"lax":t+="; SameSite=Lax";break;case"strict":t+="; SameSite=Strict";break;case"none":t+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return t}function ht(r){return Object.prototype.toString.call(r)==="[object Date]"||r instanceof Date}function yt(r,h){try{return h(r)}catch{return r}}function gt(r){return r.includes("%")?decodeURIComponent(r):r}function _t(r){return encodeURIComponent(r)}const bt={path:"/",watch:!0,decode:r=>ze(decodeURIComponent(r)),encode:r=>encodeURIComponent(typeof r=="string"?r:JSON.stringify(r))};function kt(r,h){const m={...bt,...h},n=Ct(m)||{},w=L(n[r]??m.default?.());{const _=typeof BroadcastChannel>"u"?null:new BroadcastChannel(`nuxt:cookies:${r}`);Me()&&Fe(()=>{_?.close()});const t=()=>{wt(r,w.value,m),_?.postMessage(We(w.value))};let y=!1;_&&(_.onmessage=u=>{y=!0,w.value=u.data,He(()=>{y=!1})}),m.watch?_e(w,()=>{y||t()},{deep:m.watch!=="shallow"}):t()}return w}function Ct(r={}){return vt(document.cookie,r)}function xt(r,h,m={}){return h==null?ge(r,h,{...m,maxAge:-1}):ge(r,h,m)}function wt(r,h,m={}){document.cookie=xt(r,h,m)}const $t=d("div",{"x-divider":""},null,-1),Ue=re({__name:"ServerRouteListItem",props:{item:{},index:{default:0}},setup(r){const h=L(!0),m=be();return(n,w)=>{const _=ce,t=Se,y=Ue;return o(),p("div",null,[d("button",{flex:"~ gap-2","w-full":"","items-start":"","items-center":"","hover-bg-active":"",px2:"",py1:"",class:E([{"bg-active":e(m)===n.item.filepath}]),style:Ge({paddingLeft:`calc(0.5rem + ${n.index*1.5}em)`}),onClick:w[0]||(w[0]=u=>{h.value=!e(h),m.value=n.item.filepath})},[d("div",{class:E({"w-12":!n.item.routes}),"flex-none":"","text-left":""},[n.item.type==="collection"?(o(),C(_,{key:0,icon:"carbon:chevron-right","mb0.5":"","transform-rotate":e(h)?90:0,transition:""},null,8,["transform-rotate"])):(o(),C(t,{key:1,class:E(("getRequestMethodClass"in n?n.getRequestMethodClass:e(le))(n.item.method||"*")),textContent:j((n.item.method||"*").toUpperCase())},null,8,["class","textContent"]))],2),d("span",{class:E({"flex items-center":n.item.routes}),"text-sm":"","font-mono":""},[n.item.type==="collection"?(o(),C(_,{key:0,title:`${n.item.routes?.length} routes`,icon:"carbon:folder",mr1:""},null,8,["title"])):D("",!0),F(" "+j(n.item.route),1)],2)],6),$t,e(h)?ee(n.$slots,"default",{key:0},()=>[(o(!0),p(R,null,A(n.item.routes,u=>(o(),C(y,{key:u.filepath,item:u,index:n.index+1},null,8,["item","index"]))),128))]):D("",!0)])}}}),St={p4:"",flex:"~ col gap-4"},Tt={key:1,ml2:"",flex:""},Vt=["value"],Rt={key:0,flex:"","gap-4":""},Ut=d("div",{"flex-auto":""},null,-1),Ie=re({__name:"ServerRouteInputs",props:{modelValue:{},keys:{default:()=>[]},default:{default:()=>({})},disabled:{type:Boolean,default:!1}},setup(r,{emit:h}){const m=r,n=Je(m,"modelValue",h,{passive:!0}),w=V(()=>[...m.keys,"key","value","type"]),_=V(()=>{const u={};for(const i of w.value)u[i]=m.default[i]||"";return u}),t=["string","number","boolean","file","date","time","datetime-local"];function y(u,i){const U=i.target;if(U.files&&U.files[0]){const G=U.files[0],M=new FileReader;M.readAsDataURL(G),M.onload=()=>{n.value[u].value=M.result}}}return _e(()=>n,u=>{u.value.forEach(i=>{if(i.type==="number"&&typeof i.value!="number"){const U=Number.parseFloat(i.value);i.value=Number.isNaN(U)?0:U}else i.type==="boolean"&&typeof i.value!="boolean"?i.value=!0:i.type==="file"&&typeof i.value!="object"?i.value="":i.type==="date"&&typeof i.value=="string"&&!i.value.match(/^\d{4}-\d{2}-\d{2}$/)?i.value=new Date().toISOString().slice(0,10):i.type==="time"&&typeof i.value=="string"&&!i.value.match(/^\d{2}:\d{2}$/)?i.value=new Date().toISOString().slice(11,16):i.type==="datetime-local"&&typeof i.value=="string"&&!i.value.match(/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}$/)?i.value=new Date().toISOString().slice(0,16):i.type==="string"&&(i.value=i.value.toString())})},{deep:!0,immediate:!0,flush:"sync"}),(u,i)=>{const U=ke,G=it,M=Te,z=ce,v=Ce;return o(),p("div",St,[(o(!0),p(R,null,A(e(n),(c,x)=>(o(),p("div",{key:x,flex:"~ gap-2","justify-around":""},[ee(u.$slots,"input",{item:c}),(o(!0),p(R,null,A(e(w),$=>(o(),p(R,{key:$},[c.type!==null&&$==="key"?(o(),C(U,{key:0,modelValue:c[$],"onUpdate:modelValue":g=>c[$]=g,placeholder:$,"flex-1":"","font-mono":"",n:"sm primary",disabled:u.disabled,class:E(u.disabled?"op50":"")},null,8,["modelValue","onUpdate:modelValue","placeholder","disabled","class"])):$==="value"?(o(),p(R,{key:1},[c.type==="file"?(o(),C(U,{key:0,type:"file",disabled:u.disabled,class:E(u.disabled?"op75":""),onChange:g=>y(x,g)},null,8,["disabled","class","onChange"])):c.type==="boolean"?(o(),p("div",Tt,[f(G,{modelValue:c.value,"onUpdate:modelValue":g=>c.value=g,placeholder:"Value",n:"green lg",disabled:u.disabled},null,8,["modelValue","onUpdate:modelValue","disabled"])])):(o(),C(U,{key:2,modelValue:c.value,"onUpdate:modelValue":g=>c.value=g,type:c.type,placeholder:"Value","flex-1":"","font-mono":"",n:"sm primary",disabled:u.disabled,class:E(u.disabled?"op75":"")},null,8,["modelValue","onUpdate:modelValue","type","disabled","class"]))],64)):$==="type"?(o(),C(M,{key:2,modelValue:c.type,"onUpdate:modelValue":g=>c.type=g,n:"sm green",class:E(u.disabled?"op75":""),disabled:u.disabled},{default:k(()=>[(o(),p(R,null,A(t,g=>d("option",{key:g,value:g},j(g),9,Vt)),64))]),_:2},1032,["modelValue","onUpdate:modelValue","class","disabled"])):D("",!0)],64))),128)),ee(u.$slots,"input-actions",{},()=>[f(v,{n:"red",disabled:u.disabled,class:E(u.disabled?"op0!":""),onClick:$=>e(n).splice(x,1)},{default:k(()=>[f(z,{icon:"carbon:delete"})]),_:2},1032,["disabled","class","onClick"])])]))),128)),u.disabled?D("",!0):(o(),p("div",Rt,[ee(u.$slots,"actions",{params:e(n)},()=>[f(v,{icon:"carbon-add",n:"sm primary",my1:"","px-3":"",onClick:i[0]||(i[0]=c=>e(n).push({...e(_)}))},{default:k(()=>[F(" Add ")]),_:1}),Ut,e(n).length?(o(),C(v,{key:0,icon:"carbon-trash-can",n:"sm red",my1:"","px-3":"",onClick:i[1]||(i[1]=c=>n.value=[])},{default:k(()=>[F(" Remove All ")]),_:1})):D("",!0)])])),ee(u.$slots,"default")])}}}),It={"h-full":"","w-full":"",flex:"~ col"},Dt={flex:"~ col gap-2","flex-none":"",p4:"","navbar-glass":""},Nt={flex:"~ gap2"},Et={relative:"","w-full":""},jt={flex:"~ gap2 wrap","w-full":"","items-center":"",px4:"",pb2:"","text-center":"","text-sm":"",border:"b base"},Ot=d("div",{"flex-auto":""},null,-1),Pt={key:0,border:"b base","items-center":"",px4:"",py2:"",grid:"~ cols-[max-content_1fr] gap-2"},Lt={"text-right":"","font-mono":""},Bt={key:1,border:"b base",p4:"",flex:"~ col gap-4","font-mono":""},qt={flex:"~ gap-4"},At={flex:"~ gap2","mb--2":"","items-center":"",op50:""},Mt=d("div",{"w-5":"","x-divider":""},null,-1),Ft=d("div",{"flex-none":""}," Default Inputs ",-1),Ht=d("div",{"x-divider":""},null,-1),zt={key:2},Wt={key:3,border:"b base",relative:"","n-code-block":""},Gt={flex:"~ wrap","w-full":""},Jt=["onClick"],Kt=d("div",{border:"b base","flex-auto":""},null,-1),Qt={border:"b base",flex:"~ gap2","items-center":"",px4:"",py2:""},Xt=d("div",null,"Response",-1),Yt={key:1,"text-xs":"",op50:""},Zt=d("div",{"flex-auto":""},null,-1),eo=d("div",{op50:""}," Request finished in ",-1),to={key:0,"flex-auto":"","overflow-auto":""},oo={border:"~ base","h-full":"","w-full":"",rounded:""},no=["data"],so={key:2,"flex-auto":"","overflow-auto":"",p4:""},lo={border:"~ base",rounded:""},ao=["src"],ro={key:1,controls:"",rounded:""},io=["src"],uo=re({__name:"ServerRouteDetails",props:{route:{}},emits:["open-default-input"],setup(r,{emit:h}){const m=r,[n,w]=Ke(),_=Qe(),t=de({contentType:"text/plain",data:"",statusCode:200,error:void 0,fetchTime:0}),y=V(()=>t.contentType.includes("application/json")?"json":t.contentType.includes("text/html")?"html":t.contentType.includes("text/css")?"css":t.contentType.includes("text/javascript")?"javascript":t.contentType.includes("image")||t.contentType.includes("video")?"media":t.contentType.includes("text/xml")||t.contentType.includes("application/xml")?"xml":t.contentType.includes("application/pdf")?"pdf":"text"),u=V(()=>{if(y.value==="json")return JSON.stringify(t.data,null,2);if(y.value==="media"||y.value==="pdf"){const s=new Blob([t.data],{type:t.contentType});return URL.createObjectURL(s)}return t.data}),i=L(!1),U=L(!1),G=Xe(),M=V(()=>m.route.route?.split(/((?:\*\*)?:[\w_]+)/g)),z=V(()=>M.value?.filter(s=>s.startsWith(":")||s.startsWith("**:"))||[]),v=L(m.route.method||"GET"),c=L({}),x=de({query:[{key:"",value:"",type:"string"}],body:[{key:"",value:"",type:"string"}],headers:[{key:"Content-Type",value:"application/json",type:"string"}]}),$=L({}),{inputDefaults:g}=Ve("serverRoutes"),O=["GET","POST","PUT","PATCH","DELETE","HEAD"],B=["PATCH","POST","PUT","DELETE"],q=V(()=>B.includes(v.value.toUpperCase())),S=L(z.value.length?"params":"query"),oe=["input","json"],H=L(oe[0]),K=V({get:()=>x[S.value],set:s=>{x[S.value]=s}}),X=V(()=>({...J(g.value.query),...J(x.query)})),T=V(()=>({...J(g.value.headers),...J(x.headers)})),Y=V(()=>q.value?H.value==="json"?{...J(g.value.body),...$.value}:{...J(g.value.body),...J(x.body)}:void 0),De=V(()=>{let s=_.value?.devServer.url||"http://localhost";s.charAt(s.length-1)==="/"&&(s=s.slice(0,-1));const l=_.value?.devServer.port||3e3;return s.includes(`:${l}`)?s:`${s}:${l}`}),ne=V(()=>{let s=new URLSearchParams(X.value).toString();s&&(s=`?${s}`);const l=(M.value?.map(N=>(N.startsWith(":")||N.startsWith("**:"))&&c.value[N]||N).join("")||"")+s;let b=_.value?.app.baseURL||"";return(b==="./"||b===".")&&(b=""),b.endsWith("/")&&(b=b.slice(0,-1)),b+l}),pe=V(()=>De.value+ne.value);function J(s){const l=Object.fromEntries(s.filter(({key:b,value:N})=>b&&N!==void 0).map(({key:b,value:N})=>[b,N]));return Object.entries(l).length?l:void 0}async function fe(){U.value=!0,i.value=!0;const s=Date.now();try{t.data=await $fetch(pe.value,{method:v.value.toUpperCase(),headers:T.value,query:X.value,body:Y.value,onResponse({response:l}){t.contentType=(l.headers.get("content-type")||"").toString().toLowerCase().trim(),t.statusCode=l.status,t.error=void 0},onResponseError(l){t.error=l.response._data,t.data=l.response._data}})}catch{}i.value=!1,t.fetchTime=Date.now()-s}const me=V(()=>{const s=[],l=[],b=Object.entries(T.value).filter(([I,P])=>I&&P&&!(I==="Content-Type"&&P==="application/json")).map(([I,P])=>` '${I}': '${P}'`).join(`,
|
|
2
2
|
`);v.value.toUpperCase()!=="GET"&&l.push(`method: '${v.value.toUpperCase()}'`),b&&l.push(`headers: {
|
|
3
3
|
${b}
|
|
4
4
|
}`),Y.value&&l.push(`body: ${JSON.stringify(Y.value,null,2)}`);const N=l.length?`, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as L}from"./NIconTitle.vue.
|
|
1
|
+
import{_ as L}from"./NIconTitle.vue.635c5682.js";import{_ as H}from"./NSwitch.vue.eb1bdf97.js";import{d as q,aq as R,bA as G,az as J,av as I,m as d,i,k as e,F as _,n as k,f as t,j as r,l as C,aj as K,bB as Q,o as c,E as S,t as g,h as W,p as z,v as X,bv as Y,_ as Z,C as ee}from"./entry.2f74e286.js";import{_ as le}from"./NSelect.vue.60befa30.js";import{_ as ne}from"./NCheckbox.vue.e6a37232.js";const oe={px6:"",py6:""},te={grid:"~ md:cols-2 gap-x-10 gap-y-3","max-w-300":""},ae={flex:"~ col gap-1",py3:""},se=e("h3",{mb1:"","text-lg":""}," Tabs ",-1),ie={flex:"~ gap-2","flex-auto":"","items-center":"","justify-start":""},ue={capitalize:"",op75:""},ce={flex:"~ col gap-1",border:"~ base rounded",py3:"",pl4:"",pr2:""},de=e("div",{"flex-auto":""},null,-1),re={py3:"",flex:"~ col gap-1",border:"b base"},pe=e("h3",{mb1:"","text-lg":""}," Appearance ",-1),_e=e("div",{"carbon-sun":"","dark:carbon-moon":"","translate-y--1px":""},null,-1),me={py3:"",flex:"~ col gap-1",border:"b base"},ve=e("h3",{mb1:"","text-lg":""}," Floating Panel ",-1),fe=e("p",null,"Minimize panel on inactive",-1),ge=["value"],xe={py3:"",flex:"~ col gap-1",border:"b base"},he=e("h3",{mb1:"","text-lg":""}," UI Scale ",-1),be=["value"],ye={py3:"",flex:"~ col gap-1"},ke=e("h3",{mb1:"","text-lg":""}," Features ",-1),Ce=e("span",null,"Close DevTools when clicking outside",-1),Ve=e("span",null,"Show help buttons",-1),Ie=q({__name:"settings",setup(Te){const{interactionCloseOnOutsideClick:x,showHelpButtons:V,scale:T,hiddenTabs:m,pinnedTabs:a,hiddenTabCategories:v,minimizePanelInactive:h}=K(),N=R(),B=[["Tiny",12/15],["Small",14/15],["Normal",1],["Large",16/15],["Huge",18/15]],D=[["Always",0],["1s",1e3],["2s",2e3],["5s",5e3],["10s",1e4],["Never",-1]],j=G(J());function P(s,n){n?m.value=m.value.filter(u=>u!==s):m.value.push(s)}function A(s,n){n?v.value=v.value.filter(u=>u!==s):v.value.push(s)}function F(s){a.value.includes(s)?a.value=a.value.filter(n=>n!==s):a.value.push(s)}function $(s,n){const u=a.value.indexOf(s);if(u===-1)return;const p=u+n;if(p<0||p>=a.value.length)return;const f=[...a.value];f.splice(u,1),f.splice(p,0,s),a.value=f}return I(()=>{N.value.app.frameState.value.closeOnOutsideClick=x.value}),I(()=>{N.value.app.frameState.value.minimizePanelInactive=h.value}),(s,n)=>{const u=L,p=H,f=Y,w=Z,M=ee,E=Q,O=le,U=ne;return c(),d("div",oe,[i(u,{class:"mb-5 text-xl op75",icon:"i-carbon-settings-adjust",text:"DevTools Settings"}),e("div",te,[e("div",ae,[se,(c(!0),d(_,null,k(t(j),([l,b])=>(c(),d(_,{key:l},[b.length?(c(),d("div",{key:0,flex:"~ col gap-1","mx--1":"",class:S(t(v).includes(l)?"op50 grayscale":""),"pt-2":""},[i(p,{flex:"~ row-reverse",px2:"",py1:"","n-lime":"","model-value":!t(v).includes(l),"onUpdate:modelValue":o=>A(l,o)},{default:r(()=>[e("div",ie,[e("span",ue,g(l),1)])]),_:2},1032,["model-value","onUpdate:modelValue"]),e("div",ce,[(c(!0),d(_,null,k(b,o=>(c(),W(p,{key:o.name,flex:"~ row-reverse",py1:"",pl2:"",pr1:"","n-primary":"","model-value":!t(m).includes(o.name),"onUpdate:modelValue":y=>P(o.name,y)},{default:r(()=>[e("div",{flex:"~ gap-2","flex-auto":"","items-center":"","justify-start":"","pr-4":"",class:S(t(m).includes(o.name)?"op25":"")},[i(f,{"text-xl":"",icon:o.icon,title:o.title},null,8,["icon","title"]),e("span",null,g(o.title),1),de,t(a).includes(o.name)?(c(),d(_,{key:0},[i(w,{icon:"i-carbon-caret-up",disabled:t(a).indexOf(o.name)===0,onClick:y=>$(o.name,-1)},null,8,["disabled","onClick"]),i(w,{icon:"i-carbon-caret-down",disabled:t(a).indexOf(o.name)===t(a).length-1,onClick:y=>$(o.name,1)},null,8,["disabled","onClick"])],64)):z("",!0),i(w,{icon:t(a).includes(o.name)?" i-carbon-pin-filled rotate--45":" i-carbon-pin op50",onClick:y=>F(o.name)},null,8,["icon","onClick"])],2)]),_:2},1032,["model-value","onUpdate:modelValue"]))),128))])],2)):z("",!0)],64))),128))]),e("div",null,[e("div",re,[pe,e("div",null,[i(E,null,{default:r(({toggle:l,isDark:b})=>[i(M,{n:"primary",onClick:l},{default:r(()=>[_e,X(" "+g(b.value?"Dark":"Light"),1)]),_:2},1032,["onClick"])]),_:1})])]),e("div",me,[ve,fe,i(O,{modelValue:t(h),"onUpdate:modelValue":n[0]||(n[0]=l=>C(h)?h.value=l:null),modelModifiers:{number:!0},n:"primary"},{default:r(()=>[(c(),d(_,null,k(D,l=>e("option",{key:l[0],value:l[1]},g(l[0]),9,ge)),64))]),_:1},8,["modelValue"])]),e("div",xe,[he,i(O,{modelValue:t(T),"onUpdate:modelValue":n[1]||(n[1]=l=>C(T)?T.value=l:null),n:"primary"},{default:r(()=>[(c(),d(_,null,k(B,l=>e("option",{key:l[0],value:l[1]},g(l[0]),9,be)),64))]),_:1},8,["modelValue"])]),e("div",ye,[ke,i(U,{modelValue:t(x),"onUpdate:modelValue":n[2]||(n[2]=l=>C(x)?x.value=l:null),"n-primary":""},{default:r(()=>[Ce]),_:1},8,["modelValue"]),i(U,{modelValue:t(V),"onUpdate:modelValue":n[3]||(n[3]=l=>C(V)?V.value=l:null),"n-primary":""},{default:r(()=>[Ve]),_:1},8,["modelValue"])])])])])}}});export{Ie as default};
|