@excalidraw/common 0.18.0-063e025 → 0.18.0-1acf66e

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 (94) hide show
  1. package/dist/dev/index.js +9 -5
  2. package/dist/dev/index.js.map +2 -2
  3. package/dist/prod/index.js +3 -3
  4. package/dist/types/common/src/constants.d.ts +2 -0
  5. package/dist/types/common/src/points.d.ts +1 -1
  6. package/dist/types/common/src/utils.d.ts +1 -1
  7. package/dist/types/element/src/arrowEndpointText.d.ts +49 -0
  8. package/dist/types/element/src/arrows/focus.d.ts +5 -2
  9. package/dist/types/element/src/binding.d.ts +12 -3
  10. package/dist/types/element/src/comparisons.d.ts +4 -4
  11. package/dist/types/element/src/convertToShape.d.ts +23 -0
  12. package/dist/types/element/src/dragElements.d.ts +27 -0
  13. package/dist/types/element/src/flowchart.d.ts +6 -6
  14. package/dist/types/element/src/groups.d.ts +1 -1
  15. package/dist/types/element/src/index.d.ts +2 -0
  16. package/dist/types/element/src/linearElementEditor.d.ts +7 -0
  17. package/dist/types/element/src/newElement.d.ts +13 -0
  18. package/dist/types/element/src/selection.d.ts +1 -1
  19. package/dist/types/element/src/textElement.d.ts +6 -3
  20. package/dist/types/excalidraw/actions/actionAddToLibrary.d.ts +15 -3
  21. package/dist/types/excalidraw/actions/actionBoundText.d.ts +10 -2
  22. package/dist/types/excalidraw/actions/actionCanvas.d.ts +99 -565
  23. package/dist/types/excalidraw/actions/actionClipboard.d.ts +10 -2
  24. package/dist/types/excalidraw/actions/actionCropEditor.d.ts +5 -1
  25. package/dist/types/excalidraw/actions/actionDeleteSelected.d.ts +16 -3
  26. package/dist/types/excalidraw/actions/actionDeselect.d.ts +2 -1
  27. package/dist/types/excalidraw/actions/actionElementLink.d.ts +5 -1
  28. package/dist/types/excalidraw/actions/actionElementLock.d.ts +10 -2
  29. package/dist/types/excalidraw/actions/actionExport.d.ts +15 -7
  30. package/dist/types/excalidraw/actions/actionFrame.d.ts +15 -178
  31. package/dist/types/excalidraw/actions/actionGroup.d.ts +10 -2
  32. package/dist/types/excalidraw/actions/actionLinearEditor.d.ts +6 -1
  33. package/dist/types/excalidraw/actions/actionLink.d.ts +5 -1
  34. package/dist/types/excalidraw/actions/actionMenu.d.ts +5 -1
  35. package/dist/types/excalidraw/actions/actionProperties.d.ts +10 -2
  36. package/dist/types/excalidraw/actions/actionSelectAll.d.ts +5 -1
  37. package/dist/types/excalidraw/actions/actionStyles.d.ts +5 -1
  38. package/dist/types/excalidraw/actions/actionTextAutoResize.d.ts +1 -1
  39. package/dist/types/excalidraw/actions/actionToggleArrowBinding.d.ts +5 -1
  40. package/dist/types/excalidraw/actions/actionToggleGridMode.d.ts +5 -1
  41. package/dist/types/excalidraw/actions/actionToggleMidpointSnapping.d.ts +5 -1
  42. package/dist/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +5 -1
  43. package/dist/types/excalidraw/actions/actionToggleSearchMenu.d.ts +5 -1
  44. package/dist/types/excalidraw/actions/actionToggleStats.d.ts +5 -1
  45. package/dist/types/excalidraw/actions/actionToggleViewMode.d.ts +6 -2
  46. package/dist/types/excalidraw/actions/actionToggleZenMode.d.ts +5 -1
  47. package/dist/types/excalidraw/actions/index.d.ts +0 -1
  48. package/dist/types/excalidraw/actions/manager.d.ts +1 -0
  49. package/dist/types/excalidraw/actions/shortcuts.d.ts +1 -1
  50. package/dist/types/excalidraw/actions/types.d.ts +5 -1
  51. package/dist/types/excalidraw/appState.d.ts +5 -5
  52. package/dist/types/excalidraw/components/Actions.d.ts +16 -10
  53. package/dist/types/excalidraw/components/App.arrowText.d.ts +72 -0
  54. package/dist/types/excalidraw/components/App.cursor.d.ts +31 -0
  55. package/dist/types/excalidraw/components/App.d.ts +322 -76
  56. package/dist/types/excalidraw/components/App.drawshape.d.ts +55 -0
  57. package/dist/types/excalidraw/components/App.flowchart.d.ts +21 -0
  58. package/dist/types/excalidraw/components/App.viewport.d.ts +73 -0
  59. package/dist/types/excalidraw/components/{ToolButton.d.ts → IconButton.d.ts} +16 -19
  60. package/dist/types/excalidraw/components/LaserPointerButton.d.ts +2 -4
  61. package/dist/types/excalidraw/components/LayerUI.d.ts +4 -2
  62. package/dist/types/excalidraw/components/LockButton.d.ts +3 -4
  63. package/dist/types/excalidraw/components/MagicButton.d.ts +0 -2
  64. package/dist/types/excalidraw/components/MobileMenu.d.ts +4 -4
  65. package/dist/types/excalidraw/components/MobileToolbar.d.ts +9 -0
  66. package/dist/types/excalidraw/components/PenModeButton.d.ts +2 -5
  67. package/dist/types/excalidraw/components/Popover.d.ts +1 -3
  68. package/dist/types/excalidraw/components/{ButtonIcon.d.ts → RadioButton.d.ts} +2 -5
  69. package/dist/types/excalidraw/components/ToolPopover.d.ts +3 -6
  70. package/dist/types/excalidraw/components/Toolbar.d.ts +11 -0
  71. package/dist/types/excalidraw/components/Tools.d.ts +145 -0
  72. package/dist/types/excalidraw/components/canvases/InteractiveCanvas.d.ts +2 -0
  73. package/dist/types/excalidraw/components/footer/Footer.d.ts +3 -1
  74. package/dist/types/excalidraw/components/icons.d.ts +1 -1
  75. package/dist/types/excalidraw/components/main-menu/DefaultItems.d.ts +1 -1
  76. package/dist/types/excalidraw/components/positionElementBesideCursor.d.ts +26 -0
  77. package/dist/types/excalidraw/components/shapeActionPredicates.d.ts +39 -0
  78. package/dist/types/excalidraw/data/blob.d.ts +20 -12
  79. package/dist/types/excalidraw/data/json.d.ts +10 -6
  80. package/dist/types/excalidraw/drawShapeTrail.d.ts +16 -0
  81. package/dist/types/excalidraw/scene/types.d.ts +3 -0
  82. package/dist/types/excalidraw/types.d.ts +199 -13
  83. package/dist/types/excalidraw/viewport.d.ts +20 -64
  84. package/dist/types/laser-pointer/src/state.d.ts +1 -0
  85. package/dist/types/math/src/index.d.ts +1 -0
  86. package/dist/types/math/src/pca.d.ts +79 -0
  87. package/dist/types/math/src/polygon.d.ts +25 -1
  88. package/package.json +1 -1
  89. package/dist/types/excalidraw/actions/actionEmbeddable.d.ts +0 -173
  90. package/dist/types/excalidraw/components/HandButton.d.ts +0 -10
  91. package/dist/types/excalidraw/components/MobileToolBar.d.ts +0 -10
  92. package/dist/types/excalidraw/components/shapes.d.ts +0 -270
  93. package/dist/types/excalidraw/cursor.d.ts +0 -5
  94. package/dist/types/excalidraw/scene/zoom.d.ts +0 -12
