@excalidraw/excalidraw
Version:
Excalidraw as a React component
14 lines (13 loc) • 973 B
TypeScript
import { ExcalidrawElement } from "../element/types";
import { AppState } from "../types";
import { ImportedDataState } from "./types";
declare type RestoredAppState = Omit<AppState, "offsetTop" | "offsetLeft" | "width" | "height">;
export declare const AllowedExcalidrawElementTypes: Record<ExcalidrawElement["type"], true>;
export declare type RestoredDataState = {
elements: ExcalidrawElement[];
appState: RestoredAppState;
};
export declare const restoreElements: (elements: ImportedDataState["elements"], localElements: readonly ExcalidrawElement[] | null | undefined) => ExcalidrawElement[];
export declare const restoreAppState: (appState: ImportedDataState["appState"], localAppState: Partial<AppState> | null | undefined) => RestoredAppState;
export declare const restore: (data: ImportedDataState | null, localAppState: Partial<AppState> | null | undefined, localElements: readonly ExcalidrawElement[] | null | undefined) => RestoredDataState;
export {};