2020-03-07 10:20:38 -05:00
|
|
|
import { ExcalidrawElement } from "../element/types";
|
2021-10-21 22:05:48 +02:00
|
|
|
import { AppState, BinaryFiles, LibraryItems } from "../types";
|
2021-04-10 19:17:49 +02:00
|
|
|
import type { cleanAppStateForExport } from "../appState";
|
2020-03-07 10:20:38 -05:00
|
|
|
|
2021-04-10 19:17:49 +02:00
|
|
|
export interface ExportedDataState {
|
|
|
|
type: string;
|
|
|
|
version: number;
|
|
|
|
source: string;
|
2020-03-07 10:20:38 -05:00
|
|
|
elements: readonly ExcalidrawElement[];
|
2021-04-10 19:17:49 +02:00
|
|
|
appState: ReturnType<typeof cleanAppStateForExport>;
|
2021-10-21 22:05:48 +02:00
|
|
|
files: BinaryFiles | undefined;
|
2020-09-22 21:51:49 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
export interface ImportedDataState {
|
|
|
|
type?: string;
|
2021-04-10 19:17:49 +02:00
|
|
|
version?: number;
|
2020-09-22 21:51:49 +02:00
|
|
|
source?: string;
|
2021-04-10 19:17:49 +02:00
|
|
|
elements?: readonly ExcalidrawElement[] | null;
|
|
|
|
appState?: Readonly<Partial<AppState>> | null;
|
2021-03-16 23:02:17 +05:30
|
|
|
scrollToContent?: boolean;
|
2021-04-21 23:38:24 +05:30
|
|
|
libraryItems?: LibraryItems;
|
2021-10-21 22:05:48 +02:00
|
|
|
files?: BinaryFiles;
|
2020-03-07 10:20:38 -05:00
|
|
|
}
|
2020-07-27 15:29:19 +03:00
|
|
|
|
2021-04-10 19:17:49 +02:00
|
|
|
export interface ExportedLibraryData {
|
|
|
|
type: string;
|
|
|
|
version: number;
|
|
|
|
source: string;
|
|
|
|
library: LibraryItems;
|
2020-07-27 15:29:19 +03:00
|
|
|
}
|
2021-04-10 19:17:49 +02:00
|
|
|
|
|
|
|
export interface ImportedLibraryData extends Partial<ExportedLibraryData> {}
|