import type { SankeyLayoutEdge, SankeyLayoutNode } from '../types/sankey-internal.js'; interface ConnectedShapes { nodes: ReadonlySet; edges: ReadonlySet; } /** * A resolved layout selection ready for connected-shape computation. * * - `node`: the clicked layout node (source/target edges are already * populated by d3-sankey). * - `edge`: the clicked layout edge with its endpoint nodes already resolved * to objects by the caller; callers must guard with `isResolvedNode` before * passing here so the function never needs to cast. */ type ResolvedShape = { type: 'node'; node: SankeyLayoutNode; } | { type: 'edge'; edge: SankeyLayoutEdge; source: SankeyLayoutNode; target: SankeyLayoutNode; }; /** * Computes the 1-hop connected set for a resolved layout shape. * * - **Node**: the node, all of its direct source/target edges, and the * other-end nodes of those edges. Does not traverse further hops. * - **Edge**: the edge and its two endpoint nodes. * * Handles isolated nodes (no `sourceEdges`/`targetEdges`) without throwing. */ export declare function findConnectedShapes(shape: ResolvedShape): ConnectedShapes; export {}; //# sourceMappingURL=find-connected-shapes.d.ts.map