@excalidraw/excalidraw 0.16.1-5561755 → 0.16.1-aaf73c8

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.
Files changed (65) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/excalidraw.development.js +185 -75
  3. package/dist/excalidraw.production.min.js +1 -1
  4. package/package.json +1 -1
  5. package/types/actions/actionAddToLibrary.d.ts +24 -24
  6. package/types/actions/actionAlign.d.ts +8 -8
  7. package/types/actions/actionBoundText.d.ts +16 -16
  8. package/types/actions/actionCanvas.d.ts +112 -112
  9. package/types/actions/actionClipboard.d.ts +44 -44
  10. package/types/actions/actionDeleteSelected.d.ts +26 -26
  11. package/types/actions/actionDistribute.d.ts +4 -4
  12. package/types/actions/actionDuplicateSelection.d.ts +2 -2
  13. package/types/actions/actionElementLock.d.ts +18 -18
  14. package/types/actions/actionExport.d.ts +87 -87
  15. package/types/actions/actionFinalize.d.ts +18 -18
  16. package/types/actions/actionFlip.d.ts +4 -4
  17. package/types/actions/actionFrame.d.ts +26 -26
  18. package/types/actions/actionGroup.d.ts +20 -20
  19. package/types/actions/actionLinearEditor.d.ts +8 -8
  20. package/types/actions/actionMenu.d.ts +26 -26
  21. package/types/actions/actionProperties.d.ts +108 -108
  22. package/types/actions/actionSelectAll.d.ts +10 -10
  23. package/types/actions/actionStyles.d.ts +12 -12
  24. package/types/actions/actionToggleGridMode.d.ts +10 -10
  25. package/types/actions/actionToggleObjectsSnapMode.d.ts +137 -0
  26. package/types/actions/actionToggleStats.d.ts +10 -10
  27. package/types/actions/actionToggleViewMode.d.ts +10 -10
  28. package/types/actions/actionToggleZenMode.d.ts +10 -10
  29. package/types/actions/actionZindex.d.ts +8 -8
  30. package/types/actions/index.d.ts +1 -0
  31. package/types/actions/shortcuts.d.ts +1 -1
  32. package/types/actions/types.d.ts +1 -1
  33. package/types/appState.d.ts +6 -11
  34. package/types/components/Actions.d.ts +4 -9
  35. package/types/components/App.d.ts +17 -5
  36. package/types/components/LaserTool/LaserPathManager.d.ts +28 -0
  37. package/types/components/LaserTool/LaserPointerButton.d.ts +10 -0
  38. package/types/components/LaserTool/LaserTool.d.ts +7 -0
  39. package/types/components/LayerUI.d.ts +2 -5
  40. package/types/components/MobileMenu.d.ts +1 -5
  41. package/types/components/Sidebar/Sidebar.d.ts +1 -1
  42. package/types/components/Stack.d.ts +2 -2
  43. package/types/components/dropdownMenu/DropdownMenu.d.ts +6 -3
  44. package/types/components/dropdownMenu/DropdownMenuItem.d.ts +2 -1
  45. package/types/components/dropdownMenu/DropdownMenuItemCustom.d.ts +2 -1
  46. package/types/components/dropdownMenu/DropdownMenuItemLink.d.ts +2 -1
  47. package/types/components/dropdownMenu/common.d.ts +1 -1
  48. package/types/components/icons.d.ts +2 -0
  49. package/types/components/main-menu/MainMenu.d.ts +6 -3
  50. package/types/cursor.d.ts +5 -0
  51. package/types/element/Hyperlink.d.ts +10 -10
  52. package/types/element/bounds.d.ts +4 -5
  53. package/types/element/dragElements.d.ts +11 -2
  54. package/types/element/embeddable.d.ts +8 -8
  55. package/types/element/linearElementEditor.d.ts +8 -8
  56. package/types/element/mutateElement.d.ts +1 -1
  57. package/types/element/resizeElements.d.ts +2 -2
  58. package/types/frame.d.ts +5 -0
  59. package/types/keys.d.ts +1 -0
  60. package/types/math.d.ts +2 -0
  61. package/types/renderer/renderSnaps.d.ts +2 -0
  62. package/types/scene/selection.d.ts +1 -0
  63. package/types/snapping.d.ts +108 -0
  64. package/types/types.d.ts +31 -16
  65. package/types/utils.d.ts +3 -8
