/** * Element selector utility for the feedback widget. * * Creates a light-DOM overlay that lets users hover over and click * elements in the host page. The overlay uses all inline styles * (no classes) because it lives outside the shadow DOM. */ export interface SelectionOptions { /** The widget host element to ignore during selection. */ ignoreElement?: HTMLElement | null; /** Called when the user clicks an element. */ onSelect: (selector: string, label: string) => void; /** Called when the user presses Escape. */ onCancel: () => void; } /** * Generate a CSS selector that uniquely identifies the given element. * * Strategy (in order of preference): * 1. `#id` if the element has an id and it's unique * 2. `[data-testid="value"]` if the element has a data-testid attribute * 3. nth-child path from element up to body, max 5 segments */ export declare function generateCssSelector(element: Element): string; /** * Generate a human-readable label for an element. * * Format: `` + `#id` if present + `.className` for the first class. * Examples: `button.primary`, `div#main`, `section` */ export declare function getElementLabel(element: Element): string; /** * Start element selection mode. * * Attaches event listeners to the document and creates a highlight * overlay in the light DOM (document.body). The overlay uses all * inline styles because it lives outside the shadow root. * * @returns A cleanup function that removes event listeners and the overlay. */ export declare function startSelection(options: SelectionOptions): () => void; //# sourceMappingURL=element-selector.d.ts.map