import type { Datum } from "./datumTypes";
import type { Accessor } from "./types";
/**
 * Flatten a hierarchical data structure into an array of all nodes
 * by recursively traversing children.
 */
export declare function flattenHierarchy(data: Datum | null, childrenAccessor: string | ((d: Datum) => Datum[])): Array<Datum>;
/**
 * Infer nodes from edges when a nodes array is not provided.
 * Extracts unique source/target IDs and returns `{ id }` objects.
 * Returns the provided nodes array if it's non-empty.
 */
export declare function inferNodesFromEdges(nodes: Datum[] | undefined, edges: Datum[], sourceAccessor: string | ((d: Datum) => string), targetAccessor: string | ((d: Datum) => string)): Datum[];
/**
 * Convert a valueAccessor prop into a hierarchy sum function.
 * Used by TreeDiagram, Treemap, and CirclePack for d3-hierarchy's `.sum()`.
 */
export declare function resolveHierarchySum(valueAccessor: string | ((d: Datum) => number)): (d: Datum) => number;
/**
 * Create an edge style function for Sankey/Chord edge coloring.
 * Handles edgeColorBy = "source" | "target" | "gradient" | function.
 */
export declare function createEdgeStyleFn({ edgeColorBy, colorBy, colorScale, nodeStyleFn, edgeOpacity, baseStyle, }: {
    edgeColorBy: "source" | "target" | "gradient" | ((d: Datum) => string);
    colorBy: Accessor<string> | undefined;
    colorScale: ((v: string) => string) | undefined;
    nodeStyleFn: (d: Datum, index?: number) => Datum;
    edgeOpacity: number;
    baseStyle?: Record<string, string | number>;
}): (d: Datum) => Datum;
