/** A time, typed or turned: the draft the dial edits and what an angle becomes. */ import { MdyTimeFormat } from "@modyra/core/datetime"; export interface MdyTimeDraftState { readonly committed: string | null; readonly draft: string; readonly open: boolean; } export type MdyTimeDraftIntent = { readonly type: "open"; readonly committed: string | null; readonly fallback: string; } | { readonly type: "select"; readonly value: string; } | { readonly type: "confirm"; } | { readonly type: "cancel"; }; export interface MdyTimeDraftTransition { readonly state: MdyTimeDraftState; readonly commit: string | null | undefined; readonly restoreFocus: boolean; } /** Framework-independent picker draft lifecycle; parsing/format conversion stays at the host boundary. */ export declare function timeDraftTransition(state: MdyTimeDraftState, intent: MdyTimeDraftIntent): MdyTimeDraftTransition; /** Canonical typed-input transition. Invalid text leaves the committed value untouched. */ export declare function timeInputTransition(raw: string, parseAndFormat: (value: string) => string | null): string | null | undefined; export type MdyTimeClockIntent = { readonly type: "hour"; readonly value: number; readonly format: MdyTimeFormat; } | { readonly type: "minute"; readonly value: number; } | { readonly type: "period"; readonly value: "AM" | "PM"; } | { readonly type: "dial"; readonly field: "hour" | "minute"; readonly angle: number; }; /** Canonical clock transition. Hosts only extract native input or pointer geometry. */ export declare function timeClockTransition(currentValue: string | null, intent: MdyTimeClockIntent): string | null;