@@ -37,15 +37,9 @@ export declare const actionChangeProjectName: {
37
37
  editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
38
38
  editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
39
39
  activeTool: {
40
- lastActiveTool: import("../types").LastActiveTool;
40
+ lastActiveTool: import("../types").ActiveTool | null;
41
41
  locked: boolean;
42
- } & ({
43
- type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "embeddable" | "image" | "frame" | "freedraw" | "eraser" | "hand";
44
- customType: null;
45
- } | {
46
- type: "custom";
47
- customType: string;
48
- });
42
+ } & import("../types").ActiveTool;
49
43
  penMode: boolean;
50
44
  penDetected: boolean;
51
45
  exportBackground: boolean;
@@ -123,6 +117,12 @@ export declare const actionChangeProjectName: {
123
117
  pendingImageElementId: string | null;
124
118
  showHyperlinkPopup: false | "editor" | "info";
125
119
  selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
120
+ snapLines: readonly import("../snapping").SnapLine[];
121
+ originSnapOffset: {
122
+ x: number;
123
+ y: number;
124
+ } | null;
125
+ objectsSnapModeEnabled: boolean;
126
126
  };
127
127
  commitToHistory: false;
128
128
  };
@@ -170,15 +170,9 @@ export declare const actionChangeExportScale: {
170
170
  editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
171
171
  editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
172
172
  activeTool: {
173
- lastActiveTool: import("../types").LastActiveTool;
173
+ lastActiveTool: import("../types").ActiveTool | null;
174
174
  locked: boolean;
175
- } & ({
176
- type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "embeddable" | "image" | "frame" | "freedraw" | "eraser" | "hand";
177
- customType: null;
178
- } | {
179
- type: "custom";
180
- customType: string;
181
- });
175
+ } & import("../types").ActiveTool;
182
176
  penMode: boolean;
183
177
  penDetected: boolean;
184
178
  exportBackground: boolean;
@@ -256,6 +250,12 @@ export declare const actionChangeExportScale: {
256
250
  pendingImageElementId: string | null;
257
251
  showHyperlinkPopup: false | "editor" | "info";
258
252
  selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
253
+ snapLines: readonly import("../snapping").SnapLine[];
254
+ originSnapOffset: {
255
+ x: number;
256
+ y: number;
257
+ } | null;
258
+ objectsSnapModeEnabled: boolean;
259
259
  };
260
260
  commitToHistory: false;
261
261
  };
@@ -303,15 +303,9 @@ export declare const actionChangeExportBackground: {
303
303
  editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
304
304
  editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
305
305
  activeTool: {
306
- lastActiveTool: import("../types").LastActiveTool;
306
+ lastActiveTool: import("../types").ActiveTool | null;
307
307
  locked: boolean;
308
- } & ({
309
- type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "embeddable" | "image" | "frame" | "freedraw" | "eraser" | "hand";
310
- customType: null;
311
- } | {
312
- type: "custom";
313
- customType: string;
314
- });
308
+ } & import("../types").ActiveTool;
315
309
  penMode: boolean;
316
310
  penDetected: boolean;
317
311
  exportEmbedScene: boolean;
@@ -389,6 +383,12 @@ export declare const actionChangeExportBackground: {
389
383
  pendingImageElementId: string | null;
390
384
  showHyperlinkPopup: false | "editor" | "info";
391
385
  selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
386
+ snapLines: readonly import("../snapping").SnapLine[];
387
+ originSnapOffset: {
388
+ x: number;
389
+ y: number;
390
+ } | null;
391
+ objectsSnapModeEnabled: boolean;
392
392
  };
393
393
  commitToHistory: false;
394
394
  };
@@ -436,15 +436,9 @@ export declare const actionChangeExportEmbedScene: {
436
436
  editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
437
437
  editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
438
438
  activeTool: {
439
- lastActiveTool: import("../types").LastActiveTool;
439
+ lastActiveTool: import("../types").ActiveTool | null;
440
440
  locked: boolean;
441
- } & ({
442
- type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "embeddable" | "image" | "frame" | "freedraw" | "eraser" | "hand";
443
- customType: null;
444
- } | {
445
- type: "custom";
446
- customType: string;
447
- });
441
+ } & import("../types").ActiveTool;
448
442
  penMode: boolean;
449
443
  penDetected: boolean;
450
444
  exportBackground: boolean;
