@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
@@ -3,7 +3,6 @@ export declare const actionToggleStats: {
3
3
  name: "stats";
4
4
  label: string;
5
5
  icon: import("react/jsx-runtime").JSX.Element;
6
- paletteName: string;
7
6
  viewMode: true;
8
7
  trackEvent: {
9
8
  category: "menu";
@@ -33,7 +32,7 @@ export declare const actionToggleStats: {
33
32
  selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
34
33
  isBindingEnabled: boolean;
35
34
  startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
36
- suggestedBindings: import("@excalidraw/element/binding").SuggestedBinding[];
35
+ suggestedBindings: import("@excalidraw/element").SuggestedBinding[];
37
36
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
38
37
  frameRendering: {
39
38
  enabled: boolean;
@@ -44,10 +43,11 @@ export declare const actionToggleStats: {
44
43
  editingFrame: string | null;
45
44
  elementsToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawElement>[] | null;
46
45
  editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
47
- editingLinearElement: import("@excalidraw/element/linearElementEditor").LinearElementEditor | null;
46
+ editingLinearElement: import("@excalidraw/element").LinearElementEditor | null;
48
47
  activeTool: {
49
48
  lastActiveTool: import("../types").ActiveTool | null;
50
49
  locked: boolean;
50
+ fromSelection: boolean;
51
51
  } & import("../types").ActiveTool;
52
52
  penMode: boolean;
53
53
  penDetected: boolean;
@@ -81,7 +81,7 @@ export declare const actionToggleStats: {
81
81
  zoom: Readonly<{
82
82
  value: import("../types").NormalizedZoomValue;
83
83
  }>;
84
- openMenu: "shape" | "canvas" | null;
84
+ openMenu: "canvas" | "shape" | null;
85
85
  openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
86
86
  openSidebar: {
87
87
  name: string;
@@ -160,8 +160,8 @@ export declare const actionToggleStats: {
160
160
  data: import("../charts").Spreadsheet;
161
161
  };
162
162
  pendingImageElementId: string | null;
163
- showHyperlinkPopup: false | "editor" | "info";
164
- selectedLinearElement: import("@excalidraw/element/linearElementEditor").LinearElementEditor | null;
163
+ showHyperlinkPopup: false | "info" | "editor";
164
+ selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
165
165
  snapLines: readonly import("../snapping").SnapLine[];
166
166
  originSnapOffset: {
167
167
  x: number;
@@ -172,21 +172,19 @@ export declare const actionToggleStats: {
172
172
  followedBy: Set<import("../types").SocketId>;
173
173
  isCropping: boolean;
174
174
  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
- }[];
175
+ searchMatches: Readonly<{
176
+ focusedId: string | null;
177
+ matches: readonly import("../types").SearchMatch[];
178
+ }> | null;
179
+ activeLockedId: string | null;
180
+ lockedMultiSelections: {
181
+ [groupId: string]: true;
182
+ };
185
183
  };
186
184
  captureUpdate: "EVENTUALLY";
187
185
  };
188
186
  checked: (appState: Readonly<import("../types").AppState>) => boolean;
189
- keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
187
+ keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean;
190
188
  } & {
191
- keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
189
+ keyTest?: ((event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean) | undefined;
192
190
  };
@@ -2,7 +2,6 @@
2
2
  export declare const actionToggleViewMode: {
3
3
  name: "viewMode";
4
4
  label: string;
5
- paletteName: string;
6
5
  icon: import("react/jsx-runtime").JSX.Element;
7
6
  viewMode: true;
8
7
  trackEvent: {
@@ -30,7 +29,7 @@ export declare const actionToggleViewMode: {
30
29
  selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
31
30
  isBindingEnabled: boolean;
32
31
  startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
33
- suggestedBindings: import("@excalidraw/element/binding").SuggestedBinding[];
32
+ suggestedBindings: import("@excalidraw/element").SuggestedBinding[];
34
33
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
35
34
  frameRendering: {
36
35
  enabled: boolean;
@@ -41,10 +40,11 @@ export declare const actionToggleViewMode: {
41
40
  editingFrame: string | null;
42
41
  elementsToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawElement>[] | null;
43
42
  editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
44
- editingLinearElement: import("@excalidraw/element/linearElementEditor").LinearElementEditor | null;
43
+ editingLinearElement: import("@excalidraw/element").LinearElementEditor | null;
45
44
  activeTool: {
46
45
  lastActiveTool: import("../types").ActiveTool | null;
47
46
  locked: boolean;
47
+ fromSelection: boolean;
48
48
  } & import("../types").ActiveTool;
49
49
  penMode: boolean;
50
50
  penDetected: boolean;
@@ -78,7 +78,7 @@ export declare const actionToggleViewMode: {
78
78
  zoom: Readonly<{
79
79
  value: import("../types").NormalizedZoomValue;
80
80
  }>;
81
- openMenu: "shape" | "canvas" | null;
81
+ openMenu: "canvas" | "shape" | null;
82
82
  openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
83
83
  openSidebar: {
84
84
  name: string;
@@ -160,8 +160,8 @@ export declare const actionToggleViewMode: {
160
160
  data: import("../charts").Spreadsheet;
161
161
  };
162
162
  pendingImageElementId: string | null;
163
- showHyperlinkPopup: false | "editor" | "info";
164
- selectedLinearElement: import("@excalidraw/element/linearElementEditor").LinearElementEditor | null;
163
+ showHyperlinkPopup: false | "info" | "editor";
164
+ selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
165
165
  snapLines: readonly import("../snapping").SnapLine[];
166
166
  originSnapOffset: {
167
167
  x: number;
@@ -172,22 +172,20 @@ export declare const actionToggleViewMode: {
172
172
  followedBy: Set<import("../types").SocketId>;
173
173
  isCropping: boolean;
174
174
  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
- }[];
175
+ searchMatches: Readonly<{
176
+ focusedId: string | null;
177
+ matches: readonly import("../types").SearchMatch[];
178
+ }> | null;
179
+ activeLockedId: string | null;
180
+ lockedMultiSelections: {
181
+ [groupId: string]: true;
182
+ };
185
183
  };
186
184
  captureUpdate: "EVENTUALLY";
187
185
  };
188
186
  checked: (appState: Readonly<import("../types").AppState>) => boolean;
189
187
  predicate: (elements: readonly import("@excalidraw/element/types").ExcalidrawElement[], appState: import("../types").AppState, appProps: import("../types").ExcalidrawProps) => boolean;
190
- keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
188
+ keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean;
191
189
  } & {
192
- keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
190
+ keyTest?: ((event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean) | undefined;
193
191
  };
@@ -3,7 +3,6 @@ export declare const actionToggleZenMode: {
3
3
  name: "zenMode";
4
4
  label: string;
5
5
  icon: import("react/jsx-runtime").JSX.Element;
6
- paletteName: string;
7
6
  viewMode: true;
8
7
  trackEvent: {
9
8
  category: "canvas";
@@ -30,7 +29,7 @@ export declare const actionToggleZenMode: {
30
29
  selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
31
30
  isBindingEnabled: boolean;
32
31
  startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
33
- suggestedBindings: import("@excalidraw/element/binding").SuggestedBinding[];
32
+ suggestedBindings: import("@excalidraw/element").SuggestedBinding[];
34
33
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
35
34
  frameRendering: {
36
35
  enabled: boolean;
@@ -41,10 +40,11 @@ export declare const actionToggleZenMode: {
41
40
  editingFrame: string | null;
42
41
  elementsToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawElement>[] | null;
43
42
  editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
44
- editingLinearElement: import("@excalidraw/element/linearElementEditor").LinearElementEditor | null;
43
+ editingLinearElement: import("@excalidraw/element").LinearElementEditor | null;
45
44
  activeTool: {
46
45
  lastActiveTool: import("../types").ActiveTool | null;
47
46
  locked: boolean;
47
+ fromSelection: boolean;
48
48
  } & import("../types").ActiveTool;
49
49
  penMode: boolean;
50
50
  penDetected: boolean;
@@ -78,7 +78,7 @@ export declare const actionToggleZenMode: {
78
78
  zoom: Readonly<{
79
79
  value: import("../types").NormalizedZoomValue;
80
80
  }>;
81
- openMenu: "shape" | "canvas" | null;
81
+ openMenu: "canvas" | "shape" | null;
82
82
  openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
83
83
  openSidebar: {
84
84
  name: string;
@@ -160,8 +160,8 @@ export declare const actionToggleZenMode: {
160
160
  data: import("../charts").Spreadsheet;
161
161
  };
162
162
  pendingImageElementId: string | null;
163
- showHyperlinkPopup: false | "editor" | "info";
164
- selectedLinearElement: import("@excalidraw/element/linearElementEditor").LinearElementEditor | null;
163
+ showHyperlinkPopup: false | "info" | "editor";
164
+ selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
165
165
  snapLines: readonly import("../snapping").SnapLine[];
166
166
  originSnapOffset: {
167
167
  x: number;
@@ -172,22 +172,20 @@ export declare const actionToggleZenMode: {
172
172
  followedBy: Set<import("../types").SocketId>;
173
173
  isCropping: boolean;
174
174
  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
- }[];
175
+ searchMatches: Readonly<{
176
+ focusedId: string | null;
177
+ matches: readonly import("../types").SearchMatch[];
178
+ }> | null;
179
+ activeLockedId: string | null;
180
+ lockedMultiSelections: {
181
+ [groupId: string]: true;
182
+ };
185
183
  };
186
184
  captureUpdate: "EVENTUALLY";
187
185
  };
188
186
  checked: (appState: Readonly<import("../types").AppState>) => boolean;
189
187
  predicate: (elements: readonly import("@excalidraw/element/types").ExcalidrawElement[], appState: import("../types").AppState, appProps: import("../types").ExcalidrawProps) => boolean;
190
- keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
188
+ keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean;
191
189
  } & {
192
- keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
190
+ keyTest?: ((event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean) | undefined;
193
191
  };
@@ -13,10 +13,10 @@ export declare const actionSendBackward: {
13
13
  captureUpdate: "IMMEDIATELY";
14
14
  };
15
15
  keyPriority: number;
16
- keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
16
+ keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean;
17
17
  PanelComponent: ({ updateData, appState }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
18
18
  } & {
19
- keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
19
+ keyTest?: ((event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean) | undefined;
20
20
  };
21
21
  export declare const actionBringForward: {
22
22
  name: "bringForward";
@@ -32,10 +32,10 @@ export declare const actionBringForward: {
32
32
  captureUpdate: "IMMEDIATELY";
33
33
  };
34
34
  keyPriority: number;
35
- keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
35
+ keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean;
36
36
  PanelComponent: ({ updateData, appState }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
37
37
  } & {
38
- keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
38
+ keyTest?: ((event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean) | undefined;
39
39
  };
40
40
  export declare const actionSendToBack: {
41
41
  name: "sendToBack";
@@ -50,10 +50,10 @@ export declare const actionSendToBack: {
50
50
  appState: Readonly<import("../types").AppState>;
51
51
  captureUpdate: "IMMEDIATELY";
52
52
  };
53
- keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
53
+ keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean;
54
54
  PanelComponent: ({ updateData, appState }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
55
55
  } & {
56
- keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
56
+ keyTest?: ((event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean) | undefined;
57
57
  };
58
58
  export declare const actionBringToFront: {
59
59
  name: "bringToFront";
@@ -68,8 +68,8 @@ export declare const actionBringToFront: {
68
68
  appState: Readonly<import("../types").AppState>;
69
69
  captureUpdate: "IMMEDIATELY";
70
70
  };
71
- keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
71
+ keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean;
72
72
  PanelComponent: ({ updateData, appState }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
73
73
  } & {
74
- keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
74
+ keyTest?: ((event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean) | undefined;
75
75
  };
@@ -1,5 +1,5 @@
1
1
  import type { ExcalidrawElement, OrderedExcalidrawElement } from "@excalidraw/element/types";
2
- import type { CaptureUpdateActionType } from "../store";
2
+ import type { CaptureUpdateActionType } from "@excalidraw/element";
3
3
  import type { AppClassProperties, AppState, ExcalidrawProps, BinaryFiles, UIAppState } from "../types";
4
4
  import type React from "react";
5
5
  export type ActionSource = "ui" | "keyboard" | "contextMenu" | "api" | "commandPalette";
@@ -14,7 +14,7 @@ export type ActionResult = {
14
14
  type ActionFn = (elements: readonly OrderedExcalidrawElement[], appState: Readonly<AppState>, formData: any, app: AppClassProperties) => ActionResult | Promise<ActionResult>;
15
15
  export type UpdaterFn = (res: ActionResult) => void;
16
16
  export type ActionFilterFn = (action: Action) => void;
17
- export type ActionName = "copy" | "cut" | "paste" | "copyAsPng" | "copyAsSvg" | "copyText" | "sendBackward" | "bringForward" | "sendToBack" | "bringToFront" | "copyStyles" | "selectAll" | "pasteStyles" | "gridMode" | "zenMode" | "objectsSnapMode" | "stats" | "changeStrokeColor" | "changeBackgroundColor" | "changeFillStyle" | "changeStrokeWidth" | "changeStrokeShape" | "changeSloppiness" | "changeStrokeStyle" | "changeArrowhead" | "changeArrowType" | "changeOpacity" | "changeFontSize" | "toggleCanvasMenu" | "toggleEditMenu" | "undo" | "redo" | "finalize" | "changeProjectName" | "changeExportBackground" | "changeExportEmbedScene" | "changeExportScale" | "saveToActiveFile" | "saveFileToDisk" | "loadScene" | "duplicateSelection" | "deleteSelectedElements" | "changeViewBackgroundColor" | "clearCanvas" | "zoomIn" | "zoomOut" | "resetZoom" | "zoomToFit" | "zoomToFitSelection" | "zoomToFitSelectionInViewport" | "changeFontFamily" | "changeTextAlign" | "changeVerticalAlign" | "toggleFullScreen" | "toggleShortcuts" | "group" | "ungroup" | "goToCollaborator" | "addToLibrary" | "changeRoundness" | "alignTop" | "alignBottom" | "alignLeft" | "alignRight" | "alignVerticallyCentered" | "alignHorizontallyCentered" | "distributeHorizontally" | "distributeVertically" | "flipHorizontal" | "flipVertical" | "viewMode" | "exportWithDarkMode" | "toggleTheme" | "increaseFontSize" | "decreaseFontSize" | "unbindText" | "hyperlink" | "bindText" | "unlockAllElements" | "toggleElementLock" | "toggleLinearEditor" | "toggleEraserTool" | "toggleHandTool" | "selectAllElementsInFrame" | "removeAllElementsFromFrame" | "updateFrameRendering" | "setFrameAsActiveTool" | "setEmbeddableAsActiveTool" | "createContainerFromText" | "wrapTextInContainer" | "commandPalette" | "autoResize" | "elementStats" | "searchMenu" | "copyElementLink" | "linkToElement" | "cropEditor" | "wrapSelectionInFrame";
17
+ export type ActionName = "copy" | "cut" | "paste" | "copyAsPng" | "copyAsSvg" | "copyText" | "sendBackward" | "bringForward" | "sendToBack" | "bringToFront" | "copyStyles" | "selectAll" | "pasteStyles" | "gridMode" | "zenMode" | "objectsSnapMode" | "stats" | "changeStrokeColor" | "changeBackgroundColor" | "changeFillStyle" | "changeStrokeWidth" | "changeStrokeShape" | "changeSloppiness" | "changeStrokeStyle" | "changeArrowhead" | "changeArrowType" | "changeOpacity" | "changeFontSize" | "toggleCanvasMenu" | "toggleEditMenu" | "undo" | "redo" | "finalize" | "changeProjectName" | "changeExportBackground" | "changeExportEmbedScene" | "changeExportScale" | "saveToActiveFile" | "saveFileToDisk" | "loadScene" | "duplicateSelection" | "deleteSelectedElements" | "changeViewBackgroundColor" | "clearCanvas" | "zoomIn" | "zoomOut" | "resetZoom" | "zoomToFit" | "zoomToFitSelection" | "zoomToFitSelectionInViewport" | "changeFontFamily" | "changeTextAlign" | "changeVerticalAlign" | "toggleFullScreen" | "toggleShortcuts" | "group" | "ungroup" | "goToCollaborator" | "addToLibrary" | "changeRoundness" | "alignTop" | "alignBottom" | "alignLeft" | "alignRight" | "alignVerticallyCentered" | "alignHorizontallyCentered" | "distributeHorizontally" | "distributeVertically" | "flipHorizontal" | "flipVertical" | "viewMode" | "exportWithDarkMode" | "toggleTheme" | "increaseFontSize" | "decreaseFontSize" | "unbindText" | "hyperlink" | "bindText" | "unlockAllElements" | "toggleElementLock" | "toggleLinearEditor" | "toggleEraserTool" | "toggleHandTool" | "selectAllElementsInFrame" | "removeAllElementsFromFrame" | "updateFrameRendering" | "setFrameAsActiveTool" | "setEmbeddableAsActiveTool" | "createContainerFromText" | "wrapTextInContainer" | "commandPalette" | "autoResize" | "elementStats" | "searchMenu" | "copyElementLink" | "linkToElement" | "cropEditor" | "wrapSelectionInFrame" | "toggleLassoTool" | "toggleShapeSwitch" | "togglePolygon";
18
18
  export type PanelComponentProps = {
19
19
  elements: readonly ExcalidrawElement[];
20
20
  appState: AppState;
@@ -22,6 +22,7 @@ export type PanelComponentProps = {
22
22
  appProps: ExcalidrawProps;
23
23
  data?: Record<string, any>;
24
24
  app: AppClassProperties;
25
+ renderAction: (name: ActionName, data?: PanelComponentProps["data"]) => React.JSX.Element | null;
25
26
  };
26
27
  export interface Action {
27
28
  name: ActionName;
@@ -35,7 +36,7 @@ export interface Action {
35
36
  predicate?: (elements: readonly ExcalidrawElement[], appState: AppState, appProps: ExcalidrawProps, app: AppClassProperties) => boolean;
36
37
  checked?: (appState: Readonly<AppState>) => boolean;
37
38
  trackEvent: false | {
38
- category: "toolbar" | "element" | "canvas" | "export" | "history" | "menu" | "collab" | "hyperlink" | "search_menu";
39
+ category: "toolbar" | "element" | "canvas" | "export" | "history" | "menu" | "collab" | "hyperlink" | "search_menu" | "shape_switch";
39
40
  action?: string;
40
41
  predicate?: (appState: Readonly<AppState>, elements: readonly ExcalidrawElement[], value: any) => boolean;
41
42
  };
@@ -1,3 +1,4 @@
1
+ import { LaserPointer } from "@excalidraw/laser-pointer";
1
2
  import type { LaserPointerOptions } from "@excalidraw/laser-pointer";
2
3
  import type { AnimationFrameHandler } from "./animation-frame-handler";
3
4
  import type App from "./components/App";
@@ -10,15 +11,18 @@ export interface Trail {
10
11
  }
11
12
  export interface AnimatedTrailOptions {
12
13
  fill: (trail: AnimatedTrail) => string;
14
+ stroke?: (trail: AnimatedTrail) => string;
15
+ animateTrail?: boolean;
13
16
  }
14
17
  export declare class AnimatedTrail implements Trail {
15
18
  private animationFrameHandler;
16
- private app;
19
+ protected app: App;
17
20
  private options;
18
21
  private currentTrail?;
19
22
  private pastTrails;
20
23
  private container?;
21
24
  private trailElement;
25
+ private trailAnimation?;
22
26
  constructor(animationFrameHandler: AnimationFrameHandler, app: App, options: Partial<LaserPointerOptions> & Partial<AnimatedTrailOptions>);
23
27
  get hasCurrentTrail(): boolean;
24
28
  hasLastPoint(x: number, y: number): boolean;
@@ -27,6 +31,8 @@ export declare class AnimatedTrail implements Trail {
27
31
  startPath(x: number, y: number): void;
28
32
  addPointToPath(x: number, y: number): void;
29
33
  endPath(): void;
34
+ getCurrentTrail(): LaserPointer | undefined;
35
+ clearTrails(): void;
30
36
  private update;
31
37
  private onFrame;
32
38
  private drawTrail;
@@ -1,39 +1,25 @@
1
1
  import type { AppState } from "./types";
2
2
  export declare const getDefaultAppState: () => Omit<AppState, "offsetTop" | "offsetLeft" | "width" | "height">;
3
3
  export declare const clearAppStateForLocalStorage: (appState: Partial<AppState>) => {
4
- viewBackgroundColor?: string | undefined;
5
- name?: string | null | undefined;
6
- zoom?: Readonly<{
7
- value: import("./types").NormalizedZoomValue;
8
- }> | undefined;
4
+ stats?: {
5
+ open: boolean;
6
+ panels: number;
7
+ } | undefined;
8
+ exportWithDarkMode?: boolean | undefined;
9
+ cursorButton?: "up" | "down" | undefined;
9
10
  scrollX?: number | undefined;
10
11
  scrollY?: number | undefined;
11
- editingGroupId?: string | null | undefined;
12
- selectedElementIds?: Readonly<{
13
- [id: string]: true;
14
- }> | undefined;
15
- theme?: import("@excalidraw/element/types").Theme | undefined;
16
- selectedGroupIds?: {
17
- [groupId: string]: boolean;
18
- } | undefined;
19
- selectedLinearElement?: import("@excalidraw/element/linearElementEditor").LinearElementEditor | null | undefined;
20
- zenModeEnabled?: boolean | undefined;
21
- gridModeEnabled?: boolean | undefined;
22
- objectsSnapModeEnabled?: boolean | undefined;
12
+ showWelcomeScreen?: boolean | undefined;
23
13
  activeTool?: ({
24
14
  lastActiveTool: import("./types").ActiveTool | null;
25
15
  locked: boolean;
16
+ fromSelection: boolean;
26
17
  } & import("./types").ActiveTool) | undefined;
27
- shouldCacheIgnoreZoom?: boolean | undefined;
28
- exportScale?: number | undefined;
29
- gridSize?: number | undefined;
30
- gridStep?: number | undefined;
31
- showWelcomeScreen?: boolean | undefined;
32
18
  penMode?: boolean | undefined;
33
19
  penDetected?: boolean | undefined;
34
20
  exportBackground?: boolean | undefined;
35
21
  exportEmbedScene?: boolean | undefined;
36
- exportWithDarkMode?: boolean | undefined;
22
+ exportScale?: number | undefined;
37
23
  currentItemStrokeColor?: string | undefined;
38
24
  currentItemBackgroundColor?: string | undefined;
39
25
  currentItemFillStyle?: import("@excalidraw/element/types").FillStyle | undefined;
@@ -48,35 +34,59 @@ export declare const clearAppStateForLocalStorage: (appState: Partial<AppState>)
48
34
  currentItemEndArrowhead?: import("@excalidraw/element/types").Arrowhead | null | undefined;
49
35
  currentItemRoundness?: import("@excalidraw/element/types").StrokeRoundness | undefined;
50
36
  currentItemArrowType?: "round" | "sharp" | "elbow" | undefined;
51
- cursorButton?: "up" | "down" | undefined;
37
+ viewBackgroundColor?: string | undefined;
52
38
  scrolledOutside?: boolean | undefined;
53
- openMenu?: "shape" | "canvas" | null | undefined;
39
+ name?: string | null | undefined;
40
+ zoom?: Readonly<{
41
+ value: import("./types").NormalizedZoomValue;
42
+ }> | undefined;
43
+ openMenu?: "canvas" | "shape" | null | undefined;
54
44
  openSidebar?: {
55
45
  name: string;
56
46
  tab?: string | undefined;
57
47
  } | null | undefined;
58
48
  defaultSidebarDockedPreference?: boolean | undefined;
59
49
  lastPointerDownWith?: import("@excalidraw/element/types").PointerType | undefined;
50
+ selectedElementIds?: Readonly<{
51
+ [id: string]: true;
52
+ }> | undefined;
60
53
  previousSelectedElementIds?: {
61
54
  [id: string]: true;
62
55
  } | undefined;
63
- stats?: {
64
- open: boolean;
65
- panels: number;
56
+ shouldCacheIgnoreZoom?: boolean | undefined;
57
+ zenModeEnabled?: boolean | undefined;
58
+ theme?: import("@excalidraw/element/types").Theme | undefined;
59
+ gridSize?: number | undefined;
60
+ gridStep?: number | undefined;
61
+ gridModeEnabled?: boolean | undefined;
62
+ selectedGroupIds?: {
63
+ [groupId: string]: boolean;
66
64
  } | undefined;
65
+ editingGroupId?: string | null | undefined;
67
66
  currentChartType?: import("@excalidraw/element/types").ChartType | undefined;
67
+ selectedLinearElement?: import("@excalidraw/element").LinearElementEditor | null | undefined;
68
+ objectsSnapModeEnabled?: boolean | undefined;
69
+ lockedMultiSelections?: {
70
+ [groupId: string]: true;
71
+ } | undefined;
68
72
  };
69
73
  export declare const cleanAppStateForExport: (appState: Partial<AppState>) => {
70
74
  viewBackgroundColor?: string | undefined;
71
- gridModeEnabled?: boolean | undefined;
72
75
  gridSize?: number | undefined;
73
76
  gridStep?: number | undefined;
77
+ gridModeEnabled?: boolean | undefined;
78
+ lockedMultiSelections?: {
79
+ [groupId: string]: true;
80
+ } | undefined;
74
81
  };
75
82
  export declare const clearAppStateForDatabase: (appState: Partial<AppState>) => {
76
83
  viewBackgroundColor?: string | undefined;
77
- gridModeEnabled?: boolean | undefined;
78
84
  gridSize?: number | undefined;
79
85
  gridStep?: number | undefined;
86
+ gridModeEnabled?: boolean | undefined;
87
+ lockedMultiSelections?: {
88
+ [groupId: string]: true;
89
+ } | undefined;
80
90
  };
81
91
  export declare const isEraserActive: ({ activeTool, }: {
82
92
  activeTool: AppState["activeTool"];
@@ -1,18 +1,21 @@
1
1
  import React from "react";
2
- import { type EXPORT_IMAGE_TYPES } from "@excalidraw/common";
3
- import { LinearElementEditor } from "@excalidraw/element/linearElementEditor";
4
- import { FlowChartCreator } from "@excalidraw/element/flowchart";
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 { Store } from "@excalidraw/element";
7
+ import type { ElementUpdate } from "@excalidraw/element";
5
8
  import type { ExcalidrawElement, NonDeleted, InitializedExcalidrawImageElement, ExcalidrawImageElement, NonDeletedExcalidrawElement, ExcalidrawFrameLikeElement, ExcalidrawIframeElement, ExcalidrawEmbeddableElement, Ordered } from "@excalidraw/element/types";
9
+ import type { Mutable } from "@excalidraw/common/utility-types";
6
10
  import { ActionManager } from "../actions/manager";
7
11
  import { AnimationFrameHandler } from "../animation-frame-handler";
8
12
  import { History } from "../history";
9
- import Scene from "../scene/Scene";
10
13
  import { Fonts } from "../fonts";
14
+ import { type WritableAtom } from "../editor-jotai";
11
15
  import { Renderer } from "../scene/Renderer";
12
- import { Emitter } from "../emitter";
13
- import { Store } from "../store";
14
- import { AnimatedTrail } from "../animated-trail";
15
16
  import { LaserTrails } from "../laser-trails";
17
+ import { LassoTrail } from "../lasso";
18
+ import { EraserTrail } from "../eraser";
16
19
  import type { ExportedElements } from "../data";
17
20
  import type { FileSystemHandle } from "../data/filesystem";
18
21
  import type { AppClassProperties, AppProps, AppState, ExcalidrawImperativeAPI, BinaryFiles, LibraryItems, SceneData, Device, FrameNameBoundsCache, SidebarName, SidebarTabName, ToolType, OnUserFollowedPayload, GenerateDiagramToCode, NullableGridSize, Offsets } from "../types";
@@ -96,11 +99,13 @@ declare class App extends React.Component<AppProps, AppState> {
96
99
  };
97
100
  animationFrameHandler: AnimationFrameHandler;
98
101
  laserTrails: LaserTrails;
99
- eraserTrail: AnimatedTrail;
102
+ eraserTrail: EraserTrail;
103
+ lassoTrail: LassoTrail;
100
104
  onChangeEmitter: Emitter<[elements: readonly ExcalidrawElement[], appState: AppState, files: BinaryFiles]>;
101
105
  onPointerDownEmitter: Emitter<[activeTool: {
102
106
  lastActiveTool: import("../types").ActiveTool | null;
103
107
  locked: boolean;
108
+ fromSelection: boolean;
104
109
  } & import("../types").ActiveTool, pointerDownState: Readonly<{
105
110
  origin: Readonly<{
106
111
  x: number;
@@ -121,7 +126,7 @@ declare class App extends React.Component<AppProps, AppState> {
121
126
  };
122
127
  originalElements: Map<string, NonDeleted<ExcalidrawElement>>;
123
128
  resize: {
124
- handleType: import("@excalidraw/element/transformHandles").MaybeTransformHandleType;
129
+ handleType: import("@excalidraw/element").MaybeTransformHandleType;
125
130
  isResizing: boolean;
126
131
  offset: {
127
132
  x: number;
@@ -147,6 +152,10 @@ declare class App extends React.Component<AppProps, AppState> {
147
152
  x: number;
148
153
  y: number;
149
154
  } | null;
155
+ origin: {
156
+ x: number;
157
+ y: number;
158
+ };
150
159
  };
151
160
  eventListeners: {
152
161
  onMove: {
@@ -165,6 +174,7 @@ declare class App extends React.Component<AppProps, AppState> {
165
174
  onPointerUpEmitter: Emitter<[activeTool: {
166
175
  lastActiveTool: import("../types").ActiveTool | null;
167
176
  locked: boolean;
177
+ fromSelection: boolean;
168
178
  } & import("../types").ActiveTool, pointerDownState: Readonly<{
169
179
  origin: Readonly<{
170
180
  x: number;
@@ -185,7 +195,7 @@ declare class App extends React.Component<AppProps, AppState> {
185
195
  };
186
196
  originalElements: Map<string, NonDeleted<ExcalidrawElement>>;
187
197
  resize: {
188
- handleType: import("@excalidraw/element/transformHandles").MaybeTransformHandleType;
198
+ handleType: import("@excalidraw/element").MaybeTransformHandleType;
189
199
  isResizing: boolean;
190
200
  offset: {
191
201
  x: number;
@@ -211,6 +221,10 @@ declare class App extends React.Component<AppProps, AppState> {
211
221
  x: number;
212
222
  y: number;
213
223
  } | null;
224
+ origin: {
225
+ x: number;
226
+ y: number;
227
+ };
214
228
  };
215
229
  eventListeners: {
216
230
  onMove: {
@@ -233,6 +247,7 @@ declare class App extends React.Component<AppProps, AppState> {
233
247
  missingPointerEventCleanupEmitter: Emitter<[event: PointerEvent | null]>;
234
248
  onRemoveEventListenersEmitter: Emitter<[]>;
235
249
  constructor(props: AppProps);
250
+ updateEditorAtom: <Value, Args extends unknown[], Result>(atom: WritableAtom<Value, Args, Result>, ...args: Args) => Result;
236
251
  private onWindowMessage;
237
252
  private cacheEmbeddableRef;
238
253
  /**
@@ -254,6 +269,7 @@ declare class App extends React.Component<AppProps, AppState> {
254
269
  render(): import("react/jsx-runtime").JSX.Element;
255
270
  focusContainer: AppClassProperties["focusContainer"];
256
271
  getSceneElementsIncludingDeleted: () => readonly import("@excalidraw/element/types").OrderedExcalidrawElement[];
272
+ getSceneElementsMapIncludingDeleted: () => Map<string, Ordered<ExcalidrawElement>> & import("@excalidraw/common/utility-types").MakeBrand<"SceneElementsMap">;
257
273
  getSceneElements: () => readonly Ordered<NonDeletedExcalidrawElement>[];
258
274
  onInsertElements: (elements: readonly ExcalidrawElement[]) => void;
259
275
  onExportImage: (type: keyof typeof EXPORT_IMAGE_TYPES, elements: ExportedElements, opts: {
@@ -384,6 +400,7 @@ declare class App extends React.Component<AppProps, AppState> {
384
400
  */
385
401
  captureUpdate?: SceneData["captureUpdate"];
386
402
  }) => void;
403
+ mutateElement: <TElement extends Mutable<ExcalidrawElement>>(element: TElement, updates: ElementUpdate<TElement>, informMutation?: boolean) => TElement;
387
404
  private triggerRender;
388
405
  /**
389
406
  * @returns whether the menu was toggled on or off
@@ -408,7 +425,8 @@ declare class App extends React.Component<AppProps, AppState> {
408
425
  customType: string;
409
426
  }) & {
410
427
  locked?: boolean;
411
- }) => void;
428
+ fromSelection?: boolean;
429
+ }, keepSelection?: boolean) => void;
412
430
  setOpenDialog: (dialogType: AppState["openDialog"]) => void;
413
431
  private setCursor;
414
432
  private resetCursor;
@@ -428,7 +446,7 @@ declare class App extends React.Component<AppProps, AppState> {
428
446
  private getTextElementAtPosition;
429
447
  private getElementAtPosition;
430
448
  private getElementsAtPosition;
431
- private getElementHitThreshold;
449
+ getElementHitThreshold(): number;
432
450
  private hitElement;
433
451
  private getTextBindableContainerAtPosition;
434
452
  private startTextEditing;
@@ -10,6 +10,7 @@ interface ButtonIconProps {
10
10
  /** include standalone style (could interfere with parent styles) */
11
11
  standalone?: boolean;
12
12
  onClick: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
13
+ style?: React.CSSProperties;
13
14
  }
14
15
  export declare const ButtonIcon: import("react").ForwardRefExoticComponent<ButtonIconProps & import("react").RefAttributes<HTMLButtonElement>>;
15
16
  export {};
@@ -4,6 +4,7 @@ interface ColorInputProps {
4
4
  onChange: (color: string) => void;
5
5
  label: string;
6
6
  colorPickerType: ColorPickerType;
7
+ placeholder?: string;
7
8
  }
8
- export declare const ColorInput: ({ color, onChange, label, colorPickerType, }: ColorInputProps) => import("react/jsx-runtime").JSX.Element;
9
+ export declare const ColorInput: ({ color, onChange, label, colorPickerType, placeholder, }: ColorInputProps) => import("react/jsx-runtime").JSX.Element;
9
10
  export {};