@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
@@ -6,6 +6,11 @@ export declare const actionChangeProjectName: {
6
6
  perform: (_elements: readonly import("../element/types").ExcalidrawElement[], appState: Readonly<import("../types").AppState>, value: any) => {
7
7
  appState: {
8
8
  name: any;
9
+ contextMenu: {
10
+ items: import("../components/ContextMenu").ContextMenuItems;
11
+ top: number;
12
+ left: number;
13
+ } | null;
9
14
  showWelcomeScreen: boolean;
10
15
  isLoading: boolean;
11
16
  errorMessage: string | null;
@@ -19,16 +24,15 @@ export declare const actionChangeProjectName: {
19
24
  editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
20
25
  editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
21
26
  activeTool: {
22
- type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
23
- lastActiveToolBeforeEraser: import("../types").LastActiveToolBeforeEraser;
27
+ lastActiveTool: import("../types").LastActiveTool;
24
28
  locked: boolean;
29
+ } & ({
30
+ type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser" | "hand";
25
31
  customType: null;
26
32
  } | {
27
33
  type: "custom";
28
34
  customType: string;
29
- lastActiveToolBeforeEraser: import("../types").LastActiveToolBeforeEraser;
30
- locked: boolean;
31
- };
35
+ });
32
36
  penMode: boolean;
33
37
  penDetected: boolean;
34
38
  exportBackground: boolean;
@@ -61,7 +65,7 @@ export declare const actionChangeProjectName: {
61
65
  openMenu: "canvas" | "shape" | null;
62
66
  openPopup: "canvasColorPicker" | "backgroundColorPicker" | "strokeColorPicker" | null;
63
67
  openSidebar: "library" | "customSidebar" | null;
64
- openDialog: "imageExport" | "help" | null;
68
+ openDialog: "imageExport" | "help" | "jsonExport" | null;
65
69
  isSidebarDocked: boolean;
66
70
  lastPointerDownWith: import("../element/types").PointerType;
67
71
  selectedElementIds: {
@@ -79,6 +83,7 @@ export declare const actionChangeProjectName: {
79
83
  zenModeEnabled: boolean;
80
84
  theme: string;
81
85
  gridSize: number | null;
86
+ previousGridSize: number | null;
82
87
  viewModeEnabled: boolean;
83
88
  selectedGroupIds: {
84
89
  [groupId: string]: boolean;
@@ -108,13 +113,13 @@ export declare const actionChangeProjectName: {
108
113
  elementBackground?: string[] | undefined;
109
114
  elementStroke?: string[] | undefined;
110
115
  };
116
+ allowWheelZoom?: boolean | undefined;
117
+ allowPinchZoom?: boolean | undefined;
111
118
  selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
112
119
  };
113
120
  commitToHistory: false;
114
121
  };
115
- PanelComponent: ({ appState, updateData, appProps }: import("./types").PanelComponentProps & {
116
- isInHamburgerMenu: boolean;
117
- }) => JSX.Element;
122
+ PanelComponent: ({ appState, updateData, appProps }: import("./types").PanelComponentProps) => JSX.Element;
118
123
  } & {
119
124
  keyTest?: undefined;
120
125
  };
@@ -127,6 +132,11 @@ export declare const actionChangeExportScale: {
127
132
  perform: (_elements: readonly import("../element/types").ExcalidrawElement[], appState: Readonly<import("../types").AppState>, value: any) => {
128
133
  appState: {
129
134
  exportScale: any;
135
+ contextMenu: {
136
+ items: import("../components/ContextMenu").ContextMenuItems;
137
+ top: number;
138
+ left: number;
139
+ } | null;
130
140
  showWelcomeScreen: boolean;
131
141
  isLoading: boolean;
132
142
  errorMessage: string | null;
@@ -140,16 +150,15 @@ export declare const actionChangeExportScale: {
140
150
  editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
141
151
  editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
142
152
  activeTool: {
143
- type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
144
- lastActiveToolBeforeEraser: import("../types").LastActiveToolBeforeEraser;
153
+ lastActiveTool: import("../types").LastActiveTool;
145
154
  locked: boolean;
155
+ } & ({
156
+ type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser" | "hand";
146
157
  customType: null;
147
158
  } | {
148
159
  type: "custom";
149
160
  customType: string;
150
- lastActiveToolBeforeEraser: import("../types").LastActiveToolBeforeEraser;
151
- locked: boolean;
152
- };
161
+ });
153
162
  penMode: boolean;
154
163
  penDetected: boolean;
155
164
  exportBackground: boolean;
@@ -182,7 +191,7 @@ export declare const actionChangeExportScale: {
182
191
  openMenu: "canvas" | "shape" | null;
183
192
  openPopup: "canvasColorPicker" | "backgroundColorPicker" | "strokeColorPicker" | null;
184
193
  openSidebar: "library" | "customSidebar" | null;
185
- openDialog: "imageExport" | "help" | null;
194
+ openDialog: "imageExport" | "help" | "jsonExport" | null;
186
195
  isSidebarDocked: boolean;
187
196
  lastPointerDownWith: import("../element/types").PointerType;
188
197
  selectedElementIds: {
@@ -200,6 +209,7 @@ export declare const actionChangeExportScale: {
200
209
  zenModeEnabled: boolean;
201
210
  theme: string;
202
211
  gridSize: number | null;
212
+ previousGridSize: number | null;
203
213
  viewModeEnabled: boolean;
204
214
  selectedGroupIds: {
205
215
  [groupId: string]: boolean;
@@ -229,13 +239,13 @@ export declare const actionChangeExportScale: {
229
239
  elementBackground?: string[] | undefined;
230
240
  elementStroke?: string[] | undefined;
231
241
  };
242
+ allowWheelZoom?: boolean | undefined;
243
+ allowPinchZoom?: boolean | undefined;
232
244
  selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
233
245
  };
234
246
  commitToHistory: false;
235
247
  };
236
- PanelComponent: ({ elements: allElements, appState, updateData }: import("./types").PanelComponentProps & {
237
- isInHamburgerMenu: boolean;
238
- }) => JSX.Element;
248
+ PanelComponent: ({ elements: allElements, appState, updateData }: import("./types").PanelComponentProps) => JSX.Element;
239
249
  } & {
240
250
  keyTest?: undefined;
241
251
  };
@@ -248,6 +258,11 @@ export declare const actionChangeExportBackground: {
248
258
  perform: (_elements: readonly import("../element/types").ExcalidrawElement[], appState: Readonly<import("../types").AppState>, value: any) => {
249
259
  appState: {
250
260
  exportBackground: any;
261
+ contextMenu: {
262
+ items: import("../components/ContextMenu").ContextMenuItems;
263
+ top: number;
264
+ left: number;
265
+ } | null;
251
266
  showWelcomeScreen: boolean;
252
267
  isLoading: boolean;
253
268
  errorMessage: string | null;
@@ -261,16 +276,15 @@ export declare const actionChangeExportBackground: {
261
276
  editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
262
277
  editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
263
278
  activeTool: {
264
- type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
265
- lastActiveToolBeforeEraser: import("../types").LastActiveToolBeforeEraser;
279
+ lastActiveTool: import("../types").LastActiveTool;
266
280
  locked: boolean;
281
+ } & ({
282
+ type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser" | "hand";
267
283
  customType: null;
268
284
  } | {
269
285
  type: "custom";
270
286
  customType: string;
271
- lastActiveToolBeforeEraser: import("../types").LastActiveToolBeforeEraser;
272
- locked: boolean;
273
- };
287
+ });
274
288
  penMode: boolean;
275
289
  penDetected: boolean;
276
290
  exportEmbedScene: boolean;
@@ -303,7 +317,7 @@ export declare const actionChangeExportBackground: {
303
317
  openMenu: "canvas" | "shape" | null;
304
318
  openPopup: "canvasColorPicker" | "backgroundColorPicker" | "strokeColorPicker" | null;
305
319
  openSidebar: "library" | "customSidebar" | null;
306
- openDialog: "imageExport" | "help" | null;
320
+ openDialog: "imageExport" | "help" | "jsonExport" | null;
307
321
  isSidebarDocked: boolean;
308
322
  lastPointerDownWith: import("../element/types").PointerType;
309
323
  selectedElementIds: {
@@ -321,6 +335,7 @@ export declare const actionChangeExportBackground: {
321
335
  zenModeEnabled: boolean;
322
336
  theme: string;
323
337
  gridSize: number | null;
338
+ previousGridSize: number | null;
324
339
  viewModeEnabled: boolean;
325
340
  selectedGroupIds: {
326
341
  [groupId: string]: boolean;
@@ -350,13 +365,13 @@ export declare const actionChangeExportBackground: {
350
365
  elementBackground?: string[] | undefined;
351
366
  elementStroke?: string[] | undefined;
352
367
  };
368
+ allowWheelZoom?: boolean | undefined;
369
+ allowPinchZoom?: boolean | undefined;
353
370
  selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
354
371
  };
355
372
  commitToHistory: false;
356
373
  };
357
- PanelComponent: ({ appState, updateData }: import("./types").PanelComponentProps & {
358
- isInHamburgerMenu: boolean;
359
- }) => JSX.Element;
374
+ PanelComponent: ({ appState, updateData }: import("./types").PanelComponentProps) => JSX.Element;
360
375
  } & {
361
376
  keyTest?: undefined;
362
377
  };
@@ -369,6 +384,11 @@ export declare const actionChangeExportEmbedScene: {
369
384
  perform: (_elements: readonly import("../element/types").ExcalidrawElement[], appState: Readonly<import("../types").AppState>, value: any) => {
370
385
  appState: {
371
386
  exportEmbedScene: any;
387
+ contextMenu: {
388
+ items: import("../components/ContextMenu").ContextMenuItems;
389
+ top: number;
390
+ left: number;
391
+ } | null;
372
392
  showWelcomeScreen: boolean;
373
393
  isLoading: boolean;
374
394
  errorMessage: string | null;
@@ -382,16 +402,15 @@ export declare const actionChangeExportEmbedScene: {
382
402
  editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
383
403
  editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
384
404
  activeTool: {
385
- type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
386
- lastActiveToolBeforeEraser: import("../types").LastActiveToolBeforeEraser;
405
+ lastActiveTool: import("../types").LastActiveTool;
387
406
  locked: boolean;
407
+ } & ({
408
+ type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser" | "hand";
388
409
  customType: null;
389
410
  } | {
390
411
  type: "custom";
391
412
  customType: string;
392
- lastActiveToolBeforeEraser: import("../types").LastActiveToolBeforeEraser;
393
- locked: boolean;
394
- };
413
+ });
395
414
  penMode: boolean;
396
415
  penDetected: boolean;
397
416
  exportBackground: boolean;
@@ -424,7 +443,7 @@ export declare const actionChangeExportEmbedScene: {
424
443
  openMenu: "canvas" | "shape" | null;
425
444
  openPopup: "canvasColorPicker" | "backgroundColorPicker" | "strokeColorPicker" | null;
426
445
  openSidebar: "library" | "customSidebar" | null;
427
- openDialog: "imageExport" | "help" | null;
446
+ openDialog: "imageExport" | "help" | "jsonExport" | null;
428
447
  isSidebarDocked: boolean;
429
448
  lastPointerDownWith: import("../element/types").PointerType;
430
449
  selectedElementIds: {
@@ -442,6 +461,7 @@ export declare const actionChangeExportEmbedScene: {
442
461
  zenModeEnabled: boolean;
443
462
  theme: string;
444
463
  gridSize: number | null;
464
+ previousGridSize: number | null;
445
465
  viewModeEnabled: boolean;
446
466
  selectedGroupIds: {
447
467
  [groupId: string]: boolean;
@@ -471,13 +491,13 @@ export declare const actionChangeExportEmbedScene: {
471
491
  elementBackground?: string[] | undefined;
472
492
  elementStroke?: string[] | undefined;
473
493
  };
494
+ allowWheelZoom?: boolean | undefined;
495
+ allowPinchZoom?: boolean | undefined;
474
496
  selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
475
497
  };
476
498
  commitToHistory: false;
477
499
  };
478
- PanelComponent: ({ appState, updateData }: import("./types").PanelComponentProps & {
479
- isInHamburgerMenu: boolean;
480
- }) => JSX.Element;
500
+ PanelComponent: ({ appState, updateData }: import("./types").PanelComponentProps) => JSX.Element;
481
501
  } & {
482
502
  keyTest?: undefined;
483
503
  };
@@ -486,6 +506,7 @@ export declare const actionSaveToActiveFile: {
486
506
  trackEvent: {
487
507
  category: "export";
488
508
  };
509
+ predicate: (elements: readonly import("../element/types").ExcalidrawElement[], appState: import("../types").AppState, props: import("../types").ExcalidrawProps, app: import("../types").AppClassProperties) => boolean;
489
510
  perform: (elements: readonly import("../element/types").ExcalidrawElement[], appState: Readonly<import("../types").AppState>, value: any, app: import("../types").AppClassProperties) => Promise<{
490
511
  commitToHistory: false;
491
512
  appState: {
@@ -493,6 +514,11 @@ export declare const actionSaveToActiveFile: {
493
514
  toast: {
494
515
  message: string;
495
516
  } | null;
517
+ contextMenu: {
518
+ items: import("../components/ContextMenu").ContextMenuItems;
519
+ top: number;
520
+ left: number;
521
+ } | null;
496
522
  showWelcomeScreen: boolean;
497
523
  isLoading: boolean;
498
524
  errorMessage: string | null;
@@ -506,16 +532,15 @@ export declare const actionSaveToActiveFile: {
506
532
  editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
507
533
  editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
508
534
  activeTool: {
509
- type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
510
- lastActiveToolBeforeEraser: import("../types").LastActiveToolBeforeEraser;
535
+ lastActiveTool: import("../types").LastActiveTool;
511
536
  locked: boolean;
537
+ } & ({
538
+ type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser" | "hand";
512
539
  customType: null;
513
540
  } | {
514
541
  type: "custom";
515
542
  customType: string;
516
- lastActiveToolBeforeEraser: import("../types").LastActiveToolBeforeEraser;
517
- locked: boolean;
518
- };
543
+ });
519
544
  penMode: boolean;
520
545
  penDetected: boolean;
521
546
  exportBackground: boolean;
@@ -549,7 +574,7 @@ export declare const actionSaveToActiveFile: {
549
574
  openMenu: "canvas" | "shape" | null;
550
575
  openPopup: "canvasColorPicker" | "backgroundColorPicker" | "strokeColorPicker" | null;
551
576
  openSidebar: "library" | "customSidebar" | null;
552
- openDialog: "imageExport" | "help" | null;
577
+ openDialog: "imageExport" | "help" | "jsonExport" | null;
553
578
  isSidebarDocked: boolean;
554
579
  lastPointerDownWith: import("../element/types").PointerType;
555
580
  selectedElementIds: {
@@ -562,6 +587,7 @@ export declare const actionSaveToActiveFile: {
562
587
  zenModeEnabled: boolean;
563
588
  theme: string;
564
589
  gridSize: number | null;
590
+ previousGridSize: number | null;
565
591
  viewModeEnabled: boolean;
566
592
  selectedGroupIds: {
567
593
  [groupId: string]: boolean;
@@ -590,6 +616,8 @@ export declare const actionSaveToActiveFile: {
590
616
  elementBackground?: string[] | undefined;
591
617
  elementStroke?: string[] | undefined;
592
618
  };
619
+ allowWheelZoom?: boolean | undefined;
620
+ allowPinchZoom?: boolean | undefined;
593
621
  selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
594
622
  };
595
623
  } | {
@@ -597,9 +625,6 @@ export declare const actionSaveToActiveFile: {
597
625
  appState?: undefined;
598
626
  }>;
599
627
  keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
600
- PanelComponent: ({ updateData, appState }: import("./types").PanelComponentProps & {
601
- isInHamburgerMenu: boolean;
602
- }) => JSX.Element;
603
628
  } & {
604
629
  keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
605
630
  };
@@ -613,6 +638,11 @@ export declare const actionSaveFileToDisk: {
613
638
  commitToHistory: false;
614
639
  appState: {
615
640
  fileHandle: import("browser-fs-access").FileSystemHandle | null;
641
+ contextMenu: {
642
+ items: import("../components/ContextMenu").ContextMenuItems;
643
+ top: number;
644
+ left: number;
645
+ } | null;
616
646
  showWelcomeScreen: boolean;
617
647
  isLoading: boolean;
618
648
  errorMessage: string | null;
@@ -626,16 +656,15 @@ export declare const actionSaveFileToDisk: {
626
656
  editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
627
657
  editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
628
658
  activeTool: {
629
- type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
630
- lastActiveToolBeforeEraser: import("../types").LastActiveToolBeforeEraser;
659
+ lastActiveTool: import("../types").LastActiveTool;
631
660
  locked: boolean;
661
+ } & ({
662
+ type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser" | "hand";
632
663
  customType: null;
633
664
  } | {
634
665
  type: "custom";
635
666
  customType: string;
636
- lastActiveToolBeforeEraser: import("../types").LastActiveToolBeforeEraser;
637
- locked: boolean;
638
- };
667
+ });
639
668
  penMode: boolean;
640
669
  penDetected: boolean;
641
670
  exportBackground: boolean;
@@ -669,7 +698,7 @@ export declare const actionSaveFileToDisk: {
669
698
  openMenu: "canvas" | "shape" | null;
670
699
  openPopup: "canvasColorPicker" | "backgroundColorPicker" | "strokeColorPicker" | null;
671
700
  openSidebar: "library" | "customSidebar" | null;
672
- openDialog: "imageExport" | "help" | null;
701
+ openDialog: "imageExport" | "help" | "jsonExport" | null;
673
702
  isSidebarDocked: boolean;
674
703
  lastPointerDownWith: import("../element/types").PointerType;
675
704
  selectedElementIds: {
@@ -687,6 +716,7 @@ export declare const actionSaveFileToDisk: {
687
716
  zenModeEnabled: boolean;
688
717
  theme: string;
689
718
  gridSize: number | null;
719
+ previousGridSize: number | null;
690
720
  viewModeEnabled: boolean;
691
721
  selectedGroupIds: {
692
722
  [groupId: string]: boolean;
@@ -715,6 +745,8 @@ export declare const actionSaveFileToDisk: {
715
745
  elementBackground?: string[] | undefined;
716
746
  elementStroke?: string[] | undefined;
717
747
  };
748
+ allowWheelZoom?: boolean | undefined;
749
+ allowPinchZoom?: boolean | undefined;
718
750
  selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
719
751
  };
720
752
  } | {
@@ -722,9 +754,7 @@ export declare const actionSaveFileToDisk: {
722
754
  appState?: undefined;
723
755
  }>;
724
756
  keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
725
- PanelComponent: ({ updateData }: import("./types").PanelComponentProps & {
726
- isInHamburgerMenu: boolean;
727
- }) => JSX.Element;
757
+ PanelComponent: ({ updateData }: import("./types").PanelComponentProps) => JSX.Element;
728
758
  } & {
729
759
  keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
730
760
  };
@@ -733,22 +763,27 @@ export declare const actionLoadScene: {
733
763
  trackEvent: {
734
764
  category: "export";
735
765
  };
766
+ predicate: (elements: readonly import("../element/types").ExcalidrawElement[], appState: import("../types").AppState, props: import("../types").ExcalidrawProps, app: import("../types").AppClassProperties) => boolean;
736
767
  perform: (elements: readonly import("../element/types").ExcalidrawElement[], appState: Readonly<import("../types").AppState>, _: any, app: import("../types").AppClassProperties) => Promise<false | {
737
768
  elements: import("../element/types").ExcalidrawElement[];
738
769
  appState: {
739
770
  theme: string;
740
771
  name: string;
741
772
  activeTool: {
742
- type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
743
- lastActiveToolBeforeEraser: import("../types").LastActiveToolBeforeEraser;
773
+ lastActiveTool: import("../types").LastActiveTool;
744
774
  locked: boolean;
775
+ } & ({
776
+ type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser" | "hand";
745
777
  customType: null;
746
778
  } | {
747
779
  type: "custom";
748
780
  customType: string;
749
- lastActiveToolBeforeEraser: import("../types").LastActiveToolBeforeEraser;
750
- locked: boolean;
751
- };
781
+ });
782
+ contextMenu: {
783
+ items: import("../components/ContextMenu").ContextMenuItems;
784
+ top: number;
785
+ left: number;
786
+ } | null;
752
787
  showWelcomeScreen: boolean;
753
788
  isLoading: boolean;
754
789
  errorMessage: string | null;
@@ -793,7 +828,7 @@ export declare const actionLoadScene: {
793
828
  openMenu: "canvas" | "shape" | null;
794
829
  openPopup: "canvasColorPicker" | "backgroundColorPicker" | "strokeColorPicker" | null;
795
830
  openSidebar: "library" | "customSidebar" | null;
796
- openDialog: "imageExport" | "help" | null;
831
+ openDialog: "imageExport" | "help" | "jsonExport" | null;
797
832
  isSidebarDocked: boolean;
798
833
  lastPointerDownWith: import("../element/types").PointerType;
799
834
  selectedElementIds: {
@@ -810,6 +845,7 @@ export declare const actionLoadScene: {
810
845
  } | null;
811
846
  zenModeEnabled: boolean;
812
847
  gridSize: number | null;
848
+ previousGridSize: number | null;
813
849
  viewModeEnabled: boolean;
814
850
  selectedGroupIds: {
815
851
  [groupId: string]: boolean;
@@ -835,6 +871,8 @@ export declare const actionLoadScene: {
835
871
  elementBackground?: string[] | undefined;
836
872
  elementStroke?: string[] | undefined;
837
873
  };
874
+ allowWheelZoom?: boolean | undefined;
875
+ allowPinchZoom?: boolean | undefined;
838
876
  selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
839
877
  };
840
878
  files: import("../types").BinaryFiles;
@@ -843,6 +881,11 @@ export declare const actionLoadScene: {
843
881
  elements: readonly import("../element/types").ExcalidrawElement[];
844
882
  appState: {
845
883
  errorMessage: any;
884
+ contextMenu: {
885
+ items: import("../components/ContextMenu").ContextMenuItems;
886
+ top: number;
887
+ left: number;
888
+ } | null;
846
889
  showWelcomeScreen: boolean;
847
890
  isLoading: boolean;
848
891
  draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
@@ -855,16 +898,15 @@ export declare const actionLoadScene: {
855
898
  editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
856
899
  editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
857
900
  activeTool: {
858
- type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
859
- lastActiveToolBeforeEraser: import("../types").LastActiveToolBeforeEraser;
901
+ lastActiveTool: import("../types").LastActiveTool;
860
902
  locked: boolean;
903
+ } & ({
904
+ type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser" | "hand";
861
905
  customType: null;
862
906
  } | {
863
907
  type: "custom";
864
908
  customType: string;
865
- lastActiveToolBeforeEraser: import("../types").LastActiveToolBeforeEraser;
866
- locked: boolean;
867
- };
909
+ });
868
910
  penMode: boolean;
869
911
  penDetected: boolean;
870
912
  exportBackground: boolean;
@@ -898,7 +940,7 @@ export declare const actionLoadScene: {
898
940
  openMenu: "canvas" | "shape" | null;
899
941
  openPopup: "canvasColorPicker" | "backgroundColorPicker" | "strokeColorPicker" | null;
900
942
  openSidebar: "library" | "customSidebar" | null;
901
- openDialog: "imageExport" | "help" | null;
943
+ openDialog: "imageExport" | "help" | "jsonExport" | null;
902
944
  isSidebarDocked: boolean;
903
945
  lastPointerDownWith: import("../element/types").PointerType;
904
946
  selectedElementIds: {
@@ -916,6 +958,7 @@ export declare const actionLoadScene: {
916
958
  zenModeEnabled: boolean;
917
959
  theme: string;
918
960
  gridSize: number | null;
961
+ previousGridSize: number | null;
919
962
  viewModeEnabled: boolean;
920
963
  selectedGroupIds: {
921
964
  [groupId: string]: boolean;
@@ -945,15 +988,14 @@ export declare const actionLoadScene: {
945
988
  elementBackground?: string[] | undefined;
946
989
  elementStroke?: string[] | undefined;
947
990
  };
991
+ allowWheelZoom?: boolean | undefined;
992
+ allowPinchZoom?: boolean | undefined;
948
993
  selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
949
994
  };
950
995
  files: import("../types").BinaryFiles;
951
996
  commitToHistory: false;
952
997
  }>;
953
998
  keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
954
- PanelComponent: ({ updateData }: import("./types").PanelComponentProps & {
955
- isInHamburgerMenu: boolean;
956
- }) => JSX.Element;
957
999
  } & {
958
1000
  keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
959
1001
  };
@@ -966,6 +1008,11 @@ export declare const actionExportWithDarkMode: {
966
1008
  perform: (_elements: readonly import("../element/types").ExcalidrawElement[], appState: Readonly<import("../types").AppState>, value: any) => {
967
1009
  appState: {
968
1010
  exportWithDarkMode: any;
1011
+ contextMenu: {
1012
+ items: import("../components/ContextMenu").ContextMenuItems;
1013
+ top: number;
1014
+ left: number;
1015
+ } | null;
969
1016
  showWelcomeScreen: boolean;
970
1017
  isLoading: boolean;
971
1018
  errorMessage: string | null;
@@ -979,16 +1026,15 @@ export declare const actionExportWithDarkMode: {
979
1026
  editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
980
1027
  editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
981
1028
  activeTool: {
982
- type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
983
- lastActiveToolBeforeEraser: import("../types").LastActiveToolBeforeEraser;
1029
+ lastActiveTool: import("../types").LastActiveTool;
984
1030
  locked: boolean;
1031
+ } & ({
1032
+ type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser" | "hand";
985
1033
  customType: null;
986
1034
  } | {
987
1035
  type: "custom";
988
1036
  customType: string;
989
- lastActiveToolBeforeEraser: import("../types").LastActiveToolBeforeEraser;
990
- locked: boolean;
991
- };
1037
+ });
992
1038
  penMode: boolean;
993
1039
  penDetected: boolean;
994
1040
  exportBackground: boolean;
@@ -1021,7 +1067,7 @@ export declare const actionExportWithDarkMode: {
1021
1067
  openMenu: "canvas" | "shape" | null;
1022
1068
  openPopup: "canvasColorPicker" | "backgroundColorPicker" | "strokeColorPicker" | null;
1023
1069
  openSidebar: "library" | "customSidebar" | null;
1024
- openDialog: "imageExport" | "help" | null;
1070
+ openDialog: "imageExport" | "help" | "jsonExport" | null;
1025
1071
  isSidebarDocked: boolean;
1026
1072
  lastPointerDownWith: import("../element/types").PointerType;
1027
1073
  selectedElementIds: {
@@ -1039,6 +1085,7 @@ export declare const actionExportWithDarkMode: {
1039
1085
  zenModeEnabled: boolean;
1040
1086
  theme: string;
1041
1087
  gridSize: number | null;
1088
+ previousGridSize: number | null;
1042
1089
  viewModeEnabled: boolean;
1043
1090
  selectedGroupIds: {
1044
1091
  [groupId: string]: boolean;
@@ -1068,13 +1115,13 @@ export declare const actionExportWithDarkMode: {
1068
1115
  elementBackground?: string[] | undefined;
1069
1116
  elementStroke?: string[] | undefined;
1070
1117
  };
1118
+ allowWheelZoom?: boolean | undefined;
1119
+ allowPinchZoom?: boolean | undefined;
1071
1120
  selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
1072
1121
  };
1073
1122
  commitToHistory: false;
1074
1123
  };
1075
- PanelComponent: ({ appState, updateData }: import("./types").PanelComponentProps & {
1076
- isInHamburgerMenu: boolean;
1077
- }) => JSX.Element;
1124
+ PanelComponent: ({ appState, updateData }: import("./types").PanelComponentProps) => JSX.Element;
1078
1125
  } & {
1079
1126
  keyTest?: undefined;
1080
1127
  };