import type { ExecutionResult } from "./types.js"; import type { KeyboardState } from "./keyboardMetrics.js"; export interface ScreenStatePressable { label: string | null; component?: string | null; center: { x: number; y: number; }; bounds: { x: number; y: number; width: number; height: number; }; testID: string | null; icon?: string | null; isInput?: boolean; switchValue?: boolean | null; inputValue?: string | null; inputPlaceholder?: string | null; nearbyText?: string | null; blockedByOverlay?: boolean; onPressHint?: string | null; transformNote?: string | null; } export interface ScreenStateText { text: string; center: { x: number; y: number; }; bounds: { x: number; y: number; width: number; height: number; }; blockedByOverlay?: boolean; transformNote?: string | null; } export interface ScreenStateImage { src?: string | null; alt?: string | null; center: { x: number; y: number; }; bounds: { x: number; y: number; width: number; height: number; }; blockedByOverlay?: boolean; transformNote?: string | null; } export interface ScreenStateOverlay { type: "BottomSheet" | "Modal" | "Alert" | "ActionSheet" | "Unknown"; title: string | null; pressables: ScreenStatePressable[]; texts?: ScreenStateText[]; images?: ScreenStateImage[]; } export interface ScreenStateNativeOverlay { kind: "sheet" | "unknown"; component?: string; note: string; } export interface ScreenStateRoute { name: string; params: Record | null; stack: string[]; } export interface ScreenState { route: ScreenStateRoute | null; overlays: ScreenStateOverlay[]; pressables: ScreenStatePressable[]; texts: ScreenStateText[]; images: ScreenStateImage[]; nativeOverlay?: ScreenStateNativeOverlay | null; notes?: string[]; } export declare function markPressablesCoveredByOverlay(pressables: ScreenStatePressable[], overlayBounds: { x: number; y: number; width: number; height: number; }): ScreenStatePressable[]; export declare function applyIconHintToLabel(p: ScreenStatePressable): ScreenStatePressable; export type ItemCoordConverter = (item: { center: { x: number; y: number; }; bounds: { x: number; y: number; width: number; height: number; }; }) => { center: { x: number; y: number; }; frame: { x: number; y: number; width: number; height: number; }; }; export type PressableCoordConverter = ItemCoordConverter; export declare function formatTextEntry(t: ScreenStateText, convert?: ItemCoordConverter, opts?: { fullText?: boolean; }): string; export declare function formatImageEntry(img: ScreenStateImage, convert?: ItemCoordConverter): string; export declare function formatKeyboardLine(k: KeyboardState, pixelScale?: number): string; export declare function isBehindKeyboardPx(k: KeyboardState, yPx: number, pixelScale?: number): boolean; export declare function partitionByKeyboard(items: T[], k: KeyboardState): { reachable: T[]; blocked: T[]; }; export declare function formatSwitchState(p: ScreenStatePressable): string; export declare function formatInputState(p: ScreenStatePressable): string; export declare function formatRouteParams(params: Record | null | undefined, fullParams: boolean): string | null; export declare function formatTransformTag(el: { transformNote?: string | null; }): string; export declare function formatScreenStateSummary(ss: ScreenState, convert?: ItemCoordConverter, opts?: { pressablesOnly?: boolean; fullText?: boolean; fullParams?: boolean; keyboard?: KeyboardState; pixelScale?: number; }): string; export declare function describePressHandler(raw: unknown): string | null; export declare function describePropHandlers(raw: unknown): string | null; export declare function parseScreenStateResponse(raw: unknown): ScreenState | null; export interface PressabilityAuditCounts { markerTotal?: number; markerHiddenCount?: number; markerUnmeasurableCount?: number; markerSkipped?: Array<{ id: string; why: string; }>; collectedCount?: number; emittedCount?: number; emptyOverlayGroups?: string[]; droppedByGeometry?: number; droppedIds?: Array<{ id: string; why: string; }>; } export declare function formatPressabilityAudit(counts: PressabilityAuditCounts): string | null; export declare function getScreenState(options?: { device?: string; }): Promise; //# sourceMappingURL=screenState.d.ts.map