@excalidraw/math 0.18.0-a9ca16e → 0.18.0-ab0255f

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 (175) 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 +17 -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/textElement.d.ts +12 -9
  35. package/dist/types/element/src/transform.d.ts +2 -2
  36. package/dist/types/element/src/typeChecks.d.ts +26 -25
  37. package/dist/types/element/src/types.d.ts +8 -1
  38. package/dist/types/element/src/utils.d.ts +1 -1
  39. package/dist/types/element/src/zindex.d.ts +2 -2
  40. package/dist/types/excalidraw/actions/actionAddToLibrary.d.ts +30 -12
  41. package/dist/types/excalidraw/actions/actionAlign.d.ts +6 -6
  42. package/dist/types/excalidraw/actions/actionBoundText.d.ts +20 -8
  43. package/dist/types/excalidraw/actions/actionCanvas.d.ts +132 -926
  44. package/dist/types/excalidraw/actions/actionClipboard.d.ts +20 -8
  45. package/dist/types/excalidraw/actions/actionCropEditor.d.ts +10 -4
  46. package/dist/types/excalidraw/actions/actionDeleteSelected.d.ts +32 -13
  47. package/dist/types/excalidraw/actions/{actionEmbeddable.d.ts → actionDeselect.d.ts} +24 -33
  48. package/dist/types/excalidraw/actions/actionDistribute.d.ts +2 -3
  49. package/dist/types/excalidraw/actions/actionElementLink.d.ts +10 -4
  50. package/dist/types/excalidraw/actions/actionElementLock.d.ts +21 -9
  51. package/dist/types/excalidraw/actions/actionExport.d.ts +22 -10
  52. package/dist/types/excalidraw/actions/actionFrame.d.ts +42 -196
  53. package/dist/types/excalidraw/actions/actionGroup.d.ts +35 -23
  54. package/dist/types/excalidraw/actions/actionLinearEditor.d.ts +14 -6
  55. package/dist/types/excalidraw/actions/actionLink.d.ts +11 -5
  56. package/dist/types/excalidraw/actions/actionMenu.d.ts +10 -4
  57. package/dist/types/excalidraw/actions/actionProperties.d.ts +50 -26
  58. package/dist/types/excalidraw/actions/actionSelectAll.d.ts +15 -9
  59. package/dist/types/excalidraw/actions/actionStyles.d.ts +10 -4
  60. package/dist/types/excalidraw/actions/actionTextAutoResize.d.ts +1 -1
  61. package/dist/types/excalidraw/actions/actionToggleArrowBinding.d.ts +11 -5
  62. package/dist/types/excalidraw/actions/actionToggleGridMode.d.ts +14 -9
  63. package/dist/types/excalidraw/actions/actionToggleMidpointSnapping.d.ts +11 -5
  64. package/dist/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +11 -5
  65. package/dist/types/excalidraw/actions/actionToggleSearchMenu.d.ts +14 -9
  66. package/dist/types/excalidraw/actions/actionToggleShapeSwitch.d.ts +1 -1
  67. package/dist/types/excalidraw/actions/actionToggleStats.d.ts +11 -5
  68. package/dist/types/excalidraw/actions/actionToggleViewMode.d.ts +12 -6
  69. package/dist/types/excalidraw/actions/actionToggleZenMode.d.ts +11 -5
  70. package/dist/types/excalidraw/actions/index.d.ts +2 -2
  71. package/dist/types/excalidraw/actions/manager.d.ts +1 -0
  72. package/dist/types/excalidraw/actions/shortcuts.d.ts +1 -1
  73. package/dist/types/excalidraw/actions/types.d.ts +8 -4
  74. package/dist/types/excalidraw/{animated-trail.d.ts → animatedTrail.d.ts} +4 -3
  75. package/dist/types/excalidraw/appState.d.ts +7 -5
  76. package/dist/types/excalidraw/components/Actions.d.ts +17 -12
  77. package/dist/types/excalidraw/components/ActiveConfirmDialog.d.ts +1 -1
  78. package/dist/types/excalidraw/components/App.arrowText.d.ts +72 -0
  79. package/dist/types/excalidraw/components/App.bucketFill.d.ts +34 -0
  80. package/dist/types/excalidraw/components/App.cursor.d.ts +31 -0
  81. package/dist/types/excalidraw/components/App.d.ts +355 -65
  82. package/dist/types/excalidraw/components/App.drawshape.d.ts +55 -0
  83. package/dist/types/excalidraw/components/App.flowchart.d.ts +21 -0
  84. package/dist/types/excalidraw/components/App.viewport.d.ts +73 -0
  85. package/dist/types/excalidraw/components/ColorPicker/ColorPicker.d.ts +5 -3
  86. package/dist/types/excalidraw/components/ColorPicker/Picker.d.ts +1 -0
  87. package/dist/types/excalidraw/components/ColorPicker/PickerColorList.d.ts +6 -1
  88. package/dist/types/excalidraw/components/ColorPicker/colorPickerUtils.d.ts +1 -1
  89. package/dist/types/excalidraw/components/ColorPicker/keyboardNavHandlers.d.ts +2 -1
  90. package/dist/types/excalidraw/components/CommandPalette/defaultCommandPaletteItems.d.ts +1 -2
  91. package/dist/types/excalidraw/components/ConvertElementTypePopup.d.ts +2 -2
  92. package/dist/types/excalidraw/components/CursorHint.d.ts +46 -0
  93. package/dist/types/excalidraw/components/EyeDropper.d.ts +1 -1
  94. package/dist/types/excalidraw/components/{ToolButton.d.ts → IconButton.d.ts} +16 -19
  95. package/dist/types/excalidraw/components/Island.d.ts +7 -0
  96. package/dist/types/excalidraw/components/LaserPointerButton.d.ts +2 -4
  97. package/dist/types/excalidraw/components/LayerUI.d.ts +4 -2
  98. package/dist/types/excalidraw/components/LibraryMenu.d.ts +1 -1
  99. package/dist/types/excalidraw/components/LockButton.d.ts +3 -4
  100. package/dist/types/excalidraw/components/MagicButton.d.ts +0 -2
  101. package/dist/types/excalidraw/components/MobileMenu.d.ts +4 -4
  102. package/dist/types/excalidraw/components/MobileToolbar.d.ts +9 -0
  103. package/dist/types/excalidraw/components/OverwriteConfirm/OverwriteConfirmState.d.ts +1 -1
  104. package/dist/types/excalidraw/components/PenModeButton.d.ts +2 -5
  105. package/dist/types/excalidraw/components/Popover.d.ts +1 -3
  106. package/dist/types/excalidraw/components/{ButtonIcon.d.ts → RadioButton.d.ts} +2 -5
  107. package/dist/types/excalidraw/components/SVGLayer.d.ts +1 -1
  108. package/dist/types/excalidraw/components/SearchMenu.d.ts +1 -1
  109. package/dist/types/excalidraw/components/Sidebar/Sidebar.d.ts +1 -1
  110. package/dist/types/excalidraw/components/Stats/Angle.d.ts +2 -2
  111. package/dist/types/excalidraw/components/Stats/Dimension.d.ts +2 -2
  112. package/dist/types/excalidraw/components/Stats/DragInput.d.ts +2 -2
  113. package/dist/types/excalidraw/components/Stats/MultiAngle.d.ts +2 -2
  114. package/dist/types/excalidraw/components/Stats/MultiDimension.d.ts +2 -2
  115. package/dist/types/excalidraw/components/Stats/MultiPosition.d.ts +2 -2
  116. package/dist/types/excalidraw/components/Stats/Position.d.ts +3 -3
  117. package/dist/types/excalidraw/components/Stats/utils.d.ts +1 -1
  118. package/dist/types/excalidraw/components/TTDDialog/TTDContext.d.ts +4 -4
  119. package/dist/types/excalidraw/components/TTDDialog/useTTDChatStorage.d.ts +3 -3
  120. package/dist/types/excalidraw/components/ToolPopover.d.ts +3 -6
  121. package/dist/types/excalidraw/components/Toolbar.d.ts +11 -0
  122. package/dist/types/excalidraw/components/Tools.d.ts +146 -0
  123. package/dist/types/excalidraw/components/canvases/InteractiveCanvas.d.ts +3 -1
  124. package/dist/types/excalidraw/components/canvases/NewElementCanvas.d.ts +1 -0
  125. package/dist/types/excalidraw/components/canvases/StaticCanvas.d.ts +1 -1
  126. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemContentRadio.d.ts +2 -1
  127. package/dist/types/excalidraw/components/footer/Footer.d.ts +3 -1
  128. package/dist/types/excalidraw/components/hyperlink/helpers.d.ts +2 -2
  129. package/dist/types/excalidraw/components/icons.d.ts +3 -1
  130. package/dist/types/excalidraw/components/main-menu/DefaultItems.d.ts +8 -4
  131. package/dist/types/excalidraw/components/positionElementBesideCursor.d.ts +26 -0
  132. package/dist/types/excalidraw/components/shapeActionPredicates.d.ts +39 -0
  133. package/dist/types/excalidraw/data/blob.d.ts +24 -12
  134. package/dist/types/excalidraw/data/index.d.ts +4 -4
  135. package/dist/types/excalidraw/data/json.d.ts +18 -12
  136. package/dist/types/excalidraw/data/library.d.ts +1 -1
  137. package/dist/types/excalidraw/drawShapeTrail.d.ts +16 -0
  138. package/dist/types/excalidraw/eraser/index.d.ts +2 -3
  139. package/dist/types/excalidraw/hooks/useAppStateValue.d.ts +29 -0
  140. package/dist/types/excalidraw/hooks/useLibraryItemSvg.d.ts +1 -1
  141. package/dist/types/excalidraw/{laser-trails.d.ts → laserTrails.d.ts} +5 -7
  142. package/dist/types/excalidraw/lasso/index.d.ts +2 -3
  143. package/dist/types/excalidraw/renderer/animation.d.ts +5 -1
  144. package/dist/types/excalidraw/renderer/interactiveScene.d.ts +1 -3
  145. package/dist/types/excalidraw/scene/Renderer.d.ts +426 -19
  146. package/dist/types/excalidraw/scene/export.d.ts +3 -3
  147. package/dist/types/excalidraw/scene/index.d.ts +2 -2
  148. package/dist/types/excalidraw/scene/types.d.ts +4 -3
  149. package/dist/types/excalidraw/snapping.d.ts +7 -7
  150. package/dist/types/excalidraw/types.d.ts +368 -19
  151. package/dist/types/excalidraw/viewport.d.ts +272 -0
  152. package/dist/types/excalidraw/wysiwyg/textWysiwyg.d.ts +2 -3
  153. package/dist/types/fractional-indexing/src/index.d.ts +29 -0
  154. package/dist/types/laser-pointer/src/index.d.ts +2 -0
  155. package/dist/types/laser-pointer/src/math.d.ts +16 -0
  156. package/dist/types/laser-pointer/src/simplify.d.ts +2 -0
  157. package/dist/types/laser-pointer/src/state.d.ts +36 -0
  158. package/dist/types/math/src/constants.d.ts +0 -1
  159. package/dist/types/math/src/curve.d.ts +4 -1
  160. package/dist/types/math/src/index.d.ts +1 -0
  161. package/dist/types/math/src/pca.d.ts +79 -0
  162. package/dist/types/math/src/point.d.ts +1 -0
  163. package/dist/types/math/src/polygon.d.ts +25 -1
  164. package/dist/types/utils/src/export.d.ts +3 -3
  165. package/dist/types/utils/src/index.d.ts +1 -2
  166. package/package.json +2 -2
  167. package/dist/types/excalidraw/animation-frame-handler.d.ts +0 -16
  168. package/dist/types/excalidraw/components/HandButton.d.ts +0 -10
  169. package/dist/types/excalidraw/components/MobileToolBar.d.ts +0 -10
  170. package/dist/types/excalidraw/components/shapes.d.ts +0 -263
  171. package/dist/types/excalidraw/cursor.d.ts +0 -5
  172. package/dist/types/excalidraw/scene/scroll.d.ts +0 -18
  173. package/dist/types/excalidraw/scene/zoom.d.ts +0 -12
  174. package/dist/types/utils/src/bbox.d.ts +0 -9
  175. package/dist/types/utils/src/withinBounds.d.ts +0 -19
