/** * DOM Manipulation Tools * * Simple interaction tools that use spoken-word IDs (e.g., "apple_banana") * to identify and interact with elements found via search */ /** * DOM Manipulator - Provides interaction methods for elements * Uses spoken IDs to identify elements from the FuzzyDOMSearcher */ export declare class DOMManipulator { private getElementById; constructor(options: { getElementById: (id: string) => Element | null; }); /** * Click an element * @param params.id - Spoken ID (e.g., "apple_banana") * * Smart clicking: If target isn't directly clickable (e.g., hidden radio input), * automatically finds and clicks the nearest interactive parent (e.g., label) */ clickElement(params: { id: string; }): Promise<{ success: boolean; error?: string; }>; /** * Find the best clickable element (may traverse up to find interactive parent) * Handles cases like hidden radio inputs inside labels, custom form controls, etc. * * @param element - Starting element * @returns The element to actually click */ private findClickableElement; /** * Type text into an input element * @param params.id - Spoken ID * @param params.text - Text to type */ typeIntoElement(params: { id: string; text: string; }): Promise<{ success: boolean; error?: string; }>; /** * Press a key (e.g., Enter, Escape) * @param params.key - Key name (e.g., 'Enter', 'Escape', 'Tab') */ pressKey(params: { key: string; }): Promise<{ success: boolean; error?: string; }>; /** * Focus an element * @param params.id - Spoken ID */ focusElement(params: { id: string; }): Promise<{ success: boolean; error?: string; }>; /** * Scroll to an element * @param params.id - Spoken ID */ scrollToElement(params: { id: string; }): Promise<{ success: boolean; error?: string; }>; } //# sourceMappingURL=dom-tools.d.ts.map