caelum0x 695a365ae4 feat: PaperTrail — enterprise evidence-verification platform
Multi-tenant platform (182 pages, 228 API routes, ~30 modules) built on a
deterministic verification core: clinical-trial claims checked against
ClinicalTrials.gov registered results and raw event counts (ARR/NNT/RR+CI
recomputed in code, oracle-tested), code-enforced exact-span grounding, and
multi-source cross-verification. Auth/RBAC/multi-tenancy, document processing
at scale (unpdf + Docling), agentic workflows, Claude Science connector,
compliance/audit, billing, public API, and more.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-08 07:21:22 +03:00

42 lines
1.3 KiB
TypeScript

import type { ChartValue } from "./types";
interface ChartWidgetProps {
data: ChartValue;
}
// Dependency-free horizontal bar chart. Bars are scaled to the max value so the
// widget renders without a charting library (keeps the bundle lean).
export function ChartWidget({ data }: ChartWidgetProps) {
if (data.series.length === 0) {
return <p className="py-6 text-center text-sm text-ink/40">No data yet.</p>;
}
const max = Math.max(1, ...data.series.map((p) => p.value));
return (
<div className="space-y-2">
{data.series.map((point) => {
const pct = Math.round((point.value / max) * 100);
return (
<div key={point.label} className="flex items-center gap-2">
<span
className="w-24 shrink-0 truncate text-xs text-ink/50"
title={point.label}
>
{point.label}
</span>
<div className="h-3 flex-1 overflow-hidden rounded bg-ink/5">
<div
className="h-full rounded bg-accent/70"
style={{ width: `${pct}%` }}
aria-hidden
/>
</div>
<span className="w-10 shrink-0 text-right text-xs tabular-nums text-ink/60">
{point.value}
</span>
</div>
);
})}
</div>
);
}