import type { ColorSchemeApi } from '../coreUtils/colorScheme';
import type { DiagramModel } from './model';
import { Rect, Size, SizeProvider, Vector } from './geometry';
export interface ToSVGOptions {
    model: DiagramModel;
    sizeProvider: SizeProvider;
    colorSchemeApi: ColorSchemeApi;
    paper: SVGSVGElement;
    contentBox: Rect;
    getOverlaidElement: (id: string) => HTMLElement;
    preserveDimensions?: boolean;
    convertImagesToDataUris?: boolean;
    removeByCssSelectors?: ReadonlyArray<string>;
    watermarkSvg?: string;
    /** @default {x: 100, y: 100} */
    borderPadding?: Vector;
    /** @default false */
    addXmlHeader?: boolean;
}
/**
 * @category Core
 */
export declare function toSVG(options: ToSVGOptions): Promise<string>;
/**
 * Options for exporting the canvas as raster image Base64-encoded into data URL.
 *
 * @see {@link toDataURL}
 */
export interface ToDataURLOptions {
    /**
     * [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types)
     * for the exported raster image.
     *
     * Example: `image/png`, `image/jpeg`, ...
     *
     * @default "image/png"
     */
    mimeType?: string;
    /**
     * Target width of the exported image.
     *
     * If only `width` is specified, the height is set based on the diagram aspect ratio,
     * otherwise the diagram is fit into desired bounds with margins on sides.
     *
     * If neither `width` or `height` is set, the image size is computed automatically
     * based on `maxFallbackSize` with 2x maximum resolution for the content.
     */
    width?: number;
    /**
     * Target height of the exported image.
     *
     * If only `height` is specified, the height is set based on the diagram aspect ratio,
     * otherwise the diagram is fit into desired bounds with margins on sides.
     *
     * If neither `width` or `height` is set, the image size is computed automatically
     * based on `maxFallbackSize` with 2x maximum resolution for the content.
     */
    height?: number;
    /**
     * Background color for the exported image.
     *
     * If not specified, the background is transparent by default.
     */
    backgroundColor?: string;
    /**
     * Exported image quality value from 0.0 to 1.0
     * (applicable only for lossy image types).
     *
     * @default 1.0
     */
    quality?: number;
    /**
     * Maximum exported image size when neither `width` nor `height` is specified.
     *
     * @default {width: 4096, height: 4096}
     */
    maxFallbackSize?: Size;
}
/**
 * @category Core
 */
export declare function toDataURL(options: ToSVGOptions & ToDataURLOptions): Promise<string>;
export declare function fitRectKeepingAspectRatio(sourceWidth: number, sourceHeight: number, targetWidth: number | undefined, targetHeight: number | undefined): {
    width: number;
    height: number;
};
/**
 * Creates and returns a blob from a data URL (either base64 encoded or not).
 *
 * @param {string} dataURL The data URL to convert.
 * @return {Blob} A blob representing the array buffer data.
 */
export declare function dataURLToBlob(dataURL: string): Blob;
//# sourceMappingURL=toSvg.d.ts.map