///
import { KnownBlock, MessageAttachment, View } from '@slack/types';
import { Browser, ConnectOptions, LaunchOptions, Page, ScreenshotOptions } from 'puppeteer';
export declare type Screenshot = string | Buffer;
export interface BlockKitRendererOptions {
puppeteer?: LaunchOptions;
}
export default class BlockKitRenderer {
browser?: Browser;
page?: Page;
private readonly puppeteerOptions;
constructor(options?: BlockKitRendererOptions);
login(domain: string, email: string, password: string): Promise;
private getBuilderPage;
/**
* enables connecting to existing browser
*/
connect(options: ConnectOptions): Promise;
/**
* Emulates a Ctrl+A SelectAll key combination by dispatching custom keyboard
* events and using the results of those events to determine whether to call
* `document.execCommand( 'selectall' );`. This is necessary because Puppeteer
* does not emulate Ctrl+A SelectAll in macOS. Events are dispatched to ensure
* that any `Event#preventDefault` which would have normally occurred in the
* application as a result of Ctrl+A is respected.
*
* @link https://github.com/GoogleChrome/puppeteer/issues/1313
* @link https://w3c.github.io/uievents/tools/key-event-viewer.html
* @link https://github.com/puppeteer/puppeteer/issues/1313#issuecomment-480052880
*/
private emulateSelectAll;
private enterCode;
private selectMode;
private imageFromPayload;
imageFromBlocks(blocks: KnownBlock[], options?: ScreenshotOptions): Promise;
imageFromView(view: View, options?: ScreenshotOptions): Promise;
imageFromAttachments(attachments: MessageAttachment[], options?: ScreenshotOptions): Promise;
close(): Promise;
}