import type { FindElementMode } from './xpath-marker'; import type { AccelConfig, ImageMask } from './types'; /** * 生成模板缓存路径。 * * 默认目录:`<系统临时目录>/element-selector-cache//` * - 每次程序启动生成独立目录,不会跨会话污染 * - 程序退出后由 OS 清理临时目录 * * 文件名:基于 xpath 的 sha256 前 8 位。 */ export declare function resolveTemplatePath(xpath: string, templateDir?: string, templateName?: string): string; /** * 判断是否应使用图像加速。 * 默认禁用,必须用户显式传 accel: true 或 accel: { templateDir: ... }。 * `:all` 模式不支持(单模板无法匹配多元素)。 */ export declare function shouldUseImageAcceleration(mode: FindElementMode, accel?: AccelConfig): boolean; /** * 从 accel 参数提取 templateDir/templateName(兼容 boolean 和 object)。 */ export declare function getAccelConfig(accel?: AccelConfig): { templateDir?: string; templateName?: string; mask?: ImageMask; } | undefined;