@excalidraw/excalidraw
Version:
Excalidraw as a React component
18 lines (17 loc) • 1.01 kB
TypeScript
import { ExcalidrawElement } from "../element/types";
import { AppState } from "../types";
import { ImportedDataState } from "./types";
import Library from "./library";
export declare const serializeAsJSON: (elements: readonly ExcalidrawElement[], appState: Partial<AppState>) => string;
export declare const saveAsJSON: (elements: readonly ExcalidrawElement[], appState: AppState) => Promise<{
fileHandle: import("@dwelle/browser-fs-access").FileSystemHandle | null;
}>;
export declare const loadFromJSON: (localAppState: AppState, localElements: readonly ExcalidrawElement[] | null) => Promise<import("./restore").RestoredDataState>;
export declare const isValidExcalidrawData: (data?: {
type?: any;
elements?: any;
appState?: any;
} | undefined) => data is ImportedDataState;
export declare const isValidLibrary: (json: any) => any;
export declare const saveLibraryAsJSON: (library: Library) => Promise<void>;
export declare const importLibraryFromJSON: (library: Library) => Promise<void>;