/** * Deterministic layered graph layout — pure, no React, no DOM, unit-tested. * * Nodes are assigned to columns by longest-path layering over the edges (a * source with no incoming edge sits in column 0; every other node sits one * column right of its deepest parent), then stacked and vertically centered * within each column on a shared axis so tiers read as clean columns in a * left-to-right dependency flow. Isolated nodes (no edges) fall into column 0. * The same graph always yields byte-identical positions. */ export interface XYPosition { x: number; y: number; } export interface PositionedId { id: string; position: XYPosition; } export interface LayoutOptions { /** Center-to-center horizontal distance between columns. */ columnGap?: number; /** Center-to-center vertical distance between stacked nodes. */ rowGap?: number; } interface Edgeish { source: string; target: string; } interface Nodeish { id: string; } /** * Position nodes into centered columns. Returns one `{ id, position }` per input * node (input order preserved), with `x` by column and `y` centered per column. */ export declare function layoutGraph(nodes: Nodeish[], edges: Edgeish[], opts?: LayoutOptions): PositionedId[]; export {};