import type { RefObject } from 'react'; /** * React Native Web renders a `View` as a DOM element, but the `View` type never * says so. Every crossing from a ref to a DOM capability goes through this * module so the unchecked cast exists once instead of at each call site. */ /** * A ref to whatever the host rendered: a `View` instance under React Native, an * element under React DOM. Naming neither type keeps this module importable * from a product that has no React Native types installed. */ export type HostRef = RefObject; export interface FocusTarget { focus(options?: { preventScroll?: boolean; }): void; } export interface AttributeHost { getAttribute(name: string): string | null; hasAttribute(name: string): boolean; removeAttribute(name: string): void; setAttribute(name: string, value: string): void; } export interface FocusableElement extends FocusTarget { disabled?: boolean; getAttribute(name: string): string | null; hasAttribute(name: string): boolean; } export interface QueryRoot { querySelectorAll(selector: string): Iterable; } export interface FocusContainer extends FocusableElement { querySelectorAll(selector: string): Iterable; } export interface TreeElement extends AttributeHost { children: ArrayLike; parentElement: TreeElement | null; } /** Reads the host object behind a ref, or null when the ref is empty. */ export declare function hostElement(ref: HostRef | undefined): object | null; export declare function asFocusTarget(ref: HostRef | undefined): FocusTarget | null; export declare function asFocusContainer(ref: HostRef | undefined): FocusContainer | null; export declare function asTreeElement(ref: HostRef | undefined): TreeElement | null; /** The element that currently holds DOM focus, or null outside a browser document. */ export declare function activeFocusTarget(): FocusTarget | null; //# sourceMappingURL=dom-boundary.d.ts.map