@excalidraw/excalidraw 0.18.0-195a743 → 0.18.0-200a6bd94

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 (166) hide show
  1. package/dist/dev/chunk-CP5DND7P.js +7 -0
  2. package/dist/dev/chunk-CP5DND7P.js.map +7 -0
  3. package/dist/dev/{chunk-T3M44BFV.js → chunk-QF5FRM6O.js} +12 -4
  4. package/dist/dev/chunk-QF5FRM6O.js.map +7 -0
  5. package/dist/dev/chunk-VISTIWDQ.js +5668 -0
  6. package/dist/dev/chunk-VISTIWDQ.js.map +7 -0
  7. package/dist/dev/data/{image-TTQKTTOH.js → image-XM2PNARE.js} +3 -3
  8. package/dist/dev/index.css +89 -22
  9. package/dist/dev/index.css.map +3 -3
  10. package/dist/dev/index.js +7634 -9487
  11. package/dist/dev/index.js.map +4 -4
  12. package/dist/dev/locales/{en-I23TB6DJ.js → en-SMAPCEOQ.js} +2 -2
  13. package/dist/dev/subset-shared.chunk.js +1 -1
  14. package/dist/dev/subset-worker.chunk.js +1 -1
  15. package/dist/prod/chunk-A66AFZZU.js +7 -0
  16. package/dist/prod/chunk-I4UNSFV6.js +12 -0
  17. package/dist/prod/chunk-YZO7PSYQ.js +4 -0
  18. package/dist/prod/data/image-53OPA26C.js +1 -0
  19. package/dist/prod/index.css +1 -1
  20. package/dist/prod/index.js +26 -19
  21. package/dist/prod/locales/{en-TC3OFDA6.js → en-TYY6KWIJ.js} +1 -1
  22. package/dist/prod/subset-shared.chunk.js +1 -1
  23. package/dist/prod/subset-worker.chunk.js +1 -1
  24. package/dist/types/common/src/constants.d.ts +20 -3
  25. package/dist/types/{excalidraw → common/src}/emitter.d.ts +1 -1
  26. package/dist/types/common/src/font-metadata.d.ts +4 -2
  27. package/dist/types/common/src/index.d.ts +1 -0
  28. package/dist/types/common/src/utility-types.d.ts +5 -0
  29. package/dist/types/common/src/utils.d.ts +15 -5
  30. package/dist/types/element/src/Scene.d.ts +4 -4
  31. package/dist/types/element/src/align.d.ts +3 -2
  32. package/dist/types/element/src/binding.d.ts +11 -8
  33. package/dist/types/element/src/bounds.d.ts +12 -4
  34. package/dist/types/element/src/collision.d.ts +18 -12
  35. package/dist/types/element/src/cropElement.d.ts +1 -1
  36. package/dist/types/{excalidraw/change.d.ts → element/src/delta.d.ts} +73 -38
  37. package/dist/types/element/src/distance.d.ts +2 -2
  38. package/dist/types/element/src/distribute.d.ts +2 -1
  39. package/dist/types/element/src/dragElements.d.ts +1 -1
  40. package/dist/types/element/src/flowchart.d.ts +1 -1
  41. package/dist/types/element/src/fractionalIndex.d.ts +8 -2
  42. package/dist/types/element/src/frame.d.ts +3 -2
  43. package/dist/types/element/src/groups.d.ts +1 -0
  44. package/dist/types/element/src/index.d.ts +43 -2
  45. package/dist/types/element/src/linearElementEditor.d.ts +17 -30
  46. package/dist/types/element/src/mutateElement.d.ts +1 -1
  47. package/dist/types/element/src/newElement.d.ts +3 -2
  48. package/dist/types/element/src/resizeElements.d.ts +2 -1
  49. package/dist/types/element/src/selection.d.ts +0 -5
  50. package/dist/types/element/src/shape.d.ts +42 -0
  51. package/dist/types/element/src/sizeHelpers.d.ts +2 -1
  52. package/dist/types/element/src/store.d.ts +232 -0
  53. package/dist/types/element/src/textElement.d.ts +1 -1
  54. package/dist/types/element/src/typeChecks.d.ts +16 -1
  55. package/dist/types/element/src/types.d.ts +13 -3
  56. package/dist/types/element/src/utils.d.ts +16 -6
  57. package/dist/types/element/src/zindex.d.ts +3 -3
  58. package/dist/types/excalidraw/actions/actionAddToLibrary.d.ts +36 -48
  59. package/dist/types/excalidraw/actions/actionBoundText.d.ts +24 -32
  60. package/dist/types/excalidraw/actions/actionCanvas.d.ts +160 -212
  61. package/dist/types/excalidraw/actions/actionClipboard.d.ts +72 -94
  62. package/dist/types/excalidraw/actions/actionCropEditor.d.ts +12 -16
  63. package/dist/types/excalidraw/actions/actionDeleteSelected.d.ts +36 -47
  64. package/dist/types/excalidraw/actions/actionElementLink.d.ts +11 -15
  65. package/dist/types/excalidraw/actions/actionElementLock.d.ts +39 -48
  66. package/dist/types/excalidraw/actions/actionEmbeddable.d.ts +12 -16
  67. package/dist/types/excalidraw/actions/actionExport.d.ts +118 -154
  68. package/dist/types/excalidraw/actions/actionFinalize.d.ts +71 -38
  69. package/dist/types/excalidraw/actions/actionFrame.d.ts +95 -111
  70. package/dist/types/excalidraw/actions/actionGroup.d.ts +24 -32
  71. package/dist/types/excalidraw/actions/actionHistory.d.ts +1 -2
  72. package/dist/types/excalidraw/actions/actionLinearEditor.d.ts +537 -17
  73. package/dist/types/excalidraw/actions/actionLink.d.ts +12 -16
  74. package/dist/types/excalidraw/actions/actionMenu.d.ts +35 -47
  75. package/dist/types/excalidraw/actions/actionNavigate.d.ts +24 -32
  76. package/dist/types/excalidraw/actions/actionProperties.d.ts +186 -238
  77. package/dist/types/excalidraw/actions/actionSelectAll.d.ts +12 -16
  78. package/dist/types/excalidraw/actions/actionStyles.d.ts +12 -16
  79. package/dist/types/excalidraw/actions/actionToggleGridMode.d.ts +12 -16
  80. package/dist/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +12 -16
  81. package/dist/types/excalidraw/actions/actionToggleSearchMenu.d.ts +11 -188
  82. package/dist/types/excalidraw/actions/actionToggleStats.d.ts +12 -16
  83. package/dist/types/excalidraw/actions/actionToggleViewMode.d.ts +12 -16
  84. package/dist/types/excalidraw/actions/actionToggleZenMode.d.ts +12 -16
  85. package/dist/types/excalidraw/actions/actionZindex.d.ts +2 -2
  86. package/dist/types/excalidraw/actions/types.d.ts +3 -2
  87. package/dist/types/excalidraw/appState.d.ts +16 -7
  88. package/dist/types/excalidraw/components/Actions.d.ts +0 -4
  89. package/dist/types/excalidraw/components/App.d.ts +18 -20
  90. package/dist/types/excalidraw/components/ButtonIcon.d.ts +1 -0
  91. package/dist/types/excalidraw/components/ColorPicker/ColorInput.d.ts +2 -1
  92. package/dist/types/excalidraw/components/ColorPicker/ColorPicker.d.ts +5 -1
  93. package/dist/types/excalidraw/components/ColorPicker/CustomColorList.d.ts +1 -1
  94. package/dist/types/excalidraw/components/ColorPicker/Picker.d.ts +2 -3
  95. package/dist/types/excalidraw/components/ColorPicker/PickerColorList.d.ts +2 -3
  96. package/dist/types/excalidraw/components/ColorPicker/ShadeList.d.ts +2 -2
  97. package/dist/types/excalidraw/components/ColorPicker/TopPicks.d.ts +1 -1
  98. package/dist/types/excalidraw/components/ColorPicker/colorPickerUtils.d.ts +1 -1
  99. package/dist/types/excalidraw/components/ColorPicker/keyboardNavHandlers.d.ts +1 -1
  100. package/dist/types/excalidraw/components/ConvertElementTypePopup.d.ts +2 -28
  101. package/dist/types/excalidraw/components/ElementLinkDialog.d.ts +1 -1
  102. package/dist/types/excalidraw/components/Ellipsify.d.ts +4 -0
  103. package/dist/types/excalidraw/components/{ButtonIconSelect.d.ts → RadioSelection.d.ts} +1 -1
  104. package/dist/types/excalidraw/components/Range.d.ts +3 -3
  105. package/dist/types/excalidraw/components/Stats/Angle.d.ts +1 -1
  106. package/dist/types/excalidraw/components/Stats/CanvasGrid.d.ts +1 -1
  107. package/dist/types/excalidraw/components/Stats/Collapsible.d.ts +2 -1
  108. package/dist/types/excalidraw/components/Stats/Dimension.d.ts +1 -1
  109. package/dist/types/excalidraw/components/Stats/DragInput.d.ts +12 -2
  110. package/dist/types/excalidraw/components/Stats/FontSize.d.ts +1 -1
  111. package/dist/types/excalidraw/components/Stats/MultiAngle.d.ts +1 -1
  112. package/dist/types/excalidraw/components/Stats/MultiDimension.d.ts +1 -1
  113. package/dist/types/excalidraw/components/Stats/MultiFontSize.d.ts +1 -1
  114. package/dist/types/excalidraw/components/Stats/MultiPosition.d.ts +1 -1
  115. package/dist/types/excalidraw/components/Stats/Position.d.ts +1 -1
  116. package/dist/types/excalidraw/components/Stats/utils.d.ts +2 -1
  117. package/dist/types/excalidraw/components/UnlockPopup.d.ts +8 -0
  118. package/dist/types/excalidraw/components/hyperlink/Hyperlink.d.ts +1 -1
  119. package/dist/types/excalidraw/components/hyperlink/helpers.d.ts +2 -1
  120. package/dist/types/excalidraw/components/icons.d.ts +3 -0
  121. package/dist/types/excalidraw/components/shapes.d.ts +1 -1
  122. package/dist/types/excalidraw/data/reconcile.d.ts +1 -0
  123. package/dist/types/excalidraw/data/transform.d.ts +1 -1
  124. package/dist/types/excalidraw/eraser/index.d.ts +0 -2
  125. package/dist/types/excalidraw/fonts/Fonts.d.ts +1 -1
  126. package/dist/types/excalidraw/history.d.ts +30 -22
  127. package/dist/types/excalidraw/hooks/useEmitter.d.ts +1 -1
  128. package/dist/types/excalidraw/index.d.ts +10 -9
  129. package/dist/types/excalidraw/lasso/index.d.ts +1 -0
  130. package/dist/types/excalidraw/lasso/utils.d.ts +2 -1
  131. package/dist/types/excalidraw/renderer/helpers.d.ts +7 -2
  132. package/dist/types/excalidraw/renderer/staticScene.d.ts +4 -1
  133. package/dist/types/excalidraw/scene/Renderer.d.ts +1 -2
  134. package/dist/types/excalidraw/scene/index.d.ts +2 -2
  135. package/dist/types/excalidraw/snapping.d.ts +2 -2
  136. package/dist/types/excalidraw/types.d.ts +27 -14
  137. package/dist/types/math/src/angle.d.ts +2 -0
  138. package/dist/types/math/src/constants.d.ts +3 -0
  139. package/dist/types/math/src/curve.d.ts +34 -0
  140. package/dist/types/math/src/index.d.ts +1 -0
  141. package/dist/types/math/src/point.d.ts +1 -1
  142. package/dist/types/math/src/rectangle.d.ts +2 -0
  143. package/dist/types/math/src/vector.d.ts +8 -2
  144. package/dist/types/utils/src/bbox.d.ts +1 -1
  145. package/dist/types/utils/src/index.d.ts +1 -1
  146. package/dist/types/utils/src/withinBounds.d.ts +1 -1
  147. package/history.ts +147 -110
  148. package/package.json +12 -9
  149. package/dist/dev/chunk-H3EW23X2.js +0 -18294
  150. package/dist/dev/chunk-H3EW23X2.js.map +0 -7
  151. package/dist/dev/chunk-T3M44BFV.js.map +0 -7
  152. package/dist/dev/chunk-WMGEUIQQ.js +0 -7
  153. package/dist/dev/chunk-WMGEUIQQ.js.map +0 -7
  154. package/dist/prod/chunk-2Z7RPVPO.js +0 -12
  155. package/dist/prod/chunk-7M43VNIB.js +0 -33
  156. package/dist/prod/chunk-GK4XUKZB.js +0 -7
  157. package/dist/prod/data/image-7YYIWLVQ.js +0 -1
  158. package/dist/types/element/src/Shape.d.ts +0 -17
  159. package/dist/types/element/src/ShapeCache.d.ts +0 -25
  160. package/dist/types/element/src/shapes.d.ts +0 -23
  161. package/dist/types/excalidraw/components/ButtonSelect.d.ts +0 -9
  162. package/dist/types/excalidraw/store.d.ts +0 -129
  163. package/dist/types/excalidraw/visualdebug.d.ts +0 -41
  164. package/dist/types/utils/src/collision.d.ts +0 -8
  165. /package/dist/dev/data/{image-TTQKTTOH.js.map → image-XM2PNARE.js.map} +0 -0
  166. /package/dist/dev/locales/{en-I23TB6DJ.js.map → en-SMAPCEOQ.js.map} +0 -0
