@excalidraw/excalidraw 0.14.2-cef6094 → 0.14.2-fe83e29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/excalidraw.development.js +37 -26
- package/dist/excalidraw.production.min.js +1 -1
- package/package.json +1 -1
- package/types/actions/actionAddToLibrary.d.ts +2 -1
- package/types/actions/actionBoundText.d.ts +2 -1
- package/types/actions/actionCanvas.d.ts +9 -9
- package/types/actions/actionClipboard.d.ts +3 -3
- package/types/actions/actionDeleteSelected.d.ts +3 -3
- package/types/actions/actionDuplicateSelection.d.ts +1 -1
- package/types/actions/actionExport.d.ts +8 -8
- package/types/actions/actionFinalize.d.ts +2 -2
- package/types/actions/actionLinearEditor.d.ts +2 -1
- package/types/actions/actionMenu.d.ts +3 -3
- package/types/actions/actionProperties.d.ts +13 -13
- package/types/actions/actionStyles.d.ts +1 -1
- package/types/actions/actionToggleGridMode.d.ts +1 -1
- package/types/actions/actionToggleLock.d.ts +1 -1
- package/types/actions/actionToggleStats.d.ts +1 -1
- package/types/actions/actionToggleViewMode.d.ts +1 -1
- package/types/actions/actionToggleZenMode.d.ts +1 -1
- package/types/actions/shortcuts.d.ts +1 -0
- package/types/actions/types.d.ts +1 -0
- package/types/components/BraveMeasureTextError.d.ts +2 -0
- package/types/components/ErrorDialog.d.ts +3 -2
- package/types/constants.d.ts +1 -0
- package/types/data/blob.d.ts +1 -0
- package/types/element/Hyperlink.d.ts +1 -1
- package/types/element/linearElementEditor.d.ts +1 -1
- package/types/element/mutateElement.d.ts +1 -0
- package/types/element/newElement.d.ts +1 -0
- package/types/element/textElement.d.ts +3 -0
- package/types/element/typeChecks.d.ts +1 -0
- package/types/element/types.d.ts +1 -0
- package/types/types.d.ts +3 -2
- package/types/utility-types.d.ts +22 -0
package/package.json
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
export declare const actionAddToLibrary: {
|
|
2
3
|
name: "addToLibrary";
|
|
3
4
|
trackEvent: {
|
|
@@ -16,7 +17,7 @@ export declare const actionAddToLibrary: {
|
|
|
16
17
|
} | null;
|
|
17
18
|
showWelcomeScreen: boolean;
|
|
18
19
|
isLoading: boolean;
|
|
19
|
-
errorMessage:
|
|
20
|
+
errorMessage: import("react").ReactNode;
|
|
20
21
|
draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
21
22
|
resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
22
23
|
multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { ExcalidrawElement, ExcalidrawLinearElement } from "../element/types";
|
|
2
3
|
export declare const actionUnbindText: {
|
|
3
4
|
name: "unbindText";
|
|
@@ -34,7 +35,7 @@ export declare const actionBindText: {
|
|
|
34
35
|
} | null;
|
|
35
36
|
showWelcomeScreen: boolean;
|
|
36
37
|
isLoading: boolean;
|
|
37
|
-
errorMessage:
|
|
38
|
+
errorMessage: import("react").ReactNode;
|
|
38
39
|
draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
39
40
|
resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
40
41
|
multiElement: import("../element/types").NonDeleted<ExcalidrawLinearElement> | null;
|
|
@@ -55,7 +55,7 @@ export declare const actionClearCanvas: {
|
|
|
55
55
|
} | null;
|
|
56
56
|
showWelcomeScreen: boolean;
|
|
57
57
|
isLoading: boolean;
|
|
58
|
-
errorMessage:
|
|
58
|
+
errorMessage: import("react").ReactNode;
|
|
59
59
|
draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
60
60
|
resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
61
61
|
multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
|
|
@@ -146,7 +146,7 @@ export declare const actionZoomIn: {
|
|
|
146
146
|
} | null;
|
|
147
147
|
showWelcomeScreen: boolean;
|
|
148
148
|
isLoading: boolean;
|
|
149
|
-
errorMessage:
|
|
149
|
+
errorMessage: import("react").ReactNode;
|
|
150
150
|
draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
151
151
|
resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
152
152
|
multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
|
|
@@ -263,7 +263,7 @@ export declare const actionZoomOut: {
|
|
|
263
263
|
} | null;
|
|
264
264
|
showWelcomeScreen: boolean;
|
|
265
265
|
isLoading: boolean;
|
|
266
|
-
errorMessage:
|
|
266
|
+
errorMessage: import("react").ReactNode;
|
|
267
267
|
draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
268
268
|
resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
269
269
|
multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
|
|
@@ -380,7 +380,7 @@ export declare const actionResetZoom: {
|
|
|
380
380
|
} | null;
|
|
381
381
|
showWelcomeScreen: boolean;
|
|
382
382
|
isLoading: boolean;
|
|
383
|
-
errorMessage:
|
|
383
|
+
errorMessage: import("react").ReactNode;
|
|
384
384
|
draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
385
385
|
resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
386
386
|
multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
|
|
@@ -496,7 +496,7 @@ export declare const actionZoomToSelected: {
|
|
|
496
496
|
} | null;
|
|
497
497
|
showWelcomeScreen: boolean;
|
|
498
498
|
isLoading: boolean;
|
|
499
|
-
errorMessage:
|
|
499
|
+
errorMessage: import("react").ReactNode;
|
|
500
500
|
draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
501
501
|
resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
502
502
|
multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
|
|
@@ -612,7 +612,7 @@ export declare const actionZoomToFit: {
|
|
|
612
612
|
} | null;
|
|
613
613
|
showWelcomeScreen: boolean;
|
|
614
614
|
isLoading: boolean;
|
|
615
|
-
errorMessage:
|
|
615
|
+
errorMessage: import("react").ReactNode;
|
|
616
616
|
draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
617
617
|
resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
618
618
|
multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
|
|
@@ -724,7 +724,7 @@ export declare const actionToggleTheme: {
|
|
|
724
724
|
} | null;
|
|
725
725
|
showWelcomeScreen: boolean;
|
|
726
726
|
isLoading: boolean;
|
|
727
|
-
errorMessage:
|
|
727
|
+
errorMessage: import("react").ReactNode;
|
|
728
728
|
draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
729
729
|
resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
730
730
|
multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
|
|
@@ -851,7 +851,7 @@ export declare const actionToggleEraserTool: {
|
|
|
851
851
|
} | null;
|
|
852
852
|
showWelcomeScreen: boolean;
|
|
853
853
|
isLoading: boolean;
|
|
854
|
-
errorMessage:
|
|
854
|
+
errorMessage: import("react").ReactNode;
|
|
855
855
|
draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
856
856
|
resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
857
857
|
multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
|
|
@@ -962,7 +962,7 @@ export declare const actionToggleHandTool: {
|
|
|
962
962
|
} | null;
|
|
963
963
|
showWelcomeScreen: boolean;
|
|
964
964
|
isLoading: boolean;
|
|
965
|
-
errorMessage:
|
|
965
|
+
errorMessage: import("react").ReactNode;
|
|
966
966
|
draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
967
967
|
resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
968
968
|
multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
|
|
@@ -43,7 +43,7 @@ export declare const actionCut: {
|
|
|
43
43
|
} | null;
|
|
44
44
|
showWelcomeScreen: boolean;
|
|
45
45
|
isLoading: boolean;
|
|
46
|
-
errorMessage:
|
|
46
|
+
errorMessage: import("react").ReactNode;
|
|
47
47
|
draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
48
48
|
resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
49
49
|
multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
|
|
@@ -177,7 +177,7 @@ export declare const actionCut: {
|
|
|
177
177
|
} | null;
|
|
178
178
|
showWelcomeScreen: boolean;
|
|
179
179
|
isLoading: boolean;
|
|
180
|
-
errorMessage:
|
|
180
|
+
errorMessage: import("react").ReactNode;
|
|
181
181
|
draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
182
182
|
resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
183
183
|
multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
|
|
@@ -294,7 +294,7 @@ export declare const actionCut: {
|
|
|
294
294
|
} | null;
|
|
295
295
|
showWelcomeScreen: boolean;
|
|
296
296
|
isLoading: boolean;
|
|
297
|
-
errorMessage:
|
|
297
|
+
errorMessage: import("react").ReactNode;
|
|
298
298
|
draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
299
299
|
resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
300
300
|
selectionElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
@@ -19,7 +19,7 @@ export declare const actionDeleteSelected: {
|
|
|
19
19
|
} | null;
|
|
20
20
|
showWelcomeScreen: boolean;
|
|
21
21
|
isLoading: boolean;
|
|
22
|
-
errorMessage:
|
|
22
|
+
errorMessage: import("react").ReactNode;
|
|
23
23
|
draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
24
24
|
resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
25
25
|
multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
|
|
@@ -153,7 +153,7 @@ export declare const actionDeleteSelected: {
|
|
|
153
153
|
} | null;
|
|
154
154
|
showWelcomeScreen: boolean;
|
|
155
155
|
isLoading: boolean;
|
|
156
|
-
errorMessage:
|
|
156
|
+
errorMessage: import("react").ReactNode;
|
|
157
157
|
draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
158
158
|
resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
159
159
|
multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
|
|
@@ -270,7 +270,7 @@ export declare const actionDeleteSelected: {
|
|
|
270
270
|
} | null;
|
|
271
271
|
showWelcomeScreen: boolean;
|
|
272
272
|
isLoading: boolean;
|
|
273
|
-
errorMessage:
|
|
273
|
+
errorMessage: import("react").ReactNode;
|
|
274
274
|
draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
275
275
|
resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
276
276
|
selectionElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
@@ -9,7 +9,7 @@ export declare const actionDuplicateSelection: {
|
|
|
9
9
|
perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>) => false | {
|
|
10
10
|
commitToHistory: true;
|
|
11
11
|
elements?: readonly ExcalidrawElement[] | null | undefined;
|
|
12
|
-
appState?: MarkOptional<AppState, "width" | "height" | "offsetTop" | "offsetLeft"> | null | undefined;
|
|
12
|
+
appState?: import("../utility-types").MarkOptional<AppState, "width" | "height" | "offsetTop" | "offsetLeft"> | null | undefined;
|
|
13
13
|
files?: import("../types").BinaryFiles | null | undefined;
|
|
14
14
|
syncHistory?: boolean | undefined;
|
|
15
15
|
replaceFiles?: boolean | undefined;
|
|
@@ -13,7 +13,7 @@ export declare const actionChangeProjectName: {
|
|
|
13
13
|
} | null;
|
|
14
14
|
showWelcomeScreen: boolean;
|
|
15
15
|
isLoading: boolean;
|
|
16
|
-
errorMessage:
|
|
16
|
+
errorMessage: import("react").ReactNode;
|
|
17
17
|
draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
18
18
|
resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
19
19
|
multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
|
|
@@ -129,7 +129,7 @@ export declare const actionChangeExportScale: {
|
|
|
129
129
|
} | null;
|
|
130
130
|
showWelcomeScreen: boolean;
|
|
131
131
|
isLoading: boolean;
|
|
132
|
-
errorMessage:
|
|
132
|
+
errorMessage: import("react").ReactNode;
|
|
133
133
|
draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
134
134
|
resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
135
135
|
multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
|
|
@@ -245,7 +245,7 @@ export declare const actionChangeExportBackground: {
|
|
|
245
245
|
} | null;
|
|
246
246
|
showWelcomeScreen: boolean;
|
|
247
247
|
isLoading: boolean;
|
|
248
|
-
errorMessage:
|
|
248
|
+
errorMessage: import("react").ReactNode;
|
|
249
249
|
draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
250
250
|
resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
251
251
|
multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
|
|
@@ -361,7 +361,7 @@ export declare const actionChangeExportEmbedScene: {
|
|
|
361
361
|
} | null;
|
|
362
362
|
showWelcomeScreen: boolean;
|
|
363
363
|
isLoading: boolean;
|
|
364
|
-
errorMessage:
|
|
364
|
+
errorMessage: import("react").ReactNode;
|
|
365
365
|
draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
366
366
|
resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
367
367
|
multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
|
|
@@ -481,7 +481,7 @@ export declare const actionSaveToActiveFile: {
|
|
|
481
481
|
} | null;
|
|
482
482
|
showWelcomeScreen: boolean;
|
|
483
483
|
isLoading: boolean;
|
|
484
|
-
errorMessage:
|
|
484
|
+
errorMessage: import("react").ReactNode;
|
|
485
485
|
draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
486
486
|
resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
487
487
|
multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
|
|
@@ -595,7 +595,7 @@ export declare const actionSaveFileToDisk: {
|
|
|
595
595
|
} | null;
|
|
596
596
|
showWelcomeScreen: boolean;
|
|
597
597
|
isLoading: boolean;
|
|
598
|
-
errorMessage:
|
|
598
|
+
errorMessage: import("react").ReactNode;
|
|
599
599
|
draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
600
600
|
resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
601
601
|
multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
|
|
@@ -726,7 +726,7 @@ export declare const actionLoadScene: {
|
|
|
726
726
|
} | null;
|
|
727
727
|
showWelcomeScreen: boolean;
|
|
728
728
|
isLoading: boolean;
|
|
729
|
-
errorMessage:
|
|
729
|
+
errorMessage: import("react").ReactNode;
|
|
730
730
|
draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
731
731
|
resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
732
732
|
multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
|
|
@@ -935,7 +935,7 @@ export declare const actionExportWithDarkMode: {
|
|
|
935
935
|
} | null;
|
|
936
936
|
showWelcomeScreen: boolean;
|
|
937
937
|
isLoading: boolean;
|
|
938
|
-
errorMessage:
|
|
938
|
+
errorMessage: import("react").ReactNode;
|
|
939
939
|
draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
940
940
|
resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
941
941
|
multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
|
|
@@ -16,7 +16,7 @@ export declare const actionFinalize: {
|
|
|
16
16
|
} | null;
|
|
17
17
|
showWelcomeScreen: boolean;
|
|
18
18
|
isLoading: boolean;
|
|
19
|
-
errorMessage:
|
|
19
|
+
errorMessage: import("react").ReactNode;
|
|
20
20
|
draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
21
21
|
resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
22
22
|
multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
|
|
@@ -141,7 +141,7 @@ export declare const actionFinalize: {
|
|
|
141
141
|
} | null;
|
|
142
142
|
showWelcomeScreen: boolean;
|
|
143
143
|
isLoading: boolean;
|
|
144
|
-
errorMessage:
|
|
144
|
+
errorMessage: import("react").ReactNode;
|
|
145
145
|
resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
146
146
|
selectionElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
147
147
|
isBindingEnabled: boolean;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { LinearElementEditor } from "../element/linearElementEditor";
|
|
2
3
|
import { ExcalidrawLinearElement } from "../element/types";
|
|
3
4
|
export declare const actionToggleLinearEditor: {
|
|
@@ -16,7 +17,7 @@ export declare const actionToggleLinearEditor: {
|
|
|
16
17
|
} | null;
|
|
17
18
|
showWelcomeScreen: boolean;
|
|
18
19
|
isLoading: boolean;
|
|
19
|
-
errorMessage:
|
|
20
|
+
errorMessage: import("react").ReactNode;
|
|
20
21
|
draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
21
22
|
resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
22
23
|
multiElement: import("../element/types").NonDeleted<ExcalidrawLinearElement> | null;
|
|
@@ -14,7 +14,7 @@ export declare const actionToggleCanvasMenu: {
|
|
|
14
14
|
} | null;
|
|
15
15
|
showWelcomeScreen: boolean;
|
|
16
16
|
isLoading: boolean;
|
|
17
|
-
errorMessage:
|
|
17
|
+
errorMessage: import("react").ReactNode;
|
|
18
18
|
draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
19
19
|
resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
20
20
|
multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
|
|
@@ -129,7 +129,7 @@ export declare const actionToggleEditMenu: {
|
|
|
129
129
|
} | null;
|
|
130
130
|
showWelcomeScreen: boolean;
|
|
131
131
|
isLoading: boolean;
|
|
132
|
-
errorMessage:
|
|
132
|
+
errorMessage: import("react").ReactNode;
|
|
133
133
|
draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
134
134
|
resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
135
135
|
multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
|
|
@@ -260,7 +260,7 @@ export declare const actionShortcuts: {
|
|
|
260
260
|
} | null;
|
|
261
261
|
showWelcomeScreen: boolean;
|
|
262
262
|
isLoading: boolean;
|
|
263
|
-
errorMessage:
|
|
263
|
+
errorMessage: import("react").ReactNode;
|
|
264
264
|
draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
265
265
|
resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
266
266
|
multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
|
|
@@ -31,7 +31,7 @@ export declare const actionChangeFillStyle: {
|
|
|
31
31
|
} | null;
|
|
32
32
|
showWelcomeScreen: boolean;
|
|
33
33
|
isLoading: boolean;
|
|
34
|
-
errorMessage:
|
|
34
|
+
errorMessage: import("react").ReactNode;
|
|
35
35
|
draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
36
36
|
resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
37
37
|
multiElement: import("../element/types").NonDeleted<ExcalidrawLinearElement> | null;
|
|
@@ -145,7 +145,7 @@ export declare const actionChangeStrokeWidth: {
|
|
|
145
145
|
} | null;
|
|
146
146
|
showWelcomeScreen: boolean;
|
|
147
147
|
isLoading: boolean;
|
|
148
|
-
errorMessage:
|
|
148
|
+
errorMessage: import("react").ReactNode;
|
|
149
149
|
draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
150
150
|
resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
151
151
|
multiElement: import("../element/types").NonDeleted<ExcalidrawLinearElement> | null;
|
|
@@ -259,7 +259,7 @@ export declare const actionChangeSloppiness: {
|
|
|
259
259
|
} | null;
|
|
260
260
|
showWelcomeScreen: boolean;
|
|
261
261
|
isLoading: boolean;
|
|
262
|
-
errorMessage:
|
|
262
|
+
errorMessage: import("react").ReactNode;
|
|
263
263
|
draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
264
264
|
resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
265
265
|
multiElement: import("../element/types").NonDeleted<ExcalidrawLinearElement> | null;
|
|
@@ -373,7 +373,7 @@ export declare const actionChangeStrokeStyle: {
|
|
|
373
373
|
} | null;
|
|
374
374
|
showWelcomeScreen: boolean;
|
|
375
375
|
isLoading: boolean;
|
|
376
|
-
errorMessage:
|
|
376
|
+
errorMessage: import("react").ReactNode;
|
|
377
377
|
draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
378
378
|
resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
379
379
|
multiElement: import("../element/types").NonDeleted<ExcalidrawLinearElement> | null;
|
|
@@ -487,7 +487,7 @@ export declare const actionChangeOpacity: {
|
|
|
487
487
|
} | null;
|
|
488
488
|
showWelcomeScreen: boolean;
|
|
489
489
|
isLoading: boolean;
|
|
490
|
-
errorMessage:
|
|
490
|
+
errorMessage: import("react").ReactNode;
|
|
491
491
|
draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
492
492
|
resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
493
493
|
multiElement: import("../element/types").NonDeleted<ExcalidrawLinearElement> | null;
|
|
@@ -601,7 +601,7 @@ export declare const actionChangeFontSize: {
|
|
|
601
601
|
} | null;
|
|
602
602
|
showWelcomeScreen: boolean;
|
|
603
603
|
isLoading: boolean;
|
|
604
|
-
errorMessage:
|
|
604
|
+
errorMessage: import("react").ReactNode;
|
|
605
605
|
draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
606
606
|
resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
607
607
|
multiElement: import("../element/types").NonDeleted<ExcalidrawLinearElement> | null;
|
|
@@ -715,7 +715,7 @@ export declare const actionDecreaseFontSize: {
|
|
|
715
715
|
} | null;
|
|
716
716
|
showWelcomeScreen: boolean;
|
|
717
717
|
isLoading: boolean;
|
|
718
|
-
errorMessage:
|
|
718
|
+
errorMessage: import("react").ReactNode;
|
|
719
719
|
draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
720
720
|
resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
721
721
|
multiElement: import("../element/types").NonDeleted<ExcalidrawLinearElement> | null;
|
|
@@ -829,7 +829,7 @@ export declare const actionIncreaseFontSize: {
|
|
|
829
829
|
} | null;
|
|
830
830
|
showWelcomeScreen: boolean;
|
|
831
831
|
isLoading: boolean;
|
|
832
|
-
errorMessage:
|
|
832
|
+
errorMessage: import("react").ReactNode;
|
|
833
833
|
draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
834
834
|
resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
835
835
|
multiElement: import("../element/types").NonDeleted<ExcalidrawLinearElement> | null;
|
|
@@ -943,7 +943,7 @@ export declare const actionChangeFontFamily: {
|
|
|
943
943
|
} | null;
|
|
944
944
|
showWelcomeScreen: boolean;
|
|
945
945
|
isLoading: boolean;
|
|
946
|
-
errorMessage:
|
|
946
|
+
errorMessage: import("react").ReactNode;
|
|
947
947
|
draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
948
948
|
resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
949
949
|
multiElement: import("../element/types").NonDeleted<ExcalidrawLinearElement> | null;
|
|
@@ -1057,7 +1057,7 @@ export declare const actionChangeTextAlign: {
|
|
|
1057
1057
|
} | null;
|
|
1058
1058
|
showWelcomeScreen: boolean;
|
|
1059
1059
|
isLoading: boolean;
|
|
1060
|
-
errorMessage:
|
|
1060
|
+
errorMessage: import("react").ReactNode;
|
|
1061
1061
|
draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
1062
1062
|
resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
1063
1063
|
multiElement: import("../element/types").NonDeleted<ExcalidrawLinearElement> | null;
|
|
@@ -1172,7 +1172,7 @@ export declare const actionChangeVerticalAlign: {
|
|
|
1172
1172
|
} | null;
|
|
1173
1173
|
showWelcomeScreen: boolean;
|
|
1174
1174
|
isLoading: boolean;
|
|
1175
|
-
errorMessage:
|
|
1175
|
+
errorMessage: import("react").ReactNode;
|
|
1176
1176
|
draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
1177
1177
|
resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
1178
1178
|
multiElement: import("../element/types").NonDeleted<ExcalidrawLinearElement> | null;
|
|
@@ -1287,7 +1287,7 @@ export declare const actionChangeRoundness: {
|
|
|
1287
1287
|
} | null;
|
|
1288
1288
|
showWelcomeScreen: boolean;
|
|
1289
1289
|
isLoading: boolean;
|
|
1290
|
-
errorMessage:
|
|
1290
|
+
errorMessage: import("react").ReactNode;
|
|
1291
1291
|
draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
1292
1292
|
resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
1293
1293
|
multiElement: import("../element/types").NonDeleted<ExcalidrawLinearElement> | null;
|
|
@@ -1403,7 +1403,7 @@ export declare const actionChangeArrowhead: {
|
|
|
1403
1403
|
} | null;
|
|
1404
1404
|
showWelcomeScreen: boolean;
|
|
1405
1405
|
isLoading: boolean;
|
|
1406
|
-
errorMessage:
|
|
1406
|
+
errorMessage: import("react").ReactNode;
|
|
1407
1407
|
draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
1408
1408
|
resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
1409
1409
|
multiElement: import("../element/types").NonDeleted<ExcalidrawLinearElement> | null;
|
|
@@ -17,7 +17,7 @@ export declare const actionCopyStyles: {
|
|
|
17
17
|
} | null;
|
|
18
18
|
showWelcomeScreen: boolean;
|
|
19
19
|
isLoading: boolean;
|
|
20
|
-
errorMessage:
|
|
20
|
+
errorMessage: import("react").ReactNode;
|
|
21
21
|
draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
22
22
|
resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
23
23
|
multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
|
|
@@ -17,7 +17,7 @@ export declare const actionToggleGridMode: {
|
|
|
17
17
|
} | null;
|
|
18
18
|
showWelcomeScreen: boolean;
|
|
19
19
|
isLoading: boolean;
|
|
20
|
-
errorMessage:
|
|
20
|
+
errorMessage: import("react").ReactNode;
|
|
21
21
|
draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
22
22
|
resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
23
23
|
multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
|
|
@@ -16,7 +16,7 @@ export declare const actionToggleLock: {
|
|
|
16
16
|
} | null;
|
|
17
17
|
showWelcomeScreen: boolean;
|
|
18
18
|
isLoading: boolean;
|
|
19
|
-
errorMessage:
|
|
19
|
+
errorMessage: import("react").ReactNode;
|
|
20
20
|
draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
21
21
|
resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
22
22
|
multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
|
|
@@ -15,7 +15,7 @@ export declare const actionToggleStats: {
|
|
|
15
15
|
} | null;
|
|
16
16
|
showWelcomeScreen: boolean;
|
|
17
17
|
isLoading: boolean;
|
|
18
|
-
errorMessage:
|
|
18
|
+
errorMessage: import("react").ReactNode;
|
|
19
19
|
draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
20
20
|
resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
21
21
|
multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
|
|
@@ -16,7 +16,7 @@ export declare const actionToggleViewMode: {
|
|
|
16
16
|
} | null;
|
|
17
17
|
showWelcomeScreen: boolean;
|
|
18
18
|
isLoading: boolean;
|
|
19
|
-
errorMessage:
|
|
19
|
+
errorMessage: import("react").ReactNode;
|
|
20
20
|
draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
21
21
|
resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
22
22
|
multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
|
|
@@ -16,7 +16,7 @@ export declare const actionToggleZenMode: {
|
|
|
16
16
|
} | null;
|
|
17
17
|
showWelcomeScreen: boolean;
|
|
18
18
|
isLoading: boolean;
|
|
19
|
-
errorMessage:
|
|
19
|
+
errorMessage: import("react").ReactNode;
|
|
20
20
|
draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
21
21
|
resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
22
22
|
multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { SubtypeOf } from "../utility-types";
|
|
1
2
|
import { ActionName } from "./types";
|
|
2
3
|
export declare type ShortcutName = SubtypeOf<ActionName, "toggleTheme" | "loadScene" | "clearCanvas" | "cut" | "copy" | "paste" | "copyStyles" | "pasteStyles" | "selectAll" | "deleteSelectedElements" | "duplicateSelection" | "sendBackward" | "bringForward" | "sendToBack" | "bringToFront" | "copyAsPng" | "copyAsSvg" | "group" | "ungroup" | "gridMode" | "zenMode" | "stats" | "addToLibrary" | "viewMode" | "flipHorizontal" | "flipVertical" | "hyperlink" | "toggleLock"> | "saveScene" | "imageExport";
|
|
3
4
|
export declare const getShortcutFromShortcutName: (name: ShortcutName) => string;
|
package/types/actions/types.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { ExcalidrawElement } from "../element/types";
|
|
3
3
|
import { AppClassProperties, AppState, ExcalidrawProps, BinaryFiles } from "../types";
|
|
4
|
+
import { MarkOptional } from "../utility-types";
|
|
4
5
|
export declare type ActionSource = "ui" | "keyboard" | "contextMenu" | "api";
|
|
5
6
|
/** if false, the action should be prevented */
|
|
6
7
|
export declare type ActionResult = {
|
package/types/constants.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ export declare const isAndroid: boolean;
|
|
|
6
6
|
export declare const isFirefox: boolean;
|
|
7
7
|
export declare const isChrome: boolean;
|
|
8
8
|
export declare const isSafari: boolean;
|
|
9
|
+
export declare const isBrave: () => boolean;
|
|
9
10
|
export declare const APP_NAME = "Excalidraw";
|
|
10
11
|
export declare const DRAGGING_THRESHOLD = 10;
|
|
11
12
|
export declare const LINE_CONFIRM_THRESHOLD = 8;
|
package/types/data/blob.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ALLOWED_IMAGE_MIME_TYPES, MIME_TYPES } from "../constants";
|
|
2
2
|
import { ExcalidrawElement, FileId } from "../element/types";
|
|
3
3
|
import { AppState, DataURL, LibraryItem } from "../types";
|
|
4
|
+
import { ValueOf } from "../utility-types";
|
|
4
5
|
import { FileSystemHandle } from "./filesystem";
|
|
5
6
|
import { ImportedLibraryData } from "./types";
|
|
6
7
|
export declare const getMimeType: (blob: Blob | string) => string;
|
|
@@ -25,7 +25,7 @@ export declare const actionLink: {
|
|
|
25
25
|
} | null;
|
|
26
26
|
showWelcomeScreen: boolean;
|
|
27
27
|
isLoading: boolean;
|
|
28
|
-
errorMessage:
|
|
28
|
+
errorMessage: import("react").ReactNode;
|
|
29
29
|
draggingElement: NonDeletedExcalidrawElement | null;
|
|
30
30
|
resizingElement: NonDeletedExcalidrawElement | null;
|
|
31
31
|
multiElement: import("./types").NonDeleted<import("./types").ExcalidrawLinearElement> | null;
|
|
@@ -130,7 +130,7 @@ export declare class LinearElementEditor {
|
|
|
130
130
|
} | null;
|
|
131
131
|
showWelcomeScreen: boolean;
|
|
132
132
|
isLoading: boolean;
|
|
133
|
-
errorMessage:
|
|
133
|
+
errorMessage: import("react").ReactNode;
|
|
134
134
|
draggingElement: import("./types").NonDeletedExcalidrawElement | null;
|
|
135
135
|
resizingElement: import("./types").NonDeletedExcalidrawElement | null;
|
|
136
136
|
multiElement: NonDeleted<ExcalidrawLinearElement> | null;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ExcalidrawElement } from "./types";
|
|
2
|
+
import { Mutable } from "../utility-types";
|
|
2
3
|
declare type ElementUpdate<TElement extends ExcalidrawElement> = Omit<Partial<TElement>, "id" | "version" | "versionNonce">;
|
|
3
4
|
export declare const mutateElement: <TElement extends Mutable<ExcalidrawElement>>(element: TElement, updates: ElementUpdate<TElement>, informMutation?: boolean) => TElement;
|
|
4
5
|
export declare const newElementWith: <TElement extends ExcalidrawElement>(element: TElement, updates: ElementUpdate<TElement>) => TElement;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ExcalidrawElement, ExcalidrawImageElement, ExcalidrawTextElement, ExcalidrawLinearElement, ExcalidrawGenericElement, NonDeleted, TextAlign, GroupId, VerticalAlign, Arrowhead, ExcalidrawFreeDrawElement, FontFamilyValues, ExcalidrawTextContainer } from "../element/types";
|
|
2
2
|
import { AppState } from "../types";
|
|
3
|
+
import { MarkOptional, Mutable } from "../utility-types";
|
|
3
4
|
declare type ElementConstructorOpts = MarkOptional<Omit<ExcalidrawGenericElement, "id" | "type" | "isDeleted" | "updated">, "width" | "height" | "angle" | "groupIds" | "boundElements" | "seed" | "version" | "versionNonce" | "link">;
|
|
4
5
|
export declare const newElement: (opts: {
|
|
5
6
|
type: ExcalidrawGenericElement["type"];
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ExcalidrawElement, ExcalidrawTextContainer, ExcalidrawTextElement, ExcalidrawTextElementWithContainer, FontString, NonDeletedExcalidrawElement } from "./types";
|
|
2
2
|
import { MaybeTransformHandleType } from "./transformHandles";
|
|
3
3
|
import { AppState } from "../types";
|
|
4
|
+
import { ExtractSetType } from "../utility-types";
|
|
4
5
|
export declare const normalizeText: (text: string) => string;
|
|
5
6
|
export declare const redrawTextBoundingBox: (textElement: ExcalidrawTextElement, container: ExcalidrawElement | null) => void;
|
|
6
7
|
export declare const bindTextToShapeAfterDuplication: (sceneElements: ExcalidrawElement[], oldElements: ExcalidrawElement[], oldIdToDuplicatedId: Map<ExcalidrawElement["id"], ExcalidrawElement["id"]>) => void;
|
|
@@ -46,10 +47,12 @@ export declare const getBoundTextElementPosition: (container: ExcalidrawElement,
|
|
|
46
47
|
y: number;
|
|
47
48
|
} | undefined;
|
|
48
49
|
export declare const shouldAllowVerticalAlign: (selectedElements: NonDeletedExcalidrawElement[]) => boolean;
|
|
50
|
+
export declare const suppportsHorizontalAlign: (selectedElements: NonDeletedExcalidrawElement[]) => boolean;
|
|
49
51
|
export declare const getTextBindableContainerAtPosition: (elements: readonly ExcalidrawElement[], appState: AppState, x: number, y: number) => ExcalidrawTextContainer | null;
|
|
50
52
|
declare const VALID_CONTAINER_TYPES: Set<string>;
|
|
51
53
|
export declare const isValidTextContainer: (element: ExcalidrawElement) => boolean;
|
|
52
54
|
export declare const computeContainerDimensionForBoundText: (dimension: number, containerType: ExtractSetType<typeof VALID_CONTAINER_TYPES>) => number;
|
|
53
55
|
export declare const getMaxContainerWidth: (container: ExcalidrawElement) => number;
|
|
54
56
|
export declare const getMaxContainerHeight: (container: ExcalidrawElement) => number;
|
|
57
|
+
export declare const isMeasureTextSupported: () => boolean;
|
|
55
58
|
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { AppState } from "../types";
|
|
2
|
+
import { MarkNonNullable } from "../utility-types";
|
|
2
3
|
import { ExcalidrawElement, ExcalidrawTextElement, ExcalidrawLinearElement, ExcalidrawBindableElement, ExcalidrawGenericElement, ExcalidrawFreeDrawElement, InitializedExcalidrawImageElement, ExcalidrawImageElement, ExcalidrawTextElementWithContainer, ExcalidrawTextContainer, RoundnessType } from "./types";
|
|
3
4
|
export declare const isGenericElement: (element: ExcalidrawElement | null) => element is ExcalidrawGenericElement;
|
|
4
5
|
export declare const isInitializedImageElement: (element: ExcalidrawElement | null) => element is InitializedExcalidrawImageElement;
|
package/types/element/types.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Point } from "../types";
|
|
2
2
|
import { FONT_FAMILY, ROUNDNESS, TEXT_ALIGN, THEME, VERTICAL_ALIGN } from "../constants";
|
|
3
|
+
import { MarkNonNullable, ValueOf } from "../utility-types";
|
|
3
4
|
export declare type ChartType = "bar" | "line";
|
|
4
5
|
export declare type FillStyle = "hachure" | "cross-hatch" | "solid";
|
|
5
6
|
export declare type FontFamilyKeys = keyof typeof FONT_FAMILY;
|