/** * Anything that can answer whether a node is beneath it. * * Structural rather than `Element`: a host that is not itself a DOM element — a view object that * owns a subtree and answers for it — reports containment perfectly well, and demanding the full * interface would put a cast at every call site to satisfy a type nothing here reads. */ export interface MdyOverlayRoot { contains(node: Node): boolean; } /** The roots an interaction may land on without being outside. */ export interface MdyOverlayBranch { /** * The widget's own root. Its descendants are inside, and so is whatever it portalled — the portal * is found from the root rather than supplied, so a renderer cannot forget it. */ readonly root: MdyOverlayRoot | null | undefined; /** Further roots this kind owns that the widget root does not contain. */ readonly also?: ReadonlyArray; } /** * Whether `target` lies within the overlay's logical branch. * * A target that is not a node is outside: an interaction the renderer could not locate is not one * that happened inside, and answering "inside" would be the safer-looking mistake — a popup that * never dismisses. */ export declare function overlayBranchContains(branch: MdyOverlayBranch, target: unknown): boolean;