@excalidraw/common 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 +94 -79
  2. package/dist/dev/index.js.map +3 -3
  3. package/dist/prod/index.js +3 -3
  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 +29 -13
  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 +10 -5
  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 +34 -18
  127. package/dist/types/excalidraw/data/index.d.ts +4 -4
  128. package/dist/types/excalidraw/data/json.d.ts +23 -15
  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 +1 -1
  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
@@ -83,6 +83,11 @@ export declare const actionLoadScene: {
83
83
  elements: import("@excalidraw/element/types").OrderedExcalidrawElement[];
84
84
  appState: {
85
85
  viewModeEnabled: boolean;
86
+ activeTool: {
87
+ lastActiveTool: import("../types").ActiveTool | null;
88
+ locked: boolean;
89
+ fromSelection: boolean;
90
+ } & import("../types").ActiveTool;
86
91
  zenModeEnabled: boolean;
87
92
  gridModeEnabled: boolean;
88
93
  objectsSnapModeEnabled: boolean;
@@ -90,11 +95,6 @@ export declare const actionLoadScene: {
90
95
  name: string | null;
91
96
  currentItemArrowType: "sharp" | "round" | "elbow";
92
97
  gridSize: number;
93
- activeTool: {
94
- lastActiveTool: import("../types").ActiveTool | null;
95
- locked: boolean;
96
- fromSelection: boolean;
97
- } & import("../types").ActiveTool;
98
98
  contextMenu: {
99
99
  items: import("../components/ContextMenu").ContextMenuItems;
100
100
  top: number;
@@ -119,6 +119,10 @@ export declare const actionLoadScene: {
119
119
  element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
120
120
  midPoint?: import("@excalidraw/math").GlobalPoint;
121
121
  } | null;
122
+ hoveredArrowTextAnchor: {
123
+ elementId: import("@excalidraw/element/types").ExcalidrawArrowElement["id"];
124
+ anchor: "start" | "end" | "label";
125
+ } | null;
122
126
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
123
127
  frameRendering: {
124
128
  enabled: boolean;
@@ -126,8 +130,8 @@ export declare const actionLoadScene: {
126
130
  outline: boolean;
127
131
  clip: boolean;
128
132
  };
129
- editingFrame: string | null;
130
- elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
133
+ editingFrame: import("@excalidraw/element/types").ExcalidrawFrameLikeElement["id"] | null;
134
+ elementsToHighlight: readonly import("@excalidraw/element/types").NonDeletedExcalidrawElement[] | null;
131
135
  editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
132
136
  preferredSelectionTool: {
133
137
  type: "selection" | "lasso";
@@ -157,6 +161,7 @@ export declare const actionLoadScene: {
157
161
  viewBackgroundColor: string;
158
162
  scrollX: number;
159
163
  scrollY: number;
164
+ scrollConstraints: import("../types").ScrollConstraints | null;
160
165
  cursorButton: "up" | "down";
161
166
  scrolledOutside: boolean;
162
167
  isResizing: boolean;
@@ -221,8 +226,6 @@ export declare const actionLoadScene: {
221
226
  x: number;
222
227
  y: number;
223
228
  } | null;
224
- userToFollow: import("../types").UserToFollow | null;
225
- followedBy: Set<import("../types").SocketId>;
226
229
  isCropping: boolean;
227
230
  croppingElementId: ExcalidrawElement["id"] | null;
228
231
  searchMatches: Readonly<{
@@ -234,6 +237,11 @@ export declare const actionLoadScene: {
234
237
  [groupId: string]: true;
235
238
  };
236
239
  bindMode: import("@excalidraw/element/types").BindMode;
240
+ colorTopPicks: {
241
+ elementStroke: readonly string[] | null;
242
+ elementBackground: readonly string[] | null;
243
+ bucketFill: readonly string[] | null;
244
+ };
237
245
  };
238
246
  files: BinaryFiles;
239
247
  captureUpdate: "IMMEDIATELY";
@@ -264,6 +272,10 @@ export declare const actionLoadScene: {
264
272
  element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
265
273
  midPoint?: import("@excalidraw/math").GlobalPoint;
266
274
  } | null;
275
+ hoveredArrowTextAnchor: {
276
+ elementId: import("@excalidraw/element/types").ExcalidrawArrowElement["id"];
277
+ anchor: "start" | "end" | "label";
278
+ } | null;
267
279
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
268
280
  frameRendering: {
269
281
  enabled: boolean;
@@ -271,8 +283,8 @@ export declare const actionLoadScene: {
271
283
  outline: boolean;
272
284
  clip: boolean;
273
285
  };
274
- editingFrame: string | null;
275
- elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
286
+ editingFrame: import("@excalidraw/element/types").ExcalidrawFrameLikeElement["id"] | null;
287
+ elementsToHighlight: readonly import("@excalidraw/element/types").NonDeletedExcalidrawElement[] | null;
276
288
  editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
277
289
  activeTool: {
278
290
  lastActiveTool: import("../types").ActiveTool | null;
@@ -308,6 +320,7 @@ export declare const actionLoadScene: {
308
320
  viewBackgroundColor: string;
309
321
  scrollX: number;
310
322
  scrollY: number;
323
+ scrollConstraints: import("../types").ScrollConstraints | null;
311
324
  cursorButton: "up" | "down";
312
325
  scrolledOutside: boolean;
313
326
  name: string | null;
@@ -383,8 +396,6 @@ export declare const actionLoadScene: {
383
396
  y: number;
384
397
  } | null;
385
398
  objectsSnapModeEnabled: boolean;
386
- userToFollow: import("../types").UserToFollow | null;
387
- followedBy: Set<import("../types").SocketId>;
388
399
  isCropping: boolean;
389
400
  croppingElementId: ExcalidrawElement["id"] | null;
390
401
  searchMatches: Readonly<{
@@ -396,6 +407,11 @@ export declare const actionLoadScene: {
396
407
  [groupId: string]: true;
397
408
  };
398
409
  bindMode: import("@excalidraw/element/types").BindMode;
410
+ colorTopPicks: {
411
+ elementStroke: readonly string[] | null;
412
+ elementBackground: readonly string[] | null;
413
+ bucketFill: readonly string[] | null;
414
+ };
399
415
  };
400
416
  files: BinaryFiles;
401
417
  captureUpdate: "EVENTUALLY";
@@ -6,6 +6,7 @@ type FormData = {
6
6
  x: number;
7
7
  y: number;
8
8
  };
9
+ hitBoundText?: boolean;
9
10
  };
10
11
  export declare const actionFinalize: import("./types").Action<FormData> & {
11
12
  keyTest?: ((event: React.KeyboardEvent | KeyboardEvent, appState: AppState, elements: readonly ExcalidrawElement[], app: import("../types").AppClassProperties) => boolean) | undefined;
@@ -1,12 +1,12 @@
1
1
  import type { ExcalidrawElement } from "@excalidraw/element/types";
2
- import type { AppClassProperties, AppState } from "../types";
2
+ import type { AppClassProperties, UIAppState } from "../types";
3
3
  export declare const actionSelectAllElementsInFrame: {
4
4
  name: "selectAllElementsInFrame";
5
5
  label: string;
6
6
  trackEvent: {
7
7
  category: "canvas";
8
8
  };
9
- perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: unknown, app: AppClassProperties) => {
9
+ perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>, _: unknown, app: AppClassProperties) => {
10
10
  elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[];
11
11
  appState: {
12
12
  selectedElementIds: Record<string, true>;
@@ -34,6 +34,10 @@ export declare const actionSelectAllElementsInFrame: {
34
34
  element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
35
35
  midPoint?: import("@excalidraw/math").GlobalPoint;
36
36
  } | null;
37
+ hoveredArrowTextAnchor: {
38
+ elementId: import("@excalidraw/element/types").ExcalidrawArrowElement["id"];
39
+ anchor: "start" | "end" | "label";
40
+ } | null;
37
41
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
38
42
  frameRendering: {
39
43
  enabled: boolean;
@@ -41,8 +45,8 @@ export declare const actionSelectAllElementsInFrame: {
41
45
  outline: boolean;
42
46
  clip: boolean;
43
47
  };
44
- editingFrame: string | null;
45
- elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
48
+ editingFrame: import("@excalidraw/element/types").ExcalidrawFrameLikeElement["id"] | null;
49
+ elementsToHighlight: readonly import("@excalidraw/element/types").NonDeletedExcalidrawElement[] | null;
46
50
  editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
47
51
  activeTool: {
48
52
  lastActiveTool: import("../types").ActiveTool | null;
@@ -78,6 +82,7 @@ export declare const actionSelectAllElementsInFrame: {
78
82
  viewBackgroundColor: string;
79
83
  scrollX: number;
80
84
  scrollY: number;
85
+ scrollConstraints: import("../types").ScrollConstraints | null;
81
86
  cursorButton: "up" | "down";
82
87
  scrolledOutside: boolean;
83
88
  name: string | null;
@@ -150,8 +155,6 @@ export declare const actionSelectAllElementsInFrame: {
150
155
  y: number;
151
156
  } | null;
152
157
  objectsSnapModeEnabled: boolean;
153
- userToFollow: import("../types").UserToFollow | null;
154
- followedBy: Set<import("../types").SocketId>;
155
158
  isCropping: boolean;
156
159
  croppingElementId: ExcalidrawElement["id"] | null;
157
160
  searchMatches: Readonly<{
@@ -163,14 +166,19 @@ export declare const actionSelectAllElementsInFrame: {
163
166
  [groupId: string]: true;
164
167
  };
165
168
  bindMode: import("@excalidraw/element/types").BindMode;
169
+ colorTopPicks: {
170
+ elementStroke: readonly string[] | null;
171
+ elementBackground: readonly string[] | null;
172
+ bucketFill: readonly string[] | null;
173
+ };
166
174
  };
167
175
  captureUpdate: "IMMEDIATELY";
168
176
  } | {
169
177
  elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[];
170
- appState: Readonly<AppState>;
178
+ appState: Readonly<import("../types").AppState>;
171
179
  captureUpdate: "EVENTUALLY";
172
180
  };
173
- predicate: (elements: readonly ExcalidrawElement[], appState: AppState, _: import("../types").ExcalidrawProps, app: AppClassProperties) => boolean;
181
+ predicate: (elements: readonly ExcalidrawElement[], appState: import("../types").AppState, _: import("../types").ExcalidrawProps, app: AppClassProperties) => boolean;
174
182
  } & {
175
183
  keyTest?: undefined;
176
184
  };
@@ -180,7 +188,7 @@ export declare const actionRemoveAllElementsFromFrame: {
180
188
  trackEvent: {
181
189
  category: "history";
182
190
  };
183
- perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: unknown, app: AppClassProperties) => {
191
+ perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>, _: unknown, app: AppClassProperties) => {
184
192
  elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[];
185
193
  appState: {
186
194
  selectedElementIds: {
@@ -210,6 +218,10 @@ export declare const actionRemoveAllElementsFromFrame: {
210
218
  element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
211
219
  midPoint?: import("@excalidraw/math").GlobalPoint;
212
220
  } | null;
221
+ hoveredArrowTextAnchor: {
222
+ elementId: import("@excalidraw/element/types").ExcalidrawArrowElement["id"];
223
+ anchor: "start" | "end" | "label";
224
+ } | null;
213
225
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
214
226
  frameRendering: {
215
227
  enabled: boolean;
@@ -217,8 +229,8 @@ export declare const actionRemoveAllElementsFromFrame: {
217
229
  outline: boolean;
218
230
  clip: boolean;
219
231
  };
220
- editingFrame: string | null;
221
- elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
232
+ editingFrame: import("@excalidraw/element/types").ExcalidrawFrameLikeElement["id"] | null;
233
+ elementsToHighlight: readonly import("@excalidraw/element/types").NonDeletedExcalidrawElement[] | null;
222
234
  editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
223
235
  activeTool: {
224
236
  lastActiveTool: import("../types").ActiveTool | null;
@@ -254,6 +266,7 @@ export declare const actionRemoveAllElementsFromFrame: {
254
266
  viewBackgroundColor: string;
255
267
  scrollX: number;
256
268
  scrollY: number;
269
+ scrollConstraints: import("../types").ScrollConstraints | null;
257
270
  cursorButton: "up" | "down";
258
271
  scrolledOutside: boolean;
259
272
  name: string | null;
@@ -326,8 +339,6 @@ export declare const actionRemoveAllElementsFromFrame: {
326
339
  y: number;
327
340
  } | null;
328
341
  objectsSnapModeEnabled: boolean;
329
- userToFollow: import("../types").UserToFollow | null;
330
- followedBy: Set<import("../types").SocketId>;
331
342
  isCropping: boolean;
332
343
  croppingElementId: ExcalidrawElement["id"] | null;
333
344
  searchMatches: Readonly<{
@@ -339,14 +350,19 @@ export declare const actionRemoveAllElementsFromFrame: {
339
350
  [groupId: string]: true;
340
351
  };
341
352
  bindMode: import("@excalidraw/element/types").BindMode;
353
+ colorTopPicks: {
354
+ elementStroke: readonly string[] | null;
355
+ elementBackground: readonly string[] | null;
356
+ bucketFill: readonly string[] | null;
357
+ };
342
358
  };
343
359
  captureUpdate: "IMMEDIATELY";
344
360
  } | {
345
361
  elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[];
346
- appState: Readonly<AppState>;
362
+ appState: Readonly<import("../types").AppState>;
347
363
  captureUpdate: "EVENTUALLY";
348
364
  };
349
- predicate: (elements: readonly ExcalidrawElement[], appState: AppState, _: import("../types").ExcalidrawProps, app: AppClassProperties) => boolean;
365
+ predicate: (elements: readonly ExcalidrawElement[], appState: import("../types").AppState, _: import("../types").ExcalidrawProps, app: AppClassProperties) => boolean;
350
366
  } & {
351
367
  keyTest?: undefined;
352
368
  };
@@ -357,7 +373,7 @@ export declare const actionupdateFrameRendering: {
357
373
  trackEvent: {
358
374
  category: "canvas";
359
375
  };
360
- perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>) => {
376
+ perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>) => {
361
377
  elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[];
362
378
  appState: {
363
379
  frameRendering: {
@@ -390,9 +406,13 @@ export declare const actionupdateFrameRendering: {
390
406
  element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
391
407
  midPoint?: import("@excalidraw/math").GlobalPoint;
392
408
  } | null;
409
+ hoveredArrowTextAnchor: {
410
+ elementId: import("@excalidraw/element/types").ExcalidrawArrowElement["id"];
411
+ anchor: "start" | "end" | "label";
412
+ } | null;
393
413
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
394
- editingFrame: string | null;
395
- elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
414
+ editingFrame: import("@excalidraw/element/types").ExcalidrawFrameLikeElement["id"] | null;
415
+ elementsToHighlight: readonly import("@excalidraw/element/types").NonDeletedExcalidrawElement[] | null;
396
416
  editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
397
417
  activeTool: {
398
418
  lastActiveTool: import("../types").ActiveTool | null;
@@ -428,6 +448,7 @@ export declare const actionupdateFrameRendering: {
428
448
  viewBackgroundColor: string;
429
449
  scrollX: number;
430
450
  scrollY: number;
451
+ scrollConstraints: import("../types").ScrollConstraints | null;
431
452
  cursorButton: "up" | "down";
432
453
  scrolledOutside: boolean;
433
454
  name: string | null;
@@ -503,8 +524,6 @@ export declare const actionupdateFrameRendering: {
503
524
  y: number;
504
525
  } | null;
505
526
  objectsSnapModeEnabled: boolean;
506
- userToFollow: import("../types").UserToFollow | null;
507
- followedBy: Set<import("../types").SocketId>;
508
527
  isCropping: boolean;
509
528
  croppingElementId: ExcalidrawElement["id"] | null;
510
529
  searchMatches: Readonly<{
@@ -516,186 +535,17 @@ export declare const actionupdateFrameRendering: {
516
535
  [groupId: string]: true;
517
536
  };
518
537
  bindMode: import("@excalidraw/element/types").BindMode;
519
- };
520
- captureUpdate: "EVENTUALLY";
521
- };
522
- checked: (appState: AppState) => boolean;
523
- } & {
524
- keyTest?: undefined;
525
- };
526
- export declare const actionSetFrameAsActiveTool: {
527
- name: "setFrameAsActiveTool";
528
- label: string;
529
- trackEvent: {
530
- category: "toolbar";
531
- };
532
- icon: import("react/jsx-runtime").JSX.Element;
533
- viewMode: false;
534
- perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: unknown, app: AppClassProperties) => {
535
- elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[];
536
- appState: {
537
- activeTool: {
538
- lastActiveTool: import("../types").ActiveTool | null;
539
- locked: boolean;
540
- fromSelection: boolean;
541
- } & import("../types").ActiveTool;
542
- contextMenu: {
543
- items: import("../components/ContextMenu").ContextMenuItems;
544
- top: number;
545
- left: number;
546
- } | null;
547
- showWelcomeScreen: boolean;
548
- isLoading: boolean;
549
- errorMessage: React.ReactNode;
550
- activeEmbeddable: {
551
- element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
552
- state: "hover" | "active";
553
- } | null;
554
- newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
555
- resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
556
- multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
557
- selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
558
- isBindingEnabled: boolean;
559
- boxSelectionMode: import("../types").BoxSelectionMode;
560
- bindingPreference: "enabled" | "disabled";
561
- isMidpointSnappingEnabled: boolean;
562
- suggestedBinding: {
563
- element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
564
- midPoint?: import("@excalidraw/math").GlobalPoint;
565
- } | null;
566
- frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
567
- frameRendering: {
568
- enabled: boolean;
569
- name: boolean;
570
- outline: boolean;
571
- clip: boolean;
572
- };
573
- editingFrame: string | null;
574
- elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
575
- editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
576
- preferredSelectionTool: {
577
- type: "selection" | "lasso";
578
- initialized: boolean;
579
- };
580
- penMode: boolean;
581
- penDetected: boolean;
582
- exportBackground: boolean;
583
- exportEmbedScene: boolean;
584
- exportWithDarkMode: boolean;
585
- exportScale: number;
586
- currentItemStrokeColor: string;
587
- currentItemBackgroundColor: string;
588
- currentItemFillStyle: ExcalidrawElement["fillStyle"];
589
- currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
590
- currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
591
- currentItemRoughness: number;
592
- currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
593
- currentItemOpacity: number;
594
- currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
595
- currentItemFontSize: number;
596
- currentItemTextAlign: import("@excalidraw/element/types").TextAlign;
597
- currentItemStartArrowhead: import("@excalidraw/element/types").Arrowhead | null;
598
- currentItemEndArrowhead: import("@excalidraw/element/types").Arrowhead | null;
599
- currentHoveredFontFamily: import("@excalidraw/element/types").FontFamilyValues | null;
600
- currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
601
- currentItemArrowType: "sharp" | "round" | "elbow";
602
- viewBackgroundColor: string;
603
- scrollX: number;
604
- scrollY: number;
605
- cursorButton: "up" | "down";
606
- scrolledOutside: boolean;
607
- name: string | null;
608
- isResizing: boolean;
609
- isRotating: boolean;
610
- zoom: import("../types").Zoom;
611
- openMenu: "canvas" | null;
612
- openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
613
- openSidebar: {
614
- name: import("../types").SidebarName;
615
- tab?: import("../types").SidebarTabName;
616
- } | null;
617
- openDialog: null | {
618
- name: "imageExport" | "help" | "jsonExport";
619
- } | {
620
- name: "ttd";
621
- tab: "text-to-diagram" | "mermaid";
622
- } | {
623
- name: "commandPalette";
624
- } | {
625
- name: "settings";
626
- } | {
627
- name: "elementLinkSelector";
628
- sourceElementId: ExcalidrawElement["id"];
629
- } | {
630
- name: "charts";
631
- data: import("../charts").Spreadsheet;
632
- rawText: string;
633
- };
634
- defaultSidebarDockedPreference: boolean;
635
- lastPointerDownWith: import("@excalidraw/element/types").PointerType;
636
- selectedElementIds: Readonly<{
637
- [id: string]: true;
638
- }>;
639
- hoveredElementIds: Readonly<{
640
- [id: string]: true;
641
- }>;
642
- previousSelectedElementIds: {
643
- [id: string]: true;
644
- };
645
- selectedElementsAreBeingDragged: boolean;
646
- shouldCacheIgnoreZoom: boolean;
647
- toast: {
648
- message: React.ReactNode;
649
- closable?: boolean;
650
- duration?: number;
651
- } | null;
652
- zenModeEnabled: boolean;
653
- theme: import("@excalidraw/element/types").Theme;
654
- gridSize: number;
655
- gridStep: number;
656
- gridModeEnabled: boolean;
657
- viewModeEnabled: boolean;
658
- selectedGroupIds: {
659
- [groupId: string]: boolean;
660
- };
661
- editingGroupId: import("@excalidraw/element/types").GroupId | null;
662
- width: number;
663
- height: number;
664
- offsetTop: number;
665
- offsetLeft: number;
666
- fileHandle: FileSystemFileHandle | null;
667
- collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
668
- stats: {
669
- open: boolean;
670
- panels: number;
538
+ colorTopPicks: {
539
+ elementStroke: readonly string[] | null;
540
+ elementBackground: readonly string[] | null;
541
+ bucketFill: readonly string[] | null;
671
542
  };
672
- showHyperlinkPopup: false | "info" | "editor";
673
- selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
674
- snapLines: readonly import("../snapping").SnapLine[];
675
- originSnapOffset: {
676
- x: number;
677
- y: number;
678
- } | null;
679
- objectsSnapModeEnabled: boolean;
680
- userToFollow: import("../types").UserToFollow | null;
681
- followedBy: Set<import("../types").SocketId>;
682
- isCropping: boolean;
683
- croppingElementId: ExcalidrawElement["id"] | null;
684
- searchMatches: Readonly<{
685
- focusedId: ExcalidrawElement["id"] | null;
686
- matches: readonly import("../types").SearchMatch[];
687
- }> | null;
688
- activeLockedId: string | null;
689
- lockedMultiSelections: {
690
- [groupId: string]: true;
691
- };
692
- bindMode: import("@excalidraw/element/types").BindMode;
693
543
  };
694
544
  captureUpdate: "EVENTUALLY";
695
545
  };
696
- keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
546
+ checked: (appState: Readonly<UIAppState>) => boolean;
697
547
  } & {
698
- keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
548
+ keyTest?: undefined;
699
549
  };
700
550
  export declare const actionWrapSelectionInFrame: {
701
551
  name: "wrapSelectionInFrame";
@@ -703,8 +553,8 @@ export declare const actionWrapSelectionInFrame: {
703
553
  trackEvent: {
704
554
  category: "element";
705
555
  };
706
- predicate: (elements: readonly ExcalidrawElement[], appState: AppState, _: import("../types").ExcalidrawProps, app: AppClassProperties) => boolean;
707
- perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: unknown, app: AppClassProperties) => {
556
+ predicate: (elements: readonly ExcalidrawElement[], appState: import("../types").AppState, _: import("../types").ExcalidrawProps, app: AppClassProperties) => boolean;
557
+ perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>, _: unknown, app: AppClassProperties) => {
708
558
  elements: ((Readonly<{
709
559
  id: string;
710
560
  x: number;
@@ -1102,6 +952,7 @@ export declare const actionWrapSelectionInFrame: {
1102
952
  lineHeight: number & {
1103
953
  _brand: "unitlessLineHeight";
1104
954
  };
955
+ labelPosition?: number | null;
1105
956
  }> & {
1106
957
  index: import("@excalidraw/element/types").FractionalIndex;
1107
958
  }) | (Readonly<{