@excalidraw/common 0.18.0-c65b684e9 → 0.18.0-d1f3982

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 (88) hide show
  1. package/dist/dev/index.js +178 -44
  2. package/dist/dev/index.js.map +3 -3
  3. package/dist/prod/index.js +3 -3
  4. package/dist/types/common/src/constants.d.ts +18 -15
  5. package/dist/types/common/src/editorInterface.d.ts +34 -0
  6. package/dist/types/common/src/index.d.ts +1 -0
  7. package/dist/types/common/src/utils.d.ts +2 -1
  8. package/dist/types/element/src/Scene.d.ts +6 -2
  9. package/dist/types/element/src/bounds.d.ts +1 -1
  10. package/dist/types/element/src/delta.d.ts +6 -4
  11. package/dist/types/element/src/index.d.ts +1 -0
  12. package/dist/types/element/src/positionElementsOnGrid.d.ts +2 -0
  13. package/dist/types/element/src/renderElement.d.ts +4 -1
  14. package/dist/types/element/src/resizeTest.d.ts +5 -4
  15. package/dist/types/element/src/store.d.ts +6 -1
  16. package/dist/types/element/src/textElement.d.ts +1 -1
  17. package/dist/types/element/src/transformHandles.d.ts +5 -4
  18. package/dist/types/excalidraw/actions/actionAddToLibrary.d.ts +21 -9
  19. package/dist/types/excalidraw/actions/actionBoundText.d.ts +14 -6
  20. package/dist/types/excalidraw/actions/actionCanvas.d.ts +94 -54
  21. package/dist/types/excalidraw/actions/actionClipboard.d.ts +42 -18
  22. package/dist/types/excalidraw/actions/actionCropEditor.d.ts +7 -3
  23. package/dist/types/excalidraw/actions/actionDeleteSelected.d.ts +22 -10
  24. package/dist/types/excalidraw/actions/actionDuplicateSelection.d.ts +1 -1
  25. package/dist/types/excalidraw/actions/actionElementLink.d.ts +7 -3
  26. package/dist/types/excalidraw/actions/actionElementLock.d.ts +14 -6
  27. package/dist/types/excalidraw/actions/actionEmbeddable.d.ts +7 -3
  28. package/dist/types/excalidraw/actions/actionExport.d.ts +63 -27
  29. package/dist/types/excalidraw/actions/actionFinalize.d.ts +14 -6
  30. package/dist/types/excalidraw/actions/actionFrame.d.ts +28 -12
  31. package/dist/types/excalidraw/actions/actionGroup.d.ts +14 -6
  32. package/dist/types/excalidraw/actions/actionLinearEditor.d.ts +8 -4
  33. package/dist/types/excalidraw/actions/actionLink.d.ts +5 -1
  34. package/dist/types/excalidraw/actions/actionMenu.d.ts +7 -369
  35. package/dist/types/excalidraw/actions/actionNavigate.d.ts +14 -6
  36. package/dist/types/excalidraw/actions/actionProperties.d.ts +122 -53
  37. package/dist/types/excalidraw/actions/actionSelectAll.d.ts +7 -3
  38. package/dist/types/excalidraw/actions/actionStyles.d.ts +7 -3
  39. package/dist/types/excalidraw/actions/actionToggleGridMode.d.ts +7 -3
  40. package/dist/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +7 -3
  41. package/dist/types/excalidraw/actions/actionToggleSearchMenu.d.ts +7 -3
  42. package/dist/types/excalidraw/actions/actionToggleStats.d.ts +7 -3
  43. package/dist/types/excalidraw/actions/actionToggleViewMode.d.ts +7 -3
  44. package/dist/types/excalidraw/actions/actionToggleZenMode.d.ts +7 -3
  45. package/dist/types/excalidraw/actions/index.d.ts +2 -2
  46. package/dist/types/excalidraw/actions/types.d.ts +1 -1
  47. package/dist/types/excalidraw/appState.d.ts +5 -1
  48. package/dist/types/excalidraw/clipboard.d.ts +64 -1
  49. package/dist/types/excalidraw/components/Actions.d.ts +17 -3
  50. package/dist/types/excalidraw/components/App.d.ts +28 -23
  51. package/dist/types/excalidraw/components/ColorPicker/Picker.d.ts +2 -0
  52. package/dist/types/excalidraw/components/ColorPicker/PickerColorList.d.ts +2 -1
  53. package/dist/types/excalidraw/components/ColorPicker/ShadeList.d.ts +2 -1
  54. package/dist/types/excalidraw/components/CommandPalette/CommandPalette.d.ts +1 -0
  55. package/dist/types/excalidraw/components/ExcalidrawLogo.d.ts +1 -1
  56. package/dist/types/excalidraw/components/FontPicker/FontPicker.d.ts +2 -1
  57. package/dist/types/excalidraw/components/FontPicker/FontPickerTrigger.d.ts +3 -1
  58. package/dist/types/excalidraw/components/HintViewer.d.ts +4 -3
  59. package/dist/types/excalidraw/components/InlineIcon.d.ts +3 -1
  60. package/dist/types/excalidraw/components/LayerUI.d.ts +2 -1
  61. package/dist/types/excalidraw/components/LibraryMenuSection.d.ts +1 -1
  62. package/dist/types/excalidraw/components/MobileMenu.d.ts +3 -5
  63. package/dist/types/excalidraw/components/MobileToolBar.d.ts +11 -0
  64. package/dist/types/excalidraw/components/Popover.d.ts +2 -1
  65. package/dist/types/excalidraw/components/PropertiesPopover.d.ts +1 -0
  66. package/dist/types/excalidraw/components/TTDDialog/TTDDialogTrigger.d.ts +1 -2
  67. package/dist/types/excalidraw/components/TextField.d.ts +1 -0
  68. package/dist/types/excalidraw/components/ToolPopover.d.ts +25 -0
  69. package/dist/types/excalidraw/components/canvases/InteractiveCanvas.d.ts +3 -2
  70. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenu.d.ts +4 -2
  71. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuContent.d.ts +2 -1
  72. package/dist/types/excalidraw/components/icons.d.ts +5 -0
  73. package/dist/types/excalidraw/components/live-collaboration/LiveCollaborationTrigger.d.ts +13 -1
  74. package/dist/types/excalidraw/components/main-menu/MainMenu.d.ts +0 -3
  75. package/dist/types/excalidraw/components/shapes.d.ts +129 -1
  76. package/dist/types/excalidraw/data/blob.d.ts +3 -7
  77. package/dist/types/excalidraw/data/reconcile.d.ts +1 -0
  78. package/dist/types/excalidraw/data/restore.d.ts +6 -1
  79. package/dist/types/excalidraw/data/types.d.ts +4 -1
  80. package/dist/types/excalidraw/hooks/useLibraryItemSvg.d.ts +1 -1
  81. package/dist/types/excalidraw/hooks/useTextEditorFocus.d.ts +14 -0
  82. package/dist/types/excalidraw/index.d.ts +3 -4
  83. package/dist/types/excalidraw/renderer/interactiveScene.d.ts +1 -1
  84. package/dist/types/excalidraw/scene/types.d.ts +3 -3
  85. package/dist/types/excalidraw/shortcut.d.ts +1 -0
  86. package/dist/types/excalidraw/types.d.ts +23 -17
  87. package/dist/types/math/src/segment.d.ts +1 -0
  88. package/package.json +1 -1
