types.ts 606 B

12345678910111213141516171819202122232425
  1. import { ExcalidrawElement } from "../element/types";
  2. import { AppState, LibraryItems } from "../types";
  3. export interface DataState {
  4. type?: string;
  5. version?: string;
  6. source?: string;
  7. elements: readonly ExcalidrawElement[];
  8. appState: MarkOptional<AppState, "offsetTop" | "offsetLeft">;
  9. }
  10. export interface ImportedDataState {
  11. type?: string;
  12. version?: string;
  13. source?: string;
  14. elements?: DataState["elements"] | null;
  15. appState?: Partial<DataState["appState"]> | null;
  16. }
  17. export interface LibraryData {
  18. type?: string;
  19. version?: number;
  20. source?: string;
  21. library?: LibraryItems;
  22. }