- apps/web: test updates (Vitest/setup), playbackAnalyticsService, TrackGrid, serviceErrorHandler - veza-common: logging, metrics, traits, validation, random - veza-stream-server: audio pipeline, codecs, cache, monitoring, routes - apps/web/dist_verification: refresh build assets (content-hashed filenames) Co-authored-by: Cursor <cursoragent@cursor.com>
1 line
2.3 KiB
JavaScript
1 line
2.3 KiB
JavaScript
import{j as e}from"./vendor-react-C9dYU-TK.js";import{C as M}from"./index-BMBS6scK.js";import{A as C}from"./AnimatedNumber-C7V3zEin.js";import{j as A,k as S}from"./vendor-icons-BSV6HBy1.js";const B=({label:v,value:c,icon:y,trend:t,color:l="cyan",sparklineData:x})=>{const d={cyan:"text-primary",magenta:"text-secondary",lime:"text-success",gold:"text-warning",red:"text-destructive"},b={cyan:"bg-primary/10",magenta:"bg-secondary/10",lime:"bg-success/10",gold:"bg-warning/10",red:"bg-destructive/10"},w=n=>{if(!n||n.length<2)return null;const u=Math.min(...n),$=Math.max(...n)-u||1,f=100,o=40,k=p=>{const a=p.map((s,r)=>({x:r/(p.length-1)*f,y:o-(s-u)/$*o})),m=a[0];if(!m)return"";let g=`M ${m.x},${m.y}`;for(let s=0;s<a.length-1;s++){const r=a[s],i=a[s+1];if(!r||!i)continue;const j=(r.x+i.x)/2;g+=` C ${j},${r.y} ${j},${i.y} ${i.x},${i.y}`}return g};return e.jsx("svg",{width:"100%",height:o,viewBox:`0 0 ${f} ${o}`,className:"opacity-60 overflow-visible",children:e.jsx("path",{d:k(n),fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",vectorEffect:"non-scaling-stroke",className:"drop-shadow-stat-sparkline"})})},h=typeof t=="string"?!t.startsWith("-"):(t||0)>=0,N=typeof t=="number"?`${Math.abs(t)}%`:t;return e.jsxs(M,{variant:"surface",className:"flex flex-col justify-between h-full p-5 relative overflow-hidden rounded-xl",children:[e.jsxs("div",{className:"flex justify-between items-start gap-4 relative z-10",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx("p",{className:"text-xs font-medium text-muted-foreground mb-0.5",children:v}),e.jsx("h3",{className:"text-xl font-semibold text-foreground tracking-tight truncate",children:typeof c=="number"?e.jsx(C,{value:c}):c})]}),e.jsx("div",{className:`p-2 rounded-lg shrink-0 ${b[l]} ${d[l]}`,children:y})]}),e.jsx("div",{className:"relative z-10 flex items-center gap-1.5 mt-3",children:t&&e.jsxs("div",{className:`flex items-center gap-1 text-xs font-medium ${h?"text-success":"text-destructive"}`,children:[h?e.jsx(A,{className:"w-3 h-3 shrink-0"}):e.jsx(S,{className:"w-3 h-3 shrink-0"}),e.jsx("span",{children:N}),e.jsx("span",{className:"text-muted-foreground font-normal",children:"vs last period"})]})}),x&&e.jsx("div",{className:`absolute bottom-0 left-0 right-0 h-12 ${d[l]} opacity-20 pointer-events-none`,children:w(x)})]})};export{B as S};
|