UNPKG

kepler.gl

Version:

kepler.gl is a webgl based application to visualize large scale location data in the browser

74 lines (73 loc) 3.39 kB
declare const domtoimage: { toSvg: typeof toSvg; toPng: typeof toPng; toJpeg: typeof toJpeg; toBlob: typeof toBlob; toPixelData: typeof toPixelData; impl: { fontFaces: { resolveAll: () => Promise<string>; impl: { readAll: () => Promise<any>; }; }; images: { inlineAll: (node: any) => any; impl: { newImage: (element: any) => { inline: (get: any) => Promise<unknown>; }; }; }; inliner: { inlineAll: (string: any, baseUrl: any, get: any) => Promise<any>; shouldProcess: (string: any) => boolean; impl: { readUrls: (string: any) => string[]; inline: (string: any, url: any, baseUrl: any, get: any) => Promise<any>; }; }; options: any; }; }; /** * @param {Node} node - The DOM Node object to render * @param {Object} options - Rendering options * @param {Function} [options.filter] - Should return true if passed node should be included in the output * (excluding node means excluding it's children as well). Not called on the root node. * @param {String} [options.bgcolor] - color for the background, any valid CSS color value. * @param {Number} [options.width] - width to be applied to node before rendering. * @param {Number} [options.height] - height to be applied to node before rendering. * @param {Object} [options.style] - an object whose properties to be copied to node's style before rendering. * @param {Number} [options.quality] - a Number between 0 and 1 indicating image quality (applicable to JPEG only), defaults to 1.0. * @param {boolean} [options.escapeXhtmlForWebpack] - whether to apply fix for uglify error in dom-to-image (should be true for webpack builds), defaults to true. * @param {String} [options.imagePlaceholder] - dataURL to use as a placeholder for failed images, default behaviour is to fail fast on images we can't fetch * @param {Boolean} [options.cacheBust] - set to true to cache bust by appending the time to the request url * @return {Promise} - A promise that is fulfilled with a SVG image data URL * */ declare function toSvg(node: any, options: any): Promise<string>; /** * @param {Node} node - The DOM Node object to render * @param {Object} options - Rendering options * @return {Promise} - A promise that is fulfilled with a Uint8Array containing RGBA pixel data. * */ declare function toPixelData(node: any, options: any): Promise<any>; /** * @param {Node} node - The DOM Node object to render * @param {Object} options - Rendering options * @return {Promise} - A promise that is fulfilled with a PNG image data URL * */ declare function toPng(node: any, options: any): Promise<any>; /** * @param {Node} node - The DOM Node object to render * @param {Object} options - Rendering options * @return {Promise} - A promise that is fulfilled with a JPEG image data URL * */ declare function toJpeg(node: any, options: any): Promise<any>; /** * @param {Node} node - The DOM Node object to render * @param {Object} options - Rendering options * @return {Promise} - A promise that is fulfilled with a PNG image blob * */ declare function toBlob(node: any, options: any): Promise<unknown>; export default domtoimage;