@nuxt/devtools 0.6.2 → 0.6.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -4
- package/dist/chunks/module-main.mjs +25 -133
- package/dist/client/200.html +2 -2
- package/dist/client/404.html +2 -2
- package/dist/client/__blank/index.html +2 -2
- package/dist/client/_nuxt/AuthRequiredPanel.vue.e75f9e70.js +1 -0
- package/dist/client/_nuxt/Badge.d9d2b649.js +1 -0
- package/dist/client/_nuxt/CodeSnippets.vue.b63711e4.js +1 -0
- package/dist/client/_nuxt/{DrawerRight.vue.d80827fd.js → DrawerRight.vue.e21669fa.js} +1 -1
- package/dist/client/_nuxt/DurationDisplay.vue.c206edd8.js +1 -0
- package/dist/client/_nuxt/FilepathItem.vue.a47beb58.js +1 -0
- package/dist/client/_nuxt/HelpFab.vue.e5d23c98.js +1 -0
- package/dist/client/_nuxt/{LaunchPage.vue.b85270dd.js → LaunchPage.vue.610fcc27.js} +1 -1
- package/dist/client/_nuxt/NCheckbox.vue.f4134b6b.js +1 -0
- package/dist/client/_nuxt/{NCodeBlock.vue.de2cd5a6.js → NCodeBlock.vue.bdc8bfdc.js} +1 -1
- package/dist/client/_nuxt/NIconButton.vue.24522062.js +1 -0
- package/dist/client/_nuxt/NIconTitle.vue.dc58a435.js +1 -0
- package/dist/client/_nuxt/{NLink.vue.53529111.js → NLink.vue.393c859e.js} +1 -1
- package/dist/client/_nuxt/NMarkdown.vue.3224fbc4.js +1 -0
- package/dist/client/_nuxt/NPanelGrids.eec702e8.js +1 -0
- package/dist/client/_nuxt/NSectionBlock.8c2cc0df.js +1 -0
- package/dist/client/_nuxt/NSelect.vue.8ff29308.js +1 -0
- package/dist/client/_nuxt/{NSwitch.vue.7f4e43b3.js → NSwitch.vue.840840dc.js} +1 -1
- package/dist/client/_nuxt/{NTip.vue.c99855ad.js → NTip.vue.79345a6a.js} +1 -1
- package/dist/client/_nuxt/Navbar.vue.82295224.js +1 -0
- package/dist/client/_nuxt/{PanelLeftRight.vue.1e85c7f2.js → PanelLeftRight.vue.5871de72.js} +1 -1
- package/dist/client/_nuxt/StateEditor.vue.d48421f9.js +1 -0
- package/dist/client/_nuxt/__blank.9ffea4ef.js +1 -0
- package/dist/client/_nuxt/{analyze-build.d94a4835.js → analyze-build.67bd8db6.js} +1 -1
- package/dist/client/_nuxt/{assets.cea82447.js → assets.36239ace.js} +3 -3
- package/dist/client/_nuxt/{client.aa60153e.js → client.495918a8.js} +1 -1
- package/dist/client/_nuxt/{components.67be79c1.js → components.c4c5e473.js} +27 -27
- package/dist/client/_nuxt/custom-_name_.3e45940d.js +1 -0
- package/dist/client/_nuxt/default.0d72ce4e.js +1 -0
- package/dist/client/_nuxt/{editor.24e006dd.js → editor.a4d83539.js} +1 -1
- package/dist/client/_nuxt/entry.eeaf510e.css +1 -0
- package/dist/client/_nuxt/entry.fbf2c464.js +21 -0
- package/dist/client/_nuxt/error-404.37bdd0cf.js +1 -0
- package/dist/client/_nuxt/error-404.91003ceb.css +1 -0
- package/dist/client/_nuxt/error-500.7e02f53c.css +1 -0
- package/dist/client/_nuxt/error-500.f09b55ae.js +1 -0
- package/dist/client/_nuxt/full.7e6e1e52.js +1 -0
- package/dist/client/_nuxt/hooks.9f8f251f.js +1 -0
- package/dist/client/_nuxt/{imports.ab8bf33a.js → imports.55b5830a.js} +1 -1
- package/dist/client/_nuxt/{index.31423b81.js → index.2421127a.js} +1 -1
- package/dist/client/_nuxt/index.b31d0db0.js +1 -0
- package/dist/client/_nuxt/{json-editor-vue.0e484aeb.js → json-editor-vue.d5db52dc.js} +1 -1
- package/dist/client/_nuxt/middleware.bc94adc0.js +1 -0
- package/dist/client/_nuxt/modules.b661d7e8.js +4 -0
- package/dist/client/_nuxt/none.3d1d9cce.js +1 -0
- package/dist/client/_nuxt/{open-graph.a806949f.js → open-graph.d11fab80.js} +2 -2
- package/dist/client/_nuxt/overview.82760181.js +1 -0
- package/dist/client/_nuxt/{pages.9797a06b.js → pages.fbb1f607.js} +1 -1
- package/dist/client/_nuxt/payload.5e745a21.js +1 -0
- package/dist/client/_nuxt/plugins.736cbd71.js +1 -0
- package/dist/client/_nuxt/{runtime-configs.c19cf62e.js → runtime-configs.834452b2.js} +1 -1
- package/dist/client/_nuxt/server-routes.20327313.js +9 -0
- package/dist/client/_nuxt/{settings.223347c0.js → settings.ef38f4f9.js} +1 -1
- package/dist/client/_nuxt/{state-components.7a725a3e.js → state-components.20943c6b.js} +1 -1
- package/dist/client/_nuxt/state-modules.7230fab3.js +1 -0
- package/dist/client/_nuxt/storage.40229c6e.js +1 -0
- package/dist/client/_nuxt/{terminals.838c617b.js → terminals.e4fb811f.js} +2 -2
- package/dist/client/_nuxt/{unocss-runtime.8cb4743c.js → unocss-runtime.73092d93.js} +1 -1
- package/dist/client/_nuxt/{virtual-files.0f8a6122.js → virtual-files.071a4a48.js} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/client/modules/analyze-build/index.html +2 -2
- package/dist/client/modules/assets/index.html +2 -2
- package/dist/client/modules/components/index.html +2 -2
- package/dist/client/modules/hooks/index.html +2 -2
- package/dist/client/modules/imports/index.html +2 -2
- package/dist/client/modules/middleware/index.html +2 -2
- package/dist/client/modules/modules/index.html +2 -2
- package/dist/client/modules/open-graph/index.html +2 -2
- package/dist/client/modules/overview/index.html +2 -2
- package/dist/client/modules/pages/index.html +2 -2
- package/dist/client/modules/payload/index.html +2 -2
- package/dist/client/modules/plugins/index.html +2 -2
- package/dist/client/modules/runtime-configs/index.html +2 -2
- package/dist/client/modules/server-routes/index.html +2 -2
- package/dist/client/modules/storage/index.html +2 -2
- package/dist/client/modules/terminals/index.html +2 -2
- package/dist/client/modules/virtual-files/index.html +2 -2
- package/dist/client/settings/index.html +2 -2
- package/dist/global-20ccb74c.d.ts +52 -0
- package/dist/module.d.ts +2 -0
- package/dist/module.json +1 -1
- package/dist/runtime/plugins/devtools.client.d.ts +0 -8
- package/dist/runtime/plugins/devtools.client.mjs +10 -84
- package/dist/runtime/plugins/view/FrameBox.vue +66 -35
- package/dist/runtime/plugins/view/Main.vue +19 -2
- package/dist/runtime/plugins/view/client.d.ts +8 -0
- package/dist/runtime/plugins/view/client.mjs +209 -1
- package/dist/runtime/plugins/view/state.d.ts +1 -4
- package/dist/runtime/plugins/view/state.mjs +2 -20
- package/dist/types.d.ts +2 -0
- package/package.json +14 -14
- package/dist/client/_nuxt/AuthRequiredPanel.vue.4f66b5dd.js +0 -1
- package/dist/client/_nuxt/Badge.2cc4687e.js +0 -1
- package/dist/client/_nuxt/CodeSnippets.vue.1e158b8f.js +0 -1
- package/dist/client/_nuxt/DurationDisplay.vue.a48b74dd.js +0 -1
- package/dist/client/_nuxt/FilepathItem.vue.df9b46ef.js +0 -1
- package/dist/client/_nuxt/HelpFab.vue.49173e4b.js +0 -1
- package/dist/client/_nuxt/NCheckbox.vue.df53e265.js +0 -1
- package/dist/client/_nuxt/NIconButton.vue.e211c1b6.js +0 -1
- package/dist/client/_nuxt/NIconTitle.vue.4e3340eb.js +0 -1
- package/dist/client/_nuxt/NMarkdown.vue.26c114a8.js +0 -1
- package/dist/client/_nuxt/NPanelGrids.fc7166ff.js +0 -1
- package/dist/client/_nuxt/NSectionBlock.0eaaa956.js +0 -1
- package/dist/client/_nuxt/NSelect.vue.94ec8f3c.js +0 -1
- package/dist/client/_nuxt/Navbar.vue.a50c38bf.js +0 -1
- package/dist/client/_nuxt/NpmVersionCheck.vue.029b0cde.js +0 -1
- package/dist/client/_nuxt/StateEditor.vue.4e5aa888.js +0 -1
- package/dist/client/_nuxt/__blank.8e143dfc.js +0 -1
- package/dist/client/_nuxt/custom-_name_.ed0df2f5.js +0 -1
- package/dist/client/_nuxt/default.29185309.js +0 -1
- package/dist/client/_nuxt/entry.ea777320.css +0 -1
- package/dist/client/_nuxt/entry.f3de3eb8.js +0 -19
- package/dist/client/_nuxt/error-404.09e25f4a.js +0 -1
- package/dist/client/_nuxt/error-404.2618a69f.css +0 -1
- package/dist/client/_nuxt/error-500.0bde1cc6.js +0 -1
- package/dist/client/_nuxt/error-500.12a2683b.css +0 -1
- package/dist/client/_nuxt/error-component.753dcd89.js +0 -3
- package/dist/client/_nuxt/full.e7e50a56.js +0 -1
- package/dist/client/_nuxt/hooks.c5f385b4.js +0 -1
- package/dist/client/_nuxt/index.686c37b5.js +0 -1
- package/dist/client/_nuxt/middleware.08e999fd.js +0 -1
- package/dist/client/_nuxt/modules.b435656d.js +0 -4
- package/dist/client/_nuxt/none.548277ee.js +0 -1
- package/dist/client/_nuxt/overview.08fa2255.js +0 -1
- package/dist/client/_nuxt/payload.f6049d4c.js +0 -1
- package/dist/client/_nuxt/plugins.7ff70558.js +0 -1
- package/dist/client/_nuxt/server-routes.34b80486.js +0 -9
- package/dist/client/_nuxt/storage.446005cc.js +0 -1
- package/dist/runtime/plugins/view/Frame.vue +0 -105
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{aY as a,bn as n,o as r,e as d,b as e,t as s,f as l,w as c,j as p,I as f,ay as x,az as h}from"./entry.f3de3eb8.js";const m=t=>(x("data-v-bf1556d5"),t=t(),h(),t),u={class:"font-sans antialiased bg-white dark:bg-black text-black dark:text-white grid min-h-screen place-content-center overflow-hidden"},g=m(()=>e("div",{class:"fixed left-0 right-0 spotlight z-10"},null,-1)),b={class:"max-w-520px text-center z-20"},_=["textContent"],y=["textContent"],w={class:"w-full flex items-center justify-center"},S={__name:"error-404",props:{appName:{type:String,default:"Nuxt"},version:{type:String,default:""},statusCode:{type:Number,default:404},statusMessage:{type:String,default:"Not Found"},description:{type:String,default:"Sorry, the page you are looking for could not be found."},backHome:{type:String,default:"Go back home"}},setup(t){const o=t;return n({title:`${o.statusCode} - ${o.statusMessage} | ${o.appName}`,script:[],style:[{children:'*,:before,:after{-webkit-box-sizing:border-box;box-sizing:border-box;border-width:0;border-style:solid;border-color:#e0e0e0}*{--tw-ring-inset:var(--tw-empty, );--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(14, 165, 233, .5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000}:root{-moz-tab-size:4;-o-tab-size:4;tab-size:4}a{color:inherit;text-decoration:inherit}body{margin:0;font-family:inherit;line-height:inherit}html{-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";line-height:1.5}h1,p{margin:0}h1{font-size:inherit;font-weight:inherit}'}]}),(k,v)=>{const i=f;return r(),d("div",u,[g,e("div",b,[e("h1",{class:"text-8xl sm:text-10xl font-medium mb-8",textContent:s(t.statusCode)},null,8,_),e("p",{class:"text-xl px-8 sm:px-0 sm:text-4xl font-light mb-16 leading-tight",textContent:s(t.description)},null,8,y),e("div",w,[l(i,{to:"/",class:"gradient-border text-md sm:text-xl py-2 px-4 sm:py-3 sm:px-6 cursor-pointer"},{default:c(()=>[p(s(t.backHome),1)]),_:1})])])])}}},z=a(S,[["__scopeId","data-v-bf1556d5"]]);export{z as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.spotlight[data-v-bf1556d5]{background:linear-gradient(45deg,#00dc82,#36e4da 50%,#0047e1);bottom:-30vh;filter:blur(20vh);height:40vh}.gradient-border[data-v-bf1556d5]{-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);border-radius:.5rem;position:relative}@media (prefers-color-scheme:light){.gradient-border[data-v-bf1556d5]{background-color:#ffffff4d}.gradient-border[data-v-bf1556d5]:before{background:linear-gradient(90deg,#e2e2e2,#e2e2e2 25%,#00dc82 50%,#36e4da 75%,#0047e1)}}@media (prefers-color-scheme:dark){.gradient-border[data-v-bf1556d5]{background-color:#1414144d}.gradient-border[data-v-bf1556d5]:before{background:linear-gradient(90deg,#303030,#303030 25%,#00dc82 50%,#36e4da 75%,#0047e1)}}.gradient-border[data-v-bf1556d5]:before{background-size:400% auto;border-radius:.5rem;content:"";inset:0;-webkit-mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);-webkit-mask-composite:xor;mask-composite:exclude;opacity:.5;padding:2px;position:absolute;transition:background-position .3s ease-in-out,opacity .2s ease-in-out;width:100%}.gradient-border[data-v-bf1556d5]:hover:before{background-position:-50% 0;opacity:1}.bg-white[data-v-bf1556d5]{--tw-bg-opacity:1;background-color:rgba(255,255,255,var(--tw-bg-opacity))}.cursor-pointer[data-v-bf1556d5]{cursor:pointer}.flex[data-v-bf1556d5]{display:flex}.grid[data-v-bf1556d5]{display:grid}.place-content-center[data-v-bf1556d5]{place-content:center}.items-center[data-v-bf1556d5]{align-items:center}.justify-center[data-v-bf1556d5]{justify-content:center}.font-sans[data-v-bf1556d5]{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}.font-medium[data-v-bf1556d5]{font-weight:500}.font-light[data-v-bf1556d5]{font-weight:300}.text-8xl[data-v-bf1556d5]{font-size:6rem;line-height:1}.text-xl[data-v-bf1556d5]{font-size:1.25rem;line-height:1.75rem}.leading-tight[data-v-bf1556d5]{line-height:1.25}.mb-8[data-v-bf1556d5]{margin-bottom:2rem}.mb-16[data-v-bf1556d5]{margin-bottom:4rem}.max-w-520px[data-v-bf1556d5]{max-width:520px}.min-h-screen[data-v-bf1556d5]{min-height:100vh}.overflow-hidden[data-v-bf1556d5]{overflow:hidden}.px-8[data-v-bf1556d5]{padding-left:2rem;padding-right:2rem}.py-2[data-v-bf1556d5]{padding-bottom:.5rem;padding-top:.5rem}.px-4[data-v-bf1556d5]{padding-left:1rem;padding-right:1rem}.fixed[data-v-bf1556d5]{position:fixed}.left-0[data-v-bf1556d5]{left:0}.right-0[data-v-bf1556d5]{right:0}.text-center[data-v-bf1556d5]{text-align:center}.text-black[data-v-bf1556d5]{--tw-text-opacity:1;color:rgba(0,0,0,var(--tw-text-opacity))}.antialiased[data-v-bf1556d5]{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.w-full[data-v-bf1556d5]{width:100%}.z-10[data-v-bf1556d5]{z-index:10}.z-20[data-v-bf1556d5]{z-index:20}@media (min-width:640px){.sm\:text-4xl[data-v-bf1556d5]{font-size:2.25rem;line-height:2.5rem}.sm\:text-xl[data-v-bf1556d5]{font-size:1.25rem;line-height:1.75rem}.sm\:text-10xl[data-v-bf1556d5]{font-size:10rem;line-height:1}.sm\:px-0[data-v-bf1556d5]{padding-left:0;padding-right:0}.sm\:py-3[data-v-bf1556d5]{padding-bottom:.75rem;padding-top:.75rem}.sm\:px-6[data-v-bf1556d5]{padding-left:1.5rem;padding-right:1.5rem}}@media (prefers-color-scheme:dark){.dark\:bg-black[data-v-bf1556d5]{--tw-bg-opacity:1;background-color:rgba(0,0,0,var(--tw-bg-opacity))}.dark\:text-white[data-v-bf1556d5]{--tw-text-opacity:1;color:rgba(255,255,255,var(--tw-text-opacity))}}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{aY as i,bn as a,o as r,e as n,b as e,t as s,ay as l,az as d}from"./entry.f3de3eb8.js";const c=t=>(l("data-v-583914b6"),t=t(),d(),t),p={class:"font-sans antialiased bg-white dark:bg-black text-black dark:text-white grid min-h-screen place-content-center overflow-hidden"},h=c(()=>e("div",{class:"fixed -bottom-1/2 left-0 right-0 h-1/2 spotlight"},null,-1)),f={class:"max-w-520px text-center"},g=["textContent"],b=["textContent"],m={__name:"error-500",props:{appName:{type:String,default:"Nuxt"},version:{type:String,default:""},statusCode:{type:Number,default:500},statusMessage:{type:String,default:"Server error"},description:{type:String,default:"This page is temporarily unavailable."}},setup(t){const o=t;return a({title:`${o.statusCode} - ${o.statusMessage} | ${o.appName}`,script:[],style:[{children:'*,:before,:after{-webkit-box-sizing:border-box;box-sizing:border-box;border-width:0;border-style:solid;border-color:#e0e0e0}*{--tw-ring-inset:var(--tw-empty, );--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(14, 165, 233, .5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000}:root{-moz-tab-size:4;-o-tab-size:4;tab-size:4}body{margin:0;font-family:inherit;line-height:inherit}html{-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";line-height:1.5}h1,p{margin:0}h1{font-size:inherit;font-weight:inherit}'}]}),(x,u)=>(r(),n("div",p,[h,e("div",f,[e("h1",{class:"text-8xl sm:text-10xl font-medium mb-8",textContent:s(t.statusCode)},null,8,g),e("p",{class:"text-xl px-8 sm:px-0 sm:text-4xl font-light mb-16 leading-tight",textContent:s(t.description)},null,8,b)])]))}},w=i(m,[["__scopeId","data-v-583914b6"]]);export{w as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.spotlight[data-v-583914b6]{background:linear-gradient(45deg,#00dc82,#36e4da 50%,#0047e1);filter:blur(20vh)}.bg-white[data-v-583914b6]{--tw-bg-opacity:1;background-color:rgba(255,255,255,var(--tw-bg-opacity))}.grid[data-v-583914b6]{display:grid}.place-content-center[data-v-583914b6]{place-content:center}.font-sans[data-v-583914b6]{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}.font-medium[data-v-583914b6]{font-weight:500}.font-light[data-v-583914b6]{font-weight:300}.h-1\/2[data-v-583914b6]{height:50%}.text-8xl[data-v-583914b6]{font-size:6rem;line-height:1}.text-xl[data-v-583914b6]{font-size:1.25rem;line-height:1.75rem}.leading-tight[data-v-583914b6]{line-height:1.25}.mb-8[data-v-583914b6]{margin-bottom:2rem}.mb-16[data-v-583914b6]{margin-bottom:4rem}.max-w-520px[data-v-583914b6]{max-width:520px}.min-h-screen[data-v-583914b6]{min-height:100vh}.overflow-hidden[data-v-583914b6]{overflow:hidden}.px-8[data-v-583914b6]{padding-left:2rem;padding-right:2rem}.fixed[data-v-583914b6]{position:fixed}.left-0[data-v-583914b6]{left:0}.right-0[data-v-583914b6]{right:0}.-bottom-1\/2[data-v-583914b6]{bottom:-50%}.text-center[data-v-583914b6]{text-align:center}.text-black[data-v-583914b6]{--tw-text-opacity:1;color:rgba(0,0,0,var(--tw-text-opacity))}.antialiased[data-v-583914b6]{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}@media (min-width:640px){.sm\:text-4xl[data-v-583914b6]{font-size:2.25rem;line-height:2.5rem}.sm\:text-10xl[data-v-583914b6]{font-size:10rem;line-height:1}.sm\:px-0[data-v-583914b6]{padding-left:0;padding-right:0}}@media (prefers-color-scheme:dark){.dark\:bg-black[data-v-583914b6]{--tw-bg-opacity:1;background-color:rgba(0,0,0,var(--tw-bg-opacity))}.dark\:text-white[data-v-583914b6]{--tw-text-opacity:1;color:rgba(255,255,255,var(--tw-text-opacity))}}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{o as m,c as E,n as f,g,u as s,d as n,_ as a}from"./entry.f3de3eb8.js";const k={__name:"nuxt-error-page",props:{error:Object},setup(c){const u=c,{error:t}=u;(t.stack||"").split(`
|
|
2
|
-
`).splice(1).map(e=>({text:e.replace("webpack:/","").replace(".vue",".js").trim(),internal:e.includes("node_modules")&&!e.includes(".cache")||e.includes("internal")||e.includes("new Promise")})).map(e=>`<span class="stack${e.internal?" internal":""}">${e.text}</span>`).join(`
|
|
3
|
-
`);const r=Number(t.statusCode||500),o=r===404,i=t.statusMessage??(o?"Page Not Found":"Internal Server Error"),p=t.message||t.toString(),_=void 0,d=o?n(()=>a(()=>import("./error-404.09e25f4a.js"),["./error-404.09e25f4a.js","./entry.f3de3eb8.js","./entry.ea777320.css","./error-404.2618a69f.css"],import.meta.url).then(e=>e.default||e)):n(()=>a(()=>import("./error-500.0bde1cc6.js"),["./error-500.0bde1cc6.js","./entry.f3de3eb8.js","./entry.ea777320.css","./error-500.12a2683b.css"],import.meta.url).then(e=>e.default||e));return(e,l)=>(m(),E(s(d),f(g({statusCode:s(r),statusMessage:s(i),description:s(p),stack:s(_)})),null,16))}},h=k;export{h as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{aY as o,e as t,Z as s,o as r}from"./entry.f3de3eb8.js";const a={},c={"h-full":"","of-auto":""};function n(e,l){return r(),t("div",c,[s(e.$slots,"default")])}const _=o(a,[["render",n]]);export{_ as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{_ as B}from"./DurationDisplay.vue.a48b74dd.js";import{a as S,r as C,l as v,o as i,e as m,b as o,j as c,p,u as n,F as T,m as F,t as _,S as D,f as h,ao as j,aa as I,c as H,w as g,q as N}from"./entry.f3de3eb8.js";import{_ as V}from"./NSectionBlock.0eaaa956.js";import{_ as L}from"./HelpFab.vue.49173e4b.js";import"./NIconTitle.vue.4e3340eb.js";import"./NIconButton.vue.e211c1b6.js";const z={"w-full":""},A={border:"b base"},E={"select-none":"","ws-nowrap":"",p1:"","text-right":"","font-bold":""},O={colspan:"2",p1:"",pl5:"","text-left":"","font-bold":""},P={"ws-nowrap":"",p1:"","text-center":"","font-bold":""},q={"ws-nowrap":"",p1:"","text-center":"","font-bold":""},M={"ws-nowrap":"",p1:"","text-right":"","font-bold":""},R={"w-0":"","ws-nowrap":"","text-center":"","text-sm":"",op25:""},G={"text-sm":""},J={"ws-nowrap":""},K={"text-sm":""},Q={"w-0":"","text-center":"","text-sm":""},U={"w-0":"","text-center":"","text-sm":""},W={"w-0":"","text-right":"","text-sm":""},X=S({__name:"HooksTable",props:{hooks:{}},setup(k){const l=k,a=C("duration"),r=C("asc"),b={duration:(e,t)=>(t.duration??1/0)-(e.duration??1/0),name:(e,t)=>e.name.localeCompare(t.name),listener:(e,t)=>t.listeners-e.listeners,start:(e,t)=>t.start-e.start,executions:(e,t)=>t.executions.length-e.executions.length},$=v(()=>l.hooks.map(e=>e.start).sort((e,t)=>e-t)),x=v(()=>{const e=b[a.value],t=[...l.hooks].sort(e);return r.value==="desc"&&t.reverse(),t});function d(e){const t=e.split(":");return t.length===1?"":`${t[0]}:`}function f(e){const t=e.split(":");return t.length===1?e:t.slice(1).join(":")}function w(e){let t=0;for(let s=0;s<e.length;s++)t=e.charCodeAt(s)+((t<<5)-t);return`hsl(${t%360}, 65%, 50%)`}function u(e){a.value===e?r.value=r.value==="asc"?"desc":"asc":a.value=e}return(e,t)=>{const y=B;return i(),m("table",z,[o("thead",A,[o("tr",null,[o("th",E,[o("button",{onClick:t[0]||(t[0]=s=>u("start"))},[c(" Order "),o("div",{"ml--1":"","text-xs":"",class:p([n(a)==="start"?"op50":"op0",n(r)==="asc"?"carbon-arrow-down":"carbon-arrow-up"])},null,2)])]),o("th",O,[o("button",{onClick:t[1]||(t[1]=s=>u("name"))},[c(" Hook name "),o("div",{"ml--1":"","text-xs":"",class:p([n(a)==="name"?"op50":"op0",n(r)==="asc"?"carbon-arrow-down":"carbon-arrow-up"])},null,2)])]),o("th",P,[o("button",{onClick:t[2]||(t[2]=s=>u("listener"))},[c(" Listeners "),o("div",{"ml--1":"","text-xs":"",class:p([n(a)==="listener"?"op50":"op0",n(r)==="asc"?"carbon-arrow-down":"carbon-arrow-up"])},null,2)])]),o("th",q,[o("button",{onClick:t[3]||(t[3]=s=>u("executions"))},[c(" Executions "),o("div",{"ml--1":"","text-xs":"",class:p([n(a)==="executions"?"op50":"op0",n(r)==="asc"?"carbon-arrow-down":"carbon-arrow-up"])},null,2)])]),o("th",M,[o("button",{onClick:t[4]||(t[4]=s=>u("duration"))},[c(" Duration "),o("div",{"ml--1":"","text-xs":"",class:p([n(a)==="duration"?"op50":"op0",n(r)==="asc"?"carbon-arrow-down":"carbon-arrow-up"])},null,2)])])])]),o("tbody",null,[(i(!0),m(T,null,F(n(x),s=>(i(),m("tr",{key:s.name,border:"b dashed transparent hover:base"},[o("td",R,_(n($).indexOf(s.start)),1),o("td",{"w-0":"","ws-nowrap":"","text-right":"",style:D({color:w(d(s.name))})},[o("code",G,_(d(s.name)),1)],4),o("td",J,[o("code",K,_(f(s.name)),1)]),o("td",Q,_(s.listeners),1),o("td",U,_(s.executions.length+1),1),o("td",W,[h(y,{duration:s.duration},null,8,["duration"])])]))),128))])])}}}),Y={class:"markdown-body"},Z=o("h1",null,"Hooks",-1),tt=o("p",null,[c("Hooks are an advanced API mainly for module authors or advanced use cases. The hooking system to expand almost every aspect of Nuxt. It’s powered by "),o("a",{href:"https://github.com/unjs/hookable",target:"_blank",rel:"noopener"},"unjs/hookable"),c(".")],-1),ot=o("p",null,[o("a",{href:"https://nuxt.com/docs/guide/going-further/hooks",target:"_blank",rel:"noopener"},"Learn more about hooks"),c(".")],-1),et=[Z,tt,ot],nt={__name:"hooks",setup(k,{expose:l}){return l({frontmatter:{}}),(r,b)=>(i(),m("div",Y,et))}},dt=S({__name:"hooks",setup(k){const l=j(),a=I(),r=v(()=>a.value?.getClientHooksMetrics());return(b,$)=>{const x=X,d=V,f=nt,w=L;return i(),m(T,null,[o("div",null,[n(r)?.length?(i(),H(d,{key:0,icon:"carbon-ibm-cloud-direct-link-1-dedicated-hosting",text:"Client Hooks",description:`Total hooks: ${n(r).length}`,padding:"pl4 pr6"},{default:g(()=>[h(x,{hooks:n(r)},null,8,["hooks"])]),_:1},8,["description"])):N("",!0),n(l)?.length?(i(),H(d,{key:1,icon:"carbon-ibm-cloud-direct-link-2-dedicated",text:"Server Hooks",description:`Total hooks: ${n(l)?.length}`,padding:"pl4 pr6"},{default:g(()=>[h(x,{hooks:n(l)},null,8,["hooks"])]),_:1},8,["description"])):N("",!0)]),h(w,null,{default:g(()=>[h(f)]),_:1})],64)}}});export{dt as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as r,e as c,b as e,f as o,w as _,i as l,h as u,j as t,o as p,k as d}from"./entry.f3de3eb8.js";import{_ as m}from"./Badge.2cc4687e.js";const x={flex:"~ col gap4",mxa:"","h-screen":"","w-160":"","items-center":"","justify-center":"","text-center":""},h={flex:"~","items-center":"","justify-center":""},f=e("p",{my2:"","text-xl":"","font-bold":""}," 👋 Welcome trying the preview of Nuxt DevTools! ",-1),v=e("p",{"text-lg":""},[e("b",{"font-bold":""},"Nuxt DevTools"),t(" is a set of visual tools that help you to know your app/site better, and enhance your development experience with Nuxt. ")],-1),g=e("p",{"text-lg":""},[t(" Be aware that "),e("span",{rounded:"","bg-orange:10":"",px2:"","py0.5":"","font-bold":"","text-orange":""},"Nuxt DevTools is still in early preview"),t(", features might be incomplete and unstable. "),e("a",{href:"https://github.com/nuxt/devtools",target:"_blank","text-primary":"","hover-underline":""},"Create an issue or discussion"),t(" if you find any bugs or have any suggestions. Thank you and have fun! ")],-1),y=e("span",null,"Get Started",-1),C=r({__name:"index",setup(b){function n(){l.value=!1}return(w,N)=>{const s=d,a=m,i=u;return p(),c("div",x,[e("div",h,[o(s,{"h-16":""}),o(a,{"mr--15":"","mt--5":"","bg-green-400:10":"","text-green-400":"",title:"preview",textContent:"preview"})]),f,v,g,o(i,{to:"/modules/overview","mt-4":"",n:"xl primary",onClick:n},{default:_(()=>[y]),_:1})])}}});export{C as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as e,e as a,o as n}from"./entry.f3de3eb8.js";const s=e({__name:"middleware",setup(o){return(t,r)=>(n(),a("div",null," WIP "))}});export{s as default};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{_ as Re}from"./FilepathItem.vue.df9b46ef.js";import{a as R,l as D,o as h,c as M,w as x,b as d,Z as A,u as p,j as I,t as N,e as $,p as U,q as C,f as b,F as P,m as W,I as le,a6 as ke,ar as je,r as Z,ad as Fe,h as ae,as as He,U as Ie,a8 as Ue,a9 as qe,at as We,au as Ke,av as Ye,y as he,z as _e,aw as ze,ax as Se,ay as Je,az as Xe,ai as Ce,aA as Ge,aB as Ze,aC as Qe,a7 as et,aD as tt,v as nt,ab as ve,af as it,aE as ot,S as st,X as rt,H as lt,J as at,a3 as ut,aF as ct,K as dt,E as ft,ae as ye}from"./entry.f3de3eb8.js";import{_ as pt}from"./NpmVersionCheck.vue.029b0cde.js";import{u as Me}from"./editor.24e006dd.js";import{_ as mt}from"./NSectionBlock.0eaaa956.js";import{_ as Te}from"./NIconButton.vue.e211c1b6.js";import{_ as ht}from"./NIconTitle.vue.4e3340eb.js";import{_ as _t}from"./Badge.2cc4687e.js";import{_ as Oe}from"./NCodeBlock.vue.de2cd5a6.js";import{_ as vt}from"./NLink.vue.53529111.js";import{_ as yt}from"./NTip.vue.c99855ad.js";import{_ as gt}from"./HelpFab.vue.49173e4b.js";import"./NCheckbox.vue.df53e265.js";import"./client.aa60153e.js";const bt={flex:"~ col gap2","flex-auto":"","of-hidden":"",px1:""},xt={"gap-1t":"",flex:"","items-center":"","text-ellipsis":"","ws-nowrap":"","text-lg":""},$t={key:2},wt=d("div",{"flex-auto":""},null,-1),kt={key:1,flex:"~ gap-2",title:"Documentation"},It=d("span",{"i-carbon-link":"","text-lg":"",op50:""},null,-1),zt={key:2,flex:"~ gap-2"},St=d("span",{"i-carbon-logo-github":"","text-lg":"",op50:""},null,-1),Ct={flex:"~ col","items-end":""},Mt={key:0,"h-20":"","w-20":"",flex:"","flex-none":"",rounded:"","bg-gray:3":"",p4:""},Tt=["src","alt"],Ot=d("div",{"i-carbon-cube":"",ma:"","text-4xl":"",op30:""},null,-1),Nt={key:1,flex:"~",mt2:"","flex-auto":"","items-end":"","justify-end":""},Vt=["src"],Lt=d("div",{"flex-auto":""},null,-1),Et={flex:"","justify-end":""},Dt="https://api.nuxtjs.org/api/ipx/s_80,f_webp/gh/nuxt/modules/main/icons/",At="https://api.nuxtjs.org/api/ipx/s_44,f_webp/gh_avatar/",Bt="https://github.com/",Pt="https://www.npmjs.com/package/",ue=R({__name:"ModuleItemBase",props:{mod:{},info:{},compact:{type:Boolean},maintainers:{type:Boolean,default:!0}},setup(t){const e=t,n=D(()=>({...e.mod?.meta,...e.mod,...e.info})),i=Me();return(o,s)=>{const l=le,a=ke;return h(),M(a,{p4:"",flex:"~ gap2"},{default:x(()=>[d("div",bt,[A(o.$slots,"main",{},()=>[d("div",xt,[o.mod.isPackageModule?(h(),M(l,{key:0,to:Pt+(p(n).npm||p(n).name),target:"_blank",hover:"underline text-primary"},{default:x(()=>[I(N(p(n).name),1)]),_:1},8,["to"])):o.mod.entryPath?(h(),$("button",{key:1,role:"button",hover:"underline text-primary",onClick:s[0]||(s[0]=r=>p(i)(o.mod.entryPath))},N(p(n).name),1)):(h(),$("span",$t,N(p(n).name),1)),A(o.$slots,"badge")]),p(n).description?(h(),$("div",{key:0,class:U(o.compact?"ws-nowrap of-hidden truncate":"line-clamp-2"),"mt--1":"","text-sm":"",op50:""},N(p(n).description),3)):C("",!0),wt,p(n).website?(h(),$("div",kt,[It,b(l,{to:p(n).website,target:"_blank","of-hidden":"",truncate:"","ws-nowrap":"","text-sm":"",op50:"",hover:"op100 underline text-primary"},{default:x(()=>[I(N(p(n).website.replace(/^https?:\/\//,"")),1)]),_:1},8,["to"])])):C("",!0),p(n).github?(h(),$("div",zt,[St,b(l,{to:p(n).github,target:"_blank","of-hidden":"",truncate:"","ws-nowrap":"","text-sm":"",op50:"",hover:"op100 underline text-primary"},{default:x(()=>[I(N(p(n).github.replace(/^https?:\/\/github.com\//,"")),1)]),_:1},8,["to"])])):C("",!0)]),A(o.$slots,"items")]),d("div",Ct,[p(n).icon||o.mod.isPackageModule?(h(),$("div",Mt,[p(n).icon?(h(),$("img",{key:0,src:Dt+p(n).icon,alt:o.mod.name,ma:""},null,8,Tt)):C("",!0),Ot])):C("",!0),p(n).maintainers?.length&&o.maintainers?(h(),$("div",Nt,[(h(!0),$(P,null,W(p(n).maintainers,r=>(h(),M(l,{key:r.name,target:"_blank",to:Bt+r.github,title:r.name},{default:x(()=>[d("img",{src:At+r.github,"h-6":"","w-6":"","rounded-full":""},null,8,Vt)]),_:2},1032,["to","title"]))),128))])):C("",!0),o.$slots.actions?(h(),$(P,{key:2},[Lt,d("div",Et,[A(o.$slots,"actions")])],64)):C("",!0)])]),_:3})}}}),Rt={key:0,flex:"~ gap-2",title:"Open on filesystem"},jt=d("span",{"i-carbon-folder-move-to":"","text-lg":"",op50:""},null,-1),Ft=d("span",{"i-carbon-circle-dash":"","animate-spin":"","text-lg":"",op50:""},null,-1),Ht=d("code",{"text-sm":"",op50:""},"Upgrading...",-1),Ut={key:1,"mx--2":""},qt=["onClick"],Wt=d("span",{"i-carbon-intent-request-active":"","text-lg":"","text-primary":""},null,-1),Kt=d("code",{"text-xs":""},"Update installed, click to restart",-1),Yt=[Wt,Kt],Jt={key:2,"mx--2":""},Xt=["onClick"],Gt=d("span",{"i-carbon-intent-request-upgrade":"","text-lg":"",op50:""},null,-1),Zt={op50:""},Qt=d("div",{"i-carbon-arrow-right":"",op50:""},null,-1),en={"text-green":""},tn={key:3,flex:"~ gap-2","items-center":"",title:"NPM"},nn=d("span",{"i-carbon-cube":"","text-lg":"",op50:""},null,-1),on={"text-sm":"",op50:""},sn=R({__name:"ModuleItem",props:{mod:{}},setup(t){const e=t,n=D(()=>e.mod.info),i=D(()=>({...e.mod?.meta,...e.mod,...n.value}));return(o,s)=>{const l=Re,a=le,r=pt,u=ue;return h(),M(u,{mod:o.mod,info:p(n)},{items:x(()=>[o.mod.entryPath?(h(),$("div",Rt,[jt,b(l,{filepath:o.mod.entryPath,"text-sm":"",op50:"",hover:"text-primary op100"},null,8,["filepath"])])):C("",!0),p(i).npm?(h(),M(r,{key:p(i).npm,"package-name":p(i).npm,options:{dev:!0}},{default:x(({info:f,update:_,state:v,id:w,restart:k})=>[v==="running"?(h(),M(a,{key:0,flex:"~ gap-2","animate-pulse":"","items-center":"",to:w?`/modules/terminals?id=${encodeURIComponent(w)}`:void 0},{default:x(()=>[Ft,Ht]),_:2},1032,["to"])):v==="updated"?(h(),$("div",Ut,[d("button",{flex:"~ gap-2",hover:"bg-primary/20","items-center":"",rounded:"","bg-primary:10":"",px2:"","text-sm":"","text-primary":"",onClick:k},Yt,8,qt)])):f?.needsUpdate?(h(),$("div",Jt,[d("button",{flex:"~ gap-2",title:"Click to upgrade","items-center":"",rounded:"",px2:"","text-sm":"",hover:"bg-active",onClick:m=>_()},[Gt,d("code",Zt,"v"+N(f.current),1),Qt,d("code",en,"v"+N(f.latest),1)],8,Xt)])):f?.latest?(h(),$("div",tn,[nn,d("code",on,"v"+N(f.current),1)])):C("",!0)]),_:1},8,["package-name"])):C("",!0)]),_:1},8,["mod","info"])}}}),rn=R({__name:"NDropdown",props:{modelValue:{type:Boolean}},setup(t,{emit:e}){const i=je(t,"modelValue",e,{passive:!0}),o=Z();return Fe(o,()=>{i.value=!1}),(s,l)=>{const a=ae;return h(),$("div",{ref_key:"el",ref:o,class:"relative"},[A(s.$slots,"trigger",{enabled:p(i),click:()=>i.value=!p(i)},()=>[b(a,{onClick:l[0]||(l[0]=r=>i.value=!p(i))},{default:x(()=>[I(" Dropdown ")]),_:1})]),d("div",{class:U(["absolute z-10 border n-border-base rounded shadow n-transition n-bg-base",[p(i)?"op-100":"op0 pointer-events-none -translate-y-1"]])},[A(s.$slots,"default")],2)],512)}}}),Ne=["pages","meta","components","imports","nuxt-config-schema","@nuxt/devtools","@nuxt/telemetry"];function Ve(){return Ke("getModulesList",async()=>(await $fetch("https://cdn.jsdelivr.net/npm/@nuxt/modules@latest/modules.json")).filter(e=>!Ne.includes(e.npm)&&e.compatibility.nuxt.includes("^3")))}function Le(){return He("installed-modules",()=>{const t=Ie(),e=Ve();return D(()=>(t.value?._installedModules||[]).map(n=>{if(!n.entryPath)return;const i=n.entryPath&&Ue(n.entryPath),o=n.meta?.name?n.meta?.name:n.entryPath?i?qe(n.entryPath):t.value?.rootDir?We(n.entryPath,t.value?.rootDir).path:void 0:void 0,s=t.value?.modules?.includes(o),l=e.value?.find(a=>a.npm===o)||e.value?.find(a=>a.name===o);return{name:o,isPackageModule:i,isUninstallable:s,info:l,...n}}).filter(n=>n&&(!n.name||!Ne.includes(n.name))))})}const ln=R({__name:"ModuleItemInstall",props:{item:{}},emits:["start"],setup(t,{emit:e}){const n=t,i=Le(),o=D(()=>i.value.find(u=>u.name===n.item.npm)),s=D(()=>o.value&&o.value.isPackageModule),l=D(()=>o.value&&o.value.isPackageModule&&o.value.isUninstallable);async function a(u,f){const _=f==="install"?he.installNuxtModule:he.uninstallNuxtModule,v=await _(await _e(),u.npm,!0);v.commands&&await ze.start(u,v,f)&&(Se.value.push({name:u.npm,info:u,processId:v.processId}),e("start"),await _(await _e(),u.npm,!1))}const r={};return(u,f)=>{const _=_t,v=Te,w=ae,k=rn,m=ue;return h(),M(m,{mod:r,role:p(s)?"":"button",info:u.item,mb2:"","h-full":"",class:U(p(s)?"border-dashed op75":"hover:bg-active!"),compact:!0,onClick:f[1]||(f[1]=c=>p(s)?null:a(u.item,"install"))},Ye({_:2},[p(s)?{name:"badge",fn:x(()=>[b(_,{"bg-green-400:10":"","text-green-400":""},{default:x(()=>[I(" Installed ")]),_:1}),p(l)?(h(),M(k,{key:0,n:"sm green"},{trigger:x(({click:c})=>[b(v,{icon:"carbon-overflow-menu-vertical",onClick:V=>c()},null,8,["onClick"])]),default:x(()=>[b(w,{icon:"carbon-trash-can",n:"red",onClick:f[0]||(f[0]=c=>a(u.item,"uninstall"))},{default:x(()=>[I(" Uninstall ")]),_:1})]),_:1})):C("",!0)]),key:"0"}:void 0]),1032,["role","info","class"])}}});function an(){var t=window.navigator.userAgent,e=t.indexOf("MSIE ");if(e>0)return parseInt(t.substring(e+5,t.indexOf(".",e)),10);var n=t.indexOf("Trident/");if(n>0){var i=t.indexOf("rv:");return parseInt(t.substring(i+3,t.indexOf(".",i)),10)}var o=t.indexOf("Edge/");return o>0?parseInt(t.substring(o+5,t.indexOf(".",o)),10):-1}let J;function te(){te.init||(te.init=!0,J=an()!==-1)}var Q={name:"ResizeObserver",props:{emitOnMount:{type:Boolean,default:!1},ignoreWidth:{type:Boolean,default:!1},ignoreHeight:{type:Boolean,default:!1}},emits:["notify"],mounted(){te(),Ce(()=>{this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitOnMount&&this.emitSize()});const t=document.createElement("object");this._resizeObject=t,t.setAttribute("aria-hidden","true"),t.setAttribute("tabindex",-1),t.onload=this.addResizeHandlers,t.type="text/html",J&&this.$el.appendChild(t),t.data="about:blank",J||this.$el.appendChild(t)},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&&(!J&&this._resizeObject.contentDocument&&this._resizeObject.contentDocument.defaultView.removeEventListener("resize",this.compareAndNotify),this.$el.removeChild(this._resizeObject),this._resizeObject.onload=null,this._resizeObject=null)}}};const un=Ge();Je("data-v-b329ee4c");const cn={class:"resize-observer",tabindex:"-1"};Xe();const dn=un((t,e,n,i,o,s)=>(h(),M("div",cn)));Q.render=dn;Q.__scopeId="data-v-b329ee4c";Q.__file="src/components/ResizeObserver.vue";function X(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?X=function(e){return typeof e}:X=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},X(t)}function fn(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ge(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function pn(t,e,n){return e&&ge(t.prototype,e),n&&ge(t,n),t}function be(t){return mn(t)||hn(t)||_n(t)||vn()}function mn(t){if(Array.isArray(t))return ne(t)}function hn(t){if(typeof Symbol<"u"&&Symbol.iterator in Object(t))return Array.from(t)}function _n(t,e){if(t){if(typeof t=="string")return ne(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ne(t,e)}}function ne(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}function vn(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
2
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function yn(t){var e;return typeof t=="function"?e={callback:t}:e=t,e}function gn(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i,o,s,l=function(r){for(var u=arguments.length,f=new Array(u>1?u-1:0),_=1;_<u;_++)f[_-1]=arguments[_];if(s=f,!(i&&r===o)){var v=n.leading;typeof v=="function"&&(v=v(r,o)),(!i||r!==o)&&v&&t.apply(void 0,[r].concat(be(s))),o=r,clearTimeout(i),i=setTimeout(function(){t.apply(void 0,[r].concat(be(s))),i=0},e)}};return l._clear=function(){clearTimeout(i),i=null},l}function Ee(t,e){if(t===e)return!0;if(X(t)==="object"){for(var n in t)if(!Ee(t[n],e[n]))return!1;return!0}return!1}var bn=function(){function t(e,n,i){fn(this,t),this.el=e,this.observer=null,this.frozen=!1,this.createObserver(n,i)}return pn(t,[{key:"createObserver",value:function(n,i){var o=this;if(this.observer&&this.destroyObserver(),!this.frozen){if(this.options=yn(n),this.callback=function(a,r){o.options.callback(a,r),a&&o.options.once&&(o.frozen=!0,o.destroyObserver())},this.callback&&this.options.throttle){var s=this.options.throttleOptions||{},l=s.leading;this.callback=gn(this.callback,this.options.throttle,{leading:function(r){return l==="both"||l==="visible"&&r||l==="hidden"&&!r}})}this.oldResult=void 0,this.observer=new IntersectionObserver(function(a){var r=a[0];if(a.length>1){var u=a.find(function(_){return _.isIntersecting});u&&(r=u)}if(o.callback){var f=r.isIntersecting&&r.intersectionRatio>=o.threshold;if(f===o.oldResult)return;o.oldResult=f,o.callback(f,r)}},this.options.intersection),Ce(function(){o.observer&&o.observer.observe(o.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}}]),t}();function De(t,e,n){var i=e.value;if(i)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 o=new bn(t,i,n);t._vue_visibilityState=o}}function xn(t,e,n){var i=e.value,o=e.oldValue;if(!Ee(i,o)){var s=t._vue_visibilityState;if(!i){Ae(t);return}s?s.createObserver(i,n):De(t,{value:i},n)}}function Ae(t){var e=t._vue_visibilityState;e&&(e.destroyObserver(),delete t._vue_visibilityState)}var $n={beforeMount:De,updated:xn,unmounted:Ae},wn={itemsLimit:1e3},kn=/(auto|scroll)/;function Be(t,e){return t.parentNode===null?e:Be(t.parentNode,e.concat([t]))}var ee=function(e,n){return getComputedStyle(e,null).getPropertyValue(n)},In=function(e){return ee(e,"overflow")+ee(e,"overflow-y")+ee(e,"overflow-x")},zn=function(e){return kn.test(In(e))};function xe(t){if(t instanceof HTMLElement||t instanceof SVGElement){for(var e=Be(t.parentNode,[]),n=0;n<e.length;n+=1)if(zn(e[n]))return e[n];return document.scrollingElement||document.documentElement}}function ie(t){"@babel/helpers - typeof";return ie=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ie(t)}var Sn={items:{type:Array,required:!0},keyField:{type:String,default:"id"},direction:{type:String,default:"vertical",validator:function(e){return["vertical","horizontal"].includes(e)}},listTag:{type:String,default:"div"},itemTag:{type:String,default:"div"}};function Cn(){return this.items.length&&ie(this.items[0])!=="object"}var oe=!1;if(typeof window<"u"){oe=!1;try{var Mn=Object.defineProperty({},"passive",{get:function(){oe=!0}});window.addEventListener("test",null,Mn)}catch{}}let Tn=0;var ce={name:"RecycleScroller",components:{ResizeObserver:Q},directives:{ObserveVisibility:$n},props:{...Sn,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 t={"-1":{accumulator:0}},e=this.items,n=this.sizeField,i=this.minItemSize;let o=1e4,s=0,l;for(let a=0,r=e.length;a<r;a++)l=e[a][n]||i,l<o&&(o=l),s+=l,t[a]={accumulator:s,size:l};return this.$_computedMinItemSize=o,t}return[]},simpleArray:Cn,itemIndexByKey(){const{keyField:t,items:e}=this,n={};for(let i=0,o=e.length;i<o;i++)n[e[i][t]]=i;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 t=this.$_lastUpdateScrollPosition;typeof t=="number"&&this.$nextTick(()=>{this.scrollToPosition(t)})},beforeUnmount(){this.removeListeners()},methods:{addView(t,e,n,i,o){const s=Ze({id:Tn++,index:e,used:!0,key:i,type:o}),l=Qe({item:n,position:0,nr:s});return t.push(l),l},unuseView(t,e=!1){const n=this.$_unusedViews,i=t.nr.type;let o=n.get(i);o||(o=[],n.set(i,o)),o.push(t),e||(t.nr.used=!1,t.position=-9999)},handleResize(){this.$emit("resize"),this.ready&&this.updateVisibleItems(!1)},handleScroll(t){if(!this.$_scrollDirty){if(this.$_scrollDirty=!0,this.$_updateTimeout)return;const e=()=>requestAnimationFrame(()=>{this.$_scrollDirty=!1;const{continuous:n}=this.updateVisibleItems(!1,!0);n||(clearTimeout(this.$_refreshTimout),this.$_refreshTimout=setTimeout(this.handleScroll,this.updateInterval+100))});e(),this.updateInterval&&(this.$_updateTimeout=setTimeout(()=>{this.$_updateTimeout=0,this.$_scrollDirty&&e()},this.updateInterval))}},handleVisibilityChange(t,e){this.ready&&(t||e.boundingClientRect.width!==0||e.boundingClientRect.height!==0?(this.$emit("visible"),requestAnimationFrame(()=>{this.updateVisibleItems(!1)})):this.$emit("hidden"))},updateVisibleItems(t,e=!1){const n=this.itemSize,i=this.gridItems||1,o=this.itemSecondarySize||n,s=this.$_computedMinItemSize,l=this.typeField,a=this.simpleArray?null:this.keyField,r=this.items,u=r.length,f=this.sizes,_=this.$_views,v=this.$_unusedViews,w=this.pool,k=this.itemIndexByKey;let m,c,V,z,O;if(!u)m=c=z=O=V=0;else if(this.$_prerender)m=z=0,c=O=Math.min(this.prerender,r.length),V=null;else{const g=this.getScroll();if(e){let T=g.start-this.$_lastUpdateScrollPosition;if(T<0&&(T=-T),n===null&&T<s||T<n)return{continuous:!0}}this.$_lastUpdateScrollPosition=g.start;const L=this.buffer;g.start-=L,g.end+=L;let S=0;if(this.$refs.before&&(S=this.$refs.before.scrollHeight,g.start-=S),this.$refs.after){const T=this.$refs.after.scrollHeight;g.end+=T}if(n===null){let T,q=0,pe=u-1,E=~~(u/2),me;do me=E,T=f[E].accumulator,T<g.start?q=E:E<u-1&&f[E+1].accumulator>g.start&&(pe=E),E=~~((q+pe)/2);while(E!==me);for(E<0&&(E=0),m=E,V=f[u-1].accumulator,c=E;c<u&&f[c].accumulator<g.end;c++);for(c===-1?c=r.length-1:(c++,c>u&&(c=u)),z=m;z<u&&S+f[z].accumulator<g.start;z++);for(O=z;O<u&&S+f[O].accumulator<g.end;O++);}else{m=~~(g.start/n*i);const T=m%i;m-=T,c=Math.ceil(g.end/n*i),z=Math.max(0,Math.floor((g.start-S)/n*i)),O=Math.floor((g.end-S)/n*i),m<0&&(m=0),c>u&&(c=u),z<0&&(z=0),O>u&&(O=u),V=Math.ceil(u/i)*n}}c-m>wn.itemsLimit&&this.itemsLimitError(),this.totalSize=V;let y;const F=m<=this.$_endIndex&&c>=this.$_startIndex;if(F)for(let g=0,L=w.length;g<L;g++)y=w[g],y.nr.used&&(t&&(y.nr.index=k[y.item[a]]),(y.nr.index==null||y.nr.index<m||y.nr.index>=c)&&this.unuseView(y));const fe=F?null:new Map;let H,B,Y;for(let g=m;g<c;g++){H=r[g];const L=a?H[a]:H;if(L==null)throw new Error(`Key is ${L} on item (keyField is '${a}')`);if(y=_.get(L),!n&&!f[g].size){y&&this.unuseView(y);continue}B=H[l];let S=v.get(B),T=!1;if(!y)F?S&&S.length?y=S.pop():y=this.addView(w,g,H,L,B):(Y=fe.get(B)||0,(!S||Y>=S.length)&&(y=this.addView(w,g,H,L,B),this.unuseView(y,!0),S=v.get(B)),y=S[Y],fe.set(B,Y+1)),_.delete(y.nr.key),y.nr.used=!0,y.nr.index=g,y.nr.key=L,y.nr.type=B,_.set(L,y),T=!0;else if(!y.nr.used&&(y.nr.used=!0,T=!0,S)){const q=S.indexOf(y);q!==-1&&S.splice(q,1)}y.item=H,T&&(g===r.length-1&&this.$emit("scroll-end"),g===0&&this.$emit("scroll-start")),n===null?(y.position=f[g-1].accumulator,y.offset=0):(y.position=Math.floor(g/i)*n,y.offset=g%i*o)}return this.$_startIndex=m,this.$_endIndex=c,this.emitUpdate&&this.$emit("update",m,c,z,O),clearTimeout(this.$_sortTimer),this.$_sortTimer=setTimeout(this.sortViews,this.updateInterval+300),{continuous:F}},getListenerTarget(){let t=xe(this.$el);return window.document&&(t===window.document.documentElement||t===window.document.body)&&(t=window),t},getScroll(){const{$el:t,direction:e}=this,n=e==="vertical";let i;if(this.pageMode){const o=t.getBoundingClientRect(),s=n?o.height:o.width;let l=-(n?o.top:o.left),a=n?window.innerHeight:window.innerWidth;l<0&&(a+=l,l=0),l+a>s&&(a=s-l),i={start:l,end:l+a}}else n?i={start:t.scrollTop,end:t.scrollTop+t.clientHeight}:i={start:t.scrollLeft,end:t.scrollLeft+t.clientWidth};return i},applyPageMode(){this.pageMode?this.addListeners():this.removeListeners()},addListeners(){this.listenerTarget=this.getListenerTarget(),this.listenerTarget.addEventListener("scroll",this.handleScroll,oe?{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(t){let e;const n=this.gridItems||1;this.itemSize===null?e=t>0?this.sizes[t-1].accumulator:0:e=Math.floor(t/n)*this.itemSize,this.scrollToPosition(e)},scrollToPosition(t){const e=this.direction==="vertical"?{scroll:"scrollTop",start:"top"}:{scroll:"scrollLeft",start:"left"};let n,i,o;if(this.pageMode){const s=xe(this.$el),l=s.tagName==="HTML"?0:s[e.scroll],a=s.getBoundingClientRect(),u=this.$el.getBoundingClientRect()[e.start]-a[e.start];n=s,i=e.scroll,o=t+l+u}else n=this.$el,i=e.scroll,o=t;n[i]=o},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((t,e)=>t.nr.index-e.nr.index)}}};const On={key:0,ref:"before",class:"vue-recycle-scroller__slot"},Nn={key:1,ref:"after",class:"vue-recycle-scroller__slot"};function Vn(t,e,n,i,o,s){const l=et("ResizeObserver"),a=tt("observe-visibility");return nt((h(),$("div",{class:U(["vue-recycle-scroller",{ready:o.ready,"page-mode":n.pageMode,[`direction-${t.direction}`]:!0}]),onScrollPassive:e[0]||(e[0]=(...r)=>s.handleScroll&&s.handleScroll(...r))},[t.$slots.before?(h(),$("div",On,[A(t.$slots,"before")],512)):C("v-if",!0),(h(),M(ve(n.listTag),{ref:"wrapper",style:st({[t.direction==="vertical"?"minHeight":"minWidth"]:o.totalSize+"px"}),class:U(["vue-recycle-scroller__item-wrapper",n.listClass])},{default:x(()=>[(h(!0),$(P,null,W(o.pool,r=>(h(),M(ve(n.itemTag),it({key:r.nr.id,style:o.ready?{transform:`translate${t.direction==="vertical"?"Y":"X"}(${r.position}px) translate${t.direction==="vertical"?"X":"Y"}(${r.offset}px)`,width:n.gridItems?`${t.direction==="vertical"&&n.itemSecondarySize||n.itemSize}px`:void 0,height:n.gridItems?`${t.direction==="horizontal"&&n.itemSecondarySize||n.itemSize}px`:void 0}:null,class:["vue-recycle-scroller__item-view",[n.itemClass,{hover:!n.skipHover&&o.hoverKey===r.nr.key}]]},ot(n.skipHover?{}:{mouseenter:()=>{o.hoverKey=r.nr.key},mouseleave:()=>{o.hoverKey=null}})),{default:x(()=>[A(t.$slots,"default",{item:r.item,index:r.nr.index,active:r.nr.used})]),_:2},1040,["style","class"]))),128)),A(t.$slots,"empty")]),_:3},8,["style","class"])),t.$slots.after?(h(),$("div",Nn,[A(t.$slots,"after")],512)):C("v-if",!0),b(l,{onNotify:s.handleResize},null,8,["onNotify"])],34)),[[a,s.handleVisibilityChange]])}ce.render=Vn;ce.__file="src/components/RecycleScroller.vue";const Ln={"h-full":"",flex:"~ col gap-4"},En={"flex-auto":"","of-auto":"",flex:"~ col gap-2",pl6:"",pr4:""},Dn=R({__name:"ModuleInstallList",emits:["close"],setup(t,{emit:e}){const n=Ve(),i=Z(""),o=D(()=>new rt(n.value||[],{keys:["name","description","npm","category"]})),s=D(()=>i.value?o.value.search(i.value).map(l=>l.item):n.value);return(l,a)=>{const r=ht,u=at,f=ln;return h(),$("div",Ln,[b(r,{mx6:"",mt6:"","text-xl":"",op75:"",icon:"i-carbon-intent-request-create",text:"Install Module"}),b(u,{modelValue:p(i),"onUpdate:modelValue":a[0]||(a[0]=_=>lt(i)?i.value=_:null),placeholder:"Search...",icon:"carbon-search",n:"primary",mx6:"","px-5":"","py-2":""},null,8,["modelValue"]),d("div",En,[b(p(ce),{class:"scroller",items:p(s),"item-size":160,"key-field":"name"},{default:x(({item:_})=>[b(f,{item:_,onStart:a[1]||(a[1]=v=>e("close"))},null,8,["item"])]),_:1},8,["items"])])])}}});function j(){}j.prototype={diff:function(e,n){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=i.callback;typeof i=="function"&&(o=i,i={}),this.options=i;var s=this;function l(m){return o?(setTimeout(function(){o(void 0,m)},0),!0):m}e=this.castInput(e),n=this.castInput(n),e=this.removeEmpty(this.tokenize(e)),n=this.removeEmpty(this.tokenize(n));var a=n.length,r=e.length,u=1,f=a+r;i.maxEditLength&&(f=Math.min(f,i.maxEditLength));var _=[{newPos:-1,components:[]}],v=this.extractCommon(_[0],n,e,0);if(_[0].newPos+1>=a&&v+1>=r)return l([{value:this.join(n),count:n.length}]);function w(){for(var m=-1*u;m<=u;m+=2){var c=void 0,V=_[m-1],z=_[m+1],O=(z?z.newPos:0)-m;V&&(_[m-1]=void 0);var y=V&&V.newPos+1<a,F=z&&0<=O&&O<r;if(!y&&!F){_[m]=void 0;continue}if(!y||F&&V.newPos<z.newPos?(c=Bn(z),s.pushComponent(c.components,void 0,!0)):(c=V,c.newPos++,s.pushComponent(c.components,!0,void 0)),O=s.extractCommon(c,n,e,m),c.newPos+1>=a&&O+1>=r)return l(An(s,c.components,n,e,s.useLongestToken));_[m]=c}u++}if(o)(function m(){setTimeout(function(){if(u>f)return o();w()||m()},0)})();else for(;u<=f;){var k=w();if(k)return k}},pushComponent:function(e,n,i){var o=e[e.length-1];o&&o.added===n&&o.removed===i?e[e.length-1]={count:o.count+1,added:n,removed:i}:e.push({count:1,added:n,removed:i})},extractCommon:function(e,n,i,o){for(var s=n.length,l=i.length,a=e.newPos,r=a-o,u=0;a+1<s&&r+1<l&&this.equals(n[a+1],i[r+1]);)a++,r++,u++;return u&&e.components.push({count:u}),e.newPos=a,r},equals:function(e,n){return this.options.comparator?this.options.comparator(e,n):e===n||this.options.ignoreCase&&e.toLowerCase()===n.toLowerCase()},removeEmpty:function(e){for(var n=[],i=0;i<e.length;i++)e[i]&&n.push(e[i]);return n},castInput:function(e){return e},tokenize:function(e){return e.split("")},join:function(e){return e.join("")}};function An(t,e,n,i,o){for(var s=0,l=e.length,a=0,r=0;s<l;s++){var u=e[s];if(u.removed){if(u.value=t.join(i.slice(r,r+u.count)),r+=u.count,s&&e[s-1].added){var _=e[s-1];e[s-1]=e[s],e[s]=_}}else{if(!u.added&&o){var f=n.slice(a,a+u.count);f=f.map(function(w,k){var m=i[r+k];return m.length>w.length?m:w}),u.value=t.join(f)}else u.value=t.join(n.slice(a,a+u.count));a+=u.count,u.added||(r+=u.count)}}var v=e[l-1];return l>1&&typeof v.value=="string"&&(v.added||v.removed)&&t.equals("",v.value)&&(e[l-2].value+=v.value,e.pop()),e}function Bn(t){return{newPos:t.newPos,components:t.components.slice(0)}}var $e=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,we=/\S/,Pe=new j;Pe.equals=function(t,e){return this.options.ignoreCase&&(t=t.toLowerCase(),e=e.toLowerCase()),t===e||this.options.ignoreWhitespace&&!we.test(t)&&!we.test(e)};Pe.tokenize=function(t){for(var e=t.split(/([^\S\r\n]+|[()[\]{}'"\r\n]|\b)/),n=0;n<e.length-1;n++)!e[n+1]&&e[n+2]&&$e.test(e[n])&&$e.test(e[n+2])&&(e[n]+=e[n+2],e.splice(n+1,2),n--);return e};var de=new j;de.tokenize=function(t){var e=[],n=t.split(/(\n|\r\n)/);n[n.length-1]||n.pop();for(var i=0;i<n.length;i++){var o=n[i];i%2&&!this.options.newlineIsToken?e[e.length-1]+=o:(this.options.ignoreWhitespace&&(o=o.trim()),e.push(o))}return e};function Pn(t,e,n){return de.diff(t,e,n)}var Rn=new j;Rn.tokenize=function(t){return t.split(/(\S.+?[.!?])(?=\s+|$)/)};var jn=new j;jn.tokenize=function(t){return t.split(/([{}:;,]|\s+)/)};function G(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?G=function(e){return typeof e}:G=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},G(t)}var Fn=Object.prototype.toString,K=new j;K.useLongestToken=!0;K.tokenize=de.tokenize;K.castInput=function(t){var e=this.options,n=e.undefinedReplacement,i=e.stringifyReplacer,o=i===void 0?function(s,l){return typeof l>"u"?n:l}:i;return typeof t=="string"?t:JSON.stringify(se(t,null,null,o),o," ")};K.equals=function(t,e){return j.prototype.equals.call(K,t.replace(/,([\r\n])/g,"$1"),e.replace(/,([\r\n])/g,"$1"))};function se(t,e,n,i,o){e=e||[],n=n||[],i&&(t=i(o,t));var s;for(s=0;s<e.length;s+=1)if(e[s]===t)return n[s];var l;if(Fn.call(t)==="[object Array]"){for(e.push(t),l=new Array(t.length),n.push(l),s=0;s<t.length;s+=1)l[s]=se(t[s],e,n,i,o);return e.pop(),n.pop(),l}if(t&&t.toJSON&&(t=t.toJSON()),G(t)==="object"&&t!==null){e.push(t),l={},n.push(l);var a=[],r;for(r in t)t.hasOwnProperty(r)&&a.push(r);for(a.sort(),s=0;s<a.length;s+=1)r=a[s],l[r]=se(t[r],e,n,i,r);e.pop(),n.pop()}else l=t;return l}var re=new j;re.tokenize=function(t){return t.slice()};re.join=re.removeEmpty=function(t){return t};const Hn=R({__name:"CodeDiff",props:{from:{},to:{},lang:{}},setup(t){const e=t;function n(a,r){const u=Pn(a.trim(),r.trim()),f=[],_=[],v=[];for(const w of u){const k=w.value.trimEnd().split(`
|
|
3
|
-
`);for(const m of k)w.added?(f.push(v.length),v.push(m)):(w.removed&&_.push(v.length),v.push(m))}return{added:f,removed:_,result:v.join(`
|
|
4
|
-
`)}}const i=D(()=>n(e.from,e.to));function o(a){let r=0;return a.replace(/class="shiki/,'class="shiki diff').replace(/class="line"/g,u=>(r++,i.value.added.includes(r-1)?'class="line line-added"':i.value.removed.includes(r-1)?'class="line line-removed"':u))}const s=Z();ut(l);function l(){const a=ct(s);a&&a.querySelector(".line-added,.line-removed")?.scrollIntoView()}return(a,r)=>{const u=Oe;return h(),M(u,{ref_key:"elRef",ref:s,code:p(i).result,lang:a.lang,"transform-rendered":o,onLoaded:l},null,8,["code","lang"])}}}),Un={flex:"~ col gap-2","w-150":"",p4:"",border:"t base"},qn={capitalize:""},Wn=d("p",{op50:""}," Following command will be executed in your terminal: ",-1),Kn={op50:""},Yn=d("p",null,[d("span",{op50:""},"After that, Nuxt will "),d("span",{"text-orange":""},"restart automatically"),I(". ")],-1),Jn={flex:"~ gap-3",mt2:"","justify-end":""},Xn=R({__name:"ModuleActionDialog",setup(t){const e=Ie(),n=Me(),i={};return(o,s)=>{const l=ue,a=Oe,r=vt,u=Hn,f=yt,_=ae,v=dt;return h(),M(p(ze),null,{default:x(({resolve:w,args:k})=>[b(v,{"model-value":!0,onClose:m=>w(!1)},{default:x(()=>[b(l,{mod:i,info:k[0],border:"none","w-150":"","n-panel-grids":""},null,8,["info"]),d("div",Un,[d("h2",{"text-xl":"",class:U(k[2]==="install"?"text-primary":"text-red")},[d("span",qn,N(k[2]),1),I(),d("code",null,N(k[0].name),1),I("? ")],2),Wn,b(a,{code:k[1].commands.join(" "),lang:"bash",px4:"",py2:"",border:"~ base rounded",lines:!1},null,8,["code"]),d("p",Kn,[I(" Then your "),b(r,{role:"button",n:"primary",onClick:s[0]||(s[0]=m=>p(n)(p(e)?._nuxtConfigFile)),textContent:"Nuxt config"}),I(" will be updated as: ")]),b(u,{from:k[1].configOriginal,to:k[1].configGenerated,"max-h-80":"","of-auto":"",py2:"",border:"~ base rounded",lang:"ts"},null,8,["from","to"]),Yn,d("div",Jn,[b(f,{n:"sm purple","flex-auto":"",icon:"carbon-chemistry"},{default:x(()=>[I(" Experimental. Backup your project first. ")]),_:1}),b(_,{onClick:m=>w(!1)},{default:x(()=>[I(" Cancel ")]),_:2},1032,["onClick"]),b(_,{n:"solid",capitalize:"",class:U(k[2]==="install"?"n-primary":"n-red"),onClick:m=>w(!0)},{default:x(()=>[I(N(k[2]),1)]),_:2},1032,["class","onClick"])])])]),_:2},1032,["onClose"])]),_:1})}}}),Gn={class:"markdown-body"},Zn=d("h1",null,"Modules",-1),Qn=d("p",null,[I("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 "),d("code",null,"nuxt.config"),I(".")],-1),ei=d("p",null,[I("You can explore the list of modules on "),d("a",{href:"https://nuxt.com/modules",target:"_blank",rel:"noopener"},"nuxt.com/modules"),I(" or install them directly inside the DevTools.")],-1),ti=d("p",null,[d("a",{href:"https://nuxt.com/docs/guide/concepts/modules",target:"_blank",rel:"noopener"},"Learn more on the documentation")],-1),ni=[Zn,Qn,ei,ti],ii={__name:"modules",setup(t,{expose:e}){return e({frontmatter:{}}),(i,o)=>(h(),$("div",Gn,ni))}},oi={"h-full":"","w-full":"","of-auto":""},si={relative:"","h-20":"","w-20":"",flex:"","flex-none":"",rounded:"","bg-gray:3":"",p3:""},ri=["src","alt"],li=d("div",{"i-carbon-cube":"",ma:"","text-4xl":"",op30:""},null,-1),ai={"text-lg":"","group-hover":"text-primary",transition:"",flex:"~ gap-2 items-center"},ui=d("div",{"i-carbon-circle-dash":"","animate-spin":"","text-xl":"",op75:""},null,-1),ci={op75:""},di=d("div",{"i-carbon-intent-request-create":"","text-4xl":"",op40:"","group-hover":"op75 text-primary",transition:""},null,-1),fi=d("div",{"text-lg":"",op40:"","group-hover":"op75 text-primary",transition:""}," Install New Module ",-1),pi={key:0,border:"l base",pos:"fixed bottom-0 right-0 top-0","z-200":"","w-150":"","bg-base":""},mi="https://api.nuxtjs.org/api/ipx/s_80,f_webp/gh/nuxt/modules/main/icons/",Mi=R({__name:"modules",setup(t){const e=Z(!1),n=Le(),i=D(()=>n.value.filter(s=>s.isPackageModule)),o=D(()=>n.value.filter(s=>!s.isPackageModule));return ft(()=>[{id:"action:modules:install",title:"Install a new module",icon:"i-carbon-intent-request-create ",action:()=>{e.value=!0}}]),(s,l)=>{const a=sn,r=ke,u=le,f=mt,_=Te,v=Dn,w=Xn,k=ii,m=gt;return h(),$(P,null,[d("div",oi,[b(f,{icon:"carbon-3d-mpr-toggle",text:"Installed Modules","container-class":"grid grid-cols-minmax-400px gap3 px4",padding:!1,description:`Total modules: ${p(i).length}`},{default:x(()=>[(h(!0),$(P,null,W(p(i),c=>(h(),M(a,{key:c.name,mod:c},null,8,["mod"]))),128)),(h(!0),$(P,null,W("processInstallingModules"in s?s.processInstallingModules:p(Se),c=>(h(),M(u,{key:c.processId,block:"","min-h-30":"",to:`/modules/terminals?id=${encodeURIComponent(c.processId)}`},{default:x(()=>[b(r,{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:x(()=>[d("div",si,[d("img",{src:mi+c.info.icon,alt:c.info.name,ma:""},null,8,ri),li]),d("div",ai,[ui,d("span",ci,"Installing "+N(c.name)+"...",1)])]),_:2},1024)]),_:2},1032,["to"]))),128)),b(r,{border:"1.5 dashed","min-h-30":"",p4:"",transition:"",hover:"border-primary",flex:"~ col gap-2 items-center justify-center",role:"button",class:"group",onClick:l[0]||(l[0]=c=>e.value=!0)},{default:x(()=>[di,fi]),_:1})]),_:1},8,["description"]),p(o).length?(h(),M(f,{key:0,icon:"carbon-3d-mpr-toggle",text:"User Modules","container-class":"grid grid-cols-minmax-400px gap3 px4",padding:!1,description:`Total modules: ${p(o).length}`},{default:x(()=>[(h(!0),$(P,null,W(p(o),c=>(h(),$(P,{key:c.meta?.name||c.entryPath},[c.meta?.name||c.entryPath?(h(),M(a,{key:0,mod:c},null,8,["mod"])):C("",!0)],64))),128))]),_:1},8,["description"])):C("",!0),b(ye,{name:"fade-in"},{default:x(()=>[p(e)?(h(),$("div",{key:0,class:"fixed bottom-0 left-0 right-0 top-0 z-100","bg-black:20":"","backdrop-blur-2":"",onClick:l[1]||(l[1]=c=>e.value=!1)})):C("",!0)]),_:1}),b(ye,{name:"slide-in"},{default:x(()=>[p(e)?(h(),$("div",pi,[b(_,{icon:"carbon-close",pos:"absolute top-3 right-3","rounded-full":"","text-xl":"",onClick:l[2]||(l[2]=c=>e.value=!1)}),b(v,{onClose:l[3]||(l[3]=c=>e.value=!1)})])):C("",!0)]),_:1}),b(w)]),b(m,null,{default:x(()=>[b(k)]),_:1})],64)}}});export{Mi as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{aY as r,Z as n}from"./entry.f3de3eb8.js";const t={};function o(e,s){return n(e.$slots,"default")}const c=r(t,[["render",o]]);export{c as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as N,aa as B,U as I,ap as R,aP as V,aQ as j,C as L,l as P,c as m,w as o,o as n,u as e,e as l,b as t,f as i,t as r,q as d,F as p,aR as x,aS as A,j as s,i as O,k as $,I as E,h as F}from"./entry.f3de3eb8.js";import{_ as W}from"./Badge.2cc4687e.js";import{_ as G}from"./NpmVersionCheck.vue.029b0cde.js";import{_ as H}from"./NTip.vue.c99855ad.js";import{_ as K}from"./NPanelGrids.fc7166ff.js";import{a as U}from"./state-components.7a725a3e.js";import"./NCodeBlock.vue.de2cd5a6.js";import"./client.aa60153e.js";import"./NCheckbox.vue.df53e265.js";const q="0.6.2",Q={key:0},z={key:1,flex:"~ col gap2",ma:"","h-full":"","max-w-300":"","w-full":"",p5:"",px5:"","md:px20":""},J=t("div",{"flex-auto":""},null,-1),X={flex:"~ col","mt-5":"","items-center":"","md:mt-20":""},Y={flex:"~","mt--10":"","items-center":"","justify-center":""},Z={mb6:"","mt--1":"","text-center":"","text-sm":"",flex:"~ gap-1 wrap"},tt=t("span",{op40:""}," Nuxt DevTools ",-1),et={op40:""},ot={flex:"~ gap2 wrap"},nt={p4:"","theme-card-green":"",flex:"~ col auto"},st=t("div",{"logos-nuxt-icon":"","text-3xl":""},null,-1),it={key:0,p4:"","theme-card-green":"",flex:"~ col auto"},at=t("div",{"logos-vue":"","text-3xl":""},null,-1),lt=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),ut=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),pt={grid:"~ cols-[auto_auto] gap-x-5 items-center"},ht=t("div",{"text-sm":""}," SSR to full load ",-1),xt={"text-right":""},ft=t("div",{"text-sm":""}," Page load ",-1),gt={"text-right":""},vt=t("div",{"text-sm":""}," Navigation ",-1),kt={"text-right":""},bt=t("div",{"text-sm":""}," HMR ",-1),wt={"text-right":""},yt={flex:"~ col gap2"},St={flex:"~ gap-6 wrap","mt-5":"","items-center":"","justify-center":""},Ct=t("a",{href:"https://github.com/nuxt/devtools",target:"_blank",flex:"~ gap1","items-center":"",op50:"",hover:"op100 text-blue",transition:""},[t("div",{"i-carbon-star":""}),s(" Star on GitHub ")],-1),Tt=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":""}),s(" Ideas & Suggestions ")],-1),Mt=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":""}),s(" Project Roadmap ")],-1),Dt=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":""}),s(" Bug Reports ")],-1),Nt=t("div",{"i-carbon-settings":""},null,-1),Bt=t("div",{"flex-auto":""},null,-1),It={flex:"col gap-2",mxa:"",hidden:"","w-100":"","text-sm":"",op50:"","md:flex":""},Rt={flex:"~ gap-1","items-center":""},Vt=t("span",null,"+",-1),jt=t("span",null,"+",-1),Lt=t("div",{"flex-auto":""},null,-1),Pt={flex:"~ gap-1","items-center":""},At=t("span",null,"+",-1),Ot=t("span",null,"+",-1),$t=t("span",null,"+",-1),Et=t("span",null,"+",-1),Ft=t("div",{"flex-auto":""},null,-1),Wt=t("div",null,"Toggle DevTools",-1),te=N({__name:"overview",setup(Gt){const a=B(),c=I(),b=U(),f=R(),w=V(),g=j(),y=L();function S(){O.value=!0,y.push("/")}const v=P(()=>a.value?.nuxt.vueApp.version);return(u,Ht)=>{const C=$,T=W,k=G,h=E,M=H,_=F,D=K;return n(),m(D,{"h-screen":"","w-full":"",flex:""},{default:o(()=>[e(c)?(n(),l("div",z,[J,t("div",X,[t("div",Y,[i(C,{"h-14":"","md:h-18":""}),t("button",{"mr--16":"","mt--6":"",onClick:S},[i(T,{"bg-green-400:10":"","text-green-400":"",title:"preview",textContent:"preview"})])]),t("div",Z,[tt,t("code",et,"v"+r(e(q)),1),i(k,{"package-name":"@nuxt/devtools",options:{dev:!0},"show-version":!1})])]),t("div",ot,[t("div",nt,[st,i(k,{"package-name":"nuxt",options:{dev:!0}})]),e(v)?(n(),l("div",it,[at,t("code",null,"v"+r(e(v)),1)])):d("",!0),e(c)?(n(),l(p,{key:1},[e(c)&&e(c).pages&&e(a)?(n(),m(h,{key:0,"min-w-40":"",p4:"","theme-card-lime":"",flex:"~ col auto",to:"/modules/pages"},{default:o(()=>[lt,t("div",null,r(e(w).length)+" pages",1)]),_:1})):d("",!0),e(c)?(n(),m(h,{key:1,"min-w-40":"",p4:"","theme-card-lime":"",flex:"~ col auto",to:"/modules/components"},{default:o(()=>[rt,t("div",null,r(e(b).length)+" components",1)]),_:1})):d("",!0),e(c)&&e(f)?(n(),m(h,{key:2,"min-w-40":"",p4:"","theme-card-yellow":"",flex:"~ col auto",to:"/modules/imports"},{default:o(()=>[dt,t("div",null,r(e(f).imports.length)+" imports",1)]),_:1})):d("",!0),e(c)?(n(),m(h,{key:3,"min-w-40":"",p4:"","theme-card-purple":"",flex:"~ col auto",to:"/modules/modules"},{default:o(()=>[ct,t("div",null,r(e(c)._installedModules.length)+" modules",1)]),_:1})):d("",!0),e(c)?(n(),m(h,{key:4,"min-w-40":"",p4:"","theme-card-teal":"",flex:"~ col auto",to:"/modules/plugins"},{default:o(()=>[ut,t("div",null,r(e(c).plugins.length)+" plugins",1)]),_:1})):d("",!0),e(a)?.loadingTimeMetrics?(n(),l("div",_t,[mt,t("div",pt,[e(a).loadingTimeMetrics.ssrStart?(n(),l(p,{key:0},[ht,t("div",xt,r(("formatDuration"in u?u.formatDuration:e(x))(e(a).loadingTimeMetrics.appLoad-e(a).loadingTimeMetrics.ssrStart)),1)],64)):d("",!0),ft,t("div",gt,r(("formatDuration"in u?u.formatDuration:e(x))(e(a).loadingTimeMetrics.appLoad-e(a).loadingTimeMetrics.appInit)),1),vt,t("div",kt,r(("formatDuration"in u?u.formatDuration:e(x))(e(a).loadingTimeMetrics.pageEnd-e(a).loadingTimeMetrics.pageStart)),1),e(a).loadingTimeMetrics.hmrStart?(n(),l(p,{key:1},[bt,t("div",wt,r(("formatDuration"in u?u.formatDuration:e(x))(e(a).loadingTimeMetrics.hmrEnd-e(a).loadingTimeMetrics.hmrStart)),1)],64)):d("",!0)])])):d("",!0)],64)):d("",!0)]),t("div",yt,[("showConnectionWarning"in u?u.showConnectionWarning:e(A))?(n(),m(M,{key:0,n:"yellow5",icon:"carbon-unlink","justify-center":""},{default:o(()=>[s(" Not connected to the client app, showing server-side data only. Use the embedded mode for full features. ")]),_:1})):d("",!0)]),t("div",St,[Ct,Tt,Mt,Dt,i(h,{to:"/settings",flex:"~ gap1","inline-block":"","items-center":"",op50:"","hover:op80":""},{default:o(()=>[Nt,s(" Settings ")]),_:1})]),Bt,t("div",It,[t("div",Rt,[e(g)?(n(),l(p,{key:0},[i(_,{n:"xs",class:"px2"},{default:o(()=>[s(" ⌘ Cmd ")]),_:1}),Vt,i(_,{n:"xs",class:"px2"},{default:o(()=>[s(" K ")]),_:1})],64)):(n(),l(p,{key:1},[i(_,{n:"xs",class:"px2"},{default:o(()=>[s(" Ctrl ")]),_:1}),jt,i(_,{n:"xs",class:"px2"},{default:o(()=>[s(" K ")]),_:1})],64)),Lt,s(" Open Command Palette ")]),t("div",Pt,[e(g)?(n(),l(p,{key:0},[i(_,{n:"xs",class:"px2"},{default:o(()=>[s(" ⇧ Shift ")]),_:1}),At,i(_,{n:"xs",class:"px2"},{default:o(()=>[s(" ⌥ Option ")]),_:1}),Ot,i(_,{n:"xs",class:"px2"},{default:o(()=>[s(" D ")]),_:1})],64)):(n(),l(p,{key:1},[i(_,{n:"xs",class:"px2"},{default:o(()=>[s(" Shift ")]),_:1}),$t,i(_,{n:"xs",class:"px2"},{default:o(()=>[s(" Alt ")]),_:1}),Et,i(_,{n:"xs",class:"px2"},{default:o(()=>[s(" D ")]),_:1})],64)),Ft,Wt])])])):(n(),l("div",Q," Loading... "))]),_:1})}}});export{te as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{_ as y}from"./StateEditor.vue.4e5aa888.js";import{a as x,o as e,e as c,F as k,m as B,c as m,w as o,Z as C,n as D,g as w,b as $,aa as F,l as O,u as r,f as a,q as d,j as P,h as V}from"./entry.f3de3eb8.js";import{_ as j}from"./NSectionBlock.0eaaa956.js";import{_ as E}from"./NIconButton.vue.e211c1b6.js";import{_ as R}from"./HelpFab.vue.49173e4b.js";import"./json-editor-vue.0e484aeb.js";import"./NIconTitle.vue.4e3340eb.js";const A={key:0,flex:"~ col gap-1"},G={key:1,mt2:"",px4:"",italic:"",op35:""},H=x({__name:"StateGroup",props:{state:{},prefix:{default:""}},setup(f){return(t,n)=>{const i=y;return e(),c("div",null,[t.state&&Object.keys(t.state).length>0?(e(),c("div",A,[(e(!0),c(k,null,B(t.state,(l,s)=>(e(),m(i,{key:s,state:l,name:s.startsWith(t.prefix)?s.slice(t.prefix.length):s},{actions:o(_=>[C(t.$slots,"actions",D(w(_)))]),_:2},1032,["state","name"]))),128))])):(e(),c("div",G," No data "))])}}}),K={class:"markdown-body"},T=$("h1",null,"State & Async Data",-1),q=$("p",null,"// TODO",-1),z=[T,q],I={__name:"payload",setup(f,{expose:t}){return t({frontmatter:{}}),(i,l)=>(e(),c("div",K,z))}},L={key:0},tt=x({__name:"payload",setup(f){const t=F(),n=O(()=>t.value?.nuxt.payload);async function i(l){await t.value?.nuxt.hooks.callHookParallel("app:data:refresh",l)}return(l,s)=>{const _=H,p=j,b=V,v=E,S=y,g=I,N=R;return e(),c(k,null,[r(t)?(e(),c("div",L,[a(p,{icon:"carbon-data-set",text:"State",description:"Keyed state from `useState`",padding:!1},{default:o(()=>[a(_,{state:r(n).state,prefix:"$s"},null,8,["state"])]),_:1}),a(p,{icon:"carbon-data-blob",text:"Data",description:"Keyed state from `useAsyncData`",padding:!1},{actions:o(()=>[a(b,{n:"xs primary","self-start":"",icon:"i-carbon-recycle",onClick:s[0]||(s[0]=h=>i())},{default:o(()=>[P(" Re-fetch all data ")]),_:1})]),default:o(()=>[a(_,{state:r(n).data},{actions:o(({isOpen:h,name:u})=>[h&&u?(e(),m(v,{key:0,title:`Re-fetch '${u}'`,icon:"carbon-recycle",onClick:W=>i([u])},null,8,["title","onClick"])):d("",!0)]),_:1},8,["state"])]),_:1}),r(n).functions&&Object.keys(r(n).functions).length?(e(),m(p,{key:0,icon:"carbon-function",text:"Functions",description:"State for functions (experimental)"},{default:o(()=>[a(S,{"ml--6":"",state:r(n).functions},null,8,["state"])]),_:1})):d("",!0)])):d("",!0),a(N,null,{default:o(()=>[a(g)]),_:1})],64)}}});export{tt as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{_ as T}from"./FilepathItem.vue.df9b46ef.js";import{_ as D}from"./Badge.2cc4687e.js";import{_ as k}from"./DurationDisplay.vue.a48b74dd.js";import{a as v,U as B,l as x,at as V,o as n,e as m,b as t,t as P,f as l,u as f,c as u,q as d,a7 as F,Z as w,P as H,aY as I,w as h,j as y,aW as M,aa as W,F as C,m as E,p as j}from"./entry.f3de3eb8.js";import{_ as L}from"./NSectionBlock.0eaaa956.js";import{_ as Y}from"./HelpFab.vue.49173e4b.js";import"./editor.24e006dd.js";import"./NIconTitle.vue.4e3340eb.js";import"./NIconButton.vue.e211c1b6.js";const q={flex:"~ gap2","items-center":""},z={w8:"","text-right":"","text-sm":"",op25:""},A={key:0,"flex-auto":"","text-right":""},R=v({__name:"PluginItem",props:{plugin:{},index:{}},setup(p){const e=p,a=B(),r=x(()=>V(e.plugin.src,a.value?.rootDir||"").path);return(i,c)=>{const _=T,o=D,s=k;return n(),m("div",q,[t("div",z,P(i.index),1),l(_,{filepath:e.plugin.src,subpath:!0},null,8,["filepath"]),t("div",null,[f(r).startsWith("#")?(n(),u(o,{key:0,"bg-rose-400:10":"","text-rose":"",textContent:"virtual"})):f(r).startsWith(".")?d("",!0):(n(),u(o,{key:1,"bg-gray-400:10":"","text-gray":"",textContent:"module"})),i.plugin.mode==="server"?(n(),u(o,{key:2,"bg-teal-400:10":"","text-teal-400":"",textContent:"server"})):d("",!0),i.plugin.mode==="client"?(n(),u(o,{key:3,"bg-orange-400:10":"","text-orange-400":"",textContent:"client"})):d("",!0)]),i.plugin.metric?.duration!=null?(n(),m("div",A,[l(s,{duration:i.plugin.metric?.duration,factor:10},null,8,["duration"])])):d("",!0)])}}}),U={class:"n-tip n-tip-base",flex:"~ col items-start","mx--4":"",px4:"",py4:""},Z={flex:"~ items-center gap-1","font-bold":""},G=v({__name:"HelpTip",props:{title:{},icon:{}},setup(p){return(e,a)=>{const r=H,i=F("ContentSlot");return n(),m("div",U,[t("div",Z,[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,[w(e.$slots,"default",{},()=>[l(i,{use:e.$slots.default,unwrap:"p"},null,8,["use"])])])])}}}),J={};function K(p,e){const a=G;return n(),u(a,{title:"Performance Tip",icon:"carbon-meter",n:"lime6 dark:lime5"},{default:h(()=>[w(p.$slots,"default")]),_:3})}const O=I(J,[["render",K]]),Q={class:"markdown-body"},X=t("h1",null,"Plugins",-1),tt=t("p",null,[y("Nuxt plugins allows you to extend the functionality of Nuxt runtime and the Vue instance. You can add plugins to the "),t("code",null,"plugins/"),y(" directory and they will be automatically imported and registered.")],-1),et=t("p",null,[t("a",{href:"https://nuxt.com/docs/guide/directory-structure/plugins",target:"_blank",rel:"noopener"},"Learn more on the documentation")],-1),nt={__name:"plugins",setup(p,{expose:e}){return e({frontmatter:{}}),(r,i)=>{const c=O;return n(),m("div",Q,[X,tt,l(c,null,{default:h(()=>[y(" Plugins runs before your application at runtime, the time each plugin cost will directly affect your application's initial loading time. ")]),_:1}),et])}}},ot={pt4:""},st={class:"text-sm",flex:"~ gap-1 items-center justify-end","mt-3":""},it=t("div",{"i-carbon-timer":"","text-lg":"",op75:""},null,-1),at=t("span",{op50:""},"Total execution time:",-1),gt=v({__name:"plugins",setup(p){const e=M(),a=W(),r=x(()=>{const c=e.value?.plugins||[],_=a.value?.getClientPluginMetrics()||[];return c.map(o=>{const s=typeof o=="string"?{src:o}:o;return{...s,metric:_.find(g=>g.src===s.src||g.src.startsWith(s.src))}})}),i=x(()=>{const c=a.value?.getClientPluginMetrics()||[],_=Math.min(...c.map(s=>s.start));return Math.max(...c.map(s=>s.end))-_});return(c,_)=>{const o=R,s=k,g=L,N=nt,S=Y;return n(),m(C,null,[l(g,{icon:"carbon-plug",text:"Plugins",description:`Total plugins: ${f(r).length}`},{default:h(()=>[t("div",ot,[(n(!0),m(C,null,E(f(r),($,b)=>(n(),u(o,{key:$.src,plugin:$,index:b+1,"ml--4":"","border-base":"",py2:"",class:j(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(S,null,{default:h(()=>[l(N)]),_:1})],64)}}});export{gt as default};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{_ as ce}from"./Navbar.vue.a50c38bf.js";import{_ as Y}from"./Badge.2cc4687e.js";import{a as Z,U as ie,ag as de,l as p,r as k,o as a,e as m,b as c,c as x,w as l,j as h,t as y,u as e,p as b,a$ as G,F as q,m as A,H as ee,f as s,q as $,h as pe,J as me,P as fe,b0 as _e,D as ve,b1 as he,X as ye,b2 as ge,I as xe,a6 as be}from"./entry.f3de3eb8.js";import{_ as Ce}from"./NSelect.vue.94ec8f3c.js";import{_ as ke}from"./CodeSnippets.vue.1e158b8f.js";import{_ as te}from"./NPanelGrids.fc7166ff.js";import{_ as $e}from"./NCodeBlock.vue.de2cd5a6.js";import{u as Re}from"./editor.24e006dd.js";import{C as X}from"./constants.d7bcda3c.js";import{_ as Te}from"./PanelLeftRight.vue.1e85c7f2.js";import"./client.aa60153e.js";const je={"h-full":"","w-full":"",flex:"~ col"},qe={flex:"~ col gap-2","flex-none":"",p4:"","navbar-glass":""},Se={flex:"~ gap2"},Ve={flex:"~ gap2","w-full":"","items-center":"",px4:"",pb2:"","text-center":"","text-sm":"",border:"b base"},we=c("div",{"flex-auto":""},null,-1),Ue={key:0,border:"b base","items-center":"",px4:"",py2:"",grid:"~ cols-[max-content_1fr] gap-2"},Ne={"text-right":"","font-mono":""},Ee={key:1,relative:""},Pe={key:2,px4:"",py2:"",flex:"~ col gap-2",border:"b base"},Be={border:"b base",flex:"~ gap2","items-center":"",px4:"",py2:""},Oe=c("div",null,"Response",-1),De={key:1,"text-xs":"",op50:""},Le=c("div",{"flex-auto":""},null,-1),Me=c("div",{op50:""}," Request finished in ",-1),Fe=Z({__name:"ServerRouteDetails",props:{route:{type:Object,required:!0}},setup(P){const B=P,R=ie(),u=de({contentType:"text/plain",data:"",statusCode:200,error:void 0}),T=p(()=>u.contentType.includes("application/json")?"json":u.contentType.includes("text/html")?"html":u.contentType.includes("text/css")?"css":u.contentType.includes("text/javascript")?"javascript":u.contentType.includes("text/xml")||u.contentType.includes("application/xml")?"xml":"text"),j=p(()=>T.value==="json"?JSON.stringify(u.data,null,2):u.data),w=k(0),C=k(!1),U=k(!1),H=Re(),O=p(()=>B.route.route?.split(/((?:\*\*)?:[\w_]+)/g)),S=p(()=>O.value?.filter(n=>n.startsWith(":")||n.startsWith("**:"))||[]),g=k(B.route.method||"GET"),N=k({}),E=k([{key:"",value:""}]),V=k([{key:"",value:""}]),f=k([{key:"Content-Type",value:"application/json"}]),J=p(()=>V.value.filter(({key:n})=>n).length),z=p(()=>f.value.filter(({key:n})=>n).length),I=p(()=>{const n={};for(let t=0;t<E.value.length;t++){const{key:o,value:i}=E.value[t];n[o]=i}return Object.keys(n)[0]?n:null}),ne=p(()=>{let n=R.value?.devServer.url||"http://localhost";n.charAt(n.length-1)==="/"&&(n=n.slice(0,-1));const t=R.value?.devServer.port||3e3;return n.includes(`:${t}`)?n:`${n}:${t}`}),D=p(()=>{let n=new URLSearchParams(Object.fromEntries(V.value.filter(({key:i})=>i).map(({key:i,value:_})=>[i,_]))).toString();n&&(n=`?${n}`);const t=(O.value?.map(i=>(i.startsWith(":")||i.startsWith("**:"))&&N.value[i]||i).join("")||"")+n;let o=R.value?.app.baseURL||"";return(o==="./"||o===".")&&(o=""),o.endsWith("/")&&(o=o.slice(0,-1)),o+t}),oe=p(()=>ne.value+D.value);async function K(){U.value=!0,C.value=!0,Object.assign(u,{lang:"text",contentType:"",data:"",content:"",error:void 0});const n=Date.now();try{u.data=await $fetch(oe.value,{method:g.value.toUpperCase(),headers:Object.fromEntries(f.value.filter(({key:t,value:o})=>t&&o).map(({key:t,value:o})=>[t,o])),query:Object.fromEntries(V.value.filter(({key:t,value:o})=>t&&o).map(({key:t,value:o})=>[t,o])),body:I.value,onResponse({response:t}){u.contentType=(t.headers.get("content-type")||"").toString().toLowerCase().trim(),u.statusCode=t.status},onResponseError(t){u.error=t.response._data,u.data=t.response._data}})}catch{}C.value=!1,w.value=Date.now()-n}const Q=p(()=>{const n=[],t=[],o=f.value.filter(({key:_,value:v})=>_&&v&&!(_==="Content-Type"&&v==="application/json")).map(({key:_,value:v})=>` '${_}': '${v}'`).join(`,
|
|
2
|
-
`);g.value.toUpperCase()!=="GET"&&t.push(`method: '${g.value.toUpperCase()}'`),o&&t.push(`headers: {
|
|
3
|
-
${o}
|
|
4
|
-
}`),I.value&&t.push(`body: ${JSON.stringify(I.value,null,2)}`);const i=t.length?`, {
|
|
5
|
-
${t.join(`,
|
|
6
|
-
`).split(`
|
|
7
|
-
`).map(_=>` ${_}`).join(`
|
|
8
|
-
`)}
|
|
9
|
-
}`:"";return n.push({name:"useFetch",lang:"javascript",docs:X.nuxt.useFetch,code:`const { data, pending, error, refresh } = useFetch('${D.value}'${i})`}),n.push({name:"$fetch",lang:"javascript",docs:X.nuxt.$fetch,code:`await $fetch('${D.value}'${i})`}),n}),d=k(S.value.length?"params":"query"),L=p(()=>{if(d.value==="query")return V.value;if(d.value==="body")return E.value;if(d.value==="headers")return f.value}),se=["GET","POST","PUT","PATCH","DELETE","HEAD"];return(n,t)=>{const o=pe,i=Ce,_=me,v=fe,ae=ke,re=te,le=_e,W=Y,ue=$e;return a(),m("div",je,[c("div",qe,[c("div",Se,[P.route.method?(a(),x(o,{key:0,class:b(("getRequestMethodClass"in n?n.getRequestMethodClass:e(G))(e(g))),"pointer-events-none":"",tabindex:"-1"},{default:l(()=>[h(y(e(g).toUpperCase()),1)]),_:1},8,["class"])):(a(),x(i,{key:1,modelValue:e(g),"onUpdate:modelValue":t[0]||(t[0]=r=>ee(g)?g.value=r:null),class:b(("getRequestMethodClass"in n?n.getRequestMethodClass:e(G))(e(g)))},{default:l(()=>[(a(),m(q,null,A(se,r=>c("option",{key:r,class:b(("getRequestMethodClass"in n?n.getRequestMethodClass:e(G))(r))},y(r.toUpperCase()),3)),64))]),_:1},8,["modelValue","class"])),s(_,{"model-value":e(D),disabled:"","flex-auto":"","font-mono":"",p:"x5 y2",n:"primary xs"},null,8,["model-value"]),s(o,{n:"primary solid",onClick:K},{default:l(()=>[s(v,{icon:"carbon:send"})]),_:1})])]),c("div",Ve,[e(S).length?(a(),x(o,{key:0,class:b(e(d)==="params"?"text-primary n-primary":"border-transparent! shadow-none!"),onClick:t[1]||(t[1]=r=>d.value="params")},{default:l(()=>[s(v,{icon:"i-carbon-text-selection"}),h(" Params ("+y(e(S).length)+") ",1)]),_:1},8,["class"])):$("",!0),s(o,{class:b(e(d)==="query"?"text-primary n-primary":"border-transparent! shadow-none!"),onClick:t[2]||(t[2]=r=>d.value="query")},{default:l(()=>[s(v,{icon:"i-carbon-help"}),h(" Query "+y(e(J)?`(${e(J)})`:""),1)]),_:1},8,["class"]),e(g)!=="GET"?(a(),x(o,{key:1,class:b(e(d)==="body"?"text-primary n-primary":"border-transparent! shadow-none!"),onClick:t[3]||(t[3]=r=>d.value="body")},{default:l(()=>[s(v,{icon:"i-carbon-document"}),h(" Body ")]),_:1},8,["class"])):$("",!0),s(o,{class:b(e(d)==="headers"?"text-primary n-primary":"border-transparent! shadow-none!"),onClick:t[4]||(t[4]=r=>d.value="headers")},{default:l(()=>[s(v,{icon:"i-carbon-html-reference"}),h(" Headers "+y(e(z)?`(${e(z)})`:""),1)]),_:1},8,["class"]),s(o,{class:b(e(d)==="snippet"?"text-primary n-primary":"border-transparent! shadow-none!"),onClick:t[5]||(t[5]=r=>d.value="snippet")},{default:l(()=>[s(v,{icon:"carbon:code"}),h(" Snippets ")]),_:1},8,["class"]),we,s(o,{icon:"carbon-launch",onClick:t[6]||(t[6]=r=>e(H)(P.route.filepath))},{default:l(()=>[h(" Open in Editor ")]),_:1})]),e(d)==="params"?(a(),m("div",Ue,[(a(!0),m(q,null,A(e(S),r=>(a(),m(q,{key:r},[c("div",Ne,y(r),1),s(_,{modelValue:e(N)[r],"onUpdate:modelValue":M=>e(N)[r]=M,placeholder:r,"flex-1":""},null,8,["modelValue","onUpdate:modelValue","placeholder"])],64))),128))])):$("",!0),e(d)==="snippet"?(a(),m("div",Ee,[e(Q).length?(a(),x(ae,{key:0,border:"b base","code-snippets":e(Q)},null,8,["code-snippets"])):$("",!0)])):e(L)?(a(),m("div",Pe,[(a(!0),m(q,null,A(e(L),(r,M)=>(a(),m("div",{key:M,flex:"~ gap-2","justify-around":""},[s(_,{modelValue:r.key,"onUpdate:modelValue":F=>r.key=F,placeholder:"Key","flex-1":"","font-mono":"",n:"sm"},null,8,["modelValue","onUpdate:modelValue"]),s(_,{modelValue:r.value,"onUpdate:modelValue":F=>r.value=F,placeholder:"Value","flex-1":"","font-mono":"",n:"sm"},null,8,["modelValue","onUpdate:modelValue"]),s(o,{n:"red",onClick:F=>e(L).splice(M,1)},{default:l(()=>[s(v,{icon:"carbon:delete"})]),_:2},1032,["onClick"])]))),128)),c("div",null,[s(o,{icon:"carbon-add",n:"sm primary",my1:"","px-3":"",onClick:t[7]||(t[7]=r=>e(L).push({key:"",value:""}))},{default:l(()=>[h(" Add ")]),_:1})])])):$("",!0),e(U)?e(C)?(a(),x(le,{key:4,"z-10":"","flex-auto":"","backdrop-blur":""},{default:l(()=>[h(" Fetching... ")]),_:1})):(a(),m(q,{key:5},[c("div",Be,[Oe,e(u).error?(a(),x(W,{key:0,"bg-red-400:10":"","text-red-400":""},{default:l(()=>[h(" Error ")]),_:1})):$("",!0),s(W,{class:b({"bg-orange-400:10 text-orange-400":e(u).error,"bg-green-400:10 text-green-400":!e(u).error})},{default:l(()=>[h(y(e(u).statusCode),1)]),_:1},8,["class"]),e(u).contentType?(a(),m("code",De,y(e(u).contentType),1)):$("",!0),Le,Me,s(W,{"bg-green-400:10":"","text-green-400":""},{default:l(()=>[h(y(e(w))+" ms ",1)]),_:1})]),s(ue,{"flex-auto":"","overflow-auto":"","py-2":"",code:e(j),lang:e(T)},null,8,["code","lang"])],64)):(a(),x(re,{key:3},{default:l(()=>[s(o,{n:"primary",onClick:K},{default:l(()=>[s(v,{icon:"carbon:send"}),h(" Send request ")]),_:1})]),_:1}))])}}}),Ge={flex:"~ gap1","text-sm":"",op50:""},Ae={key:0},He={"w-12":"","flex-none":"","text-right":""},Ie={"font-mono":"","text-sm":""},We=c("div",{"x-divider":""},null,-1),Je=c("span",{op75:""},"Select a route to start",-1),at=Z({__name:"server-routes",setup(P){const B=ve(),R=he(),u=p(()=>new ye(R.value||[],{keys:["method","route"],shouldSort:!0})),T=p(()=>R.value?.find(C=>C.path===B.query?.path)),j=k(""),w=p(()=>R.value?j.value?u.value.search(j.value).map(C=>C.item):R.value:[]);return(C,U)=>{const H=ce,O=Y,S=xe,g=Fe,N=be,E=te,V=Te;return a(),x(V,null,{left:l(()=>[s(H,{search:e(j),"onUpdate:search":U[0]||(U[0]=f=>ee(j)?j.value=f:null),pb2:""},{default:l(()=>[c("div",Ge,[e(j)?(a(),m("span",Ae,y(e(w).length)+" matched · ",1)):$("",!0),c("span",null,y(e(R)?.length)+" routes in total",1)])]),_:1},8,["search"]),(a(!0),m(q,null,A(e(w),f=>(a(),m(q,{key:f.id},[s(S,{flex:"~ gap-2","items-center":"","hover-bg-active":"",px2:"",py1:"",class:b([{"bg-active":e(T)?.path===f.path}]),to:{query:{path:f.path}}},{default:l(()=>[c("div",He,[s(O,{class:b(("getRequestMethodClass"in C?C.getRequestMethodClass:e(G))(f.method||"*")),title:"updates available",textContent:y((f.method||"*").toUpperCase())},null,8,["class","textContent"])]),c("span",Ie,y(f.route),1)]),_:2},1032,["class","to"]),We],64))),128))]),right:l(()=>[(a(),x(ge,{max:10},[e(T)?(a(),x(g,{key:e(T).path,route:e(T)},null,8,["route"])):$("",!0)],1024)),e(T)?$("",!0):(a(),x(E,{key:0},{default:l(()=>[s(N,{px6:"",py2:""},{default:l(()=>[Je]),_:1})]),_:1}))]),_:1})}}});export{at as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{_ as se}from"./NIconButton.vue.e211c1b6.js";import{_ as re}from"./NSelect.vue.94ec8f3c.js";import{a as G,b4 as le,C as ue,r as j,l as q,D as T,b5 as z,ak as ie,a4 as ce,aj as de,L as me,y as p,z as h,u as n,o as r,c as _,w as l,b as u,f as c,H as D,e as d,F as w,m as U,t as k,p as E,j as i,aO as L,q as F,af as _e,v as pe,aV as fe,b6 as ye,b7 as O,J as ve,I as ge,P as he,h as ke,a6 as be}from"./entry.f3de3eb8.js";import{_ as xe}from"./NLink.vue.53529111.js";import{_ as we}from"./NPanelGrids.fc7166ff.js";import{_ as Ce}from"./PanelLeftRight.vue.1e85c7f2.js";import{_ as Ke}from"./FilepathItem.vue.df9b46ef.js";import{U as Ve}from"./json-editor-vue.0e484aeb.js";import{_ as $e}from"./AuthRequiredPanel.vue.4f66b5dd.js";import"./editor.24e006dd.js";const Ne={class:"h-[48px] flex items-center justify-between gap1 px-3"},Se={class:"w-full text-sm"},Ie=["value"],je=u("div",{"x-divider":""},null,-1),qe={key:0,"h-full":"","of-hidden":"",flex:"~ col"},De={border:"b base",class:"h-[49px] flex flex-none items-center justify-between px-4 text-sm"},Ue={class:"flex items-center gap-4"},Le={key:1},Ae=["onKeyup"],Be=u("br",null,null,-1),Me={key:0,op50:""},Pe={key:1},Re=u("code",null,"nitro.storage",-1),Te=u("br",null,null,-1),ze={"font-bold":""},Ee=u("br",null,null,-1),Fe={"text-sm":""},Oe=u("br",null,null,-1),Ge=G({__name:"StorageDetails",async setup(H){let m,g;const C=le(),y=ue(),b=j(""),v=j(""),s=q({get(){return T().query?.storage},set(t){y.replace({query:{storage:t}})}}),e=j(),x=q(()=>T().query?.key),{data:K}=([m,g]=z(()=>O("storageMounts",()=>p.getStorageMounts())),m=await m,g(),m),{data:V,refresh:A}=([m,g]=z(async()=>O("storageKeys",async()=>s.value?await p.getStorageKeys(s.value):[])),m=await m,g(),m),J=C.hook("storage:key:update",async(t,o)=>{if(!(!s.value||t.split(":")[0]!==s.value)&&(await A(),x.value===t)){if(o==="remove")return y.replace({query:{storage:s.value}});await N(x.value)}});ie(J),ce(s,A),de(async()=>{if(!x.value){e.value=null;return}N(x.value)}),me("keydown",t=>{t.key==="s"&&(t.ctrlKey||t.metaKey)&&(S(),t.preventDefault())});function $(t){return t.replace(`${s.value}:`,"")}const W=q(()=>V.value?V.value.filter(t=>t.includes(b.value)):[]);async function N(t){const o=await p.getStorageItem(await h(),t);e.value={key:t,updatedKey:$(t),editingKey:!1,content:o,updatedContent:o}}async function Q(){if(!v.value||!s.value)return;const t=`${s.value}:${v.value}`;V.value?.includes(t)||await p.setStorageItem(await h(),t,""),y.replace({query:{storage:s.value,key:t}}),v.value=""}async function S(){e.value&&(await p.setStorageItem(await h(),e.value.key,e.value.updatedContent),await N(e.value.key))}async function X(){!e.value||!s.value||(await p.removeStorageItem(await h(),e.value.key),e.value=null)}async function Y(){if(!e.value||!s.value)return;const t=`${s.value}:${e.value.updatedKey}`,o=await h();await p.setStorageItem(o,t,e.value.updatedContent),await p.removeStorageItem(o,e.value.key),y.replace({query:{storage:s.value,key:t}})}return(t,o)=>{const Z=se,ee=re,I=ve,te=ge,ne=he,B=ke,M=xe,P=be,R=we,oe=Ce,ae=Ke;return n(s)?(r(),_(oe,{key:0,"storage-key":"tab-storage"},{left:l(()=>[u("div",Ne,[c(Z,{icon:"carbon-chevron-left","ml--1":"",onClick:o[0]||(o[0]=a=>s.value="")}),u("div",Se,[c(ee,{modelValue:n(s),"onUpdate:modelValue":o[1]||(o[1]=a=>D(s)?s.value=a:null),n:"primary",icon:"carbon-data-base"},{default:l(()=>[(r(!0),d(w,null,U(n(K),(a,f)=>(r(),d("option",{key:f,value:f},k(f),9,Ie))),128))]),_:1},8,["modelValue"])])]),c(I,{modelValue:n(b),"onUpdate:modelValue":o[2]||(o[2]=a=>D(b)?b.value=a:null),icon:"carbon-search",placeholder:"Search...",n:"primary sm",border:"y x-none base! rounded-0",class:"w-full py2 ring-0!"},null,8,["modelValue"]),(r(!0),d(w,null,U(n(W),a=>(r(),d(w,{key:a},[c(te,{block:"",truncate:"",px2:"",py1:"","font-mono":"","text-sm":"",to:{query:{key:a,storage:n(s)}},class:E(a===n(e)?.key?"text-primary n-bg-active":"text-secondary hover:n-bg-hover")},{default:l(()=>[i(k($(a)),1)]),_:2},1032,["to","class"]),je],64))),128)),c(I,{modelValue:n(v),"onUpdate:modelValue":o[3]||(o[3]=a=>D(v)?v.value=a:null),icon:"carbon-add",placeholder:"key",n:"sm",border:"t-none x-none base! rounded-0",class:"w-full py2 font-mono ring-0!",onKeyup:L(Q,["enter"])},null,8,["modelValue","onKeyup"])]),right:l(()=>[n(e)?.key?(r(),d("div",qe,[u("div",De,[u("div",Ue,[n(e).editingKey?(r(),_(I,{key:0,modelValue:n(e).updatedKey,"onUpdate:modelValue":o[4]||(o[4]=a=>n(e).updatedKey=a),onKeyup:L(Y,["enter"])},null,8,["modelValue","onKeyup"])):(r(),d("code",Le,[i(k($(n(e).key))+" ",1),c(ne,{icon:"carbon-edit",class:"cursor-pointer op50 hover:op100",onClick:o[5]||(o[5]=a=>n(e).editingKey=!0)})])),n(e).editingKey?F("",!0):(r(),_(B,{key:2,n:"green xs",disabled:n(e).content===n(e).updatedContent,class:E({"border-green":n(e).content!==n(e).updatedContent}),onClick:S},{default:l(()=>[i(" Save ")]),_:1},8,["disabled","class"]))]),u("div",null,[c(B,{n:"red xs",onClick:X},{default:l(()=>[i(" Delete ")]),_:1})])]),typeof n(e).content=="object"?(r(),_(n(Ve),_e({key:0,modelValue:n(e).updatedContent,"onUpdate:modelValue":o[6]||(o[6]=a=>n(e).updatedContent=a),class:[[t.$colorMode.value==="dark"?"jse-theme-dark":"light"],"json-editor-vue h-full of-auto text-sm outline-none"]},t.$attrs,{mode:"text","navigation-bar":!1,indentation:2,"tab-size":2}),null,16,["modelValue","class"])):pe((r(),d("textarea",{key:1,"onUpdate:modelValue":o[7]||(o[7]=a=>n(e).updatedContent=a),placeholder:"Item value...",class:"h-full of-auto p-4 font-mono text-sm outline-none",onKeyup:L(fe(S,["ctrl"]),["enter"])},null,40,Ae)),[[ye,n(e).updatedContent]])])):(r(),_(R,{key:1},{default:l(()=>[c(P,{px6:"",py4:""},{default:l(()=>[i(" Select one key to start."),Be,i("Learn more about "),c(M,{href:"https://nitro.unjs.io/guide/storage",n:"orange",target:"_blank"},{default:l(()=>[i(" Nitro storage ")]),_:1})]),_:1})]),_:1}))]),_:1})):(r(),_(R,{key:1},{default:l(()=>[Object.keys(n(K)).length?(r(),d("p",Me," Select one storage to start: ")):(r(),d("p",Pe,[i(" No custom storage defined in "),Re,i("."),Te,i(" Learn more about "),c(M,{href:"https://nitro.unjs.io/guide/storage",n:"orange",target:"_blank"},{default:l(()=>[i(" Nitro storage ")]),_:1})])),(r(!0),d(w,null,U(n(K),(a,f)=>(r(),_(P,{key:f,"min-w-80":"","cursor-pointer":"","p-4":"","text-left":"",hover:"border-green",onClick:He=>s.value=f},{default:l(()=>[u("span",ze,k(f),1),Ee,u("span",Fe,k(a.driver)+" driver",1),Oe,a.base?(r(),_(ae,{key:0,"text-xs":"",filepath:a.base},null,8,["filepath"])):F("",!0)]),_:2},1032,["onClick"]))),128))]),_:1}))}}}),at=G({__name:"storage",setup(H){return(m,g)=>{const C=Ge,y=$e;return r(),_(y,null,{default:l(()=>[c(C)]),_:1})}}});export{at as default};
|
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import { computed, onMounted, ref, watch, watchEffect } from 'vue'
|
|
3
|
-
import type { NuxtDevtoolsHostClient, NuxtDevtoolsGlobal as NuxtDevtoolsViewGlobal } from '../../../types'
|
|
4
|
-
import { closePanel, state } from './state'
|
|
5
|
-
import { useEventListener } from './utils'
|
|
6
|
-
|
|
7
|
-
const props = defineProps<{
|
|
8
|
-
client: NuxtDevtoolsHostClient
|
|
9
|
-
}>()
|
|
10
|
-
|
|
11
|
-
const CLIENT_PATH = '/__nuxt_devtools__/client'
|
|
12
|
-
|
|
13
|
-
const initialUrl = CLIENT_PATH + state.value.route
|
|
14
|
-
const iframe = ref<HTMLIFrameElement>()
|
|
15
|
-
|
|
16
|
-
async function onLoad() {
|
|
17
|
-
await waitForClientInjection()
|
|
18
|
-
setupClient()
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
function waitForClientInjection(retry = 10, timeout = 200) {
|
|
22
|
-
const test = () => !!iframe.value?.contentWindow?.__NUXT_DEVTOOLS_VIEW__
|
|
23
|
-
|
|
24
|
-
if (test())
|
|
25
|
-
return
|
|
26
|
-
|
|
27
|
-
return new Promise<void>((resolve, reject) => {
|
|
28
|
-
const interval = setInterval(() => {
|
|
29
|
-
if (test()) {
|
|
30
|
-
clearInterval(interval)
|
|
31
|
-
resolve()
|
|
32
|
-
}
|
|
33
|
-
else if (retry-- <= 0) {
|
|
34
|
-
clearInterval(interval)
|
|
35
|
-
// eslint-disable-next-line prefer-promise-reject-errors
|
|
36
|
-
reject('Nuxt Devtools client injection failed')
|
|
37
|
-
}
|
|
38
|
-
}, timeout)
|
|
39
|
-
})
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
function refreshReactivity() {
|
|
43
|
-
props.client?.hooks.callHook('host:update:reactivity')
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
function setupClient() {
|
|
47
|
-
const client = computed(() => props.client)
|
|
48
|
-
|
|
49
|
-
watch(() => [
|
|
50
|
-
client.value?.nuxt.payload,
|
|
51
|
-
client.value.colorMode.value,
|
|
52
|
-
client.value.loadingTimeMetrics,
|
|
53
|
-
], () => {
|
|
54
|
-
refreshReactivity()
|
|
55
|
-
}, { deep: true })
|
|
56
|
-
|
|
57
|
-
// trigger update for route change
|
|
58
|
-
client.value?.nuxt.vueApp.config.globalProperties?.$router?.afterEach(() => {
|
|
59
|
-
refreshReactivity()
|
|
60
|
-
})
|
|
61
|
-
|
|
62
|
-
// trigger update for app mounted
|
|
63
|
-
client.value?.nuxt.hook('app:mounted', () => {
|
|
64
|
-
refreshReactivity()
|
|
65
|
-
})
|
|
66
|
-
|
|
67
|
-
updateClient()
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
onMounted(() => {
|
|
71
|
-
props.client.refreshState()
|
|
72
|
-
props.client.hooks.hook('devtools:navigate', (path) => {
|
|
73
|
-
state.value.route = path
|
|
74
|
-
})
|
|
75
|
-
})
|
|
76
|
-
|
|
77
|
-
function updateClient() {
|
|
78
|
-
const injection = iframe.value?.contentWindow?.__NUXT_DEVTOOLS_VIEW__ as NuxtDevtoolsViewGlobal
|
|
79
|
-
props.client.refreshState()
|
|
80
|
-
injection?.setClient(props.client)
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
useEventListener(window, 'keydown', (e: KeyboardEvent) => {
|
|
84
|
-
if (e.key === 'Escape' && props.client.inspector?.isEnabled.value) {
|
|
85
|
-
e.preventDefault()
|
|
86
|
-
props.client.inspector?.disable()
|
|
87
|
-
closePanel()
|
|
88
|
-
}
|
|
89
|
-
})
|
|
90
|
-
|
|
91
|
-
watchEffect(() => {
|
|
92
|
-
if (!state.value.open)
|
|
93
|
-
iframe.value?.blur()
|
|
94
|
-
else
|
|
95
|
-
iframe.value?.focus()
|
|
96
|
-
})
|
|
97
|
-
</script>
|
|
98
|
-
|
|
99
|
-
<template>
|
|
100
|
-
<iframe
|
|
101
|
-
ref="iframe"
|
|
102
|
-
:src="initialUrl"
|
|
103
|
-
@load="onLoad"
|
|
104
|
-
/>
|
|
105
|
-
</template>
|