import type { BoundingBox, SpatialObject } from '../core/types.js'; /** Index of objects the client has loaded. It is a lookup structure, not a data store or a security filter. */ export interface SpatialIndex { /** Inserts or replaces by objectId. */ insert(object: SpatialObject): void; remove(objectId: string): void; get(objectId: string): SpatialObject | undefined; /** Candidates whose bounds intersect `bounds`. Exact relation tests are the caller's job. */ search(bounds: BoundingBox): SpatialObject[]; all(): SpatialObject[]; clear(): void; readonly size: number; } export declare class RBushSpatialIndex implements SpatialIndex { private readonly tree; private readonly byId; insert(object: SpatialObject): void; remove(objectId: string): void; get(objectId: string): SpatialObject | undefined; search(bounds: BoundingBox): SpatialObject[]; all(): SpatialObject[]; clear(): void; get size(): number; }