@dwelle/excalidraw 0.4.0-d8d86cf → 0.4.0-e3bee83

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 (89) hide show
  1. package/CHANGELOG.md +189 -0
  2. package/README.md +417 -19
  3. package/dist/excalidraw.development.js +427 -229
  4. package/dist/excalidraw.production.min.js +1 -1
  5. package/package.json +1 -1
  6. package/types/actions/actionAddToLibrary.d.ts +21 -9
  7. package/types/actions/actionAlign.d.ts +6 -18
  8. package/types/actions/actionBoundText.d.ts +9 -5
  9. package/types/actions/actionCanvas.d.ts +69 -45
  10. package/types/actions/actionClipboard.d.ts +54 -16
  11. package/types/actions/actionDeleteSelected.d.ts +22 -12
  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 +72 -51
  15. package/types/actions/actionFinalize.d.ts +15 -9
  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 +8 -4
  19. package/types/actions/actionMenu.d.ts +24 -17
  20. package/types/actions/actionNavigate.d.ts +2 -3
  21. package/types/actions/actionProperties.d.ts +106 -80
  22. package/types/actions/actionStyles.d.ts +7 -3
  23. package/types/actions/actionToggleGridMode.d.ts +9 -3
  24. package/types/actions/actionToggleLock.d.ts +7 -3
  25. package/types/actions/actionToggleStats.d.ts +8 -3
  26. package/types/actions/actionToggleViewMode.d.ts +9 -3
  27. package/types/actions/actionToggleZenMode.d.ts +9 -3
  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 +6 -5
  31. package/types/appState.d.ts +3 -4
  32. package/types/components/App.d.ts +7 -50
  33. package/types/components/Button.d.ts +15 -0
  34. package/types/components/Card.d.ts +7 -0
  35. package/types/components/ContextMenu.d.ts +8 -21
  36. package/types/components/JSONExportDialog.d.ts +3 -1
  37. package/types/components/LayerUI.d.ts +3 -5
  38. package/types/components/LibraryMenuHeaderContent.d.ts +23 -0
  39. package/types/components/MobileMenu.d.ts +5 -8
  40. package/types/components/UserList.d.ts +0 -2
  41. package/types/components/dropdownMenu/DropdownMenu.d.ts +64 -0
  42. package/types/components/dropdownMenu/DropdownMenuContent.d.ts +11 -0
  43. package/types/components/dropdownMenu/DropdownMenuGroup.d.ts +11 -0
  44. package/types/components/dropdownMenu/DropdownMenuItem.d.ts +13 -0
  45. package/types/components/dropdownMenu/DropdownMenuItemContent.d.ts +6 -0
  46. package/types/components/dropdownMenu/DropdownMenuItemCustom.d.ts +6 -0
  47. package/types/components/dropdownMenu/DropdownMenuItemLink.d.ts +12 -0
  48. package/types/components/dropdownMenu/DropdownMenuSeparator.d.ts +5 -0
  49. package/types/components/dropdownMenu/DropdownMenuTrigger.d.ts +9 -0
  50. package/types/components/dropdownMenu/dropdownMenuUtils.d.ts +3 -0
  51. package/types/components/footer/Footer.d.ts +13 -0
  52. package/types/components/footer/FooterCenter.d.ts +8 -0
  53. package/types/components/icons.d.ts +1 -1
  54. package/types/components/live-collaboration/LiveCollaborationTrigger.d.ts +10 -0
  55. package/types/components/main-menu/DefaultItems.d.ts +47 -0
  56. package/types/components/main-menu/MainMenu.d.ts +55 -0
  57. package/types/components/welcome-screen/WelcomeScreen.Center.d.ts +58 -0
  58. package/types/components/welcome-screen/WelcomeScreen.Hints.d.ts +19 -0
  59. package/types/components/welcome-screen/WelcomeScreen.d.ts +85 -0
  60. package/types/constants.d.ts +11 -8
  61. package/types/data/index.d.ts +1 -1
  62. package/types/element/Hyperlink.d.ts +9 -7
  63. package/types/element/bounds.d.ts +1 -1
  64. package/types/element/linearElementEditor.d.ts +8 -4
  65. package/types/element/textElement.d.ts +7 -0
  66. package/types/element/textWysiwyg.d.ts +6 -1
  67. package/types/element/typeChecks.d.ts +9 -1
  68. package/types/element/types.d.ts +9 -5
  69. package/types/keys.d.ts +2 -0
  70. package/types/math.d.ts +2 -1
  71. package/types/packages/excalidraw/example/CustomFooter.d.ts +5 -0
  72. package/types/packages/excalidraw/example/MobileFooter.d.ts +5 -0
  73. package/types/packages/excalidraw/index.d.ts +12 -1
  74. package/types/packages/utils.d.ts +22 -25
  75. package/types/renderer/renderScene.d.ts +1 -3
  76. package/types/scene/comparisons.d.ts +1 -1
  77. package/types/scene/export.d.ts +143 -9
  78. package/types/scene/index.d.ts +1 -1
  79. package/types/scene/types.d.ts +9 -1
  80. package/types/types.d.ts +44 -24
  81. package/types/utils.d.ts +17 -0
  82. package/types/components/ActiveFile.d.ts +0 -7
  83. package/types/components/ClearCanvas.d.ts +0 -4
  84. package/types/components/CollabButton.d.ts +0 -6
  85. package/types/components/Footer.d.ts +0 -10
  86. package/types/components/MenuItem.d.ts +0 -11
  87. package/types/components/MenuUtils.d.ts +0 -1
  88. package/types/components/WelcomeScreen.d.ts +0 -10
  89. package/types/components/WelcomeScreenDecor.d.ts +0 -6
