@zsviczian/excalidraw 0.13.0-obsidian-2 → 0.14.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.
Files changed (80) hide show
  1. package/README.md +417 -19
  2. package/dist/excalidraw.development.js +581 -1153
  3. package/dist/excalidraw.production.min.js +1 -1
  4. package/dist/excalidraw.production.min.js.LICENSE.txt +0 -102
  5. package/package.json +1 -1
  6. package/types/actions/actionAddToLibrary.d.ts +39 -18
  7. package/types/actions/actionAlign.d.ts +6 -18
  8. package/types/actions/actionBoundText.d.ts +15 -8
  9. package/types/actions/actionCanvas.d.ts +246 -76
  10. package/types/actions/actionClipboard.d.ts +84 -31
  11. package/types/actions/actionDeleteSelected.d.ts +40 -21
  12. package/types/actions/actionDistribute.d.ts +2 -6
  13. package/types/actions/actionDuplicateSelection.d.ts +1 -3
  14. package/types/actions/actionExport.d.ts +125 -78
  15. package/types/actions/actionFinalize.d.ts +27 -15
  16. package/types/actions/actionFlip.d.ts +2 -2
  17. package/types/actions/actionGroup.d.ts +4 -8
  18. package/types/actions/actionLinearEditor.d.ts +14 -7
  19. package/types/actions/actionMenu.d.ts +40 -26
  20. package/types/actions/actionNavigate.d.ts +1 -3
  21. package/types/actions/actionProperties.d.ts +182 -117
  22. package/types/actions/actionStyles.d.ts +13 -6
  23. package/types/actions/actionToggleGridMode.d.ts +14 -6
  24. package/types/actions/actionToggleLock.d.ts +13 -6
  25. package/types/actions/actionToggleStats.d.ts +13 -6
  26. package/types/actions/actionToggleViewMode.d.ts +14 -6
  27. package/types/actions/actionToggleZenMode.d.ts +14 -6
  28. package/types/actions/actionZindex.d.ts +4 -12
  29. package/types/actions/manager.d.ts +2 -1
  30. package/types/actions/types.d.ts +3 -5
  31. package/types/appState.d.ts +8 -6
  32. package/types/components/ActiveConfirmDialog.d.ts +24 -0
  33. package/types/components/App.d.ts +8 -50
  34. package/types/components/Button.d.ts +15 -0
  35. package/types/components/CollabButton.d.ts +1 -2
  36. package/types/components/ContextMenu.d.ts +8 -20
  37. package/types/components/HandButton.d.ts +10 -0
  38. package/types/components/JSONExportDialog.d.ts +3 -1
  39. package/types/components/LayerUI.d.ts +3 -3
  40. package/types/components/LibraryMenuHeaderContent.d.ts +23 -0
  41. package/types/components/LockButton.d.ts +0 -1
  42. package/types/components/MobileMenu.d.ts +5 -6
  43. package/types/components/ToolButton.d.ts +1 -1
  44. package/types/components/UserList.d.ts +0 -2
  45. package/types/components/dropdownMenu/DropdownMenu.d.ts +66 -0
  46. package/types/components/dropdownMenu/DropdownMenuContent.d.ts +15 -0
  47. package/types/components/dropdownMenu/DropdownMenuGroup.d.ts +11 -0
  48. package/types/components/dropdownMenu/DropdownMenuItem.d.ts +12 -0
  49. package/types/components/dropdownMenu/DropdownMenuItemContent.d.ts +6 -0
  50. package/types/components/dropdownMenu/DropdownMenuItemCustom.d.ts +6 -0
  51. package/types/components/dropdownMenu/DropdownMenuItemLink.d.ts +13 -0
  52. package/types/components/dropdownMenu/DropdownMenuSeparator.d.ts +5 -0
  53. package/types/components/dropdownMenu/DropdownMenuTrigger.d.ts +9 -0
  54. package/types/components/dropdownMenu/common.d.ts +6 -0
  55. package/types/components/dropdownMenu/dropdownMenuUtils.d.ts +3 -0
  56. package/types/components/footer/Footer.d.ts +13 -0
  57. package/types/components/footer/FooterCenter.d.ts +8 -0
  58. package/types/components/icons.d.ts +2 -1
  59. package/types/components/live-collaboration/LiveCollaborationTrigger.d.ts +10 -0
  60. package/types/components/main-menu/DefaultItems.d.ts +44 -0
  61. package/types/components/main-menu/MainMenu.d.ts +60 -0
  62. package/types/components/mainMenu/DefaultItems.d.ts +44 -0
  63. package/types/components/mainMenu/MainMenu.d.ts +63 -0
  64. package/types/components/welcome-screen/WelcomeScreen.Center.d.ts +58 -0
  65. package/types/components/welcome-screen/WelcomeScreen.Hints.d.ts +19 -0
  66. package/types/components/welcome-screen/WelcomeScreen.d.ts +85 -0
  67. package/types/constants.d.ts +6 -4
  68. package/types/element/Hyperlink.d.ts +15 -10
  69. package/types/element/linearElementEditor.d.ts +14 -6
  70. package/types/element/textElement.d.ts +7 -0
  71. package/types/element/textWysiwyg.d.ts +6 -1
  72. package/types/excalidraw-app/data/index.d.ts +5 -0
  73. package/types/excalidraw-app/data/localStorage.d.ts +5 -0
  74. package/types/keys.d.ts +2 -3
  75. package/types/packages/excalidraw/example/CustomFooter.d.ts +5 -0
  76. package/types/packages/excalidraw/example/MobileFooter.d.ts +5 -0
  77. package/types/packages/excalidraw/index.d.ts +10 -0
  78. package/types/renderer/easingFunctions.d.ts +6 -0
  79. package/types/types.d.ts +54 -26
  80. package/types/utils.d.ts +23 -3
