@zsviczian/excalidraw 0.18.0-19 → 0.18.0-20

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 (59) hide show
  1. package/dist/excalidraw.development.js +57 -123
  2. package/dist/excalidraw.production.min.js +1 -1
  3. package/package.json +1 -1
  4. package/types/common/src/constants.d.ts +10 -1
  5. package/types/common/src/utils.d.ts +2 -2
  6. package/types/element/src/Shape.d.ts +6 -2
  7. package/types/element/src/binding.d.ts +7 -8
  8. package/types/element/src/bounds.d.ts +3 -2
  9. package/types/element/src/collision.d.ts +18 -12
  10. package/types/element/src/cropElement.d.ts +1 -1
  11. package/types/element/src/delta.d.ts +26 -6
  12. package/types/element/src/distance.d.ts +2 -2
  13. package/types/element/src/fractionalIndex.d.ts +8 -2
  14. package/types/element/src/linearElementEditor.d.ts +1 -0
  15. package/types/element/src/mutateElement.d.ts +1 -1
  16. package/types/element/src/shapes.d.ts +1 -1
  17. package/types/element/src/sizeHelpers.d.ts +1 -1
  18. package/types/element/src/store.d.ts +11 -7
  19. package/types/element/src/typeChecks.d.ts +4 -0
  20. package/types/element/src/types.d.ts +1 -1
  21. package/types/element/src/utils.d.ts +2 -1
  22. package/types/excalidraw/actions/actionAddToLibrary.d.ts +0 -3
  23. package/types/excalidraw/actions/actionBoundText.d.ts +0 -2
  24. package/types/excalidraw/actions/actionCanvas.d.ts +0 -15
  25. package/types/excalidraw/actions/actionClipboard.d.ts +1 -6
  26. package/types/excalidraw/actions/actionCropEditor.d.ts +0 -1
  27. package/types/excalidraw/actions/actionDeleteSelected.d.ts +1 -3
  28. package/types/excalidraw/actions/actionElementLink.d.ts +0 -1
  29. package/types/excalidraw/actions/actionElementLock.d.ts +0 -2
  30. package/types/excalidraw/actions/actionEmbeddable.d.ts +0 -1
  31. package/types/excalidraw/actions/actionExport.d.ts +0 -9
  32. package/types/excalidraw/actions/actionFinalize.d.ts +1 -3
  33. package/types/excalidraw/actions/actionFrame.d.ts +0 -4
  34. package/types/excalidraw/actions/actionGroup.d.ts +0 -2
  35. package/types/excalidraw/actions/actionLinearEditor.d.ts +0 -1
  36. package/types/excalidraw/actions/actionLink.d.ts +0 -1
  37. package/types/excalidraw/actions/actionMenu.d.ts +0 -3
  38. package/types/excalidraw/actions/actionNavigate.d.ts +0 -2
  39. package/types/excalidraw/actions/actionProperties.d.ts +0 -15
  40. package/types/excalidraw/actions/actionSelectAll.d.ts +0 -1
  41. package/types/excalidraw/actions/actionStyles.d.ts +0 -1
  42. package/types/excalidraw/actions/actionToggleGridMode.d.ts +0 -1
  43. package/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +0 -1
  44. package/types/excalidraw/actions/actionToggleSearchMenu.d.ts +0 -1
  45. package/types/excalidraw/actions/actionToggleStats.d.ts +0 -1
  46. package/types/excalidraw/actions/actionToggleViewMode.d.ts +0 -1
  47. package/types/excalidraw/actions/actionToggleZenMode.d.ts +0 -1
  48. package/types/excalidraw/components/App.d.ts +7 -13
  49. package/types/excalidraw/eraser/index.d.ts +0 -2
  50. package/types/excalidraw/history.d.ts +21 -5
  51. package/types/excalidraw/lasso/utils.d.ts +2 -1
  52. package/types/excalidraw/renderer/helpers.d.ts +3 -3
  53. package/types/excalidraw/scene/Renderer.d.ts +0 -1
  54. package/types/excalidraw/types.d.ts +2 -4
  55. package/types/math/src/angle.d.ts +2 -0
  56. package/types/math/src/curve.d.ts +4 -0
  57. package/types/math/src/index.d.ts +1 -0
  58. package/types/math/src/vector.d.ts +4 -2
  59. package/types/utils/src/collision.d.ts +0 -8
@@ -160,7 +160,6 @@ export declare const actionToggleCropEditor: {
160
160
  shown: true;
161
161
  data: import("../charts").Spreadsheet;
162
162
  };
