@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
  export declare const actionSelectAll: {
5
5
  name: "selectAll";
@@ -12,13 +12,13 @@ export declare const actionSelectAll: {
12
12
  perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>, value: any, app: import("../types").AppClassProperties) => false | {
13
13
  appState: {
14
14
  selectedLinearElement: LinearElementEditor | null;
15
- editingGroupId: string | null;
16
15
  selectedElementIds: Readonly<{
17
16
  [id: string]: true;
18
17
  }>;
19
18
  selectedGroupIds: {
20
19
  [groupId: string]: boolean;
21
20
  };
21
+ editingGroupId: string | null;
22
22
  contextMenu: {
23
23
  items: import("../components/ContextMenu").ContextMenuItems;
24
24
  top: number;
@@ -37,7 +37,7 @@ export declare const actionSelectAll: {
37
37
  selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
38
38
  isBindingEnabled: boolean;
39
39
  startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
40
- suggestedBindings: import("@excalidraw/element/binding").SuggestedBinding[];
40
+ suggestedBindings: import("@excalidraw/element").SuggestedBinding[];
41
41
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
42
42
  frameRendering: {
43
43
  enabled: boolean;
@@ -52,6 +52,7 @@ export declare const actionSelectAll: {
52
52
  activeTool: {
53
53
  lastActiveTool: import("../types").ActiveTool | null;
54
54
  locked: boolean;
55
+ fromSelection: boolean;
55
56
  } & import("../types").ActiveTool;
56
57
  penMode: boolean;
57
58
  penDetected: boolean;
@@ -85,7 +86,7 @@ export declare const actionSelectAll: {
85
86
  zoom: Readonly<{
86
87
  value: import("../types").NormalizedZoomValue;
87
88
  }>;
88
- openMenu: "shape" | "canvas" | null;
89
+ openMenu: "canvas" | "shape" | null;
89
90
  openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
90
91
  openSidebar: {
91
92
  name: string;
@@ -161,7 +162,7 @@ export declare const actionSelectAll: {
161
162
  data: import("../charts").Spreadsheet;
162
163
  };
163
164
  pendingImageElementId: string | null;
164
- showHyperlinkPopup: false | "editor" | "info";
165
+ showHyperlinkPopup: false | "info" | "editor";
165
166
  snapLines: readonly import("../snapping").SnapLine[];
166
167
  originSnapOffset: {
167
168
  x: number;
@@ -172,20 +173,18 @@ export declare const actionSelectAll: {
172
173
  followedBy: Set<import("../types").SocketId>;
173
174
  isCropping: boolean;
174
175
  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
- }[];
176
+ searchMatches: Readonly<{
177
+ focusedId: string | null;
178
+ matches: readonly import("../types").SearchMatch[];
179
+ }> | null;
180
+ activeLockedId: string | null;
181
+ lockedMultiSelections: {
182
+ [groupId: string]: true;
183
+ };
185
184
  };
186
185
  captureUpdate: "IMMEDIATELY";
187
186
  };
188
- keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
187
+ keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean;
189
188
  } & {
190
- keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
189
+ keyTest?: ((event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean) | undefined;
191
190
  };
@@ -30,7 +30,7 @@ export declare const actionCopyStyles: {
30
30
  selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
31
31
  isBindingEnabled: boolean;
32
32
  startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
33
- suggestedBindings: import("@excalidraw/element/binding").SuggestedBinding[];
33
+ suggestedBindings: import("@excalidraw/element").SuggestedBinding[];
34
34
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
35
35
  frameRendering: {
36
36
  enabled: boolean;
@@ -41,10 +41,11 @@ export declare const actionCopyStyles: {
41
41
  editingFrame: string | null;
42
42
  elementsToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawElement>[] | null;
43
43
  editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
44
- editingLinearElement: import("@excalidraw/element/linearElementEditor").LinearElementEditor | null;
44
+ editingLinearElement: import("@excalidraw/element").LinearElementEditor | null;
45
45
  activeTool: {
46
46
  lastActiveTool: import("../types").ActiveTool | null;
47
47
  locked: boolean;
48
+ fromSelection: boolean;
48
49
  } & import("../types").ActiveTool;
49
50
  penMode: boolean;
50
51
  penDetected: boolean;
@@ -78,7 +79,7 @@ export declare const actionCopyStyles: {
78
79
  zoom: Readonly<{
79
80
  value: import("../types").NormalizedZoomValue;
80
81
  }>;
81
- openMenu: "shape" | "canvas" | null;
82
+ openMenu: "canvas" | "shape" | null;
82
83
  openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
83
84
  openSidebar: {
84
85
  name: string;
@@ -156,8 +157,8 @@ export declare const actionCopyStyles: {
156
157
  data: import("../charts").Spreadsheet;
157
158
  };
158
159
  pendingImageElementId: string | null;
159
- showHyperlinkPopup: false | "editor" | "info";
160
- selectedLinearElement: import("@excalidraw/element/linearElementEditor").LinearElementEditor | null;
160
+ showHyperlinkPopup: false | "info" | "editor";
161
+ selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
161
162
  snapLines: readonly import("../snapping").SnapLine[];
162
163
  originSnapOffset: {
163
164
  x: number;
@@ -168,22 +169,20 @@ export declare const actionCopyStyles: {
168
169
  followedBy: Set<import("../types").SocketId>;
169
170
  isCropping: boolean;
170
171
  croppingElementId: string | null;
171
- searchMatches: readonly {
172
- id: string;
173
- focus: boolean;
174
- matchedLines: {
175
- offsetX: number;
176
- offsetY: number;
177
- width: number;
178
- height: number;
179
- }[];
180
- }[];
172
+ searchMatches: Readonly<{
173
+ focusedId: string | null;
174
+ matches: readonly import("../types").SearchMatch[];
175
+ }> | null;
176
+ activeLockedId: string | null;
177
+ lockedMultiSelections: {
178
+ [groupId: string]: true;
179
+ };
181
180
  };
182
181
  captureUpdate: "EVENTUALLY";
183
182
  };
184
- keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
183
+ keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean;
185
184
  } & {
186
- keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
185
+ keyTest?: ((event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean) | undefined;
187
186
  };
188
187
  export declare const actionPasteStyles: {
189
188
  name: "pasteStyles";
@@ -199,7 +198,7 @@ export declare const actionPasteStyles: {
199
198
  elements: import("@excalidraw/element/types").OrderedExcalidrawElement[];
200
199
  captureUpdate: "IMMEDIATELY";
201
200
  };
202
- keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
201
+ keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean;
203
202
  } & {
204
- keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
203
+ keyTest?: ((event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean) | undefined;
205
204
  };
@@ -32,7 +32,7 @@ export declare const actionToggleGridMode: {
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;
@@ -43,10 +43,11 @@ export declare const actionToggleGridMode: {
43
43
  editingFrame: string | null;
44
44
  elementsToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawElement>[] | null;
45
45
  editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
46
- editingLinearElement: import("@excalidraw/element/linearElementEditor").LinearElementEditor | null;
46
+ editingLinearElement: import("@excalidraw/element").LinearElementEditor | null;
47
47
  activeTool: {
48
48
  lastActiveTool: import("../types").ActiveTool | null;
49
49
  locked: boolean;
50
+ fromSelection: boolean;
50
51
  } & import("../types").ActiveTool;
51
52
  penMode: boolean;
52
53
  penDetected: boolean;
@@ -80,7 +81,7 @@ export declare const actionToggleGridMode: {
80
81
  zoom: Readonly<{
81
82
  value: import("../types").NormalizedZoomValue;
82
83
  }>;
83
- openMenu: "shape" | "canvas" | null;
84
+ openMenu: "canvas" | "shape" | null;
84
85
  openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
85
86
  openSidebar: {
86
87
  name: string;
@@ -162,8 +163,8 @@ export declare const actionToggleGridMode: {
162
163
  data: import("../charts").Spreadsheet;
163
164
  };
164
165
  pendingImageElementId: string | null;
165
- showHyperlinkPopup: false | "editor" | "info";
166
- selectedLinearElement: import("@excalidraw/element/linearElementEditor").LinearElementEditor | null;
166
+ showHyperlinkPopup: false | "info" | "editor";
167
+ selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
167
168
  snapLines: readonly import("../snapping").SnapLine[];
168
169
  originSnapOffset: {
169
170
  x: number;
@@ -173,22 +174,20 @@ export declare const actionToggleGridMode: {
173
174
  followedBy: Set<import("../types").SocketId>;
174
175
  isCropping: boolean;
175
176
  croppingElementId: string | null;
176
- searchMatches: readonly {
177
- id: string;
178
- focus: boolean;
179
- matchedLines: {
180
- offsetX: number;
181
- offsetY: number;
182
- width: number;
183
- height: number;
184
- }[];
185
- }[];
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
+ };
186
185
  };
187
186
  captureUpdate: "EVENTUALLY";
188
187
  };
189
188
  checked: (appState: AppState) => boolean;
190
189
  predicate: (element: readonly import("@excalidraw/element/types").ExcalidrawElement[], appState: AppState, props: import("../types").ExcalidrawProps) => boolean;
191
- keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
190
+ keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean;
192
191
  } & {
193
- keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
192
+ keyTest?: ((event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean) | undefined;
194
193
  };
@@ -30,7 +30,7 @@ export declare const actionToggleObjectsSnapMode: {
30
30
  selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
31
31
  isBindingEnabled: boolean;
32
32
  startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
33
- suggestedBindings: import("@excalidraw/element/binding").SuggestedBinding[];
33
+ suggestedBindings: import("@excalidraw/element").SuggestedBinding[];
34
34
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
35
35
  frameRendering: {
36
36
  enabled: boolean;
@@ -41,10 +41,11 @@ export declare const actionToggleObjectsSnapMode: {
41
41
  editingFrame: string | null;
42
42
  elementsToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawElement>[] | null;
43
43
  editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
44
- editingLinearElement: import("@excalidraw/element/linearElementEditor").LinearElementEditor | null;
44
+ editingLinearElement: import("@excalidraw/element").LinearElementEditor | null;
45
45
  activeTool: {
46
46
  lastActiveTool: import("../types").ActiveTool | null;
47
47
  locked: boolean;
48
+ fromSelection: boolean;
48
49
  } & import("../types").ActiveTool;
49
50
  penMode: boolean;
50
51
  penDetected: boolean;
@@ -78,7 +79,7 @@ export declare const actionToggleObjectsSnapMode: {
78
79
  zoom: Readonly<{
79
80
  value: import("../types").NormalizedZoomValue;
80
81
  }>;
81
- openMenu: "shape" | "canvas" | null;
82
+ openMenu: "canvas" | "shape" | null;
82
83
  openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
83
84
  openSidebar: {
84
85
  name: string;
@@ -160,8 +161,8 @@ export declare const actionToggleObjectsSnapMode: {
160
161
  data: import("../charts").Spreadsheet;
161
162
  };
162
163
  pendingImageElementId: string | null;
163
- showHyperlinkPopup: false | "editor" | "info";
164
- selectedLinearElement: import("@excalidraw/element/linearElementEditor").LinearElementEditor | null;
164
+ showHyperlinkPopup: false | "info" | "editor";
165
+ selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
165
166
  snapLines: readonly import("../snapping").SnapLine[];
166
167
  originSnapOffset: {
167
168
  x: number;
@@ -171,22 +172,20 @@ export declare const actionToggleObjectsSnapMode: {
171
172
  followedBy: Set<import("../types").SocketId>;
172
173
  isCropping: boolean;
173
174
  croppingElementId: string | null;
174
- searchMatches: readonly {
175
- id: string;
176
- focus: boolean;
177
- matchedLines: {
178
- offsetX: number;
179
- offsetY: number;
180
- width: number;
181
- height: number;
182
- }[];
183
- }[];
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
+ };
184
183
  };
185
184
  captureUpdate: "EVENTUALLY";
186
185
  };
187
186
  checked: (appState: Readonly<import("../types").AppState>) => boolean;
188
187
  predicate: (elements: readonly import("@excalidraw/element/types").ExcalidrawElement[], appState: import("../types").AppState, appProps: import("../types").ExcalidrawProps) => boolean;
189
- keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
188
+ keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean;
190
189
  } & {
191
- keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
190
+ keyTest?: ((event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean) | undefined;
192
191
  };
@@ -12,178 +12,6 @@ export declare const actionToggleSearchMenu: {
12
12
  predicate: (appState: Readonly<AppState>) => boolean;
13
13
  };
14
14
  perform(elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: any, app: import("../types").AppClassProperties): false | {
15
- appState: {
16
- openSidebar: null;
17
- contextMenu: {
18
- items: import("../components/ContextMenu").ContextMenuItems;
19
- top: number;
20
- left: number;
21
- } | null;
22
- showWelcomeScreen: boolean;
23
- isLoading: boolean;
24
- errorMessage: import("react").ReactNode;
25
- activeEmbeddable: {
26
- element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
27
- state: "hover" | "active";
28
- } | null;
29
- newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
30
- resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
31
- multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
32
- selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
33
- isBindingEnabled: boolean;
34
- startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
35
- suggestedBindings: import("@excalidraw/element/binding").SuggestedBinding[];
36
- frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
37
- frameRendering: {
38
- enabled: boolean;
39
- name: boolean;
40
- outline: boolean;
41
- clip: boolean;
42
- };
43
- editingFrame: string | null;
44
- elementsToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawElement>[] | null;
45
- editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
46
- editingLinearElement: import("@excalidraw/element/linearElementEditor").LinearElementEditor | null;
47
- activeTool: {
48
- lastActiveTool: import("../types").ActiveTool | null;
49
- locked: boolean;
50
- } & import("../types").ActiveTool;
51
- penMode: boolean;
52
- penDetected: boolean;
53
- exportBackground: boolean;
54
- exportEmbedScene: boolean;
55
- exportWithDarkMode: boolean;
56
- exportScale: number;
57
- currentItemStrokeColor: string;
58
- currentItemBackgroundColor: string;
59
- currentItemFillStyle: import("@excalidraw/element/types").FillStyle;
60
- currentItemStrokeWidth: number;
61
- currentItemStrokeStyle: import("@excalidraw/element/types").StrokeStyle;
62
- currentItemRoughness: number;
63
- currentItemOpacity: number;
64
- currentItemFontFamily: number;
65
- currentItemFontSize: number;
66
- currentItemTextAlign: string;
67
- currentItemStartArrowhead: import("@excalidraw/element/types").Arrowhead | null;
68
- currentItemEndArrowhead: import("@excalidraw/element/types").Arrowhead | null;
69
- currentHoveredFontFamily: number | null;
70
- currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
71
- currentItemArrowType: "round" | "sharp" | "elbow";
72
- viewBackgroundColor: string;
73
- scrollX: number;
74
- scrollY: number;
75
- cursorButton: "up" | "down";
76
- scrolledOutside: boolean;
77
- name: string | null;
78
- isResizing: boolean;
79
- isRotating: boolean;
80
- zoom: Readonly<{
81
- value: import("../types").NormalizedZoomValue;
82
- }>;
83
- openMenu: "shape" | "canvas" | null;
84
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
85
- openDialog: {
86
- name: "imageExport" | "help" | "jsonExport";
87
- } | {
88
- name: "ttd";
89
- tab: "text-to-diagram" | "mermaid";
90
- } | {
91
- name: "commandPalette";
92
- } | {
93
- name: "elementLinkSelector";
94
- sourceElementId: string;
95
- } | null;
96
- defaultSidebarDockedPreference: boolean;
97
- lastPointerDownWith: import("@excalidraw/element/types").PointerType;
98
- selectedElementIds: Readonly<{
99
- [id: string]: true;
100
- }>;
101
- hoveredElementIds: Readonly<{
102
- [id: string]: true;
103
- }>;
104
- previousSelectedElementIds: {
105
- [id: string]: true;
106
- };
107
- selectedElementsAreBeingDragged: boolean;
108
- shouldCacheIgnoreZoom: boolean;
109
- toast: {
110
- message: string;
111
- closable?: boolean | undefined;
112
- duration?: number | undefined;
113
- } | null;
114
- zenModeEnabled: boolean;
115
- theme: import("@excalidraw/element/types").Theme;
116
- gridSize: number;
117
- gridStep: number;
118
- gridModeEnabled: boolean;
119
- viewModeEnabled: boolean;
120
- selectedGroupIds: {
121
- [groupId: string]: boolean;
122
- };
123
- editingGroupId: string | null;
124
- width: number;
125
- height: number;
126
- offsetTop: number;
127
- offsetLeft: number;
128
- fileHandle: import("browser-fs-access").FileSystemHandle | null;
129
- collaborators: Map<import("../types").SocketId, Readonly<{
130
- pointer?: import("../types").CollaboratorPointer | undefined;
131
- button?: "up" | "down" | undefined;
132
- selectedElementIds?: Readonly<{
133
- [id: string]: true;
134
- }> | undefined;
135
- username?: string | null | undefined;
136
- userState?: import("@excalidraw/common").UserIdleState | undefined;
137
- color?: {
138
- background: string;
139
- stroke: string;
140
- } | undefined;
141
- avatarUrl?: string | undefined;
142
- id?: string | undefined;
143
- socketId?: import("../types").SocketId | undefined;
144
- isCurrentUser?: boolean | undefined;
145
- isInCall?: boolean | undefined;
146
- isSpeaking?: boolean | undefined;
147
- isMuted?: boolean | undefined;
148
- }>>;
149
- stats: {
150
- open: boolean;
151
- panels: number;
152
- };
153
- currentChartType: import("@excalidraw/element/types").ChartType;
154
- pasteDialog: {
155
- shown: false;
156
- data: null;
157
- } | {
158
- shown: true;
159
- data: import("../charts").Spreadsheet;
160
- };
161
- pendingImageElementId: string | null;
162
- showHyperlinkPopup: false | "editor" | "info";
163
- selectedLinearElement: import("@excalidraw/element/linearElementEditor").LinearElementEditor | null;
164
- snapLines: readonly import("../snapping").SnapLine[];
165
- originSnapOffset: {
166
- x: number;
167
- y: number;
168
- } | null;
169
- objectsSnapModeEnabled: boolean;
170
- userToFollow: import("../types").UserToFollow | null;
171
- followedBy: Set<import("../types").SocketId>;
172
- isCropping: boolean;
173
- croppingElementId: string | null;
174
- searchMatches: readonly {
175
- id: string;
176
- focus: boolean;
177
- matchedLines: {
178
- offsetX: number;
179
- offsetY: number;
180
- width: number;
181
- height: number;
182
- }[];
183
- }[];
184
- };
185
- captureUpdate: "EVENTUALLY";
186
- } | {
187
15
  appState: {
188
16
  openSidebar: {
189
17
  name: "default";
@@ -208,7 +36,7 @@ export declare const actionToggleSearchMenu: {
208
36
  selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
209
37
  isBindingEnabled: boolean;
210
38
  startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
211
- suggestedBindings: import("@excalidraw/element/binding").SuggestedBinding[];
39
+ suggestedBindings: import("@excalidraw/element").SuggestedBinding[];
212
40
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
213
41
  frameRendering: {
214
42
  enabled: boolean;
@@ -219,10 +47,11 @@ export declare const actionToggleSearchMenu: {
219
47
  editingFrame: string | null;
220
48
  elementsToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawElement>[] | null;
221
49
  editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
222
- editingLinearElement: import("@excalidraw/element/linearElementEditor").LinearElementEditor | null;
50
+ editingLinearElement: import("@excalidraw/element").LinearElementEditor | null;
223
51
  activeTool: {
224
52
  lastActiveTool: import("../types").ActiveTool | null;
225
53
  locked: boolean;
54
+ fromSelection: boolean;
226
55
  } & import("../types").ActiveTool;
227
56
  penMode: boolean;
228
57
  penDetected: boolean;
@@ -256,7 +85,7 @@ export declare const actionToggleSearchMenu: {
256
85
  zoom: Readonly<{
257
86
  value: import("../types").NormalizedZoomValue;
258
87
  }>;
259
- openMenu: "shape" | "canvas" | null;
88
+ openMenu: "canvas" | "shape" | null;
260
89
  openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
261
90
  defaultSidebarDockedPreference: boolean;
262
91
  lastPointerDownWith: import("@excalidraw/element/types").PointerType;
@@ -324,8 +153,8 @@ export declare const actionToggleSearchMenu: {
324
153
  data: import("../charts").Spreadsheet;
325
154
  };
326
155
  pendingImageElementId: string | null;
327
- showHyperlinkPopup: false | "editor" | "info";
328
- selectedLinearElement: import("@excalidraw/element/linearElementEditor").LinearElementEditor | null;
156
+ showHyperlinkPopup: false | "info" | "editor";
157
+ selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
329
158
  snapLines: readonly import("../snapping").SnapLine[];
330
159
  originSnapOffset: {
331
160
  x: number;
@@ -336,22 +165,20 @@ export declare const actionToggleSearchMenu: {
336
165
  followedBy: Set<import("../types").SocketId>;
337
166
  isCropping: boolean;
338
167
  croppingElementId: string | null;
339
- searchMatches: readonly {
340
- id: string;
341
- focus: boolean;
342
- matchedLines: {
343
- offsetX: number;
344
- offsetY: number;
345
- width: number;
346
- height: number;
347
- }[];
348
- }[];
168
+ searchMatches: Readonly<{
169
+ focusedId: string | null;
170
+ matches: readonly import("../types").SearchMatch[];
171
+ }> | null;
172
+ activeLockedId: string | null;
173
+ lockedMultiSelections: {
174
+ [groupId: string]: true;
175
+ };
349
176
  };
350
177
  captureUpdate: "EVENTUALLY";
351
178
  };
352
179
  checked: (appState: AppState) => boolean;
353
180
  predicate: (element: readonly import("@excalidraw/element/types").ExcalidrawElement[], appState: AppState, props: import("../types").ExcalidrawProps) => boolean;
354
- keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
181
+ keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean;
355
182
  } & {
356
- keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
183
+ keyTest?: ((event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean) | undefined;
357
184
  };
@@ -0,0 +1,19 @@
1
+ import type { ExcalidrawElement } from "@excalidraw/element/types";
2
+ export declare const actionToggleShapeSwitch: {
3
+ name: "toggleShapeSwitch";
4
+ label: string;
5
+ icon: () => null;
6
+ viewMode: true;
7
+ trackEvent: {
8
+ category: "shape_switch";
9
+ action: string;
10
+ };
11
+ keywords: string[];
12
+ perform(elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>, _: any, app: import("../types").AppClassProperties): {
13
+ captureUpdate: "NEVER";
14
+ };
15
+ checked: (appState: Readonly<import("../types").AppState>) => boolean;
16
+ predicate: (elements: readonly ExcalidrawElement[], appState: import("../types").AppState, props: import("../types").ExcalidrawProps) => boolean;
17
+ } & {
18
+ keyTest?: undefined;
19
+ };