/** * Element state checking system. * Implements Playwright's 8-state element checking with ARIA compliance. */ /** * Element states that can be checked. */ export type ElementState = 'visible' | 'hidden' | 'enabled' | 'disabled' | 'editable' | 'checked' | 'unchecked' | 'indeterminate' | 'stable'; /** * States that can be checked synchronously (without stability). */ export type SyncElementState = Exclude; /** * Result of checking an element's state. */ export interface StateCheckResult { /** Whether the element matches the requested state */ matches: boolean; /** The actual state received (for error messages) */ received?: string; /** Whether the element is a radio button (for checked/unchecked states) */ isRadio?: boolean; } /** * Check if element is in the specified state (synchronous, non-stable states only). * * @param element The element to check * @param state The state to check for * @returns StateCheckResult with matches and received values * @throws Error if the state requires capabilities the element doesn't have */ export declare function checkElementState(element: Element, state: ElementState): StateCheckResult; /** * Wait for element to reach specified state with timeout. * Uses polling for non-stable states, RAF for stable state. * * @param element The element to wait for * @param state The state to wait for * @param timeout Timeout in milliseconds (default: 5000) * @returns Promise resolving to StateCheckResult */ export declare function waitForElementState(element: Element, state: ElementState, timeout?: number): Promise; /** * Check multiple states at once. * Returns first failing state or success if all match. * Checks 'stable' state last since it's async in nature. * * @param element The element to check * @param states Array of states to check * @returns Object with success and optional missingState */ export declare function checkElementStates(element: Element, states: ElementState[]): Promise<{ success: boolean; missingState?: ElementState; }>; /** * Synchronous version of checkElementStates for non-stable states. * Does not handle 'stable' state properly - use checkElementStates for that. * * @param element The element to check * @param states Array of states to check (should not include 'stable') * @returns Object with success and optional missingState */ export declare function checkElementStatesSync(element: Element, states: SyncElementState[]): { success: boolean; missingState?: SyncElementState; }; //# sourceMappingURL=states.d.ts.map