@nuxt/devtools 1.4.1 → 1.5.0
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/analyze-build.mjs +1 -1
- package/dist/chunks/module-main.mjs +648 -648
- package/dist/chunks/vite-inspect.mjs +1 -1
- package/dist/chunks/vscode.mjs +15 -15
- package/dist/client/200.html +18 -34
- package/dist/client/404.html +18 -34
- package/dist/client/_nuxt/__blank-c3ogaker.js +1 -0
- package/dist/client/_nuxt/analyze-build-ea1eck8p.js +1 -0
- package/dist/client/_nuxt/assets-n3kfhorl.js +16 -0
- package/dist/client/_nuxt/builds/latest.json +1 -1
- package/dist/client/_nuxt/builds/meta/9a9f67ed-5b9a-4514-bf49-62859c510bf6.json +1 -0
- package/dist/client/_nuxt/client-klf75x38.js +1 -0
- package/dist/client/_nuxt/code-diff.vue-3ei6zne1.js +8 -0
- package/dist/client/_nuxt/code-snippets.vue-jr6ih8m7.js +1 -0
- package/dist/client/_nuxt/components-c38lzacq.js +1 -0
- package/dist/client/_nuxt/components-tree-ihs546mg.js +1 -0
- package/dist/client/_nuxt/composable-item.vue-fyg5hnt4.js +1 -0
- package/dist/client/_nuxt/custom-_name_-eeczuiaf.js +1 -0
- package/dist/client/_nuxt/default-iofn16rr.js +1 -0
- package/dist/client/_nuxt/duration-display.vue-h3qa2740.js +1 -0
- package/dist/client/_nuxt/entry.css-bgn3dvs3.css +1 -0
- package/dist/client/_nuxt/error-404-m1rb28qo.js +1 -0
- package/dist/client/_nuxt/error-404.css-l9hojrit.css +1 -0
- package/dist/client/_nuxt/error-500-diual75d.js +1 -0
- package/dist/client/_nuxt/error-500.css-jiufalsw.css +1 -0
- package/dist/client/_nuxt/error-j0kod4j7.js +9 -0
- package/dist/client/_nuxt/filepath-item.vue-gspuql6t.js +1 -0
- package/dist/client/_nuxt/full-gbkjzbjn.js +1 -0
- package/dist/client/_nuxt/help-fab.vue-hr5z89ai.js +1 -0
- package/dist/client/_nuxt/hooks-bmqjn5uk.js +1 -0
- package/dist/client/_nuxt/imports-bpqh8uz0.js +1 -0
- package/dist/client/_nuxt/index-i6v3sxsq.js +1 -0
- package/dist/client/_nuxt/index-kk8qg4i0.js +2 -0
- package/dist/client/_nuxt/l4ouzdbv.js +16 -0
- package/dist/client/_nuxt/launch-page.vue-o72v57lt.js +1 -0
- package/dist/client/_nuxt/modules-hfiy1oig.js +1 -0
- package/dist/client/_nuxt/nbadge-nscxg0ea.js +1 -0
- package/dist/client/_nuxt/ncheckbox.vue-e9ud9j5x.js +1 -0
- package/dist/client/_nuxt/ncode-block.vue-bfbbo3c9.js +2 -0
- package/dist/client/_nuxt/ndrawer.vue-mplxtid5.js +1 -0
- package/dist/client/_nuxt/ndropdown.vue-e87kxadx.js +1 -0
- package/dist/client/_nuxt/nicon-title.vue-g9trlv29.js +1 -0
- package/dist/client/_nuxt/nlink.vue-eiz3iwjv.js +1 -0
- package/dist/client/_nuxt/nmarkdown.vue-nnge8mex.js +1 -0
- package/dist/client/_nuxt/nnavbar.vue-g8533enj.js +1 -0
- package/dist/client/_nuxt/none-e5nk9q3m.js +1 -0
- package/dist/client/_nuxt/nsection-block-mvrkafth.js +1 -0
- package/dist/client/_nuxt/nselect-tabs.vue-fwkap4uo.js +1 -0
- package/dist/client/_nuxt/nselect.vue-fw7xtqj5.js +1 -0
- package/dist/client/_nuxt/open-graph-mg0wvem5.js +3 -0
- package/dist/client/_nuxt/{open-graph.-BQyihv8.css → open-graph.css-np61an3p.css} +1 -1
- package/dist/client/_nuxt/overview-dwng171y.js +1 -0
- package/dist/client/_nuxt/pages-dw5vn1ay.js +1 -0
- package/dist/client/_nuxt/payload-n5bpui5g.js +1 -0
- package/dist/client/_nuxt/pinia-hflvu3wk.js +1 -0
- package/dist/client/_nuxt/plugins-is0jalvz.js +1 -0
- package/dist/client/_nuxt/runtime-configs-j2weq3a8.js +1 -0
- package/dist/client/_nuxt/server-route-inputs.vue-f12vix3z.js +1 -0
- package/dist/client/_nuxt/server-routes-fukasdvq.js +9 -0
- package/dist/client/_nuxt/server-tasks-k1h90jj9.js +1 -0
- package/dist/client/_nuxt/settings-bwoka9ty.js +1 -0
- package/dist/client/_nuxt/stacktrace-list.vue-ctsox658.js +1 -0
- package/dist/client/_nuxt/state-components-3qxyvdiu.js +1 -0
- package/dist/client/_nuxt/state-editor.vue-mh0eij72.js +1 -0
- package/dist/client/_nuxt/state-modules-fxsj7vyw.js +1 -0
- package/dist/client/_nuxt/storage-i7qr12jo.js +1 -0
- package/dist/client/_nuxt/terminals-elxq15i6.js +1 -0
- package/dist/client/_nuxt/terminals.css-o071tnq5.css +1 -0
- package/dist/client/_nuxt/timeline-o2dlglei.js +31 -0
- package/dist/client/_nuxt/timeline.css-i7fpg75n.css +1 -0
- package/dist/client/_nuxt/unocss-runtime-ks657l4w.js +1 -0
- package/dist/client/_nuxt/vendor/json-editor-vue-mdfcgt41.js +124 -0
- package/dist/client/_nuxt/vendor/json-editor-vue.css-o0jf01nd.css +1 -0
- package/dist/client/_nuxt/vendor/shiki-fpe2sz4h.js +87 -0
- package/dist/client/_nuxt/vendor/unocss-mnpxkox6.js +2 -0
- package/dist/client/_nuxt/vendor/unocss.css-na153c8v.css +1 -0
- package/dist/client/_nuxt/vendor/vis-cum19y28.js +98 -0
- package/dist/client/_nuxt/{BMmGYe_n.js → vendor/xterm-h0ftnevm.js} +6 -6
- package/dist/client/_nuxt/{terminals.BIEho_Pa.css → vendor/xterm.css-egivkam7.css} +1 -1
- package/dist/client/_nuxt/virtual-files-j88ybqgt.js +1 -0
- package/dist/client/_nuxt/vue-virtual-scroller.esm-k82i9hy2.js +2 -0
- package/dist/client/index.html +18 -34
- package/dist/module.json +1 -1
- package/dist/runtime/function-metrics-helpers.d.ts +1 -1
- package/dist/runtime/function-metrics-helpers.js +1 -1
- package/dist/runtime/plugins/view/FrameBox.vue +1 -1
- package/dist/runtime/plugins/view/Main.vue +3 -3
- package/dist/runtime/plugins/view/client.d.ts +1 -2
- package/dist/runtime/plugins/view/client.js +2 -2
- package/dist/runtime/plugins/view/state.d.ts +1 -2
- package/dist/runtime/plugins/view/utils.d.ts +12 -12
- package/dist/runtime/settings.d.ts +1 -1
- package/dist/runtime/shared/hooks.d.ts +0 -1
- package/dist/runtime/use-nuxt-devtools.d.ts +1 -1
- package/dist/runtime/use-nuxt-devtools.js +1 -1
- package/dist/runtime/vue-devtools/overlay.js +1 -1
- package/package.json +35 -35
- package/dist/client/_nuxt/32IlS-eL.js +0 -15
- package/dist/client/_nuxt/6ngNN4Yp.js +0 -1
- package/dist/client/_nuxt/7oK7PdYH.js +0 -1
- package/dist/client/_nuxt/B1veJI6T.js +0 -1
- package/dist/client/_nuxt/B3uNdhXb.js +0 -100
- package/dist/client/_nuxt/B6E6ObS_.js +0 -8
- package/dist/client/_nuxt/BECRlsCL.js +0 -1
- package/dist/client/_nuxt/BHh_UM9T.js +0 -1
- package/dist/client/_nuxt/BI3hykgO.js +0 -1
- package/dist/client/_nuxt/BKeomq25.js +0 -1
- package/dist/client/_nuxt/BKukfVLl.js +0 -1
- package/dist/client/_nuxt/BLmvGqlk.js +0 -1
- package/dist/client/_nuxt/BMbUeBqv.js +0 -74
- package/dist/client/_nuxt/BOV_C5BD.js +0 -1
- package/dist/client/_nuxt/BYelj_cE.js +0 -1
- package/dist/client/_nuxt/BZfs-ost.js +0 -1
- package/dist/client/_nuxt/BiRcA7Ly.js +0 -1
- package/dist/client/_nuxt/BiWblMbN.js +0 -505
- package/dist/client/_nuxt/BiWf_U1D.js +0 -1
- package/dist/client/_nuxt/BkwfBuTq.js +0 -1
- package/dist/client/_nuxt/BopA0WYG.js +0 -1
- package/dist/client/_nuxt/Br6ll-O0.js +0 -1
- package/dist/client/_nuxt/BsEGx9wN.js +0 -1
- package/dist/client/_nuxt/Bu2gNcUf.js +0 -1
- package/dist/client/_nuxt/Bxkoe-BC.js +0 -1
- package/dist/client/_nuxt/ByTwm2ax.js +0 -1
- package/dist/client/_nuxt/C1fpCDlE.js +0 -1
- package/dist/client/_nuxt/C2HmjCtb.js +0 -1
- package/dist/client/_nuxt/C8RrL2-P.js +0 -1
- package/dist/client/_nuxt/C9bF3W-8.js +0 -1032
- package/dist/client/_nuxt/CCJYS4Qc.js +0 -4
- package/dist/client/_nuxt/CCXTpRMt.js +0 -1
- package/dist/client/_nuxt/CCfUy938.js +0 -2
- package/dist/client/_nuxt/CEL3Rl_8.js +0 -1
- package/dist/client/_nuxt/CHuuZgn4.js +0 -699
- package/dist/client/_nuxt/CIvuwNIv.js +0 -2
- package/dist/client/_nuxt/CNzQK24q.js +0 -1
- package/dist/client/_nuxt/CO7Eo6nF.js +0 -1
- package/dist/client/_nuxt/CTKqK4eG.js +0 -2002
- package/dist/client/_nuxt/CUZJ8tqD.js +0 -1
- package/dist/client/_nuxt/CWDIGLyg.js +0 -1
- package/dist/client/_nuxt/C_n3_iyW.js +0 -16
- package/dist/client/_nuxt/C_tLznPO.js +0 -43
- package/dist/client/_nuxt/CbViG2Xw.js +0 -74
- package/dist/client/_nuxt/CbYhyuC0.js +0 -505
- package/dist/client/_nuxt/CoNBQO3e.js +0 -1
- package/dist/client/_nuxt/CsTmP73Z.js +0 -1
- package/dist/client/_nuxt/CupVZNk8.js +0 -25
- package/dist/client/_nuxt/D4C_EO1O.js +0 -9
- package/dist/client/_nuxt/D4FLysGE.js +0 -1
- package/dist/client/_nuxt/D4V9JMY9.js +0 -1
- package/dist/client/_nuxt/D5Dg5B9b.js +0 -1
- package/dist/client/_nuxt/D86udNSS.js +0 -1
- package/dist/client/_nuxt/DAg81ukK.js +0 -30
- package/dist/client/_nuxt/DC8MraHL.js +0 -666
- package/dist/client/_nuxt/DDDCUP5E.js +0 -3
- package/dist/client/_nuxt/DDMtKJxh.js +0 -1
- package/dist/client/_nuxt/DHFOa8tC.js +0 -200
- package/dist/client/_nuxt/DHZqFavZ.js +0 -2
- package/dist/client/_nuxt/DHsLiygU.js +0 -1
- package/dist/client/_nuxt/DJg41Obz.js +0 -1
- package/dist/client/_nuxt/DJn5wykB.js +0 -1
- package/dist/client/_nuxt/DK4oFTHQ.js +0 -200
- package/dist/client/_nuxt/DMjsYTya.js +0 -1
- package/dist/client/_nuxt/DOv5BRyJ.js +0 -1
- package/dist/client/_nuxt/DajZvwFy.js +0 -1
- package/dist/client/_nuxt/Dch3xQiY.js +0 -699
- package/dist/client/_nuxt/Di-fSNio.js +0 -1
- package/dist/client/_nuxt/DiyNht5f.js +0 -9
- package/dist/client/_nuxt/Dm9RYIcI.js +0 -1
- package/dist/client/_nuxt/DockxStG.js +0 -1
- package/dist/client/_nuxt/DpYuRYxj.js +0 -2072
- package/dist/client/_nuxt/DqpvVAaa.js +0 -1
- package/dist/client/_nuxt/DrswlxM3.js +0 -1
- package/dist/client/_nuxt/DtfHoqTV.js +0 -1
- package/dist/client/_nuxt/DvyTQcux.js +0 -1
- package/dist/client/_nuxt/J0gvLlTF.js +0 -1
- package/dist/client/_nuxt/L3q7etZW.js +0 -1
- package/dist/client/_nuxt/Q9LIRUci.js +0 -25
- package/dist/client/_nuxt/QxrU7fRC.js +0 -1
- package/dist/client/_nuxt/RBAD4-dW.js +0 -1
- package/dist/client/_nuxt/T8d8zkkH.js +0 -1
- package/dist/client/_nuxt/U0su7k1z.js +0 -1
- package/dist/client/_nuxt/UI0GwUC_.js +0 -1
- package/dist/client/_nuxt/YWCqik9X.js +0 -98
- package/dist/client/_nuxt/_ECCzcZq.js +0 -666
- package/dist/client/_nuxt/builds/meta/1766755b-b307-4775-82c4-edb6a4a7e185.json +0 -1
- package/dist/client/_nuxt/entry.eFSfOpqI.css +0 -1
- package/dist/client/_nuxt/error-404.HYsbWGh9.css +0 -1
- package/dist/client/_nuxt/error-500.BwPFg8q2.css +0 -1
- package/dist/client/_nuxt/nhLZZe93.js +0 -1
- package/dist/client/_nuxt/timeline.BVVcTKn-.css +0 -1
- /package/dist/client/_nuxt/{assets.DGT3vQsf.css → assets.css-l0xw7n9m.css} +0 -0
- /package/dist/client/_nuxt/{BcJws1i5.js → constants-b32h69zq.js} +0 -0
- /package/dist/client/_nuxt/{HelpFab.DHTsX8io.css → help-fab.css-l22fo390.css} +0 -0
- /package/dist/client/_nuxt/{NCodeBlock.BJ-XAY5s.css → ncode-block.css-enx2fys6.css} +0 -0
- /package/dist/client/_nuxt/{NSectionBlock.Dnwb6MN5.css → nsection-block.css-nz74xks7.css} +0 -0
- /package/dist/client/_nuxt/{Blr6EMNg.js → vendor/markdown-it-fvu08dbs.js} +0 -0
- /package/dist/client/_nuxt/{virtual-files.CWZEM3J4.css → virtual-files.css-i6taatd1.css} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{S as ne,b9 as ae,l as oe,m as T,z as se,r as f,h as k,ba as z,e as le,v as re,D as ue,W as ie,c as de,p as me,a5 as pe}from"./l4ouzdbv.js";import{_ as ve}from"./nselect.vue-fw7xtqj5.js";import{_ as fe}from"./nlink.vue-eiz3iwjv.js";import{_ as ce}from"./filepath-item.vue-gspuql6t.js";import{k as W,b as U,ax as E,y as ye,c as ge,w as _e,l as ke,u as c,Q as s,O as p,$ as r,U as l,a0 as d,A as be,S as u,F as x,ab as A,a5 as b,Y as F,Z as M,a6 as i,W as R,aw as xe,a1 as we,a8 as Ce,ah as Se,am as Ke}from"./vendor/json-editor-vue-mdfcgt41.js";import"./vendor/unocss-mnpxkox6.js";import"./vendor/shiki-fpe2sz4h.js";const Ve={class:"h-[48px] flex items-center justify-between gap1 px-3"},$e={class:"w-full text-sm"},Ne=["value"],Ie=["onClick"],he={key:0,"h-full":"","of-hidden":"",flex:"~ col"},De={border:"b base",class:"h-[49px] flex flex-none items-center justify-between px-4 text-sm"},je={class:"flex items-center gap-4"},Ue={key:1},Ae=["onKeyup"],Me={key:0,op50:""},Be={key:1},Le={"font-bold":""},qe={"text-sm":""},Pe=W({__name:"StorageDetails",async setup(O){let m,g;const w=ne(),C=ae(),S=oe(),K=U(""),_=U(""),o=T("storage:current",""),t=U(),y=T("storage:file:state",""),{data:V}=([m,g]=E(()=>z("storageMounts",()=>f.getStorageMounts())),m=await m,g(),m),{data:$,refresh:B}=([m,g]=E(async()=>z("storageKeys",async()=>o.value?await f.getStorageKeys(o.value):[])),m=await m,g(),m),G=C.hook("storage:key:update",async(n,e)=>{if(!(!o.value||n.split(":")[0]!==o.value)&&(await B(),y.value===n)){if(e==="remove")return S.replace({query:{storage:o.value}});await I(y.value)}});ye(G),ge(o,()=>{B(),y.value=""}),_e(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(n){return n.replace(`${o.value}:`,"")}const Q=ke(()=>$.value?$.value.filter(n=>n.includes(K.value)):[]);async function I(n){const e=await f.getStorageItem(await k(),n);t.value={key:n,updatedKey:N(n),editingKey:!1,content:e,updatedContent:e}}async function Y(){if(!_.value||!o.value)return;const n=`${o.value}:${_.value}`;$.value?.includes(n)||await f.setStorageItem(await k(),n,""),S.replace({query:{storage:o.value,key:n}}),_.value=""}async function h(){t.value&&(await f.setStorageItem(await k(),t.value.key,t.value.updatedContent),await I(t.value.key))}async function Z(){!t.value||!o.value||(await f.removeStorageItem(await k(),t.value.key),t.value=null)}async function H(){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),S.replace({query:{storage:o.value,key:n}})}return(n,e)=>{const D=le,J=ve,j=re,X=ue,L=fe,q=ie,P=de,ee=me,te=ce;return c(o)?(s(),p(ee,{key:0,"storage-key":"tab-storage"},{left:r(()=>[l("div",Ve,[d(D,{icon:"carbon-chevron-left","ml--1":"",border:!1,onClick:e[0]||(e[0]=a=>o.value="")}),l("div",$e,[d(J,{modelValue:c(o),"onUpdate:modelValue":e[1]||(e[1]=a=>be(o)?o.value=a:null),n:"primary",icon:"carbon-data-base"},{default:r(()=>[(s(!0),u(x,null,A(c(V),(a,v)=>(s(),u("option",{key:v,value:v},b(v),9,Ne))),128))]),_:1},8,["modelValue"])])]),d(j,{modelValue:K.value,"onUpdate:modelValue":e[2]||(e[2]=a=>K.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(x,null,A(Q.value,a=>(s(),u(x,{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},b(N(a)),11,Ie),e[8]||(e[8]=l("div",{"x-divider":""},null,-1))],64))),128)),d(j,{modelValue:_.value,"onUpdate:modelValue":e[3]||(e[3]=a=>_.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:M(Y,["enter"])},null,8,["modelValue"])]),right:r(()=>[t.value?.key?(s(),u("div",he,[l("div",De,[l("div",je,[t.value.editingKey?(s(),p(j,{key:0,modelValue:t.value.updatedKey,"onUpdate:modelValue":e[4]||(e[4]=a=>t.value.updatedKey=a),onKeyup:M(H,["enter"])},null,8,["modelValue"])):(s(),u("code",Ue,[i(b(N(t.value.key))+" ",1),d(X,{icon:"carbon-edit",class:"cursor-pointer op50 hover:op100",onClick:e[5]||(e[5]=a=>t.value.editingKey=!0)})])),t.value.editingKey?R("",!0):(s(),p(D,{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(D,{n:"red xs",onClick:Z},{default:r(()=>e[10]||(e[10]=[i(" Delete ")])),_:1})])]),typeof t.value.content=="object"?(s(),p(c(xe),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"])):Ce((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:M(Se(h,["ctrl"]),["enter"])},null,40,Ae)),[[Ke,t.value.updatedContent]])])):(s(),p(P,{key:1},{default:r(()=>[d(q,{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(L,{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(),p(P,{key:1},{default:r(()=>[Object.keys(c(V)).length?(s(),u("p",Me," Select one storage to start: ")):(s(),u("p",Be,[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(L,{href:"https://nitro.unjs.io/guide/storage",n:"orange",target:"_blank"},{default:r(()=>e[15]||(e[15]=[i(" Nitro storage ")])),_:1})])),(s(!0),u(x,null,A(c(V),(a,v)=>(s(),p(q,{key:v,"min-w-80":"","cursor-pointer":"","p-4":"","text-left":"",hover:"border-green",onClick:Te=>o.value=v},{default:r(()=>[l("span",Le,b(v),1),e[21]||(e[21]=l("br",null,null,-1)),l("span",qe,b(a.driver)+" driver",1),e[22]||(e[22]=l("br",null,null,-1)),a.base?(s(),p(te,{key:0,"text-xs":"",filepath:a.base},null,8,["filepath"])):R("",!0)]),_:2},1032,["onClick"]))),128))]),_:1}))}}}),Qe=W({__name:"storage",setup(O){return(m,g)=>{const w=Pe,C=pe;return s(),p(C,null,{default:r(()=>[d(w)]),_:1})}}});export{Qe as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b9 as B,z as E,r as f,h as p,e as $,bb as V,n as D,D as F,a5 as z}from"./l4ouzdbv.js";import{x as I,a as M}from"./vendor/xterm-h0ftnevm.js";import{k as y,b as g,B as P,Q as t,S as d,U as c,a0 as A,O as m,W as v,a5 as _,F as N,l as R,w as L,u as x,ab as S,Y as h,ah as j,a6 as C,$ as q}from"./vendor/json-editor-vue-mdfcgt41.js";import"./vendor/unocss-mnpxkox6.js";import"./vendor/shiki-fpe2sz4h.js";const O={border:"t base",flex:"~ gap-2","items-center":"",p2:""},Q={"text-sm":"",op50:""},U=y({__name:"TerminalView",props:{id:{}},setup(b){const n=b,i=g(),r=B(),o=g();let a;P(async()=>{a=new I.Terminal({convertEol:!0,cols:80,screenReaderMode:!0});const u=new M.FitAddon;a.loadAddon(u),a.open(i.value),u.fit(),E(window,"resize",()=>{u.fit()}),o.value=await f.getTerminalDetail(await p(),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 p(),n.id,"clear"),a?.clear()}async function k(){f.runTerminalAction(await p(),n.id,"restart")}async function w(){f.runTerminalAction(await p(),n.id,"terminate")}return(u,e)=>{const l=$;return t(),d(N,null,[c("div",{ref_key:"container",ref:i,"h-full":"","w-full":"","of-auto":"","bg-black":""},null,512),c("div",O,[A(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=>w())})):v("",!0),c("span",Q,_(o.value?.description),1)])],64)}}}),W={key:0,"h-full":"","w-full":"","of-hidden":"",grid:"~ rows-[max-content_1fr_max-content]"},Y={flex:"~",border:"b base","flex-1":"","items-center":"","n-navbar-glass":""},G=["onClick"],H={key:1,p10:""},J={key:1,"h-full":"",flex:"","items-center":"","justify-center":""},K=y({__name:"TerminalPage",setup(b){const n=V(),i=D(),r=R(()=>n.value?.find(a=>a.id===i.value));async function o(a){f.runTerminalAction(await p(),a,"remove")}return L(()=>{!i.value&&n.value?.length&&(i.value=n.value[0].id)}),(a,s)=>{const k=F,w=$,u=U;return x(n)?.length?(t(),d("div",W,[c("div",Y,[(t(!0),d(N,null,S(x(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")},_(e.name)+_(e.isTerminated?" (terminated)":""),3),e.isTerminated?(t(),m(w,{key:1,icon:"carbon-close","mx--2":"",border:!1,onClick:j(l=>o(e.id),["stop"])},null,8,["onClick"])):v("",!0)],10,G))),128))]),r.value?(t(),m(u,{id:r.value.id,key:r.value.id},null,8,["id"])):(t(),d("div",H,[s[0]||(s[0]=C(" Terminal ")),c("code",null,_(x(i)),1),s[1]||(s[1]=C(" not found "))]))])):(t(),d("div",J,s[2]||(s[2]=[c("em",{op50:""},"No terminal attached",-1)])))}}}),ae=y({__name:"terminals",setup(b){return(n,i)=>{const r=K,o=z;return t(),m(o,null,{default:q(()=>[A(r)]),_:1})}}});export{ae as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.xterm{padding-left:1rem;padding-right:1rem}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import{a6 as M,K as O,z as j,bc as Y,_ as U,S as K,I as Q,e as z,a8 as X,Q as q,bd as Z,H as ee,j as se,J as ne,c as oe,r as G,C as te,x as ae}from"./l4ouzdbv.js";import{_ as V}from"./duration-display.vue-h3qa2740.js";import{k as B,l as w,Q as t,S as i,U as o,X as T,a5 as m,u as g,F as f,ab as E,O as v,b as C,c as le,n as re,W as x,a0 as u,Y as R,R as H,$ as h,aw as ie,a1 as pe,a6 as F,ai as ce}from"./vendor/json-editor-vue-mdfcgt41.js";import{_ as P}from"./nbadge-nscxg0ea.js";import{_ as de}from"./composable-item.vue-fyg5hnt4.js";import{_ as ue}from"./stacktrace-list.vue-ctsox658.js";import{_ as me}from"./ndrawer.vue-mplxtid5.js";import{_ as ke}from"./launch-page.vue-o72v57lt.js";import{_ as ye}from"./nlink.vue-eiz3iwjv.js";import{_ as fe}from"./code-diff.vue-3ei6zne1.js";import{_ as ve}from"./help-fab.vue-hr5z89ai.js";import"./vendor/unocss-mnpxkox6.js";import"./vendor/shiki-fpe2sz4h.js";import"./nmarkdown.vue-nnge8mex.js";import"./client-klf75x38.js";import"./filepath-item.vue-gspuql6t.js";import"./constants-b32h69zq.js";import"./ncode-block.vue-bfbbo3c9.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}),(_,I)=>{const $=V,W=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,(L,J)=>(t(),i("div",{key:J,"h-3px":"",rounded:"",style:T({width:`max(${L.relativeWidth*100}%, 10px)`,position:"absolute",top:`${L.layer*4}px`,left:`${L.relativeStart*100}%`,backgroundColor:("getHashColorFromString"in _?_.getHashColorFromString:g(M))(L.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(W,{"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:I[0]||(I[0]=L=>n("select",L))},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:""},Ie={flex:"~ col items-start"},Le={"text-xs":"","font-mono":"",op30:""},We={"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=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(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",Ie,[o("div",Le,m(a.from),1),o("div",We,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":""},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":""},He={key:0,"bg-red:10":"",px2:"",py1:"","text-red":""},Pe={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=H("VMenu");return typeof s.value=="string"?(t(),i("div",Ve,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",He," Failed to display object: "+m(n.value),1)):p.value?(t(),i("div",Pe,[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}))}}}),Ue={key:0,"p-4":"",flex:"~ col gap-2","text-base":""},Ke={"mx--1":""},Qe={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=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=P,c=de,k=Ye,D=V,A=ue;return a.record?(t(),i("div",Ue,[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",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=O(()=>d.record.start,{showSecond:!0});return(n,e)=>{const l=P,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=H("VTooltip"),k=z,D=we,A=Me,S=ss,_=is,I=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(I,{"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
|
+
<span class="line"><span style="color:#1E754F;--shiki-dark:#4D9375;">import</span><span style="color:#999999;--shiki-dark:#666666;"> {</span><span style="color:#B07D48;--shiki-dark:#BD976A;"> useRoute</span><span style="color:#999999;--shiki-dark:#666666;"> }</span><span style="color:#1E754F;--shiki-dark:#4D9375;"> from</span><span style="color:#B5695977;--shiki-dark:#C98A7D77;"> '</span><span style="color:#B56959;--shiki-dark:#C98A7D;">#app/composables/router</span><span style="color:#B5695977;--shiki-dark:#C98A7D77;">'</span></span>
|
|
3
|
+
<span class="line"><span style="color:#1E754F;--shiki-dark:#4D9375;">import</span><span style="color:#999999;--shiki-dark:#666666;"> {</span><span style="color:#B07D48;--shiki-dark:#BD976A;"> useNuxtApp</span><span style="color:#999999;--shiki-dark:#666666;"> }</span><span style="color:#1E754F;--shiki-dark:#4D9375;"> from</span><span style="color:#B5695977;--shiki-dark:#C98A7D77;"> '</span><span style="color:#B56959;--shiki-dark:#C98A7D;">#imports</span><span style="color:#B5695977;--shiki-dark:#C98A7D77;">'</span></span>
|
|
4
|
+
<span class="line"><span style="color:#1E754F;--shiki-dark:#4D9375;">import</span><span style="color:#999999;--shiki-dark:#666666;"> {</span><span style="color:#B07D48;--shiki-dark:#BD976A;"> useMouse</span><span style="color:#999999;--shiki-dark:#666666;"> }</span><span style="color:#1E754F;--shiki-dark:#4D9375;"> from</span><span style="color:#B5695977;--shiki-dark:#C98A7D77;"> '</span><span style="color:#B56959;--shiki-dark:#C98A7D;">@vueuse/core</span><span style="color:#B5695977;--shiki-dark:#C98A7D77;">'</span></span>
|
|
5
|
+
<span class="line"></span>
|
|
6
|
+
<span class="line"><span style="color:#AB5959;--shiki-dark:#CB7676;">const</span><span style="color:#B07D48;--shiki-dark:#BD976A;"> route</span><span style="color:#999999;--shiki-dark:#666666;"> =</span><span style="color:#59873A;--shiki-dark:#80A665;"> useRoute</span><span style="color:#999999;--shiki-dark:#666666;">()</span><span style="color:#A0ADA0;--shiki-dark:#758575DD;"> // tracked</span></span>
|
|
7
|
+
<span class="line"><span style="color:#AB5959;--shiki-dark:#CB7676;">const</span><span style="color:#B07D48;--shiki-dark:#BD976A;"> app</span><span style="color:#999999;--shiki-dark:#666666;"> =</span><span style="color:#59873A;--shiki-dark:#80A665;"> useNuxtApp</span><span style="color:#999999;--shiki-dark:#666666;">()</span><span style="color:#A0ADA0;--shiki-dark:#758575DD;"> // tracked</span></span>
|
|
8
|
+
<span class="line"></span>
|
|
9
|
+
<span class="line"><span style="color:#A0ADA0;--shiki-dark:#758575DD;">// NOT tracked because it's directly imported</span></span>
|
|
10
|
+
<span class="line"><span style="color:#AB5959;--shiki-dark:#CB7676;">const</span><span style="color:#B07D48;--shiki-dark:#BD976A;"> mouse</span><span style="color:#999999;--shiki-dark:#666666;"> =</span><span style="color:#59873A;--shiki-dark:#80A665;"> useMouse</span><span style="color:#999999;--shiki-dark:#666666;">()</span></span>
|
|
11
|
+
<span class="line"><span style="color:#999999;--shiki-dark:#666666;"></</span><span style="color:#1E754F;--shiki-dark:#4D9375;">script</span><span style="color:#999999;--shiki-dark:#666666;">></span></span>
|
|
12
|
+
<span class="line"></span></code></pre><p>By default, it tracks Nuxt provided composables as well as user defined functions. You can include/exclude functions by using the <code>include</code> and <code>exclude</code> options in the <code>nuxt.config.js</code> file.</p><pre class="shiki shiki-themes vitesse-light vitesse-dark" style="background-color:#ffffff;--shiki-dark-bg:#121212;color:#393a34;--shiki-dark:#dbd7caee;" tabindex="0"><code><span class="line"><span style="color:#1E754F;--shiki-dark:#4D9375;">export</span><span style="color:#1E754F;--shiki-dark:#4D9375;"> default</span><span style="color:#59873A;--shiki-dark:#80A665;"> defineNuxtConfig</span><span style="color:#999999;--shiki-dark:#666666;">({</span></span>
|
|
13
|
+
<span class="line"><span style="color:#998418;--shiki-dark:#B8A965;"> devtools</span><span style="color:#999999;--shiki-dark:#666666;">:</span><span style="color:#999999;--shiki-dark:#666666;"> {</span></span>
|
|
14
|
+
<span class="line"><span style="color:#998418;--shiki-dark:#B8A965;"> timeline</span><span style="color:#999999;--shiki-dark:#666666;">:</span><span style="color:#999999;--shiki-dark:#666666;"> {</span></span>
|
|
15
|
+
<span class="line"><span style="color:#998418;--shiki-dark:#B8A965;"> functions</span><span style="color:#999999;--shiki-dark:#666666;">:</span><span style="color:#999999;--shiki-dark:#666666;"> {</span></span>
|
|
16
|
+
<span class="line"><span style="color:#998418;--shiki-dark:#B8A965;"> include</span><span style="color:#999999;--shiki-dark:#666666;">:</span><span style="color:#999999;--shiki-dark:#666666;"> [</span></span>
|
|
17
|
+
<span class="line"><span style="color:#A0ADA0;--shiki-dark:#758575DD;"> // track \`useMouse\`</span></span>
|
|
18
|
+
<span class="line"><span style="color:#B5695977;--shiki-dark:#C98A7D77;"> '</span><span style="color:#B56959;--shiki-dark:#C98A7D;">useMouse</span><span style="color:#B5695977;--shiki-dark:#C98A7D77;">'</span><span style="color:#999999;--shiki-dark:#666666;">,</span></span>
|
|
19
|
+
<span class="line"><span style="color:#A0ADA0;--shiki-dark:#758575DD;"> // track all functions starting with \`use\`</span></span>
|
|
20
|
+
<span class="line"><span style="color:#B5695977;--shiki-dark:#C98A7D77;"> /</span><span style="color:#1E754F;--shiki-dark:#4D9375;">^</span><span style="color:#AB5E3F;--shiki-dark:#C4704F;">use</span><span style="color:#999999;--shiki-dark:#666666;">[</span><span style="color:#A65E2B;--shiki-dark:#C99076;">A-Z</span><span style="color:#999999;--shiki-dark:#666666;">]</span><span style="color:#B5695977;--shiki-dark:#C98A7D77;">/</span><span style="color:#999999;--shiki-dark:#666666;">,</span></span>
|
|
21
|
+
<span class="line"><span style="color:#A0ADA0;--shiki-dark:#758575DD;"> // track all functions from @vueuse/core</span></span>
|
|
22
|
+
<span class="line"><span style="color:#B07D48;--shiki-dark:#BD976A;"> entry</span><span style="color:#999999;--shiki-dark:#666666;"> =></span><span style="color:#B07D48;--shiki-dark:#BD976A;"> entry</span><span style="color:#999999;--shiki-dark:#666666;">.</span><span style="color:#B07D48;--shiki-dark:#BD976A;">from</span><span style="color:#AB5959;--shiki-dark:#CB7676;"> ===</span><span style="color:#B5695977;--shiki-dark:#C98A7D77;"> '</span><span style="color:#B56959;--shiki-dark:#C98A7D;">@vueuse/core</span><span style="color:#B5695977;--shiki-dark:#C98A7D77;">'</span><span style="color:#999999;--shiki-dark:#666666;">,</span></span>
|
|
23
|
+
<span class="line"><span style="color:#999999;--shiki-dark:#666666;"> ],</span></span>
|
|
24
|
+
<span class="line"><span style="color:#998418;--shiki-dark:#B8A965;"> exclude</span><span style="color:#999999;--shiki-dark:#666666;">:</span><span style="color:#999999;--shiki-dark:#666666;"> [</span></span>
|
|
25
|
+
<span class="line"><span style="color:#B5695977;--shiki-dark:#C98A7D77;"> '</span><span style="color:#B56959;--shiki-dark:#C98A7D;">useRouter</span><span style="color:#B5695977;--shiki-dark:#C98A7D77;">'</span></span>
|
|
26
|
+
<span class="line"><span style="color:#999999;--shiki-dark:#666666;"> ]</span></span>
|
|
27
|
+
<span class="line"><span style="color:#999999;--shiki-dark:#666666;"> }</span></span>
|
|
28
|
+
<span class="line"><span style="color:#999999;--shiki-dark:#666666;"> }</span></span>
|
|
29
|
+
<span class="line"><span style="color:#999999;--shiki-dark:#666666;"> }</span></span>
|
|
30
|
+
<span class="line"><span style="color:#999999;--shiki-dark:#666666;">})</span></span>
|
|
31
|
+
<span class="line"></span></code></pre>`,6)])))}},vs=fs,hs={flex:"~ col gap-2","w-150":"",p4:"",border:"t base"},_s={op50:""},bs={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{te({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,_=ae,I=vs,$=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:W,args:b})=>[u(_,{"model-value":!0,onClose:N=>W(!1)},{default:h(()=>[o("div",hs,[r[5]||(r[5]=o("h2",{"text-xl":""},[o("span",{capitalize:""},"Enable Timeline?")],-1)),o("p",_s,[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",bs,[u(S,{onClick:N=>W(!1)},{default:h(()=>r[3]||(r[3]=[F(" Cancel ")])),_:2},1032,["onClick"]),u(S,{n:"solid primary",capitalize:"",onClick:N=>W(!0)},{default:h(()=>r[4]||(r[4]=[F(" Enable ")])),_:2},1032,["onClick"])])])]),_:2},1032,["onClose"])]),_:1})],64)),u($,null,{default:h(()=>[u(I)]),_:1})],64)}}});export{js as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.timeline-scroller[data-v-18afc15e]::-webkit-scrollbar{height:100px;width:.1px}.timeline-scroller[data-v-18afc15e]::-webkit-scrollbar-track{background-color:transparent}.timeline-scroller[data-v-18afc15e]::-webkit-scrollbar-thumb{background-color:#8881;height:100px}.timeline-scroller[data-v-18afc15e]:hover::-webkit-scrollbar-thumb{background-color:#8882}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{g as e,k as s}from"./vendor/unocss-mnpxkox6.js";e({defaults:{presets:[s({prefix:["i-",""],collections:{},cdn:"https://esm.sh/",scale:1.2,extraProperties:{display:"inline-block","vertical-align":"middle"}})]},bypassDefined:!0});
|