@myoc/excalidraw 0.18.16 → 0.18.18

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 (179) hide show
  1. package/dist/dev/{chunk-3HLOFB5F.js → chunk-MAGRVBVM.js} +13453 -10629
  2. package/dist/dev/chunk-MAGRVBVM.js.map +7 -0
  3. package/dist/dev/{chunk-PEI7EPYO.js → chunk-QO4EFL6B.js} +15 -5
  4. package/dist/dev/chunk-QO4EFL6B.js.map +7 -0
  5. package/dist/dev/chunk-WUH7JFG4.js +7 -0
  6. package/dist/dev/chunk-WUH7JFG4.js.map +7 -0
  7. package/dist/dev/data/{image-XPEIZ6XQ.js → image-BBHDGXQ3.js} +3 -3
  8. package/dist/dev/index.css +101 -24
  9. package/dist/dev/index.css.map +3 -3
  10. package/dist/dev/index.js +6587 -7610
  11. package/dist/dev/index.js.map +4 -4
  12. package/dist/dev/locales/{en-R455UJTM.js → en-2WXBKZE2.js} +2 -2
  13. package/dist/dev/subset-shared.chunk.js +1 -1
  14. package/dist/dev/subset-worker.chunk.js +1 -1
  15. package/dist/prod/chunk-4Z2WWUCC.js +7 -0
  16. package/dist/prod/chunk-KZXLT4YB.js +12 -0
  17. package/dist/prod/chunk-YBT3HBS6.js +33 -0
  18. package/dist/prod/data/image-JFILZTP3.js +1 -0
  19. package/dist/prod/index.css +1 -1
  20. package/dist/prod/index.js +18 -17
  21. package/dist/prod/locales/{en-YWERZJD6.js → en-XFR6MADM.js} +1 -1
  22. package/dist/prod/subset-shared.chunk.js +1 -1
  23. package/dist/prod/subset-worker.chunk.js +1 -1
  24. package/dist/types/common/src/constants.d.ts +19 -2
  25. package/dist/types/{excalidraw → common/src}/emitter.d.ts +1 -1
  26. package/dist/types/common/src/font-metadata.d.ts +4 -2
  27. package/dist/types/common/src/index.d.ts +1 -0
  28. package/dist/types/common/src/points.d.ts +1 -1
  29. package/dist/types/common/src/utility-types.d.ts +5 -0
  30. package/dist/types/common/src/utils.d.ts +17 -7
  31. package/dist/types/{excalidraw/scene → element/src}/Scene.d.ts +11 -14
  32. package/dist/types/element/src/align.d.ts +3 -3
  33. package/dist/types/element/src/arrange.d.ts +2 -1
  34. package/dist/types/element/src/binding.d.ts +21 -14
  35. package/dist/types/element/src/bounds.d.ts +11 -5
  36. package/dist/types/element/src/collision.d.ts +18 -12
  37. package/dist/types/element/src/cropElement.d.ts +1 -1
  38. package/dist/types/{excalidraw/change.d.ts → element/src/delta.d.ts} +63 -38
  39. package/dist/types/element/src/distance.d.ts +2 -2
  40. package/dist/types/element/src/dragElements.d.ts +3 -2
  41. package/dist/types/element/src/elbowArrow.d.ts +2 -2
  42. package/dist/types/element/src/flowchart.d.ts +3 -2
  43. package/dist/types/element/src/fractionalIndex.d.ts +9 -3
  44. package/dist/types/element/src/frame.d.ts +4 -3
  45. package/dist/types/element/src/heading.d.ts +2 -2
  46. package/dist/types/element/src/index.d.ts +43 -2
  47. package/dist/types/element/src/linearElementEditor.d.ts +21 -32
  48. package/dist/types/element/src/mutateElement.d.ts +11 -3
  49. package/dist/types/element/src/newElement.d.ts +4 -3
  50. package/dist/types/element/src/resizeElements.d.ts +5 -4
  51. package/dist/types/element/src/resizeTest.d.ts +2 -2
  52. package/dist/types/element/src/selection.d.ts +1 -6
  53. package/dist/types/element/src/shape.d.ts +42 -0
  54. package/dist/types/element/src/shapes.d.ts +10 -10
  55. package/dist/types/element/src/sizeHelpers.d.ts +2 -2
  56. package/dist/types/element/src/store.d.ts +231 -0
  57. package/dist/types/element/src/textElement.d.ts +4 -3
  58. package/dist/types/element/src/typeChecks.d.ts +19 -1
  59. package/dist/types/element/src/types.d.ts +15 -2
  60. package/dist/types/element/src/utils.d.ts +5 -1
  61. package/dist/types/element/src/zindex.d.ts +1 -1
  62. package/dist/types/excalidraw/actions/actionAddToLibrary.d.ts +42 -51
  63. package/dist/types/excalidraw/actions/actionAlign.d.ts +8 -8
  64. package/dist/types/excalidraw/actions/actionArrange.d.ts +2 -2
  65. package/dist/types/excalidraw/actions/actionBoundText.d.ts +28 -34
  66. package/dist/types/excalidraw/actions/actionCanvas.d.ts +187 -223
  67. package/dist/types/excalidraw/actions/actionClipboard.d.ts +87 -104
  68. package/dist/types/excalidraw/actions/actionCropEditor.d.ts +14 -17
  69. package/dist/types/excalidraw/actions/actionDeleteSelected.d.ts +41 -49
  70. package/dist/types/excalidraw/actions/actionDistribute.d.ts +4 -4
  71. package/dist/types/excalidraw/actions/actionDuplicateSelection.d.ts +2 -2
  72. package/dist/types/excalidraw/actions/actionElementLink.d.ts +14 -17
  73. package/dist/types/excalidraw/actions/actionElementLock.d.ts +43 -50
  74. package/dist/types/excalidraw/actions/actionEmbeddable.d.ts +14 -17
  75. package/dist/types/excalidraw/actions/actionExport.d.ts +219 -246
  76. package/dist/types/excalidraw/actions/actionFinalize.d.ts +74 -40
  77. package/dist/types/excalidraw/actions/actionFlip.d.ts +4 -4
  78. package/dist/types/excalidraw/actions/actionFrame.d.ts +100 -112
  79. package/dist/types/excalidraw/actions/actionGroup.d.ts +34 -40
  80. package/dist/types/excalidraw/actions/actionHistory.d.ts +1 -2
  81. package/dist/types/excalidraw/actions/actionLinearEditor.d.ts +506 -16
  82. package/dist/types/excalidraw/actions/actionLink.d.ts +14 -17
  83. package/dist/types/excalidraw/actions/actionMenu.d.ts +42 -51
  84. package/dist/types/excalidraw/actions/actionNavigate.d.ts +27 -33
  85. package/dist/types/excalidraw/actions/actionProperties.d.ts +206 -243
  86. package/dist/types/excalidraw/actions/actionSelectAll.d.ts +16 -19
  87. package/dist/types/excalidraw/actions/actionSmartZoom.d.ts +2 -2
  88. package/dist/types/excalidraw/actions/actionStyles.d.ts +18 -21
  89. package/dist/types/excalidraw/actions/actionToggleGridMode.d.ts +16 -19
  90. package/dist/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +16 -19
  91. package/dist/types/excalidraw/actions/actionToggleSearchMenu.d.ts +16 -200
  92. package/dist/types/excalidraw/actions/actionToggleShapeSwitch.d.ts +19 -0
  93. package/dist/types/excalidraw/actions/actionToggleStats.d.ts +16 -19
  94. package/dist/types/excalidraw/actions/actionToggleViewMode.d.ts +16 -19
  95. package/dist/types/excalidraw/actions/actionToggleZenMode.d.ts +16 -19
  96. package/dist/types/excalidraw/actions/actionZindex.d.ts +8 -8
  97. package/dist/types/excalidraw/actions/types.d.ts +4 -3
  98. package/dist/types/excalidraw/appState.d.ts +40 -31
  99. package/dist/types/excalidraw/components/App.d.ts +15 -17
  100. package/dist/types/excalidraw/components/ButtonIcon.d.ts +1 -0
  101. package/dist/types/excalidraw/components/ColorPicker/ColorInput.d.ts +2 -1
  102. package/dist/types/excalidraw/components/ColorPicker/ColorPicker.d.ts +5 -1
  103. package/dist/types/excalidraw/components/ColorPicker/CustomColorList.d.ts +1 -1
  104. package/dist/types/excalidraw/components/ColorPicker/Picker.d.ts +2 -3
  105. package/dist/types/excalidraw/components/ColorPicker/PickerColorList.d.ts +2 -3
  106. package/dist/types/excalidraw/components/ColorPicker/ShadeList.d.ts +2 -2
  107. package/dist/types/excalidraw/components/ColorPicker/TopPicks.d.ts +1 -1
  108. package/dist/types/excalidraw/components/ColorPicker/colorPickerUtils.d.ts +1 -1
  109. package/dist/types/excalidraw/components/ColorPicker/keyboardNavHandlers.d.ts +1 -1
  110. package/dist/types/excalidraw/components/ConvertElementTypePopup.d.ts +23 -0
  111. package/dist/types/excalidraw/components/ElementLinkDialog.d.ts +4 -3
  112. package/dist/types/excalidraw/components/{ButtonIconSelect.d.ts → RadioSelection.d.ts} +1 -1
  113. package/dist/types/excalidraw/components/Range.d.ts +3 -3
  114. package/dist/types/excalidraw/components/Stats/Angle.d.ts +1 -1
  115. package/dist/types/excalidraw/components/Stats/CanvasGrid.d.ts +1 -1
  116. package/dist/types/excalidraw/components/Stats/Collapsible.d.ts +2 -1
  117. package/dist/types/excalidraw/components/Stats/Dimension.d.ts +1 -1
  118. package/dist/types/excalidraw/components/Stats/DragInput.d.ts +1 -1
  119. package/dist/types/excalidraw/components/Stats/FontSize.d.ts +1 -1
  120. package/dist/types/excalidraw/components/Stats/MultiAngle.d.ts +1 -1
  121. package/dist/types/excalidraw/components/Stats/MultiDimension.d.ts +1 -1
  122. package/dist/types/excalidraw/components/Stats/MultiFontSize.d.ts +1 -1
  123. package/dist/types/excalidraw/components/Stats/MultiPosition.d.ts +1 -1
  124. package/dist/types/excalidraw/components/Stats/Position.d.ts +1 -1
  125. package/dist/types/excalidraw/components/Stats/utils.d.ts +4 -11
  126. package/dist/types/excalidraw/components/UnlockPopup.d.ts +8 -0
  127. package/dist/types/excalidraw/components/dropdownMenu/common.d.ts +1 -1
  128. package/dist/types/excalidraw/components/hyperlink/Hyperlink.d.ts +3 -2
  129. package/dist/types/excalidraw/components/hyperlink/helpers.d.ts +2 -1
  130. package/dist/types/excalidraw/components/icons.d.ts +3 -0
  131. package/dist/types/excalidraw/components/shapes.d.ts +1 -1
  132. package/dist/types/excalidraw/data/blob.d.ts +1 -1
  133. package/dist/types/excalidraw/data/transform.d.ts +1 -1
  134. package/dist/types/excalidraw/editor-jotai.d.ts +6 -6
  135. package/dist/types/excalidraw/eraser/index.d.ts +0 -2
  136. package/dist/types/excalidraw/fonts/Fonts.d.ts +1 -1
  137. package/dist/types/excalidraw/history.d.ts +30 -22
  138. package/dist/types/excalidraw/hooks/useEmitter.d.ts +1 -1
  139. package/dist/types/excalidraw/index.d.ts +9 -9
  140. package/dist/types/excalidraw/lasso/index.d.ts +1 -0
  141. package/dist/types/excalidraw/lasso/utils.d.ts +2 -1
  142. package/dist/types/excalidraw/renderer/helpers.d.ts +7 -2
  143. package/dist/types/excalidraw/scene/Renderer.d.ts +1 -2
  144. package/dist/types/excalidraw/scene/index.d.ts +2 -2
  145. package/dist/types/excalidraw/snapping.d.ts +2 -2
  146. package/dist/types/excalidraw/types.d.ts +25 -10
  147. package/dist/types/excalidraw/visualdebug.d.ts +1 -1
  148. package/dist/types/excalidraw/wysiwyg/textWysiwyg.d.ts +3 -1
  149. package/dist/types/math/src/angle.d.ts +3 -1
  150. package/dist/types/math/src/constants.d.ts +3 -0
  151. package/dist/types/math/src/curve.d.ts +34 -0
  152. package/dist/types/math/src/ellipse.d.ts +3 -3
  153. package/dist/types/math/src/index.d.ts +1 -0
  154. package/dist/types/math/src/point.d.ts +3 -3
  155. package/dist/types/math/src/polygon.d.ts +2 -2
  156. package/dist/types/math/src/segment.d.ts +5 -5
  157. package/dist/types/math/src/utils.d.ts +2 -0
  158. package/dist/types/math/src/vector.d.ts +8 -2
  159. package/dist/types/utils/src/bbox.d.ts +1 -1
  160. package/dist/types/utils/src/index.d.ts +1 -1
  161. package/dist/types/utils/src/shape.d.ts +12 -12
  162. package/dist/types/utils/src/withinBounds.d.ts +1 -1
  163. package/history.ts +147 -110
  164. package/package.json +4 -4
  165. package/dist/dev/chunk-3HLOFB5F.js.map +0 -7
  166. package/dist/dev/chunk-PEI7EPYO.js.map +0 -7
  167. package/dist/dev/chunk-QQGTICP4.js +0 -7
  168. package/dist/dev/chunk-QQGTICP4.js.map +0 -7
  169. package/dist/prod/chunk-7HNFGNL7.js +0 -7
  170. package/dist/prod/chunk-KKQVTSHB.js +0 -33
  171. package/dist/prod/chunk-KZWZ7WHC.js +0 -12
  172. package/dist/prod/data/image-QD7FUQED.js +0 -1
  173. package/dist/types/element/src/Shape.d.ts +0 -17
  174. package/dist/types/element/src/ShapeCache.d.ts +0 -25
  175. package/dist/types/excalidraw/components/ButtonSelect.d.ts +0 -9
  176. package/dist/types/excalidraw/store.d.ts +0 -129
  177. package/dist/types/utils/src/collision.d.ts +0 -8
  178. /package/dist/dev/data/{image-XPEIZ6XQ.js.map → image-BBHDGXQ3.js.map} +0 -0
  179. /package/dist/dev/locales/{en-R455UJTM.js.map → en-2WXBKZE2.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;
@@ -45,7 +45,7 @@ export declare const actionSelectAll: {
45
45
  selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
46
46
  isBindingEnabled: boolean;
47
47
  startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
48
- suggestedBindings: import("@excalidraw/element/binding").SuggestedBinding[];
48
+ suggestedBindings: import("@excalidraw/element").SuggestedBinding[];
49
49
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
50
50
  frameRendering: {
51
51
  enabled: boolean;
@@ -82,7 +82,7 @@ export declare const actionSelectAll: {
82
82
  currentItemEndArrowhead: import("@excalidraw/element/types").Arrowhead | null;
83
83
  currentHoveredFontFamily: number | null;
84
84
  currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
85
- currentItemArrowType: "round" | "sharp" | "elbow";
85
+ currentItemArrowType: "sharp" | "round" | "elbow";
86
86
  viewBackgroundColor: string;
87
87
  scrollX: number;
88
88
  scrollY: number;
@@ -94,7 +94,7 @@ export declare const actionSelectAll: {
94
94
  zoom: Readonly<{
95
95
  value: import("../types").NormalizedZoomValue;
96
96
  }>;
97
- openMenu: "shape" | "canvas" | null;
97
+ openMenu: "canvas" | "shape" | null;
98
98
  openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
99
99
  openSidebar: {
100
100
  name: string;
@@ -169,8 +169,7 @@ export declare const actionSelectAll: {
169
169
  shown: true;
170
170
  data: import("../charts").Spreadsheet;
171
171
  };
172
- pendingImageElementId: string | null;
173
- showHyperlinkPopup: false | "editor" | "info";
172
+ showHyperlinkPopup: false | "info" | "editor";
174
173
  snapLines: readonly import("../snapping").SnapLine[];
175
174
  originSnapOffset: {
176
175
  x: number;
@@ -181,20 +180,18 @@ export declare const actionSelectAll: {
181
180
  followedBy: Set<import("../types").SocketId>;
182
181
  isCropping: boolean;
183
182
  croppingElementId: string | null;
184
- searchMatches: readonly {
185
- id: string;
186
- focus: boolean;
187
- matchedLines: {
188
- offsetX: number;
189
- offsetY: number;
190
- width: number;
191
- height: number;
192
- }[];
193
- }[];
183
+ searchMatches: Readonly<{
184
+ focusedId: string | null;
185
+ matches: readonly import("../types").SearchMatch[];
186
+ }> | null;
187
+ activeLockedId: string | null;
188
+ lockedMultiSelections: {
189
+ [groupId: string]: true;
190
+ };
194
191
  };
195
192
  captureUpdate: "IMMEDIATELY";
196
193
  };
197
- keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
194
+ keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean;
198
195
  } & {
199
- keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
196
+ keyTest?: ((event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean) | undefined;
200
197
  };
@@ -10,8 +10,8 @@ export declare const actionSmartZoom: {
10
10
  perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>, _: any, app: import("../types").AppClassProperties) => {
11
11
  captureUpdate: "NEVER";
12
12
  };
13
- keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
13
+ keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean;
14
14
  PanelComponent: ({ data, updateData }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
15
15
  } & {
16
- keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
16
+ keyTest?: ((event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean) | undefined;
17
17
  };
@@ -38,7 +38,7 @@ export declare const actionCopyStyles: {
38
38
  selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
39
39
  isBindingEnabled: boolean;
40
40
  startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
41
- suggestedBindings: import("@excalidraw/element/binding").SuggestedBinding[];
41
+ suggestedBindings: import("@excalidraw/element").SuggestedBinding[];
42
42
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
43
43
  frameRendering: {
44
44
  enabled: boolean;
@@ -49,7 +49,7 @@ export declare const actionCopyStyles: {
49
49
  editingFrame: string | null;
50
50
  elementsToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawElement>[] | null;
51
51
  editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
52
- editingLinearElement: import("@excalidraw/element/linearElementEditor").LinearElementEditor | null;
52
+ editingLinearElement: import("@excalidraw/element").LinearElementEditor | null;
53
53
  activeTool: {
54
54
  lastActiveTool: import("../types").ActiveTool | null;
55
55
  locked: boolean;
@@ -75,7 +75,7 @@ export declare const actionCopyStyles: {
75
75
  currentItemEndArrowhead: import("@excalidraw/element/types").Arrowhead | null;
76
76
  currentHoveredFontFamily: number | null;
77
77
  currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
78
- currentItemArrowType: "round" | "sharp" | "elbow";
78
+ currentItemArrowType: "sharp" | "round" | "elbow";
79
79
  viewBackgroundColor: string;
80
80
  scrollX: number;
81
81
  scrollY: number;
@@ -87,7 +87,7 @@ export declare const actionCopyStyles: {
87
87
  zoom: Readonly<{
88
88
  value: import("../types").NormalizedZoomValue;
89
89
  }>;
90
- openMenu: "shape" | "canvas" | null;
90
+ openMenu: "canvas" | "shape" | null;
91
91
  openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
92
92
  openSidebar: {
93
93
  name: string;
@@ -164,9 +164,8 @@ export declare const actionCopyStyles: {
164
164
  shown: true;
165
165
  data: import("../charts").Spreadsheet;
166
166
  };
167
- pendingImageElementId: string | null;
168
- showHyperlinkPopup: false | "editor" | "info";
169
- selectedLinearElement: import("@excalidraw/element/linearElementEditor").LinearElementEditor | null;
167
+ showHyperlinkPopup: false | "info" | "editor";
168
+ selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
170
169
  snapLines: readonly import("../snapping").SnapLine[];
171
170
  originSnapOffset: {
172
171
  x: number;
@@ -177,22 +176,20 @@ export declare const actionCopyStyles: {
177
176
  followedBy: Set<import("../types").SocketId>;
178
177
  isCropping: boolean;
179
178
  croppingElementId: string | null;
180
- searchMatches: readonly {
181
- id: string;
182
- focus: boolean;
183
- matchedLines: {
184
- offsetX: number;
185
- offsetY: number;
186
- width: number;
187
- height: number;
188
- }[];
189
- }[];
179
+ searchMatches: Readonly<{
180
+ focusedId: string | null;
181
+ matches: readonly import("../types").SearchMatch[];
182
+ }> | null;
183
+ activeLockedId: string | null;
184
+ lockedMultiSelections: {
185
+ [groupId: string]: true;
186
+ };
190
187
  };
191
188
  captureUpdate: "EVENTUALLY";
192
189
  };
193
- keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
190
+ keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean;
194
191
  } & {
195
- keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
192
+ keyTest?: ((event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean) | undefined;
196
193
  };
197
194
  export declare const actionPasteStyles: {
198
195
  name: "pasteStyles";
@@ -208,7 +205,7 @@ export declare const actionPasteStyles: {
208
205
  elements: import("@excalidraw/element/types").OrderedExcalidrawElement[];
209
206
  captureUpdate: "IMMEDIATELY";
210
207
  };
211
- keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
208
+ keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean;
212
209
  } & {
213
- keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
210
+ keyTest?: ((event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean) | undefined;
214
211
  };
@@ -40,7 +40,7 @@ export declare const actionToggleGridMode: {
40
40
  selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
41
41
  isBindingEnabled: boolean;
42
42
  startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
43
- suggestedBindings: import("@excalidraw/element/binding").SuggestedBinding[];
43
+ suggestedBindings: import("@excalidraw/element").SuggestedBinding[];
44
44
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
45
45
  frameRendering: {
46
46
  enabled: boolean;
@@ -51,7 +51,7 @@ export declare const actionToggleGridMode: {
51
51
  editingFrame: string | null;
52
52
  elementsToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawElement>[] | null;
53
53
  editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
54
- editingLinearElement: import("@excalidraw/element/linearElementEditor").LinearElementEditor | null;
54
+ editingLinearElement: import("@excalidraw/element").LinearElementEditor | null;
55
55
  activeTool: {
56
56
  lastActiveTool: import("../types").ActiveTool | null;
57
57
  locked: boolean;
@@ -77,7 +77,7 @@ export declare const actionToggleGridMode: {
77
77
  currentItemEndArrowhead: import("@excalidraw/element/types").Arrowhead | null;
78
78
  currentHoveredFontFamily: number | null;
79
79
  currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
80
- currentItemArrowType: "round" | "sharp" | "elbow";
80
+ currentItemArrowType: "sharp" | "round" | "elbow";
81
81
  viewBackgroundColor: string;
82
82
  scrollX: number;
83
83
  scrollY: number;
@@ -89,7 +89,7 @@ export declare const actionToggleGridMode: {
89
89
  zoom: Readonly<{
90
90
  value: import("../types").NormalizedZoomValue;
91
91
  }>;
92
- openMenu: "shape" | "canvas" | null;
92
+ openMenu: "canvas" | "shape" | null;
93
93
  openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
94
94
  openSidebar: {
95
95
  name: string;
@@ -170,9 +170,8 @@ export declare const actionToggleGridMode: {
170
170
  shown: true;
171
171
  data: import("../charts").Spreadsheet;
172
172
  };
173
- pendingImageElementId: string | null;
174
- showHyperlinkPopup: false | "editor" | "info";
175
- selectedLinearElement: import("@excalidraw/element/linearElementEditor").LinearElementEditor | null;
173
+ showHyperlinkPopup: false | "info" | "editor";
174
+ selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
176
175
  snapLines: readonly import("../snapping").SnapLine[];
177
176
  originSnapOffset: {
178
177
  x: number;
@@ -182,22 +181,20 @@ export declare const actionToggleGridMode: {
182
181
  followedBy: Set<import("../types").SocketId>;
183
182
  isCropping: boolean;
184
183
  croppingElementId: string | null;
185
- searchMatches: readonly {
186
- id: string;
187
- focus: boolean;
188
- matchedLines: {
189
- offsetX: number;
190
- offsetY: number;
191
- width: number;
192
- height: number;
193
- }[];
194
- }[];
184
+ searchMatches: Readonly<{
185
+ focusedId: string | null;
186
+ matches: readonly import("../types").SearchMatch[];
187
+ }> | null;
188
+ activeLockedId: string | null;
189
+ lockedMultiSelections: {
190
+ [groupId: string]: true;
191
+ };
195
192
  };
196
193
  captureUpdate: "EVENTUALLY";
197
194
  };
198
195
  checked: (appState: AppState) => boolean;
199
196
  predicate: (element: readonly import("@excalidraw/element/types").ExcalidrawElement[], appState: AppState, props: import("../types").ExcalidrawProps) => boolean;
200
- keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
197
+ keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean;
201
198
  } & {
202
- keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
199
+ keyTest?: ((event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean) | undefined;
203
200
  };
@@ -38,7 +38,7 @@ export declare const actionToggleObjectsSnapMode: {
38
38
  selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
39
39
  isBindingEnabled: boolean;
40
40
  startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
41
- suggestedBindings: import("@excalidraw/element/binding").SuggestedBinding[];
41
+ suggestedBindings: import("@excalidraw/element").SuggestedBinding[];
42
42
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
43
43
  frameRendering: {
44
44
  enabled: boolean;
@@ -49,7 +49,7 @@ export declare const actionToggleObjectsSnapMode: {
49
49
  editingFrame: string | null;
50
50
  elementsToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawElement>[] | null;
51
51
  editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
52
- editingLinearElement: import("@excalidraw/element/linearElementEditor").LinearElementEditor | null;
52
+ editingLinearElement: import("@excalidraw/element").LinearElementEditor | null;
53
53
  activeTool: {
54
54
  lastActiveTool: import("../types").ActiveTool | null;
55
55
  locked: boolean;
@@ -75,7 +75,7 @@ export declare const actionToggleObjectsSnapMode: {
75
75
  currentItemEndArrowhead: import("@excalidraw/element/types").Arrowhead | null;
76
76
  currentHoveredFontFamily: number | null;
77
77
  currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
78
- currentItemArrowType: "round" | "sharp" | "elbow";
78
+ currentItemArrowType: "sharp" | "round" | "elbow";
79
79
  viewBackgroundColor: string;
80
80
  scrollX: number;
81
81
  scrollY: number;
@@ -87,7 +87,7 @@ export declare const actionToggleObjectsSnapMode: {
87
87
  zoom: Readonly<{
88
88
  value: import("../types").NormalizedZoomValue;
89
89
  }>;
90
- openMenu: "shape" | "canvas" | null;
90
+ openMenu: "canvas" | "shape" | null;
91
91
  openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
92
92
  openSidebar: {
93
93
  name: string;
@@ -168,9 +168,8 @@ export declare const actionToggleObjectsSnapMode: {
168
168
  shown: true;
169
169
  data: import("../charts").Spreadsheet;
170
170
  };
171
- pendingImageElementId: string | null;
172
- showHyperlinkPopup: false | "editor" | "info";
173
- selectedLinearElement: import("@excalidraw/element/linearElementEditor").LinearElementEditor | null;
171
+ showHyperlinkPopup: false | "info" | "editor";
172
+ selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
174
173
  snapLines: readonly import("../snapping").SnapLine[];
175
174
  originSnapOffset: {
176
175
  x: number;
@@ -180,22 +179,20 @@ export declare const actionToggleObjectsSnapMode: {
180
179
  followedBy: Set<import("../types").SocketId>;
181
180
  isCropping: boolean;
182
181
  croppingElementId: string | null;
183
- searchMatches: readonly {
184
- id: string;
185
- focus: boolean;
186
- matchedLines: {
187
- offsetX: number;
188
- offsetY: number;
189
- width: number;
190
- height: number;
191
- }[];
192
- }[];
182
+ searchMatches: Readonly<{
183
+ focusedId: string | null;
184
+ matches: readonly import("../types").SearchMatch[];
185
+ }> | null;
186
+ activeLockedId: string | null;
187
+ lockedMultiSelections: {
188
+ [groupId: string]: true;
189
+ };
193
190
  };
194
191
  captureUpdate: "EVENTUALLY";
195
192
  };
196
193
  checked: (appState: Readonly<import("../types").AppState>) => boolean;
197
194
  predicate: (elements: readonly import("@excalidraw/element/types").ExcalidrawElement[], appState: import("../types").AppState, appProps: import("../types").ExcalidrawProps) => boolean;
198
- keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
195
+ keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean;
199
196
  } & {
200
- keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
197
+ keyTest?: ((event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean) | undefined;
201
198
  };
@@ -12,187 +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
- myocSimplifiedMode: boolean;
25
- dontResizeLimitMBs: number;
26
- hideMainMenus: boolean;
27
- wheelZoomsOnDefault?: boolean | undefined;
28
- arrangeConfiguration: {
29
- algorithm: "bin-packing";
30
- gap: number;
31
- };
32
- errorMessage: import("react").ReactNode;
33
- activeEmbeddable: {
34
- element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
35
- state: "hover" | "active";
36
- } | null;
37
- newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
38
- resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
39
- multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
40
- selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
41
- isBindingEnabled: boolean;
42
- startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
43
- suggestedBindings: import("@excalidraw/element/binding").SuggestedBinding[];
44
- frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
45
- frameRendering: {
46
- enabled: boolean;
47
- name: boolean;
48
- outline: boolean;
49
- clip: boolean;
50
- };
51
- editingFrame: string | null;
52
- elementsToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawElement>[] | null;
53
- editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
54
- editingLinearElement: import("@excalidraw/element/linearElementEditor").LinearElementEditor | null;
55
- activeTool: {
56
- lastActiveTool: import("../types").ActiveTool | null;
57
- locked: boolean;
58
- fromSelection: boolean;
59
- } & import("../types").ActiveTool;
60
- penMode: boolean;
61
- penDetected: boolean;
62
- exportBackground: boolean;
63
- exportEmbedScene: boolean;
64
- exportWithDarkMode: boolean;
65
- exportScale: number;
66
- currentItemStrokeColor: string;
67
- currentItemBackgroundColor: string;
68
- currentItemFillStyle: import("@excalidraw/element/types").FillStyle;
69
- currentItemStrokeWidth: number;
70
- currentItemStrokeStyle: import("@excalidraw/element/types").StrokeStyle;
71
- currentItemRoughness: number;
72
- currentItemOpacity: number;
73
- currentItemFontFamily: number;
74
- currentItemFontSize: number;
75
- currentItemTextAlign: string;
76
- currentItemStartArrowhead: import("@excalidraw/element/types").Arrowhead | null;
77
- currentItemEndArrowhead: import("@excalidraw/element/types").Arrowhead | null;
78
- currentHoveredFontFamily: number | null;
79
- currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
80
- currentItemArrowType: "round" | "sharp" | "elbow";
81
- viewBackgroundColor: string;
82
- scrollX: number;
83
- scrollY: number;
84
- cursorButton: "up" | "down";
85
- scrolledOutside: boolean;
86
- name: string | null;
87
- isResizing: boolean;
88
- isRotating: boolean;
89
- zoom: Readonly<{
90
- value: import("../types").NormalizedZoomValue;
91
- }>;
92
- openMenu: "shape" | "canvas" | null;
93
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
94
- openDialog: {
95
- name: "imageExport" | "help" | "jsonExport";
96
- } | {
97
- name: "ttd";
98
- tab: "text-to-diagram" | "mermaid";
99
- } | {
100
- name: "commandPalette";
101
- } | {
102
- name: "elementLinkSelector";
103
- sourceElementId: string;
104
- } | null;
105
- defaultSidebarDockedPreference: boolean;
106
- lastPointerDownWith: import("@excalidraw/element/types").PointerType;
107
- selectedElementIds: Readonly<{
108
- [id: string]: true;
109
- }>;
110
- hoveredElementIds: Readonly<{
111
- [id: string]: true;
112
- }>;
113
- previousSelectedElementIds: {
114
- [id: string]: true;
115
- };
116
- selectedElementsAreBeingDragged: boolean;
117
- shouldCacheIgnoreZoom: boolean;
118
- toast: {
119
- message: string;
120
- closable?: boolean | undefined;
121
- duration?: number | undefined;
122
- } | null;
123
- zenModeEnabled: boolean;
124
- theme: import("@excalidraw/element/types").Theme;
125
- gridSize: number;
126
- gridStep: number;
127
- gridModeEnabled: boolean;
128
- viewModeEnabled: boolean;
129
- selectedGroupIds: {
130
- [groupId: string]: boolean;
131
- };
132
- editingGroupId: string | null;
133
- width: number;
134
- height: number;
135
- offsetTop: number;
136
- offsetLeft: number;
137
- fileHandle: import("browser-fs-access").FileSystemHandle | null;
138
- collaborators: Map<import("../types").SocketId, Readonly<{
139
- pointer?: import("../types").CollaboratorPointer | undefined;
140
- button?: "up" | "down" | undefined;
141
- selectedElementIds?: Readonly<{
142
- [id: string]: true;
143
- }> | undefined;
144
- username?: string | null | undefined;
145
- userState?: import("@excalidraw/common").UserIdleState | undefined;
146
- color?: {
147
- background: string;
148
- stroke: string;
149
- } | undefined;
150
- avatarUrl?: string | undefined;
151
- id?: string | undefined;
152
- socketId?: import("../types").SocketId | undefined;
153
- isCurrentUser?: boolean | undefined;
154
- isInCall?: boolean | undefined;
155
- isSpeaking?: boolean | undefined;
156
- isMuted?: boolean | undefined;
157
- }>>;
158
- stats: {
159
- open: boolean;
160
- panels: number;
161
- };
162
- currentChartType: import("@excalidraw/element/types").ChartType;
163
- pasteDialog: {
164
- shown: false;
165
- data: null;
166
- } | {
167
- shown: true;
168
- data: import("../charts").Spreadsheet;
169
- };
170
- pendingImageElementId: string | null;
171
- showHyperlinkPopup: false | "editor" | "info";
172
- selectedLinearElement: import("@excalidraw/element/linearElementEditor").LinearElementEditor | null;
173
- snapLines: readonly import("../snapping").SnapLine[];
174
- originSnapOffset: {
175
- x: number;
176
- y: number;
177
- } | null;
178
- objectsSnapModeEnabled: boolean;
179
- userToFollow: import("../types").UserToFollow | null;
180
- followedBy: Set<import("../types").SocketId>;
181
- isCropping: boolean;
182
- croppingElementId: string | null;
183
- searchMatches: readonly {
184
- id: string;
185
- focus: boolean;
186
- matchedLines: {
187
- offsetX: number;
188
- offsetY: number;
189
- width: number;
190
- height: number;
191
- }[];
192
- }[];
193
- };
194
- captureUpdate: "EVENTUALLY";
195
- } | {
196
15
  appState: {
197
16
  openSidebar: {
198
17
  name: "default";
@@ -225,7 +44,7 @@ export declare const actionToggleSearchMenu: {
225
44
  selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
226
45
  isBindingEnabled: boolean;
227
46
  startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
228
- suggestedBindings: import("@excalidraw/element/binding").SuggestedBinding[];
47
+ suggestedBindings: import("@excalidraw/element").SuggestedBinding[];
229
48
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
230
49
  frameRendering: {
231
50
  enabled: boolean;
@@ -236,7 +55,7 @@ export declare const actionToggleSearchMenu: {
236
55
  editingFrame: string | null;
237
56
  elementsToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawElement>[] | null;
238
57
  editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
239
- editingLinearElement: import("@excalidraw/element/linearElementEditor").LinearElementEditor | null;
58
+ editingLinearElement: import("@excalidraw/element").LinearElementEditor | null;
240
59
  activeTool: {
241
60
  lastActiveTool: import("../types").ActiveTool | null;
242
61
  locked: boolean;
@@ -262,7 +81,7 @@ export declare const actionToggleSearchMenu: {
262
81
  currentItemEndArrowhead: import("@excalidraw/element/types").Arrowhead | null;
263
82
  currentHoveredFontFamily: number | null;
264
83
  currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
265
- currentItemArrowType: "round" | "sharp" | "elbow";
84
+ currentItemArrowType: "sharp" | "round" | "elbow";
266
85
  viewBackgroundColor: string;
267
86
  scrollX: number;
268
87
  scrollY: number;
@@ -274,7 +93,7 @@ export declare const actionToggleSearchMenu: {
274
93
  zoom: Readonly<{
275
94
  value: import("../types").NormalizedZoomValue;
276
95
  }>;
277
- openMenu: "shape" | "canvas" | null;
96
+ openMenu: "canvas" | "shape" | null;
278
97
  openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
279
98
  defaultSidebarDockedPreference: boolean;
280
99
  lastPointerDownWith: import("@excalidraw/element/types").PointerType;
@@ -341,9 +160,8 @@ export declare const actionToggleSearchMenu: {
341
160
  shown: true;
342
161
  data: import("../charts").Spreadsheet;
343
162
  };
344
- pendingImageElementId: string | null;
345
- showHyperlinkPopup: false | "editor" | "info";
346
- selectedLinearElement: import("@excalidraw/element/linearElementEditor").LinearElementEditor | null;
163
+ showHyperlinkPopup: false | "info" | "editor";
164
+ selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
347
165
  snapLines: readonly import("../snapping").SnapLine[];
348
166
  originSnapOffset: {
349
167
  x: number;
@@ -354,22 +172,20 @@ export declare const actionToggleSearchMenu: {
354
172
  followedBy: Set<import("../types").SocketId>;
355
173
  isCropping: boolean;
356
174
  croppingElementId: string | null;
357
- searchMatches: readonly {
358
- id: string;
359
- focus: boolean;
360
- matchedLines: {
361
- offsetX: number;
362
- offsetY: number;
363
- width: number;
364
- height: number;
365
- }[];
366
- }[];
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
+ };
367
183
  };
368
184
  captureUpdate: "EVENTUALLY";
369
185
  };
370
186
  checked: (appState: AppState) => boolean;
371
187
  predicate: (element: readonly import("@excalidraw/element/types").ExcalidrawElement[], appState: AppState, props: import("../types").ExcalidrawProps) => boolean;
372
- keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
188
+ keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean;
373
189
  } & {
374
- keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
190
+ keyTest?: ((event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean) | undefined;
375
191
  };
@@ -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
+ };