import type { Page } from 'puppeteer-core'; export interface Size { width: number; height: number; } export interface SizeWindowResult { /** The layout viewport the page ended up with. */ viewport: Size; /** How the size was applied — emulation pins the page and hides window resizes. */ mode: 'window' | 'emulated'; /** Set when the window settled at a different size than asked for; the cause (display * bounds, a window-manager minimum, page zoom) is not distinguishable from here. */ clampedTo?: Size; } /** * Resize the real OS window so the page's viewport becomes `target`. * * Not page.setViewport(): that is Emulation.setDeviceMetricsOverride, which paints the * requested size into whatever window Chrome already has — anything wider renders off the * frame while screenshots (reading the emulated surface) still look correct. The override * also pins the viewport, so the page stops tracking window resizes. * * Headless has no window, so emulation is the only option there. */ export declare function sizeWindowToViewport(page: Page, target: Size, headless: boolean): Promise; //# sourceMappingURL=window-sizing.d.ts.map