@dwelle/excalidraw 0.5.0-ff7b5f2db → 0.5.0-ffade30

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 (171) hide show
  1. package/CHANGELOG.md +2385 -0
  2. package/dist/dev/{chunk-56C7N44U.js → chunk-CB6O5JO7.js} +16177 -10984
  3. package/dist/dev/chunk-CB6O5JO7.js.map +7 -0
  4. package/dist/dev/{chunk-DGCWVQGA.js → chunk-JB4JDZ66.js} +15 -4
  5. package/dist/dev/chunk-JB4JDZ66.js.map +7 -0
  6. package/dist/dev/chunk-QXVP5PAI.js +7 -0
  7. package/dist/dev/chunk-QXVP5PAI.js.map +7 -0
  8. package/dist/dev/data/{image-BLSI3C2P.js → image-JTJWA4BG.js} +3 -3
  9. package/dist/dev/index.css +143 -68
  10. package/dist/dev/index.css.map +3 -3
  11. package/dist/dev/index.js +3978 -6519
  12. package/dist/dev/index.js.map +4 -4
  13. package/dist/dev/locales/{en-AAITTNRF.js → en-PIB5PD3P.js} +2 -2
  14. package/dist/dev/subset-shared.chunk.js +1 -1
  15. package/dist/dev/subset-worker.chunk.js +1 -1
  16. package/dist/prod/chunk-JEM5OQGK.js +33 -0
  17. package/dist/prod/chunk-JH36RZFS.js +7 -0
  18. package/dist/prod/{chunk-OV23WS6X.js → chunk-KC3NX2DX.js} +4 -4
  19. package/dist/prod/data/image-UJJWHTZ6.js +1 -0
  20. package/dist/prod/index.css +1 -1
  21. package/dist/prod/index.js +22 -21
  22. package/dist/prod/locales/{en-YOZMX4VX.js → en-RKTHI3YA.js} +1 -1
  23. package/dist/prod/subset-shared.chunk.js +1 -1
  24. package/dist/prod/subset-worker.chunk.js +1 -1
  25. package/dist/types/common/src/colors.d.ts +1 -0
  26. package/dist/types/common/src/constants.d.ts +11 -1
  27. package/dist/types/{excalidraw → common/src}/emitter.d.ts +1 -1
  28. package/dist/types/common/src/font-metadata.d.ts +4 -2
  29. package/dist/types/common/src/index.d.ts +1 -0
  30. package/dist/types/common/src/utility-types.d.ts +5 -0
  31. package/dist/types/common/src/utils.d.ts +22 -5
  32. package/dist/types/{excalidraw/scene → element/src}/Scene.d.ts +11 -14
  33. package/dist/types/element/src/ShapeCache.d.ts +1 -1
  34. package/dist/types/element/src/align.d.ts +3 -3
  35. package/dist/types/element/src/binding.d.ts +19 -11
  36. package/dist/types/element/src/bounds.d.ts +7 -2
  37. package/dist/types/element/src/collision.d.ts +1 -1
  38. package/dist/types/{excalidraw/change.d.ts → element/src/delta.d.ts} +40 -35
  39. package/dist/types/element/src/dragElements.d.ts +3 -2
  40. package/dist/types/element/src/duplicate.d.ts +10 -13
  41. package/dist/types/element/src/elbowArrow.d.ts +1 -1
  42. package/dist/types/element/src/flowchart.d.ts +3 -2
  43. package/dist/types/element/src/fractionalIndex.d.ts +2 -2
  44. package/dist/types/element/src/frame.d.ts +5 -4
  45. package/dist/types/element/src/heading.d.ts +0 -1
  46. package/dist/types/element/src/index.d.ts +45 -2
  47. package/dist/types/element/src/linearElementEditor.d.ts +19 -31
  48. package/dist/types/element/src/mutateElement.d.ts +10 -2
  49. package/dist/types/element/src/newElement.d.ts +4 -3
  50. package/dist/types/element/src/resizeElements.d.ts +4 -4
  51. package/dist/types/element/src/selection.d.ts +11 -5
  52. package/dist/types/element/src/shapes.d.ts +5 -1
  53. package/dist/types/element/src/sizeHelpers.d.ts +1 -1
  54. package/dist/types/element/src/store.d.ts +227 -0
  55. package/dist/types/element/src/textElement.d.ts +5 -3
  56. package/dist/types/element/src/transformHandles.d.ts +4 -4
  57. package/dist/types/element/src/typeChecks.d.ts +15 -1
  58. package/dist/types/element/src/types.d.ts +14 -1
  59. package/dist/types/element/src/zindex.d.ts +1 -1
  60. package/dist/types/excalidraw/actions/actionAddToLibrary.d.ts +42 -45
  61. package/dist/types/excalidraw/actions/actionAlign.d.ts +8 -8
  62. package/dist/types/excalidraw/actions/actionBoundText.d.ts +28 -30
  63. package/dist/types/excalidraw/actions/actionCanvas.d.ts +438 -275
  64. package/dist/types/excalidraw/actions/actionClipboard.d.ts +86 -92
  65. package/dist/types/excalidraw/actions/actionCropEditor.d.ts +14 -15
  66. package/dist/types/excalidraw/actions/actionDeleteSelected.d.ts +40 -43
  67. package/dist/types/excalidraw/actions/actionDistribute.d.ts +4 -4
  68. package/dist/types/excalidraw/actions/actionDuplicateSelection.d.ts +2 -2
  69. package/dist/types/excalidraw/actions/actionElementLink.d.ts +14 -15
  70. package/dist/types/excalidraw/actions/actionElementLock.d.ts +43 -47
  71. package/dist/types/excalidraw/actions/actionEmbeddable.d.ts +14 -15
  72. package/dist/types/excalidraw/actions/actionExport.d.ts +219 -228
  73. package/dist/types/excalidraw/actions/actionFinalize.d.ts +73 -36
  74. package/dist/types/excalidraw/actions/actionFlip.d.ts +4 -4
  75. package/dist/types/excalidraw/actions/actionFrame.d.ts +100 -104
  76. package/dist/types/excalidraw/actions/actionGroup.d.ts +34 -36
  77. package/dist/types/excalidraw/actions/actionHistory.d.ts +1 -2
  78. package/dist/types/excalidraw/actions/actionLinearEditor.d.ts +506 -14
  79. package/dist/types/excalidraw/actions/actionLink.d.ts +14 -15
  80. package/dist/types/excalidraw/actions/actionMenu.d.ts +42 -45
  81. package/dist/types/excalidraw/actions/actionNavigate.d.ts +27 -29
  82. package/dist/types/excalidraw/actions/actionProperties.d.ts +207 -214
  83. package/dist/types/excalidraw/actions/actionSelectAll.d.ts +16 -17
  84. package/dist/types/excalidraw/actions/actionStyles.d.ts +18 -19
  85. package/dist/types/excalidraw/actions/actionToggleGridMode.d.ts +16 -17
  86. package/dist/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +16 -17
  87. package/dist/types/excalidraw/actions/actionToggleSearchMenu.d.ts +16 -189
  88. package/dist/types/excalidraw/actions/actionToggleShapeSwitch.d.ts +19 -0
  89. package/dist/types/excalidraw/actions/actionToggleStats.d.ts +16 -18
  90. package/dist/types/excalidraw/actions/actionToggleViewMode.d.ts +16 -18
  91. package/dist/types/excalidraw/actions/actionToggleZenMode.d.ts +16 -18
  92. package/dist/types/excalidraw/actions/actionZindex.d.ts +8 -8
  93. package/dist/types/excalidraw/actions/types.d.ts +4 -3
  94. package/dist/types/excalidraw/animated-trail.d.ts +7 -1
  95. package/dist/types/excalidraw/appState.d.ts +40 -30
  96. package/dist/types/excalidraw/components/App.d.ts +30 -12
  97. package/dist/types/excalidraw/components/ButtonIcon.d.ts +1 -0
  98. package/dist/types/excalidraw/components/ColorPicker/ColorInput.d.ts +2 -1
  99. package/dist/types/excalidraw/components/ColorPicker/ColorPicker.d.ts +5 -1
  100. package/dist/types/excalidraw/components/ColorPicker/CustomColorList.d.ts +1 -1
  101. package/dist/types/excalidraw/components/ColorPicker/HotkeyLabel.d.ts +1 -2
  102. package/dist/types/excalidraw/components/ColorPicker/Picker.d.ts +2 -3
  103. package/dist/types/excalidraw/components/ColorPicker/PickerColorList.d.ts +2 -3
  104. package/dist/types/excalidraw/components/ColorPicker/ShadeList.d.ts +2 -2
  105. package/dist/types/excalidraw/components/ColorPicker/TopPicks.d.ts +1 -1
  106. package/dist/types/excalidraw/components/ColorPicker/colorPickerUtils.d.ts +2 -2
  107. package/dist/types/excalidraw/components/ColorPicker/keyboardNavHandlers.d.ts +1 -1
  108. package/dist/types/excalidraw/components/ConvertElementTypePopup.d.ts +23 -0
  109. package/dist/types/excalidraw/components/ElementLinkDialog.d.ts +4 -3
  110. package/dist/types/excalidraw/components/{ButtonIconSelect.d.ts → RadioSelection.d.ts} +1 -1
  111. package/dist/types/excalidraw/components/Range.d.ts +3 -3
  112. package/dist/types/excalidraw/components/Stats/Angle.d.ts +1 -1
  113. package/dist/types/excalidraw/components/Stats/CanvasGrid.d.ts +1 -1
  114. package/dist/types/excalidraw/components/Stats/Collapsible.d.ts +2 -1
  115. package/dist/types/excalidraw/components/Stats/Dimension.d.ts +1 -1
  116. package/dist/types/excalidraw/components/Stats/DragInput.d.ts +1 -1
  117. package/dist/types/excalidraw/components/Stats/FontSize.d.ts +1 -1
  118. package/dist/types/excalidraw/components/Stats/MultiAngle.d.ts +1 -1
  119. package/dist/types/excalidraw/components/Stats/MultiDimension.d.ts +1 -1
  120. package/dist/types/excalidraw/components/Stats/MultiFontSize.d.ts +1 -1
  121. package/dist/types/excalidraw/components/Stats/MultiPosition.d.ts +1 -1
  122. package/dist/types/excalidraw/components/Stats/Position.d.ts +1 -1
  123. package/dist/types/excalidraw/components/Stats/utils.d.ts +4 -11
  124. package/dist/types/excalidraw/components/UnlockPopup.d.ts +8 -0
  125. package/dist/types/excalidraw/components/canvases/InteractiveCanvas.d.ts +1 -0
  126. package/dist/types/excalidraw/components/hyperlink/Hyperlink.d.ts +3 -2
  127. package/dist/types/excalidraw/components/hyperlink/helpers.d.ts +2 -1
  128. package/dist/types/excalidraw/components/icons.d.ts +4 -0
  129. package/dist/types/excalidraw/components/shapes.d.ts +1 -1
  130. package/dist/types/excalidraw/data/blob.d.ts +1 -1
  131. package/dist/types/excalidraw/data/transform.d.ts +1 -1
  132. package/dist/types/excalidraw/editor-jotai.d.ts +6 -6
  133. package/dist/types/excalidraw/eraser/index.d.ts +14 -0
  134. package/dist/types/excalidraw/fonts/Fonts.d.ts +1 -1
  135. package/dist/types/excalidraw/history.d.ts +14 -22
  136. package/dist/types/excalidraw/hooks/useEmitter.d.ts +1 -1
  137. package/dist/types/excalidraw/index.d.ts +9 -9
  138. package/dist/types/excalidraw/lasso/index.d.ts +16 -0
  139. package/dist/types/excalidraw/lasso/utils.d.ts +12 -0
  140. package/dist/types/excalidraw/renderer/helpers.d.ts +6 -1
  141. package/dist/types/excalidraw/scene/Renderer.d.ts +1 -1
  142. package/dist/types/excalidraw/scene/export.d.ts +1 -1
  143. package/dist/types/excalidraw/scene/index.d.ts +2 -2
  144. package/dist/types/excalidraw/scene/scrollbars.d.ts +2 -3
  145. package/dist/types/excalidraw/scene/types.d.ts +2 -0
  146. package/dist/types/excalidraw/snapping.d.ts +2 -2
  147. package/dist/types/excalidraw/types.d.ts +30 -7
  148. package/dist/types/excalidraw/visualdebug.d.ts +1 -1
  149. package/dist/types/excalidraw/wysiwyg/textWysiwyg.d.ts +3 -1
  150. package/dist/types/math/src/curve.d.ts +2 -0
  151. package/dist/types/math/src/point.d.ts +1 -1
  152. package/dist/types/math/src/polygon.d.ts +1 -0
  153. package/dist/types/math/src/segment.d.ts +1 -1
  154. package/dist/types/math/src/types.d.ts +1 -0
  155. package/dist/types/math/src/vector.d.ts +4 -0
  156. package/dist/types/utils/src/bbox.d.ts +1 -1
  157. package/dist/types/utils/src/index.d.ts +1 -1
  158. package/dist/types/utils/src/withinBounds.d.ts +1 -1
  159. package/history.ts +186 -0
  160. package/package.json +9 -4
  161. package/dist/dev/chunk-56C7N44U.js.map +0 -7
  162. package/dist/dev/chunk-DGCWVQGA.js.map +0 -7
  163. package/dist/dev/chunk-HQHB2BE4.js +0 -7
  164. package/dist/dev/chunk-HQHB2BE4.js.map +0 -7
  165. package/dist/prod/chunk-BUJ2ENHZ.js +0 -31
  166. package/dist/prod/chunk-C3FOHAIA.js +0 -7
  167. package/dist/prod/data/image-MI7OQWUS.js +0 -1
  168. package/dist/types/excalidraw/components/ButtonSelect.d.ts +0 -9
  169. package/dist/types/excalidraw/store.d.ts +0 -129
  170. /package/dist/dev/data/{image-BLSI3C2P.js.map → image-JTJWA4BG.js.map} +0 -0
  171. /package/dist/dev/locales/{en-AAITTNRF.js.map → en-PIB5PD3P.js.map} +0 -0
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { LinearElementEditor } from "@excalidraw/element/linearElementEditor";
2
+ import { LinearElementEditor } from "@excalidraw/element";
3
3
  import type { ExcalidrawElement } from "@excalidraw/element/types";
