@excalidraw/math 0.18.0-a9ca16e → 0.18.0-abeeaeb

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 (184) hide show
  1. package/dist/dev/index.js +297 -99
  2. package/dist/dev/index.js.map +4 -4
  3. package/dist/prod/index.js +1 -1
  4. package/dist/types/common/src/colors.d.ts +15 -1
  5. package/dist/types/common/src/constants.d.ts +12 -7
  6. package/dist/types/common/src/keys.d.ts +2 -0
  7. package/dist/types/common/src/points.d.ts +1 -1
  8. package/dist/types/common/src/utils.d.ts +1 -43
  9. package/dist/types/element/src/Scene.d.ts +6 -4
  10. package/dist/types/element/src/align.d.ts +2 -2
  11. package/dist/types/element/src/arrowEndpointText.d.ts +49 -0
  12. package/dist/types/element/src/arrows/focus.d.ts +5 -2
  13. package/dist/types/element/src/binding.d.ts +17 -8
  14. package/dist/types/element/src/bounds.d.ts +22 -7
  15. package/dist/types/element/src/bucketFill.d.ts +110 -0
  16. package/dist/types/element/src/collision.d.ts +1 -1
  17. package/dist/types/element/src/comparisons.d.ts +5 -4
  18. package/dist/types/element/src/convertToShape.d.ts +23 -0
  19. package/dist/types/element/src/distribute.d.ts +2 -2
  20. package/dist/types/element/src/dragElements.d.ts +27 -0
  21. package/dist/types/element/src/duplicate.d.ts +4 -3
  22. package/dist/types/element/src/embeddable.d.ts +2 -2
  23. package/dist/types/element/src/flowchart.d.ts +7 -7
  24. package/dist/types/element/src/fractionalIndex.d.ts +2 -2
  25. package/dist/types/element/src/frame.d.ts +9 -8
  26. package/dist/types/element/src/groups.d.ts +9 -9
  27. package/dist/types/element/src/index.d.ts +4 -1
  28. package/dist/types/element/src/linearElementEditor.d.ts +17 -10
  29. package/dist/types/element/src/newElement.d.ts +14 -0
  30. package/dist/types/element/src/renderElement.d.ts +0 -3
  31. package/dist/types/element/src/resizeElements.d.ts +2 -2
  32. package/dist/types/element/src/selection.d.ts +6 -6
  33. package/dist/types/element/src/shape.d.ts +13 -1
  34. package/dist/types/element/src/sortElements.d.ts +10 -0
  35. package/dist/types/element/src/textElement.d.ts +12 -9
  36. package/dist/types/element/src/transform.d.ts +2 -2
  37. package/dist/types/element/src/typeChecks.d.ts +26 -25
  38. package/dist/types/element/src/types.d.ts +8 -1
  39. package/dist/types/element/src/utils.d.ts +1 -1
  40. package/dist/types/element/src/zindex.d.ts +2 -2
  41. package/dist/types/excalidraw/actions/actionAddToLibrary.d.ts +45 -18
  42. package/dist/types/excalidraw/actions/actionAlign.d.ts +6 -6
  43. package/dist/types/excalidraw/actions/actionBoundText.d.ts +30 -12
  44. package/dist/types/excalidraw/actions/actionCanvas.d.ts +167 -940
  45. package/dist/types/excalidraw/actions/actionClipboard.d.ts +30 -12
  46. package/dist/types/excalidraw/actions/actionCropEditor.d.ts +15 -6
  47. package/dist/types/excalidraw/actions/actionDeleteSelected.d.ts +47 -19
  48. package/dist/types/excalidraw/actions/{actionEmbeddable.d.ts → actionDeselect.d.ts} +29 -35
  49. package/dist/types/excalidraw/actions/actionDistribute.d.ts +2 -3
  50. package/dist/types/excalidraw/actions/actionElementLink.d.ts +15 -6
  51. package/dist/types/excalidraw/actions/actionElementLock.d.ts +31 -13
  52. package/dist/types/excalidraw/actions/actionExport.d.ts +32 -14
  53. package/dist/types/excalidraw/actions/actionFrame.d.ts +57 -202
  54. package/dist/types/excalidraw/actions/actionGroup.d.ts +45 -27
  55. package/dist/types/excalidraw/actions/actionLinearEditor.d.ts +19 -8
  56. package/dist/types/excalidraw/actions/actionLink.d.ts +16 -7
  57. package/dist/types/excalidraw/actions/actionMenu.d.ts +15 -6
  58. package/dist/types/excalidraw/actions/actionProperties.d.ts +60 -30
  59. package/dist/types/excalidraw/actions/actionSelectAll.d.ts +20 -11
  60. package/dist/types/excalidraw/actions/actionStyles.d.ts +15 -6
  61. package/dist/types/excalidraw/actions/actionTextAutoResize.d.ts +1 -1
  62. package/dist/types/excalidraw/actions/actionToggleArrowBinding.d.ts +16 -7
  63. package/dist/types/excalidraw/actions/actionToggleGridMode.d.ts +19 -11
  64. package/dist/types/excalidraw/actions/actionToggleMidpointSnapping.d.ts +16 -7
  65. package/dist/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +16 -7
  66. package/dist/types/excalidraw/actions/actionToggleSearchMenu.d.ts +19 -11
  67. package/dist/types/excalidraw/actions/actionToggleShapeSwitch.d.ts +1 -1
  68. package/dist/types/excalidraw/actions/actionToggleStats.d.ts +16 -7
  69. package/dist/types/excalidraw/actions/actionToggleViewMode.d.ts +17 -8
  70. package/dist/types/excalidraw/actions/actionToggleZenMode.d.ts +16 -7
  71. package/dist/types/excalidraw/actions/index.d.ts +2 -2
  72. package/dist/types/excalidraw/actions/manager.d.ts +1 -0
  73. package/dist/types/excalidraw/actions/shortcuts.d.ts +1 -1
  74. package/dist/types/excalidraw/actions/types.d.ts +8 -4
  75. package/dist/types/excalidraw/{animated-trail.d.ts → animatedTrail.d.ts} +4 -3
  76. package/dist/types/excalidraw/appState.d.ts +12 -5
  77. package/dist/types/excalidraw/components/Actions.d.ts +17 -12
  78. package/dist/types/excalidraw/components/ActiveConfirmDialog.d.ts +1 -1
  79. package/dist/types/excalidraw/components/App.arrowText.d.ts +72 -0
  80. package/dist/types/excalidraw/components/App.bucketFill.d.ts +48 -0
  81. package/dist/types/excalidraw/components/App.cursor.d.ts +30 -0
  82. package/dist/types/excalidraw/components/App.d.ts +363 -66
  83. package/dist/types/excalidraw/components/App.drawshape.d.ts +55 -0
  84. package/dist/types/excalidraw/components/App.flowchart.d.ts +21 -0
  85. package/dist/types/excalidraw/components/App.viewport.d.ts +73 -0
  86. package/dist/types/excalidraw/components/ColorPicker/ColorPicker.d.ts +9 -3
  87. package/dist/types/excalidraw/components/ColorPicker/CustomColorList.d.ts +3 -1
  88. package/dist/types/excalidraw/components/ColorPicker/Picker.d.ts +3 -1
  89. package/dist/types/excalidraw/components/ColorPicker/PickerColorList.d.ts +9 -2
  90. package/dist/types/excalidraw/components/ColorPicker/ShadeList.d.ts +4 -2
  91. package/dist/types/excalidraw/components/ColorPicker/TopPicks.d.ts +8 -1
  92. package/dist/types/excalidraw/components/ColorPicker/colorPickerUtils.d.ts +1 -1
  93. package/dist/types/excalidraw/components/ColorPicker/keyboardNavHandlers.d.ts +2 -1
  94. package/dist/types/excalidraw/components/ColorPicker/topPicksDnD.d.ts +31 -0
  95. package/dist/types/excalidraw/components/CommandPalette/defaultCommandPaletteItems.d.ts +1 -2
  96. package/dist/types/excalidraw/components/ConvertElementTypePopup.d.ts +2 -2
  97. package/dist/types/excalidraw/components/CursorHint.d.ts +46 -0
  98. package/dist/types/excalidraw/components/EyeDropper.d.ts +1 -1
  99. package/dist/types/excalidraw/components/{ToolButton.d.ts → IconButton.d.ts} +16 -19
  100. package/dist/types/excalidraw/components/Island.d.ts +7 -0
  101. package/dist/types/excalidraw/components/LaserPointerButton.d.ts +2 -4
  102. package/dist/types/excalidraw/components/LayerUI.d.ts +5 -2
  103. package/dist/types/excalidraw/components/LibraryMenu.d.ts +1 -1
  104. package/dist/types/excalidraw/components/LockButton.d.ts +3 -4
  105. package/dist/types/excalidraw/components/MagicButton.d.ts +0 -2
  106. package/dist/types/excalidraw/components/MobileMenu.d.ts +4 -4
  107. package/dist/types/excalidraw/components/MobileToolbar.d.ts +9 -0
  108. package/dist/types/excalidraw/components/OverwriteConfirm/OverwriteConfirmState.d.ts +1 -1
  109. package/dist/types/excalidraw/components/PenModeButton.d.ts +2 -5
  110. package/dist/types/excalidraw/components/Popover.d.ts +1 -3
  111. package/dist/types/excalidraw/components/{ButtonIcon.d.ts → RadioButton.d.ts} +2 -5
  112. package/dist/types/excalidraw/components/SVGLayer.d.ts +1 -1
  113. package/dist/types/excalidraw/components/SearchMenu.d.ts +1 -1
  114. package/dist/types/excalidraw/components/Sidebar/Sidebar.d.ts +1 -1
  115. package/dist/types/excalidraw/components/Stats/Angle.d.ts +2 -2
  116. package/dist/types/excalidraw/components/Stats/Dimension.d.ts +2 -2
  117. package/dist/types/excalidraw/components/Stats/DragInput.d.ts +2 -2
  118. package/dist/types/excalidraw/components/Stats/MultiAngle.d.ts +2 -2
  119. package/dist/types/excalidraw/components/Stats/MultiDimension.d.ts +2 -2
  120. package/dist/types/excalidraw/components/Stats/MultiPosition.d.ts +2 -2
  121. package/dist/types/excalidraw/components/Stats/Position.d.ts +3 -3
  122. package/dist/types/excalidraw/components/Stats/utils.d.ts +1 -1
  123. package/dist/types/excalidraw/components/TTDDialog/TTDContext.d.ts +4 -4
  124. package/dist/types/excalidraw/components/TTDDialog/useTTDChatStorage.d.ts +3 -3
  125. package/dist/types/excalidraw/components/ToolPopover.d.ts +3 -6
  126. package/dist/types/excalidraw/components/Toolbar.d.ts +11 -0
  127. package/dist/types/excalidraw/components/Tools.d.ts +146 -0
  128. package/dist/types/excalidraw/components/UserList.d.ts +3 -2
  129. package/dist/types/excalidraw/components/ViewportStatusFrame/ViewportStatusFrame.d.ts +11 -0
  130. package/dist/types/excalidraw/components/canvases/InteractiveCanvas.d.ts +3 -1
  131. package/dist/types/excalidraw/components/canvases/NewElementCanvas.d.ts +1 -0
  132. package/dist/types/excalidraw/components/canvases/StaticCanvas.d.ts +1 -1
  133. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemContentRadio.d.ts +2 -1
  134. package/dist/types/excalidraw/components/footer/Footer.d.ts +3 -1
  135. package/dist/types/excalidraw/components/hyperlink/helpers.d.ts +2 -2
  136. package/dist/types/excalidraw/components/icons.d.ts +6 -1
  137. package/dist/types/excalidraw/components/main-menu/DefaultItems.d.ts +8 -4
  138. package/dist/types/excalidraw/components/positionElementBesideCursor.d.ts +26 -0
  139. package/dist/types/excalidraw/components/shapeActionPredicates.d.ts +39 -0
  140. package/dist/types/excalidraw/data/blob.d.ts +34 -16
  141. package/dist/types/excalidraw/data/index.d.ts +4 -4
  142. package/dist/types/excalidraw/data/json.d.ts +23 -14
  143. package/dist/types/excalidraw/data/library.d.ts +1 -1
  144. package/dist/types/excalidraw/drawShapeTrail.d.ts +16 -0
  145. package/dist/types/excalidraw/eraser/index.d.ts +2 -3
  146. package/dist/types/excalidraw/hooks/useAppStateValue.d.ts +29 -0
  147. package/dist/types/excalidraw/hooks/useLibraryItemSvg.d.ts +1 -1
  148. package/dist/types/excalidraw/{laser-trails.d.ts → laserTrails.d.ts} +5 -7
  149. package/dist/types/excalidraw/lasso/index.d.ts +2 -3
  150. package/dist/types/excalidraw/lasso/utils.d.ts +2 -0
  151. package/dist/types/excalidraw/renderer/animation.d.ts +5 -1
  152. package/dist/types/excalidraw/renderer/interactiveScene.d.ts +1 -3
  153. package/dist/types/excalidraw/scene/Renderer.d.ts +426 -19
  154. package/dist/types/excalidraw/scene/export.d.ts +3 -3
  155. package/dist/types/excalidraw/scene/index.d.ts +2 -2
  156. package/dist/types/excalidraw/scene/types.d.ts +4 -3
  157. package/dist/types/excalidraw/snapping.d.ts +7 -7
  158. package/dist/types/excalidraw/types.d.ts +415 -23
  159. package/dist/types/excalidraw/viewport.d.ts +275 -0
  160. package/dist/types/excalidraw/wysiwyg/textWysiwyg.d.ts +2 -3
  161. package/dist/types/fractional-indexing/src/index.d.ts +29 -0
  162. package/dist/types/laser-pointer/src/index.d.ts +2 -0
  163. package/dist/types/laser-pointer/src/math.d.ts +16 -0
  164. package/dist/types/laser-pointer/src/simplify.d.ts +2 -0
  165. package/dist/types/laser-pointer/src/state.d.ts +36 -0
  166. package/dist/types/math/src/constants.d.ts +0 -1
  167. package/dist/types/math/src/curve.d.ts +4 -1
  168. package/dist/types/math/src/index.d.ts +1 -0
  169. package/dist/types/math/src/pca.d.ts +79 -0
  170. package/dist/types/math/src/point.d.ts +1 -0
  171. package/dist/types/math/src/polygon.d.ts +25 -1
  172. package/dist/types/utils/src/export.d.ts +3 -3
  173. package/dist/types/utils/src/index.d.ts +1 -2
  174. package/package.json +2 -2
  175. package/dist/types/excalidraw/animation-frame-handler.d.ts +0 -16
  176. package/dist/types/excalidraw/components/FollowMode/FollowMode.d.ts +0 -10
  177. package/dist/types/excalidraw/components/HandButton.d.ts +0 -10
  178. package/dist/types/excalidraw/components/MobileToolBar.d.ts +0 -10
  179. package/dist/types/excalidraw/components/shapes.d.ts +0 -263
  180. package/dist/types/excalidraw/cursor.d.ts +0 -5
  181. package/dist/types/excalidraw/scene/scroll.d.ts +0 -18
  182. package/dist/types/excalidraw/scene/zoom.d.ts +0 -12
  183. package/dist/types/utils/src/bbox.d.ts +0 -9
  184. package/dist/types/utils/src/withinBounds.d.ts +0 -19
