import { LayoutEdge, LayoutNode } from '../types/graph'; /** * Layout configuration options */ export interface HierarchicalLayoutOptions { /** Distance between levels (horizontal) */ levelSpacing?: number; /** Distance between nodes on same level (vertical) */ nodeSpacing?: number; /** Root node ID (if null, selects node with no incoming edges) */ rootNodeId?: string | null; /** Direction of tree growth */ direction?: "horizontal" | "vertical"; } /** * Positioned node with layout coordinates */ export interface HierarchicalPositionedNode { node: N; x: number; y: number; level: number; } /** * Layout result with positioned nodes */ export interface HierarchicalLayoutResult { /** Nodes with their positions */ nodes: HierarchicalPositionedNode[]; /** Maximum depth of the tree */ maxDepth: number; /** Root node ID used */ rootNodeId: string; } /** * Apply hierarchical layout to graph * @param nodes Graph nodes * @param edges Graph edges * @param options Layout configuration * @returns Positioned nodes with layout coordinates */ export declare const hierarchicalLayout: (nodes: LayoutNode[], edges: LayoutEdge[], options?: HierarchicalLayoutOptions) => HierarchicalLayoutResult; /** * Convert positioned nodes to a node position map for react-force-graph * @param layoutResult */ export declare const toNodePositionMap: (layoutResult: HierarchicalLayoutResult) => Map; //# sourceMappingURL=hierarchical-layout.d.ts.map