/** The two bounds a range calendar edits. `end` is null while a range is open. */ export interface DateRangeSelection { start: Date | null; end: Date | null; } /** * The selection after clicking `date`. * * One rule, no modes: a click either OPENS a range (when none is open) or * CLOSES the open one. Selecting a single day is clicking the same day twice — * there is deliberately no separate single-day mode, because a mode that * changes what a click means is a mode the user can get stuck in with no way * to express a range at all. * * Bounds come back ordered, so clicking the later day first is just another way * to select rather than an error the caller has to undo. */ export declare function nextRangeSelection(current: DateRangeSelection, date: Date): DateRangeSelection; /** * The end a range would CLOSE on if the pointer stopped at `hovered` — what a * calendar fills in to show the span before it is committed. * * `null` unless a range is actually open, and open is tested exactly the way * {@link nextRangeSelection} tests it. That shared test is the point of putting * this here: a preview that disagreed with the click would show a span the next * click does not produce, and the two rules drifting apart is precisely what a * second copy of "is a range open" would eventually do. */ export declare function previewEndFor(current: DateRangeSelection, hovered: Date | null): Date | null;