@vitejs/devtools-vite 0.0.0-alpha.15 → 0.0.0-alpha.17
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/index.d.mts +30 -11
- package/dist/index.mjs +0 -11
- package/dist/nitro.json +1 -1
- package/dist/public/200.html +1 -1
- package/dist/public/404.html +1 -1
- package/dist/public/_nuxt/{COkVMxfk.js → 7pdU4mzw.js} +1 -1
- package/dist/public/_nuxt/B661rCRY.js +6 -0
- package/dist/public/_nuxt/{CDULFaBv.js → BB7zYkKg.js} +1 -1
- package/dist/public/_nuxt/{DDPo8H3W.js → BBFR_Uo5.js} +1 -1
- package/dist/public/_nuxt/{CzgA83N_.js → BO4TB9gH.js} +1 -1
- package/dist/public/_nuxt/{Dp55yonU.js → BVY1sWiJ.js} +1 -1
- package/dist/public/_nuxt/{DH-eUyNP.js → BYCB-Hif.js} +1 -1
- package/dist/public/_nuxt/{BnFT81HV.js → BdsP-Cx2.js} +1 -1
- package/dist/public/_nuxt/{DndCUz9L.js → BiQ0ZhR_.js} +1 -1
- package/dist/public/_nuxt/{BjxvvmqH.js → Bl_zhAit.js} +1 -1
- package/dist/public/_nuxt/{D2L83EJo.js → BsfPzBLD.js} +2 -2
- package/dist/public/_nuxt/{HV-uTnTx.js → BwrSljRH.js} +1 -1
- package/dist/public/_nuxt/{BG9Ykbq7.js → CHXCO5ia.js} +1 -1
- package/dist/public/_nuxt/{DhdUZbRv.js → CHrIIE6Z.js} +1 -1
- package/dist/public/_nuxt/{idtszpPM.js → CI-Sc-2P.js} +1 -1
- package/dist/public/_nuxt/{BkUn9yPG.js → C_cs-58z.js} +1 -1
- package/dist/public/_nuxt/{BJv7hFBm.js → CoLW5wV8.js} +1 -1
- package/dist/public/_nuxt/{DdbSxsRv.js → CrP3spb8.js} +1 -1
- package/dist/public/_nuxt/{Dd6GGSHe.js → Cv1sf0OD.js} +1 -1
- package/dist/public/_nuxt/D-NARtgK.js +1 -0
- package/dist/public/_nuxt/{CVmdkwE8.js → D7fGBzoc.js} +1 -1
- package/dist/public/_nuxt/{V3kdlpoV.js → DAv0Rzal.js} +1 -1
- package/dist/public/_nuxt/{hkb_fnPj.js → DHD8rbcK.js} +1 -1
- package/dist/public/_nuxt/{Dnw1sKCY.js → DQDcWwzr.js} +1 -1
- package/dist/public/_nuxt/{jo347JsK.js → Dd9_UU0g.js} +1 -1
- package/dist/public/_nuxt/{DMaeA1tb.js → DdkDM4fj.js} +1 -1
- package/dist/public/_nuxt/{CsYy4mNk.js → Ivdx0lA9.js} +1 -1
- package/dist/public/_nuxt/{B3PiPV-x.js → RlFrOrwQ.js} +1 -1
- package/dist/public/_nuxt/{CZMM-nMb.js → VMul6hew.js} +1 -1
- package/dist/public/_nuxt/{_session_.B0BbH92J.css → _session_.BXMlcDmB.css} +1 -1
- package/dist/public/_nuxt/builds/latest.json +1 -1
- package/dist/public/_nuxt/builds/meta/f71a649b-f47c-44eb-9005-86c44268b9bf.json +1 -0
- package/dist/public/_nuxt/{entry.D-FSo8e5.css → entry.C1YP59mZ.css} +1 -1
- package/dist/public/_nuxt/{B7TCfKhI.js → f1KvgLIQ.js} +1 -1
- package/dist/public/_nuxt/{BACoQHB-.js → falkWS6X.js} +1 -1
- package/dist/public/_nuxt/{fQmYF_tr.js → mbqImpEE.js} +1 -1
- package/dist/public/_nuxt/{DD_wBK9r.js → sTN5Ot43.js} +1 -1
- package/dist/public/_nuxt/{DlbkLyV4.js → vlGwL1DD.js} +1 -1
- package/dist/public/_nuxt/{ZcrIAmbb.js → zcv9DqOS.js} +1 -1
- package/dist/public/index.html +1 -1
- package/package.json +4 -4
- package/dist/public/_nuxt/BSbpramE.js +0 -1
- package/dist/public/_nuxt/C-xw4DlO.js +0 -6
- package/dist/public/_nuxt/builds/meta/54fd6322-de06-49fe-8b5e-e12e2c95d98d.json +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{At as e,Nt as t,T as n,Tt as r,Vt as i,W as a,ct as o,en as s,in as c,lt as l,mt as u,ot as d,pt as f,rn as p,st as m,tn as h,ut as g}from"./
|
|
1
|
+
import{At as e,Nt as t,T as n,Tt as r,Vt as i,W as a,ct as o,en as s,in as c,lt as l,mt as u,ot as d,pt as f,rn as p,st as m,tn as h,ut as g}from"./B661rCRY.js";import{t as _}from"./Dd9_UU0g.js";import{n as v,t as y}from"./DQDcWwzr.js";import{n as b,t as x}from"./RlFrOrwQ.js";var S=[`textContent`],C=u({__name:`Badge`,props:{text:{},color:{type:[Boolean,Number],default:!0},as:{},size:{}},setup(n){let a=n,s=d(()=>!a.text||a.color===!1?{}:{color:typeof a.color==`number`?v(a.color):y(a.text),background:typeof a.color==`number`?v(a.color,.1):y(a.text,.1)}),l=d(()=>{switch(a.size||`sm`){case`sm`:return`px-1.5 text-11px leading-1.6em`}return``});return(u,d)=>(r(),o(t(n.as||`span`),{"ws-nowrap":``,rounded:``,class:h(l.value),style:p(s.value)},{default:i(()=>[e(u.$slots,`default`,{},()=>[m(`span`,{textContent:c(a.text)},null,8,S)])]),_:3},8,[`class`,`style`]))}}),w=Object.assign(C,{__name:`DisplayBadge`}),T=/^[A-Za-z]:\//;function E(e=``){return e&&e.replace(/\\/g,`/`).replace(T,e=>e.toUpperCase())}var D=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/,O=/^\/([A-Za-z]:)?$/;function k(){return typeof process<`u`&&typeof process.cwd==`function`?process.cwd().replace(/\\/g,`/`):`/`}var A=function(...e){e=e.map(e=>E(e));let t=``,n=!1;for(let r=e.length-1;r>=-1&&!n;r--){let i=r>=0?e[r]:k();!i||i.length===0||(t=`${i}/${t}`,n=M(i))}return t=j(t,!n),n&&!M(t)?`/${t}`:t.length>0?t:`.`};function j(e,t){let n=``,r=0,i=-1,a=0,o=null;for(let s=0;s<=e.length;++s){if(s<e.length)o=e[s];else if(o===`/`)break;else o=`/`;if(o===`/`){if(!(i===s-1||a===1))if(a===2){if(n.length<2||r!==2||n[n.length-1]!==`.`||n[n.length-2]!==`.`){if(n.length>2){let e=n.lastIndexOf(`/`);e===-1?(n=``,r=0):(n=n.slice(0,e),r=n.length-1-n.lastIndexOf(`/`)),i=s,a=0;continue}else if(n.length>0){n=``,r=0,i=s,a=0;continue}}t&&(n+=n.length>0?`/..`:`..`,r=2)}else n.length>0?n+=`/${e.slice(i+1,s)}`:n=e.slice(i+1,s),r=s-i-1;i=s,a=0}else o===`.`&&a!==-1?++a:a=-1}return n}var M=function(e){return D.test(e)},N=function(e,t){let n=A(e).replace(O,`$1`).split(`/`),r=A(t).replace(O,`$1`).split(`/`);if(r[0][1]===`:`&&n[0][1]===`:`&&n[0]!==r[0])return r.join(`/`);let i=[...n];for(let e of i){if(r[0]!==e)break;n.shift(),r.shift()}return[...n.map(()=>`..`),...r].join(`/`)},P={"overflow-hidden":``,"text-ellipsis":``,"break-all":``,"line-clamp-2":``},F={"font-mono":``,"text-sm":``},I=u({__name:`ModuleId`,props:{id:{},badges:{type:Boolean},icon:{type:Boolean,default:!0},link:{type:[Boolean,String]},minimal:{type:Boolean},kind:{},session:{},cwd:{},disableTooltip:{type:Boolean,default:!1}},setup(u){let p=u,v=a(),y=window.location,S=d(()=>{if(!p.id)return``;let e=p.id.replace(/%2F/g,`/`),t=p.cwd||p.session.meta.cwd,n=t?N(t,e):e;return n.startsWith(`.`)||(n=`./${n}`),n.startsWith(`./`)||n.match(/^(?:\.\.\/){1,3}[^.]/)?n:e}),C=d(()=>`flex items-center`);return(a,d)=>{let T=b,E=x,D=w;return r(),o(t(u.link?s(_):`div`),{to:u.link?typeof u.link==`string`?u.link:{path:s(v).path,query:{...s(v).query,module:u.id,chunk:void 0},hash:s(y).hash}:void 0},{default:i(()=>[f(s(n),{"my-auto":``,"text-sm":``,"font-mono":``,block:``,"w-full":``,triggers:[`hover`],delay:1200,disabled:u.disableTooltip||(p.id?.length||0)<30,placement:`bottom-start`},{popper:i(()=>[m(`span`,F,c(p.id),1)]),default:i(()=>[u.id?(r(),g(`div`,{key:0,class:h(C.value)},[u.icon?(r(),o(T,{key:0,filename:u.id,"mr1.5":``},null,8,[`filename`])):l(``,!0),m(`span`,P,[f(E,{path:S.value,minimal:u.minimal},null,8,[`path`,`minimal`])]),e(a.$slots,`default`),u.kind?(r(),o(D,{key:1,class:`ml1`,text:u.kind},null,8,[`text`])):l(``,!0)],2)):l(``,!0),m(`div`,null,[e(a.$slots,`detail`)])]),_:3},8,[`disabled`])]),_:3},8,[`to`])}}}),L=Object.assign(I,{__name:`DisplayModuleId`});export{N as n,w as r,L as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{At as e,Ft as t,Nt as n,Tt as r,Vt as i,W as a,c as o,ct as s,en as c,ft as l,in as u,it as d,kt as f,lt as p,mt as m,ot as h,pt as g,st as _,ut as v,x as y,y as b,yt as x}from"./
|
|
1
|
+
import{At as e,Ft as t,Nt as n,Tt as r,Vt as i,W as a,c as o,ct as s,en as c,ft as l,in as u,it as d,kt as f,lt as p,mt as m,ot as h,pt as g,st as _,ut as v,x as y,y as b,yt as x}from"./B661rCRY.js";import{t as S}from"./Dd9_UU0g.js";import{r as C,t as w}from"./f1KvgLIQ.js";import{r as T}from"./vlGwL1DD.js";import{t as E}from"./DHD8rbcK.js";var D=[`title`],O={flex:`~ items-center gap-2`},k={op50:``,"font-mono":``},A=[`title`],j=[`title`],M=m({__name:`BaseInfo`,props:{chunk:{},link:{type:Boolean,default:!1}},setup(t){let o=t,d=a(),f=h(()=>Array.isArray(o.chunk.imports)?o.chunk.imports.length:o.chunk.imports),p=h(()=>Array.isArray(o.chunk.modules)?o.chunk.modules.length:o.chunk.modules);return(a,o)=>{let m=C;return r(),s(n(t.link?c(S):`div`),{to:t.link?typeof t.link==`string`?t.link:{path:c(d).path,query:{chunk:t.chunk.chunk_id}}:void 0,flex:`~ gap-3 items-center`},{default:i(()=>[_(`div`,{flex:`~ gap-2 items-center`,title:`Chunk #${t.chunk.chunk_id}`},[e(a.$slots,`icon`,{},()=>[o[0]||=_(`div`,{"i-ph-shapes-duotone":``},null,-1)]),_(`div`,null,u(t.chunk.name||`[unnamed]`),1),g(m,{text:t.chunk.reason},null,8,[`text`]),e(a.$slots,`left-after`)],8,D),o[3]||=_(`div`,{"flex-auto":``},null,-1),_(`div`,O,[_(`span`,k,`#`+u(t.chunk.chunk_id),1),_(`div`,{flex:`~ gap-1 items-center`,title:`${f.value} imports`},[o[1]||=_(`div`,{"i-ph-file-arrow-up-duotone":``},null,-1),l(` `+u(f.value),1)],8,A),_(`div`,{flex:`~ gap-1 items-center`,title:`${p.value} modules`},[o[2]||=_(`div`,{"i-ph-package-duotone":``},null,-1),l(` `+u(p.value),1)],8,j)]),e(a.$slots,`default`)]),_:3},8,[`to`])}}}),N=Object.assign(M,{__name:`ChunksBaseInfo`}),P={relative:``},F={key:0,"pointer-events-none":``,absolute:``,"left-0":``,"right-0":``,"bottom-0":``,"bg-gradient-more":``,"h-30":``,flex:`~ justify-center`},I=m({__name:`ExpandableContainer`,props:x({list:{}},{count:{default:20},countModifiers:{}}),emits:[`update:count`],setup(n){let i=n,a=t(n,`count`),o=a.value,s=h(()=>i.list.slice(0,a.value));return(t,l)=>{let u=E;return r(),v(`div`,P,[e(t.$slots,`default`,{items:s.value}),n.list.length>a.value?(r(),v(`div`,F,[_(`button`,{op35:``,p2:``,pt4:``,mta:``,"pointer-events-auto":``,"hover:op100":``,flex:`~ items-center gap-1 justify-center`,onClick:l[0]||=e=>a.value=Math.round(a.value+c(o))},[l[2]||=_(`div`,{"i-ri:arrow-down-double-line":``},null,-1),l[3]||=_(`span`,null,`More`,-1),g(u,{prefix:`+`,number:Math.min(Math.round(c(o)),i.list.length-a.value),"rounded-full":``,"text-sm":``},null,8,[`number`])]),_(`button`,{op35:``,p2:``,pt4:``,mta:``,"pointer-events-auto":``,"hover:op100":``,flex:`~ items-center gap-1 justify-center`,onClick:l[1]||=e=>a.value=i.list.length},[l[4]||=_(`div`,{"i-ph-arrows-out-line-vertical-duotone":``},null,-1),l[5]||=_(`span`,null,`All`,-1),g(u,{number:i.list.length,"rounded-full":``,"text-sm":``},null,8,[`number`])])])):p(``,!0)])}}}),L=Object.assign(I,{__name:`DisplayExpandableContainer`}),R={key:0,"i-ph-file-duotone":``},z={key:1,"i-ph-lightning-duotone":``},B=m({__name:`Imports`,props:{imports:{}},setup(e){return(t,n)=>{let a=C,o=N,c=L;return r(),s(c,{flex:`~ col gap-1`,mt2:``,"ws-nowrap":``,list:e.imports},{default:i(({items:e})=>[(r(!0),v(d,null,f(e,(e,t)=>(r(),v(d,{key:t},[e?(r(),s(o,{key:0,chunk:e,link:``,hover:`bg-active`,border:`~ base rounded`,px2:``,py1:``,"w-full":``},{icon:i(()=>[e.kind===`import-statement`?(r(),v(`div`,R)):p(``,!0),e.kind===`dynamic-import`?(r(),v(`div`,z)):p(``,!0)]),"left-after":i(()=>[g(a,{text:e.kind},null,8,[`text`])]),_:2},1032,[`chunk`])):p(``,!0)],64))),128))]),_:1},8,[`list`])}}}),V=Object.assign(B,{__name:`ChunksImports`}),H={flex:`~ col gap-3`},U={key:0,open:`true`},W={op50:``},G={key:0,open:`true`},K={op50:``},q={key:1,open:`true`},J={op50:``},Y=m({__name:`ChunkDetails`,props:{chunk:{},session:{},showModules:{type:Boolean,default:!0},showImports:{type:Boolean,default:!0},chunks:{}},setup(t){let n=t,a=h(()=>{let e=new Map;for(let t of n.session.modulesList)e.set(t.id,t);return e}),l=h(()=>n.chunk.modules.reduce((e,t)=>{let n=a.value.get(t)?.buildMetrics?.transforms;return n?.length?e+n[n.length-1].transformed_code_size:e},0)),m=b(),{state:x,isLoading:S}=o(async()=>{if(!n.chunks)return await m.value.$call(`vite:rolldown:get-chunks-graph`,{session:n.session.id})},null),E=h(()=>n.chunks||x.value),D=h(()=>n.chunk.imports.map(e=>{let t=E.value?.find(t=>t.chunk_id===e.chunk_id);return{...e,name:t?.name||`[unnamed]`,reason:t?.reason||`common`,imports:t?.imports.length||0,modules:t?.modules.length||0}})),O=h(()=>E.value?.filter(e=>e.imports.some(e=>e.chunk_id===n.chunk.chunk_id)).map(e=>({...e.imports.find(e=>e.chunk_id===n.chunk.chunk_id),chunk_id:e.chunk_id,name:e.name||`[unnamed]`,reason:e.reason||`common`,imports:e.imports.length||0,modules:e.modules.length||0}))||[]);return(n,a)=>{let o=C,m=T,h=N,b=w,x=L,E=y,k=V;return r(),v(`div`,H,[g(h,{chunk:t.chunk},{"left-after":i(()=>[t.chunk.is_initial?(r(),s(o,{key:0,text:`initial`})):p(``,!0),g(m,{bytes:l.value,"text-sm":``},null,8,[`bytes`])]),default:i(()=>[e(n.$slots,`default`)]),_:3},8,[`chunk`]),t.showModules?(r(),v(`details`,U,[_(`summary`,W,[_(`span`,null,`Modules (`+u(t.chunk.modules.length)+`)`,1)]),g(x,{flex:`~ col gap-1`,mt2:``,"ws-nowrap":``,list:t.chunk.modules},{default:i(({items:e})=>[(r(!0),v(d,null,f(e,e=>(r(),s(b,{id:e,key:e,session:t.session,link:!0,minimal:!0,hover:`bg-active`,border:`~ base rounded`,px2:``,py1:``,"w-full":``},null,8,[`id`,`session`]))),128))]),_:1},8,[`list`])])):p(``,!0),c(S)?(r(),s(E,{key:1})):t.showImports?(r(),v(d,{key:2},[t.chunk.imports.length?(r(),v(`details`,G,[_(`summary`,K,[_(`span`,null,`Imports (`+u(t.chunk.imports.length)+`)`,1)]),g(k,{imports:D.value},null,8,[`imports`])])):p(``,!0),O.value.length?(r(),v(`details`,q,[_(`summary`,J,[_(`span`,null,`Importers (`+u(O.value.length)+`)`,1)]),g(k,{imports:O.value},null,8,[`imports`])])):p(``,!0)],64)):p(``,!0)])}}}),X=Object.assign(Y,{__name:`DataChunkDetails`});export{L as n,N as r,X as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_t as e,mt as t}from"./
|
|
1
|
+
import{_t as e,mt as t}from"./B661rCRY.js";import{r as n}from"./DQDcWwzr.js";import{n as r}from"./DnpfwSMy.js";var i=t({name:`HighlightedPackageName`,props:{name:{type:String,required:!0}},setup(t){return()=>{let i=t.name;if(!r(i))return e(`span`,{class:`text-gray-500`},i);let a=n(i);if(i.startsWith(`@`)){let[t,n]=i.split(`/`);return[e(`span`,{style:`color: ${a}`},t),e(`span`,{style:`color: ${a}`,class:`op50`},`/`),e(`span`,{style:`color: ${a}`},n)]}return e(`span`,{style:`color: ${a}`},i)}}});export{i as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{$t as e,Dt as t,Jt as n,Xt as r,Yt as i,en as a,f as o,ot as s,s as c,u as l,vt as u,xt as d}from"./C-xw4DlO.js";function f(e){var t=0,n=e.children,r=n&&n.length;if(!r)t=1;else for(;--r>=0;)t+=n[r].value;e.value=t}function p(){return this.eachAfter(f)}function m(e,t){let n=-1;for(let r of this)e.call(t,r,++n,this);return this}function h(e,t){for(var n=this,r=[n],i,a,o=-1;n=r.pop();)if(e.call(t,n,++o,this),i=n.children)for(a=i.length-1;a>=0;--a)r.push(i[a]);return this}function g(e,t){for(var n=this,r=[n],i=[],a,o,s,c=-1;n=r.pop();)if(i.push(n),a=n.children)for(o=0,s=a.length;o<s;++o)r.push(a[o]);for(;n=i.pop();)e.call(t,n,++c,this);return this}function _(e,t){let n=-1;for(let r of this)if(e.call(t,r,++n,this))return r}function v(e){return this.eachAfter(function(t){for(var n=+e(t.data)||0,r=t.children,i=r&&r.length;--i>=0;)n+=r[i].value;t.value=n})}function y(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})}function b(e){for(var t=this,n=x(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var i=r.length;e!==n;)r.splice(i,0,e),e=e.parent;return r}function x(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),i=null;for(e=n.pop(),t=r.pop();e===t;)i=e,e=n.pop(),t=r.pop();return i}function S(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}function C(){return Array.from(this)}function w(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e}function T(){var e=this,t=[];return e.each(function(n){n!==e&&t.push({source:n.parent,target:n})}),t}function*ee(){var e=this,t,n=[e],r,i,a;do for(t=n.reverse(),n=[];e=t.pop();)if(yield e,r=e.children)for(i=0,a=r.length;i<a;++i)n.push(r[i]);while(n.length)}function E(e,t){e instanceof Map?(e=[void 0,e],t===void 0&&(t=k)):t===void 0&&(t=O);for(var n=new j(e),r,i=[n],a,o,s,c;r=i.pop();)if((o=t(r.data))&&(c=(o=Array.from(o)).length))for(r.children=o,s=c-1;s>=0;--s)i.push(a=o[s]=new j(o[s])),a.parent=r,a.depth=r.depth+1;return n.eachBefore(A)}function D(){return E(this).eachBefore(te)}function O(e){return e.children}function k(e){return Array.isArray(e)?e[1]:null}function te(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function A(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function j(e){this.data=e,this.depth=this.height=0,this.parent=null}j.prototype=E.prototype={constructor:j,count:p,each:m,eachAfter:g,eachBefore:h,find:_,sum:v,sort:y,path:b,ancestors:S,descendants:C,leaves:w,links:T,copy:D,[Symbol.iterator]:ee};function M(e,t){return e.parent===t.parent?1:2}function N(e){var t=e.children;return t?t[0]:e.t}function P(e){var t=e.children;return t?t[t.length-1]:e.t}function F(e,t,n){var r=n/(t.i-e.i);t.c-=r,t.s+=n,e.c+=r,t.z+=n,t.m+=n}function ne(e){for(var t=0,n=0,r=e.children,i=r.length,a;--i>=0;)a=r[i],a.z+=t,a.m+=t,t+=a.s+(n+=a.c)}function re(e,t,n){return e.a.parent===t.parent?e.a:n}function I(e,t){this._=e,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=t}I.prototype=Object.create(j.prototype);function ie(e){for(var t=new I(e,0),n,r=[t],i,a,o,s;n=r.pop();)if(a=n._.children)for(n.children=Array(s=a.length),o=s-1;o>=0;--o)r.push(i=n.children[o]=new I(a[o],o)),i.parent=n;return(t.parent=new I(null,0)).children=[t],t}function ae(){var e=M,t=1,n=1,r=null;function i(i){var s=ie(i);if(s.eachAfter(a),s.parent.m=-s.z,s.eachBefore(o),r)i.eachBefore(c);else{var l=i,u=i,d=i;i.eachBefore(function(e){e.x<l.x&&(l=e),e.x>u.x&&(u=e),e.depth>d.depth&&(d=e)});var f=l===u?1:e(l,u)/2,p=f-l.x,m=t/(u.x+f+p),h=n/(d.depth||1);i.eachBefore(function(e){e.x=(e.x+p)*m,e.y=e.depth*h})}return i}function a(t){var n=t.children,r=t.parent.children,i=t.i?r[t.i-1]:null;if(n){ne(t);var a=(n[0].z+n[n.length-1].z)/2;i?(t.z=i.z+e(t._,i._),t.m=t.z-a):t.z=a}else i&&(t.z=i.z+e(t._,i._));t.parent.A=s(t,i,t.parent.A||r[0])}function o(e){e._.x=e.z+e.parent.m,e.m+=e.parent.m}function s(t,n,r){if(n){for(var i=t,a=t,o=n,s=i.parent.children[0],c=i.m,l=a.m,u=o.m,d=s.m,f;o=P(o),i=N(i),o&&i;)s=N(s),a=P(a),a.a=t,f=o.z+u-i.z-c+e(o._,i._),f>0&&(F(re(o,t,r),t,f),c+=f,l+=f),u+=o.m,c+=i.m,d+=s.m,l+=a.m;o&&!P(a)&&(a.t=o,a.m+=u-l),i&&!N(s)&&(s.t=i,s.m+=c-d,r=t)}return r}function c(e){e.x*=t,e.y=e.depth*n}return i.separation=function(t){return arguments.length?(e=t,i):e},i.size=function(e){return arguments.length?(r=!1,t=+e[0],n=+e[1],i):r?null:[t,n]},i.nodeSize=function(e){return arguments.length?(r=!0,t=+e[0],n=+e[1],i):r?[t,n]:null},i}function L(e){return function(){return e}}var R=Math.PI,z=2*R,B=1e-6,V=z-B;function H(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function U(e){let t=Math.floor(e);if(!(t>=0))throw Error(`invalid digits: ${e}`);if(t>15)return H;let n=10**t;return function(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=Math.round(arguments[t]*n)/n+e[t]}}var W=class{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._=``,this._append=e==null?H:U(e)}moveTo(e,t){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,t){this._append`L${this._x1=+e},${this._y1=+t}`}quadraticCurveTo(e,t,n,r){this._append`Q${+e},${+t},${this._x1=+n},${this._y1=+r}`}bezierCurveTo(e,t,n,r,i,a){this._append`C${+e},${+t},${+n},${+r},${this._x1=+i},${this._y1=+a}`}arcTo(e,t,n,r,i){if(e=+e,t=+t,n=+n,r=+r,i=+i,i<0)throw Error(`negative radius: ${i}`);let a=this._x1,o=this._y1,s=n-e,c=r-t,l=a-e,u=o-t,d=l*l+u*u;if(this._x1===null)this._append`M${this._x1=e},${this._y1=t}`;else if(d>B)if(!(Math.abs(u*s-c*l)>B)||!i)this._append`L${this._x1=e},${this._y1=t}`;else{let f=n-a,p=r-o,m=s*s+c*c,h=f*f+p*p,g=Math.sqrt(m),_=Math.sqrt(d),v=i*Math.tan((R-Math.acos((m+d-h)/(2*g*_)))/2),y=v/_,b=v/g;Math.abs(y-1)>B&&this._append`L${e+y*l},${t+y*u}`,this._append`A${i},${i},0,0,${+(u*f>l*p)},${this._x1=e+b*s},${this._y1=t+b*c}`}}arc(e,t,n,r,i,a){if(e=+e,t=+t,n=+n,a=!!a,n<0)throw Error(`negative radius: ${n}`);let o=n*Math.cos(r),s=n*Math.sin(r),c=e+o,l=t+s,u=1^a,d=a?r-i:i-r;this._x1===null?this._append`M${c},${l}`:(Math.abs(this._x1-c)>B||Math.abs(this._y1-l)>B)&&this._append`L${c},${l}`,n&&(d<0&&(d=d%z+z),d>V?this._append`A${n},${n},0,1,${u},${e-o},${t-s}A${n},${n},0,1,${u},${this._x1=c},${this._y1=l}`:d>B&&this._append`A${n},${n},0,${+(d>=R)},${u},${this._x1=e+n*Math.cos(i)},${this._y1=t+n*Math.sin(i)}`)}rect(e,t,n,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}};function G(){return new W}G.prototype=W.prototype;function K(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{let e=Math.floor(n);if(!(e>=0))throw RangeError(`invalid digits: ${n}`);t=e}return e},()=>new W(t)}var q=Array.prototype.slice;function oe(e){return e[0]}function se(e){return e[1]}var J=class{constructor(e,t){this._context=e,this._x=t}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,t,e,t):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+t)/2,e,this._y0,e,t);break}this._x0=e,this._y0=t}};function ce(e){return new J(e,!0)}function le(e){return new J(e,!1)}function ue(e){return e.source}function de(e){return e.target}function Y(e){let t=ue,n=de,r=oe,i=se,a=null,o=null,s=K(c);function c(){let c,l=q.call(arguments),u=t.apply(this,l),d=n.apply(this,l);if(a??(o=e(c=s())),o.lineStart(),l[0]=u,o.point(+r.apply(this,l),+i.apply(this,l)),l[0]=d,o.point(+r.apply(this,l),+i.apply(this,l)),o.lineEnd(),c)return o=null,c+``||null}return c.source=function(e){return arguments.length?(t=e,c):t},c.target=function(e){return arguments.length?(n=e,c):n},c.x=function(e){return arguments.length?(r=typeof e==`function`?e:L(+e),c):r},c.y=function(e){return arguments.length?(i=typeof e==`function`?e:L(+e),c):i},c.context=function(t){return arguments.length?(t==null?a=o=null:o=e(a=t),c):a},c}function fe(){return Y(ce)}function pe(){return Y(le)}function me(t,{wheel:r=!0,minScale:i=.5,maxScale:a=2}={}){let o=n(1);function s(n,r,s){let c=e(t);if(!c)return;let{left:l,top:u,width:d,height:f}=c.getBoundingClientRect(),p=r??l+d/2,m=s??u+f/2,h=p-l,g=m-u,_=o.value;o.value=Math.max(i,Math.min(a,_+n));let v=o.value/_;c.scrollLeft=(c.scrollLeft+h)*v-h,c.scrollTop=(c.scrollTop+g)*v-g}function c(t){if(e(r)){t.preventDefault();let e=.2;s(t.deltaY<0?e:e*-1,t.clientX,t.clientY)}else t.ctrlKey&&(t.preventDefault(),s(t.deltaY*.004*-1,t.clientX,t.clientY))}function u(e=.2){s(e)}function d(e=.2){s(e*-1)}return l(t,`wheel`,c),{scale:o,zoom:s,zoomIn:u,zoomOut:d}}var X=Symbol.for(`ViteDevToolsModuleGraphState`);const Z=fe().x(e=>e[0]).y(e=>e[1]),Q=pe().x(e=>e[0]).y(e=>e[1]);function $(e,t){return t?e.target.x<=e.source.x?Q({source:[e.source.x+a(t.width)/2-a(t.linkOffset),e.source.y],target:[e.target.x-a(t.width)/2+a(t.linkOffset),e.target.y]}):Z({source:[e.source.x+a(t.width)/2-a(t.linkOffset),e.source.y],target:[e.target.x-a(t.width)/2+a(t.linkOffset),e.target.y]}):e.target.x<=e.source.x?Q({source:[e.source.x,e.source.y],target:[e.target.x,e.target.y]}):Z({source:[e.source.x,e.source.y],target:[e.target.x,e.target.y]})}function he(e){return`stroke-#8885`}function ge(e){let a=.4,c=n(),l=n(window.innerWidth),u=n(window.innerHeight),d=i(new Map),f=i(new Set),p=n(!0),m=i(new Map),h=r([]),g=r([]),_=i(new Map),v=i(new Map),y=s(()=>{let t=new Map;for(let n of e.modules.value)t.set(n.id,n);return t}),{control:b}=o(),{scale:x,zoomIn:S,zoomOut:C}=me(c,{wheel:b,minScale:a,maxScale:2});function w(e,t=!0){d.get(e)?.scrollIntoView({block:`center`,inline:`center`,behavior:t?`smooth`:`instant`})}let T=e.generateGraph({isFirstCalculateGraph:p,hierarchy:E,tree:ae,nodesRefMap:d,container:c,modulesMap:y,nodes:h,links:g,scale:x,nodesMap:_,linksMap:v,width:l,height:u,childToParentMap:m,focusOn:w,collapsedNodes:f,spacing:e.spacing});t(X,{spacing:e.spacing,calculateGraph:T,isFirstCalculateGraph:p,container:c,width:l,height:u,scale:x,nodes:h,links:g,nodesRefMap:d,collapsedNodes:f,childToParentMap:m,ZOOM_MIN:a,ZOOM_MAX:2,zoomIn:S,zoomOut:C})}function _e(){return u(X)}function ve(e){let{nodesRefMap:t,container:r,calculateGraph:i,collapsedNodes:o}=u(X),s=n(!1);function c(e,n){d(()=>{d(()=>{let i=t.get(e);if(i&&n&&r.value){let e=r.value.getBoundingClientRect(),t=i.getBoundingClientRect(),a=t.left-e.left-n.x,o=t.top-e.top-n.y;r.value.scrollLeft+=a,r.value.scrollTop+=o}})})}function l(e){if(s.value)return;s.value=!0;let n=t.get(e),a=null;if(n&&r.value){let e=r.value.getBoundingClientRect(),t=n.getBoundingClientRect();a={x:t.left-e.left,y:t.top-e.top}}o.has(e)?o.delete(e):o.add(e),i(),a&&c(e,a),s.value=!1}function f(){s.value||(s.value=!0,o.clear(),i(),setTimeout(()=>{s.value=!1},300))}function p(){s.value||(s.value=!0,a(e.modules).forEach(e=>{e.imports.length>0&&o.add(e.id)}),i(),setTimeout(()=>{s.value=!1},300))}return{isGraphNodeToggling:s,toggleNode:l,expandAll:f,collapseAll:p}}function ye(){let{scale:e,zoomIn:t,zoomOut:n,ZOOM_MIN:r,ZOOM_MAX:i}=u(X);return c([`-`,`_`],e=>{e.ctrlKey&&n()}),c([`=`,`+`],e=>{e.ctrlKey&&t()}),{ZOOM_MIN:r,ZOOM_MAX:i,scale:e,zoomIn:t,zoomOut:n}}function be(){let{container:e}=u(X),t=n(!1),r=0,i=0;function a(){l(e,`mousedown`,n=>{let a=e.value.getBoundingClientRect(),o=a.right-n.clientX,s=a.bottom-n.clientY;o<=20||s<=20||(t.value=!0,r=e.value.scrollLeft+n.pageX,i=e.value.scrollTop+n.pageY)}),l(e,`contextmenu`,e=>e.preventDefault()),l(`mouseleave`,()=>t.value=!1),l(`mouseup`,()=>t.value=!1),l(`mousemove`,n=>{t.value&&(n.preventDefault(),e.value.scrollLeft=r-n.pageX,e.value.scrollTop=i-n.pageY)})}return{init:a,isGrabbing:t}}export{ye as a,be as i,$ as n,_e as o,he as r,ve as s,ge as t};
|
|
1
|
+
import{$t as e,Dt as t,Jt as n,Xt as r,Yt as i,en as a,f as o,ot as s,s as c,u as l,vt as u,xt as d}from"./B661rCRY.js";function f(e){var t=0,n=e.children,r=n&&n.length;if(!r)t=1;else for(;--r>=0;)t+=n[r].value;e.value=t}function p(){return this.eachAfter(f)}function m(e,t){let n=-1;for(let r of this)e.call(t,r,++n,this);return this}function h(e,t){for(var n=this,r=[n],i,a,o=-1;n=r.pop();)if(e.call(t,n,++o,this),i=n.children)for(a=i.length-1;a>=0;--a)r.push(i[a]);return this}function g(e,t){for(var n=this,r=[n],i=[],a,o,s,c=-1;n=r.pop();)if(i.push(n),a=n.children)for(o=0,s=a.length;o<s;++o)r.push(a[o]);for(;n=i.pop();)e.call(t,n,++c,this);return this}function _(e,t){let n=-1;for(let r of this)if(e.call(t,r,++n,this))return r}function v(e){return this.eachAfter(function(t){for(var n=+e(t.data)||0,r=t.children,i=r&&r.length;--i>=0;)n+=r[i].value;t.value=n})}function y(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})}function b(e){for(var t=this,n=x(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var i=r.length;e!==n;)r.splice(i,0,e),e=e.parent;return r}function x(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),i=null;for(e=n.pop(),t=r.pop();e===t;)i=e,e=n.pop(),t=r.pop();return i}function S(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}function C(){return Array.from(this)}function w(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e}function T(){var e=this,t=[];return e.each(function(n){n!==e&&t.push({source:n.parent,target:n})}),t}function*ee(){var e=this,t,n=[e],r,i,a;do for(t=n.reverse(),n=[];e=t.pop();)if(yield e,r=e.children)for(i=0,a=r.length;i<a;++i)n.push(r[i]);while(n.length)}function E(e,t){e instanceof Map?(e=[void 0,e],t===void 0&&(t=k)):t===void 0&&(t=O);for(var n=new j(e),r,i=[n],a,o,s,c;r=i.pop();)if((o=t(r.data))&&(c=(o=Array.from(o)).length))for(r.children=o,s=c-1;s>=0;--s)i.push(a=o[s]=new j(o[s])),a.parent=r,a.depth=r.depth+1;return n.eachBefore(A)}function D(){return E(this).eachBefore(te)}function O(e){return e.children}function k(e){return Array.isArray(e)?e[1]:null}function te(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function A(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function j(e){this.data=e,this.depth=this.height=0,this.parent=null}j.prototype=E.prototype={constructor:j,count:p,each:m,eachAfter:g,eachBefore:h,find:_,sum:v,sort:y,path:b,ancestors:S,descendants:C,leaves:w,links:T,copy:D,[Symbol.iterator]:ee};function M(e,t){return e.parent===t.parent?1:2}function N(e){var t=e.children;return t?t[0]:e.t}function P(e){var t=e.children;return t?t[t.length-1]:e.t}function F(e,t,n){var r=n/(t.i-e.i);t.c-=r,t.s+=n,e.c+=r,t.z+=n,t.m+=n}function ne(e){for(var t=0,n=0,r=e.children,i=r.length,a;--i>=0;)a=r[i],a.z+=t,a.m+=t,t+=a.s+(n+=a.c)}function re(e,t,n){return e.a.parent===t.parent?e.a:n}function I(e,t){this._=e,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=t}I.prototype=Object.create(j.prototype);function ie(e){for(var t=new I(e,0),n,r=[t],i,a,o,s;n=r.pop();)if(a=n._.children)for(n.children=Array(s=a.length),o=s-1;o>=0;--o)r.push(i=n.children[o]=new I(a[o],o)),i.parent=n;return(t.parent=new I(null,0)).children=[t],t}function ae(){var e=M,t=1,n=1,r=null;function i(i){var s=ie(i);if(s.eachAfter(a),s.parent.m=-s.z,s.eachBefore(o),r)i.eachBefore(c);else{var l=i,u=i,d=i;i.eachBefore(function(e){e.x<l.x&&(l=e),e.x>u.x&&(u=e),e.depth>d.depth&&(d=e)});var f=l===u?1:e(l,u)/2,p=f-l.x,m=t/(u.x+f+p),h=n/(d.depth||1);i.eachBefore(function(e){e.x=(e.x+p)*m,e.y=e.depth*h})}return i}function a(t){var n=t.children,r=t.parent.children,i=t.i?r[t.i-1]:null;if(n){ne(t);var a=(n[0].z+n[n.length-1].z)/2;i?(t.z=i.z+e(t._,i._),t.m=t.z-a):t.z=a}else i&&(t.z=i.z+e(t._,i._));t.parent.A=s(t,i,t.parent.A||r[0])}function o(e){e._.x=e.z+e.parent.m,e.m+=e.parent.m}function s(t,n,r){if(n){for(var i=t,a=t,o=n,s=i.parent.children[0],c=i.m,l=a.m,u=o.m,d=s.m,f;o=P(o),i=N(i),o&&i;)s=N(s),a=P(a),a.a=t,f=o.z+u-i.z-c+e(o._,i._),f>0&&(F(re(o,t,r),t,f),c+=f,l+=f),u+=o.m,c+=i.m,d+=s.m,l+=a.m;o&&!P(a)&&(a.t=o,a.m+=u-l),i&&!N(s)&&(s.t=i,s.m+=c-d,r=t)}return r}function c(e){e.x*=t,e.y=e.depth*n}return i.separation=function(t){return arguments.length?(e=t,i):e},i.size=function(e){return arguments.length?(r=!1,t=+e[0],n=+e[1],i):r?null:[t,n]},i.nodeSize=function(e){return arguments.length?(r=!0,t=+e[0],n=+e[1],i):r?[t,n]:null},i}function L(e){return function(){return e}}var R=Math.PI,z=2*R,B=1e-6,V=z-B;function H(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function U(e){let t=Math.floor(e);if(!(t>=0))throw Error(`invalid digits: ${e}`);if(t>15)return H;let n=10**t;return function(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=Math.round(arguments[t]*n)/n+e[t]}}var W=class{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._=``,this._append=e==null?H:U(e)}moveTo(e,t){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,t){this._append`L${this._x1=+e},${this._y1=+t}`}quadraticCurveTo(e,t,n,r){this._append`Q${+e},${+t},${this._x1=+n},${this._y1=+r}`}bezierCurveTo(e,t,n,r,i,a){this._append`C${+e},${+t},${+n},${+r},${this._x1=+i},${this._y1=+a}`}arcTo(e,t,n,r,i){if(e=+e,t=+t,n=+n,r=+r,i=+i,i<0)throw Error(`negative radius: ${i}`);let a=this._x1,o=this._y1,s=n-e,c=r-t,l=a-e,u=o-t,d=l*l+u*u;if(this._x1===null)this._append`M${this._x1=e},${this._y1=t}`;else if(d>B)if(!(Math.abs(u*s-c*l)>B)||!i)this._append`L${this._x1=e},${this._y1=t}`;else{let f=n-a,p=r-o,m=s*s+c*c,h=f*f+p*p,g=Math.sqrt(m),_=Math.sqrt(d),v=i*Math.tan((R-Math.acos((m+d-h)/(2*g*_)))/2),y=v/_,b=v/g;Math.abs(y-1)>B&&this._append`L${e+y*l},${t+y*u}`,this._append`A${i},${i},0,0,${+(u*f>l*p)},${this._x1=e+b*s},${this._y1=t+b*c}`}}arc(e,t,n,r,i,a){if(e=+e,t=+t,n=+n,a=!!a,n<0)throw Error(`negative radius: ${n}`);let o=n*Math.cos(r),s=n*Math.sin(r),c=e+o,l=t+s,u=1^a,d=a?r-i:i-r;this._x1===null?this._append`M${c},${l}`:(Math.abs(this._x1-c)>B||Math.abs(this._y1-l)>B)&&this._append`L${c},${l}`,n&&(d<0&&(d=d%z+z),d>V?this._append`A${n},${n},0,1,${u},${e-o},${t-s}A${n},${n},0,1,${u},${this._x1=c},${this._y1=l}`:d>B&&this._append`A${n},${n},0,${+(d>=R)},${u},${this._x1=e+n*Math.cos(i)},${this._y1=t+n*Math.sin(i)}`)}rect(e,t,n,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}};function G(){return new W}G.prototype=W.prototype;function K(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{let e=Math.floor(n);if(!(e>=0))throw RangeError(`invalid digits: ${n}`);t=e}return e},()=>new W(t)}var q=Array.prototype.slice;function oe(e){return e[0]}function se(e){return e[1]}var J=class{constructor(e,t){this._context=e,this._x=t}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,t,e,t):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+t)/2,e,this._y0,e,t);break}this._x0=e,this._y0=t}};function ce(e){return new J(e,!0)}function le(e){return new J(e,!1)}function ue(e){return e.source}function de(e){return e.target}function Y(e){let t=ue,n=de,r=oe,i=se,a=null,o=null,s=K(c);function c(){let c,l=q.call(arguments),u=t.apply(this,l),d=n.apply(this,l);if(a??(o=e(c=s())),o.lineStart(),l[0]=u,o.point(+r.apply(this,l),+i.apply(this,l)),l[0]=d,o.point(+r.apply(this,l),+i.apply(this,l)),o.lineEnd(),c)return o=null,c+``||null}return c.source=function(e){return arguments.length?(t=e,c):t},c.target=function(e){return arguments.length?(n=e,c):n},c.x=function(e){return arguments.length?(r=typeof e==`function`?e:L(+e),c):r},c.y=function(e){return arguments.length?(i=typeof e==`function`?e:L(+e),c):i},c.context=function(t){return arguments.length?(t==null?a=o=null:o=e(a=t),c):a},c}function fe(){return Y(ce)}function pe(){return Y(le)}function me(t,{wheel:r=!0,minScale:i=.5,maxScale:a=2}={}){let o=n(1);function s(n,r,s){let c=e(t);if(!c)return;let{left:l,top:u,width:d,height:f}=c.getBoundingClientRect(),p=r??l+d/2,m=s??u+f/2,h=p-l,g=m-u,_=o.value;o.value=Math.max(i,Math.min(a,_+n));let v=o.value/_;c.scrollLeft=(c.scrollLeft+h)*v-h,c.scrollTop=(c.scrollTop+g)*v-g}function c(t){if(e(r)){t.preventDefault();let e=.2;s(t.deltaY<0?e:e*-1,t.clientX,t.clientY)}else t.ctrlKey&&(t.preventDefault(),s(t.deltaY*.004*-1,t.clientX,t.clientY))}function u(e=.2){s(e)}function d(e=.2){s(e*-1)}return l(t,`wheel`,c),{scale:o,zoom:s,zoomIn:u,zoomOut:d}}var X=Symbol.for(`ViteDevToolsModuleGraphState`);const Z=fe().x(e=>e[0]).y(e=>e[1]),Q=pe().x(e=>e[0]).y(e=>e[1]);function $(e,t){return t?e.target.x<=e.source.x?Q({source:[e.source.x+a(t.width)/2-a(t.linkOffset),e.source.y],target:[e.target.x-a(t.width)/2+a(t.linkOffset),e.target.y]}):Z({source:[e.source.x+a(t.width)/2-a(t.linkOffset),e.source.y],target:[e.target.x-a(t.width)/2+a(t.linkOffset),e.target.y]}):e.target.x<=e.source.x?Q({source:[e.source.x,e.source.y],target:[e.target.x,e.target.y]}):Z({source:[e.source.x,e.source.y],target:[e.target.x,e.target.y]})}function he(e){return`stroke-#8885`}function ge(e){let a=.4,c=n(),l=n(window.innerWidth),u=n(window.innerHeight),d=i(new Map),f=i(new Set),p=n(!0),m=i(new Map),h=r([]),g=r([]),_=i(new Map),v=i(new Map),y=s(()=>{let t=new Map;for(let n of e.modules.value)t.set(n.id,n);return t}),{control:b}=o(),{scale:x,zoomIn:S,zoomOut:C}=me(c,{wheel:b,minScale:a,maxScale:2});function w(e,t=!0){d.get(e)?.scrollIntoView({block:`center`,inline:`center`,behavior:t?`smooth`:`instant`})}let T=e.generateGraph({isFirstCalculateGraph:p,hierarchy:E,tree:ae,nodesRefMap:d,container:c,modulesMap:y,nodes:h,links:g,scale:x,nodesMap:_,linksMap:v,width:l,height:u,childToParentMap:m,focusOn:w,collapsedNodes:f,spacing:e.spacing});t(X,{spacing:e.spacing,calculateGraph:T,isFirstCalculateGraph:p,container:c,width:l,height:u,scale:x,nodes:h,links:g,nodesRefMap:d,collapsedNodes:f,childToParentMap:m,ZOOM_MIN:a,ZOOM_MAX:2,zoomIn:S,zoomOut:C})}function _e(){return u(X)}function ve(e){let{nodesRefMap:t,container:r,calculateGraph:i,collapsedNodes:o}=u(X),s=n(!1);function c(e,n){d(()=>{d(()=>{let i=t.get(e);if(i&&n&&r.value){let e=r.value.getBoundingClientRect(),t=i.getBoundingClientRect(),a=t.left-e.left-n.x,o=t.top-e.top-n.y;r.value.scrollLeft+=a,r.value.scrollTop+=o}})})}function l(e){if(s.value)return;s.value=!0;let n=t.get(e),a=null;if(n&&r.value){let e=r.value.getBoundingClientRect(),t=n.getBoundingClientRect();a={x:t.left-e.left,y:t.top-e.top}}o.has(e)?o.delete(e):o.add(e),i(),a&&c(e,a),s.value=!1}function f(){s.value||(s.value=!0,o.clear(),i(),setTimeout(()=>{s.value=!1},300))}function p(){s.value||(s.value=!0,a(e.modules).forEach(e=>{e.imports.length>0&&o.add(e.id)}),i(),setTimeout(()=>{s.value=!1},300))}return{isGraphNodeToggling:s,toggleNode:l,expandAll:f,collapseAll:p}}function ye(){let{scale:e,zoomIn:t,zoomOut:n,ZOOM_MIN:r,ZOOM_MAX:i}=u(X);return c([`-`,`_`],e=>{e.ctrlKey&&n()}),c([`=`,`+`],e=>{e.ctrlKey&&t()}),{ZOOM_MIN:r,ZOOM_MAX:i,scale:e,zoomIn:t,zoomOut:n}}function be(){let{container:e}=u(X),t=n(!1),r=0,i=0;function a(){l(e,`mousedown`,n=>{let a=e.value.getBoundingClientRect(),o=a.right-n.clientX,s=a.bottom-n.clientY;o<=20||s<=20||(t.value=!0,r=e.value.scrollLeft+n.pageX,i=e.value.scrollTop+n.pageY)}),l(e,`contextmenu`,e=>e.preventDefault()),l(`mouseleave`,()=>t.value=!1),l(`mouseup`,()=>t.value=!1),l(`mousemove`,n=>{t.value&&(n.preventDefault(),e.value.scrollLeft=r-n.pageX,e.value.scrollTop=i-n.pageY)})}return{init:a,isGrabbing:t}}export{ye as a,be as i,$ as n,_e as o,he as r,ve as s,ge as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{At as e,Tt as t,d as n,ft as r,in as i,lt as a,mt as o,ot as s,st as c,tn as l,ut as u}from"./
|
|
1
|
+
import{At as e,Tt as t,d as n,ft as r,in as i,lt as a,mt as o,ot as s,st as c,tn as l,ut as u}from"./B661rCRY.js";import{t as d}from"./DQtLZa7C.js";var f={"text-xs":``,op75:``,"ml-0.4":``},p={key:0,"text-xs":``,ml1:``,"op-fade":``,border:`l base`,pl1:``},m=1024,h=o({__name:`FileSizeBadge`,props:{bytes:{},colorize:{type:Boolean,default:!0},digits:{default:2},percent:{type:Boolean,default:!0},total:{},icon:{},percentRatio:{default:.5}},setup(n){let o=n,h=m**2,g=[[80*m,`color-scale-neutral`],[500*m,`color-scale-low`],[1*h,`color-scale-medium`],[10*h,`color-scale-high`],[20*h,`color-scale-critical`]],_=s(()=>{if(!o.colorize)return g[0];let e=o.bytes||0;for(let[t,n]of g)if(e<t)return n;return g[g.length-1]?.[1]}),v=s(()=>o.total?(o.bytes||0)*100/o.total:0),y=s(()=>d(o.bytes||0,o.digits));return(o,s)=>n.bytes?(t(),u(`div`,{key:0,class:l([_.value,`px-0.4em py-0.2em font-mono line-height-none bg-gray:5 dark:bg-gray:4 flex items-center`])},[n.icon?(t(),u(`div`,{key:0,class:l([n.icon,`mr-1`])},null,2)):a(``,!0),r(` `+i(y.value[0]),1),c(`span`,f,i(y.value[1]),1),e(o.$slots,`after`,{},()=>[n.percent&&v.value>n.percentRatio?(t(),u(`span`,p,i(+v.value.toFixed(1))+`%`,1)):a(``,!0)])],2)):a(``,!0)}}),g=Object.assign(h,{__name:`DisplayFileSizeBadge`});const _=n(`vite-devtools-settings`,{codeviewerLineWrap:!1,codeviewerDiffPanelSize:50,flowExpandResolveId:!0,flowExpandTransforms:!0,flowExpandLoads:!0,flowExpandChunks:!0,flowExpandAssets:!0,flowShowAllTransforms:!1,flowShowAllLoads:!1,moduleGraphViewType:`list`,assetViewType:`list`,chartAnimation:!0,moduleDetailsViewType:`flow`,pluginDetailsViewType:`flow`,pluginDetailsTableFields:null,pluginDetailsModuleTypes:null,pluginDetailsDurationSortType:``,pluginDetailSelectedHook:``,chunkViewType:`list`,pluginDetailsShowType:`all`,packageViewType:`table`,packageSizeSortType:``},{mergeDefaults:!0});function v(e){let t=new Map;return new Proxy(e.value,{get(e,n){return t.has(n)||t.set(n,s({get(){return e[n]},set(t){e[n]=t}})),t.get(n)}})}const y=v(_);export{y as n,g as r,_ as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{G as e,Jt as t,Tt as n,Vt as r,W as i,_ as a,ct as o,en as s,ft as c,g as l,in as u,it as d,kt as f,lt as p,mt as m,ot as h,pt as g,st as _,tn as v,ut as y,xt as b}from"./
|
|
1
|
+
import{G as e,Jt as t,Tt as n,Vt as r,W as i,_ as a,ct as o,en as s,ft as c,g as l,in as u,it as d,kt as f,lt as p,mt as m,ot as h,pt as g,st as _,tn as v,ut as y,xt as b}from"./B661rCRY.js";import"./Dd9_UU0g.js";import{i as x}from"./DQtLZa7C.js";import{a as S,s as C}from"./DQDcWwzr.js";import"./RlFrOrwQ.js";import{t as w}from"./f1KvgLIQ.js";import"./DnpfwSMy.js";import{t as T}from"./Ivdx0lA9.js";import"./7pdU4mzw.js";import{t as E}from"./vlGwL1DD.js";import{t as D}from"./BO4TB9gH.js";import{t as O}from"./sTN5Ot43.js";import{t as k}from"./BiQ0ZhR_.js";import{t as A}from"./BVY1sWiJ.js";import{t as j}from"./CoLW5wV8.js";import{t as M}from"./DAv0Rzal.js";import{t as ee}from"./CEQkJ3Wx.js";import{t as N}from"./C_cs-58z.js";import{n as P,t as F}from"./DJHNY-5T.js";var I={flex:`~ col gap-2`,p4:``},L={flex:``,pb2:``},R=m({__name:`FlatList`,props:{session:{},modules:{}},setup(e){return(t,i)=>{let a=w,o=j;return n(),y(`div`,I,[g(o,{items:e.modules,"key-prop":`id`},{default:r(({item:t})=>[_(`div`,L,[g(a,{id:t.id,session:e.session,hover:`bg-active`,block:``,px2:``,p1:``,"w-full":``,border:`~ base rounded`,link:!0},null,8,[`id`,`session`])])]),_:1},8,[`items`])])}}}),z=Object.assign(R,{__name:`ModulesFlatList`}),B={flex:`~ col gap-2`,p4:``},V={flex:``,pb2:``},H={flex:`~ gap-1 wrap`,"text-xs":``},U={flex:`~ auto text-xs wrap`},W={key:0,flex:`~ items-center`},G={key:0,op20:``},K={flex:`~ none gap-1 wrap justify-end`},q=m({__name:`DetailedList`,props:{session:{},modules:{}},setup(e){let t=e,i=h(()=>{let e=new Map;for(let n of t.modules){let t=n.buildMetrics?.transforms.filter(e=>e.source_code_size!==e.transformed_code_size).filter(e=>e.transformed_code_size);e.set(n.id,t)}return e});return(t,a)=>{let s=k,c=D,l=w,u=j;return n(),y(`div`,B,[g(u,{items:e.modules,"key-prop":`id`},{default:r(({item:t})=>[_(`div`,V,[g(l,{id:t.id,session:e.session,hover:`bg-active`,block:``,px2:``,p1:``,"w-full":``,border:`~ base rounded`,link:!0},{detail:r(()=>[_(`div`,H,[_(`ul`,U,[(n(!0),y(d,null,f(i.value.get(t.id),(e,r)=>(n(),y(d,{key:r},[e.source_code_size!==e.transformed_code_size&&e.transformed_code_size?(n(),y(`li`,W,[g(s,{name:e.plugin_name,class:`font-mono ws-nowrap op-50`},null,8,[`name`]),r===i.value.get(t.id).length-1?p(``,!0):(n(),y(`span`,G,`|`))])):p(``,!0)],64))),128))]),a[0]||=_(`div`,{flex:`~ auto gap-1`,"of-hidden":``},null,-1),_(`div`,K,[_(`span`,null,[t.buildMetrics?(n(),o(c,{key:0,metrics:t.buildMetrics},null,8,[`metrics`])):p(``,!0)])])])]),_:2},1032,[`id`,`session`])])]),_:1},8,[`items`])])}}}),J=Object.assign(q,{__name:`ModulesDetailedList`}),Y=[`d`,`stroke-dasharray`],X=m({__name:`Graph`,props:{modules:{},session:{}},setup(e){let t=e,i=h(()=>t.modules);return O({modules:i,spacing:{width:400,height:55,linkOffset:20,margin:800,gap:150},generateGraph:e=>{let{isFirstCalculateGraph:t,scale:n,spacing:r,tree:a,hierarchy:o,collapsedNodes:c,container:l,modulesMap:u,nodes:d,links:f,nodesMap:p,linksMap:m,width:g,height:_,childToParentMap:v,focusOn:y}=e,x=h(()=>i.value.filter(e=>e.importers.length===0));return(e=!0)=>{g.value=window.innerWidth,_.value=window.innerHeight;let i=new Set,h=o({module:{id:`~root`}},e=>e.module.id===`~root`?(x.value.forEach(e=>{i.add(e),t.value&&v.set(e.id,`~root`)}),x.value.map(e=>({module:e,expanded:!c.has(e.id),hasChildren:!1}))):c.has(e.module.id)?[]:e.module.imports.map(n=>{let r=u.value.get(n.module_id);if(r&&!i.has(r)&&!(v.has(r.id)&&v.get(r.id)!==e.module.id))return i.add(r),t.value&&v.set(r.id,e.module.id),{module:r,import:n,expanded:!c.has(r.id),hasChildren:!1}}).filter(e=>e!==void 0));t.value&&=!1,a().nodeSize([s(r.height),s(r.width)+s(r.gap)])(h);let S=h.descendants();for(let e of S)[e.x,e.y]=[e.y-s(r.width),e.x],e.data.module.imports&&(e.data.hasChildren=e.data.module.imports?.filter(t=>v.get(t.module_id)===e.data.module.id).length>0);let C=Math.min(...S.map(e=>e.x)),w=Math.min(...S.map(e=>e.y));if(C<s(r.margin))for(let e of S)e.x+=Math.abs(C)+s(r.margin);if(w<s(r.margin))for(let e of S)e.y+=Math.abs(w)+s(r.margin);d.value=S,p.clear();for(let e of S)p.set(e.data.module.id,e);let T=h.links().filter(e=>e.source.data.module.id!==`~root`).map(e=>({...e,import:e.source.data.import,id:`${e.source.data.module.id}|${e.target.data.module.id}`}));m.clear();for(let e of T)m.set(e.id,e);f.value=T,b(()=>{g.value=l.value.scrollWidth/n.value+s(r.margin),_.value=l.value.scrollHeight/n.value+s(r.margin);let t=x.value?.[0]?.id;e&&t&&b(()=>{y(t,!1)})})}}}),(t,a)=>{let s=w,c=N;return n(),o(c,{session:e.session,modules:i.value},{default:r(({node:t,nodesRefMap:n})=>[g(s,{id:t.data.module.id,ref:e=>n.set(t.data.module.id,e?.$el),link:!0,session:e.session,minimal:!0,flex:`1`},null,8,[`id`,`session`])]),link:r(({link:e,d:t,linkClass:n})=>[_(`path`,{d:t,class:v(n),"stroke-dasharray":e.import?.kind===`dynamic-import`?`3 6`:void 0,fill:`none`},null,10,Y)]),_:1},8,[`session`,`modules`])}}}),Z=Object.assign(X,{__name:`ModulesGraph`}),Q={"of-auto":``,"max-h-screen":``,"pt-45":``,relative:``},te={flex:`~ col gap-2`,p4:``},ne=m({__name:`Folder`,props:{session:{},modules:{}},setup(e){let t=e,r=h(()=>{if(!t.session.modulesList.length)return{workspace:{children:{},items:[]},nodeModules:{children:{},items:[]},virtual:{children:{},items:[]}};let e=[],n=[],r=[];return t.modules.map(e=>({full:e.id,path:e.path})).forEach(i=>{i.full.startsWith(t.session.meta.cwd)?(i.path.startsWith(`../`)||(i.path=i.full.slice(t.session.meta.cwd.length+1)),e.push(i)):i.full.includes(`node_modules`)?n.push({full:i.full,path:i.full}):i.full.startsWith(`virtual:`)&&r.push(i)}),{workspace:x(e,`Project Root`),nodeModules:x(n,`Node Modules`),virtual:x(r,`Virtual Modules`)}});return(e,t)=>{let i=M;return n(),y(`div`,Q,[_(`div`,te,[Object.keys(r.value.workspace.children).length?(n(),o(i,{key:0,node:r.value.workspace,p:`l3`,icon:`i-catppuccin:folder-dist icon-catppuccin`,"icon-open":`i-catppuccin:folder-dist-open icon-catppuccin`,link:!0},null,8,[`node`])):p(``,!0),Object.keys(r.value.nodeModules.children).length?(n(),y(d,{key:1},[t[0]||=_(`div`,{"w-full":``,"h-1px":``,border:`t base`},null,-1),g(i,{node:r.value.nodeModules,p:`l3`,icon:`i-catppuccin:folder-node icon-catppuccin`,"icon-open":`i-catppuccin:folder-node-open icon-catppuccin`,link:!0,open:!1},null,8,[`node`])],64)):p(``,!0),Object.keys(r.value.virtual.children).length?(n(),y(d,{key:2},[t[1]||=_(`div`,{"w-full":``,"h-1px":``,border:`t base`},null,-1),g(i,{node:r.value.virtual,p:`l3`,icon:`i-catppuccin:folder-components icon-catppuccin`,"icon-open":`i-catppuccin:folder-components-open icon-catppuccin`,link:!0,open:!1},null,8,[`node`])],64)):p(``,!0)])])}}}),re=Object.assign(ne,{__name:`ModulesFolder`}),ie={relative:``,"max-h-screen":``,"of-hidden":``},ae={absolute:``,"left-4":``,"top-4":``,"z-panel-nav":``},oe={flex:`~ gap-2 items-center`,p2:``,border:`t base`},$=[`onClick`],se={key:0,"of-auto":``,"h-screen":``,"pt-45":``},ce={absolute:``,"bottom-4":``,"py-1":``,"px-2":``,"bg-glass":``,left:`1/2`,"translate-x":`-1/2`,border:`~ base rounded-full`,text:`center xs`},le={op50:``},ue={key:1,"of-auto":``,"h-screen":``,"pt-45":``},de={absolute:``,"bottom-4":``,"py-1":``,"px-2":``,"bg-glass":``,left:`1/2`,"translate-x":`-1/2`,border:`~ base rounded-full`,text:`center xs`},fe={op50:``},pe=m({__name:`index`,props:{session:{}},setup(p){let m=p,b=i(),x=e(),w=t({search:b.query.search||``,selected:b.query.file_types?P(b.query.file_types):null,node_modules:b.query.node_modules?P(b.query.node_modules):null}),D=[{label:`List`,value:`list`,icon:`i-ph-list-bullets-duotone`},{label:`Detailed List`,value:`detailed-list`,icon:`i-ph-list-magnifying-glass-duotone`},{label:`Graph`,value:`graph`,icon:`i-ph-graph-duotone`},{label:`Folder`,value:`folder`,icon:`i-ph-folder-duotone`}];a(w.value,e=>{let t={...b.query,search:e.search||void 0,file_types:e.selected||void 0,node_modules:e.node_modules||void 0};x.replace({query:F(t)})},{debounce:500});let O=h(()=>m.session.modulesList.map(e=>({mod:e,path:T(e.id,m.session.meta.cwd),type:C(e.id)}))),k=h(()=>S.filter(e=>O.value.some(t=>e.match.test(t.mod.id)))),j=h(()=>{let e=O.value;return w.value.selected&&(e=e.filter(e=>{let t=C(e.mod.id);return w.value.selected.includes(t.name)})),w.value.node_modules&&(e=e.filter(e=>e.path.moduleName&&w.value.node_modules.includes(e.path.moduleName))),e.map(e=>({...e.mod,path:e.path.path}))}),M=l(()=>j.value,()=>new ee(j.value,{includeScore:!0,keys:[`id`],ignoreLocation:!0,threshold:.4})),N=h(()=>w.value.search?M.value.search(w.value.search).map(e=>e.item):j.value);function I(e){b.query.module&&x.replace({query:{...b.query,module:void 0}}),E.value.moduleGraphViewType=e}return(e,t)=>{let i=A,a=z,l=J,m=Z,h=re;return n(),y(`div`,ie,[_(`div`,ae,[g(i,{modelValue:w.value,"onUpdate:modelValue":t[0]||=e=>w.value=e,rules:k.value},{default:r(()=>[_(`div`,oe,[t[1]||=_(`span`,{op50:``,pl2:``,"text-sm":``},`View as`,-1),(n(),y(d,null,f(D,e=>_(`button`,{key:e.value,"btn-action":``,class:v(s(E).moduleGraphViewType===e.value?`bg-active`:`grayscale op50`),onClick:t=>I(e.value)},[_(`div`,{class:v(e.icon)},null,2),c(` `+u(e.label),1)],10,$)),64))])]),_:1},8,[`modelValue`,`rules`])]),s(E).moduleGraphViewType===`list`?(n(),y(`div`,se,[g(a,{session:p.session,modules:N.value},null,8,[`session`,`modules`]),_(`div`,ce,[_(`span`,le,u(N.value.length)+` of `+u(p.session.modulesList.length),1)])])):s(E).moduleGraphViewType===`detailed-list`?(n(),y(`div`,ue,[g(l,{session:p.session,modules:N.value},null,8,[`session`,`modules`]),_(`div`,de,[_(`span`,fe,u(N.value.length)+` of `+u(p.session.modulesList.length),1)])])):s(E).moduleGraphViewType===`graph`?(n(),o(m,{key:2,session:p.session,modules:N.value},null,8,[`session`,`modules`])):(n(),o(h,{key:3,session:p.session,modules:N.value},null,8,[`session`,`modules`]))])}}});export{pe as default};
|
package/dist/public/index.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html lang="en" class="bg-dots"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Vite DevTools</title><link rel="stylesheet" href="/.devtools-vite/_nuxt/entry.
|
|
1
|
+
<!DOCTYPE html><html lang="en" class="bg-dots"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Vite DevTools</title><link rel="stylesheet" href="/.devtools-vite/_nuxt/entry.C1YP59mZ.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/.devtools-vite/_nuxt/B661rCRY.js"><meta name="description" content="DevTools for Vite"><meta property="og:title" content="Vite DevTools"><meta property="og:description" content="DevTools for Vite"><link rel="icon" type="image/svg+xml" href="/favicon.svg"><script type="module" src="/.devtools-vite/_nuxt/B661rCRY.js" crossorigin></script><script id="unhead:payload" type="application/json">{"title":"Vite DevTools"}</script></head><body><div id="__nuxt"></div><div id="teleports"></div><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1762837782434,false]</script><script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/.devtools-vite/",buildId:"f71a649b-f47c-44eb-9005-86c44268b9bf",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script></body></html>
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vitejs/devtools-vite",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.0-alpha.
|
|
4
|
+
"version": "0.0.0-alpha.17",
|
|
5
5
|
"description": "DevTools for Vite (work in progress)",
|
|
6
6
|
"author": "VoidZero Inc.",
|
|
7
7
|
"license": "MIT",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"@pnpm/read-project-manifest": "^1001.1.4",
|
|
34
34
|
"@rolldown/debug": "^1.0.0-beta.47",
|
|
35
35
|
"ansis": "^4.2.0",
|
|
36
|
-
"birpc": "^2.
|
|
36
|
+
"birpc": "^2.8.0",
|
|
37
37
|
"cac": "^6.7.14",
|
|
38
38
|
"d3-shape": "^3.2.0",
|
|
39
39
|
"diff": "^8.0.2",
|
|
@@ -53,8 +53,8 @@
|
|
|
53
53
|
"unstorage": "^1.17.2",
|
|
54
54
|
"vue-virtual-scroller": "^2.0.0-beta.8",
|
|
55
55
|
"ws": "^8.18.3",
|
|
56
|
-
"@vitejs/devtools-kit": "0.0.0-alpha.
|
|
57
|
-
"@vitejs/devtools-rpc": "0.0.0-alpha.
|
|
56
|
+
"@vitejs/devtools-kit": "0.0.0-alpha.17",
|
|
57
|
+
"@vitejs/devtools-rpc": "0.0.0-alpha.17"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
60
|
"@types/codemirror": "^5.60.17",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Ct as e,Jt as t,Tt as n,Vt as r,W as i,bt as a,ct as o,ft as s,in as c,it as l,kt as u,mt as d,ot as f,pt as p,st as m,tn as h,ut as g,x as _,y as v}from"./C-xw4DlO.js";import{t as y}from"./jo347JsK.js";import{t as b}from"./BjxvvmqH.js";import{t as x}from"./DQtLZa7C.js";var S=d({__name:`ComparisonMetric`,props:{current:{},previous:{}},setup(e){let t=e,r=f(()=>t.previous===t.current),i=f(()=>Math.abs((t.current-t.previous)/t.previous*100).toFixed(r.value?0:2)),a=f(()=>r.value?``:t.current>t.previous?`+`:`-`),o=f(()=>r.value?`text-gray-500`:t.current>t.previous?`text-green-500`:`text-red-500`);return(e,t)=>(n(),g(`span`,{"text-4":``,"mt-1":``,"font-mono":``,class:h(o.value)},c(a.value)+c(i.value)+`% `,3))}}),C=Object.assign(S,{__name:`DisplayComparisonMetric`}),w=[`title`],T={flex:`~ gap-2`,"items-center":``},E={key:0},D={"font-semibold":``,"text-5":``,"font-mono":``},O={"font-semibold":``,"text-4":``,"font-mono":``},k={key:1},A={"font-semibold":``,"text-5":``,"font-mono":``},j=d({__name:`MetricCard`,props:{name:{},description:{},icon:{},current:{},previous:{},format:{}},setup(e){let t=e,r=f(()=>t.format===`bytes`?x(t.current):t.current);return(t,i)=>{let a=C;return n(),g(l,null,[m(`div`,{"font-500":``,op50:``,"text-4":``,flex:`~ items-center gap-2`,title:e.description},[m(`div`,{class:h([e.icon,`text-xl`])},null,2),s(` `+c(e.name),1)],8,w),m(`div`,T,[e.format===`bytes`?(n(),g(`div`,E,[m(`span`,D,c(r.value[0]),1),m(`span`,O,c(r.value[1]),1)])):(n(),g(`div`,k,[m(`span`,A,c(r.value),1)])),p(a,{current:e.current,previous:e.previous},null,8,[`current`,`previous`])])],64)}}}),M=Object.assign(j,{__name:`CompareMetricCard`}),N={key:1,"h-screen":``,"w-screen":``,"max-w-screen":``,"max-h-screen":``,"of-hidden":``,p6:``,flex:`~ col gap-2`},P={flex:`~ gap-2`},F={flex:`~ col`,border:`~ base rounded-lg`,p3:``,mt10:``},I={grid:`~ cols-4 gap5`,"w-full":``,pt3:``},L=d({__name:`index`,setup(c){let d=t(!1),x=i().params,S=v(),C=t([]);e(async()=>{d.value=!0,C.value=await S.value[`vite:rolldown:get-session-compare-summary`]({sessions:x.sessions.split(`,`)}),d.value=!1});let w=f(()=>C.value.map((e,t)=>({...e,createdAt:new Date(e.meta?.timestamp??0),title:t===0?`Session A`:`Session B`}))),T=f(()=>{let[e,t]=w.value;return[{name:`Bundle Size`,description:`Total file size of the assets`,icon:`i-ph-package-duotone`,current:t?.bundle_size??0,previous:e?.bundle_size??0,format:`bytes`},{name:`Initial JS`,description:`Total file size of the initial JS chunks`,icon:`i-ph-file-js-duotone`,current:t?.initial_js??0,previous:e?.initial_js??0,format:`bytes`},{name:`Modules`,description:`Total number of modules`,icon:`i-ph-graph-duotone`,current:t?.modules??0,previous:e?.modules??0},{name:`Plugins`,description:`Total number of plugins`,icon:`i-ph-plugs-duotone`,current:t?.meta?.plugins.length??0,previous:e?.meta?.plugins.length??0},{name:`Chunks`,description:`Total number of chunks`,icon:`i-ph-shapes-duotone`,current:t?.chunks??0,previous:e?.chunks??0},{name:`Assets`,description:`Total number of assets`,icon:`i-ph-package-duotone`,current:t?.assets??0,previous:e?.assets??0}]});return(e,t)=>{let i=_,c=y,f=b,v=M;return d.value?(n(),o(i,{key:0})):(n(),g(`div`,N,[m(`div`,P,[p(c,{"btn-action":``,to:{path:`/`}},{default:r(()=>[...t[0]||=[m(`div`,{"i-ph-arrow-bend-up-left-duotone":``},null,-1),s(` Re-select Session `,-1)]]),_:1})]),m(`div`,F,[t[1]||=m(`div`,{py3:``,"indent-2":``},` Compare Overview `,-1),p(f,{sessions:w.value},null,8,[`sessions`]),m(`div`,I,[(n(!0),g(l,null,u(T.value,(e,t)=>(n(),g(`div`,{key:e.name,class:h(t<2?`col-span-2`:`col-span-1`),border:`~ base rounded`,p4:``,flex:`~ col`,gap2:``},[p(v,a({ref_for:!0},e),null,16)],2))),128))])])]))}}});export{L as default};
|