import type { SceneNode, PointSceneNode } from "./types";
import type { RingBuffer } from "../realtime/RingBuffer";
import type { Quadtree } from "d3-quadtree";
import type { Datum } from "../charts/shared/datumTypes";
export interface HitResult {
    node: SceneNode;
    datum: any;
    x: number;
    y: number;
    distance: number;
}
export interface XHitResult {
    node: SceneNode;
    datum: any;
    x: number;
    y: number;
    y0?: number;
    group?: string;
    color?: string;
}
/**
 * Find the nearest scene node to the given pixel coordinates.
 * Dispatches to type-specific hit testers for optimal performance.
 *
 * When a quadtree spatial index is provided (for scatter/bubble charts with
 * many points), point hit testing routes through `findHitPointInQuadtree`,
 * which visits every candidate within the widened search radius (using
 * `maxPointRadius` so variable-size points like BubbleChart can't hide
 * behind a nearer non-hit). The visit is authoritative — when it returns
 * null, no point hit exists and the linear point loop is skipped.
 *
 * Non-point node types (line, rect, area, heatcell, candlestick) still
 * use the linear scan.
 */
export declare function findNearestNode(scene: SceneNode[], px: number, py: number, maxDistance?: number, pointQuadtree?: Quadtree<PointSceneNode> | null, maxPointRadius?: number): HitResult | null;
/**
 * Find all line/area nodes at a given X pixel coordinate.
 * For each node, interpolates the Y value at px using the path data.
 * Used for multi-point tooltip (show all series values at the hovered X).
 */
export declare function findAllNodesAtX(scene: SceneNode[], px: number, maxXDistance?: number): XHitResult[];
/**
 * Binary search for nearest point by time value in a RingBuffer.
 */
export declare function findNearestIndex(buf: RingBuffer<Datum>, targetTime: number, getTime: (d: Datum) => number): number;
