import type { NVL, Node, Relationship } from '@neo4j-nvl/base'; import { BaseInteraction } from './base'; /** * Options for the multi-select interaction handler to customize its behavior. */ export type BoxSelectInteractionOptions = { /** * If true, the selection will be applied when the mouse is released. * @default false */ selectOnRelease?: boolean; }; /** * Callbacks for the box select interaction handler. */ export type BoxSelectInteractionCallbacks = { /** * Called once when the user presses the mouse on the canvas, starting the box selection. * @param event - The original mouse event. */ onBoxStarted?: ((event: MouseEvent) => void) | boolean; /** * Called after once the user releases the mouse after multi-selecting. * @param selectionObject - The selected nodes and relationships. * @param event - The original mouse event. */ onBoxSelect?: (({ nodes, rels }: { nodes: Node[]; rels: Relationship[]; }, event: MouseEvent) => void) | boolean; }; /** * An interaction handler for multi-selecting nodes and relationships. * When dragging the cursor, it draws a box on the scene and all nodes and relationships inside the box are selected. * * For examples, head to the {@link https://neo4j.com/docs/nvl/current/interaction-handlers/#_boxselectinteraction Box Select Interaction documentation page}. */ export declare class BoxSelectInteraction extends BaseInteraction { private mousePosition; private startWorldPosition; private startClientPosition; private overlayRenderer; private isBoxSelecting; private boxSelectPending; /** * Creates a new instance of the multi-select interaction handler. * @param nvl - The NVL instance to attach the interaction handler to. * @param options - Options for the multi-select interaction handler to customize its behavior. */ constructor(nvl: NVL, options?: BoxSelectInteractionOptions); private handleMouseDown; private handleDrag; private getHitsInBox; private endBoxSelect; /** * Removes all related event listeners and the overlay renderer for the box. */ destroy(): void; private activateBoxSelect; private turnOnBoxSelect; }