@@ -522,6 +516,12 @@ export declare const actionChangeExportEmbedScene: {
522
516
  pendingImageElementId: string | null;
523
517
  showHyperlinkPopup: false | "editor" | "info";
524
518
  selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
519
+ snapLines: readonly import("../snapping").SnapLine[];
520
+ originSnapOffset: {
521
+ x: number;
522
+ y: number;
523
+ } | null;
524
+ objectsSnapModeEnabled: boolean;
525
525
  };
526
526
  commitToHistory: false;
527
527
  };
@@ -573,15 +573,9 @@ export declare const actionSaveToActiveFile: {
573
573
  editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
574
574
  editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
575
575
  activeTool: {
576
- lastActiveTool: import("../types").LastActiveTool;
576
+ lastActiveTool: import("../types").ActiveTool | null;
577
577
  locked: boolean;
578
- } & ({
579
- type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "embeddable" | "image" | "frame" | "freedraw" | "eraser" | "hand";
580
- customType: null;
581
- } | {
582
- type: "custom";
583
- customType: string;
584
- });
578
+ } & import("../types").ActiveTool;
585
579
  penMode: boolean;
586
580
  penDetected: boolean;
587
581
  exportBackground: boolean;
@@ -654,14 +648,20 @@ export declare const actionSaveToActiveFile: {
654
648
  pendingImageElementId: string | null;
655
649
  showHyperlinkPopup: false | "editor" | "info";
656
650
  selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
651
+ snapLines: readonly import("../snapping").SnapLine[];
652
+ originSnapOffset: {
653
+ x: number;
654
+ y: number;
655
+ } | null;
656
+ objectsSnapModeEnabled: boolean;
657
657
  };
658
658
  } | {
659
659
  commitToHistory: false;
660
660
  appState?: undefined;
661
661
  }>;
