export interface SegmentSpec { key: string; len: number; min: number; max: number; placeholder: string; kind?: 'num' | 'meridiem'; } export type SegmentValues = Record; export interface SegmentedFieldConfig { /** Ordered sections + separator strings; re-read on every focus so mode / * withTime changes rebuild the field. */ schema: () => Array; /** Parse the controller's ASCII value into per-key section values. */ seed: (ascii: string) => SegmentValues; /** Build the controller's ASCII value from a complete set of section values. */ toAscii: (values: SegmentValues) => string; /** Placeholder shown when the field is empty and unfocused. */ placeholder: () => string; /** Locale display string shown when the field is not being edited. */ formatted: () => string; /** ASCII of the committed value, or '' if none — seeds sections on focus. */ committed: () => string; /** ASCII of the value or today — seeds a section on first arrow step. */ reference: () => string; validate: (ascii: string) => 'valid' | 'invalid' | 'empty'; commit: (ascii: string) => 'valid' | 'invalid' | 'empty'; open: () => void; close: () => void; } export interface SegmentedField { isEditing: () => boolean; destroy: () => void; } export declare function attachSegmentedField(input: HTMLInputElement, cfg: SegmentedFieldConfig): SegmentedField;