@excalidraw/element 0.18.0-2a82821 → 0.18.0-2b1c2a9

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 (160) hide show
  1. package/dist/dev/index.js +5570 -3546
  2. package/dist/dev/index.js.map +4 -4
  3. package/dist/prod/index.js +12 -12
  4. package/dist/types/common/src/colors.d.ts +19 -0
  5. package/dist/types/common/src/constants.d.ts +3 -0
  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 +1 -1
  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 +5 -9
  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 +4 -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 +3 -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 +4 -4
  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 +27 -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 +5 -5
  33. package/dist/types/element/src/shape.d.ts +12 -0
  34. package/dist/types/element/src/sortElements.d.ts +10 -0
  35. package/dist/types/element/src/textElement.d.ts +13 -9
  36. package/dist/types/element/src/transform.d.ts +2 -2
  37. package/dist/types/element/src/typeChecks.d.ts +25 -25
  38. package/dist/types/element/src/types.d.ts +9 -1
  39. package/dist/types/element/src/utils.d.ts +7 -3
  40. package/dist/types/element/src/zindex.d.ts +2 -2
  41. package/dist/types/excalidraw/actions/actionAddToLibrary.d.ts +36 -12
  42. package/dist/types/excalidraw/actions/actionAlign.d.ts +6 -6
  43. package/dist/types/excalidraw/actions/actionBoundText.d.ts +24 -8
  44. package/dist/types/excalidraw/actions/actionCanvas.d.ts +146 -931
  45. package/dist/types/excalidraw/actions/actionClipboard.d.ts +24 -8
  46. package/dist/types/excalidraw/actions/actionCropEditor.d.ts +12 -4
  47. package/dist/types/excalidraw/actions/actionDeleteSelected.d.ts +38 -13
  48. package/dist/types/excalidraw/actions/actionDeselect.d.ts +9 -4
  49. package/dist/types/excalidraw/actions/actionDistribute.d.ts +2 -3
  50. package/dist/types/excalidraw/actions/actionElementLink.d.ts +12 -4
  51. package/dist/types/excalidraw/actions/actionElementLock.d.ts +25 -9
  52. package/dist/types/excalidraw/actions/actionExport.d.ts +26 -10
  53. package/dist/types/excalidraw/actions/actionFinalize.d.ts +1 -0
  54. package/dist/types/excalidraw/actions/actionFrame.d.ts +48 -197
  55. package/dist/types/excalidraw/actions/actionGroup.d.ts +39 -23
  56. package/dist/types/excalidraw/actions/actionLinearEditor.d.ts +16 -6
  57. package/dist/types/excalidraw/actions/actionLink.d.ts +13 -5
  58. package/dist/types/excalidraw/actions/actionMenu.d.ts +12 -4
  59. package/dist/types/excalidraw/actions/actionProperties.d.ts +43 -24
  60. package/dist/types/excalidraw/actions/actionSelectAll.d.ts +17 -9
  61. package/dist/types/excalidraw/actions/actionStyles.d.ts +12 -4
  62. package/dist/types/excalidraw/actions/actionTextAutoResize.d.ts +1 -1
  63. package/dist/types/excalidraw/actions/actionToggleArrowBinding.d.ts +13 -5
  64. package/dist/types/excalidraw/actions/actionToggleGridMode.d.ts +16 -9
  65. package/dist/types/excalidraw/actions/actionToggleMidpointSnapping.d.ts +13 -5
  66. package/dist/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +13 -5
  67. package/dist/types/excalidraw/actions/actionToggleSearchMenu.d.ts +16 -9
  68. package/dist/types/excalidraw/actions/actionToggleShapeSwitch.d.ts +1 -1
  69. package/dist/types/excalidraw/actions/actionToggleStats.d.ts +13 -5
  70. package/dist/types/excalidraw/actions/actionToggleViewMode.d.ts +14 -6
  71. package/dist/types/excalidraw/actions/actionToggleZenMode.d.ts +13 -5
  72. package/dist/types/excalidraw/actions/index.d.ts +1 -2
  73. package/dist/types/excalidraw/actions/manager.d.ts +1 -0
  74. package/dist/types/excalidraw/actions/shortcuts.d.ts +1 -1
  75. package/dist/types/excalidraw/actions/types.d.ts +8 -4
  76. package/dist/types/excalidraw/appState.d.ts +9 -4
  77. package/dist/types/excalidraw/components/Actions.d.ts +17 -12
  78. package/dist/types/excalidraw/components/App.arrowText.d.ts +104 -0
  79. package/dist/types/excalidraw/components/App.bucketFill.d.ts +48 -0
  80. package/dist/types/excalidraw/components/App.cursor.d.ts +38 -0
  81. package/dist/types/excalidraw/components/App.d.ts +372 -67
  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 +9 -3
  86. package/dist/types/excalidraw/components/ColorPicker/CustomColorList.d.ts +3 -1
  87. package/dist/types/excalidraw/components/ColorPicker/Picker.d.ts +3 -1
  88. package/dist/types/excalidraw/components/ColorPicker/PickerColorList.d.ts +9 -2
  89. package/dist/types/excalidraw/components/ColorPicker/ShadeList.d.ts +4 -2
  90. package/dist/types/excalidraw/components/ColorPicker/TopPicks.d.ts +8 -1
  91. package/dist/types/excalidraw/components/ColorPicker/keyboardNavHandlers.d.ts +2 -1
  92. package/dist/types/excalidraw/components/ColorPicker/topPicksDnD.d.ts +31 -0
  93. package/dist/types/excalidraw/components/ConvertElementTypePopup.d.ts +1 -1
  94. package/dist/types/excalidraw/components/CursorHint.d.ts +46 -0
  95. package/dist/types/excalidraw/components/{ToolButton.d.ts → IconButton.d.ts} +16 -19
  96. package/dist/types/excalidraw/components/Island.d.ts +7 -0
  97. package/dist/types/excalidraw/components/LaserPointerButton.d.ts +2 -4
  98. package/dist/types/excalidraw/components/LayerUI.d.ts +5 -2
  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/PenModeButton.d.ts +2 -5
  104. package/dist/types/excalidraw/components/Popover.d.ts +1 -3
  105. package/dist/types/excalidraw/components/{ButtonIcon.d.ts → RadioButton.d.ts} +2 -5
  106. package/dist/types/excalidraw/components/Stats/Angle.d.ts +2 -2
  107. package/dist/types/excalidraw/components/Stats/Dimension.d.ts +2 -2
  108. package/dist/types/excalidraw/components/Stats/DragInput.d.ts +2 -2
  109. package/dist/types/excalidraw/components/Stats/MultiAngle.d.ts +2 -2
  110. package/dist/types/excalidraw/components/Stats/MultiDimension.d.ts +2 -2
  111. package/dist/types/excalidraw/components/Stats/MultiPosition.d.ts +2 -2
  112. package/dist/types/excalidraw/components/Stats/Position.d.ts +3 -3
  113. package/dist/types/excalidraw/components/Stats/utils.d.ts +1 -1
  114. package/dist/types/excalidraw/components/ToolPopover.d.ts +3 -6
  115. package/dist/types/excalidraw/components/Toolbar.d.ts +11 -0
  116. package/dist/types/excalidraw/components/Tools.d.ts +146 -0
  117. package/dist/types/excalidraw/components/UserList.d.ts +3 -2
  118. package/dist/types/excalidraw/components/ViewportStatusFrame/ViewportStatusFrame.d.ts +11 -0
  119. package/dist/types/excalidraw/components/canvases/InteractiveCanvas.d.ts +2 -0
  120. package/dist/types/excalidraw/components/footer/Footer.d.ts +3 -1
  121. package/dist/types/excalidraw/components/hyperlink/helpers.d.ts +2 -2
  122. package/dist/types/excalidraw/components/icons.d.ts +4 -1
  123. package/dist/types/excalidraw/components/main-menu/DefaultItems.d.ts +1 -1
  124. package/dist/types/excalidraw/components/positionElementBesideCursor.d.ts +26 -0
  125. package/dist/types/excalidraw/components/shapeActionPredicates.d.ts +39 -0
  126. package/dist/types/excalidraw/data/blob.d.ts +28 -12
  127. package/dist/types/excalidraw/data/index.d.ts +4 -4
  128. package/dist/types/excalidraw/data/json.d.ts +20 -12
  129. package/dist/types/excalidraw/drawShapeTrail.d.ts +16 -0
  130. package/dist/types/excalidraw/fonts/Fonts.d.ts +3 -2
  131. package/dist/types/excalidraw/hooks/useAppStateValue.d.ts +29 -0
  132. package/dist/types/excalidraw/hooks/useTextEditorFocus.d.ts +5 -5
  133. package/dist/types/excalidraw/lasso/utils.d.ts +2 -0
  134. package/dist/types/excalidraw/renderer/animation.d.ts +1 -0
  135. package/dist/types/excalidraw/renderer/helpers.d.ts +7 -0
  136. package/dist/types/excalidraw/renderer/interactiveScene.d.ts +1 -3
  137. package/dist/types/excalidraw/scene/Renderer.d.ts +12 -11
  138. package/dist/types/excalidraw/scene/export.d.ts +3 -3
  139. package/dist/types/excalidraw/scene/index.d.ts +1 -1
  140. package/dist/types/excalidraw/scene/types.d.ts +4 -3
  141. package/dist/types/excalidraw/snapping.d.ts +7 -7
  142. package/dist/types/excalidraw/types.d.ts +410 -20
  143. package/dist/types/excalidraw/viewport.d.ts +275 -0
  144. package/dist/types/excalidraw/wysiwyg/textWysiwyg.d.ts +2 -3
  145. package/dist/types/laser-pointer/src/state.d.ts +1 -0
  146. package/dist/types/math/src/curve.d.ts +19 -12
  147. package/dist/types/math/src/index.d.ts +1 -0
  148. package/dist/types/math/src/pca.d.ts +79 -0
  149. package/dist/types/math/src/polygon.d.ts +25 -1
  150. package/dist/types/math/src/segment.d.ts +6 -0
  151. package/dist/types/utils/src/export.d.ts +3 -3
  152. package/package.json +4 -4
  153. package/dist/types/excalidraw/actions/actionEmbeddable.d.ts +0 -172
  154. package/dist/types/excalidraw/components/FollowMode/FollowMode.d.ts +0 -10
  155. package/dist/types/excalidraw/components/HandButton.d.ts +0 -10
  156. package/dist/types/excalidraw/components/MobileToolBar.d.ts +0 -10
  157. package/dist/types/excalidraw/components/shapes.d.ts +0 -270
  158. package/dist/types/excalidraw/cursor.d.ts +0 -5
  159. package/dist/types/excalidraw/scene/scroll.d.ts +0 -18
  160. package/dist/types/excalidraw/scene/zoom.d.ts +0 -12