@@ -135,12 +135,17 @@ export declare const actionLoadScene: {
135
135
  newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
136
136
  isBindingEnabled: boolean;
137
137
  isMidpointSnappingEnabled: boolean;
138
+ gridModeEnabled: boolean;
138
139
  suggestedBinding: {
139
140
  element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
140
141
  midPoint?: import("@excalidraw/math").GlobalPoint;
141
142
  } | null;
143
+ hoveredArrowTextAnchor: {
144
+ elementId: import("@excalidraw/element/types").ExcalidrawArrowElement["id"];
145
+ anchor: "start" | "end" | "label";
146
+ } | null;
142
147
  isRotating: boolean;
143
- elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
148
+ elementsToHighlight: readonly import("@excalidraw/element/types").NonDeletedExcalidrawElement[] | null;
144
149
  collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
145
150
  snapLines: readonly import("../snapping").SnapLine[];
146
151
  zenModeEnabled: boolean;
@@ -158,8 +163,8 @@ export declare const actionLoadScene: {
158
163
  shouldCacheIgnoreZoom: boolean;
159
164
  exportScale: number;
160
165
  currentItemArrowType: "sharp" | "round" | "elbow";
161
- bindMode: import("@excalidraw/element/types").BindMode;
162
166
  gridSize: number;
167
+ bindMode: import("@excalidraw/element/types").BindMode;
163
168
  contextMenu: {
164
169
  items: import("../components/ContextMenu").ContextMenuItems;
165
170
  top: number;
@@ -169,9 +174,9 @@ export declare const actionLoadScene: {
169
174
  isLoading: boolean;
170
175
  errorMessage: React.ReactNode;
171
176
  resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
177
+ boxSelectionMode: import("../types").BoxSelectionMode;
172
178
  bindingPreference: "enabled" | "disabled";
173
- startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
174
- editingFrame: string | null;
179
+ editingFrame: import("@excalidraw/element/types").ExcalidrawFrameLikeElement["id"] | null;
175
180
  preferredSelectionTool: {
176
181
  type: "selection" | "lasso";
177
182
  initialized: boolean;
@@ -184,9 +189,10 @@ export declare const actionLoadScene: {
184
189
  currentItemStrokeColor: string;
185
190
  currentItemBackgroundColor: string;
186
191
  currentItemFillStyle: ExcalidrawElement["fillStyle"];
187
- currentItemStrokeWidth: number;
192
+ currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
188
193
  currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
189
194
  currentItemRoughness: number;
195
+ currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
190
196
  currentItemOpacity: number;
191
197
  currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
192
198
  currentItemFontSize: number;
@@ -195,6 +201,7 @@ export declare const actionLoadScene: {
195
201
  currentItemEndArrowhead: import("@excalidraw/element/types").Arrowhead | null;
196
202
  currentHoveredFontFamily: import("@excalidraw/element/types").FontFamilyValues | null;
197
203
  currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
204
+ scrollConstraints: import("../types").ScrollConstraints | null;
198
205
  cursorButton: "up" | "down";
199
206
  scrolledOutside: boolean;
200
207
  isResizing: boolean;
@@ -216,7 +223,6 @@ export declare const actionLoadScene: {
216
223
  duration?: number;
217
224
  } | null;
218
225
  gridStep: number;
219
- gridModeEnabled: boolean;
220
226
  fileHandle: FileSystemFileHandle | null;
221
227
  stats: {
222
228
  open: boolean;
@@ -256,13 +262,17 @@ export declare const actionLoadScene: {
256
262
  multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
257
263
  selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
258
264
  isBindingEnabled: boolean;
265
+ boxSelectionMode: import("../types").BoxSelectionMode;
259
266
  bindingPreference: "enabled" | "disabled";
260
267
  isMidpointSnappingEnabled: boolean;
261
- startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
262
268
  suggestedBinding: {
263
269
  element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
264
270
  midPoint?: import("@excalidraw/math").GlobalPoint;
265
271
  } | null;
272
+ hoveredArrowTextAnchor: {
273
+ elementId: import("@excalidraw/element/types").ExcalidrawArrowElement["id"];
274
+ anchor: "start" | "end" | "label";
275
+ } | null;
266
276
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
267
277
  frameRendering: {
268
278
  enabled: boolean;
@@ -270,8 +280,8 @@ export declare const actionLoadScene: {
270
280
  outline: boolean;
271
281
  clip: boolean;
272
282
  };
273
- editingFrame: string | null;
274
- elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
283
+ editingFrame: import("@excalidraw/element/types").ExcalidrawFrameLikeElement["id"] | null;
284
+ elementsToHighlight: readonly import("@excalidraw/element/types").NonDeletedExcalidrawElement[] | null;
275
285
  editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
276
286
  activeTool: {
277
287
  lastActiveTool: import("../types").ActiveTool | null;
@@ -291,9 +301,10 @@ export declare const actionLoadScene: {
291
301
  currentItemStrokeColor: string;
292
302
  currentItemBackgroundColor: string;
293
303
  currentItemFillStyle: ExcalidrawElement["fillStyle"];
294
- currentItemStrokeWidth: number;
304
+ currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
295
305
  currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
296
306
  currentItemRoughness: number;
307
+ currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
297
308
  currentItemOpacity: number;
298
309
  currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
299
310
  currentItemFontSize: number;
@@ -306,6 +317,7 @@ export declare const actionLoadScene: {
306
317
  viewBackgroundColor: string;
307
318
  scrollX: number;
308
319
  scrollY: number;
320
+ scrollConstraints: import("../types").ScrollConstraints | null;
309
321
  cursorButton: "up" | "down";
310
322
  scrolledOutside: boolean;
311
323
  name: string | null;
@@ -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;
@@ -166,10 +172,10 @@ export declare const actionSelectAllElementsInFrame: {
166
172
  captureUpdate: "IMMEDIATELY";
167
173
  } | {
168
174
  elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[];
169
- appState: Readonly<AppState>;
175
+ appState: Readonly<import("../types").AppState>;
170
176
  captureUpdate: "EVENTUALLY";
171
177
  };
172
- predicate: (elements: readonly ExcalidrawElement[], appState: AppState, _: import("../types").ExcalidrawProps, app: AppClassProperties) => boolean;
178
+ predicate: (elements: readonly ExcalidrawElement[], appState: import("../types").AppState, _: import("../types").ExcalidrawProps, app: AppClassProperties) => boolean;
173
179
  } & {
174
180
  keyTest?: undefined;
175
181
  };
@@ -179,7 +185,7 @@ export declare const actionRemoveAllElementsFromFrame: {
179
185
  trackEvent: {
180
186
  category: "history";
181
187
  };
182
- perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: unknown, app: AppClassProperties) => {
188
+ perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>, _: unknown, app: AppClassProperties) => {
183
189
  elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[];
184
190
  appState: {
185
191
  selectedElementIds: {
@@ -202,13 +208,17 @@ export declare const actionRemoveAllElementsFromFrame: {
202
208
  multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
203
209
  selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
204
210
  isBindingEnabled: boolean;
211
+ boxSelectionMode: import("../types").BoxSelectionMode;
205
212
  bindingPreference: "enabled" | "disabled";
206
213
  isMidpointSnappingEnabled: boolean;
207
- startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
208
214
  suggestedBinding: {
209
215
  element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
210
216
  midPoint?: import("@excalidraw/math").GlobalPoint;
211
217
  } | null;
218
+ hoveredArrowTextAnchor: {
219
+ elementId: import("@excalidraw/element/types").ExcalidrawArrowElement["id"];
220
+ anchor: "start" | "end" | "label";
221
+ } | null;
212
222
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
213
223
  frameRendering: {
214
224
  enabled: boolean;
@@ -216,8 +226,8 @@ export declare const actionRemoveAllElementsFromFrame: {
216
226
  outline: boolean;
217
227
  clip: boolean;
218
228
  };
219
- editingFrame: string | null;
220
- elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
229
+ editingFrame: import("@excalidraw/element/types").ExcalidrawFrameLikeElement["id"] | null;
230
+ elementsToHighlight: readonly import("@excalidraw/element/types").NonDeletedExcalidrawElement[] | null;
221
231
  editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
222
232
  activeTool: {
223
233
  lastActiveTool: import("../types").ActiveTool | null;
@@ -237,9 +247,10 @@ export declare const actionRemoveAllElementsFromFrame: {
237
247
  currentItemStrokeColor: string;
238
248
  currentItemBackgroundColor: string;
239
249
  currentItemFillStyle: ExcalidrawElement["fillStyle"];
240
- currentItemStrokeWidth: number;
250
+ currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
241
251
  currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
242
252
  currentItemRoughness: number;
253
+ currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
243
254
  currentItemOpacity: number;
244
255
  currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
245
256
  currentItemFontSize: number;
@@ -252,6 +263,7 @@ export declare const actionRemoveAllElementsFromFrame: {
252
263
  viewBackgroundColor: string;
253
264
  scrollX: number;
254
265
  scrollY: number;
266
+ scrollConstraints: import("../types").ScrollConstraints | null;
255
267
  cursorButton: "up" | "down";
256
268
  scrolledOutside: boolean;
257
269
  name: string | null;
@@ -341,10 +353,10 @@ export declare const actionRemoveAllElementsFromFrame: {
341
353
  captureUpdate: "IMMEDIATELY";
342
354
  } | {
343
355
  elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[];
344
- appState: Readonly<AppState>;
356
+ appState: Readonly<import("../types").AppState>;
345
357
  captureUpdate: "EVENTUALLY";
346
358
  };
347
- predicate: (elements: readonly ExcalidrawElement[], appState: AppState, _: import("../types").ExcalidrawProps, app: AppClassProperties) => boolean;
359
+ predicate: (elements: readonly ExcalidrawElement[], appState: import("../types").AppState, _: import("../types").ExcalidrawProps, app: AppClassProperties) => boolean;
348
360
  } & {
349
361
  keyTest?: undefined;
350
362
  };
@@ -355,7 +367,7 @@ export declare const actionupdateFrameRendering: {
355
367
  trackEvent: {
356
368
  category: "canvas";
357
369
  };
358
- perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>) => {
370
+ perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>) => {
359
371
  elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[];
360
372
  appState: {
361
373
  frameRendering: {
@@ -381,16 +393,20 @@ export declare const actionupdateFrameRendering: {
381
393
  multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
382
394
  selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
383
395
  isBindingEnabled: boolean;
396
+ boxSelectionMode: import("../types").BoxSelectionMode;
384
397
  bindingPreference: "enabled" | "disabled";
385
398
  isMidpointSnappingEnabled: boolean;
386
- startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
387
399
  suggestedBinding: {
388
400
  element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
389
401
  midPoint?: import("@excalidraw/math").GlobalPoint;
390
402
  } | null;
403
+ hoveredArrowTextAnchor: {
404
+ elementId: import("@excalidraw/element/types").ExcalidrawArrowElement["id"];
405
+ anchor: "start" | "end" | "label";
406
+ } | null;
391
407
  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;
408
+ editingFrame: import("@excalidraw/element/types").ExcalidrawFrameLikeElement["id"] | null;
409
+ elementsToHighlight: readonly import("@excalidraw/element/types").NonDeletedExcalidrawElement[] | null;
394
410
  editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
395
411
  activeTool: {
396
412
  lastActiveTool: import("../types").ActiveTool | null;
@@ -410,9 +426,10 @@ export declare const actionupdateFrameRendering: {
410
426
  currentItemStrokeColor: string;
411
427
  currentItemBackgroundColor: string;
412
428
  currentItemFillStyle: ExcalidrawElement["fillStyle"];
413
- currentItemStrokeWidth: number;
429
+ currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
414
430
  currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
415
431
  currentItemRoughness: number;
432
+ currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
416
433
  currentItemOpacity: number;
417
434
  currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
418
435
  currentItemFontSize: number;
@@ -425,6 +442,7 @@ export declare const actionupdateFrameRendering: {
425
442
  viewBackgroundColor: string;
426
443
  scrollX: number;
427
444
  scrollY: number;
445
+ scrollConstraints: import("../types").ScrollConstraints | null;
428
446
  cursorButton: "up" | "down";
429
447
  scrolledOutside: boolean;
430
448
  name: string | null;
@@ -516,191 +534,18 @@ export declare const actionupdateFrameRendering: {
516
534
  };
517
535
  captureUpdate: "EVENTUALLY";
518
536
  };
519
- checked: (appState: AppState) => boolean;
537
+ checked: (appState: Readonly<UIAppState>) => boolean;
520
538
  } & {
521
539
  keyTest?: undefined;
522
540
  };
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;
569
- };
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
- };
690
- captureUpdate: "EVENTUALLY";
691
- };
692
- keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
693
- } & {
694
- keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
695
- };
696
541
  export declare const actionWrapSelectionInFrame: {
697
542
  name: "wrapSelectionInFrame";
698
543
  label: string;
699
544
  trackEvent: {
700
545
  category: "element";
701
546
  };
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) => {
547
+ predicate: (elements: readonly ExcalidrawElement[], appState: import("../types").AppState, _: import("../types").ExcalidrawProps, app: AppClassProperties) => boolean;
548
+ perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>, _: unknown, app: AppClassProperties) => {
704
549
  elements: ((Readonly<{
705
550
  id: string;
706
551
  x: number;
@@ -1135,6 +980,7 @@ export declare const actionWrapSelectionInFrame: {
1135
980
  points: readonly import("@excalidraw/math").LocalPoint[];
1136
981
  pressures: readonly number[];
1137
982
  simulatePressure: boolean;
983
+ strokeOptions: import("@excalidraw/element/types").StrokeOptions;
1138
984
  }> & {
1139
985
  index: import("@excalidraw/element/types").FractionalIndex;
1140
986
  }) | import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameElement>)[];