import type { MdyTimeFormat } from "@modyra/core/datetime"; /** * How long the dial waits before handing the hour over to the minute, in milliseconds. * * A short delay is deliberate: the face redraws with twelve different numbers on it, and doing that * in the same frame as the press takes the number the person just chose off the screen before they * have seen it land. Published because it was three numbers — 0 in one renderer, 200 and 300 in * another, 300 in the third — which is three answers to a question about how people read. */ export declare const MDY_TIMEPICKER_ADVANCE_MS = 250; /** * The view an opening picker shows. * * The face rather than the boxes: it is the faster route to an approximate time, which is what most * people are choosing, and it is the only gesture available where there is no keyboard at all. One * press of the mode toggle reaches the boxes, and the boxes stay typeable while it is showing — so * nothing is behind a door, and the quicker route is the one in front. * * Declared because it was three answers: two renderers opened on the face and one on the boxes, so a * person met a different control depending on which adapter their team had chosen. */ export declare const MDY_TIMEPICKER_INITIAL_VIEW = "dial"; /** * The clock a picker draws when nothing asks for the other. * * `DEFAULT_` and not `INITIAL_`, beside a constant that is the other word: the view is initial — * a person changes it and closing restores it — while the format does not change at all once the * field is drawn. Two lifetimes, two words. * * ADR 0116 chose the 24-hour clock and left the answer written out in four renderers, which is the * shape that lets one of them drift and nothing notice. */ export declare const MDY_TIMEPICKER_DEFAULT_FORMAT: MdyTimeFormat; /** * The part that carries DOM focus for a field. * * Named rather than selected: the parts already exist in the catalogue, and a renderer choosing its * own selector is a renderer that can disagree with the contract about where focus went. */ export declare function timepickerFocusPart(field: "hour" | "minute"): "hourControl" | "minuteControl"; /** * A CSS selector that reaches exactly one part of an open picker. * * A part's own class is not always enough to find it: `hourControl` and `minuteControl` carry the * *same* class — `mdy-timepicker-segment-input` — because they are the same kind of control twice. * Asked by class alone, both resolve to the hour, so a focus command naming the minute box put focus * on the hour and a Tab that looked like it did nothing was in fact arriving somewhere. * * What tells them apart is the parent the anatomy already declares, so the selector is composed from * it rather than from a second table: the wrapper's own class, then the control's. */ export declare function timepickerPartSelector(part: string): string | null; /** * The controls a `Tab` walks inside an open picker, in order, as part names. * * Declared rather than left to DOM order, because the three renderers do not build the dialog in the * same order — one appends the dimmed layer before the hand and another after it — so "whatever * `tabindex` order falls out" is three orders. It is the same divergence this widget keeps closing, * one axis further out. * * The period toggle appears only on a twelve-hour picker, which is the one place the order is not a * constant: a 24-hour face has no AM/PM to reach. */ export declare function timepickerTabOrder(format: MdyTimeFormat): readonly string[]; /** * The part a `Tab` moves to from `from`, wrapping at both ends. * * It wraps because the popup is a dialog: a picker whose Tab walked out of it left a confirm button * behind and a draft nobody could commit, which is the defect this whole contract exists to end. * `Escape` is how a keyboard user leaves, and it still cancels. */ export declare function timepickerTabTarget(from: string, format: MdyTimeFormat, direction?: 1 | -1): string;