mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-09-04 08:07:00 +02:00
42 lines
1.0 KiB
TypeScript
42 lines
1.0 KiB
TypeScript
import { ExcalidrawElement } from "../element/types";
|
|
import {
|
|
AppState,
|
|
BinaryFiles,
|
|
LibraryItems,
|
|
LibraryItems_anyVersion,
|
|
} from "../types";
|
|
import type { cleanAppStateForTextExport } from "../appState";
|
|
import { VERSIONS } from "../constants";
|
|
|
|
export interface ExportedDataState {
|
|
type: string;
|
|
version: number;
|
|
source: string;
|
|
elements: readonly ExcalidrawElement[];
|
|
appState: ReturnType<typeof cleanAppStateForTextExport>;
|
|
files: BinaryFiles | undefined;
|
|
}
|
|
|
|
export interface ImportedDataState {
|
|
type?: string;
|
|
version?: number;
|
|
source?: string;
|
|
elements?: readonly ExcalidrawElement[] | null;
|
|
appState?: Readonly<Partial<AppState>> | null;
|
|
scrollToContent?: boolean;
|
|
libraryItems?: LibraryItems_anyVersion;
|
|
files?: BinaryFiles;
|
|
}
|
|
|
|
export interface ExportedLibraryData {
|
|
type: string;
|
|
version: typeof VERSIONS.excalidrawLibrary;
|
|
source: string;
|
|
libraryItems: LibraryItems;
|
|
}
|
|
|
|
export interface ImportedLibraryData extends Partial<ExportedLibraryData> {
|
|
/** @deprecated v1 */
|
|
library?: LibraryItems;
|
|
}
|