Merge remote-tracking branch 'origin/master' into aakansha-custom-elements

This commit is contained in:
ad1992
2022-03-29 15:34:48 +05:30
43 changed files with 287 additions and 110 deletions

View File

@@ -63,6 +63,14 @@ export type BinaryFileMetadata = Omit<BinaryFileData, "dataURL">;
export type BinaryFiles = Record<ExcalidrawElement["id"], BinaryFileData>;
export type LastActiveToolBeforeEraser =
| typeof SHAPES[number]["value"]
| {
type: "custom";
customType: string;
}
| undefined;
export type AppState = {
isLoading: boolean;
errorMessage: string | null;
@@ -78,8 +86,15 @@ export type AppState = {
editingElement: NonDeletedExcalidrawElement | null;
editingLinearElement: LinearElementEditor | null;
activeTool:
| { type: typeof SHAPES[number]["value"] | "eraser" }
| { type: "custom"; customType: string };
| {
type: typeof SHAPES[number]["value"] | "eraser";
lastActiveToolBeforeEraser?: LastActiveToolBeforeEraser;
}
| {
type: "custom";
customType: string;
lastActiveToolBeforeEraser?: LastActiveToolBeforeEraser;
};
elementLocked: boolean;
penMode: boolean;
penDetected: boolean;
@@ -341,6 +356,7 @@ export type AppClassProperties = {
}
>;
files: BinaryFiles;
deviceType: App["deviceType"];
};
export type PointerDownState = Readonly<{