import { type DOMElement } from "./dom.js"; import { type OutputLike } from "./output.js"; /** * Function type for transforming output text. */ export type OutputTransformer = (s: string, index: number) => string; /** * Renders a node and its children to a string suitable for screen readers. * * Traverses the DOM tree, handling different node types (tinky-text, tinky-box) * and constructing text with accessibility roles and states. * * @param node - The DOM element to render. * @param options - Configuration options. * @param options.parentRole - The accessibility role of the parent element. * @param options.skipStaticElements - Whether to skip static elements (e.g. * already rendered). * @returns The screen reader friendly string representation. */ export declare const renderNodeToScreenReaderOutput: (node: DOMElement, options?: { parentRole?: string; skipStaticElements?: boolean; }) => string; /** * Renders a DOM element and its children to the Output instance. * * It handles layout positioning, text wrapping, transformers, background, * borders, and clipping. * * @param node - The DOM element to render. * @param output - The Output instance to write to. * @param options - Rendering options. * @param options.offsetX - X offset for rendering. * @param options.offsetY - Y offset for rendering. * @param options.transformers - Array of text transformers. * @param options.skipStaticElements - Whether to skip static elements. */ export declare const renderNodeToOutput: (node: DOMElement, output: OutputLike, options: { offsetX?: number; offsetY?: number; transformers?: OutputTransformer[]; skipStaticElements: boolean; }) => void;