import { NodeContent } from "../../../core/types.js"; import { LiveTree } from "../livetree.js"; import { type LiveTreeRuntime } from "../runtime/livetree-runtime.js"; /** * Append a single `LiveTree` branch as children of the current `LiveTree`'s node, * preserving Hson → DOM linkage. * * The source branch's root `_hson_elem` wrapper is unwrapped via `unwrap_root_elem`, * so that only its meaningful children are appended. The source branch then * "adopts" the host roots from the current tree so subsequent operations * on the branch stay connected to the same host DOM. * * @this LiveTree * @param branch - The `LiveTree` branch whose node subtree will be appended. * @param index - Optional insertion index within the `_hson_elem` container of * the target node; normalized consistently with `appendNodesToTree`. * @returns The receiver `LiveTree` (for chaining). */ type AppendTreeLike = Pick; /** * Atomically attach an ordered forest of detached LiveTree branches. * * Validation scans the existing target once and every incoming subtree once. * DOM projection is staged in one fragment before graph ownership changes. * Either every branch is attached in order, or graph/DOM/mapping changes made * by this operation are rolled back and every branch remains detached. */ export declare function append_branches_atomic(target: TTree, branches: readonly AppendTreeLike[], index?: number): TTree; export declare function append_branch(this: TTree, branch: AppendTreeLike, index?: number): TTree; /** Append the exact ordered content captured by `detachContents()`. */ export declare function append_detached_content(target: TTree, content: NodeContent, sourceRuntime: LiveTreeRuntime): TTree; export {}; //# sourceMappingURL=appends.d.ts.map