/** * Viewport Utilities * * Shared viewport parsing and configuration used by CDP and Playwright integrations. */ /** Default viewport dimensions */ export declare const DEFAULT_VIEWPORT: { width: number; height: number; }; /** Preset viewport configurations */ export declare const VIEWPORT_PRESETS: { readonly default: { readonly width: 1512; readonly height: 3000; }; readonly mobile: { readonly width: 375; readonly height: 667; }; readonly tablet: { readonly width: 768; readonly height: 1024; }; readonly desktop: { readonly width: 1440; readonly height: 900; }; }; export interface ViewportConfig { width: number; height: number; isMobile: boolean; } /** * Accepted viewport input shapes: * - 'mobile' | 'tablet' | 'desktop' — named preset * - `${number}x${number}` — explicit pixel dimensions, e.g. '1920x1080' * The bare `string` fallback stays for back-compat (parseViewport still * tolerates unknown values by falling back to the default), but new code * should use this narrower union to surface bad inputs at compile time. */ export type ViewportName = 'mobile' | 'tablet' | 'desktop' | `${number}x${number}`; /** * Parse a viewport string into width, height, and mobile flag. * * Accepts: * - Named presets: 'mobile', 'tablet', 'desktop' * - Custom dimensions: '1920x1080' * - undefined/null: returns default viewport * * @param viewportName - The viewport preset name or dimensions string * @param defaultViewport - Optional default viewport to use (defaults to VIEWPORT_PRESETS.default) * @returns Parsed viewport configuration */ export declare function parseViewport(viewportName?: ViewportName | string, defaultViewport?: { width: number; height: number; }): ViewportConfig; //# sourceMappingURL=viewportUtils.d.ts.map