/** * Check if a text node is visible (has a non-zero bounding rect). */ export declare function isVisibleTextNode(node: Text): boolean; /** * Check element visibility using modern Element.checkVisibility() API. * Falls back to manual checks for older browsers. * More comprehensive than basic isElementVisible() as it checks: * - visibility CSS property * - content-visibility CSS property * - Elements in user-agent shadow roots (like
) */ export declare function isElementStyleVisible(element: Element, style?: CSSStyleDeclaration): boolean; /** * Check if an element is visible. * An element is considered visible if it has a bounding box, * is not hidden via CSS, and is within the viewport. */ export declare function isElementVisible(element: Element): boolean; /** * Check if an element is at least threshold% visible in the viewport. * @param element The element to check * @param threshold The minimum ratio (0-1) of the element that must be visible. Default is 0 (any part visible). */ export declare function isInViewport(element: Element, threshold?: number): boolean; /** * Get the ratio of element visible in viewport (0-1). * Uses IntersectionObserver for accurate calculation. * Returns 0 for hidden elements, 1 for fully visible. */ export declare function getViewportRatio(element: Element): Promise; /** * Check if an element is interactable (visible, not covered by pointer-events:none). * This is separate from actionable - an element might be visible but not clickable. */ export declare function isElementInteractable(element: Element): boolean; /** * Check if an element is actionable (visible, enabled, not covered). */ export declare function isElementActionable(element: Element): boolean; /** * Get the center point of an element's bounding box. */ export declare function getElementCenter(element: Element): { x: number; y: number; }; /** * Get a clickable point on an element. * Tries the center first, then looks for an uncovered point. */ export declare function getClickablePoint(element: Element): { x: number; y: number; } | null; /** * Return type for computeElementBox function. */ export interface ElementBoxInfo { /** Whether the element is visible */ visible: boolean; /** Whether the element is inline (as opposed to block) */ inline: boolean; /** The cursor style for this element */ cursor?: string; } /** * Compute box information similar to Playwright's computeBox. * Returns visibility, inline vs block, and cursor style. * Returns null for disconnected elements. */ export declare function computeElementBox(element: Element): ElementBoxInfo | null; /** * Check if element receives pointer events. * Considers pointer-events CSS property and element visibility. * Returns false for hidden elements or elements with pointer-events: none. */ export declare function receivesPointerEvents(element: Element): boolean; //# sourceMappingURL=visibility.d.ts.map