@excalidraw/math
Version:
Excalidraw math functions
23 lines (22 loc) • 1.33 kB
TypeScript
import type { ExcalidrawElement, ExcalidrawFrameLikeElement, NonDeletedExcalidrawElement } from "@excalidraw/element/types";
import type { FileSystemHandle } from "./filesystem";
import type { ExportType } from "../scene/types";
import type { AppState, BinaryFiles } from "../types";
export { loadFromBlob } from "./blob";
export { loadFromJSON, saveAsJSON } from "./json";
export type ExportedElements = readonly NonDeletedExcalidrawElement[] & {
_brand: "exportedElements";
};
export declare const prepareElementsForExport: (elements: readonly ExcalidrawElement[], { selectedElementIds }: Pick<AppState, "selectedElementIds">, exportSelectionOnly: boolean) => {
exportingFrame: ExcalidrawFrameLikeElement | null;
exportedElements: ExportedElements;
};
export declare const exportCanvas: (type: Omit<ExportType, "backend">, elements: ExportedElements, appState: AppState, files: BinaryFiles, { exportBackground, exportPadding, viewBackgroundColor, name, fileHandle, exportingFrame, }: {
exportBackground: boolean;
exportPadding?: number | undefined;
viewBackgroundColor: string;
/** filename, if applicable */
name?: string | undefined;
fileHandle?: FileSystemHandle | null | undefined;
exportingFrame: ExcalidrawFrameLikeElement | null;
}) => Promise<FileSystemHandle | null | undefined>;