import type { Position, WorkflowNode } from "../editor";
/**
 * Returns the transitive descendants of a node — i.e. every node whose
 * `parentId` chain ends at `nodeId`. Stable order (DFS). The root node
 * is NOT included.
 */
export declare function descendantsOf(nodeId: string, nodes: WorkflowNode[]): WorkflowNode[];
/**
 * Walk up the parent chain. Returns the first ancestor that satisfies
 * `predicate`, or undefined.
 */
export declare function findAncestor(node: WorkflowNode, nodes: WorkflowNode[], predicate: (n: WorkflowNode) => boolean): WorkflowNode | undefined;
/**
 * Clamp a proposed child position to its parent's bounding box. The
 * child is kept fully inside the parent — child's bottom-right corner
 * cannot exceed the parent's bottom-right.
 *
 * Returns the original position if the node has no parent or extent
 * isn't `'parent'`.
 */
export declare function clampToParentExtent(node: WorkflowNode, proposed: Position, nodes: WorkflowNode[]): Position;
/**
 * Hit-test which group node (if any) currently contains the given point.
 * Used by Alt-drop to re-parent a node into a group, and by drop-to-add
 * to scope a new node.
 */
export declare function findContainingGroup(point: Position, nodes: WorkflowNode[], exclude?: string[]): WorkflowNode | undefined;
//# sourceMappingURL=parenting.d.ts.map