tokmon 0.22.0 → 0.22.2
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/{bootstrap-ink-P3PH2EV4.js → bootstrap-ink-F7P7Q5J4.js} +42 -33
- package/dist/{chunk-7MFZMI5C.js → chunk-E25RUTXB.js} +12 -0
- package/dist/{chunk-2PIYMU6W.js → chunk-FLLNU6BN.js} +1 -1
- package/dist/{chunk-AT2OT3AT.js → chunk-RA3SCIG6.js} +2 -2
- package/dist/cli.js +4 -4
- package/dist/{config-UPNBGIJO.js → config-F7TY5ZFA.js} +5 -1
- package/dist/{daemon-CMY7V37B.js → daemon-A3NSDSPZ.js} +3 -3
- package/dist/server-P7T4ZMC6.js +9 -0
- package/dist/web/assets/{breakdown-DyImok0q.js → breakdown-C3Zqnewe.js} +1 -1
- package/dist/web/assets/{index-D9ioiqrk.css → index-BCaPGYQA.css} +1 -1
- package/dist/web/assets/index-BkdjevbO.js +173 -0
- package/dist/web/assets/{timeline-mhVcXkJg.js → timeline-C2vHjZJ3.js} +1 -1
- package/dist/web/index.html +2 -2
- package/package.json +1 -1
- package/dist/server-GEGTLRUW.js +0 -9
- package/dist/web/assets/index-CQGWJ0OP.js +0 -173
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as R,X as l,Y as x,L as C,f as M,A,u as b,j as t,P as k,E as T,C as S,R as N,a as h,G as u,b as v,c as n,d as O,T as j,e as g,h as c,r as L,S as E,s as G,m as Y}from"./index-
|
|
1
|
+
import{g as R,X as l,Y as x,L as C,f as M,A,u as b,j as t,P as k,E as T,C as S,R as N,a as h,G as u,b as v,c as n,d as O,T as j,e as g,h as c,r as L,S as E,s as G,m as Y}from"./index-BkdjevbO.js";var I=R({chartName:"LineChart",GraphicalChild:C,axisComponents:[{axisType:"xAxis",AxisComp:l},{axisType:"yAxis",AxisComp:x}],formatAxisMap:M}),W=R({chartName:"AreaChart",GraphicalChild:A,axisComponents:[{axisType:"xAxis",AxisComp:l},{axisType:"yAxis",AxisComp:x}],formatAxisMap:M});const _=[{value:"linear",label:"lin"},{value:"log",label:"log"}],B=[{value:"combined",label:"merged"},{value:"byProvider",label:"split"}],F="flex items-center overflow-hidden rounded border border-line text-[10px]",H=Y(a=>{const s=a.filter(e=>e.dataKey!=="total"&&(e.value??0)>0).map(e=>({label:String(e.name??e.dataKey),value:c(e.value??0),color:e.color})),r=a.reduce((e,o)=>e+(o.dataKey==="total"?0:o.value??0),0);return s.length>1&&s.push({label:"total",value:c(r),color:"var(--color-fg-bright)"}),s}),U=G("total",c,"var(--color-cost)");function V({derived:a,title:s="cost over time",height:r=260,periodLabel:e,heightClass:o}){const m=b(),K=a.byProvider,P=K.length>1,[d,X]=L.useState("linear"),[w,z]=L.useState(P?"byProvider":"combined"),f=a.timeline.map(i=>{const p={date:i.date,total:i.total,...i.byProvider};if(d==="log")for(const y of Object.keys(p))y!=="date"&&p[y]===0&&(p[y]=null);return p}),D=t.jsx(x,{...n,width:52,tickFormatter:O,scale:d,allowDataOverflow:d==="log",domain:d==="log"?[.1,"auto"]:[0,"auto"]});return t.jsx(k,{title:s,titleTag:e,captureName:"cost-over-time",right:t.jsxs("div",{className:"flex items-center gap-1.5",children:[P&&t.jsx(E,{options:B,value:w,onChange:z,size:"xs",containerClassName:F,ariaLabel:"combine providers"}),t.jsx(E,{options:_,value:d,onChange:X,size:"xs",containerClassName:F,ariaLabel:"value scale"})]}),children:f.length===0?t.jsx(T,{children:"no spend in period"}):t.jsx(S,{height:r,heightClass:o,children:t.jsx(N,{children:w==="combined"?t.jsxs(W,{data:f,margin:{top:8,right:8,left:0,bottom:0},children:[t.jsx("defs",{children:t.jsxs("linearGradient",{id:"g-cost",x1:"0",y1:"0",x2:"0",y2:"1",children:[t.jsx("stop",{offset:"0%",stopColor:"var(--color-cost)",stopOpacity:.16}),t.jsx("stop",{offset:"100%",stopColor:"var(--color-cost)",stopOpacity:.02})]})}),t.jsx(h,{...u}),t.jsx(l,{dataKey:"date",...n,tickFormatter:v,minTickGap:28}),D,t.jsx(j,{content:U,cursor:g}),t.jsx(A,{type:"monotone",dataKey:"total",stroke:"var(--color-cost)",strokeWidth:1.8,fill:"url(#g-cost)",connectNulls:!0,isAnimationActive:m,animationDuration:350})]}):t.jsxs(I,{data:f,margin:{top:8,right:8,left:0,bottom:0},children:[t.jsx(h,{...u}),t.jsx(l,{dataKey:"date",...n,tickFormatter:v,minTickGap:28}),D,t.jsx(j,{content:H,cursor:g}),K.map(i=>t.jsx(C,{type:"monotone",dataKey:i.id,name:i.name,stroke:i.color,strokeWidth:1.6,dot:!1,connectNulls:!0,isAnimationActive:m,animationDuration:350},i.id))]})})})})}const q=G("cumulative",c,"var(--color-cost)");function Z({derived:a,height:s=220,periodLabel:r}){const e=b(),o=a.cumulative;return t.jsx(k,{title:"cumulative spend",titleTag:r,captureName:"cumulative",children:o.length===0?t.jsx(T,{children:"no spend in period"}):t.jsx(S,{height:s,children:t.jsx(N,{children:t.jsxs(I,{data:o,margin:{top:8,right:8,left:0,bottom:0},children:[t.jsx(h,{...u}),t.jsx(l,{dataKey:"date",...n,tickFormatter:v,minTickGap:28}),t.jsx(x,{...n,width:52,tickFormatter:O}),t.jsx(j,{content:q,cursor:g}),t.jsx(C,{type:"monotone",dataKey:"total",stroke:"var(--color-cost)",strokeWidth:1.8,dot:!1,isAnimationActive:e,animationDuration:350})]})})})})}const J=G("cache saved",c,"var(--color-positive)");function $({derived:a,height:s=220,periodLabel:r}){const e=b(),o=a.cacheSavingsSeries,m=a.totals.cacheSavings;return t.jsx(k,{title:"cache savings",titleTag:r,captureName:"cache-savings",right:t.jsx("span",{className:"tnum text-xs text-positive",children:c(m)}),children:o.length===0?t.jsx(T,{children:"no cache reads in period"}):t.jsx(S,{height:s,children:t.jsx(N,{children:t.jsxs(W,{data:o,margin:{top:8,right:8,left:0,bottom:0},children:[t.jsx("defs",{children:t.jsxs("linearGradient",{id:"g-save",x1:"0",y1:"0",x2:"0",y2:"1",children:[t.jsx("stop",{offset:"0%",stopColor:"var(--color-positive)",stopOpacity:.18}),t.jsx("stop",{offset:"100%",stopColor:"var(--color-positive)",stopOpacity:.02})]})}),t.jsx(h,{...u}),t.jsx(l,{dataKey:"date",...n,tickFormatter:v,minTickGap:28}),t.jsx(x,{...n,width:52,tickFormatter:O}),t.jsx(j,{content:J,cursor:g}),t.jsx(A,{type:"monotone",dataKey:"value",stroke:"var(--color-positive)",strokeWidth:1.6,fill:"url(#g-save)",isAnimationActive:e,animationDuration:350})]})})})})}export{$ as CacheSavings,V as CostTimeline,Z as CumulativeSpend};
|
package/dist/web/index.html
CHANGED
|
@@ -11,8 +11,8 @@
|
|
|
11
11
|
// Apply saved theme before first paint to avoid a flash. Default: dark.
|
|
12
12
|
try { if (localStorage.getItem('tokmon-theme') === 'light') document.documentElement.classList.add('light') } catch (e) {}
|
|
13
13
|
</script>
|
|
14
|
-
<script type="module" crossorigin src="./assets/index-
|
|
15
|
-
<link rel="stylesheet" crossorigin href="./assets/index-
|
|
14
|
+
<script type="module" crossorigin src="./assets/index-BkdjevbO.js"></script>
|
|
15
|
+
<link rel="stylesheet" crossorigin href="./assets/index-BCaPGYQA.css">
|
|
16
16
|
</head>
|
|
17
17
|
<body>
|
|
18
18
|
<div id="root"></div>
|
package/package.json
CHANGED