/** * Excalidraw document assembly and validation. * @module render/excalidraw */ export type ExcalidrawDocument = { type: "excalidraw"; version: number; source: string; elements: any[]; appState: { viewBackgroundColor: string; gridSize: number | null; }; files: Record; }; /** * @typedef {object} ExcalidrawDocument * @property {"excalidraw"} type * @property {number} version * @property {string} source * @property {any[]} elements * @property {{ viewBackgroundColor: string, gridSize: number | null }} appState * @property {Record} files */ export declare const SOURCE_URL = "https://github.com/grethel-labs/excaliplant"; /** * Wrap canvas elements in an Excalidraw document. * @param {any[]} elements * @param {{ background: string }} options * @returns {ExcalidrawDocument} */ export declare function createDocument(elements: any[], options: { background: string; }): ExcalidrawDocument; /** * Assert the document is structurally sound: finite geometry, known element * types and colour values that cannot break out of SVG attributes. * @param {ExcalidrawDocument} doc * @returns {ExcalidrawDocument} */ export declare function validateDocument(doc: ExcalidrawDocument): ExcalidrawDocument;