import { type HTMLAttributes, type ReactNode } from 'react'; import { type VariantProps } from 'class-variance-authority'; import { type NoteAttachment } from '../_shared/note-attachment'; /** The note author — name, plus an optional avatar the timeline never shows. */ export interface NoteTimelineAuthor { /** Display name. */ name: string; /** Optional avatar image URL. Unused here; kept so a `NotesPanelNote` * passes straight through without reshaping. */ avatarUrl?: string; } /** * One note. Structurally a subset of `NotesPanelNote` / `ClinicalNoteCardProps` * so a host can pass the very objects it already gives `NotesPanel`. */ export interface NoteTimelineNote { /** Stable identifier. Surfaced as `data-note-id` — the ONLY note field that * ever reaches an attribute, because it is the only one that is not PHI. */ id?: string; /** ISO-8601 timestamp the note refers to (the clinical date). Drives the * date gutter and the sort. */ dateIso: string; /** ISO-8601 timestamp the note was written, when it differs from `dateIso`. */ createdAtIso?: string; /** Who wrote it. Omit for a system-generated note — the byline is then * dropped entirely rather than rendered empty. */ author?: NoteTimelineAuthor; /** The note body. */ content: string; /** How `content` is authored. `'markdown'` (default) runs the small Markdown * subset through the shared converter; `'html'` treats it as rich HTML. * Either way `SafeHtml` is the only carrier. */ contentFormat?: 'markdown' | 'html'; /** Pinned notes sort to the top and take an accent dot. */ pinned?: boolean; /** Flagged for follow-up — a warning dot and a Flag glyph. */ flagged?: boolean; /** The entity the note is bound to; renders the shared attachment chip. */ attachedTo?: NoteAttachment; /** Whether the note is clinical. Structural only — it drives no styling * here, but it is carried so the same objects serve both surfaces. */ clinical?: boolean; } /** Imperative handle for the agent runtime — identifiers / flags only. */ export interface NoteTimelineHandle { /** Structural snapshot of the RENDERED rows: ids + flags, never a body or * an author (both PHI). */ getNotes: () => Array<{ id?: string; pinned: boolean; flagged: boolean; clinical: boolean; }>; /** How many rows are rendered, after `maxItems` is applied. */ getVisibleCount: () => number; } declare const rowVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string; export interface NoteTimelineProps extends Omit, 'children'>, VariantProps { /** Agent-readiness consumer id, surfaced as `data-component-id`. */ id?: string; /** The notes. Sorted pinned-first, then `dateIso` descending. */ notes: readonly NoteTimelineNote[]; /** How many rows to render after sorting. Default 3. The remainder is NOT * counted or footered here — the host owns that affordance. */ maxItems?: number; /** * Makes every note (with an `id`) a single keyboard-reachable control that * calls back with that note's id — a real button stretched over the row, * so Tab/Enter reach the same place a pointer click already does. Any link * inside the note body loses its own tab stop while this is set, so each * note stays exactly one focus stop. Omit it to keep today's read-only, * pointer-only row. */ onNoteActivate?: (id: string) => void; /** Lines each note body clamps to. Default 3. */ lines?: 1 | 2 | 3 | 4 | 5; /** Locale for the date gutter. Defaults to the active i18n language. */ locale?: string; /** * The notes are being read. With no notes yet it shows placeholder rows in * the timeline's own shape, never the empty state. With notes already on * screen (a refresh) it keeps them and only sets `aria-busy`. */ loading?: boolean; /** Placeholder rows shown while `loading`. Default `2`. */ loadingRows?: number; /** Rendered in place of the list when `notes` is empty. */ emptyState?: ReactNode; /** Accessible name for the list region. Defaults to `ui.noteTimeline.regionLabel`. */ 'aria-label'?: string; } export declare const NoteTimeline: import("react").ForwardRefExoticComponent>; export {}; //# sourceMappingURL=note-timeline.d.ts.map