Files
HealthLog/src/components/insights/derived/index.ts
T
Marc-André Bombeck d9405e17b9 feat(dashboard): surface the wellness scores as a data-gated ring strip
Add a wellness-scores section to the vitals dashboard: a row of score rings for
Readiness, Recovery, Sleep, Stress, and Strain. Every ring is
data-availability-gated — a score with no underlying data simply does not
render, so the strip never shows an apologetic empty ring. Readiness and Sleep
are tappable and route to their existing score-anatomy detail pages; the
persisted nightly scores render read-only. Every ring reads the one
/api/insights/derived route through the shared useDerivedMetric hook.
2026-06-02 23:13:26 +02:00

44 lines
1.3 KiB
TypeScript

/**
* v1.10.0 — the derived-metrics design-system primitives barrel.
*
* Four reusable, presentational components that extend the existing token +
* sentiment vocabulary; none introduce a new colour system. Reused across
* the dashboard, Insights pages, the Coach / briefing and the doctor/FHIR
* report. See `.planning/v1.10-build/design-sota-and-direction.md`.
*/
export { ScoreRing, type ScoreRingProps } from "./score-ring";
export { CoverageMeter, type CoverageMeterProps } from "./coverage-meter";
export {
SparklineDeltaTile,
type SparklineDeltaTileProps,
} from "./sparkline-delta-tile";
export {
ProvenanceExplainer,
type ProvenanceExplainerProps,
type ProvenanceStandard,
} from "./provenance-explainer";
export {
ScoreAnatomyView,
type ScoreAnatomyViewProps,
type AnatomyContributor,
} from "./score-anatomy-view";
export {
bandForScore,
clampScore,
BAND_NUMBER_CLASS,
BAND_PROGRESS_CLASS,
BAND_BORDER_CLASS,
BAND_VAR,
type ScoreBand,
} from "./band-tokens";
// ── W2b vitals dashboard surface + query hook ────────────────────────
export { VitalsDashboard } from "./vitals-dashboard";
export { WellnessScores } from "./wellness-scores";
export {
useDerivedMetric,
type DerivedMetricResponse,
type UseDerivedMetricOptions,
} from "./use-derived-metric";