@dofek/scoring
v0.1.71
Published
Platform-agnostic health scoring models, labels, colors, and design tokens
Maintainers
Readme
@dofek/scoring
Platform-agnostic TypeScript presentation helpers and shared design tokens, used by both web and mobile clients without a UI-framework dependency (package exports).
Install
npm install @dofek/scoringRequires Node.js 22.14 or newer.
Usage
There is no root export; import the subpath for the model you need.
import { statusColors } from "@dofek/scoring/colors";
console.log(statusColors.positive);Public API
| Subpath | Purpose |
| --- | --- |
| @dofek/scoring/scoring | Trend, score-zone, and presentation helpers |
| @dofek/scoring/colors | Semantic, chart, surface, text, sleep-stage, and activity colors |
| @dofek/scoring/tokens | Framework-neutral typography, spacing, radius, animation, and chart tokens |
| @dofek/scoring/epistemic-status | Shared Observed / Estimated / Associated / Suggested / Unavailable status vocabulary |
| @dofek/scoring/loading-policy | Blocking-loading state policy |
| @dofek/scoring/query-cache | Shared query-cache age constant |
Model behavior
- The design-token modules contain values only; they do not install fonts or render UI.
operationalStatusColorsis the light-theme presentation palette for generic application states. Its foregrounds meet the WCAG 2.2 normal-text contrast requirement on paired surfaces, and its borders/indicators meet WCAG 2.2 non-text contrast. It does not classify health, nutrition, training, clinical, or scoring values; those domain meanings remain with their owning models.
The package performs no network requests and needs no authentication or runtime configuration. Validate untrusted input before calling the calculation functions. These models are for fitness software and are not medical advice.
License and contributing
MIT. Source is in the Dofek repository. Please open an issue for bugs or API proposals, or submit a pull request.
