import { ArrowBindingService } from '../elements/arrow-binding.service'; import { ConnectionPointsService } from '../elements/connection-points.service'; import { ConnectionUIService } from '../elements/connection-ui.service'; import { Direction, Point, PointerInfo, ToolType } from '../types'; import { BaseTool } from './base-tool'; import { CursorType } from '../types/cursors'; export declare enum SelectAction { None = 0, Select = 1, Move = 2, Resize = 3, Rotate = 4, BoxSelect = 5, /** Dragging an arrow/line endpoint handle to move, attach, or detach */ DragEndpoint = 6, /** Dragging the middle curve handle to adjust arrow curvature */ DragCurveHandle = 7 } export declare class SelectTool extends BaseTool { type: ToolType; baseCursor: CursorType; private currentAction; private startPoint; private currentHandle; private rotateStartAngle; private selectionCenter; private initialBoundingBox; private initialElementRotations; private initialElementStates; private rafId; private pendingPointerEvent; private dragEndpointId; private dragEndpointEnd; private dragEndpointSnap; private readonly SNAP_RADIUS; private dragCurveArrowId; private arrowBindingsDetached; private connectionPointsService; private arrowBindingService; private connectionUIService; setConnectionServices(cp: ConnectionPointsService, ab: ArrowBindingService, ui: ConnectionUIService): void; getCurrentAction(): SelectAction; getStartPoint(): Point | null; getCurrentHandle(): Direction | null; onDeactivate(): void; handlePointerDown(event: PointerInfo): void; handlePointerMove(event: PointerInfo): void; handlePointerUp(): void; private handleElementSelect; private handleMove; private handleResize; private handleRotate; /** * Handle dragging an endpoint of an arrow or line in real-time. * For arrows: attempts snap-to-shape with visual feedback. * For lines: free movement of the endpoint. */ private handleDragEndpoint; /** * Finalize the endpoint drag. * For arrows: commit binding if snapped, or detach. * For lines: no further action needed (already updated in real-time). */ private finalizeDragEndpoint; /** * Handle dragging the middle curve handle to adjust an arrow's curvature. * Converts the world-space pointer position to a quadratic control point. * Dragging away from the midpoint creates/modifies a quadratic bezier; * dragging back to the midpoint resets to straight. */ private handleDragCurveHandle; /** * Convert a world-space point to an element's local coordinate system, * accounting for translation, fill-box-centered rotation, and scale. * * The element uses `translate(x,y) rotate(rotation)` with CSS * `transform-box: fill-box; transform-origin: center`, so the rotation * pivot is the fill-box center, not the local origin. */ private worldToLocal; private handleBoxSelect; private initializeBoxSelect; private initializeResize; private initializeRotation; private checkElementInSelectionBox; private getResizeDirection; }