import { ComponentLike } from '../shared'; /** * DOM bounds for a captured node — the Ember `CapturedRenderNode['bounds']` * shape. `parentElement` is typed as `Node` (GXT does not depend on * `@simple-dom`); at runtime it is the parent element of `firstNode`. */ export interface CapturedRenderNodeBounds { parentElement: Node; firstNode: Node; lastNode: Node; } /** * The Ember `captureRenderTree` node shape (mirrors * `@glimmer/interfaces` `CapturedRenderNode`). */ export interface CapturedRenderNode { id: string; type: 'outlet' | 'engine' | 'route-template' | 'component' | 'modifier' | 'keyword'; name: string; args: { positional: unknown[]; named: Record; }; instance: unknown; template: string | null; bounds: CapturedRenderNodeBounds | null; children: CapturedRenderNode[]; } /** * Serialize a single GXT component (and its subtree) into a * {@link CapturedRenderNode}. Returns `null` for a nullish input. * * @param visited the set of components currently on the walk path — used to * break cycles / back-edges (see the guard below). Callers normally omit * this; {@link captureRenderTree} threads a shared set across roots. */ export declare function componentToRenderTree(component: ComponentLike, visited?: Set): CapturedRenderNode | null; /** * Capture the current render tree in the Ember `CapturedRenderNode[]` shape. * * @param roots optional explicit root components; when omitted the render * Root(s) are discovered from the tree ({@link findRoots}). */ export declare function captureRenderTree(roots?: ComponentLike[]): CapturedRenderNode[];