UNPKG

@jalez/react-flow-automated-layout

Version:

A React library for automated layout of nested node graphs with parent-child relationships using React Flow

17 lines (16 loc) 626 B
import { Node } from '@xyflow/react'; interface UseNodeMapsProps { nodes: Node[]; externalNodeIdWithNode?: Map<string, Node>; externalNodeParentIdMapWithChildIdSet?: Map<string, Set<string>>; noParentKey?: string; } export declare function useNodeMaps({ nodes, externalNodeIdWithNode, externalNodeParentIdMapWithChildIdSet, noParentKey }: UseNodeMapsProps): { nodeIdWithNode: Map<string, Node>; nodeParentIdMapWithChildIdSet: Map<string, Set<string>>; numberOfNodes: number; nodesLength: number; childrenInitialized: boolean; parentChildStructure: Record<string, number>; }; export {};