662
- keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
662
+ keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean;
663
663
  } & {
664
- keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
664
+ keyTest?: ((event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean) | undefined;
665
665
  };
666
666
  export declare const actionSaveFileToDisk: {
667
667
  name: "saveFileToDisk";
@@ -704,15 +704,9 @@ export declare const actionSaveFileToDisk: {
704
704
  editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
705
705
  editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
706
706
  activeTool: {
707
- lastActiveTool: import("../types").LastActiveTool;
707
+ lastActiveTool: import("../types").ActiveTool | null;
708
708
  locked: boolean;
709
- } & ({
710
- type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "embeddable" | "image" | "frame" | "freedraw" | "eraser" | "hand";
711
- customType: null;
712
- } | {
713
- type: "custom";
714
- customType: string;
715
- });
709
+ } & import("../types").ActiveTool;
716
710
  penMode: boolean;
717
711
  penDetected: boolean;
718
712
  exportBackground: boolean;
@@ -790,15 +784,21 @@ export declare const actionSaveFileToDisk: {
790
784
  pendingImageElementId: string | null;
791
785
  showHyperlinkPopup: false | "editor" | "info";
792
786
  selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
787
+ snapLines: readonly import("../snapping").SnapLine[];
788
+ originSnapOffset: {
789
+ x: number;
790
+ y: number;
791
+ } | null;
792
+ objectsSnapModeEnabled: boolean;
793
793
  };
794
794
  } | {
795
795
  commitToHistory: false;
796
796
  appState?: undefined;
797
797
  }>;
798
- keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
798
+ keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean;
799
799
  PanelComponent: ({ updateData }: import("./types").PanelComponentProps) => JSX.Element;
800
800
  } & {
801
- keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
801
+ keyTest?: ((event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean) | undefined;
802
802
  };
803
803
  export declare const actionLoadScene: {
804
804
  name: "loadScene";
@@ -809,25 +809,11 @@ export declare const actionLoadScene: {
809
809
  perform: (elements: readonly import("../element/types").ExcalidrawElement[], appState: Readonly<import("../types").AppState>, _: any, app: import("../types").AppClassProperties) => Promise<false | {
810
810
  elements: import("../element/types").ExcalidrawElement[];
811
811
  appState: {
812
- theme: Theme;
813
- name: string;
814
812
  activeTool: {
815
- lastActiveTool: import("../types").LastActiveTool;
813
+ lastActiveTool: import("../types").ActiveTool | null;
816
814
  locked: boolean;
817
- } & ({
818
- type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "embeddable" | "image" | "frame" | "freedraw" | "eraser" | "hand";
819
- customType: null;
820
- } | {
821
- type: "custom";
822
- customType: string;
823
- });
824
- toast: {
825
- message: string;
826
- closable?: boolean | undefined;
827
- duration?: number | undefined;
828
- } | null;
829
- collaborators: Map<string, import("../types").Collaborator>;
830
- penMode: boolean;
815
+ } & import("../types").ActiveTool;
816
+ name: string;
831
817
  contextMenu: {
832
818
  items: import("../components/ContextMenu").ContextMenuItems;
833
819
  top: number;
@@ -858,6 +844,7 @@ export declare const actionLoadScene: {
858
844
  elementsToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawElement>[] | null;
859
845
  editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
860
846
  editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
847
+ penMode: boolean;
861
848
  penDetected: boolean;
862
849
  exportBackground: boolean;
863
850
  exportEmbedScene: boolean;
@@ -903,7 +890,13 @@ export declare const actionLoadScene: {
903
890
  };
904
891
  selectedElementsAreBeingDragged: boolean;
905
892
  shouldCacheIgnoreZoom: boolean;
893
+ toast: {
894
+ message: string;
895
+ closable?: boolean | undefined;
896
+ duration?: number | undefined;
897
+ } | null;
906
898
  zenModeEnabled: boolean;
899
+ theme: Theme;
907
900
  gridSize: number | null;
908
901
  viewModeEnabled: boolean;
909
902
  selectedGroupIds: {
@@ -911,6 +904,7 @@ export declare const actionLoadScene: {
911
904
  };
912
905
  editingGroupId: string | null;
913
906
  fileHandle: import("browser-fs-access").FileSystemHandle | null;
907
+ collaborators: Map<string, import("../types").Collaborator>;
914
908
  showStats: boolean;
915
909
  currentChartType: import("../element/types").ChartType;
916
910
  pasteDialog: {
@@ -923,6 +917,12 @@ export declare const actionLoadScene: {
923
917
  pendingImageElementId: string | null;
924
918
  showHyperlinkPopup: false | "editor" | "info";
925
919
  selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
920
+ snapLines: readonly import("../snapping").SnapLine[];
921
+ originSnapOffset: {
922
+ x: number;
923
+ y: number;
924
+ } | null;
925
+ objectsSnapModeEnabled: boolean;
926
926
  };
927
927
  files: import("../types").BinaryFiles;
928
928
  commitToHistory: true;
@@ -960,15 +960,9 @@ export declare const actionLoadScene: {
960
960
  editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
961
961
  editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
962
962
  activeTool: {
963
- lastActiveTool: import("../types").LastActiveTool;
963
+ lastActiveTool: import("../types").ActiveTool | null;
964
964
  locked: boolean;
965
- } & ({
966
- type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "embeddable" | "image" | "frame" | "freedraw" | "eraser" | "hand";
967
- customType: null;
968
- } | {
969
- type: "custom";
970
- customType: string;
971
- });
965
+ } & import("../types").ActiveTool;
972
966
  penMode: boolean;
973
967
  penDetected: boolean;
974
968
  exportBackground: boolean;
@@ -1047,13 +1041,19 @@ export declare const actionLoadScene: {
1047
1041
  pendingImageElementId: string | null;
1048
1042
  showHyperlinkPopup: false | "editor" | "info";
1049
1043
  selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
1044
+ snapLines: readonly import("../snapping").SnapLine[];
1045
+ originSnapOffset: {
1046
+ x: number;
1047
+ y: number;
1048
+ } | null;
1049
+ objectsSnapModeEnabled: boolean;
1050
1050
  };
1051
1051
  files: import("../types").BinaryFiles;
1052
1052
  commitToHistory: false;
1053
1053
  }>;
1054
- keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
1054
+ keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean;
1055
1055
  } & {
1056
- keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
1056
+ keyTest?: ((event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean) | undefined;
1057
1057
  };
1058
1058
  export declare const actionExportWithDarkMode: {
1059
1059
  name: "exportWithDarkMode";
@@ -1095,15 +1095,9 @@ export declare const actionExportWithDarkMode: {
1095
1095
  editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
1096
1096
  editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
1097
1097
  activeTool: {
1098
- lastActiveTool: import("../types").LastActiveTool;
1098
+ lastActiveTool: import("../types").ActiveTool | null;
1099
1099
  locked: boolean;
1100
- } & ({
1101
- type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "embeddable" | "image" | "frame" | "freedraw" | "eraser" | "hand";
1102
- customType: null;
1103
- } | {
1104
- type: "custom";
1105
- customType: string;
1106
- });
1100
+ } & import("../types").ActiveTool;
1107
1101
  penMode: boolean;
1108
1102
  penDetected: boolean;
1109
1103
  exportBackground: boolean;
@@ -1181,6 +1175,12 @@ export declare const actionExportWithDarkMode: {
1181
1175
  pendingImageElementId: string | null;
1182
1176
  showHyperlinkPopup: false | "editor" | "info";
1183
1177
  selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
1178
+ snapLines: readonly import("../snapping").SnapLine[];
1179
+ originSnapOffset: {
1180
+ x: number;
1181
+ y: number;
1182
+ } | null;
1183
+ objectsSnapModeEnabled: boolean;
1184
1184
  };
1185
1185
  commitToHistory: false;
1186
1186
  };
@@ -38,15 +38,9 @@ export declare const actionFinalize: {
38
38
  elementsToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawElement>[] | null;
39
39
  editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
40
40
  activeTool: {
41
- lastActiveTool: import("../types").LastActiveTool;
41
+ lastActiveTool: import("../types").ActiveTool | null;
42
42
  locked: boolean;
43
- } & ({
44
- type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "embeddable" | "image" | "frame" | "freedraw" | "eraser" | "hand";
45
- customType: null;
46
- } | {
47
- type: "custom";
48
- customType: string;
49
- });
43
+ } & import("../types").ActiveTool;
50
44
  penMode: boolean;
51
45
  penDetected: boolean;
52
46
  exportBackground: boolean;
@@ -124,6 +118,12 @@ export declare const actionFinalize: {
124
118
  pendingImageElementId: string | null;
125
119
  showHyperlinkPopup: false | "editor" | "info";
126
120
  selectedLinearElement: LinearElementEditor | null;
121
+ snapLines: readonly import("../snapping").SnapLine[];
122
+ originSnapOffset: {
123
+ x: number;
124
+ y: number;
125
+ } | null;
126
+ objectsSnapModeEnabled: boolean;
127
127
  };
128
128
  commitToHistory: true;
129
129
  } | {
@@ -131,15 +131,9 @@ export declare const actionFinalize: {
131
131
  appState: {
132
132
  cursorButton: "up";
133
133
  activeTool: {
134
- lastActiveTool: import("../types").LastActiveTool;
134
+ lastActiveTool: import("../types").ActiveTool | null;
135
135
  locked: boolean;
136
- } & ({
137
- type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "embeddable" | "image" | "frame" | "freedraw" | "eraser" | "hand";
138
- customType: null;
139
- } | {
140
- type: "custom";
141
- customType: string;
142
- });
136
+ } & import("../types").ActiveTool;
143
137
  activeEmbeddable: null;
144
138
  draggingElement: null;
145
139
  multiElement: null;
@@ -244,11 +238,17 @@ export declare const actionFinalize: {
244
238
  data: import("../charts").Spreadsheet;
245
239
  };
246
240
  showHyperlinkPopup: false | "editor" | "info";
241
+ snapLines: readonly import("../snapping").SnapLine[];
242
+ originSnapOffset: {
243
+ x: number;
244
+ y: number;
245
+ } | null;
246
+ objectsSnapModeEnabled: boolean;
247
247
  };
248
248
  commitToHistory: boolean;
249
249
  };
250
- keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>, appState: AppState) => boolean;
250
+ keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent, appState: AppState) => boolean;
251
251
  PanelComponent: ({ appState, updateData, data }: import("./types").PanelComponentProps) => JSX.Element;
252
252
  } & {
253
- keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>, appState: AppState) => boolean) | undefined;
253
+ keyTest?: ((event: import("react").KeyboardEvent<Element> | KeyboardEvent, appState: AppState) => boolean) | undefined;
254
254
  };
@@ -10,10 +10,10 @@ export declare const actionFlipHorizontal: {
10
10
  appState: Readonly<AppState>;
11
11
  commitToHistory: true;
12
12
  };
13
- keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
13
+ keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean;
14
14
  contextItemLabel: string;
15
15
  } & {
16
- keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
16
+ keyTest?: ((event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean) | undefined;
17
17
  };
18
18
  export declare const actionFlipVertical: {
19
19
  name: "flipVertical";
@@ -25,8 +25,8 @@ export declare const actionFlipVertical: {
25
25
  appState: Readonly<AppState>;
26
26
  commitToHistory: true;
27
27
  };
28
- keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
28
+ keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean;
29
29
  contextItemLabel: string;
30
30
  } & {
31
- keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
31
+ keyTest?: ((event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean) | undefined;
32
32
  };
@@ -57,15 +57,9 @@ export declare const actionRemoveAllElementsFromFrame: {
57
57
  editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
58
58
  editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
59
59
  activeTool: {
60
- lastActiveTool: import("../types").LastActiveTool;
60
+ lastActiveTool: import("../types").ActiveTool | null;
61
61
  locked: boolean;
62
- } & ({
63
- type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "embeddable" | "image" | "frame" | "freedraw" | "eraser" | "hand";
64
- customType: null;
65
- } | {
66
- type: "custom";
67
- customType: string;
68
- });
62
+ } & import("../types").ActiveTool;
69
63
  penMode: boolean;
70
64
  penDetected: boolean;
71
65
  exportBackground: boolean;
@@ -141,6 +135,12 @@ export declare const actionRemoveAllElementsFromFrame: {
141
135
  pendingImageElementId: string | null;
142
136
  showHyperlinkPopup: false | "editor" | "info";
143
137
  selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
138
+ snapLines: readonly import("../snapping").SnapLine[];
139
+ originSnapOffset: {
140
+ x: number;
141
+ y: number;
142
+ } | null;
143
+ objectsSnapModeEnabled: boolean;
144
144
  };
145
145
  commitToHistory: true;
146
146
  } | {
@@ -193,15 +193,9 @@ export declare const actionupdateFrameRendering: {
193
193
  editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
194
194
  editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
195
195
  activeTool: {
196
- lastActiveTool: import("../types").LastActiveTool;
196
+ lastActiveTool: import("../types").ActiveTool | null;
197
197
  locked: boolean;
198
- } & ({
199
- type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "embeddable" | "image" | "frame" | "freedraw" | "eraser" | "hand";
200
- customType: null;
201
- } | {
202
- type: "custom";
203
- customType: string;
204
- });
198
+ } & import("../types").ActiveTool;
205
199
  penMode: boolean;
206
200
  penDetected: boolean;
207
201
  exportBackground: boolean;
@@ -280,6 +274,12 @@ export declare const actionupdateFrameRendering: {
280
274
  pendingImageElementId: string | null;
281
275
  showHyperlinkPopup: false | "editor" | "info";
282
276
  selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
277
+ snapLines: readonly import("../snapping").SnapLine[];
278
+ originSnapOffset: {
279
+ x: number;
280
+ y: number;
281
+ } | null;
282
+ objectsSnapModeEnabled: boolean;
283
283
  };
284
284
  commitToHistory: false;
285
285
  };
@@ -297,15 +297,9 @@ export declare const actionSetFrameAsActiveTool: {
297
297
  elements: readonly ExcalidrawElement[];
298
298
  appState: {
299
299
  activeTool: {
300
- lastActiveTool: import("../types").LastActiveTool;
300
+ lastActiveTool: import("../types").ActiveTool | null;
301
301
  locked: boolean;
302
- } & ({
303
- type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "embeddable" | "image" | "frame" | "freedraw" | "eraser" | "hand";
304
- customType: null;
305
- } | {
306
- type: "custom";
307
- customType: string;
308
- });
302
+ } & import("../types").ActiveTool;
309
303
  contextMenu: {
310
304
  items: import("../components/ContextMenu").ContextMenuItems;
311
305
  top: number;
@@ -414,10 +408,16 @@ export declare const actionSetFrameAsActiveTool: {
414
408
  pendingImageElementId: string | null;
415
409
  showHyperlinkPopup: false | "editor" | "info";
416
410
  selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
411
+ snapLines: readonly import("../snapping").SnapLine[];
412
+ originSnapOffset: {
413
+ x: number;
414
+ y: number;
415
+ } | null;
416
+ objectsSnapModeEnabled: boolean;
417
417
  };
418
418
  commitToHistory: false;
419
419
  };
420
- keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
420
+ keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean;
421
421
  } & {
422
- keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
422
+ keyTest?: ((event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean) | undefined;
423
423
  };
@@ -49,15 +49,9 @@ export declare const actionGroup: {
49
49
  editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
50
50
  editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
51
51
  activeTool: {
52
- lastActiveTool: import("../types").LastActiveTool;
52
+ lastActiveTool: import("../types").ActiveTool | null;
53
53
  locked: boolean;
54
- } & ({
55
- type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "embeddable" | "image" | "frame" | "freedraw" | "eraser" | "hand";
56
- customType: null;
57
- } | {
58
- type: "custom";
59
- customType: string;
60
- });
54
+ } & import("../types").ActiveTool;
61
55
  penMode: boolean;
62
56
  penDetected: boolean;
63
57
  exportBackground: boolean;
@@ -129,16 +123,22 @@ export declare const actionGroup: {
129
123
  pendingImageElementId: string | null;
130
124
  showHyperlinkPopup: false | "editor" | "info";
131
125
  selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
126
+ snapLines: readonly import("../snapping").SnapLine[];
127
+ originSnapOffset: {
128
+ x: number;
129
+ y: number;
130
+ } | null;
131
+ objectsSnapModeEnabled: boolean;
132
132
  };
133
133
  elements: ExcalidrawElement[];
134
134
  commitToHistory: true;
135
135
  };
136
136
  contextItemLabel: string;
137
137
  predicate: (elements: readonly ExcalidrawElement[], appState: AppState, _: import("../types").ExcalidrawProps, app: AppClassProperties) => boolean;
138
- keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
138
+ keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean;
139
139
  PanelComponent: ({ elements, appState, updateData, app }: import("./types").PanelComponentProps) => JSX.Element;
140
140
  } & {
141
- keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
141
+ keyTest?: ((event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean) | undefined;
142
142
  };
143
143
  export declare const actionUngroup: {
144
144
  name: "ungroup";
@@ -189,15 +189,9 @@ export declare const actionUngroup: {
189
189
  editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
190
190
  editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
191
191
  activeTool: {
192
- lastActiveTool: import("../types").LastActiveTool;
192
+ lastActiveTool: import("../types").ActiveTool | null;
193
193
  locked: boolean;
194
- } & ({
195
- type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "embeddable" | "image" | "frame" | "freedraw" | "eraser" | "hand";
196
- customType: null;
197
- } | {
198
- type: "custom";
199
- customType: string;
200
- });
194
+ } & import("../types").ActiveTool;
201
195
  penMode: boolean;
202
196
  penDetected: boolean;
203
197
  exportBackground: boolean;
@@ -269,14 +263,20 @@ export declare const actionUngroup: {
269
263
  pendingImageElementId: string | null;
270
264
  showHyperlinkPopup: false | "editor" | "info";
271
265
  selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
266
+ snapLines: readonly import("../snapping").SnapLine[];
267
+ originSnapOffset: {
268
+ x: number;
269
+ y: number;
270
+ } | null;
271
+ objectsSnapModeEnabled: boolean;
272
272
  };
273
273
  elements: ExcalidrawElement[];
274
274
  commitToHistory: true;
275
275
  };
276
- keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
276
+ keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean;
277
277
  contextItemLabel: string;
278
278
  predicate: (elements: readonly ExcalidrawElement[], appState: AppState) => boolean;
279
279
  PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps) => JSX.Element;
