import type { Selection } from 'd3'; import * as graphlib from 'dagre-d3-es/src/graphlib/index.js'; import type { ClusterNode, LayoutData, NonClusterNode, ShapeRenderOptions } from './types.js'; type D3Selection = Selection; interface LayoutElementGroups { clusters: D3Selection; edgePaths: D3Selection; edgeLabels: D3Selection; nodes: D3Selection; rootGroups: D3Selection; } export interface CreateLayoutElementGroupsOptions { edgePathsClass?: string; } export declare function createLayoutElementGroups(element: D3Selection, { edgePathsClass }?: CreateLayoutElementGroupsOptions): LayoutElementGroups; export declare function measureGroupLabel(nodesGroup: D3Selection, node: ClusterNode): Promise; export declare function insertMeasuredNode(nodesGroup: D3Selection, node: NonClusterNode, renderOptions: ShapeRenderOptions): Promise>; /** * Creates a graph by merging the graph construction and DOM element insertion. * * This function creates the graph, inserts the SVG groups (clusters, edgePaths, edgeLabels, nodes) * into the provided element, and uses `insertNode` to add nodes to the diagram. Node dimensions * are computed using each node's bounding box. * * @param element - The D3 selection in which the SVG groups are inserted. * @param data4Layout - The layout data containing nodes and edges. * @returns A promise resolving to an object containing the graph and the inserted groups. */ export declare function createGraphWithElements(element: D3Selection, data4Layout: LayoutData): Promise<{ graph: graphlib.Graph; groups: { clusters: D3Selection; edgePaths: D3Selection; edgeLabels: D3Selection; nodes: D3Selection; rootGroups: D3Selection; }; nodeElements: Map>; }>; export {};