@excalidraw/common 0.18.0-7b8a5f54c → 0.18.0-7f66e1f

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/dist/dev/index.js +286 -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 +2 -0
  7. package/dist/types/common/src/utils.d.ts +2 -1
  8. package/dist/types/common/src/visualdebug.d.ts +41 -0
  9. package/dist/types/element/src/bounds.d.ts +1 -1
  10. package/dist/types/element/src/delta.d.ts +4 -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 +3 -2
  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 -41
  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 +8 -4
  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 +21 -4
  50. package/dist/types/excalidraw/components/App.d.ts +28 -24
  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/FilledButton.d.ts +1 -1
  57. package/dist/types/excalidraw/components/FontPicker/FontPicker.d.ts +2 -1
  58. package/dist/types/excalidraw/components/FontPicker/FontPickerTrigger.d.ts +3 -1
  59. package/dist/types/excalidraw/components/HintViewer.d.ts +4 -3
  60. package/dist/types/excalidraw/components/InlineIcon.d.ts +3 -1
  61. package/dist/types/excalidraw/components/LayerUI.d.ts +2 -1
  62. package/dist/types/excalidraw/components/LibraryMenuSection.d.ts +1 -1
  63. package/dist/types/excalidraw/components/MobileMenu.d.ts +3 -5
  64. package/dist/types/excalidraw/components/MobileToolBar.d.ts +11 -0
  65. package/dist/types/excalidraw/components/Popover.d.ts +2 -1
  66. package/dist/types/excalidraw/components/PropertiesPopover.d.ts +1 -0
  67. package/dist/types/excalidraw/components/TTDDialog/TTDDialogTrigger.d.ts +1 -2
  68. package/dist/types/excalidraw/components/TextField.d.ts +1 -0
  69. package/dist/types/excalidraw/components/ToolPopover.d.ts +25 -0
  70. package/dist/types/excalidraw/components/canvases/InteractiveCanvas.d.ts +6 -3
  71. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenu.d.ts +4 -2
  72. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuContent.d.ts +2 -1
  73. package/dist/types/excalidraw/components/icons.d.ts +10 -0
  74. package/dist/types/excalidraw/components/live-collaboration/LiveCollaborationTrigger.d.ts +13 -1
  75. package/dist/types/excalidraw/components/main-menu/MainMenu.d.ts +0 -3
  76. package/dist/types/excalidraw/components/shapes.d.ts +129 -1
  77. package/dist/types/excalidraw/data/blob.d.ts +3 -7
  78. package/dist/types/excalidraw/data/types.d.ts +4 -1
  79. package/dist/types/excalidraw/hooks/useLibraryItemSvg.d.ts +1 -1
  80. package/dist/types/excalidraw/hooks/useOutsideClick.d.ts +3 -1
  81. package/dist/types/excalidraw/hooks/useTextEditorFocus.d.ts +14 -0
  82. package/dist/types/excalidraw/index.d.ts +2 -3
  83. package/dist/types/excalidraw/renderer/animation.d.ts +12 -0
  84. package/dist/types/excalidraw/renderer/interactiveScene.d.ts +5 -13
  85. package/dist/types/excalidraw/scene/types.d.ts +11 -3
  86. package/dist/types/excalidraw/shortcut.d.ts +1 -0
  87. package/dist/types/excalidraw/types.d.ts +18 -15
  88. package/dist/types/math/src/segment.d.ts +1 -0
  89. 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,8 +161,8 @@ 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
167
  name: string;
164
168
  tab?: string | undefined;
@@ -180,7 +184,7 @@ export declare const actionClearCanvas: {
180
184
  } | null;
181
185
  fileHandle: import("browser-fs-access").FileSystemHandle | null;
182
186
  currentChartType: import("@excalidraw/element/types").ChartType;