@@ -21,7 +21,7 @@ export declare const actionSelectAllElementsInFrame: {
21
21
  errorMessage: import("react").ReactNode;
22
22
  activeEmbeddable: {
23
23
  element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
24
- state: "hover" | "active";
24
+ state: "active" | "hover";
25
25
  } | null;
26
26
  newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
27
27
  resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
@@ -29,7 +29,7 @@ export declare const actionSelectAllElementsInFrame: {
29
29
  selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
30
30
  isBindingEnabled: boolean;
31
31
  startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
32
- suggestedBindings: import("@excalidraw/element/binding").SuggestedBinding[];
32
+ suggestedBindings: import("@excalidraw/element").SuggestedBinding[];
33
33
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
34
34
  frameRendering: {
35
35
  enabled: boolean;
@@ -40,7 +40,6 @@ export declare const actionSelectAllElementsInFrame: {
40
40
  editingFrame: string | null;
41
41
  elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
42
42
  editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
43
- editingLinearElement: import("@excalidraw/element/linearElementEditor").LinearElementEditor | null;
44
43
  activeTool: {
45
44
  lastActiveTool: import("../types").ActiveTool | null;
46
45
  locked: boolean;
@@ -88,7 +87,7 @@ export declare const actionSelectAllElementsInFrame: {
88
87
  name: "imageExport" | "help" | "jsonExport";
89
88
  } | {
90
89
  name: "ttd";
91
- tab: "text-to-diagram" | "mermaid";
90
+ tab: "mermaid" | "text-to-diagram";
92
91
  } | {
93
92
  name: "commandPalette";
94
93
  } | {
@@ -157,9 +156,8 @@ export declare const actionSelectAllElementsInFrame: {
157
156
  shown: true;
158
157
  data: import("../charts").Spreadsheet;
159
158
  };
160
- pendingImageElementId: string | null;
161
159
  showHyperlinkPopup: false | "editor" | "info";
162
- selectedLinearElement: import("@excalidraw/element/linearElementEditor").LinearElementEditor | null;
160
+ selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
163
161
  snapLines: readonly import("../snapping").SnapLine[];
164
162
  originSnapOffset: {
165
163
  x: number;
@@ -170,16 +168,14 @@ export declare const actionSelectAllElementsInFrame: {
170
168
  followedBy: Set<import("../types").SocketId>;
171
169
  isCropping: boolean;
172
170
  croppingElementId: string | null;
173
- searchMatches: readonly {
174
- id: string;
175
- focus: boolean;
176
- matchedLines: {
177
- offsetX: number;
178
- offsetY: number;
179
- width: number;
180
- height: number;
181
- }[];
182
- }[];
171
+ searchMatches: Readonly<{
172
+ focusedId: string | null;
173
+ matches: readonly import("../types").SearchMatch[];
174
+ }> | null;
175
+ activeLockedId: string | null;
176
+ lockedMultiSelections: {
177
+ [groupId: string]: true;
178
+ };
183
179
  };
184
180
  captureUpdate: "IMMEDIATELY";
185
181
  } | {
@@ -213,7 +209,7 @@ export declare const actionRemoveAllElementsFromFrame: {
213
209
  errorMessage: import("react").ReactNode;
214
210
  activeEmbeddable: {
215
211
  element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
216
- state: "hover" | "active";
212
+ state: "active" | "hover";
217
213
  } | null;
218
214
  newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
219
215
  resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
@@ -221,7 +217,7 @@ export declare const actionRemoveAllElementsFromFrame: {
221
217
  selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
222
218
  isBindingEnabled: boolean;
223
219
  startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
224
- suggestedBindings: import("@excalidraw/element/binding").SuggestedBinding[];
220
+ suggestedBindings: import("@excalidraw/element").SuggestedBinding[];
225
221
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
226
222
  frameRendering: {
227
223
  enabled: boolean;
@@ -232,7 +228,6 @@ export declare const actionRemoveAllElementsFromFrame: {
232
228
  editingFrame: string | null;
233
229
  elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
234
230
  editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
235
- editingLinearElement: import("@excalidraw/element/linearElementEditor").LinearElementEditor | null;
236
231
  activeTool: {
237
232
  lastActiveTool: import("../types").ActiveTool | null;
238
233
  locked: boolean;
@@ -280,7 +275,7 @@ export declare const actionRemoveAllElementsFromFrame: {
280
275
  name: "imageExport" | "help" | "jsonExport";
281
276
  } | {
282
277
  name: "ttd";
283
- tab: "text-to-diagram" | "mermaid";
278
+ tab: "mermaid" | "text-to-diagram";
284
279
  } | {
285
280
  name: "commandPalette";
286
281
  } | {
@@ -349,9 +344,8 @@ export declare const actionRemoveAllElementsFromFrame: {
349
344
  shown: true;
350
345
  data: import("../charts").Spreadsheet;
351
346
  };
352
- pendingImageElementId: string | null;
353
347
  showHyperlinkPopup: false | "editor" | "info";
354
- selectedLinearElement: import("@excalidraw/element/linearElementEditor").LinearElementEditor | null;
348
+ selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
355
349
  snapLines: readonly import("../snapping").SnapLine[];
356
350
  originSnapOffset: {
357
351
  x: number;
@@ -362,16 +356,14 @@ export declare const actionRemoveAllElementsFromFrame: {
362
356
  followedBy: Set<import("../types").SocketId>;
363
357
  isCropping: boolean;
364
358
  croppingElementId: string | null;
365
- searchMatches: readonly {
366
- id: string;
367
- focus: boolean;
368
- matchedLines: {
369
- offsetX: number;
370
- offsetY: number;
371
- width: number;
372
- height: number;
373
- }[];
374
- }[];
359
+ searchMatches: Readonly<{
360
+ focusedId: string | null;
361
+ matches: readonly import("../types").SearchMatch[];
362
+ }> | null;
363
+ activeLockedId: string | null;
364
+ lockedMultiSelections: {
365
+ [groupId: string]: true;
366
+ };
375
367
  };
376
368
  captureUpdate: "IMMEDIATELY";
377
369
  } | {
@@ -409,7 +401,7 @@ export declare const actionupdateFrameRendering: {
409
401
  errorMessage: import("react").ReactNode;
410
402
  activeEmbeddable: {
411
403
  element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
412
- state: "hover" | "active";
404
+ state: "active" | "hover";
413
405
  } | null;
414
406
  newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
415
407
  resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
@@ -417,12 +409,11 @@ export declare const actionupdateFrameRendering: {
417
409
  selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
418
410
  isBindingEnabled: boolean;
419
411
  startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
420
- suggestedBindings: import("@excalidraw/element/binding").SuggestedBinding[];
412
+ suggestedBindings: import("@excalidraw/element").SuggestedBinding[];
421
413
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
422
414
  editingFrame: string | null;
423
415
  elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
424
416
  editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
425
- editingLinearElement: import("@excalidraw/element/linearElementEditor").LinearElementEditor | null;
426
417
  activeTool: {
427
418
  lastActiveTool: import("../types").ActiveTool | null;
428
419
  locked: boolean;
@@ -470,7 +461,7 @@ export declare const actionupdateFrameRendering: {
470
461
  name: "imageExport" | "help" | "jsonExport";
471
462
  } | {
472
463
  name: "ttd";
473
- tab: "text-to-diagram" | "mermaid";
464
+ tab: "mermaid" | "text-to-diagram";
474
465
  } | {
475
466
  name: "commandPalette";
476
467
  } | {
@@ -542,9 +533,8 @@ export declare const actionupdateFrameRendering: {
542
533
  shown: true;
543
534
  data: import("../charts").Spreadsheet;
544
535
  };
545
- pendingImageElementId: string | null;
546
536
  showHyperlinkPopup: false | "editor" | "info";
547
- selectedLinearElement: import("@excalidraw/element/linearElementEditor").LinearElementEditor | null;
537
+ selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
548
538
  snapLines: readonly import("../snapping").SnapLine[];
549
539
  originSnapOffset: {
550
540
  x: number;
@@ -555,16 +545,14 @@ export declare const actionupdateFrameRendering: {
555
545
  followedBy: Set<import("../types").SocketId>;
556
546
  isCropping: boolean;
557
547
  croppingElementId: string | null;
558
- searchMatches: readonly {
559
- id: string;
560
- focus: boolean;
561
- matchedLines: {
562
- offsetX: number;
563
- offsetY: number;
564
- width: number;
565
- height: number;
566
- }[];
567
- }[];
548
+ searchMatches: Readonly<{
549
+ focusedId: string | null;
550
+ matches: readonly import("../types").SearchMatch[];
551
+ }> | null;
552
+ activeLockedId: string | null;
553
+ lockedMultiSelections: {
554
+ [groupId: string]: true;
555
+ };
568
556
  };
569
557
  captureUpdate: "EVENTUALLY";
570
558
  };
@@ -598,7 +586,7 @@ export declare const actionSetFrameAsActiveTool: {
598
586
  errorMessage: import("react").ReactNode;
599
587
  activeEmbeddable: {
600
588
  element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
601
- state: "hover" | "active";
589
+ state: "active" | "hover";
602
590
  } | null;
603
591
  newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
604
592
  resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
@@ -606,7 +594,7 @@ export declare const actionSetFrameAsActiveTool: {
606
594
  selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
607
595
  isBindingEnabled: boolean;
608
596
  startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
609
- suggestedBindings: import("@excalidraw/element/binding").SuggestedBinding[];
597
+ suggestedBindings: import("@excalidraw/element").SuggestedBinding[];
610
598
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
611
599
  frameRendering: {
612
600
  enabled: boolean;
@@ -617,7 +605,6 @@ export declare const actionSetFrameAsActiveTool: {
617
605
  editingFrame: string | null;
618
606
  elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
619
607
  editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
620
- editingLinearElement: import("@excalidraw/element/linearElementEditor").LinearElementEditor | null;
621
608
  penMode: boolean;
622
609
  penDetected: boolean;
623
610
  exportBackground: boolean;
@@ -660,7 +647,7 @@ export declare const actionSetFrameAsActiveTool: {
660
647
  name: "imageExport" | "help" | "jsonExport";
661
648
  } | {
662
649
  name: "ttd";
663
- tab: "text-to-diagram" | "mermaid";
650
+ tab: "mermaid" | "text-to-diagram";
664
651
  } | {
665
652
  name: "commandPalette";
666
653
  } | {
@@ -732,9 +719,8 @@ export declare const actionSetFrameAsActiveTool: {
732
719
  shown: true;
733
720
  data: import("../charts").Spreadsheet;
734
721
  };
735
- pendingImageElementId: string | null;
736
722
  showHyperlinkPopup: false | "editor" | "info";
737
- selectedLinearElement: import("@excalidraw/element/linearElementEditor").LinearElementEditor | null;
723
+ selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
738
724
  snapLines: readonly import("../snapping").SnapLine[];
739
725
  originSnapOffset: {
740
726
  x: number;
@@ -745,16 +731,14 @@ export declare const actionSetFrameAsActiveTool: {
745
731
  followedBy: Set<import("../types").SocketId>;
746
732
  isCropping: boolean;
747
733
  croppingElementId: string | null;
748
- searchMatches: readonly {
749
- id: string;
750
- focus: boolean;
751
- matchedLines: {
752
- offsetX: number;
753
- offsetY: number;
754
- width: number;
755
- height: number;
756
- }[];
757
- }[];
734
+ searchMatches: Readonly<{
735
+ focusedId: string | null;
736
+ matches: readonly import("../types").SearchMatch[];
737
+ }> | null;
738
+ activeLockedId: string | null;
739
+ lockedMultiSelections: {
740
+ [groupId: string]: true;
741
+ };
758
742
  };
759
743
  captureUpdate: "EVENTUALLY";
760
744
  };
@@ -797,15 +781,21 @@ export declare const actionWrapSelectionInFrame: {
797
781
  frameId: string | null;
798
782
  boundElements: readonly Readonly<{
799
783
  id: string;
800
- type: "text" | "arrow";
784
+ type: "arrow" | "text";
801
785
  }>[] | null;
802
786
  updated: number;
803
787
  link: string | null;
804
788
  locked: boolean;
805
789
  customData?: Record<string, any> | undefined;
790
+ }> & Readonly<{
791
+ type: "line" | "arrow";
792
+ points: readonly import("@excalidraw/math").LocalPoint[];
793
+ lastCommittedPoint: import("@excalidraw/math").LocalPoint | null;
794
+ startBinding: import("@excalidraw/element/types").PointBinding | null;
795
+ endBinding: import("@excalidraw/element/types").PointBinding | null;
796
+ startArrowhead: import("@excalidraw/element/types").Arrowhead | null;
797
+ endArrowhead: import("@excalidraw/element/types").Arrowhead | null;
806
798
  }> & {
807
- type: "rectangle";
808
- } & {
809
799
  index: import("@excalidraw/element/types").FractionalIndex;
810
800
  }) | (Readonly<{
811
801
  id: string;
@@ -834,14 +824,14 @@ export declare const actionWrapSelectionInFrame: {
834
824
  frameId: string | null;
835
825
  boundElements: readonly Readonly<{
836
826
  id: string;
837
- type: "text" | "arrow";
827
+ type: "arrow" | "text";
838
828
  }>[] | null;
839
829
  updated: number;
840
830
  link: string | null;
841
831
  locked: boolean;
842
832
  customData?: Record<string, any> | undefined;
843
833
  }> & {
844
- type: "diamond";
834
+ type: "selection";
845
835
  } & {
846
836
  index: import("@excalidraw/element/types").FractionalIndex;
847
837
  }) | (Readonly<{
@@ -871,15 +861,14 @@ export declare const actionWrapSelectionInFrame: {
871
861
  frameId: string | null;
872
862
  boundElements: readonly Readonly<{
873
863
  id: string;
874
- type: "text" | "arrow";
864
+ type: "arrow" | "text";
875
865
  }>[] | null;
876
866
  updated: number;
877
867
  link: string | null;
878
868
  locked: boolean;
879
869
  customData?: Record<string, any> | undefined;
880
870
  }> & {
881
- type: "frame";
882
- name: string | null;
871
+ type: "rectangle";
883
872
  } & {
884
873
  index: import("@excalidraw/element/types").FractionalIndex;
885
874
  }) | (Readonly<{
@@ -909,15 +898,14 @@ export declare const actionWrapSelectionInFrame: {
909
898
  frameId: string | null;
910
899
  boundElements: readonly Readonly<{
911
900
  id: string;
912
- type: "text" | "arrow";
901
+ type: "arrow" | "text";
913
902
  }>[] | null;
914
903
  updated: number;
915
904
  link: string | null;
916
905
  locked: boolean;
917
906
  customData?: Record<string, any> | undefined;
918
907
  }> & {
919
- type: "magicframe";
920
- name: string | null;
908
+ type: "diamond";
921
909
  } & {
922
910
  index: import("@excalidraw/element/types").FractionalIndex;
923
911
  }) | (Readonly<{
@@ -947,15 +935,15 @@ export declare const actionWrapSelectionInFrame: {
947
935
  frameId: string | null;
948
936
  boundElements: readonly Readonly<{
949
937
  id: string;
950
- type: "text" | "arrow";
938
+ type: "arrow" | "text";
951
939
  }>[] | null;
952
940
  updated: number;
953
941
  link: string | null;
954
942
  locked: boolean;
955
943
  customData?: Record<string, any> | undefined;
956
- }> & Readonly<{
957
- type: "embeddable";
958
944
  }> & {
945
+ type: "ellipse";
946
+ } & {
959
947
  index: import("@excalidraw/element/types").FractionalIndex;
960
948
  }) | (Readonly<{
961
949
  id: string;
@@ -984,18 +972,14 @@ export declare const actionWrapSelectionInFrame: {
984
972
  frameId: string | null;
985
973
  boundElements: readonly Readonly<{
986
974
  id: string;
987
- type: "text" | "arrow";
975
+ type: "arrow" | "text";
988
976
  }>[] | null;
989
977
  updated: number;
990
978
  link: string | null;
991
979
  locked: boolean;
992
980
  customData?: Record<string, any> | undefined;
993
981
  }> & Readonly<{
994
- type: "image";
995
- fileId: import("@excalidraw/element/types").FileId | null;
996
- status: "pending" | "saved" | "error";
997
- scale: [number, number];
998
- crop: import("@excalidraw/element/types").ImageCrop | null;
982
+ type: "embeddable";
999
983
  }> & {
1000
984
  index: import("@excalidraw/element/types").FractionalIndex;
1001
985
  }) | (Readonly<{
@@ -1025,7 +1009,7 @@ export declare const actionWrapSelectionInFrame: {
1025
1009
  frameId: string | null;
1026
1010
  boundElements: readonly Readonly<{
1027
1011
  id: string;
1028
- type: "text" | "arrow";
1012
+ type: "arrow" | "text";
1029
1013
  }>[] | null;
1030
1014
  updated: number;
1031
1015
  link: string | null;
@@ -1065,25 +1049,18 @@ export declare const actionWrapSelectionInFrame: {
1065
1049
  frameId: string | null;
1066
1050
  boundElements: readonly Readonly<{
1067
1051
  id: string;
1068
- type: "text" | "arrow";
1052
+ type: "arrow" | "text";
1069
1053
  }>[] | null;
1070
1054
  updated: number;
1071
1055
  link: string | null;
1072
1056
  locked: boolean;
1073
1057
  customData?: Record<string, any> | undefined;
1074
1058
  }> & Readonly<{
1075
- type: "text";
1076
- fontSize: number;
1077
- fontFamily: number;
1078
- text: string;
1079
- textAlign: string;
1080
- verticalAlign: string;
1081
- containerId: string | null;
1082
- originalText: string;
1083
- autoResize: boolean;
1084
- lineHeight: number & {
1085
- _brand: "unitlessLineHeight";
1086
- };
1059
+ type: "image";
1060
+ fileId: import("@excalidraw/element/types").FileId | null;
1061
+ status: "pending" | "error" | "saved";
1062
+ scale: [number, number];
1063
+ crop: import("@excalidraw/element/types").ImageCrop | null;
1087
1064
  }> & {
1088
1065
  index: import("@excalidraw/element/types").FractionalIndex;
1089
1066
  }) | (Readonly<{
@@ -1113,14 +1090,15 @@ export declare const actionWrapSelectionInFrame: {
1113
1090
  frameId: string | null;
1114
1091
  boundElements: readonly Readonly<{
1115
1092
  id: string;
1116
- type: "text" | "arrow";
1093
+ type: "arrow" | "text";
1117
1094
  }>[] | null;
1118
1095
  updated: number;
1119
1096
  link: string | null;
1120
1097
  locked: boolean;
1121
1098
  customData?: Record<string, any> | undefined;
1122
1099
  }> & {
1123
- type: "selection";
1100
+ type: "frame";
1101
+ name: string | null;
1124
1102
  } & {
1125
1103
  index: import("@excalidraw/element/types").FractionalIndex;
1126
1104
  }) | (Readonly<{
@@ -1150,14 +1128,15 @@ export declare const actionWrapSelectionInFrame: {
1150
1128
  frameId: string | null;
1151
1129
  boundElements: readonly Readonly<{
1152
1130
  id: string;
1153
- type: "text" | "arrow";
1131
+ type: "arrow" | "text";
1154
1132
  }>[] | null;
1155
1133
  updated: number;
1156
1134
  link: string | null;
1157
1135
  locked: boolean;
1158
1136
  customData?: Record<string, any> | undefined;
1159
1137
  }> & {
1160
- type: "ellipse";
1138
+ type: "magicframe";
1139
+ name: string | null;
1161
1140
  } & {
1162
1141
  index: import("@excalidraw/element/types").FractionalIndex;
1163
1142
  }) | (Readonly<{
@@ -1187,20 +1166,25 @@ export declare const actionWrapSelectionInFrame: {
1187
1166
  frameId: string | null;
1188
1167
  boundElements: readonly Readonly<{
1189
1168
  id: string;
1190
- type: "text" | "arrow";
1169
+ type: "arrow" | "text";
1191
1170
  }>[] | null;
1192
1171
  updated: number;
1193
1172
  link: string | null;
1194
1173
  locked: boolean;
1195
1174
  customData?: Record<string, any> | undefined;
1196
1175
  }> & Readonly<{
1197
- type: "line" | "arrow";
1198
- points: readonly import("@excalidraw/math").LocalPoint[];
1199
- lastCommittedPoint: import("@excalidraw/math").LocalPoint | null;
1200
- startBinding: import("@excalidraw/element/types").PointBinding | null;
1201
- endBinding: import("@excalidraw/element/types").PointBinding | null;
1202
- startArrowhead: import("@excalidraw/element/types").Arrowhead | null;
1203
- endArrowhead: import("@excalidraw/element/types").Arrowhead | null;
1176
+ type: "text";
1177
+ fontSize: number;
1178
+ fontFamily: number;
1179
+ text: string;
1180
+ textAlign: string;
1181
+ verticalAlign: string;
1182
+ containerId: string | null;
1183
+ originalText: string;
1184
+ autoResize: boolean;
1185
+ lineHeight: number & {
1186
+ _brand: "unitlessLineHeight";
1187
+ };
1204
1188
  }> & {
1205
1189
  index: import("@excalidraw/element/types").FractionalIndex;
1206
1190
  }) | (Readonly<{
@@ -1230,7 +1214,7 @@ export declare const actionWrapSelectionInFrame: {
1230
1214
  frameId: string | null;
1231
1215
  boundElements: readonly Readonly<{
1232
1216
  id: string;
1233
- type: "text" | "arrow";
1217
+ type: "arrow" | "text";
1234
1218
  }>[] | null;
1235
1219
  updated: number;
1236
1220
  link: string | null;
@@ -31,7 +31,7 @@ export declare const actionGroup: {
31
31
  errorMessage: import("react").ReactNode;
32
32
  activeEmbeddable: {
33
33
  element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
34
- state: "hover" | "active";
34
+ state: "active" | "hover";
35
35
  } | null;
36
36
  newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
37
37
  resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
@@ -39,7 +39,7 @@ export declare const actionGroup: {
39
39
  selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
40
40
  isBindingEnabled: boolean;
41
41
  startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
42
- suggestedBindings: import("@excalidraw/element/binding").SuggestedBinding[];
42
+ suggestedBindings: import("@excalidraw/element").SuggestedBinding[];
43
43
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
44
44
  frameRendering: {
45
45
  enabled: boolean;
@@ -50,7 +50,6 @@ export declare const actionGroup: {
50
50
  editingFrame: string | null;
51
51
  elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
52
52
  editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
53
- editingLinearElement: import("@excalidraw/element/linearElementEditor").LinearElementEditor | null;
54
53
  activeTool: {
55
54
  lastActiveTool: import("../types").ActiveTool | null;
56
55
  locked: boolean;
@@ -98,7 +97,7 @@ export declare const actionGroup: {
98
97
  name: "imageExport" | "help" | "jsonExport";
99
98
  } | {
100
99
  name: "ttd";
101
- tab: "text-to-diagram" | "mermaid";
100
+ tab: "mermaid" | "text-to-diagram";
102
101
  } | {
103
102
  name: "commandPalette";
104
103
  } | {
@@ -163,9 +162,8 @@ export declare const actionGroup: {
163
162
  shown: true;
164
163
  data: import("../charts").Spreadsheet;
165
164
  };
166
- pendingImageElementId: string | null;
167
165
  showHyperlinkPopup: false | "editor" | "info";
168
- selectedLinearElement: import("@excalidraw/element/linearElementEditor").LinearElementEditor | null;
166
+ selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
169
167
  snapLines: readonly import("../snapping").SnapLine[];
170
168
  originSnapOffset: {
171
169
  x: number;
@@ -176,16 +174,14 @@ export declare const actionGroup: {
176
174
  followedBy: Set<import("../types").SocketId>;
177
175
  isCropping: boolean;
178
176
  croppingElementId: string | null;
179
- searchMatches: readonly {
180
- id: string;
181
- focus: boolean;
182
- matchedLines: {
183
- offsetX: number;
184
- offsetY: number;
185
- width: number;
186
- height: number;
187
- }[];
188
- }[];
177
+ searchMatches: Readonly<{
178
+ focusedId: string | null;
179
+ matches: readonly import("../types").SearchMatch[];
180
+ }> | null;
181
+ activeLockedId: string | null;
182
+ lockedMultiSelections: {
183
+ [groupId: string]: true;
184
+ };
189
185
  };
190
186
  elements: OrderedExcalidrawElement[];
191
187
  captureUpdate: "IMMEDIATELY";
@@ -226,7 +222,7 @@ export declare const actionUngroup: {
226
222
  errorMessage: import("react").ReactNode;
227
223
  activeEmbeddable: {
228
224
  element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
229
- state: "hover" | "active";
225
+ state: "active" | "hover";
230
226
  } | null;
231
227
  newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
232
228
  resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
@@ -234,7 +230,7 @@ export declare const actionUngroup: {
234
230
  selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
235
231
  isBindingEnabled: boolean;
236
232
  startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
237
- suggestedBindings: import("@excalidraw/element/binding").SuggestedBinding[];
233
+ suggestedBindings: import("@excalidraw/element").SuggestedBinding[];
238
234
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
239
235
  frameRendering: {
240
236
  enabled: boolean;
@@ -245,7 +241,6 @@ export declare const actionUngroup: {
245
241
  editingFrame: string | null;
246
242
  elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
247
243
  editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
248
- editingLinearElement: import("@excalidraw/element/linearElementEditor").LinearElementEditor | null;
249
244
  activeTool: {
250
245
  lastActiveTool: import("../types").ActiveTool | null;
251
246
  locked: boolean;
@@ -293,7 +288,7 @@ export declare const actionUngroup: {
293
288
  name: "imageExport" | "help" | "jsonExport";
294
289
  } | {
295
290
  name: "ttd";
296
- tab: "text-to-diagram" | "mermaid";
291
+ tab: "mermaid" | "text-to-diagram";
297
292
  } | {
298
293
  name: "commandPalette";
299
294
  } | {
@@ -358,9 +353,8 @@ export declare const actionUngroup: {
358
353
  shown: true;
359
354
  data: import("../charts").Spreadsheet;
360
355
  };
361
- pendingImageElementId: string | null;
362
356
  showHyperlinkPopup: false | "editor" | "info";
363
- selectedLinearElement: import("@excalidraw/element/linearElementEditor").LinearElementEditor | null;
357
+ selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
364
358
  snapLines: readonly import("../snapping").SnapLine[];
365
359
  originSnapOffset: {
366
360
  x: number;
@@ -371,16 +365,14 @@ export declare const actionUngroup: {
371
365
  followedBy: Set<import("../types").SocketId>;
372
366
  isCropping: boolean;
373
367
  croppingElementId: string | null;
374
- searchMatches: readonly {
375
- id: string;
376
- focus: boolean;
377
- matchedLines: {
378
- offsetX: number;
379
- offsetY: number;
380
- width: number;
381
- height: number;
382
- }[];
383
- }[];
368
+ searchMatches: Readonly<{
369
+ focusedId: string | null;
370
+ matches: readonly import("../types").SearchMatch[];
371
+ }> | null;
372
+ activeLockedId: string | null;
373
+ lockedMultiSelections: {
374
+ [groupId: string]: true;
375
+ };
384
376
  };
385
377
  elements: OrderedExcalidrawElement[];
386
378
  captureUpdate: "IMMEDIATELY";
@@ -1,7 +1,6 @@
1
1
  import type { History } from "../history";
2
- import type { Store } from "../store";
3
2
  import type { Action } from "./types";
4
- type ActionCreator = (history: History, store: Store) => Action;
3
+ type ActionCreator = (history: History) => Action;
5
4
  export declare const createUndoAction: ActionCreator;
6
5
  export declare const createRedoAction: ActionCreator;
7
6
  export {};