export interface Point { x: number; y: number; } /** A connector's path both ways, so its highlight can draw from either end. */ export interface ConnectorPath { d: string; reversed: string; } /** * The corner radius every connector of a graph shares: a quarter of the least rise any connector * makes, and no more than half the narrowest gap between columns, so bends never overlap. */ export declare function arcRadius(minRise: number, colGap: number): number; /** * A connector from a node's right side to a later node's left: straight when level, otherwise * across, a bend, down or up, a bend and across. The bends sit in the gap before `end`'s column, so * a connector spanning several columns runs level until it nears its target. */ export declare function connectorPath(start: Point, end: Point, r: number, colGap: number): ConnectorPath; /** Which way a graph runs: ranks as columns, left to right, or as rows, top to bottom. */ export type GraphDirection = 'right' | 'down'; /** A connector from a node's bottom to a later row's node's top: `connectorPath` turned a quarter, * with the bends in the gap above `end`'s row. */ export declare function connectorPathDown(start: Point, end: Point, r: number, rowGap: number): ConnectorPath; /** A node's place in its graph level, as laid out. */ export interface Box { x: number; y: number; width: number; /** Where a graph runs down, its height, which places the connectors leaving its bottom. */ height?: number | undefined; } /** Whether two layouts put every node in the same place. */ export declare function sameBoxes(a: Map, b: Map): boolean; /** A connector as drawn, from a need's node to the node that needs it. */ export interface DrawnEdge { from: string; to: string; start: Point; end: Point; path: ConnectorPath; } /** * Every connector of a graph level, from its nodes' boxes, keyed by each node's first job. A node's * jobs share their needs, so its first job's needs are the node's; a need naming a node not laid out * draws nothing. `connectorY` is how far below a node's top its connectors meet it. */ export declare function routeConnectors(cols: string[][][], /** Whether columns are left empty between those drawn, so gaps between them differ. */ spaced: boolean, deps: Record, boxes: Map, connectorY: number, /** `down` joins a node's bottom to the top of one in a later row, at their middles. */ direction?: GraphDirection): DrawnEdge[];