@@ -5,9 +5,7 @@ export declare const actionChangeStrokeColor: {
5
5
  name: "changeStrokeColor";
6
6
  trackEvent: false;
7
7
  perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>, value: any) => any;
8
- PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps & {
9
- isInHamburgerMenu: boolean;
10
- }) => JSX.Element;
8
+ PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps) => JSX.Element;
11
9
  } & {
12
10
  keyTest?: undefined;
13
11
  };
@@ -15,9 +13,7 @@ export declare const actionChangeBackgroundColor: {
15
13
  name: "changeBackgroundColor";
16
14
  trackEvent: false;
17
15
  perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>, value: any) => any;
18
- PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps & {
19
- isInHamburgerMenu: boolean;
20
- }) => JSX.Element;
16
+ PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps) => JSX.Element;
21
17
  } & {
22
18
  keyTest?: undefined;
23
19
  };
@@ -28,6 +24,11 @@ export declare const actionChangeFillStyle: {
28
24
  elements: ExcalidrawElement[];
29
25
  appState: {
30
26
  currentItemFillStyle: any;
27
+ contextMenu: {
28
+ items: import("../components/ContextMenu").ContextMenuItems;
29
+ top: number;
30
+ left: number;
31
+ } | null;
31
32
  showWelcomeScreen: boolean;
32
33
  isLoading: boolean;
33
34
  errorMessage: string | null;
@@ -66,10 +67,9 @@ export declare const actionChangeFillStyle: {
66
67
  currentItemFontFamily: number;
67
68
  currentItemFontSize: number;
68
69
  currentItemTextAlign: string;
69
- currentItemStrokeSharpness: import("../element/types").StrokeSharpness;
70
70
  currentItemStartArrowhead: Arrowhead | null;
71
71
  currentItemEndArrowhead: Arrowhead | null;
72
- currentItemLinearStrokeSharpness: import("../element/types").StrokeSharpness;
72
+ currentItemRoundness: import("../element/types").StrokeRoundness;
73
73
  viewBackgroundColor: string;
74
74
  scrollX: number;
75
75
  scrollY: number;
@@ -84,7 +84,7 @@ export declare const actionChangeFillStyle: {
84
84
  openMenu: "canvas" | "shape" | null;
85
85
  openPopup: "canvasColorPicker" | "backgroundColorPicker" | "strokeColorPicker" | null;
86
86
  openSidebar: "library" | "customSidebar" | null;
87
- openDialog: "imageExport" | "help" | null;
87
+ openDialog: "imageExport" | "help" | "jsonExport" | null;
88
88
  isSidebarDocked: boolean;
89
89
  lastPointerDownWith: import("../element/types").PointerType;
90
90
  selectedElementIds: {
@@ -128,9 +128,7 @@ export declare const actionChangeFillStyle: {
128
128
  };
129
129
  commitToHistory: true;
130
130
  };
131
- PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps & {
132
- isInHamburgerMenu: boolean;
133
- }) => JSX.Element;
131
+ PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps) => JSX.Element;
134
132
  } & {
135
133
  keyTest?: undefined;
136
134
  };
@@ -141,6 +139,11 @@ export declare const actionChangeStrokeWidth: {
141
139
  elements: ExcalidrawElement[];
142
140
  appState: {
143
141
  currentItemStrokeWidth: any;
142
+ contextMenu: {
143
+ items: import("../components/ContextMenu").ContextMenuItems;
144
+ top: number;
145
+ left: number;
146
+ } | null;
144
147
  showWelcomeScreen: boolean;
145
148
  isLoading: boolean;
146
149
  errorMessage: string | null;
@@ -179,10 +182,9 @@ export declare const actionChangeStrokeWidth: {
179
182
  currentItemFontFamily: number;
180
183
  currentItemFontSize: number;
181
184
  currentItemTextAlign: string;
182
- currentItemStrokeSharpness: import("../element/types").StrokeSharpness;
183
185
  currentItemStartArrowhead: Arrowhead | null;
184
186
  currentItemEndArrowhead: Arrowhead | null;
185
- currentItemLinearStrokeSharpness: import("../element/types").StrokeSharpness;
187
+ currentItemRoundness: import("../element/types").StrokeRoundness;
186
188
  viewBackgroundColor: string;
187
189
  scrollX: number;
188
190
  scrollY: number;
@@ -197,7 +199,7 @@ export declare const actionChangeStrokeWidth: {
197
199
  openMenu: "canvas" | "shape" | null;
198
200
  openPopup: "canvasColorPicker" | "backgroundColorPicker" | "strokeColorPicker" | null;
199
201
  openSidebar: "library" | "customSidebar" | null;
200
- openDialog: "imageExport" | "help" | null;
202
+ openDialog: "imageExport" | "help" | "jsonExport" | null;
201
203
  isSidebarDocked: boolean;
202
204
  lastPointerDownWith: import("../element/types").PointerType;
203
205
  selectedElementIds: {
@@ -241,9 +243,7 @@ export declare const actionChangeStrokeWidth: {
241
243
  };
242
244
  commitToHistory: true;
243
245
  };
244
- PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps & {
245
- isInHamburgerMenu: boolean;
246
- }) => JSX.Element;
246
+ PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps) => JSX.Element;
247
247
  } & {
248
248
  keyTest?: undefined;
249
249
  };
@@ -254,6 +254,11 @@ export declare const actionChangeSloppiness: {
254
254
  elements: ExcalidrawElement[];
255
255
  appState: {
256
256
  currentItemRoughness: any;
257
+ contextMenu: {
258
+ items: import("../components/ContextMenu").ContextMenuItems;
259
+ top: number;
260
+ left: number;
261
+ } | null;
257
262
  showWelcomeScreen: boolean;
258
263
  isLoading: boolean;
259
264
  errorMessage: string | null;
@@ -292,10 +297,9 @@ export declare const actionChangeSloppiness: {
292
297
  currentItemFontFamily: number;
293
298
  currentItemFontSize: number;
294
299
  currentItemTextAlign: string;
295
- currentItemStrokeSharpness: import("../element/types").StrokeSharpness;
296
300
  currentItemStartArrowhead: Arrowhead | null;
297
301
  currentItemEndArrowhead: Arrowhead | null;
298
- currentItemLinearStrokeSharpness: import("../element/types").StrokeSharpness;
302
+ currentItemRoundness: import("../element/types").StrokeRoundness;
299
303
  viewBackgroundColor: string;
300
304
  scrollX: number;
301
305
  scrollY: number;
@@ -310,7 +314,7 @@ export declare const actionChangeSloppiness: {
310
314
  openMenu: "canvas" | "shape" | null;
311
315
  openPopup: "canvasColorPicker" | "backgroundColorPicker" | "strokeColorPicker" | null;
312
316
  openSidebar: "library" | "customSidebar" | null;
313
- openDialog: "imageExport" | "help" | null;
317
+ openDialog: "imageExport" | "help" | "jsonExport" | null;
314
318
  isSidebarDocked: boolean;
315
319
  lastPointerDownWith: import("../element/types").PointerType;
316
320
  selectedElementIds: {
@@ -354,9 +358,7 @@ export declare const actionChangeSloppiness: {
354
358
  };
355
359
  commitToHistory: true;
356
360
  };
357
- PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps & {
358
- isInHamburgerMenu: boolean;
359
- }) => JSX.Element;
361
+ PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps) => JSX.Element;
360
362
  } & {
361
363
  keyTest?: undefined;
362
364
  };
@@ -367,6 +369,11 @@ export declare const actionChangeStrokeStyle: {
367
369
  elements: ExcalidrawElement[];
368
370
  appState: {
369
371
  currentItemStrokeStyle: any;
372
+ contextMenu: {
373
+ items: import("../components/ContextMenu").ContextMenuItems;
374
+ top: number;
375
+ left: number;
376
+ } | null;
370
377
  showWelcomeScreen: boolean;
371
378
  isLoading: boolean;
372
379
  errorMessage: string | null;
@@ -405,10 +412,9 @@ export declare const actionChangeStrokeStyle: {
405
412
  currentItemFontFamily: number;
406
413
  currentItemFontSize: number;
407
414
  currentItemTextAlign: string;
408
- currentItemStrokeSharpness: import("../element/types").StrokeSharpness;
409
415
  currentItemStartArrowhead: Arrowhead | null;
410
416
  currentItemEndArrowhead: Arrowhead | null;
411
- currentItemLinearStrokeSharpness: import("../element/types").StrokeSharpness;
417
+ currentItemRoundness: import("../element/types").StrokeRoundness;
412
418
  viewBackgroundColor: string;
413
419
  scrollX: number;
414
420
  scrollY: number;
@@ -423,7 +429,7 @@ export declare const actionChangeStrokeStyle: {
423
429
  openMenu: "canvas" | "shape" | null;
424
430
  openPopup: "canvasColorPicker" | "backgroundColorPicker" | "strokeColorPicker" | null;
425
431
  openSidebar: "library" | "customSidebar" | null;
426
- openDialog: "imageExport" | "help" | null;
432
+ openDialog: "imageExport" | "help" | "jsonExport" | null;
427
433
  isSidebarDocked: boolean;
428
434
  lastPointerDownWith: import("../element/types").PointerType;
429
435
  selectedElementIds: {
@@ -467,9 +473,7 @@ export declare const actionChangeStrokeStyle: {
467
473
  };
468
474
  commitToHistory: true;
469
475
  };
470
- PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps & {
471
- isInHamburgerMenu: boolean;
472
- }) => JSX.Element;
476
+ PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps) => JSX.Element;
473
477
  } & {
474
478
  keyTest?: undefined;
475
479
  };
@@ -480,6 +484,11 @@ export declare const actionChangeOpacity: {
480
484
  elements: ExcalidrawElement[];
481
485
  appState: {
482
486
  currentItemOpacity: any;
487
+ contextMenu: {
488
+ items: import("../components/ContextMenu").ContextMenuItems;
489
+ top: number;
490
+ left: number;
491
+ } | null;
483
492
  showWelcomeScreen: boolean;
484
493
  isLoading: boolean;
485
494
  errorMessage: string | null;
@@ -518,10 +527,9 @@ export declare const actionChangeOpacity: {
518
527
  currentItemFontFamily: number;
519
528
  currentItemFontSize: number;
520
529
  currentItemTextAlign: string;
521
- currentItemStrokeSharpness: import("../element/types").StrokeSharpness;
522
530
  currentItemStartArrowhead: Arrowhead | null;
523
531
  currentItemEndArrowhead: Arrowhead | null;
524
- currentItemLinearStrokeSharpness: import("../element/types").StrokeSharpness;
532
+ currentItemRoundness: import("../element/types").StrokeRoundness;
525
533
  viewBackgroundColor: string;
526
534
  scrollX: number;
527
535
  scrollY: number;
@@ -536,7 +544,7 @@ export declare const actionChangeOpacity: {
536
544
  openMenu: "canvas" | "shape" | null;
537
545
  openPopup: "canvasColorPicker" | "backgroundColorPicker" | "strokeColorPicker" | null;
538
546
  openSidebar: "library" | "customSidebar" | null;
539
- openDialog: "imageExport" | "help" | null;
547
+ openDialog: "imageExport" | "help" | "jsonExport" | null;
540
548
  isSidebarDocked: boolean;
541
549
  lastPointerDownWith: import("../element/types").PointerType;
542
550
  selectedElementIds: {
@@ -580,9 +588,7 @@ export declare const actionChangeOpacity: {
580
588
  };
581
589
  commitToHistory: true;
582
590
  };
583
- PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps & {
584
- isInHamburgerMenu: boolean;
585
- }) => JSX.Element;
591
+ PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps) => JSX.Element;
586
592
  } & {
587
593
  keyTest?: undefined;
588
594
  };
@@ -593,6 +599,11 @@ export declare const actionChangeFontSize: {
593
599
  elements: ExcalidrawElement[];
594
600
  appState: {
595
601
  currentItemFontSize: number;
602
+ contextMenu: {
603
+ items: import("../components/ContextMenu").ContextMenuItems;
604
+ top: number;
605
+ left: number;
606
+ } | null;
596
607
  showWelcomeScreen: boolean;
597
608
  isLoading: boolean;
598
609
  errorMessage: string | null;
@@ -631,10 +642,9 @@ export declare const actionChangeFontSize: {
631
642
  currentItemOpacity: number;
632
643
  currentItemFontFamily: number;
633
644
  currentItemTextAlign: string;
634
- currentItemStrokeSharpness: import("../element/types").StrokeSharpness;
635
645
  currentItemStartArrowhead: Arrowhead | null;
636
646
  currentItemEndArrowhead: Arrowhead | null;
637
- currentItemLinearStrokeSharpness: import("../element/types").StrokeSharpness;
647
+ currentItemRoundness: import("../element/types").StrokeRoundness;
638
648
  viewBackgroundColor: string;
639
649
  scrollX: number;
640
650
  scrollY: number;
@@ -649,7 +659,7 @@ export declare const actionChangeFontSize: {
649
659
  openMenu: "canvas" | "shape" | null;
650
660
  openPopup: "canvasColorPicker" | "backgroundColorPicker" | "strokeColorPicker" | null;
651
661
  openSidebar: "library" | "customSidebar" | null;
652
- openDialog: "imageExport" | "help" | null;
662
+ openDialog: "imageExport" | "help" | "jsonExport" | null;
653
663
  isSidebarDocked: boolean;
654
664
  lastPointerDownWith: import("../element/types").PointerType;
655
665
  selectedElementIds: {
@@ -693,9 +703,7 @@ export declare const actionChangeFontSize: {
693
703
  };
694
704
  commitToHistory: boolean;
695
705
  };
696
- PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps & {
697
- isInHamburgerMenu: boolean;
698
- }) => JSX.Element;
706
+ PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps) => JSX.Element;
699
707
  } & {
700
708
  keyTest?: undefined;
701
709
  };
@@ -706,6 +714,11 @@ export declare const actionDecreaseFontSize: {
706
714
  elements: ExcalidrawElement[];
707
715
  appState: {
708
716
  currentItemFontSize: number;
717
+ contextMenu: {
718
+ items: import("../components/ContextMenu").ContextMenuItems;
719
+ top: number;
720
+ left: number;
721
+ } | null;
709
722
  showWelcomeScreen: boolean;
710
723
  isLoading: boolean;
711
724
  errorMessage: string | null;
@@ -744,10 +757,9 @@ export declare const actionDecreaseFontSize: {
744
757
  currentItemOpacity: number;
745
758
  currentItemFontFamily: number;
746
759
  currentItemTextAlign: string;
747
- currentItemStrokeSharpness: import("../element/types").StrokeSharpness;
748
760
  currentItemStartArrowhead: Arrowhead | null;
749
761
  currentItemEndArrowhead: Arrowhead | null;
750
- currentItemLinearStrokeSharpness: import("../element/types").StrokeSharpness;
762
+ currentItemRoundness: import("../element/types").StrokeRoundness;
751
763
  viewBackgroundColor: string;
752
764
  scrollX: number;
753
765
  scrollY: number;
@@ -762,7 +774,7 @@ export declare const actionDecreaseFontSize: {
762
774
  openMenu: "canvas" | "shape" | null;
763
775
  openPopup: "canvasColorPicker" | "backgroundColorPicker" | "strokeColorPicker" | null;
764
776
  openSidebar: "library" | "customSidebar" | null;
765
- openDialog: "imageExport" | "help" | null;
777
+ openDialog: "imageExport" | "help" | "jsonExport" | null;
766
778
  isSidebarDocked: boolean;
767
779
  lastPointerDownWith: import("../element/types").PointerType;
768
780
  selectedElementIds: {
@@ -817,6 +829,11 @@ export declare const actionIncreaseFontSize: {
817
829
  elements: ExcalidrawElement[];
818
830
  appState: {
819
831
  currentItemFontSize: number;
832
+ contextMenu: {
833
+ items: import("../components/ContextMenu").ContextMenuItems;
834
+ top: number;
835
+ left: number;
836
+ } | null;
820
837
  showWelcomeScreen: boolean;
821
838
  isLoading: boolean;
822
839
  errorMessage: string | null;
@@ -855,10 +872,9 @@ export declare const actionIncreaseFontSize: {
855
872
  currentItemOpacity: number;
856
873
  currentItemFontFamily: number;
857
874
  currentItemTextAlign: string;
858
- currentItemStrokeSharpness: import("../element/types").StrokeSharpness;
859
875
  currentItemStartArrowhead: Arrowhead | null;
860
876
  currentItemEndArrowhead: Arrowhead | null;
861
- currentItemLinearStrokeSharpness: import("../element/types").StrokeSharpness;
877
+ currentItemRoundness: import("../element/types").StrokeRoundness;
862
878
  viewBackgroundColor: string;
863
879
  scrollX: number;
864
880
  scrollY: number;
@@ -873,7 +889,7 @@ export declare const actionIncreaseFontSize: {
873
889
  openMenu: "canvas" | "shape" | null;
874
890
  openPopup: "canvasColorPicker" | "backgroundColorPicker" | "strokeColorPicker" | null;
875
891
  openSidebar: "library" | "customSidebar" | null;
876
- openDialog: "imageExport" | "help" | null;
892
+ openDialog: "imageExport" | "help" | "jsonExport" | null;
877
893
  isSidebarDocked: boolean;
878
894
  lastPointerDownWith: import("../element/types").PointerType;
879
895
  selectedElementIds: {
@@ -928,6 +944,11 @@ export declare const actionChangeFontFamily: {
928
944
  elements: ExcalidrawElement[];
929
945
  appState: {
930
946
  currentItemFontFamily: any;
947
+ contextMenu: {
948
+ items: import("../components/ContextMenu").ContextMenuItems;
949
+ top: number;
950
+ left: number;
951
+ } | null;
931
952
  showWelcomeScreen: boolean;
932
953
  isLoading: boolean;
933
954
  errorMessage: string | null;
@@ -966,10 +987,9 @@ export declare const actionChangeFontFamily: {
966
987
  currentItemOpacity: number;
967
988
  currentItemFontSize: number;
968
989
  currentItemTextAlign: string;
969
- currentItemStrokeSharpness: import("../element/types").StrokeSharpness;
970
990
  currentItemStartArrowhead: Arrowhead | null;
971
991
  currentItemEndArrowhead: Arrowhead | null;
972
- currentItemLinearStrokeSharpness: import("../element/types").StrokeSharpness;
992
+ currentItemRoundness: import("../element/types").StrokeRoundness;
973
993
  viewBackgroundColor: string;
974
994
  scrollX: number;
975
995
  scrollY: number;
@@ -984,7 +1004,7 @@ export declare const actionChangeFontFamily: {
984
1004
  openMenu: "canvas" | "shape" | null;
985
1005
  openPopup: "canvasColorPicker" | "backgroundColorPicker" | "strokeColorPicker" | null;
986
1006
  openSidebar: "library" | "customSidebar" | null;
987
- openDialog: "imageExport" | "help" | null;
1007
+ openDialog: "imageExport" | "help" | "jsonExport" | null;
988
1008
  isSidebarDocked: boolean;
989
1009
  lastPointerDownWith: import("../element/types").PointerType;
990
1010
  selectedElementIds: {
@@ -1028,9 +1048,7 @@ export declare const actionChangeFontFamily: {
1028
1048
  };
1029
1049
  commitToHistory: true;
1030
1050
  };
1031
- PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps & {
1032
- isInHamburgerMenu: boolean;
1033
- }) => JSX.Element;
1051
+ PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps) => JSX.Element;
1034
1052
  } & {
1035
1053
  keyTest?: undefined;
1036
1054
  };
@@ -1041,6 +1059,11 @@ export declare const actionChangeTextAlign: {
1041
1059
  elements: ExcalidrawElement[];
1042
1060
  appState: {
1043
1061
  currentItemTextAlign: any;
1062
+ contextMenu: {
1063
+ items: import("../components/ContextMenu").ContextMenuItems;
1064
+ top: number;
1065
+ left: number;
1066
+ } | null;
1044
1067
  showWelcomeScreen: boolean;
1045
1068
  isLoading: boolean;
1046
1069
  errorMessage: string | null;
@@ -1079,10 +1102,9 @@ export declare const actionChangeTextAlign: {
1079
1102
  currentItemOpacity: number;
1080
1103
  currentItemFontFamily: number;
1081
1104
  currentItemFontSize: number;
1082
- currentItemStrokeSharpness: import("../element/types").StrokeSharpness;
1083
1105
  currentItemStartArrowhead: Arrowhead | null;
1084
1106
  currentItemEndArrowhead: Arrowhead | null;
1085
- currentItemLinearStrokeSharpness: import("../element/types").StrokeSharpness;
1107
+ currentItemRoundness: import("../element/types").StrokeRoundness;
1086
1108
  viewBackgroundColor: string;
1087
1109
  scrollX: number;
1088
1110
  scrollY: number;
@@ -1097,7 +1119,7 @@ export declare const actionChangeTextAlign: {
1097
1119
  openMenu: "canvas" | "shape" | null;
1098
1120
  openPopup: "canvasColorPicker" | "backgroundColorPicker" | "strokeColorPicker" | null;
1099
1121
  openSidebar: "library" | "customSidebar" | null;
1100
- openDialog: "imageExport" | "help" | null;
1122
+ openDialog: "imageExport" | "help" | "jsonExport" | null;
1101
1123
  isSidebarDocked: boolean;
1102
1124
  lastPointerDownWith: import("../element/types").PointerType;
1103
1125
  selectedElementIds: {
@@ -1141,9 +1163,7 @@ export declare const actionChangeTextAlign: {
1141
1163
  };
1142
1164
  commitToHistory: true;
1143
1165
  };
1144
- PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps & {
1145
- isInHamburgerMenu: boolean;
1146
- }) => JSX.Element;
1166
+ PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps) => JSX.Element;
1147
1167
  } & {
1148
1168
  keyTest?: undefined;
1149
1169
  };
@@ -1155,6 +1175,11 @@ export declare const actionChangeVerticalAlign: {
1155
1175
  perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>, value: any) => {
1156
1176
  elements: ExcalidrawElement[];
1157
1177
  appState: {
1178
+ contextMenu: {
1179
+ items: import("../components/ContextMenu").ContextMenuItems;
1180
+ top: number;
1181
+ left: number;
1182
+ } | null;
1158
1183
  showWelcomeScreen: boolean;
1159
1184
  isLoading: boolean;
1160
1185
  errorMessage: string | null;
@@ -1194,10 +1219,9 @@ export declare const actionChangeVerticalAlign: {
1194
1219
  currentItemFontFamily: number;
1195
1220
  currentItemFontSize: number;
1196
1221
  currentItemTextAlign: string;
1197
- currentItemStrokeSharpness: import("../element/types").StrokeSharpness;
1198
1222
  currentItemStartArrowhead: Arrowhead | null;
1199
1223
  currentItemEndArrowhead: Arrowhead | null;
1200
- currentItemLinearStrokeSharpness: import("../element/types").StrokeSharpness;
1224
+ currentItemRoundness: import("../element/types").StrokeRoundness;
1201
1225
  viewBackgroundColor: string;
1202
1226
  scrollX: number;
1203
1227
  scrollY: number;
@@ -1212,7 +1236,7 @@ export declare const actionChangeVerticalAlign: {
1212
1236
  openMenu: "canvas" | "shape" | null;
1213
1237
  openPopup: "canvasColorPicker" | "backgroundColorPicker" | "strokeColorPicker" | null;
1214
1238
  openSidebar: "library" | "customSidebar" | null;
1215
- openDialog: "imageExport" | "help" | null;
1239
+ openDialog: "imageExport" | "help" | "jsonExport" | null;
1216
1240
  isSidebarDocked: boolean;
1217
1241
  lastPointerDownWith: import("../element/types").PointerType;
1218
1242
  selectedElementIds: {
@@ -1256,20 +1280,22 @@ export declare const actionChangeVerticalAlign: {
1256
1280
  };
1257
1281
  commitToHistory: true;
1258
1282
  };
1259
- PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps & {
1260
- isInHamburgerMenu: boolean;
1261
- }) => JSX.Element;
1283
+ PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps) => JSX.Element;
1262
1284
  } & {
1263
1285
  keyTest?: undefined;
1264
1286
  };
1265
- export declare const actionChangeSharpness: {
1266
- name: "changeSharpness";
1287
+ export declare const actionChangeRoundness: {
1288
+ name: "changeRoundness";
1267
1289
  trackEvent: false;
1268
1290
  perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>, value: any) => {
1269
1291
  elements: ExcalidrawElement[];
1270
1292
  appState: {
1271
- currentItemStrokeSharpness: any;
1272
- currentItemLinearStrokeSharpness: any;
1293
+ currentItemRoundness: any;
1294
+ contextMenu: {
1295
+ items: import("../components/ContextMenu").ContextMenuItems;
1296
+ top: number;
1297
+ left: number;
1298
+ } | null;
1273
1299
  showWelcomeScreen: boolean;
1274
1300
  isLoading: boolean;
1275
1301
  errorMessage: string | null;
@@ -1325,7 +1351,7 @@ export declare const actionChangeSharpness: {
1325
1351
  openMenu: "canvas" | "shape" | null;
1326
1352
  openPopup: "canvasColorPicker" | "backgroundColorPicker" | "strokeColorPicker" | null;
1327
1353
  openSidebar: "library" | "customSidebar" | null;
1328
- openDialog: "imageExport" | "help" | null;
1354
+ openDialog: "imageExport" | "help" | "jsonExport" | null;
1329
1355
  isSidebarDocked: boolean;
1330
1356
  lastPointerDownWith: import("../element/types").PointerType;
1331
1357
  selectedElementIds: {
@@ -1369,9 +1395,7 @@ export declare const actionChangeSharpness: {
1369
1395
  };
1370
1396
  commitToHistory: true;
1371
1397
  };
1372
- PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps & {
1373
- isInHamburgerMenu: boolean;
1374
- }) => JSX.Element;
1398
+ PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps) => JSX.Element;
1375
1399
  } & {
1376
1400
  keyTest?: undefined;
1377
1401
  };
@@ -1384,6 +1408,11 @@ export declare const actionChangeArrowhead: {
1384
1408
  }) => {
1385
1409
  elements: ExcalidrawElement[];
1386
1410
  appState: {
1411
+ contextMenu: {
1412
+ items: import("../components/ContextMenu").ContextMenuItems;
1413
+ top: number;
1414
+ left: number;
1415
+ } | null;
1387
1416
  showWelcomeScreen: boolean;
1388
1417
  isLoading: boolean;
1389
1418
  errorMessage: string | null;
@@ -1423,10 +1452,9 @@ export declare const actionChangeArrowhead: {
1423
1452
  currentItemFontFamily: number;
1424
1453
  currentItemFontSize: number;
1425
1454
  currentItemTextAlign: string;
1426
- currentItemStrokeSharpness: import("../element/types").StrokeSharpness;
1427
1455
  currentItemStartArrowhead: Arrowhead | null;
1428
1456
  currentItemEndArrowhead: Arrowhead | null;
1429
- currentItemLinearStrokeSharpness: import("../element/types").StrokeSharpness;
1457
+ currentItemRoundness: import("../element/types").StrokeRoundness;
1430
1458
  viewBackgroundColor: string;
1431
1459
  scrollX: number;
1432
1460
  scrollY: number;
@@ -1441,7 +1469,7 @@ export declare const actionChangeArrowhead: {
1441
1469
  openMenu: "canvas" | "shape" | null;
1442
1470
  openPopup: "canvasColorPicker" | "backgroundColorPicker" | "strokeColorPicker" | null;
1443
1471
  openSidebar: "library" | "customSidebar" | null;
1444
- openDialog: "imageExport" | "help" | null;
1472
+ openDialog: "imageExport" | "help" | "jsonExport" | null;
1445
1473
  isSidebarDocked: boolean;
1446
1474
  lastPointerDownWith: import("../element/types").PointerType;
1447
1475
  selectedElementIds: {
@@ -1485,9 +1513,7 @@ export declare const actionChangeArrowhead: {
1485
1513
  };
1486
1514
  commitToHistory: true;
1487
1515
  };
1488
- PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps & {
1489
- isInHamburgerMenu: boolean;
1490
- }) => JSX.Element;
1516
+ PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps) => JSX.Element;
1491
1517
  } & {
1492
1518
  keyTest?: undefined;
1493
1519
  };
@@ -10,6 +10,11 @@ export declare const actionCopyStyles: {
10
10
  toast: {
11
11
  message: string;
12
12
  };
13
+ contextMenu: {
14
+ items: import("../components/ContextMenu").ContextMenuItems;
15
+ top: number;
16
+ left: number;
17
+ } | null;
13
18
  showWelcomeScreen: boolean;
14
19
  isLoading: boolean;
15
20
  errorMessage: string | null;
@@ -49,10 +54,9 @@ export declare const actionCopyStyles: {
49
54
  currentItemFontFamily: number;
50
55
  currentItemFontSize: number;
51
56
  currentItemTextAlign: string;
52
- currentItemStrokeSharpness: import("../element/types").StrokeSharpness;
53
57
  currentItemStartArrowhead: import("../element/types").Arrowhead | null;
54
58
  currentItemEndArrowhead: import("../element/types").Arrowhead | null;
55
- currentItemLinearStrokeSharpness: import("../element/types").StrokeSharpness;
59
+ currentItemRoundness: import("../element/types").StrokeRoundness;
56
60
  viewBackgroundColor: string;
57
61
  scrollX: number;
58
62
  scrollY: number;
@@ -67,7 +71,7 @@ export declare const actionCopyStyles: {
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: {
@@ -2,6 +2,7 @@
2
2
  import { AppState } from "../types";
3
3
  export declare const actionToggleGridMode: {
4
4
  name: "gridMode";
5
+ viewMode: true;
5
6
  trackEvent: {
6
7
  category: "canvas";
7
8
  predicate: (appState: Readonly<AppState>) => boolean;
@@ -9,6 +10,11 @@ export declare const actionToggleGridMode: {
9
10
  perform(elements: readonly import("../element/types").ExcalidrawElement[], appState: Readonly<AppState>): {
10
11
  appState: {
11
12
  gridSize: number | null;
13
+ contextMenu: {
14
+ items: import("../components/ContextMenu").ContextMenuItems;
15
+ top: number;
16
+ left: number;
17
+ } | null;
12
18
  showWelcomeScreen: boolean;
13
19
  isLoading: boolean;
14
20
  errorMessage: string | null;
@@ -48,10 +54,9 @@ export declare const actionToggleGridMode: {
48
54
  currentItemFontFamily: number;
49
55
  currentItemFontSize: number;
50
56
  currentItemTextAlign: string;
51
- currentItemStrokeSharpness: import("../element/types").StrokeSharpness;
52
57
  currentItemStartArrowhead: import("../element/types").Arrowhead | null;
53
58
  currentItemEndArrowhead: import("../element/types").Arrowhead | null;
54
- currentItemLinearStrokeSharpness: import("../element/types").StrokeSharpness;
59
+ currentItemRoundness: import("../element/types").StrokeRoundness;
55
60
  viewBackgroundColor: string;
56
61
  scrollX: number;
57
62
  scrollY: number;
@@ -66,7 +71,7 @@ export declare const actionToggleGridMode: {
66
71
  openMenu: "canvas" | "shape" | null;
67
72
  openPopup: "canvasColorPicker" | "backgroundColorPicker" | "strokeColorPicker" | null;
68
73
  openSidebar: "library" | "customSidebar" | null;
69
- openDialog: "imageExport" | "help" | null;
74
+ openDialog: "imageExport" | "help" | "jsonExport" | null;
70
75
  isSidebarDocked: boolean;
71
76
  lastPointerDownWith: import("../element/types").PointerType;
72
77
  selectedElementIds: {
@@ -110,6 +115,7 @@ export declare const actionToggleGridMode: {
110
115
  commitToHistory: false;
111
116
  };
112
117
  checked: (appState: AppState) => boolean;
118
+ predicate: (element: readonly import("../element/types").ExcalidrawElement[], appState: AppState, props: import("../types").ExcalidrawProps) => boolean;
113
119
  contextItemLabel: string;
114
120
  keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
115
121
  } & {
@@ -9,6 +9,11 @@ export declare const actionToggleLock: {
9
9
  elements: ExcalidrawElement[];
10
10
  appState: {
11
11
  selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
12
+ contextMenu: {
13
+ items: import("../components/ContextMenu").ContextMenuItems;
14
+ top: number;
15
+ left: number;
16
+ } | null;
12
17
  showWelcomeScreen: boolean;
13
18
  isLoading: boolean;
14
19
  errorMessage: string | null;
@@ -48,10 +53,9 @@ export declare const actionToggleLock: {
48
53
  currentItemFontFamily: number;
49
54
  currentItemFontSize: number;
50
55
  currentItemTextAlign: string;
51
- currentItemStrokeSharpness: import("../element/types").StrokeSharpness;
52
56
  currentItemStartArrowhead: import("../element/types").Arrowhead | null;
53
57
  currentItemEndArrowhead: import("../element/types").Arrowhead | null;
54
- currentItemLinearStrokeSharpness: import("../element/types").StrokeSharpness;
58
+ currentItemRoundness: import("../element/types").StrokeRoundness;
55
59
  viewBackgroundColor: string;
56
60
  scrollX: number;
57
61
  scrollY: number;
@@ -66,7 +70,7 @@ export declare const actionToggleLock: {
66
70
  openMenu: "canvas" | "shape" | null;
67
71
  openPopup: "canvasColorPicker" | "backgroundColorPicker" | "strokeColorPicker" | null;
68
72
  openSidebar: "library" | "customSidebar" | null;
69
- openDialog: "imageExport" | "help" | null;
73
+ openDialog: "imageExport" | "help" | "jsonExport" | null;
70
74
  isSidebarDocked: boolean;
71
75
  lastPointerDownWith: import("../element/types").PointerType;
72
76
  selectedElementIds: {