excalidraw/src/data/types.ts

26 lines
606 B
TypeScript
Raw Normal View History

import { ExcalidrawElement } from "../element/types";
import { AppState, LibraryItems } from "../types";
export interface DataState {
type?: string;
version?: string;
source?: string;
elements: readonly ExcalidrawElement[];
2020-09-22 21:51:49 +02:00
appState: MarkOptional<AppState, "offsetTop" | "offsetLeft">;
}
export interface ImportedDataState {
type?: string;
version?: string;
source?: string;
elements?: DataState["elements"] | null;
appState?: Partial<DataState["appState"]> | null;
}
export interface LibraryData {
type?: string;
version?: number;
source?: string;
library?: LibraryItems;
}