@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
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
const n=Object.freeze({displayName:"JSON",name:"json",patterns:[{include:"#value"}],repository:{array:{begin:"\\[",beginCaptures:{0:{name:"punctuation.definition.array.begin.json"}},end:"\\]",endCaptures:{0:{name:"punctuation.definition.array.end.json"}},name:"meta.structure.array.json",patterns:[{include:"#value"},{match:",",name:"punctuation.separator.array.json"},{match:"[^\\s\\]]",name:"invalid.illegal.expected-array-separator.json"}]},comments:{patterns:[{begin:"/\\*\\*(?!/)",captures:{0:{name:"punctuation.definition.comment.json"}},end:"\\*/",name:"comment.block.documentation.json"},{begin:"/\\*",captures:{0:{name:"punctuation.definition.comment.json"}},end:"\\*/",name:"comment.block.json"},{captures:{1:{name:"punctuation.definition.comment.json"}},match:"(//).*$\\n?",name:"comment.line.double-slash.js"}]},constant:{match:"\\b(?:true|false|null)\\b",name:"constant.language.json"},number:{match:`(?x)
|
|
2
|
-
-?
|
|
3
|
-
(?:
|
|
4
|
-
0
|
|
5
|
-
|
|
|
6
|
-
[1-9]
|
|
7
|
-
\\d*
|
|
8
|
-
)
|
|
9
|
-
(?:
|
|
10
|
-
(?:
|
|
11
|
-
\\.
|
|
12
|
-
\\d+
|
|
13
|
-
)?
|
|
14
|
-
(?:
|
|
15
|
-
[eE]
|
|
16
|
-
[+-]?
|
|
17
|
-
\\d+
|
|
18
|
-
)?
|
|
19
|
-
)?`,name:"constant.numeric.json"},object:{begin:"\\{",beginCaptures:{0:{name:"punctuation.definition.dictionary.begin.json"}},end:"\\}",endCaptures:{0:{name:"punctuation.definition.dictionary.end.json"}},name:"meta.structure.dictionary.json",patterns:[{comment:"the JSON object key",include:"#objectkey"},{include:"#comments"},{begin:":",beginCaptures:{0:{name:"punctuation.separator.dictionary.key-value.json"}},end:"(,)|(?=\\})",endCaptures:{1:{name:"punctuation.separator.dictionary.pair.json"}},name:"meta.structure.dictionary.value.json",patterns:[{comment:"the JSON object value",include:"#value"},{match:"[^\\s,]",name:"invalid.illegal.expected-dictionary-separator.json"}]},{match:"[^\\s\\}]",name:"invalid.illegal.expected-dictionary-separator.json"}]},objectkey:{begin:'"',beginCaptures:{0:{name:"punctuation.support.type.property-name.begin.json"}},end:'"',endCaptures:{0:{name:"punctuation.support.type.property-name.end.json"}},name:"string.json support.type.property-name.json",patterns:[{include:"#stringcontent"}]},string:{begin:'"',beginCaptures:{0:{name:"punctuation.definition.string.begin.json"}},end:'"',endCaptures:{0:{name:"punctuation.definition.string.end.json"}},name:"string.quoted.double.json",patterns:[{include:"#stringcontent"}]},stringcontent:{patterns:[{match:`(?x)
|
|
20
|
-
\\\\
|
|
21
|
-
(?:
|
|
22
|
-
["\\\\/bfnrt]
|
|
23
|
-
|
|
|
24
|
-
u
|
|
25
|
-
[0-9a-fA-F]{4})`,name:"constant.character.escape.json"},{match:"\\\\.",name:"invalid.illegal.unrecognized-string-escape.json"}]},value:{patterns:[{include:"#constant"},{include:"#number"},{include:"#string"},{include:"#array"},{include:"#object"},{include:"#comments"}]}},scopeName:"source.json"});var e=[n];export{e as default};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{d as ye,r as A,bH as Re,o as i,m as b,k as c,G as B,h as $,f as e,bI as ie,t as U,p as O,v as Q,a9 as Qe,aa as Xe,F as L,n as G,a6 as Ee,bz as he,w as De,by as je,bx as Ye,bJ as Ze,bK as et,aC as tt,bL as ot,ao as nt,ab as st,am as at,aA as ve,a as D,ac as rt,ak as Ve,aD as lt,b2 as it,bM as ut,e as ct,a2 as Ie,j as S,l as Z,i as v,I as ee,ay as dt,V as pt,_ as Ue,X as ft,A as Oe,an as mt,bN as vt,ah as ht,U as yt,bO as _t,at as gt}from"./C_tLznPO.js";import{_ as bt}from"./BHh_UM9T.js";import{_ as Ne}from"./D4V9JMY9.js";import{_ as kt}from"./BiRcA7Ly.js";import{_ as Le}from"./7oK7PdYH.js";import{_ as wt}from"./BopA0WYG.js";import{_ as Ct}from"./BkwfBuTq.js";import{_ as xt}from"./CIvuwNIv.js";import{C as xe,S as Ae}from"./BcJws1i5.js";import{e as St}from"./B3uNdhXb.js";import{_ as Tt}from"./DqpvVAaa.js";import{_ as $t}from"./DrswlxM3.js";import"./BKeomq25.js";import"./CO7Eo6nF.js";import"./B1veJI6T.js";function Rt(t,a){if(typeof t!="string")throw new TypeError("argument str must be a string");const n={},o=a||{},_=o.decode||Et;let m=0;for(;m<t.length;){const d=t.indexOf("=",m);if(d===-1)break;let h=t.indexOf(";",m);if(h===-1)h=t.length;else if(h<d){m=t.lastIndexOf(";",d-1)+1;continue}const y=t.slice(m,d).trim();if(o?.filter&&!o?.filter(y)){m=h+1;continue}if(n[y]===void 0){let u=t.slice(d+1,h).trim();u.codePointAt(0)===34&&(u=u.slice(1,-1)),n[y]=Dt(u,_)}m=h+1}return n}function Et(t){return t.includes("%")?decodeURIComponent(t):t}function Dt(t,a){try{return a(t)}catch{return t}}const re=/^[\u0009\u0020-\u007E\u0080-\u00FF]+$/;function Se(t,a,n){const o=n||{},_=o.encode||encodeURIComponent;if(typeof _!="function")throw new TypeError("option encode is invalid");if(!re.test(t))throw new TypeError("argument name is invalid");const m=_(a);if(m&&!re.test(m))throw new TypeError("argument val is invalid");let d=t+"="+m;if(o.maxAge!==void 0&&o.maxAge!==null){const h=o.maxAge-0;if(Number.isNaN(h)||!Number.isFinite(h))throw new TypeError("option maxAge is invalid");d+="; Max-Age="+Math.floor(h)}if(o.domain){if(!re.test(o.domain))throw new TypeError("option domain is invalid");d+="; Domain="+o.domain}if(o.path){if(!re.test(o.path))throw new TypeError("option path is invalid");d+="; Path="+o.path}if(o.expires){if(!jt(o.expires)||Number.isNaN(o.expires.valueOf()))throw new TypeError("option expires is invalid");d+="; Expires="+o.expires.toUTCString()}if(o.httpOnly&&(d+="; HttpOnly"),o.secure&&(d+="; Secure"),o.priority)switch(typeof o.priority=="string"?o.priority.toLowerCase():o.priority){case"low":{d+="; Priority=Low";break}case"medium":{d+="; Priority=Medium";break}case"high":{d+="; Priority=High";break}default:throw new TypeError("option priority is invalid")}if(o.sameSite)switch(typeof o.sameSite=="string"?o.sameSite.toLowerCase():o.sameSite){case!0:{d+="; SameSite=Strict";break}case"lax":{d+="; SameSite=Lax";break}case"strict":{d+="; SameSite=Strict";break}case"none":{d+="; SameSite=None";break}default:throw new TypeError("option sameSite is invalid")}return o.partitioned&&(d+="; Partitioned"),d}function jt(t){return Object.prototype.toString.call(t)==="[object Date]"||t instanceof Date}const Vt=c("div",{"x-divider":""},null,-1),Pe=ye({__name:"ServerRouteListItem",props:{item:{},index:{default:0}},setup(t){const a=A(!0),n=Re();return(o,_)=>{const m=Ee,d=Ne,h=Pe;return i(),b("div",null,[c("button",{flex:"~ gap-2","w-full":"","items-start":"","items-center":"","hover-bg-active":"",px2:"",py1:"",class:B([{"bg-active":e(n)===o.item.filepath}]),style:Qe({paddingLeft:`calc(0.5rem + ${o.index*1.5}em)`}),onClick:_[0]||(_[0]=y=>{a.value=!e(a),n.value=o.item.filepath})},[c("div",{class:B({"w-12":!o.item.routes}),"flex-none":"","text-left":""},[o.item.type==="collection"?(i(),$(m,{key:0,icon:"carbon:chevron-right","mb0.5":"","transform-rotate":e(a)?90:0,transition:""},null,8,["transform-rotate"])):(i(),$(d,{key:1,class:B(("getRequestMethodClass"in o?o.getRequestMethodClass:e(ie))(o.item.method||"*")),textContent:U((o.item.method||"*").toUpperCase())},null,8,["class","textContent"]))],2),c("span",{class:B({"flex items-center":o.item.routes}),"text-sm":"","font-mono":""},[o.item.type==="collection"?(i(),$(m,{key:0,title:`${o.item.routes?.length} routes`,icon:"carbon:folder",mr1:""},null,8,["title"])):O("",!0),Q(" "+U(o.item.route),1)],2)],6),Vt,e(a)?Xe(o.$slots,"default",{key:0},()=>[(i(!0),b(L,null,G(o.item.routes,y=>(i(),$(h,{key:y.filepath,item:y,index:o.index+1},null,8,["item","index"]))),128))]):O("",!0)])}}});function q(t){if(typeof t!="object")return t;var a,n,o=Object.prototype.toString.call(t);if(o==="[object Object]"){if(t.constructor!==Object&&typeof t.constructor=="function"){n=new t.constructor;for(a in t)t.hasOwnProperty(a)&&n[a]!==t[a]&&(n[a]=q(t[a]))}else{n={};for(a in t)a==="__proto__"?Object.defineProperty(n,a,{value:q(t[a]),configurable:!0,enumerable:!0,writable:!0}):n[a]=q(t[a])}return n}if(o==="[object Array]"){for(a=t.length,n=Array(a);a--;)n[a]=q(t[a]);return n}return o==="[object Set]"?(n=new Set,t.forEach(function(_){n.add(q(_))}),n):o==="[object Map]"?(n=new Map,t.forEach(function(_,m){n.set(q(m),q(_))}),n):o==="[object Date]"?new Date(+t):o==="[object RegExp]"?(n=new RegExp(t.source,t.flags),n.lastIndex=t.lastIndex,n):o==="[object DataView]"?new t.constructor(q(t.buffer)):o==="[object ArrayBuffer]"?t.slice(0):o.slice(-6)==="Array]"?new t.constructor(t):t}const It={path:"/",watch:!0,decode:t=>Ze(decodeURIComponent(t)),encode:t=>encodeURIComponent(typeof t=="string"?t:JSON.stringify(t))},le=window.cookieStore;function Ut(t,a){const n={...It,...a};n.filter??=y=>y===t;const o=Te(n)||{};let _;n.maxAge!==void 0?_=n.maxAge*1e3:n.expires&&(_=n.expires.getTime()-Date.now());const m=_!==void 0&&_<=0,d=q(m?void 0:o[t]??n.default?.()),h=_&&!m?Lt(d,_,n.watch&&n.watch!=="shallow"):A(d);{let y=null;try{!le&&typeof BroadcastChannel<"u"&&(y=new BroadcastChannel(`nuxt:cookies:${t}`))}catch{}const u=()=>{n.readonly||et(h.value,o[t])||(Nt(t,h.value,n),o[t]=q(h.value),y?.postMessage({value:n.encode(h.value)}))},j=P=>{const x=P.refresh?Te(n)?.[t]:n.decode(P.value);I=!0,h.value=x,o[t]=q(x),tt(()=>{I=!1})};let I=!1;const F=!!je();if(F&&he(()=>{I=!0,u(),y?.close()}),le){const P=x=>{const w=x.changed.find(N=>N.name===t);w&&j({value:w.value})};le.addEventListener("change",P),F&&he(()=>le.removeEventListener("change",P))}else y&&(y.onmessage=({data:P})=>j(P));n.watch?De(h,()=>{I||u()},{deep:n.watch!=="shallow"}):u()}return h}function Te(t={}){return Rt(document.cookie,t)}function Ot(t,a,n={}){return a==null?Se(t,a,{...n,maxAge:-1}):Se(t,a,n)}function Nt(t,a,n={}){document.cookie=Ot(t,a,n)}const $e=2147483647;function Lt(t,a,n){let o,_,m=0;const d=n?A(t):{value:t};return je()&&he(()=>{_?.(),clearTimeout(o)}),Ye((h,y)=>{n&&(_=De(d,y));function u(){m=0,clearTimeout(o);const j=a-m,I=j<$e?j:$e;o=setTimeout(()=>{if(m+=I,m<a)return u();d.value=void 0,y()},I)}return{get(){return h(),d.value},set(j){u(),d.value=j,y()}}})}const At={"h-full":"","w-full":"",flex:"~ col"},Pt={flex:"~ col gap-2","flex-none":"",p4:"","n-navbar-glass":""},qt={flex:"~ gap2 items-center"},Mt={relative:"","w-full":""},Bt={absolute:"","right-2":"","top-1.5":"",flex:"~ gap-1"},Ft={flex:"~ gap2 wrap","w-full":"","items-center":"",px4:"",pb2:"","text-center":"","text-sm":"",border:"b base"},Ht={class:"hidden md:block"},zt=c("div",{"flex-auto":""},null,-1),Gt=c("div",{"text-xs":"",op50:""}," Send from ",-1),Jt=c("option",{value:"app"}," App ",-1),Wt=c("option",{value:"devtools"}," DevTools ",-1),Kt={key:0,border:"b base","items-center":"",px4:"",py2:"",grid:"~ cols-[max-content_1fr] gap-2"},Qt={"text-right":"","font-mono":""},Xt={key:1,border:"b base",p4:"",flex:"~ col gap-4","font-mono":""},Yt={flex:"~ gap-4"},Zt={flex:"~ gap2","mb--2":"","items-center":"",op50:""},eo=c("div",{"w-5":"","x-divider":""},null,-1),to=c("div",{"flex-none":""}," Default Inputs ",-1),oo=c("div",{"x-divider":""},null,-1),no={key:2},so={key:3,border:"b base",relative:"","n-code-block":""},ao={flex:"~ wrap","w-full":""},ro=["onClick"],lo=c("div",{border:"b base","flex-auto":""},null,-1),io={border:"b base",flex:"~ gap2","items-center":"",px4:"",py2:""},uo=c("div",null,"Response",-1),co={key:1,"text-xs":"",op50:""},po=c("div",{"flex-auto":""},null,-1),fo=c("div",{op50:""}," Request finished in ",-1),mo={key:0,"flex-auto":"","overflow-auto":""},vo={border:"~ base","h-full":"","w-full":"",rounded:""},ho=["data"],yo={key:2,"flex-auto":"","overflow-auto":"",p4:""},_o={border:"~ base",rounded:""},go=["src"],bo={key:1,controls:"",rounded:""},ko=["src"],wo=ye({__name:"ServerRouteDetails",props:{route:{}},emits:["open-default-input"],setup(t,{emit:a}){const n=t,o=a,[_,m]=ot(),d=nt(),h=st(),y=at(),u=ve({contentType:"text/plain",data:"",statusCode:200,error:void 0,fetchTime:0}),j=D(()=>u.contentType.includes("application/json")?"json":u.contentType.includes("text/html")?"html":u.contentType.includes("text/css")?"css":u.contentType.includes("text/javascript")?"javascript":u.contentType.includes("image")||u.contentType.includes("video")?"media":u.contentType.includes("text/xml")||u.contentType.includes("application/xml")?"xml":u.contentType.includes("application/pdf")?"pdf":"text"),I=D(()=>{if(j.value==="json")return JSON.stringify(u.data,null,2);if(j.value==="media"||j.value==="pdf"){const s=new Blob([u.data],{type:u.contentType});return URL.createObjectURL(s)}return u.data}),F=A(!1),P=A(!1),x=rt(),w=D(()=>n.route.route?.split(/((?:\*\*)?:\w+)/g)),N=D(()=>w.value?.filter(s=>s.startsWith(":")||s.startsWith("**:"))||[]),g=A(n.route.method||"GET"),R=A({}),k=ve({query:[{active:!0,key:"",value:"",type:"string"}],body:[{active:!0,key:"",value:"",type:"string"}],headers:[{active:!0,key:"Content-Type",value:"application/json",type:"string"}]}),V=A({}),{inputDefaults:C,sendFrom:H}=Ve("serverRoutes"),J=D(()=>y?.value?.app?.$fetch?H.value:"devtools"),ue=["GET","POST","PUT","PATCH","DELETE","HEAD"],ce=["PATCH","POST","PUT","DELETE"],te=D(()=>ce.includes(g.value.toUpperCase())),p=A(),oe=["input","json"],W=A(oe[0]),ne=D({get:()=>k[p.value],set:s=>{k[p.value]=s}}),_e=D(()=>({...K(C.value.query),...K(k.query)})),ge=D(()=>({...K(C.value.headers),...K(k.headers)})),de=D(()=>te.value?W.value==="json"?{...K(C.value.body),...V.value}:{...K(C.value.body),...K(k.body)}:void 0),qe=D(()=>{let s=window?.location.origin;return s.charAt(s.length-1)==="/"&&(s=s.slice(0,-1)),s}),se=D(()=>{let s=new URLSearchParams(_e.value).toString();s&&(s=`?${s}`);const l=(w.value?.map(E=>(E.startsWith(":")||E.startsWith("**:"))&&R.value[E]||E).join("")||"")+s;let f=h.value?.app.baseURL||"";return(f==="./"||f===".")&&(f=""),f.endsWith("/")&&(f=f.slice(0,-1)),f+l}),be=D(()=>qe.value+se.value);function K(s){const l=Object.fromEntries(s.filter(({active:f,key:E,value:T})=>f&&E&&T!==void 0).map(({key:f,value:E})=>[f,E]));return Object.entries(l).length?l:void 0}async function ke(){P.value=!0,F.value=!0;const s=Date.now(),l=J.value==="app"?y.value.app.$fetch:$fetch;pt("server-routes:fetch",{method:g.value,sendFrom:J.value});try{u.data=await l(be.value,{method:g.value.toUpperCase(),headers:ge.value,query:_e.value,body:de.value,onResponse({response:f}){u.contentType=(f.headers.get("content-type")||"").toString().toLowerCase().trim(),u.statusCode=f.status,u.error=void 0},onResponseError(f){u.error=f.response._data,u.data=f.response._data}})}catch{}F.value=!1,u.fetchTime=Date.now()-s}const we=D(()=>{const s=[],l=[],f=Object.entries(ge.value).filter(([T,M])=>T&&M&&!(T==="Content-Type"&&M==="application/json")).map(([T,M])=>` '${T}': '${M}'`).join(`,
|
|
2
|
-
`);g.value.toUpperCase()!=="GET"&&l.push(`method: '${g.value.toUpperCase()}'`),f&&l.push(`headers: {
|
|
3
|
-
${f}
|
|
4
|
-
}`),de.value&&l.push(`body: ${JSON.stringify(de.value,null,2)}`);const E=l.length?`, {
|
|
5
|
-
${l.join(`,
|
|
6
|
-
`).split(`
|
|
7
|
-
`).map(T=>` ${T}`).join(`
|
|
8
|
-
`)}
|
|
9
|
-
}`:"";return s.push({name:"useFetch",lang:"javascript",docs:xe.nuxt.useFetch,code:`const { data, pending, error, refresh } = useFetch('${se.value}'${E})`}),s.push({name:"$fetch",lang:"javascript",docs:xe.nuxt.$fetch,code:`await $fetch('${se.value}'${E})`}),s}),X=A(Be()),z=ve({key:"",value:""}),Me=D(()=>{const s=[];return N.value.length&&s.push({name:"Params",slug:"params",length:N.value.length}),s.push({name:"Query",slug:"query",length:k.query.length}),te.value&&s.push({name:"Body",slug:"body",length:k.body.length}),s.push({name:"Headers",slug:"headers",length:k.headers.length}),s.push({name:"Cookies",slug:"cookies",length:X.value.length}),s.push({name:"Snippets",slug:"snippet"}),s});function Be(){return document.cookie.split("; ").map(s=>{const[l,f]=s.split("=");return{key:l,value:f}}).filter(s=>s.key)}function pe(s,l){if(!s)return;const f=X.value.find(T=>T.key===s),E=Ut(s);f!==void 0?l===void 0&&(X.value=X.value.filter(T=>T.key!==s)):(X.value.push({key:s,value:l}),z.key="",z.value=""),E.value=l}lt(()=>{W.value==="json"&&typeof V.value=="string"&&(V.value=JSON.parse(V.value))});const fe=it("nuxt-devtools:server-routes:inputs",()=>[],{window:window.parent});ut([k,p],()=>{const s=fe.value?.find(l=>l.path===n.route.filepath);if(s){p.value||(p.value=s.tab),s.tab!==p.value&&(s.tab=p.value);const{body:l,query:f,headers:E,params:T}=s.inputs;Object.assign(k,{body:l,query:f,headers:E}),R.value=T}else{const l={path:n.route.filepath,tab:N.value.length?"params":"query",inputs:{...k,...N.value.length?{params:R.value}:{}}};fe.value.push(l),p.value||(p.value=l.tab)}},{immediate:!0,deep:!0,debounce:500});function Fe(){fe.value=[],k.body=[],k.query=[],k.headers=[],R.value={},p.value=N.value.length?"params":"query"}const He=ct();return(s,l)=>{const f=Ue,E=kt,T=ft,M=Ee,Ce=Le,ze=wt,Ge=Oe,Je=mt,me=Ne,We=Ct,Ke=xt,ae=Ie("tooltip");return i(),b("div",At,[c("div",Pt,[c("div",qt,[s.route.method?(i(),$(f,{key:0,class:B(["n-badge-base n-sm",("getRequestMethodClass"in s?s.getRequestMethodClass:e(ie))(e(g))]),"pointer-events-none":"","font-mono":"",tabindex:"-1"},{default:S(()=>[Q(U(e(g).toUpperCase()),1)]),_:1},8,["class"])):(i(),$(E,{key:1,modelValue:e(g),"onUpdate:modelValue":l[0]||(l[0]=r=>Z(g)?g.value=r:null),class:B(["n-badge-base n-sm",("getRequestMethodClass"in s?s.getRequestMethodClass:e(ie))(e(g))])},{default:S(()=>[(i(),b(L,null,G(ue,r=>c("option",{key:r,class:B(("getRequestMethodClass"in s?s.getRequestMethodClass:e(ie))(r))},U(r.toUpperCase()),3)),64))]),_:1},8,["modelValue","class"])),c("div",Mt,[v(T,{"model-value":e(se),readonly:"","flex-auto":"","font-mono":"",p:"x5 y2",n:"sm"},null,8,["model-value"]),c("div",Bt,[ee(v(f,{title:"Copy URL",n:"xs blue",icon:"carbon:copy",border:!1,onClick:l[1]||(l[1]=r=>e(He)(e(be),"server-route-url"))},null,512),[[ae,"Copy URL"]]),ee(v(f,{title:"Open in Editor",icon:"carbon-launch",n:"xs blue",border:!1,onClick:l[2]||(l[2]=r=>e(x)(s.route.filepath))},null,512),[[ae,"Open in Editor"]])])]),v(f,{"h-full":"",n:"primary solid",onClick:ke},{default:S(()=>[v(M,{icon:"carbon:send"})]),_:1})])]),c("div",Ft,[(i(!0),b(L,null,G(e(Me),r=>ee((i(),$(f,{key:r.slug,class:B(e(p)===r.slug?"text-primary n-primary":"border-transparent shadow-none"),onClick:Y=>p.value=r.slug},{default:S(()=>[v(M,{icon:("ServerRouteTabIcons"in s?s.ServerRouteTabIcons:e(Ae))[r.slug]},null,8,["icon"]),c("div",Ht,[Q(U(r.name)+" "+U(r?.length?`(${r.length})`:"")+" ",1),c("span",null,U(e(C)[r.slug]?.length?`(${e(C)[r.slug].length})`:""),1)])]),_:2},1032,["class","onClick"])),[[ae,r.name]])),128)),zt,Gt,v(E,{modelValue:e(J),"onUpdate:modelValue":l[3]||(l[3]=r=>Z(J)?J.value=r:null),class:"n-xs",disabled:!e(y)?.app?.$fetch},{default:S(()=>[Jt,Wt]),_:1},8,["modelValue","disabled"]),ee(v(f,{n:"orange",class:"p-3",icon:"i-carbon-clean",onClick:Fe},null,512),[[ae,"Clear Inputs Saved Cache"]])]),e(p)==="params"?(i(),b("div",Kt,[(i(!0),b(L,null,G(e(N),r=>(i(),b(L,{key:r},[c("div",Qt,U(r),1),v(T,{modelValue:e(R)[r],"onUpdate:modelValue":Y=>e(R)[r]=Y,placeholder:r,"flex-1":""},null,8,["modelValue","onUpdate:modelValue","placeholder"])],64))),128))])):O("",!0),e(p)==="cookies"?(i(),b("div",Xt,[(i(!0),b(L,null,G(e(X),r=>(i(),b("div",{key:r.key,flex:"~ gap-4 items-center"},[v(T,{placeholder:"Key...","model-value":r.key,disabled:"","op-70":""},null,8,["model-value"]),v(T,{placeholder:"Value...","model-value":r.value,"flex-1":"",n:"primary",onInput:Y=>pe(r.key,Y.target?.value)},null,8,["model-value","onInput"]),v(f,{title:"Delete",n:"red",onClick:Y=>pe(r.key,void 0)},{default:S(()=>[v(M,{icon:"i-carbon-trash-can"})]),_:2},1032,["onClick"])]))),128)),c("div",Yt,[v(T,{modelValue:e(z).key,"onUpdate:modelValue":l[4]||(l[4]=r=>e(z).key=r),placeholder:"Key",n:"primary","flex-1":""},null,8,["modelValue"]),v(T,{modelValue:e(z).value,"onUpdate:modelValue":l[5]||(l[5]=r=>e(z).value=r),placeholder:"Value",n:"primary","flex-1":""},null,8,["modelValue"]),v(f,{title:"Add",n:"primary",onClick:l[6]||(l[6]=r=>pe(e(z).key,e(z).value))},{default:S(()=>[v(M,{icon:"i-carbon-save"})]),_:1})])])):O("",!0),v(e(_),null,{default:S(()=>[v(Ce,{modelValue:e(ne),"onUpdate:modelValue":l[9]||(l[9]=r=>Z(ne)?ne.value=r:null),default:{active:!0,type:"string"},"max-h-xs":"","of-auto":""},{default:S(()=>[e(C)[e(p)]?.length?(i(),b(L,{key:0},[c("div",Zt,[eo,to,v(f,{icon:"i-carbon-edit",border:!1,onClick:l[7]||(l[7]=r=>o("open-default-input"))}),oo]),v(Ce,{modelValue:e(C)[e(p)],"onUpdate:modelValue":l[8]||(l[8]=r=>e(C)[e(p)]=r),disabled:"",p0:""},null,8,["modelValue"])],64)):O("",!0)]),_:1},8,["modelValue"])]),_:1}),e(p)==="snippet"?(i(),b("div",no,[e(we).length?(i(),$(ze,{key:0,"code-snippets":e(we)},null,8,["code-snippets"])):O("",!0)])):e(ne)?(i(),b("div",so,[e(p)==="body"?(i(),b(L,{key:0},[c("div",ao,[(i(),b(L,null,G(oe,r=>c("button",{key:r,px4:"",py2:"",border:"r base",hover:"bg-active",class:B({"border-b":r!==e(W)}),onClick:Y=>W.value=r},[c("div",{class:B({op30:r!==e(W)}),"font-mono":""},U(r),3)],10,ro)),64)),lo]),e(W)==="input"?(i(),$(e(m),{key:0})):e(W)==="json"?(i(),$(e(St),dt({key:1,modelValue:e(V),"onUpdate:modelValue":l[10]||(l[10]=r=>Z(V)?V.value=r:null),class:[e(d)==="dark"?"jse-theme-dark":"light","json-editor-vue of-auto text-sm outline-none"]},s.$attrs,{mode:"text","navigation-bar":!1,indentation:2,"tab-size":2}),null,16,["modelValue","class"])):O("",!0)],64)):(i(),$(e(m),{key:1}))])):O("",!0),e(P)?e(F)?(i(),$(Je,{key:5,"z-10":"","flex-auto":"","backdrop-blur":""},{default:S(()=>[Q(" Fetching... ")]),_:1})):(i(),b(L,{key:6},[c("div",io,[uo,e(u).error?(i(),$(me,{key:0,n:"red"},{default:S(()=>[Q(" Error ")]),_:1})):O("",!0),v(me,{n:e(u).error?"orange":"green",textContent:U(e(u).statusCode)},null,8,["n","textContent"]),e(u).contentType?(i(),b("code",co,U(e(u).contentType),1)):O("",!0),e(u).contentType==="application/json"?(i(),$(We,{key:2,getter:()=>({input:e(I)})},null,8,["getter"])):O("",!0),po,fo,v(me,{n:"green"},{default:S(()=>[Q(U(e(u).fetchTime)+" ms ",1)]),_:1})]),e(j)==="pdf"?(i(),b("div",mo,[c("div",vo,[c("object",{data:e(I),type:"application/pdf","flex-auto":"",width:"100%",height:"100%",rounded:""},null,8,ho)])])):e(j)!=="media"?(i(),$(Ke,{key:1,"flex-auto":"","overflow-auto":"","py-2":"",code:e(I),lang:e(j)},null,8,["code","lang"])):(i(),b("div",yo,[c("div",_o,[e(u).contentType.includes("image")?(i(),b("img",{key:0,rounded:"",src:e(I)},null,8,go)):(i(),b("video",bo,[c("source",{src:e(I),type:"video/mp4"},null,8,ko)]))])]))],64)):(i(),$(Ge,{key:4},{default:S(()=>[v(f,{n:"primary",onClick:ke},{default:S(()=>[v(M,{icon:"carbon:send"}),Q(" Send request ")]),_:1})]),_:1}))])}}}),Co={flex:"~ gap1","text-sm":""},xo={key:0,op50:""},So={op50:""},To=c("span",{op75:""},"Select a route to start",-1),$o=c("div",{p4:"",border:"b base"},[c("span",{"text-lg":""},"Default Inputs"),c("br"),c("span",{"text-white":"",op50:""},"Merged as default for every request in DevTools")],-1),Fo=ye({__name:"server-routes",setup(t){const a=A(!1),n=vt(),o=Re(),{selectedRoute:_,view:m,inputDefaults:d}=Ve("serverRoutes"),h=D(()=>{!o.value&&_.value&&(o.value=_.value.filepath);const x=n.value?.find(w=>w.filepath===o.value);return o.value!==_.value?.filepath&&x&&(_.value=x),x}),y=A(""),u=D(()=>new ht(n.value||[],{keys:["method","route"],shouldSort:!0})),j=D(()=>n.value?y.value?u.value.search(y.value).map(w=>w.item):n.value:[]),I=D(()=>{const x=[],w=(g,R)=>{g.routes=g.routes||[],g.routes.push(R)},N=(g,R)=>{const k=R?R.routes?.find(C=>C.route===g):x.find(C=>C.route===g);if(k)return k;const V={route:g,filepath:g.replace(/\W/g,"-").toLowerCase(),type:"collection",routes:[]};return R?w(R,V):x.push(V),V};return j.value.forEach(g=>{let R,k;const V=g.filepath.split("/"),C=V.slice(V.indexOf("server")+1);if(g.type==="runtime"){C[0]="runtime";const H=V.indexOf("dist");H!==-1&&(R=V[H-1],R&&C.splice(1,0,R))}C.length>0&&C[C.length-1].includes(".")&&C.pop(),C.forEach(H=>{k=N(H,k)}),k?w(k,g):x.push(g)}),x});function F(){m.value=m.value==="tree"?"list":"tree"}function P(x){return x.charAt(0).toUpperCase()+x.slice(1)}return(x,w)=>{const N=Ue,g=bt,R=Pe,k=wo,V=gt,C=Oe,H=yt,J=Le,ue=Tt,ce=$t,te=Ie("tooltip");return i(),b(L,null,[v(H,{"storage-key":"tab-server-routes"},{left:S(()=>[v(g,{search:e(y),"onUpdate:search":w[1]||(w[1]=p=>Z(y)?y.value=p:null),pb2:""},{actions:S(()=>[ee(v(N,{"text-lg":"",icon:e(m)==="list"?"i-carbon-list":"i-carbon-tree-view-alt",title:"Toggle view",border:!1,onClick:F},null,8,["icon"]),[[te,"Toggle View"]]),ee(v(N,{"text-lg":"",icon:"i-carbon-cics-sit-overrides",title:"Default Inputs",border:!1,onClick:w[0]||(w[0]=p=>a.value=!e(a))},null,512),[[te,"Default Inputs"]])]),default:S(()=>[c("div",Co,[e(y)?(i(),b("span",xo,U(e(j).length)+" matched · ",1)):O("",!0),c("span",So,U(e(n)?.length)+" routes in total",1)])]),_:1},8,["search"]),(i(!0),b(L,null,G(e(m)==="tree"?e(I):e(j),p=>(i(),$(R,{key:p.filepath,item:p},null,8,["item"]))),128))]),right:S(()=>[(i(),$(_t,{max:10},[e(h)?(i(),$(k,{key:e(h).filepath,route:e(h),onOpenDefaultInput:w[2]||(w[2]=p=>a.value=!0)},null,8,["route"])):O("",!0)],1024)),e(h)?O("",!0):(i(),$(C,{key:0},{default:S(()=>[v(V,{px6:"",py2:""},{default:S(()=>[To]),_:1})]),_:1}))]),_:1}),v(ce,{modelValue:e(a),"onUpdate:modelValue":w[3]||(w[3]=p=>Z(a)?a.value=p:null),"auto-close":"","max-w-xl":"","min-w-xl":"",onClose:w[4]||(w[4]=p=>a.value=!1)},{default:S(()=>[c("div",null,[$o,(i(!0),b(L,null,G(Object.keys(e(d)),p=>(i(),$(ue,{key:p,text:`${P(p)} ${e(d)[p].length?`(${e(d)[p].length})`:""}`,padding:!1,icon:("ServerRouteTabIcons"in x?x.ServerRouteTabIcons:e(Ae))[p]},{default:S(()=>[v(J,{modelValue:e(d)[p],"onUpdate:modelValue":oe=>e(d)[p]=oe,py0:"",default:{active:!0,type:"string"}},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["text","icon"]))),128))])]),_:1},8,["modelValue"])],64)}}});export{Fo as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{am as m,be as n,a as s,L as o}from"./C_tLznPO.js";function u(){const p=m(),t=n("getComponents",()=>o.getComponents()),l=s(()=>Object.entries(p.value?.nuxt?.vueApp._context.components||{}).map(([e])=>({pascalName:e,global:!0})).filter(e=>!/^Lazy[A-Z]/.test(e.pascalName)).filter(e=>!(t.value||[]).find(a=>a.pascalName===e.pascalName)));return s(()=>[...l.value,...t.value||[]].sort((e,a)=>e.pascalName.localeCompare(a.pascalName)))}function r(){return n("getComponentsRelationships",()=>o.getComponentsRelationships())}export{r as a,u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{q as n,o,m as s,aa as t}from"./C_tLznPO.js";const a={},c={class:"n-badge"};function _(e,r){return o(),s("span",c,[t(e.$slots,"default")])}const d=n(a,[["render",_]]);export{d as _};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{_ as w}from"./BHh_UM9T.js";import{_ as B}from"./CIvuwNIv.js";import{o as c,m as _,k as s,d as S,r as h,b$ as j,c0 as P,aD as U,a as p,ah as E,i as l,j as u,F as f,U as G,f as i,l as I,n as R,t as v,G as W,h as z,at as A,A as H}from"./C_tLznPO.js";import{_ as L}from"./BOV_C5BD.js";import"./CO7Eo6nF.js";const q={class:"markdown-body"},J=s("h1",null,"Virtual Files",-1),K=s("p",null,"Virtual files are generated on the fly to support the conventions of the framework, and to provide a better developer experience.",-1),M=[J,K],O={__name:"virtual-files",setup(x,{expose:o}){return o({frontmatter:{}}),(d,a)=>(c(),_("div",q,M))}},Q=O,T=["onClick"],X=s("div",{"x-divider":""},null,-1),Y={key:0,"h-full":"","of-hidden":"",flex:"~ col"},Z={border:"b base","flex-none":"",px4:"",py2:"","text-sm":"",op75:""},ee=s("span",{op75:""},"Select a file to start",-1),le=S({__name:"virtual-files",setup(x){const o=h(""),n=j(),d=P(),a=h();U(()=>{if(!d.value)return;const e=`/_vfs.json/${encodeURIComponent(d.value)}`;fetch(e,{headers:{accept:"application/json"}}).then(t=>t.json()).then(t=>a.value=t.current)});function k(e){if(n.value?.rootDir)return e.startsWith(n.value?.rootDir)?e.slice(n.value.rootDir.length):e}const m=p(()=>n.value?n.value.entries.filter(e=>!e.id.startsWith(`${n.value?.rootDir||""}/.nuxt/`)).sort((e,t)=>e.id.localeCompare(t.id)):[]),y=p(()=>new E(m.value,{keys:["id","path"]})),b=p(()=>o.value?y.value.search(o.value).map(e=>e.item):m.value);return(e,t)=>{const $=w,g=B,C=A,F=H,N=G,D=Q,V=L;return c(),_(f,null,[l(N,{class:"virtual-files","storage-key":"tab-virtual-files"},{left:u(()=>[l($,{search:i(o),"onUpdate:search":t[0]||(t[0]=r=>I(o)?o.value=r:null),"no-padding":"",p3:""},null,8,["search"]),(c(!0),_(f,null,R(i(b),r=>(c(),_(f,{key:r.id},[s("button",{block:"","w-full":"","select-none":"",truncate:"",px2:"",py1:"","text-start":"","text-sm":"","font-mono":"",class:W(r.id===i(a)?.id?"text-primary n-bg-active":"text-secondary hover:n-bg-hover"),onClick:te=>d.value=r.id},v(k(r.id)),11,T),X],64))),128))]),right:u(()=>[i(a)?.content?(c(),_("div",Y,[s("div",Z,[s("code",null,v(i(a).id),1)]),l(g,{"h-full":"","of-auto":"","text-sm":"",code:i(a).content,lang:"typescript"},null,8,["code"])])):(c(),z(F,{key:1},{default:u(()=>[l(C,{px6:"",py2:""},{default:u(()=>[ee]),_:1})]),_:1}))]),_:1}),l(V,null,{default:u(()=>[l(D)]),_:1})],64)}}});export{le as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{d as P,a as I,r as V,o,m as s,k as e,F as _,n as j,G as S,f as t,t as p,p as b,H as U,i as u,j as r,v as f,I as A,J as D,K as X,L as F,M as E,_ as G,N as q,O as ee,P as ne,Q as te,R as oe,S as le,U as ie,V as se,W as C,h as z,l as R,X as ae,Y as re,Z as ue,A as de}from"./C_tLznPO.js";import{_ as ce}from"./BI3hykgO.js";import{_ as me}from"./CIvuwNIv.js";import{_ as _e}from"./BKeomq25.js";import{_ as pe}from"./BOV_C5BD.js";import"./CO7Eo6nF.js";const fe={"h-full":"",grid:"~ rows-[max-content_1fr]"},ve={flex:"~ wrap","w-full":""},he=["onClick"],ye=e("div",{border:"b base","flex-auto":""},null,-1),be={key:0,flex:"~ col gap-4 items-center justify-center",p4:""},$e=e("div",{"flex-auto":""},null,-1),xe={grid:"~ cols-[30px_1fr] gap-x-2 gap-y-3 items-center justify-center","w-100":""},ge=e("div",{"i-carbon-commit":"","text-xl":""},null,-1),we=e("div",{"text-sm":"",op50:""}," Name ",-1),ze=e("div",{"i-carbon-time":"","text-xl":""},null,-1),Be=e("div",{"text-sm":"",op50:""}," Build duration ",-1),Ce=e("div",{"i-carbon-cics-program":"","text-xl":""},null,-1),ke=e("div",{"text-sm":"",op50:""}," Client bundle size ",-1),Ne=e("div",{"i-carbon-bare-metal-server":"","text-xl":""},null,-1),Te=e("div",{"text-sm":"",op50:""}," Nitro bundle size ",-1),Ae=e("div",{"i-carbon-edge-node":"","text-xl":""},null,-1),De=e("div",{"text-sm":"",op50:""}," Built ",-1),Ie=e("div",{"i-carbon:folder-parent":"","text-xl":""},null,-1),Ve=e("div",{"text-sm":"",op50:""}," Report Path ",-1),Se=e("div",{"flex-auto":""},null,-1),Fe=P({__name:"BuildAnalyzeDetails",props:{current:{},prev:{}},setup(k){const v=k,x=`${X().app.baseURL}/__nuxt_devtools__/analyze/`.replace(/\/+/g,"/"),g=I(()=>{const n=[{name:"Overview",id:"overview"}];return v.current.features.bundleClient&&n.push({name:"Client Bundle",id:"bundle-client"}),v.current.features.bundleNitro&&n.push({name:"Nitro Bundle",id:"bundle-nitro"}),v.current.features.viteInspect&&n.push({name:"Vite Inspect",id:"vite-inspect"}),n}),i=V(g.value[0]);function h(n){return n<1024?`${n}B`:n<1024*1024?`${(n/1024).toFixed(1)}KB`:n<1024*1024*1024?`${(n/1024/1024).toFixed(1)}MB`:`${(n/1024/1024/1024).toFixed(1)}GB`}function d(n){return`${((n.endTime-n.startTime)/1e3).toFixed(1)}s`}async function N(n){return F.clearAnalyzeBuilds(await E(),[n])}return(n,c)=>{const B=ce,T=G;return o(),s("div",fe,[e("div",ve,[(o(!0),s(_,null,j(t(g),(l,m)=>(o(),s("button",{key:m,px4:"",py2:"",border:"r base",hover:"bg-active",class:S(l.id===t(i).id?"":"border-b"),onClick:w=>i.value=l},[e("div",{class:S(l.id===t(i).id?"":"op30")},p(l.name),3)],10,he))),128)),ye]),t(i).id==="overview"?(o(),s("div",be,[$e,e("div",xe,[ge,e("div",null,[we,e("div",null,p(n.current.name),1)]),ze,e("div",null,[Be,e("div",null,p(d(n.current)),1)]),n.current.size?.clientBundle?(o(),s(_,{key:0},[Ce,e("div",null,[ke,e("div",null,p(h(n.current.size.clientBundle)),1)])],64)):b("",!0),n.current.size.nitroBundle?(o(),s(_,{key:1},[Ne,e("div",null,[Te,e("div",null,p(h(n.current.size.nitroBundle)),1)])],64)):b("",!0),Ae,e("div",null,[De,e("div",null,p(t(U)(new Date(n.current.endTime))),1)]),Ie,e("div",null,[Ve,u(B,{filepath:n.current.analyzeDir},null,8,["filepath"])])]),Se,u(T,{n:"rose",icon:"carbon-delete",onClick:c[0]||(c[0]=l=>N(n.current.name))},{default:r(()=>[f(" Delete this report ")]),_:1})])):b("",!0),c._lazyshow1||t(i).id==="bundle-client"?(c._lazyshow1=!0,o(),s(_,null,[A(e("iframe",{src:`${t(x)}${n.current.slug}/client.html`,"h-full":"","w-full":""},null,8,["src"]),[[D,t(i).id==="bundle-client"]])],64)):b("v-show-if",!0),c._lazyshow2||t(i).id==="bundle-nitro"?(c._lazyshow2=!0,o(),s(_,null,[A(e("iframe",{src:`${t(x)}${n.current.slug}/nitro.html`,"h-full":"","w-full":""},null,8,["src"]),[[D,t(i).id==="bundle-nitro"]])],64)):b("v-show-if",!0),c._lazyshow3||t(i).id==="vite-inspect"?(c._lazyshow3=!0,o(),s(_,null,[A(e("iframe",{src:`${t(x)}${n.current.slug}/.vite-inspect/`,"h-full":"","w-full":""},null,8,["src"]),[[D,t(i).id==="vite-inspect"]])],64)):b("v-show-if",!0)])}}}),Re={class:"markdown-body"},Pe=e("h1",null,"Build Analyze",-1),je=e("p",null,[f("DevTools provides a build analyze tool to help you understand the size of your app in production. Whenever you start a new build, it runs the command "),e("code",null,"nuxt build --analyze"),f(" and present the output data directly in DevTools for easy browsing and comparing.")],-1),Ue=[Pe,je],Ee={__name:"analyze-build",setup(k,{expose:v}){return v({frontmatter:{}}),(x,g)=>(o(),s("div",Re,Ue))}},Ge=Ee,Le={flex:"~ col"},Oe=["onClick"],He={flex:"~ gap-1 items-center wrap","w-full":"","text-sm":"",op60:""},Ke=e("div",{"i-carbon-time":""},null,-1),Me=e("div",{"flex-auto":""},null,-1),We=e("div",{"x-divider":""},null,-1),Ye={flex:"~ items-center justify-center wrap",p4:""},Ze={flex:"~ col gap-1","w-250":"",p4:""},Je=e("h3",{class:"text-lg font-medium leading-6",mb2:""}," Start analyze build? ",-1),Qe=e("p",{op50:""}," Enter the name of the build: ",-1),Xe=e("div",{my3:"","x-divider":""},null,-1),qe=e("p",{op50:""}," The following command will be executed in your terminal: ",-1),en={flex:"~ gap-3",mt2:"","justify-end":""},rn=P({__name:"analyze-build",setup(k){const v=q(),$=ee(),x=ne(),g=te("analyze-build:slug",""),i=I(()=>$.value?.builds.find(l=>l.slug===g.value)??$.value?.builds[0]),h=V(!1),d=V(""),N=I(()=>$.value?.builds.some(l=>l.name===d.value.trim()));async function n(){d.value=await F.generateAnalyzeBuildName(),await v.start()&&(se("analyze-build:start"),C.value={name:d.value,processId:await F.startAnalyzeBuild(await E(),d.value)},h.value&&B())}const c=oe();function B(){C.value?.processId&&(c.value=C.value.processId,x.push("/modules/terminals"))}function T(l){return`${((l.endTime-l.startTime)/1e3).toFixed(1)}s`}return le(()=>[{id:"action:analyze-build: start",title:"Start a new analyze build",icon:"i-carbon-edge-node",action:n}]),(l,m)=>{const w=G,L=Fe,O=de,H=ie,K=ae,M=re,W=me,Y=_e,Z=ue,J=Ge,Q=pe;return o(),s(_,null,[u(H,{"left-size":30},{left:r(()=>[e("div",Le,[(o(!0),s(_,null,j(t($)?.builds,a=>(o(),s(_,{key:a.slug},[e("button",{flex:"~ col gap1","hover:bg-active":"",p3:"",class:S(a.slug===t(i)?.slug?"text-primary bg-active":""),onClick:y=>g.value=a.slug},[e("code",null,p(a.name),1),e("div",He,[Ke,e("span",null,p(T(a)),1),Me,e("span",null,p(t(U)(new Date(a.endTime))),1)])],10,Oe),We],64))),128)),e("div",Ye,[("processAnalyzeBuildInfo"in l?l.processAnalyzeBuildInfo:t(C))?(o(),z(w,{key:1,n:"primary",icon:"carbon-circle-dash animate-spin",onClick:m[1]||(m[1]=a=>B())},{default:r(()=>[f(" Building... ")]),_:1})):(o(),z(w,{key:0,n:"primary",icon:"carbon-edge-node",onClick:m[0]||(m[0]=a=>n())},{default:r(()=>[f(" Start a new build ")]),_:1}))])])]),right:r(()=>[t(i)?(o(),z(L,{key:0,current:t(i)},null,8,["current"])):(o(),z(O,{key:1}))]),_:1}),u(t(v),null,{default:r(({resolve:a})=>[u(Z,{"model-value":!0,onClose:y=>a(!1)},{default:r(()=>[e("div",Ze,[Je,Qe,u(K,{modelValue:t(d),"onUpdate:modelValue":m[2]||(m[2]=y=>R(d)?d.value=y:null),placeholder:"Build name"},null,8,["modelValue"]),t(N)?(o(),z(M,{key:0,"n-orange":""},{default:r(()=>[f(" A build with the same name already exists, continue would overrides the previous build result. ")]),_:1})):b("",!0),Xe,qe,u(W,{code:`npx nuxi analyze --no-serve --name=${t(d)}`,lang:"bash",px4:"",py2:"",border:"~ base rounded",lines:!1},null,8,["code"]),u(Y,{modelValue:t(h),"onUpdate:modelValue":m[3]||(m[3]=y=>R(h)?h.value=y:null),mt2:"",n:"primary"},{default:r(()=>[f(" Navigate to terminal ")]),_:1},8,["modelValue"]),e("div",en,[u(w,{onClick:y=>a(!1)},{default:r(()=>[f(" Cancel ")]),_:2},1032,["onClick"]),u(w,{n:"solid primary",onClick:y=>a(!0)},{default:r(()=>[f(" Start ")]),_:2},1032,["onClick"])])])]),_:2},1032,["onClose"])]),_:1}),u(Q,null,{default:r(()=>[u(J)]),_:1})],64)}}});export{rn as default};
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import{d as B,a as w,aL as M,o as n,m as r,k as t,a9 as T,f as l,t as k,ad as O,F as f,n as E,h as y,r as C,w as Y,aC as q,a1 as j,bW as U,p as x,i as m,G as z,q as X,ao as Z,e as K,au as P,j as v,ay as Q,v as F,_ as G,aN as ee,am as se,b3 as te,bX as ne,ab as oe,N as ae,ac as le,A as ie,L as R,a5 as re,Z as ce}from"./C_tLznPO.js";import{_ as V}from"./CoNBQO3e.js";import{_ as H}from"./D4V9JMY9.js";import{_ as pe}from"./BKukfVLl.js";import{e as de}from"./B3uNdhXb.js";import{_ as ue}from"./U0su7k1z.js";import{_ as me}from"./DrswlxM3.js";import{_ as ke}from"./nhLZZe93.js";import{_ as he}from"./Dm9RYIcI.js";import{_ as _e}from"./CCJYS4Qc.js";import{_ as fe}from"./BOV_C5BD.js";import"./CNzQK24q.js";import"./CO7Eo6nF.js";import"./BI3hykgO.js";import"./BcJws1i5.js";import"./CIvuwNIv.js";const ye=B({__name:"TimelineItemFunction",props:{item:{}},setup(_){const p=_,c=w(()=>M(p.item.name,50,60,"_op_")),e=w(()=>c.value.replace(/_op_/,"1")),a=w(()=>M(p.item.name,50,40)),i=w(()=>c.value.replace(/_op_/,"0.2"));return(o,d)=>(n(),r("button",{class:"group",style:T({color:l(e),borderLeft:`2px solid ${l(e)}`}),relative:"","text-sm":"",transition:"","hover:z-1000":"","bg-base":""},[t("div",{style:T({backgroundColor:l(i)}),absolute:"","bottom-0":"","left--1px":"","top-0":"","w-full":"","text-sm":"","transition-all":"","duration-300":""},null,4),t("div",{style:T({color:l(a),"--c":l(e)}),border:"r-2 t-2 y-2 transparent","min-w-max":"",px1:"","text-left":"","group-hover":"border-$c"},k(o.item.name),5)],4))}}),ve={relative:"","h-full":""},be={absolute:"","left-2":"","top-2.3em":"","text-xs":"",op50:""},ge=B({__name:"TimelineSegment",props:{segment:{}},emits:["select"],setup(_,{emit:p}){const c=_,e=p,a=O(()=>c.segment.start,{updateInterval:1e3,showSecond:!0,controls:!1,messages:{justNow:"",past:i=>i,future:i=>i,invalid:"-",second:i=>i?`${i}s`:"",minute:i=>`${i}m`,hour:i=>`${i}h`,week:i=>`${i}w`,day:i=>`${i}d`,month:i=>`${i}mo`,year:i=>`${i}y`}});return(i,o)=>{const d=ye;return n(),r("div",ve,[t("button",{absolute:"","left-0":"","right-0":"","top-0":"","bg-green:5":"",px2:"",py1:"","text-left":"","text-xs":"","text-green6":"","font-mono":"",onClick:o[0]||(o[0]=s=>i.segment.route?e("select",i.segment.route):void 0)},k(i.segment.route?.event.to),1),t("div",be,k(l(a))+" ago ",1),t("div",null,[(n(!0),r(f,null,E(i.segment.functions,(s,u)=>(n(),y(d,{key:u,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:h=>e("select",s)},null,8,["item","style","onClick"]))),128))])])}}}),xe=3e3,$e=50;function Ae(_){const p=[];let c={start:0,end:0,events:[],functions:[],duration:0};for(const e of _){const a=e.end||e.start;(e.start-c.end>xe||e.type==="route")&&(c={start:e.start,end:a,events:[],functions:[],duration:0},p.push(c)),c.events.push(e),c.end=a+$e}return p.forEach((e,a)=>{const i=e.end-e.start,o=[];e.duration=i,e.previousGap=a>0?e.start-p[a-1].end:0,e.events.forEach(d=>{const s=d.end||d.start;let u=0;d.type!=="route"&&(u=o.findIndex($=>$<=d.start),u===-1?(u=o.length,o.push(s+1e3)):o[u]=s+1e3);const h={event:d,segment:e,relativeStart:(d.start-e.start)/i,relativeWidth:(s-d.start)/i,layer:u};d.type==="function"?e.functions.push(h):e.route=h})}),p}const De={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(_,{emit:p}){const c=_,e=p,a=C(),i=C(),o=C(),d=C(),s=C(!0),u=C(1.5),h=w(()=>Ae(c.data.events)),$=w(()=>(c.data.events.length,a.value?.scrollWidth||window.innerWidth));function A(){d.value&&(d.value.style.width=`${$.value}px`)}function S(){s.value&&a.value&&(a.value.scrollTo({left:a.value.scrollWidth-a.value.clientWidth,behavior:"smooth"}),o.value.scrollTo({left:a.value.scrollWidth-a.value.clientWidth,behavior:"smooth"}))}return Y(()=>c.data.events.length,async()=>{await q(),A(),S()},{flush:"post"}),j(a,"scroll",()=>{o.value.scrollLeft!==a.value.scrollLeft&&(A(),o.value.scrollLeft=a.value.scrollLeft,s.value=a.value.scrollLeft>=a.value.scrollWidth-a.value.clientWidth)}),j(o,"scroll",()=>{o.value.scrollLeft!==a.value.scrollLeft&&(A(),a.value.scrollLeft=o.value.scrollLeft)}),j(a,"wheel",b=>{b.altKey?(u.value=U(u.value+b.deltaY/200,.5,3),A()):a.value.scrollLeft+=b.deltaY}),(b,L)=>{const D=V,W=ge;return n(),r(f,null,[t("div",De,[t("div",{ref_key:"minimap",ref:i,border:"t b base",relative:"","h-50px":"","ws-nowrap":"","border-base":""},[(n(!0),r(f,null,E(l(h),(g,N)=>(n(),r("div",{key:N,relative:"","h-full":"","flex-inline":"",style:T({width:`${Math.max(100,g.duration/10)/l($)*100}%`})},[(n(!0),r(f,null,E(g.functions,(I,J)=>(n(),r("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 b?b.getHashColorFromString:l(M))(I.event.name,50,60)})},null,4))),128)),g.route?(n(),r("div",{key:0,absolute:"","top-0":"","h-full":"","w-px":"","border-l":"","border-green6":"",op10:"",style:T({left:`${g.route.relativeStart*100}%`})},null,4)):x("",!0)],4))),128))],512),t("div",{ref_key:"minimapScroller",ref:o,class:"timeline-scroller",absolute:"","inset-0":"","h-full":"","w-full":"","of-x-scroll":""},[t("div",{ref_key:"minimapScrollerInner",ref:d,"h-1px":""},null,512)],512)]),t("div",{ref_key:"scroller",ref:a,relative:"","h-full":"","w-full":"","of-x-scroll":"","of-y-hidden":"","ws-nowrap":"","n-panel-grids":""},[(n(!0),r(f,null,E(l(h),(g,N)=>(n(),r(f,{key:N},[g.previousGap&&g.previousGap>=200?(n(),r("div",Ce,[m(D,{op50:"",duration:g.previousGap,color:!1},null,8,["duration"])])):x("",!0),m(W,{"flex-inline":"","of-x-hidden":"","hover:of-x-visible":"","bg-base":"",class:z(N===l(h).length-1?"border-r border-base":""),segment:g,style:T({width:`${Math.max(50,g.duration/10)*l(u)}px`}),onSelect:L[0]||(L[0]=I=>e("select",I))},null,8,["class","segment","style"])],64))),128))],512)],64)}}}),we=X(Be,[["__scopeId","data-v-357f5ced"]]),Te={border:"t base",flex:"~ col","h-full":"","of-y-auto":"","text-sm":""},Se=["onClick"],Ne=t("div",{"i-carbon-function":"",op50:""},null,-1),Fe={flex:"~","ml--1":"","font-mono":""},Ee=t("div",{op30:""}," ( ",-1),Le={key:0,mr2:"",op30:""},Ie={op75:""},We=t("div",{op30:""}," ) ",-1),Me=t("div",{"mr-1":"","h-7":"","w-7":"",flex:"","rounded-lg":"","bg-primary:5":"",p1:"","text-green6":""},[t("div",{"i-carbon-direction-rotary-right":"",ma:"","text-lg":""})],-1),Ve={flex:"~ col items-start"},je={"text-xs":"","font-mono":"",op30:""},Oe={"text-green":"","font-bold":"","font-mono":""},ze=t("div",{"flex-auto":""},null,-1),Ge=t("div",{"min-h-100":""},null,-1),Re=B({__name:"TimelineList",props:{data:{}},emits:["select"],setup(_,{emit:p}){const c=p;return(e,a)=>{const i=V;return n(),r("div",Te,[(n(!0),r(f,null,E(e.data.events,(o,d)=>(n(),r("button",{key:d,border:"b base",px3:"",py2:"",flex:"~ items-center gap-2",hover:"bg-active",onClick:s=>c("select",o)},[o.type==="function"?(n(),r(f,{key:0},[Ne,t("div",{"font-mono":"",style:T({color:o.type==="function"?("getHashColorFromString"in e?e.getHashColorFromString:l(M))(o.name,50,60):""})},k(o.name),5),t("div",Fe,[Ee,(n(!0),r(f,null,E(o.args,(s,u)=>(n(),r(f,{key:u},[u?(n(),r("div",Le," , ")):x("",!0),t("div",Ie,k(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)),We])],64)):(n(),r(f,{key:1},[Me,t("div",Ve,[t("div",je,k(o.from),1),t("div",Oe,k(o.to),1)])],64)),ze,o.end?(n(),y(i,{key:2,duration:o.end-o.start,color:o.type==="function"},null,8,["duration","color"])):x("",!0)],8,Se))),128)),Ge])}}}),Pe={key:0,"text-blue":""},He={key:1,"text-purple":""},Je={key:2,"text-green":""},Ye={key:3,"text-gray":""},qe={key:4,"text-gray":""},Ue={key:5,"text-gray":""},Xe={key:0,"bg-red:10":"",px2:"",py1:"","text-red":""},Ze={key:1},Ke={p2:"","text-sm":"",border:"t base"},Qe=B({__name:"TimelineArgumentView",props:{value:{}},setup(_){const p=_,c=C(),e=C();function a(){try{c.value=JSON.parse(JSON.stringify(p.value))}catch(s){console.error(s),e.value=s}}const i=B({emits:["setup"],setup(s,{emit:u}){return u("setup"),()=>null}}),o=Z(),d=K();return(s,u)=>{const h=G,$=P("VMenu");return typeof s.value=="string"?(n(),r("div",Pe,k(JSON.stringify(s.value)),1)):typeof s.value=="number"?(n(),r("div",He,k(s.value),1)):typeof s.value=="boolean"?(n(),r("div",Je,k(s.value),1)):typeof s.value>"u"?(n(),r("div",Ye," undefined ")):typeof s.value=="function"?(n(),r("div",qe," [Function"+k(s.value.name?`: ${s.value.name}`:"")+"] ",1)):s.value===null?(n(),r("div",Ue," null ")):(n(),y($,{key:6,placement:"top"},{popper:v(()=>[m(l(i),{onSetup:a}),l(e)?(n(),r("div",Xe," Failed to display object: "+k(l(e)),1)):l(c)?(n(),r("div",Ze,[m(l(de),Q({"model-value":l(c)},s.$attrs,{class:["json-editor-vue",[l(o)==="dark"?"jse-theme-dark":""]],"main-menu-bar":!1,"navigation-bar":!1,"status-bar":!1,"read-only":!0,indentation:2,"tab-size":2}),null,16,["model-value","class"]),t("div",Ke,[m(h,{title:"Copy to clipboard",icon:"carbon-copy",onClick:u[0]||(u[0]=A=>l(d)(JSON.stringify(l(c),null,2),"timeline-argument"))},{default:v(()=>[F(" Copy ")]),_:1})])])):x("",!0)]),default:v(()=>[t("span",{"rounded-sm":"",px1:"","py0.5":"","text-sm":"",class:z([Array.isArray(s.value)?"text-amber bg-amber:10":"text-orange bg-orange:10"])},k(Array.isArray(s.value)?`[Array(${s.value.length})]`:"[Object]"),3)]),_:1}))}}}),es={key:0,"p-4":"",flex:"~ col gap-2","text-base":""},ss={"mx--1":""},ts={flex:"~ gap-1","font-mono":""},ns={key:1},os=t("span",{ml1:"",op30:""},"(",-1),as={key:0,op30:""},ls=t("span",{op30:""},")",-1),is={flex:"~ gap-1","text-sm":""},rs=t("span",{mx1:"",op50:""},"·",-1),cs={class:"text-sm text-gray-400"},ps=B({__name:"TimelineDetailsFunction",props:{record:{}},setup(_){const p=_,c=O(()=>p.record.start,{showSecond:!0}),e=ee(),a=w(()=>e.value?.metadata),i=w(()=>e.value?.imports.find(o=>o.as===p.record.name));return(o,d)=>{const s=H,u=pe,h=Qe,$=V,A=ue;return o.record?(n(),r("div",es,[t("div",ss,[m(s,{n:"yellow",textContent:"Function call"})]),t("div",ts,[l(i)?(n(),y(u,{key:0,item:l(i),metadata:l(a),counter:!1,classes:"px2 py1","mx--2":""},null,8,["item","metadata"])):(n(),r("span",ns,k(o.record.name),1)),os,(n(!0),r(f,null,E(o.record.args,(S,b)=>(n(),r(f,{key:b},[b?(n(),r("span",as,", ")):x("",!0),m(h,{value:S},null,8,["value"])],64))),128)),ls]),t("div",is,[o.record.end?(n(),y($,{key:0,duration:o.record.end-o.record.start},null,8,["duration"])):x("",!0),rs,t("div",cs,k(l(c)),1)]),o.record.stacktrace?(n(),y(A,{key:0,stacktrace:o.record.stacktrace,class:"text-xs text-gray-400"},null,8,["stacktrace"])):x("",!0)])):x("",!0)}}}),ds={key:0,"p-4":"",flex:"~ col gap-2"},us={"mx--1":""},ms={flex:"~ gap-1 items-center","font-mono":""},ks={op50:""},hs=t("span",{"i-carbon-arrow-right":"",op50:""},null,-1),_s={flex:"~ gap-1","text-sm":""},fs=t("span",{mx1:"",op50:""},"·",-1),ys={class:"text-sm text-gray-400"},vs=B({__name:"TimelineDetailsRoute",props:{record:{}},setup(_){const p=_,c=O(()=>p.record.start,{showSecond:!0});return(e,a)=>{const i=H,o=V;return e.record?(n(),r("div",ds,[t("div",us,[m(i,{n:"green",textContent:"Route Change"})]),t("div",ms,[t("span",ks,k(e.record.from),1),hs,t("span",null,k(e.record.to),1)]),t("div",_s,[e.record.end?(n(),y(o,{key:0,duration:e.record.end-e.record.start},null,8,["duration"])):x("",!0),fs,t("div",ys,k(l(c)),1)])])):x("",!0)}}}),bs={key:0,"h-screen":"","of-hidden":""},gs={"h-screen":"","w-full":"",flex:"","flex-col":""},xs={"h-10":"",flex:"~ gap-2 items-center justify-end",p2:"",px3:""},$s={"text-sm":""},As=t("div",{"flex-auto":""},null,-1),Ds={"min-h-50":"",px3:"",py2:""},Cs=B({__name:"TimelineView",setup(_){const p=se(),c=C("table"),e=C(),a=w(()=>p.value?.metrics.clientTimeline());function i(){a.value&&(a.value.events=[])}function o(){c.value=c.value==="table"?"list":"table"}return(d,s)=>{const u=P("VTooltip"),h=G,$=we,A=Re,S=ps,b=vs,L=me;return l(a)?(n(),r("div",bs,[t("div",gs,[t("div",xs,[m(u,{flex:""},{popper:v(()=>[t("div",$s,k(l(a).options.enabled?"Recording...":"Paused"),1)]),default:v(()=>[t("div",{"text-lg":"",class:z(l(a).options.enabled?"i-carbon-radio-button-checked text-primary animate-pulse":"i-carbon-pause-outline op30")},null,2)]),_:1}),l(a).options.enabled?(n(),y(h,{key:1,size:"small",ml1:"","text-sm":"",n:"orange",icon:"i-carbon-stop",onClick:s[1]||(s[1]=D=>l(a).options.enabled=!1)},{default:v(()=>[F(" Stop Tracking ")]),_:1})):(n(),y(h,{key:0,size:"small",ml1:"","text-sm":"",n:"primary",icon:"i-carbon-play",onClick:s[0]||(s[0]=D=>l(a).options.enabled=!0)},{default:v(()=>[F(" Start Tracking ")]),_:1})),As,m(h,{icon:l(c)==="table"?"i-carbon-roadmap":"i-carbon-list",class:"ml-2",title:"Toggle View",border:!1,onClick:o},null,8,["icon"]),m(h,{icon:"i-carbon-trash-can","hover-text-red":"",class:"ml-2",border:!1,onClick:i})]),l(c)==="table"?(n(),y($,{key:0,data:{...l(a)},onSelect:s[2]||(s[2]=D=>e.value=D.event)},null,8,["data"])):(n(),y(A,{key:1,data:{...l(a)},onSelect:s[3]||(s[3]=D=>e.value=D)},null,8,["data"]))]),m(L,{"model-value":!!l(e),"auto-close":"",transition:"bottom",left:"#nuxt-devtools-side-nav",onClose:s[4]||(s[4]=D=>e.value=void 0)},{default:v(()=>[t("div",Ds,[l(e)?.type==="function"?(n(),y(S,{key:0,record:l(e)},null,8,["record"])):l(e)?.type==="route"?(n(),y(b,{key:1,record:l(e)},null,8,["record"])):x("",!0)])]),_:1},8,["model-value"])])):x("",!0)}}}),Bs={class:"markdown-body"},ws=t("h1",null,"Timeline",-1),Ts=t("p",null,[t("blockquote",{"text-orange":"","bg-orange:10":"",py1:""}," This is an experimental feature ")],-1),Ss=te(`<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;"> 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>
|
|
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>
|
|
5
|
-
<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>
|
|
6
|
-
<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>
|
|
7
|
-
<span class="line"></span>
|
|
8
|
-
<span class="line"><span style="color:#A0ADA0;--shiki-dark:#758575DD;">// NOT tracked because it's directly imported</span></span>
|
|
9
|
-
<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>
|
|
10
|
-
<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>
|
|
11
|
-
<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>
|
|
12
|
-
<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>
|
|
13
|
-
<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>
|
|
14
|
-
<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>
|
|
15
|
-
<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>
|
|
16
|
-
<span class="line"><span style="color:#A0ADA0;--shiki-dark:#758575DD;"> // track \`useMouse\`</span></span>
|
|
17
|
-
<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>
|
|
18
|
-
<span class="line"><span style="color:#A0ADA0;--shiki-dark:#758575DD;"> // track all functions starting with \`use\`</span></span>
|
|
19
|
-
<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>
|
|
20
|
-
<span class="line"><span style="color:#A0ADA0;--shiki-dark:#758575DD;"> // track all functions from @vueuse/core</span></span>
|
|
21
|
-
<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>
|
|
22
|
-
<span class="line"><span style="color:#999999;--shiki-dark:#666666;"> ],</span></span>
|
|
23
|
-
<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>
|
|
24
|
-
<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>
|
|
25
|
-
<span class="line"><span style="color:#999999;--shiki-dark:#666666;"> ]</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></code></pre>`,6),Ns=[ws,Ts,Ss],Fs={__name:"timeline",setup(_,{expose:p}){return p({frontmatter:{}}),(e,a)=>(n(),r("div",Bs,Ns))}},Es=Fs,Ls={flex:"~ col gap-2","w-150":"",p4:"",border:"t base"},Is=t("h2",{"text-xl":""},[t("span",{capitalize:""},"Enable Timeline?")],-1),Ws={op50:""},Ms=t("p",null,[t("span",{op50:""},"Then Nuxt will "),t("span",{"text-orange":""},"restart automatically"),F(". ")],-1),Vs={flex:"~ gap-3",mt2:"","justify-end":""},st=B({__name:"timeline",setup(_){const p=ne(),c=oe(),e=ae(),a=le();async function i(){try{const[o,d]=await R.enableTimeline(!0);if(!await e.start(o,d))return;await R.enableTimeline(!1)}catch{re({message:"Failed to enable timeline automatically. Check the terminal for more details.",icon:"i-carbon-warning",classes:"text-red"})}}return(o,d)=>{const s=Cs,u=ke,h=ie,$=he,A=_e,S=G,b=ce,L=Es,D=fe;return n(),r(f,null,[l(p)?.timeline?.enabled?(n(),y(s,{key:0})):(n(),r(f,{key:1},[m(h,null,{default:v(()=>[m(u,{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:i})]),_:1}),m(l(e),null,{default:v(({resolve:W,args:g})=>[m(b,{"model-value":!0,onClose:N=>W(!1)},{default:v(()=>[t("div",Ls,[Is,t("p",Ws,[F(" Your "),m($,{role:"button",n:"primary",underline:"",onClick:d[0]||(d[0]=N=>l(a)(l(c)?._nuxtConfigFile)),textContent:"Nuxt config"}),F(" will be updated as: ")]),m(A,{from:g[0],to:g[1],"max-h-80":"","of-auto":"",py2:"",border:"~ base rounded",lang:"ts"},null,8,["from","to"]),Ms,t("div",Vs,[m(S,{onClick:N=>W(!1)},{default:v(()=>[F(" Cancel ")]),_:2},1032,["onClick"]),m(S,{n:"solid primary",capitalize:"",onClick:N=>W(!0)},{default:v(()=>[F(" Enable ")]),_:2},1032,["onClick"])])])]),_:2},1032,["onClose"])]),_:1})],64)),m(D,null,{default:v(()=>[m(L)]),_:1})],64)}}});export{st as default};
|