/** * Copyright (c) 2025 Elara AI Pty Ltd * Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details. */ /** * Flowchart connect-gesture helpers — pure, React-free, unit-tested * (the Schematic pattern: geometry/derivation split out of the * composition root so the interactive seams stay small and reliable). */ import type { FlowchartModel } from "./model.js"; import type { FlowchartLayout, NodeRect, Pt } from "./layout.js"; /** Drop tolerance around a node's rect — releasing anywhere over the * node (or this close to it) lands the connection; nobody should have * to hit a 7px ring. */ export declare const DROP_PAD = 14; /** The node whose padded rect contains `p` (last match wins — matches * paint order), excluding the drag source. */ export declare function dropTargetAt(layout: FlowchartLayout, p: Pt, exclude?: string): string | null; /** The existing same-direction link between two nodes, if any — a drop * that would duplicate it is absorbed (the existing link pulses instead). * The reverse direction stays legal: back-links are semantically distinct. */ export declare function existingLink(model: FlowchartModel, from: string, to: string): string | undefined; /** The handle point of `rect` nearest to `p` — the draft line's snap * target while hovering a valid drop. */ export declare function nearestHandle(rect: NodeRect, p: Pt): Pt; /** The lane band containing `p` — the move-drag's highlight/drop target. */ export declare function laneAt(layout: FlowchartLayout, p: Pt): string | null; //# sourceMappingURL=connect.d.ts.map