@nuxt/devtools-nightly 2.2.1-29030652.7bd1409 → 2.2.1-29030665.68df38e
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 +1 -1
- package/dist/client/200.html +12 -12
- package/dist/client/404.html +12 -12
- package/dist/client/_nuxt/{analyze-build-ile3hk57.js → analyze-build-bsunkli7.js} +1 -1
- package/dist/client/_nuxt/{assets-jv2tj066.js → assets-lfnh1b6e.js} +1 -1
- package/dist/client/_nuxt/builds/latest.json +1 -1
- package/dist/client/_nuxt/builds/meta/16f70cbb-7893-4ed5-b92a-488efb8738fe.json +1 -0
- package/dist/client/_nuxt/{code-diff.vue-f6qrbepb.js → code-diff.vue-imytoxti.js} +1 -1
- package/dist/client/_nuxt/{code-snippets.vue-bkthg5zd.js → code-snippets.vue-hswyhccf.js} +1 -1
- package/dist/client/_nuxt/{components-bhfbfjbt.js → components-gowuwj6a.js} +1 -1
- package/dist/client/_nuxt/{composable-item.vue-iiq4onn8.js → composable-item.vue-j0gn61br.js} +1 -1
- package/dist/client/_nuxt/{custom-_name_-cy41kcan.js → custom-_name_-fab19om4.js} +1 -1
- package/dist/client/_nuxt/{data-schema-button.vue-ieb9nkmo.js → data-schema-button.vue-tr2gq7bi.js} +1 -1
- package/dist/client/_nuxt/{data-schema-drawer-cijrljo1.js → data-schema-drawer-kd2wuigt.js} +1 -1
- package/dist/client/_nuxt/{default-bkjb22ts.js → default-jyfb60bj.js} +1 -1
- package/dist/client/_nuxt/{error-404-okmvdr88.js → error-404-l61wup2d.js} +1 -1
- package/dist/client/_nuxt/{error-500-maxlsh1n.js → error-500-ck9xbshi.js} +1 -1
- package/dist/client/_nuxt/{error-kcjqvgkd.js → error-k5byad75.js} +1 -1
- package/dist/client/_nuxt/{oywnus8r.js → exwwhk5s.js} +4 -4
- package/dist/client/_nuxt/{filepath-item.vue-lxwmjgzn.js → filepath-item.vue-g8leljip.js} +1 -1
- package/dist/client/_nuxt/{full-f9ooae4n.js → full-og11tliq.js} +1 -1
- package/dist/client/_nuxt/{help-fab.vue-nvotn2uf.js → help-fab.vue-mxwhdrsr.js} +1 -1
- package/dist/client/_nuxt/{hooks-dn5j8jke.js → hooks-f2jwdw9x.js} +1 -1
- package/dist/client/_nuxt/{imports-h05xe6oh.js → imports-ieg7xe68.js} +1 -1
- package/dist/client/_nuxt/{index-ibyc0yte.js → index-ffpyhunk.js} +1 -1
- package/dist/client/_nuxt/{launch-page.vue-nyd180gp.js → launch-page.vue-ox98boyc.js} +1 -1
- package/dist/client/_nuxt/{modules-knby4kbj.js → modules-pehhn55f.js} +1 -1
- package/dist/client/_nuxt/{nbadge-f29cbhae.js → nbadge-erzx95rd.js} +1 -1
- package/dist/client/_nuxt/{ncheckbox.vue-ns9g273q.js → ncheckbox.vue-id4aaixo.js} +1 -1
- package/dist/client/_nuxt/{ndrawer.vue-ni9cq008.js → ndrawer.vue-m39yozb0.js} +1 -1
- package/dist/client/_nuxt/{ndropdown.vue-lisujvwi.js → ndropdown.vue-ohp3y1fy.js} +1 -1
- package/dist/client/_nuxt/{nlink.vue-hz7sjbml.js → nlink.vue-d7mkhuwn.js} +1 -1
- package/dist/client/_nuxt/{nnavbar.vue-jarkjgm5.js → nnavbar.vue-pfuej0s6.js} +1 -1
- package/dist/client/_nuxt/{none-f7ufjwvc.js → none-ox6cyl31.js} +1 -1
- package/dist/client/_nuxt/{nsection-block-bwzu1176.js → nsection-block-ettf3hvf.js} +1 -1
- package/dist/client/_nuxt/{nselect-tabs.vue-klp7zgkt.js → nselect-tabs.vue-gbgy5wf0.js} +1 -1
- package/dist/client/_nuxt/{nselect.vue-c33h2hkg.js → nselect.vue-bcj1qod9.js} +1 -1
- package/dist/client/_nuxt/{open-graph-o8kygcls.js → open-graph-if05fe0e.js} +1 -1
- package/dist/client/_nuxt/{overview-mg930p2s.js → overview-lmt7y4me.js} +1 -1
- package/dist/client/_nuxt/{pages-hzj8377s.js → pages-bge5pqis.js} +1 -1
- package/dist/client/_nuxt/{payload-pa9ho3wx.js → payload-ov7dfxqi.js} +1 -1
- package/dist/client/_nuxt/{pinia-bn59tmvq.js → pinia-cru27k79.js} +1 -1
- package/dist/client/_nuxt/{plugins-b0u34t54.js → plugins-nfx3dwzm.js} +1 -1
- package/dist/client/_nuxt/{render-tree-ex3rd8k2.js → render-tree-gn490a12.js} +1 -1
- package/dist/client/_nuxt/{runtime-configs-lscmvl3j.js → runtime-configs-l1m0po1z.js} +1 -1
- package/dist/client/_nuxt/{server-discovery-j3ue5064.js → server-discovery-icagh4le.js} +1 -1
- package/dist/client/_nuxt/{server-route-inputs.vue-oqsya5sz.js → server-route-inputs.vue-ev7emysb.js} +1 -1
- package/dist/client/_nuxt/{server-routes-b69rugb7.js → server-routes-l29l7038.js} +1 -1
- package/dist/client/_nuxt/{server-tasks-j1x2e5m1.js → server-tasks-c02vff0a.js} +1 -1
- package/dist/client/_nuxt/{settings-eajnpmxa.js → settings-mq92rq0b.js} +1 -1
- package/dist/client/_nuxt/{stacktrace-list.vue-pdr4s7js.js → stacktrace-list.vue-ofgzkz62.js} +1 -1
- package/dist/client/_nuxt/{state-components-cdh7urp4.js → state-components-j0m4c186.js} +1 -1
- package/dist/client/_nuxt/{state-editor.vue-jf8xzi0c.js → state-editor.vue-o9kp80s4.js} +1 -1
- package/dist/client/_nuxt/{state-modules-hnuz66f5.js → state-modules-hl6rxvzk.js} +1 -1
- package/dist/client/_nuxt/{storage-b7hu0ni2.js → storage-ea7xl11w.js} +1 -1
- package/dist/client/_nuxt/{terminals-fgu81yza.js → terminals-j31gu71g.js} +1 -1
- package/dist/client/_nuxt/{timeline-mvzeq9ip.js → timeline-l74gufqx.js} +1 -1
- package/dist/client/_nuxt/{virtual-files-btz10qqn.js → virtual-files-yyyg1vm7.js} +1 -1
- package/dist/client/_nuxt/{vue-devtools-nv55x5gc.js → vue-devtools-ex7pzz9d.js} +1 -1
- package/dist/client/index.html +12 -12
- package/dist/module.json +1 -1
- package/package.json +4 -4
- package/dist/client/_nuxt/builds/meta/f15cbb75-7ddb-4d58-a277-e712b1037498.json +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{R as ne,bd as ae,p as oe,q as R,D as se,r as f,m as k,x as le,z as re,E as ue,_ as ie,i as de,V as pe,be as E,a4 as me}from"./
|
|
1
|
+
import{R as ne,bd as ae,p as oe,q as R,D as se,r as f,m as k,x as le,z as re,E as ue,_ as ie,i as de,V as pe,be as E,a4 as me}from"./exwwhk5s.js";import{_ as ve}from"./nselect.vue-bcj1qod9.js";import{_ as fe}from"./nlink.vue-d7mkhuwn.js";import{_ as ce}from"./filepath-item.vue-g8leljip.js";import{q as O,k as M,ay as T,H as ye,y as _e,w as ge,u as ke,R as m,v as c,a0 as s,a1 as r,O as u,P as l,a9 as xe,Q as z,V as U,a8 as i,a2 as d,a7 as x,W as F,aw as be,a3 as we,an as Ce,ai as Ke,ad as q,F as b,j as Se}from"./vendor/json-editor-vue-ddl3r0b2.js";import"./vendor/unocss-jhada3qg.js";import"./vendor/shiki-jv02kgzv.js";const Ve={class:"h-[48px] flex items-center justify-between gap1 px-3"},Ne={class:"w-full text-sm"},$e=["value"],Ie=["onClick"],he={key:0,"h-full":"","of-hidden":"",flex:"~ col"},je={border:"b base",class:"h-[49px] flex flex-none items-center justify-between px-4 text-sm"},De={class:"flex items-center gap-4"},Me={key:1},Ue=["onKeyup"],qe={key:0,op50:""},Ae={key:1},Be={"font-bold":""},Le={"text-sm":""},Pe=O({__name:"StorageDetails",async setup(W){let p,_;const w=ne(),C=ae(),K=oe(),S=M(""),g=M(""),o=R("storage:current",""),t=M(),y=R("storage:file:state",""),{data:V}=([p,_]=T(()=>E("storageMounts",()=>f.getStorageMounts())),p=await p,_(),p),{data:N,refresh:A}=([p,_]=T(async()=>E("storageKeys",async()=>o.value?await f.getStorageKeys(o.value):[])),p=await p,_(),p),G=C.hook("storage:key:update",async(n,e)=>{if(!(!o.value||n.split(":")[0]!==o.value)&&(await A(),y.value===n)){if(e==="remove")return K.replace({query:{storage:o.value}});await I(y.value)}});ye(G),_e(o,()=>{A(),y.value=""}),ge(async()=>{if(!y.value){t.value=null;return}I(y.value)}),se("keydown",n=>{n.key==="s"&&(n.ctrlKey||n.metaKey)&&(h(),n.preventDefault())});function $(n){return n.replace(`${o.value}:`,"")}const H=ke(()=>N.value?N.value.filter(n=>n.includes(S.value)):[]);async function I(n){const e=await f.getStorageItem(await k(),n);t.value={key:n,updatedKey:$(n),editingKey:!1,content:e,updatedContent:e}}async function Q(){if(!g.value||!o.value)return;const n=`${o.value}:${g.value}`;N.value?.includes(n)||await f.setStorageItem(await k(),n,""),K.replace({query:{storage:o.value,key:n}}),g.value=""}async function h(){t.value&&(await f.setStorageItem(await k(),t.value.key,t.value.updatedContent),await I(t.value.key))}async function J(){!t.value||!o.value||(await f.removeStorageItem(await k(),t.value.key),t.value=null)}async function X(){if(!t.value||!o.value)return;const n=`${o.value}:${t.value.updatedKey}`,e=await k();await f.setStorageItem(e,n,t.value.updatedContent),await f.removeStorageItem(e,t.value.key),K.replace({query:{storage:o.value,key:n}})}return(n,e)=>{const j=ie,Y=ve,D=re,Z=ue,B=fe,L=pe,P=de,ee=le,te=ce;return c(o)?(s(),m(ee,{key:0,"storage-key":"tab-storage"},{left:r(()=>[l("div",Ve,[d(j,{icon:"carbon-chevron-left","ml--1":"",border:!1,onClick:e[0]||(e[0]=a=>o.value="")}),l("div",Ne,[d(Y,{modelValue:c(o),"onUpdate:modelValue":e[1]||(e[1]=a=>Se(o)?o.value=a:null),n:"primary",icon:"carbon-data-base"},{default:r(()=>[(s(!0),u(b,null,q(c(V),(a,v)=>(s(),u("option",{key:v,value:v},x(v),9,$e))),128))]),_:1},8,["modelValue"])])]),d(D,{modelValue:S.value,"onUpdate:modelValue":e[2]||(e[2]=a=>S.value=a),icon:"carbon-search",placeholder:"Search...",n:"primary sm",border:"y x-none base! rounded-0",class:"w-full py2 ring-0!"},null,8,["modelValue"]),(s(!0),u(b,null,q(H.value,a=>(s(),u(b,{key:a},[l("button",{block:"","w-full":"",truncate:"",px2:"",py1:"","text-start":"","text-sm":"","font-mono":"",class:F(a===t.value?.key?"text-primary n-bg-active":"text-secondary hover:n-bg-hover"),onClick:v=>y.value=a},x($(a)),11,Ie),e[8]||(e[8]=l("div",{"x-divider":""},null,-1))],64))),128)),d(D,{modelValue:g.value,"onUpdate:modelValue":e[3]||(e[3]=a=>g.value=a),icon:"carbon-add",placeholder:"key",n:"sm",border:"t-none x-none base! rounded-0",class:"w-full py2 font-mono ring-0!",onKeyup:U(Q,["enter"])},null,8,["modelValue"])]),right:r(()=>[t.value?.key?(s(),u("div",he,[l("div",je,[l("div",De,[t.value.editingKey?(s(),m(D,{key:0,modelValue:t.value.updatedKey,"onUpdate:modelValue":e[4]||(e[4]=a=>t.value.updatedKey=a),onKeyup:U(X,["enter"])},null,8,["modelValue"])):(s(),u("code",Me,[i(x($(t.value.key))+" ",1),d(Z,{icon:"carbon-edit",class:"cursor-pointer op50 hover:op100",onClick:e[5]||(e[5]=a=>t.value.editingKey=!0)})])),t.value.editingKey?z("",!0):(s(),m(j,{key:2,n:"green xs",disabled:t.value.content===t.value.updatedContent,class:F({"border-green":t.value.content!==t.value.updatedContent}),onClick:h},{default:r(()=>e[9]||(e[9]=[i(" Save ")])),_:1},8,["disabled","class"]))]),l("div",null,[d(j,{n:"red xs",onClick:J},{default:r(()=>e[10]||(e[10]=[i(" Delete ")])),_:1})])]),typeof t.value.content=="object"?(s(),m(c(be),we({key:0,modelValue:t.value.updatedContent,"onUpdate:modelValue":e[6]||(e[6]=a=>t.value.updatedContent=a),class:[[c(w)==="dark"?"jse-theme-dark":"light"],"json-editor-vue h-full of-auto text-sm outline-none"]},n.$attrs,{mode:"text","navigation-bar":!1,indentation:2,"tab-size":2}),null,16,["modelValue","class"])):xe((s(),u("textarea",{key:1,"onUpdate:modelValue":e[7]||(e[7]=a=>t.value.updatedContent=a),placeholder:"Item value...",class:"h-full of-auto p-4 text-sm font-mono outline-none",onKeyup:U(Ke(h,["ctrl"]),["enter"])},null,40,Ue)),[[Ce,t.value.updatedContent]])])):(s(),m(P,{key:1},{default:r(()=>[d(L,{px6:"",py4:""},{default:r(()=>[e[12]||(e[12]=i(" Select one key to start.")),e[13]||(e[13]=l("br",null,null,-1)),e[14]||(e[14]=i("Learn more about ")),d(B,{href:"https://nitro.unjs.io/guide/storage",n:"orange",target:"_blank"},{default:r(()=>e[11]||(e[11]=[i(" Nitro storage ")])),_:1})]),_:1})]),_:1}))]),_:1})):(s(),m(P,{key:1},{default:r(()=>[Object.keys(c(V)).length?(s(),u("p",qe," Select one storage to start: ")):(s(),u("p",Ae,[e[16]||(e[16]=i(" No custom storage defined in ")),e[17]||(e[17]=l("code",null,"nitro.storage",-1)),e[18]||(e[18]=i(".")),e[19]||(e[19]=l("br",null,null,-1)),e[20]||(e[20]=i(" Learn more about ")),d(B,{href:"https://nitro.unjs.io/guide/storage",n:"orange",target:"_blank"},{default:r(()=>e[15]||(e[15]=[i(" Nitro storage ")])),_:1})])),(s(!0),u(b,null,q(c(V),(a,v)=>(s(),m(L,{key:v,"min-w-80":"","cursor-pointer":"","p-4":"","text-left":"",hover:"border-green",onClick:Re=>o.value=v},{default:r(()=>[l("span",Be,x(v),1),e[21]||(e[21]=l("br",null,null,-1)),l("span",Le,x(a.driver)+" driver",1),e[22]||(e[22]=l("br",null,null,-1)),a.base?(s(),m(te,{key:0,"text-xs":"",filepath:a.base},null,8,["filepath"])):z("",!0)]),_:2},1032,["onClick"]))),128))]),_:1}))}}}),He=O({__name:"storage",setup(W){return(p,_)=>{const w=Pe,C=me;return s(),m(C,null,{default:r(()=>[d(w)]),_:1})}}});export{He as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{bd as E,D as B,r as f,m as _,_ as $,bf as V,s as D,E as F,a4 as P}from"./
|
|
1
|
+
import{bd as E,D as B,r as f,m as _,_ as $,bf as V,s as D,E as F,a4 as P}from"./exwwhk5s.js";import{x as R,a as I}from"./vendor/xterm-dbpzgj7s.js";import{q as y,k as g,D as M,O as d,a0 as t,F as A,P as c,a2 as N,R as m,Q as v,a7 as p,u as q,w as z,v as w,ad as L,a8 as C,W as h,ai as j,a1 as O}from"./vendor/json-editor-vue-ddl3r0b2.js";import"./vendor/unocss-jhada3qg.js";import"./vendor/shiki-jv02kgzv.js";const Q={border:"t base",flex:"~ gap-2","items-center":"",p2:""},S={"text-sm":"",op50:""},W=y({__name:"TerminalView",props:{id:{}},setup(b){const n=b,i=g(),r=E(),o=g();let a;M(async()=>{a=new R.Terminal({convertEol:!0,cols:80,screenReaderMode:!0});const u=new I.FitAddon;a.loadAddon(u),a.open(i.value),u.fit(),B(window,"resize",()=>{u.fit()}),o.value=await f.getTerminalDetail(await _(),n.id),o.value?.buffer&&a.write(o.value.buffer),r.hook("devtools:terminal:data",({id:e,data:l})=>{e===n.id&&a.write(l)})});async function s(){f.runTerminalAction(await _(),n.id,"clear"),a?.clear()}async function k(){f.runTerminalAction(await _(),n.id,"restart")}async function x(){f.runTerminalAction(await _(),n.id,"terminate")}return(u,e)=>{const l=$;return t(),d(A,null,[c("div",{ref_key:"container",ref:i,"h-full":"","w-full":"","of-auto":"","bg-black":""},null,512),c("div",Q,[N(l,{title:"Clear",icon:"i-carbon-clean",border:!1,onClick:e[0]||(e[0]=T=>s())}),o.value?.restartable?(t(),m(l,{key:0,title:"Restart",icon:"carbon-renew",border:!1,onClick:e[1]||(e[1]=T=>k())})):v("",!0),o.value?.terminatable?(t(),m(l,{key:1,title:"Terminate",icon:"carbon-delete",border:!1,onClick:e[2]||(e[2]=T=>x())})):v("",!0),c("span",S,p(o.value?.description),1)])],64)}}}),G={key:0,"h-full":"","w-full":"","of-hidden":"",grid:"~ rows-[max-content_1fr_max-content]"},H={flex:"~",border:"b base","flex-1":"","items-center":"","n-navbar-glass":""},J=["onClick"],K={key:1,p10:""},U={key:1,"h-full":"",flex:"","items-center":"","justify-center":""},X=y({__name:"TerminalPage",setup(b){const n=V(),i=D(),r=q(()=>n.value?.find(a=>a.id===i.value));async function o(a){f.runTerminalAction(await _(),a,"remove")}return z(()=>{!i.value&&n.value?.length&&(i.value=n.value[0].id)}),(a,s)=>{const k=F,x=$,u=W;return w(n)?.length?(t(),d("div",G,[c("div",H,[(t(!0),d(A,null,L(w(n),e=>(t(),d("button",{key:e.id,border:"r base",flex:"~ gap-2","items-center":"",px3:"",py2:"",class:h(e.id===r.value?.id?"bg-active":""),onClick:l=>i.value=e.id},[e.icon?(t(),m(k,{key:0,icon:e.icon},null,8,["icon"])):v("",!0),c("span",{class:h(e.id===r.value?.id?"":"op50")},p(e.name)+p(e.isTerminated?" (terminated)":""),3),e.isTerminated?(t(),m(x,{key:1,icon:"carbon-close","mx--2":"",border:!1,onClick:j(l=>o(e.id),["stop"])},null,8,["onClick"])):v("",!0)],10,J))),128))]),r.value?(t(),m(u,{id:r.value.id,key:r.value.id},null,8,["id"])):(t(),d("div",K,[s[0]||(s[0]=C(" Terminal ")),c("code",null,p(w(i)),1),s[1]||(s[1]=C(" not found "))]))])):(t(),d("div",U,s[2]||(s[2]=[c("em",{op50:""},"No terminal attached",-1)])))}}}),ae=y({__name:"terminals",setup(b){return(n,i)=>{const r=X,o=P;return t(),m(o,null,{default:O(()=>[N(r)]),_:1})}}});export{ae as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a5 as W,M as j,D as O,bg as Y,b as U,R as q,a as K,_ as R,a7 as X,f as Q,bh as Z,K as ee,n as se,L as ne,i as oe,y as te,r as G,F as ae}from"./oywnus8r.js";import{_ as V}from"./duration-display.vue-oa6j0va3.js";import{q as B,u as w,O as i,a0 as t,U as T,P as o,a7 as m,v as g,F as f,ad as E,R as v,k as C,y as le,p as re,Q as x,a2 as u,W as z,X as P,a1 as h,aw as ie,a3 as pe,a8 as F,aj as ce}from"./vendor/json-editor-vue-ddl3r0b2.js";import{_ as H}from"./nbadge-f29cbhae.js";import{_ as de}from"./composable-item.vue-iiq4onn8.js";import{_ as ue}from"./stacktrace-list.vue-pdr4s7js.js";import{_ as me}from"./ndrawer.vue-ni9cq008.js";import{_ as ke}from"./launch-page.vue-nyd180gp.js";import{_ as ye}from"./nlink.vue-hz7sjbml.js";import{_ as fe}from"./code-diff.vue-f6qrbepb.js";import{_ as ve}from"./help-fab.vue-nvotn2uf.js";import"./vendor/unocss-jhada3qg.js";import"./vendor/shiki-jv02kgzv.js";import"./nmarkdown.vue-o2d4fkm8.js";import"./client-j9xalwnm.js";import"./filepath-item.vue-lxwmjgzn.js";import"./index-jc4yj4to.js";import"./constants-b32h69zq.js";import"./ncode-block.vue-fo8ld4g6.js";const he=B({__name:"TimelineItemFunction",props:{item:{}},setup(y){const d=y,p=w(()=>W(d.item.name,50,60,"_op_")),n=w(()=>p.value.replace(/_op_/,"1")),e=w(()=>W(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=j(()=>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"}),O(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)}),O(a,"scroll",()=>{a.value.scrollLeft!==e.value.scrollLeft&&(A(),e.value.scrollLeft=a.value.scrollLeft)}),O(e,"wheel",_=>{_.altKey?(c.value=Y(c.value+_.deltaY/200,.5,3),A()):e.value.scrollLeft+=_.deltaY}),(_,L)=>{const $=V,M=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(W))(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(M,{"flex-inline":"","of-x-hidden":"","hover:of-x-visible":"","bg-base":"",class:z(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":""},We=B({__name:"TimelineList",props:{data:{}},emits:["select"],setup(y,{emit:d}){const p=d;return(n,e)=>{const l=V;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(W))(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",Me,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))])}}}),Ve={key:0,"text-blue":""},Oe={key:1,"text-purple":""},je={key:2,"text-green":""},Re={key:3,"text-gray":""},ze={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=q(),r=K();return(s,c)=>{const k=R,D=P("VMenu");return typeof s.value=="string"?(t(),i("div",Ve,m(JSON.stringify(s.value)),1)):typeof s.value=="number"?(t(),i("div",Oe,m(s.value),1)):typeof s.value=="boolean"?(t(),i("div",je,m(s.value),1)):typeof s.value>"u"?(t(),i("div",Re," undefined ")):typeof s.value=="function"?(t(),i("div",ze," [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:z([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},Qe={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=j(()=>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=V,A=ue;return a.record?(t(),i("div",Ue,[o("div",qe,[u(s,{n:"yellow",textContent:"Function call"})]),o("div",Ke,[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",Xe,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",Qe,", ")):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=j(()=>d.record.start,{showSecond:!0});return(n,e)=>{const l=H,a=V;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=Q(),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=R,D=we,A=We,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:z(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>
|
|
1
|
+
import{a5 as W,M as j,D as O,bg as Y,b as U,R as q,a as K,_ as R,a7 as X,f as Q,bh as Z,K as ee,n as se,L as ne,i as oe,y as te,r as G,F as ae}from"./exwwhk5s.js";import{_ as V}from"./duration-display.vue-oa6j0va3.js";import{q as B,u as w,O as i,a0 as t,U as T,P as o,a7 as m,v as g,F as f,ad as E,R as v,k as C,y as le,p as re,Q as x,a2 as u,W as z,X as P,a1 as h,aw as ie,a3 as pe,a8 as F,aj as ce}from"./vendor/json-editor-vue-ddl3r0b2.js";import{_ as H}from"./nbadge-erzx95rd.js";import{_ as de}from"./composable-item.vue-j0gn61br.js";import{_ as ue}from"./stacktrace-list.vue-ofgzkz62.js";import{_ as me}from"./ndrawer.vue-m39yozb0.js";import{_ as ke}from"./launch-page.vue-ox98boyc.js";import{_ as ye}from"./nlink.vue-d7mkhuwn.js";import{_ as fe}from"./code-diff.vue-imytoxti.js";import{_ as ve}from"./help-fab.vue-mxwhdrsr.js";import"./vendor/unocss-jhada3qg.js";import"./vendor/shiki-jv02kgzv.js";import"./nmarkdown.vue-o2d4fkm8.js";import"./client-j9xalwnm.js";import"./filepath-item.vue-g8leljip.js";import"./index-jc4yj4to.js";import"./constants-b32h69zq.js";import"./ncode-block.vue-fo8ld4g6.js";const he=B({__name:"TimelineItemFunction",props:{item:{}},setup(y){const d=y,p=w(()=>W(d.item.name,50,60,"_op_")),n=w(()=>p.value.replace(/_op_/,"1")),e=w(()=>W(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=j(()=>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"}),O(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)}),O(a,"scroll",()=>{a.value.scrollLeft!==e.value.scrollLeft&&(A(),e.value.scrollLeft=a.value.scrollLeft)}),O(e,"wheel",_=>{_.altKey?(c.value=Y(c.value+_.deltaY/200,.5,3),A()):e.value.scrollLeft+=_.deltaY}),(_,L)=>{const $=V,M=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(W))(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(M,{"flex-inline":"","of-x-hidden":"","hover:of-x-visible":"","bg-base":"",class:z(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":""},We=B({__name:"TimelineList",props:{data:{}},emits:["select"],setup(y,{emit:d}){const p=d;return(n,e)=>{const l=V;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(W))(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",Me,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))])}}}),Ve={key:0,"text-blue":""},Oe={key:1,"text-purple":""},je={key:2,"text-green":""},Re={key:3,"text-gray":""},ze={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=q(),r=K();return(s,c)=>{const k=R,D=P("VMenu");return typeof s.value=="string"?(t(),i("div",Ve,m(JSON.stringify(s.value)),1)):typeof s.value=="number"?(t(),i("div",Oe,m(s.value),1)):typeof s.value=="boolean"?(t(),i("div",je,m(s.value),1)):typeof s.value>"u"?(t(),i("div",Re," undefined ")):typeof s.value=="function"?(t(),i("div",ze," [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:z([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},Qe={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=j(()=>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=V,A=ue;return a.record?(t(),i("div",Ue,[o("div",qe,[u(s,{n:"yellow",textContent:"Function call"})]),o("div",Ke,[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",Xe,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",Qe,", ")):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=j(()=>d.record.start,{showSecond:!0});return(n,e)=>{const l=H,a=V;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=Q(),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=R,D=we,A=We,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:z(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>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as w}from"./nnavbar.vue-
|
|
1
|
+
import{_ as w}from"./nnavbar.vue-pfuej0s6.js";import{_ as D}from"./ncode-block.vue-fo8ld4g6.js";import{bl as B,bm as S,O as P,i as j,V as W,x as E}from"./exwwhk5s.js";import{O as c,a0 as i,P as a,q as I,k as f,w as O,u as d,a2 as l,a1 as u,R,a7 as v,F as _,ad as U,W as q}from"./vendor/json-editor-vue-ddl3r0b2.js";import{_ as z}from"./help-fab.vue-mxwhdrsr.js";import"./client-j9xalwnm.js";import"./vendor/unocss-jhada3qg.js";import"./vendor/shiki-jv02kgzv.js";const G={class:"markdown-body"},H={__name:"virtual-files",setup(h,{expose:r}){return r({frontmatter:{}}),(p,o)=>(i(),c("div",G,o[0]||(o[0]=[a("h1",null,"Virtual Files",-1),a("p",null,"Virtual files are generated on the fly to support the conventions of the framework, and to provide a better developer experience.",-1)])))}},L=["onClick"],A={key:0,"h-full":"","of-hidden":"",flex:"~ col"},J={border:"b base","flex-none":"",px4:"",py2:"","text-sm":"",op75:""},oe=I({__name:"virtual-files",setup(h){const r=f(""),n=B(),p=S(),o=f();O(()=>{if(!p.value)return;const e=`/_vfs.json/${encodeURIComponent(p.value)}`;fetch(e,{headers:{accept:"application/json"}}).then(t=>t.json()).then(t=>o.value=t.current)});function x(e){if(n.value?.rootDir)return e.startsWith(n.value?.rootDir)?e.slice(n.value.rootDir.length):e}const m=d(()=>n.value?n.value.entries.filter(e=>!e.id.startsWith(`${n.value?.rootDir||""}/.nuxt/`)).sort((e,t)=>e.id.localeCompare(t.id)):[]),k=d(()=>new P(m.value,{keys:["id","path"]})),b=d(()=>r.value?k.value.search(r.value).map(e=>e.item):m.value);return(e,t)=>{const y=w,g=D,C=W,F=j,$=E,N=H,V=z;return i(),c(_,null,[l($,{class:"virtual-files","storage-key":"tab-virtual-files"},{left:u(()=>[l(y,{search:r.value,"onUpdate:search":t[0]||(t[0]=s=>r.value=s),"no-padding":"",p3:""},null,8,["search"]),(i(!0),c(_,null,U(b.value,s=>(i(),c(_,{key:s.id},[a("button",{block:"","w-full":"","select-none":"",truncate:"",px2:"",py1:"","text-start":"","text-sm":"","font-mono":"",class:q(s.id===o.value?.id?"text-primary n-bg-active":"text-secondary hover:n-bg-hover"),onClick:K=>p.value=s.id},v(x(s.id)),11,L),t[1]||(t[1]=a("div",{"x-divider":""},null,-1))],64))),128))]),right:u(()=>[o.value?.content?(i(),c("div",A,[a("div",J,[a("code",null,v(o.value.id),1)]),l(g,{"h-full":"","of-auto":"","text-sm":"",code:o.value.content,lang:"typescript"},null,8,["code"])])):(i(),R(F,{key:1},{default:u(()=>[l(C,{px6:"",py2:""},{default:u(()=>t[2]||(t[2]=[a("span",{op75:""},"Select a file to start",-1)])),_:1})]),_:1}))]),_:1}),l(V,null,{default:u(()=>[l(N)]),_:1})],64)}}});export{oe as default};
|