183
- showHyperlinkPopup: false | "editor" | "info";
187
+ showHyperlinkPopup: false | "info" | "editor";
184
188
  originSnapOffset: {
185
189
  x: number;
186
190
  y: number;
@@ -247,6 +251,10 @@ export declare const actionZoomIn: {
247
251
  locked: boolean;
248
252
  fromSelection: boolean;
249
253
  } & import("../types").ActiveTool;
254
+ preferredSelectionTool: {
255
+ type: "selection" | "lasso";
256
+ initialized: boolean;
257
+ };
250
258
  penMode: boolean;
251
259
  penDetected: boolean;
252
260
  exportBackground: boolean;
@@ -274,8 +282,8 @@ export declare const actionZoomIn: {
274
282
  name: string | null;
275
283
  isResizing: boolean;
276
284
  isRotating: boolean;
277
- openMenu: "canvas" | "shape" | null;
278
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
285
+ openMenu: "canvas" | null;
286
+ openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
279
287
  openSidebar: {
280
288
  name: string;
281
289
  tab?: string | undefined;
@@ -356,7 +364,7 @@ export declare const actionZoomIn: {
356
364
  shown: true;
357
365
  data: import("../charts").Spreadsheet;
358
366
  };
359
- showHyperlinkPopup: false | "editor" | "info";
367
+ showHyperlinkPopup: false | "info" | "editor";
360
368
  selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
361
369
  snapLines: readonly import("../snapping").SnapLine[];
362
370
  originSnapOffset: {
@@ -433,6 +441,10 @@ export declare const actionZoomOut: {
433
441
  locked: boolean;
434
442
  fromSelection: boolean;
435
443
  } & import("../types").ActiveTool;
444
+ preferredSelectionTool: {
445
+ type: "selection" | "lasso";
446
+ initialized: boolean;
447
+ };
436
448
  penMode: boolean;
437
449
  penDetected: boolean;
438
450
  exportBackground: boolean;
@@ -460,8 +472,8 @@ export declare const actionZoomOut: {
460
472
  name: string | null;
461
473
  isResizing: boolean;
462
474
  isRotating: boolean;
463
- openMenu: "canvas" | "shape" | null;
464
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
475
+ openMenu: "canvas" | null;
476
+ openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
465
477
  openSidebar: {
466
478
  name: string;
467
479
  tab?: string | undefined;
@@ -542,7 +554,7 @@ export declare const actionZoomOut: {
542
554
  shown: true;
543
555
  data: import("../charts").Spreadsheet;
544
556
  };
545
- showHyperlinkPopup: false | "editor" | "info";
557
+ showHyperlinkPopup: false | "info" | "editor";
546
558
  selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
547
559
  snapLines: readonly import("../snapping").SnapLine[];
548
560
  originSnapOffset: {
@@ -619,6 +631,10 @@ export declare const actionResetZoom: {
619
631
  locked: boolean;
620
632
  fromSelection: boolean;
621
633
  } & import("../types").ActiveTool;
634
+ preferredSelectionTool: {
635
+ type: "selection" | "lasso";
636
+ initialized: boolean;
637
+ };
622
638
  penMode: boolean;
623
639
  penDetected: boolean;
624
640
  exportBackground: boolean;
@@ -646,8 +662,8 @@ export declare const actionResetZoom: {
646
662
  name: string | null;
647
663
  isResizing: boolean;
648
664
  isRotating: boolean;
649
- openMenu: "canvas" | "shape" | null;
650
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
665
+ openMenu: "canvas" | null;
666
+ openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
651
667
  openSidebar: {
652
668
  name: string;
653
669
  tab?: string | undefined;
@@ -728,7 +744,7 @@ export declare const actionResetZoom: {
728
744
  shown: true;
729
745
  data: import("../charts").Spreadsheet;
730
746
  };
731
- showHyperlinkPopup: false | "editor" | "info";
747
+ showHyperlinkPopup: false | "info" | "editor";
732
748
  selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
733
749
  snapLines: readonly import("../snapping").SnapLine[];
734
750
  originSnapOffset: {
@@ -811,6 +827,10 @@ export declare const zoomToFitBounds: ({ bounds, appState, canvasOffsets, fitToV
811
827
  locked: boolean;
812
828
  fromSelection: boolean;
813
829
  } & import("../types").ActiveTool;
830
+ preferredSelectionTool: {
831
+ type: "selection" | "lasso";
832
+ initialized: boolean;
833
+ };
814
834
  penMode: boolean;
815
835
  penDetected: boolean;
816
836
  exportBackground: boolean;
@@ -838,8 +858,8 @@ export declare const zoomToFitBounds: ({ bounds, appState, canvasOffsets, fitToV
838
858
  name: string | null;
839
859
  isResizing: boolean;
840
860
  isRotating: boolean;
841
- openMenu: "canvas" | "shape" | null;
842
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
861
+ openMenu: "canvas" | null;
862
+ openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
843
863
  openSidebar: {
844
864
  name: string;
845
865
  tab?: string | undefined;
@@ -920,7 +940,7 @@ export declare const zoomToFitBounds: ({ bounds, appState, canvasOffsets, fitToV
920
940
  shown: true;
921
941
  data: import("../charts").Spreadsheet;
922
942
  };
923
- showHyperlinkPopup: false | "editor" | "info";
943
+ showHyperlinkPopup: false | "info" | "editor";
924
944
  selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
925
945
  snapLines: readonly import("../snapping").SnapLine[];
926
946
  originSnapOffset: {
@@ -999,6 +1019,10 @@ export declare const zoomToFit: ({ canvasOffsets, targetElements, appState, fitT
999
1019
  locked: boolean;
1000
1020
  fromSelection: boolean;
1001
1021
  } & import("../types").ActiveTool;
1022
+ preferredSelectionTool: {
1023
+ type: "selection" | "lasso";
1024
+ initialized: boolean;
1025
+ };
1002
1026
  penMode: boolean;
1003
1027
  penDetected: boolean;
1004
1028
  exportBackground: boolean;
@@ -1026,8 +1050,8 @@ export declare const zoomToFit: ({ canvasOffsets, targetElements, appState, fitT
1026
1050
  name: string | null;
1027
1051
  isResizing: boolean;
1028
1052
  isRotating: boolean;
1029
- openMenu: "canvas" | "shape" | null;
1030
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
1053
+ openMenu: "canvas" | null;
1054
+ openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
1031
1055
  openSidebar: {
1032
1056
  name: string;
1033
1057
  tab?: string | undefined;
@@ -1108,7 +1132,7 @@ export declare const zoomToFit: ({ canvasOffsets, targetElements, appState, fitT
1108
1132
  shown: true;
1109
1133
  data: import("../charts").Spreadsheet;
1110
1134
  };
1111
- showHyperlinkPopup: false | "editor" | "info";
1135
+ showHyperlinkPopup: false | "info" | "editor";
1112
1136
  selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
1113
1137
  snapLines: readonly import("../snapping").SnapLine[];
1114
1138
  originSnapOffset: {
@@ -1179,6 +1203,10 @@ export declare const actionZoomToFitSelectionInViewport: {
1179
1203
  locked: boolean;
1180
1204
  fromSelection: boolean;
1181
1205
  } & import("../types").ActiveTool;
1206
+ preferredSelectionTool: {
1207
+ type: "selection" | "lasso";
1208
+ initialized: boolean;
1209
+ };
1182
1210
  penMode: boolean;
1183
1211
  penDetected: boolean;
1184
1212
  exportBackground: boolean;
@@ -1206,8 +1234,8 @@ export declare const actionZoomToFitSelectionInViewport: {
1206
1234
  name: string | null;
1207
1235
  isResizing: boolean;
1208
1236
  isRotating: boolean;
1209
- openMenu: "canvas" | "shape" | null;
1210
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
1237
+ openMenu: "canvas" | null;
1238
+ openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
1211
1239
  openSidebar: {
1212
1240
  name: string;
1213
1241
  tab?: string | undefined;
@@ -1288,7 +1316,7 @@ export declare const actionZoomToFitSelectionInViewport: {
1288
1316
  shown: true;
1289
1317
  data: import("../charts").Spreadsheet;
1290
1318
  };
1291
- showHyperlinkPopup: false | "editor" | "info";
1319
+ showHyperlinkPopup: false | "info" | "editor";
1292
1320
  selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
1293
1321
  snapLines: readonly import("../snapping").SnapLine[];
1294
1322
  originSnapOffset: {
@@ -1363,6 +1391,10 @@ export declare const actionZoomToFitSelection: {
1363
1391
  locked: boolean;
1364
1392
  fromSelection: boolean;
1365
1393
  } & import("../types").ActiveTool;
1394
+ preferredSelectionTool: {
1395
+ type: "selection" | "lasso";
1396
+ initialized: boolean;
1397
+ };
1366
1398
  penMode: boolean;
1367
1399
  penDetected: boolean;
1368
1400
  exportBackground: boolean;
@@ -1390,8 +1422,8 @@ export declare const actionZoomToFitSelection: {
1390
1422
  name: string | null;
1391
1423
  isResizing: boolean;
1392
1424
  isRotating: boolean;
1393
- openMenu: "canvas" | "shape" | null;
1394
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
1425
+ openMenu: "canvas" | null;
1426
+ openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
1395
1427
  openSidebar: {
1396
1428
  name: string;
1397
1429
  tab?: string | undefined;
@@ -1472,7 +1504,7 @@ export declare const actionZoomToFitSelection: {
1472
1504
  shown: true;
1473
1505
  data: import("../charts").Spreadsheet;
1474
1506
  };
1475
- showHyperlinkPopup: false | "editor" | "info";
1507
+ showHyperlinkPopup: false | "info" | "editor";
1476
1508
  selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
1477
1509
  snapLines: readonly import("../snapping").SnapLine[];
1478
1510
  originSnapOffset: {
@@ -1548,6 +1580,10 @@ export declare const actionZoomToFit: {
1548
1580
  locked: boolean;
1549
1581
  fromSelection: boolean;
1550
1582
  } & import("../types").ActiveTool;
1583
+ preferredSelectionTool: {
1584
+ type: "selection" | "lasso";
1585
+ initialized: boolean;
1586
+ };
1551
1587
  penMode: boolean;
1552
1588
  penDetected: boolean;
1553
1589
  exportBackground: boolean;
@@ -1575,8 +1611,8 @@ export declare const actionZoomToFit: {
1575
1611
  name: string | null;
1576
1612
  isResizing: boolean;
1577
1613
  isRotating: boolean;
1578
- openMenu: "canvas" | "shape" | null;
1579
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
1614
+ openMenu: "canvas" | null;
1615
+ openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
1580
1616
  openSidebar: {
1581
1617
  name: string;
1582
1618
  tab?: string | undefined;
@@ -1657,7 +1693,7 @@ export declare const actionZoomToFit: {
1657
1693
  shown: true;
1658
1694
  data: import("../charts").Spreadsheet;
1659
1695
  };
1660
- showHyperlinkPopup: false | "editor" | "info";
1696
+ showHyperlinkPopup: false | "info" | "editor";
1661
1697
  selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
1662
1698
  snapLines: readonly import("../snapping").SnapLine[];
1663
1699
  originSnapOffset: {
@@ -1730,6 +1766,10 @@ export declare const actionToggleTheme: {
1730
1766
  locked: boolean;
1731
1767
  fromSelection: boolean;
1732
1768
  } & import("../types").ActiveTool;
1769
+ preferredSelectionTool: {
1770
+ type: "selection" | "lasso";
1771
+ initialized: boolean;
1772
+ };
1733
1773
  penMode: boolean;
1734
1774
  penDetected: boolean;
1735
1775
  exportBackground: boolean;
@@ -1762,8 +1802,8 @@ export declare const actionToggleTheme: {
1762
1802
  zoom: Readonly<{
1763
1803
  value: import("../types").NormalizedZoomValue;
1764
1804
  }>;
1765
- openMenu: "canvas" | "shape" | null;
1766
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
1805
+ openMenu: "canvas" | null;
1806
+ openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
1767
1807
  openSidebar: {
1768
1808
  name: string;
1769
1809
  tab?: string | undefined;
@@ -1843,7 +1883,7 @@ export declare const actionToggleTheme: {
1843
1883
  shown: true;
1844
1884
  data: import("../charts").Spreadsheet;
1845
1885
  };
1846
- showHyperlinkPopup: false | "editor" | "info";
1886
+ showHyperlinkPopup: false | "info" | "editor";
1847
1887
  selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
1848
1888
  snapLines: readonly import("../snapping").SnapLine[];
1849
1889
  originSnapOffset: {
@@ -1877,7 +1917,7 @@ export declare const actionToggleEraserTool: {
1877
1917
  trackEvent: {
1878
1918
  category: "toolbar";
1879
1919
  };
1880
- 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) => {
1881
1921
  appState: {
1882
1922
  selectedElementIds: {};
1883
1923
  selectedGroupIds: {};
@@ -1912,6 +1952,10 @@ export declare const actionToggleEraserTool: {
1912
1952
  editingFrame: string | null;
1913
1953
  elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
1914
1954
  editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
1955
+ preferredSelectionTool: {
1956
+ type: "selection" | "lasso";
1957
+ initialized: boolean;
1958
+ };
1915
1959
  penMode: boolean;
1916
1960
  penDetected: boolean;
1917
1961
  exportBackground: boolean;
@@ -1944,8 +1988,8 @@ export declare const actionToggleEraserTool: {
1944
1988
  zoom: Readonly<{
1945
1989
  value: import("../types").NormalizedZoomValue;
1946
1990
  }>;
1947
- openMenu: "canvas" | "shape" | null;
1948
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
1991
+ openMenu: "canvas" | null;
1992
+ openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
1949
1993
  openSidebar: {
1950
1994
  name: string;
1951
1995
  tab?: string | undefined;
@@ -2020,7 +2064,7 @@ export declare const actionToggleEraserTool: {
2020
2064
  shown: true;
2021
2065
  data: import("../charts").Spreadsheet;
2022
2066
  };
2023
- showHyperlinkPopup: false | "editor" | "info";
2067
+ showHyperlinkPopup: false | "info" | "editor";
2024
2068
  selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
2025
2069
  snapLines: readonly import("../snapping").SnapLine[];
2026
2070
  originSnapOffset: {
@@ -2054,6 +2098,7 @@ export declare const actionToggleLassoTool: {
2054
2098
  trackEvent: {
2055
2099
  category: "toolbar";
2056
2100
  };
2101
+ predicate: (elements: readonly ExcalidrawElement[], appState: AppState, props: import("../types").ExcalidrawProps, app: import("../types").AppClassProperties) => boolean;
2057
2102
  perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: any, app: import("../types").AppClassProperties) => {
2058
2103
  appState: {
2059
2104
  selectedElementIds: {};
@@ -2089,6 +2134,10 @@ export declare const actionToggleLassoTool: {
2089
2134
  editingFrame: string | null;
2090
2135
  elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
2091
2136
  editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
2137
+ preferredSelectionTool: {
2138
+ type: "selection" | "lasso";
2139
+ initialized: boolean;
2140
+ };
2092
2141
  penMode: boolean;
2093
2142
  penDetected: boolean;
2094
2143
  exportBackground: boolean;
@@ -2121,8 +2170,8 @@ export declare const actionToggleLassoTool: {
2121
2170
  zoom: Readonly<{
2122
2171
  value: import("../types").NormalizedZoomValue;
2123
2172
  }>;
2124
- openMenu: "canvas" | "shape" | null;
2125
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
2173
+ openMenu: "canvas" | null;
2174
+ openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
2126
2175
  openSidebar: {
2127
2176
  name: string;
2128
2177
  tab?: string | undefined;
@@ -2197,7 +2246,7 @@ export declare const actionToggleLassoTool: {
2197
2246
  shown: true;
2198
2247
  data: import("../charts").Spreadsheet;
2199
2248
  };
2200
- showHyperlinkPopup: false | "editor" | "info";
2249
+ showHyperlinkPopup: false | "info" | "editor";
2201
2250
  selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
2202
2251
  snapLines: readonly import("../snapping").SnapLine[];
2203
2252
  originSnapOffset: {
@@ -2266,6 +2315,10 @@ export declare const actionToggleHandTool: {
2266
2315
  editingFrame: string | null;
2267
2316
  elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
2268
2317
  editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
2318
+ preferredSelectionTool: {
2319
+ type: "selection" | "lasso";
2320
+ initialized: boolean;
2321
+ };
2269
2322
  penMode: boolean;
2270
2323
  penDetected: boolean;
2271
2324
  exportBackground: boolean;
@@ -2298,8 +2351,8 @@ export declare const actionToggleHandTool: {
2298
2351
  zoom: Readonly<{
2299
2352
  value: import("../types").NormalizedZoomValue;
2300
2353
  }>;
2301
- openMenu: "canvas" | "shape" | null;
2302
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
2354
+ openMenu: "canvas" | null;
2355
+ openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
2303
2356
  openSidebar: {
2304
2357
  name: string;
2305
2358
  tab?: string | undefined;
@@ -2374,7 +2427,7 @@ export declare const actionToggleHandTool: {
2374
2427
  shown: true;
2375
2428
  data: import("../charts").Spreadsheet;
2376
2429
  };
2377
- showHyperlinkPopup: false | "editor" | "info";
2430
+ showHyperlinkPopup: false | "info" | "editor";
2378
2431
  selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
2379
2432
  snapLines: readonly import("../snapping").SnapLine[];
2380
2433
  originSnapOffset: {