mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-09-11 19:40:08 +02:00
Merge remote-tracking branch 'origin/master' into aakansha-custom-elements
This commit is contained in:
20
src/types.ts
20
src/types.ts
@@ -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<{
|
||||
|
Reference in New Issue
Block a user