@nuxt/devtools-nightly 2.0.0-beta.7-28979078.dd9a91a → 2.1.0-28994893.66d2743
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/module-main.mjs +3 -2
- package/dist/chunks/vue-devtools.mjs +3 -3
- package/dist/client/200.html +23 -23
- package/dist/client/404.html +23 -23
- package/dist/client/_nuxt/__blank-ld6vcstp.js +1 -0
- package/dist/client/_nuxt/{analyze-build-osypvinl.js → analyze-build-bbw1j0bw.js} +1 -1
- package/dist/client/_nuxt/{assets-kabfym3l.js → assets-bi7gxmg8.js} +1 -1
- package/dist/client/_nuxt/builds/latest.json +1 -1
- package/dist/client/_nuxt/builds/meta/e0e21221-5c8e-43a8-8f88-1af9f45bb798.json +1 -0
- package/dist/client/_nuxt/{client-kpmlv67d.js → client-edufhzwa.js} +1 -1
- package/dist/client/_nuxt/{code-diff.vue-j7k3a6r3.js → code-diff.vue-g3avq04d.js} +1 -1
- package/dist/client/_nuxt/{code-snippets.vue-o376xgrr.js → code-snippets.vue-pb1tfwrq.js} +1 -1
- package/dist/client/_nuxt/components-jj59wik2.js +1 -0
- package/dist/client/_nuxt/composable-item.vue-mk5d6ui8.js +1 -0
- package/dist/client/_nuxt/{custom-_name_-g0vgtf0l.js → custom-_name_-dhzxcwaa.js} +1 -1
- package/dist/client/_nuxt/{data-schema-button.vue-nqa7vss8.js → data-schema-button.vue-ln7d6h5v.js} +1 -1
- package/dist/client/_nuxt/data-schema-drawer-jso1cuzu.js +2 -0
- package/dist/client/_nuxt/{default-dscxupqw.js → default-e26uk9yr.js} +1 -1
- package/dist/client/_nuxt/{duration-display.vue-dzttyi5n.js → duration-display.vue-gu7el5x3.js} +1 -1
- package/dist/client/_nuxt/entry.css-jfo9gib8.css +1 -0
- package/dist/client/_nuxt/{error-404-eg5womw1.js → error-404-fr7rmvj2.js} +1 -1
- package/dist/client/_nuxt/error-404.css-fsdpg4tp.css +1 -0
- package/dist/client/_nuxt/{error-500-ins5mmhy.js → error-500-jkjkadzh.js} +1 -1
- package/dist/client/_nuxt/error-500.css-bernuda7.css +1 -0
- package/dist/client/_nuxt/{error-bgufcoup.js → error-b4db6oh7.js} +1 -1
- package/dist/client/_nuxt/{filepath-item.vue-ipkw48nj.js → filepath-item.vue-g22bjf3y.js} +1 -1
- package/dist/client/_nuxt/full-l2nep87m.js +1 -0
- package/dist/client/_nuxt/{help-fab.vue-p3sb2h0t.js → help-fab.vue-g6r95f4a.js} +1 -1
- package/dist/client/_nuxt/{hooks-i4vk7gi5.js → hooks-f19zeth2.js} +1 -1
- package/dist/client/_nuxt/imports-cmpiiypv.js +1 -0
- package/dist/client/_nuxt/{index-jorw6bxa.js → index-o5ob665o.js} +1 -1
- package/dist/client/_nuxt/index-obsucz0g.js +1 -0
- package/dist/client/_nuxt/launch-page.vue-nu5zj08b.js +1 -0
- package/dist/client/_nuxt/modules-da941xpo.js +1 -0
- package/dist/client/_nuxt/nbadge-frtnezb1.js +1 -0
- package/dist/client/_nuxt/{ncheckbox.vue-feskyxd0.js → ncheckbox.vue-ig2h3zb6.js} +1 -1
- package/dist/client/_nuxt/{ncode-block.vue-dt6krs6h.js → ncode-block.vue-msaaoy71.js} +1 -1
- package/dist/client/_nuxt/{ndrawer.vue-b09njjbc.js → ndrawer.vue-k29v8tvh.js} +1 -1
- package/dist/client/_nuxt/ndropdown.vue-e8lbf8tw.js +1 -0
- package/dist/client/_nuxt/{nicon-title.vue-hzhi6u0u.js → nicon-title.vue-j1ceohu1.js} +1 -1
- package/dist/client/_nuxt/{nlink.vue-n6hbz6nn.js → nlink.vue-g66yr6dr.js} +1 -1
- package/dist/client/_nuxt/{nmarkdown.vue-jpbjhala.js → nmarkdown.vue-oxfi26vk.js} +1 -1
- package/dist/client/_nuxt/{nnavbar.vue-fsgszvqg.js → nnavbar.vue-ni09o3gk.js} +1 -1
- package/dist/client/_nuxt/none-gde59ngk.js +1 -0
- package/dist/client/_nuxt/{nsection-block-iefigwly.js → nsection-block-d3wydn3r.js} +1 -1
- package/dist/client/_nuxt/{nselect-tabs.vue-lh4in903.js → nselect-tabs.vue-df8z3fh5.js} +1 -1
- package/dist/client/_nuxt/{nselect.vue-7oki02k8.js → nselect.vue-oz295hvu.js} +1 -1
- package/dist/client/_nuxt/{nswitch.vue-iu20lc9i.js → nswitch.vue-l8xqfho0.js} +1 -1
- package/dist/client/_nuxt/nsxgpy6n.js +17 -0
- package/dist/client/_nuxt/{open-graph-gj21w2an.js → open-graph-nmk7o6qa.js} +1 -1
- package/dist/client/_nuxt/overview-i50bin0e.js +1 -0
- package/dist/client/_nuxt/{pages-haifvw2e.js → pages-keqq3uu3.js} +1 -1
- package/dist/client/_nuxt/{payload-ig1oqqar.js → payload-bcazh2dd.js} +1 -1
- package/dist/client/_nuxt/pinia-ljqe092p.js +1 -0
- package/dist/client/_nuxt/{plugins-hmadqzxz.js → plugins-dp3odh07.js} +1 -1
- package/dist/client/_nuxt/render-tree-my7wf4ar.js +1 -0
- package/dist/client/_nuxt/{runtime-configs-ievg11jo.js → runtime-configs-htj9sk5u.js} +1 -1
- package/dist/client/_nuxt/{server-discovery-fydvq0gt.js → server-discovery-o4v1gv64.js} +1 -1
- package/dist/client/_nuxt/{server-route-inputs.vue-n7a1uel1.js → server-route-inputs.vue-eoisa322.js} +1 -1
- package/dist/client/_nuxt/{server-routes-dpgoyzw9.js → server-routes-m3zy6o3n.js} +2 -2
- package/dist/client/_nuxt/{server-tasks-ab1nq458.js → server-tasks-e6qb7ohx.js} +1 -1
- package/dist/client/_nuxt/{settings-lt1pi5fu.js → settings-ocsdlkok.js} +1 -1
- package/dist/client/_nuxt/{stacktrace-list.vue-nd6leugh.js → stacktrace-list.vue-fnbs7811.js} +1 -1
- package/dist/client/_nuxt/{state-components-h1pv8gv7.js → state-components-ir9sclpw.js} +1 -1
- package/dist/client/_nuxt/state-editor.vue-o2zmurug.js +1 -0
- package/dist/client/_nuxt/{state-modules-cgbrs35c.js → state-modules-iferti41.js} +1 -1
- package/dist/client/_nuxt/{storage-oi52w3em.js → storage-lc8pnxkn.js} +1 -1
- package/dist/client/_nuxt/{terminals-g9pq9aij.js → terminals-ngo4bh3b.js} +1 -1
- package/dist/client/_nuxt/timeline-b5t9f6n1.js +31 -0
- package/dist/client/_nuxt/{unocss-runtime-cb61k1ql.js → unocss-runtime-gc1hqonm.js} +1 -1
- package/dist/client/_nuxt/vendor/json-editor-vue-npezbdce.js +3818 -0
- package/dist/client/_nuxt/vendor/{quicktype-core-lnbp3n5r.js → quicktype-core-i8ym98gu.js} +1 -1
- package/dist/client/_nuxt/vendor/{shiki-ja073547.js → shiki-ian6uf3s.js} +26 -26
- package/dist/client/_nuxt/vendor/{unocss-mstcul8h.js → unocss-hjqyvvq7.js} +2 -2
- package/dist/client/_nuxt/{virtual-files-f10idtc4.js → virtual-files-j3rhkqmq.js} +1 -1
- package/dist/client/_nuxt/vue-devtools-lrln5ymm.js +2 -0
- package/dist/client/_nuxt/{vue-virtual-scroller.esm-ryb7s73q.js → vue-virtual-scroller.esm-guzt9iin.js} +1 -1
- package/dist/client/index.html +23 -23
- package/dist/module.d.mts +1 -1
- package/dist/module.d.ts +1 -1
- package/dist/module.json +1 -1
- package/dist/runtime/plugins/view/Main.vue +1 -1
- package/dist/runtime/plugins/view/client.js +8 -5
- package/dist/shared/{devtools-nightly.2a48a9e5.d.mts → devtools-nightly.2e078e30.d.mts} +4 -0
- package/dist/shared/{devtools-nightly.2a48a9e5.d.ts → devtools-nightly.2e078e30.d.ts} +4 -0
- package/dist/types.d.mts +1 -1
- package/dist/types.d.ts +1 -1
- package/package.json +27 -27
- package/dist/client/_nuxt/__blank-i73w98ot.js +0 -1
- package/dist/client/_nuxt/builds/meta/c09c67b3-1799-4690-9b4b-e93e60520f9c.json +0 -1
- package/dist/client/_nuxt/components-j500sapl.js +0 -1
- package/dist/client/_nuxt/composable-item.vue-ne7y5jza.js +0 -1
- package/dist/client/_nuxt/data-schema-drawer-mr2wbyy1.js +0 -2
- package/dist/client/_nuxt/entry.css-gcfkqtar.css +0 -1
- package/dist/client/_nuxt/error-404.css-fwe7gpvk.css +0 -1
- package/dist/client/_nuxt/error-500.css-djemplc9.css +0 -1
- package/dist/client/_nuxt/full-nrro384i.js +0 -1
- package/dist/client/_nuxt/imports-k7recz0n.js +0 -1
- package/dist/client/_nuxt/index-kaszxz8x.js +0 -2
- package/dist/client/_nuxt/launch-page.vue-gca7uxfe.js +0 -1
- package/dist/client/_nuxt/modules-m680c0mj.js +0 -1
- package/dist/client/_nuxt/nbadge-lmur87ty.js +0 -1
- package/dist/client/_nuxt/ndropdown.vue-j9ga9cm2.js +0 -1
- package/dist/client/_nuxt/none-eo3diko6.js +0 -1
- package/dist/client/_nuxt/ork67mdr.js +0 -17
- package/dist/client/_nuxt/overview-m1kjwsk2.js +0 -1
- package/dist/client/_nuxt/pinia-kied7w5j.js +0 -1
- package/dist/client/_nuxt/render-tree-hu59echi.js +0 -1
- package/dist/client/_nuxt/state-editor.vue-fofa87a8.js +0 -1
- package/dist/client/_nuxt/timeline-c4zyui8l.js +0 -31
- package/dist/client/_nuxt/vendor/json-editor-vue-kcahofzr.js +0 -3818
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{f as M,K as P,a7 as z,an as O,ao as $,p as E,h as F,ap as g,aq as k,ar as K,a2 as q,i as G,m as H,j as U,e as W,A as X,_ as Z}from"./ork67mdr.js";import{u as J,_ as Q}from"./state-modules-cgbrs35c.js";import{u as Y}from"./state-components-h1pv8gv7.js";import{p as h,q as A,P as v,a2 as n,U as s,u as o,W as p,X as e,a3 as i,a8 as r,Z as u,F as f,a9 as l}from"./vendor/json-editor-vue-kcahofzr.js";import"./vendor/unocss-mstcul8h.js";import"./vendor/shiki-ja073547.js";import"./nbadge-lmur87ty.js";import"./ncode-block.vue-dt6krs6h.js";import"./client-kpmlv67d.js";import"./ncheckbox.vue-feskyxd0.js";const c="2.0.0-beta.7-28979078.dd9a91a",tt={key:0},et={key:1,flex:"~ col gap2",ma:"","h-full":"","max-w-300":"","w-full":"",p5:"",px5:"","md:px20":""},ot={flex:"~ col","mt-5":"","items-center":"","md:mt-20":""},nt={op40:""},st={flex:"~ gap2 wrap"},lt={key:5,"pointer-events-none":"","min-w-40":"",p4:"","theme-card-lime":"",flex:"~ auto gap-6"},it={grid:"~ cols-[auto_auto] gap-x-5 items-center"},ut={"text-right":""},at={"text-right":""},rt={"text-right":""},dt={"text-right":""},pt={flex:"~ col gap2"},mt={flex:"~ gap-6 wrap","mt-5":"","items-center":"","justify-center":""},xt={flex:"col gap-2",mxa:"",hidden:"","w-100":"","text-sm":"",op50:"","md:flex":""},vt={flex:"~ gap-1","items-center":""},ft={flex:"~ gap-1","items-center":""},jt=h({__name:"overview",setup(gt){const b=M(),m=P(),D=Y(),y=z(),j=J(),B=O(),w=$(),I=E();function V(){G.value=!0,I.push("/")}const S=A(()=>b.value?.nuxt.vueApp.version),a=A(()=>b.value?.metrics.loading());function L(){H()}return(_,t)=>{const R=U,x=W,C=Q,N=X,d=Z,T=F;return s(),v(T,{"h-screen":"","w-full":"",flex:""},{default:n(()=>[o(m)?(s(),p("div",et,[t[40]||(t[40]=e("div",{"flex-auto":""},null,-1)),e("div",ot,[i(x,{flex:"~","mt--10":"","items-center":"","justify-center":"",to:"https://devtools.nuxt.com/",target:"_blank"},{default:n(()=>[i(R,{"h-10":""})]),_:1}),e("button",{mb6:"",mt3:"","text-center":"","text-sm":"",flex:"~ gap-1 wrap",onClick:V},[t[0]||(t[0]=e("span",{op40:""}," Nuxt DevTools ",-1)),e("code",nt,"v"+r(o(c)),1),i(C,{"package-name":"@nuxt/devtools",options:{dev:!0},"show-version":!1})])]),e("div",st,[i(x,{to:"https://nuxt.com",target:"_blank",p4:"","theme-card-green":"",flex:"~ col auto"},{default:n(()=>[t[1]||(t[1]=e("div",{"logos-nuxt-icon":"","text-3xl":""},null,-1)),i(C,{"package-name":"nuxt",options:{dev:!0}})]),_:1}),S.value?(s(),v(x,{key:0,to:"https://vuejs.org",target:"_blank",p4:"","theme-card-green":"",flex:"~ col auto"},{default:n(()=>[t[2]||(t[2]=e("div",{"logos-vue":"","text-3xl":""},null,-1)),e("code",null,"v"+r(S.value),1)]),_:1})):u("",!0),o(m)?(s(),p(f,{key:1},[o(m)&&o(m).pages&&o(b)?(s(),v(x,{key:0,"min-w-40":"",p4:"","theme-card-lime":"",flex:"~ col auto",to:"/modules/pages"},{default:n(()=>[t[3]||(t[3]=e("div",{"carbon-tree-view-alt":"","text-3xl":""},null,-1)),e("div",null,r(o(g)(o(B).length,"page")),1)]),_:1})):u("",!0),o(m)?(s(),v(x,{key:1,"min-w-40":"",p4:"","theme-card-lime":"",flex:"~ col auto",to:"/modules/components"},{default:n(()=>[t[4]||(t[4]=e("div",{"i-carbon-assembly-cluster":"","text-3xl":""},null,-1)),e("div",null,r(o(g)(o(D).length,"component")),1)]),_:1})):u("",!0),o(m)&&o(y)?(s(),v(x,{key:2,"min-w-40":"",p4:"","theme-card-yellow":"",flex:"~ col auto",to:"/modules/imports"},{default:n(()=>[t[5]||(t[5]=e("div",{"carbon-function":"","text-3xl":""},null,-1)),e("div",null,r(o(g)(o(y).imports.length,"import")),1)]),_:1})):u("",!0),o(m)?(s(),v(x,{key:3,"min-w-40":"",p4:"","theme-card-purple":"",flex:"~ col auto",to:"/modules/modules"},{default:n(()=>[t[6]||(t[6]=e("div",{"carbon-3d-mpr-toggle":"","text-3xl":""},null,-1)),e("div",null,r(o(g)(o(j).length,"module")),1)]),_:1})):u("",!0),o(m)?(s(),v(x,{key:4,"min-w-40":"",p4:"","theme-card-teal":"",flex:"~ col auto",to:"/modules/plugins"},{default:n(()=>[t[7]||(t[7]=e("div",{"carbon-plug":"","text-3xl":""},null,-1)),e("div",null,r(o(g)(o(m).plugins.length,"plugin")),1)]),_:1})):u("",!0),a.value?(s(),p("div",lt,[t[12]||(t[12]=e("div",{"i-carbon-time-plot":"","flex-none":"","text-3xl":""},null,-1)),e("div",it,[a.value.ssrStart?(s(),p(f,{key:0},[t[8]||(t[8]=e("div",{"text-sm":""}," SSR to full load ",-1)),e("div",ut,r(o(k)(a.value.appLoad-a.value.ssrStart)),1)],64)):u("",!0),t[10]||(t[10]=e("div",{"text-sm":""}," Page load ",-1)),e("div",at,r(o(k)(a.value.appLoad-a.value.appInit)),1),t[11]||(t[11]=e("div",{"text-sm":""}," Navigation ",-1)),e("div",rt,r(o(k)(a.value.pageEnd-a.value.pageStart)),1),a.value.hmrStart?(s(),p(f,{key:1},[t[9]||(t[9]=e("div",{"text-sm":""}," HMR ",-1)),e("div",dt,r(o(k)(a.value.hmrEnd-a.value.hmrStart)),1)],64)):u("",!0)])])):u("",!0)],64)):u("",!0)]),e("div",pt,[o(K)?(s(),v(N,{key:0,n:"yellow5",icon:"carbon-unlink","justify-center":""},{default:n(()=>t[13]||(t[13]=[l(" Not connected to the client app, showing server-side data only. Use the embedded mode for full features. ")])),_:1})):u("",!0),e("button",{title:"Authorize",onClick:L},[("isDevAuthed"in _?_.isDevAuthed:o(q))?u("",!0):(s(),v(N,{key:0,n:"orange5",icon:"i-carbon-locked","justify-center":""},{default:n(()=>t[14]||(t[14]=[l(" Access from an untrusted browser, some features are limited. Click to authorize now. ")])),_:1}))])]),e("div",mt,[t[16]||(t[16]=e("a",{href:"https://github.com/nuxt/devtools",target:"_blank",flex:"~ gap1","items-center":"",op50:"",hover:"op100 text-blue",transition:""},[e("div",{"i-carbon-star":""}),l(" Star on GitHub ")],-1)),t[17]||(t[17]=e("a",{href:"https://github.com/nuxt/devtools/discussions/29",target:"_blank",flex:"~ gap1","items-center":"",op50:"",hover:"op100 text-yellow",transition:""},[e("div",{"i-carbon-data-enrichment":""}),l(" Ideas & Suggestions ")],-1)),t[18]||(t[18]=e("a",{href:"https://github.com/nuxt/devtools/discussions/31",target:"_blank",flex:"~ gap1","items-center":"",op50:"",hover:"op100 text-lime",transition:""},[e("div",{"i-carbon-plan":""}),l(" Project Roadmap ")],-1)),t[19]||(t[19]=e("a",{href:"https://github.com/nuxt/devtools/issues",target:"_blank",flex:"~ gap1","items-center":"",op50:"",hover:"op100 text-rose",transition:""},[e("div",{"i-carbon-debug":""}),l(" Bug Reports ")],-1)),i(x,{to:"/settings",flex:"~ gap1","inline-block":"","items-center":"",op50:"","hover:op80":""},{default:n(()=>t[15]||(t[15]=[e("div",{"i-carbon-settings-adjust":""},null,-1),l(" Settings ")])),_:1})]),t[41]||(t[41]=e("div",{"flex-auto":""},null,-1)),e("div",xt,[e("div",vt,[o(w)?(s(),p(f,{key:0},[i(d,{n:"xs",class:"px2"},{default:n(()=>t[20]||(t[20]=[l(" ⌘ Cmd ")])),_:1}),t[22]||(t[22]=e("span",null,"+",-1)),i(d,{n:"xs",class:"px2"},{default:n(()=>t[21]||(t[21]=[l(" K ")])),_:1})],64)):(s(),p(f,{key:1},[i(d,{n:"xs",class:"px2"},{default:n(()=>t[23]||(t[23]=[l(" Ctrl ")])),_:1}),t[25]||(t[25]=e("span",null,"+",-1)),i(d,{n:"xs",class:"px2"},{default:n(()=>t[24]||(t[24]=[l(" K ")])),_:1})],64)),t[26]||(t[26]=e("div",{"flex-auto":""},null,-1)),t[27]||(t[27]=l(" Open Command Palette "))]),e("div",ft,[o(w)?(s(),p(f,{key:0},[i(d,{n:"xs",class:"px2"},{default:n(()=>t[28]||(t[28]=[l(" ⇧ Shift ")])),_:1}),t[31]||(t[31]=e("span",null,"+",-1)),i(d,{n:"xs",class:"px2"},{default:n(()=>t[29]||(t[29]=[l(" ⌥ Option ")])),_:1}),t[32]||(t[32]=e("span",null,"+",-1)),i(d,{n:"xs",class:"px2"},{default:n(()=>t[30]||(t[30]=[l(" D ")])),_:1})],64)):(s(),p(f,{key:1},[i(d,{n:"xs",class:"px2"},{default:n(()=>t[33]||(t[33]=[l(" Shift ")])),_:1}),t[36]||(t[36]=e("span",null,"+",-1)),i(d,{n:"xs",class:"px2"},{default:n(()=>t[34]||(t[34]=[l(" Alt ")])),_:1}),t[37]||(t[37]=e("span",null,"+",-1)),i(d,{n:"xs",class:"px2"},{default:n(()=>t[35]||(t[35]=[l(" D ")])),_:1})],64)),t[38]||(t[38]=e("div",{"flex-auto":""},null,-1)),t[39]||(t[39]=e("div",null,"Toggle DevTools",-1))])])])):(s(),p("div",tt," Loading... "))]),_:1})}}});export{jt as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{az as r,aA as c}from"./ork67mdr.js";import{v as p}from"./index-kaszxz8x.js";import{p as i,W as m,u as o,P as n,a2 as _,U as t,a9 as l}from"./vendor/json-editor-vue-kcahofzr.js";import"./vendor/unocss-mstcul8h.js";import"./vendor/shiki-ja073547.js";import"./vue-virtual-scroller.esm-ryb7s73q.js";const u={class:"h-full w-full"},h=i({__name:"pinia",setup(f){const{connected:a}=r();return(d,e)=>{const s=c;return t(),m("div",u,[o(a)?(t(),n(o(p),{key:0})):(t(),n(s,{key:1},{default:_(()=>e[0]||(e[0]=[l(" Connecting.... ")])),_:1}))])}}});export{h as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{az as m,f as d,L as c,aA as f}from"./ork67mdr.js";import{p as _}from"./index-kaszxz8x.js";import{p as v,W as C,u as n,P as a,a2 as E,U as o,a9 as I}from"./vendor/json-editor-vue-kcahofzr.js";import"./vendor/unocss-mstcul8h.js";import"./vendor/shiki-ja073547.js";import"./vue-virtual-scroller.esm-ryb7s73q.js";const k={class:"h-full w-full"},N=v({__name:"render-tree",setup(x){const{connected:p}=m(),t=d(),l=c();function s(r){r?t.value.devtools.open():t.value.devtools.close()}return(r,e)=>{const i=f;return o(),C("div",k,[n(p)?(o(),a(n(_),{key:0,onOnInspectComponentStart:e[0]||(e[0]=u=>s(!1)),onOnInspectComponentEnd:e[1]||(e[1]=u=>s(!0)),onOpenInEditor:n(l)},null,8,["onOpenInEditor"])):(o(),a(i,{key:1},{default:E(()=>e[2]||(e[2]=[I(" Connecting.... ")])),_:1}))])}}});export{N as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{C,R as N,_ as O}from"./ork67mdr.js";import{_ as R}from"./data-schema-button.vue-nqa7vss8.js";import{p as $,m as g,z as j,j as z,ag as D,U as l,W as c,X as m,a0 as d,u as o,a8 as b,Z as p,Y as M,a5 as P,a6 as E,F as k,ab as J,a3 as A,P as h,a4 as F,ax as U,n as x}from"./vendor/json-editor-vue-kcahofzr.js";const T=["open"],W={flex:"~ gap2","select-none":"","items-center":"",px4:""},X={key:0,class:"bg-red:10 px5 py3 text-red"},H=$({__name:"StateEditor",props:{name:{},open:{type:Boolean},revision:{},state:{},readonly:{type:Boolean}},emits:["update:open"],setup(_,{emit:V}){const t=_,s=C(t,"open",V,{passive:!0}),B=N(),i=g(),u=g();function f(){u.value=void 0;try{t.state?i.value=JSON.parse(JSON.stringify(t.state||{})):(typeof t.state=="number"||typeof t.state!="string")&&(i.value=t.state)}catch(e){console.error(e),u.value=e}}j(()=>{f(),z(()=>[t.revision,t.state],e=>{typeof e!="number"&&typeof e!="string"?v(e,t.state):i.value=t.state},{deep:!0})});function v(e,r){const n=e[1];for(const a in n)Array.isArray(n[a])?r[a]=n[a].slice():typeof n[a]=="object"&&n[a]!==null?v(n[a],r[a]):r[a]=n[a]}async function S(){f(),await x()}return(e,r)=>{const n=O,a=R,w=D("tooltip");return l(),c("div",{class:"state-editor-details",open:e.name?o(s):!0},[m("div",W,[e.name?(l(),c("button",{key:0,flex:"~","cursor-pointer":"","items-center":"",class:d(o(s)?"":"op50"),onClick:r[0]||(r[0]=y=>s.value=!o(s))},[m("div",{"i-carbon-chevron-right":"",transition:"",class:d(o(s)?"rotate-90 op0":"")},null,2),m("code",{px3:"",py1:"","font-mono":"",class:d(o(s)?"bg-[#8881] rounded-t":"rounded hover:bg-active")},b(e.name),3)],2)):p("",!0),M(e.$slots,"actions",P(E({isOpen:o(s),name:e.name,state:e.state}))),o(s)?(l(),c(k,{key:1},[J(A(n,{title:"Refresh View",icon:"carbon-renew",border:!1,onClick:S},null,512),[[w,"Refresh View",void 0,{bottom:!0}]]),i.value&&!u.value?(l(),h(a,{key:0,getter:()=>({name:e.name,input:JSON.stringify(i.value)})},null,8,["getter"])):p("",!0)],64)):p("",!0)]),o(s)||!e.name?(l(),c(k,{key:0},[u.value?(l(),c("div",X," Error: "+b(u.value),1)):(l(),h(o(U),F({key:1,modelValue:i.value,"onUpdate:modelValue":r[1]||(r[1]=y=>i.value=y)},e.$attrs,{class:["json-editor-vue",[o(B)==="dark"?"jse-theme-dark":"",(e.name,"")]],"main-menu-bar":!1,"navigation-bar":!1,"status-bar":!1,"read-only":t.readonly,indentation:2,"tab-size":2}),null,16,["modelValue","class","read-only"]))],64)):p("",!0)],8,T)}}});export{H as _};
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import{a5 as V,M as O,D as j,bh as Y,b as U,R as q,a as K,_ as z,a7 as X,f as Z,bi as Q,K as ee,n as se,L as ne,h as te,r as G,G as oe,B as ae}from"./ork67mdr.js";import{_ as W}from"./duration-display.vue-dzttyi5n.js";import{p as B,q as w,U as o,W as i,X as t,$ as T,a8 as m,u as g,F as y,ae as E,P as h,f as C,j as le,n as re,Z as x,a3 as u,a0 as R,V as P,a2 as v,ax as ie,a4 as pe,a9 as F,aj as ce}from"./vendor/json-editor-vue-kcahofzr.js";import{_ as H}from"./nbadge-lmur87ty.js";import{_ as de}from"./composable-item.vue-ne7y5jza.js";import{_ as ue}from"./stacktrace-list.vue-nd6leugh.js";import{_ as me}from"./ndrawer.vue-b09njjbc.js";import{_ as ke}from"./launch-page.vue-gca7uxfe.js";import{_ as fe}from"./nlink.vue-n6hbz6nn.js";import{_ as ye}from"./code-diff.vue-j7k3a6r3.js";import{_ as he}from"./help-fab.vue-p3sb2h0t.js";import"./vendor/unocss-mstcul8h.js";import"./vendor/shiki-ja073547.js";import"./nmarkdown.vue-jpbjhala.js";import"./client-kpmlv67d.js";import"./filepath-item.vue-ipkw48nj.js";import"./constants-b32h69zq.js";import"./ncode-block.vue-dt6krs6h.js";const ve=B({__name:"TimelineItemFunction",props:{item:{}},setup(f){const d=f,p=w(()=>V(d.item.name,50,60,"_op_")),n=w(()=>p.value.replace(/_op_/,"1")),e=w(()=>V(d.item.name,50,40)),l=w(()=>p.value.replace(/_op_/,"0.2"));return(a,r)=>(o(),i("button",{class:"group",style:T({color:n.value,borderLeft:`2px solid ${n.value}`}),relative:"","text-sm":"",transition:"","hover:z-1000":"","bg-base":""},[t("div",{style:T({backgroundColor:l.value}),absolute:"","bottom-0":"","left--1px":"","top-0":"","w-full":"","text-sm":"","transition-all":"","duration-300":""},null,4),t("div",{style:T({color:e.value,"--c":n.value}),border:"r-2 t-2 y-2 transparent","min-w-max":"",px1:"","text-left":"","group-hover":"border-$c"},m(a.item.name),5)],4))}}),_e={relative:"","h-full":""},be={absolute:"","left-2":"","top-2.3em":"","text-xs":"",op50:""},ge=B({__name:"TimelineSegment",props:{segment:{}},emits:["select"],setup(f,{emit:d}){const p=f,n=d,e=O(()=>p.segment.start,{updateInterval:1e3,showSecond:!0,controls:!1,messages:{justNow:"",past:l=>l,future:l=>l,invalid:"-",second:l=>l?`${l}s`:"",minute:l=>`${l}m`,hour:l=>`${l}h`,week:l=>`${l}w`,day:l=>`${l}d`,month:l=>`${l}mo`,year:l=>`${l}y`}});return(l,a)=>{const r=ve;return o(),i("div",_e,[t("button",{absolute:"","left-0":"","right-0":"","top-0":"","bg-green:5":"",px2:"",py1:"","text-left":"","text-xs":"","text-green6":"","font-mono":"",onClick:a[0]||(a[0]=s=>l.segment.route?n("select",l.segment.route):void 0)},m(l.segment.route?.event.to),1),t("div",be,m(g(e))+" ago ",1),t("div",null,[(o(!0),i(y,null,E(l.segment.functions,(s,c)=>(o(),h(r,{key:c,item:s.event,style:T({position:"absolute",minWidth:`${s.relativeWidth*100}%`,maxWidth:`${s.relativeWidth*100}%`,top:`${4+s.layer*1.6}em`,left:`${s.relativeStart*100}%`}),onClick:k=>n("select",s)},null,8,["item","style","onClick"]))),128))])])}}}),xe=3e3,De=50;function Ae(f){const d=[];let p={start:0,end:0,events:[],functions:[],duration:0};for(const n of f){const e=n.end||n.start;(n.start-p.end>xe||n.type==="route")&&(p={start:n.start,end:e,events:[],functions:[],duration:0},d.push(p)),p.events.push(n),p.end=e+De}return d.forEach((n,e)=>{const l=n.end-n.start,a=[];n.duration=l,n.previousGap=e>0?n.start-d[e-1].end:0,n.events.forEach(r=>{const s=r.end||r.start;let c=0;r.type!=="route"&&(c=a.findIndex(D=>D<=r.start),c===-1?(c=a.length,a.push(s+1e3)):a[c]=s+1e3);const k={event:r,segment:n,relativeStart:(r.start-n.start)/l,relativeWidth:(s-r.start)/l,layer:c};r.type==="function"?n.functions.push(k):n.route=k})}),d}const $e={relative:""},Ce={key:0,border:"x base","h-full":"","flex-inline":"","bg-true-gray-1":"",py15:"","text-xs":"","write-vertical-left":"",op50:"","dark:bg-true-gray-9":""},Be=B({__name:"TimelineTable",props:{data:{}},emits:["select"],setup(f,{emit:d}){const p=f,n=d,e=C(),l=C(),a=C(),r=C(),s=C(!0),c=C(1.5),k=w(()=>Ae(p.data.events)),D=w(()=>(p.data.events.length,e.value?.scrollWidth||window.innerWidth));function A(){r.value&&(r.value.style.width=`${D.value}px`)}function S(){s.value&&e.value&&(e.value.scrollTo({left:e.value.scrollWidth-e.value.clientWidth,behavior:"smooth"}),a.value.scrollTo({left:e.value.scrollWidth-e.value.clientWidth,behavior:"smooth"}))}return le(()=>p.data.events.length,async()=>{await re(),A(),S()},{flush:"post"}),j(e,"scroll",()=>{a.value.scrollLeft!==e.value.scrollLeft&&(A(),a.value.scrollLeft=e.value.scrollLeft,s.value=e.value.scrollLeft>=e.value.scrollWidth-e.value.clientWidth)}),j(a,"scroll",()=>{a.value.scrollLeft!==e.value.scrollLeft&&(A(),e.value.scrollLeft=a.value.scrollLeft)}),j(e,"wheel",_=>{_.altKey?(c.value=Y(c.value+_.deltaY/200,.5,3),A()):e.value.scrollLeft+=_.deltaY}),(_,L)=>{const $=W,M=ge;return o(),i(y,null,[t("div",$e,[t("div",{ref_key:"minimap",ref:l,border:"t b base",relative:"","h-50px":"","ws-nowrap":"","border-base":""},[(o(!0),i(y,null,E(k.value,(b,N)=>(o(),i("div",{key:N,relative:"","h-full":"","flex-inline":"",style:T({width:`${Math.max(100,b.duration/10)/D.value*100}%`})},[(o(!0),i(y,null,E(b.functions,(I,J)=>(o(),i("div",{key:J,"h-3px":"",rounded:"",style:T({width:`max(${I.relativeWidth*100}%, 10px)`,position:"absolute",top:`${I.layer*4}px`,left:`${I.relativeStart*100}%`,backgroundColor:("getHashColorFromString"in _?_.getHashColorFromString:g(V))(I.event.name,50,60)})},null,4))),128)),b.route?(o(),i("div",{key:0,absolute:"","top-0":"","h-full":"","w-px":"","border-l":"","border-green6":"",op10:"",style:T({left:`${b.route.relativeStart*100}%`})},null,4)):x("",!0)],4))),128))],512),t("div",{ref_key:"minimapScroller",ref:a,class:"timeline-scroller",absolute:"","inset-0":"","h-full":"","w-full":"","of-x-scroll":""},[t("div",{ref_key:"minimapScrollerInner",ref:r,"h-1px":""},null,512)],512)]),t("div",{ref_key:"scroller",ref:e,relative:"","h-full":"","w-full":"","of-x-scroll":"","of-y-hidden":"","ws-nowrap":"","n-panel-grids":""},[(o(!0),i(y,null,E(k.value,(b,N)=>(o(),i(y,{key:N},[b.previousGap&&b.previousGap>=200?(o(),i("div",Ce,[u($,{op50:"",duration:b.previousGap,color:!1},null,8,["duration"])])):x("",!0),u(M,{"flex-inline":"","of-x-hidden":"","hover:of-x-visible":"","bg-base":"",class:R(N===k.value.length-1?"border-r border-base":""),segment:b,style:T({width:`${Math.max(50,b.duration/10)*c.value}px`}),onSelect:L[0]||(L[0]=I=>n("select",I))},null,8,["class","segment","style"])],64))),128))],512)],64)}}}),we=U(Be,[["__scopeId","data-v-18afc15e"]]),Te={border:"t base",flex:"~ col","h-full":"","of-y-auto":"","text-sm":""},Se=["onClick"],Ne={flex:"~","ml--1":"","font-mono":""},Fe={key:0,mr2:"",op30:""},Ee={op75:""},Le={flex:"~ col items-start"},Ie={"text-xs":"","font-mono":"",op30:""},Me={"text-green":"","font-bold":"","font-mono":""},Ve=B({__name:"TimelineList",props:{data:{}},emits:["select"],setup(f,{emit:d}){const p=d;return(n,e)=>{const l=W;return o(),i("div",Te,[(o(!0),i(y,null,E(n.data.events,(a,r)=>(o(),i("button",{key:r,border:"b base",px3:"",py2:"",flex:"~ items-center gap-2",hover:"bg-active",onClick:s=>p("select",a)},[a.type==="function"?(o(),i(y,{key:0},[e[2]||(e[2]=t("div",{"i-carbon-function":"",op50:""},null,-1)),t("div",{"font-mono":"",style:T({color:a.type==="function"?("getHashColorFromString"in n?n.getHashColorFromString:g(V))(a.name,50,60):""})},m(a.name),5),t("div",Ne,[e[0]||(e[0]=t("div",{op30:""}," ( ",-1)),(o(!0),i(y,null,E(a.args,(s,c)=>(o(),i(y,{key:c},[c?(o(),i("div",Fe," , ")):x("",!0),t("div",Ee,m(s===null?"null":s===void 0?"undefined":typeof s=="function"?"[function]":Array.isArray(s)?"[Array]":typeof s=="object"?"[object]":JSON.stringify(s)),1)],64))),128)),e[1]||(e[1]=t("div",{op30:""}," ) ",-1))])],64)):(o(),i(y,{key:1},[e[3]||(e[3]=t("div",{"mr-1":"","h-7":"","w-7":"",flex:"","rounded-lg":"","bg-primary:5":"",p1:"","text-green6":""},[t("div",{"i-carbon-direction-rotary-right":"",ma:"","text-lg":""})],-1)),t("div",Le,[t("div",Ie,m(a.from),1),t("div",Me,m(a.to),1)])],64)),e[4]||(e[4]=t("div",{"flex-auto":""},null,-1)),a.end?(o(),h(l,{key:2,duration:a.end-a.start,color:a.type==="function"},null,8,["duration","color"])):x("",!0)],8,Se))),128)),e[5]||(e[5]=t("div",{"min-h-100":""},null,-1))])}}}),We={key:0,"text-blue":""},je={key:1,"text-purple":""},Oe={key:2,"text-green":""},ze={key:3,"text-gray":""},Re={key:4,"text-gray":""},Ge={key:5,"text-gray":""},Pe={key:0,"bg-red:10":"",px2:"",py1:"","text-red":""},He={key:1},Je={p2:"","text-sm":"",border:"t base"},Ye=B({__name:"TimelineArgumentView",props:{value:{}},setup(f){const d=f,p=C(),n=C();function e(){try{p.value=JSON.parse(JSON.stringify(d.value))}catch(s){console.error(s),n.value=s}}const l=B({emits:["setup"],setup(s,{emit:c}){return c("setup"),()=>null}}),a=q(),r=K();return(s,c)=>{const k=z,D=P("VMenu");return typeof s.value=="string"?(o(),i("div",We,m(JSON.stringify(s.value)),1)):typeof s.value=="number"?(o(),i("div",je,m(s.value),1)):typeof s.value=="boolean"?(o(),i("div",Oe,m(s.value),1)):typeof s.value>"u"?(o(),i("div",ze," undefined ")):typeof s.value=="function"?(o(),i("div",Re," [Function"+m(s.value.name?`: ${s.value.name}`:"")+"] ",1)):s.value===null?(o(),i("div",Ge," null ")):(o(),h(D,{key:6,placement:"top"},{popper:v(()=>[u(g(l),{onSetup:e}),n.value?(o(),i("div",Pe," Failed to display object: "+m(n.value),1)):p.value?(o(),i("div",He,[u(g(ie),pe({"model-value":p.value},s.$attrs,{class:["json-editor-vue",[g(a)==="dark"?"jse-theme-dark":""]],"main-menu-bar":!1,"navigation-bar":!1,"status-bar":!1,"read-only":!0,indentation:2,"tab-size":2}),null,16,["model-value","class"]),t("div",Je,[u(k,{title:"Copy to clipboard",icon:"carbon-copy",onClick:c[0]||(c[0]=A=>g(r)(JSON.stringify(p.value,null,2),"timeline-argument"))},{default:v(()=>c[1]||(c[1]=[F(" Copy ")])),_:1})])])):x("",!0)]),default:v(()=>[t("span",{"rounded-sm":"",px1:"","py0.5":"","text-sm":"",class:R([Array.isArray(s.value)?"text-amber bg-amber:10":"text-orange bg-orange:10"])},m(Array.isArray(s.value)?`[Array(${s.value.length})]`:"[Object]"),3)]),_:1}))}}}),Ue={key:0,"p-4":"",flex:"~ col gap-2","text-base":""},qe={"mx--1":""},Ke={flex:"~ gap-1","font-mono":""},Xe={key:1},Ze={key:0,op30:""},Qe={flex:"~ gap-1","text-sm":""},es={class:"text-sm text-gray-400"},ss=B({__name:"TimelineDetailsFunction",props:{record:{}},setup(f){const d=f,p=O(()=>d.record.start,{showSecond:!0}),n=X(),e=w(()=>n.value?.metadata),l=w(()=>n.value?.imports.find(a=>a.as===d.record.name));return(a,r)=>{const s=H,c=de,k=Ye,D=W,A=ue;return a.record?(o(),i("div",Ue,[t("div",qe,[u(s,{n:"yellow",textContent:"Function call"})]),t("div",Ke,[l.value?(o(),h(c,{key:0,item:l.value,metadata:e.value,counter:!1,classes:"px2 py1","mx--2":""},null,8,["item","metadata"])):(o(),i("span",Xe,m(a.record.name),1)),r[0]||(r[0]=t("span",{ml1:"",op30:""},"(",-1)),(o(!0),i(y,null,E(a.record.args,(S,_)=>(o(),i(y,{key:_},[_?(o(),i("span",Ze,", ")):x("",!0),u(k,{value:S},null,8,["value"])],64))),128)),r[1]||(r[1]=t("span",{op30:""},")",-1))]),t("div",Qe,[a.record.end?(o(),h(D,{key:0,duration:a.record.end-a.record.start},null,8,["duration"])):x("",!0),r[2]||(r[2]=t("span",{mx1:"",op50:""},"·",-1)),t("div",es,m(g(p)),1)]),a.record.stacktrace?(o(),h(A,{key:0,stacktrace:a.record.stacktrace,class:"text-xs text-gray-400"},null,8,["stacktrace"])):x("",!0)])):x("",!0)}}}),ns={key:0,"p-4":"",flex:"~ col gap-2"},ts={"mx--1":""},os={flex:"~ gap-1 items-center","font-mono":""},as={op50:""},ls={flex:"~ gap-1","text-sm":""},rs={class:"text-sm text-gray-400"},is=B({__name:"TimelineDetailsRoute",props:{record:{}},setup(f){const d=f,p=O(()=>d.record.start,{showSecond:!0});return(n,e)=>{const l=H,a=W;return n.record?(o(),i("div",ns,[t("div",ts,[u(l,{n:"green",textContent:"Route Change"})]),t("div",os,[t("span",as,m(n.record.from),1),e[0]||(e[0]=t("span",{"i-carbon-arrow-right":"",op50:""},null,-1)),t("span",null,m(n.record.to),1)]),t("div",ls,[n.record.end?(o(),h(a,{key:0,duration:n.record.end-n.record.start},null,8,["duration"])):x("",!0),e[1]||(e[1]=t("span",{mx1:"",op50:""},"·",-1)),t("div",rs,m(g(p)),1)])])):x("",!0)}}}),ps={key:0,"h-screen":"","of-hidden":""},cs={"h-screen":"","w-full":"",flex:"","flex-col":""},ds={"h-10":"",flex:"~ gap-2 items-center justify-end",p2:"",px3:""},us={"text-sm":""},ms={"min-h-50":"",px3:"",py2:""},ks=B({__name:"TimelineView",setup(f){const d=Z(),p=C("table"),n=C(),e=w(()=>d.value?.metrics.clientTimeline());function l(){e.value&&(e.value.events=[])}function a(){p.value=p.value==="table"?"list":"table"}return(r,s)=>{const c=P("VTooltip"),k=z,D=we,A=Ve,S=ss,_=is,L=me;return e.value?(o(),i("div",ps,[t("div",cs,[t("div",ds,[u(c,{flex:""},{popper:v(()=>[t("div",us,m(e.value.options.enabled?"Recording...":"Paused"),1)]),default:v(()=>[t("div",{"text-lg":"",class:R(e.value.options.enabled?"i-carbon-radio-button-checked text-primary animate-pulse":"i-carbon-pause-outline op30")},null,2)]),_:1}),e.value.options.enabled?(o(),h(k,{key:1,size:"small",ml1:"","text-sm":"",n:"orange",icon:"i-carbon-stop",onClick:s[1]||(s[1]=$=>e.value.options.enabled=!1)},{default:v(()=>s[6]||(s[6]=[F(" Stop Tracking ")])),_:1})):(o(),h(k,{key:0,size:"small",ml1:"","text-sm":"",n:"primary",icon:"i-carbon-play",onClick:s[0]||(s[0]=$=>e.value.options.enabled=!0)},{default:v(()=>s[5]||(s[5]=[F(" Start Tracking ")])),_:1})),s[7]||(s[7]=t("div",{"flex-auto":""},null,-1)),u(k,{icon:p.value==="table"?"i-carbon-roadmap":"i-carbon-list",class:"ml-2",title:"Toggle View",border:!1,onClick:a},null,8,["icon"]),u(k,{icon:"i-carbon-trash-can","hover-text-red":"",class:"ml-2",border:!1,onClick:l})]),p.value==="table"?(o(),h(D,{key:0,data:{...e.value},onSelect:s[2]||(s[2]=$=>n.value=$.event)},null,8,["data"])):(o(),h(A,{key:1,data:{...e.value},onSelect:s[3]||(s[3]=$=>n.value=$)},null,8,["data"]))]),u(L,{"model-value":!!n.value,"auto-close":"",transition:"bottom",left:"#nuxt-devtools-side-nav",onClose:s[4]||(s[4]=$=>n.value=void 0)},{default:v(()=>[t("div",ms,[n.value?.type==="function"?(o(),h(S,{key:0,record:n.value},null,8,["record"])):n.value?.type==="route"?(o(),h(_,{key:1,record:n.value},null,8,["record"])):x("",!0)])]),_:1},8,["model-value"])])):x("",!0)}}}),fs={class:"markdown-body"},ys={__name:"timeline",setup(f,{expose:d}){return d({frontmatter:{}}),(n,e)=>(o(),i("div",fs,e[0]||(e[0]=[t("h1",null,"Timeline",-1),t("blockquote",{"text-orange":"","bg-orange:10":"",py1:""}," This is an experimental feature ",-1),ce(`<p>Timeline tracks your route navigations and functions calls in your Nuxt application. It can be used to debug performance issues and to understand how your application works.</p><h2>Function calls</h2><p>Nuxt DevTools tracks function calls by wrapping them in the build time. It works for functions referenced by auto-imports, or explicit imports through <code>import {} from '#imports'</code>.</p><pre class="shiki shiki-themes vitesse-light vitesse-dark" style="background-color:#ffffff;--shiki-dark-bg:#121212;color:#393a34;--shiki-dark:#dbd7caee;" tabindex="0"><code><span class="line"><span style="color:#999999;--shiki-dark:#666666;"><</span><span style="color:#1E754F;--shiki-dark:#4D9375;">script</span><span style="color:#B07D48;--shiki-dark:#BD976A;"> setup</span><span style="color:#999999;--shiki-dark:#666666;">></span></span>
|
|
2
|
-
<span class="line"><span style="color:#1E754F;--shiki-dark:#4D9375;">import</span><span style="color:#999999;--shiki-dark:#666666;"> {</span><span style="color:#B07D48;--shiki-dark:#BD976A;"> useRoute</span><span style="color:#999999;--shiki-dark:#666666;"> }</span><span style="color:#1E754F;--shiki-dark:#4D9375;"> from</span><span style="color:#B5695977;--shiki-dark:#C98A7D77;"> '</span><span style="color:#B56959;--shiki-dark:#C98A7D;">#app/composables/router</span><span style="color:#B5695977;--shiki-dark:#C98A7D77;">'</span></span>
|
|
3
|
-
<span class="line"><span style="color:#1E754F;--shiki-dark:#4D9375;">import</span><span style="color:#999999;--shiki-dark:#666666;"> {</span><span style="color:#B07D48;--shiki-dark:#BD976A;"> useNuxtApp</span><span style="color:#999999;--shiki-dark:#666666;"> }</span><span style="color:#1E754F;--shiki-dark:#4D9375;"> from</span><span style="color:#B5695977;--shiki-dark:#C98A7D77;"> '</span><span style="color:#B56959;--shiki-dark:#C98A7D;">#imports</span><span style="color:#B5695977;--shiki-dark:#C98A7D77;">'</span></span>
|
|
4
|
-
<span class="line"><span style="color:#1E754F;--shiki-dark:#4D9375;">import</span><span style="color:#999999;--shiki-dark:#666666;"> {</span><span style="color:#B07D48;--shiki-dark:#BD976A;"> useMouse</span><span style="color:#999999;--shiki-dark:#666666;"> }</span><span style="color:#1E754F;--shiki-dark:#4D9375;"> from</span><span style="color:#B5695977;--shiki-dark:#C98A7D77;"> '</span><span style="color:#B56959;--shiki-dark:#C98A7D;">@vueuse/core</span><span style="color:#B5695977;--shiki-dark:#C98A7D77;">'</span></span>
|
|
5
|
-
<span class="line"></span>
|
|
6
|
-
<span class="line"><span style="color:#AB5959;--shiki-dark:#CB7676;">const</span><span style="color:#B07D48;--shiki-dark:#BD976A;"> route</span><span style="color:#999999;--shiki-dark:#666666;"> =</span><span style="color:#59873A;--shiki-dark:#80A665;"> useRoute</span><span style="color:#999999;--shiki-dark:#666666;">()</span><span style="color:#A0ADA0;--shiki-dark:#758575DD;"> // tracked</span></span>
|
|
7
|
-
<span class="line"><span style="color:#AB5959;--shiki-dark:#CB7676;">const</span><span style="color:#B07D48;--shiki-dark:#BD976A;"> app</span><span style="color:#999999;--shiki-dark:#666666;"> =</span><span style="color:#59873A;--shiki-dark:#80A665;"> useNuxtApp</span><span style="color:#999999;--shiki-dark:#666666;">()</span><span style="color:#A0ADA0;--shiki-dark:#758575DD;"> // tracked</span></span>
|
|
8
|
-
<span class="line"></span>
|
|
9
|
-
<span class="line"><span style="color:#A0ADA0;--shiki-dark:#758575DD;">// NOT tracked because it's directly imported</span></span>
|
|
10
|
-
<span class="line"><span style="color:#AB5959;--shiki-dark:#CB7676;">const</span><span style="color:#B07D48;--shiki-dark:#BD976A;"> mouse</span><span style="color:#999999;--shiki-dark:#666666;"> =</span><span style="color:#59873A;--shiki-dark:#80A665;"> useMouse</span><span style="color:#999999;--shiki-dark:#666666;">()</span></span>
|
|
11
|
-
<span class="line"><span style="color:#999999;--shiki-dark:#666666;"></</span><span style="color:#1E754F;--shiki-dark:#4D9375;">script</span><span style="color:#999999;--shiki-dark:#666666;">></span></span>
|
|
12
|
-
<span class="line"></span></code></pre><p>By default, it tracks Nuxt provided composables as well as user defined functions. You can include/exclude functions by using the <code>include</code> and <code>exclude</code> options in the <code>nuxt.config.js</code> file.</p><pre class="shiki shiki-themes vitesse-light vitesse-dark" style="background-color:#ffffff;--shiki-dark-bg:#121212;color:#393a34;--shiki-dark:#dbd7caee;" tabindex="0"><code><span class="line"><span style="color:#1E754F;--shiki-dark:#4D9375;">export</span><span style="color:#1E754F;--shiki-dark:#4D9375;"> default</span><span style="color:#59873A;--shiki-dark:#80A665;"> defineNuxtConfig</span><span style="color:#999999;--shiki-dark:#666666;">({</span></span>
|
|
13
|
-
<span class="line"><span style="color:#998418;--shiki-dark:#B8A965;"> devtools</span><span style="color:#999999;--shiki-dark:#666666;">:</span><span style="color:#999999;--shiki-dark:#666666;"> {</span></span>
|
|
14
|
-
<span class="line"><span style="color:#998418;--shiki-dark:#B8A965;"> timeline</span><span style="color:#999999;--shiki-dark:#666666;">:</span><span style="color:#999999;--shiki-dark:#666666;"> {</span></span>
|
|
15
|
-
<span class="line"><span style="color:#998418;--shiki-dark:#B8A965;"> functions</span><span style="color:#999999;--shiki-dark:#666666;">:</span><span style="color:#999999;--shiki-dark:#666666;"> {</span></span>
|
|
16
|
-
<span class="line"><span style="color:#998418;--shiki-dark:#B8A965;"> include</span><span style="color:#999999;--shiki-dark:#666666;">:</span><span style="color:#999999;--shiki-dark:#666666;"> [</span></span>
|
|
17
|
-
<span class="line"><span style="color:#A0ADA0;--shiki-dark:#758575DD;"> // track \`useMouse\`</span></span>
|
|
18
|
-
<span class="line"><span style="color:#B5695977;--shiki-dark:#C98A7D77;"> '</span><span style="color:#B56959;--shiki-dark:#C98A7D;">useMouse</span><span style="color:#B5695977;--shiki-dark:#C98A7D77;">'</span><span style="color:#999999;--shiki-dark:#666666;">,</span></span>
|
|
19
|
-
<span class="line"><span style="color:#A0ADA0;--shiki-dark:#758575DD;"> // track all functions starting with \`use\`</span></span>
|
|
20
|
-
<span class="line"><span style="color:#B5695977;--shiki-dark:#C98A7D77;"> /</span><span style="color:#1E754F;--shiki-dark:#4D9375;">^</span><span style="color:#AB5E3F;--shiki-dark:#C4704F;">use</span><span style="color:#999999;--shiki-dark:#666666;">[</span><span style="color:#A65E2B;--shiki-dark:#C99076;">A-Z</span><span style="color:#999999;--shiki-dark:#666666;">]</span><span style="color:#B5695977;--shiki-dark:#C98A7D77;">/</span><span style="color:#999999;--shiki-dark:#666666;">,</span></span>
|
|
21
|
-
<span class="line"><span style="color:#A0ADA0;--shiki-dark:#758575DD;"> // track all functions from @vueuse/core</span></span>
|
|
22
|
-
<span class="line"><span style="color:#B07D48;--shiki-dark:#BD976A;"> entry</span><span style="color:#999999;--shiki-dark:#666666;"> =></span><span style="color:#B07D48;--shiki-dark:#BD976A;"> entry</span><span style="color:#999999;--shiki-dark:#666666;">.</span><span style="color:#B07D48;--shiki-dark:#BD976A;">from</span><span style="color:#AB5959;--shiki-dark:#CB7676;"> ===</span><span style="color:#B5695977;--shiki-dark:#C98A7D77;"> '</span><span style="color:#B56959;--shiki-dark:#C98A7D;">@vueuse/core</span><span style="color:#B5695977;--shiki-dark:#C98A7D77;">'</span><span style="color:#999999;--shiki-dark:#666666;">,</span></span>
|
|
23
|
-
<span class="line"><span style="color:#999999;--shiki-dark:#666666;"> ],</span></span>
|
|
24
|
-
<span class="line"><span style="color:#998418;--shiki-dark:#B8A965;"> exclude</span><span style="color:#999999;--shiki-dark:#666666;">:</span><span style="color:#999999;--shiki-dark:#666666;"> [</span></span>
|
|
25
|
-
<span class="line"><span style="color:#B5695977;--shiki-dark:#C98A7D77;"> '</span><span style="color:#B56959;--shiki-dark:#C98A7D;">useRouter</span><span style="color:#B5695977;--shiki-dark:#C98A7D77;">'</span></span>
|
|
26
|
-
<span class="line"><span style="color:#999999;--shiki-dark:#666666;"> ]</span></span>
|
|
27
|
-
<span class="line"><span style="color:#999999;--shiki-dark:#666666;"> }</span></span>
|
|
28
|
-
<span class="line"><span style="color:#999999;--shiki-dark:#666666;"> }</span></span>
|
|
29
|
-
<span class="line"><span style="color:#999999;--shiki-dark:#666666;"> }</span></span>
|
|
30
|
-
<span class="line"><span style="color:#999999;--shiki-dark:#666666;">})</span></span>
|
|
31
|
-
<span class="line"></span></code></pre>`,6)])))}},hs={flex:"~ col gap-2","w-150":"",p4:"",border:"t base"},vs={op50:""},_s={flex:"~ gap-3",mt2:"","justify-end":""},Ws=B({__name:"timeline",setup(f){const d=Q(),p=ee(),n=se(),e=ne();async function l(){try{const[a,r]=await G.enableTimeline(!0);if(!await n.start(a,r))return;await G.enableTimeline(!1)}catch{oe({message:"Failed to enable timeline automatically. Check the terminal for more details.",icon:"i-carbon-warning",classes:"text-red"})}}return(a,r)=>{const s=ks,c=ke,k=te,D=fe,A=ye,S=z,_=ae,L=ys,$=he;return o(),i(y,null,[g(d)?.timeline?.enabled?(o(),h(s,{key:0})):(o(),i(y,{key:1},[u(k,null,{default:v(()=>[u(c,{icon:"i-carbon-roadmap",name:"feature-timeline",title:"Timeline",description:"Timeline enables the inspection of when composable being executed and the route changes.",actions:[{label:"Enable"}],onAction:l})]),_:1}),u(g(n),null,{default:v(({resolve:M,args:b})=>[u(_,{"model-value":!0,onClose:N=>M(!1)},{default:v(()=>[t("div",hs,[r[5]||(r[5]=t("h2",{"text-xl":""},[t("span",{capitalize:""},"Enable Timeline?")],-1)),t("p",vs,[r[1]||(r[1]=F(" Your ")),u(D,{role:"button",n:"primary",underline:"",onClick:r[0]||(r[0]=N=>g(e)(g(p)?._nuxtConfigFile)),textContent:"Nuxt config"}),r[2]||(r[2]=F(" will be updated as: "))]),u(A,{from:b[0],to:b[1],"max-h-80":"","of-auto":"",py2:"",border:"~ base rounded",lang:"ts"},null,8,["from","to"]),r[6]||(r[6]=t("p",null,[t("span",{op50:""},"Then Nuxt will "),t("span",{"text-orange":""},"restart automatically"),F(". ")],-1)),t("div",_s,[u(S,{onClick:N=>M(!1)},{default:v(()=>r[3]||(r[3]=[F(" Cancel ")])),_:2},1032,["onClick"]),u(S,{n:"solid primary",capitalize:"",onClick:N=>M(!0)},{default:v(()=>r[4]||(r[4]=[F(" Enable ")])),_:2},1032,["onClick"])])])]),_:2},1032,["onClose"])]),_:1})],64)),u($,null,{default:v(()=>[u(L)]),_:1})],64)}}});export{Ws as default};
|