@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
@@ -1,8 +1,6 @@
1
- import { type SceneBounds } from "@excalidraw/element";
2
- import type { ExcalidrawElement } from "@excalidraw/element/types";
3
- import type { AppState, Offsets } from "../types";
1
+ import type { AppState } from "../types";
4
2
  export declare const actionChangeViewBackgroundColor: import("./types").Action<Partial<AppState>> & {
5
- keyTest?: ((event: React.KeyboardEvent | KeyboardEvent, appState: AppState, elements: readonly ExcalidrawElement[], app: import("../types").AppClassProperties) => boolean) | undefined;
3
+ keyTest?: ((event: React.KeyboardEvent | KeyboardEvent, appState: AppState, elements: readonly import("@excalidraw/element/types").ExcalidrawElement[], app: import("../types").AppClassProperties) => boolean) | undefined;
6
4
  };
7
5
  export declare const actionClearCanvas: {
8
6
  name: "clearCanvas";
@@ -11,7 +9,7 @@ export declare const actionClearCanvas: {
11
9
  trackEvent: {
12
10
  category: "canvas";
13
11
  };
14
- predicate: (elements: readonly ExcalidrawElement[], appState: AppState, props: import("../types").ExcalidrawProps, app: import("../types").AppClassProperties) => boolean;
12
+ predicate: (elements: readonly import("@excalidraw/element/types").ExcalidrawElement[], appState: AppState, props: import("../types").ExcalidrawProps, app: import("../types").AppClassProperties) => boolean;
15
13
  perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: unknown, app: import("../types").AppClassProperties) => {
16
14
  elements: import("@excalidraw/element/types").OrderedExcalidrawElement[];
17
15
  appState: {
@@ -56,7 +54,7 @@ export declare const actionClearCanvas: {
56
54
  name: "settings";
57
55
  } | {
58
56
  name: "elementLinkSelector";
59
- sourceElementId: ExcalidrawElement["id"];
57
+ sourceElementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
60
58
  } | {
61
59
  name: "charts";
62
60
  data: import("../charts").Spreadsheet;
@@ -84,16 +82,20 @@ export declare const actionClearCanvas: {
84
82
  element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
85
83
  midPoint?: import("@excalidraw/math").GlobalPoint;
86
84
  } | null;
85
+ hoveredArrowTextAnchor: {
86
+ elementId: import("@excalidraw/element/types").ExcalidrawArrowElement["id"];
87
+ anchor: "start" | "end" | "label";
88
+ } | null;
87
89
  isRotating: boolean;
88
- elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
90
+ elementsToHighlight: readonly import("@excalidraw/element/types").NonDeletedExcalidrawElement[] | null;
89
91
  collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
90
92
  snapLines: readonly import("../snapping").SnapLine[];
91
93
  zenModeEnabled: boolean;
92
94
  editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
93
95
  isCropping: boolean;
94
- croppingElementId: ExcalidrawElement["id"] | null;
96
+ croppingElementId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
95
97
  searchMatches: Readonly<{
96
- focusedId: ExcalidrawElement["id"] | null;
98
+ focusedId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
97
99
  matches: readonly import("../types").SearchMatch[];
98
100
  }> | null;
99
101
  activeLockedId: string | null;
@@ -113,9 +115,9 @@ export declare const actionClearCanvas: {
113
115
  isLoading: boolean;
114
116
  errorMessage: React.ReactNode;
115
117
  resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
118
+ boxSelectionMode: import("../types").BoxSelectionMode;
116
119
  bindingPreference: "enabled" | "disabled";
117
- startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
118
- editingFrame: string | null;
120
+ editingFrame: import("@excalidraw/element/types").ExcalidrawFrameLikeElement["id"] | null;
119
121
  preferredSelectionTool: {
120
122
  type: "selection" | "lasso";
121
123
  initialized: boolean;
@@ -123,10 +125,11 @@ export declare const actionClearCanvas: {
123
125
  exportWithDarkMode: boolean;
124
126
  currentItemStrokeColor: string;
125
127
  currentItemBackgroundColor: string;
126
- currentItemFillStyle: ExcalidrawElement["fillStyle"];
127
- currentItemStrokeWidth: number;
128
- currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
128
+ currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
129
+ currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
130
+ currentItemStrokeStyle: import("@excalidraw/element/types").ExcalidrawElement["strokeStyle"];
129
131
  currentItemRoughness: number;
132
+ currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
130
133
  currentItemOpacity: number;
131
134
  currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
132
135
  currentItemFontSize: number;
@@ -135,6 +138,7 @@ export declare const actionClearCanvas: {
135
138
  currentItemEndArrowhead: import("@excalidraw/element/types").Arrowhead | null;
136
139
  currentHoveredFontFamily: import("@excalidraw/element/types").FontFamilyValues | null;
137
140
  currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
141
+ scrollConstraints: import("../types").ScrollConstraints | null;
138
142
  cursorButton: "up" | "down";
139
143
  scrolledOutside: boolean;
140
144
  isResizing: boolean;
@@ -177,18 +181,18 @@ export declare const actionZoomIn: {
177
181
  name: "zoomIn";
178
182
  label: string;
179
183
  viewMode: true;
184
+ navigation: true;
180
185
  icon: import("react/jsx-runtime").JSX.Element;
181
186
  trackEvent: {
182
187
  category: "canvas";
183
188
  };
189
+ predicate: (elements: readonly import("@excalidraw/element/types").ExcalidrawElement[], appState: AppState, appProps: import("../types").ExcalidrawProps, app: import("../types").AppClassProperties) => boolean;
184
190
  perform: (_elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: unknown, app: import("../types").AppClassProperties) => {
185
191
  appState: {
186
192
  userToFollow: null;
193
+ zoom: import("../types").Zoom;
187
194
  scrollX: number;
188
195
  scrollY: number;
189
- zoom: {
190
- value: import("../types").NormalizedZoomValue;
191
- };
192
196
  contextMenu: {
193
197
  items: import("../components/ContextMenu").ContextMenuItems;
194
198
  top: number;
@@ -206,13 +210,17 @@ export declare const actionZoomIn: {
206
210
  multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
207
211
  selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
208
212
  isBindingEnabled: boolean;
213
+ boxSelectionMode: import("../types").BoxSelectionMode;
209
214
  bindingPreference: "enabled" | "disabled";
210
215
  isMidpointSnappingEnabled: boolean;
211
- startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
212
216
  suggestedBinding: {
213
217
  element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
214
218
  midPoint?: import("@excalidraw/math").GlobalPoint;
215
219
  } | null;
220
+ hoveredArrowTextAnchor: {
221
+ elementId: import("@excalidraw/element/types").ExcalidrawArrowElement["id"];
222
+ anchor: "start" | "end" | "label";
223
+ } | null;
216
224
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
217
225
  frameRendering: {
218
226
  enabled: boolean;
@@ -220,8 +228,8 @@ export declare const actionZoomIn: {
220
228
  outline: boolean;
221
229
  clip: boolean;
222
230
  };
223
- editingFrame: string | null;
224
- elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
231
+ editingFrame: import("@excalidraw/element/types").ExcalidrawFrameLikeElement["id"] | null;
232
+ elementsToHighlight: readonly import("@excalidraw/element/types").NonDeletedExcalidrawElement[] | null;
225
233
  editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
226
234
  activeTool: {
227
235
  lastActiveTool: import("../types").ActiveTool | null;
@@ -240,10 +248,11 @@ export declare const actionZoomIn: {
240
248
  exportScale: number;
241
249
  currentItemStrokeColor: string;
242
250
  currentItemBackgroundColor: string;
243
- currentItemFillStyle: ExcalidrawElement["fillStyle"];
244
- currentItemStrokeWidth: number;
245
- currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
251
+ currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
252
+ currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
253
+ currentItemStrokeStyle: import("@excalidraw/element/types").ExcalidrawElement["strokeStyle"];
246
254
  currentItemRoughness: number;
255
+ currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
247
256
  currentItemOpacity: number;
248
257
  currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
249
258
  currentItemFontSize: number;
@@ -254,6 +263,7 @@ export declare const actionZoomIn: {
254
263
  currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
255
264
  currentItemArrowType: "sharp" | "round" | "elbow";
256
265
  viewBackgroundColor: string;
266
+ scrollConstraints: import("../types").ScrollConstraints | null;
257
267
  cursorButton: "up" | "down";
258
268
  scrolledOutside: boolean;
259
269
  name: string | null;
@@ -276,7 +286,7 @@ export declare const actionZoomIn: {
276
286
  name: "settings";
277
287
  } | {
278
288
  name: "elementLinkSelector";
279
- sourceElementId: ExcalidrawElement["id"];
289
+ sourceElementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
280
290
  } | {
281
291
  name: "charts";
282
292
  data: import("../charts").Spreadsheet;
@@ -330,9 +340,9 @@ export declare const actionZoomIn: {
330
340
  objectsSnapModeEnabled: boolean;
331
341
  followedBy: Set<import("../types").SocketId>;
332
342
  isCropping: boolean;
333
- croppingElementId: ExcalidrawElement["id"] | null;
343
+ croppingElementId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
334
344
  searchMatches: Readonly<{
335
- focusedId: ExcalidrawElement["id"] | null;
345
+ focusedId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
336
346
  matches: readonly import("../types").SearchMatch[];
337
347
  }> | null;
338
348
  activeLockedId: string | null;
@@ -343,7 +353,7 @@ export declare const actionZoomIn: {
343
353
  };
344
354
  captureUpdate: "EVENTUALLY";
345
355
  };
346
- PanelComponent: ({ updateData, appState }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
356
+ PanelComponent: ({ updateData }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
347
357
  keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
348
358
  } & {
349
359
  keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
@@ -353,17 +363,17 @@ export declare const actionZoomOut: {
353
363
  label: string;
354
364
  icon: import("react/jsx-runtime").JSX.Element;
355
365
  viewMode: true;
366
+ navigation: true;
356
367
  trackEvent: {
357
368
  category: "canvas";
358
369
  };
370
+ predicate: (elements: readonly import("@excalidraw/element/types").ExcalidrawElement[], appState: AppState, appProps: import("../types").ExcalidrawProps, app: import("../types").AppClassProperties) => boolean;
359
371
  perform: (_elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: unknown, app: import("../types").AppClassProperties) => {
360
372
  appState: {
361
373
  userToFollow: null;
374
+ zoom: import("../types").Zoom;
362
375
  scrollX: number;
363
376
  scrollY: number;
364
- zoom: {
365
- value: import("../types").NormalizedZoomValue;
366
- };
367
377
  contextMenu: {
368
378
  items: import("../components/ContextMenu").ContextMenuItems;
369
379
  top: number;
@@ -381,13 +391,17 @@ export declare const actionZoomOut: {
381
391
  multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
382
392
  selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
383
393
  isBindingEnabled: boolean;
394
+ boxSelectionMode: import("../types").BoxSelectionMode;
384
395
  bindingPreference: "enabled" | "disabled";
385
396
  isMidpointSnappingEnabled: boolean;
386
- startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
387
397
  suggestedBinding: {
388
398
  element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
389
399
  midPoint?: import("@excalidraw/math").GlobalPoint;
390
400
  } | null;
401
+ hoveredArrowTextAnchor: {
402
+ elementId: import("@excalidraw/element/types").ExcalidrawArrowElement["id"];
403
+ anchor: "start" | "end" | "label";
404
+ } | null;
391
405
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
392
406
  frameRendering: {
393
407
  enabled: boolean;
@@ -395,8 +409,8 @@ export declare const actionZoomOut: {
395
409
  outline: boolean;
396
410
  clip: boolean;
397
411
  };
398
- editingFrame: string | null;
399
- elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
412
+ editingFrame: import("@excalidraw/element/types").ExcalidrawFrameLikeElement["id"] | null;
413
+ elementsToHighlight: readonly import("@excalidraw/element/types").NonDeletedExcalidrawElement[] | null;
400
414
  editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
401
415
  activeTool: {
402
416
  lastActiveTool: import("../types").ActiveTool | null;
@@ -415,10 +429,11 @@ export declare const actionZoomOut: {
415
429
  exportScale: number;
416
430
  currentItemStrokeColor: string;
417
431
  currentItemBackgroundColor: string;
418
- currentItemFillStyle: ExcalidrawElement["fillStyle"];
419
- currentItemStrokeWidth: number;
420
- currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
432
+ currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
433
+ currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
434
+ currentItemStrokeStyle: import("@excalidraw/element/types").ExcalidrawElement["strokeStyle"];
421
435
  currentItemRoughness: number;
436
+ currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
422
437
  currentItemOpacity: number;
423
438
  currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
424
439
  currentItemFontSize: number;
@@ -429,6 +444,7 @@ export declare const actionZoomOut: {
429
444
  currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
430
445
  currentItemArrowType: "sharp" | "round" | "elbow";
431
446
  viewBackgroundColor: string;
447
+ scrollConstraints: import("../types").ScrollConstraints | null;
432
448
  cursorButton: "up" | "down";
433
449
  scrolledOutside: boolean;
434
450
  name: string | null;
@@ -451,7 +467,7 @@ export declare const actionZoomOut: {
451
467
  name: "settings";
452
468
  } | {
453
469
  name: "elementLinkSelector";
454
- sourceElementId: ExcalidrawElement["id"];
470
+ sourceElementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
455
471
  } | {
456
472
  name: "charts";
457
473
  data: import("../charts").Spreadsheet;
@@ -505,9 +521,9 @@ export declare const actionZoomOut: {
505
521
  objectsSnapModeEnabled: boolean;
506
522
  followedBy: Set<import("../types").SocketId>;
507
523
  isCropping: boolean;
508
- croppingElementId: ExcalidrawElement["id"] | null;
524
+ croppingElementId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
509
525
  searchMatches: Readonly<{
510
- focusedId: ExcalidrawElement["id"] | null;
526
+ focusedId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
511
527
  matches: readonly import("../types").SearchMatch[];
512
528
  }> | null;
513
529
  activeLockedId: string | null;
@@ -518,7 +534,7 @@ export declare const actionZoomOut: {
518
534
  };
519
535
  captureUpdate: "EVENTUALLY";
520
536
  };
521
- PanelComponent: ({ updateData, appState }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
537
+ PanelComponent: ({ updateData }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
522
538
  keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
523
539
  } & {
524
540
  keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
@@ -528,17 +544,17 @@ export declare const actionResetZoom: {
528
544
  label: string;
529
545
  icon: import("react/jsx-runtime").JSX.Element;
530
546
  viewMode: true;
547
+ navigation: true;
531
548
  trackEvent: {
532
549
  category: "canvas";
533
550
  };
551
+ predicate: (elements: readonly import("@excalidraw/element/types").ExcalidrawElement[], appState: AppState, appProps: import("../types").ExcalidrawProps, app: import("../types").AppClassProperties) => boolean;
534
552
  perform: (_elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: unknown, app: import("../types").AppClassProperties) => {
535
553
  appState: {
536
554
  userToFollow: null;
555
+ zoom: import("../types").Zoom;
537
556
  scrollX: number;
538
557
  scrollY: number;
539
- zoom: {
540
- value: import("../types").NormalizedZoomValue;
541
- };
542
558
  contextMenu: {
543
559
  items: import("../components/ContextMenu").ContextMenuItems;
544
560
  top: number;
@@ -556,13 +572,17 @@ export declare const actionResetZoom: {
556
572
  multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
557
573
  selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
558
574
  isBindingEnabled: boolean;
575
+ boxSelectionMode: import("../types").BoxSelectionMode;
559
576
  bindingPreference: "enabled" | "disabled";
560
577
  isMidpointSnappingEnabled: boolean;
561
- startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
562
578
  suggestedBinding: {
563
579
  element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
564
580
  midPoint?: import("@excalidraw/math").GlobalPoint;
565
581
  } | null;
582
+ hoveredArrowTextAnchor: {
583
+ elementId: import("@excalidraw/element/types").ExcalidrawArrowElement["id"];
584
+ anchor: "start" | "end" | "label";
585
+ } | null;
566
586
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
567
587
  frameRendering: {
568
588
  enabled: boolean;
@@ -570,8 +590,8 @@ export declare const actionResetZoom: {
570
590
  outline: boolean;
571
591
  clip: boolean;
572
592
  };
573
- editingFrame: string | null;
574
- elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
593
+ editingFrame: import("@excalidraw/element/types").ExcalidrawFrameLikeElement["id"] | null;
594
+ elementsToHighlight: readonly import("@excalidraw/element/types").NonDeletedExcalidrawElement[] | null;
575
595
  editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
576
596
  activeTool: {
577
597
  lastActiveTool: import("../types").ActiveTool | null;
@@ -590,10 +610,11 @@ export declare const actionResetZoom: {
590
610
  exportScale: number;
591
611
  currentItemStrokeColor: string;
592
612
  currentItemBackgroundColor: string;
593
- currentItemFillStyle: ExcalidrawElement["fillStyle"];
594
- currentItemStrokeWidth: number;
595
- currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
613
+ currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
614
+ currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
615
+ currentItemStrokeStyle: import("@excalidraw/element/types").ExcalidrawElement["strokeStyle"];
596
616
  currentItemRoughness: number;
617
+ currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
597
618
  currentItemOpacity: number;
598
619
  currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
599
620
  currentItemFontSize: number;
@@ -604,6 +625,7 @@ export declare const actionResetZoom: {
604
625
  currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
605
626
  currentItemArrowType: "sharp" | "round" | "elbow";
606
627
  viewBackgroundColor: string;
628
+ scrollConstraints: import("../types").ScrollConstraints | null;
607
629
  cursorButton: "up" | "down";
608
630
  scrolledOutside: boolean;
609
631
  name: string | null;
@@ -626,7 +648,7 @@ export declare const actionResetZoom: {
626
648
  name: "settings";
627
649
  } | {
628
650
  name: "elementLinkSelector";
629
- sourceElementId: ExcalidrawElement["id"];
651
+ sourceElementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
630
652
  } | {
631
653
  name: "charts";
632
654
  data: import("../charts").Spreadsheet;
@@ -680,9 +702,9 @@ export declare const actionResetZoom: {
680
702
  objectsSnapModeEnabled: boolean;
681
703
  followedBy: Set<import("../types").SocketId>;
682
704
  isCropping: boolean;
683
- croppingElementId: ExcalidrawElement["id"] | null;
705
+ croppingElementId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
684
706
  searchMatches: Readonly<{
685
- focusedId: ExcalidrawElement["id"] | null;
707
+ focusedId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
686
708
  matches: readonly import("../types").SearchMatch[];
687
709
  }> | null;
688
710
  activeLockedId: string | null;
@@ -693,369 +715,26 @@ export declare const actionResetZoom: {
693
715
  };
694
716
  captureUpdate: "EVENTUALLY";
695
717
  };
696
- PanelComponent: ({ updateData, appState }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
718
+ PanelComponent: ({ updateData }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
697
719
  keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
698
720
  } & {
699
721
  keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
700
722
  };
701
- export declare const zoomToFitBounds: ({ bounds, appState, canvasOffsets, fitToViewport, viewportZoomFactor, minZoom, maxZoom, }: {
702
- bounds: SceneBounds;
703
- canvasOffsets?: Offsets;
704
- appState: Readonly<AppState>;
705
- /** whether to fit content to viewport (beyond >100%) */
706
- fitToViewport: boolean;
707
- /** zoom content to cover X of the viewport, when fitToViewport=true */
708
- viewportZoomFactor?: number;
709
- minZoom?: number;
710
- maxZoom?: number;
711
- }) => {
712
- appState: {
713
- scrollX: number;
714
- scrollY: number;
715
- zoom: {
716
- value: import("../types").NormalizedZoomValue;
717
- };
718
- contextMenu: {
719
- items: import("../components/ContextMenu").ContextMenuItems;
720
- top: number;
721
- left: number;
722
- } | null;
723
- showWelcomeScreen: boolean;
724
- isLoading: boolean;
725
- errorMessage: React.ReactNode;
726
- activeEmbeddable: {
727
- element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
728
- state: "hover" | "active";
729
- } | null;
730
- newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
731
- resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
732
- multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
733
- selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
734
- isBindingEnabled: boolean;
735
- bindingPreference: "enabled" | "disabled";
736
- isMidpointSnappingEnabled: boolean;
737
- startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
738
- suggestedBinding: {
739
- element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
740
- midPoint?: import("@excalidraw/math").GlobalPoint;
741
- } | null;
742
- frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
743
- frameRendering: {
744
- enabled: boolean;
745
- name: boolean;
746
- outline: boolean;
747
- clip: boolean;
748
- };
749
- editingFrame: string | null;
750
- elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
751
- editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
752
- activeTool: {
753
- lastActiveTool: import("../types").ActiveTool | null;
754
- locked: boolean;
755
- fromSelection: boolean;
756
- } & import("../types").ActiveTool;
757
- preferredSelectionTool: {
758
- type: "selection" | "lasso";
759
- initialized: boolean;
760
- };
761
- penMode: boolean;
762
- penDetected: boolean;
763
- exportBackground: boolean;
764
- exportEmbedScene: boolean;
765
- exportWithDarkMode: boolean;
766
- exportScale: number;
767
- currentItemStrokeColor: string;
768
- currentItemBackgroundColor: string;
769
- currentItemFillStyle: ExcalidrawElement["fillStyle"];
770
- currentItemStrokeWidth: number;
771
- currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
772
- currentItemRoughness: number;
773
- currentItemOpacity: number;
774
- currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
775
- currentItemFontSize: number;
776
- currentItemTextAlign: import("@excalidraw/element/types").TextAlign;
777
- currentItemStartArrowhead: import("@excalidraw/element/types").Arrowhead | null;
778
- currentItemEndArrowhead: import("@excalidraw/element/types").Arrowhead | null;
779
- currentHoveredFontFamily: import("@excalidraw/element/types").FontFamilyValues | null;
780
- currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
781
- currentItemArrowType: "sharp" | "round" | "elbow";
782
- viewBackgroundColor: string;
783
- cursorButton: "up" | "down";
784
- scrolledOutside: boolean;
785
- name: string | null;
786
- isResizing: boolean;
787
- isRotating: boolean;
788
- openMenu: "canvas" | null;
789
- openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
790
- openSidebar: {
791
- name: import("../types").SidebarName;
792
- tab?: import("../types").SidebarTabName;
793
- } | null;
794
- openDialog: null | {
795
- name: "imageExport" | "help" | "jsonExport";
796
- } | {
797
- name: "ttd";
798
- tab: "text-to-diagram" | "mermaid";
799
- } | {
800
- name: "commandPalette";
801
- } | {
802
- name: "settings";
803
- } | {
804
- name: "elementLinkSelector";
805
- sourceElementId: ExcalidrawElement["id"];
806
- } | {
807
- name: "charts";
808
- data: import("../charts").Spreadsheet;
809
- rawText: string;
810
- };
811
- defaultSidebarDockedPreference: boolean;
812
- lastPointerDownWith: import("@excalidraw/element/types").PointerType;
813
- selectedElementIds: Readonly<{
814
- [id: string]: true;
815
- }>;
816
- hoveredElementIds: Readonly<{
817
- [id: string]: true;
818
- }>;
819
- previousSelectedElementIds: {
820
- [id: string]: true;
821
- };
822
- selectedElementsAreBeingDragged: boolean;
823
- shouldCacheIgnoreZoom: boolean;
824
- toast: {
825
- message: React.ReactNode;
826
- closable?: boolean;
827
- duration?: number;
828
- } | null;
829
- zenModeEnabled: boolean;
830
- theme: import("@excalidraw/element/types").Theme;
831
- gridSize: number;
832
- gridStep: number;
833
- gridModeEnabled: boolean;
834
- viewModeEnabled: boolean;
835
- selectedGroupIds: {
836
- [groupId: string]: boolean;
837
- };
838
- editingGroupId: import("@excalidraw/element/types").GroupId | null;
839
- width: number;
840
- height: number;
841
- offsetTop: number;
842
- offsetLeft: number;
843
- fileHandle: FileSystemFileHandle | null;
844
- collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
845
- stats: {
846
- open: boolean;
847
- panels: number;
848
- };
849
- showHyperlinkPopup: false | "info" | "editor";
850
- selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
851
- snapLines: readonly import("../snapping").SnapLine[];
852
- originSnapOffset: {
853
- x: number;
854
- y: number;
855
- } | null;
856
- objectsSnapModeEnabled: boolean;
857
- userToFollow: import("../types").UserToFollow | null;
858
- followedBy: Set<import("../types").SocketId>;
859
- isCropping: boolean;
860
- croppingElementId: ExcalidrawElement["id"] | null;
861
- searchMatches: Readonly<{
862
- focusedId: ExcalidrawElement["id"] | null;
863
- matches: readonly import("../types").SearchMatch[];
864
- }> | null;
865
- activeLockedId: string | null;
866
- lockedMultiSelections: {
867
- [groupId: string]: true;
868
- };
869
- bindMode: import("@excalidraw/element/types").BindMode;
870
- };
871
- captureUpdate: "EVENTUALLY";
872
- };
873
- export declare const zoomToFit: ({ canvasOffsets, targetElements, appState, fitToViewport, viewportZoomFactor, minZoom, maxZoom, }: {
874
- canvasOffsets?: Offsets;
875
- targetElements: readonly ExcalidrawElement[];
876
- appState: Readonly<AppState>;
877
- /** whether to fit content to viewport (beyond >100%) */
878
- fitToViewport: boolean;
879
- /** zoom content to cover X of the viewport, when fitToViewport=true */
880
- viewportZoomFactor?: number;
881
- minZoom?: number;
882
- maxZoom?: number;
883
- }) => {
884
- appState: {
885
- scrollX: number;
886
- scrollY: number;
887
- zoom: {
888
- value: import("../types").NormalizedZoomValue;
889
- };
890
- contextMenu: {
891
- items: import("../components/ContextMenu").ContextMenuItems;
892
- top: number;
893
- left: number;
894
- } | null;
895
- showWelcomeScreen: boolean;
896
- isLoading: boolean;
897
- errorMessage: React.ReactNode;
898
- activeEmbeddable: {
899
- element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
900
- state: "hover" | "active";
901
- } | null;
902
- newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
903
- resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
904
- multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
905
- selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
906
- isBindingEnabled: boolean;
907
- bindingPreference: "enabled" | "disabled";
908
- isMidpointSnappingEnabled: boolean;
909
- startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
910
- suggestedBinding: {
911
- element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
912
- midPoint?: import("@excalidraw/math").GlobalPoint;
913
- } | null;
914
- frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
915
- frameRendering: {
916
- enabled: boolean;
917
- name: boolean;
918
- outline: boolean;
919
- clip: boolean;
920
- };
921
- editingFrame: string | null;
922
- elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
923
- editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
924
- activeTool: {
925
- lastActiveTool: import("../types").ActiveTool | null;
926
- locked: boolean;
927
- fromSelection: boolean;
928
- } & import("../types").ActiveTool;
929
- preferredSelectionTool: {
930
- type: "selection" | "lasso";
931
- initialized: boolean;
932
- };
933
- penMode: boolean;
934
- penDetected: boolean;
935
- exportBackground: boolean;
936
- exportEmbedScene: boolean;
937
- exportWithDarkMode: boolean;
938
- exportScale: number;
939
- currentItemStrokeColor: string;
940
- currentItemBackgroundColor: string;
941
- currentItemFillStyle: ExcalidrawElement["fillStyle"];
942
- currentItemStrokeWidth: number;
943
- currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
944
- currentItemRoughness: number;
945
- currentItemOpacity: number;
946
- currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
947
- currentItemFontSize: number;
948
- currentItemTextAlign: import("@excalidraw/element/types").TextAlign;
949
- currentItemStartArrowhead: import("@excalidraw/element/types").Arrowhead | null;
950
- currentItemEndArrowhead: import("@excalidraw/element/types").Arrowhead | null;
951
- currentHoveredFontFamily: import("@excalidraw/element/types").FontFamilyValues | null;
952
- currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
953
- currentItemArrowType: "sharp" | "round" | "elbow";
954
- viewBackgroundColor: string;
955
- cursorButton: "up" | "down";
956
- scrolledOutside: boolean;
957
- name: string | null;
958
- isResizing: boolean;
959
- isRotating: boolean;
960
- openMenu: "canvas" | null;
961
- openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
962
- openSidebar: {
963
- name: import("../types").SidebarName;
964
- tab?: import("../types").SidebarTabName;
965
- } | null;
966
- openDialog: null | {
967
- name: "imageExport" | "help" | "jsonExport";
968
- } | {
969
- name: "ttd";
970
- tab: "text-to-diagram" | "mermaid";
971
- } | {
972
- name: "commandPalette";
973
- } | {
974
- name: "settings";
975
- } | {
976
- name: "elementLinkSelector";
977
- sourceElementId: ExcalidrawElement["id"];
978
- } | {
979
- name: "charts";
980
- data: import("../charts").Spreadsheet;
981
- rawText: string;
982
- };
983
- defaultSidebarDockedPreference: boolean;
984
- lastPointerDownWith: import("@excalidraw/element/types").PointerType;
985
- selectedElementIds: Readonly<{
986
- [id: string]: true;
987
- }>;
988
- hoveredElementIds: Readonly<{
989
- [id: string]: true;
990
- }>;
991
- previousSelectedElementIds: {
992
- [id: string]: true;
993
- };
994
- selectedElementsAreBeingDragged: boolean;
995
- shouldCacheIgnoreZoom: boolean;
996
- toast: {
997
- message: React.ReactNode;
998
- closable?: boolean;
999
- duration?: number;
1000
- } | null;
1001
- zenModeEnabled: boolean;
1002
- theme: import("@excalidraw/element/types").Theme;
1003
- gridSize: number;
1004
- gridStep: number;
1005
- gridModeEnabled: boolean;
1006
- viewModeEnabled: boolean;
1007
- selectedGroupIds: {
1008
- [groupId: string]: boolean;
1009
- };
1010
- editingGroupId: import("@excalidraw/element/types").GroupId | null;
1011
- width: number;
1012
- height: number;
1013
- offsetTop: number;
1014
- offsetLeft: number;
1015
- fileHandle: FileSystemFileHandle | null;
1016
- collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
1017
- stats: {
1018
- open: boolean;
1019
- panels: number;
1020
- };
1021
- showHyperlinkPopup: false | "info" | "editor";
1022
- selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
1023
- snapLines: readonly import("../snapping").SnapLine[];
1024
- originSnapOffset: {
1025
- x: number;
1026
- y: number;
1027
- } | null;
1028
- objectsSnapModeEnabled: boolean;
1029
- userToFollow: import("../types").UserToFollow | null;
1030
- followedBy: Set<import("../types").SocketId>;
1031
- isCropping: boolean;
1032
- croppingElementId: ExcalidrawElement["id"] | null;
1033
- searchMatches: Readonly<{
1034
- focusedId: ExcalidrawElement["id"] | null;
1035
- matches: readonly import("../types").SearchMatch[];
1036
- }> | null;
1037
- activeLockedId: string | null;
1038
- lockedMultiSelections: {
1039
- [groupId: string]: true;
1040
- };
1041
- bindMode: import("@excalidraw/element/types").BindMode;
1042
- };
1043
- captureUpdate: "EVENTUALLY";
1044
- };
1045
723
  export declare const actionZoomToFitSelectionInViewport: {
1046
724
  name: "zoomToFitSelectionInViewport";
1047
725
  label: string;
1048
726
  icon: import("react/jsx-runtime").JSX.Element;
727
+ viewMode: true;
728
+ navigation: true;
1049
729
  trackEvent: {
1050
730
  category: "canvas";
1051
731
  };
732
+ predicate: (elements: readonly import("@excalidraw/element/types").ExcalidrawElement[], appState: AppState, appProps: import("../types").ExcalidrawProps, app: import("../types").AppClassProperties) => boolean;
1052
733
  perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: unknown, app: import("../types").AppClassProperties) => {
1053
734
  appState: {
735
+ zoom: import("../types").Zoom;
1054
736
  scrollX: number;
1055
737
  scrollY: number;
1056
- zoom: {
1057
- value: import("../types").NormalizedZoomValue;
1058
- };
1059
738
  contextMenu: {
1060
739
  items: import("../components/ContextMenu").ContextMenuItems;
1061
740
  top: number;
@@ -1073,13 +752,17 @@ export declare const actionZoomToFitSelectionInViewport: {
1073
752
  multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
1074
753
  selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
1075
754
  isBindingEnabled: boolean;
755
+ boxSelectionMode: import("../types").BoxSelectionMode;
1076
756
  bindingPreference: "enabled" | "disabled";
1077
757
  isMidpointSnappingEnabled: boolean;
1078
- startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
1079
758
  suggestedBinding: {
1080
759
  element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
1081
760
  midPoint?: import("@excalidraw/math").GlobalPoint;
1082
761
  } | null;
762
+ hoveredArrowTextAnchor: {
763
+ elementId: import("@excalidraw/element/types").ExcalidrawArrowElement["id"];
764
+ anchor: "start" | "end" | "label";
765
+ } | null;
1083
766
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
1084
767
  frameRendering: {
1085
768
  enabled: boolean;
@@ -1087,8 +770,8 @@ export declare const actionZoomToFitSelectionInViewport: {
1087
770
  outline: boolean;
1088
771
  clip: boolean;
1089
772
  };
1090
- editingFrame: string | null;
1091
- elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
773
+ editingFrame: import("@excalidraw/element/types").ExcalidrawFrameLikeElement["id"] | null;
774
+ elementsToHighlight: readonly import("@excalidraw/element/types").NonDeletedExcalidrawElement[] | null;
1092
775
  editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
1093
776
  activeTool: {
1094
777
  lastActiveTool: import("../types").ActiveTool | null;
@@ -1107,10 +790,11 @@ export declare const actionZoomToFitSelectionInViewport: {
1107
790
  exportScale: number;
1108
791
  currentItemStrokeColor: string;
1109
792
  currentItemBackgroundColor: string;
1110
- currentItemFillStyle: ExcalidrawElement["fillStyle"];
1111
- currentItemStrokeWidth: number;
1112
- currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
793
+ currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
794
+ currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
795
+ currentItemStrokeStyle: import("@excalidraw/element/types").ExcalidrawElement["strokeStyle"];
1113
796
  currentItemRoughness: number;
797
+ currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
1114
798
  currentItemOpacity: number;
1115
799
  currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
1116
800
  currentItemFontSize: number;
@@ -1121,6 +805,7 @@ export declare const actionZoomToFitSelectionInViewport: {
1121
805
  currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
1122
806
  currentItemArrowType: "sharp" | "round" | "elbow";
1123
807
  viewBackgroundColor: string;
808
+ scrollConstraints: import("../types").ScrollConstraints | null;
1124
809
  cursorButton: "up" | "down";
1125
810
  scrolledOutside: boolean;
1126
811
  name: string | null;
@@ -1143,7 +828,7 @@ export declare const actionZoomToFitSelectionInViewport: {
1143
828
  name: "settings";
1144
829
  } | {
1145
830
  name: "elementLinkSelector";
1146
- sourceElementId: ExcalidrawElement["id"];
831
+ sourceElementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
1147
832
  } | {
1148
833
  name: "charts";
1149
834
  data: import("../charts").Spreadsheet;
@@ -1198,9 +883,9 @@ export declare const actionZoomToFitSelectionInViewport: {
1198
883
  userToFollow: import("../types").UserToFollow | null;
1199
884
  followedBy: Set<import("../types").SocketId>;
1200
885
  isCropping: boolean;
1201
- croppingElementId: ExcalidrawElement["id"] | null;
886
+ croppingElementId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
1202
887
  searchMatches: Readonly<{
1203
- focusedId: ExcalidrawElement["id"] | null;
888
+ focusedId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
1204
889
  matches: readonly import("../types").SearchMatch[];
1205
890
  }> | null;
1206
891
  activeLockedId: string | null;
@@ -1219,16 +904,17 @@ export declare const actionZoomToFitSelection: {
1219
904
  name: "zoomToFitSelection";
1220
905
  label: string;
1221
906
  icon: import("react/jsx-runtime").JSX.Element;
907
+ viewMode: true;
908
+ navigation: true;
1222
909
  trackEvent: {
1223
910
  category: "canvas";
1224
911
  };
912
+ predicate: (elements: readonly import("@excalidraw/element/types").ExcalidrawElement[], appState: AppState, appProps: import("../types").ExcalidrawProps, app: import("../types").AppClassProperties) => boolean;
1225
913
  perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: unknown, app: import("../types").AppClassProperties) => {
1226
914
  appState: {
915
+ zoom: import("../types").Zoom;
1227
916
  scrollX: number;
1228
917
  scrollY: number;
1229
- zoom: {
1230
- value: import("../types").NormalizedZoomValue;
1231
- };
1232
918
  contextMenu: {
1233
919
  items: import("../components/ContextMenu").ContextMenuItems;
1234
920
  top: number;
@@ -1246,13 +932,17 @@ export declare const actionZoomToFitSelection: {
1246
932
  multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
1247
933
  selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
1248
934
  isBindingEnabled: boolean;
935
+ boxSelectionMode: import("../types").BoxSelectionMode;
1249
936
  bindingPreference: "enabled" | "disabled";
1250
937
  isMidpointSnappingEnabled: boolean;
1251
- startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
1252
938
  suggestedBinding: {
1253
939
  element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
1254
940
  midPoint?: import("@excalidraw/math").GlobalPoint;
1255
941
  } | null;
942
+ hoveredArrowTextAnchor: {
943
+ elementId: import("@excalidraw/element/types").ExcalidrawArrowElement["id"];
944
+ anchor: "start" | "end" | "label";
945
+ } | null;
1256
946
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
1257
947
  frameRendering: {
1258
948
  enabled: boolean;
@@ -1260,8 +950,8 @@ export declare const actionZoomToFitSelection: {
1260
950
  outline: boolean;
1261
951
  clip: boolean;
1262
952
  };
1263
- editingFrame: string | null;
1264
- elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
953
+ editingFrame: import("@excalidraw/element/types").ExcalidrawFrameLikeElement["id"] | null;
954
+ elementsToHighlight: readonly import("@excalidraw/element/types").NonDeletedExcalidrawElement[] | null;
1265
955
  editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
1266
956
  activeTool: {
1267
957
  lastActiveTool: import("../types").ActiveTool | null;
@@ -1280,10 +970,11 @@ export declare const actionZoomToFitSelection: {
1280
970
  exportScale: number;
1281
971
  currentItemStrokeColor: string;
1282
972
  currentItemBackgroundColor: string;
1283
- currentItemFillStyle: ExcalidrawElement["fillStyle"];
1284
- currentItemStrokeWidth: number;
1285
- currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
973
+ currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
974
+ currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
975
+ currentItemStrokeStyle: import("@excalidraw/element/types").ExcalidrawElement["strokeStyle"];
1286
976
  currentItemRoughness: number;
977
+ currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
1287
978
  currentItemOpacity: number;
1288
979
  currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
1289
980
  currentItemFontSize: number;
@@ -1294,6 +985,7 @@ export declare const actionZoomToFitSelection: {
1294
985
  currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
1295
986
  currentItemArrowType: "sharp" | "round" | "elbow";
1296
987
  viewBackgroundColor: string;
988
+ scrollConstraints: import("../types").ScrollConstraints | null;
1297
989
  cursorButton: "up" | "down";
1298
990
  scrolledOutside: boolean;
1299
991
  name: string | null;
@@ -1316,7 +1008,7 @@ export declare const actionZoomToFitSelection: {
1316
1008
  name: "settings";
1317
1009
  } | {
1318
1010
  name: "elementLinkSelector";
1319
- sourceElementId: ExcalidrawElement["id"];
1011
+ sourceElementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
1320
1012
  } | {
1321
1013
  name: "charts";
1322
1014
  data: import("../charts").Spreadsheet;
@@ -1371,9 +1063,9 @@ export declare const actionZoomToFitSelection: {
1371
1063
  userToFollow: import("../types").UserToFollow | null;
1372
1064
  followedBy: Set<import("../types").SocketId>;
1373
1065
  isCropping: boolean;
1374
- croppingElementId: ExcalidrawElement["id"] | null;
1066
+ croppingElementId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
1375
1067
  searchMatches: Readonly<{
1376
- focusedId: ExcalidrawElement["id"] | null;
1068
+ focusedId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
1377
1069
  matches: readonly import("../types").SearchMatch[];
1378
1070
  }> | null;
1379
1071
  activeLockedId: string | null;
@@ -1393,16 +1085,16 @@ export declare const actionZoomToFit: {
1393
1085
  label: string;
1394
1086
  icon: import("react/jsx-runtime").JSX.Element;
1395
1087
  viewMode: true;
1088
+ navigation: true;
1396
1089
  trackEvent: {
1397
1090
  category: "canvas";
1398
1091
  };
1092
+ predicate: (elements: readonly import("@excalidraw/element/types").ExcalidrawElement[], appState: AppState, appProps: import("../types").ExcalidrawProps, app: import("../types").AppClassProperties) => boolean;
1399
1093
  perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: unknown, app: import("../types").AppClassProperties) => {
1400
1094
  appState: {
1095
+ zoom: import("../types").Zoom;
1401
1096
  scrollX: number;
1402
1097
  scrollY: number;
1403
- zoom: {
1404
- value: import("../types").NormalizedZoomValue;
1405
- };
1406
1098
  contextMenu: {
1407
1099
  items: import("../components/ContextMenu").ContextMenuItems;
1408
1100
  top: number;
@@ -1420,13 +1112,17 @@ export declare const actionZoomToFit: {
1420
1112
  multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
1421
1113
  selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
1422
1114
  isBindingEnabled: boolean;
1115
+ boxSelectionMode: import("../types").BoxSelectionMode;
1423
1116
  bindingPreference: "enabled" | "disabled";
1424
1117
  isMidpointSnappingEnabled: boolean;
1425
- startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
1426
1118
  suggestedBinding: {
1427
1119
  element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
1428
1120
  midPoint?: import("@excalidraw/math").GlobalPoint;
1429
1121
  } | null;
1122
+ hoveredArrowTextAnchor: {
1123
+ elementId: import("@excalidraw/element/types").ExcalidrawArrowElement["id"];
1124
+ anchor: "start" | "end" | "label";
1125
+ } | null;
1430
1126
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
1431
1127
  frameRendering: {
1432
1128
  enabled: boolean;
@@ -1434,8 +1130,8 @@ export declare const actionZoomToFit: {
1434
1130
  outline: boolean;
1435
1131
  clip: boolean;
1436
1132
  };
1437
- editingFrame: string | null;
1438
- elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
1133
+ editingFrame: import("@excalidraw/element/types").ExcalidrawFrameLikeElement["id"] | null;
1134
+ elementsToHighlight: readonly import("@excalidraw/element/types").NonDeletedExcalidrawElement[] | null;
1439
1135
  editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
1440
1136
  activeTool: {
1441
1137
  lastActiveTool: import("../types").ActiveTool | null;
@@ -1454,10 +1150,11 @@ export declare const actionZoomToFit: {
1454
1150
  exportScale: number;
1455
1151
  currentItemStrokeColor: string;
1456
1152
  currentItemBackgroundColor: string;
1457
- currentItemFillStyle: ExcalidrawElement["fillStyle"];
1458
- currentItemStrokeWidth: number;
1459
- currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
1153
+ currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
1154
+ currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
1155
+ currentItemStrokeStyle: import("@excalidraw/element/types").ExcalidrawElement["strokeStyle"];
1460
1156
  currentItemRoughness: number;
1157
+ currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
1461
1158
  currentItemOpacity: number;
1462
1159
  currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
1463
1160
  currentItemFontSize: number;
@@ -1468,6 +1165,7 @@ export declare const actionZoomToFit: {
1468
1165
  currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
1469
1166
  currentItemArrowType: "sharp" | "round" | "elbow";
1470
1167
  viewBackgroundColor: string;
1168
+ scrollConstraints: import("../types").ScrollConstraints | null;
1471
1169
  cursorButton: "up" | "down";
1472
1170
  scrolledOutside: boolean;
1473
1171
  name: string | null;
@@ -1490,7 +1188,7 @@ export declare const actionZoomToFit: {
1490
1188
  name: "settings";
1491
1189
  } | {
1492
1190
  name: "elementLinkSelector";
1493
- sourceElementId: ExcalidrawElement["id"];
1191
+ sourceElementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
1494
1192
  } | {
1495
1193
  name: "charts";
1496
1194
  data: import("../charts").Spreadsheet;
@@ -1545,9 +1243,9 @@ export declare const actionZoomToFit: {
1545
1243
  userToFollow: import("../types").UserToFollow | null;
1546
1244
  followedBy: Set<import("../types").SocketId>;
1547
1245
  isCropping: boolean;
1548
- croppingElementId: ExcalidrawElement["id"] | null;
1246
+ croppingElementId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
1549
1247
  searchMatches: Readonly<{
1550
- focusedId: ExcalidrawElement["id"] | null;
1248
+ focusedId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
1551
1249
  matches: readonly import("../types").SearchMatch[];
1552
1250
  }> | null;
1553
1251
  activeLockedId: string | null;
@@ -1563,497 +1261,5 @@ export declare const actionZoomToFit: {
1563
1261
  keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
1564
1262
  };
1565
1263
  export declare const actionToggleTheme: import("./types").Action<import("@excalidraw/element/types").Theme> & {
1566
- keyTest?: ((event: React.KeyboardEvent | KeyboardEvent, appState: AppState, elements: readonly ExcalidrawElement[], app: import("../types").AppClassProperties) => boolean) | undefined;
1567
- };
1568
- export declare const actionToggleEraserTool: {
1569
- name: "toggleEraserTool";
1570
- label: string;
1571
- trackEvent: {
1572
- category: "toolbar";
1573
- };
1574
- perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: unknown, app: import("../types").AppClassProperties) => {
1575
- appState: {
1576
- selectedElementIds: {};
1577
- selectedGroupIds: {};
1578
- activeEmbeddable: null;
1579
- activeTool: {
1580
- lastActiveTool: import("../types").ActiveTool | null;
1581
- locked: boolean;
1582
- fromSelection: boolean;
1583
- } & import("../types").ActiveTool;
1584
- contextMenu: {
1585
- items: import("../components/ContextMenu").ContextMenuItems;
1586
- top: number;
1587
- left: number;
1588
- } | null;
1589
- showWelcomeScreen: boolean;
1590
- isLoading: boolean;
1591
- errorMessage: React.ReactNode;
1592
- newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
1593
- resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
1594
- multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
1595
- selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
1596
- isBindingEnabled: boolean;
1597
- bindingPreference: "enabled" | "disabled";
1598
- isMidpointSnappingEnabled: boolean;
1599
- startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
1600
- suggestedBinding: {
1601
- element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
1602
- midPoint?: import("@excalidraw/math").GlobalPoint;
1603
- } | null;
1604
- frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
1605
- frameRendering: {
1606
- enabled: boolean;
1607
- name: boolean;
1608
- outline: boolean;
1609
- clip: boolean;
1610
- };
1611
- editingFrame: string | null;
1612
- elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
1613
- editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
1614
- preferredSelectionTool: {
1615
- type: "selection" | "lasso";
1616
- initialized: boolean;
1617
- };
1618
- penMode: boolean;
1619
- penDetected: boolean;
1620
- exportBackground: boolean;
1621
- exportEmbedScene: boolean;
1622
- exportWithDarkMode: boolean;
1623
- exportScale: number;
1624
- currentItemStrokeColor: string;
1625
- currentItemBackgroundColor: string;
1626
- currentItemFillStyle: ExcalidrawElement["fillStyle"];
1627
- currentItemStrokeWidth: number;
1628
- currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
1629
- currentItemRoughness: number;
1630
- currentItemOpacity: number;
1631
- currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
1632
- currentItemFontSize: number;
1633
- currentItemTextAlign: import("@excalidraw/element/types").TextAlign;
1634
- currentItemStartArrowhead: import("@excalidraw/element/types").Arrowhead | null;
1635
- currentItemEndArrowhead: import("@excalidraw/element/types").Arrowhead | null;
1636
- currentHoveredFontFamily: import("@excalidraw/element/types").FontFamilyValues | null;
1637
- currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
1638
- currentItemArrowType: "sharp" | "round" | "elbow";
1639
- viewBackgroundColor: string;
1640
- scrollX: number;
1641
- scrollY: number;
1642
- cursorButton: "up" | "down";
1643
- scrolledOutside: boolean;
1644
- name: string | null;
1645
- isResizing: boolean;
1646
- isRotating: boolean;
1647
- zoom: import("../types").Zoom;
1648
- openMenu: "canvas" | null;
1649
- openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
1650
- openSidebar: {
1651
- name: import("../types").SidebarName;
1652
- tab?: import("../types").SidebarTabName;
1653
- } | null;
1654
- openDialog: null | {
1655
- name: "imageExport" | "help" | "jsonExport";
1656
- } | {
1657
- name: "ttd";
1658
- tab: "text-to-diagram" | "mermaid";
1659
- } | {
1660
- name: "commandPalette";
1661
- } | {
1662
- name: "settings";
1663
- } | {
1664
- name: "elementLinkSelector";
1665
- sourceElementId: ExcalidrawElement["id"];
1666
- } | {
1667
- name: "charts";
1668
- data: import("../charts").Spreadsheet;
1669
- rawText: string;
1670
- };
1671
- defaultSidebarDockedPreference: boolean;
1672
- lastPointerDownWith: import("@excalidraw/element/types").PointerType;
1673
- hoveredElementIds: Readonly<{
1674
- [id: string]: true;
1675
- }>;
1676
- previousSelectedElementIds: {
1677
- [id: string]: true;
1678
- };
1679
- selectedElementsAreBeingDragged: boolean;
1680
- shouldCacheIgnoreZoom: boolean;
1681
- toast: {
1682
- message: React.ReactNode;
1683
- closable?: boolean;
1684
- duration?: number;
1685
- } | null;
1686
- zenModeEnabled: boolean;
1687
- theme: import("@excalidraw/element/types").Theme;
1688
- gridSize: number;
1689
- gridStep: number;
1690
- gridModeEnabled: boolean;
1691
- viewModeEnabled: boolean;
1692
- editingGroupId: import("@excalidraw/element/types").GroupId | null;
1693
- width: number;
1694
- height: number;
1695
- offsetTop: number;
1696
- offsetLeft: number;
1697
- fileHandle: FileSystemFileHandle | null;
1698
- collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
1699
- stats: {
1700
- open: boolean;
1701
- panels: number;
1702
- };
1703
- showHyperlinkPopup: false | "info" | "editor";
1704
- selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
1705
- snapLines: readonly import("../snapping").SnapLine[];
1706
- originSnapOffset: {
1707
- x: number;
1708
- y: number;
1709
- } | null;
1710
- objectsSnapModeEnabled: boolean;
1711
- userToFollow: import("../types").UserToFollow | null;
1712
- followedBy: Set<import("../types").SocketId>;
1713
- isCropping: boolean;
1714
- croppingElementId: ExcalidrawElement["id"] | null;
1715
- searchMatches: Readonly<{
1716
- focusedId: ExcalidrawElement["id"] | null;
1717
- matches: readonly import("../types").SearchMatch[];
1718
- }> | null;
1719
- activeLockedId: string | null;
1720
- lockedMultiSelections: {
1721
- [groupId: string]: true;
1722
- };
1723
- bindMode: import("@excalidraw/element/types").BindMode;
1724
- };
1725
- captureUpdate: "IMMEDIATELY";
1726
- };
1727
- keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
1728
- } & {
1729
- keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
1730
- };
1731
- export declare const actionToggleLassoTool: {
1732
- name: "toggleLassoTool";
1733
- label: string;
1734
- icon: import("react/jsx-runtime").JSX.Element;
1735
- trackEvent: {
1736
- category: "toolbar";
1737
- };
1738
- predicate: (elements: readonly ExcalidrawElement[], appState: AppState, props: import("../types").ExcalidrawProps, app: import("../types").AppClassProperties) => boolean;
1739
- perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: unknown, app: import("../types").AppClassProperties) => {
1740
- appState: {
1741
- selectedElementIds: {};
1742
- selectedGroupIds: {};
1743
- activeEmbeddable: null;
1744
- activeTool: {
1745
- lastActiveTool: import("../types").ActiveTool | null;
1746
- locked: boolean;
1747
- fromSelection: boolean;
1748
- } & import("../types").ActiveTool;
1749
- contextMenu: {
1750
- items: import("../components/ContextMenu").ContextMenuItems;
1751
- top: number;
1752
- left: number;
1753
- } | null;
1754
- showWelcomeScreen: boolean;
1755
- isLoading: boolean;
1756
- errorMessage: React.ReactNode;
1757
- newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
1758
- resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
1759
- multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
1760
- selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
1761
- isBindingEnabled: boolean;
1762
- bindingPreference: "enabled" | "disabled";
1763
- isMidpointSnappingEnabled: boolean;
1764
- startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
1765
- suggestedBinding: {
1766
- element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
1767
- midPoint?: import("@excalidraw/math").GlobalPoint;
1768
- } | null;
1769
- frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
1770
- frameRendering: {
1771
- enabled: boolean;
1772
- name: boolean;
1773
- outline: boolean;
1774
- clip: boolean;
1775
- };
1776
- editingFrame: string | null;
1777
- elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
1778
- editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
1779
- preferredSelectionTool: {
1780
- type: "selection" | "lasso";
1781
- initialized: boolean;
1782
- };
1783
- penMode: boolean;
1784
- penDetected: boolean;
1785
- exportBackground: boolean;
1786
- exportEmbedScene: boolean;
1787
- exportWithDarkMode: boolean;
1788
- exportScale: number;
1789
- currentItemStrokeColor: string;
1790
- currentItemBackgroundColor: string;
1791
- currentItemFillStyle: ExcalidrawElement["fillStyle"];
1792
- currentItemStrokeWidth: number;
1793
- currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
1794
- currentItemRoughness: number;
1795
- currentItemOpacity: number;
1796
- currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
1797
- currentItemFontSize: number;
1798
- currentItemTextAlign: import("@excalidraw/element/types").TextAlign;
1799
- currentItemStartArrowhead: import("@excalidraw/element/types").Arrowhead | null;
1800
- currentItemEndArrowhead: import("@excalidraw/element/types").Arrowhead | null;
1801
- currentHoveredFontFamily: import("@excalidraw/element/types").FontFamilyValues | null;
1802
- currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
1803
- currentItemArrowType: "sharp" | "round" | "elbow";
1804
- viewBackgroundColor: string;
1805
- scrollX: number;
1806
- scrollY: number;
1807
- cursorButton: "up" | "down";
1808
- scrolledOutside: boolean;
1809
- name: string | null;
1810
- isResizing: boolean;
1811
- isRotating: boolean;
1812
- zoom: import("../types").Zoom;
1813
- openMenu: "canvas" | null;
1814
- openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
1815
- openSidebar: {
1816
- name: import("../types").SidebarName;
1817
- tab?: import("../types").SidebarTabName;
1818
- } | null;
1819
- openDialog: null | {
1820
- name: "imageExport" | "help" | "jsonExport";
1821
- } | {
1822
- name: "ttd";
1823
- tab: "text-to-diagram" | "mermaid";
1824
- } | {
1825
- name: "commandPalette";
1826
- } | {
1827
- name: "settings";
1828
- } | {
1829
- name: "elementLinkSelector";
1830
- sourceElementId: ExcalidrawElement["id"];
1831
- } | {
1832
- name: "charts";
1833
- data: import("../charts").Spreadsheet;
1834
- rawText: string;
1835
- };
1836
- defaultSidebarDockedPreference: boolean;
1837
- lastPointerDownWith: import("@excalidraw/element/types").PointerType;
1838
- hoveredElementIds: Readonly<{
1839
- [id: string]: true;
1840
- }>;
1841
- previousSelectedElementIds: {
1842
- [id: string]: true;
1843
- };
1844
- selectedElementsAreBeingDragged: boolean;
1845
- shouldCacheIgnoreZoom: boolean;
1846
- toast: {
1847
- message: React.ReactNode;
1848
- closable?: boolean;
1849
- duration?: number;
1850
- } | null;
1851
- zenModeEnabled: boolean;
1852
- theme: import("@excalidraw/element/types").Theme;
1853
- gridSize: number;
1854
- gridStep: number;
1855
- gridModeEnabled: boolean;
1856
- viewModeEnabled: boolean;
1857
- editingGroupId: import("@excalidraw/element/types").GroupId | null;
1858
- width: number;
1859
- height: number;
1860
- offsetTop: number;
1861
- offsetLeft: number;
1862
- fileHandle: FileSystemFileHandle | null;
1863
- collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
1864
- stats: {
1865
- open: boolean;
1866
- panels: number;
1867
- };
1868
- showHyperlinkPopup: false | "info" | "editor";
1869
- selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
1870
- snapLines: readonly import("../snapping").SnapLine[];
1871
- originSnapOffset: {
1872
- x: number;
1873
- y: number;
1874
- } | null;
1875
- objectsSnapModeEnabled: boolean;
1876
- userToFollow: import("../types").UserToFollow | null;
1877
- followedBy: Set<import("../types").SocketId>;
1878
- isCropping: boolean;
1879
- croppingElementId: ExcalidrawElement["id"] | null;
1880
- searchMatches: Readonly<{
1881
- focusedId: ExcalidrawElement["id"] | null;
1882
- matches: readonly import("../types").SearchMatch[];
1883
- }> | null;
1884
- activeLockedId: string | null;
1885
- lockedMultiSelections: {
1886
- [groupId: string]: true;
1887
- };
1888
- bindMode: import("@excalidraw/element/types").BindMode;
1889
- };
1890
- captureUpdate: "NEVER";
1891
- };
1892
- } & {
1893
- keyTest?: undefined;
1894
- };
1895
- export declare const actionToggleHandTool: {
1896
- name: "toggleHandTool";
1897
- label: string;
1898
- trackEvent: {
1899
- category: "toolbar";
1900
- };
1901
- icon: import("react/jsx-runtime").JSX.Element;
1902
- viewMode: false;
1903
- perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: unknown, app: import("../types").AppClassProperties) => {
1904
- appState: {
1905
- selectedElementIds: {};
1906
- selectedGroupIds: {};
1907
- activeEmbeddable: null;
1908
- activeTool: {
1909
- lastActiveTool: import("../types").ActiveTool | null;
1910
- locked: boolean;
1911
- fromSelection: boolean;
1912
- } & import("../types").ActiveTool;
1913
- contextMenu: {
1914
- items: import("../components/ContextMenu").ContextMenuItems;
1915
- top: number;
1916
- left: number;
1917
- } | null;
1918
- showWelcomeScreen: boolean;
1919
- isLoading: boolean;
1920
- errorMessage: React.ReactNode;
1921
- newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
1922
- resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
1923
- multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
1924
- selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
1925
- isBindingEnabled: boolean;
1926
- bindingPreference: "enabled" | "disabled";
1927
- isMidpointSnappingEnabled: boolean;
1928
- startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
1929
- suggestedBinding: {
1930
- element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
1931
- midPoint?: import("@excalidraw/math").GlobalPoint;
1932
- } | null;
1933
- frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
1934
- frameRendering: {
1935
- enabled: boolean;
1936
- name: boolean;
1937
- outline: boolean;
1938
- clip: boolean;
1939
- };
1940
- editingFrame: string | null;
1941
- elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
1942
- editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
1943
- preferredSelectionTool: {
1944
- type: "selection" | "lasso";
1945
- initialized: boolean;
1946
- };
1947
- penMode: boolean;
1948
- penDetected: boolean;
1949
- exportBackground: boolean;
1950
- exportEmbedScene: boolean;
1951
- exportWithDarkMode: boolean;
1952
- exportScale: number;
1953
- currentItemStrokeColor: string;
1954
- currentItemBackgroundColor: string;
1955
- currentItemFillStyle: ExcalidrawElement["fillStyle"];
1956
- currentItemStrokeWidth: number;
1957
- currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
1958
- currentItemRoughness: number;
1959
- currentItemOpacity: number;
1960
- currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
1961
- currentItemFontSize: number;
1962
- currentItemTextAlign: import("@excalidraw/element/types").TextAlign;
1963
- currentItemStartArrowhead: import("@excalidraw/element/types").Arrowhead | null;
1964
- currentItemEndArrowhead: import("@excalidraw/element/types").Arrowhead | null;
1965
- currentHoveredFontFamily: import("@excalidraw/element/types").FontFamilyValues | null;
1966
- currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
1967
- currentItemArrowType: "sharp" | "round" | "elbow";
1968
- viewBackgroundColor: string;
1969
- scrollX: number;
1970
- scrollY: number;
1971
- cursorButton: "up" | "down";
1972
- scrolledOutside: boolean;
1973
- name: string | null;
1974
- isResizing: boolean;
1975
- isRotating: boolean;
1976
- zoom: import("../types").Zoom;
1977
- openMenu: "canvas" | null;
1978
- openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
1979
- openSidebar: {
1980
- name: import("../types").SidebarName;
1981
- tab?: import("../types").SidebarTabName;
1982
- } | null;
1983
- openDialog: null | {
1984
- name: "imageExport" | "help" | "jsonExport";
1985
- } | {
1986
- name: "ttd";
1987
- tab: "text-to-diagram" | "mermaid";
1988
- } | {
1989
- name: "commandPalette";
1990
- } | {
1991
- name: "settings";
1992
- } | {
1993
- name: "elementLinkSelector";
1994
- sourceElementId: ExcalidrawElement["id"];
1995
- } | {
1996
- name: "charts";
1997
- data: import("../charts").Spreadsheet;
1998
- rawText: string;
1999
- };
2000
- defaultSidebarDockedPreference: boolean;
2001
- lastPointerDownWith: import("@excalidraw/element/types").PointerType;
2002
- hoveredElementIds: Readonly<{
2003
- [id: string]: true;
2004
- }>;
2005
- previousSelectedElementIds: {
2006
- [id: string]: true;
2007
- };
2008
- selectedElementsAreBeingDragged: boolean;
2009
- shouldCacheIgnoreZoom: boolean;
2010
- toast: {
2011
- message: React.ReactNode;
2012
- closable?: boolean;
2013
- duration?: number;
2014
- } | null;
2015
- zenModeEnabled: boolean;
2016
- theme: import("@excalidraw/element/types").Theme;
2017
- gridSize: number;
2018
- gridStep: number;
2019
- gridModeEnabled: boolean;
2020
- viewModeEnabled: boolean;
2021
- editingGroupId: import("@excalidraw/element/types").GroupId | null;
2022
- width: number;
2023
- height: number;
2024
- offsetTop: number;
2025
- offsetLeft: number;
2026
- fileHandle: FileSystemFileHandle | null;
2027
- collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
2028
- stats: {
2029
- open: boolean;
2030
- panels: number;
2031
- };
2032
- showHyperlinkPopup: false | "info" | "editor";
2033
- selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
2034
- snapLines: readonly import("../snapping").SnapLine[];
2035
- originSnapOffset: {
2036
- x: number;
2037
- y: number;
2038
- } | null;
2039
- objectsSnapModeEnabled: boolean;
2040
- userToFollow: import("../types").UserToFollow | null;
2041
- followedBy: Set<import("../types").SocketId>;
2042
- isCropping: boolean;
2043
- croppingElementId: ExcalidrawElement["id"] | null;
2044
- searchMatches: Readonly<{
2045
- focusedId: ExcalidrawElement["id"] | null;
2046
- matches: readonly import("../types").SearchMatch[];
2047
- }> | null;
2048
- activeLockedId: string | null;
2049
- lockedMultiSelections: {
2050
- [groupId: string]: true;
2051
- };
2052
- bindMode: import("@excalidraw/element/types").BindMode;
2053
- };
2054
- captureUpdate: "IMMEDIATELY";
2055
- };
2056
- keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
2057
- } & {
2058
- keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
1264
+ keyTest?: ((event: React.KeyboardEvent | KeyboardEvent, appState: AppState, elements: readonly import("@excalidraw/element/types").ExcalidrawElement[], app: import("../types").AppClassProperties) => boolean) | undefined;
2059
1265
  };