import { Page } from "@playwright/test"; /** * Utilities for interacting with the Foundry VTT WebGL Canvas. */ export declare class FoundryCanvas { protected page: Page; /** * Exposed as `protected` (not `private`) so consumers can subclass * FoundryCanvas to add their own page-driven interaction helpers * (e.g. touch/gesture helpers) while reusing the protected `page` and * public helpers such as `gridToPixels`. */ constructor(page: Page); /** * Converts grid coordinates (row, col) to viewport pixels. * @param x The grid X coordinate (column). * @param y The grid Y coordinate (row). */ gridToPixels(x: number, y: number): Promise<{ x: number; y: number; }>; /** * Clicks on a specific token by its ID. * @param tokenId The ID of the token. */ clickToken(tokenId: string): Promise; /** * Double-clicks on a specific token by its ID (usually opens sheet). * @param tokenId The ID of the token. */ doubleClickToken(tokenId: string): Promise; /** * Drags a token from its current position to a target grid coordinate. * @param tokenId The ID of the token to drag. * @param targetX The target grid X coordinate. * @param targetY The target grid Y coordinate. */ dragToken(tokenId: string, targetX: number, targetY: number): Promise; /** * Right-clicks on the canvas at a specific grid coordinate. */ rightClickGrid(x: number, y: number): Promise; /** * Targets a token (simulates the 'T' key). * @param tokenId The ID of the token to target. */ targetToken(tokenId: string): Promise; /** * Internal helper to get the viewport pixels for a token's center. */ private getTokenCanvasPosition; }