@nuxt/devtools 1.0.4 → 1.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -6
- package/dist/chunks/module-main.mjs +7 -5
- package/dist/chunks/plugin-metrics.mjs +2 -2
- package/dist/chunks/timeline.mjs +1 -1
- package/dist/chunks/vite-inspect.mjs +1 -1
- package/dist/chunks/vue-inspector.mjs +2 -2
- package/dist/client/200.html +21 -21
- package/dist/client/404.html +21 -21
- package/dist/client/_nuxt/{CodeDiff.vue.d8722166.js → CodeDiff.vue.786903cd.js} +1 -1
- package/dist/client/_nuxt/{ComposableItem.vue.a0062ecc.js → ComposableItem.vue.93291047.js} +1 -1
- package/dist/client/_nuxt/{DataSchemaButton.vue.baec9a00.js → DataSchemaButton.vue.e78a09d4.js} +1 -1
- package/dist/client/_nuxt/{DataSchemaDrawer.b2c7e5f0.js → DataSchemaDrawer.f39b3d44.js} +2 -2
- package/dist/client/_nuxt/{DurationDisplay.vue.75bf04c2.js → DurationDisplay.vue.ce619fea.js} +1 -1
- package/dist/client/_nuxt/{FilepathItem.vue.7a091e26.js → FilepathItem.vue.e3761da9.js} +1 -1
- package/dist/client/_nuxt/{HelpFab.vue.07720a44.js → HelpFab.vue.452fd066.js} +1 -1
- package/dist/client/_nuxt/{LaunchPage.vue.51fc4c47.js → LaunchPage.vue.5db0c060.js} +1 -1
- package/dist/client/_nuxt/{NBadge.ce033599.js → NBadge.787d75d1.js} +1 -1
- package/dist/client/_nuxt/{NCheckbox.vue.0f5a8440.js → NCheckbox.vue.7e495ed2.js} +1 -1
- package/dist/client/_nuxt/NCodeBlock.a117b19b.css +1 -0
- package/dist/client/_nuxt/{NCodeBlock.vue.4697f7e4.js → NCodeBlock.vue.7e25538f.js} +1 -1
- package/dist/client/_nuxt/{NDrawer.vue.4b4bd813.js → NDrawer.vue.fa4b06a6.js} +1 -1
- package/dist/client/_nuxt/{NDropdown.vue.ddbb4404.js → NDropdown.vue.7a6942fe.js} +1 -1
- package/dist/client/_nuxt/{NIconTitle.vue.8be5866f.js → NIconTitle.vue.8e6741d5.js} +1 -1
- package/dist/client/_nuxt/{NLink.vue.99516332.js → NLink.vue.0a35d66d.js} +1 -1
- package/dist/client/_nuxt/{NMarkdown.vue.d386a844.js → NMarkdown.vue.099cce55.js} +1 -1
- package/dist/client/_nuxt/{NNavbar.vue.a82b9c01.js → NNavbar.vue.9cb56412.js} +1 -1
- package/dist/client/_nuxt/NSectionBlock.3af235cd.css +1 -0
- package/dist/client/_nuxt/NSectionBlock.f3242abf.js +1 -0
- package/dist/client/_nuxt/{NSelect.vue.7cf27fe7.js → NSelect.vue.cdaf42b9.js} +1 -1
- package/dist/client/_nuxt/{NSelectTabs.vue.8f4924f6.js → NSelectTabs.vue.cf18ccbe.js} +1 -1
- package/dist/client/_nuxt/{NSwitch.vue.6fd7c26d.js → NSwitch.vue.6e493b89.js} +1 -1
- package/dist/client/_nuxt/{StacktraceList.vue.a2e4171d.js → StacktraceList.vue.a54c08af.js} +1 -1
- package/dist/client/_nuxt/{StateEditor.vue.777f604e.js → StateEditor.vue.2b7dac11.js} +1 -1
- package/dist/client/_nuxt/{__blank.2e21a1a7.js → __blank.38ec0588.js} +1 -1
- package/dist/client/_nuxt/{analyze-build.371a5734.js → analyze-build.3c8ffa82.js} +1 -1
- package/dist/client/_nuxt/{assets.439f186c.js → assets.c6f98235.js} +1 -1
- package/dist/client/_nuxt/builds/latest.json +1 -1
- package/dist/client/_nuxt/builds/meta/de4ce1fd-092b-47eb-98b3-1a9b7af1000f.json +1 -0
- package/dist/client/_nuxt/{client.bd4053bc.js → client.7628b7e9.js} +1 -1
- package/dist/client/_nuxt/{components.ccf2fad3.js → components.0df44336.js} +27 -27
- package/dist/client/_nuxt/{custom-_name_.b0891a20.js → custom-_name_.97248110.js} +1 -1
- package/dist/client/_nuxt/{default.97700872.js → default.80c1f1c2.js} +1 -1
- package/dist/client/_nuxt/entry.52bc93cd.js +27 -0
- package/dist/client/_nuxt/entry.8bdf7dd8.css +1 -0
- package/dist/client/_nuxt/{error-404.576aef72.js → error-404.c1c64157.js} +1 -1
- package/dist/client/_nuxt/{error-500.61e43a5a.js → error-500.14a76226.js} +1 -1
- package/dist/client/_nuxt/{error.82c66fee.js → error.81ad2d42.js} +1 -1
- package/dist/client/_nuxt/{full.72d92407.js → full.6e527000.js} +1 -1
- package/dist/client/_nuxt/{hooks.889b91ae.js → hooks.e54b1704.js} +1 -1
- package/dist/client/_nuxt/{imports.8a1177ed.js → imports.996d62b8.js} +1 -1
- package/dist/client/_nuxt/{index.0214b01d.js → index.64fbc2ea.js} +1 -1
- package/dist/client/_nuxt/index.f5673bec.js +16 -0
- package/dist/client/_nuxt/json-editor-vue.d503734c.js +99 -0
- package/dist/client/_nuxt/{modules.0ea1264b.js → modules.56c28a7c.js} +1 -1
- package/dist/client/_nuxt/{none.9d86a5c5.js → none.194e11c7.js} +1 -1
- package/dist/client/_nuxt/{open-graph.484b1a77.css → open-graph.058fa32c.css} +1 -1
- package/dist/client/_nuxt/{open-graph.ce924f19.js → open-graph.da61329c.js} +2 -2
- package/dist/client/_nuxt/{overview.811117a6.js → overview.17cbcb18.js} +1 -1
- package/dist/client/_nuxt/{pages.f870c402.js → pages.7378ad18.js} +1 -1
- package/dist/client/_nuxt/{payload.ae9699f5.js → payload.d51e3588.js} +1 -1
- package/dist/client/_nuxt/{plugins.a8eafa2c.js → plugins.0aa922de.js} +1 -1
- package/dist/client/_nuxt/{runtime-configs.344cb73a.js → runtime-configs.ea309d52.js} +1 -1
- package/dist/client/_nuxt/server-routes.8a6576d0.js +9 -0
- package/dist/client/_nuxt/{settings.a887e1c0.js → settings.d6b62c31.js} +1 -1
- package/dist/client/_nuxt/{state-components.295d8108.js → state-components.bc8116fe.js} +1 -1
- package/dist/client/_nuxt/{state-modules.a1a00874.js → state-modules.a9841149.js} +1 -1
- package/dist/client/_nuxt/{storage-options.835c9b2d.js → storage-options.e85e583e.js} +1 -1
- package/dist/client/_nuxt/{storage.d4c1d127.js → storage.9ae52fa2.js} +1 -1
- package/dist/client/_nuxt/{terminals.3c6722c6.js → terminals.ae8551c9.js} +1 -1
- package/dist/client/_nuxt/timeline.58bc6682.css +1 -0
- package/dist/client/_nuxt/{timeline.cebcddc5.js → timeline.595f30d2.js} +5 -4
- package/dist/client/_nuxt/unocss-runtime.2336828a.js +2 -0
- package/dist/client/_nuxt/vanilla-picker-NKbIFE8h.23409a58.js +8 -0
- package/dist/client/_nuxt/{virtual-files.33dacdaf.js → virtual-files.acddf2b7.js} +1 -1
- package/dist/client/_nuxt/vue-html.1cd5a6cc.js +1 -0
- package/dist/client/_nuxt/vue.e4f172c2.js +5891 -0
- package/dist/client/index.html +21 -21
- package/dist/module.json +1 -1
- package/dist/runtime/auth/index.html +65 -50
- package/dist/runtime/plugins/view/FrameBox.vue +2 -2
- package/dist/runtime/plugins/view/Main.vue +7 -2
- package/dist/runtime/plugins/view/client.mjs +2 -0
- package/package.json +34 -34
- package/dist/client/_nuxt/NCodeBlock.6994516c.css +0 -1
- package/dist/client/_nuxt/NSectionBlock.0d0061ef.css +0 -1
- package/dist/client/_nuxt/NSectionBlock.1609c1ec.js +0 -1
- package/dist/client/_nuxt/builds/meta/f35e8543-749e-4b65-87f9-0ac9fa3dd3ab.json +0 -1
- package/dist/client/_nuxt/entry.2732f55b.css +0 -1
- package/dist/client/_nuxt/entry.35c58391.js +0 -27
- package/dist/client/_nuxt/index.11f08f78.js +0 -17
- package/dist/client/_nuxt/json-editor-vue.24ac60a9.js +0 -129
- package/dist/client/_nuxt/server-routes.d5948352.js +0 -9
- package/dist/client/_nuxt/timeline.1ad3a70f.css +0 -1
- package/dist/client/_nuxt/unocss-runtime.eab56c8d.js +0 -2
- package/dist/client/_nuxt/vue-html.88dda4a8.js +0 -1
- package/dist/client/_nuxt/vue.7ad3b25a.js +0 -1844
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{_ as Ce}from"./FilepathItem.vue.7a091e26.js";import{d as U,a as B,ac as _e,o as u,h as T,j as g,k as s,aa as E,f as c,v as z,t as C,m as w,G as F,p as S,i as _,F as L,n as H,x as ie,a6 as ve,ao as ge,R as ye,aM as Te,L as ce,M as de,V as Oe,aN as be,aO as xe,_ as X,y as Ne,z as Ve,ay as $e,aP as Ae,aQ as Pe,aR as Be,ap as Le,a2 as je,I as Re,av as ue,at as Ee,aS as De,a9 as He,r as K,ah as Fe,l as Ue,ab as qe,Y as We,Z as Ke,S as Ye,aT as me}from"./entry.35c58391.js";import{_ as Ge,u as we,a as Xe}from"./state-modules.a1a00874.js";import{_ as Qe}from"./NSectionBlock.1609c1ec.js";import{_ as Ze}from"./NIconTitle.vue.8be5866f.js";import{_ as ke}from"./NDropdown.vue.ddbb4404.js";import{_ as Je}from"./NNavbar.vue.a82b9c01.js";import{_ as et}from"./NBadge.ce033599.js";import{_ as tt}from"./NCodeBlock.vue.4697f7e4.js";import{_ as nt}from"./NLink.vue.99516332.js";import{_ as it}from"./CodeDiff.vue.d8722166.js";import{_ as ot}from"./HelpFab.vue.07720a44.js";import"./NCheckbox.vue.0f5a8440.js";import"./client.bd4053bc.js";const st={flex:"~ col gap2","flex-auto":"","of-hidden":"",px1:""},rt={"gap-1t":"",flex:"","items-center":"","text-ellipsis":"","ws-nowrap":"","text-lg":""},lt={key:2},at=s("div",{"flex-auto":""},null,-1),ct={key:1,flex:"~ gap-2",title:"Documentation"},dt=s("span",{"i-carbon-link":"","text-lg":"",op50:""},null,-1),ut={key:2,flex:"~ gap-2"},mt=s("span",{"i-carbon-logo-github":"","text-lg":"",op50:""},null,-1),ft={key:0,flex:"~ gap-4 items-center"},pt={flex:"~ gap-1 items-center",op50:""},ht={flex:"~ gap-1 items-center",op50:""},_t={flex:"~ col","items-end":""},vt={key:0,"h-20":"","w-20":"",flex:"","flex-none":"",rounded:"","bg-gray:3":"",p4:""},gt=["src","alt"],yt=s("div",{"i-carbon-cube":"",ma:"","text-4xl":"",op30:""},null,-1),bt={key:1,flex:"~",mt2:"","flex-auto":"","items-end":"","justify-end":""},xt=["src"],$t=s("div",{"flex-auto":""},null,-1),wt={flex:"","justify-end":""},kt="https://api.nuxtjs.org/api/ipx/s_80,f_webp/gh/nuxt/modules/main/icons/",It="https://api.nuxtjs.org/api/ipx/s_44,f_webp/gh_avatar/",St="https://github.com/",zt="https://www.npmjs.com/package/",oe=U({__name:"ModuleItemBase",props:{mod:{},info:{},compact:{type:Boolean},maintainers:{type:Boolean,default:!0}},setup(e){const t=e,n=B(()=>({...t.mod?.meta,...t.mod,...t.info})),o=_e();return(i,r)=>{const l=ie,d=ve,a=ge;return u(),T(a,{p4:"",flex:"~ gap2"},{default:g(()=>[s("div",st,[E(i.$slots,"main",{},()=>[s("div",rt,[i.mod.isPackageModule?(u(),T(l,{key:0,to:zt+(c(n).npm||c(n).name),target:"_blank",hover:"underline text-primary"},{default:g(()=>[z(C(c(n).name),1)]),_:1},8,["to"])):i.mod.entryPath?(u(),w("button",{key:1,role:"button",hover:"underline text-primary",onClick:r[0]||(r[0]=m=>c(o)(i.mod.entryPath))},C(c(n).name),1)):(u(),w("span",lt,C(c(n).name),1)),E(i.$slots,"badge")]),c(n).description?(u(),w("div",{key:0,class:F(i.compact?"ws-nowrap of-hidden truncate":"line-clamp-2"),"mt--1":"","text-sm":"",op50:""},C(c(n).description),3)):S("",!0),at,c(n).website?(u(),w("div",ct,[dt,_(l,{to:c(n).website,target:"_blank","of-hidden":"",truncate:"","ws-nowrap":"","text-sm":"",op50:"",hover:"op100 underline text-primary"},{default:g(()=>[z(C(c(n).website.replace(/^https?:\/\//,"")),1)]),_:1},8,["to"])])):S("",!0),c(n).github?(u(),w("div",ut,[mt,_(l,{to:c(n).github,target:"_blank","of-hidden":"",truncate:"","ws-nowrap":"","text-sm":"",op50:"",hover:"op100 underline text-primary"},{default:g(()=>[z(C(c(n).github.replace(/^https?:\/\/github.com\//,"")),1)]),_:1},8,["to"])])):S("",!0)]),E(i.$slots,"items"),c(n).stats?(u(),w("div",ft,[s("div",pt,[_(d,{icon:"carbon-star","text-lg":""}),s("span",null,C(c(n).stats.stars),1)]),s("div",ht,[_(d,{icon:"carbon-download","text-lg":""}),s("span",null,C(c(n).stats.downloads),1)])])):S("",!0)]),s("div",_t,[c(n).icon||i.mod.isPackageModule?(u(),w("div",vt,[c(n).icon?(u(),w("img",{key:0,src:kt+c(n).icon,alt:i.mod.name,ma:""},null,8,gt)):S("",!0),yt])):S("",!0),c(n).maintainers?.length&&i.maintainers?(u(),w("div",bt,[(u(!0),w(L,null,H(c(n).maintainers,m=>(u(),T(l,{key:m.name,target:"_blank",to:St+m.github,title:m.name},{default:g(()=>[s("img",{src:It+m.github,"h-6":"","w-6":"","rounded-full":""},null,8,xt)]),_:2},1032,["to","title"]))),128))])):S("",!0),i.$slots.actions?(u(),w(L,{key:2},[$t,s("div",wt,[E(i.$slots,"actions")])],64)):S("",!0)])]),_:3})}}}),Mt={key:0,flex:"~ gap-2",title:"Open on filesystem"},Ct=s("span",{"i-carbon-folder-move-to":"","text-lg":"",op50:""},null,-1),Tt=s("span",{"i-carbon-circle-dash":"","animate-spin":"","text-lg":"",op50:""},null,-1),Ot=s("code",{"text-sm":"",op50:""},"Upgrading...",-1),Nt={key:1,"mx--2":""},Vt=["onClick"],At=s("span",{"i-carbon-intent-request-active":"","text-lg":"","text-primary":""},null,-1),Pt=s("code",{"text-xs":""},"Update installed, click to restart",-1),Bt=[At,Pt],Lt={key:2,"mx--2":""},jt=["onClick"],Rt=s("span",{"i-carbon-intent-request-upgrade":"","text-lg":"",op50:""},null,-1),Et={op50:""},Dt=s("div",{"i-carbon-arrow-right":"",op50:""},null,-1),Ht={"text-green":""},Ft={key:3,flex:"~ gap-2","items-center":"",title:"NPM"},Ut=s("span",{"i-carbon-cube":"","text-lg":"",op50:""},null,-1),qt={"text-sm":"",op50:""},Wt=U({__name:"ModuleItem",props:{mod:{}},setup(e){const t=e,n=B(()=>t.mod.info),o=B(()=>({...t.mod?.meta,...t.mod,...n.value})),i=ye();return(r,l)=>{const d=Ce,a=ie,m=Ge,h=oe;return u(),T(h,{mod:r.mod,info:c(n)},{items:g(()=>[r.mod.entryPath?(u(),w("div",Mt,[Ct,_(d,{filepath:r.mod.entryPath,"text-sm":"",op50:"",hover:"text-primary op100"},null,8,["filepath"])])):S("",!0),c(o).npm?(u(),T(m,{key:c(o).npm,"package-name":c(o).npm,options:{dev:!0}},{default:g(({info:v,update:b,state:p,id:I,restart:$})=>[p==="running"?(u(),T(a,{key:0,flex:"~ gap-2","animate-pulse":"","items-center":"",to:I?"/modules/terminals":void 0,onClick:x=>I?i.value=I:void 0},{default:g(()=>[Tt,Ot]),_:2},1032,["to","onClick"])):p==="updated"?(u(),w("div",Nt,[s("button",{flex:"~ gap-2",hover:"bg-primary/20","items-center":"",rounded:"","bg-primary:10":"",px2:"","text-sm":"","text-primary":"",onClick:$},Bt,8,Vt)])):v?.needsUpdate?(u(),w("div",Lt,[s("button",{flex:"~ gap-2",title:"Click to upgrade","items-center":"",rounded:"",px2:"","text-sm":"",hover:"bg-active",onClick:x=>b()},[Rt,s("code",Et,"v"+C(v.current),1),Dt,s("code",Ht,"v"+C(v.latest),1)],8,jt)])):v?.latest?(u(),w("div",Ft,[Ut,s("code",qt,"v"+C(v.current),1)])):S("",!0)]),_:1},8,["package-name"])):S("",!0)]),_:1},8,["mod","info"])}}}),Kt=U({__name:"ModuleItemInstall",props:{item:{}},emits:["start"],setup(e,{emit:t}){const n=e,o=t,i=we(),r=B(()=>i.value.find(h=>h.name===n.item.npm)),l=B(()=>r.value&&r.value.isPackageModule),d=B(()=>r.value&&r.value.isPackageModule&&r.value.isUninstallable);async function a(h,v){const b=v==="install"?ce.installNuxtModule:ce.uninstallNuxtModule,p=await b(await de(),h.npm,!0);Oe(`modules:${v}`,{moduleName:h.npm}),p.commands&&await be.start(h,p,v)&&(xe.value.push({name:h.npm,info:h,processId:p.processId}),o("start"),await b(await de(),h.npm,!1))}const m={};return(h,v)=>{const b=et,p=X,I=ke,$=oe;return u(),T($,{mod:m,role:c(l)?"":"button",info:h.item,mb2:"","h-full":"",class:F(c(l)?"border-dashed op75":"hover:bg-active!"),compact:!0,onClick:v[1]||(v[1]=x=>c(l)?null:a(h.item,"install"))},Te({_:2},[c(l)?{name:"badge",fn:g(()=>[_(b,{n:"green",textContent:"Installed"}),c(d)?(u(),T(I,{key:0,n:"sm green"},{trigger:g(({click:x})=>[_(p,{icon:"carbon-overflow-menu-vertical",border:!1,onClick:k=>x()},null,8,["onClick"])]),default:g(()=>[_(p,{icon:"carbon-trash-can",n:"red",onClick:v[0]||(v[0]=x=>a(h.item,"uninstall"))},{default:g(()=>[z(" Uninstall ")]),_:1})]),_:1})):S("",!0)]),key:"0"}:void 0]),1032,["role","info","class"])}}});function Yt(){var e=window.navigator.userAgent,t=e.indexOf("MSIE ");if(t>0)return parseInt(e.substring(t+5,e.indexOf(".",t)),10);var n=e.indexOf("Trident/");if(n>0){var o=e.indexOf("rv:");return parseInt(e.substring(o+3,e.indexOf(".",o)),10)}var i=e.indexOf("Edge/");return i>0?parseInt(e.substring(i+5,e.indexOf(".",i)),10):-1}let Y;function J(){J.init||(J.init=!0,Y=Yt()!==-1)}var Q={name:"ResizeObserver",props:{emitOnMount:{type:Boolean,default:!1},ignoreWidth:{type:Boolean,default:!1},ignoreHeight:{type:Boolean,default:!1}},emits:["notify"],mounted(){J(),$e(()=>{this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitOnMount&&this.emitSize()});const e=document.createElement("object");this._resizeObject=e,e.setAttribute("aria-hidden","true"),e.setAttribute("tabindex",-1),e.onload=this.addResizeHandlers,e.type="text/html",Y&&this.$el.appendChild(e),e.data="about:blank",Y||this.$el.appendChild(e)},beforeUnmount(){this.removeResizeHandlers()},methods:{compareAndNotify(){(!this.ignoreWidth&&this._w!==this.$el.offsetWidth||!this.ignoreHeight&&this._h!==this.$el.offsetHeight)&&(this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitSize())},emitSize(){this.$emit("notify",{width:this._w,height:this._h})},addResizeHandlers(){this._resizeObject.contentDocument.defaultView.addEventListener("resize",this.compareAndNotify),this.compareAndNotify()},removeResizeHandlers(){this._resizeObject&&this._resizeObject.onload&&(!Y&&this._resizeObject.contentDocument&&this._resizeObject.contentDocument.defaultView.removeEventListener("resize",this.compareAndNotify),this.$el.removeChild(this._resizeObject),this._resizeObject.onload=null,this._resizeObject=null)}}};const Gt=Ae();Ne("data-v-b329ee4c");const Xt={class:"resize-observer",tabindex:"-1"};Ve();const Qt=Gt((e,t,n,o,i,r)=>(u(),T("div",Xt)));Q.render=Qt;Q.__scopeId="data-v-b329ee4c";Q.__file="src/components/ResizeObserver.vue";function G(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?G=function(t){return typeof t}:G=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},G(e)}function Zt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function fe(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function Jt(e,t,n){return t&&fe(e.prototype,t),n&&fe(e,n),e}function pe(e){return en(e)||tn(e)||nn(e)||on()}function en(e){if(Array.isArray(e))return ee(e)}function tn(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function nn(e,t){if(e){if(typeof e=="string")return ee(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ee(e,t)}}function ee(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function on(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
1
|
+
import{_ as Ce}from"./FilepathItem.vue.e3761da9.js";import{d as U,a as B,ac as _e,o as u,h as T,j as g,k as s,aa as E,f as c,v as z,t as C,m as w,G as F,p as S,i as _,F as L,n as H,x as ie,a6 as ve,ao as ge,R as ye,aM as Te,L as ce,M as de,V as Oe,aN as be,aO as xe,_ as X,y as Ne,z as Ve,ay as $e,aP as Ae,aQ as Pe,aR as Be,ap as Le,a2 as je,I as Re,av as ue,at as Ee,aS as De,a9 as He,r as K,ah as Fe,l as Ue,ab as qe,Y as We,Z as Ke,S as Ye,aT as me}from"./entry.52bc93cd.js";import{_ as Ge,u as we,a as Xe}from"./state-modules.a9841149.js";import{_ as Qe}from"./NSectionBlock.f3242abf.js";import{_ as Ze}from"./NIconTitle.vue.8e6741d5.js";import{_ as ke}from"./NDropdown.vue.7a6942fe.js";import{_ as Je}from"./NNavbar.vue.9cb56412.js";import{_ as et}from"./NBadge.787d75d1.js";import{_ as tt}from"./NCodeBlock.vue.7e25538f.js";import{_ as nt}from"./NLink.vue.0a35d66d.js";import{_ as it}from"./CodeDiff.vue.786903cd.js";import{_ as ot}from"./HelpFab.vue.452fd066.js";import"./NCheckbox.vue.7e495ed2.js";import"./client.7628b7e9.js";const st={flex:"~ col gap2","flex-auto":"","of-hidden":"",px1:""},rt={"gap-1t":"",flex:"","items-center":"","text-ellipsis":"","ws-nowrap":"","text-lg":""},lt={key:2},at=s("div",{"flex-auto":""},null,-1),ct={key:1,flex:"~ gap-2",title:"Documentation"},dt=s("span",{"i-carbon-link":"","text-lg":"",op50:""},null,-1),ut={key:2,flex:"~ gap-2"},mt=s("span",{"i-carbon-logo-github":"","text-lg":"",op50:""},null,-1),ft={key:0,flex:"~ gap-4 items-center"},pt={flex:"~ gap-1 items-center",op50:""},ht={flex:"~ gap-1 items-center",op50:""},_t={flex:"~ col","items-end":""},vt={key:0,"h-20":"","w-20":"",flex:"","flex-none":"",rounded:"","bg-gray:3":"",p4:""},gt=["src","alt"],yt=s("div",{"i-carbon-cube":"",ma:"","text-4xl":"",op30:""},null,-1),bt={key:1,flex:"~",mt2:"","flex-auto":"","items-end":"","justify-end":""},xt=["src"],$t=s("div",{"flex-auto":""},null,-1),wt={flex:"","justify-end":""},kt="https://api.nuxtjs.org/api/ipx/s_80,f_webp/gh/nuxt/modules/main/icons/",It="https://api.nuxtjs.org/api/ipx/s_44,f_webp/gh_avatar/",St="https://github.com/",zt="https://www.npmjs.com/package/",oe=U({__name:"ModuleItemBase",props:{mod:{},info:{},compact:{type:Boolean},maintainers:{type:Boolean,default:!0}},setup(e){const t=e,n=B(()=>({...t.mod?.meta,...t.mod,...t.info})),o=_e();return(i,r)=>{const l=ie,d=ve,a=ge;return u(),T(a,{p4:"",flex:"~ gap2"},{default:g(()=>[s("div",st,[E(i.$slots,"main",{},()=>[s("div",rt,[i.mod.isPackageModule?(u(),T(l,{key:0,to:zt+(c(n).npm||c(n).name),target:"_blank",hover:"underline text-primary"},{default:g(()=>[z(C(c(n).name),1)]),_:1},8,["to"])):i.mod.entryPath?(u(),w("button",{key:1,role:"button",hover:"underline text-primary",onClick:r[0]||(r[0]=m=>c(o)(i.mod.entryPath))},C(c(n).name),1)):(u(),w("span",lt,C(c(n).name),1)),E(i.$slots,"badge")]),c(n).description?(u(),w("div",{key:0,class:F(i.compact?"ws-nowrap of-hidden truncate":"line-clamp-2"),"mt--1":"","text-sm":"",op50:""},C(c(n).description),3)):S("",!0),at,c(n).website?(u(),w("div",ct,[dt,_(l,{to:c(n).website,target:"_blank","of-hidden":"",truncate:"","ws-nowrap":"","text-sm":"",op50:"",hover:"op100 underline text-primary"},{default:g(()=>[z(C(c(n).website.replace(/^https?:\/\//,"")),1)]),_:1},8,["to"])])):S("",!0),c(n).github?(u(),w("div",ut,[mt,_(l,{to:c(n).github,target:"_blank","of-hidden":"",truncate:"","ws-nowrap":"","text-sm":"",op50:"",hover:"op100 underline text-primary"},{default:g(()=>[z(C(c(n).github.replace(/^https?:\/\/github.com\//,"")),1)]),_:1},8,["to"])])):S("",!0)]),E(i.$slots,"items"),c(n).stats?(u(),w("div",ft,[s("div",pt,[_(d,{icon:"carbon-star","text-lg":""}),s("span",null,C(c(n).stats.stars),1)]),s("div",ht,[_(d,{icon:"carbon-download","text-lg":""}),s("span",null,C(c(n).stats.downloads),1)])])):S("",!0)]),s("div",_t,[c(n).icon||i.mod.isPackageModule?(u(),w("div",vt,[c(n).icon?(u(),w("img",{key:0,src:kt+c(n).icon,alt:i.mod.name,ma:""},null,8,gt)):S("",!0),yt])):S("",!0),c(n).maintainers?.length&&i.maintainers?(u(),w("div",bt,[(u(!0),w(L,null,H(c(n).maintainers,m=>(u(),T(l,{key:m.name,target:"_blank",to:St+m.github,title:m.name},{default:g(()=>[s("img",{src:It+m.github,"h-6":"","w-6":"","rounded-full":""},null,8,xt)]),_:2},1032,["to","title"]))),128))])):S("",!0),i.$slots.actions?(u(),w(L,{key:2},[$t,s("div",wt,[E(i.$slots,"actions")])],64)):S("",!0)])]),_:3})}}}),Mt={key:0,flex:"~ gap-2",title:"Open on filesystem"},Ct=s("span",{"i-carbon-folder-move-to":"","text-lg":"",op50:""},null,-1),Tt=s("span",{"i-carbon-circle-dash":"","animate-spin":"","text-lg":"",op50:""},null,-1),Ot=s("code",{"text-sm":"",op50:""},"Upgrading...",-1),Nt={key:1,"mx--2":""},Vt=["onClick"],At=s("span",{"i-carbon-intent-request-active":"","text-lg":"","text-primary":""},null,-1),Pt=s("code",{"text-xs":""},"Update installed, click to restart",-1),Bt=[At,Pt],Lt={key:2,"mx--2":""},jt=["onClick"],Rt=s("span",{"i-carbon-intent-request-upgrade":"","text-lg":"",op50:""},null,-1),Et={op50:""},Dt=s("div",{"i-carbon-arrow-right":"",op50:""},null,-1),Ht={"text-green":""},Ft={key:3,flex:"~ gap-2","items-center":"",title:"NPM"},Ut=s("span",{"i-carbon-cube":"","text-lg":"",op50:""},null,-1),qt={"text-sm":"",op50:""},Wt=U({__name:"ModuleItem",props:{mod:{}},setup(e){const t=e,n=B(()=>t.mod.info),o=B(()=>({...t.mod?.meta,...t.mod,...n.value})),i=ye();return(r,l)=>{const d=Ce,a=ie,m=Ge,h=oe;return u(),T(h,{mod:r.mod,info:c(n)},{items:g(()=>[r.mod.entryPath?(u(),w("div",Mt,[Ct,_(d,{filepath:r.mod.entryPath,"text-sm":"",op50:"",hover:"text-primary op100"},null,8,["filepath"])])):S("",!0),c(o).npm?(u(),T(m,{key:c(o).npm,"package-name":c(o).npm,options:{dev:!0}},{default:g(({info:v,update:b,state:p,id:I,restart:$})=>[p==="running"?(u(),T(a,{key:0,flex:"~ gap-2","animate-pulse":"","items-center":"",to:I?"/modules/terminals":void 0,onClick:x=>I?i.value=I:void 0},{default:g(()=>[Tt,Ot]),_:2},1032,["to","onClick"])):p==="updated"?(u(),w("div",Nt,[s("button",{flex:"~ gap-2",hover:"bg-primary/20","items-center":"",rounded:"","bg-primary:10":"",px2:"","text-sm":"","text-primary":"",onClick:$},Bt,8,Vt)])):v?.needsUpdate?(u(),w("div",Lt,[s("button",{flex:"~ gap-2",title:"Click to upgrade","items-center":"",rounded:"",px2:"","text-sm":"",hover:"bg-active",onClick:x=>b()},[Rt,s("code",Et,"v"+C(v.current),1),Dt,s("code",Ht,"v"+C(v.latest),1)],8,jt)])):v?.latest?(u(),w("div",Ft,[Ut,s("code",qt,"v"+C(v.current),1)])):S("",!0)]),_:1},8,["package-name"])):S("",!0)]),_:1},8,["mod","info"])}}}),Kt=U({__name:"ModuleItemInstall",props:{item:{}},emits:["start"],setup(e,{emit:t}){const n=e,o=t,i=we(),r=B(()=>i.value.find(h=>h.name===n.item.npm)),l=B(()=>r.value&&r.value.isPackageModule),d=B(()=>r.value&&r.value.isPackageModule&&r.value.isUninstallable);async function a(h,v){const b=v==="install"?ce.installNuxtModule:ce.uninstallNuxtModule,p=await b(await de(),h.npm,!0);Oe(`modules:${v}`,{moduleName:h.npm}),p.commands&&await be.start(h,p,v)&&(xe.value.push({name:h.npm,info:h,processId:p.processId}),o("start"),await b(await de(),h.npm,!1))}const m={};return(h,v)=>{const b=et,p=X,I=ke,$=oe;return u(),T($,{mod:m,role:c(l)?"":"button",info:h.item,mb2:"","h-full":"",class:F(c(l)?"border-dashed op75":"hover:bg-active!"),compact:!0,onClick:v[1]||(v[1]=x=>c(l)?null:a(h.item,"install"))},Te({_:2},[c(l)?{name:"badge",fn:g(()=>[_(b,{n:"green",textContent:"Installed"}),c(d)?(u(),T(I,{key:0,n:"sm green"},{trigger:g(({click:x})=>[_(p,{icon:"carbon-overflow-menu-vertical",border:!1,onClick:k=>x()},null,8,["onClick"])]),default:g(()=>[_(p,{icon:"carbon-trash-can",n:"red",onClick:v[0]||(v[0]=x=>a(h.item,"uninstall"))},{default:g(()=>[z(" Uninstall ")]),_:1})]),_:1})):S("",!0)]),key:"0"}:void 0]),1032,["role","info","class"])}}});function Yt(){var e=window.navigator.userAgent,t=e.indexOf("MSIE ");if(t>0)return parseInt(e.substring(t+5,e.indexOf(".",t)),10);var n=e.indexOf("Trident/");if(n>0){var o=e.indexOf("rv:");return parseInt(e.substring(o+3,e.indexOf(".",o)),10)}var i=e.indexOf("Edge/");return i>0?parseInt(e.substring(i+5,e.indexOf(".",i)),10):-1}let Y;function J(){J.init||(J.init=!0,Y=Yt()!==-1)}var Q={name:"ResizeObserver",props:{emitOnMount:{type:Boolean,default:!1},ignoreWidth:{type:Boolean,default:!1},ignoreHeight:{type:Boolean,default:!1}},emits:["notify"],mounted(){J(),$e(()=>{this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitOnMount&&this.emitSize()});const e=document.createElement("object");this._resizeObject=e,e.setAttribute("aria-hidden","true"),e.setAttribute("tabindex",-1),e.onload=this.addResizeHandlers,e.type="text/html",Y&&this.$el.appendChild(e),e.data="about:blank",Y||this.$el.appendChild(e)},beforeUnmount(){this.removeResizeHandlers()},methods:{compareAndNotify(){(!this.ignoreWidth&&this._w!==this.$el.offsetWidth||!this.ignoreHeight&&this._h!==this.$el.offsetHeight)&&(this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitSize())},emitSize(){this.$emit("notify",{width:this._w,height:this._h})},addResizeHandlers(){this._resizeObject.contentDocument.defaultView.addEventListener("resize",this.compareAndNotify),this.compareAndNotify()},removeResizeHandlers(){this._resizeObject&&this._resizeObject.onload&&(!Y&&this._resizeObject.contentDocument&&this._resizeObject.contentDocument.defaultView.removeEventListener("resize",this.compareAndNotify),this.$el.removeChild(this._resizeObject),this._resizeObject.onload=null,this._resizeObject=null)}}};const Gt=Ae();Ne("data-v-b329ee4c");const Xt={class:"resize-observer",tabindex:"-1"};Ve();const Qt=Gt((e,t,n,o,i,r)=>(u(),T("div",Xt)));Q.render=Qt;Q.__scopeId="data-v-b329ee4c";Q.__file="src/components/ResizeObserver.vue";function G(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?G=function(t){return typeof t}:G=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},G(e)}function Zt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function fe(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function Jt(e,t,n){return t&&fe(e.prototype,t),n&&fe(e,n),e}function pe(e){return en(e)||tn(e)||nn(e)||on()}function en(e){if(Array.isArray(e))return ee(e)}function tn(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function nn(e,t){if(e){if(typeof e=="string")return ee(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ee(e,t)}}function ee(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function on(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
2
2
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function sn(e){var t;return typeof e=="function"?t={callback:e}:t=e,t}function rn(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o,i,r,l=function(a){for(var m=arguments.length,h=new Array(m>1?m-1:0),v=1;v<m;v++)h[v-1]=arguments[v];if(r=h,!(o&&a===i)){var b=n.leading;typeof b=="function"&&(b=b(a,i)),(!o||a!==i)&&b&&e.apply(void 0,[a].concat(pe(r))),i=a,clearTimeout(o),o=setTimeout(function(){e.apply(void 0,[a].concat(pe(r))),o=0},t)}};return l._clear=function(){clearTimeout(o),o=null},l}function Ie(e,t){if(e===t)return!0;if(G(e)==="object"){for(var n in e)if(!Ie(e[n],t[n]))return!1;return!0}return!1}var ln=function(){function e(t,n,o){Zt(this,e),this.el=t,this.observer=null,this.frozen=!1,this.createObserver(n,o)}return Jt(e,[{key:"createObserver",value:function(n,o){var i=this;if(this.observer&&this.destroyObserver(),!this.frozen){if(this.options=sn(n),this.callback=function(d,a){i.options.callback(d,a),d&&i.options.once&&(i.frozen=!0,i.destroyObserver())},this.callback&&this.options.throttle){var r=this.options.throttleOptions||{},l=r.leading;this.callback=rn(this.callback,this.options.throttle,{leading:function(a){return l==="both"||l==="visible"&&a||l==="hidden"&&!a}})}this.oldResult=void 0,this.observer=new IntersectionObserver(function(d){var a=d[0];if(d.length>1){var m=d.find(function(v){return v.isIntersecting});m&&(a=m)}if(i.callback){var h=a.isIntersecting&&a.intersectionRatio>=i.threshold;if(h===i.oldResult)return;i.oldResult=h,i.callback(h,a)}},this.options.intersection),$e(function(){i.observer&&i.observer.observe(i.el)})}}},{key:"destroyObserver",value:function(){this.observer&&(this.observer.disconnect(),this.observer=null),this.callback&&this.callback._clear&&(this.callback._clear(),this.callback=null)}},{key:"threshold",get:function(){return this.options.intersection&&typeof this.options.intersection.threshold=="number"?this.options.intersection.threshold:0}}]),e}();function Se(e,t,n){var o=t.value;if(o)if(typeof IntersectionObserver>"u")console.warn("[vue-observe-visibility] IntersectionObserver API is not available in your browser. Please install this polyfill: https://github.com/w3c/IntersectionObserver/tree/master/polyfill");else{var i=new ln(e,o,n);e._vue_visibilityState=i}}function an(e,t,n){var o=t.value,i=t.oldValue;if(!Ie(o,i)){var r=e._vue_visibilityState;if(!o){ze(e);return}r?r.createObserver(o,n):Se(e,{value:o},n)}}function ze(e){var t=e._vue_visibilityState;t&&(t.destroyObserver(),delete e._vue_visibilityState)}var cn={beforeMount:Se,updated:an,unmounted:ze},dn={itemsLimit:1e3},un=/(auto|scroll)/;function Me(e,t){return e.parentNode===null?t:Me(e.parentNode,t.concat([e]))}var Z=function(t,n){return getComputedStyle(t,null).getPropertyValue(n)},mn=function(t){return Z(t,"overflow")+Z(t,"overflow-y")+Z(t,"overflow-x")},fn=function(t){return un.test(mn(t))};function he(e){if(e instanceof HTMLElement||e instanceof SVGElement){for(var t=Me(e.parentNode,[]),n=0;n<t.length;n+=1)if(fn(t[n]))return t[n];return document.scrollingElement||document.documentElement}}function te(e){"@babel/helpers - typeof";return te=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},te(e)}var pn={items:{type:Array,required:!0},keyField:{type:String,default:"id"},direction:{type:String,default:"vertical",validator:function(t){return["vertical","horizontal"].includes(t)}},listTag:{type:String,default:"div"},itemTag:{type:String,default:"div"}};function hn(){return this.items.length&&te(this.items[0])!=="object"}var ne=!1;if(typeof window<"u"){ne=!1;try{var _n=Object.defineProperty({},"passive",{get:function(){ne=!0}});window.addEventListener("test",null,_n)}catch{}}let vn=0;var se={name:"RecycleScroller",components:{ResizeObserver:Q},directives:{ObserveVisibility:cn},props:{...pn,itemSize:{type:Number,default:null},gridItems:{type:Number,default:void 0},itemSecondarySize:{type:Number,default:void 0},minItemSize:{type:[Number,String],default:null},sizeField:{type:String,default:"size"},typeField:{type:String,default:"type"},buffer:{type:Number,default:200},pageMode:{type:Boolean,default:!1},prerender:{type:Number,default:0},emitUpdate:{type:Boolean,default:!1},updateInterval:{type:Number,default:0},skipHover:{type:Boolean,default:!1},listTag:{type:String,default:"div"},itemTag:{type:String,default:"div"},listClass:{type:[String,Object,Array],default:""},itemClass:{type:[String,Object,Array],default:""}},emits:["resize","visible","hidden","update","scroll-start","scroll-end"],data(){return{pool:[],totalSize:0,ready:!1,hoverKey:null}},computed:{sizes(){if(this.itemSize===null){const e={"-1":{accumulator:0}},t=this.items,n=this.sizeField,o=this.minItemSize;let i=1e4,r=0,l;for(let d=0,a=t.length;d<a;d++)l=t[d][n]||o,l<i&&(i=l),r+=l,e[d]={accumulator:r,size:l};return this.$_computedMinItemSize=i,e}return[]},simpleArray:hn,itemIndexByKey(){const{keyField:e,items:t}=this,n={};for(let o=0,i=t.length;o<i;o++)n[t[o][e]]=o;return n}},watch:{items(){this.updateVisibleItems(!0)},pageMode(){this.applyPageMode(),this.updateVisibleItems(!1)},sizes:{handler(){this.updateVisibleItems(!1)},deep:!0},gridItems(){this.updateVisibleItems(!0)},itemSecondarySize(){this.updateVisibleItems(!0)}},created(){this.$_startIndex=0,this.$_endIndex=0,this.$_views=new Map,this.$_unusedViews=new Map,this.$_scrollDirty=!1,this.$_lastUpdateScrollPosition=0,this.prerender&&(this.$_prerender=!0,this.updateVisibleItems(!1)),this.gridItems&&!this.itemSize&&console.error("[vue-recycle-scroller] You must provide an itemSize when using gridItems")},mounted(){this.applyPageMode(),this.$nextTick(()=>{this.$_prerender=!1,this.updateVisibleItems(!0),this.ready=!0})},activated(){const e=this.$_lastUpdateScrollPosition;typeof e=="number"&&this.$nextTick(()=>{this.scrollToPosition(e)})},beforeUnmount(){this.removeListeners()},methods:{addView(e,t,n,o,i){const r=Pe({id:vn++,index:t,used:!0,key:o,type:i}),l=Be({item:n,position:0,nr:r});return e.push(l),l},unuseView(e,t=!1){const n=this.$_unusedViews,o=e.nr.type;let i=n.get(o);i||(i=[],n.set(o,i)),i.push(e),t||(e.nr.used=!1,e.position=-9999)},handleResize(){this.$emit("resize"),this.ready&&this.updateVisibleItems(!1)},handleScroll(e){if(!this.$_scrollDirty){if(this.$_scrollDirty=!0,this.$_updateTimeout)return;const t=()=>requestAnimationFrame(()=>{this.$_scrollDirty=!1;const{continuous:n}=this.updateVisibleItems(!1,!0);n||(clearTimeout(this.$_refreshTimout),this.$_refreshTimout=setTimeout(this.handleScroll,this.updateInterval+100))});t(),this.updateInterval&&(this.$_updateTimeout=setTimeout(()=>{this.$_updateTimeout=0,this.$_scrollDirty&&t()},this.updateInterval))}},handleVisibilityChange(e,t){this.ready&&(e||t.boundingClientRect.width!==0||t.boundingClientRect.height!==0?(this.$emit("visible"),requestAnimationFrame(()=>{this.updateVisibleItems(!1)})):this.$emit("hidden"))},updateVisibleItems(e,t=!1){const n=this.itemSize,o=this.gridItems||1,i=this.itemSecondarySize||n,r=this.$_computedMinItemSize,l=this.typeField,d=this.simpleArray?null:this.keyField,a=this.items,m=a.length,h=this.sizes,v=this.$_views,b=this.$_unusedViews,p=this.pool,I=this.itemIndexByKey;let $,x,k,N,V;if(!m)$=x=N=V=k=0;else if(this.$_prerender)$=N=0,x=V=Math.min(this.prerender,a.length),k=null;else{const y=this.getScroll();if(t){let O=y.start-this.$_lastUpdateScrollPosition;if(O<0&&(O=-O),n===null&&O<r||O<n)return{continuous:!0}}this.$_lastUpdateScrollPosition=y.start;const A=this.buffer;y.start-=A,y.end+=A;let M=0;if(this.$refs.before&&(M=this.$refs.before.scrollHeight,y.start-=M),this.$refs.after){const O=this.$refs.after.scrollHeight;y.end+=O}if(n===null){let O,q=0,le=m-1,P=~~(m/2),ae;do ae=P,O=h[P].accumulator,O<y.start?q=P:P<m-1&&h[P+1].accumulator>y.start&&(le=P),P=~~((q+le)/2);while(P!==ae);for(P<0&&(P=0),$=P,k=h[m-1].accumulator,x=P;x<m&&h[x].accumulator<y.end;x++);for(x===-1?x=a.length-1:(x++,x>m&&(x=m)),N=$;N<m&&M+h[N].accumulator<y.start;N++);for(V=N;V<m&&M+h[V].accumulator<y.end;V++);}else{$=~~(y.start/n*o);const O=$%o;$-=O,x=Math.ceil(y.end/n*o),N=Math.max(0,Math.floor((y.start-M)/n*o)),V=Math.floor((y.end-M)/n*o),$<0&&($=0),x>m&&(x=m),N<0&&(N=0),V>m&&(V=m),k=Math.ceil(m/o)*n}}x-$>dn.itemsLimit&&this.itemsLimitError(),this.totalSize=k;let f;const j=$<=this.$_endIndex&&x>=this.$_startIndex;if(j)for(let y=0,A=p.length;y<A;y++)f=p[y],f.nr.used&&(e&&(f.nr.index=I[f.item[d]]),(f.nr.index==null||f.nr.index<$||f.nr.index>=x)&&this.unuseView(f));const re=j?null:new Map;let D,R,W;for(let y=$;y<x;y++){D=a[y];const A=d?D[d]:D;if(A==null)throw new Error(`Key is ${A} on item (keyField is '${d}')`);if(f=v.get(A),!n&&!h[y].size){f&&this.unuseView(f);continue}R=D[l];let M=b.get(R),O=!1;if(!f)j?M&&M.length?f=M.pop():f=this.addView(p,y,D,A,R):(W=re.get(R)||0,(!M||W>=M.length)&&(f=this.addView(p,y,D,A,R),this.unuseView(f,!0),M=b.get(R)),f=M[W],re.set(R,W+1)),v.delete(f.nr.key),f.nr.used=!0,f.nr.index=y,f.nr.key=A,f.nr.type=R,v.set(A,f),O=!0;else if(!f.nr.used&&(f.nr.used=!0,O=!0,M)){const q=M.indexOf(f);q!==-1&&M.splice(q,1)}f.item=D,O&&(y===a.length-1&&this.$emit("scroll-end"),y===0&&this.$emit("scroll-start")),n===null?(f.position=h[y-1].accumulator,f.offset=0):(f.position=Math.floor(y/o)*n,f.offset=y%o*i)}return this.$_startIndex=$,this.$_endIndex=x,this.emitUpdate&&this.$emit("update",$,x,N,V),clearTimeout(this.$_sortTimer),this.$_sortTimer=setTimeout(this.sortViews,this.updateInterval+300),{continuous:j}},getListenerTarget(){let e=he(this.$el);return window.document&&(e===window.document.documentElement||e===window.document.body)&&(e=window),e},getScroll(){const{$el:e,direction:t}=this,n=t==="vertical";let o;if(this.pageMode){const i=e.getBoundingClientRect(),r=n?i.height:i.width;let l=-(n?i.top:i.left),d=n?window.innerHeight:window.innerWidth;l<0&&(d+=l,l=0),l+d>r&&(d=r-l),o={start:l,end:l+d}}else n?o={start:e.scrollTop,end:e.scrollTop+e.clientHeight}:o={start:e.scrollLeft,end:e.scrollLeft+e.clientWidth};return o},applyPageMode(){this.pageMode?this.addListeners():this.removeListeners()},addListeners(){this.listenerTarget=this.getListenerTarget(),this.listenerTarget.addEventListener("scroll",this.handleScroll,ne?{passive:!0}:!1),this.listenerTarget.addEventListener("resize",this.handleResize)},removeListeners(){this.listenerTarget&&(this.listenerTarget.removeEventListener("scroll",this.handleScroll),this.listenerTarget.removeEventListener("resize",this.handleResize),this.listenerTarget=null)},scrollToItem(e){let t;const n=this.gridItems||1;this.itemSize===null?t=e>0?this.sizes[e-1].accumulator:0:t=Math.floor(e/n)*this.itemSize,this.scrollToPosition(t)},scrollToPosition(e){const t=this.direction==="vertical"?{scroll:"scrollTop",start:"top"}:{scroll:"scrollLeft",start:"left"};let n,o,i;if(this.pageMode){const r=he(this.$el),l=r.tagName==="HTML"?0:r[t.scroll],d=r.getBoundingClientRect(),m=this.$el.getBoundingClientRect()[t.start]-d[t.start];n=r,o=t.scroll,i=e+l+m}else n=this.$el,o=t.scroll,i=e;n[o]=i},itemsLimitError(){throw setTimeout(()=>{console.log("It seems the scroller element isn't scrolling, so it tries to render all the items at once.","Scroller:",this.$el),console.log("Make sure the scroller has a fixed height (or width) and 'overflow-y' (or 'overflow-x') set to 'auto' so it can scroll correctly and only render the items visible in the scroll viewport.")}),new Error("Rendered items limit reached")},sortViews(){this.pool.sort((e,t)=>e.nr.index-t.nr.index)}}};const gn={key:0,ref:"before",class:"vue-recycle-scroller__slot"},yn={key:1,ref:"after",class:"vue-recycle-scroller__slot"};function bn(e,t,n,o,i,r){const l=Le("ResizeObserver"),d=je("observe-visibility");return Re((u(),w("div",{class:F(["vue-recycle-scroller",{ready:i.ready,"page-mode":n.pageMode,[`direction-${e.direction}`]:!0}]),onScrollPassive:t[0]||(t[0]=(...a)=>r.handleScroll&&r.handleScroll(...a))},[e.$slots.before?(u(),w("div",gn,[E(e.$slots,"before")],512)):S("v-if",!0),(u(),T(ue(n.listTag),{ref:"wrapper",style:He({[e.direction==="vertical"?"minHeight":"minWidth"]:i.totalSize+"px"}),class:F(["vue-recycle-scroller__item-wrapper",n.listClass])},{default:g(()=>[(u(!0),w(L,null,H(i.pool,a=>(u(),T(ue(n.itemTag),Ee({key:a.nr.id,style:i.ready?{transform:`translate${e.direction==="vertical"?"Y":"X"}(${a.position}px) translate${e.direction==="vertical"?"X":"Y"}(${a.offset}px)`,width:n.gridItems?`${e.direction==="vertical"&&n.itemSecondarySize||n.itemSize}px`:void 0,height:n.gridItems?`${e.direction==="horizontal"&&n.itemSecondarySize||n.itemSize}px`:void 0}:null,class:["vue-recycle-scroller__item-view",[n.itemClass,{hover:!n.skipHover&&i.hoverKey===a.nr.key}]]},De(n.skipHover?{}:{mouseenter:()=>{i.hoverKey=a.nr.key},mouseleave:()=>{i.hoverKey=null}})),{default:g(()=>[E(e.$slots,"default",{item:a.item,index:a.nr.index,active:a.nr.used})]),_:2},1040,["style","class"]))),128)),E(e.$slots,"empty")]),_:3},8,["style","class"])),e.$slots.after?(u(),w("div",yn,[E(e.$slots,"after")],512)):S("v-if",!0),_(l,{onNotify:r.handleResize},null,8,["onNotify"])],34)),[[d,r.handleVisibilityChange]])}se.render=bn;se.__file="src/components/RecycleScroller.vue";const xn={"h-full":"",flex:"~ col gap-4"},$n={flex:"~ items-center"},wn={flex:"~ col","w-30":"","of-auto":""},kn={flex:"~ justify-between","w-full":"","text-xs":"",capitalize:"",op75:""},In={"flex-auto":"","of-auto":"",flex:"~ col gap-2",pl6:"",pr4:""},Sn=U({__name:"ModuleInstallList",emits:["close"],setup(e,{emit:t}){const n=t,o=Xe(),i=["downloads","stars","updated","created"],r=K(!1),l=K(i[0]),d={downloads:(b,p)=>b.stats.downloads-p.stats.downloads,stars:(b,p)=>b.stats.stars-p.stats.stars,created:(b,p)=>b.stats.createdAt-p.stats.createdAt,updated:(b,p)=>b.stats.publishedAt-p.stats.publishedAt},a=B(()=>o.value?.slice().sort((b,p)=>d[l.value](b,p)*(r.value?1:-1))),m=K(""),h=B(()=>new Fe(a.value||[],{keys:["name","description","npm","category"]})),v=B(()=>m.value?h.value.search(m.value).map(b=>b.item):a.value);return(b,p)=>{const I=Ze,$=X,x=ve,k=ke,N=Je,V=Kt;return u(),w("div",xn,[_(I,{mx6:"",mt6:"","text-xl":"",op75:"",icon:"i-carbon-intent-request-create",text:"Install Module"}),_(N,{search:c(m),"onUpdate:search":p[1]||(p[1]=f=>Ue(m)?m.value=f:null),"no-padding":"","px-6":"","pb-5":"","pt-2":""},{actions:g(()=>[_(k,{direction:"end",n:"sm primary"},{trigger:g(({click:f})=>[s("div",$n,[_($,{icon:c(r)?"tabler:sort-ascending":"tabler:sort-descending","h-full":"","rounded-r-none":"",onClick:p[0]||(p[0]=j=>r.value=!c(r))},null,8,["icon"]),_($,{flex:"~ justify-between","min-w-30":"","border-l-0":"","rounded-l-none":"","px-2":"",capitalize:"",hover:"border-l-1",onClick:j=>f()},{default:g(()=>[z(C(c(l))+" ",1),_(x,{icon:"carbon:chevron-down"})]),_:2},1032,["onClick"])])]),default:g(()=>[s("div",wn,[(u(),w(L,null,H(i,f=>_($,{key:f,border:!1,p2:"",hover:"n-checkbox-hover text-green",onClick:j=>l.value=f},{default:g(()=>[s("span",kn,[z(C(f)+" ",1),c(l)===f?(u(),T(x,{key:0,icon:"carbon:checkmark"})):S("",!0)])]),_:2},1032,["onClick"])),64))])]),_:1})]),_:1},8,["search"]),s("div",In,[_(c(se),{class:"scroller",items:c(v),"item-size":200,"key-field":"name"},{default:g(({item:f})=>[_(V,{item:f,onStart:p[2]||(p[2]=j=>n("close"))},null,8,["item"])]),_:1},8,["items"])])])}}}),zn={flex:"~ col gap-2","w-150":"",p4:"",border:"t base"},Mn={capitalize:""},Cn=s("p",{op50:""}," The following command will be executed in your terminal: ",-1),Tn={op50:""},On=s("p",null,[s("span",{op50:""},"After that, Nuxt will "),s("span",{"text-orange":""},"restart automatically"),z(". ")],-1),Nn={flex:"~ gap-3",mt2:"","justify-end":""},Vn=U({__name:"ModuleActionDialog",setup(e){const t=qe(),n=_e(),o={};return(i,r)=>{const l=oe,d=tt,a=nt,m=it,h=We,v=X,b=Ke;return u(),T(c(be),null,{default:g(({resolve:p,args:I})=>[_(b,{"model-value":!0,onClose:$=>p(!1)},{default:g(()=>[_(l,{mod:o,info:I[0],border:"none","w-150":"","n-panel-grids":""},null,8,["info"]),s("div",zn,[s("h2",{"text-xl":"",class:F(I[2]==="install"?"text-primary":"text-red")},[s("span",Mn,C(I[2]),1),z(),s("code",null,C(I[0].name),1),z("? ")],2),Cn,_(d,{code:I[1].commands.join(" "),lang:"bash",px4:"",py2:"",border:"~ base rounded",lines:!1},null,8,["code"]),s("p",Tn,[z(" Then your "),_(a,{role:"button",n:"primary",underline:"",onClick:r[0]||(r[0]=$=>c(n)(c(t)?._nuxtConfigFile)),textContent:"Nuxt config"}),z(" will be updated as: ")]),_(m,{from:I[1].configOriginal,to:I[1].configGenerated,"max-h-80":"","of-auto":"",py2:"",border:"~ base rounded",lang:"ts"},null,8,["from","to"]),On,s("div",Nn,[_(h,{n:"sm amber","flex-auto":"",icon:"i-carbon-data-backup"},{default:g(()=>[z(" Please make sure to backup your project first. ")]),_:1}),_(v,{onClick:$=>p(!1)},{default:g(()=>[z(" Cancel ")]),_:2},1032,["onClick"]),_(v,{n:"solid",capitalize:"",class:F(I[2]==="install"?"n-primary":"n-red"),onClick:$=>p(!0)},{default:g(()=>[z(C(I[2]),1)]),_:2},1032,["class","onClick"])])])]),_:2},1032,["onClose"])]),_:1})}}}),An={class:"markdown-body"},Pn=s("h1",null,"Modules",-1),Bn=s("p",null,[z("Nuxt provides a module system to extend the framework core and simplify integrations. You don’t need to develop everything from scratch or maintain boilerplate if there is already a Nuxt module for it. Adding Nuxt modules is possible using "),s("code",null,"nuxt.config"),z(".")],-1),Ln=s("p",null,[z("You can explore the list of modules on "),s("a",{href:"https://nuxt.com/modules",target:"_blank",rel:"noopener"},"nuxt.com/modules"),z(" or install them directly inside the DevTools.")],-1),jn=s("p",null,[s("a",{href:"https://nuxt.com/docs/guide/concepts/modules",target:"_blank",rel:"noopener"},"Learn more in the documentation")],-1),Rn=[Pn,Bn,Ln,jn],En={__name:"modules",setup(e,{expose:t}){return t({frontmatter:{}}),(o,i)=>(u(),w("div",An,Rn))}},Dn={"h-full":"","w-full":"","of-auto":""},Hn={relative:"","h-20":"","w-20":"",flex:"","flex-none":"",rounded:"","bg-gray:3":"",p3:""},Fn=["src","alt"],Un=s("div",{"i-carbon-cube":"",ma:"","text-4xl":"",op30:""},null,-1),qn={"text-lg":"","group-hover":"text-primary",transition:"",flex:"~ gap-2 items-center"},Wn=s("div",{"i-carbon-circle-dash":"","animate-spin":"","text-xl":"",op75:""},null,-1),Kn={op75:""},Yn=s("div",{"i-carbon-intent-request-create":"","text-4xl":"",op40:"","group-hover":"op75 text-primary",transition:""},null,-1),Gn=s("div",{"text-lg":"",op40:"","group-hover":"op75 text-primary",transition:""}," Install New Module ",-1),Xn={key:0,border:"l base",pos:"fixed bottom-0 right-0 top-0","z-200":"","w-150":"","bg-base":""},Qn="https://api.nuxtjs.org/api/ipx/s_80,f_webp/gh/nuxt/modules/main/icons/",mi=U({__name:"modules",setup(e){const t=K(!1),n=we(),o=ye(),i=B(()=>n.value.filter(l=>l.isPackageModule)),r=B(()=>n.value.filter(l=>!l.isPackageModule));return Ye(()=>[{id:"action:modules:install",title:"Install a new module",icon:"i-carbon-intent-request-create ",action:()=>{t.value=!0}}]),(l,d)=>{const a=Wt,m=ge,h=ie,v=Qe,b=X,p=Sn,I=Vn,$=En,x=ot;return u(),w(L,null,[s("div",Dn,[_(v,{icon:"carbon-3d-mpr-toggle",text:"Installed Modules","container-class":"grid grid-cols-minmax-400px gap3 px4",padding:!1,description:`Total modules: ${c(i).length}`},{default:g(()=>[(u(!0),w(L,null,H(c(i),k=>(u(),T(a,{key:k.name,mod:k},null,8,["mod"]))),128)),(u(!0),w(L,null,H("processInstallingModules"in l?l.processInstallingModules:c(xe),k=>(u(),T(h,{key:k.processId,block:"","min-h-30":"",to:"/modules/terminals",onClick:N=>o.value=k.processId},{default:g(()=>[_(m,{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:g(()=>[s("div",Hn,[s("img",{src:Qn+k.info.icon,alt:k.info.name,ma:""},null,8,Fn),Un]),s("div",qn,[Wn,s("span",Kn,"Installing "+C(k.name)+"...",1)])]),_:2},1024)]),_:2},1032,["onClick"]))),128)),_(m,{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:d[0]||(d[0]=k=>t.value=!0)},{default:g(()=>[Yn,Gn]),_:1})]),_:1},8,["description"]),c(r).length?(u(),T(v,{key:0,icon:"carbon-3d-mpr-toggle",text:"User Modules","container-class":"grid grid-cols-minmax-400px gap3 px4",padding:!1,description:`Total modules: ${c(r).length}`},{default:g(()=>[(u(!0),w(L,null,H(c(r),k=>(u(),w(L,{key:k.meta?.name||k.entryPath},[k.meta?.name||k.entryPath?(u(),T(a,{key:0,mod:k},null,8,["mod"])):S("",!0)],64))),128))]),_:1},8,["description"])):S("",!0),_(me,{name:"fade-in"},{default:g(()=>[c(t)?(u(),w("div",{key:0,class:"fixed bottom-0 left-0 right-0 top-0 z-100","bg-black:20":"","backdrop-blur-2":"",onClick:d[1]||(d[1]=k=>t.value=!1)})):S("",!0)]),_:1}),_(me,{name:"slide-in"},{default:g(()=>[c(t)?(u(),w("div",Xn,[_(b,{icon:"carbon-close",pos:"absolute top-3 right-3 z-10","rounded-full":"","text-xl":"",border:!1,onClick:d[2]||(d[2]=k=>t.value=!1)}),_(p,{onClose:d[3]||(d[3]=k=>t.value=!1)})])):S("",!0)]),_:1}),_(I)]),_(x,null,{default:g(()=>[_($)]),_:1})],64)}}});export{mi as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{q as r,aa as n}from"./entry.
|
|
1
|
+
import{q as r,aa as n}from"./entry.52bc93cd.js";const t={};function o(e,s){return n(e.$slots,"default")}const c=r(t,[["render",o]]);export{c as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.quote[data-v-
|
|
1
|
+
.quote[data-v-6d584478]:before{background-color:#3390ec;border-radius:2px;content:"";flex:0 0 auto;margin:3px 8px 2px 0;width:2px}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{d as N,a as C,aV as oe,e as
|
|
1
|
+
import{d as N,a as C,aV as oe,e as ne,ac as G,r as A,f as t,h as I,j as _,p as x,o,k as e,m as a,n as B,G as O,t as p,F as S,i as d,v as $,ao as H,_ as J,a9 as R,aW as P,aX as ae,aY as se,aZ as re,y as ie,z as ce,q as le,a_ as de,a$ as pe,b0 as me,b as ue,b1 as ge,b2 as he,b3 as _e,b4 as E,ay as fe,a2 as ve,l as be,ae as we,I as z,X as xe}from"./entry.52bc93cd.js";import{_ as ye}from"./NNavbar.vue.9cb56412.js";import{_ as U}from"./NLink.vue.0a35d66d.js";import{_ as q}from"./NSectionBlock.f3242abf.js";import{_ as ke}from"./NCodeBlock.vue.7e25538f.js";import{_ as $e}from"./HelpFab.vue.452fd066.js";import"./NIconTitle.vue.8e6741d5.js";import"./client.7628b7e9.js";const K=[{name:"title",suggestion:"required",head:{title:"[title]"},seoMeta:{title:"[title]"},docs:"https://developer.mozilla.org/en-US/docs/Web/HTML/Element/title",description:"A concise and descriptive title for the browser that accurately summarizes the content of the page."},{name:"description",suggestion:"required",head:{meta:[{name:"description",content:"[description]"}]},seoMeta:{description:"[description]"},description:"A one to two sentence summary for search engines that includes relevant keywords to improve visibility in search results."},{name:"icon",suggestion:"recommended",head:{link:[{rel:"icon",type:"image/png",href:"/favicon.png"}]},description:"A small image that appears in the browser tab and bookmark menu to help users easily identify the page."},{name:"lang",suggestion:"recommended",head:{htmlAttrs:{lang:"en"}},description:"The primary language of the page to help search engines and browsers understand the content."},{name:"og:title",suggestion:"recommended",head:{meta:[{property:"og:title",content:"[og:title]"}]},seoMeta:{ogTitle:"[og:title]"},docs:"https://ogp.me/#metadata",description:"A title for the link preview used by social media platforms."},{name:"og:description",suggestion:"recommended",head:{meta:[{property:"og:description",content:"[og:description]"}]},seoMeta:{ogDescription:"[og:description]"},docs:"https://ogp.me/#metadata",description:"A description for the link preview used by social media platforms."},{name:"og:image",suggestion:"recommended",head:{meta:[{property:"og:image",content:"[og:image]"}]},seoMeta:{ogImage:"[og:image]"},docs:"https://ogp.me/#metadata",description:"An image for the link preview used by social media platforms."},{name:"og:url",suggestion:"recommended",head:{meta:[{property:"og:url",content:"[og:url]"}]},seoMeta:{ogUrl:"[og:url]"},docs:"https://ogp.me/#metadata",description:"A canonical URL for the link preview used to specify the preferred URL to display in search engine results and social media previews when multiple URLs may point to the same page."},{name:"twitter:title",suggestion:"recommended",head:{meta:[{name:"twitter:title",content:"[twitter:title]"}]},seoMeta:{twitterTitle:"[twitter:title]"},docs:"https://developer.twitter.com/en/docs/twitter-for-websites/cards/overview/abouts-cards",description:"A title for the Twitter card used to provide a preview of the content shared on the page."},{name:"twitter:description",suggestion:"recommended",head:{meta:[{name:"twitter:description",content:"[twitter:description]"}]},seoMeta:{twitterDescription:"[twitter:description]"},docs:"https://developer.twitter.com/en/docs/twitter-for-websites/cards/overview/abouts-cards",description:"A description for the Twitter card used to provide a preview of the content shared on the page."},{name:"twitter:image",suggestion:"recommended",head:{meta:[{name:"twitter:image",content:"[twitter:image]"}]},seoMeta:{twitterImage:"[twitter:image]"},docs:"https://developer.twitter.com/en/docs/twitter-for-websites/cards/overview/abouts-cards",description:"An image for the Twitter card used to provide a preview of the content shared on the page."},{name:"twitter:card",suggestion:"recommended",head:{meta:[{name:"twitter:card",content:"summary"}]},seoMeta:{twitterCard:"summary"},docs:"https://developer.twitter.com/en/docs/twitter-for-websites/cards/overview/abouts-cards",description:"The type of Twitter card to use, which determines the type of card to display in link previews on Twitter."}],Te={flex:"~ wrap","mt--2":"","w-full":"","flex-none":""},Se=["onClick"],Ce=e("div",{border:"b base","flex-auto":""},null,-1),Ne={key:0,"x-divider":""},Me={key:1,"x-divider":""},Oe={flex:"~ gap-1 items-center",class:"px2 pt2",lg:"px4 py2"},Ie=e("div",{"i-carbon-warning":"","text-orange":""},null,-1),Ae={"w-full":"",p2:"",op75:""},Be={key:1,m4:"",flex:"~ col gap-2"},Re={flex:"~ gap-1 wrap items-center"},Le={key:1},je={flex:"~ gap-2",n:"sm primary",absolute:"","right-2":"","top-2":""},Fe=N({__name:"OpenGraphMissingTabs",props:{tags:{},matchedRouteFilepath:{}},setup(h){const s=h,l=C(()=>K.filter(r=>!s.tags?.some(g=>g.name===r.name))),n=C(()=>{let r={};const g={};l.value.forEach(u=>{u.seoMeta?Object.assign(g,u.seoMeta):r=oe(r,u.head)});const b=[];if(Object.keys(g).length){const u=JSON.stringify(g,null,2).replace(/"([^"]+)":/g,"$1:").replace(/"/g,"'");b.push(`useSeoMeta(${u})`)}if(Object.keys(r).length){const u=JSON.stringify(r,null,2).replace(/"([^"]+)":/g,"$1:").replace(/"/g,"'");b.push(`useHead(${u})`)}return b.join(`
|
|
2
2
|
|
|
3
|
-
`)}),m=ae(),y=G(),k=["Missing Tags","Code Snippet"],f=A(k[0]);return(r,g)=>{const b=U,u=H,T=J,M=ke,L=q;return t(l).length?(o(),I(L,{key:0,text:"Missing Tags",description:`${t(l).length} missing tags`,icon:"carbon:warning-other","header-class":"text-orange op100! [[open]_&]:text-inherit",padding:!1},{default:_(()=>[e("div",Te,[(o(),n(S,null,B(k,(i,c)=>e("button",{key:c,px4:"",py2:"",border:"r t base",hover:"bg-active",class:O(i===t(f)?"":"border-b"),onClick:v=>f.value=i},[e("div",{class:O(i===t(f)?"":"op30"),capitalize:""},p(i),3)],10,Se)),64)),Ce]),t(f)===k[0]?(o(),I(u,{key:0,grid:"~ cols-[1fr] lg:cols-[max-content_1fr]",m4:"","items-center":"","justify-between":"","of-hidden":""},{default:_(()=>[(o(!0),n(S,null,B(t(l),(i,c)=>(o(),n(S,{key:c},[c?(o(),n("div",Ne)):x("",!0),c?(o(),n("div",Me)):x("",!0),e("div",Oe,[Ie,d(b,{"op-50":"",href:i.docs,target:"_blank",n:"orange"},{default:_(()=>[$(p(i.name),1)]),_:2},1032,["href"])]),e("div",Ae,p(i.description),1)],64))),128))]),_:1})):(o(),n("div",Be,[e("p",Re,[d(T,{icon:"carbon-copy",n:"xs","px-2":"",onClick:g[0]||(g[0]=i=>t(m)(t(a),"open-graph-suggestion"))},{default:_(()=>[$(" Copy ")]),_:1}),$(" the following code snippet and paste it into your "),r.matchedRouteFilepath?(o(),I(T,{key:0,icon:"carbon-launch",n:"xs","px-2":"",onClick:g[1]||(g[1]=i=>t(y)(r.matchedRouteFilepath))},{default:_(()=>[$(" page component ")]),_:1})):(o(),n("span",Le,"page component")),$(" to full fill the missing tags. ")]),d(u,{relative:"","n-code-block":""},{default:_(()=>[d(M,{code:t(a),lang:"ts",lines:!1,"w-full":"","of-auto":"",p3:""},null,8,["code"]),e("div",je,[d(T,{icon:"carbon-copy",onClick:g[2]||(g[2]=i=>t(m)(t(a),"open-graph-suggestion"))},{default:_(()=>[$(" Copy ")]),_:1})])]),_:1})]))]),_:1},8,["description"])):x("",!0)}}}),De={class:"max-w-[524px] min-w-[524px] cursor-pointer bg-base"},ze={class:"break-words border border-base px-[12px] py-[10px] antialiased"},Ve={class:"overflow-hidden truncate whitespace-nowrap text-[12px] leading-[11px] uppercase op50"},Ee={class:"block h-[46px] max-h-[46px] border-separate select-none overflow-hidden break-words text-left",style:{"border-spacing":"0px"}},Ge={class:"mt-[3px] truncate pt-[2px] text-[16px] font-semibold leading-[20px]"},He={class:"mt-[3px] block h-[18px] max-h-[80px] border-separate select-none overflow-hidden truncate whitespace-nowrap break-words text-left text-[14px] leading-[20px] op50",style:{"-webkit-line-clamp":"1","border-spacing":"0px","-webkit-box-orient":"vertical"}},Je=N({__name:"SocialFacebook",props:{card:{}},setup(h){return(s,l)=>(o(),n("div",De,[e("div",{class:"h-[274px] border border-b-0 border-base bg-cover bg-center bg-no-repeat",style:R({backgroundImage:`url(${JSON.stringify(s.card.image)})`})},null,4),e("div",ze,[e("div",Ve,p(s.card.url),1),e("div",Ee,[e("div",Ge,p(s.card.title),1),e("div",He,p(s.card.description),1)])])]))}}),Pe={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"}},Ue={class:"break-words border-base p-[0.75em] antialiased",flex:"~ col justify-center gap-[2px]"},qe={class:"overflow-hidden truncate whitespace-nowrap text-[15px] leading-[20px] lowercase op50"},Ke={class:"m-0 truncate text-[15px] font-semibold leading-[20px]"},We={class:"line-clamp-2 select-none overflow-hidden break-words text-left text-[15px] leading-[20px] op50"},Xe=N({__name:"SocialTwitter",props:{tags:{}},setup(h){const s=h,l=C(()=>P(s.tags,{title:[{tag:"title"}],image:[{tag:"meta",name:"twitter:image"},{tag:"meta",name:"og:image"}],imageAlt:[{tag:"meta",name:"twitter:image:alt"}],description:[{tag:"meta",name:"twitter:description"},{tag:"meta",name:"description"}],favicon:[{tag:"link",name:"icon"}]})),a=C(()=>l.value.image?s.tags.find(m=>m.tag==="meta"&&m.name==="twitter:card")?.value||"summary_large_image":"summary");return(m,y)=>(o(),n("div",Pe,[e("div",{class:O(["cursor-pointer overflow-hidden leading-[1.3em]",t(a)==="summary_large_image"?"":"flex"]),hover:"bg-[#88888805]"},[t(a)==="summary_large_image"?(o(),n("div",{key:0,class:"h-[220px] border-b border-base bg-cover bg-center bg-no-repeat",style:R({backgroundImage:`url(${JSON.stringify(t(l).image)})`})},null,4)):(o(),n("div",{key:1,class:"h-[129px] w-[129px] flex-none border-r border-base bg-cover bg-center bg-no-repeat",style:R({backgroundImage:`url(${JSON.stringify(t(l).image)})`})},null,4)),e("div",Ue,[e("div",qe,p(t(l).url),1),e("div",Ke,p(t(l).title),1),e("div",We,p(t(l).description),1)])],2)]))}}),Ye={class:"max-w-[520px] min-w-[520px] cursor-pointer overflow-hidden border border-base rounded-[2px] shadow-md bg-base"},Ze={class:"break-words p-[10px] antialiased"},Qe={class:"block h-auto max-h-[50px] border-separate select-none break-words text-left",style:{"border-spacing":"0px"}},et={class:"pb-[2px] text-[16px] font-semibold leading-[24px]"},tt={class:"overflow-hidden truncate whitespace-nowrap text-xs font-normal uppercase op85"},ot=N({__name:"SocialLinkedin",props:{card:{}},setup(h){return(s,l)=>(o(),n("div",Ye,[e("div",{class:"h-[270px] border-b border-base bg-cover bg-center bg-no-repeat",style:R({backgroundImage:`url(${JSON.stringify(s.card.image)})`})},null,4),e("div",Ze,[e("div",Qe,[e("div",et,p(s.card.title),1),e("div",tt,p(s.card.url),1)])])]))}}),at=h=>(ie("data-v-829ad8ca"),h=h(),ce(),h),nt={class:"relative max-w-[420px] min-w-[420px] rounded-[16px] rounded-bl-0 py-[6px] leading-[18px] drop-shadow-sm drop-shadow-color-[#10232f26] bg-base"},st={class:"pl-[10px] pr-[8px]"},rt={class:"leading-normal text-[#3390ec] underline"},it={class:"quote w-full flex"},ct={class:"flex flex-col gap-1"},lt={key:0,class:"my-[3px] overflow-hidden rounded"},dt=["src"],pt={class:"cursor-pointer text-sm text-[#3390ec]"},mt={class:"cursor-pointer text-sm"},ut={class:"cursor-pointer text-sm"},gt={class:"flex justify-end text-xs text-[#707579]"},ht=at(()=>e("svg",{width:"11",height:"20",viewBox:"0 0 11 20",xmlns:"http://www.w3.org/2000/svg",class:"absolute bottom-0 ml-[-8.4px] translate-y-px text-white"},[e("g",{transform:"translate(9 -14)","fill-rule":"evenodd"},[e("path",{id:"corner-fill",d:"M-6 16h6v17c-.193-2.84-.876-5.767-2.05-8.782-.904-2.325-2.446-4.485-4.625-6.48A1 1 0 01-6 16z",transform:"matrix(1 0 0 -1 0 49)",fill:"currentColor"})])],-1)),_t=N({__name:"SocialTelegram",props:{card:{}},setup(h){const s=ne(),l=se(re(),"HH:mm");return(a,m)=>(o(),n("div",nt,[e("div",st,[e("div",rt,p(a.card.url),1),e("div",it,[e("div",ct,[a.card.image?(o(),n("div",lt,[e("img",{class:"h-full max-w-full w-full rounded object-cover",src:a.card.image},null,8,dt)])):x("",!0),e("div",pt,[e("strong",null,p(t(s).hostname),1)]),e("div",mt,[e("strong",null,p(a.card.title),1)]),e("div",ut,p(a.card.description),1)])]),e("div",gt,[e("span",null,p(t(l)),1)])]),ht]))}});const ft=le(_t,[["__scopeId","data-v-829ad8ca"]]),vt={flex:"~ col"},bt={flex:"~ wrap","w-full":"","flex-none":""},wt=["onClick"],xt=e("div",{border:"b base","flex-auto":""},null,-1),yt={flex:"~ items-center justify-center","flex-auto":"",p4:"","n-panel-grids":""},kt={key:0},$t={key:1},Tt={key:2},St={key:3},Ct=N({__name:"SocialPreviewGroup",props:{tags:{}},setup(h){const s=h,l=["twitter","facebook","linkedin","telegram"],a=de("nuxt-devtools-social-preview-tab",l[0]),m=C(()=>P(s.tags,{title:[{tag:"title"}],image:[{tag:"meta",name:"og:image"}],imageAlt:[{tag:"meta",name:"og:image:alt"}],description:[{tag:"meta",name:"og:description"},{tag:"meta",name:"description"}],favicon:[{tag:"link",name:"icon"}]}));return(y,k)=>{const f=Je,r=Xe,g=ot,b=ft;return o(),n("div",vt,[e("div",bt,[(o(),n(S,null,B(l,(u,T)=>e("button",{key:T,px4:"",py2:"",border:"r base",hover:"bg-active",class:O(u===t(a)?"":"border-b"),onClick:M=>a.value=u},[e("div",{class:O(u===t(a)?"":"op30"),capitalize:""},p(u),3)],10,wt)),64)),xt]),e("div",yt,[t(a)==="facebook"?(o(),n("div",kt,[d(f,{card:t(m)},null,8,["card"])])):t(a)==="twitter"?(o(),n("div",$t,[d(r,{tags:y.tags},null,8,["tags"])])):t(a)==="linkedin"?(o(),n("div",Tt,[d(g,{card:t(m)},null,8,["card"])])):t(a)==="telegram"?(o(),n("div",St,[d(b,{card:t(m)},null,8,["card"])])):x("",!0)])])}}}),Nt={class:"markdown-body"},Mt=pe('<h1>Open Graph</h1><p>Nuxt provides several different ways to manage your meta tags using <a href="https://unhead.harlanzw.com/" target="_blank" rel="noopener"><code>unhead</code></a>. Improve your Nuxt app’s SEO with powerful head config, composables and components.</p><p><a href="https://nuxt.com/docs/getting-started/seo-meta" target="_blank" rel="noopener">Learn more on the documentation</a></p><hr><p>You can also find how open graph specs are defined in:</p><ul><li><a href="https://ogp.me/" target="_blank" rel="noopener">The Open Graph protocol</a></li><li><a href="https://developer.twitter.com/en/docs/twitter-for-websites/cards/guides/getting-started" target="_blank" rel="noopener">Twitter Cards</a></li></ul>',6),Ot=[Mt],It={__name:"open-graph",setup(h,{expose:s}){return s({frontmatter:{}}),(a,m)=>(o(),n("div",Nt,Ot))}},At={flex:"~ col lg:row","h-full":"","w-full":"","of-hidden":""},Bt={"flex-auto":"","of-auto":""},Rt={"flex-none":"",flex:"~ gap2 items-center"},Lt={flex:"~ col"},jt={key:0,"x-divider":""},Ft={key:1,"x-divider":""},Dt={mr2:"",px4:"",py2:""},qt=N({__name:"open-graph",setup(h){const s=A(0),l=me(),a=ue(async()=>(s.value,(await l.value?.resolveTags()).map(c=>{const v=c.props||{};return c.tag==="htmlAttrs"&&v.lang?{tag:"html",name:"lang",value:v.lang}:v.charset?{tag:"meta",name:"charset",value:v.charset}:{tag:c.tag,name:v.property??v.name??v.rel??c.tag,value:v.content??v.href??c.textContent??JSON.stringify(v)}})),[]),m=A(!0);function y(){s.value+=1}const k=ge(),f=he(),r=A(""),g=_e(),b=G();async function u(){r.value!==f.value.path&&k.value.push(r.value||"/")}const T=C(()=>r.value===f.value.path?[]:k.value.resolve(r.value||"/").matched),M=C(()=>{const i=g.value.find(c=>c.path===f.value?.matched?.[0]?.path);return i?.file||i?.meta?.file});function L(i){return K.find(c=>c.name===i.name)?.docs}return E(f).toBeTruthy().then(i=>{r.value=i.path}),E(k).toBeTruthy().then(i=>{i.afterEach(()=>{fe(()=>{r.value=f.value.path,setTimeout(y,200),setTimeout(y,800)})})}),(i,c)=>{const v=xe,j=J,W=ye,V=U,X=H,Y=q,Z=Fe,Q=Ct,ee=It,te=$e,F=ve("tooltip");return o(),n(S,null,[e("div",At,[e("div",Bt,[d(W,null,{search:_(()=>[d(v,{modelValue:t(r),"onUpdate:modelValue":c[0]||(c[0]=w=>be(r)?r.value=w:null),placeholder:"Route",icon:"carbon-direction-right-01 scale-y--100",n:"primary","flex-auto":"","font-mono":"",class:O(["px-5 py-2",t(f)?.path===t(r)?"":t(T).length?"text-green":"text-orange"]),onKeydown:we(u,["enter"])},null,8,["modelValue","class","onKeydown"])]),actions:_(()=>[e("div",Rt,[t(M)?z((o(),I(j,{key:0,"text-lg":"",border:!1,icon:"carbon:launch",title:"Open file in editor",onClick:c[1]||(c[1]=w=>t(b)(t(M)))},null,512)),[[F,"Open file in editor"]]):x("",!0),z(d(j,{"text-lg":"",border:!1,icon:"carbon:reset",title:"Refresh Data",onClick:y},null,512),[[F,"Refresh Data"]]),z(d(j,{"text-lg":"",border:!1,icon:t(m)?"carbon:side-panel-open":"carbon:open-panel-right",title:"Toggle Preview",onClick:c[2]||(c[2]=w=>m.value=!t(m))},null,8,["icon"]),[[F,"Toggle Preview"]])])]),_:1}),e("div",Lt,[d(Y,{text:"Tags",icon:"carbon:tag-group"},{default:_(()=>[d(X,{grid:"~ cols-[max-content_1fr]","items-center":"","justify-between":"","of-hidden":""},{default:_(()=>[(o(!0),n(S,null,B(t(a),(w,D)=>(o(),n(S,{key:D},[D?(o(),n("div",jt)):x("",!0),D?(o(),n("div",Ft)):x("",!0),e("div",Dt,[d(V,{op50:"",href:L(w),target:"_blank",n:"primary"},{default:_(()=>[$(p(w.name),1)]),_:2},1032,["href"])]),d(V,{href:w.value.match(/^https?:\/\//)?w.value:void 0,target:"_blank","w-full":"",p2:"","font-mono":"",n:"primary"},{default:_(()=>[$(p(w.value),1)]),_:2},1032,["href"])],64))),128))]),_:1})]),_:1}),d(Z,{tags:t(a),"matched-route-filepath":t(M)},null,8,["tags","matched-route-filepath"])])]),t(m)&&t(a)?.length?(o(),I(Q,{key:0,tags:t(a),"flex-none":"","border-base":"","lt-lg":"border-t",lg:"h-full w-140 border-l"},null,8,["tags"])):x("",!0)]),d(te,null,{default:_(()=>[d(ee)]),_:1})],64)}}});export{qt as default};
|
|
3
|
+
`)}),m=ne(),y=G(),k=["Missing Tags","Code Snippet"],f=A(k[0]);return(r,g)=>{const b=U,u=H,T=J,M=ke,L=q;return t(l).length?(o(),I(L,{key:0,text:"Missing Tags",description:`${t(l).length} missing tags`,icon:"carbon:warning-other","header-class":"text-orange op100! [[open]_&]:text-inherit",padding:!1},{default:_(()=>[e("div",Te,[(o(),a(S,null,B(k,(i,c)=>e("button",{key:c,px4:"",py2:"",border:"r t base",hover:"bg-active",class:O(i===t(f)?"":"border-b"),onClick:v=>f.value=i},[e("div",{class:O(i===t(f)?"":"op30"),capitalize:""},p(i),3)],10,Se)),64)),Ce]),t(f)===k[0]?(o(),I(u,{key:0,grid:"~ cols-[1fr] lg:cols-[max-content_1fr]",m4:"","items-center":"","justify-between":"","of-hidden":""},{default:_(()=>[(o(!0),a(S,null,B(t(l),(i,c)=>(o(),a(S,{key:c},[c?(o(),a("div",Ne)):x("",!0),c?(o(),a("div",Me)):x("",!0),e("div",Oe,[Ie,d(b,{"op-50":"",href:i.docs,target:"_blank",n:"orange"},{default:_(()=>[$(p(i.name),1)]),_:2},1032,["href"])]),e("div",Ae,p(i.description),1)],64))),128))]),_:1})):(o(),a("div",Be,[e("p",Re,[d(T,{icon:"carbon-copy",n:"xs","px-2":"",onClick:g[0]||(g[0]=i=>t(m)(t(n),"open-graph-suggestion"))},{default:_(()=>[$(" Copy ")]),_:1}),$(" the following code snippet and paste it into your "),r.matchedRouteFilepath?(o(),I(T,{key:0,icon:"carbon-launch",n:"xs","px-2":"",onClick:g[1]||(g[1]=i=>t(y)(r.matchedRouteFilepath))},{default:_(()=>[$(" page component ")]),_:1})):(o(),a("span",Le,"page component")),$(" to full fill the missing tags. ")]),d(u,{relative:"","n-code-block":""},{default:_(()=>[d(M,{code:t(n),lang:"ts",lines:!1,"w-full":"","of-auto":"",p3:""},null,8,["code"]),e("div",je,[d(T,{icon:"carbon-copy",onClick:g[2]||(g[2]=i=>t(m)(t(n),"open-graph-suggestion"))},{default:_(()=>[$(" Copy ")]),_:1})])]),_:1})]))]),_:1},8,["description"])):x("",!0)}}}),De={class:"max-w-[524px] min-w-[524px] cursor-pointer bg-base"},ze={class:"break-words border border-base px-[12px] py-[10px] antialiased"},Ve={class:"overflow-hidden truncate whitespace-nowrap text-[12px] leading-[11px] uppercase op50"},Ee={class:"block h-[46px] max-h-[46px] border-separate select-none overflow-hidden break-words text-left",style:{"border-spacing":"0px"}},Ge={class:"mt-[3px] truncate pt-[2px] text-[16px] font-semibold leading-[20px]"},He={class:"mt-[3px] block h-[18px] max-h-[80px] border-separate select-none overflow-hidden truncate whitespace-nowrap break-words text-left text-[14px] leading-[20px] op50",style:{"-webkit-line-clamp":"1","border-spacing":"0px","-webkit-box-orient":"vertical"}},Je=N({__name:"SocialFacebook",props:{card:{}},setup(h){return(s,l)=>(o(),a("div",De,[e("div",{class:"h-[274px] border border-b-0 border-base bg-cover bg-center bg-no-repeat",style:R({backgroundImage:`url(${JSON.stringify(s.card.image)})`})},null,4),e("div",ze,[e("div",Ve,p(s.card.url),1),e("div",Ee,[e("div",Ge,p(s.card.title),1),e("div",He,p(s.card.description),1)])])]))}}),Pe={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"}},Ue={class:"break-words border-base p-[0.75em] antialiased",flex:"~ col justify-center gap-[2px]"},qe={class:"overflow-hidden truncate whitespace-nowrap text-[15px] leading-[20px] lowercase op50"},Ke={class:"m-0 truncate text-[15px] font-semibold leading-[20px]"},We={class:"line-clamp-2 select-none overflow-hidden break-words text-left text-[15px] leading-[20px] op50"},Xe=N({__name:"SocialTwitter",props:{tags:{}},setup(h){const s=h,l=C(()=>P(s.tags,{title:[{tag:"title"}],image:[{tag:"meta",name:"twitter:image"},{tag:"meta",name:"og:image"}],imageAlt:[{tag:"meta",name:"twitter:image:alt"}],description:[{tag:"meta",name:"twitter:description"},{tag:"meta",name:"description"}],favicon:[{tag:"link",name:"icon"}]})),n=C(()=>l.value.image?s.tags.find(m=>m.tag==="meta"&&m.name==="twitter:card")?.value||"summary_large_image":"summary");return(m,y)=>(o(),a("div",Pe,[e("div",{class:O(["cursor-pointer overflow-hidden leading-[1.3em]",t(n)==="summary_large_image"?"":"flex"]),hover:"bg-[#88888805]"},[t(n)==="summary_large_image"?(o(),a("div",{key:0,class:"h-[220px] border-b border-base bg-cover bg-center bg-no-repeat",style:R({backgroundImage:`url(${JSON.stringify(t(l).image)})`})},null,4)):(o(),a("div",{key:1,class:"h-[129px] w-[129px] flex-none border-r border-base bg-cover bg-center bg-no-repeat",style:R({backgroundImage:`url(${JSON.stringify(t(l).image)})`})},null,4)),e("div",Ue,[e("div",qe,p(t(l).url),1),e("div",Ke,p(t(l).title),1),e("div",We,p(t(l).description),1)])],2)]))}}),Ye={class:"max-w-[520px] min-w-[520px] cursor-pointer overflow-hidden border border-base rounded-[2px] shadow-md bg-base"},Ze={class:"break-words p-[10px] antialiased"},Qe={class:"block h-auto max-h-[50px] border-separate select-none break-words text-left",style:{"border-spacing":"0px"}},et={class:"pb-[2px] text-[16px] font-semibold leading-[24px]"},tt={class:"overflow-hidden truncate whitespace-nowrap text-xs font-normal uppercase op85"},ot=N({__name:"SocialLinkedin",props:{card:{}},setup(h){return(s,l)=>(o(),a("div",Ye,[e("div",{class:"h-[270px] border-b border-base bg-cover bg-center bg-no-repeat",style:R({backgroundImage:`url(${JSON.stringify(s.card.image)})`})},null,4),e("div",Ze,[e("div",Qe,[e("div",et,p(s.card.title),1),e("div",tt,p(s.card.url),1)])])]))}}),nt=h=>(ie("data-v-6d584478"),h=h(),ce(),h),at={class:"relative max-w-[420px] min-w-[420px] rounded-[16px] rounded-bl-0 py-[6px] leading-[18px] drop-shadow-sm drop-shadow-color-[#10232f26] bg-base"},st={class:"pl-[10px] pr-[8px]"},rt={class:"text-[#3390ec] leading-normal underline"},it={class:"quote w-full flex"},ct={class:"flex flex-col gap-1"},lt={key:0,class:"my-[3px] overflow-hidden rounded"},dt=["src"],pt={class:"cursor-pointer text-sm text-[#3390ec]"},mt={class:"cursor-pointer text-sm"},ut={class:"cursor-pointer text-sm"},gt={class:"flex justify-end text-xs text-[#707579]"},ht=nt(()=>e("svg",{width:"11",height:"20",viewBox:"0 0 11 20",xmlns:"http://www.w3.org/2000/svg",class:"absolute bottom-0 ml-[-8.4px] translate-y-px text-white"},[e("g",{transform:"translate(9 -14)","fill-rule":"evenodd"},[e("path",{id:"corner-fill",d:"M-6 16h6v17c-.193-2.84-.876-5.767-2.05-8.782-.904-2.325-2.446-4.485-4.625-6.48A1 1 0 01-6 16z",transform:"matrix(1 0 0 -1 0 49)",fill:"currentColor"})])],-1)),_t=N({__name:"SocialTelegram",props:{card:{}},setup(h){const s=ae(),l=se(re(),"HH:mm");return(n,m)=>(o(),a("div",at,[e("div",st,[e("div",rt,p(n.card.url),1),e("div",it,[e("div",ct,[n.card.image?(o(),a("div",lt,[e("img",{class:"h-full max-w-full w-full rounded object-cover",src:n.card.image},null,8,dt)])):x("",!0),e("div",pt,[e("strong",null,p(t(s).hostname),1)]),e("div",mt,[e("strong",null,p(n.card.title),1)]),e("div",ut,p(n.card.description),1)])]),e("div",gt,[e("span",null,p(t(l)),1)])]),ht]))}});const ft=le(_t,[["__scopeId","data-v-6d584478"]]),vt={flex:"~ col"},bt={flex:"~ wrap","w-full":"","flex-none":""},wt=["onClick"],xt=e("div",{border:"b base","flex-auto":""},null,-1),yt={flex:"~ items-center justify-center","flex-auto":"",p4:"","n-panel-grids":""},kt={key:0},$t={key:1},Tt={key:2},St={key:3},Ct=N({__name:"SocialPreviewGroup",props:{tags:{}},setup(h){const s=h,l=["twitter","facebook","linkedin","telegram"],n=de("nuxt-devtools-social-preview-tab",l[0]),m=C(()=>P(s.tags,{title:[{tag:"title"}],image:[{tag:"meta",name:"og:image"}],imageAlt:[{tag:"meta",name:"og:image:alt"}],description:[{tag:"meta",name:"og:description"},{tag:"meta",name:"description"}],favicon:[{tag:"link",name:"icon"}]}));return(y,k)=>{const f=Je,r=Xe,g=ot,b=ft;return o(),a("div",vt,[e("div",bt,[(o(),a(S,null,B(l,(u,T)=>e("button",{key:T,px4:"",py2:"",border:"r base",hover:"bg-active",class:O(u===t(n)?"":"border-b"),onClick:M=>n.value=u},[e("div",{class:O(u===t(n)?"":"op30"),capitalize:""},p(u),3)],10,wt)),64)),xt]),e("div",yt,[t(n)==="facebook"?(o(),a("div",kt,[d(f,{card:t(m)},null,8,["card"])])):t(n)==="twitter"?(o(),a("div",$t,[d(r,{tags:y.tags},null,8,["tags"])])):t(n)==="linkedin"?(o(),a("div",Tt,[d(g,{card:t(m)},null,8,["card"])])):t(n)==="telegram"?(o(),a("div",St,[d(b,{card:t(m)},null,8,["card"])])):x("",!0)])])}}}),Nt={class:"markdown-body"},Mt=pe('<h1>Open Graph</h1><p>Nuxt provides several different ways to manage your meta tags using <a href="https://unhead.harlanzw.com/" target="_blank" rel="noopener"><code>unhead</code></a>. Improve your Nuxt app’s SEO with powerful head config, composables and components.</p><p><a href="https://nuxt.com/docs/getting-started/seo-meta" target="_blank" rel="noopener">Learn more on the documentation</a></p><hr><p>You can also find how open graph specs are defined in:</p><ul><li><a href="https://ogp.me/" target="_blank" rel="noopener">The Open Graph protocol</a></li><li><a href="https://developer.twitter.com/en/docs/twitter-for-websites/cards/guides/getting-started" target="_blank" rel="noopener">Twitter Cards</a></li></ul>',6),Ot=[Mt],It={__name:"open-graph",setup(h,{expose:s}){return s({frontmatter:{}}),(n,m)=>(o(),a("div",Nt,Ot))}},At={flex:"~ col lg:row","h-full":"","w-full":"","of-hidden":""},Bt={"flex-auto":"","of-auto":""},Rt={"flex-none":"",flex:"~ gap2 items-center"},Lt={flex:"~ col"},jt={key:0,"x-divider":""},Ft={key:1,"x-divider":""},Dt={mr2:"",px4:"",py2:""},qt=N({__name:"open-graph",setup(h){const s=A(0),l=me(),n=ue(async()=>(s.value,(await l.value?.resolveTags()).map(c=>{const v=c.props||{};return c.tag==="htmlAttrs"&&v.lang?{tag:"html",name:"lang",value:v.lang}:v.charset?{tag:"meta",name:"charset",value:v.charset}:{tag:c.tag,name:v.property??v.name??v.rel??c.tag,value:v.content??v.href??c.textContent??JSON.stringify(v)}})),[]),m=A(!0);function y(){s.value+=1}const k=ge(),f=he(),r=A(""),g=_e(),b=G();async function u(){r.value!==f.value.path&&k.value.push(r.value||"/")}const T=C(()=>r.value===f.value.path?[]:k.value.resolve(r.value||"/").matched),M=C(()=>{const i=g.value.find(c=>c.path===f.value?.matched?.[0]?.path);return i?.file||i?.meta?.file});function L(i){return K.find(c=>c.name===i.name)?.docs}return E(f).toBeTruthy().then(i=>{r.value=i.path}),E(k).toBeTruthy().then(i=>{i.afterEach(()=>{fe(()=>{r.value=f.value.path,setTimeout(y,200),setTimeout(y,800)})})}),(i,c)=>{const v=xe,j=J,W=ye,V=U,X=H,Y=q,Z=Fe,Q=Ct,ee=It,te=$e,F=ve("tooltip");return o(),a(S,null,[e("div",At,[e("div",Bt,[d(W,null,{search:_(()=>[d(v,{modelValue:t(r),"onUpdate:modelValue":c[0]||(c[0]=w=>be(r)?r.value=w:null),placeholder:"Route",icon:"carbon-direction-right-01 scale-y--100",n:"primary","flex-auto":"","font-mono":"",class:O(["px-5 py-2",t(f)?.path===t(r)?"":t(T).length?"text-green":"text-orange"]),onKeydown:we(u,["enter"])},null,8,["modelValue","class","onKeydown"])]),actions:_(()=>[e("div",Rt,[t(M)?z((o(),I(j,{key:0,"text-lg":"",border:!1,icon:"carbon:launch",title:"Open file in editor",onClick:c[1]||(c[1]=w=>t(b)(t(M)))},null,512)),[[F,"Open file in editor"]]):x("",!0),z(d(j,{"text-lg":"",border:!1,icon:"carbon:reset",title:"Refresh Data",onClick:y},null,512),[[F,"Refresh Data"]]),z(d(j,{"text-lg":"",border:!1,icon:t(m)?"carbon:side-panel-open":"carbon:open-panel-right",title:"Toggle Preview",onClick:c[2]||(c[2]=w=>m.value=!t(m))},null,8,["icon"]),[[F,"Toggle Preview"]])])]),_:1}),e("div",Lt,[d(Y,{text:"Tags",icon:"carbon:tag-group"},{default:_(()=>[d(X,{grid:"~ cols-[max-content_1fr]","items-center":"","justify-between":"","of-hidden":""},{default:_(()=>[(o(!0),a(S,null,B(t(n),(w,D)=>(o(),a(S,{key:D},[D?(o(),a("div",jt)):x("",!0),D?(o(),a("div",Ft)):x("",!0),e("div",Dt,[d(V,{op50:"",href:L(w),target:"_blank",n:"primary"},{default:_(()=>[$(p(w.name),1)]),_:2},1032,["href"])]),d(V,{href:w.value.match(/^https?:\/\//)?w.value:void 0,target:"_blank","w-full":"",p2:"","font-mono":"",n:"primary"},{default:_(()=>[$(p(w.value),1)]),_:2},1032,["href"])],64))),128))]),_:1})]),_:1}),d(Z,{tags:t(n),"matched-route-filepath":t(M)},null,8,["tags","matched-route-filepath"])])]),t(m)&&t(n)?.length?(o(),I(Q,{key:0,tags:t(n),"flex-none":"","border-base":"","lt-lg":"border-t",lg:"h-full w-140 border-l"},null,8,["tags"])):x("",!0)]),d(te,null,{default:_(()=>[d(ee)]),_:1})],64)}}});export{qt as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as V,au as L,ab as M,aJ as R,b5 as T,b6 as E,P,a as w,h as m,j as n,A as O,o as s,f as e,m as c,k as t,i,t as r,p as l,F as h,b7 as f,b8 as x,b9 as $,v as a,aE as F,D as W,M as G,E as H,x as K,Y as J,_ as U}from"./entry.
|
|
1
|
+
import{d as V,au as L,ab as M,aJ as R,b5 as T,b6 as E,P,a as w,h as m,j as n,A as O,o as s,f as e,m as c,k as t,i,t as r,p as l,F as h,b7 as f,b8 as x,b9 as $,v as a,aE as F,D as W,M as G,E as H,x as K,Y as J,_ as U}from"./entry.52bc93cd.js";import{u as Y,_ as q}from"./state-modules.a9841149.js";import{u as Q}from"./state-components.bc8116fe.js";import"./NBadge.787d75d1.js";import"./NCodeBlock.vue.7e25538f.js";import"./client.7628b7e9.js";import"./NCheckbox.vue.7e495ed2.js";const X="1.0.6",Z={key:0},tt={key:1,flex:"~ col gap2",ma:"","h-full":"","max-w-300":"","w-full":"",p5:"",px5:"","md:px20":""},et=t("div",{"flex-auto":""},null,-1),ot={flex:"~ col","mt-5":"","items-center":"","md:mt-20":""},nt=t("span",{op40:""}," Nuxt DevTools ",-1),st={op40:""},at={flex:"~ gap2 wrap"},it=t("div",{"logos-nuxt-icon":"","text-3xl":""},null,-1),lt=t("div",{"logos-vue":"","text-3xl":""},null,-1),ut=t("div",{"carbon-tree-view-alt":"","text-3xl":""},null,-1),rt=t("div",{"i-carbon-assembly-cluster":"","text-3xl":""},null,-1),dt=t("div",{"carbon-function":"","text-3xl":""},null,-1),ct=t("div",{"carbon-3d-mpr-toggle":"","text-3xl":""},null,-1),pt=t("div",{"carbon-plug":"","text-3xl":""},null,-1),_t={key:5,"pointer-events-none":"","min-w-40":"",p4:"","theme-card-lime":"",flex:"~ auto gap-6"},mt=t("div",{"i-carbon-time-plot":"","flex-none":"","text-3xl":""},null,-1),ht={grid:"~ cols-[auto_auto] gap-x-5 items-center"},ft=t("div",{"text-sm":""}," SSR to full load ",-1),xt={"text-right":""},vt=t("div",{"text-sm":""}," Page load ",-1),gt={"text-right":""},bt=t("div",{"text-sm":""}," Navigation ",-1),kt={"text-right":""},yt=t("div",{"text-sm":""}," HMR ",-1),Ct={"text-right":""},wt={flex:"~ col gap2"},Dt={flex:"~ gap-6 wrap","mt-5":"","items-center":"","justify-center":""},Bt=t("a",{href:"https://github.com/nuxt/devtools",target:"_blank",flex:"~ gap1","items-center":"",op50:"",hover:"op100 text-blue",transition:""},[t("div",{"i-carbon-star":""}),a(" Star on GitHub ")],-1),St=t("a",{href:"https://github.com/nuxt/devtools/discussions/29",target:"_blank",flex:"~ gap1","items-center":"",op50:"",hover:"op100 text-yellow",transition:""},[t("div",{"i-carbon-data-enrichment":""}),a(" Ideas & Suggestions ")],-1),zt=t("a",{href:"https://github.com/nuxt/devtools/discussions/31",target:"_blank",flex:"~ gap1","items-center":"",op50:"",hover:"op100 text-lime",transition:""},[t("div",{"i-carbon-plan":""}),a(" Project Roadmap ")],-1),Nt=t("a",{href:"https://github.com/nuxt/devtools/issues",target:"_blank",flex:"~ gap1","items-center":"",op50:"",hover:"op100 text-rose",transition:""},[t("div",{"i-carbon-debug":""}),a(" Bug Reports ")],-1),At=t("div",{"i-carbon-settings-adjust":""},null,-1),jt=t("div",{"flex-auto":""},null,-1),It={flex:"col gap-2",mxa:"",hidden:"","w-100":"","text-sm":"",op50:"","md:flex":""},Vt={flex:"~ gap-1","items-center":""},Lt=t("span",null,"+",-1),Mt=t("span",null,"+",-1),Rt=t("div",{"flex-auto":""},null,-1),Tt={flex:"~ gap-1","items-center":""},Et=t("span",null,"+",-1),Pt=t("span",null,"+",-1),Ot=t("span",null,"+",-1),$t=t("span",null,"+",-1),Ft=t("div",{"flex-auto":""},null,-1),Wt=t("div",null,"Toggle DevTools",-1),Zt=V({__name:"overview",setup(Gt){const v=L(),p=M(),D=Q(),g=R(),B=Y(),S=T(),b=E(),z=P();function N(){W.value=!0,z.push("/")}const k=w(()=>v.value?.nuxt.vueApp.version),u=w(()=>v.value?.metrics.loading());function A(){G()}return(o,Ht)=>{const j=H,_=K,y=q,C=J,d=U,I=O;return s(),m(I,{"h-screen":"","w-full":"",flex:""},{default:n(()=>[e(p)?(s(),c("div",tt,[et,t("div",ot,[i(_,{flex:"~","mt--10":"","items-center":"","justify-center":"",to:"https://devtools.nuxt.com/",target:"_blank"},{default:n(()=>[i(j,{"h-10":""})]),_:1}),t("button",{mb6:"",mt3:"","text-center":"","text-sm":"",flex:"~ gap-1 wrap",onClick:N},[nt,t("code",st,"v"+r(e(X)),1),i(y,{"package-name":"@nuxt/devtools",options:{dev:!0},"show-version":!1})])]),t("div",at,[i(_,{to:"https://nuxt.com",target:"_blank",p4:"","theme-card-green":"",flex:"~ col auto"},{default:n(()=>[it,i(y,{"package-name":"nuxt",options:{dev:!0}})]),_:1}),e(k)?(s(),m(_,{key:0,to:"https://vuejs.org",target:"_blank",p4:"","theme-card-green":"",flex:"~ col auto"},{default:n(()=>[lt,t("code",null,"v"+r(e(k)),1)]),_:1})):l("",!0),e(p)?(s(),c(h,{key:1},[e(p)&&e(p).pages&&e(v)?(s(),m(_,{key:0,"min-w-40":"",p4:"","theme-card-lime":"",flex:"~ col auto",to:"/modules/pages"},{default:n(()=>[ut,t("div",null,r(("pluralizeByCount"in o?o.pluralizeByCount:e(f))(e(S).length,"page")),1)]),_:1})):l("",!0),e(p)?(s(),m(_,{key:1,"min-w-40":"",p4:"","theme-card-lime":"",flex:"~ col auto",to:"/modules/components"},{default:n(()=>[rt,t("div",null,r(("pluralizeByCount"in o?o.pluralizeByCount:e(f))(e(D).length,"component")),1)]),_:1})):l("",!0),e(p)&&e(g)?(s(),m(_,{key:2,"min-w-40":"",p4:"","theme-card-yellow":"",flex:"~ col auto",to:"/modules/imports"},{default:n(()=>[dt,t("div",null,r(("pluralizeByCount"in o?o.pluralizeByCount:e(f))(e(g).imports.length,"import")),1)]),_:1})):l("",!0),e(p)?(s(),m(_,{key:3,"min-w-40":"",p4:"","theme-card-purple":"",flex:"~ col auto",to:"/modules/modules"},{default:n(()=>[ct,t("div",null,r(("pluralizeByCount"in o?o.pluralizeByCount:e(f))(e(B).length,"module")),1)]),_:1})):l("",!0),e(p)?(s(),m(_,{key:4,"min-w-40":"",p4:"","theme-card-teal":"",flex:"~ col auto",to:"/modules/plugins"},{default:n(()=>[pt,t("div",null,r(("pluralizeByCount"in o?o.pluralizeByCount:e(f))(e(p).plugins.length,"plugin")),1)]),_:1})):l("",!0),e(u)?(s(),c("div",_t,[mt,t("div",ht,[e(u).ssrStart?(s(),c(h,{key:0},[ft,t("div",xt,r(("formatDuration"in o?o.formatDuration:e(x))(e(u).appLoad-e(u).ssrStart)),1)],64)):l("",!0),vt,t("div",gt,r(("formatDuration"in o?o.formatDuration:e(x))(e(u).appLoad-e(u).appInit)),1),bt,t("div",kt,r(("formatDuration"in o?o.formatDuration:e(x))(e(u).pageEnd-e(u).pageStart)),1),e(u).hmrStart?(s(),c(h,{key:1},[yt,t("div",Ct,r(("formatDuration"in o?o.formatDuration:e(x))(e(u).hmrEnd-e(u).hmrStart)),1)],64)):l("",!0)])])):l("",!0)],64)):l("",!0)]),t("div",wt,[("showConnectionWarning"in o?o.showConnectionWarning:e($))?(s(),m(C,{key:0,n:"yellow5",icon:"carbon-unlink","justify-center":""},{default:n(()=>[a(" Not connected to the client app, showing server-side data only. Use the embedded mode for full features. ")]),_:1})):l("",!0),t("button",{title:"Authorize",onClick:A},[("isDevAuthed"in o?o.isDevAuthed:e(F))?l("",!0):(s(),m(C,{key:0,n:"orange5",icon:"i-carbon-locked","justify-center":""},{default:n(()=>[a(" Access from an untrusted browser, some features are limited. Click to authorize now. ")]),_:1}))])]),t("div",Dt,[Bt,St,zt,Nt,i(_,{to:"/settings",flex:"~ gap1","inline-block":"","items-center":"",op50:"","hover:op80":""},{default:n(()=>[At,a(" Settings ")]),_:1})]),jt,t("div",It,[t("div",Vt,[e(b)?(s(),c(h,{key:0},[i(d,{n:"xs",class:"px2"},{default:n(()=>[a(" ⌘ Cmd ")]),_:1}),Lt,i(d,{n:"xs",class:"px2"},{default:n(()=>[a(" K ")]),_:1})],64)):(s(),c(h,{key:1},[i(d,{n:"xs",class:"px2"},{default:n(()=>[a(" Ctrl ")]),_:1}),Mt,i(d,{n:"xs",class:"px2"},{default:n(()=>[a(" K ")]),_:1})],64)),Rt,a(" Open Command Palette ")]),t("div",Tt,[e(b)?(s(),c(h,{key:0},[i(d,{n:"xs",class:"px2"},{default:n(()=>[a(" ⇧ Shift ")]),_:1}),Et,i(d,{n:"xs",class:"px2"},{default:n(()=>[a(" ⌥ Option ")]),_:1}),Pt,i(d,{n:"xs",class:"px2"},{default:n(()=>[a(" D ")]),_:1})],64)):(s(),c(h,{key:1},[i(d,{n:"xs",class:"px2"},{default:n(()=>[a(" Shift ")]),_:1}),Ot,i(d,{n:"xs",class:"px2"},{default:n(()=>[a(" Alt ")]),_:1}),$t,i(d,{n:"xs",class:"px2"},{default:n(()=>[a(" D ")]),_:1})],64)),Ft,Wt])])])):(s(),c("div",Z," Loading... "))]),_:1})}}});export{Zt as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as B,r as T,a as k,ap as W,f as t,o,m as s,k as e,t as $,h as y,j as x,bf as G,F as v,n as M,p as P,i as h,v as L,G as E,X as A,_ as H,ac as X,bg as D,b1 as q,b2 as J,ab as Q,am as Y,b3 as Z,an as ee,l as te,ae as oe,L as ne,M as ae}from"./entry.
|
|
1
|
+
import{d as B,r as T,a as k,ap as W,f as t,o,m as s,k as e,t as $,h as y,j as x,bf as G,F as v,n as M,p as P,i as h,v as L,G as E,X as A,_ as H,ac as X,bg as D,b1 as q,b2 as J,ab as Q,am as Y,b3 as Z,an as ee,l as te,ae as oe,L as ne,M as ae}from"./entry.52bc93cd.js";import{_ as j}from"./NBadge.787d75d1.js";import{_ as F}from"./FilepathItem.vue.e3761da9.js";import{_ as se}from"./NSectionBlock.f3242abf.js";import{_ as re}from"./LaunchPage.vue.5db0c060.js";import{_ as le}from"./HelpFab.vue.452fd066.js";import"./NIconTitle.vue.8e6741d5.js";import"./NMarkdown.vue.099cce55.js";import"./client.7628b7e9.js";const ie={block:"","cursor-pointer":""},ue={p2:""},ce=["onSubmit"],de=e("div",{px2:"","text-sm":"",op50:""}," Fill params and navigate: ",-1),pe={flex:"~","items-center":"",p2:"","text-sm":"","font-mono":""},_e={key:1},he=B({__name:"RoutePathItem",props:{route:{}},emits:["navigate"],setup(V,{emit:i}){const d=V,w=i,m=T([]),p=k(()=>{const u=N(d.route.path);return m.value=Array.from({length:u.length},()=>""),u});function N(u){return u.split(/(:\w+[\?\*]?(?:\(\))?)/).filter(Boolean).map(_=>_[0]===":"?_.replace(/\(\)$/,"?"):_)}const r=k(()=>p.value.map((u,_)=>u[0]===":"?m.value[_]:u).join("").replace(/\/+/g,"/")),n=k(()=>d.route.path.includes(":"));function f(){w("navigate",r.value)}return(u,_)=>{const a=A,l=H,c=W("VDropdown");return t(n)?(o(),y(c,{key:1},{popper:x(({hide:g})=>[e("div",ue,[e("form",{flex:"~ col",onSubmit:G(()=>{f(),g()},["prevent"])},[t(n)?(o(),s(v,{key:0},[de,e("div",pe,[(o(!0),s(v,null,M(t(p),(b,R)=>(o(),s(v,{key:R},[b[0]===":"?(o(),y(a,{key:0,modelValue:t(m)[R],"onUpdate:modelValue":I=>t(m)[R]=I,"w-20":"","n-sm":"",placeholder:b.slice(1)},null,8,["modelValue","onUpdate:modelValue","placeholder"])):(o(),s("span",_e,$(b),1))],64))),128))])],64)):P("",!0),h(l,{block:"",n:"primary"},{default:x(()=>[L(" Navigate ")]),_:1})],40,ce)])]),default:x(()=>[e("code",ie,[(o(!0),s(v,null,M(t(p),(g,b)=>(o(),s("span",{key:b,class:E(g[0]===":"?"text-gray border border-dashed rounded border-gray:50 px1":"")},$(g[0]===":"?g.slice(1):g),3))),128))])]),_:1})):(o(),s("button",{key:0,onClick:f},[e("code",null,$(u.route.path),1)]))}}}),me={"w-full":""},fe=e("thead",{border:"b base"},[e("tr",null,[e("th",{"text-left":""}),e("th",{"text-left":""}," Route Path "),e("th",{"text-left":""}," Name "),e("th",{"text-left":""}," Middleware "),e("th",null," Layout ")])],-1),ge={"w-20":"","pr-1":""},ve={flex:"","items-center":"","justify-end":""},ye={"text-sm":""},be={flex:"inline gap3","items-center":""},xe={op0:"","group-hover:op100":"",flex:"~ gap1"},ke=["onClick"],$e=e("div",{"i-carbon-script-reference":""},null,-1),we=[$e],Ne={"w-0":"","ws-nowrap":"","pr-1":"","text-left":"","text-sm":"","font-mono":"",op50:""},Re={"w-0":"","ws-nowrap":"","pr-1":"","text-center":"","text-sm":"","font-mono":"",op50:""},Ce={"w-0":"","ws-nowrap":"","text-center":"","text-sm":"","font-mono":""},Pe={key:0},Ve=["onClick"],Ie=B({__name:"RoutesTable",props:{pages:{},layouts:{},matched:{},matchedPending:{}},emits:["navigate"],setup(V){const i=V,d=X(),w=D(),m=k(()=>[...i.pages].sort((r,n)=>r.path.localeCompare(n.path)));function p(r){const n=i.layouts.find(f=>f.name===r);n&&d(n.file)}function N(r){if(typeof r=="string")return w.value?.middleware.find(n=>n.name===r)?.path}return(r,n)=>{const f=j,u=he,_=F;return o(),s("div",null,[e("table",me,[fe,e("tbody",null,[(o(!0),s(v,null,M(t(m),a=>(o(),s("tr",{key:a.name,class:"group","h-7":"",border:"b dashed transparent hover:base"},[e("td",ge,[e("div",ve,[r.matched.find(l=>l.name===a.name)?(o(),y(f,{key:0,n:"green",title:"active",textContent:"active"})):r.matchedPending.find(l=>l.name===a.name)?(o(),y(f,{key:1,n:"teal",title:"next",textContent:"next"})):P("",!0)])]),e("td",ye,[e("div",be,[h(u,{route:a,class:E(r.matched.find(l=>l.name===a.name)?"text-primary":r.matchedPending.find(l=>l.name===a.name)?"text-teal":""),onNavigate:n[0]||(n[0]=l=>r.$emit("navigate",l))},null,8,["route","class"]),e("div",xe,[a.file||a.meta?.file?(o(),s("button",{key:0,"text-sm":"",op40:"",hover:"op100 text-primary",title:"Open in editor",onClick:l=>t(d)(a.file||a.meta?.file)},we,8,ke)):P("",!0)])])]),e("td",Ne,$(a.name),1),e("td",Re,[h(_,{filepath:N(a.meta.middleware),override:`${a.meta.middleware||"-"}`},null,8,["filepath","override"])]),e("td",Ce,[a.meta.layout===!1?(o(),s("span",Pe,"-")):a.meta.layout?(o(),s("button",{key:1,onClick:l=>p(a.meta.layout)},$(a.meta.layout),9,Ve)):(o(),s("button",{key:2,"text-sm":"",op15:"",onClick:n[1]||(n[1]=l=>p("default"))}," (default) "))])]))),128))])])])}}}),Le={class:"markdown-body"},Me=e("h1",null,"Pages",-1),Te=e("p",null,[L("Nuxt provides a file-based routing to create routes within your web application using Vue Router under the hood. Pages are Vue components and can have any valid extension that Nuxt supports (by default .vue, .js, .jsx, .mjs, .ts or .tsx). Nuxt will automatically create a route for every page in your "),e("code",null,"~/pages/"),L(" directory.")],-1),Be=e("p",null,[e("a",{href:"https://nuxt.com/docs/getting-started/routing",target:"_blank",rel:"noopener"},"Learn more in the documentation")],-1),Ee=e("hr",null,null,-1),Ae=e("h1",null,"Middlewares",-1),De=e("p",null,"Nuxt provides a customizable route middleware framework that can be used throughout the application. This is ideal for extracting code that needs to run before navigating to a particular route.",-1),je=e("p",null,[e("a",{href:"https://nuxt.com/docs/guide/directory-structure/middleware",target:"_blank",rel:"noopener"},"Learn more in the documentation")],-1),Fe=[Me,Te,Be,Ee,Ae,De,je],Se={__name:"pages",setup(V,{expose:i}){return i({frontmatter:{}}),(w,m)=>(o(),s("div",Le,Fe))}},ze={key:0,"h-full":"","of-auto":""},Ke={border:"b base",flex:"~ col gap1",px4:"",py3:"","n-navbar-glass":""},Ue=e("span",{op50:""},"Navigate from ",-1),Oe={"font-mono":""},We=e("span",{op50:""}," to ",-1),Ge={key:1,op50:""},He=e("span",null,[L("Press "),e("b",{"font-bold":""},"Enter"),L(" to navigate")],-1),Xe={key:0,"text-orange":"",op75:""},qe={key:1,op50:""},Je={"min-h-14":""},Qe={key:1,class:"py-4 text-center"},Ye=e("span",{op50:""},"No routes matched",-1),Ze=[Ye],et={"w-full":""},tt=e("thead",{border:"b base","h-7":""},[e("tr",null,[e("th",{"text-left":""}," Name "),e("th",{"text-left":""}," Path ")])],-1),ot={mr1:""},pt=B({__name:"pages",setup(V){const i=q(),d=J(),w=Q(),m=D(),p=Y(),N=Z(),r=k(()=>m.value?.middleware||[]),n=T(""),f=T(0),u=k(()=>(r.value,n.value,p.value,f.value,i.value?.currentRoute?.value?.path));ee(()=>{d.value&&(n.value=i.value?.currentRoute?.value?.path),i.value?.beforeEach(c=>{n.value=c.fullPath}),i.value?.afterEach(c=>{n.value=c.fullPath})});async function _(){n.value!==i.value?.currentRoute?.value?.path&&i.value.push(n.value||"/")}const a=k(()=>i.value.resolve(n.value||"/").matched);function l(c){i.value.push(c),n.value=c}return(c,g)=>{const b=A,R=Ie,I=se,S=j,z=F,K=re,U=Se,O=le;return o(),s(v,null,[t(w)?.pages&&t(i)?(o(),s("div",ze,[e("div",Ke,[e("div",null,[t(u)!==t(n)?(o(),s(v,{key:0},[Ue,e("span",Oe,$(t(u)),1),We],64)):(o(),s("span",Ge,"Current route"))]),h(b,{modelValue:t(n),"onUpdate:modelValue":g[0]||(g[0]=C=>te(n)?n.value=C:null),"font-mono":"",icon:"carbon-direction-right-01 scale-y--100",class:E(t(u)===t(n)?"":t(a).length?"text-green":"text-orange"),onKeydown:oe(_,["enter"])},null,8,["modelValue","class","onKeydown"]),e("div",null,[t(u)!==t(n)?(o(),s(v,{key:0},[He,t(a).length?P("",!0):(o(),s("span",Xe," (no match)"))],64)):(o(),s("span",qe,"Edit path above to navigate"))])]),h(I,{icon:"carbon-tree-view",text:"Matched Routes",padding:!1},{default:x(()=>[e("div",Je,[t(a).length?(o(),y(R,{key:0,pages:t(a),layouts:t(p)||[],matched:t(d).matched,"matched-pending":t(a),onNavigate:l},null,8,["pages","layouts","matched","matched-pending"])):(o(),s("div",Qe,Ze))])]),_:1}),h(I,{icon:"carbon-tree-view-alt",text:"All Routes",description:`${t(N).length} routes registered in your application`,padding:"pr5"},{default:x(()=>[h(R,{pages:t(N),layouts:t(p)||[],matched:t(d).matched,"matched-pending":t(a),onNavigate:l},null,8,["pages","layouts","matched","matched-pending"])]),_:1},8,["description"]),t(r).length?(o(),y(I,{key:0,icon:"carbon:ibm-watson-studio",text:"Middleware",description:`${t(r).length} middleware registered in your application`,padding:"px13"},{default:x(()=>[e("table",et,[tt,(o(!0),s(v,null,M(t(r),C=>(o(),s("tr",{key:C.path,"h-7":""},[e("td",null,[e("span",ot,$(C.name),1),C.global?(o(),y(S,{key:0,n:"green",title:"Registered at runtime as a global component",textContent:"global"})):P("",!0)]),e("td",null,[h(z,{filepath:C.path},null,8,["filepath"])])]))),128))])]),_:1},8,["description"])):P("",!0)])):(o(),y(K,{key:1,icon:"carbon-tree-view-alt",name:"wizard-pages",title:"Nuxt Routing",description:"Create `./pages/index.vue` to enable routing",actions:[{label:"Learn more",src:"https://nuxt.com/docs/getting-started/routing",attrs:{n:"primary"}},{label:"Enable Routing",async handle(){return("rpc"in c?c.rpc:t(ne)).runWizard(await("ensureDevAuthToken"in c?c.ensureDevAuthToken:t(ae))(),"enablePages")}}]},null,8,["actions"])),h(O,null,{default:x(()=>[h(U)]),_:1})],64)}}});export{pt as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as v}from"./StateEditor.vue.
|
|
1
|
+
import{_ as v}from"./StateEditor.vue.2b7dac11.js";import{d as b,o as e,m as c,F as k,n as C,h as f,j as o,aa as N,bh as B,bi as w,k as x,au as F,a as O,a2 as P,f as r,i as a,p as u,v as R,I as V,_ as j}from"./entry.52bc93cd.js";import{_ as E}from"./NSectionBlock.f3242abf.js";import{_ as A}from"./HelpFab.vue.452fd066.js";import"./DataSchemaButton.vue.e78a09d4.js";import"./json-editor-vue.d503734c.js";import"./NIconTitle.vue.8e6741d5.js";const G={key:0,flex:"~ col gap-1"},H={key:1,mt2:"",px4:"",italic:"",op35:""},K=b({__name:"StateGroup",props:{state:{},prefix:{default:""}},setup(m){return(t,n)=>{const i=v;return e(),c("div",null,[t.state&&Object.keys(t.state).length>0?(e(),c("div",G,[(e(!0),c(k,null,C(t.state,(l,s)=>(e(),f(i,{key:s,state:l,name:s.startsWith(t.prefix)?s.slice(t.prefix.length):s},{actions:o(_=>[N(t.$slots,"actions",B(w(_)))]),_:2},1032,["state","name"]))),128))])):(e(),c("div",H," No data "))])}}}),T={class:"markdown-body"},z=x("h1",null,"State & Async Data",-1),I=x("p",null,"// TODO",-1),L=[z,I],W={__name:"payload",setup(m,{expose:t}){return t({frontmatter:{}}),(i,l)=>(e(),c("div",T,L))}},q={key:0},et=b({__name:"payload",setup(m){const t=F(),n=O(()=>t.value?.nuxt.payload);async function i(l){await t.value?.nuxt.hooks.callHookParallel("app:data:refresh",l)}return(l,s)=>{const _=K,d=E,h=j,$=v,S=W,g=A,D=P("tooltip");return e(),c(k,null,[r(t)?(e(),c("div",q,[a(d,{icon:"carbon-data-set",text:"State",description:"Keyed state from `useState`",padding:!1},{default:o(()=>[a(_,{state:r(n).state,prefix:"$s"},null,8,["state"])]),_:1}),a(d,{icon:"carbon-data-blob",text:"Data",description:"Keyed state from `useAsyncData`",padding:!1},{actions:o(()=>[a(h,{n:"xs primary","self-start":"",icon:"i-carbon-recycle",onClick:s[0]||(s[0]=y=>i())},{default:o(()=>[R(" Re-fetch all data ")]),_:1})]),default:o(()=>[a(_,{state:r(n).data},{actions:o(({isOpen:y,name:p})=>[y&&p?V((e(),f(h,{key:0,title:`Re-fetch '${p}'`,icon:"carbon-recycle",border:!1,onClick:J=>i([p])},null,8,["title","onClick"])),[[D,`Re-fetch '${p}'`,void 0,{bottom:!0}]]):u("",!0)]),_:1},8,["state"])]),_:1}),r(n).functions&&Object.keys(r(n).functions).length?(e(),f(d,{key:0,icon:"carbon-function",text:"Functions",description:"State for functions"},{default:o(()=>[a($,{"ml--6":"",state:r(n).functions},null,8,["state"])]),_:1})):u("",!0)])):u("",!0),a(g,null,{default:o(()=>[a(S)]),_:1})],64)}}});export{et as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as S}from"./FilepathItem.vue.
|
|
1
|
+
import{_ as S}from"./FilepathItem.vue.e3761da9.js";import{_ as D}from"./NBadge.787d75d1.js";import{_ as C}from"./DurationDisplay.vue.ce619fea.js";import{d as v,ab as B,a as x,be as V,o as n,m,k as t,t as P,i as l,f,h as u,p as d,ap as F,aa as N,a6 as H,q as I,j as g,v as y,bg as E,au as W,F as k,n as j,G as L}from"./entry.52bc93cd.js";import{_ as M}from"./NSectionBlock.f3242abf.js";import{_ as q}from"./HelpFab.vue.452fd066.js";import"./NIconTitle.vue.8e6741d5.js";const z={flex:"~ gap2","items-center":""},A={w8:"","text-right":"","text-sm":"",op25:""},G={key:0,"flex-auto":"","text-right":""},R=v({__name:"PluginItem",props:{plugin:{},index:{}},setup(p){const e=p,a=B(),r=x(()=>V(e.plugin.src,a.value?.rootDir||"").path);return(i,c)=>{const _=S,o=D,s=C;return n(),m("div",z,[t("div",A,P(i.index),1),l(_,{filepath:e.plugin.src,subpath:!0},null,8,["filepath"]),t("div",null,[f(r).startsWith("#")?(n(),u(o,{key:0,n:"rose",textContent:"virtual"})):f(r).startsWith(".")?d("",!0):(n(),u(o,{key:1,n:"gray",textContent:"module"})),i.plugin.mode==="server"?(n(),u(o,{key:2,n:"teal",textContent:"server"})):d("",!0),i.plugin.mode==="client"?(n(),u(o,{key:3,n:"orange",textContent:"client"})):d("",!0)]),i.plugin.metric?.duration!=null?(n(),m("div",G,[l(s,{duration:i.plugin.metric?.duration,factor:10},null,8,["duration"])])):d("",!0)])}}}),Y={class:"n-tip n-tip-base",flex:"~ col items-start","mx--4":"",px4:"",py4:""},J={flex:"~ items-center gap-1","font-bold":""},K=v({__name:"HelpTip",props:{title:{},icon:{}},setup(p){return(e,a)=>{const r=H,i=F("ContentSlot");return n(),m("div",Y,[t("div",J,[e.icon?(n(),u(r,{key:0,icon:e.icon,class:"n-tip-icon"},null,8,["icon"])):d("",!0),t("div",null,P(e.title),1)]),t("div",null,[N(e.$slots,"default",{},()=>[l(i,{use:e.$slots.default,unwrap:"p"},null,8,["use"])])])])}}}),O={};function Q(p,e){const a=K;return n(),u(a,{title:"Performance Tip",icon:"carbon-meter",n:"lime6 dark:lime5"},{default:g(()=>[N(p.$slots,"default")]),_:3})}const U=I(O,[["render",Q]]),X={class:"markdown-body"},Z=t("h1",null,"Plugins",-1),tt=t("p",null,[y("Nuxt plugins allow you to extend the functionality of the Nuxt runtime and the Vue instance. You can add plugins to the "),t("code",null,"plugins/"),y(" directory and they will be automatically imported and registered.")],-1),et=t("p",null,[t("a",{href:"https://nuxt.com/docs/guide/directory-structure/plugins",target:"_blank",rel:"noopener"},"Learn more in the documentation")],-1),nt={__name:"plugins",setup(p,{expose:e}){return e({frontmatter:{}}),(r,i)=>{const c=U;return n(),m("div",X,[Z,tt,l(c,null,{default:g(()=>[y(" Plugins always run before your application's runtime. The loading time of each plugin will directly impact your application's initial loading time. ")]),_:1}),et])}}},ot={pt4:""},st={class:"text-sm",flex:"~ gap-1 items-center justify-start","mt-3":""},it=t("div",{"i-carbon-timer":"","text-lg":"",op75:""},null,-1),at=t("span",{op50:""},"Total execution time:",-1),dt=v({__name:"plugins",setup(p){const e=E(),a=W(),r=x(()=>{const c=e.value?.plugins||[],_=a.value?.metrics.clientPlugins()||[];return c.map(o=>{const s=typeof o=="string"?{src:o}:o;return{...s,metric:_.find(h=>h.src===s.src||h.src.startsWith(s.src))}})}),i=x(()=>{const c=a.value?.metrics.clientPlugins()||[],_=Math.min(...c.map(s=>s.start));return Math.max(...c.map(s=>s.end))-_});return(c,_)=>{const o=R,s=C,h=M,T=nt,w=q;return n(),m(k,null,[l(h,{icon:"carbon-plug",text:"Plugins",description:`Total plugins: ${f(r).length}`},{default:g(()=>[t("div",ot,[(n(!0),m(k,null,j(f(r),($,b)=>(n(),u(o,{key:$.src,plugin:$,index:b+1,"ml--4":"","border-base":"",py2:"",class:L(b?"border-t":"")},null,8,["plugin","index","class"]))),128)),t("div",st,[it,at,l(s,{duration:f(i),factor:10},null,8,["duration"])])])]),_:1},8,["description"]),l(w,null,{default:g(()=>[l(T)]),_:1})],64)}}});export{dt as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as v}from"./StateEditor.vue.
|
|
1
|
+
import{_ as v}from"./StateEditor.vue.2b7dac11.js";import{_ as x}from"./NSectionBlock.f3242abf.js";import{o as r,m as u,k as e,v as m,d as y,au as b,bj as C,a as d,f as i,i as t,j as a,p as k,F as w}from"./entry.52bc93cd.js";import{_ as N}from"./HelpFab.vue.452fd066.js";import"./DataSchemaButton.vue.e78a09d4.js";import"./json-editor-vue.d503734c.js";import"./NIconTitle.vue.8e6741d5.js";const R={class:"markdown-body"},T=e("h1",null,"Runtime Configs",-1),B=e("p",null,"Nuxt provides a runtime config API to expose configuration within your application and server routes, with the ability to update it at runtime by setting environment variables.",-1),V=e("p",null,[m("In Nuxt DevTools, the editor allows you to edit the runtime config temporarily to see how the changes affect your application. To update them, you might want to update your "),e("code",null,"nuxt.config.js"),m(" file, or check more details in the documentation.")],-1),$=e("p",null,[e("a",{href:"https://nuxt.com/docs/guide/going-further/runtime-config",target:"_blank",rel:"noopener"},"Learn more in the documentation")],-1),j=[T,B,V,$],D={__name:"runtime-configs",setup(f,{expose:o}){return o({frontmatter:{}}),(p,_)=>(r(),u("div",R,j))}},F={key:0},z=y({__name:"runtime-configs",setup(f){const o=b(),l=C(),p=d(()=>o.value?.nuxt.payload),_=d(()=>{const n={...l.value};return delete n.public,delete n.app,n});return(n,P)=>{const s=v,c=x,g=D,h=N;return r(),u(w,null,[i(o)?(r(),u("div",F,[t(c,{icon:"carbon-settings-services",text:"App Config",padding:!1},{default:a(()=>[t(s,{state:i(o).app.appConfig},null,8,["state"])]),_:1}),t(c,{icon:"carbon-settings",text:"Public Runtime Config",padding:!1},{default:a(()=>[t(s,{state:i(p).config?.public},null,8,["state"])]),_:1}),t(c,{icon:"i-carbon-code-signing-service",text:"Private Runtime Config",open:!1,padding:!1,description:"These values are not exposed to the client. Readonly in the DevTools."},{default:a(()=>[t(s,{state:i(_),readonly:""},null,8,["state"])]),_:1})])):k("",!0),t(h,null,{default:a(()=>[t(g)]),_:1})],64)}}});export{z as default};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import{d as ae,r as B,bm as $e,o as t,m as y,k as i,G as q,h as C,f as e,bn as se,t as L,p as N,v as W,a9 as We,aa as Z,F as I,n as M,a6 as fe,a0 as Je,a as T,w as Se,i as h,j as $,X as Te,_ as me,bo as Ve,bp as Re,ay as Ke,bq as Qe,br as Xe,bs as Ye,ab as Ze,au as et,aw as pe,ac as tt,az as ot,e as nt,a2 as Ue,l as Y,I as le,at as st,V as lt,A as De,bt as at,bu as rt,ah as it,U as ut,bv as dt,ao as ct}from"./entry.52bc93cd.js";import{_ as pt}from"./NNavbar.vue.9cb56412.js";import{_ as Ne}from"./NBadge.787d75d1.js";import{_ as Ie}from"./NSelect.vue.cdaf42b9.js";import{_ as ft}from"./NCheckbox.vue.7e495ed2.js";import{u as Ee,_ as mt}from"./storage-options.e85e583e.js";import{_ as vt}from"./DataSchemaButton.vue.e78a09d4.js";import{_ as ht}from"./NCodeBlock.vue.7e25538f.js";import{C as xe,S as je}from"./constants.2cc6e981.js";import{q as yt}from"./json-editor-vue.d503734c.js";import{_ as gt}from"./NSectionBlock.f3242abf.js";import{_ as _t}from"./NDrawer.vue.fa4b06a6.js";import"./client.7628b7e9.js";import"./NIconTitle.vue.8e6741d5.js";const ne=/^[\u0009\u0020-\u007E\u0080-\u00FF]+$/;function bt(l,g){if(typeof l!="string")throw new TypeError("argument str must be a string");const u={},k=(g||{}).decode||Ct;let x=0;for(;x<l.length;){const p=l.indexOf("=",x);if(p===-1)break;let f=l.indexOf(";",x);if(f===-1)f=l.length;else if(f<p){x=l.lastIndexOf(";",p-1)+1;continue}const s=l.slice(x,p).trim();if(u[s]===void 0){let d=l.slice(p+1,f).trim();d.codePointAt(0)===34&&(d=d.slice(1,-1)),u[s]=xt(d,k)}x=f+1}return u}function Ce(l,g,u){const o=u||{},k=o.encode||wt;if(typeof k!="function")throw new TypeError("option encode is invalid");if(!ne.test(l))throw new TypeError("argument name is invalid");const x=k(g);if(x&&!ne.test(x))throw new TypeError("argument val is invalid");let p=l+"="+x;if(o.maxAge!==void 0&&o.maxAge!==null){const f=o.maxAge-0;if(Number.isNaN(f)||!Number.isFinite(f))throw new TypeError("option maxAge is invalid");p+="; Max-Age="+Math.floor(f)}if(o.domain){if(!ne.test(o.domain))throw new TypeError("option domain is invalid");p+="; Domain="+o.domain}if(o.path){if(!ne.test(o.path))throw new TypeError("option path is invalid");p+="; Path="+o.path}if(o.expires){if(!kt(o.expires)||Number.isNaN(o.expires.valueOf()))throw new TypeError("option expires is invalid");p+="; Expires="+o.expires.toUTCString()}if(o.httpOnly&&(p+="; HttpOnly"),o.secure&&(p+="; Secure"),o.priority)switch(typeof o.priority=="string"?o.priority.toLowerCase():o.priority){case"low":p+="; Priority=Low";break;case"medium":p+="; Priority=Medium";break;case"high":p+="; Priority=High";break;default:throw new TypeError("option priority is invalid")}if(o.sameSite)switch(typeof o.sameSite=="string"?o.sameSite.toLowerCase():o.sameSite){case!0:p+="; SameSite=Strict";break;case"lax":p+="; SameSite=Lax";break;case"strict":p+="; SameSite=Strict";break;case"none":p+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return p}function kt(l){return Object.prototype.toString.call(l)==="[object Date]"||l instanceof Date}function xt(l,g){try{return g(l)}catch{return l}}function Ct(l){return l.includes("%")?decodeURIComponent(l):l}function wt(l){return encodeURIComponent(l)}const $t=i("div",{"x-divider":""},null,-1),Oe=ae({__name:"ServerRouteListItem",props:{item:{},index:{default:0}},setup(l){const g=B(!0),u=$e();return(o,k)=>{const x=fe,p=Ne,f=Oe;return t(),y("div",null,[i("button",{flex:"~ gap-2","w-full":"","items-start":"","items-center":"","hover-bg-active":"",px2:"",py1:"",class:q([{"bg-active":e(u)===o.item.filepath}]),style:We({paddingLeft:`calc(0.5rem + ${o.index*1.5}em)`}),onClick:k[0]||(k[0]=s=>{g.value=!e(g),u.value=o.item.filepath})},[i("div",{class:q({"w-12":!o.item.routes}),"flex-none":"","text-left":""},[o.item.type==="collection"?(t(),C(x,{key:0,icon:"carbon:chevron-right","mb0.5":"","transform-rotate":e(g)?90:0,transition:""},null,8,["transform-rotate"])):(t(),C(p,{key:1,class:q(("getRequestMethodClass"in o?o.getRequestMethodClass:e(se))(o.item.method||"*")),textContent:L((o.item.method||"*").toUpperCase())},null,8,["class","textContent"]))],2),i("span",{class:q({"flex items-center":o.item.routes}),"text-sm":"","font-mono":""},[o.item.type==="collection"?(t(),C(x,{key:0,title:`${o.item.routes?.length} routes`,icon:"carbon:folder",mr1:""},null,8,["title"])):N("",!0),W(" "+L(o.item.route),1)],2)],6),$t,e(g)?Z(o.$slots,"default",{key:0},()=>[(t(!0),y(I,null,M(o.item.routes,s=>(t(),C(f,{key:s.filepath,item:s,index:o.index+1},null,8,["item","index"]))),128))]):N("",!0)])}}}),St={p4:"",flex:"~ col gap-4"},Tt={key:1,ml2:"",flex:""},Vt=["value"],Rt={key:0,flex:"","gap-4":""},Ut=i("div",{"flex-auto":""},null,-1),Le=ae({__name:"ServerRouteInputs",props:{modelValue:{},keys:{default:()=>[]},default:{default:()=>({})},disabled:{type:Boolean,default:!1}},setup(l,{emit:g}){const u=l,k=Je(u,"modelValue",g,{passive:!0}),x=T(()=>[...u.keys,"active","key","value","type"]),p=T(()=>{const d={};for(const a of x.value)d[a]=u.default[a]||"";return d}),f=["string","number","boolean","file","date","time","datetime-local"];function s(d,a){const E=a.target;if(E.files&&E.files[0]){const F=E.files[0],H=new FileReader;H.readAsDataURL(F),H.onload=()=>{k.value[d].value=H.result}}}return Se(()=>k,d=>{d.value.forEach(a=>{if(a.type==="number"&&typeof a.value!="number"){const E=Number.parseFloat(a.value);a.value=Number.isNaN(E)?0:E}else a.type==="boolean"&&typeof a.value!="boolean"?a.value=!0:a.type==="file"&&typeof a.value!="object"?a.value="":a.type==="date"&&typeof a.value=="string"&&!a.value.match(/^\d{4}-\d{2}-\d{2}$/)?a.value=new Date().toISOString().slice(0,10):a.type==="time"&&typeof a.value=="string"&&!a.value.match(/^\d{2}:\d{2}$/)?a.value=new Date().toISOString().slice(11,16):a.type==="datetime-local"&&typeof a.value=="string"&&!a.value.match(/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}$/)?a.value=new Date().toISOString().slice(0,16):a.type==="string"&&(a.value=a.value.toString())})},{deep:!0,immediate:!0,flush:"sync"}),(d,a)=>{const E=ft,F=Te,H=Ie,V=fe,w=me;return t(),y("div",St,[(t(!0),y(I,null,M(e(k),(m,S)=>(t(),y("div",{key:S,flex:"~ gap-2","justify-around":""},[Z(d.$slots,"input",{item:m}),(t(!0),y(I,null,M(e(x),_=>(t(),y(I,{key:_},[m.type!==null&&_==="active"?(t(),C(E,{key:0,modelValue:m[_],"onUpdate:modelValue":b=>m[_]=b,n:"sm primary",disabled:d.disabled},null,8,["modelValue","onUpdate:modelValue","disabled"])):N("",!0),m.type!==null&&_==="key"?(t(),C(F,{key:1,modelValue:m[_],"onUpdate:modelValue":b=>m[_]=b,placeholder:_,"flex-1":"","font-mono":"",n:"sm primary",disabled:d.disabled,class:q(d.disabled?"op50":"")},null,8,["modelValue","onUpdate:modelValue","placeholder","disabled","class"])):_==="value"?(t(),y(I,{key:2},[m.type==="file"?(t(),C(F,{key:0,type:"file",disabled:d.disabled,class:q(d.disabled?"op75":""),onChange:b=>s(S,b)},null,8,["disabled","class","onChange"])):m.type==="boolean"?(t(),y("div",Tt,[h(E,{modelValue:m.value,"onUpdate:modelValue":b=>m.value=b,placeholder:"Value",n:"green lg",disabled:d.disabled},null,8,["modelValue","onUpdate:modelValue","disabled"])])):(t(),C(F,{key:2,modelValue:m.value,"onUpdate:modelValue":b=>m.value=b,type:m.type,placeholder:"Value","flex-1":"","font-mono":"",n:"sm primary",disabled:d.disabled,class:q(d.disabled?"op75":"")},null,8,["modelValue","onUpdate:modelValue","type","disabled","class"]))],64)):_==="type"?(t(),C(H,{key:3,modelValue:m.type,"onUpdate:modelValue":b=>m.type=b,n:"sm green",class:q(d.disabled?"op75":""),disabled:d.disabled},{default:$(()=>[(t(),y(I,null,M(f,b=>i("option",{key:b,value:b},L(b),9,Vt)),64))]),_:2},1032,["modelValue","onUpdate:modelValue","class","disabled"])):N("",!0)],64))),128)),Z(d.$slots,"input-actions",{},()=>[h(w,{n:"red",disabled:d.disabled,class:q(d.disabled?"op0!":""),onClick:_=>e(k).splice(S,1)},{default:$(()=>[h(V,{icon:"carbon:trash-can"})]),_:2},1032,["disabled","class","onClick"])])]))),128)),d.disabled?N("",!0):(t(),y("div",Rt,[Z(d.$slots,"actions",{params:e(k)},()=>[h(w,{icon:"carbon-add",n:"sm primary",my1:"","px-3":"",onClick:a[0]||(a[0]=m=>e(k).push({...e(p)}))},{default:$(()=>[W(" Add ")]),_:1}),Ut,e(k).length?(t(),C(w,{key:0,icon:"carbon-trash-can",n:"sm red",my1:"","px-3":"",onClick:a[1]||(a[1]=m=>k.value=[])},{default:$(()=>[W(" Remove All ")]),_:1})):N("",!0)])])),Z(d.$slots,"default")])}}}),Dt={path:"/",watch:!0,decode:l=>Xe(decodeURIComponent(l)),encode:l=>encodeURIComponent(typeof l=="string"?l:JSON.stringify(l))};function Nt(l,g){const u={...Dt,...g},o=It(u)||{};let k;u.maxAge!==void 0?k=u.maxAge*1e3:u.expires&&(k=u.expires.getTime()-Date.now());const x=k!==void 0&&k<=0,p=x?void 0:o[l]??u.default?.(),f=k&&!x?Ot(p,k):B(p);{const s=typeof BroadcastChannel>"u"?null:new BroadcastChannel(`nuxt:cookies:${l}`),d=()=>{jt(l,f.value,u),s?.postMessage(u.encode(f.value))};let a=!1;Ve()&&Re(()=>{a=!0,d(),s?.close()}),s&&(s.onmessage=E=>{a=!0,f.value=u.decode(E.data),Ke(()=>{a=!1})}),u.watch?Se(f,()=>{a||d()},{deep:u.watch!=="shallow"}):d()}return f}function It(l={}){return bt(document.cookie,l)}function Et(l,g,u={}){return g==null?Ce(l,g,{...u,maxAge:-1}):Ce(l,g,u)}function jt(l,g,u={}){document.cookie=Et(l,g,u)}const we=2147483647;function Ot(l,g){let u,o=0;return Ve()&&Re(()=>{clearTimeout(u)}),Qe((k,x)=>{function p(){clearTimeout(u);const f=g-o,s=f<we?f:we;u=setTimeout(()=>{if(o+=s,o<g)return p();l=void 0,x()},s)}return{get(){return k(),l},set(f){p(),l=f,x()}}})}const Lt={"h-full":"","w-full":"",flex:"~ col"},qt={flex:"~ col gap-2","flex-none":"",p4:"","n-navbar-glass":""},At={flex:"~ gap2 items-center"},Pt={relative:"","w-full":""},Bt={absolute:"","right-2":"","top-1.5":"",flex:"~ gap-1"},Mt={flex:"~ gap2 wrap","w-full":"","items-center":"",px4:"",pb2:"","text-center":"","text-sm":"",border:"b base"},Ft=i("div",{"flex-auto":""},null,-1),zt=i("div",{"text-xs":"",op50:""}," Send from ",-1),Ht=i("option",{value:"app"}," App ",-1),Gt=i("option",{value:"devtools"}," DevTools ",-1),Wt={key:0,border:"b base","items-center":"",px4:"",py2:"",grid:"~ cols-[max-content_1fr] gap-2"},Jt={"text-right":"","font-mono":""},Kt={key:1,border:"b base",p4:"",flex:"~ col gap-4","font-mono":""},Qt={flex:"~ gap-4"},Xt={flex:"~ gap2","mb--2":"","items-center":"",op50:""},Yt=i("div",{"w-5":"","x-divider":""},null,-1),Zt=i("div",{"flex-none":""}," Default Inputs ",-1),eo=i("div",{"x-divider":""},null,-1),to={key:2},oo={key:3,border:"b base",relative:"","n-code-block":""},no={flex:"~ wrap","w-full":""},so=["onClick"],lo=i("div",{border:"b base","flex-auto":""},null,-1),ao={border:"b base",flex:"~ gap2","items-center":"",px4:"",py2:""},ro=i("div",null,"Response",-1),io={key:1,"text-xs":"",op50:""},uo=i("div",{"flex-auto":""},null,-1),co=i("div",{op50:""}," Request finished in ",-1),po={key:0,"flex-auto":"","overflow-auto":""},fo={border:"~ base","h-full":"","w-full":"",rounded:""},mo=["data"],vo={key:2,"flex-auto":"","overflow-auto":"",p4:""},ho={border:"~ base",rounded:""},yo=["src"],go={key:1,controls:"",rounded:""},_o=["src"],bo=ae({__name:"ServerRouteDetails",props:{route:{}},emits:["open-default-input"],setup(l,{emit:g}){const u=l,o=g,[k,x]=Ye(),p=Ze(),f=et(),s=pe({contentType:"text/plain",data:"",statusCode:200,error:void 0,fetchTime:0}),d=T(()=>s.contentType.includes("application/json")?"json":s.contentType.includes("text/html")?"html":s.contentType.includes("text/css")?"css":s.contentType.includes("text/javascript")?"javascript":s.contentType.includes("image")||s.contentType.includes("video")?"media":s.contentType.includes("text/xml")||s.contentType.includes("application/xml")?"xml":s.contentType.includes("application/pdf")?"pdf":"text"),a=T(()=>{if(d.value==="json")return JSON.stringify(s.data,null,2);if(d.value==="media"||d.value==="pdf"){const n=new Blob([s.data],{type:s.contentType});return URL.createObjectURL(n)}return s.data}),E=B(!1),F=B(!1),H=tt(),V=T(()=>u.route.route?.split(/((?:\*\*)?:[\w_]+)/g)),w=T(()=>V.value?.filter(n=>n.startsWith(":")||n.startsWith("**:"))||[]),m=B(u.route.method||"GET"),S=B({}),_=pe({query:[{active:!0,key:"",value:"",type:"string"}],body:[{active:!0,key:"",value:"",type:"string"}],headers:[{active:!0,key:"Content-Type",value:"application/json",type:"string"}]}),b=B({}),{inputDefaults:R,sendFrom:O}=Ee("serverRoutes"),P=T(()=>f?.value?.app?.$fetch?O.value:"devtools"),re=["GET","POST","PUT","PATCH","DELETE","HEAD"],ie=["PATCH","POST","PUT","DELETE"],ee=T(()=>ie.includes(m.value.toUpperCase())),A=B(w.value.length?"params":"query"),U=["input","json"],G=B(U[0]),te=T({get:()=>_[A.value],set:n=>{_[A.value]=n}}),ve=T(()=>({...K(R.value.query),...K(_.query)})),he=T(()=>({...K(R.value.headers),...K(_.headers)})),ue=T(()=>ee.value?G.value==="json"?{...K(R.value.body),...b.value}:{...K(R.value.body),...K(_.body)}:void 0),qe=T(()=>{let n=window?.location.origin;return n.charAt(n.length-1)==="/"&&(n=n.slice(0,-1)),n}),oe=T(()=>{let n=new URLSearchParams(ve.value).toString();n&&(n=`?${n}`);const c=(V.value?.map(j=>(j.startsWith(":")||j.startsWith("**:"))&&S.value[j]||j).join("")||"")+n;let v=p.value?.app.baseURL||"";return(v==="./"||v===".")&&(v=""),v.endsWith("/")&&(v=v.slice(0,-1)),v+c}),ye=T(()=>qe.value+oe.value);function K(n){const c=Object.fromEntries(n.filter(({active:v,key:j,value:D})=>v&&j&&D!==void 0).map(({key:v,value:j})=>[v,j]));return Object.entries(c).length?c:void 0}async function ge(){F.value=!0,E.value=!0;const n=Date.now(),c=P.value==="app"?f.value.app.$fetch:$fetch;lt("server-routes:fetch",{method:m.value,sendFrom:P.value});try{s.data=await c(ye.value,{method:m.value.toUpperCase(),headers:he.value,query:ve.value,body:ue.value,onResponse({response:v}){s.contentType=(v.headers.get("content-type")||"").toString().toLowerCase().trim(),s.statusCode=v.status,s.error=void 0},onResponseError(v){s.error=v.response._data,s.data=v.response._data}})}catch{}E.value=!1,s.fetchTime=Date.now()-n}const _e=T(()=>{const n=[],c=[],v=Object.entries(he.value).filter(([D,z])=>D&&z&&!(D==="Content-Type"&&z==="application/json")).map(([D,z])=>` '${D}': '${z}'`).join(`,
|
|
2
|
+
`);m.value.toUpperCase()!=="GET"&&c.push(`method: '${m.value.toUpperCase()}'`),v&&c.push(`headers: {
|
|
3
|
+
${v}
|
|
4
|
+
}`),ue.value&&c.push(`body: ${JSON.stringify(ue.value,null,2)}`);const j=c.length?`, {
|
|
5
|
+
${c.join(`,
|
|
6
|
+
`).split(`
|
|
7
|
+
`).map(D=>` ${D}`).join(`
|
|
8
|
+
`)}
|
|
9
|
+
}`:"";return n.push({name:"useFetch",lang:"javascript",docs:xe.nuxt.useFetch,code:`const { data, pending, error, refresh } = useFetch('${oe.value}'${j})`}),n.push({name:"$fetch",lang:"javascript",docs:xe.nuxt.$fetch,code:`await $fetch('${oe.value}'${j})`}),n}),Q=B(Pe()),J=pe({key:"",value:""}),Ae=T(()=>{const n=[];return w.value.length&&n.push({name:"Params",slug:"params",length:w.value.length}),n.push({name:"Query",slug:"query",length:_.query.length}),ee.value&&n.push({name:"Body",slug:"body",length:_.body.length}),n.push({name:"Headers",slug:"headers",length:_.headers.length}),n.push({name:"Cookies",slug:"cookies",length:Q.value.length}),n.push({name:"Snippets",slug:"snippet"}),n});function Pe(){return document.cookie.split("; ").map(n=>{const[c,v]=n.split("=");return{key:c,value:v}}).filter(n=>n.key)}function de(n,c){if(!n)return;const v=Q.value.find(D=>D.key===n),j=Nt(n);v!==void 0?c===void 0&&(Q.value=Q.value.filter(D=>D.key!==n)):(Q.value.push({key:n,value:c}),J.key="",J.value=""),j.value=c}ot(()=>{G.value==="json"&&typeof b.value=="string"&&(b.value=JSON.parse(b.value))});const Be=nt();return(n,c)=>{const v=me,j=Ie,D=Te,z=fe,be=Le,Me=mt,Fe=De,ze=at,ce=Ne,He=vt,Ge=ht,ke=Ue("tooltip");return t(),y("div",Lt,[i("div",qt,[i("div",At,[n.route.method?(t(),C(v,{key:0,class:q(["n-badge-base n-sm",("getRequestMethodClass"in n?n.getRequestMethodClass:e(se))(e(m))]),"pointer-events-none":"","font-mono":"",tabindex:"-1"},{default:$(()=>[W(L(e(m).toUpperCase()),1)]),_:1},8,["class"])):(t(),C(j,{key:1,modelValue:e(m),"onUpdate:modelValue":c[0]||(c[0]=r=>Y(m)?m.value=r:null),class:q(["n-badge-base n-sm",("getRequestMethodClass"in n?n.getRequestMethodClass:e(se))(e(m))])},{default:$(()=>[(t(),y(I,null,M(re,r=>i("option",{key:r,class:q(("getRequestMethodClass"in n?n.getRequestMethodClass:e(se))(r))},L(r.toUpperCase()),3)),64))]),_:1},8,["modelValue","class"])),i("div",Pt,[h(D,{"model-value":e(oe),readonly:"","flex-auto":"","font-mono":"",p:"x5 y2",n:"sm"},null,8,["model-value"]),i("div",Bt,[le(h(v,{title:"Copy URL",n:"xs blue",icon:"carbon:copy",border:!1,onClick:c[1]||(c[1]=r=>e(Be)(e(ye),"server-route-url"))},null,512),[[ke,"Copy URL"]]),le(h(v,{title:"Open in Editor",icon:"carbon-launch",n:"xs blue",border:!1,onClick:c[2]||(c[2]=r=>e(H)(n.route.filepath))},null,512),[[ke,"Open in Editor"]])])]),h(v,{"h-full":"",n:"primary solid",onClick:ge},{default:$(()=>[h(z,{icon:"carbon:send"})]),_:1})])]),i("div",Mt,[(t(!0),y(I,null,M(e(Ae),r=>(t(),C(v,{key:r.slug,class:q(e(A)===r.slug?"text-primary n-primary":"border-transparent shadow-none"),onClick:X=>A.value=r.slug},{default:$(()=>[h(z,{icon:("ServerRouteTabIcons"in n?n.ServerRouteTabIcons:e(je))[r.slug]},null,8,["icon"]),W(" "+L(r.name)+" "+L(r?.length?`(${r.length})`:"")+" ",1),i("span",null,L(e(R)[r.slug]?.length?`(${e(R)[r.slug].length})`:""),1)]),_:2},1032,["class","onClick"]))),128)),Ft,zt,h(j,{modelValue:e(P),"onUpdate:modelValue":c[3]||(c[3]=r=>Y(P)?P.value=r:null),class:"n-xs",disabled:!e(f)?.app?.$fetch},{default:$(()=>[Ht,Gt]),_:1},8,["modelValue","disabled"])]),e(A)==="params"?(t(),y("div",Wt,[(t(!0),y(I,null,M(e(w),r=>(t(),y(I,{key:r},[i("div",Jt,L(r),1),h(D,{modelValue:e(S)[r],"onUpdate:modelValue":X=>e(S)[r]=X,placeholder:r,"flex-1":""},null,8,["modelValue","onUpdate:modelValue","placeholder"])],64))),128))])):N("",!0),e(A)==="cookies"?(t(),y("div",Kt,[(t(!0),y(I,null,M(e(Q),r=>(t(),y("div",{key:r.key,flex:"~ gap-4 items-center"},[h(D,{placeholder:"Key...","model-value":r.key,disabled:"","op-70":""},null,8,["model-value"]),h(D,{placeholder:"Value...","model-value":r.value,"flex-1":"",n:"primary",onInput:X=>de(r.key,X.target?.value)},null,8,["model-value","onInput"]),h(v,{title:"Delete",n:"red",onClick:X=>de(r.key,void 0)},{default:$(()=>[h(z,{icon:"i-carbon-trash-can"})]),_:2},1032,["onClick"])]))),128)),i("div",Qt,[h(D,{modelValue:e(J).key,"onUpdate:modelValue":c[4]||(c[4]=r=>e(J).key=r),placeholder:"Key",n:"primary","flex-1":""},null,8,["modelValue"]),h(D,{modelValue:e(J).value,"onUpdate:modelValue":c[5]||(c[5]=r=>e(J).value=r),placeholder:"Value",n:"primary","flex-1":""},null,8,["modelValue"]),h(v,{title:"Add",n:"primary",onClick:c[6]||(c[6]=r=>de(e(J).key,e(J).value))},{default:$(()=>[h(z,{icon:"i-carbon-save"})]),_:1})])])):N("",!0),h(e(k),null,{default:$(()=>[h(be,{modelValue:e(te),"onUpdate:modelValue":c[9]||(c[9]=r=>Y(te)?te.value=r:null),default:{active:!0,type:"string"},"max-h-xs":"","of-auto":""},{default:$(()=>[e(R)[e(A)]?.length?(t(),y(I,{key:0},[i("div",Xt,[Yt,Zt,h(v,{icon:"i-carbon-edit",border:!1,onClick:c[7]||(c[7]=r=>o("open-default-input"))}),eo]),h(be,{modelValue:e(R)[e(A)],"onUpdate:modelValue":c[8]||(c[8]=r=>e(R)[e(A)]=r),disabled:"",p0:""},null,8,["modelValue"])],64)):N("",!0)]),_:1},8,["modelValue"])]),_:1}),e(A)==="snippet"?(t(),y("div",to,[e(_e).length?(t(),C(Me,{key:0,"code-snippets":e(_e)},null,8,["code-snippets"])):N("",!0)])):e(te)?(t(),y("div",oo,[e(A)==="body"?(t(),y(I,{key:0},[i("div",no,[(t(),y(I,null,M(U,r=>i("button",{key:r,px4:"",py2:"",border:"r base",hover:"bg-active",class:q({"border-b":r!==e(G)}),onClick:X=>G.value=r},[i("div",{class:q({op30:r!==e(G)}),"font-mono":""},L(r),3)],10,so)),64)),lo]),e(G)==="input"?(t(),C(e(x),{key:0})):e(G)==="json"?(t(),C(e(yt),st({key:1,modelValue:e(b),"onUpdate:modelValue":c[10]||(c[10]=r=>Y(b)?b.value=r:null),class:[[n.$colorMode.value==="dark"?"jse-theme-dark":"light"],"json-editor-vue of-auto text-sm outline-none"]},n.$attrs,{mode:"text","navigation-bar":!1,indentation:2,"tab-size":2}),null,16,["modelValue","class"])):N("",!0)],64)):(t(),C(e(x),{key:1}))])):N("",!0),e(F)?e(E)?(t(),C(ze,{key:5,"z-10":"","flex-auto":"","backdrop-blur":""},{default:$(()=>[W(" Fetching... ")]),_:1})):(t(),y(I,{key:6},[i("div",ao,[ro,e(s).error?(t(),C(ce,{key:0,n:"red"},{default:$(()=>[W(" Error ")]),_:1})):N("",!0),h(ce,{n:e(s).error?"orange":"green",textContent:L(e(s).statusCode)},null,8,["n","textContent"]),e(s).contentType?(t(),y("code",io,L(e(s).contentType),1)):N("",!0),e(s).contentType==="application/json"?(t(),C(He,{key:2,getter:()=>({input:e(a)})},null,8,["getter"])):N("",!0),uo,co,h(ce,{n:"green"},{default:$(()=>[W(L(e(s).fetchTime)+" ms ",1)]),_:1})]),e(d)==="pdf"?(t(),y("div",po,[i("div",fo,[i("object",{data:e(a),type:"application/pdf","flex-auto":"",width:"100%",height:"100%",rounded:""},null,8,mo)])])):e(d)!=="media"?(t(),C(Ge,{key:1,"flex-auto":"","overflow-auto":"","py-2":"",code:e(a),lang:e(d)},null,8,["code","lang"])):(t(),y("div",vo,[i("div",ho,[e(s).contentType.includes("image")?(t(),y("img",{key:0,rounded:"",src:e(a)},null,8,yo)):(t(),y("video",go,[i("source",{src:e(a),type:"video/mp4"},null,8,_o)]))])]))],64)):(t(),C(Fe,{key:4},{default:$(()=>[h(v,{n:"primary",onClick:ge},{default:$(()=>[h(z,{icon:"carbon:send"}),W(" Send request ")]),_:1})]),_:1}))])}}}),ko={flex:"~ gap1","text-sm":""},xo={key:0,op50:""},Co={op50:""},wo=i("span",{op75:""},"Select a route to start",-1),$o=i("div",{p4:"",border:"b base"},[i("span",{"text-lg":""},"Default Inputs"),i("br"),i("span",{"text-white":"",op50:""},"Merged as default for every request in DevTools")],-1),Po=ae({__name:"server-routes",setup(l){const g=B(!1),u=rt(),o=$e(),{selectedRoute:k,view:x,inputDefaults:p}=Ee("serverRoutes"),f=T(()=>{!o.value&&k.value&&(o.value=k.value.filepath);const V=u.value?.find(w=>w.filepath===o.value);return o.value!==k.value?.filepath&&V&&(k.value=V),V}),s=B(""),d=T(()=>new it(u.value||[],{keys:["method","route"],shouldSort:!0})),a=T(()=>u.value?s.value?d.value.search(s.value).map(w=>w.item):u.value:[]),E=T(()=>{const V=[],w=(S,_)=>{S.routes=S.routes||[],S.routes.push(_)},m=(S,_)=>{const b=_?_.routes?.find(O=>O.route===S):V.find(O=>O.route===S);if(b)return b;const R={route:S,filepath:S.replace(/\W/g,"-").toLowerCase(),type:"collection",routes:[]};return _?w(_,R):V.push(R),R};return a.value.forEach(S=>{let _,b;const R=S.filepath.split("/"),O=R.slice(R.indexOf("server")+1);if(S.type==="runtime"){O[0]="runtime";const P=R.indexOf("dist");P!==-1&&(_=R[P-1],_&&O.splice(1,0,_))}O.length>0&&O[O.length-1].includes(".")&&O.pop(),O.forEach(P=>{b=m(P,b)}),b?w(b,S):V.push(S)}),V});function F(){x.value=x.value==="tree"?"list":"tree"}function H(V){return V.charAt(0).toUpperCase()+V.slice(1)}return(V,w)=>{const m=me,S=pt,_=Oe,b=bo,R=ct,O=De,P=ut,re=Le,ie=gt,ee=_t,A=Ue("tooltip");return t(),y(I,null,[h(P,{"storage-key":"tab-server-routes"},{left:$(()=>[h(S,{search:e(s),"onUpdate:search":w[1]||(w[1]=U=>Y(s)?s.value=U:null),pb2:""},{actions:$(()=>[le(h(m,{"text-lg":"",icon:e(x)==="list"?"i-carbon-list":"i-carbon-tree-view-alt",title:"Toggle view",border:!1,onClick:F},null,8,["icon"]),[[A,"Toggle View"]]),le(h(m,{"text-lg":"",icon:"i-carbon-cics-sit-overrides",title:"Default Inputs",border:!1,onClick:w[0]||(w[0]=U=>g.value=!e(g))},null,512),[[A,"Default Inputs"]])]),default:$(()=>[i("div",ko,[e(s)?(t(),y("span",xo,L(e(a).length)+" matched · ",1)):N("",!0),i("span",Co,L(e(u)?.length)+" routes in total",1)])]),_:1},8,["search"]),(t(!0),y(I,null,M(e(x)==="tree"?e(E):e(a),U=>(t(),C(_,{key:U.filepath,item:U},null,8,["item"]))),128))]),right:$(()=>[(t(),C(dt,{max:10},[e(f)?(t(),C(b,{key:e(f).filepath,route:e(f),onOpenDefaultInput:w[2]||(w[2]=U=>g.value=!0)},null,8,["route"])):N("",!0)],1024)),e(f)?N("",!0):(t(),C(O,{key:0},{default:$(()=>[h(R,{px6:"",py2:""},{default:$(()=>[wo]),_:1})]),_:1}))]),_:1}),h(ee,{modelValue:e(g),"onUpdate:modelValue":w[3]||(w[3]=U=>Y(g)?g.value=U:null),"auto-close":"","max-w-xl":"","min-w-xl":"",onClose:w[4]||(w[4]=U=>g.value=!1)},{default:$(()=>[i("div",null,[$o,(t(!0),y(I,null,M(Object.keys(e(p)),U=>(t(),C(ie,{key:U,text:`${H(U)} ${e(p)[U].length?`(${e(p)[U].length})`:""}`,padding:!1,icon:("ServerRouteTabIcons"in V?V.ServerRouteTabIcons:e(je))[U]},{default:$(()=>[h(re,{modelValue:e(p)[U],"onUpdate:modelValue":G=>e(p)[U]=G,py0:"",default:{active:!0,type:"string"}},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["text","icon"]))),128))])]),_:1},8,["modelValue"])],64)}}});export{Po as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as Q}from"./NIconTitle.vue.
|
|
1
|
+
import{_ as Q}from"./NIconTitle.vue.8e6741d5.js";import{_ as X}from"./NSwitch.vue.6e493b89.js";import{d as Y,au as Z,bO as ee,aD as le,az as E,m,i as n,k as e,F as v,n as N,f as t,j as a,L as oe,_ as ne,ao as te,o as r,h as P,t as y,G as j,p as A,v as O,l as c,C as z,B as ae,bG as se,bP as ie}from"./entry.52bc93cd.js";import{_ as ue}from"./NSelect.vue.cdaf42b9.js";import{_ as de}from"./NCheckbox.vue.7e495ed2.js";import{_ as re}from"./NLink.vue.0a35d66d.js";const ce={px8:"",py6:""},pe={grid:"~ md:cols-2 gap-x-10 gap-y-3","max-w-300":""},me={flex:"~ col gap-2"},_e=e("h3",{"text-lg":""}," Tabs ",-1),fe={flex:"~ gap-2","flex-auto":"","items-center":"","justify-start":""},ve={capitalize:"",op75:""},ge=e("div",{"mx--1":"",my1:"","h-1px":"",border:"b base",op75:""},null,-1),he=e("div",{"flex-auto":""},null,-1),be={flex:"~ col gap-2"},xe=e("h3",{"text-lg":""}," Appearance ",-1),ye=e("div",{"i-carbon-sun":"","dark:i-carbon-moon":"","translate-y--1px":""},null,-1),ke=e("div",{"mx--2":"",my1:"","h-1px":"",border:"b base",op75:""},null,-1),Ve=e("p",null,"UI Scale",-1),Ce=["value"],we=e("div",{"mx--2":"",my1:"","h-1px":"",border:"b base",op75:""},null,-1),Te=e("span",null," Expand Sidebar ",-1),Se=e("span",null," Scrollable Sidebar ",-1),Ne=e("h3",{mt2:"","text-lg":""}," Features ",-1),Oe=e("span",null,"Close DevTools when clicking outside",-1),Ue=e("span",null,"Show help buttons",-1),$e=e("span",null,"Always show the floating panel",-1),Ie=e("div",{"mx--2":"",my1:"","h-1px":"",border:"b base",op75:""},null,-1),De=e("p",null,"Minimize floating panel on inactive",-1),ze=["value"],Be=e("h3",{mt2:"","text-lg":""}," Feedback ",-1),Le=e("span",null,"Send anonymous statistics, help us improving DevTools",-1),Ee=e("div",{"mx--2":"",my1:"","h-1px":"",border:"b base",op75:""},null,-1),Pe={flex:"~ gap-2"},je=e("div",{"i-carbon-data-enrichment":""},null,-1),Ae=e("div",{"i-carbon-debug":""},null,-1),Fe=e("h3",{mt2:"","text-lg":""}," Debug ",-1),Me={flex:"~ gap-2"},Re=e("div",{"i-carbon-breaking-change":""},null,-1),Xe=Y({__name:"settings",setup(Ge){const{interactionCloseOnOutsideClick:k,showPanel:U,showHelpButtons:$,scale:I,hiddenTabs:g,pinnedTabs:u,hiddenTabCategories:h,minimizePanelInactive:V,sidebarExpanded:C,sidebarScrollable:D}=ae(),b=Z(),F=[["Tiny",12/15],["Small",14/15],["Normal",1],["Large",16/15],["Huge",18/15]],M=[["Always",0],["1s",1e3],["2s",2e3],["5s",5e3],["10s",1e4],["Never",-1]],R=ee(le());function G(s,o){o?g.value=g.value.filter(d=>d!==s):g.value.push(s)}function H(s,o){o?h.value=h.value.filter(d=>d!==s):h.value.push(s)}function W(s){u.value.includes(s)?u.value=u.value.filter(o=>o!==s):u.value.push(s)}function B(s,o){const d=u.value.indexOf(s);if(d===-1)return;const _=d+o;if(_<0||_>=u.value.length)return;const x=[...u.value];x.splice(d,1),x.splice(_,0,s),u.value=x}async function q(){confirm("Are you sure you to reset all local settings & state? The app will reload.")&&(Object.keys(localStorage).forEach(s=>{s.startsWith("nuxt-devtools-")&&localStorage.removeItem(s)}),await oe.clearOptions(),b.value?.app?.reload?.(),window.location.reload())}return E(()=>{b.value&&(b.value.app.frameState.value.closeOnOutsideClick=k.value)}),E(()=>{b.value&&(b.value.app.frameState.value.minimizePanelInactive=V.value)}),(s,o)=>{const d=Q,_=X,x=se,p=ne,w=te,J=ie,L=ue,f=de,K=re;return r(),m("div",ce,[n(d,{class:"mb-5 text-xl op75",icon:"i-carbon-settings-adjust",text:"DevTools Settings"}),e("div",pe,[e("div",me,[_e,(r(!0),m(v,null,N(t(R),([l,T])=>(r(),m(v,{key:l},[T.length?(r(),P(w,{key:0,p3:"",flex:"~ col gap-1",class:j(t(h).includes(l)?"op50 grayscale":"")},{default:a(()=>[n(_,{flex:"~ row-reverse",py1:"",pl2:"",pr1:"","n-lime":"","model-value":!t(h).includes(l),"onUpdate:modelValue":i=>H(l,i)},{default:a(()=>[e("div",fe,[e("span",ve,y(l),1)])]),_:2},1032,["model-value","onUpdate:modelValue"]),ge,(r(!0),m(v,null,N(T,i=>(r(),P(_,{key:i.name,flex:"~ row-reverse",py1:"",pl2:"",pr1:"","n-primary":"","model-value":!t(g).includes(i.name),"onUpdate:modelValue":S=>G(i.name,S)},{default:a(()=>[e("div",{flex:"~ gap-2","flex-auto":"","items-center":"","justify-start":"","pr-4":"",class:j(t(g).includes(i.name)?"op25":"")},[n(x,{"text-xl":"",icon:i.icon,title:i.title},null,8,["icon","title"]),e("span",null,y(i.title),1),he,t(u).includes(i.name)?(r(),m(v,{key:0},[n(p,{icon:"i-carbon-caret-up",disabled:t(u).indexOf(i.name)===0,border:!1,onClick:S=>B(i.name,-1)},null,8,["disabled","onClick"]),n(p,{icon:"i-carbon-caret-down",disabled:t(u).indexOf(i.name)===t(u).length-1,border:!1,onClick:S=>B(i.name,1)},null,8,["disabled","onClick"])],64)):A("",!0),n(p,{icon:t(u).includes(i.name)?" i-carbon-pin-filled rotate--45":" i-carbon-pin op50",border:!1,onClick:S=>W(i.name)},null,8,["icon","onClick"])],2)]),_:2},1032,["model-value","onUpdate:modelValue"]))),128))]),_:2},1032,["class"])):A("",!0)],64))),128))]),e("div",be,[xe,n(w,{p4:"",flex:"~ col gap-2"},{default:a(()=>[e("div",null,[n(J,null,{default:a(({toggle:l,isDark:T})=>[n(p,{n:"primary",onClick:l},{default:a(()=>[ye,O(" "+y(T.value?"Dark":"Light"),1)]),_:2},1032,["onClick"])]),_:1})]),ke,Ve,n(L,{modelValue:t(I),"onUpdate:modelValue":o[0]||(o[0]=l=>c(I)?I.value=l:null),n:"primary"},{default:a(()=>[(r(),m(v,null,N(F,l=>e("option",{key:l[0],value:l[1]},y(l[0]),9,Ce)),64))]),_:1},8,["modelValue"]),we,n(f,{modelValue:t(C),"onUpdate:modelValue":o[1]||(o[1]=l=>c(C)?C.value=l:null),"n-primary":""},{default:a(()=>[Te]),_:1},8,["modelValue"]),n(f,{modelValue:t(D),"onUpdate:modelValue":o[2]||(o[2]=l=>c(D)?D.value=l:null),disabled:t(C),"n-primary":""},{default:a(()=>[Se]),_:1},8,["modelValue","disabled"])]),_:1}),Ne,n(w,{p4:"",flex:"~ col gap-2"},{default:a(()=>[n(f,{modelValue:t(k),"onUpdate:modelValue":o[3]||(o[3]=l=>c(k)?k.value=l:null),"n-primary":""},{default:a(()=>[Oe]),_:1},8,["modelValue"]),n(f,{modelValue:t($),"onUpdate:modelValue":o[4]||(o[4]=l=>c($)?$.value=l:null),"n-primary":""},{default:a(()=>[Ue]),_:1},8,["modelValue"]),n(f,{modelValue:t(U),"onUpdate:modelValue":o[5]||(o[5]=l=>c(U)?U.value=l:null),"n-primary":""},{default:a(()=>[$e]),_:1},8,["modelValue"]),Ie,De,n(L,{modelValue:t(V),"onUpdate:modelValue":o[6]||(o[6]=l=>c(V)?V.value=l:null),modelModifiers:{number:!0},"n-primary":""},{default:a(()=>[(r(),m(v,null,N(M,l=>e("option",{key:l[0],value:l[1]},y(l[0]),9,ze)),64))]),_:1},8,["modelValue"])]),_:1}),Be,n(w,{p4:"",flex:"~ col gap-2"},{default:a(()=>[n(f,{modelValue:t(z),"onUpdate:modelValue":o[7]||(o[7]=l=>c(z)?z.value=l:null),"n-primary":""},{default:a(()=>[Le,n(K,{href:"https://github.com/nuxt/devtools#anonymous-usage-analytics",target:"_blank",ml1:"",op50:"",textContent:"Learn more"})]),_:1},8,["modelValue"]),Ee,e("div",Pe,[n(p,{n:"blue",to:"https://github.com/nuxt/devtools/discussions/29",target:"_blank"},{default:a(()=>[je,O(" Ideas & Suggestions ")]),_:1}),n(p,{n:"orange",to:"https://github.com/nuxt/devtools/issues",target:"_blank"},{default:a(()=>[Ae,O(" Bug Reports ")]),_:1})])]),_:1}),Fe,e("div",Me,[n(p,{n:"orange",onClick:q},{default:a(()=>[Re,O(" Reset Local Settings & State ")]),_:1})])])])])}}});export{Xe as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{au as m,ba as n,a as s,L as o}from"./entry.
|
|
1
|
+
import{au as m,ba as n,a as s,L as o}from"./entry.52bc93cd.js";function u(){const p=m(),t=n("getComponents",()=>o.getComponents()),l=s(()=>Object.entries(p.value?.nuxt?.vueApp._context.components||{}).map(([e])=>({pascalName:e,global:!0})).filter(e=>!/^Lazy[A-Z]/.test(e.pascalName)).filter(e=>!(t.value||[]).find(a=>a.pascalName===e.pascalName)));return s(()=>[...l.value,...t.value||[]].sort((e,a)=>e.pascalName.localeCompare(a.pascalName)))}function r(){return n("getComponentsRelationships",()=>o.getComponentsRelationships())}export{r as a,u};
|