import type { DateRange } from './searchFilters'; /** * Scale of the date slider, after iD's photo age slider: a position from 0 (oldest) to 1 (now). * It is not linear: recent years take more room than old ones, because that is where most * photos are and where a mapper needs the finer control. */ export type DateSliderScale = { /** Reference time (ms), the right end of the slider. */ now: number; /** Years the slider spans; everything older sits at the left end. Default 10, as in iD. */ maxYears?: number; }; export declare const DATE_SLIDER_MAX_YEARS = 10; /** Position (0 oldest … 1 now) of a time (ms). Times outside the span sit at the ends. */ export declare const dateSliderPosition: (time: number, scale: DateSliderScale) => number; /** Time (ms) of a position (0 oldest … 1 now). */ export declare const dateSliderTime: (position: number, scale: DateSliderScale) => number; export type DateSliderPositions = { from: number; to: number; }; /** Handle positions of a date range; a missing `from` is the left end, a missing `to` the right. */ export declare const dateRangeToSliderPositions: (range: DateRange | undefined, scale: DateSliderScale) => DateSliderPositions; /** * Date range of two handle positions. A handle at its end means "no limit": the left end shows * photos of any age, also those older than the slider spans. */ export declare const sliderPositionsToDateRange: (positions: DateSliderPositions, scale: DateSliderScale) => DateRange; /** * How many of the times (ms) fall into each of `bins` equal parts of the slider, oldest first, * for the marks that show where photos are. Entries without a time are skipped. */ export declare const dateSliderBins: (times: Iterable, scale: DateSliderScale, bins?: number) => number[];