@nuxt/devtools 2.1.0 → 2.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/module-main.mjs +27 -6787
- package/dist/chunks/vscode.mjs +0 -6
- package/dist/client/200.html +22 -22
- package/dist/client/404.html +22 -22
- package/dist/client/_nuxt/__blank-dudv6g9d.js +1 -0
- package/dist/client/_nuxt/{analyze-build-bugaz9us.js → analyze-build-k7usc929.js} +1 -1
- package/dist/client/_nuxt/assets-n7z80c9u.js +16 -0
- package/dist/client/_nuxt/builds/latest.json +1 -1
- package/dist/client/_nuxt/builds/meta/b7da869e-e0a9-4d4c-a2f3-5ddb290c30d3.json +1 -0
- package/dist/client/_nuxt/{client-edufhzwa.js → client-gsjyqe32.js} +1 -1
- package/dist/client/_nuxt/code-diff.vue-n8bar0i3.js +8 -0
- package/dist/client/_nuxt/code-snippets.vue-donzovu5.js +1 -0
- package/dist/client/_nuxt/{components-hzbrj322.js → components-hgs0g0ig.js} +1 -1
- package/dist/client/_nuxt/composable-item.vue-ojmi080u.js +1 -0
- package/dist/client/_nuxt/custom-_name_-pfktgav8.js +1 -0
- package/dist/client/_nuxt/data-schema-button.vue-rqp42n39.js +1 -0
- package/dist/client/_nuxt/data-schema-drawer-k2wpr3y0.js +2 -0
- package/dist/client/_nuxt/dckvv1o7.js +17 -0
- package/dist/client/_nuxt/default-rm5gsi8z.js +1 -0
- package/dist/client/_nuxt/{duration-display.vue-gu7el5x3.js → duration-display.vue-h9mqvgci.js} +1 -1
- package/dist/client/_nuxt/error-404-mi99npap.js +1 -0
- package/dist/client/_nuxt/error-404.css-hufc5r2t.css +1 -0
- package/dist/client/_nuxt/error-500-fpz21bp1.js +1 -0
- package/dist/client/_nuxt/error-500.css-iibxggy2.css +1 -0
- package/dist/client/_nuxt/{error-o3wydv8q.js → error-cbew144m.js} +6 -6
- package/dist/client/_nuxt/filepath-item.vue-iltgx83i.js +1 -0
- package/dist/client/_nuxt/full-o1ks5uak.js +1 -0
- package/dist/client/_nuxt/help-fab.vue-fz7s38mz.js +1 -0
- package/dist/client/_nuxt/{hooks-lylmzd7n.js → hooks-gddqfh4g.js} +1 -1
- package/dist/client/_nuxt/imports-m27rstm7.js +1 -0
- package/dist/client/_nuxt/index-efx0alh8.js +1 -0
- package/dist/client/_nuxt/index-jc4yj4to.js +1 -0
- package/dist/client/_nuxt/launch-page.vue-k3mfatbm.js +1 -0
- package/dist/client/_nuxt/{modules-jbbzhk6s.js → modules-h7m8imq8.js} +1 -1
- package/dist/client/_nuxt/nbadge-j0lg4rvs.js +1 -0
- package/dist/client/_nuxt/ncheckbox.vue-dizdk93x.js +1 -0
- package/dist/client/_nuxt/{ncode-block.vue-msaaoy71.js → ncode-block.vue-bir2wz4z.js} +2 -2
- package/dist/client/_nuxt/ndrawer.vue-iqsqqdsc.js +1 -0
- package/dist/client/_nuxt/ndropdown.vue-i27dwkwo.js +1 -0
- package/dist/client/_nuxt/nicon-title.vue-dsf9ygne.js +1 -0
- package/dist/client/_nuxt/nlink.vue-mgndip1g.js +1 -0
- package/dist/client/_nuxt/nmarkdown.vue-iw2voruc.js +1 -0
- package/dist/client/_nuxt/nnavbar.vue-ip749nge.js +1 -0
- package/dist/client/_nuxt/none-iaayt5li.js +1 -0
- package/dist/client/_nuxt/nsection-block-ez4av87h.js +1 -0
- package/dist/client/_nuxt/nselect-tabs.vue-kbdbbl1a.js +1 -0
- package/dist/client/_nuxt/nselect.vue-h06w7phh.js +1 -0
- package/dist/client/_nuxt/{nswitch.vue-l8xqfho0.js → nswitch.vue-jbyu7ls8.js} +1 -1
- package/dist/client/_nuxt/{open-graph-g14cvh6u.js → open-graph-c1fets3p.js} +2 -2
- package/dist/client/_nuxt/overview-ytav5zv8.js +1 -0
- package/dist/client/_nuxt/pages-hsqav0if.js +1 -0
- package/dist/client/_nuxt/payload-gmcpymvb.js +1 -0
- package/dist/client/_nuxt/pinia-b8qfl5lg.js +1 -0
- package/dist/client/_nuxt/{plugins-im2207tt.js → plugins-kikp83ze.js} +1 -1
- package/dist/client/_nuxt/render-tree-kci73adp.js +1 -0
- package/dist/client/_nuxt/runtime-configs-c95l3cvn.js +1 -0
- package/dist/client/_nuxt/server-discovery-mqr6vxyg.js +1 -0
- package/dist/client/_nuxt/{server-route-inputs.vue-bpkh6jhv.js → server-route-inputs.vue-2gi14bp7.js} +1 -1
- package/dist/client/_nuxt/{server-routes-ml9qzq4f.js → server-routes-k5dbmj9z.js} +2 -2
- package/dist/client/_nuxt/server-tasks-msqxhezv.js +1 -0
- package/dist/client/_nuxt/{settings-k4hm6nna.js → settings-ev2jeu5l.js} +1 -1
- package/dist/client/_nuxt/stacktrace-list.vue-nuejet0w.js +1 -0
- package/dist/client/_nuxt/{state-components-hvnej0jk.js → state-components-o1o8du1g.js} +1 -1
- package/dist/client/_nuxt/state-editor.vue-n4ehj4fq.js +1 -0
- package/dist/client/_nuxt/state-modules-ihh0k0hk.js +1 -0
- package/dist/client/_nuxt/storage-hdpr51lz.js +1 -0
- package/dist/client/_nuxt/terminals-hdgtfdx3.js +1 -0
- package/dist/client/_nuxt/{timeline-cnxzcq07.js → timeline-mrc5a9nr.js} +2 -2
- package/dist/client/_nuxt/{unocss-runtime-gc1hqonm.js → unocss-runtime-l2otbg6e.js} +1 -1
- package/dist/client/_nuxt/vendor/json-editor-vue-llkaejaf.js +3819 -0
- package/dist/client/_nuxt/vendor/{quicktype-core-i8ym98gu.js → quicktype-core-o2aektoq.js} +83 -83
- package/dist/client/_nuxt/vendor/shiki-kdj4mcqm.js +288 -0
- package/dist/client/_nuxt/vendor/unocss-mvzv9iuf.js +2 -0
- package/dist/client/_nuxt/vendor/vis-7ar5f2fs.js +98 -0
- package/dist/client/_nuxt/vendor/{xterm-b1jefe3j.js → xterm-dbpzgj7s.js} +7 -7
- package/dist/client/_nuxt/virtual-files-jwisupq9.js +1 -0
- package/dist/client/_nuxt/{vue-devtools-dzipubfc.js → vue-devtools-h7isihvs.js} +2 -2
- package/dist/client/_nuxt/{vue-virtual-scroller.esm-guzt9iin.js → vue-virtual-scroller.esm-gnguvd0a.js} +2 -2
- package/dist/client/index.html +22 -22
- package/dist/module.json +2 -2
- package/package.json +34 -34
- package/dist/client/_nuxt/__blank-j47419ao.js +0 -1
- package/dist/client/_nuxt/assets-osp8hkm5.js +0 -16
- package/dist/client/_nuxt/builds/meta/5f994163-fc52-4e71-a78a-98b64f1fb08f.json +0 -1
- package/dist/client/_nuxt/code-diff.vue-gy1k04x9.js +0 -8
- package/dist/client/_nuxt/code-snippets.vue-ofmkxw4b.js +0 -1
- package/dist/client/_nuxt/composable-item.vue-o29ru8an.js +0 -1
- package/dist/client/_nuxt/custom-_name_-m1v3gtb3.js +0 -1
- package/dist/client/_nuxt/data-schema-button.vue-m1rfzflw.js +0 -1
- package/dist/client/_nuxt/data-schema-drawer-jmqcuxpo.js +0 -2
- package/dist/client/_nuxt/default-jt337kpj.js +0 -1
- package/dist/client/_nuxt/error-404-f20h7euk.js +0 -1
- package/dist/client/_nuxt/error-404.css-fsdpg4tp.css +0 -1
- package/dist/client/_nuxt/error-500-kln77uik.js +0 -1
- package/dist/client/_nuxt/error-500.css-bernuda7.css +0 -1
- package/dist/client/_nuxt/filepath-item.vue-i51hnv27.js +0 -1
- package/dist/client/_nuxt/full-hllxflb0.js +0 -1
- package/dist/client/_nuxt/g3h63aw5.js +0 -17
- package/dist/client/_nuxt/help-fab.vue-lv824f8h.js +0 -1
- package/dist/client/_nuxt/imports-b9yuvomv.js +0 -1
- package/dist/client/_nuxt/index-obsucz0g.js +0 -1
- package/dist/client/_nuxt/index-pa2alw8p.js +0 -1
- package/dist/client/_nuxt/launch-page.vue-c4udrikr.js +0 -1
- package/dist/client/_nuxt/nbadge-inu2cbym.js +0 -1
- package/dist/client/_nuxt/ncheckbox.vue-ebn9fsvc.js +0 -1
- package/dist/client/_nuxt/ndrawer.vue-nv73yu3i.js +0 -1
- package/dist/client/_nuxt/ndropdown.vue-f8fjs48r.js +0 -1
- package/dist/client/_nuxt/nicon-title.vue-j1ceohu1.js +0 -1
- package/dist/client/_nuxt/nlink.vue-ncsjb1ly.js +0 -1
- package/dist/client/_nuxt/nmarkdown.vue-oxfi26vk.js +0 -1
- package/dist/client/_nuxt/nnavbar.vue-c3um92xe.js +0 -1
- package/dist/client/_nuxt/none-hokh1e0y.js +0 -1
- package/dist/client/_nuxt/nsection-block-jrje44xx.js +0 -1
- package/dist/client/_nuxt/nselect-tabs.vue-kmg7oqpq.js +0 -1
- package/dist/client/_nuxt/nselect.vue-otkv89hb.js +0 -1
- package/dist/client/_nuxt/overview-h8wty1mg.js +0 -1
- package/dist/client/_nuxt/pages-bkcg7jdi.js +0 -1
- package/dist/client/_nuxt/payload-oxquqq8k.js +0 -1
- package/dist/client/_nuxt/pinia-d8u1ilag.js +0 -1
- package/dist/client/_nuxt/render-tree-e9fjta20.js +0 -1
- package/dist/client/_nuxt/runtime-configs-dy1sicee.js +0 -1
- package/dist/client/_nuxt/server-discovery-o8cr9llt.js +0 -1
- package/dist/client/_nuxt/server-tasks-jtcxge81.js +0 -1
- package/dist/client/_nuxt/stacktrace-list.vue-b1n0lhud.js +0 -1
- package/dist/client/_nuxt/state-editor.vue-o71oq72z.js +0 -1
- package/dist/client/_nuxt/state-modules-d3vu3o41.js +0 -1
- package/dist/client/_nuxt/storage-d5jfpe6j.js +0 -1
- package/dist/client/_nuxt/terminals-jlz6zkmv.js +0 -1
- package/dist/client/_nuxt/vendor/json-editor-vue-npezbdce.js +0 -3818
- package/dist/client/_nuxt/vendor/shiki-ian6uf3s.js +0 -282
- package/dist/client/_nuxt/vendor/unocss-hjqyvvq7.js +0 -2
- package/dist/client/_nuxt/vendor/vis-fzckz0r6.js +0 -98
- package/dist/client/_nuxt/virtual-files-jh7t3cfd.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a5 as V,M as O,D as j,bk as Y,b as U,R as q,a as K,_ as z,a7 as X,f as Z,bl as Q,K as ee,n as se,L as ne,h as te,r as G,G as oe,B as ae}from"./g3h63aw5.js";import{_ as W}from"./duration-display.vue-gu7el5x3.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-npezbdce.js";import{_ as H}from"./nbadge-inu2cbym.js";import{_ as de}from"./composable-item.vue-o29ru8an.js";import{_ as ue}from"./stacktrace-list.vue-b1n0lhud.js";import{_ as me}from"./ndrawer.vue-nv73yu3i.js";import{_ as ke}from"./launch-page.vue-c4udrikr.js";import{_ as fe}from"./nlink.vue-ncsjb1ly.js";import{_ as ye}from"./code-diff.vue-gy1k04x9.js";import{_ as he}from"./help-fab.vue-lv824f8h.js";import"./vendor/unocss-hjqyvvq7.js";import"./vendor/shiki-ian6uf3s.js";import"./nmarkdown.vue-oxfi26vk.js";import"./client-edufhzwa.js";import"./filepath-item.vue-i51hnv27.js";import"./index-obsucz0g.js";import"./constants-b32h69zq.js";import"./ncode-block.vue-msaaoy71.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>
|
|
1
|
+
import{a4 as M,L as O,D as j,bj as Y,b as q,Q as K,a as Q,_ as z,a6 as U,f as X,bk as Z,J as ee,n as se,K as ne,i as oe,y as te,r as G,F as ae}from"./dckvv1o7.js";import{_ as W}from"./duration-display.vue-h9mqvgci.js";import{p as B,q as w,P as i,a1 as t,V as T,Q as o,a8 as m,u as g,F as f,ae as E,S as v,f as C,j as le,n as re,R as x,a3 as u,X as R,Y as P,a2 as h,ax as ie,a4 as pe,a9 as F,aj as ce}from"./vendor/json-editor-vue-llkaejaf.js";import{_ as H}from"./nbadge-j0lg4rvs.js";import{_ as de}from"./composable-item.vue-ojmi080u.js";import{_ as ue}from"./stacktrace-list.vue-nuejet0w.js";import{_ as me}from"./ndrawer.vue-iqsqqdsc.js";import{_ as ke}from"./launch-page.vue-k3mfatbm.js";import{_ as ye}from"./nlink.vue-mgndip1g.js";import{_ as fe}from"./code-diff.vue-n8bar0i3.js";import{_ as ve}from"./help-fab.vue-fz7s38mz.js";import"./vendor/unocss-mvzv9iuf.js";import"./vendor/shiki-kdj4mcqm.js";import"./nmarkdown.vue-iw2voruc.js";import"./client-gsjyqe32.js";import"./filepath-item.vue-iltgx83i.js";import"./index-jc4yj4to.js";import"./constants-b32h69zq.js";import"./ncode-block.vue-bir2wz4z.js";const he=B({__name:"TimelineItemFunction",props:{item:{}},setup(y){const d=y,p=w(()=>M(d.item.name,50,60,"_op_")),n=w(()=>p.value.replace(/_op_/,"1")),e=w(()=>M(d.item.name,50,40)),l=w(()=>p.value.replace(/_op_/,"0.2"));return(a,r)=>(t(),i("button",{class:"group",style:T({color:n.value,borderLeft:`2px solid ${n.value}`}),relative:"","text-sm":"",transition:"","hover:z-1000":"","bg-base":""},[o("div",{style:T({backgroundColor:l.value}),absolute:"","bottom-0":"","left--1px":"","top-0":"","w-full":"","text-sm":"","transition-all":"","duration-300":""},null,4),o("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(y,{emit:d}){const p=y,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=he;return t(),i("div",_e,[o("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),o("div",be,m(g(e))+" ago ",1),o("div",null,[(t(!0),i(f,null,E(l.segment.functions,(s,c)=>(t(),v(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(y){const d=[];let p={start:0,end:0,events:[],functions:[],duration:0};for(const n of y){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(y,{emit:d}){const p=y,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,V=ge;return t(),i(f,null,[o("div",$e,[o("div",{ref_key:"minimap",ref:l,border:"t b base",relative:"","h-50px":"","ws-nowrap":"","border-base":""},[(t(!0),i(f,null,E(k.value,(b,N)=>(t(),i("div",{key:N,relative:"","h-full":"","flex-inline":"",style:T({width:`${Math.max(100,b.duration/10)/D.value*100}%`})},[(t(!0),i(f,null,E(b.functions,(I,J)=>(t(),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(M))(I.event.name,50,60)})},null,4))),128)),b.route?(t(),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),o("div",{ref_key:"minimapScroller",ref:a,class:"timeline-scroller",absolute:"","inset-0":"","h-full":"","w-full":"","of-x-scroll":""},[o("div",{ref_key:"minimapScrollerInner",ref:r,"h-1px":""},null,512)],512)]),o("div",{ref_key:"scroller",ref:e,relative:"","h-full":"","w-full":"","of-x-scroll":"","of-y-hidden":"","ws-nowrap":"","n-panel-grids":""},[(t(!0),i(f,null,E(k.value,(b,N)=>(t(),i(f,{key:N},[b.previousGap&&b.previousGap>=200?(t(),i("div",Ce,[u($,{op50:"",duration:b.previousGap,color:!1},null,8,["duration"])])):x("",!0),u(V,{"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=q(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:""},Ve={"text-green":"","font-bold":"","font-mono":""},Me=B({__name:"TimelineList",props:{data:{}},emits:["select"],setup(y,{emit:d}){const p=d;return(n,e)=>{const l=W;return t(),i("div",Te,[(t(!0),i(f,null,E(n.data.events,(a,r)=>(t(),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"?(t(),i(f,{key:0},[e[2]||(e[2]=o("div",{"i-carbon-function":"",op50:""},null,-1)),o("div",{"font-mono":"",style:T({color:a.type==="function"?("getHashColorFromString"in n?n.getHashColorFromString:g(M))(a.name,50,60):""})},m(a.name),5),o("div",Ne,[e[0]||(e[0]=o("div",{op30:""}," ( ",-1)),(t(!0),i(f,null,E(a.args,(s,c)=>(t(),i(f,{key:c},[c?(t(),i("div",Fe," , ")):x("",!0),o("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]=o("div",{op30:""}," ) ",-1))])],64)):(t(),i(f,{key:1},[e[3]||(e[3]=o("div",{"mr-1":"","h-7":"","w-7":"",flex:"","rounded-lg":"","bg-primary:5":"",p1:"","text-green6":""},[o("div",{"i-carbon-direction-rotary-right":"",ma:"","text-lg":""})],-1)),o("div",Le,[o("div",Ie,m(a.from),1),o("div",Ve,m(a.to),1)])],64)),e[4]||(e[4]=o("div",{"flex-auto":""},null,-1)),a.end?(t(),v(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]=o("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(y){const d=y,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=K(),r=Q();return(s,c)=>{const k=z,D=P("VMenu");return typeof s.value=="string"?(t(),i("div",We,m(JSON.stringify(s.value)),1)):typeof s.value=="number"?(t(),i("div",je,m(s.value),1)):typeof s.value=="boolean"?(t(),i("div",Oe,m(s.value),1)):typeof s.value>"u"?(t(),i("div",ze," undefined ")):typeof s.value=="function"?(t(),i("div",Re," [Function"+m(s.value.name?`: ${s.value.name}`:"")+"] ",1)):s.value===null?(t(),i("div",Ge," null ")):(t(),v(D,{key:6,placement:"top"},{popper:h(()=>[u(g(l),{onSetup:e}),n.value?(t(),i("div",Pe," Failed to display object: "+m(n.value),1)):p.value?(t(),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"]),o("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:h(()=>c[1]||(c[1]=[F(" Copy ")])),_:1})])])):x("",!0)]),default:h(()=>[o("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}))}}}),qe={key:0,"p-4":"",flex:"~ col gap-2","text-base":""},Ke={"mx--1":""},Qe={flex:"~ gap-1","font-mono":""},Ue={key:1},Xe={key:0,op30:""},Ze={flex:"~ gap-1","text-sm":""},es={class:"text-sm text-gray-400"},ss=B({__name:"TimelineDetailsFunction",props:{record:{}},setup(y){const d=y,p=O(()=>d.record.start,{showSecond:!0}),n=U(),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?(t(),i("div",qe,[o("div",Ke,[u(s,{n:"yellow",textContent:"Function call"})]),o("div",Qe,[l.value?(t(),v(c,{key:0,item:l.value,metadata:e.value,counter:!1,classes:"px2 py1","mx--2":""},null,8,["item","metadata"])):(t(),i("span",Ue,m(a.record.name),1)),r[0]||(r[0]=o("span",{ml1:"",op30:""},"(",-1)),(t(!0),i(f,null,E(a.record.args,(S,_)=>(t(),i(f,{key:_},[_?(t(),i("span",Xe,", ")):x("",!0),u(k,{value:S},null,8,["value"])],64))),128)),r[1]||(r[1]=o("span",{op30:""},")",-1))]),o("div",Ze,[a.record.end?(t(),v(D,{key:0,duration:a.record.end-a.record.start},null,8,["duration"])):x("",!0),r[2]||(r[2]=o("span",{mx1:"",op50:""},"·",-1)),o("div",es,m(g(p)),1)]),a.record.stacktrace?(t(),v(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"},os={"mx--1":""},ts={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(y){const d=y,p=O(()=>d.record.start,{showSecond:!0});return(n,e)=>{const l=H,a=W;return n.record?(t(),i("div",ns,[o("div",os,[u(l,{n:"green",textContent:"Route Change"})]),o("div",ts,[o("span",as,m(n.record.from),1),e[0]||(e[0]=o("span",{"i-carbon-arrow-right":"",op50:""},null,-1)),o("span",null,m(n.record.to),1)]),o("div",ls,[n.record.end?(t(),v(a,{key:0,duration:n.record.end-n.record.start},null,8,["duration"])):x("",!0),e[1]||(e[1]=o("span",{mx1:"",op50:""},"·",-1)),o("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(y){const d=X(),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=Me,S=ss,_=is,L=me;return e.value?(t(),i("div",ps,[o("div",cs,[o("div",ds,[u(c,{flex:""},{popper:h(()=>[o("div",us,m(e.value.options.enabled?"Recording...":"Paused"),1)]),default:h(()=>[o("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?(t(),v(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:h(()=>s[6]||(s[6]=[F(" Stop Tracking ")])),_:1})):(t(),v(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:h(()=>s[5]||(s[5]=[F(" Start Tracking ")])),_:1})),s[7]||(s[7]=o("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"?(t(),v(D,{key:0,data:{...e.value},onSelect:s[2]||(s[2]=$=>n.value=$.event)},null,8,["data"])):(t(),v(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:h(()=>[o("div",ms,[n.value?.type==="function"?(t(),v(S,{key:0,record:n.value},null,8,["record"])):n.value?.type==="route"?(t(),v(_,{key:1,record:n.value},null,8,["record"])):x("",!0)])]),_:1},8,["model-value"])])):x("",!0)}}}),ys={class:"markdown-body"},fs={__name:"timeline",setup(y,{expose:d}){return d({frontmatter:{}}),(n,e)=>(t(),i("div",ys,e[0]||(e[0]=[o("h1",null,"Timeline",-1),o("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
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
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
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>
|
|
@@ -28,4 +28,4 @@ import{a5 as V,M as O,D as j,bk as Y,b as U,R as q,a as K,_ as z,a7 as X,f as Z,
|
|
|
28
28
|
<span class="line"><span style="color:#999999;--shiki-dark:#666666;"> }</span></span>
|
|
29
29
|
<span class="line"><span style="color:#999999;--shiki-dark:#666666;"> }</span></span>
|
|
30
30
|
<span class="line"><span style="color:#999999;--shiki-dark:#666666;">})</span></span>
|
|
31
|
-
<span class="line"></span></code></pre>`,6)])))}},
|
|
31
|
+
<span class="line"></span></code></pre>`,6)])))}},vs={flex:"~ col gap-2","w-150":"",p4:"",border:"t base"},hs={op50:""},_s={flex:"~ gap-3",mt2:"","justify-end":""},js=B({__name:"timeline",setup(y){const d=Z(),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{ae({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=oe,D=ye,A=fe,S=z,_=te,L=fs,$=ve;return t(),i(f,null,[g(d)?.timeline?.enabled?(t(),v(s,{key:0})):(t(),i(f,{key:1},[u(k,null,{default:h(()=>[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:h(({resolve:V,args:b})=>[u(_,{"model-value":!0,onClose:N=>V(!1)},{default:h(()=>[o("div",vs,[r[5]||(r[5]=o("h2",{"text-xl":""},[o("span",{capitalize:""},"Enable Timeline?")],-1)),o("p",hs,[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]=o("p",null,[o("span",{op50:""},"Then Nuxt will "),o("span",{"text-orange":""},"restart automatically"),F(". ")],-1)),o("div",_s,[u(S,{onClick:N=>V(!1)},{default:h(()=>r[3]||(r[3]=[F(" Cancel ")])),_:2},1032,["onClick"]),u(S,{n:"solid primary",capitalize:"",onClick:N=>V(!0)},{default:h(()=>r[4]||(r[4]=[F(" Enable ")])),_:2},1032,["onClick"])])])]),_:2},1032,["onClose"])]),_:1})],64)),u($,null,{default:h(()=>[u(L)]),_:1})],64)}}});export{js as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as e,k as s}from"./vendor/unocss-
|
|
1
|
+
import{g as e,k as s}from"./vendor/unocss-mvzv9iuf.js";import"./vendor/json-editor-vue-llkaejaf.js";e({defaults:{presets:[s({prefix:["i-",""],collections:{},cdn:"https://esm.sh/",scale:1.2,extraProperties:{display:"inline-block","vertical-align":"middle"}})]},bypassDefined:!0});
|