import type { ArkmeSearchRecordItem } from './types.js'; export type LocationSource = 'quick_note' | 'my_sent' | 'received_private' | 'received_group'; export interface LocationBounds { swLat: number; swLon: number; neLat: number; neLon: number; } /** A viewport with swLon > neLon crosses the date line. Detail bounds never wrap. */ export interface LocationViewport { bounds: LocationBounds; zoom: number; } export interface LocationMarker { key: string; latitude: number; longitude: number; count: number; source: LocationSource; label: string; preview: string; /** Wide views use disjoint queries. Details must use the producing query/key. */ clusterQuery?: LocationViewport & { key: string; }; } export interface LocationRecord { key: string; latitude: number; longitude: number; label: string; address: string; source: LocationSource; record: ArkmeSearchRecordItem; } export interface LocationMarkers { markers: LocationMarker[]; truncated: boolean; } export interface LocationRecords { items: LocationRecord[]; hasMore: boolean; nextOffset: number; truncated: boolean; nextCursor?: { sendAt: number; recordUid: string; }; } export interface LocationQuery { mode: 'list' | 'viewport' | 'cluster'; bounds?: LocationBounds; zoom?: number; clusterKeys?: string[]; offset?: number; cursor?: { sendAt: number; recordUid: string; }; /** Bound initial reads: one map anchor or a small first page in the record sheet. */ limit?: number; } export declare const worldLocationViewport: LocationViewport; export declare const locationSources: readonly LocationSource[]; export declare function validLocation(latitude: unknown, longitude: unknown): boolean; /** The upstream viewport endpoint cannot reliably project a longitude span >180°. * Preserve date-line views instead of turning them into an unrelated world query. * At most three disjoint parts are needed, with no detail/record hydration. */ export declare function locationViewportParts({ bounds, zoom }: LocationViewport): LocationViewport[]; //# sourceMappingURL=location-search.d.ts.map