UNPKG

@topgroup/diginext

Version:

A BUILD SERVER & CLI to deploy apps to any Kubernetes clusters.

67 lines 1.79 kB
/// <reference types="node" /> /// <reference types="node" /> import type { ScreenshotOptions } from "puppeteer"; export type CaptureScreenshotOptions = { /** * @default png */ type?: "png" | "jpeg" | "webp"; /** * The file path to save the image to. The screenshot type will be inferred * from file extension. If path is a relative path, then it is resolved * relative to current working directory. If no path is provided, the image * won't be saved to the disk. */ path?: string; /** * When `true`, takes a screenshot of the full page. * @default false */ fullPage?: boolean; /** * An object which specifies the clipping region of the page. */ clip?: { x: number; y: number; width: number; height: number; /** * @default 1 */ scale?: number; }; /** * Quality of the image, between 0-100. Not applicable to `png` images. */ quality?: number; /** * Hides default white background and allows capturing screenshots with transparency. * @default false */ omitBackground?: boolean; /** * Encoding of the image. * @default binary */ encoding?: "base64" | "binary"; /** * Capture the screenshot beyond the viewport. * @default true */ captureBeyondViewport?: boolean; /** * Capture the screenshot from the surface, rather than the view. * @default true */ fromSurface?: boolean; }; declare const screenshot: (url: string, options?: ScreenshotOptions) => Promise<{ name: string; url: string; path: string; buffer: Buffer; mime: string; }>; export default screenshot; //# sourceMappingURL=screenshot.d.ts.map