@@ -1,12 +1,12 @@
1
1
  import type { ExcalidrawElement } from "@excalidraw/element/types";
2
- import type { AppClassProperties, AppState } from "../types";
2
+ import type { AppClassProperties, UIAppState } from "../types";
3
3
  export declare const actionSelectAllElementsInFrame: {
4
4
  name: "selectAllElementsInFrame";
5
5
  label: string;
6
6
  trackEvent: {
7
7
  category: "canvas";
8
8
  };
9
- perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: unknown, app: AppClassProperties) => {
9
+ perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>, _: unknown, app: AppClassProperties) => {
10
10
  elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[];
11
11
  appState: {
12
12
  selectedElementIds: Record<string, true>;
@@ -27,13 +27,17 @@ export declare const actionSelectAllElementsInFrame: {
27
27
  multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
28
28
  selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
29
29
  isBindingEnabled: boolean;
30
+ boxSelectionMode: import("../types").BoxSelectionMode;
30
31
  bindingPreference: "enabled" | "disabled";
31
32
  isMidpointSnappingEnabled: boolean;
32
- startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
33
33
  suggestedBinding: {
34
34
  element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
35
35
  midPoint?: import("@excalidraw/math").GlobalPoint;
36
36
  } | null;
37
+ hoveredArrowTextAnchor: {
38
+ elementId: import("@excalidraw/element/types").ExcalidrawArrowElement["id"];
39
+ anchor: "start" | "end" | "label";
40
+ } | null;
37
41
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
38
42
  frameRendering: {
39
43
  enabled: boolean;
@@ -41,8 +45,8 @@ export declare const actionSelectAllElementsInFrame: {
41
45
  outline: boolean;
42
46
  clip: boolean;
43
47
  };
44
- editingFrame: string | null;
45
- elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
48
+ editingFrame: import("@excalidraw/element/types").ExcalidrawFrameLikeElement["id"] | null;
49
+ elementsToHighlight: readonly import("@excalidraw/element/types").NonDeletedExcalidrawElement[] | null;
46
50
  editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
47
51
  activeTool: {
48
52
  lastActiveTool: import("../types").ActiveTool | null;
@@ -62,9 +66,10 @@ export declare const actionSelectAllElementsInFrame: {
62
66
  currentItemStrokeColor: string;
63
67
  currentItemBackgroundColor: string;
64
68
  currentItemFillStyle: ExcalidrawElement["fillStyle"];
65
- currentItemStrokeWidth: number;
69
+ currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
66
70
  currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
67
71
  currentItemRoughness: number;
72
+ currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
68
73
  currentItemOpacity: number;
69
74
  currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
70
75
  currentItemFontSize: number;
@@ -77,6 +82,7 @@ export declare const actionSelectAllElementsInFrame: {
77
82
  viewBackgroundColor: string;
78
83
  scrollX: number;
79
84
  scrollY: number;
85
+ scrollConstraints: import("../types").ScrollConstraints | null;
80
86
  cursorButton: "up" | "down";
81
87
  scrolledOutside: boolean;
82
88
  name: string | null;
@@ -149,8 +155,6 @@ export declare const actionSelectAllElementsInFrame: {
149
155
  y: number;
150
156
  } | null;
151
157
  objectsSnapModeEnabled: boolean;
152
- userToFollow: import("../types").UserToFollow | null;
153
- followedBy: Set<import("../types").SocketId>;
154
158
  isCropping: boolean;
155
159
  croppingElementId: ExcalidrawElement["id"] | null;
156
160
  searchMatches: Readonly<{
@@ -162,14 +166,19 @@ export declare const actionSelectAllElementsInFrame: {
162
166
  [groupId: string]: true;
163
167
  };
164
168
  bindMode: import("@excalidraw/element/types").BindMode;
169
+ colorTopPicks: {
170
+ elementStroke: readonly string[] | null;
171
+ elementBackground: readonly string[] | null;
172
+ bucketFill: readonly string[] | null;
173
+ };
165
174
  };
166
175
  captureUpdate: "IMMEDIATELY";
167
176
  } | {
168
177
  elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[];
169
- appState: Readonly<AppState>;
178
+ appState: Readonly<import("../types").AppState>;
170
179
  captureUpdate: "EVENTUALLY";
171
180
  };
172
- predicate: (elements: readonly ExcalidrawElement[], appState: AppState, _: import("../types").ExcalidrawProps, app: AppClassProperties) => boolean;
181
+ predicate: (elements: readonly ExcalidrawElement[], appState: import("../types").AppState, _: import("../types").ExcalidrawProps, app: AppClassProperties) => boolean;
173
182
  } & {
174
183
  keyTest?: undefined;
175
184
  };
@@ -179,7 +188,7 @@ export declare const actionRemoveAllElementsFromFrame: {
179
188
  trackEvent: {
180
189
  category: "history";
181
190
  };
182
- perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: unknown, app: AppClassProperties) => {
191
+ perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>, _: unknown, app: AppClassProperties) => {
183
192
  elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[];
184
193
  appState: {
185
194
  selectedElementIds: {
@@ -202,13 +211,17 @@ export declare const actionRemoveAllElementsFromFrame: {
202
211
  multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
203
212
  selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
204
213
  isBindingEnabled: boolean;
214
+ boxSelectionMode: import("../types").BoxSelectionMode;
205
215
  bindingPreference: "enabled" | "disabled";
206
216
  isMidpointSnappingEnabled: boolean;
207
- startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
208
217
  suggestedBinding: {
209
218
  element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
210
219
  midPoint?: import("@excalidraw/math").GlobalPoint;
211
220
  } | null;
221
+ hoveredArrowTextAnchor: {
222
+ elementId: import("@excalidraw/element/types").ExcalidrawArrowElement["id"];
223
+ anchor: "start" | "end" | "label";
224
+ } | null;
212
225
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
213
226
  frameRendering: {
214
227
  enabled: boolean;
@@ -216,8 +229,8 @@ export declare const actionRemoveAllElementsFromFrame: {
216
229
  outline: boolean;
217
230
  clip: boolean;
218
231
  };
219
- editingFrame: string | null;
220
- elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
232
+ editingFrame: import("@excalidraw/element/types").ExcalidrawFrameLikeElement["id"] | null;
233
+ elementsToHighlight: readonly import("@excalidraw/element/types").NonDeletedExcalidrawElement[] | null;
221
234
  editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
222
235
  activeTool: {
223
236
  lastActiveTool: import("../types").ActiveTool | null;
@@ -237,9 +250,10 @@ export declare const actionRemoveAllElementsFromFrame: {
237
250
  currentItemStrokeColor: string;
238
251
  currentItemBackgroundColor: string;
239
252
  currentItemFillStyle: ExcalidrawElement["fillStyle"];
240
- currentItemStrokeWidth: number;
253
+ currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
241
254
  currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
242
255
  currentItemRoughness: number;
256
+ currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
243
257
  currentItemOpacity: number;
244
258
  currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
245
259
  currentItemFontSize: number;
@@ -252,6 +266,7 @@ export declare const actionRemoveAllElementsFromFrame: {
252
266
  viewBackgroundColor: string;
253
267
  scrollX: number;
254
268
  scrollY: number;
269
+ scrollConstraints: import("../types").ScrollConstraints | null;
255
270
  cursorButton: "up" | "down";
256
271
  scrolledOutside: boolean;
257
272
  name: string | null;
@@ -324,8 +339,6 @@ export declare const actionRemoveAllElementsFromFrame: {
324
339
  y: number;
325
340
  } | null;
326
341
  objectsSnapModeEnabled: boolean;
327
- userToFollow: import("../types").UserToFollow | null;
328
- followedBy: Set<import("../types").SocketId>;
329
342
  isCropping: boolean;
330
343
  croppingElementId: ExcalidrawElement["id"] | null;
331
344
  searchMatches: Readonly<{
@@ -337,14 +350,19 @@ export declare const actionRemoveAllElementsFromFrame: {
337
350
  [groupId: string]: true;
338
351
  };
339
352
  bindMode: import("@excalidraw/element/types").BindMode;
353
+ colorTopPicks: {
354
+ elementStroke: readonly string[] | null;
355
+ elementBackground: readonly string[] | null;
356
+ bucketFill: readonly string[] | null;
357
+ };
340
358
  };
341
359
  captureUpdate: "IMMEDIATELY";
342
360
  } | {
343
361
  elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[];
344
- appState: Readonly<AppState>;
362
+ appState: Readonly<import("../types").AppState>;
345
363
  captureUpdate: "EVENTUALLY";
346
364
  };
347
- predicate: (elements: readonly ExcalidrawElement[], appState: AppState, _: import("../types").ExcalidrawProps, app: AppClassProperties) => boolean;
365
+ predicate: (elements: readonly ExcalidrawElement[], appState: import("../types").AppState, _: import("../types").ExcalidrawProps, app: AppClassProperties) => boolean;
348
366
  } & {
349
367
  keyTest?: undefined;
350
368
  };
@@ -355,7 +373,7 @@ export declare const actionupdateFrameRendering: {
355
373
  trackEvent: {
356
374
  category: "canvas";
357
375
  };
358
- perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>) => {
376
+ perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>) => {
359
377
  elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[];
360
378
  appState: {
361
379
  frameRendering: {
@@ -381,16 +399,20 @@ export declare const actionupdateFrameRendering: {
381
399
  multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
382
400
  selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
383
401
  isBindingEnabled: boolean;
402
+ boxSelectionMode: import("../types").BoxSelectionMode;
384
403
  bindingPreference: "enabled" | "disabled";
385
404
  isMidpointSnappingEnabled: boolean;
386
- startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
387
405
  suggestedBinding: {
388
406
  element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
389
407
  midPoint?: import("@excalidraw/math").GlobalPoint;
390
408
  } | null;
409
+ hoveredArrowTextAnchor: {
410
+ elementId: import("@excalidraw/element/types").ExcalidrawArrowElement["id"];
411
+ anchor: "start" | "end" | "label";
412
+ } | null;
391
413
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
392
- editingFrame: string | null;
393
- elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
414
+ editingFrame: import("@excalidraw/element/types").ExcalidrawFrameLikeElement["id"] | null;
415
+ elementsToHighlight: readonly import("@excalidraw/element/types").NonDeletedExcalidrawElement[] | null;
394
416
  editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
395
417
  activeTool: {
396
418
  lastActiveTool: import("../types").ActiveTool | null;
@@ -410,9 +432,10 @@ export declare const actionupdateFrameRendering: {
410
432
  currentItemStrokeColor: string;
411
433
  currentItemBackgroundColor: string;
412
434
  currentItemFillStyle: ExcalidrawElement["fillStyle"];
413
- currentItemStrokeWidth: number;
435
+ currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
414
436
  currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
415
437
  currentItemRoughness: number;
438
+ currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
416
439
  currentItemOpacity: number;
417
440
  currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
418
441
  currentItemFontSize: number;
@@ -425,6 +448,7 @@ export declare const actionupdateFrameRendering: {
425
448
  viewBackgroundColor: string;
426
449
  scrollX: number;
427
450
  scrollY: number;
451
+ scrollConstraints: import("../types").ScrollConstraints | null;
428
452
  cursorButton: "up" | "down";
429
453
  scrolledOutside: boolean;
430
454
  name: string | null;
@@ -500,8 +524,6 @@ export declare const actionupdateFrameRendering: {
500
524
  y: number;
501
525
  } | null;
502
526
  objectsSnapModeEnabled: boolean;
503
- userToFollow: import("../types").UserToFollow | null;
504
- followedBy: Set<import("../types").SocketId>;
505
527
  isCropping: boolean;
506
528
  croppingElementId: ExcalidrawElement["id"] | null;
507
529
  searchMatches: Readonly<{
@@ -513,185 +535,17 @@ export declare const actionupdateFrameRendering: {
513
535
  [groupId: string]: true;
514
536
  };
515
537
  bindMode: import("@excalidraw/element/types").BindMode;
516
- };
517
- captureUpdate: "EVENTUALLY";
518
- };
519
- checked: (appState: AppState) => boolean;
520
- } & {
521
- keyTest?: undefined;
522
- };
523
- export declare const actionSetFrameAsActiveTool: {
524
- name: "setFrameAsActiveTool";
525
- label: string;
526
- trackEvent: {
527
- category: "toolbar";
528
- };
529
- icon: import("react/jsx-runtime").JSX.Element;
530
- viewMode: false;
531
- perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: unknown, app: AppClassProperties) => {
532
- elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[];
533
- appState: {
534
- activeTool: {
535
- lastActiveTool: import("../types").ActiveTool | null;
536
- locked: boolean;
537
- fromSelection: boolean;
538
- } & import("../types").ActiveTool;
539
- contextMenu: {
540
- items: import("../components/ContextMenu").ContextMenuItems;
541
- top: number;
542
- left: number;
543
- } | null;
544
- showWelcomeScreen: boolean;
545
- isLoading: boolean;
546
- errorMessage: React.ReactNode;
547
- activeEmbeddable: {
548
- element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
549
- state: "hover" | "active";
550
- } | null;
551
- newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
552
- resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
553
- multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
554
- selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
555
- isBindingEnabled: boolean;
556
- bindingPreference: "enabled" | "disabled";
557
- isMidpointSnappingEnabled: boolean;
558
- startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
559
- suggestedBinding: {
560
- element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
561
- midPoint?: import("@excalidraw/math").GlobalPoint;
562
- } | null;
563
- frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
564
- frameRendering: {
565
- enabled: boolean;
566
- name: boolean;
567
- outline: boolean;
568
- clip: boolean;
538
+ colorTopPicks: {
539
+ elementStroke: readonly string[] | null;
540
+ elementBackground: readonly string[] | null;
541
+ bucketFill: readonly string[] | null;
569
542
  };
570
- editingFrame: string | null;
571
- elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
572
- editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
573
- preferredSelectionTool: {
574
- type: "selection" | "lasso";
575
- initialized: boolean;
576
- };
577
- penMode: boolean;
578
- penDetected: boolean;
579
- exportBackground: boolean;
580
- exportEmbedScene: boolean;
581
- exportWithDarkMode: boolean;
582
- exportScale: number;
583
- currentItemStrokeColor: string;
584
- currentItemBackgroundColor: string;
585
- currentItemFillStyle: ExcalidrawElement["fillStyle"];
586
- currentItemStrokeWidth: number;
587
- currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
588
- currentItemRoughness: number;
589
- currentItemOpacity: number;
590
- currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
591
- currentItemFontSize: number;
592
- currentItemTextAlign: import("@excalidraw/element/types").TextAlign;
593
- currentItemStartArrowhead: import("@excalidraw/element/types").Arrowhead | null;
594
- currentItemEndArrowhead: import("@excalidraw/element/types").Arrowhead | null;
595
- currentHoveredFontFamily: import("@excalidraw/element/types").FontFamilyValues | null;
596
- currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
597
- currentItemArrowType: "sharp" | "round" | "elbow";
598
- viewBackgroundColor: string;
599
- scrollX: number;
600
- scrollY: number;
601
- cursorButton: "up" | "down";
602
- scrolledOutside: boolean;
603
- name: string | null;
604
- isResizing: boolean;
605
- isRotating: boolean;
606
- zoom: import("../types").Zoom;
607
- openMenu: "canvas" | null;
608
- openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
609
- openSidebar: {
610
- name: import("../types").SidebarName;
611
- tab?: import("../types").SidebarTabName;
612
- } | null;
613
- openDialog: null | {
614
- name: "imageExport" | "help" | "jsonExport";
615
- } | {
616
- name: "ttd";
617
- tab: "text-to-diagram" | "mermaid";
618
- } | {
619
- name: "commandPalette";
620
- } | {
621
- name: "settings";
622
- } | {
623
- name: "elementLinkSelector";
624
- sourceElementId: ExcalidrawElement["id"];
625
- } | {
626
- name: "charts";
627
- data: import("../charts").Spreadsheet;
628
- rawText: string;
629
- };
630
- defaultSidebarDockedPreference: boolean;
631
- lastPointerDownWith: import("@excalidraw/element/types").PointerType;
632
- selectedElementIds: Readonly<{
633
- [id: string]: true;
634
- }>;
635
- hoveredElementIds: Readonly<{
636
- [id: string]: true;
637
- }>;
638
- previousSelectedElementIds: {
639
- [id: string]: true;
640
- };
641
- selectedElementsAreBeingDragged: boolean;
642
- shouldCacheIgnoreZoom: boolean;
643
- toast: {
644
- message: React.ReactNode;
645
- closable?: boolean;
646
- duration?: number;
647
- } | null;
648
- zenModeEnabled: boolean;
649
- theme: import("@excalidraw/element/types").Theme;
650
- gridSize: number;
651
- gridStep: number;
652
- gridModeEnabled: boolean;
653
- viewModeEnabled: boolean;
654
- selectedGroupIds: {
655
- [groupId: string]: boolean;
656
- };
657
- editingGroupId: import("@excalidraw/element/types").GroupId | null;
658
- width: number;
659
- height: number;
660
- offsetTop: number;
661
- offsetLeft: number;
662
- fileHandle: FileSystemFileHandle | null;
663
- collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
664
- stats: {
665
- open: boolean;
666
- panels: number;
667
- };
668
- showHyperlinkPopup: false | "info" | "editor";
669
- selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
670
- snapLines: readonly import("../snapping").SnapLine[];
671
- originSnapOffset: {
672
- x: number;
673
- y: number;
674
- } | null;
675
- objectsSnapModeEnabled: boolean;
676
- userToFollow: import("../types").UserToFollow | null;
677
- followedBy: Set<import("../types").SocketId>;
678
- isCropping: boolean;
679
- croppingElementId: ExcalidrawElement["id"] | null;
680
- searchMatches: Readonly<{
681
- focusedId: ExcalidrawElement["id"] | null;
682
- matches: readonly import("../types").SearchMatch[];
683
- }> | null;
684
- activeLockedId: string | null;
685
- lockedMultiSelections: {
686
- [groupId: string]: true;
687
- };
688
- bindMode: import("@excalidraw/element/types").BindMode;
689
543
  };
690
544
  captureUpdate: "EVENTUALLY";
691
545
  };
692
- keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
546
+ checked: (appState: Readonly<UIAppState>) => boolean;
693
547
  } & {
694
- keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
548
+ keyTest?: undefined;
695
549
  };
696
550
  export declare const actionWrapSelectionInFrame: {
697
551
  name: "wrapSelectionInFrame";
@@ -699,8 +553,8 @@ export declare const actionWrapSelectionInFrame: {
699
553
  trackEvent: {
700
554
  category: "element";
701
555
  };
702
- predicate: (elements: readonly ExcalidrawElement[], appState: AppState, _: import("../types").ExcalidrawProps, app: AppClassProperties) => boolean;
703
- perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: unknown, app: AppClassProperties) => {
556
+ predicate: (elements: readonly ExcalidrawElement[], appState: import("../types").AppState, _: import("../types").ExcalidrawProps, app: AppClassProperties) => boolean;
557
+ perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>, _: unknown, app: AppClassProperties) => {
704
558
  elements: ((Readonly<{
705
559
  id: string;
706
560
  x: number;
@@ -1135,6 +989,7 @@ export declare const actionWrapSelectionInFrame: {
1135
989
  points: readonly import("@excalidraw/math").LocalPoint[];
1136
990
  pressures: readonly number[];
1137
991
  simulatePressure: boolean;
992
+ strokeOptions: import("@excalidraw/element/types").StrokeOptions;
1138
993
  }> & {
1139
994
  index: import("@excalidraw/element/types").FractionalIndex;
1140
995
  }) | import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameElement>)[];