import { SceneType } from './events'; import { Node, SceneChildrenKeyT, SceneNode } from '../interfaces'; export declare function findByKey(node: Node, key: string, attrs?: string[]): Node | undefined; export declare function traverseNodes(nodes: Node[], callback: (node: Node) => void): void; export declare function removeByKey(node: Node | SceneType, key?: string, attrs?: SceneChildrenKeyT[]): Node | SceneType; export declare function updateNode(node: Node | SceneType, key: string | SceneChildrenKeyT, props: Record): Node | SceneType; export declare function addNode(scene: Omit, element: Node, parentKey?: string | SceneChildrenKeyT): Omit; /** * Upsert node into the scene graph. * * @param node - The scene node (root of the scene graph) * @param newNode - The node to insert or update * @param parentKey - Determines where to insert/update the node: * - undefined: Use root's 'children' array, search all arrays for existing node * - SceneChildrenKeyT ('children', 'bgChildren', etc.): Use that specific array on root * - string (nodeKey): Find that node in the tree and use its 'children' array */ export declare function upsertNode(node: Omit, newNode: Node, parentKey?: string | SceneChildrenKeyT): Omit; /** * Find a node by key and return all parents (including the target node itself) - Iterative version * Returns array with root node as first element, target node as last element * Order: root -> parent -> ... -> target * @param node - Root node to search from * @param targetKey - Key of the target node to find * @param attrs - Attributes to search in (default: ALL_SCENE_KEYS) * @returns Array of parent nodes with {key, tag} or null if not found **/ export declare function findParentKeysIterative(node: Node, targetKey: string, attrs?: SceneChildrenKeyT[]): Array<{ key?: string; tag: string; }> | null;