import type { InspectResponse, Rect, Point } from './types'; export declare function sleep(ms: number): Promise; export declare function randomInt(min: number, max: number): number; export declare function randomFloat(min: number, max: number): number; /** * 在矩形区域内根据 randomRange 计算随机点。 * * @param rect 元素矩形(含 x, y, width, height) * @param randomRange 随机抖动范围因子,0 = 精确中心,1 = 矩形全范围,默认 0.55 * @returns 矩形内的随机坐标点 * * @example * ```typescript * const pt = getRectRandomPoint({ x: 100, y: 200, width: 50, height: 30 }); * // pt ≈ { x: 113, y: 208 } * ``` */ export declare function getRectRandomPoint(rect: Rect, randomRange?: number): Point; /** * 返回矩形几何中心点(非随机)。 * * @param rect 元素矩形(含 x, y, width, height) * @returns 矩形中心坐标 * * @example * ```typescript * const c = getRectCenter({ x: 100, y: 200, width: 50, height: 30 }); * // c === { x: 125, y: 215 } * ``` */ export declare function getRectCenter(rect: Rect): Point; /** * 将字符串转为 XPath 字符串字面量,正确处理引号转义。 * - 无引号 → 'value' * - 含双引号不含单引号 → 'value'(用单引号包裹) * - 含单引号不含双引号 → "value"(用双引号包裹) * - 同时含单双引号 → concat('part1', "'", 'part2') */ export declare function xpathStr(s: string | null | undefined): string; export declare function buildWindowSelector(selector: { title?: string; className?: string; processName?: string; processId?: number; }): string; /** * 为 inspect 结果的所有节点计算罗盘路径(compass 字段)。 * * 根元素 compass 为 ""(自身),其子节点为 "c0"、"c1", * 更深层为 "c1>0"、"c1>0>2" 等。 */ export declare function assignCompassPaths(result: InspectResponse): void;