export type ClusterLayoutId = string | number; export interface ClusterLayoutRequest { ids: ClusterLayoutId[]; /** Packed lat/lng pairs (Float64 preferred for geo precision). */ coords: Float64Array | Float32Array; zoomBucket: number; /** Cluster radius in CSS/world pixels at the clustered zoom (Leaflet-style). */ gridSize: number; minPoints: number; clusterize: boolean; clusterMaxZoom: number; clusterMinZoom?: number; /** Simple CRS coordinates use x=lng/TILE_SIZE, y=lat/TILE_SIZE. */ simple?: boolean; } export interface ClusterLayoutCluster { key: string; lat: number; lng: number; ids: ClusterLayoutId[]; /** Set when `ids` were not expanded (lazy query). */ count?: number; nodeId?: number; } export interface ClusterLayoutSingle { id: ClusterLayoutId; lat: number; lng: number; } export interface ClusterLayoutResult { clusters: ClusterLayoutCluster[]; singles: ClusterLayoutSingle[]; } /** Compact hierarchical greedy index (Leaflet.markercluster / Supercluster family). */ export interface ClusterIndex { leafCount: number; nodeCount: number; maxZoom: number; minZoom: number; minPoints: number; radius: number; ids: ClusterLayoutId[]; x: Float64Array; y: Float64Array; lat: Float64Array; lng: Float64Array; weight: Uint32Array; zoom: Int8Array; parent: Int32Array; firstChild: Int32Array; nextSibling: Int32Array; /** Root node indices per zoom level `minZoom…maxZoom`. */ trees: Int32Array[]; } export declare const projectMercator01: (lat: number, lng: number) => { x: number; y: number; }; export declare const buildClusterIndex: (input: Omit) => ClusterIndex; export declare const collectClusterLeaves: (index: ClusterIndex, nodeId: number, out?: ClusterLayoutId[]) => ClusterLayoutId[]; export declare const queryClusterLayout: (index: ClusterIndex, zoomBucket: number, minPoints?: number, options?: { expandLeaves?: boolean; leafMask?: Uint8Array | null; }) => ClusterLayoutResult; export declare const buildClusterLayout: (input: ClusterLayoutRequest) => ClusterLayoutResult; export declare const buildGreedyClusterLayout: (input: ClusterLayoutRequest) => ClusterLayoutResult; export declare const encodeClusterIndex: (index: ClusterIndex) => { payload: Record; transfer: ArrayBuffer[]; }; export declare function decodeClusterIndex(data: Record): ClusterIndex; /** Runtime worker blob: same clustering functions as the main thread (no second copy in the bundle). */ export declare function clusterLayoutWorkerSource(): string; //# sourceMappingURL=cluster-layout.d.ts.map