types.ts 1008 B

1234567891011121314151617181920212223242526272829303132
  1. import { ExcalidrawElement } from "./element/types";
  2. import { SHAPES } from "./shapes";
  3. export type AppState = {
  4. draggingElement: ExcalidrawElement | null;
  5. resizingElement: ExcalidrawElement | null;
  6. multiElement: ExcalidrawElement | null;
  7. selectionElement: ExcalidrawElement | null;
  8. // element being edited, but not necessarily added to elements array yet
  9. // (e.g. text element when typing into the input)
  10. editingElement: ExcalidrawElement | null;
  11. elementType: typeof SHAPES[number]["value"];
  12. elementLocked: boolean;
  13. exportBackground: boolean;
  14. currentItemStrokeColor: string;
  15. currentItemBackgroundColor: string;
  16. currentItemFillStyle: string;
  17. currentItemStrokeWidth: number;
  18. currentItemRoughness: number;
  19. currentItemOpacity: number;
  20. currentItemFont: string;
  21. viewBackgroundColor: string;
  22. scrollX: number;
  23. scrollY: number;
  24. cursorX: number;
  25. cursorY: number;
  26. scrolledOutside: boolean;
  27. name: string;
  28. selectedId?: string;
  29. isResizing: boolean;
  30. lng: string;
  31. };