280
280
  } & {
281
- keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
281
+ keyTest?: ((event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean) | undefined;
282
282
  };
@@ -39,15 +39,9 @@ export declare const actionToggleLinearEditor: {
39
39
  elementsToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawElement>[] | null;
40
40
  editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
41
41
  activeTool: {
42
- lastActiveTool: import("../types").LastActiveTool;
42
+ lastActiveTool: import("../types").ActiveTool | null;
43
43
  locked: boolean;
44
- } & ({
45
- type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "embeddable" | "image" | "frame" | "freedraw" | "eraser" | "hand";
46
- customType: null;
47
- } | {
48
- type: "custom";
49
- customType: string;
50
- });
44
+ } & import("../types").ActiveTool;
51
45
  penMode: boolean;
52
46
  penDetected: boolean;
53
47
  exportBackground: boolean;
@@ -126,6 +120,12 @@ export declare const actionToggleLinearEditor: {
126
120
  pendingImageElementId: string | null;
127
121
  showHyperlinkPopup: false | "editor" | "info";
128
122
  selectedLinearElement: LinearElementEditor | null;
123
+ snapLines: readonly import("../snapping").SnapLine[];
124
+ originSnapOffset: {
125
+ x: number;
126
+ y: number;
127
+ } | null;
128
+ objectsSnapModeEnabled: boolean;
129
129
  };
130
130
  commitToHistory: false;
131
131
  };