@zsviczian/excalidraw 0.14.0-obsidian → 0.14.2-1-obsidian
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/README.md +16 -1823
- package/dist/excalidraw.development.js +282 -139
- package/dist/excalidraw.production.min.js +1 -1
- package/dist/excalidraw.production.min.js.LICENSE.txt +20 -0
- package/package.json +1 -1
- package/types/actions/actionAddToLibrary.d.ts +33 -15
- package/types/actions/actionBoundText.d.ts +11 -5
- package/types/actions/actionCanvas.d.ts +225 -47
- package/types/actions/actionClipboard.d.ts +55 -25
- package/types/actions/actionDeleteSelected.d.ts +35 -17
- package/types/actions/actionExport.d.ts +99 -45
- package/types/actions/actionFinalize.d.ts +22 -10
- package/types/actions/actionLinearEditor.d.ts +11 -5
- package/types/actions/actionMenu.d.ts +33 -15
- package/types/actions/actionProperties.d.ts +143 -65
- package/types/actions/actionStyles.d.ts +11 -5
- package/types/actions/actionToggleGridMode.d.ts +11 -5
- package/types/actions/actionToggleLock.d.ts +11 -5
- package/types/actions/actionToggleStats.d.ts +11 -5
- package/types/actions/actionToggleViewMode.d.ts +11 -5
- package/types/actions/actionToggleZenMode.d.ts +11 -5
- package/types/actions/shortcuts.d.ts +1 -1
- package/types/actions/types.d.ts +1 -1
- package/types/appState.d.ts +8 -6
- package/types/components/ActiveConfirmDialog.d.ts +24 -0
- package/types/components/App.d.ts +3 -1
- package/types/components/HandButton.d.ts +10 -0
- package/types/components/LayerUI.d.ts +2 -2
- package/types/components/LockButton.d.ts +0 -1
- package/types/components/MobileMenu.d.ts +4 -4
- package/types/components/ToolButton.d.ts +1 -1
- package/types/components/context/tunnels.d.ts +16 -0
- package/types/components/dropdownMenu/DropdownMenu.d.ts +7 -5
- package/types/components/dropdownMenu/DropdownMenuContent.d.ts +7 -3
- package/types/components/dropdownMenu/DropdownMenuItem.d.ts +2 -3
- package/types/components/dropdownMenu/DropdownMenuItemLink.d.ts +3 -2
- package/types/components/dropdownMenu/common.d.ts +6 -0
- package/types/components/footer/Footer.d.ts +3 -4
- package/types/components/hoc/withInternalFallback.d.ts +4 -0
- package/types/components/icons.d.ts +1 -0
- package/types/components/main-menu/MainMenu.d.ts +14 -9
- package/types/components/welcome-screen/WelcomeScreen.d.ts +2 -2
- package/types/constants.d.ts +11 -1
- package/types/data/restore.d.ts +8 -2
- package/types/element/Hyperlink.d.ts +11 -5
- package/types/element/linearElementEditor.d.ts +12 -5
- package/types/element/newElement.d.ts +0 -3
- package/types/element/sortElements.d.ts +2 -0
- package/types/element/textElement.d.ts +9 -8
- package/types/element/typeChecks.d.ts +1 -1
- package/types/element/types.d.ts +0 -1
- package/types/i18n.d.ts +6 -0
- package/types/jotai.d.ts +5 -5
- package/types/keys.d.ts +0 -3
- package/types/math.d.ts +1 -0
- package/types/packages/excalidraw/example/App.d.ts +7 -1
- package/types/packages/excalidraw/index.d.ts +1 -1
- package/types/packages/utils.d.ts +1 -1
- package/types/types.d.ts +21 -24
- package/types/utils.d.ts +9 -19
|
@@ -38,22 +38,25 @@ export declare const actionClearCanvas: {
|
|
|
38
38
|
data: import("../charts").Spreadsheet;
|
|
39
39
|
};
|
|
40
40
|
activeTool: {
|
|
41
|
-
|
|
42
|
-
lastActiveToolBeforeEraser: import("../types").LastActiveToolBeforeEraser;
|
|
41
|
+
lastActiveTool: import("../types").LastActiveTool;
|
|
43
42
|
locked: boolean;
|
|
43
|
+
} & ({
|
|
44
|
+
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser" | "hand";
|
|
44
45
|
customType: null;
|
|
45
46
|
} | {
|
|
46
47
|
type: "custom";
|
|
47
48
|
customType: string;
|
|
48
|
-
|
|
49
|
-
locked: boolean;
|
|
50
|
-
};
|
|
49
|
+
});
|
|
51
50
|
colorPalette: {
|
|
52
51
|
canvasBackground?: string[] | undefined;
|
|
53
52
|
elementBackground?: string[] | undefined;
|
|
54
53
|
elementStroke?: string[] | undefined;
|
|
55
54
|
};
|
|
56
55
|
trayModeEnabled: boolean;
|
|
56
|
+
allowPinchZoom: boolean | undefined;
|
|
57
|
+
allowWheelZoom: boolean | undefined;
|
|
58
|
+
pinnedScripts: string[] | undefined;
|
|
59
|
+
customPens: any[] | undefined;
|
|
57
60
|
name: string;
|
|
58
61
|
contextMenu: {
|
|
59
62
|
items: import("../components/ContextMenu").ContextMenuItems;
|
|
@@ -116,6 +119,7 @@ export declare const actionClearCanvas: {
|
|
|
116
119
|
duration?: number | undefined;
|
|
117
120
|
} | null;
|
|
118
121
|
zenModeEnabled: boolean;
|
|
122
|
+
previousGridSize: number | null;
|
|
119
123
|
viewModeEnabled: boolean;
|
|
120
124
|
selectedGroupIds: {
|
|
121
125
|
[groupId: string]: boolean;
|
|
@@ -127,6 +131,8 @@ export declare const actionClearCanvas: {
|
|
|
127
131
|
pendingImageElementId: string | null;
|
|
128
132
|
showHyperlinkPopup: false | "info" | "editor";
|
|
129
133
|
linkOpacity: number;
|
|
134
|
+
currentStrokeOptions?: any;
|
|
135
|
+
resetCustomPen?: any;
|
|
130
136
|
selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
131
137
|
};
|
|
132
138
|
commitToHistory: true;
|
|
@@ -165,16 +171,15 @@ export declare const actionZoomIn: {
|
|
|
165
171
|
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
166
172
|
editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
167
173
|
activeTool: {
|
|
168
|
-
|
|
169
|
-
lastActiveToolBeforeEraser: import("../types").LastActiveToolBeforeEraser;
|
|
174
|
+
lastActiveTool: import("../types").LastActiveTool;
|
|
170
175
|
locked: boolean;
|
|
176
|
+
} & ({
|
|
177
|
+
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser" | "hand";
|
|
171
178
|
customType: null;
|
|
172
179
|
} | {
|
|
173
180
|
type: "custom";
|
|
174
181
|
customType: string;
|
|
175
|
-
|
|
176
|
-
locked: boolean;
|
|
177
|
-
};
|
|
182
|
+
});
|
|
178
183
|
penMode: boolean;
|
|
179
184
|
penDetected: boolean;
|
|
180
185
|
exportBackground: boolean;
|
|
@@ -221,6 +226,7 @@ export declare const actionZoomIn: {
|
|
|
221
226
|
zenModeEnabled: boolean;
|
|
222
227
|
theme: string;
|
|
223
228
|
gridSize: number | null;
|
|
229
|
+
previousGridSize: number | null;
|
|
224
230
|
viewModeEnabled: boolean;
|
|
225
231
|
selectedGroupIds: {
|
|
226
232
|
[groupId: string]: boolean;
|
|
@@ -250,6 +256,12 @@ export declare const actionZoomIn: {
|
|
|
250
256
|
elementBackground?: string[] | undefined;
|
|
251
257
|
elementStroke?: string[] | undefined;
|
|
252
258
|
};
|
|
259
|
+
allowWheelZoom?: boolean | undefined;
|
|
260
|
+
allowPinchZoom?: boolean | undefined;
|
|
261
|
+
pinnedScripts?: string[] | undefined;
|
|
262
|
+
customPens?: any[] | undefined;
|
|
263
|
+
currentStrokeOptions?: any;
|
|
264
|
+
resetCustomPen?: any;
|
|
253
265
|
selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
254
266
|
};
|
|
255
267
|
commitToHistory: false;
|
|
@@ -290,16 +302,15 @@ export declare const actionZoomOut: {
|
|
|
290
302
|
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
291
303
|
editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
292
304
|
activeTool: {
|
|
293
|
-
|
|
294
|
-
lastActiveToolBeforeEraser: import("../types").LastActiveToolBeforeEraser;
|
|
305
|
+
lastActiveTool: import("../types").LastActiveTool;
|
|
295
306
|
locked: boolean;
|
|
307
|
+
} & ({
|
|
308
|
+
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser" | "hand";
|
|
296
309
|
customType: null;
|
|
297
310
|
} | {
|
|
298
311
|
type: "custom";
|
|
299
312
|
customType: string;
|
|
300
|
-
|
|
301
|
-
locked: boolean;
|
|
302
|
-
};
|
|
313
|
+
});
|
|
303
314
|
penMode: boolean;
|
|
304
315
|
penDetected: boolean;
|
|
305
316
|
exportBackground: boolean;
|
|
@@ -346,6 +357,7 @@ export declare const actionZoomOut: {
|
|
|
346
357
|
zenModeEnabled: boolean;
|
|
347
358
|
theme: string;
|
|
348
359
|
gridSize: number | null;
|
|
360
|
+
previousGridSize: number | null;
|
|
349
361
|
viewModeEnabled: boolean;
|
|
350
362
|
selectedGroupIds: {
|
|
351
363
|
[groupId: string]: boolean;
|
|
@@ -375,6 +387,12 @@ export declare const actionZoomOut: {
|
|
|
375
387
|
elementBackground?: string[] | undefined;
|
|
376
388
|
elementStroke?: string[] | undefined;
|
|
377
389
|
};
|
|
390
|
+
allowWheelZoom?: boolean | undefined;
|
|
391
|
+
allowPinchZoom?: boolean | undefined;
|
|
392
|
+
pinnedScripts?: string[] | undefined;
|
|
393
|
+
customPens?: any[] | undefined;
|
|
394
|
+
currentStrokeOptions?: any;
|
|
395
|
+
resetCustomPen?: any;
|
|
378
396
|
selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
379
397
|
};
|
|
380
398
|
commitToHistory: false;
|
|
@@ -415,16 +433,15 @@ export declare const actionResetZoom: {
|
|
|
415
433
|
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
416
434
|
editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
417
435
|
activeTool: {
|
|
418
|
-
|
|
419
|
-
lastActiveToolBeforeEraser: import("../types").LastActiveToolBeforeEraser;
|
|
436
|
+
lastActiveTool: import("../types").LastActiveTool;
|
|
420
437
|
locked: boolean;
|
|
438
|
+
} & ({
|
|
439
|
+
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser" | "hand";
|
|
421
440
|
customType: null;
|
|
422
441
|
} | {
|
|
423
442
|
type: "custom";
|
|
424
443
|
customType: string;
|
|
425
|
-
|
|
426
|
-
locked: boolean;
|
|
427
|
-
};
|
|
444
|
+
});
|
|
428
445
|
penMode: boolean;
|
|
429
446
|
penDetected: boolean;
|
|
430
447
|
exportBackground: boolean;
|
|
@@ -471,6 +488,7 @@ export declare const actionResetZoom: {
|
|
|
471
488
|
zenModeEnabled: boolean;
|
|
472
489
|
theme: string;
|
|
473
490
|
gridSize: number | null;
|
|
491
|
+
previousGridSize: number | null;
|
|
474
492
|
viewModeEnabled: boolean;
|
|
475
493
|
selectedGroupIds: {
|
|
476
494
|
[groupId: string]: boolean;
|
|
@@ -500,6 +518,12 @@ export declare const actionResetZoom: {
|
|
|
500
518
|
elementBackground?: string[] | undefined;
|
|
501
519
|
elementStroke?: string[] | undefined;
|
|
502
520
|
};
|
|
521
|
+
allowWheelZoom?: boolean | undefined;
|
|
522
|
+
allowPinchZoom?: boolean | undefined;
|
|
523
|
+
pinnedScripts?: string[] | undefined;
|
|
524
|
+
customPens?: any[] | undefined;
|
|
525
|
+
currentStrokeOptions?: any;
|
|
526
|
+
resetCustomPen?: any;
|
|
503
527
|
selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
504
528
|
};
|
|
505
529
|
commitToHistory: false;
|
|
@@ -534,16 +558,15 @@ export declare const zoomToFitElements: (elements: readonly ExcalidrawElement[],
|
|
|
534
558
|
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
535
559
|
editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
536
560
|
activeTool: {
|
|
537
|
-
|
|
538
|
-
lastActiveToolBeforeEraser: import("../types").LastActiveToolBeforeEraser;
|
|
561
|
+
lastActiveTool: import("../types").LastActiveTool;
|
|
539
562
|
locked: boolean;
|
|
563
|
+
} & ({
|
|
564
|
+
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser" | "hand";
|
|
540
565
|
customType: null;
|
|
541
566
|
} | {
|
|
542
567
|
type: "custom";
|
|
543
568
|
customType: string;
|
|
544
|
-
|
|
545
|
-
locked: boolean;
|
|
546
|
-
};
|
|
569
|
+
});
|
|
547
570
|
penMode: boolean;
|
|
548
571
|
penDetected: boolean;
|
|
549
572
|
exportBackground: boolean;
|
|
@@ -590,6 +613,7 @@ export declare const zoomToFitElements: (elements: readonly ExcalidrawElement[],
|
|
|
590
613
|
zenModeEnabled: boolean;
|
|
591
614
|
theme: string;
|
|
592
615
|
gridSize: number | null;
|
|
616
|
+
previousGridSize: number | null;
|
|
593
617
|
viewModeEnabled: boolean;
|
|
594
618
|
selectedGroupIds: {
|
|
595
619
|
[groupId: string]: boolean;
|
|
@@ -619,6 +643,12 @@ export declare const zoomToFitElements: (elements: readonly ExcalidrawElement[],
|
|
|
619
643
|
elementBackground?: string[] | undefined;
|
|
620
644
|
elementStroke?: string[] | undefined;
|
|
621
645
|
};
|
|
646
|
+
allowWheelZoom?: boolean | undefined;
|
|
647
|
+
allowPinchZoom?: boolean | undefined;
|
|
648
|
+
pinnedScripts?: string[] | undefined;
|
|
649
|
+
customPens?: any[] | undefined;
|
|
650
|
+
currentStrokeOptions?: any;
|
|
651
|
+
resetCustomPen?: any;
|
|
622
652
|
selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
623
653
|
};
|
|
624
654
|
commitToHistory: boolean;
|
|
@@ -653,16 +683,15 @@ export declare const actionZoomToSelected: {
|
|
|
653
683
|
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
654
684
|
editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
655
685
|
activeTool: {
|
|
656
|
-
|
|
657
|
-
lastActiveToolBeforeEraser: import("../types").LastActiveToolBeforeEraser;
|
|
686
|
+
lastActiveTool: import("../types").LastActiveTool;
|
|
658
687
|
locked: boolean;
|
|
688
|
+
} & ({
|
|
689
|
+
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser" | "hand";
|
|
659
690
|
customType: null;
|
|
660
691
|
} | {
|
|
661
692
|
type: "custom";
|
|
662
693
|
customType: string;
|
|
663
|
-
|
|
664
|
-
locked: boolean;
|
|
665
|
-
};
|
|
694
|
+
});
|
|
666
695
|
penMode: boolean;
|
|
667
696
|
penDetected: boolean;
|
|
668
697
|
exportBackground: boolean;
|
|
@@ -709,6 +738,7 @@ export declare const actionZoomToSelected: {
|
|
|
709
738
|
zenModeEnabled: boolean;
|
|
710
739
|
theme: string;
|
|
711
740
|
gridSize: number | null;
|
|
741
|
+
previousGridSize: number | null;
|
|
712
742
|
viewModeEnabled: boolean;
|
|
713
743
|
selectedGroupIds: {
|
|
714
744
|
[groupId: string]: boolean;
|
|
@@ -738,6 +768,12 @@ export declare const actionZoomToSelected: {
|
|
|
738
768
|
elementBackground?: string[] | undefined;
|
|
739
769
|
elementStroke?: string[] | undefined;
|
|
740
770
|
};
|
|
771
|
+
allowWheelZoom?: boolean | undefined;
|
|
772
|
+
allowPinchZoom?: boolean | undefined;
|
|
773
|
+
pinnedScripts?: string[] | undefined;
|
|
774
|
+
customPens?: any[] | undefined;
|
|
775
|
+
currentStrokeOptions?: any;
|
|
776
|
+
resetCustomPen?: any;
|
|
741
777
|
selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
742
778
|
};
|
|
743
779
|
commitToHistory: boolean;
|
|
@@ -777,16 +813,15 @@ export declare const actionZoomToFit: {
|
|
|
777
813
|
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
778
814
|
editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
779
815
|
activeTool: {
|
|
780
|
-
|
|
781
|
-
lastActiveToolBeforeEraser: import("../types").LastActiveToolBeforeEraser;
|
|
816
|
+
lastActiveTool: import("../types").LastActiveTool;
|
|
782
817
|
locked: boolean;
|
|
818
|
+
} & ({
|
|
819
|
+
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser" | "hand";
|
|
783
820
|
customType: null;
|
|
784
821
|
} | {
|
|
785
822
|
type: "custom";
|
|
786
823
|
customType: string;
|
|
787
|
-
|
|
788
|
-
locked: boolean;
|
|
789
|
-
};
|
|
824
|
+
});
|
|
790
825
|
penMode: boolean;
|
|
791
826
|
penDetected: boolean;
|
|
792
827
|
exportBackground: boolean;
|
|
@@ -833,6 +868,7 @@ export declare const actionZoomToFit: {
|
|
|
833
868
|
zenModeEnabled: boolean;
|
|
834
869
|
theme: string;
|
|
835
870
|
gridSize: number | null;
|
|
871
|
+
previousGridSize: number | null;
|
|
836
872
|
viewModeEnabled: boolean;
|
|
837
873
|
selectedGroupIds: {
|
|
838
874
|
[groupId: string]: boolean;
|
|
@@ -862,6 +898,12 @@ export declare const actionZoomToFit: {
|
|
|
862
898
|
elementBackground?: string[] | undefined;
|
|
863
899
|
elementStroke?: string[] | undefined;
|
|
864
900
|
};
|
|
901
|
+
allowWheelZoom?: boolean | undefined;
|
|
902
|
+
allowPinchZoom?: boolean | undefined;
|
|
903
|
+
pinnedScripts?: string[] | undefined;
|
|
904
|
+
customPens?: any[] | undefined;
|
|
905
|
+
currentStrokeOptions?: any;
|
|
906
|
+
resetCustomPen?: any;
|
|
865
907
|
selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
866
908
|
};
|
|
867
909
|
commitToHistory: boolean;
|
|
@@ -897,16 +939,15 @@ export declare const actionToggleTheme: {
|
|
|
897
939
|
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
898
940
|
editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
899
941
|
activeTool: {
|
|
900
|
-
|
|
901
|
-
lastActiveToolBeforeEraser: import("../types").LastActiveToolBeforeEraser;
|
|
942
|
+
lastActiveTool: import("../types").LastActiveTool;
|
|
902
943
|
locked: boolean;
|
|
944
|
+
} & ({
|
|
945
|
+
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser" | "hand";
|
|
903
946
|
customType: null;
|
|
904
947
|
} | {
|
|
905
948
|
type: "custom";
|
|
906
949
|
customType: string;
|
|
907
|
-
|
|
908
|
-
locked: boolean;
|
|
909
|
-
};
|
|
950
|
+
});
|
|
910
951
|
penMode: boolean;
|
|
911
952
|
penDetected: boolean;
|
|
912
953
|
exportBackground: boolean;
|
|
@@ -957,6 +998,7 @@ export declare const actionToggleTheme: {
|
|
|
957
998
|
} | null;
|
|
958
999
|
zenModeEnabled: boolean;
|
|
959
1000
|
gridSize: number | null;
|
|
1001
|
+
previousGridSize: number | null;
|
|
960
1002
|
viewModeEnabled: boolean;
|
|
961
1003
|
selectedGroupIds: {
|
|
962
1004
|
[groupId: string]: boolean;
|
|
@@ -986,6 +1028,12 @@ export declare const actionToggleTheme: {
|
|
|
986
1028
|
elementBackground?: string[] | undefined;
|
|
987
1029
|
elementStroke?: string[] | undefined;
|
|
988
1030
|
};
|
|
1031
|
+
allowWheelZoom?: boolean | undefined;
|
|
1032
|
+
allowPinchZoom?: boolean | undefined;
|
|
1033
|
+
pinnedScripts?: string[] | undefined;
|
|
1034
|
+
customPens?: any[] | undefined;
|
|
1035
|
+
currentStrokeOptions?: any;
|
|
1036
|
+
resetCustomPen?: any;
|
|
989
1037
|
selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
990
1038
|
};
|
|
991
1039
|
commitToHistory: false;
|
|
@@ -995,8 +1043,8 @@ export declare const actionToggleTheme: {
|
|
|
995
1043
|
} & {
|
|
996
1044
|
keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
|
|
997
1045
|
};
|
|
998
|
-
export declare const
|
|
999
|
-
name: "
|
|
1046
|
+
export declare const actionToggleEraserTool: {
|
|
1047
|
+
name: "toggleEraserTool";
|
|
1000
1048
|
trackEvent: {
|
|
1001
1049
|
category: "toolbar";
|
|
1002
1050
|
};
|
|
@@ -1005,16 +1053,140 @@ export declare const actionErase: {
|
|
|
1005
1053
|
selectedElementIds: {};
|
|
1006
1054
|
selectedGroupIds: {};
|
|
1007
1055
|
activeTool: {
|
|
1008
|
-
|
|
1009
|
-
lastActiveToolBeforeEraser: import("../types").LastActiveToolBeforeEraser;
|
|
1056
|
+
lastActiveTool: import("../types").LastActiveTool;
|
|
1010
1057
|
locked: boolean;
|
|
1058
|
+
} & ({
|
|
1059
|
+
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser" | "hand";
|
|
1011
1060
|
customType: null;
|
|
1012
1061
|
} | {
|
|
1013
1062
|
type: "custom";
|
|
1014
1063
|
customType: string;
|
|
1015
|
-
|
|
1016
|
-
|
|
1064
|
+
});
|
|
1065
|
+
contextMenu: {
|
|
1066
|
+
items: import("../components/ContextMenu").ContextMenuItems;
|
|
1067
|
+
top: number;
|
|
1068
|
+
left: number;
|
|
1069
|
+
} | null;
|
|
1070
|
+
showWelcomeScreen: boolean;
|
|
1071
|
+
isLoading: boolean;
|
|
1072
|
+
errorMessage: string | null;
|
|
1073
|
+
draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
1074
|
+
resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
1075
|
+
multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
|
|
1076
|
+
selectionElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
1077
|
+
isBindingEnabled: boolean;
|
|
1078
|
+
startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
|
|
1079
|
+
suggestedBindings: import("../element/binding").SuggestedBinding[];
|
|
1080
|
+
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
1081
|
+
editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
1082
|
+
penMode: boolean;
|
|
1083
|
+
penDetected: boolean;
|
|
1084
|
+
exportBackground: boolean;
|
|
1085
|
+
exportEmbedScene: boolean;
|
|
1086
|
+
exportWithDarkMode: boolean;
|
|
1087
|
+
exportScale: number;
|
|
1088
|
+
currentItemStrokeColor: string;
|
|
1089
|
+
currentItemBackgroundColor: string;
|
|
1090
|
+
currentItemFillStyle: import("../element/types").FillStyle;
|
|
1091
|
+
currentItemStrokeWidth: number;
|
|
1092
|
+
currentItemStrokeStyle: import("../element/types").StrokeStyle;
|
|
1093
|
+
currentItemRoughness: number;
|
|
1094
|
+
currentItemOpacity: number;
|
|
1095
|
+
currentItemFontFamily: number;
|
|
1096
|
+
currentItemFontSize: number;
|
|
1097
|
+
currentItemTextAlign: string;
|
|
1098
|
+
currentItemStartArrowhead: import("../element/types").Arrowhead | null;
|
|
1099
|
+
currentItemEndArrowhead: import("../element/types").Arrowhead | null;
|
|
1100
|
+
currentItemRoundness: import("../element/types").StrokeRoundness;
|
|
1101
|
+
viewBackgroundColor: string;
|
|
1102
|
+
scrollX: number;
|
|
1103
|
+
scrollY: number;
|
|
1104
|
+
cursorButton: "up" | "down";
|
|
1105
|
+
scrolledOutside: boolean;
|
|
1106
|
+
name: string;
|
|
1107
|
+
isResizing: boolean;
|
|
1108
|
+
isRotating: boolean;
|
|
1109
|
+
zoom: Readonly<{
|
|
1110
|
+
value: NormalizedZoomValue;
|
|
1111
|
+
}>;
|
|
1112
|
+
openMenu: "canvas" | "shape" | null;
|
|
1113
|
+
openPopup: "canvasColorPicker" | "backgroundColorPicker" | "strokeColorPicker" | null;
|
|
1114
|
+
openSidebar: "library" | "customSidebar" | null;
|
|
1115
|
+
openDialog: "imageExport" | "help" | "jsonExport" | null;
|
|
1116
|
+
isSidebarDocked: boolean;
|
|
1117
|
+
lastPointerDownWith: import("../element/types").PointerType;
|
|
1118
|
+
previousSelectedElementIds: {
|
|
1119
|
+
[id: string]: boolean;
|
|
1120
|
+
};
|
|
1121
|
+
shouldCacheIgnoreZoom: boolean;
|
|
1122
|
+
toast: {
|
|
1123
|
+
message: string;
|
|
1124
|
+
closable?: boolean | undefined;
|
|
1125
|
+
duration?: number | undefined;
|
|
1126
|
+
} | null;
|
|
1127
|
+
zenModeEnabled: boolean;
|
|
1128
|
+
theme: string;
|
|
1129
|
+
gridSize: number | null;
|
|
1130
|
+
previousGridSize: number | null;
|
|
1131
|
+
viewModeEnabled: boolean;
|
|
1132
|
+
editingGroupId: string | null;
|
|
1133
|
+
width: number;
|
|
1134
|
+
height: number;
|
|
1135
|
+
offsetTop: number;
|
|
1136
|
+
offsetLeft: number;
|
|
1137
|
+
fileHandle: import("browser-fs-access").FileSystemHandle | null;
|
|
1138
|
+
collaborators: Map<string, import("../types").Collaborator>;
|
|
1139
|
+
showStats: boolean;
|
|
1140
|
+
currentChartType: import("../element/types").ChartType;
|
|
1141
|
+
pasteDialog: {
|
|
1142
|
+
shown: false;
|
|
1143
|
+
data: null;
|
|
1144
|
+
} | {
|
|
1145
|
+
shown: true;
|
|
1146
|
+
data: import("../charts").Spreadsheet;
|
|
1147
|
+
};
|
|
1148
|
+
pendingImageElementId: string | null;
|
|
1149
|
+
showHyperlinkPopup: false | "info" | "editor";
|
|
1150
|
+
linkOpacity: number;
|
|
1151
|
+
trayModeEnabled: boolean;
|
|
1152
|
+
colorPalette: {
|
|
1153
|
+
canvasBackground?: string[] | undefined;
|
|
1154
|
+
elementBackground?: string[] | undefined;
|
|
1155
|
+
elementStroke?: string[] | undefined;
|
|
1017
1156
|
};
|
|
1157
|
+
allowWheelZoom?: boolean | undefined;
|
|
1158
|
+
allowPinchZoom?: boolean | undefined;
|
|
1159
|
+
pinnedScripts?: string[] | undefined;
|
|
1160
|
+
customPens?: any[] | undefined;
|
|
1161
|
+
currentStrokeOptions?: any;
|
|
1162
|
+
resetCustomPen?: any;
|
|
1163
|
+
selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
1164
|
+
};
|
|
1165
|
+
commitToHistory: true;
|
|
1166
|
+
};
|
|
1167
|
+
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
|
|
1168
|
+
} & {
|
|
1169
|
+
keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
|
|
1170
|
+
};
|
|
1171
|
+
export declare const actionToggleHandTool: {
|
|
1172
|
+
name: "toggleHandTool";
|
|
1173
|
+
trackEvent: {
|
|
1174
|
+
category: "toolbar";
|
|
1175
|
+
};
|
|
1176
|
+
perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>, _: any, app: import("../types").AppClassProperties) => {
|
|
1177
|
+
appState: {
|
|
1178
|
+
selectedElementIds: {};
|
|
1179
|
+
selectedGroupIds: {};
|
|
1180
|
+
activeTool: {
|
|
1181
|
+
lastActiveTool: import("../types").LastActiveTool;
|
|
1182
|
+
locked: boolean;
|
|
1183
|
+
} & ({
|
|
1184
|
+
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser" | "hand";
|
|
1185
|
+
customType: null;
|
|
1186
|
+
} | {
|
|
1187
|
+
type: "custom";
|
|
1188
|
+
customType: string;
|
|
1189
|
+
});
|
|
1018
1190
|
contextMenu: {
|
|
1019
1191
|
items: import("../components/ContextMenu").ContextMenuItems;
|
|
1020
1192
|
top: number;
|
|
@@ -1080,6 +1252,7 @@ export declare const actionErase: {
|
|
|
1080
1252
|
zenModeEnabled: boolean;
|
|
1081
1253
|
theme: string;
|
|
1082
1254
|
gridSize: number | null;
|
|
1255
|
+
previousGridSize: number | null;
|
|
1083
1256
|
viewModeEnabled: boolean;
|
|
1084
1257
|
editingGroupId: string | null;
|
|
1085
1258
|
width: number;
|
|
@@ -1106,12 +1279,17 @@ export declare const actionErase: {
|
|
|
1106
1279
|
elementBackground?: string[] | undefined;
|
|
1107
1280
|
elementStroke?: string[] | undefined;
|
|
1108
1281
|
};
|
|
1282
|
+
allowWheelZoom?: boolean | undefined;
|
|
1283
|
+
allowPinchZoom?: boolean | undefined;
|
|
1284
|
+
pinnedScripts?: string[] | undefined;
|
|
1285
|
+
customPens?: any[] | undefined;
|
|
1286
|
+
currentStrokeOptions?: any;
|
|
1287
|
+
resetCustomPen?: any;
|
|
1109
1288
|
selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
1110
1289
|
};
|
|
1111
1290
|
commitToHistory: true;
|
|
1112
1291
|
};
|
|
1113
1292
|
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
|
|
1114
|
-
PanelComponent: ({ elements, appState, updateData, data }: import("./types").PanelComponentProps) => JSX.Element;
|
|
1115
1293
|
} & {
|
|
1116
1294
|
keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
|
|
1117
1295
|
};
|