import type { ExpressionSpecification } from 'maplibre-gl'; import type { NormalizedMapFeature, NormalizedPhoto } from '../providers/model'; export type PhotoTypeFilter = 'flat' | 'pano'; export type DateRange = { from?: string; to?: string; }; export declare const parseIsoDateStartMs: (isoDate: string) => number; /** `true` for a real calendar day written as `YYYY-MM-DD`. */ export declare const isIsoDate: (value: string) => boolean; /** Returns the day unchanged; throws when it is not a real `YYYY-MM-DD` day. */ export declare const assertIsoDate: (value: string) => string; export declare const parseIsoDateEndMs: (isoDate: string) => number; /** iD edge case: swap when from > to. */ export declare const normalizeDateRange: (date?: DateRange) => DateRange | undefined; export declare const photoTypesFilter: (photoTypes?: PhotoTypeFilter[]) => PhotoTypeFilter[] | undefined; export declare const photoMatchesPhotoTypes: (photo: NormalizedPhoto, photoTypes?: PhotoTypeFilter[]) => boolean; export declare const photoMatchesDateRange: (photo: NormalizedPhoto, date?: DateRange) => boolean; /** Tests one photo. For a list use `photoFilter`, which reads the filters once. */ export declare const photoMatchesFilters: (photo: NormalizedPhoto, photoTypes?: PhotoTypeFilter[], date?: DateRange) => boolean; /** * The type and date filters as one test, for filtering many photos: the filters are read once, * not per photo. */ export declare const photoFilter: (photoTypes?: PhotoTypeFilter[], date?: DateRange) => ((photo: NormalizedPhoto) => boolean); /** Map features use iD date semantics: last_seen_at >= from; first_seen_at <= to. */ export declare const mapFeatureMatchesDateRange: (feature: NormalizedMapFeature, date?: DateRange) => boolean; export declare const buildPhotoLayerFilter: (photoTypes?: PhotoTypeFilter[], date?: DateRange) => ExpressionSpecification; export declare const buildMapFeatureLayerFilter: (date?: DateRange) => ExpressionSpecification;