/** * Click-code generation for the CLI `click` command. * * Extracted from sweetlink.ts so the generated code's DOM semantics are unit * testable against a real document (the CLI module runs its dispatch on * import, which makes importing helpers from it impractical in tests). */ /** * Elements considered click targets when resolving a bare `--text` match. * Used inside the generated code via `closest()`, so a text leaf inside a * button resolves to the button itself. */ export declare const INTERACTIVE_SELECTOR = "button, a[href], [role=\"button\"], input, summary, label, [onclick]"; export type ClickStrategy = /** Explicit selector scoping for --text: the user chose the candidates. */ { type: 'text'; text: string; selector: string; } /** * Bare `--text` (no selector). Naively filtering `*` by textContent * matches every ANCESTOR of the target too (html, body, main, …) and * index 0 clicks `` — a no-op. This strategy is leaf-most and * clickable-preferred instead. */ | { type: 'smart-text'; text: string; } | { type: 'selector'; selector: string; }; export declare function generateClickCode(strategy: ClickStrategy, index: number): string; //# sourceMappingURL=clickCode.d.ts.map