4
4
  import type { AppClassProperties, AppState } from "../types";
5
5
  export declare const actionDeleteSelected: {
@@ -32,7 +32,7 @@ export declare const actionDeleteSelected: {
32
32
  selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
33
33
  isBindingEnabled: boolean;
34
34
  startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
35
- suggestedBindings: import("@excalidraw/element/binding").SuggestedBinding[];
35
+ suggestedBindings: import("@excalidraw/element").SuggestedBinding[];
36
36
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
37
37
  frameRendering: {
38
38
  enabled: boolean;
@@ -46,6 +46,7 @@ export declare const actionDeleteSelected: {
46
46
  activeTool: {
47
47
  lastActiveTool: import("../types").ActiveTool | null;
48
48
  locked: boolean;
49
+ fromSelection: boolean;
49
50
  } & import("../types").ActiveTool;
50
51
  penMode: boolean;
51
52
  penDetected: boolean;
@@ -79,7 +80,7 @@ export declare const actionDeleteSelected: {
79
80
  zoom: Readonly<{
80
81
  value: import("../types").NormalizedZoomValue;
81
82
  }>;
82
- openMenu: "shape" | "canvas" | null;
83
+ openMenu: "canvas" | "shape" | null;
83
84
  openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
84
85
  openSidebar: {
85
86
  name: string;
@@ -162,7 +163,7 @@ export declare const actionDeleteSelected: {
162
163
  data: import("../charts").Spreadsheet;
163
164
  };
164
165
  pendingImageElementId: string | null;
165
- showHyperlinkPopup: false | "editor" | "info";
166
+ showHyperlinkPopup: false | "info" | "editor";
166
167
  selectedLinearElement: LinearElementEditor | null;
167
168
  snapLines: readonly import("../snapping").SnapLine[];
168
169
  originSnapOffset: {
@@ -174,16 +175,14 @@ export declare const actionDeleteSelected: {
174
175
  followedBy: Set<import("../types").SocketId>;
175
176
  isCropping: boolean;
176
177
  croppingElementId: string | null;
177
- searchMatches: readonly {
178
- id: string;
179
- focus: boolean;
180
- matchedLines: {
181
- offsetX: number;
182
- offsetY: number;
183
- width: number;
184
- height: number;
185
- }[];
186
- }[];
178
+ searchMatches: Readonly<{
179
+ focusedId: string | null;
180
+ matches: readonly import("../types").SearchMatch[];
181
+ }> | null;
182
+ activeLockedId: string | null;
183
+ lockedMultiSelections: {
184
+ [groupId: string]: true;
185
+ };
187
186
  };
188
187
  captureUpdate: "IMMEDIATELY";
189
188
  } | {
@@ -238,7 +237,7 @@ export declare const actionDeleteSelected: {
238
237
  selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
239
238
  isBindingEnabled: boolean;
240
239
  startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
241
- suggestedBindings: import("@excalidraw/element/binding").SuggestedBinding[];
240
+ suggestedBindings: import("@excalidraw/element").SuggestedBinding[];
242
241
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
243
242
  frameRendering: {
244
243
  enabled: boolean;
@@ -252,6 +251,7 @@ export declare const actionDeleteSelected: {
252
251
  activeTool: {
253
252
  lastActiveTool: import("../types").ActiveTool | null;
254
253
  locked: boolean;
254
+ fromSelection: boolean;
255
255
  } & import("../types").ActiveTool;
256
256
  penMode: boolean;
257
257
  penDetected: boolean;
@@ -285,7 +285,7 @@ export declare const actionDeleteSelected: {
285
285
  zoom: Readonly<{
286
286
  value: import("../types").NormalizedZoomValue;
287
287
  }>;
288
- openMenu: "shape" | "canvas" | null;
288
+ openMenu: "canvas" | "shape" | null;
289
289
  openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
290
290
  openSidebar: {
291
291
  name: string;
@@ -368,7 +368,7 @@ export declare const actionDeleteSelected: {
368
368
  data: import("../charts").Spreadsheet;
369
369
  };
370
370
  pendingImageElementId: string | null;
371
- showHyperlinkPopup: false | "editor" | "info";
371
+ showHyperlinkPopup: false | "info" | "editor";
372
372
  selectedLinearElement: LinearElementEditor | null;
373
373
  snapLines: readonly import("../snapping").SnapLine[];
374
374
  originSnapOffset: {
@@ -380,16 +380,14 @@ export declare const actionDeleteSelected: {
380
380
  followedBy: Set<import("../types").SocketId>;
381
381
  isCropping: boolean;
382
382
  croppingElementId: string | null;
383
- searchMatches: readonly {
384
- id: string;
385
- focus: boolean;
386
- matchedLines: {
387
- offsetX: number;
388
- offsetY: number;
389
- width: number;
390
- height: number;
391
- }[];
392
- }[];
383
+ searchMatches: Readonly<{
384
+ focusedId: string | null;
385
+ matches: readonly import("../types").SearchMatch[];
386
+ }> | null;
387
+ activeLockedId: string | null;
388
+ lockedMultiSelections: {
389
+ [groupId: string]: true;
390
+ };
393
391
  };
394
392
  captureUpdate: "IMMEDIATELY";
395
393
  } | {
@@ -398,17 +396,18 @@ export declare const actionDeleteSelected: {
398
396
  activeTool: {
399
397
  lastActiveTool: import("../types").ActiveTool | null;
400
398
  locked: boolean;
399
+ fromSelection: boolean;
401
400
  } & import("../types").ActiveTool;
402
401
  multiElement: null;
403
402
  activeEmbeddable: null;
404
403
  selectedLinearElement: null;
405
- editingGroupId: string | null;
406
404
  selectedElementIds: Readonly<{
407
405
  [id: string]: true;
408
406
  }>;
409
407
  selectedGroupIds: {
410
408
  [groupId: string]: boolean;
411
409
  };
410
+ editingGroupId: string | null;
412
411
  contextMenu: {
413
412
  items: import("../components/ContextMenu").ContextMenuItems;
414
413
  top: number;
@@ -422,7 +421,7 @@ export declare const actionDeleteSelected: {
422
421
  selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
423
422
  isBindingEnabled: boolean;
424
423
  startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
425
- suggestedBindings: import("@excalidraw/element/binding").SuggestedBinding[];
424
+ suggestedBindings: import("@excalidraw/element").SuggestedBinding[];
426
425
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
427
426
  frameRendering: {
428
427
  enabled: boolean;
@@ -466,7 +465,7 @@ export declare const actionDeleteSelected: {
466
465
  zoom: Readonly<{
467
466
  value: import("../types").NormalizedZoomValue;
468
467
  }>;
469
- openMenu: "shape" | "canvas" | null;
468
+ openMenu: "canvas" | "shape" | null;
470
469
  openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
471
470
  openSidebar: {
472
471
  name: string;
@@ -542,7 +541,7 @@ export declare const actionDeleteSelected: {
542
541
  data: import("../charts").Spreadsheet;
543
542
  };
544
543
  pendingImageElementId: string | null;
545
- showHyperlinkPopup: false | "editor" | "info";
544
+ showHyperlinkPopup: false | "info" | "editor";
546
545
  snapLines: readonly import("../snapping").SnapLine[];
547
546
  originSnapOffset: {
548
547
  x: number;
@@ -553,21 +552,19 @@ export declare const actionDeleteSelected: {
553
552
  followedBy: Set<import("../types").SocketId>;
554
553
  isCropping: boolean;
555
554
  croppingElementId: string | null;
556
- searchMatches: readonly {
557
- id: string;
558
- focus: boolean;
559
- matchedLines: {
560
- offsetX: number;
561
- offsetY: number;
562
- width: number;
563
- height: number;
564
- }[];
565
- }[];
555
+ searchMatches: Readonly<{
556
+ focusedId: string | null;
557
+ matches: readonly import("../types").SearchMatch[];
558
+ }> | null;
559
+ activeLockedId: string | null;
560
+ lockedMultiSelections: {
561
+ [groupId: string]: true;
562
+ };
566
563
  };
567
564
  captureUpdate: "IMMEDIATELY" | "EVENTUALLY";
568
565
  };
569
- keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>, appState: AppState, elements: readonly ExcalidrawElement[]) => boolean;
566
+ keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent, appState: AppState, elements: readonly ExcalidrawElement[]) => boolean;
570
567
  PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
571
568
  } & {
572
- keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>, appState: AppState, elements: readonly ExcalidrawElement[]) => boolean) | undefined;
569
+ keyTest?: ((event: import("react").KeyboardEvent<Element> | KeyboardEvent, appState: AppState, elements: readonly ExcalidrawElement[]) => boolean) | undefined;
573
570
  };
@@ -12,10 +12,10 @@ export declare const distributeHorizontally: {
12
12
  elements: ExcalidrawElement[];
13
13
  captureUpdate: "IMMEDIATELY";
14
14
  };
15
- keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
15
+ keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean;
16
16
  PanelComponent: ({ elements, appState, updateData, app }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
17
17
  } & {
18
- keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
18
+ keyTest?: ((event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean) | undefined;
19
19
  };
20
20
  export declare const distributeVertically: {
21
21
  name: "distributeVertically";
@@ -28,8 +28,8 @@ export declare const distributeVertically: {
28
28
  elements: ExcalidrawElement[];
29
29
  captureUpdate: "IMMEDIATELY";
30
30
  };
31
- keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
31
+ keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean;
32
32
  PanelComponent: ({ elements, appState, updateData, app }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
33
33
  } & {
34
- keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
34
+ keyTest?: ((event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean) | undefined;
35
35
  };
@@ -11,8 +11,8 @@ export declare const actionDuplicateSelection: {
11
11
  appState: import("../types").AppState;
12
12
  captureUpdate: "IMMEDIATELY";
13
13
  };
14
- keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
14
+ keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean;
15
15
  PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
16
16
  } & {
17
- keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
17
+ keyTest?: ((event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean) | undefined;
18
18
  };
@@ -59,7 +59,7 @@ export declare const actionLinkToElement: {
59
59
  selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
60
60
  isBindingEnabled: boolean;
61
61
  startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
62
- suggestedBindings: import("@excalidraw/element/binding").SuggestedBinding[];
62
+ suggestedBindings: import("@excalidraw/element").SuggestedBinding[];
63
63
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
64
64
  frameRendering: {
65
65
  enabled: boolean;
@@ -70,10 +70,11 @@ export declare const actionLinkToElement: {
70
70
  editingFrame: string | null;
71
71
  elementsToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawElement>[] | null;
72
72
  editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
73
- editingLinearElement: import("@excalidraw/element/linearElementEditor").LinearElementEditor | null;
73
+ editingLinearElement: import("@excalidraw/element").LinearElementEditor | null;
74
74
  activeTool: {
75
75
  lastActiveTool: import("../types").ActiveTool | null;
76
76
  locked: boolean;
77
+ fromSelection: boolean;
77
78
  } & import("../types").ActiveTool;
78
79
  penMode: boolean;
79
80
  penDetected: boolean;
@@ -107,7 +108,7 @@ export declare const actionLinkToElement: {
107
108
  zoom: Readonly<{
108
109
  value: import("../types").NormalizedZoomValue;
109
110
  }>;
110
- openMenu: "shape" | "canvas" | null;
111
+ openMenu: "canvas" | "shape" | null;
111
112
  openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
112
113
  openSidebar: {
113
114
  name: string;
@@ -179,8 +180,8 @@ export declare const actionLinkToElement: {
179
180
  data: import("../charts").Spreadsheet;
180
181
  };
181
182
  pendingImageElementId: string | null;
182
- showHyperlinkPopup: false | "editor" | "info";
183
- selectedLinearElement: import("@excalidraw/element/linearElementEditor").LinearElementEditor | null;
183
+ showHyperlinkPopup: false | "info" | "editor";
184
+ selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
184
185
  snapLines: readonly import("../snapping").SnapLine[];
185
186
  originSnapOffset: {
186
187
  x: number;
@@ -191,16 +192,14 @@ export declare const actionLinkToElement: {
191
192
  followedBy: Set<import("../types").SocketId>;
192
193
  isCropping: boolean;
193
194
  croppingElementId: string | null;
194
- searchMatches: readonly {
195
- id: string;
196
- focus: boolean;
197
- matchedLines: {
198
- offsetX: number;
199
- offsetY: number;
200
- width: number;
201
- height: number;
202
- }[];
203
- }[];
195
+ searchMatches: Readonly<{
196
+ focusedId: string | null;
197
+ matches: readonly import("../types").SearchMatch[];
198
+ }> | null;
199
+ activeLockedId: string | null;
200
+ lockedMultiSelections: {
201
+ [groupId: string]: true;
202
+ };
204
203
  };
205
204
  captureUpdate: "IMMEDIATELY";
206
205
  elements?: undefined;
@@ -1,17 +1,28 @@
1
1
  /// <reference types="react" />
2
2
  import type { ExcalidrawElement } from "@excalidraw/element/types";
3
+ import type { AppState } from "../types";
3
4
  export declare const actionToggleElementLock: {
4
5
  name: "toggleElementLock";
5
- label: (elements: readonly ExcalidrawElement[], appState: Readonly<import("../types").AppState>, app: import("../types").AppClassProperties) => "labels.elementLock.unlock" | "labels.elementLock.lock" | "labels.elementLock.lockAll" | "labels.elementLock.unlockAll";
6
+ label: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>, app: import("../types").AppClassProperties) => "labels.elementLock.lock" | "labels.elementLock.unlock";
6
7
  icon: (appState: import("../types").UIAppState, elements: readonly ExcalidrawElement[]) => import("react/jsx-runtime").JSX.Element;
7
8
  trackEvent: {
8
9
  category: "element";
9
10
  };
10
- predicate: (elements: readonly ExcalidrawElement[], appState: import("../types").AppState, _: import("../types").ExcalidrawProps, app: import("../types").AppClassProperties) => boolean;
11
- perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>, _: any, app: import("../types").AppClassProperties) => false | {
11
+ predicate: (elements: readonly ExcalidrawElement[], appState: AppState, _: import("../types").ExcalidrawProps, app: import("../types").AppClassProperties) => boolean;
12
+ perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: any, app: import("../types").AppClassProperties) => false | {
12
13
  elements: import("@excalidraw/element/types").OrderedExcalidrawElement[];
13
14
  appState: {
14
- selectedLinearElement: import("@excalidraw/element/linearElementEditor").LinearElementEditor | null;
15
+ selectedElementIds: Readonly<{
16
+ [id: string]: true;
17
+ }>;
18
+ selectedGroupIds: {
19
+ [groupId: string]: boolean;
20
+ };
21
+ selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
22
+ lockedMultiSelections: {
23
+ [x: string]: true;
24
+ };
25
+ activeLockedId: string | null;
15
26
  contextMenu: {
16
27
  items: import("../components/ContextMenu").ContextMenuItems;
17
28
  top: number;
@@ -30,7 +41,7 @@ export declare const actionToggleElementLock: {
30
41
  selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
31
42
  isBindingEnabled: boolean;
32
43
  startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
33
- suggestedBindings: import("@excalidraw/element/binding").SuggestedBinding[];
44
+ suggestedBindings: import("@excalidraw/element").SuggestedBinding[];
34
45
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
35
46
  frameRendering: {
36
47
  enabled: boolean;
@@ -41,10 +52,11 @@ export declare const actionToggleElementLock: {
41
52
  editingFrame: string | null;
42
53
  elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
43
54
  editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
44
- editingLinearElement: import("@excalidraw/element/linearElementEditor").LinearElementEditor | null;
55
+ editingLinearElement: import("@excalidraw/element").LinearElementEditor | null;
45
56
  activeTool: {
46
57
  lastActiveTool: import("../types").ActiveTool | null;
47
58
  locked: boolean;
59
+ fromSelection: boolean;
48
60
  } & import("../types").ActiveTool;
49
61
  penMode: boolean;
50
62
  penDetected: boolean;
@@ -78,7 +90,7 @@ export declare const actionToggleElementLock: {
78
90
  zoom: Readonly<{
79
91
  value: import("../types").NormalizedZoomValue;
80
92
  }>;
81
- openMenu: "shape" | "canvas" | null;
93
+ openMenu: "canvas" | "shape" | null;
82
94
  openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
83
95
  openSidebar: {
84
96
  name: string;
@@ -97,9 +109,6 @@ export declare const actionToggleElementLock: {
97
109
  } | null;
98
110
  defaultSidebarDockedPreference: boolean;
99
111
  lastPointerDownWith: import("@excalidraw/element/types").PointerType;
100
- selectedElementIds: Readonly<{
101
- [id: string]: true;
102
- }>;
103
112
  hoveredElementIds: Readonly<{
104
113
  [id: string]: true;
105
114
  }>;
@@ -119,9 +128,6 @@ export declare const actionToggleElementLock: {
119
128
  gridStep: number;
120
129
  gridModeEnabled: boolean;
121
130
  viewModeEnabled: boolean;
122
- selectedGroupIds: {
123
- [groupId: string]: boolean;
124
- };
125
131
  editingGroupId: string | null;
126
132
  width: number;
127
133
  height: number;
@@ -161,7 +167,7 @@ export declare const actionToggleElementLock: {
161
167
  data: import("../charts").Spreadsheet;
162
168
  };
163
169
  pendingImageElementId: string | null;
164
- showHyperlinkPopup: false | "editor" | "info";
170
+ showHyperlinkPopup: false | "info" | "editor";
165
171
  snapLines: readonly import("../snapping").SnapLine[];
166
172
  originSnapOffset: {
167
173
  x: number;
@@ -172,38 +178,36 @@ export declare const actionToggleElementLock: {
172
178
  followedBy: Set<import("../types").SocketId>;
173
179
  isCropping: boolean;
174
180
  croppingElementId: string | null;
175
- searchMatches: readonly {
176
- id: string;
177
- focus: boolean;
178
- matchedLines: {
179
- offsetX: number;
180
- offsetY: number;
181
- width: number;
182
- height: number;
183
- }[];
184
- }[];
181
+ searchMatches: Readonly<{
182
+ focusedId: string | null;
183
+ matches: readonly import("../types").SearchMatch[];
184
+ }> | null;
185
185
  };
186
186
  captureUpdate: "IMMEDIATELY";
187
187
  };
188
- keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>, appState: import("../types").AppState, elements: readonly ExcalidrawElement[], app: import("../types").AppClassProperties) => boolean;
188
+ keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent, appState: AppState, elements: readonly ExcalidrawElement[], app: import("../types").AppClassProperties) => boolean;
189
189
  } & {
190
- keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>, appState: import("../types").AppState, elements: readonly ExcalidrawElement[], app: import("../types").AppClassProperties) => boolean) | undefined;
190
+ keyTest?: ((event: import("react").KeyboardEvent<Element> | KeyboardEvent, appState: AppState, elements: readonly ExcalidrawElement[], app: import("../types").AppClassProperties) => boolean) | undefined;
191
191
  };
192
192
  export declare const actionUnlockAllElements: {
193
193
  name: "unlockAllElements";
194
- paletteName: string;
195
194
  trackEvent: {
196
195
  category: "canvas";
197
196
  };
198
197
  viewMode: false;
199
198
  icon: import("react/jsx-runtime").JSX.Element;
200
- predicate: (elements: readonly ExcalidrawElement[], appState: import("../types").AppState) => boolean;
201
- perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>) => {
199
+ predicate: (elements: readonly ExcalidrawElement[], appState: AppState) => boolean;
200
+ perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>) => {
202
201
  elements: import("@excalidraw/element/types").OrderedExcalidrawElement[];
203
202
  appState: {
204
203
  selectedElementIds: {
205
204
  [k: string]: true;
206
205
  };
206
+ selectedGroupIds: {
207
+ [groupId: string]: boolean;
208
+ };
209
+ lockedMultiSelections: {};
210
+ activeLockedId: null;
207
211
  contextMenu: {
208
212
  items: import("../components/ContextMenu").ContextMenuItems;
209
213
  top: number;
@@ -222,7 +226,7 @@ export declare const actionUnlockAllElements: {
222
226
  selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
223
227
  isBindingEnabled: boolean;
224
228
  startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
225
- suggestedBindings: import("@excalidraw/element/binding").SuggestedBinding[];
229
+ suggestedBindings: import("@excalidraw/element").SuggestedBinding[];
226
230
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
227
231
  frameRendering: {
228
232
  enabled: boolean;
@@ -233,10 +237,11 @@ export declare const actionUnlockAllElements: {
233
237
  editingFrame: string | null;
234
238
  elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
235
239
  editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
236
- editingLinearElement: import("@excalidraw/element/linearElementEditor").LinearElementEditor | null;
240
+ editingLinearElement: import("@excalidraw/element").LinearElementEditor | null;
237
241
  activeTool: {
238
242
  lastActiveTool: import("../types").ActiveTool | null;
239
243
  locked: boolean;
244
+ fromSelection: boolean;
240
245
  } & import("../types").ActiveTool;
241
246
  penMode: boolean;
242
247
  penDetected: boolean;
@@ -270,7 +275,7 @@ export declare const actionUnlockAllElements: {
270
275
  zoom: Readonly<{
271
276
  value: import("../types").NormalizedZoomValue;
272
277
  }>;
273
- openMenu: "shape" | "canvas" | null;
278
+ openMenu: "canvas" | "shape" | null;
274
279
  openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
275
280
  openSidebar: {
276
281
  name: string;
@@ -308,9 +313,6 @@ export declare const actionUnlockAllElements: {
308
313
  gridStep: number;
309
314
  gridModeEnabled: boolean;
310
315
  viewModeEnabled: boolean;
311
- selectedGroupIds: {
312
- [groupId: string]: boolean;
313
- };
314
316
  editingGroupId: string | null;
315
317
  width: number;
316
318
  height: number;
@@ -350,8 +352,8 @@ export declare const actionUnlockAllElements: {
350
352
  data: import("../charts").Spreadsheet;
351
353
  };
352
354
  pendingImageElementId: string | null;
353
- showHyperlinkPopup: false | "editor" | "info";
354
- selectedLinearElement: import("@excalidraw/element/linearElementEditor").LinearElementEditor | null;
355
+ showHyperlinkPopup: false | "info" | "editor";
356
+ selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
355
357
  snapLines: readonly import("../snapping").SnapLine[];
356
358
  originSnapOffset: {
357
359
  x: number;
@@ -362,16 +364,10 @@ export declare const actionUnlockAllElements: {
362
364
  followedBy: Set<import("../types").SocketId>;
363
365
  isCropping: boolean;
364
366
  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
- }[];
367
+ searchMatches: Readonly<{
368
+ focusedId: string | null;
369
+ matches: readonly import("../types").SearchMatch[];
370
+ }> | null;
375
371
  };
376
372
  captureUpdate: "IMMEDIATELY";
377
373
  };
@@ -12,6 +12,7 @@ export declare const actionSetEmbeddableAsActiveTool: {
12
12
  activeTool: {
13
13
  lastActiveTool: import("../types").ActiveTool | null;
14
14
  locked: boolean;
15
+ fromSelection: boolean;
15
16
  } & import("../types").ActiveTool;
16
17
  contextMenu: {
17
18
  items: import("../components/ContextMenu").ContextMenuItems;
@@ -31,7 +32,7 @@ export declare const actionSetEmbeddableAsActiveTool: {
31
32
  selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
32
33
  isBindingEnabled: boolean;
33
34
  startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
34
- suggestedBindings: import("@excalidraw/element/binding").SuggestedBinding[];
35
+ suggestedBindings: import("@excalidraw/element").SuggestedBinding[];
35
36
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
36
37
  frameRendering: {
37
38
  enabled: boolean;
@@ -42,7 +43,7 @@ export declare const actionSetEmbeddableAsActiveTool: {
42
43
  editingFrame: string | null;
43
44
  elementsToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawElement>[] | null;
44
45
  editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
45
- editingLinearElement: import("@excalidraw/element/linearElementEditor").LinearElementEditor | null;
46
+ editingLinearElement: import("@excalidraw/element").LinearElementEditor | null;
46
47
  penMode: boolean;
47
48
  penDetected: boolean;
48
49
  exportBackground: boolean;
@@ -75,7 +76,7 @@ export declare const actionSetEmbeddableAsActiveTool: {
75
76
  zoom: Readonly<{
76
77
  value: import("../types").NormalizedZoomValue;
77
78
  }>;
78
- openMenu: "shape" | "canvas" | null;
79
+ openMenu: "canvas" | "shape" | null;
79
80
  openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
80
81
  openSidebar: {
81
82
  name: string;
@@ -158,8 +159,8 @@ export declare const actionSetEmbeddableAsActiveTool: {
158
159
  data: import("../charts").Spreadsheet;
159
160
  };
160
161
  pendingImageElementId: string | null;
161
- showHyperlinkPopup: false | "editor" | "info";
162
- selectedLinearElement: import("@excalidraw/element/linearElementEditor").LinearElementEditor | null;
162
+ showHyperlinkPopup: false | "info" | "editor";
163
+ selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
163
164
  snapLines: readonly import("../snapping").SnapLine[];
164
165
  originSnapOffset: {
165
166
  x: number;
@@ -170,16 +171,14 @@ export declare const actionSetEmbeddableAsActiveTool: {
170
171
  followedBy: Set<import("../types").SocketId>;
171
172
  isCropping: boolean;
172
173
  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
- }[];
174
+ searchMatches: Readonly<{
175
+ focusedId: string | null;
176
+ matches: readonly import("../types").SearchMatch[];
177
+ }> | null;
178
+ activeLockedId: string | null;
179
+ lockedMultiSelections: {
180
+ [groupId: string]: true;
181
+ };
183
182
  };
184
183
  captureUpdate: "EVENTUALLY";
185
184
  };