export interface TimeValue { hours: number; minutes: number; } export declare const clampHour: (h: number) => number; export declare const clampMinute: (m: number) => number; /** Parse a "HH:MM" (24-hour) string. Returns null for anything that isn't a valid time. */ export declare function parseTimeString(value: string | null | undefined): TimeValue | null; /** Format a TimeValue as a zero-padded "HH:MM" string. */ export declare function formatTime(time: TimeValue | null | undefined): string; /** Snap a minute value to the nearest multiple of `step` (step <= 1 is a no-op). */ export declare function snapMinute(minute: number, step: number): number; export declare const timeToMinutes: (time: TimeValue) => number; /** Clamp a time into [min, max] (both "HH:MM" strings, either optional). */ export declare function clampToRange(time: TimeValue, min?: string | null, max?: string | null): TimeValue; export declare function isWithinRange(time: TimeValue, min?: string | null, max?: string | null): boolean; /** * Auto-correct a masked "HH:MM" value as the user types: clamp the hour segment to 23 * and the minute segment to 59 so the field can never hold an impossible time. */ export declare function correctTimeMaskValue(value: string): string; export interface DialPoint { x: number; y: number; } /** * Cartesian coordinates for a point on the dial. `slot` is the step index from the * top of the clock, going clockwise; `stepDegrees` is the angle between steps * (30° for hours, 6° for minutes). Returns coordinates relative to (cx, cy). */ export declare function polarPoint(cx: number, cy: number, radius: number, slot: number, stepDegrees: number): DialPoint; /** Rotation (deg) of a hand pointing at `slot`. A 3-o'clock-default hand points up at slot 0. */ export declare const handAngle: (slot: number, stepDegrees: number) => number; /** Angle (0–360, clockwise from top) of a pointer at (dx, dy) relative to the dial centre. */ export declare function pointerAngle(dx: number, dy: number): number; export declare const pointerRadius: (dx: number, dy: number) => number;