163
- pendingImageElementId: string | null;
164
163
  showHyperlinkPopup: false | "info" | "editor";
165
164
  linkOpacity: number;
166
165
  trayModeEnabled: boolean;
@@ -161,7 +161,6 @@ export declare const actionDeleteSelected: {
161
161
  shown: true;
162
162
  data: import("../charts").Spreadsheet;
163
163
  };
164
- pendingImageElementId: string | null;
165
164
  showHyperlinkPopup: false | "info" | "editor";
166
165
  linkOpacity: number;
167
166
  trayModeEnabled: boolean;
@@ -253,6 +252,7 @@ export declare const actionDeleteSelected: {
253
252
  hoverPointIndex: number;
254
253
  segmentMidPointHoveredCoords: import("@excalidraw/math").GlobalPoint | null;
255
254
  elbowed: boolean;
255
+ customLineAngle: number | null;
256
256
  };
257
257
  contextMenu: {
258
258
  items: import("../components/ContextMenu").ContextMenuItems;
@@ -402,7 +402,6 @@ export declare const actionDeleteSelected: {
402
402
  shown: true;
403
403
  data: import("../charts").Spreadsheet;
404
404
  };
405
- pendingImageElementId: string | null;
406
405
  showHyperlinkPopup: false | "info" | "editor";
407
406
  linkOpacity: number;
408
407
  trayModeEnabled: boolean;
@@ -611,7 +610,6 @@ export declare const actionDeleteSelected: {
611
610
  shown: true;
612
611
  data: import("../charts").Spreadsheet;
613
612
  };
614
- pendingImageElementId: string | null;
615
613
  showHyperlinkPopup: false | "info" | "editor";
616
614
  linkOpacity: number;
617
615
  trayModeEnabled: boolean;
@@ -178,7 +178,6 @@ export declare const actionLinkToElement: {
178
178
  shown: true;
179
179
  data: import("../charts").Spreadsheet;
180
180
  };
181
- pendingImageElementId: string | null;
182
181
  showHyperlinkPopup: false | "info" | "editor";
183
182
  linkOpacity: number;
184
183
  trayModeEnabled: boolean;
@@ -165,7 +165,6 @@ export declare const actionToggleElementLock: {
165
165
  shown: true;
166
166
  data: import("../charts").Spreadsheet;
167
167
  };
168
- pendingImageElementId: string | null;
169
168
  showHyperlinkPopup: false | "info" | "editor";
170
169
  linkOpacity: number;
171
170
  trayModeEnabled: boolean;
@@ -386,7 +385,6 @@ export declare const actionUnlockAllElements: {
386
385
  shown: true;
387
386
  data: import("../charts").Spreadsheet;
388
387
  };
389
- pendingImageElementId: string | null;
390
388
  showHyperlinkPopup: false | "info" | "editor";
391
389
  linkOpacity: number;
392
390
  trayModeEnabled: boolean;
@@ -157,7 +157,6 @@ export declare const actionSetEmbeddableAsActiveTool: {
157
157
  shown: true;
158
158
  data: import("../charts").Spreadsheet;
159
159
  };
160
- pendingImageElementId: string | null;
161
160
  showHyperlinkPopup: false | "info" | "editor";
162
161
  linkOpacity: number;
163
162
  trayModeEnabled: boolean;
@@ -155,7 +155,6 @@ export declare const actionChangeProjectName: {
155
155
  shown: true;
156
156
  data: import("../charts").Spreadsheet;
157
157
  };
158
- pendingImageElementId: string | null;
159
158
  showHyperlinkPopup: false | "info" | "editor";
160
159
  linkOpacity: number;
161
160
  trayModeEnabled: boolean;
@@ -377,7 +376,6 @@ export declare const actionChangeExportScale: {
377
376
  shown: true;
378
377
  data: import("../charts").Spreadsheet;
379
378
  };
380
- pendingImageElementId: string | null;
381
379
  showHyperlinkPopup: false | "info" | "editor";
382
380
  linkOpacity: number;
383
381
  trayModeEnabled: boolean;
@@ -599,7 +597,6 @@ export declare const actionChangeExportBackground: {
599
597
  shown: true;
600
598
  data: import("../charts").Spreadsheet;
601
599
  };
602
- pendingImageElementId: string | null;
603
600
  showHyperlinkPopup: false | "info" | "editor";
604
601
  linkOpacity: number;
605
602
  trayModeEnabled: boolean;
@@ -821,7 +818,6 @@ export declare const actionChangeExportEmbedScene: {
821
818
  shown: true;
822
819
  data: import("../charts").Spreadsheet;
823
820
  };
824
- pendingImageElementId: string | null;
825
821
  showHyperlinkPopup: false | "info" | "editor";
826
822
  linkOpacity: number;
827
823
  trayModeEnabled: boolean;
@@ -1043,7 +1039,6 @@ export declare const actionSaveToActiveFile: {
1043
1039
  shown: true;
1044
1040
  data: import("../charts").Spreadsheet;
1045
1041
  };
1046
- pendingImageElementId: string | null;
1047
1042
  showHyperlinkPopup: false | "info" | "editor";
1048
1043
  linkOpacity: number;
1049
1044
  trayModeEnabled: boolean;
@@ -1257,7 +1252,6 @@ export declare const actionSaveFileToDisk: {
1257
1252
  shown: true;
1258
1253
  data: import("../charts").Spreadsheet;
1259
1254
  };
1260
- pendingImageElementId: string | null;
1261
1255
  showHyperlinkPopup: false | "info" | "editor";
1262
1256
  linkOpacity: number;
1263
1257
  trayModeEnabled: boolean;
@@ -1479,7 +1473,6 @@ export declare const actionLoadScene: {
1479
1473
  shown: true;
1480
1474
  data: import("../charts").Spreadsheet;
1481
1475
  };
1482
- pendingImageElementId: string | null;
1483
1476
  showHyperlinkPopup: false | "info" | "editor";
1484
1477
  linkOpacity: number;
1485
1478
  trayModeEnabled: boolean;
@@ -1691,7 +1684,6 @@ export declare const actionLoadScene: {
1691
1684
  shown: true;
1692
1685
  data: import("../charts").Spreadsheet;
1693
1686
  };
1694
- pendingImageElementId: string | null;
1695
1687
  showHyperlinkPopup: false | "info" | "editor";
1696
1688
  linkOpacity: number;
1697
1689
  trayModeEnabled: boolean;
@@ -1914,7 +1906,6 @@ export declare const actionExportWithDarkMode: {
1914
1906
  shown: true;
1915
1907
  data: import("../charts").Spreadsheet;
1916
1908
  };
1917
- pendingImageElementId: string | null;
1918
1909
  showHyperlinkPopup: false | "info" | "editor";
1919
1910
  linkOpacity: number;
1920
1911
  trayModeEnabled: boolean;
@@ -39,6 +39,7 @@ export declare const actionFinalize: {
39
39
  hoverPointIndex: number;
40
40
  segmentMidPointHoveredCoords: import("@excalidraw/math").GlobalPoint | null;
41
41
  elbowed: boolean;
42
+ customLineAngle: number | null;
42
43
  };
43
44
  suggestedBindings: never[];
44
45
  contextMenu: {
@@ -189,7 +190,6 @@ export declare const actionFinalize: {
189
190
  shown: true;
190
191
  data: import("../charts").Spreadsheet;
191
192
  };
192
- pendingImageElementId: string | null;
193
193
  showHyperlinkPopup: false | "info" | "editor";
194
194
  linkOpacity: number;
195
195
  trayModeEnabled: boolean;
@@ -399,7 +399,6 @@ export declare const actionFinalize: {
399
399
  shown: true;
400
400
  data: import("../charts").Spreadsheet;
401
401
  };
402
- pendingImageElementId: string | null;
403
402
  showHyperlinkPopup: false | "info" | "editor";
404
403
  linkOpacity: number;
405
404
  trayModeEnabled: boolean;
@@ -478,7 +477,6 @@ export declare const actionFinalize: {
478
477
  [id: string]: true;
479
478
  }>;
480
479
  selectedLinearElement: LinearElementEditor | null;
481
- pendingImageElementId: null;
482
480
  contextMenu: {
483
481
  items: import("../components/ContextMenu").ContextMenuItems;
484
482
  top: number;
@@ -156,7 +156,6 @@ export declare const actionSelectAllElementsInFrame: {
156
156
  shown: true;
157
157
  data: import("../charts").Spreadsheet;
158
158
  };
159
- pendingImageElementId: string | null;
160
159
  showHyperlinkPopup: false | "info" | "editor";
161
160
  linkOpacity: number;
162
161
  trayModeEnabled: boolean;
@@ -382,7 +381,6 @@ export declare const actionRemoveAllElementsFromFrame: {
382
381
  shown: true;
383
382
  data: import("../charts").Spreadsheet;
384
383
  };
385
- pendingImageElementId: string | null;
386
384
  showHyperlinkPopup: false | "info" | "editor";
387
385
  linkOpacity: number;
388
386
  trayModeEnabled: boolean;
@@ -609,7 +607,6 @@ export declare const actionupdateFrameRendering: {
609
607
  shown: true;
610
608
  data: import("../charts").Spreadsheet;
611
609
  };
612
- pendingImageElementId: string | null;
613
610
  showHyperlinkPopup: false | "info" | "editor";
614
611
  linkOpacity: number;
615
612
  trayModeEnabled: boolean;
@@ -833,7 +830,6 @@ export declare const actionSetFrameAsActiveTool: {
833
830
  shown: true;
834
831
  data: import("../charts").Spreadsheet;
835
832
  };
836
- pendingImageElementId: string | null;
837
833
  showHyperlinkPopup: false | "info" | "editor";
838
834
  linkOpacity: number;
839
835
  trayModeEnabled: boolean;
@@ -162,7 +162,6 @@ export declare const actionGroup: {
162
162
  shown: true;
163
163
  data: import("../charts").Spreadsheet;
164
164
  };
165
- pendingImageElementId: string | null;
166
165
  showHyperlinkPopup: false | "info" | "editor";
167
166
  linkOpacity: number;
168
167
  trayModeEnabled: boolean;
@@ -391,7 +390,6 @@ export declare const actionUngroup: {
391
390
  shown: true;
392
391
  data: import("../charts").Spreadsheet;
393
392
  };
394
- pendingImageElementId: string | null;
395
393
  showHyperlinkPopup: false | "info" | "editor";
396
394
  linkOpacity: number;
397
395
  trayModeEnabled: boolean;
@@ -160,7 +160,6 @@ export declare const actionToggleLinearEditor: {
160
160
  shown: true;
161
161
  data: import("../charts").Spreadsheet;
162
162
  };
163
- pendingImageElementId: string | null;
164
163
  showHyperlinkPopup: false | "info" | "editor";
165
164
  linkOpacity: number;
166
165
  trayModeEnabled: boolean;
@@ -155,7 +155,6 @@ export declare const actionLink: {
155
155
  shown: true;
156
156
  data: import("../charts").Spreadsheet;
157
157
  };
158
- pendingImageElementId: string | null;
159
158
  linkOpacity: number;
160
159
  trayModeEnabled: boolean;
161
160
  colorPalette?: {
@@ -155,7 +155,6 @@ export declare const actionToggleCanvasMenu: {
155
155
  shown: true;
156
156
  data: import("../charts").Spreadsheet;
157
157
  };
158
- pendingImageElementId: string | null;
159
158
  showHyperlinkPopup: false | "info" | "editor";
160
159
  linkOpacity: number;
161
160
  trayModeEnabled: boolean;
@@ -376,7 +375,6 @@ export declare const actionToggleEditMenu: {
376
375
  shown: true;
377
376
  data: import("../charts").Spreadsheet;
378
377
  };
379
- pendingImageElementId: string | null;
380
378
  showHyperlinkPopup: false | "info" | "editor";
381
379
  linkOpacity: number;
382
380
  trayModeEnabled: boolean;
@@ -592,7 +590,6 @@ export declare const actionShortcuts: {
592
590
  shown: true;
593
591
  data: import("../charts").Spreadsheet;
594
592
  };
595
- pendingImageElementId: string | null;
596
593
  showHyperlinkPopup: false | "info" | "editor";
597
594
  linkOpacity: number;
598
595
  trayModeEnabled: boolean;
@@ -158,7 +158,6 @@ export declare const actionGoToCollaborator: {
158
158
  shown: true;
159
159
  data: import("../charts").Spreadsheet;
160
160
  };
161
- pendingImageElementId: string | null;
162
161
  showHyperlinkPopup: false | "info" | "editor";
163
162
  linkOpacity: number;
164
163
  trayModeEnabled: boolean;
@@ -371,7 +370,6 @@ export declare const actionGoToCollaborator: {
371
370
  shown: true;
372
371
  data: import("../charts").Spreadsheet;
373
372
  };
374
- pendingImageElementId: string | null;
375
373
  showHyperlinkPopup: false | "info" | "editor";
376
374
  linkOpacity: number;
377
375
  trayModeEnabled: boolean;
@@ -185,7 +185,6 @@ export declare const actionChangeFillStyle: {
185
185
  shown: true;
186
186
  data: import("../charts").Spreadsheet;
187
187
  };
188
- pendingImageElementId: string | null;
189
188
  showHyperlinkPopup: false | "info" | "editor";
190
189
  linkOpacity: number;
191
190
  trayModeEnabled: boolean;
@@ -405,7 +404,6 @@ export declare const actionChangeStrokeWidth: {
405
404
  shown: true;
406
405
  data: import("../charts").Spreadsheet;
407
406
  };
408
- pendingImageElementId: string | null;
409
407
  showHyperlinkPopup: false | "info" | "editor";
410
408
  linkOpacity: number;
411
409
  trayModeEnabled: boolean;
@@ -625,7 +623,6 @@ export declare const actionChangeSloppiness: {
625
623
  shown: true;
626
624
  data: import("../charts").Spreadsheet;
627
625
  };
628
- pendingImageElementId: string | null;
629
626
  showHyperlinkPopup: false | "info" | "editor";
630
627
  linkOpacity: number;
631
628
  trayModeEnabled: boolean;
@@ -845,7 +842,6 @@ export declare const actionChangeStrokeStyle: {
845
842
  shown: true;
846
843
  data: import("../charts").Spreadsheet;
847
844
  };
848
- pendingImageElementId: string | null;
849
845
  showHyperlinkPopup: false | "info" | "editor";
850
846
  linkOpacity: number;
851
847
  trayModeEnabled: boolean;
@@ -1065,7 +1061,6 @@ export declare const actionChangeOpacity: {
1065
1061
  shown: true;
1066
1062
  data: import("../charts").Spreadsheet;
1067
1063
  };
1068
- pendingImageElementId: string | null;
1069
1064
  showHyperlinkPopup: false | "info" | "editor";
1070
1065
  linkOpacity: number;
1071
1066
  trayModeEnabled: boolean;
@@ -1286,7 +1281,6 @@ export declare const actionChangeFontSize: {
1286
1281
  shown: true;
1287
1282
  data: import("../charts").Spreadsheet;
1288
1283
  };
1289
- pendingImageElementId: string | null;
1290
1284
  showHyperlinkPopup: false | "info" | "editor";
1291
1285
  linkOpacity: number;
1292
1286
  trayModeEnabled: boolean;
@@ -1507,7 +1501,6 @@ export declare const actionDecreaseFontSize: {
1507
1501
  shown: true;
1508
1502
  data: import("../charts").Spreadsheet;
1509
1503
  };
1510
- pendingImageElementId: string | null;
1511
1504
  showHyperlinkPopup: false | "info" | "editor";
1512
1505
  linkOpacity: number;
1513
1506
  trayModeEnabled: boolean;
@@ -1728,7 +1721,6 @@ export declare const actionIncreaseFontSize: {
1728
1721
  shown: true;
1729
1722
  data: import("../charts").Spreadsheet;
1730
1723
  };
1731
- pendingImageElementId: string | null;
1732
1724
  showHyperlinkPopup: false | "info" | "editor";
1733
1725
  linkOpacity: number;
1734
1726
  trayModeEnabled: boolean;
@@ -1947,7 +1939,6 @@ export declare const actionChangeFontFamily: {
1947
1939
  shown: true;
1948
1940
  data: import("../charts").Spreadsheet;
1949
1941
  };
1950
- pendingImageElementId: string | null;
1951
1942
  showHyperlinkPopup: false | "info" | "editor";
1952
1943
  linkOpacity: number;
1953
1944
  trayModeEnabled: boolean;
@@ -2158,7 +2149,6 @@ export declare const actionChangeFontFamily: {
2158
2149
  shown: true;
2159
2150
  data: import("../charts").Spreadsheet;
2160
2151
  };
2161
- pendingImageElementId: string | null;
2162
2152
  showHyperlinkPopup: false | "info" | "editor";
2163
2153
  linkOpacity: number;
2164
2154
  trayModeEnabled: boolean;
@@ -2378,7 +2368,6 @@ export declare const actionChangeTextAlign: {
2378
2368
  shown: true;
2379
2369
  data: import("../charts").Spreadsheet;
2380
2370
  };
2381
- pendingImageElementId: string | null;
2382
2371
  showHyperlinkPopup: false | "info" | "editor";
2383
2372
  linkOpacity: number;
2384
2373
  trayModeEnabled: boolean;
@@ -2600,7 +2589,6 @@ export declare const actionChangeVerticalAlign: {
2600
2589
  shown: true;
2601
2590
  data: import("../charts").Spreadsheet;
2602
2591
  };
2603
- pendingImageElementId: string | null;
2604
2592
  showHyperlinkPopup: false | "info" | "editor";
2605
2593
  linkOpacity: number;
2606
2594
  trayModeEnabled: boolean;
@@ -2820,7 +2808,6 @@ export declare const actionChangeRoundness: {
2820
2808
  shown: true;
2821
2809
  data: import("../charts").Spreadsheet;
2822
2810
  };
2823
- pendingImageElementId: string | null;
2824
2811
  showHyperlinkPopup: false | "info" | "editor";
2825
2812
  linkOpacity: number;
2826
2813
  trayModeEnabled: boolean;
@@ -3043,7 +3030,6 @@ export declare const actionChangeArrowhead: {
3043
3030
  shown: true;
3044
3031
  data: import("../charts").Spreadsheet;
3045
3032
  };
3046
- pendingImageElementId: string | null;
3047
3033
  showHyperlinkPopup: false | "info" | "editor";
3048
3034
  linkOpacity: number;
3049
3035
  trayModeEnabled: boolean;
@@ -3263,7 +3249,6 @@ export declare const actionChangeArrowType: {
3263
3249
  shown: true;
3264
3250
  data: import("../charts").Spreadsheet;
3265
3251
  };
3266
- pendingImageElementId: string | null;
3267
3252
  showHyperlinkPopup: false | "info" | "editor";
3268
3253
  linkOpacity: number;
3269
3254
  trayModeEnabled: boolean;
@@ -160,7 +160,6 @@ export declare const actionSelectAll: {
160
160
  shown: true;
161
161
  data: import("../charts").Spreadsheet;
162
162
  };
163
- pendingImageElementId: string | null;
164
163
  showHyperlinkPopup: false | "info" | "editor";
165
164
  linkOpacity: number;
166
165
  trayModeEnabled: boolean;
@@ -155,7 +155,6 @@ export declare const actionCopyStyles: {
155
155
  shown: true;
156
156
  data: import("../charts").Spreadsheet;
157
157
  };
158
- pendingImageElementId: string | null;
159
158
  showHyperlinkPopup: false | "info" | "editor";
160
159
  linkOpacity: number;
161
160
  trayModeEnabled: boolean;
@@ -161,7 +161,6 @@ export declare const actionToggleGridMode: {
161
161
  shown: true;
162
162
  data: import("../charts").Spreadsheet;
163
163
  };
164
- pendingImageElementId: string | null;
165
164
  showHyperlinkPopup: false | "info" | "editor";
166
165
  linkOpacity: number;
167
166
  trayModeEnabled: boolean;
@@ -159,7 +159,6 @@ export declare const actionToggleObjectsSnapMode: {
159
159
  shown: true;
160
160
  data: import("../charts").Spreadsheet;
161
161
  };
162
- pendingImageElementId: string | null;
163
162
  showHyperlinkPopup: false | "info" | "editor";
164
163
  linkOpacity: number;
165
164
  trayModeEnabled: boolean;
@@ -151,7 +151,6 @@ export declare const actionToggleSearchMenu: {
151
151
  shown: true;
152
152
  data: import("../charts").Spreadsheet;
153
153
  };
154
- pendingImageElementId: string | null;
155
154
  showHyperlinkPopup: false | "info" | "editor";
156
155
  linkOpacity: number;
157
156
  trayModeEnabled: boolean;
@@ -158,7 +158,6 @@ export declare const actionToggleStats: {
158
158
  shown: true;
159
159
  data: import("../charts").Spreadsheet;
160
160
  };
161
- pendingImageElementId: string | null;
162
161
  showHyperlinkPopup: false | "info" | "editor";
163
162
  linkOpacity: number;
164
163
  trayModeEnabled: boolean;
@@ -158,7 +158,6 @@ export declare const actionToggleViewMode: {
158
158
  shown: true;
159
159
  data: import("../charts").Spreadsheet;
160
160
  };
161
- pendingImageElementId: string | null;
162
161
  showHyperlinkPopup: false | "info" | "editor";
163
162
  linkOpacity: number;
164
163
  trayModeEnabled: boolean;
@@ -158,7 +158,6 @@ export declare const actionToggleZenMode: {
158
158
  shown: true;
159
159
  data: import("../charts").Spreadsheet;
160
160
  };
161
- pendingImageElementId: string | null;
162
161
  showHyperlinkPopup: false | "info" | "editor";
163
162
  linkOpacity: number;
164
163
  trayModeEnabled: boolean;
@@ -1,9 +1,6 @@
1
1
  import React from "react";
2
2
  import { type EXPORT_IMAGE_TYPES, Emitter } from "@excalidraw/common";
3
- import { LinearElementEditor } from "@excalidraw/element";
4
- import { FlowChartCreator } from "@excalidraw/element";
5
- import { Scene } from "@excalidraw/element";
6
- import type { ElementUpdate } from "@excalidraw/element";
3
+ import { LinearElementEditor, FlowChartCreator, Scene, type ElementUpdate } from "@excalidraw/element";
7
4
  import type { ExcalidrawElement, ExcalidrawLinearElement, NonDeleted, InitializedExcalidrawImageElement, ExcalidrawImageElement, NonDeletedExcalidrawElement, ExcalidrawFrameLikeElement, ExcalidrawIframeElement, ExcalidrawEmbeddableElement, Ordered } from "@excalidraw/element/types";
8
5
  import type { Mutable } from "@excalidraw/common/utility-types";
9
6
  import { ActionManager } from "../actions/manager";
@@ -431,12 +428,9 @@ declare class App extends React.Component<AppProps, AppState> {
431
428
  private onKeyDown;
432
429
  private onKeyUp;
433
430
  private isToolSupported;
434
- setActiveTool: (tool: (({
435
- type: Exclude<ToolType, "image">;
431
+ setActiveTool: (tool: ({
432
+ type: ToolType;
436
433
  } | {
437
- type: Extract<ToolType, "image">;
438
- insertOnCanvasDirectly?: boolean;
439
- }) | {
440
434
  type: "custom";
441
435
  customType: string;
442
436
  }) & {
@@ -462,7 +456,7 @@ declare class App extends React.Component<AppProps, AppState> {
462
456
  private getTextElementAtPosition;
463
457
  private getElementAtPosition;
464
458
  private getElementsAtPosition;
465
- getElementHitThreshold(): number;
459
+ getElementHitThreshold(element: ExcalidrawElement): number;
466
460
  private hitElement;
467
461
  private getTextBindableContainerAtPosition;
468
462
  private startTextEditing;
@@ -529,10 +523,10 @@ declare class App extends React.Component<AppProps, AppState> {
529
523
  /**
530
524
  * inserts image into elements array and rerenders
531
525
  */
532
- insertImageElement: (imageElement: ExcalidrawImageElement, imageFile: File, showCursorImagePreview?: boolean) => Promise<NonDeleted<InitializedExcalidrawImageElement> | null | undefined>;
533
- private setImagePreviewCursor;
526
+ insertImageElement: (imageElement: ExcalidrawImageElement, imageFile: File) => Promise<NonDeleted<InitializedExcalidrawImageElement> | null | undefined>;
534
527
  private onImageAction;
535
- initializeImageDimensions: (imageElement: ExcalidrawImageElement, forceNaturalSize?: boolean) => void;
528
+ initializeImageDimensions: (imageElement: ExcalidrawImageElement) => void;
529
+ private getImageNaturalDimensions;
536
530
  /** updates image cache, refreshing updated elements and/or setting status
537
531
  to error for images that fail during <img> element creation */
538
532
  private updateImageCache;
@@ -4,8 +4,6 @@ import type App from "../components/App";
4
4
  export declare class EraserTrail extends AnimatedTrail {
5
5
  private elementsToErase;
6
6
  private groupsToErase;
7
- private segmentsCache;
8
- private geometricShapesCache;
9
7
  constructor(animationFrameHandler: AnimationFrameHandler, app: App);
10
8
  startPath(x: number, y: number): void;
11
9
  addPointToPath(x: number, y: number, restore?: boolean): string[];
@@ -1,8 +1,25 @@
1
1
  import { Emitter } from "@excalidraw/common";
2
- import { StoreDelta, type Store } from "@excalidraw/element";
2
+ import { StoreDelta } from "@excalidraw/element";
3
+ import type { StoreSnapshot, Store } from "@excalidraw/element";
3
4
  import type { SceneElementsMap } from "@excalidraw/element/types";
4
5
  import type { AppState } from "./types";
5
- declare class HistoryEntry extends StoreDelta {
6
+ export declare class HistoryDelta extends StoreDelta {
7
+ /**
8
+ * Apply the delta to the passed elements and appState, does not modify the snapshot.
9
+ */
10
+ applyTo(elements: SceneElementsMap, appState: AppState, snapshot: StoreSnapshot): [SceneElementsMap, AppState, boolean];
11
+ /**
12
+ * Overriding once to avoid type casting everywhere.
13
+ */
14
+ static calculate(prevSnapshot: StoreSnapshot, nextSnapshot: StoreSnapshot): HistoryDelta;
15
+ /**
16
+ * Overriding once to avoid type casting everywhere.
17
+ */
18
+ static inverse(delta: StoreDelta): HistoryDelta;
19
+ /**
20
+ * Overriding once to avoid type casting everywhere.
21
+ */
22
+ static applyLatestChanges(delta: StoreDelta, prevElements: SceneElementsMap, nextElements: SceneElementsMap, modifierOptions?: "deleted" | "inserted"): HistoryDelta;
6
23
  }
7
24
  export declare class HistoryChangedEvent {
8
25
  readonly isUndoStackEmpty: boolean;
@@ -12,8 +29,8 @@ export declare class HistoryChangedEvent {
12
29
  export declare class History {
13
30
  private readonly store;
14
31
  readonly onHistoryChangedEmitter: Emitter<[HistoryChangedEvent]>;
15
- readonly undoStack: HistoryEntry[];
16
- readonly redoStack: HistoryEntry[];
32
+ readonly undoStack: HistoryDelta[];
33
+ readonly redoStack: HistoryDelta[];
17
34
  get isUndoStackEmpty(): boolean;
18
35
  get isRedoStackEmpty(): boolean;
19
36
  constructor(store: Store);
@@ -29,4 +46,3 @@ export declare class History {
29
46
  private static pop;
30
47
  private static push;
31
48
  }
32
- export {};
@@ -1,8 +1,9 @@
1
1
  import type { ElementsSegmentsMap, GlobalPoint } from "@excalidraw/math/types";
2
- import type { ExcalidrawElement } from "@excalidraw/element/types";
2
+ import type { ElementsMap, ExcalidrawElement } from "@excalidraw/element/types";
3
3
  export declare const getLassoSelectedElementIds: (input: {
4
4
  lassoPath: GlobalPoint[];
5
5
  elements: readonly ExcalidrawElement[];
6
+ elementsMap: ElementsMap;
6
7
  elementsSegments: ElementsSegmentsMap;
7
8
  intersectedElements: Set<ExcalidrawElement["id"]>;
8
9
  enclosedElements: Set<ExcalidrawElement["id"]>;
@@ -1,4 +1,4 @@
1
- import type { ExcalidrawDiamondElement, ExcalidrawRectanguloidElement } from "@excalidraw/element/types";
1
+ import type { ElementsMap, ExcalidrawDiamondElement, ExcalidrawRectanguloidElement } from "@excalidraw/element/types";
2
2
  import type { StaticCanvasRenderConfig } from "../scene/types";
3
3
  import type { AppState, StaticCanvasAppState } from "../types";
4
4
  export declare const fillCircle: (context: CanvasRenderingContext2D, cx: number, cy: number, radius: number, stroke: boolean, fill?: boolean) => void;
@@ -12,7 +12,7 @@ export declare const bootstrapCanvas: ({ canvas, scale, normalizedWidth, normali
12
12
  isExporting?: boolean | undefined;
13
13
  viewBackgroundColor?: string | null | undefined;
14
14
  }) => CanvasRenderingContext2D;
15
- export declare const drawHighlightForRectWithRotation: (context: CanvasRenderingContext2D, element: ExcalidrawRectanguloidElement, padding: number) => void;
15
+ export declare const drawHighlightForRectWithRotation: (context: CanvasRenderingContext2D, element: ExcalidrawRectanguloidElement, elementsMap: ElementsMap, padding: number) => void;
16
16
  export declare const strokeEllipseWithRotation: (context: CanvasRenderingContext2D, width: number, height: number, cx: number, cy: number, angle: number) => void;
17
17
  export declare const strokeRectWithRotation: (context: CanvasRenderingContext2D, x: number, y: number, width: number, height: number, cx: number, cy: number, angle: number, fill?: boolean, radius?: number) => void;
18
- export declare const drawHighlightForDiamondWithRotation: (context: CanvasRenderingContext2D, padding: number, element: ExcalidrawDiamondElement) => void;
18
+ export declare const drawHighlightForDiamondWithRotation: (context: CanvasRenderingContext2D, padding: number, element: ExcalidrawDiamondElement, elementsMap: ElementsMap) => void;
@@ -16,7 +16,6 @@ export declare class Renderer {
16
16
  /** note: first render of newElement will always bust the cache
17
17
  * (we'd have to prefilter elements outside of this function) */
18
18
  newElementId: ExcalidrawElement["id"] | undefined;
19
- pendingImageElementId: AppState["pendingImageElementId"];
20
19
  sceneNonce: ReturnType<InstanceType<typeof Scene>["getSceneNonce"]>;
21
20
  }) => {
22
21
  elementsMap: Map<string, NonDeletedExcalidrawElement> & import("@excalidraw/common/utility-types").MakeBrand<"NonDeletedElementsMap"> & import("@excalidraw/common/utility-types").MakeBrand<"RenderableElementsMap">;