@@ -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: {
@@ -28,6 +26,11 @@ export declare const actionClearCanvas: {
28
26
  open: boolean;
29
27
  panels: number;
30
28
  };
29
+ colorTopPicks: {
30
+ elementStroke: readonly string[] | null;
31
+ elementBackground: readonly string[] | null;
32
+ bucketFill: readonly string[] | null;
33
+ };
31
34
  activeTool: {
32
35
  lastActiveTool: import("../types").ActiveTool | null;
33
36
  locked: boolean;
@@ -56,7 +59,7 @@ export declare const actionClearCanvas: {
56
59
  name: "settings";
57
60
  } | {
58
61
  name: "elementLinkSelector";
59
- sourceElementId: ExcalidrawElement["id"];
62
+ sourceElementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
60
63
  } | {
61
64
  name: "charts";
62
65
  data: import("../charts").Spreadsheet;
@@ -84,16 +87,20 @@ export declare const actionClearCanvas: {
84
87
  element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
85
88
  midPoint?: import("@excalidraw/math").GlobalPoint;
86
89
  } | null;
90
+ hoveredArrowTextAnchor: {
91
+ elementId: import("@excalidraw/element/types").ExcalidrawArrowElement["id"];
92
+ anchor: "start" | "end" | "label";
93
+ } | null;
87
94
  isRotating: boolean;
88
- elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
95
+ elementsToHighlight: readonly import("@excalidraw/element/types").NonDeletedExcalidrawElement[] | null;
89
96
  collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
90
97
  snapLines: readonly import("../snapping").SnapLine[];
91
98
  zenModeEnabled: boolean;
92
99
  editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
93
100
  isCropping: boolean;
94
- croppingElementId: ExcalidrawElement["id"] | null;
101
+ croppingElementId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
95
102
  searchMatches: Readonly<{
96
- focusedId: ExcalidrawElement["id"] | null;
103
+ focusedId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
97
104
  matches: readonly import("../types").SearchMatch[];
98
105
  }> | null;
99
106
  activeLockedId: string | null;
@@ -115,7 +122,7 @@ export declare const actionClearCanvas: {
115
122
  resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
116
123
  boxSelectionMode: import("../types").BoxSelectionMode;
117
124
  bindingPreference: "enabled" | "disabled";
118
- editingFrame: string | null;
125
+ editingFrame: import("@excalidraw/element/types").ExcalidrawFrameLikeElement["id"] | null;
119
126
  preferredSelectionTool: {
120
127
  type: "selection" | "lasso";
121
128
  initialized: boolean;
@@ -123,9 +130,9 @@ export declare const actionClearCanvas: {
123
130
  exportWithDarkMode: boolean;
124
131
  currentItemStrokeColor: string;
125
132
  currentItemBackgroundColor: string;
126
- currentItemFillStyle: ExcalidrawElement["fillStyle"];
133
+ currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
127
134
  currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
128
- currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
135
+ currentItemStrokeStyle: import("@excalidraw/element/types").ExcalidrawElement["strokeStyle"];
129
136
  currentItemRoughness: number;
130
137
  currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
131
138
  currentItemOpacity: number;
@@ -136,6 +143,7 @@ export declare const actionClearCanvas: {
136
143
  currentItemEndArrowhead: import("@excalidraw/element/types").Arrowhead | null;
137
144
  currentHoveredFontFamily: import("@excalidraw/element/types").FontFamilyValues | null;
138
145
  currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
146
+ scrollConstraints: import("../types").ScrollConstraints | null;
139
147
  cursorButton: "up" | "down";
140
148
  scrolledOutside: boolean;
141
149
  isResizing: boolean;
@@ -163,8 +171,6 @@ export declare const actionClearCanvas: {
163
171
  y: number;
164
172
  } | null;
165
173
  objectsSnapModeEnabled: boolean;
166
- userToFollow: import("../types").UserToFollow | null;
167
- followedBy: Set<import("../types").SocketId>;
168
174
  lockedMultiSelections: {
169
175
  [groupId: string]: true;
170
176
  };
@@ -178,18 +184,17 @@ export declare const actionZoomIn: {
178
184
  name: "zoomIn";
179
185
  label: string;
180
186
  viewMode: true;
187
+ navigation: true;
181
188
  icon: import("react/jsx-runtime").JSX.Element;
182
189
  trackEvent: {
183
190
  category: "canvas";
184
191
  };
192
+ predicate: (elements: readonly import("@excalidraw/element/types").ExcalidrawElement[], appState: AppState, appProps: import("../types").ExcalidrawProps, app: import("../types").AppClassProperties) => boolean;
185
193
  perform: (_elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: unknown, app: import("../types").AppClassProperties) => {
186
194
  appState: {
187
- userToFollow: null;
195
+ zoom: import("../types").Zoom;
188
196
  scrollX: number;
189
197
  scrollY: number;
190
- zoom: {
191
- value: import("../types").NormalizedZoomValue;
192
- };
193
198
  contextMenu: {
194
199
  items: import("../components/ContextMenu").ContextMenuItems;
195
200
  top: number;
@@ -214,6 +219,10 @@ export declare const actionZoomIn: {
214
219
  element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
215
220
  midPoint?: import("@excalidraw/math").GlobalPoint;
216
221
  } | null;
222
+ hoveredArrowTextAnchor: {
223
+ elementId: import("@excalidraw/element/types").ExcalidrawArrowElement["id"];
224
+ anchor: "start" | "end" | "label";
225
+ } | null;
217
226
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
218
227
  frameRendering: {
219
228
  enabled: boolean;
@@ -221,8 +230,8 @@ export declare const actionZoomIn: {
221
230
  outline: boolean;
222
231
  clip: boolean;
223
232
  };
224
- editingFrame: string | null;
225
- elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
233
+ editingFrame: import("@excalidraw/element/types").ExcalidrawFrameLikeElement["id"] | null;
234
+ elementsToHighlight: readonly import("@excalidraw/element/types").NonDeletedExcalidrawElement[] | null;
226
235
  editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
227
236
  activeTool: {
228
237
  lastActiveTool: import("../types").ActiveTool | null;
@@ -241,9 +250,9 @@ export declare const actionZoomIn: {
241
250
  exportScale: number;
242
251
  currentItemStrokeColor: string;
243
252
  currentItemBackgroundColor: string;
244
- currentItemFillStyle: ExcalidrawElement["fillStyle"];
253
+ currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
245
254
  currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
246
- currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
255
+ currentItemStrokeStyle: import("@excalidraw/element/types").ExcalidrawElement["strokeStyle"];
247
256
  currentItemRoughness: number;
248
257
  currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
249
258
  currentItemOpacity: number;
@@ -256,6 +265,7 @@ export declare const actionZoomIn: {
256
265
  currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
257
266
  currentItemArrowType: "sharp" | "round" | "elbow";
258
267
  viewBackgroundColor: string;
268
+ scrollConstraints: import("../types").ScrollConstraints | null;
259
269
  cursorButton: "up" | "down";
260
270
  scrolledOutside: boolean;
261
271
  name: string | null;
@@ -278,7 +288,7 @@ export declare const actionZoomIn: {
278
288
  name: "settings";
279
289
  } | {
280
290
  name: "elementLinkSelector";
281
- sourceElementId: ExcalidrawElement["id"];
291
+ sourceElementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
282
292
  } | {
283
293
  name: "charts";
284
294
  data: import("../charts").Spreadsheet;
@@ -330,11 +340,10 @@ export declare const actionZoomIn: {
330
340
  y: number;
331
341
  } | null;
332
342
  objectsSnapModeEnabled: boolean;
333
- followedBy: Set<import("../types").SocketId>;
334
343
  isCropping: boolean;
335
- croppingElementId: ExcalidrawElement["id"] | null;
344
+ croppingElementId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
336
345
  searchMatches: Readonly<{
337
- focusedId: ExcalidrawElement["id"] | null;
346
+ focusedId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
338
347
  matches: readonly import("../types").SearchMatch[];
339
348
  }> | null;
340
349
  activeLockedId: string | null;
@@ -342,10 +351,15 @@ export declare const actionZoomIn: {
342
351
  [groupId: string]: true;
343
352
  };
344
353
  bindMode: import("@excalidraw/element/types").BindMode;
354
+ colorTopPicks: {
355
+ elementStroke: readonly string[] | null;
356
+ elementBackground: readonly string[] | null;
357
+ bucketFill: readonly string[] | null;
358
+ };
345
359
  };
346
360
  captureUpdate: "EVENTUALLY";
347
361
  };
348
- PanelComponent: ({ updateData, appState }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
362
+ PanelComponent: ({ updateData }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
349
363
  keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
350
364
  } & {
351
365
  keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
@@ -355,17 +369,16 @@ export declare const actionZoomOut: {
355
369
  label: string;
356
370
  icon: import("react/jsx-runtime").JSX.Element;
357
371
  viewMode: true;
372
+ navigation: true;
358
373
  trackEvent: {
359
374
  category: "canvas";
360
375
  };
376
+ predicate: (elements: readonly import("@excalidraw/element/types").ExcalidrawElement[], appState: AppState, appProps: import("../types").ExcalidrawProps, app: import("../types").AppClassProperties) => boolean;
361
377
  perform: (_elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: unknown, app: import("../types").AppClassProperties) => {
362
378
  appState: {
363
- userToFollow: null;
379
+ zoom: import("../types").Zoom;
364
380
  scrollX: number;
365
381
  scrollY: number;
366
- zoom: {
367
- value: import("../types").NormalizedZoomValue;
368
- };
369
382
  contextMenu: {
370
383
  items: import("../components/ContextMenu").ContextMenuItems;
371
384
  top: number;
@@ -390,6 +403,10 @@ export declare const actionZoomOut: {
390
403
  element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
391
404
  midPoint?: import("@excalidraw/math").GlobalPoint;
392
405
  } | null;
406
+ hoveredArrowTextAnchor: {
407
+ elementId: import("@excalidraw/element/types").ExcalidrawArrowElement["id"];
408
+ anchor: "start" | "end" | "label";
409
+ } | null;
393
410
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
394
411
  frameRendering: {
395
412
  enabled: boolean;
@@ -397,8 +414,8 @@ export declare const actionZoomOut: {
397
414
  outline: boolean;
398
415
  clip: boolean;
399
416
  };
400
- editingFrame: string | null;
401
- elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
417
+ editingFrame: import("@excalidraw/element/types").ExcalidrawFrameLikeElement["id"] | null;
418
+ elementsToHighlight: readonly import("@excalidraw/element/types").NonDeletedExcalidrawElement[] | null;
402
419
  editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
403
420
  activeTool: {
404
421
  lastActiveTool: import("../types").ActiveTool | null;
@@ -417,9 +434,9 @@ export declare const actionZoomOut: {
417
434
  exportScale: number;
418
435
  currentItemStrokeColor: string;
419
436
  currentItemBackgroundColor: string;
420
- currentItemFillStyle: ExcalidrawElement["fillStyle"];
437
+ currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
421
438
  currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
422
- currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
439
+ currentItemStrokeStyle: import("@excalidraw/element/types").ExcalidrawElement["strokeStyle"];
423
440
  currentItemRoughness: number;
424
441
  currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
425
442
  currentItemOpacity: number;
@@ -432,6 +449,7 @@ export declare const actionZoomOut: {
432
449
  currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
433
450
  currentItemArrowType: "sharp" | "round" | "elbow";
434
451
  viewBackgroundColor: string;
452
+ scrollConstraints: import("../types").ScrollConstraints | null;
435
453
  cursorButton: "up" | "down";
436
454
  scrolledOutside: boolean;
437
455
  name: string | null;
@@ -454,7 +472,7 @@ export declare const actionZoomOut: {
454
472
  name: "settings";
455
473
  } | {
456
474
  name: "elementLinkSelector";
457
- sourceElementId: ExcalidrawElement["id"];
475
+ sourceElementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
458
476
  } | {
459
477
  name: "charts";
460
478
  data: import("../charts").Spreadsheet;
@@ -506,11 +524,10 @@ export declare const actionZoomOut: {
506
524
  y: number;
507
525
  } | null;
508
526
  objectsSnapModeEnabled: boolean;
509
- followedBy: Set<import("../types").SocketId>;
510
527
  isCropping: boolean;
511
- croppingElementId: ExcalidrawElement["id"] | null;
528
+ croppingElementId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
512
529
  searchMatches: Readonly<{
513
- focusedId: ExcalidrawElement["id"] | null;
530
+ focusedId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
514
531
  matches: readonly import("../types").SearchMatch[];
515
532
  }> | null;
516
533
  activeLockedId: string | null;
@@ -518,10 +535,15 @@ export declare const actionZoomOut: {
518
535
  [groupId: string]: true;
519
536
  };
520
537
  bindMode: import("@excalidraw/element/types").BindMode;
538
+ colorTopPicks: {
539
+ elementStroke: readonly string[] | null;
540
+ elementBackground: readonly string[] | null;
541
+ bucketFill: readonly string[] | null;
542
+ };
521
543
  };
522
544
  captureUpdate: "EVENTUALLY";
523
545
  };
524
- PanelComponent: ({ updateData, appState }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
546
+ PanelComponent: ({ updateData }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
525
547
  keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
526
548
  } & {
527
549
  keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
@@ -531,17 +553,16 @@ export declare const actionResetZoom: {
531
553
  label: string;
532
554
  icon: import("react/jsx-runtime").JSX.Element;
533
555
  viewMode: true;
556
+ navigation: true;
534
557
  trackEvent: {
535
558
  category: "canvas";
536
559
  };
560
+ predicate: (elements: readonly import("@excalidraw/element/types").ExcalidrawElement[], appState: AppState, appProps: import("../types").ExcalidrawProps, app: import("../types").AppClassProperties) => boolean;
537
561
  perform: (_elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: unknown, app: import("../types").AppClassProperties) => {
538
562
  appState: {
539
- userToFollow: null;
563
+ zoom: import("../types").Zoom;
540
564
  scrollX: number;
541
565
  scrollY: number;
542
- zoom: {
543
- value: import("../types").NormalizedZoomValue;
544
- };
545
566
  contextMenu: {
546
567
  items: import("../components/ContextMenu").ContextMenuItems;
547
568
  top: number;
@@ -566,6 +587,10 @@ export declare const actionResetZoom: {
566
587
  element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
567
588
  midPoint?: import("@excalidraw/math").GlobalPoint;
568
589
  } | null;
590
+ hoveredArrowTextAnchor: {
591
+ elementId: import("@excalidraw/element/types").ExcalidrawArrowElement["id"];
592
+ anchor: "start" | "end" | "label";
593
+ } | null;
569
594
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
570
595
  frameRendering: {
571
596
  enabled: boolean;
@@ -573,8 +598,8 @@ export declare const actionResetZoom: {
573
598
  outline: boolean;
574
599
  clip: boolean;
575
600
  };
576
- editingFrame: string | null;
577
- elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
601
+ editingFrame: import("@excalidraw/element/types").ExcalidrawFrameLikeElement["id"] | null;
602
+ elementsToHighlight: readonly import("@excalidraw/element/types").NonDeletedExcalidrawElement[] | null;
578
603
  editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
579
604
  activeTool: {
580
605
  lastActiveTool: import("../types").ActiveTool | null;
@@ -593,9 +618,9 @@ export declare const actionResetZoom: {
593
618
  exportScale: number;
594
619
  currentItemStrokeColor: string;
595
620
  currentItemBackgroundColor: string;
596
- currentItemFillStyle: ExcalidrawElement["fillStyle"];
621
+ currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
597
622
  currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
598
- currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
623
+ currentItemStrokeStyle: import("@excalidraw/element/types").ExcalidrawElement["strokeStyle"];
599
624
  currentItemRoughness: number;
600
625
  currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
601
626
  currentItemOpacity: number;
@@ -608,6 +633,7 @@ export declare const actionResetZoom: {
608
633
  currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
609
634
  currentItemArrowType: "sharp" | "round" | "elbow";
610
635
  viewBackgroundColor: string;
636
+ scrollConstraints: import("../types").ScrollConstraints | null;
611
637
  cursorButton: "up" | "down";
612
638
  scrolledOutside: boolean;
613
639
  name: string | null;
@@ -630,7 +656,7 @@ export declare const actionResetZoom: {
630
656
  name: "settings";
631
657
  } | {
632
658
  name: "elementLinkSelector";
633
- sourceElementId: ExcalidrawElement["id"];
659
+ sourceElementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
634
660
  } | {
635
661
  name: "charts";
636
662
  data: import("../charts").Spreadsheet;
@@ -682,11 +708,10 @@ export declare const actionResetZoom: {
682
708
  y: number;
683
709
  } | null;
684
710
  objectsSnapModeEnabled: boolean;
685
- followedBy: Set<import("../types").SocketId>;
686
711
  isCropping: boolean;
687
- croppingElementId: ExcalidrawElement["id"] | null;
712
+ croppingElementId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
688
713
  searchMatches: Readonly<{
689
- focusedId: ExcalidrawElement["id"] | null;
714
+ focusedId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
690
715
  matches: readonly import("../types").SearchMatch[];
691
716
  }> | null;
692
717
  activeLockedId: string | null;
@@ -694,374 +719,34 @@ export declare const actionResetZoom: {
694
719
  [groupId: string]: true;
695
720
  };
696
721
  bindMode: import("@excalidraw/element/types").BindMode;
722
+ colorTopPicks: {
723
+ elementStroke: readonly string[] | null;
724
+ elementBackground: readonly string[] | null;
725
+ bucketFill: readonly string[] | null;
726
+ };
697
727
  };
698
728
  captureUpdate: "EVENTUALLY";
699
729
  };
700
- PanelComponent: ({ updateData, appState }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
730
+ PanelComponent: ({ updateData }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
701
731
  keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
702
732
  } & {
703
733
  keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
704
734
  };
705
- export declare const zoomToFitBounds: ({ bounds, appState, canvasOffsets, fitToViewport, viewportZoomFactor, minZoom, maxZoom, }: {
706
- bounds: SceneBounds;
707
- canvasOffsets?: Offsets;
708
- appState: Readonly<AppState>;
709
- /** whether to fit content to viewport (beyond >100%) */
710
- fitToViewport: boolean;
711
- /** zoom content to cover X of the viewport, when fitToViewport=true */
712
- viewportZoomFactor?: number;
713
- minZoom?: number;
714
- maxZoom?: number;
715
- }) => {
716
- appState: {
717
- scrollX: number;
718
- scrollY: number;
719
- zoom: {
720
- value: import("../types").NormalizedZoomValue;
721
- };
722
- contextMenu: {
723
- items: import("../components/ContextMenu").ContextMenuItems;
724
- top: number;
725
- left: number;
726
- } | null;
727
- showWelcomeScreen: boolean;
728
- isLoading: boolean;
729
- errorMessage: React.ReactNode;
730
- activeEmbeddable: {
731
- element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
732
- state: "hover" | "active";
733
- } | null;
734
- newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
735
- resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
736
- multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
737
- selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
738
- isBindingEnabled: boolean;
739
- boxSelectionMode: import("../types").BoxSelectionMode;
740
- bindingPreference: "enabled" | "disabled";
741
- isMidpointSnappingEnabled: boolean;
742
- suggestedBinding: {
743
- element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
744
- midPoint?: import("@excalidraw/math").GlobalPoint;
745
- } | null;
746
- frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
747
- frameRendering: {
748
- enabled: boolean;
749
- name: boolean;
750
- outline: boolean;
751
- clip: boolean;
752
- };
753
- editingFrame: string | null;
754
- elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
755
- editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
756
- activeTool: {
757
- lastActiveTool: import("../types").ActiveTool | null;
758
- locked: boolean;
759
- fromSelection: boolean;
760
- } & import("../types").ActiveTool;
761
- preferredSelectionTool: {
762
- type: "selection" | "lasso";
763
- initialized: boolean;
764
- };
765
- penMode: boolean;
766
- penDetected: boolean;
767
- exportBackground: boolean;
768
- exportEmbedScene: boolean;
769
- exportWithDarkMode: boolean;
770
- exportScale: number;
771
- currentItemStrokeColor: string;
772
- currentItemBackgroundColor: string;
773
- currentItemFillStyle: ExcalidrawElement["fillStyle"];
774
- currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
775
- currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
776
- currentItemRoughness: number;
777
- currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
778
- currentItemOpacity: number;
779
- currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
780
- currentItemFontSize: number;
781
- currentItemTextAlign: import("@excalidraw/element/types").TextAlign;
782
- currentItemStartArrowhead: import("@excalidraw/element/types").Arrowhead | null;
783
- currentItemEndArrowhead: import("@excalidraw/element/types").Arrowhead | null;
784
- currentHoveredFontFamily: import("@excalidraw/element/types").FontFamilyValues | null;
785
- currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
786
- currentItemArrowType: "sharp" | "round" | "elbow";
787
- viewBackgroundColor: string;
788
- cursorButton: "up" | "down";
789
- scrolledOutside: boolean;
790
- name: string | null;
791
- isResizing: boolean;
792
- isRotating: boolean;
793
- openMenu: "canvas" | null;
794
- openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
795
- openSidebar: {
796
- name: import("../types").SidebarName;
797
- tab?: import("../types").SidebarTabName;
798
- } | null;
799
- openDialog: null | {
800
- name: "imageExport" | "help" | "jsonExport";
801
- } | {
802
- name: "ttd";
803
- tab: "text-to-diagram" | "mermaid";
804
- } | {
805
- name: "commandPalette";
806
- } | {
807
- name: "settings";
808
- } | {
809
- name: "elementLinkSelector";
810
- sourceElementId: ExcalidrawElement["id"];
811
- } | {
812
- name: "charts";
813
- data: import("../charts").Spreadsheet;
814
- rawText: string;
815
- };
816
- defaultSidebarDockedPreference: boolean;
817
- lastPointerDownWith: import("@excalidraw/element/types").PointerType;
818
- selectedElementIds: Readonly<{
819
- [id: string]: true;
820
- }>;
821
- hoveredElementIds: Readonly<{
822
- [id: string]: true;
823
- }>;
824
- previousSelectedElementIds: {
825
- [id: string]: true;
826
- };
827
- selectedElementsAreBeingDragged: boolean;
828
- shouldCacheIgnoreZoom: boolean;
829
- toast: {
830
- message: React.ReactNode;
831
- closable?: boolean;
832
- duration?: number;
833
- } | null;
834
- zenModeEnabled: boolean;
835
- theme: import("@excalidraw/element/types").Theme;
836
- gridSize: number;
837
- gridStep: number;
838
- gridModeEnabled: boolean;
839
- viewModeEnabled: boolean;
840
- selectedGroupIds: {
841
- [groupId: string]: boolean;
842
- };
843
- editingGroupId: import("@excalidraw/element/types").GroupId | null;
844
- width: number;
845
- height: number;
846
- offsetTop: number;
847
- offsetLeft: number;
848
- fileHandle: FileSystemFileHandle | null;
849
- collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
850
- stats: {
851
- open: boolean;
852
- panels: number;
853
- };
854
- showHyperlinkPopup: false | "info" | "editor";
855
- selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
856
- snapLines: readonly import("../snapping").SnapLine[];
857
- originSnapOffset: {
858
- x: number;
859
- y: number;
860
- } | null;
861
- objectsSnapModeEnabled: boolean;
862
- userToFollow: import("../types").UserToFollow | null;
863
- followedBy: Set<import("../types").SocketId>;
864
- isCropping: boolean;
865
- croppingElementId: ExcalidrawElement["id"] | null;
866
- searchMatches: Readonly<{
867
- focusedId: ExcalidrawElement["id"] | null;
868
- matches: readonly import("../types").SearchMatch[];
869
- }> | null;
870
- activeLockedId: string | null;
871
- lockedMultiSelections: {
872
- [groupId: string]: true;
873
- };
874
- bindMode: import("@excalidraw/element/types").BindMode;
875
- };
876
- captureUpdate: "EVENTUALLY";
877
- };
878
- export declare const zoomToFit: ({ canvasOffsets, targetElements, appState, fitToViewport, viewportZoomFactor, minZoom, maxZoom, }: {
879
- canvasOffsets?: Offsets;
880
- targetElements: readonly ExcalidrawElement[];
881
- appState: Readonly<AppState>;
882
- /** whether to fit content to viewport (beyond >100%) */
883
- fitToViewport: boolean;
884
- /** zoom content to cover X of the viewport, when fitToViewport=true */
885
- viewportZoomFactor?: number;
886
- minZoom?: number;
887
- maxZoom?: number;
888
- }) => {
889
- appState: {
890
- scrollX: number;
891
- scrollY: number;
892
- zoom: {
893
- value: import("../types").NormalizedZoomValue;
894
- };
895
- contextMenu: {
896
- items: import("../components/ContextMenu").ContextMenuItems;
897
- top: number;
898
- left: number;
899
- } | null;
900
- showWelcomeScreen: boolean;
901
- isLoading: boolean;
902
- errorMessage: React.ReactNode;
903
- activeEmbeddable: {
904
- element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
905
- state: "hover" | "active";
906
- } | null;
907
- newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
908
- resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
909
- multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
910
- selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
911
- isBindingEnabled: boolean;
912
- boxSelectionMode: import("../types").BoxSelectionMode;
913
- bindingPreference: "enabled" | "disabled";
914
- isMidpointSnappingEnabled: boolean;
915
- suggestedBinding: {
916
- element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
917
- midPoint?: import("@excalidraw/math").GlobalPoint;
918
- } | null;
919
- frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
920
- frameRendering: {
921
- enabled: boolean;
922
- name: boolean;
923
- outline: boolean;
924
- clip: boolean;
925
- };
926
- editingFrame: string | null;
927
- elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
928
- editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
929
- activeTool: {
930
- lastActiveTool: import("../types").ActiveTool | null;
931
- locked: boolean;
932
- fromSelection: boolean;
933
- } & import("../types").ActiveTool;
934
- preferredSelectionTool: {
935
- type: "selection" | "lasso";
936
- initialized: boolean;
937
- };
938
- penMode: boolean;
939
- penDetected: boolean;
940
- exportBackground: boolean;
941
- exportEmbedScene: boolean;
942
- exportWithDarkMode: boolean;
943
- exportScale: number;
944
- currentItemStrokeColor: string;
945
- currentItemBackgroundColor: string;
946
- currentItemFillStyle: ExcalidrawElement["fillStyle"];
947
- currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
948
- currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
949
- currentItemRoughness: number;
950
- currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
951
- currentItemOpacity: number;
952
- currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
953
- currentItemFontSize: number;
954
- currentItemTextAlign: import("@excalidraw/element/types").TextAlign;
955
- currentItemStartArrowhead: import("@excalidraw/element/types").Arrowhead | null;
956
- currentItemEndArrowhead: import("@excalidraw/element/types").Arrowhead | null;
957
- currentHoveredFontFamily: import("@excalidraw/element/types").FontFamilyValues | null;
958
- currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
959
- currentItemArrowType: "sharp" | "round" | "elbow";
960
- viewBackgroundColor: string;
961
- cursorButton: "up" | "down";
962
- scrolledOutside: boolean;
963
- name: string | null;
964
- isResizing: boolean;
965
- isRotating: boolean;
966
- openMenu: "canvas" | null;
967
- openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
968
- openSidebar: {
969
- name: import("../types").SidebarName;
970
- tab?: import("../types").SidebarTabName;
971
- } | null;
972
- openDialog: null | {
973
- name: "imageExport" | "help" | "jsonExport";
974
- } | {
975
- name: "ttd";
976
- tab: "text-to-diagram" | "mermaid";
977
- } | {
978
- name: "commandPalette";
979
- } | {
980
- name: "settings";
981
- } | {
982
- name: "elementLinkSelector";
983
- sourceElementId: ExcalidrawElement["id"];
984
- } | {
985
- name: "charts";
986
- data: import("../charts").Spreadsheet;
987
- rawText: string;
988
- };
989
- defaultSidebarDockedPreference: boolean;
990
- lastPointerDownWith: import("@excalidraw/element/types").PointerType;
991
- selectedElementIds: Readonly<{
992
- [id: string]: true;
993
- }>;
994
- hoveredElementIds: Readonly<{
995
- [id: string]: true;
996
- }>;
997
- previousSelectedElementIds: {
998
- [id: string]: true;
999
- };
1000
- selectedElementsAreBeingDragged: boolean;
1001
- shouldCacheIgnoreZoom: boolean;
1002
- toast: {
1003
- message: React.ReactNode;
1004
- closable?: boolean;
1005
- duration?: number;
1006
- } | null;
1007
- zenModeEnabled: boolean;
1008
- theme: import("@excalidraw/element/types").Theme;
1009
- gridSize: number;
1010
- gridStep: number;
1011
- gridModeEnabled: boolean;
1012
- viewModeEnabled: boolean;
1013
- selectedGroupIds: {
1014
- [groupId: string]: boolean;
1015
- };
1016
- editingGroupId: import("@excalidraw/element/types").GroupId | null;
1017
- width: number;
1018
- height: number;
1019
- offsetTop: number;
1020
- offsetLeft: number;
1021
- fileHandle: FileSystemFileHandle | null;
1022
- collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
1023
- stats: {
1024
- open: boolean;
1025
- panels: number;
1026
- };
1027
- showHyperlinkPopup: false | "info" | "editor";
1028
- selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
1029
- snapLines: readonly import("../snapping").SnapLine[];
1030
- originSnapOffset: {
1031
- x: number;
1032
- y: number;
1033
- } | null;
1034
- objectsSnapModeEnabled: boolean;
1035
- userToFollow: import("../types").UserToFollow | null;
1036
- followedBy: Set<import("../types").SocketId>;
1037
- isCropping: boolean;
1038
- croppingElementId: ExcalidrawElement["id"] | null;
1039
- searchMatches: Readonly<{
1040
- focusedId: ExcalidrawElement["id"] | null;
1041
- matches: readonly import("../types").SearchMatch[];
1042
- }> | null;
1043
- activeLockedId: string | null;
1044
- lockedMultiSelections: {
1045
- [groupId: string]: true;
1046
- };
1047
- bindMode: import("@excalidraw/element/types").BindMode;
1048
- };
1049
- captureUpdate: "EVENTUALLY";
1050
- };
1051
735
  export declare const actionZoomToFitSelectionInViewport: {
1052
736
  name: "zoomToFitSelectionInViewport";
1053
737
  label: string;
1054
738
  icon: import("react/jsx-runtime").JSX.Element;
739
+ viewMode: true;
740
+ navigation: true;
1055
741
  trackEvent: {
1056
742
  category: "canvas";
1057
743
  };
744
+ predicate: (elements: readonly import("@excalidraw/element/types").ExcalidrawElement[], appState: AppState, appProps: import("../types").ExcalidrawProps, app: import("../types").AppClassProperties) => boolean;
1058
745
  perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: unknown, app: import("../types").AppClassProperties) => {
1059
746
  appState: {
747
+ zoom: import("../types").Zoom;
1060
748
  scrollX: number;
1061
749
  scrollY: number;
1062
- zoom: {
1063
- value: import("../types").NormalizedZoomValue;
1064
- };
1065
750
  contextMenu: {
1066
751
  items: import("../components/ContextMenu").ContextMenuItems;
1067
752
  top: number;
@@ -1086,6 +771,10 @@ export declare const actionZoomToFitSelectionInViewport: {
1086
771
  element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
1087
772
  midPoint?: import("@excalidraw/math").GlobalPoint;
1088
773
  } | null;
774
+ hoveredArrowTextAnchor: {
775
+ elementId: import("@excalidraw/element/types").ExcalidrawArrowElement["id"];
776
+ anchor: "start" | "end" | "label";
777
+ } | null;
1089
778
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
1090
779
  frameRendering: {
1091
780
  enabled: boolean;
@@ -1093,8 +782,8 @@ export declare const actionZoomToFitSelectionInViewport: {
1093
782
  outline: boolean;
1094
783
  clip: boolean;
1095
784
  };
1096
- editingFrame: string | null;
1097
- elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
785
+ editingFrame: import("@excalidraw/element/types").ExcalidrawFrameLikeElement["id"] | null;
786
+ elementsToHighlight: readonly import("@excalidraw/element/types").NonDeletedExcalidrawElement[] | null;
1098
787
  editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
1099
788
  activeTool: {
1100
789
  lastActiveTool: import("../types").ActiveTool | null;
@@ -1113,9 +802,9 @@ export declare const actionZoomToFitSelectionInViewport: {
1113
802
  exportScale: number;
1114
803
  currentItemStrokeColor: string;
1115
804
  currentItemBackgroundColor: string;
1116
- currentItemFillStyle: ExcalidrawElement["fillStyle"];
805
+ currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
1117
806
  currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
1118
- currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
807
+ currentItemStrokeStyle: import("@excalidraw/element/types").ExcalidrawElement["strokeStyle"];
1119
808
  currentItemRoughness: number;
1120
809
  currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
1121
810
  currentItemOpacity: number;
@@ -1128,6 +817,7 @@ export declare const actionZoomToFitSelectionInViewport: {
1128
817
  currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
1129
818
  currentItemArrowType: "sharp" | "round" | "elbow";
1130
819
  viewBackgroundColor: string;
820
+ scrollConstraints: import("../types").ScrollConstraints | null;
1131
821
  cursorButton: "up" | "down";
1132
822
  scrolledOutside: boolean;
1133
823
  name: string | null;
@@ -1150,7 +840,7 @@ export declare const actionZoomToFitSelectionInViewport: {
1150
840
  name: "settings";
1151
841
  } | {
1152
842
  name: "elementLinkSelector";
1153
- sourceElementId: ExcalidrawElement["id"];
843
+ sourceElementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
1154
844
  } | {
1155
845
  name: "charts";
1156
846
  data: import("../charts").Spreadsheet;
@@ -1202,12 +892,10 @@ export declare const actionZoomToFitSelectionInViewport: {
1202
892
  y: number;
1203
893
  } | null;
1204
894
  objectsSnapModeEnabled: boolean;
1205
- userToFollow: import("../types").UserToFollow | null;
1206
- followedBy: Set<import("../types").SocketId>;
1207
895
  isCropping: boolean;
1208
- croppingElementId: ExcalidrawElement["id"] | null;
896
+ croppingElementId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
1209
897
  searchMatches: Readonly<{
1210
- focusedId: ExcalidrawElement["id"] | null;
898
+ focusedId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
1211
899
  matches: readonly import("../types").SearchMatch[];
1212
900
  }> | null;
1213
901
  activeLockedId: string | null;
@@ -1215,6 +903,11 @@ export declare const actionZoomToFitSelectionInViewport: {
1215
903
  [groupId: string]: true;
1216
904
  };
1217
905
  bindMode: import("@excalidraw/element/types").BindMode;
906
+ colorTopPicks: {
907
+ elementStroke: readonly string[] | null;
908
+ elementBackground: readonly string[] | null;
909
+ bucketFill: readonly string[] | null;
910
+ };
1218
911
  };
1219
912
  captureUpdate: "EVENTUALLY";
1220
913
  };
@@ -1226,16 +919,17 @@ export declare const actionZoomToFitSelection: {
1226
919
  name: "zoomToFitSelection";
1227
920
  label: string;
1228
921
  icon: import("react/jsx-runtime").JSX.Element;
922
+ viewMode: true;
923
+ navigation: true;
1229
924
  trackEvent: {
1230
925
  category: "canvas";
1231
926
  };
927
+ predicate: (elements: readonly import("@excalidraw/element/types").ExcalidrawElement[], appState: AppState, appProps: import("../types").ExcalidrawProps, app: import("../types").AppClassProperties) => boolean;
1232
928
  perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: unknown, app: import("../types").AppClassProperties) => {
1233
929
  appState: {
930
+ zoom: import("../types").Zoom;
1234
931
  scrollX: number;
1235
932
  scrollY: number;
1236
- zoom: {
1237
- value: import("../types").NormalizedZoomValue;
1238
- };
1239
933
  contextMenu: {
1240
934
  items: import("../components/ContextMenu").ContextMenuItems;
1241
935
  top: number;
@@ -1260,6 +954,10 @@ export declare const actionZoomToFitSelection: {
1260
954
  element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
1261
955
  midPoint?: import("@excalidraw/math").GlobalPoint;
1262
956
  } | null;
957
+ hoveredArrowTextAnchor: {
958
+ elementId: import("@excalidraw/element/types").ExcalidrawArrowElement["id"];
959
+ anchor: "start" | "end" | "label";
960
+ } | null;
1263
961
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
1264
962
  frameRendering: {
1265
963
  enabled: boolean;
@@ -1267,8 +965,8 @@ export declare const actionZoomToFitSelection: {
1267
965
  outline: boolean;
1268
966
  clip: boolean;
1269
967
  };
1270
- editingFrame: string | null;
1271
- elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
968
+ editingFrame: import("@excalidraw/element/types").ExcalidrawFrameLikeElement["id"] | null;
969
+ elementsToHighlight: readonly import("@excalidraw/element/types").NonDeletedExcalidrawElement[] | null;
1272
970
  editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
1273
971
  activeTool: {
1274
972
  lastActiveTool: import("../types").ActiveTool | null;
@@ -1287,9 +985,9 @@ export declare const actionZoomToFitSelection: {
1287
985
  exportScale: number;
1288
986
  currentItemStrokeColor: string;
1289
987
  currentItemBackgroundColor: string;
1290
- currentItemFillStyle: ExcalidrawElement["fillStyle"];
988
+ currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
1291
989
  currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
1292
- currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
990
+ currentItemStrokeStyle: import("@excalidraw/element/types").ExcalidrawElement["strokeStyle"];
1293
991
  currentItemRoughness: number;
1294
992
  currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
1295
993
  currentItemOpacity: number;
@@ -1302,6 +1000,7 @@ export declare const actionZoomToFitSelection: {
1302
1000
  currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
1303
1001
  currentItemArrowType: "sharp" | "round" | "elbow";
1304
1002
  viewBackgroundColor: string;
1003
+ scrollConstraints: import("../types").ScrollConstraints | null;
1305
1004
  cursorButton: "up" | "down";
1306
1005
  scrolledOutside: boolean;
1307
1006
  name: string | null;
@@ -1324,7 +1023,7 @@ export declare const actionZoomToFitSelection: {
1324
1023
  name: "settings";
1325
1024
  } | {
1326
1025
  name: "elementLinkSelector";
1327
- sourceElementId: ExcalidrawElement["id"];
1026
+ sourceElementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
1328
1027
  } | {
1329
1028
  name: "charts";
1330
1029
  data: import("../charts").Spreadsheet;
@@ -1376,12 +1075,10 @@ export declare const actionZoomToFitSelection: {
1376
1075
  y: number;
1377
1076
  } | null;
1378
1077
  objectsSnapModeEnabled: boolean;
1379
- userToFollow: import("../types").UserToFollow | null;
1380
- followedBy: Set<import("../types").SocketId>;
1381
1078
  isCropping: boolean;
1382
- croppingElementId: ExcalidrawElement["id"] | null;
1079
+ croppingElementId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
1383
1080
  searchMatches: Readonly<{
1384
- focusedId: ExcalidrawElement["id"] | null;
1081
+ focusedId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
1385
1082
  matches: readonly import("../types").SearchMatch[];
1386
1083
  }> | null;
1387
1084
  activeLockedId: string | null;
@@ -1389,6 +1086,11 @@ export declare const actionZoomToFitSelection: {
1389
1086
  [groupId: string]: true;
1390
1087
  };
1391
1088
  bindMode: import("@excalidraw/element/types").BindMode;
1089
+ colorTopPicks: {
1090
+ elementStroke: readonly string[] | null;
1091
+ elementBackground: readonly string[] | null;
1092
+ bucketFill: readonly string[] | null;
1093
+ };
1392
1094
  };
1393
1095
  captureUpdate: "EVENTUALLY";
1394
1096
  };
@@ -1401,16 +1103,16 @@ export declare const actionZoomToFit: {
1401
1103
  label: string;
1402
1104
  icon: import("react/jsx-runtime").JSX.Element;
1403
1105
  viewMode: true;
1106
+ navigation: true;
1404
1107
  trackEvent: {
1405
1108
  category: "canvas";
1406
1109
  };
1110
+ predicate: (elements: readonly import("@excalidraw/element/types").ExcalidrawElement[], appState: AppState, appProps: import("../types").ExcalidrawProps, app: import("../types").AppClassProperties) => boolean;
1407
1111
  perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: unknown, app: import("../types").AppClassProperties) => {
1408
1112
  appState: {
1113
+ zoom: import("../types").Zoom;
1409
1114
  scrollX: number;
1410
1115
  scrollY: number;
1411
- zoom: {
1412
- value: import("../types").NormalizedZoomValue;
1413
- };
1414
1116
  contextMenu: {
1415
1117
  items: import("../components/ContextMenu").ContextMenuItems;
1416
1118
  top: number;
@@ -1435,6 +1137,10 @@ export declare const actionZoomToFit: {
1435
1137
  element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
1436
1138
  midPoint?: import("@excalidraw/math").GlobalPoint;
1437
1139
  } | null;
1140
+ hoveredArrowTextAnchor: {
1141
+ elementId: import("@excalidraw/element/types").ExcalidrawArrowElement["id"];
1142
+ anchor: "start" | "end" | "label";
1143
+ } | null;
1438
1144
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
1439
1145
  frameRendering: {
1440
1146
  enabled: boolean;
@@ -1442,8 +1148,8 @@ export declare const actionZoomToFit: {
1442
1148
  outline: boolean;
1443
1149
  clip: boolean;
1444
1150
  };
1445
- editingFrame: string | null;
1446
- elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
1151
+ editingFrame: import("@excalidraw/element/types").ExcalidrawFrameLikeElement["id"] | null;
1152
+ elementsToHighlight: readonly import("@excalidraw/element/types").NonDeletedExcalidrawElement[] | null;
1447
1153
  editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
1448
1154
  activeTool: {
1449
1155
  lastActiveTool: import("../types").ActiveTool | null;
@@ -1462,9 +1168,9 @@ export declare const actionZoomToFit: {
1462
1168
  exportScale: number;
1463
1169
  currentItemStrokeColor: string;
1464
1170
  currentItemBackgroundColor: string;
1465
- currentItemFillStyle: ExcalidrawElement["fillStyle"];
1171
+ currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
1466
1172
  currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
1467
- currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
1173
+ currentItemStrokeStyle: import("@excalidraw/element/types").ExcalidrawElement["strokeStyle"];
1468
1174
  currentItemRoughness: number;
1469
1175
  currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
1470
1176
  currentItemOpacity: number;
@@ -1477,6 +1183,7 @@ export declare const actionZoomToFit: {
1477
1183
  currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
1478
1184
  currentItemArrowType: "sharp" | "round" | "elbow";
1479
1185
  viewBackgroundColor: string;
1186
+ scrollConstraints: import("../types").ScrollConstraints | null;
1480
1187
  cursorButton: "up" | "down";
1481
1188
  scrolledOutside: boolean;
1482
1189
  name: string | null;
@@ -1499,7 +1206,7 @@ export declare const actionZoomToFit: {
1499
1206
  name: "settings";
1500
1207
  } | {
1501
1208
  name: "elementLinkSelector";
1502
- sourceElementId: ExcalidrawElement["id"];
1209
+ sourceElementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
1503
1210
  } | {
1504
1211
  name: "charts";
1505
1212
  data: import("../charts").Spreadsheet;
@@ -1551,12 +1258,10 @@ export declare const actionZoomToFit: {
1551
1258
  y: number;
1552
1259
  } | null;
1553
1260
  objectsSnapModeEnabled: boolean;
1554
- userToFollow: import("../types").UserToFollow | null;
1555
- followedBy: Set<import("../types").SocketId>;
1556
1261
  isCropping: boolean;
1557
- croppingElementId: ExcalidrawElement["id"] | null;
1262
+ croppingElementId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
1558
1263
  searchMatches: Readonly<{
1559
- focusedId: ExcalidrawElement["id"] | null;
1264
+ focusedId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
1560
1265
  matches: readonly import("../types").SearchMatch[];
1561
1266
  }> | null;
1562
1267
  activeLockedId: string | null;
@@ -1564,6 +1269,11 @@ export declare const actionZoomToFit: {
1564
1269
  [groupId: string]: true;
1565
1270
  };
1566
1271
  bindMode: import("@excalidraw/element/types").BindMode;
1272
+ colorTopPicks: {
1273
+ elementStroke: readonly string[] | null;
1274
+ elementBackground: readonly string[] | null;
1275
+ bucketFill: readonly string[] | null;
1276
+ };
1567
1277
  };
1568
1278
  captureUpdate: "EVENTUALLY";
1569
1279
  };
@@ -1572,500 +1282,5 @@ export declare const actionZoomToFit: {
1572
1282
  keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
1573
1283
  };
1574
1284
  export declare const actionToggleTheme: import("./types").Action<import("@excalidraw/element/types").Theme> & {
1575
- keyTest?: ((event: React.KeyboardEvent | KeyboardEvent, appState: AppState, elements: readonly ExcalidrawElement[], app: import("../types").AppClassProperties) => boolean) | undefined;
1576
- };
1577
- export declare const actionToggleEraserTool: {
1578
- name: "toggleEraserTool";
1579
- label: string;
1580
- trackEvent: {
1581
- category: "toolbar";
1582
- };
1583
- perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: unknown, app: import("../types").AppClassProperties) => {
1584
- appState: {
1585
- selectedElementIds: {};
1586
- selectedGroupIds: {};
1587
- activeEmbeddable: null;
1588
- activeTool: {
1589
- lastActiveTool: import("../types").ActiveTool | null;
1590
- locked: boolean;
1591
- fromSelection: boolean;
1592
- } & import("../types").ActiveTool;
1593
- contextMenu: {
1594
- items: import("../components/ContextMenu").ContextMenuItems;
1595
- top: number;
1596
- left: number;
1597
- } | null;
1598
- showWelcomeScreen: boolean;
1599
- isLoading: boolean;
1600
- errorMessage: React.ReactNode;
1601
- newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
1602
- resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
1603
- multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
1604
- selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
1605
- isBindingEnabled: boolean;
1606
- boxSelectionMode: import("../types").BoxSelectionMode;
1607
- bindingPreference: "enabled" | "disabled";
1608
- isMidpointSnappingEnabled: boolean;
1609
- suggestedBinding: {
1610
- element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
1611
- midPoint?: import("@excalidraw/math").GlobalPoint;
1612
- } | null;
1613
- frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
1614
- frameRendering: {
1615
- enabled: boolean;
1616
- name: boolean;
1617
- outline: boolean;
1618
- clip: boolean;
1619
- };
1620
- editingFrame: string | null;
1621
- elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
1622
- editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
1623
- preferredSelectionTool: {
1624
- type: "selection" | "lasso";
1625
- initialized: boolean;
1626
- };
1627
- penMode: boolean;
1628
- penDetected: boolean;
1629
- exportBackground: boolean;
1630
- exportEmbedScene: boolean;
1631
- exportWithDarkMode: boolean;
1632
- exportScale: number;
1633
- currentItemStrokeColor: string;
1634
- currentItemBackgroundColor: string;
1635
- currentItemFillStyle: ExcalidrawElement["fillStyle"];
1636
- currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
1637
- currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
1638
- currentItemRoughness: number;
1639
- currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
1640
- currentItemOpacity: number;
1641
- currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
1642
- currentItemFontSize: number;
1643
- currentItemTextAlign: import("@excalidraw/element/types").TextAlign;
1644
- currentItemStartArrowhead: import("@excalidraw/element/types").Arrowhead | null;
1645
- currentItemEndArrowhead: import("@excalidraw/element/types").Arrowhead | null;
1646
- currentHoveredFontFamily: import("@excalidraw/element/types").FontFamilyValues | null;
1647
- currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
1648
- currentItemArrowType: "sharp" | "round" | "elbow";
1649
- viewBackgroundColor: string;
1650
- scrollX: number;
1651
- scrollY: number;
1652
- cursorButton: "up" | "down";
1653
- scrolledOutside: boolean;
1654
- name: string | null;
1655
- isResizing: boolean;
1656
- isRotating: boolean;
1657
- zoom: import("../types").Zoom;
1658
- openMenu: "canvas" | null;
1659
- openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
1660
- openSidebar: {
1661
- name: import("../types").SidebarName;
1662
- tab?: import("../types").SidebarTabName;
1663
- } | null;
1664
- openDialog: null | {
1665
- name: "imageExport" | "help" | "jsonExport";
1666
- } | {
1667
- name: "ttd";
1668
- tab: "text-to-diagram" | "mermaid";
1669
- } | {
1670
- name: "commandPalette";
1671
- } | {
1672
- name: "settings";
1673
- } | {
1674
- name: "elementLinkSelector";
1675
- sourceElementId: ExcalidrawElement["id"];
1676
- } | {
1677
- name: "charts";
1678
- data: import("../charts").Spreadsheet;
1679
- rawText: string;
1680
- };
1681
- defaultSidebarDockedPreference: boolean;
1682
- lastPointerDownWith: import("@excalidraw/element/types").PointerType;
1683
- hoveredElementIds: Readonly<{
1684
- [id: string]: true;
1685
- }>;
1686
- previousSelectedElementIds: {
1687
- [id: string]: true;
1688
- };
1689
- selectedElementsAreBeingDragged: boolean;
1690
- shouldCacheIgnoreZoom: boolean;
1691
- toast: {
1692
- message: React.ReactNode;
1693
- closable?: boolean;
1694
- duration?: number;
1695
- } | null;
1696
- zenModeEnabled: boolean;
1697
- theme: import("@excalidraw/element/types").Theme;
1698
- gridSize: number;
1699
- gridStep: number;
1700
- gridModeEnabled: boolean;
1701
- viewModeEnabled: boolean;
1702
- editingGroupId: import("@excalidraw/element/types").GroupId | null;
1703
- width: number;
1704
- height: number;
1705
- offsetTop: number;
1706
- offsetLeft: number;
1707
- fileHandle: FileSystemFileHandle | null;
1708
- collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
1709
- stats: {
1710
- open: boolean;
1711
- panels: number;
1712
- };
1713
- showHyperlinkPopup: false | "info" | "editor";
1714
- selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
1715
- snapLines: readonly import("../snapping").SnapLine[];
1716
- originSnapOffset: {
1717
- x: number;
1718
- y: number;
1719
- } | null;
1720
- objectsSnapModeEnabled: boolean;
1721
- userToFollow: import("../types").UserToFollow | null;
1722
- followedBy: Set<import("../types").SocketId>;
1723
- isCropping: boolean;
1724
- croppingElementId: ExcalidrawElement["id"] | null;
1725
- searchMatches: Readonly<{
1726
- focusedId: ExcalidrawElement["id"] | null;
1727
- matches: readonly import("../types").SearchMatch[];
1728
- }> | null;
1729
- activeLockedId: string | null;
1730
- lockedMultiSelections: {
1731
- [groupId: string]: true;
1732
- };
1733
- bindMode: import("@excalidraw/element/types").BindMode;
1734
- };
1735
- captureUpdate: "IMMEDIATELY";
1736
- };
1737
- keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
1738
- } & {
1739
- keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
1740
- };
1741
- export declare const actionToggleLassoTool: {
1742
- name: "toggleLassoTool";
1743
- label: string;
1744
- icon: import("react/jsx-runtime").JSX.Element;
1745
- trackEvent: {
1746
- category: "toolbar";
1747
- };
1748
- predicate: (elements: readonly ExcalidrawElement[], appState: AppState, props: import("../types").ExcalidrawProps, app: import("../types").AppClassProperties) => boolean;
1749
- perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: unknown, app: import("../types").AppClassProperties) => {
1750
- appState: {
1751
- selectedElementIds: {};
1752
- selectedGroupIds: {};
1753
- activeEmbeddable: null;
1754
- activeTool: {
1755
- lastActiveTool: import("../types").ActiveTool | null;
1756
- locked: boolean;
1757
- fromSelection: boolean;
1758
- } & import("../types").ActiveTool;
1759
- contextMenu: {
1760
- items: import("../components/ContextMenu").ContextMenuItems;
1761
- top: number;
1762
- left: number;
1763
- } | null;
1764
- showWelcomeScreen: boolean;
1765
- isLoading: boolean;
1766
- errorMessage: React.ReactNode;
1767
- newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
1768
- resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
1769
- multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
1770
- selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
1771
- isBindingEnabled: boolean;
1772
- boxSelectionMode: import("../types").BoxSelectionMode;
1773
- bindingPreference: "enabled" | "disabled";
1774
- isMidpointSnappingEnabled: boolean;
1775
- suggestedBinding: {
1776
- element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
1777
- midPoint?: import("@excalidraw/math").GlobalPoint;
1778
- } | null;
1779
- frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
1780
- frameRendering: {
1781
- enabled: boolean;
1782
- name: boolean;
1783
- outline: boolean;
1784
- clip: boolean;
1785
- };
1786
- editingFrame: string | null;
1787
- elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
1788
- editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
1789
- preferredSelectionTool: {
1790
- type: "selection" | "lasso";
1791
- initialized: boolean;
1792
- };
1793
- penMode: boolean;
1794
- penDetected: boolean;
1795
- exportBackground: boolean;
1796
- exportEmbedScene: boolean;
1797
- exportWithDarkMode: boolean;
1798
- exportScale: number;
1799
- currentItemStrokeColor: string;
1800
- currentItemBackgroundColor: string;
1801
- currentItemFillStyle: ExcalidrawElement["fillStyle"];
1802
- currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
1803
- currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
1804
- currentItemRoughness: number;
1805
- currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
1806
- currentItemOpacity: number;
1807
- currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
1808
- currentItemFontSize: number;
1809
- currentItemTextAlign: import("@excalidraw/element/types").TextAlign;
1810
- currentItemStartArrowhead: import("@excalidraw/element/types").Arrowhead | null;
1811
- currentItemEndArrowhead: import("@excalidraw/element/types").Arrowhead | null;
1812
- currentHoveredFontFamily: import("@excalidraw/element/types").FontFamilyValues | null;
1813
- currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
1814
- currentItemArrowType: "sharp" | "round" | "elbow";
1815
- viewBackgroundColor: string;
1816
- scrollX: number;
1817
- scrollY: number;
1818
- cursorButton: "up" | "down";
1819
- scrolledOutside: boolean;
1820
- name: string | null;
1821
- isResizing: boolean;
1822
- isRotating: boolean;
1823
- zoom: import("../types").Zoom;
1824
- openMenu: "canvas" | null;
1825
- openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
1826
- openSidebar: {
1827
- name: import("../types").SidebarName;
1828
- tab?: import("../types").SidebarTabName;
1829
- } | null;
1830
- openDialog: null | {
1831
- name: "imageExport" | "help" | "jsonExport";
1832
- } | {
1833
- name: "ttd";
1834
- tab: "text-to-diagram" | "mermaid";
1835
- } | {
1836
- name: "commandPalette";
1837
- } | {
1838
- name: "settings";
1839
- } | {
1840
- name: "elementLinkSelector";
1841
- sourceElementId: ExcalidrawElement["id"];
1842
- } | {
1843
- name: "charts";
1844
- data: import("../charts").Spreadsheet;
1845
- rawText: string;
1846
- };
1847
- defaultSidebarDockedPreference: boolean;
1848
- lastPointerDownWith: import("@excalidraw/element/types").PointerType;
1849
- hoveredElementIds: Readonly<{
1850
- [id: string]: true;
1851
- }>;
1852
- previousSelectedElementIds: {
1853
- [id: string]: true;
1854
- };
1855
- selectedElementsAreBeingDragged: boolean;
1856
- shouldCacheIgnoreZoom: boolean;
1857
- toast: {
1858
- message: React.ReactNode;
1859
- closable?: boolean;
1860
- duration?: number;
1861
- } | null;
1862
- zenModeEnabled: boolean;
1863
- theme: import("@excalidraw/element/types").Theme;
1864
- gridSize: number;
1865
- gridStep: number;
1866
- gridModeEnabled: boolean;
1867
- viewModeEnabled: boolean;
1868
- editingGroupId: import("@excalidraw/element/types").GroupId | null;
1869
- width: number;
1870
- height: number;
1871
- offsetTop: number;
1872
- offsetLeft: number;
1873
- fileHandle: FileSystemFileHandle | null;
1874
- collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
1875
- stats: {
1876
- open: boolean;
1877
- panels: number;
1878
- };
1879
- showHyperlinkPopup: false | "info" | "editor";
1880
- selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
1881
- snapLines: readonly import("../snapping").SnapLine[];
1882
- originSnapOffset: {
1883
- x: number;
1884
- y: number;
1885
- } | null;
1886
- objectsSnapModeEnabled: boolean;
1887
- userToFollow: import("../types").UserToFollow | null;
1888
- followedBy: Set<import("../types").SocketId>;
1889
- isCropping: boolean;
1890
- croppingElementId: ExcalidrawElement["id"] | null;
1891
- searchMatches: Readonly<{
1892
- focusedId: ExcalidrawElement["id"] | null;
1893
- matches: readonly import("../types").SearchMatch[];
1894
- }> | null;
1895
- activeLockedId: string | null;
1896
- lockedMultiSelections: {
1897
- [groupId: string]: true;
1898
- };
1899
- bindMode: import("@excalidraw/element/types").BindMode;
1900
- };
1901
- captureUpdate: "NEVER";
1902
- };
1903
- } & {
1904
- keyTest?: undefined;
1905
- };
1906
- export declare const actionToggleHandTool: {
1907
- name: "toggleHandTool";
1908
- label: string;
1909
- trackEvent: {
1910
- category: "toolbar";
1911
- };
1912
- icon: import("react/jsx-runtime").JSX.Element;
1913
- viewMode: false;
1914
- perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: unknown, app: import("../types").AppClassProperties) => {
1915
- appState: {
1916
- selectedElementIds: {};
1917
- selectedGroupIds: {};
1918
- activeEmbeddable: null;
1919
- activeTool: {
1920
- lastActiveTool: import("../types").ActiveTool | null;
1921
- locked: boolean;
1922
- fromSelection: boolean;
1923
- } & import("../types").ActiveTool;
1924
- contextMenu: {
1925
- items: import("../components/ContextMenu").ContextMenuItems;
1926
- top: number;
1927
- left: number;
1928
- } | null;
1929
- showWelcomeScreen: boolean;
1930
- isLoading: boolean;
1931
- errorMessage: React.ReactNode;
1932
- newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
1933
- resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
1934
- multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
1935
- selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
1936
- isBindingEnabled: boolean;
1937
- boxSelectionMode: import("../types").BoxSelectionMode;
1938
- bindingPreference: "enabled" | "disabled";
1939
- isMidpointSnappingEnabled: boolean;
1940
- suggestedBinding: {
1941
- element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
1942
- midPoint?: import("@excalidraw/math").GlobalPoint;
1943
- } | null;
1944
- frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
1945
- frameRendering: {
1946
- enabled: boolean;
1947
- name: boolean;
1948
- outline: boolean;
1949
- clip: boolean;
1950
- };
1951
- editingFrame: string | null;
1952
- elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
1953
- editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
1954
- preferredSelectionTool: {
1955
- type: "selection" | "lasso";
1956
- initialized: boolean;
1957
- };
1958
- penMode: boolean;
1959
- penDetected: boolean;
1960
- exportBackground: boolean;
1961
- exportEmbedScene: boolean;
1962
- exportWithDarkMode: boolean;
1963
- exportScale: number;
1964
- currentItemStrokeColor: string;
1965
- currentItemBackgroundColor: string;
1966
- currentItemFillStyle: ExcalidrawElement["fillStyle"];
1967
- currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
1968
- currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
1969
- currentItemRoughness: number;
1970
- currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
1971
- currentItemOpacity: number;
1972
- currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
1973
- currentItemFontSize: number;
1974
- currentItemTextAlign: import("@excalidraw/element/types").TextAlign;
1975
- currentItemStartArrowhead: import("@excalidraw/element/types").Arrowhead | null;
1976
- currentItemEndArrowhead: import("@excalidraw/element/types").Arrowhead | null;
1977
- currentHoveredFontFamily: import("@excalidraw/element/types").FontFamilyValues | null;
1978
- currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
1979
- currentItemArrowType: "sharp" | "round" | "elbow";
1980
- viewBackgroundColor: string;
1981
- scrollX: number;
1982
- scrollY: number;
1983
- cursorButton: "up" | "down";
1984
- scrolledOutside: boolean;
1985
- name: string | null;
1986
- isResizing: boolean;
1987
- isRotating: boolean;
1988
- zoom: import("../types").Zoom;
1989
- openMenu: "canvas" | null;
1990
- openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
1991
- openSidebar: {
1992
- name: import("../types").SidebarName;
1993
- tab?: import("../types").SidebarTabName;
1994
- } | null;
1995
- openDialog: null | {
1996
- name: "imageExport" | "help" | "jsonExport";
1997
- } | {
1998
- name: "ttd";
1999
- tab: "text-to-diagram" | "mermaid";
2000
- } | {
2001
- name: "commandPalette";
2002
- } | {
2003
- name: "settings";
2004
- } | {
2005
- name: "elementLinkSelector";
2006
- sourceElementId: ExcalidrawElement["id"];
2007
- } | {
2008
- name: "charts";
2009
- data: import("../charts").Spreadsheet;
2010
- rawText: string;
2011
- };
2012
- defaultSidebarDockedPreference: boolean;
2013
- lastPointerDownWith: import("@excalidraw/element/types").PointerType;
2014
- hoveredElementIds: Readonly<{
2015
- [id: string]: true;
2016
- }>;
2017
- previousSelectedElementIds: {
2018
- [id: string]: true;
2019
- };
2020
- selectedElementsAreBeingDragged: boolean;
2021
- shouldCacheIgnoreZoom: boolean;
2022
- toast: {
2023
- message: React.ReactNode;
2024
- closable?: boolean;
2025
- duration?: number;
2026
- } | null;
2027
- zenModeEnabled: boolean;
2028
- theme: import("@excalidraw/element/types").Theme;
2029
- gridSize: number;
2030
- gridStep: number;
2031
- gridModeEnabled: boolean;
2032
- viewModeEnabled: boolean;
2033
- editingGroupId: import("@excalidraw/element/types").GroupId | null;
2034
- width: number;
2035
- height: number;
2036
- offsetTop: number;
2037
- offsetLeft: number;
2038
- fileHandle: FileSystemFileHandle | null;
2039
- collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
2040
- stats: {
2041
- open: boolean;
2042
- panels: number;
2043
- };
2044
- showHyperlinkPopup: false | "info" | "editor";
2045
- selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
2046
- snapLines: readonly import("../snapping").SnapLine[];
2047
- originSnapOffset: {
2048
- x: number;
2049
- y: number;
2050
- } | null;
2051
- objectsSnapModeEnabled: boolean;
2052
- userToFollow: import("../types").UserToFollow | null;
2053
- followedBy: Set<import("../types").SocketId>;
2054
- isCropping: boolean;
2055
- croppingElementId: ExcalidrawElement["id"] | null;
2056
- searchMatches: Readonly<{
2057
- focusedId: ExcalidrawElement["id"] | null;
2058
- matches: readonly import("../types").SearchMatch[];
2059
- }> | null;
2060
- activeLockedId: string | null;
2061
- lockedMultiSelections: {
2062
- [groupId: string]: true;
2063
- };
2064
- bindMode: import("@excalidraw/element/types").BindMode;
2065
- };
2066
- captureUpdate: "IMMEDIATELY";
2067
- };
2068
- keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
2069
- } & {
2070
- keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
1285
+ keyTest?: ((event: React.KeyboardEvent | KeyboardEvent, appState: AppState, elements: readonly import("@excalidraw/element/types").ExcalidrawElement[], app: import("../types").AppClassProperties) => boolean) | undefined;
2071
1286
  };