import Flatbush from 'flatbush'; import type { SnapBox } from '../snap'; /** Hard cap after a wide AABB hit — Flatbush.neighbors() keeps the closest K. */ export declare const SNAP_NEIGHBOR_K = 32; export type SnapLine = { value: number; min: number; max: number; kind: 'edge' | 'center'; }; /** Segmented Flatbush 2D index plus 1D X/Y snap-line trees. Built on pointerdown. */ export type SnapIndex = { tree: Flatbush; boxes: SnapBox[]; linesX: Flatbush; linesY: Flatbush; metaX: SnapLine[]; metaY: SnapLine[]; }; export declare const buildSnapIndex: (boxes: SnapBox[]) => SnapIndex; export declare const querySnap: (index: SnapIndex, moving: SnapBox, pad: number) => number[]; export declare const boxesNear: (index: SnapIndex, moving: SnapBox, pad: number) => SnapBox[]; export declare const queryLinesX: (index: SnapIndex, value: number, threshold: number, rangeMin: number, rangeMax: number) => SnapLine[]; export declare const queryLinesY: (index: SnapIndex, value: number, threshold: number, rangeMin: number, rangeMax: number) => SnapLine[];