@nuxt/devtools 1.1.0 → 1.1.2
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 -2
- package/dist/chunks/module-main.mjs +47 -1
- package/dist/client/200.html +15 -15
- package/dist/client/404.html +15 -15
- package/dist/client/_nuxt/{Dw-ZU76y.js → 05eipVqs.js} +1 -1
- package/dist/client/_nuxt/35i4wAMX.js +1 -0
- package/dist/client/_nuxt/{CblUgwwa.js → 5522rDXy.js} +1 -1
- package/dist/client/_nuxt/{CDDcSnPK.js → 8hufx-0P.js} +1 -1
- package/dist/client/_nuxt/{BrtgKGBY.js → B60kQZgx.js} +1 -1
- package/dist/client/_nuxt/{Coo6pmwX.js → BAEd9nCl.js} +1 -1
- package/dist/client/_nuxt/{Ci1dPZGg.js → BDkh8QK0.js} +1 -1
- package/dist/client/_nuxt/{BajVyxOZ.js → BGCrOz4e.js} +1 -1
- package/dist/client/_nuxt/{z_0T7nNf.js → BH9eSsM3.js} +1 -1
- package/dist/client/_nuxt/{CkT2yc6U.js → BMO0AzJa.js} +1 -1
- package/dist/client/_nuxt/{CdS8XaBJ.js → BRRmM0xY.js} +1 -1
- package/dist/client/_nuxt/{DmbtNPqq.js → BUzRqhRD.js} +1 -1
- package/dist/client/_nuxt/{Dt7Jhe5U.js → BahhYg3z.js} +1 -1
- package/dist/client/_nuxt/{Dw1fJENz.js → BoIcwzHe.js} +1 -1
- package/dist/client/_nuxt/{B5zbF1Ns.js → BrR1uaPL.js} +1 -1
- package/dist/client/_nuxt/{BF8Kd9Mz.js → Btmz1I6b.js} +1 -1
- package/dist/client/_nuxt/{BC8B3cgI.js → BxIo2FZE.js} +1 -1
- package/dist/client/_nuxt/{BEahU4zN.js → By0eb6Ij.js} +1 -1
- package/dist/client/_nuxt/{xLS-vzkA.js → BzBCjr50.js} +1 -1
- package/dist/client/_nuxt/{BH7H7KuD.js → C4lFqnv_.js} +1 -1
- package/dist/client/_nuxt/{BVD70z6r.js → C5LAasJC.js} +1 -1
- package/dist/client/_nuxt/{7hiTR5PB.js → CCI8m-9C.js} +1 -1
- package/dist/client/_nuxt/{tdLlBApQ.js → CHNBAloE.js} +1 -1
- package/dist/client/_nuxt/{DSo8oaHs.js → CKob1_mL.js} +1 -1
- package/dist/client/_nuxt/{BV6PKaGl.js → CSNWMf2X.js} +1 -1
- package/dist/client/_nuxt/{6jtm0BF9.js → CSZoFkhp.js} +1 -1
- package/dist/client/_nuxt/{z_5JL1Zh.js → CT68Z8ay.js} +1 -1
- package/dist/client/_nuxt/{CJ5q8Tg7.js → CUP8SSIE.js} +1 -1
- package/dist/client/_nuxt/{CBSPSh67.js → CX13B-L1.js} +1 -1
- package/dist/client/_nuxt/{Wx9V_rRD.js → ChFyfSj-.js} +1 -1
- package/dist/client/_nuxt/{Bcl6uqaN.js → CoG0T9C_.js} +1 -1
- package/dist/client/_nuxt/{DPQLghlB.js → Coo9jkJv.js} +1 -1
- package/dist/client/_nuxt/{wFhhlbUq.js → CsaIzWXD.js} +1 -1
- package/dist/client/_nuxt/{BkBsf4fV.js → Cumeyj8G.js} +1 -1
- package/dist/client/_nuxt/{B6I8sub5.js → CvdRAF54.js} +1 -1
- package/dist/client/_nuxt/{DyLVKLu8.js → CvkvF8B0.js} +1 -1
- package/dist/client/_nuxt/CyFpVQ5f.js +2 -0
- package/dist/client/_nuxt/{Dx8eINec.js → CzbknTwr.js} +1 -1
- package/dist/client/_nuxt/D-O8rTjO.js +105 -0
- package/dist/client/_nuxt/{CFm3KZee.js → D3a_2Jhy.js} +1 -1
- package/dist/client/_nuxt/{CTFc8btY.js → D5qO0ocA.js} +1 -1
- package/dist/client/_nuxt/{CIkrQBKj.js → DBwX64I2.js} +6 -6
- package/dist/client/_nuxt/{Cjc4f2ev.js → DDzYLyiY.js} +1 -1
- package/dist/client/_nuxt/{3oGDMuFq.js → DOhD0XD4.js} +1 -1
- package/dist/client/_nuxt/{D2q6OHSI.js → DWmRbhwd.js} +1 -1
- package/dist/client/_nuxt/{CzWzoIFD.js → Df-7Z7ap.js} +1 -1
- package/dist/client/_nuxt/{BVujVKxG.js → Dg4ajmlB.js} +1 -1
- package/dist/client/_nuxt/{BcogkuZh.js → DictM9hy.js} +1 -1
- package/dist/client/_nuxt/{k_A0nJhK.js → DkJgRml6.js} +1 -1
- package/dist/client/_nuxt/{BVYGtwfP.js → DohjUBb1.js} +1 -1
- package/dist/client/_nuxt/{BUvXV4QM.js → DsMIOSL0.js} +1 -1
- package/dist/client/_nuxt/{DhaiECBd.js → Dt-wn2qS.js} +1 -1
- package/dist/client/_nuxt/{DjUutLiq.js → Dy0bGpwB.js} +1 -1
- package/dist/client/_nuxt/{DOpbjCYu.js → H39NmHRU.js} +1 -1
- package/dist/client/_nuxt/{yRzYTuKL.js → RobKPY4N.js} +1 -1
- package/dist/client/_nuxt/{Dc1Hsvcx.js → RreOIvUw.js} +1 -1
- package/dist/client/_nuxt/builds/latest.json +1 -1
- package/dist/client/_nuxt/builds/meta/5301e8c6-9a1e-46bd-a583-33279d289002.json +1 -0
- package/dist/client/_nuxt/{DV66A8GP.js → jdRwaW7t.js} +1 -1
- package/dist/client/_nuxt/{pinia.BBoKCg80.css → pinia.uD6MMfzP.css} +1 -1
- package/dist/client/_nuxt/{D7YqW8lP.js → r3xdub1V.js} +1 -1
- package/dist/client/_nuxt/{XUyCDlLU.js → stCFyAu4.js} +1 -1
- package/dist/client/_nuxt/{BSuPiGtT.js → vOpv7-NV.js} +1 -1
- package/dist/client/index.html +15 -15
- package/dist/module.json +1 -1
- package/package.json +7 -7
- package/dist/client/_nuxt/BGDH87KL.js +0 -1
- package/dist/client/_nuxt/BrmerHXk.js +0 -105
- package/dist/client/_nuxt/DXVvxk8K.js +0 -1
- package/dist/client/_nuxt/builds/meta/34470db4-655e-46f1-a42f-a96f6eee9135.json +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as C}from"./
|
|
1
|
+
import{_ as C}from"./RobKPY4N.js";import{d as h,bM as S,e as x,a as w,aA as B,o as n,m as s,k as a,F as i,n as N,G as u,f as o,t as $,i as _,j as m,v as f,h as V,p,_ as T}from"./DBwX64I2.js";const D={key:0,relative:"","n-code-block":""},E={flex:"~ wrap","w-full":""},F=["onClick"],L=a("div",{border:"b base","flex-auto":""},null,-1),j={flex:"~ gap-2",px3:"",pb3:"",n:"sm primary"},M=h({__name:"CodeSnippets",props:{codeSnippets:{},eventType:{}},setup(v){const c=v,e=S(c.codeSnippets[0]),b=x(),k=w(()=>e.value?.lang||"text");return B(()=>{c.codeSnippets.includes(e.value)||(e.value=c.codeSnippets[0])}),(l,r)=>{const y=C,d=T;return l.codeSnippets.length?(n(),s("div",D,[a("div",E,[(n(!0),s(i,null,N(l.codeSnippets,(t,g)=>(n(),s("button",{key:g,px4:"",py2:"",border:"r base",hover:"bg-active",class:u(t===o(e)?"":"border-b"),onClick:z=>e.value=t},[a("div",{class:u(t===o(e)?"":"op30"),"font-mono":""},$(t.name),3)],10,F))),128)),L]),o(e)?(n(),s(i,{key:0},[_(y,{code:o(e).code,lang:o(k),lines:!1,"w-full":"","of-auto":"",p3:""},null,8,["code","lang"]),a("div",j,[_(d,{icon:"carbon-copy",onClick:r[0]||(r[0]=t=>o(b)(o(e).code,l.eventType||`code-snippet-${o(e).name}`))},{default:m(()=>[f(" Copy ")]),_:1}),o(e)?.docs?(n(),V(d,{key:0,to:o(e).docs,target:"_blank",icon:"carbon-catalog"},{default:m(()=>[f(" Docs ")]),_:1},8,["to"])):p("",!0)])],64)):p("",!0)])):p("",!0)}}});export{M as _};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as B,r as T,a as k,aq as W,f as t,o,m as s,k as e,t as $,h as y,j as x,bg as q,F as v,n as M,p as P,i as h,v as L,G as E,X as A,_ as G,ac as H,bh as D,b2 as X,b3 as J,ab as Q,an as Y,b4 as Z,ao as ee,l as te,ae as oe,L as ne,M as ae}from"./
|
|
1
|
+
import{d as B,r as T,a as k,aq as W,f as t,o,m as s,k as e,t as $,h as y,j as x,bg as q,F as v,n as M,p as P,i as h,v as L,G as E,X as A,_ as G,ac as H,bh as D,b2 as X,b3 as J,ab as Q,an as Y,b4 as Z,ao as ee,l as te,ae as oe,L as ne,M as ae}from"./DBwX64I2.js";import{_ as j}from"./By0eb6Ij.js";import{_ as F}from"./BrR1uaPL.js";import{_ as se}from"./RreOIvUw.js";import{_ as re}from"./Df-7Z7ap.js";import{_ as le}from"./stCFyAu4.js";import"./BzBCjr50.js";import"./DWmRbhwd.js";import"./CvkvF8B0.js";const ie={block:"","cursor-pointer":""},ue={p2:""},ce=["onSubmit"],de=e("div",{px2:"","text-sm":"",op50:""}," Fill params and navigate: ",-1),pe={flex:"~","items-center":"",p2:"","text-sm":"","font-mono":""},_e={key:1},he=B({__name:"RoutePathItem",props:{route:{}},emits:["navigate"],setup(V,{emit:i}){const d=V,w=i,m=T([]),p=k(()=>{const u=N(d.route.path);return m.value=Array.from({length:u.length},()=>""),u});function N(u){return u.split(/(:\w+[\?\*]?(?:\(\))?)/).filter(Boolean).map(_=>_[0]===":"?_.replace(/\(\)$/,"?"):_)}const r=k(()=>p.value.map((u,_)=>u[0]===":"?m.value[_]:u).join("").replace(/\/+/g,"/")),n=k(()=>d.route.path.includes(":"));function f(){w("navigate",r.value)}return(u,_)=>{const a=A,l=G,c=W("VDropdown");return t(n)?(o(),y(c,{key:1},{popper:x(({hide:g})=>[e("div",ue,[e("form",{flex:"~ col",onSubmit:q(()=>{f(),g()},["prevent"])},[t(n)?(o(),s(v,{key:0},[de,e("div",pe,[(o(!0),s(v,null,M(t(p),(b,R)=>(o(),s(v,{key:R},[b[0]===":"?(o(),y(a,{key:0,modelValue:t(m)[R],"onUpdate:modelValue":I=>t(m)[R]=I,"w-20":"","n-sm":"",placeholder:b.slice(1)},null,8,["modelValue","onUpdate:modelValue","placeholder"])):(o(),s("span",_e,$(b),1))],64))),128))])],64)):P("",!0),h(l,{block:"",n:"primary"},{default:x(()=>[L(" Navigate ")]),_:1})],40,ce)])]),default:x(()=>[e("code",ie,[(o(!0),s(v,null,M(t(p),(g,b)=>(o(),s("span",{key:b,class:E(g[0]===":"?"text-gray border border-dashed rounded border-gray:50 px1":"")},$(g[0]===":"?g.slice(1):g),3))),128))])]),_:1})):(o(),s("button",{key:0,onClick:f},[e("code",null,$(u.route.path),1)]))}}}),me={"w-full":""},fe=e("thead",{border:"b base"},[e("tr",null,[e("th",{"text-left":""}),e("th",{"text-left":""}," Route Path "),e("th",{"text-left":""}," Name "),e("th",{"text-left":""}," Middleware "),e("th",null," Layout ")])],-1),ge={"w-20":"","pr-1":""},ve={flex:"","items-center":"","justify-end":""},ye={"text-sm":""},be={flex:"inline gap3","items-center":""},xe={op0:"","group-hover:op100":"",flex:"~ gap1"},ke=["onClick"],$e=e("div",{"i-carbon-script-reference":""},null,-1),we=[$e],Ne={"w-0":"","ws-nowrap":"","pr-1":"","text-left":"","text-sm":"","font-mono":"",op50:""},Re={"w-0":"","ws-nowrap":"","pr-1":"","text-center":"","text-sm":"","font-mono":"",op50:""},Ce={"w-0":"","ws-nowrap":"","text-center":"","text-sm":"","font-mono":""},Pe={key:0},Ve=["onClick"],Ie=B({__name:"RoutesTable",props:{pages:{},layouts:{},matched:{},matchedPending:{}},emits:["navigate"],setup(V){const i=V,d=H(),w=D(),m=k(()=>[...i.pages].sort((r,n)=>r.path.localeCompare(n.path)));function p(r){const n=i.layouts.find(f=>f.name===r);n&&d(n.file)}function N(r){if(typeof r=="string")return w.value?.middleware.find(n=>n.name===r)?.path}return(r,n)=>{const f=j,u=he,_=F;return o(),s("div",null,[e("table",me,[fe,e("tbody",null,[(o(!0),s(v,null,M(t(m),a=>(o(),s("tr",{key:a.name,class:"group","h-7":"",border:"b dashed transparent hover:base"},[e("td",ge,[e("div",ve,[r.matched.find(l=>l.name===a.name)?(o(),y(f,{key:0,n:"green",title:"active",textContent:"active"})):r.matchedPending.find(l=>l.name===a.name)?(o(),y(f,{key:1,n:"teal",title:"next",textContent:"next"})):P("",!0)])]),e("td",ye,[e("div",be,[h(u,{route:a,class:E(r.matched.find(l=>l.name===a.name)?"text-primary":r.matchedPending.find(l=>l.name===a.name)?"text-teal":""),onNavigate:n[0]||(n[0]=l=>r.$emit("navigate",l))},null,8,["route","class"]),e("div",xe,[a.file||a.meta?.file?(o(),s("button",{key:0,"text-sm":"",op40:"",hover:"op100 text-primary",title:"Open in editor",onClick:l=>t(d)(a.file||a.meta?.file)},we,8,ke)):P("",!0)])])]),e("td",Ne,$(a.name),1),e("td",Re,[h(_,{filepath:N(a.meta.middleware),override:`${a.meta.middleware||"-"}`},null,8,["filepath","override"])]),e("td",Ce,[a.meta.layout===!1?(o(),s("span",Pe,"-")):a.meta.layout?(o(),s("button",{key:1,onClick:l=>p(a.meta.layout)},$(a.meta.layout),9,Ve)):(o(),s("button",{key:2,"text-sm":"",op15:"",onClick:n[1]||(n[1]=l=>p("default"))}," (default) "))])]))),128))])])])}}}),Le={class:"markdown-body"},Me=e("h1",null,"Pages",-1),Te=e("p",null,[L("Nuxt provides a file-based routing to create routes within your web application using Vue Router under the hood. Pages are Vue components and can have any valid extension that Nuxt supports (by default .vue, .js, .jsx, .mjs, .ts or .tsx). Nuxt will automatically create a route for every page in your "),e("code",null,"~/pages/"),L(" directory.")],-1),Be=e("p",null,[e("a",{href:"https://nuxt.com/docs/getting-started/routing",target:"_blank",rel:"noopener"},"Learn more in the documentation")],-1),Ee=e("hr",null,null,-1),Ae=e("h1",null,"Middlewares",-1),De=e("p",null,"Nuxt provides a customizable route middleware framework that can be used throughout the application. This is ideal for extracting code that needs to run before navigating to a particular route.",-1),je=e("p",null,[e("a",{href:"https://nuxt.com/docs/guide/directory-structure/middleware",target:"_blank",rel:"noopener"},"Learn more in the documentation")],-1),Fe=[Me,Te,Be,Ee,Ae,De,je],Se={__name:"pages",setup(V,{expose:i}){return i({frontmatter:{}}),(w,m)=>(o(),s("div",Le,Fe))}},ze={key:0,"h-full":"","of-auto":""},Ue={border:"b base",flex:"~ col gap1",px4:"",py3:"","n-navbar-glass":""},Ke=e("span",{op50:""},"Navigate from ",-1),Oe={"font-mono":""},We=e("span",{op50:""}," to ",-1),qe={key:1,op50:""},Ge=e("span",null,[L("Press "),e("b",{"font-bold":""},"Enter"),L(" to navigate")],-1),He={key:0,"text-orange":"",op75:""},Xe={key:1,op50:""},Je={"min-h-14":""},Qe={key:1,class:"py-4 text-center"},Ye=e("span",{op50:""},"No routes matched",-1),Ze=[Ye],et={"w-full":""},tt=e("thead",{border:"b base","h-7":""},[e("tr",null,[e("th",{"text-left":""}," Name "),e("th",{"text-left":""}," Path ")])],-1),ot={mr1:""},pt=B({__name:"pages",setup(V){const i=X(),d=J(),w=Q(),m=D(),p=Y(),N=Z(),r=k(()=>m.value?.middleware||[]),n=T(""),f=T(0),u=k(()=>(r.value,n.value,p.value,f.value,i.value?.currentRoute?.value?.path));ee(()=>{d.value&&(n.value=i.value?.currentRoute?.value?.path),i.value?.beforeEach(c=>{n.value=c.fullPath}),i.value?.afterEach(c=>{n.value=c.fullPath})});async function _(){n.value!==i.value?.currentRoute?.value?.path&&i.value.push(n.value||"/")}const a=k(()=>i.value.resolve(n.value||"/").matched);function l(c){i.value.push(c),n.value=c}return(c,g)=>{const b=A,R=Ie,I=se,S=j,z=F,U=re,K=Se,O=le;return o(),s(v,null,[t(w)?.pages&&t(i)?(o(),s("div",ze,[e("div",Ue,[e("div",null,[t(u)!==t(n)?(o(),s(v,{key:0},[Ke,e("span",Oe,$(t(u)),1),We],64)):(o(),s("span",qe,"Current route"))]),h(b,{modelValue:t(n),"onUpdate:modelValue":g[0]||(g[0]=C=>te(n)?n.value=C:null),"font-mono":"",icon:"carbon-direction-right-01 scale-y--100",class:E(t(u)===t(n)?"":t(a).length?"text-green":"text-orange"),onKeydown:oe(_,["enter"])},null,8,["modelValue","class"]),e("div",null,[t(u)!==t(n)?(o(),s(v,{key:0},[Ge,t(a).length?P("",!0):(o(),s("span",He," (no match)"))],64)):(o(),s("span",Xe,"Edit path above to navigate"))])]),h(I,{icon:"carbon-tree-view",text:"Matched Routes",padding:!1},{default:x(()=>[e("div",Je,[t(a).length?(o(),y(R,{key:0,pages:t(a),layouts:t(p)||[],matched:t(d).matched,"matched-pending":t(a),onNavigate:l},null,8,["pages","layouts","matched","matched-pending"])):(o(),s("div",Qe,Ze))])]),_:1}),h(I,{icon:"carbon-tree-view-alt",text:"All Routes",description:`${t(N).length} routes registered in your application`,padding:"pr5"},{default:x(()=>[h(R,{pages:t(N),layouts:t(p)||[],matched:t(d).matched,"matched-pending":t(a),onNavigate:l},null,8,["pages","layouts","matched","matched-pending"])]),_:1},8,["description"]),t(r).length?(o(),y(I,{key:0,icon:"carbon:ibm-watson-studio",text:"Middleware",description:`${t(r).length} middleware registered in your application`,padding:"px13"},{default:x(()=>[e("table",et,[tt,(o(!0),s(v,null,M(t(r),C=>(o(),s("tr",{key:C.path,"h-7":""},[e("td",null,[e("span",ot,$(C.name),1),C.global?(o(),y(S,{key:0,n:"green",title:"Registered at runtime as a global component",textContent:"global"})):P("",!0)]),e("td",null,[h(z,{filepath:C.path},null,8,["filepath"])])]))),128))])]),_:1},8,["description"])):P("",!0)])):(o(),y(U,{key:1,icon:"carbon-tree-view-alt",name:"wizard-pages",title:"Nuxt Routing",description:"Create `./pages/index.vue` to enable routing",actions:[{label:"Learn more",src:"https://nuxt.com/docs/getting-started/routing",attrs:{n:"primary"}},{label:"Enable Routing",async handle(){return("rpc"in c?c.rpc:t(ne)).runWizard(await("ensureDevAuthToken"in c?c.ensureDevAuthToken:t(ae))(),"enablePages")}}]},null,8,["actions"])),h(O,null,{default:x(()=>[h(K)]),_:1})],64)}}});export{pt as default};
|