@@ -44,6 +44,10 @@ export declare const actionAddToLibrary: {
44
44
  locked: boolean;
45
45
  fromSelection: boolean;
46
46
  } & import("../types").ActiveTool;
47
+ preferredSelectionTool: {
48
+ type: "selection" | "lasso";
49
+ initialized: boolean;
50
+ };
47
51
  penMode: boolean;
48
52
  penDetected: boolean;
49
53
  exportBackground: boolean;
@@ -76,8 +80,8 @@ export declare const actionAddToLibrary: {
76
80
  zoom: Readonly<{
77
81
  value: import("../types").NormalizedZoomValue;
78
82
  }>;
79
- openMenu: "canvas" | "shape" | null;
80
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
83
+ openMenu: "canvas" | null;
84
+ openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
81
85
  openSidebar: {
82
86
  name: string;
83
87
  tab?: string | undefined;
@@ -153,7 +157,7 @@ export declare const actionAddToLibrary: {
153
157
  shown: true;
154
158
  data: import("../charts").Spreadsheet;
155
159
  };
156
- showHyperlinkPopup: false | "editor" | "info";
160
+ showHyperlinkPopup: false | "info" | "editor";
157
161
  selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
158
162
  snapLines: readonly import("../snapping").SnapLine[];
159
163
  originSnapOffset: {
@@ -211,6 +215,10 @@ export declare const actionAddToLibrary: {
211
215
  locked: boolean;
212
216
  fromSelection: boolean;
213
217
  } & import("../types").ActiveTool;
218
+ preferredSelectionTool: {
219
+ type: "selection" | "lasso";
220
+ initialized: boolean;
221
+ };
214
222
  penMode: boolean;
215
223
  penDetected: boolean;
216
224
  exportBackground: boolean;
@@ -243,8 +251,8 @@ export declare const actionAddToLibrary: {
243
251
  zoom: Readonly<{
244
252
  value: import("../types").NormalizedZoomValue;
245
253
  }>;
246
- openMenu: "canvas" | "shape" | null;
247
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
254
+ openMenu: "canvas" | null;
255
+ openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
248
256
  openSidebar: {
249
257
  name: string;
250
258
  tab?: string | undefined;
@@ -325,7 +333,7 @@ export declare const actionAddToLibrary: {
325
333
  shown: true;
326
334
  data: import("../charts").Spreadsheet;
327
335
  };
328
- showHyperlinkPopup: false | "editor" | "info";
336
+ showHyperlinkPopup: false | "info" | "editor";
329
337
  selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
330
338
  snapLines: readonly import("../snapping").SnapLine[];
331
339
  originSnapOffset: {
@@ -383,6 +391,10 @@ export declare const actionAddToLibrary: {
383
391
  locked: boolean;
384
392
  fromSelection: boolean;
385
393
  } & import("../types").ActiveTool;
394
+ preferredSelectionTool: {
395
+ type: "selection" | "lasso";
396
+ initialized: boolean;
397
+ };
386
398
  penMode: boolean;
387
399
  penDetected: boolean;
388
400
  exportBackground: boolean;
@@ -415,8 +427,8 @@ export declare const actionAddToLibrary: {
415
427
  zoom: Readonly<{
416
428
  value: import("../types").NormalizedZoomValue;
417
429
  }>;
418
- openMenu: "canvas" | "shape" | null;
419
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
430
+ openMenu: "canvas" | null;
431
+ openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
420
432
  openSidebar: {
421
433
  name: string;
422
434
  tab?: string | undefined;
@@ -497,7 +509,7 @@ export declare const actionAddToLibrary: {
497
509
  shown: true;
498
510
  data: import("../charts").Spreadsheet;
499
511
  };
500
- showHyperlinkPopup: false | "editor" | "info";
512
+ showHyperlinkPopup: false | "info" | "editor";
501
513
  selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
502
514
  snapLines: readonly import("../snapping").SnapLine[];
503
515
  originSnapOffset: {
@@ -64,6 +64,10 @@ export declare const actionBindText: {
64
64
  locked: boolean;
65
65
  fromSelection: boolean;
66
66
  } & import("../types").ActiveTool;
67
+ preferredSelectionTool: {
68
+ type: "selection" | "lasso";
69
+ initialized: boolean;
70
+ };
67
71
  penMode: boolean;
68
72
  penDetected: boolean;
69
73
  exportBackground: boolean;
@@ -96,8 +100,8 @@ export declare const actionBindText: {
96
100
  zoom: Readonly<{
97
101
  value: import("../types").NormalizedZoomValue;
98
102
  }>;
99
- openMenu: "canvas" | "shape" | null;
100
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
103
+ openMenu: "canvas" | null;
104
+ openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
101
105
  openSidebar: {
102
106
  name: string;
103
107
  tab?: string | undefined;
@@ -175,7 +179,7 @@ export declare const actionBindText: {
175
179
  shown: true;
176
180
  data: import("../charts").Spreadsheet;
177
181
  };
178
- showHyperlinkPopup: false | "editor" | "info";
182
+ showHyperlinkPopup: false | "info" | "editor";
179
183
  selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
180
184
  snapLines: readonly import("../snapping").SnapLine[];
181
185
  originSnapOffset: {
@@ -248,6 +252,10 @@ export declare const actionWrapTextInContainer: {
248
252
  locked: boolean;
249
253
  fromSelection: boolean;
250
254
  } & import("../types").ActiveTool;
255
+ preferredSelectionTool: {
256
+ type: "selection" | "lasso";
257
+ initialized: boolean;
258
+ };
251
259
  penMode: boolean;
252
260
  penDetected: boolean;
253
261
  exportBackground: boolean;
@@ -280,8 +288,8 @@ export declare const actionWrapTextInContainer: {
280
288
  zoom: Readonly<{
281
289
  value: import("../types").NormalizedZoomValue;
282
290
  }>;
283
- openMenu: "canvas" | "shape" | null;
284
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
291
+ openMenu: "canvas" | null;
292
+ openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
285
293
  openSidebar: {
286
294
  name: string;
287
295
  tab?: string | undefined;
@@ -359,7 +367,7 @@ export declare const actionWrapTextInContainer: {
359
367
  shown: true;
360
368
  data: import("../charts").Spreadsheet;
361
369
  };
362
- showHyperlinkPopup: false | "editor" | "info";
370
+ showHyperlinkPopup: false | "info" | "editor";
363
371
  selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
364
372
  snapLines: readonly import("../snapping").SnapLine[];
365
373
  originSnapOffset: {
@@ -11,7 +11,7 @@ export declare const actionChangeViewBackgroundColor: {
11
11
  appState: any;
12
12
  captureUpdate: "IMMEDIATELY" | "EVENTUALLY";
13
13
  };
14
- PanelComponent: ({ elements, appState, updateData, appProps }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
14
+ PanelComponent: ({ elements, appState, updateData, appProps, data }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
15
15
  } & {
16
16
  keyTest?: undefined;
17
17
  };
@@ -137,6 +137,10 @@ export declare const actionClearCanvas: {
137
137
  resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
138
138
  startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
139
139
  editingFrame: string | null;
140
+ preferredSelectionTool: {
141
+ type: "selection" | "lasso";
142
+ initialized: boolean;
143
+ };
140
144
  exportWithDarkMode: boolean;
141
145
  exportScale: number;
142
146
  currentItemStrokeColor: string;
@@ -157,10 +161,9 @@ export declare const actionClearCanvas: {
157
161
  cursorButton: "up" | "down";
158
162
  scrolledOutside: boolean;
159
163
  isResizing: boolean;
160
- openMenu: "canvas" | "shape" | null;
161
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
164
+ openMenu: "canvas" | null;
165
+ openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
162
166
  openSidebar: {
163
- /** zoom content to cover X of the viewport, when fitToViewport=true */
164
167
  name: string;
165
168
  tab?: string | undefined;
166
169
  } | null;
@@ -181,7 +184,7 @@ export declare const actionClearCanvas: {
181
184
  } | null;
182
185
  fileHandle: import("browser-fs-access").FileSystemHandle | null;
183
186
  currentChartType: import("@excalidraw/element/types").ChartType;
184
- showHyperlinkPopup: false | "editor" | "info";
187
+ showHyperlinkPopup: false | "info" | "editor";
185
188
  originSnapOffset: {
186
189
  x: number;
187
190
  y: number;
@@ -248,6 +251,10 @@ export declare const actionZoomIn: {
248
251
  locked: boolean;
249
252
  fromSelection: boolean;
250
253
  } & import("../types").ActiveTool;
254
+ preferredSelectionTool: {
255
+ type: "selection" | "lasso";
256
+ initialized: boolean;
257
+ };
251
258
  penMode: boolean;
252
259
  penDetected: boolean;
253
260
  exportBackground: boolean;
@@ -275,10 +282,9 @@ export declare const actionZoomIn: {
275
282
  name: string | null;
276
283
  isResizing: boolean;
277
284
  isRotating: boolean;
278
- openMenu: "canvas" | "shape" | null;
279
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
285
+ openMenu: "canvas" | null;
286
+ openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
280
287
  openSidebar: {
281
- /** zoom content to cover X of the viewport, when fitToViewport=true */
282
288
  name: string;
283
289
  tab?: string | undefined;
284
290
  } | null;
@@ -358,7 +364,7 @@ export declare const actionZoomIn: {
358
364
  shown: true;
359
365
  data: import("../charts").Spreadsheet;
360
366
  };
361
- showHyperlinkPopup: false | "editor" | "info";
367
+ showHyperlinkPopup: false | "info" | "editor";
362
368
  selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
363
369
  snapLines: readonly import("../snapping").SnapLine[];
364
370
  originSnapOffset: {
@@ -435,6 +441,10 @@ export declare const actionZoomOut: {
435
441
  locked: boolean;
436
442
  fromSelection: boolean;
437
443
  } & import("../types").ActiveTool;
444
+ preferredSelectionTool: {
445
+ type: "selection" | "lasso";
446
+ initialized: boolean;
447
+ };
438
448
  penMode: boolean;
439
449
  penDetected: boolean;
440
450
  exportBackground: boolean;
@@ -462,10 +472,9 @@ export declare const actionZoomOut: {
462
472
  name: string | null;
463
473
  isResizing: boolean;
464
474
  isRotating: boolean;
465
- openMenu: "canvas" | "shape" | null;
466
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
475
+ openMenu: "canvas" | null;
476
+ openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
467
477
  openSidebar: {
468
- /** zoom content to cover X of the viewport, when fitToViewport=true */
469
478
  name: string;
470
479
  tab?: string | undefined;
471
480
  } | null;
@@ -545,7 +554,7 @@ export declare const actionZoomOut: {
545
554
  shown: true;
546
555
  data: import("../charts").Spreadsheet;
547
556
  };
548
- showHyperlinkPopup: false | "editor" | "info";
557
+ showHyperlinkPopup: false | "info" | "editor";
549
558
  selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
550
559
  snapLines: readonly import("../snapping").SnapLine[];
551
560
  originSnapOffset: {
@@ -622,6 +631,10 @@ export declare const actionResetZoom: {
622
631
  locked: boolean;
623
632
  fromSelection: boolean;
624
633
  } & import("../types").ActiveTool;
634
+ preferredSelectionTool: {
635
+ type: "selection" | "lasso";
636
+ initialized: boolean;
637
+ };
625
638
  penMode: boolean;
626
639
  penDetected: boolean;
627
640
  exportBackground: boolean;
@@ -649,10 +662,9 @@ export declare const actionResetZoom: {
649
662
  name: string | null;
650
663
  isResizing: boolean;
651
664
  isRotating: boolean;
652
- openMenu: "canvas" | "shape" | null;
653
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
665
+ openMenu: "canvas" | null;
666
+ openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
654
667
  openSidebar: {
655
- /** zoom content to cover X of the viewport, when fitToViewport=true */
656
668
  name: string;
657
669
  tab?: string | undefined;
658
670
  } | null;
@@ -732,7 +744,7 @@ export declare const actionResetZoom: {
732
744
  shown: true;
733
745
  data: import("../charts").Spreadsheet;
734
746
  };
735
- showHyperlinkPopup: false | "editor" | "info";
747
+ showHyperlinkPopup: false | "info" | "editor";
736
748
  selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
737
749
  snapLines: readonly import("../snapping").SnapLine[];
738
750
  originSnapOffset: {
@@ -815,6 +827,10 @@ export declare const zoomToFitBounds: ({ bounds, appState, canvasOffsets, fitToV
815
827
  locked: boolean;
816
828
  fromSelection: boolean;
817
829
  } & import("../types").ActiveTool;
830
+ preferredSelectionTool: {
831
+ type: "selection" | "lasso";
832
+ initialized: boolean;
833
+ };
818
834
  penMode: boolean;
819
835
  penDetected: boolean;
820
836
  exportBackground: boolean;
@@ -842,10 +858,9 @@ export declare const zoomToFitBounds: ({ bounds, appState, canvasOffsets, fitToV
842
858
  name: string | null;
843
859
  isResizing: boolean;
844
860
  isRotating: boolean;
845
- openMenu: "canvas" | "shape" | null;
846
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
861
+ openMenu: "canvas" | null;
862
+ openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
847
863
  openSidebar: {
848
- /** zoom content to cover X of the viewport, when fitToViewport=true */
849
864
  name: string;
850
865
  tab?: string | undefined;
851
866
  } | null;
@@ -925,7 +940,7 @@ export declare const zoomToFitBounds: ({ bounds, appState, canvasOffsets, fitToV
925
940
  shown: true;
926
941
  data: import("../charts").Spreadsheet;
927
942
  };
928
- showHyperlinkPopup: false | "editor" | "info";
943
+ showHyperlinkPopup: false | "info" | "editor";
929
944
  selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
930
945
  snapLines: readonly import("../snapping").SnapLine[];
931
946
  originSnapOffset: {
@@ -1004,6 +1019,10 @@ export declare const zoomToFit: ({ canvasOffsets, targetElements, appState, fitT
1004
1019
  locked: boolean;
1005
1020
  fromSelection: boolean;
1006
1021
  } & import("../types").ActiveTool;
1022
+ preferredSelectionTool: {
1023
+ type: "selection" | "lasso";
1024
+ initialized: boolean;
1025
+ };
1007
1026
  penMode: boolean;
1008
1027
  penDetected: boolean;
1009
1028
  exportBackground: boolean;
@@ -1031,10 +1050,9 @@ export declare const zoomToFit: ({ canvasOffsets, targetElements, appState, fitT
1031
1050
  name: string | null;
1032
1051
  isResizing: boolean;
1033
1052
  isRotating: boolean;
1034
- openMenu: "canvas" | "shape" | null;
1035
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
1053
+ openMenu: "canvas" | null;
1054
+ openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
1036
1055
  openSidebar: {
1037
- /** zoom content to cover X of the viewport, when fitToViewport=true */
1038
1056
  name: string;
1039
1057
  tab?: string | undefined;
1040
1058
  } | null;
@@ -1114,7 +1132,7 @@ export declare const zoomToFit: ({ canvasOffsets, targetElements, appState, fitT
1114
1132
  shown: true;
1115
1133
  data: import("../charts").Spreadsheet;
1116
1134
  };
1117
- showHyperlinkPopup: false | "editor" | "info";
1135
+ showHyperlinkPopup: false | "info" | "editor";
1118
1136
  selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
1119
1137
  snapLines: readonly import("../snapping").SnapLine[];
1120
1138
  originSnapOffset: {
@@ -1185,6 +1203,10 @@ export declare const actionZoomToFitSelectionInViewport: {
1185
1203
  locked: boolean;
1186
1204
  fromSelection: boolean;
1187
1205
  } & import("../types").ActiveTool;
1206
+ preferredSelectionTool: {
1207
+ type: "selection" | "lasso";
1208
+ initialized: boolean;
1209
+ };
1188
1210
  penMode: boolean;
1189
1211
  penDetected: boolean;
1190
1212
  exportBackground: boolean;
@@ -1212,10 +1234,9 @@ export declare const actionZoomToFitSelectionInViewport: {
1212
1234
  name: string | null;
1213
1235
  isResizing: boolean;
1214
1236
  isRotating: boolean;
1215
- openMenu: "canvas" | "shape" | null;
1216
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
1237
+ openMenu: "canvas" | null;
1238
+ openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
1217
1239
  openSidebar: {
1218
- /** zoom content to cover X of the viewport, when fitToViewport=true */
1219
1240
  name: string;
1220
1241
  tab?: string | undefined;
1221
1242
  } | null;
@@ -1295,7 +1316,7 @@ export declare const actionZoomToFitSelectionInViewport: {
1295
1316
  shown: true;
1296
1317
  data: import("../charts").Spreadsheet;
1297
1318
  };
1298
- showHyperlinkPopup: false | "editor" | "info";
1319
+ showHyperlinkPopup: false | "info" | "editor";
1299
1320
  selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
1300
1321
  snapLines: readonly import("../snapping").SnapLine[];
1301
1322
  originSnapOffset: {
@@ -1370,6 +1391,10 @@ export declare const actionZoomToFitSelection: {
1370
1391
  locked: boolean;
1371
1392
  fromSelection: boolean;
1372
1393
  } & import("../types").ActiveTool;
1394
+ preferredSelectionTool: {
1395
+ type: "selection" | "lasso";
1396
+ initialized: boolean;
1397
+ };
1373
1398
  penMode: boolean;
1374
1399
  penDetected: boolean;
1375
1400
  exportBackground: boolean;
@@ -1397,10 +1422,9 @@ export declare const actionZoomToFitSelection: {
1397
1422
  name: string | null;
1398
1423
  isResizing: boolean;
1399
1424
  isRotating: boolean;
1400
- openMenu: "canvas" | "shape" | null;
1401
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
1425
+ openMenu: "canvas" | null;
1426
+ openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
1402
1427
  openSidebar: {
1403
- /** zoom content to cover X of the viewport, when fitToViewport=true */
1404
1428
  name: string;
1405
1429
  tab?: string | undefined;
1406
1430
  } | null;
@@ -1480,7 +1504,7 @@ export declare const actionZoomToFitSelection: {
1480
1504
  shown: true;
1481
1505
  data: import("../charts").Spreadsheet;
1482
1506
  };
1483
- showHyperlinkPopup: false | "editor" | "info";
1507
+ showHyperlinkPopup: false | "info" | "editor";
1484
1508
  selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
1485
1509
  snapLines: readonly import("../snapping").SnapLine[];
1486
1510
  originSnapOffset: {
@@ -1556,6 +1580,10 @@ export declare const actionZoomToFit: {
1556
1580
  locked: boolean;
1557
1581
  fromSelection: boolean;
1558
1582
  } & import("../types").ActiveTool;
1583
+ preferredSelectionTool: {
1584
+ type: "selection" | "lasso";
1585
+ initialized: boolean;
1586
+ };
1559
1587
  penMode: boolean;
1560
1588
  penDetected: boolean;
1561
1589
  exportBackground: boolean;
@@ -1583,10 +1611,9 @@ export declare const actionZoomToFit: {
1583
1611
  name: string | null;
1584
1612
  isResizing: boolean;
1585
1613
  isRotating: boolean;
1586
- openMenu: "canvas" | "shape" | null;
1587
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
1614
+ openMenu: "canvas" | null;
1615
+ openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
1588
1616
  openSidebar: {
1589
- /** zoom content to cover X of the viewport, when fitToViewport=true */
1590
1617
  name: string;
1591
1618
  tab?: string | undefined;
1592
1619
  } | null;
@@ -1666,7 +1693,7 @@ export declare const actionZoomToFit: {
1666
1693
  shown: true;
1667
1694
  data: import("../charts").Spreadsheet;
1668
1695
  };
1669
- showHyperlinkPopup: false | "editor" | "info";
1696
+ showHyperlinkPopup: false | "info" | "editor";
1670
1697
  selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
1671
1698
  snapLines: readonly import("../snapping").SnapLine[];
1672
1699
  originSnapOffset: {
@@ -1739,6 +1766,10 @@ export declare const actionToggleTheme: {
1739
1766
  locked: boolean;
1740
1767
  fromSelection: boolean;
1741
1768
  } & import("../types").ActiveTool;
1769
+ preferredSelectionTool: {
1770
+ type: "selection" | "lasso";
1771
+ initialized: boolean;
1772
+ };
1742
1773
  penMode: boolean;
1743
1774
  penDetected: boolean;
1744
1775
  exportBackground: boolean;
@@ -1771,10 +1802,9 @@ export declare const actionToggleTheme: {
1771
1802
  zoom: Readonly<{
1772
1803
  value: import("../types").NormalizedZoomValue;
1773
1804
  }>;
1774
- openMenu: "canvas" | "shape" | null;
1775
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
1805
+ openMenu: "canvas" | null;
1806
+ openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
1776
1807
  openSidebar: {
1777
- /** zoom content to cover X of the viewport, when fitToViewport=true */
1778
1808
  name: string;
1779
1809
  tab?: string | undefined;
1780
1810
  } | null;
@@ -1853,7 +1883,7 @@ export declare const actionToggleTheme: {
1853
1883
  shown: true;
1854
1884
  data: import("../charts").Spreadsheet;
1855
1885
  };
1856
- showHyperlinkPopup: false | "editor" | "info";
1886
+ showHyperlinkPopup: false | "info" | "editor";
1857
1887
  selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
1858
1888
  snapLines: readonly import("../snapping").SnapLine[];
1859
1889
  originSnapOffset: {
@@ -1887,7 +1917,7 @@ export declare const actionToggleEraserTool: {
1887
1917
  trackEvent: {
1888
1918
  category: "toolbar";
1889
1919
  };
1890
- perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>) => {
1920
+ perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: any, app: import("../types").AppClassProperties) => {
1891
1921
  appState: {
1892
1922
  selectedElementIds: {};
1893
1923
  selectedGroupIds: {};
@@ -1922,6 +1952,10 @@ export declare const actionToggleEraserTool: {
1922
1952
  editingFrame: string | null;
1923
1953
  elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
1924
1954
  editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
1955
+ preferredSelectionTool: {
1956
+ type: "selection" | "lasso";
1957
+ initialized: boolean;
1958
+ };
1925
1959
  penMode: boolean;
1926
1960
  penDetected: boolean;
1927
1961
  exportBackground: boolean;
@@ -1954,10 +1988,9 @@ export declare const actionToggleEraserTool: {
1954
1988
  zoom: Readonly<{
1955
1989
  value: import("../types").NormalizedZoomValue;
1956
1990
  }>;
1957
- openMenu: "canvas" | "shape" | null;
1958
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
1991
+ openMenu: "canvas" | null;
1992
+ openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
1959
1993
  openSidebar: {
1960
- /** zoom content to cover X of the viewport, when fitToViewport=true */
1961
1994
  name: string;
1962
1995
  tab?: string | undefined;
1963
1996
  } | null;
@@ -2031,7 +2064,7 @@ export declare const actionToggleEraserTool: {
2031
2064
  shown: true;
2032
2065
  data: import("../charts").Spreadsheet;
2033
2066
  };
2034
- showHyperlinkPopup: false | "editor" | "info";
2067
+ showHyperlinkPopup: false | "info" | "editor";
2035
2068
  selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
2036
2069
  snapLines: readonly import("../snapping").SnapLine[];
2037
2070
  originSnapOffset: {
@@ -2065,6 +2098,7 @@ export declare const actionToggleLassoTool: {
2065
2098
  trackEvent: {
2066
2099
  category: "toolbar";
2067
2100
  };
2101
+ predicate: (elements: readonly ExcalidrawElement[], appState: AppState, props: import("../types").ExcalidrawProps, app: import("../types").AppClassProperties) => boolean;
2068
2102
  perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: any, app: import("../types").AppClassProperties) => {
2069
2103
  appState: {
2070
2104
  selectedElementIds: {};
@@ -2100,6 +2134,10 @@ export declare const actionToggleLassoTool: {
2100
2134
  editingFrame: string | null;
2101
2135
  elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
2102
2136
  editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
2137
+ preferredSelectionTool: {
2138
+ type: "selection" | "lasso";
2139
+ initialized: boolean;
2140
+ };
2103
2141
  penMode: boolean;
2104
2142
  penDetected: boolean;
2105
2143
  exportBackground: boolean;
@@ -2132,10 +2170,9 @@ export declare const actionToggleLassoTool: {
2132
2170
  zoom: Readonly<{
2133
2171
  value: import("../types").NormalizedZoomValue;
2134
2172
  }>;
2135
- openMenu: "canvas" | "shape" | null;
2136
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
2173
+ openMenu: "canvas" | null;
2174
+ openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
2137
2175
  openSidebar: {
2138
- /** zoom content to cover X of the viewport, when fitToViewport=true */
2139
2176
  name: string;
2140
2177
  tab?: string | undefined;
2141
2178
  } | null;
@@ -2209,7 +2246,7 @@ export declare const actionToggleLassoTool: {
2209
2246
  shown: true;
2210
2247
  data: import("../charts").Spreadsheet;
2211
2248
  };
2212
- showHyperlinkPopup: false | "editor" | "info";
2249
+ showHyperlinkPopup: false | "info" | "editor";
2213
2250
  selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
2214
2251
  snapLines: readonly import("../snapping").SnapLine[];
2215
2252
  originSnapOffset: {
@@ -2278,6 +2315,10 @@ export declare const actionToggleHandTool: {
2278
2315
  editingFrame: string | null;
2279
2316
  elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
2280
2317
  editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
2318
+ preferredSelectionTool: {
2319
+ type: "selection" | "lasso";
2320
+ initialized: boolean;
2321
+ };
2281
2322
  penMode: boolean;
2282
2323
  penDetected: boolean;
2283
2324
  exportBackground: boolean;
@@ -2310,10 +2351,9 @@ export declare const actionToggleHandTool: {
2310
2351
  zoom: Readonly<{
2311
2352
  value: import("../types").NormalizedZoomValue;
2312
2353
  }>;
2313
- openMenu: "canvas" | "shape" | null;
2314
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
2354
+ openMenu: "canvas" | null;
2355
+ openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
2315
2356
  openSidebar: {
2316
- /** zoom content to cover X of the viewport, when fitToViewport=true */
2317
2357
  name: string;
2318
2358
  tab?: string | undefined;
2319
2359
  } | null;
@@ -2387,7 +2427,7 @@ export declare const actionToggleHandTool: {
2387
2427
  shown: true;
2388
2428
  data: import("../charts").Spreadsheet;
2389
2429
  };
2390
- showHyperlinkPopup: false | "editor" | "info";
2430
+ showHyperlinkPopup: false | "info" | "editor";
2391
2431
  selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
2392
2432
  snapLines: readonly import("../snapping").SnapLine[];
2393
2433
  originSnapOffset: {