import type { TFunction } from 'i18next'; import type { MarkerShape } from '../../components/annotation-marker'; import type { SparklineAnnotation, SparklineAnnotationTone } from '../../components/sparkline'; import type { ClinicalEvent, ClinicalEventCategory, Visit } from './anamnesis-types'; /** * ONE shape per category, and that is the whole vocabulary — five distinct * glyphs, no per-category hue. * * Five saturated semantic tones (error / success / accent / warning / info) * used to ride these shapes. Three or four events picked at once put four * competing hues across a 32px-tall sparkline, nineteen rows deep, and the * annotations then out-shouted the trend line they exist to annotate. Shape * is already the accessible channel here (WCAG 1.4.1, and the kit's rule in * `src/components/annotation-marker/`), so the hue was reinforcement the * reader was paying for in noise. */ export declare const EVENT_SHAPE: Record; /** * The single restrained tone every annotation wears, chip and line alike. * * `neutral` resolves to `--muted-foreground`, the only hueless token that * clears WCAG 1.4.11's 3:1 for a non-text graphic in all four themes * (measured 6.9:1 light, 7.5:1 dark, 18.4:1 / 13.9:1 accessible, against * `--card`). Hueless is the point: the trend line is tinted by VALENCE — * green improving, red worsening — and an annotation with a hue of its own * competes with that read. */ export declare const EVENT_TONE: SparklineAnnotationTone; /** An event that HAS a place on the plot, with the fraction it sits at. */ export interface EventMark { event: ClinicalEvent; /** Fraction of the shared x domain: 0 = first visit, 1 = latest. */ position: number; } /** * Where an event sits on the domain every row shares, or `null` when it has * no place on the plot. * * `null` — rather than a clamp to 0 or 1 — for an event outside the visit * span: the plot covers first visit → latest, and pinning an event that * predates the record to the left edge would invent a correlation with a * measurement taken before it happened. Also `null` below two visits (no * extent to sit on) and on any unreadable date. * * `visits` is read in ARRAY ORDER, and chronological order is an UNCHECKED * precondition: an out-of-order array can bracket the event on a span that * runs backwards and place the marker accordingly. */ export declare function eventPosition(event: ClinicalEvent, visits: readonly Visit[]): number | null; /** The events that can be drawn, in the order they happened. */ export declare function eventMarks(events: readonly ClinicalEvent[] | undefined, visits: readonly Visit[]): EventMark[]; /** "Chemotherapy started · 2 Sep 2024" — what the chip says. */ export declare function eventLabel(event: ClinicalEvent, t: TFunction): string; /** Rides the chip as its accessible description: what kind of thing this was, * and — when it was not this practice's own decision — who recorded it. */ export declare function eventDetail(event: ClinicalEvent, t: TFunction): string; /** The picked events as sparkline annotations. Every row of the grid is given * this SAME array, which is what pins one event to one x down the column. */ export declare function eventAnnotations(marks: readonly EventMark[], activeIds: ReadonlySet, t: TFunction): SparklineAnnotation[]; //# sourceMappingURL=anamnesis-events.d.ts.map