tokmon 0.22.7 → 0.23.1

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.
Files changed (57) hide show
  1. package/README.md +1 -0
  2. package/dist/{bootstrap-ink-OHPQZKGB.js → bootstrap-ink-UD3KDTOB.js} +1113 -818
  3. package/dist/{chunk-EMQL5P5J.js → chunk-AON6GE7D.js} +368 -280
  4. package/dist/{chunk-TNIADJ3W.js → chunk-DJPUYMZM.js} +49 -16
  5. package/dist/chunk-HXDAOOSI.js +154 -0
  6. package/dist/{chunk-I4USANOF.js → chunk-PGQK7MOE.js} +879 -391
  7. package/dist/chunk-RM3ZE44Z.js +193 -0
  8. package/dist/cli.js +93 -54
  9. package/dist/{config-WLRQHLVJ.js → config-5CNJN3P7.js} +1 -1
  10. package/dist/daemon-QGCI46US.js +193 -0
  11. package/dist/daemon-handle-4F4TXGXJ.js +163 -0
  12. package/dist/server-4CDZMLH6.js +10 -0
  13. package/dist/web/assets/Area-DGo9K-U3.js +2 -0
  14. package/dist/web/assets/analytics-BOhbhV5Z.js +2 -0
  15. package/dist/web/assets/breakdown-CO04nSN-.js +4 -0
  16. package/dist/web/assets/chart-bNxdfXxA.js +69 -0
  17. package/dist/web/assets/explore-sZnmjzAj.js +22 -0
  18. package/dist/web/assets/index-DSj-Bxov.css +1 -0
  19. package/dist/web/assets/index-DnDr1VUr.js +83 -0
  20. package/dist/web/assets/models-Cl6D8VVF.js +2 -0
  21. package/dist/web/assets/overview-C18nvaAK.js +2 -0
  22. package/dist/web/assets/panel-DTjMnHaz.js +1 -0
  23. package/dist/web/assets/primitives-Dj_9YxTF.js +1 -0
  24. package/dist/web/assets/settings-sheet-0BGb5Ahv.js +1 -0
  25. package/dist/web/assets/share-sheet-BHtt-OmT.js +2 -0
  26. package/dist/web/assets/timeline-DmzB8Z3W.js +1 -0
  27. package/dist/web/assets/use-dialog-trap-DeXFtxx8.js +1 -0
  28. package/dist/web/index.html +3 -2
  29. package/package.json +9 -5
  30. package/dist/daemon-IP3UCTPB.js +0 -213
  31. package/dist/daemon-handle-HLSKLMWU.js +0 -142
  32. package/dist/server-GA2FKYDQ.js +0 -9
  33. package/dist/web/assets/breakdown-DU2j1sQ8.js +0 -4
  34. package/dist/web/assets/index-BCaPGYQA.css +0 -1
  35. package/dist/web/assets/index-ygZyXDLT.js +0 -173
  36. package/dist/web/assets/jetbrains-mono-cyrillic-400-normal-BEIGL1Tu.woff2 +0 -0
  37. package/dist/web/assets/jetbrains-mono-cyrillic-400-normal-ugxPyKxw.woff +0 -0
  38. package/dist/web/assets/jetbrains-mono-cyrillic-500-normal-DJqRU3vO.woff +0 -0
  39. package/dist/web/assets/jetbrains-mono-cyrillic-500-normal-DmUKJPL_.woff2 +0 -0
  40. package/dist/web/assets/jetbrains-mono-cyrillic-700-normal-BWTpRfYl.woff2 +0 -0
  41. package/dist/web/assets/jetbrains-mono-cyrillic-700-normal-CEoEElIJ.woff +0 -0
  42. package/dist/web/assets/jetbrains-mono-greek-400-normal-B9oWc5Lo.woff +0 -0
  43. package/dist/web/assets/jetbrains-mono-greek-400-normal-C190GLew.woff2 +0 -0
  44. package/dist/web/assets/jetbrains-mono-greek-500-normal-D7SFKleX.woff +0 -0
  45. package/dist/web/assets/jetbrains-mono-greek-500-normal-JpySY46c.woff2 +0 -0
  46. package/dist/web/assets/jetbrains-mono-greek-700-normal-C6CZE3T8.woff2 +0 -0
  47. package/dist/web/assets/jetbrains-mono-greek-700-normal-DEigVDxa.woff +0 -0
  48. package/dist/web/assets/jetbrains-mono-latin-ext-400-normal-Bc8Ftmh3.woff2 +0 -0
  49. package/dist/web/assets/jetbrains-mono-latin-ext-400-normal-fXTG6kC5.woff +0 -0
  50. package/dist/web/assets/jetbrains-mono-latin-ext-500-normal-Cut-4mMH.woff2 +0 -0
  51. package/dist/web/assets/jetbrains-mono-latin-ext-500-normal-ckzbgY84.woff +0 -0
  52. package/dist/web/assets/jetbrains-mono-latin-ext-700-normal-CZipNAKV.woff2 +0 -0
  53. package/dist/web/assets/jetbrains-mono-latin-ext-700-normal-CxPITLHs.woff +0 -0
  54. package/dist/web/assets/jetbrains-mono-vietnamese-400-normal-CqNFfHCs.woff +0 -0
  55. package/dist/web/assets/jetbrains-mono-vietnamese-500-normal-DNRqzVM1.woff +0 -0
  56. package/dist/web/assets/jetbrains-mono-vietnamese-700-normal-BDLVIk2r.woff +0 -0
  57. package/dist/web/assets/timeline-CO2B2c-0.js +0 -1
@@ -1 +0,0 @@
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-ygZyXDLT.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};