@@ -1,7 +1,6 @@
1
- import type { ExcalidrawElement } from "@excalidraw/element/types";
2
1
  import type { AppState } from "../types";
3
2
  export declare const actionChangeViewBackgroundColor: import("./types").Action<Partial<AppState>> & {
4
- keyTest?: ((event: React.KeyboardEvent | KeyboardEvent, appState: AppState, elements: readonly ExcalidrawElement[], app: import("../types").AppClassProperties) => boolean) | undefined;
3
+ keyTest?: ((event: React.KeyboardEvent | KeyboardEvent, appState: AppState, elements: readonly import("@excalidraw/element/types").ExcalidrawElement[], app: import("../types").AppClassProperties) => boolean) | undefined;
5
4
  };
6
5
  export declare const actionClearCanvas: {
7
6
  name: "clearCanvas";
@@ -10,7 +9,7 @@ export declare const actionClearCanvas: {
10
9
  trackEvent: {
11
10
  category: "canvas";
12
11
  };
13
- predicate: (elements: readonly ExcalidrawElement[], appState: AppState, props: import("../types").ExcalidrawProps, app: import("../types").AppClassProperties) => boolean;
12
+ predicate: (elements: readonly import("@excalidraw/element/types").ExcalidrawElement[], appState: AppState, props: import("../types").ExcalidrawProps, app: import("../types").AppClassProperties) => boolean;
14
13
  perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: unknown, app: import("../types").AppClassProperties) => {
15
14
  elements: import("@excalidraw/element/types").OrderedExcalidrawElement[];
16
15
  appState: {
@@ -61,6 +60,10 @@ export declare const actionClearCanvas: {
61
60
  element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
62
61
  midPoint?: import("@excalidraw/math").GlobalPoint;
63
62
  } | null;
63
+ hoveredArrowTextAnchor: {
64
+ elementId: import("@excalidraw/element/types").ExcalidrawArrowElement["id"];
65
+ anchor: "start" | "end" | "label";
66
+ } | null;
64
67
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
65
68
  frameRendering: {
66
69
  enabled: boolean;
@@ -68,7 +71,7 @@ export declare const actionClearCanvas: {
68
71
  outline: boolean;
69
72
  clip: boolean;
70
73
  };
71
- editingFrame: string | null;
74
+ editingFrame: import("@excalidraw/element/types").ExcalidrawFrameLikeElement["id"] | null;
72
75
  elementsToHighlight: readonly import("@excalidraw/element/types").NonDeletedExcalidrawElement[] | null;
73
76
  editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
74
77
  preferredSelectionTool: {
@@ -79,9 +82,9 @@ export declare const actionClearCanvas: {
79
82
  exportScale: number;
80
83
  currentItemStrokeColor: string;
81
84
  currentItemBackgroundColor: string;
82
- currentItemFillStyle: ExcalidrawElement["fillStyle"];
85
+ currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
83
86
  currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
84
- currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
87
+ currentItemStrokeStyle: import("@excalidraw/element/types").ExcalidrawElement["strokeStyle"];
85
88
  currentItemRoughness: number;
86
89
  currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
87
90
  currentItemOpacity: number;
@@ -118,7 +121,7 @@ export declare const actionClearCanvas: {
118
121
  name: "settings";
119
122
  } | {
120
123
  name: "elementLinkSelector";
121
- sourceElementId: ExcalidrawElement["id"];
124
+ sourceElementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
122
125
  } | {
123
126
  name: "charts";
124
127
  data: import("../charts").Spreadsheet;
@@ -158,9 +161,9 @@ export declare const actionClearCanvas: {
158
161
  userToFollow: import("../types").UserToFollow | null;
159
162
  followedBy: Set<import("../types").SocketId>;
160
163
  isCropping: boolean;
161
- croppingElementId: ExcalidrawElement["id"] | null;
164
+ croppingElementId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
162
165
  searchMatches: Readonly<{
163
- focusedId: ExcalidrawElement["id"] | null;
166
+ focusedId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
164
167
  matches: readonly import("../types").SearchMatch[];
165
168
  }> | null;
166
169
  activeLockedId: string | null;
@@ -178,16 +181,18 @@ export declare const actionZoomIn: {
178
181
  name: "zoomIn";
179
182
  label: string;
180
183
  viewMode: true;
184
+ navigation: true;
181
185
  icon: import("react/jsx-runtime").JSX.Element;
182
186
  trackEvent: {
183
187
  category: "canvas";
184
188
  };
189
+ predicate: (elements: readonly import("@excalidraw/element/types").ExcalidrawElement[], appState: AppState, appProps: import("../types").ExcalidrawProps, app: import("../types").AppClassProperties) => boolean;
185
190
  perform: (_elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: unknown, app: import("../types").AppClassProperties) => {
186
191
  appState: {
192
+ userToFollow: null;
187
193
  scrollX: number;
188
194
  scrollY: number;
189
195
  zoom: import("../types").Zoom;
190
- userToFollow: null;
191
196
  contextMenu: {
192
197
  items: import("../components/ContextMenu").ContextMenuItems;
193
198
  top: number;
@@ -212,6 +217,10 @@ export declare const actionZoomIn: {
212
217
  element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
213
218
  midPoint?: import("@excalidraw/math").GlobalPoint;
214
219
  } | null;
220
+ hoveredArrowTextAnchor: {
221
+ elementId: import("@excalidraw/element/types").ExcalidrawArrowElement["id"];
222
+ anchor: "start" | "end" | "label";
223
+ } | null;
215
224
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
216
225
  frameRendering: {
217
226
  enabled: boolean;
@@ -219,7 +228,7 @@ export declare const actionZoomIn: {
219
228
  outline: boolean;
220
229
  clip: boolean;
221
230
  };
222
- editingFrame: string | null;
231
+ editingFrame: import("@excalidraw/element/types").ExcalidrawFrameLikeElement["id"] | null;
223
232
  elementsToHighlight: readonly import("@excalidraw/element/types").NonDeletedExcalidrawElement[] | null;
224
233
  editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
225
234
  activeTool: {
@@ -239,9 +248,9 @@ export declare const actionZoomIn: {
239
248
  exportScale: number;
240
249
  currentItemStrokeColor: string;
241
250
  currentItemBackgroundColor: string;
242
- currentItemFillStyle: ExcalidrawElement["fillStyle"];
251
+ currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
243
252
  currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
244
- currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
253
+ currentItemStrokeStyle: import("@excalidraw/element/types").ExcalidrawElement["strokeStyle"];
245
254
  currentItemRoughness: number;
246
255
  currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
247
256
  currentItemOpacity: number;
@@ -277,7 +286,7 @@ export declare const actionZoomIn: {
277
286
  name: "settings";
278
287
  } | {
279
288
  name: "elementLinkSelector";
280
- sourceElementId: ExcalidrawElement["id"];
289
+ sourceElementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
281
290
  } | {
282
291
  name: "charts";
283
292
  data: import("../charts").Spreadsheet;
@@ -331,9 +340,9 @@ export declare const actionZoomIn: {
331
340
  objectsSnapModeEnabled: boolean;
332
341
  followedBy: Set<import("../types").SocketId>;
333
342
  isCropping: boolean;
334
- croppingElementId: ExcalidrawElement["id"] | null;
343
+ croppingElementId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
335
344
  searchMatches: Readonly<{
336
- focusedId: ExcalidrawElement["id"] | null;
345
+ focusedId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
337
346
  matches: readonly import("../types").SearchMatch[];
338
347
  }> | null;
339
348
  activeLockedId: string | null;
@@ -354,15 +363,17 @@ export declare const actionZoomOut: {
354
363
  label: string;
355
364
  icon: import("react/jsx-runtime").JSX.Element;
356
365
  viewMode: true;
366
+ navigation: true;
357
367
  trackEvent: {
358
368
  category: "canvas";
359
369
  };
370
+ predicate: (elements: readonly import("@excalidraw/element/types").ExcalidrawElement[], appState: AppState, appProps: import("../types").ExcalidrawProps, app: import("../types").AppClassProperties) => boolean;
360
371
  perform: (_elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: unknown, app: import("../types").AppClassProperties) => {
361
372
  appState: {
373
+ userToFollow: null;
362
374
  scrollX: number;
363
375
  scrollY: number;
364
376
  zoom: import("../types").Zoom;
365
- userToFollow: null;
366
377
  contextMenu: {
367
378
  items: import("../components/ContextMenu").ContextMenuItems;
368
379
  top: number;
@@ -387,6 +398,10 @@ export declare const actionZoomOut: {
387
398
  element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
388
399
  midPoint?: import("@excalidraw/math").GlobalPoint;
389
400
  } | null;
401
+ hoveredArrowTextAnchor: {
402
+ elementId: import("@excalidraw/element/types").ExcalidrawArrowElement["id"];
403
+ anchor: "start" | "end" | "label";
404
+ } | null;
390
405
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
391
406
  frameRendering: {
392
407
  enabled: boolean;
@@ -394,7 +409,7 @@ export declare const actionZoomOut: {
394
409
  outline: boolean;
395
410
  clip: boolean;
396
411
  };
397
- editingFrame: string | null;
412
+ editingFrame: import("@excalidraw/element/types").ExcalidrawFrameLikeElement["id"] | null;
398
413
  elementsToHighlight: readonly import("@excalidraw/element/types").NonDeletedExcalidrawElement[] | null;
399
414
  editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
400
415
  activeTool: {
@@ -414,9 +429,9 @@ export declare const actionZoomOut: {
414
429
  exportScale: number;
415
430
  currentItemStrokeColor: string;
416
431
  currentItemBackgroundColor: string;
417
- currentItemFillStyle: ExcalidrawElement["fillStyle"];
432
+ currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
418
433
  currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
419
- currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
434
+ currentItemStrokeStyle: import("@excalidraw/element/types").ExcalidrawElement["strokeStyle"];
420
435
  currentItemRoughness: number;
421
436
  currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
422
437
  currentItemOpacity: number;
@@ -452,7 +467,7 @@ export declare const actionZoomOut: {
452
467
  name: "settings";
453
468
  } | {
454
469
  name: "elementLinkSelector";
455
- sourceElementId: ExcalidrawElement["id"];
470
+ sourceElementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
456
471
  } | {
457
472
  name: "charts";
458
473
  data: import("../charts").Spreadsheet;
@@ -506,9 +521,9 @@ export declare const actionZoomOut: {
506
521
  objectsSnapModeEnabled: boolean;
507
522
  followedBy: Set<import("../types").SocketId>;
508
523
  isCropping: boolean;
509
- croppingElementId: ExcalidrawElement["id"] | null;
524
+ croppingElementId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
510
525
  searchMatches: Readonly<{
511
- focusedId: ExcalidrawElement["id"] | null;
526
+ focusedId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
512
527
  matches: readonly import("../types").SearchMatch[];
513
528
  }> | null;
514
529
  activeLockedId: string | null;
@@ -529,15 +544,17 @@ export declare const actionResetZoom: {
529
544
  label: string;
530
545
  icon: import("react/jsx-runtime").JSX.Element;
531
546
  viewMode: true;
547
+ navigation: true;
532
548
  trackEvent: {
533
549
  category: "canvas";
534
550
  };
551
+ predicate: (elements: readonly import("@excalidraw/element/types").ExcalidrawElement[], appState: AppState, appProps: import("../types").ExcalidrawProps, app: import("../types").AppClassProperties) => boolean;
535
552
  perform: (_elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: unknown, app: import("../types").AppClassProperties) => {
536
553
  appState: {
554
+ userToFollow: null;
537
555
  scrollX: number;
538
556
  scrollY: number;
539
557
  zoom: import("../types").Zoom;
540
- userToFollow: null;
541
558
  contextMenu: {
542
559
  items: import("../components/ContextMenu").ContextMenuItems;
543
560
  top: number;
@@ -562,6 +579,10 @@ export declare const actionResetZoom: {
562
579
  element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
563
580
  midPoint?: import("@excalidraw/math").GlobalPoint;
564
581
  } | null;
582
+ hoveredArrowTextAnchor: {
583
+ elementId: import("@excalidraw/element/types").ExcalidrawArrowElement["id"];
584
+ anchor: "start" | "end" | "label";
585
+ } | null;
565
586
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
566
587
  frameRendering: {
567
588
  enabled: boolean;
@@ -569,7 +590,7 @@ export declare const actionResetZoom: {
569
590
  outline: boolean;
570
591
  clip: boolean;
571
592
  };
572
- editingFrame: string | null;
593
+ editingFrame: import("@excalidraw/element/types").ExcalidrawFrameLikeElement["id"] | null;
573
594
  elementsToHighlight: readonly import("@excalidraw/element/types").NonDeletedExcalidrawElement[] | null;
574
595
  editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
575
596
  activeTool: {
@@ -589,9 +610,9 @@ export declare const actionResetZoom: {
589
610
  exportScale: number;
590
611
  currentItemStrokeColor: string;
591
612
  currentItemBackgroundColor: string;
592
- currentItemFillStyle: ExcalidrawElement["fillStyle"];
613
+ currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
593
614
  currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
594
- currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
615
+ currentItemStrokeStyle: import("@excalidraw/element/types").ExcalidrawElement["strokeStyle"];
595
616
  currentItemRoughness: number;
596
617
  currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
597
618
  currentItemOpacity: number;
@@ -627,7 +648,7 @@ export declare const actionResetZoom: {
627
648
  name: "settings";
628
649
  } | {
629
650
  name: "elementLinkSelector";
630
- sourceElementId: ExcalidrawElement["id"];
651
+ sourceElementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
631
652
  } | {
632
653
  name: "charts";
633
654
  data: import("../charts").Spreadsheet;
@@ -681,9 +702,9 @@ export declare const actionResetZoom: {
681
702
  objectsSnapModeEnabled: boolean;
682
703
  followedBy: Set<import("../types").SocketId>;
683
704
  isCropping: boolean;
684
- croppingElementId: ExcalidrawElement["id"] | null;
705
+ croppingElementId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
685
706
  searchMatches: Readonly<{
686
- focusedId: ExcalidrawElement["id"] | null;
707
+ focusedId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
687
708
  matches: readonly import("../types").SearchMatch[];
688
709
  }> | null;
689
710
  activeLockedId: string | null;
@@ -703,17 +724,17 @@ export declare const actionZoomToFitSelectionInViewport: {
703
724
  name: "zoomToFitSelectionInViewport";
704
725
  label: string;
705
726
  icon: import("react/jsx-runtime").JSX.Element;
727
+ viewMode: true;
728
+ navigation: true;
706
729
  trackEvent: {
707
730
  category: "canvas";
708
731
  };
709
- predicate: (elements: readonly ExcalidrawElement[], appState: AppState) => boolean;
732
+ predicate: (elements: readonly import("@excalidraw/element/types").ExcalidrawElement[], appState: AppState, appProps: import("../types").ExcalidrawProps, app: import("../types").AppClassProperties) => boolean;
710
733
  perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: unknown, app: import("../types").AppClassProperties) => {
711
734
  appState: {
712
735
  scrollX: number;
713
736
  scrollY: number;
714
- zoom: {
715
- value: import("../types").NormalizedZoomValue;
716
- };
737
+ zoom: import("../types").Zoom;
717
738
  contextMenu: {
718
739
  items: import("../components/ContextMenu").ContextMenuItems;
719
740
  top: number;
@@ -738,6 +759,10 @@ export declare const actionZoomToFitSelectionInViewport: {
738
759
  element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
739
760
  midPoint?: import("@excalidraw/math").GlobalPoint;
740
761
  } | null;
762
+ hoveredArrowTextAnchor: {
763
+ elementId: import("@excalidraw/element/types").ExcalidrawArrowElement["id"];
764
+ anchor: "start" | "end" | "label";
765
+ } | null;
741
766
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
742
767
  frameRendering: {
743
768
  enabled: boolean;
@@ -745,7 +770,7 @@ export declare const actionZoomToFitSelectionInViewport: {
745
770
  outline: boolean;
746
771
  clip: boolean;
747
772
  };
748
- editingFrame: string | null;
773
+ editingFrame: import("@excalidraw/element/types").ExcalidrawFrameLikeElement["id"] | null;
749
774
  elementsToHighlight: readonly import("@excalidraw/element/types").NonDeletedExcalidrawElement[] | null;
750
775
  editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
751
776
  activeTool: {
@@ -765,9 +790,9 @@ export declare const actionZoomToFitSelectionInViewport: {
765
790
  exportScale: number;
766
791
  currentItemStrokeColor: string;
767
792
  currentItemBackgroundColor: string;
768
- currentItemFillStyle: ExcalidrawElement["fillStyle"];
793
+ currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
769
794
  currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
770
- currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
795
+ currentItemStrokeStyle: import("@excalidraw/element/types").ExcalidrawElement["strokeStyle"];
771
796
  currentItemRoughness: number;
772
797
  currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
773
798
  currentItemOpacity: number;
@@ -803,7 +828,7 @@ export declare const actionZoomToFitSelectionInViewport: {
803
828
  name: "settings";
804
829
  } | {
805
830
  name: "elementLinkSelector";
806
- sourceElementId: ExcalidrawElement["id"];
831
+ sourceElementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
807
832
  } | {
808
833
  name: "charts";
809
834
  data: import("../charts").Spreadsheet;
@@ -858,9 +883,9 @@ export declare const actionZoomToFitSelectionInViewport: {
858
883
  userToFollow: import("../types").UserToFollow | null;
859
884
  followedBy: Set<import("../types").SocketId>;
860
885
  isCropping: boolean;
861
- croppingElementId: ExcalidrawElement["id"] | null;
886
+ croppingElementId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
862
887
  searchMatches: Readonly<{
863
- focusedId: ExcalidrawElement["id"] | null;
888
+ focusedId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
864
889
  matches: readonly import("../types").SearchMatch[];
865
890
  }> | null;
866
891
  activeLockedId: string | null;
@@ -871,25 +896,25 @@ export declare const actionZoomToFitSelectionInViewport: {
871
896
  };
872
897
  captureUpdate: "EVENTUALLY";
873
898
  };
874
- keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>, appState: AppState) => boolean;
899
+ keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
875
900
  } & {
876
- keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>, appState: AppState) => boolean) | undefined;
901
+ keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
877
902
  };
878
903
  export declare const actionZoomToFitSelection: {
879
904
  name: "zoomToFitSelection";
880
905
  label: string;
881
906
  icon: import("react/jsx-runtime").JSX.Element;
907
+ viewMode: true;
908
+ navigation: true;
882
909
  trackEvent: {
883
910
  category: "canvas";
884
911
  };
885
- predicate: (elements: readonly ExcalidrawElement[], appState: AppState) => boolean;
912
+ predicate: (elements: readonly import("@excalidraw/element/types").ExcalidrawElement[], appState: AppState, appProps: import("../types").ExcalidrawProps, app: import("../types").AppClassProperties) => boolean;
886
913
  perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: unknown, app: import("../types").AppClassProperties) => {
887
914
  appState: {
888
915
  scrollX: number;
889
916
  scrollY: number;
890
- zoom: {
891
- value: import("../types").NormalizedZoomValue;
892
- };
917
+ zoom: import("../types").Zoom;
893
918
  contextMenu: {
894
919
  items: import("../components/ContextMenu").ContextMenuItems;
895
920
  top: number;
@@ -914,6 +939,10 @@ export declare const actionZoomToFitSelection: {
914
939
  element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
915
940
  midPoint?: import("@excalidraw/math").GlobalPoint;
916
941
  } | null;
942
+ hoveredArrowTextAnchor: {
943
+ elementId: import("@excalidraw/element/types").ExcalidrawArrowElement["id"];
944
+ anchor: "start" | "end" | "label";
945
+ } | null;
917
946
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
918
947
  frameRendering: {
919
948
  enabled: boolean;
@@ -921,7 +950,7 @@ export declare const actionZoomToFitSelection: {
921
950
  outline: boolean;
922
951
  clip: boolean;
923
952
  };
924
- editingFrame: string | null;
953
+ editingFrame: import("@excalidraw/element/types").ExcalidrawFrameLikeElement["id"] | null;
925
954
  elementsToHighlight: readonly import("@excalidraw/element/types").NonDeletedExcalidrawElement[] | null;
926
955
  editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
927
956
  activeTool: {
@@ -941,9 +970,9 @@ export declare const actionZoomToFitSelection: {
941
970
  exportScale: number;
942
971
  currentItemStrokeColor: string;
943
972
  currentItemBackgroundColor: string;
944
- currentItemFillStyle: ExcalidrawElement["fillStyle"];
973
+ currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
945
974
  currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
946
- currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
975
+ currentItemStrokeStyle: import("@excalidraw/element/types").ExcalidrawElement["strokeStyle"];
947
976
  currentItemRoughness: number;
948
977
  currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
949
978
  currentItemOpacity: number;
@@ -979,7 +1008,7 @@ export declare const actionZoomToFitSelection: {
979
1008
  name: "settings";
980
1009
  } | {
981
1010
  name: "elementLinkSelector";
982
- sourceElementId: ExcalidrawElement["id"];
1011
+ sourceElementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
983
1012
  } | {
984
1013
  name: "charts";
985
1014
  data: import("../charts").Spreadsheet;
@@ -1034,9 +1063,9 @@ export declare const actionZoomToFitSelection: {
1034
1063
  userToFollow: import("../types").UserToFollow | null;
1035
1064
  followedBy: Set<import("../types").SocketId>;
1036
1065
  isCropping: boolean;
1037
- croppingElementId: ExcalidrawElement["id"] | null;
1066
+ croppingElementId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
1038
1067
  searchMatches: Readonly<{
1039
- focusedId: ExcalidrawElement["id"] | null;
1068
+ focusedId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
1040
1069
  matches: readonly import("../types").SearchMatch[];
1041
1070
  }> | null;
1042
1071
  activeLockedId: string | null;
@@ -1047,26 +1076,25 @@ export declare const actionZoomToFitSelection: {
1047
1076
  };
1048
1077
  captureUpdate: "EVENTUALLY";
1049
1078
  };
1050
- keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>, appState: AppState) => boolean;
1079
+ keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
1051
1080
  } & {
1052
- keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>, appState: AppState) => boolean) | undefined;
1081
+ keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
1053
1082
  };
1054
1083
  export declare const actionZoomToFit: {
1055
1084
  name: "zoomToFit";
1056
1085
  label: string;
1057
1086
  icon: import("react/jsx-runtime").JSX.Element;
1058
1087
  viewMode: true;
1088
+ navigation: true;
1059
1089
  trackEvent: {
1060
1090
  category: "canvas";
1061
1091
  };
1062
- predicate: (elements: readonly ExcalidrawElement[], appState: AppState) => boolean;
1092
+ predicate: (elements: readonly import("@excalidraw/element/types").ExcalidrawElement[], appState: AppState, appProps: import("../types").ExcalidrawProps, app: import("../types").AppClassProperties) => boolean;
1063
1093
  perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: unknown, app: import("../types").AppClassProperties) => {
1064
1094
  appState: {
1065
1095
  scrollX: number;
1066
1096
  scrollY: number;
1067
- zoom: {
1068
- value: import("../types").NormalizedZoomValue;
1069
- };
1097
+ zoom: import("../types").Zoom;
1070
1098
  contextMenu: {
1071
1099
  items: import("../components/ContextMenu").ContextMenuItems;
1072
1100
  top: number;
@@ -1091,6 +1119,10 @@ export declare const actionZoomToFit: {
1091
1119
  element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
1092
1120
  midPoint?: import("@excalidraw/math").GlobalPoint;
1093
1121
  } | null;
1122
+ hoveredArrowTextAnchor: {
1123
+ elementId: import("@excalidraw/element/types").ExcalidrawArrowElement["id"];
1124
+ anchor: "start" | "end" | "label";
1125
+ } | null;
1094
1126
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
1095
1127
  frameRendering: {
1096
1128
  enabled: boolean;
@@ -1098,7 +1130,7 @@ export declare const actionZoomToFit: {
1098
1130
  outline: boolean;
1099
1131
  clip: boolean;
1100
1132
  };
1101
- editingFrame: string | null;
1133
+ editingFrame: import("@excalidraw/element/types").ExcalidrawFrameLikeElement["id"] | null;
1102
1134
  elementsToHighlight: readonly import("@excalidraw/element/types").NonDeletedExcalidrawElement[] | null;
1103
1135
  editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
1104
1136
  activeTool: {
@@ -1118,9 +1150,9 @@ export declare const actionZoomToFit: {
1118
1150
  exportScale: number;
1119
1151
  currentItemStrokeColor: string;
1120
1152
  currentItemBackgroundColor: string;
1121
- currentItemFillStyle: ExcalidrawElement["fillStyle"];
1153
+ currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
1122
1154
  currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
1123
- currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
1155
+ currentItemStrokeStyle: import("@excalidraw/element/types").ExcalidrawElement["strokeStyle"];
1124
1156
  currentItemRoughness: number;
1125
1157
  currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
1126
1158
  currentItemOpacity: number;
@@ -1156,7 +1188,7 @@ export declare const actionZoomToFit: {
1156
1188
  name: "settings";
1157
1189
  } | {
1158
1190
  name: "elementLinkSelector";
1159
- sourceElementId: ExcalidrawElement["id"];
1191
+ sourceElementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
1160
1192
  } | {
1161
1193
  name: "charts";
1162
1194
  data: import("../charts").Spreadsheet;
@@ -1211,9 +1243,9 @@ export declare const actionZoomToFit: {
1211
1243
  userToFollow: import("../types").UserToFollow | null;
1212
1244
  followedBy: Set<import("../types").SocketId>;
1213
1245
  isCropping: boolean;
1214
- croppingElementId: ExcalidrawElement["id"] | null;
1246
+ croppingElementId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
1215
1247
  searchMatches: Readonly<{
1216
- focusedId: ExcalidrawElement["id"] | null;
1248
+ focusedId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
1217
1249
  matches: readonly import("../types").SearchMatch[];
1218
1250
  }> | null;
1219
1251
  activeLockedId: string | null;
@@ -1224,508 +1256,10 @@ export declare const actionZoomToFit: {
1224
1256
  };
1225
1257
  captureUpdate: "EVENTUALLY";
1226
1258
  };
1227
- keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>, appState: AppState) => boolean;
1228
- } & {
1229
- keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>, appState: AppState) => boolean) | undefined;
1230
- };
1231
- export declare const actionToggleTheme: import("./types").Action<import("@excalidraw/element/types").Theme> & {
1232
- keyTest?: ((event: React.KeyboardEvent | KeyboardEvent, appState: AppState, elements: readonly ExcalidrawElement[], app: import("../types").AppClassProperties) => boolean) | undefined;
1233
- };
1234
- export declare const actionToggleEraserTool: {
1235
- name: "toggleEraserTool";
1236
- label: string;
1237
- trackEvent: {
1238
- category: "toolbar";
1239
- };
1240
- perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: unknown, app: import("../types").AppClassProperties) => {
1241
- appState: {
1242
- selectedElementIds: {};
1243
- selectedGroupIds: {};
1244
- activeEmbeddable: null;
1245
- activeTool: {
1246
- lastActiveTool: import("../types").ActiveTool | null;
1247
- locked: boolean;
1248
- fromSelection: boolean;
1249
- } & import("../types").ActiveTool;
1250
- contextMenu: {
1251
- items: import("../components/ContextMenu").ContextMenuItems;
1252
- top: number;
1253
- left: number;
1254
- } | null;
1255
- showWelcomeScreen: boolean;
1256
- isLoading: boolean;
1257
- errorMessage: React.ReactNode;
1258
- newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
1259
- resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
1260
- multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
1261
- selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
1262
- isBindingEnabled: boolean;
1263
- boxSelectionMode: import("../types").BoxSelectionMode;
1264
- bindingPreference: "enabled" | "disabled";
1265
- isMidpointSnappingEnabled: boolean;
1266
- suggestedBinding: {
1267
- element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
1268
- midPoint?: import("@excalidraw/math").GlobalPoint;
1269
- } | null;
1270
- frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
1271
- frameRendering: {
1272
- enabled: boolean;
1273
- name: boolean;
1274
- outline: boolean;
1275
- clip: boolean;
1276
- };
1277
- editingFrame: string | null;
1278
- elementsToHighlight: readonly import("@excalidraw/element/types").NonDeletedExcalidrawElement[] | null;
1279
- editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
1280
- preferredSelectionTool: {
1281
- type: "selection" | "lasso";
1282
- initialized: boolean;
1283
- };
1284
- penMode: boolean;
1285
- penDetected: boolean;
1286
- exportBackground: boolean;
1287
- exportEmbedScene: boolean;
1288
- exportWithDarkMode: boolean;
1289
- exportScale: number;
1290
- currentItemStrokeColor: string;
1291
- currentItemBackgroundColor: string;
1292
- currentItemFillStyle: ExcalidrawElement["fillStyle"];
1293
- currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
1294
- currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
1295
- currentItemRoughness: number;
1296
- currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
1297
- currentItemOpacity: number;
1298
- currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
1299
- currentItemFontSize: number;
1300
- currentItemTextAlign: import("@excalidraw/element/types").TextAlign;
1301
- currentItemStartArrowhead: import("@excalidraw/element/types").Arrowhead | null;
1302
- currentItemEndArrowhead: import("@excalidraw/element/types").Arrowhead | null;
1303
- currentHoveredFontFamily: import("@excalidraw/element/types").FontFamilyValues | null;
1304
- currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
1305
- currentItemArrowType: "sharp" | "round" | "elbow";
1306
- viewBackgroundColor: string;
1307
- scrollX: number;
1308
- scrollY: number;
1309
- scrollConstraints: import("../types").ScrollConstraints | null;
1310
- cursorButton: "up" | "down";
1311
- scrolledOutside: boolean;
1312
- name: string | null;
1313
- isResizing: boolean;
1314
- isRotating: boolean;
1315
- zoom: import("../types").Zoom;
1316
- openMenu: "canvas" | null;
1317
- openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
1318
- openSidebar: {
1319
- name: import("../types").SidebarName;
1320
- tab?: import("../types").SidebarTabName;
1321
- } | null;
1322
- openDialog: null | {
1323
- name: "imageExport" | "help" | "jsonExport";
1324
- } | {
1325
- name: "ttd";
1326
- tab: "text-to-diagram" | "mermaid";
1327
- } | {
1328
- name: "commandPalette";
1329
- } | {
1330
- name: "settings";
1331
- } | {
1332
- name: "elementLinkSelector";
1333
- sourceElementId: ExcalidrawElement["id"];
1334
- } | {
1335
- name: "charts";
1336
- data: import("../charts").Spreadsheet;
1337
- rawText: string;
1338
- };
1339
- defaultSidebarDockedPreference: boolean;
1340
- lastPointerDownWith: import("@excalidraw/element/types").PointerType;
1341
- hoveredElementIds: Readonly<{
1342
- [id: string]: true;
1343
- }>;
1344
- previousSelectedElementIds: {
1345
- [id: string]: true;
1346
- };
1347
- selectedElementsAreBeingDragged: boolean;
1348
- shouldCacheIgnoreZoom: boolean;
1349
- toast: {
1350
- message: React.ReactNode;
1351
- closable?: boolean;
1352
- duration?: number;
1353
- } | null;
1354
- zenModeEnabled: boolean;
1355
- theme: import("@excalidraw/element/types").Theme;
1356
- gridSize: number;
1357
- gridStep: number;
1358
- gridModeEnabled: boolean;
1359
- viewModeEnabled: boolean;
1360
- editingGroupId: import("@excalidraw/element/types").GroupId | null;
1361
- width: number;
1362
- height: number;
1363
- offsetTop: number;
1364
- offsetLeft: number;
1365
- fileHandle: FileSystemFileHandle | null;
1366
- collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
1367
- stats: {
1368
- open: boolean;
1369
- panels: number;
1370
- };
1371
- showHyperlinkPopup: false | "info" | "editor";
1372
- selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
1373
- snapLines: readonly import("../snapping").SnapLine[];
1374
- originSnapOffset: {
1375
- x: number;
1376
- y: number;
1377
- } | null;
1378
- objectsSnapModeEnabled: boolean;
1379
- userToFollow: import("../types").UserToFollow | null;
1380
- followedBy: Set<import("../types").SocketId>;
1381
- isCropping: boolean;
1382
- croppingElementId: ExcalidrawElement["id"] | null;
1383
- searchMatches: Readonly<{
1384
- focusedId: ExcalidrawElement["id"] | null;
1385
- matches: readonly import("../types").SearchMatch[];
1386
- }> | null;
1387
- activeLockedId: string | null;
1388
- lockedMultiSelections: {
1389
- [groupId: string]: true;
1390
- };
1391
- bindMode: import("@excalidraw/element/types").BindMode;
1392
- };
1393
- captureUpdate: "IMMEDIATELY";
1394
- };
1395
- keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>, appState: AppState) => boolean;
1396
- } & {
1397
- keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>, appState: AppState) => boolean) | undefined;
1398
- };
1399
- export declare const actionToggleLassoTool: {
1400
- name: "toggleLassoTool";
1401
- label: string;
1402
- icon: import("react/jsx-runtime").JSX.Element;
1403
- trackEvent: {
1404
- category: "toolbar";
1405
- };
1406
- predicate: (elements: readonly ExcalidrawElement[], appState: AppState, props: import("../types").ExcalidrawProps, app: import("../types").AppClassProperties) => boolean;
1407
- perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: unknown, app: import("../types").AppClassProperties) => {
1408
- appState: {
1409
- selectedElementIds: {};
1410
- selectedGroupIds: {};
1411
- activeEmbeddable: null;
1412
- activeTool: {
1413
- lastActiveTool: import("../types").ActiveTool | null;
1414
- locked: boolean;
1415
- fromSelection: boolean;
1416
- } & import("../types").ActiveTool;
1417
- contextMenu: {
1418
- items: import("../components/ContextMenu").ContextMenuItems;
1419
- top: number;
1420
- left: number;
1421
- } | null;
1422
- showWelcomeScreen: boolean;
1423
- isLoading: boolean;
1424
- errorMessage: React.ReactNode;
1425
- newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
1426
- resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
1427
- multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
1428
- selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
1429
- isBindingEnabled: boolean;
1430
- boxSelectionMode: import("../types").BoxSelectionMode;
1431
- bindingPreference: "enabled" | "disabled";
1432
- isMidpointSnappingEnabled: boolean;
1433
- suggestedBinding: {
1434
- element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
1435
- midPoint?: import("@excalidraw/math").GlobalPoint;
1436
- } | null;
1437
- frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
1438
- frameRendering: {
1439
- enabled: boolean;
1440
- name: boolean;
1441
- outline: boolean;
1442
- clip: boolean;
1443
- };
1444
- editingFrame: string | null;
1445
- elementsToHighlight: readonly import("@excalidraw/element/types").NonDeletedExcalidrawElement[] | null;
1446
- editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
1447
- preferredSelectionTool: {
1448
- type: "selection" | "lasso";
1449
- initialized: boolean;
1450
- };
1451
- penMode: boolean;
1452
- penDetected: boolean;
1453
- exportBackground: boolean;
1454
- exportEmbedScene: boolean;
1455
- exportWithDarkMode: boolean;
1456
- exportScale: number;
1457
- currentItemStrokeColor: string;
1458
- currentItemBackgroundColor: string;
1459
- currentItemFillStyle: ExcalidrawElement["fillStyle"];
1460
- currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
1461
- currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
1462
- currentItemRoughness: number;
1463
- currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
1464
- currentItemOpacity: number;
1465
- currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
1466
- currentItemFontSize: number;
1467
- currentItemTextAlign: import("@excalidraw/element/types").TextAlign;
1468
- currentItemStartArrowhead: import("@excalidraw/element/types").Arrowhead | null;
1469
- currentItemEndArrowhead: import("@excalidraw/element/types").Arrowhead | null;
1470
- currentHoveredFontFamily: import("@excalidraw/element/types").FontFamilyValues | null;
1471
- currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
1472
- currentItemArrowType: "sharp" | "round" | "elbow";
1473
- viewBackgroundColor: string;
1474
- scrollX: number;
1475
- scrollY: number;
1476
- scrollConstraints: import("../types").ScrollConstraints | null;
1477
- cursorButton: "up" | "down";
1478
- scrolledOutside: boolean;
1479
- name: string | null;
1480
- isResizing: boolean;
1481
- isRotating: boolean;
1482
- zoom: import("../types").Zoom;
1483
- openMenu: "canvas" | null;
1484
- openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
1485
- openSidebar: {
1486
- name: import("../types").SidebarName;
1487
- tab?: import("../types").SidebarTabName;
1488
- } | null;
1489
- openDialog: null | {
1490
- name: "imageExport" | "help" | "jsonExport";
1491
- } | {
1492
- name: "ttd";
1493
- tab: "text-to-diagram" | "mermaid";
1494
- } | {
1495
- name: "commandPalette";
1496
- } | {
1497
- name: "settings";
1498
- } | {
1499
- name: "elementLinkSelector";
1500
- sourceElementId: ExcalidrawElement["id"];
1501
- } | {
1502
- name: "charts";
1503
- data: import("../charts").Spreadsheet;
1504
- rawText: string;
1505
- };
1506
- defaultSidebarDockedPreference: boolean;
1507
- lastPointerDownWith: import("@excalidraw/element/types").PointerType;
1508
- hoveredElementIds: Readonly<{
1509
- [id: string]: true;
1510
- }>;
1511
- previousSelectedElementIds: {
1512
- [id: string]: true;
1513
- };
1514
- selectedElementsAreBeingDragged: boolean;
1515
- shouldCacheIgnoreZoom: boolean;
1516
- toast: {
1517
- message: React.ReactNode;
1518
- closable?: boolean;
1519
- duration?: number;
1520
- } | null;
1521
- zenModeEnabled: boolean;
1522
- theme: import("@excalidraw/element/types").Theme;
1523
- gridSize: number;
1524
- gridStep: number;
1525
- gridModeEnabled: boolean;
1526
- viewModeEnabled: boolean;
1527
- editingGroupId: import("@excalidraw/element/types").GroupId | null;
1528
- width: number;
1529
- height: number;
1530
- offsetTop: number;
1531
- offsetLeft: number;
1532
- fileHandle: FileSystemFileHandle | null;
1533
- collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
1534
- stats: {
1535
- open: boolean;
1536
- panels: number;
1537
- };
1538
- showHyperlinkPopup: false | "info" | "editor";
1539
- selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
1540
- snapLines: readonly import("../snapping").SnapLine[];
1541
- originSnapOffset: {
1542
- x: number;
1543
- y: number;
1544
- } | null;
1545
- objectsSnapModeEnabled: boolean;
1546
- userToFollow: import("../types").UserToFollow | null;
1547
- followedBy: Set<import("../types").SocketId>;
1548
- isCropping: boolean;
1549
- croppingElementId: ExcalidrawElement["id"] | null;
1550
- searchMatches: Readonly<{
1551
- focusedId: ExcalidrawElement["id"] | null;
1552
- matches: readonly import("../types").SearchMatch[];
1553
- }> | null;
1554
- activeLockedId: string | null;
1555
- lockedMultiSelections: {
1556
- [groupId: string]: true;
1557
- };
1558
- bindMode: import("@excalidraw/element/types").BindMode;
1559
- };
1560
- captureUpdate: "NEVER";
1561
- };
1562
- } & {
1563
- keyTest?: undefined;
1564
- };
1565
- export declare const actionToggleHandTool: {
1566
- name: "toggleHandTool";
1567
- label: string;
1568
- trackEvent: {
1569
- category: "toolbar";
1570
- };
1571
- icon: import("react/jsx-runtime").JSX.Element;
1572
- viewMode: false;
1573
- perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: unknown, app: import("../types").AppClassProperties) => {
1574
- appState: {
1575
- selectedElementIds: {};
1576
- selectedGroupIds: {};
1577
- activeEmbeddable: null;
1578
- activeTool: {
1579
- lastActiveTool: import("../types").ActiveTool | null;
1580
- locked: boolean;
1581
- fromSelection: boolean;
1582
- } & import("../types").ActiveTool;
1583
- contextMenu: {
1584
- items: import("../components/ContextMenu").ContextMenuItems;
1585
- top: number;
1586
- left: number;
1587
- } | null;
1588
- showWelcomeScreen: boolean;
1589
- isLoading: boolean;
1590
- errorMessage: React.ReactNode;
1591
- newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
1592
- resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
1593
- multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
1594
- selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
1595
- isBindingEnabled: boolean;
1596
- boxSelectionMode: import("../types").BoxSelectionMode;
1597
- bindingPreference: "enabled" | "disabled";
1598
- isMidpointSnappingEnabled: boolean;
1599
- suggestedBinding: {
1600
- element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
1601
- midPoint?: import("@excalidraw/math").GlobalPoint;
1602
- } | null;
1603
- frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
1604
- frameRendering: {
1605
- enabled: boolean;
1606
- name: boolean;
1607
- outline: boolean;
1608
- clip: boolean;
1609
- };
1610
- editingFrame: string | null;
1611
- elementsToHighlight: readonly import("@excalidraw/element/types").NonDeletedExcalidrawElement[] | null;
1612
- editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
1613
- preferredSelectionTool: {
1614
- type: "selection" | "lasso";
1615
- initialized: boolean;
1616
- };
1617
- penMode: boolean;
1618
- penDetected: boolean;
1619
- exportBackground: boolean;
1620
- exportEmbedScene: boolean;
1621
- exportWithDarkMode: boolean;
1622
- exportScale: number;
1623
- currentItemStrokeColor: string;
1624
- currentItemBackgroundColor: string;
1625
- currentItemFillStyle: ExcalidrawElement["fillStyle"];
1626
- currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
1627
- currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
1628
- currentItemRoughness: number;
1629
- currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
1630
- currentItemOpacity: number;
1631
- currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
1632
- currentItemFontSize: number;
1633
- currentItemTextAlign: import("@excalidraw/element/types").TextAlign;
1634
- currentItemStartArrowhead: import("@excalidraw/element/types").Arrowhead | null;
1635
- currentItemEndArrowhead: import("@excalidraw/element/types").Arrowhead | null;
1636
- currentHoveredFontFamily: import("@excalidraw/element/types").FontFamilyValues | null;
1637
- currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
1638
- currentItemArrowType: "sharp" | "round" | "elbow";
1639
- viewBackgroundColor: string;
1640
- scrollX: number;
1641
- scrollY: number;
1642
- scrollConstraints: import("../types").ScrollConstraints | null;
1643
- cursorButton: "up" | "down";
1644
- scrolledOutside: boolean;
1645
- name: string | null;
1646
- isResizing: boolean;
1647
- isRotating: boolean;
1648
- zoom: import("../types").Zoom;
1649
- openMenu: "canvas" | null;
1650
- openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
1651
- openSidebar: {
1652
- name: import("../types").SidebarName;
1653
- tab?: import("../types").SidebarTabName;
1654
- } | null;
1655
- openDialog: null | {
1656
- name: "imageExport" | "help" | "jsonExport";
1657
- } | {
1658
- name: "ttd";
1659
- tab: "text-to-diagram" | "mermaid";
1660
- } | {
1661
- name: "commandPalette";
1662
- } | {
1663
- name: "settings";
1664
- } | {
1665
- name: "elementLinkSelector";
1666
- sourceElementId: ExcalidrawElement["id"];
1667
- } | {
1668
- name: "charts";
1669
- data: import("../charts").Spreadsheet;
1670
- rawText: string;
1671
- };
1672
- defaultSidebarDockedPreference: boolean;
1673
- lastPointerDownWith: import("@excalidraw/element/types").PointerType;
1674
- hoveredElementIds: Readonly<{
1675
- [id: string]: true;
1676
- }>;
1677
- previousSelectedElementIds: {
1678
- [id: string]: true;
1679
- };
1680
- selectedElementsAreBeingDragged: boolean;
1681
- shouldCacheIgnoreZoom: boolean;
1682
- toast: {
1683
- message: React.ReactNode;
1684
- closable?: boolean;
1685
- duration?: number;
1686
- } | null;
1687
- zenModeEnabled: boolean;
1688
- theme: import("@excalidraw/element/types").Theme;
1689
- gridSize: number;
1690
- gridStep: number;
1691
- gridModeEnabled: boolean;
1692
- viewModeEnabled: boolean;
1693
- editingGroupId: import("@excalidraw/element/types").GroupId | null;
1694
- width: number;
1695
- height: number;
1696
- offsetTop: number;
1697
- offsetLeft: number;
1698
- fileHandle: FileSystemFileHandle | null;
1699
- collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
1700
- stats: {
1701
- open: boolean;
1702
- panels: number;
1703
- };
1704
- showHyperlinkPopup: false | "info" | "editor";
1705
- selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
1706
- snapLines: readonly import("../snapping").SnapLine[];
1707
- originSnapOffset: {
1708
- x: number;
1709
- y: number;
1710
- } | null;
1711
- objectsSnapModeEnabled: boolean;
1712
- userToFollow: import("../types").UserToFollow | null;
1713
- followedBy: Set<import("../types").SocketId>;
1714
- isCropping: boolean;
1715
- croppingElementId: ExcalidrawElement["id"] | null;
1716
- searchMatches: Readonly<{
1717
- focusedId: ExcalidrawElement["id"] | null;
1718
- matches: readonly import("../types").SearchMatch[];
1719
- }> | null;
1720
- activeLockedId: string | null;
1721
- lockedMultiSelections: {
1722
- [groupId: string]: true;
1723
- };
1724
- bindMode: import("@excalidraw/element/types").BindMode;
1725
- };
1726
- captureUpdate: "IMMEDIATELY";
1727
- };
1728
1259
  keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
1729
1260
  } & {
1730
1261
  keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
1731
1262
  };
1263
+ export declare const actionToggleTheme: import("./types").Action<import("@excalidraw/element/types").Theme> & {
1264
+ keyTest?: ((event: React.KeyboardEvent | KeyboardEvent, appState: AppState, elements: readonly import("@excalidraw/element/types").ExcalidrawElement[], app: import("../types").AppClassProperties) => boolean) | undefined;
1265
+ };