/** * @license * Copyright 2024 Nuraly, Laabidi Aymen * SPDX-License-Identifier: MIT */ import { ReactiveControllerHost } from 'lit'; import { BaseCanvasController } from './base.controller.js'; import { CanvasHost } from '../interfaces/index.js'; /** * State for marquee selection box */ export interface MarqueeState { startX: number; startY: number; currentX: number; currentY: number; } /** * Extended canvas host interface for marquee controller */ export interface MarqueeHost extends CanvasHost { marqueeState: MarqueeState | null; } /** * Controller for marquee (box) selection on canvas * Allows users to click and drag to select multiple nodes */ export declare class MarqueeController extends BaseCanvasController { /** * Check if marquee selection is currently active */ get isSelecting(): boolean; /** * Get the current marquee state */ get marqueeState(): MarqueeState | null; /** * Start marquee selection * Call this on mousedown on empty canvas area */ startSelection(e: MouseEvent, addToSelection?: boolean): void; /** * Update marquee selection box during drag * Call this on mousemove while marquee is active */ updateSelection(e: MouseEvent): void; /** * End marquee selection and select nodes/edges within the box * Call this on mouseup */ endSelection(addToSelection?: boolean): void; /** * Cancel marquee selection without applying selection */ cancelSelection(): void; /** * Get the normalized selection rectangle (always positive width/height) */ getSelectionRect(): { x: number; y: number; width: number; height: number; }; /** * Check if a node intersects with a rectangle * Uses the node's bounding box (position + estimated size) */ private nodeIntersectsRect; } //# sourceMappingURL=marquee.controller.d.ts.map