import type { ConnectionMode } from 'modern-idoc'; import type { Vector2Like } from 'modern-path2d'; import { Path2D } from 'modern-path2d'; export type { ConnectionMode }; export interface ConnectionEndpointBox { min: Vector2Like; size: Vector2Like; } export interface ConnectionEndpoint { /** world-space anchor point */ point: Vector2Like; /** outward unit direction the line leaves the anchor by; undefined = auto-infer */ dir?: Vector2Like; /** * Axis-aligned bbox of the endpoint's node; lets the orthogonal router avoid * drawing the connecting segment through the source/target body. */ bbox?: ConnectionEndpointBox; } export interface ConnectionRouteOptions { /** perpendicular stub length the line leaves each anchor by (px) */ stub?: number; } /** Nearest axis-aligned unit vector for an arbitrary delta. */ export declare function axisDir(dx: number, dy: number): Vector2Like; /** * Build the world-space path that routes a connection from `start` to `end` * under the given mode. */ export declare function routeConnection(mode: ConnectionMode, start: ConnectionEndpoint, end: ConnectionEndpoint, options?: ConnectionRouteOptions): Path2D;