import type { Device } from '@mobilewright/core'; import type { ViewNode, ScreenSize } from '@mobilewright/protocol'; import { type ElementEntry } from './locator-derivation.js'; /** An element as the Inspector page receives it. */ export type ElementJson = ReturnType; /** One captured moment of the device screen. */ export interface InspectedScreen { screenshot: Buffer; screen: { width: number; height: number; scale: number; }; elements: ElementJson[]; /** SHA-1 over screenshot, screen and elements: equal etags mean an identical capture. */ etag: string; } /** JPEG at 60 is ~4x smaller than PNG for the same capture time. */ export declare const SCREENSHOT_MIME_TYPE = "image/jpeg"; /** * Capture the screen at `scale` (0 < scale <= 1). `screenSize` is injected so the caller can * serve it from a per-connection cache. */ export declare function inspectScreen(device: Device, scale: number, screenSize: () => Promise): Promise; declare function toElementJson({ node, locator, locators, depth }: ElementEntry, index: number, tree: ViewNode[]): { index: number; depth: number; type: string; label: string | null; text: string | null; bounds: import("@mobilewright/protocol").Bounds; isVisible: boolean; identifier: string | null; resourceId: string | null; placeholder: string | null; value: string | null; isEnabled: boolean; isSelected: boolean | null; isFocused: boolean | null; isChecked: boolean | null; isEditable: boolean; raw: Record | null; locator: import("./locator-derivation.js").Locator | null; locators: import("./locator-derivation.js").Locator[]; match: import("./locator-derivation.js").MatchPosition | null; }; export {}; //# sourceMappingURL=inspect-screen.d.ts.map