@@ -7,6 +7,21 @@ export declare const actionCopy: {
7
7
  perform: (elements: readonly import("../element/types").ExcalidrawElement[], appState: Readonly<import("../types").AppState>, _: any, app: import("../types").AppClassProperties) => {
8
8
  commitToHistory: false;
9
9
  };
10
+ predicate: (elements: readonly import("../element/types").ExcalidrawElement[], appState: import("../types").AppState, appProps: import("../types").ExcalidrawProps, app: import("../types").AppClassProperties) => true;
11
+ contextItemLabel: string;
12
+ keyTest: undefined;
13
+ } & {
14
+ keyTest?: undefined;
15
+ };
16
+ export declare const actionPaste: {
17
+ name: "paste";
18
+ trackEvent: {
19
+ category: "element";
20
+ };
21
+ perform: (elements: any, appStates: any, data: any, app: import("../types").AppClassProperties) => {
22
+ commitToHistory: false;
23
+ };
24
+ predicate: (elements: readonly import("../element/types").ExcalidrawElement[], appState: import("../types").AppState, appProps: import("../types").ExcalidrawProps, app: import("../types").AppClassProperties) => true;
10
25
  contextItemLabel: string;
11
26
  keyTest: undefined;
12
27
  } & {
@@ -21,6 +36,11 @@ export declare const actionCut: {
21
36
  elements: import("../element/types").ExcalidrawElement[];
22
37
  appState: {
23
38
  editingLinearElement: null;
39
+ contextMenu: {
40
+ items: import("../components/ContextMenu").ContextMenuItems;
41
+ top: number;
42
+ left: number;
43
+ } | null;
24
44
  showWelcomeScreen: boolean;
25
45
  isLoading: boolean;
26
46
  errorMessage: string | null;
@@ -33,16 +53,15 @@ export declare const actionCut: {
33
53
  suggestedBindings: import("../element/binding").SuggestedBinding[];
34
54
  editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
35
55
  activeTool: {
36
- type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
37
- lastActiveToolBeforeEraser: import("../types").LastActiveToolBeforeEraser;
56
+ lastActiveTool: import("../types").LastActiveTool;
38
57
  locked: boolean;
58
+ } & ({
59
+ type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser" | "hand";
39
60
  customType: null;
40
61
  } | {
41
62
  type: "custom";
42
63
  customType: string;
43
- lastActiveToolBeforeEraser: import("../types").LastActiveToolBeforeEraser;
44
- locked: boolean;
45
- };
64
+ });
46
65
  penMode: boolean;
47
66
  penDetected: boolean;
48
67
  exportBackground: boolean;
@@ -76,7 +95,7 @@ export declare const actionCut: {
76
95
  openMenu: "canvas" | "shape" | null;
77
96
  openPopup: "canvasColorPicker" | "backgroundColorPicker" | "strokeColorPicker" | null;
78
97
  openSidebar: "library" | "customSidebar" | null;
79
- openDialog: "imageExport" | "help" | null;
98
+ openDialog: "imageExport" | "help" | "jsonExport" | null;
80
99
  isSidebarDocked: boolean;
81
100
  lastPointerDownWith: import("../element/types").PointerType;
82
101
  selectedElementIds: {
@@ -94,6 +113,7 @@ export declare const actionCut: {
94
113
  zenModeEnabled: boolean;
95
114
  theme: string;
96
115
  gridSize: number | null;
116
+ previousGridSize: number | null;
97
117
  viewModeEnabled: boolean;
98
118
  selectedGroupIds: {
99
119
  [groupId: string]: boolean;
@@ -123,6 +143,8 @@ export declare const actionCut: {
123
143
  elementBackground?: string[] | undefined;
124
144
  elementStroke?: string[] | undefined;
125
145
  };
146
+ allowWheelZoom?: boolean | undefined;
147
+ allowPinchZoom?: boolean | undefined;
126
148
  selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
127
149
  };
128
150
  commitToHistory: false;
@@ -158,6 +180,11 @@ export declare const actionCut: {
158
180
  hoverPointIndex: number;
159
181
  segmentMidPointHoveredCoords: readonly [number, number] | null;
160
182
  };
183
+ contextMenu: {
184
+ items: import("../components/ContextMenu").ContextMenuItems;
185
+ top: number;
186
+ left: number;
187
+ } | null;
161
188
  showWelcomeScreen: boolean;
162
189
  isLoading: boolean;
163
190
  errorMessage: string | null;
@@ -170,16 +197,15 @@ export declare const actionCut: {
170
197
  suggestedBindings: import("../element/binding").SuggestedBinding[];
171
198
  editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
172
199
  activeTool: {
173
- type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
174
- lastActiveToolBeforeEraser: import("../types").LastActiveToolBeforeEraser;
200
+ lastActiveTool: import("../types").LastActiveTool;
175
201
  locked: boolean;
202
+ } & ({
203
+ type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser" | "hand";
176
204
  customType: null;
177
205
  } | {
178
206
  type: "custom";
179
207
  customType: string;
180
- lastActiveToolBeforeEraser: import("../types").LastActiveToolBeforeEraser;
181
- locked: boolean;
182
- };
208
+ });
183
209
  penMode: boolean;
184
210
  penDetected: boolean;
185
211
  exportBackground: boolean;
@@ -213,7 +239,7 @@ export declare const actionCut: {
213
239
  openMenu: "canvas" | "shape" | null;
214
240
  openPopup: "canvasColorPicker" | "backgroundColorPicker" | "strokeColorPicker" | null;
215
241
  openSidebar: "library" | "customSidebar" | null;
216
- openDialog: "imageExport" | "help" | null;
242
+ openDialog: "imageExport" | "help" | "jsonExport" | null;
217
243
  isSidebarDocked: boolean;
218
244
  lastPointerDownWith: import("../element/types").PointerType;
219
245
  selectedElementIds: {
@@ -231,6 +257,7 @@ export declare const actionCut: {
231
257
  zenModeEnabled: boolean;
232
258
  theme: string;
233
259
  gridSize: number | null;
260
+ previousGridSize: number | null;
234
261
  viewModeEnabled: boolean;
235
262
  selectedGroupIds: {
236
263
  [groupId: string]: boolean;
@@ -260,6 +287,8 @@ export declare const actionCut: {
260
287
  elementBackground?: string[] | undefined;
261
288
  elementStroke?: string[] | undefined;
262
289
  };
290
+ allowWheelZoom?: boolean | undefined;
291
+ allowPinchZoom?: boolean | undefined;
263
292
  selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
264
293
  };
265
294
  commitToHistory: true;
@@ -267,18 +296,22 @@ export declare const actionCut: {
267
296
  elements: import("../element/types").ExcalidrawElement[];
268
297
  appState: {
269
298
  activeTool: {
270
- type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
271
- lastActiveToolBeforeEraser: import("../types").LastActiveToolBeforeEraser;
299
+ lastActiveTool: import("../types").LastActiveTool;
272
300
  locked: boolean;
301
+ } & ({
302
+ type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser" | "hand";
273
303
  customType: null;
274
304
  } | {
275
305
  type: "custom";
276
306
  customType: string;
277
- lastActiveToolBeforeEraser: import("../types").LastActiveToolBeforeEraser;
278
- locked: boolean;
279
- };
307
+ });
280
308
  multiElement: null;
281
309
  selectedElementIds: {};
310
+ contextMenu: {
311
+ items: import("../components/ContextMenu").ContextMenuItems;
312
+ top: number;
313
+ left: number;
314
+ } | null;
282
315
  showWelcomeScreen: boolean;
283
316
  isLoading: boolean;
284
317
  errorMessage: string | null;
@@ -323,7 +356,7 @@ export declare const actionCut: {
323
356
  openMenu: "canvas" | "shape" | null;
324
357
  openPopup: "canvasColorPicker" | "backgroundColorPicker" | "strokeColorPicker" | null;
325
358
  openSidebar: "library" | "customSidebar" | null;
326
- openDialog: "imageExport" | "help" | null;
359
+ openDialog: "imageExport" | "help" | "jsonExport" | null;
327
360
  isSidebarDocked: boolean;
328
361
  lastPointerDownWith: import("../element/types").PointerType;
329
362
  previousSelectedElementIds: {
@@ -338,6 +371,7 @@ export declare const actionCut: {
338
371
  zenModeEnabled: boolean;
339
372
  theme: string;
340
373
  gridSize: number | null;
374
+ previousGridSize: number | null;
341
375
  viewModeEnabled: boolean;
342
376
  selectedGroupIds: {
343
377
  [groupId: string]: boolean;
@@ -367,10 +401,13 @@ export declare const actionCut: {
367
401
  elementBackground?: string[] | undefined;
368
402
  elementStroke?: string[] | undefined;
369
403
  };
404
+ allowWheelZoom?: boolean | undefined;
405
+ allowPinchZoom?: boolean | undefined;
370
406
  selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
371
407
  };
372
408
  commitToHistory: boolean;
373
409
  };
410
+ predicate: (elements: readonly import("../element/types").ExcalidrawElement[], appState: import("../types").AppState, appProps: import("../types").ExcalidrawProps, app: import("../types").AppClassProperties) => boolean;
374
411
  contextItemLabel: string;
375
412
  keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
376
413
  } & {
@@ -387,6 +424,11 @@ export declare const actionCopyAsSvg: {
387
424
  } | {
388
425
  appState: {
389
426
  errorMessage: any;
427
+ contextMenu: {
428
+ items: import("../components/ContextMenu").ContextMenuItems;
429
+ top: number;
430
+ left: number;
431
+ } | null;
390
432
  showWelcomeScreen: boolean;
391
433
  isLoading: boolean;
392
434
  draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
@@ -399,16 +441,15 @@ export declare const actionCopyAsSvg: {
399
441
  editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
400
442
  editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
401
443
  activeTool: {
402
- type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
403
- lastActiveToolBeforeEraser: import("../types").LastActiveToolBeforeEraser;
444
+ lastActiveTool: import("../types").LastActiveTool;
404
445
  locked: boolean;
446
+ } & ({
447
+ type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser" | "hand";
405
448
  customType: null;
406
449
  } | {
407
450
  type: "custom";
408
451
  customType: string;
409
- lastActiveToolBeforeEraser: import("../types").LastActiveToolBeforeEraser;
410
- locked: boolean;
411
- };
452
+ });
412
453
  penMode: boolean;
413
454
  penDetected: boolean;
414
455
  exportBackground: boolean;
@@ -442,7 +483,7 @@ export declare const actionCopyAsSvg: {
442
483
  openMenu: "canvas" | "shape" | null;
443
484
  openPopup: "canvasColorPicker" | "backgroundColorPicker" | "strokeColorPicker" | null;
444
485
  openSidebar: "library" | "customSidebar" | null;
445
- openDialog: "imageExport" | "help" | null;
486
+ openDialog: "imageExport" | "help" | "jsonExport" | null;
446
487
  isSidebarDocked: boolean;
447
488
  lastPointerDownWith: import("../element/types").PointerType;
448
489
  selectedElementIds: {
@@ -460,6 +501,7 @@ export declare const actionCopyAsSvg: {
460
501
  zenModeEnabled: boolean;
461
502
  theme: string;
462
503
  gridSize: number | null;
504
+ previousGridSize: number | null;
463
505
  viewModeEnabled: boolean;
464
506
  selectedGroupIds: {
465
507
  [groupId: string]: boolean;
@@ -489,10 +531,13 @@ export declare const actionCopyAsSvg: {
489
531
  elementBackground?: string[] | undefined;
490
532
  elementStroke?: string[] | undefined;
491
533
  };
534
+ allowWheelZoom?: boolean | undefined;
535
+ allowPinchZoom?: boolean | undefined;
492
536
  selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
493
537
  };
494
538
  commitToHistory: false;
495
539
  }>;
540
+ predicate: (elements: readonly import("../element/types").ExcalidrawElement[]) => boolean;
496
541
  contextItemLabel: string;
497
542
  } & {
498
543
  keyTest?: undefined;
@@ -508,6 +553,11 @@ export declare const actionCopyAsPng: {
508
553
  } | {
509
554
  appState: {
510
555
  errorMessage: any;
556
+ contextMenu: {
557
+ items: import("../components/ContextMenu").ContextMenuItems;
558
+ top: number;
559
+ left: number;
560
+ } | null;
511
561
  showWelcomeScreen: boolean;
512
562
  isLoading: boolean;
513
563
  draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
@@ -520,16 +570,15 @@ export declare const actionCopyAsPng: {
520
570
  editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
521
571
  editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
522
572
  activeTool: {
523
- type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
524
- lastActiveToolBeforeEraser: import("../types").LastActiveToolBeforeEraser;
573
+ lastActiveTool: import("../types").LastActiveTool;
525
574
  locked: boolean;
575
+ } & ({
576
+ type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser" | "hand";
526
577
  customType: null;
527
578
  } | {
528
579
  type: "custom";
529
580
  customType: string;
530
- lastActiveToolBeforeEraser: import("../types").LastActiveToolBeforeEraser;
531
- locked: boolean;
532
- };
581
+ });
533
582
  penMode: boolean;
534
583
  penDetected: boolean;
535
584
  exportBackground: boolean;
@@ -563,7 +612,7 @@ export declare const actionCopyAsPng: {
563
612
  openMenu: "canvas" | "shape" | null;
564
613
  openPopup: "canvasColorPicker" | "backgroundColorPicker" | "strokeColorPicker" | null;
565
614
  openSidebar: "library" | "customSidebar" | null;
566
- openDialog: "imageExport" | "help" | null;
615
+ openDialog: "imageExport" | "help" | "jsonExport" | null;
567
616
  isSidebarDocked: boolean;
568
617
  lastPointerDownWith: import("../element/types").PointerType;
569
618
  selectedElementIds: {
@@ -581,6 +630,7 @@ export declare const actionCopyAsPng: {
581
630
  zenModeEnabled: boolean;
582
631
  theme: string;
583
632
  gridSize: number | null;
633
+ previousGridSize: number | null;
584
634
  viewModeEnabled: boolean;
585
635
  selectedGroupIds: {
586
636
  [groupId: string]: boolean;
@@ -610,10 +660,13 @@ export declare const actionCopyAsPng: {
610
660
  elementBackground?: string[] | undefined;
611
661
  elementStroke?: string[] | undefined;
612
662
  };
663
+ allowWheelZoom?: boolean | undefined;
664
+ allowPinchZoom?: boolean | undefined;
613
665
  selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
614
666
  };
615
667
  commitToHistory: false;
616
668
  }>;
669
+ predicate: (elements: readonly import("../element/types").ExcalidrawElement[]) => boolean;
617
670
  contextItemLabel: string;
618
671
  keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
619
672
  } & {
@@ -627,7 +680,7 @@ export declare const copyText: {
627
680
  perform: (elements: readonly import("../element/types").ExcalidrawElement[], appState: Readonly<import("../types").AppState>) => {
628
681
  commitToHistory: false;
629
682
  };
630
- contextItemPredicate: (elements: readonly import("../element/types").ExcalidrawElement[], appState: import("../types").AppState) => boolean;
683
+ predicate: (elements: readonly import("../element/types").ExcalidrawElement[], appState: import("../types").AppState) => boolean;
631
684
  contextItemLabel: string;
632
685
  } & {
633
686
  keyTest?: undefined;
@@ -12,6 +12,11 @@ export declare const actionDeleteSelected: {
12
12
  elements: ExcalidrawElement[];
13
13
  appState: {
14
14
  editingLinearElement: null;
15
+ contextMenu: {
16
+ items: import("../components/ContextMenu").ContextMenuItems;
17
+ top: number;
18
+ left: number;
19
+ } | null;
15
20
  showWelcomeScreen: boolean;
16
21
  isLoading: boolean;
17
22
  errorMessage: string | null;
@@ -24,16 +29,15 @@ export declare const actionDeleteSelected: {
24
29
  suggestedBindings: import("../element/binding").SuggestedBinding[];
25
30
  editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
26
31
  activeTool: {
27
- type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
28
- lastActiveToolBeforeEraser: import("../types").LastActiveToolBeforeEraser;
32
+ lastActiveTool: import("../types").LastActiveTool;
29
33
  locked: boolean;
34
+ } & ({
35
+ type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser" | "hand";
30
36
  customType: null;
31
37
  } | {
32
38
  type: "custom";
33
39
  customType: string;
34
- lastActiveToolBeforeEraser: import("../types").LastActiveToolBeforeEraser;
35
- locked: boolean;
36
- };
40
+ });
37
41
  penMode: boolean;
38
42
  penDetected: boolean;
39
43
  exportBackground: boolean;
@@ -67,7 +71,7 @@ export declare const actionDeleteSelected: {
67
71
  openMenu: "canvas" | "shape" | null;
68
72
  openPopup: "canvasColorPicker" | "backgroundColorPicker" | "strokeColorPicker" | null;
69
73
  openSidebar: "library" | "customSidebar" | null;
70
- openDialog: "imageExport" | "help" | null;
74
+ openDialog: "imageExport" | "help" | "jsonExport" | null;
71
75
  isSidebarDocked: boolean;
72
76
  lastPointerDownWith: import("../element/types").PointerType;
73
77
  selectedElementIds: {
@@ -85,6 +89,7 @@ export declare const actionDeleteSelected: {
85
89
  zenModeEnabled: boolean;
86
90
  theme: string;
87
91
  gridSize: number | null;
92
+ previousGridSize: number | null;
88
93
  viewModeEnabled: boolean;
89
94
  selectedGroupIds: {
90
95
  [groupId: string]: boolean;
@@ -114,6 +119,8 @@ export declare const actionDeleteSelected: {
114
119
  elementBackground?: string[] | undefined;
115
120
  elementStroke?: string[] | undefined;
116
121
  };
122
+ allowWheelZoom?: boolean | undefined;
123
+ allowPinchZoom?: boolean | undefined;
117
124
  selectedLinearElement: LinearElementEditor | null;
118
125
  };
119
126
  commitToHistory: false;
@@ -149,6 +156,11 @@ export declare const actionDeleteSelected: {
149
156
  hoverPointIndex: number;
150
157
  segmentMidPointHoveredCoords: readonly [number, number] | null;
151
158
  };
159
+ contextMenu: {
160
+ items: import("../components/ContextMenu").ContextMenuItems;
161
+ top: number;
162
+ left: number;
163
+ } | null;
152
164
  showWelcomeScreen: boolean;
153
165
  isLoading: boolean;
154
166
  errorMessage: string | null;
@@ -161,16 +173,15 @@ export declare const actionDeleteSelected: {
161
173
  suggestedBindings: import("../element/binding").SuggestedBinding[];
162
174
  editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
163
175
  activeTool: {
164
- type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
165
- lastActiveToolBeforeEraser: import("../types").LastActiveToolBeforeEraser;
176
+ lastActiveTool: import("../types").LastActiveTool;
166
177
  locked: boolean;
178
+ } & ({
179
+ type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser" | "hand";
167
180
  customType: null;
168
181
  } | {
169
182
  type: "custom";
170
183
  customType: string;
171
- lastActiveToolBeforeEraser: import("../types").LastActiveToolBeforeEraser;
172
- locked: boolean;
173
- };
184
+ });
174
185
  penMode: boolean;
175
186
  penDetected: boolean;
176
187
  exportBackground: boolean;
@@ -204,7 +215,7 @@ export declare const actionDeleteSelected: {
204
215
  openMenu: "canvas" | "shape" | null;
205
216
  openPopup: "canvasColorPicker" | "backgroundColorPicker" | "strokeColorPicker" | null;
206
217
  openSidebar: "library" | "customSidebar" | null;
207
- openDialog: "imageExport" | "help" | null;
218
+ openDialog: "imageExport" | "help" | "jsonExport" | null;
208
219
  isSidebarDocked: boolean;
209
220
  lastPointerDownWith: import("../element/types").PointerType;
210
221
  selectedElementIds: {
@@ -222,6 +233,7 @@ export declare const actionDeleteSelected: {
222
233
  zenModeEnabled: boolean;
223
234
  theme: string;
224
235
  gridSize: number | null;
236
+ previousGridSize: number | null;
225
237
  viewModeEnabled: boolean;
226
238
  selectedGroupIds: {
227
239
  [groupId: string]: boolean;
@@ -251,6 +263,8 @@ export declare const actionDeleteSelected: {
251
263
  elementBackground?: string[] | undefined;
252
264
  elementStroke?: string[] | undefined;
253
265
  };
266
+ allowWheelZoom?: boolean | undefined;
267
+ allowPinchZoom?: boolean | undefined;
254
268
  selectedLinearElement: LinearElementEditor | null;
255
269
  };
256
270
  commitToHistory: true;
@@ -258,18 +272,22 @@ export declare const actionDeleteSelected: {
258
272
  elements: ExcalidrawElement[];
259
273
  appState: {
260
274
  activeTool: {
261
- type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
262
- lastActiveToolBeforeEraser: import("../types").LastActiveToolBeforeEraser;
275
+ lastActiveTool: import("../types").LastActiveTool;
263
276
  locked: boolean;
277
+ } & ({
278
+ type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser" | "hand";
264
279
  customType: null;
265
280
  } | {
266
281
  type: "custom";
267
282
  customType: string;
268
- lastActiveToolBeforeEraser: import("../types").LastActiveToolBeforeEraser;
269
- locked: boolean;
270
- };
283
+ });
271
284
  multiElement: null;
272
285
  selectedElementIds: {};
286
+ contextMenu: {
287
+ items: import("../components/ContextMenu").ContextMenuItems;
288
+ top: number;
289
+ left: number;
290
+ } | null;
273
291
  showWelcomeScreen: boolean;
274
292
  isLoading: boolean;
275
293
  errorMessage: string | null;
@@ -314,7 +332,7 @@ export declare const actionDeleteSelected: {
314
332
  openMenu: "canvas" | "shape" | null;
315
333
  openPopup: "canvasColorPicker" | "backgroundColorPicker" | "strokeColorPicker" | null;
316
334
  openSidebar: "library" | "customSidebar" | null;
317
- openDialog: "imageExport" | "help" | null;
335
+ openDialog: "imageExport" | "help" | "jsonExport" | null;
318
336
  isSidebarDocked: boolean;
319
337
  lastPointerDownWith: import("../element/types").PointerType;
320
338
  previousSelectedElementIds: {
@@ -329,6 +347,7 @@ export declare const actionDeleteSelected: {
329
347
  zenModeEnabled: boolean;
330
348
  theme: string;
331
349
  gridSize: number | null;
350
+ previousGridSize: number | null;
332
351
  viewModeEnabled: boolean;
333
352
  selectedGroupIds: {
334
353
  [groupId: string]: boolean;
@@ -358,15 +377,15 @@ export declare const actionDeleteSelected: {
358
377
  elementBackground?: string[] | undefined;
359
378
  elementStroke?: string[] | undefined;
360
379
  };
380
+ allowWheelZoom?: boolean | undefined;
381
+ allowPinchZoom?: boolean | undefined;
361
382
  selectedLinearElement: LinearElementEditor | null;
362
383
  };
363
384
  commitToHistory: boolean;
364
385
  };
365
386
  contextItemLabel: string;
366
387
  keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
367
- PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps & {
368
- isInHamburgerMenu: boolean;
369
- }) => JSX.Element;
388
+ PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps) => JSX.Element;
370
389
  } & {
371
390
  keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
372
391
  };
@@ -12,9 +12,7 @@ export declare const distributeHorizontally: {
12
12
  commitToHistory: true;
13
13
  };
14
14
  keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
15
- PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps & {
16
- isInHamburgerMenu: boolean;
17
- }) => JSX.Element;
15
+ PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps) => JSX.Element;
18
16
  } & {
19
17
  keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
20
18
  };
@@ -29,9 +27,7 @@ export declare const distributeVertically: {
29
27
  commitToHistory: true;
30
28
  };
31
29
  keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
32
- PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps & {
33
- isInHamburgerMenu: boolean;
34
- }) => JSX.Element;
30
+ PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps) => JSX.Element;
35
31
  } & {
36
32
  keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
37
33
  };
@@ -16,9 +16,7 @@ export declare const actionDuplicateSelection: {
16
16
  };
17
17
  contextItemLabel: string;
18
18
  keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
19
- PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps & {
20
- isInHamburgerMenu: boolean;
21
- }) => JSX.Element;
19
+ PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps) => JSX.Element;
22
20
  } & {
23
21
  keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
24
22
  };